From 725735a87b9d223c2afc83bbd049055b1e44a976 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 16 May 2024 10:43:49 -0700 Subject: RasterizerOrder resource for spirv and metal. (#4175) * RasterizerOrder resource for spirv and metal. Also fixes the byte address buffer logic for metal. * Fix. * Delete commented lines. --------- Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> --- source/slang/slang-emit-spirv.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (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 8219d3534..a32e904b7 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -2787,6 +2787,15 @@ struct SPIRVEmitContext case kIROp_discard: result = emitOpKill(parent, inst); break; + case kIROp_BeginFragmentShaderInterlock: + ensureExtensionDeclaration(UnownedStringSlice("SPV_EXT_fragment_shader_interlock")); + requireSPIRVCapability(SpvCapabilityFragmentShaderPixelInterlockEXT); + emitOpExecutionMode(getSection(SpvLogicalSectionID::ExecutionModes), nullptr, getParentFunc(inst), SpvExecutionModePixelInterlockOrderedEXT); + result = emitOpBeginInvocationInterlockEXT(parent, inst); + break; + case kIROp_EndFragmentShaderInterlock: + result = emitOpEndInvocationInterlockEXT(parent, inst); + break; case kIROp_unconditionalBranch: { // If we are jumping to the main block of a loop, -- cgit v1.2.3