From 609180b560f5402f8d3f9243f4fbc8b9ad0729fd Mon Sep 17 00:00:00 2001 From: kaizhangNV Date: Tue, 5 Nov 2024 09:22:40 -0800 Subject: [PATCH] handle the compile failure correctly --- try-slang.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/try-slang.js b/try-slang.js index 4b5b0b5..6533a98 100644 --- a/try-slang.js +++ b/try-slang.js @@ -313,6 +313,11 @@ var onRun = () => { const module = device.createShaderModule({code:ret.code}); computePipeline.createPipeline(module); } + else + { + toggleDisplayMode(HIDDEN_MODE); + return; + } toggleDisplayMode(compiler.shaderType); if (compiler.shaderType == SlangCompiler.PRINT_SHADER)