From b7c78da1fbabca7288088e0ce257c06c058bcf73 Mon Sep 17 00:00:00 2001 From: Rehkitzdev Date: Sat, 11 Dec 2021 18:38:32 +0100 Subject: [PATCH] Fix storeInt call in webgl glue code --- vendor/wasm/WebGL/runtime.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vendor/wasm/WebGL/runtime.js b/vendor/wasm/WebGL/runtime.js index b6994a8ec..18b540b5c 100644 --- a/vendor/wasm/WebGL/runtime.js +++ b/vendor/wasm/WebGL/runtime.js @@ -416,7 +416,7 @@ class WebGLInterface { log = log.substring(0, n); this.mem.loadBytes(buf_ptr, buf_len).set(new TextEncoder("utf-8").encode(log)) - storeInt(length_ptr, n); + this.mem.storeInt(length_ptr, n); } }, GetShaderInfoLog: (shader, buf_ptr, buf_len, length_ptr) => { @@ -429,7 +429,7 @@ class WebGLInterface { log = log.substring(0, n); this.mem.loadBytes(buf_ptr, buf_len).set(new TextEncoder("utf-8").encode(log)) - storeInt(length_ptr, n); + this.mem.storeInt(length_ptr, n); } }, GetShaderiv: (shader, pname, p) => { @@ -439,11 +439,11 @@ class WebGLInterface { if (log === null) { log = "(unknown error)"; } - storeInt(p, log.length+1); + this.mem.storeInt(p, log.length+1); } else if (pname == 35720) { let source = this.ctx.getShaderSource(this.shaders[shader]); let sourceLength = (source === null || source.length == 0) ? 0 : source.length+1; - storeInt(p, sourceLength); + this.mem.storeInt(p, sourceLength); } else { let param = this.ctx.getShaderParameter(this.shaders[shader], pname); this.mem.storeI32(p, param); @@ -994,7 +994,7 @@ class WebGLInterface { let n = Math.min(buf_len, name.length); name = name.substring(0, n); this.mem.loadBytes(buf_ptr, buf_len).set(new TextEncoder("utf-8").encode(name)) - storeInt(length_ptr, n); + this.mem.storeInt(length_ptr, n); }, UniformBlockBinding: (program, uniformBlockIndex, uniformBlockBinding) => { this.assertWebGL2();