Merge pull request #1967 from kainino0x/fix-dot-free

Fix compileGLSLZeroCopy accidental minification
This commit is contained in:
John Kessenich 2019-11-07 20:29:18 -07:00 committed by GitHub
commit 44f5c625bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,8 +29,8 @@ Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug) {
var ret = {};
var outputIndexU32 = output / 4;
ret.data = Module['HEAPU32'].subarray(outputIndexU32, outputIndexU32 + output_len);
ret.free = function() {
ret['data'] = Module['HEAPU32'].subarray(outputIndexU32, outputIndexU32 + output_len);
ret['free'] = function() {
Module['_destroy_output_buffer'](id);
};
@ -39,7 +39,7 @@ Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug) {
Module['compileGLSL'] = function(glsl, shader_stage, gen_debug) {
var compiled = Module['compileGLSLZeroCopy'](glsl, shader_stage, gen_debug);
var ret = compiled.data.slice()
compiled.free();
var ret = compiled['data'].slice()
compiled['free']();
return ret;
};