From 72016f9201e4d7820f62e7ef78cee98ed1fc4da0 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Mon, 10 Jun 2024 13:29:02 -0700 Subject: Partial implementation of static_assert (#4294) * Error out for types not supported by texture sample functions This commit prints errors with a new keyword, `static_assert`, when the given texture type is not supported for the target. * Moving the check to linkAndOptimizeIR after specialization is done * Remove unnecessary change * Adding test * Remove kIROp_StaticAssert once processed * Do not remove StaticAssert because it is needed for the next specialization * Remove after iteration of child is done --------- Co-authored-by: Yong He --- source/slang/slang-emit-spirv.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'source/slang/slang-emit-spirv.cpp') diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp index d7c6c64a5..1db323993 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -2632,6 +2632,7 @@ struct SPIRVEmitContext } case kIROp_Specialize: case kIROp_MissingReturn: + case kIROp_StaticAssert: break; case kIROp_Var: result = emitVar(parent, inst); -- cgit v1.2.3