summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-glsl.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-05-16 10:43:49 -0700
committerGitHub <noreply@github.com>2024-05-16 10:43:49 -0700
commit725735a87b9d223c2afc83bbd049055b1e44a976 (patch)
tree225f381774fb9b5209007ae7fc455a14f57a6fe6 /source/slang/slang-emit-glsl.cpp
parent0a6180299352d7a2ec850004564c7a95b37a41c4 (diff)
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>
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
-rw-r--r--source/slang/slang-emit-glsl.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp
index 5cf508876..8063fcc1d 100644
--- a/source/slang/slang-emit-glsl.cpp
+++ b/source/slang/slang-emit-glsl.cpp
@@ -2089,6 +2089,20 @@ bool GLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu
// Handled
return true;
}
+ case kIROp_BeginFragmentShaderInterlock:
+ {
+ _requireGLSLVersion(420);
+ _requireGLSLExtension(UnownedStringSlice::fromLiteral("GL_ARB_fragment_shader_interlock"));
+ m_writer->emit("beginInvocationInterlockARB()");
+ return true;
+ }
+ case kIROp_EndFragmentShaderInterlock:
+ {
+ _requireGLSLVersion(420);
+ _requireGLSLExtension(UnownedStringSlice::fromLiteral("GL_ARB_fragment_shader_interlock"));
+ m_writer->emit("endInvocationInterlockARB()");
+ return true;
+ }
default: break;
}
@@ -2576,12 +2590,6 @@ void GLSLSourceEmitter::emitSimpleTypeImpl(IRType* type)
m_writer->emit("accelerationStructureEXT");
break;
}
-
- // TODO: These "translations" are obviously wrong for GLSL.
- case kIROp_HLSLByteAddressBufferType: m_writer->emit("ByteAddressBuffer"); break;
- case kIROp_HLSLRWByteAddressBufferType: m_writer->emit("RWByteAddressBuffer"); break;
- case kIROp_HLSLRasterizerOrderedByteAddressBufferType: m_writer->emit("RasterizerOrderedByteAddressBuffer"); break;
-
default:
SLANG_DIAGNOSE_UNEXPECTED(getSink(), SourceLoc(), "unhandled buffer type");
break;