Closed pradyumans closed 1 month ago
Following inlined spirv slang testcase generates illegal OpExecutionModeId inserted inside OpFunction declaration
[shader("compute")] [numthreads(16, 16, 1)] void root() { spirv_asm { OpCapability Kernel; OpExecutionModeId $root VecTypeHint $(0); OpExecutionModeId $root LocalSizeHintId $(1) $(1) $(1); }; }
// Disassembled SPIRV with spirv-dis
; SPIR-V ; Version: 1.3 ; Generator: Khronos; 40 ; Bound: 8 ; Schema: 0 OpCapability Kernel OpCapability Shader OpMemoryModel Logical GLSL450 OpEntryPoint GLCompute %root "root" OpExecutionMode %root LocalSize 16 16 1 OpSource Slang 1 OpName %root "root" %void = OpTypeVoid %3 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %root = OpFunction %void None %3 %4 = OpLabel **OpExecutionModeId %root VecTypeHint 6 // ILLEGAL OpExecutionModeId %root LocalSizeHintId %int_1 %int_1 %int_1 // ILLEGAL** OpReturn OpFunctionEnd
Similar issue with OpDecorateId as well
Following inlined spirv slang testcase generates illegal OpExecutionModeId inserted inside OpFunction declaration
// Disassembled SPIRV with spirv-dis