Skip to content

Commit

Permalink
fix TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Sep 28, 2019
1 parent 52164bd commit ef164cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/library_webgpu.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
return s;
},

makeGetBool: function(ptr, pos) { return makeGetValue(ptr, pos, 'i32') !== 0; },
makeGetBool: function(ptr, pos) { return '(' + makeGetValue(ptr, pos, 'i32') + ' !== 0)'; },
makeGetU32: function(ptr, pos) { return makeGetValue(ptr, pos, 'i32', false, true); },
makeGetU64: function(ptr, pos) { return makeGetValue(ptr, pos, 'i64', false, true); },

Expand Down Expand Up @@ -443,8 +443,7 @@ var LibraryWebGPU = {
{{{ makeGetValue('descriptor', C_STRUCTS.DawnRenderPipelineDescriptor.vertexInput, '*') }}}),
sampleCount: {{{ gpu.makeGetU32('descriptor', C_STRUCTS.DawnRenderPipelineDescriptor.sampleCount) }}},
sampleMask: {{{ gpu.makeGetU32('descriptor', C_STRUCTS.DawnRenderPipelineDescriptor.sampleMask) }}},
// TODO(kainino0x): Turn this on when it doesn't throw an error in Chrome.
//alphaToCoverageEnabled: {{{ gpu.makeGetBool('descriptor', C_STRUCTS.DawnRenderPipelineDescriptor.alphaToCoverageEnabled) }}},
alphaToCoverageEnabled: {{{ gpu.makeGetBool('descriptor', C_STRUCTS.DawnRenderPipelineDescriptor.alphaToCoverageEnabled) }}},
};

var device = WebGPU.mgrDevice.get(deviceId);
Expand All @@ -470,8 +469,9 @@ var LibraryWebGPU = {
var type;
if (ev.error instanceof GPUValidationError) type = Validation;
else if (ev.error instanceof GPUOutOfMemoryError) type = OutOfMemory;
var message = 0; // TODO: copy ev.error.message into memory, pass it, then free it
dynCall('viii', callback, [type, message, userdata]);
var messagePtr = allocateUTF8(ev.error.message);
dynCall('viii', callback, [type, messagePtr, userdata]);
_free(messagePtr);
};
},

Expand Down

0 comments on commit ef164cf

Please sign in to comment.