From 8af15e24218df38f19878f1008b40e44c48a8629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Thu, 26 Jan 2023 10:26:09 +0200 Subject: [PATCH] Add missing assertions. #24 --- lib/lib_webgpu.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/lib_webgpu.js b/lib/lib_webgpu.js index 647a164..6058523 100644 --- a/lib/lib_webgpu.js +++ b/lib/lib_webgpu.js @@ -1037,6 +1037,9 @@ mergeInto(LibraryManager.library, { pipelineLayoutId = HEAPU32[fragmentIdx+6], desc; + {{{ wassert('pipelineLayoutId <= 1/*"auto"*/ || wgpu[pipelineLayoutId]'); }}} + {{{ wassert('pipelineLayoutId <= 1/*"auto"*/ || wgpu[pipelineLayoutId] instanceof GPUPipelineLayout'); }}} + // Read GPUVertexState {{{ wassert('numVertexBuffers >= 0'); }}} while(numVertexBuffers--) {