From d87493a46c00be37b820a473c0827bbb865eb222 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 2 Oct 2023 15:39:34 -0700 Subject: More direct-SPIRV fixes. (#3257) * More direct-SPIRV fixes. * Fix array-reg-to-mem. --------- Co-authored-by: Yong He --- source/slang/slang-emit-glsl.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source/slang/slang-emit-glsl.cpp') diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index e9472bc96..ccb296e84 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -1893,6 +1893,18 @@ bool GLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu return true; } + case kIROp_GetVulkanRayTracingPayloadLocation: + { + auto payloadVar = inst->getOperand(0); + IRInst* location = getVulkanPayloadLocation(payloadVar); + if (!location) + { + SLANG_DIAGNOSE_UNEXPECTED(getSink(), inst, "no payload location assigned."); + m_writer->emit("0"); + } + m_writer->emit(getIntVal(location)); + return true; + } case kIROp_ImageLoad: { m_writer->emit("imageLoad("); -- cgit v1.2.3