diff options
| author | ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 2024-08-26 19:07:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-26 19:07:10 -0400 |
| commit | f0ba756c2f982aac8095ff0928d048fc97548315 (patch) | |
| tree | fde40dc0975aff82b4669ff8ce7fca0a3a08f8e2 /source/slang/slang-emit-glsl.cpp | |
| parent | 6c3261b618b88c2b996e56dea58ba4f5435b0908 (diff) | |
Fix Varying Variable Location Assignments With Hull Shaders (#4915)
* Fix Varying Variable Location Assignments With Hull Shaders
Fixes: #4913
Fixes: #4540
Changes:
1. Added `kIROp_ControlBarrier` to HLSL/GLSL emitting.
2. Added a method to track 'used' and 'unused' varyings for when legalizing GLSL. This allows us to assign correct offsets to automatically added varyings
* Added a `ZeroLSB` check to UIntSet for this purpose
* add missing return
* code comment adjustment
* cleanup
* comment and HLSL controlBarrier mistake
* assume space for glsl/spriv varying is irrelevant
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index 50d71b6b6..902030791 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -1727,6 +1727,11 @@ bool GLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu { switch (inst->getOp()) { + case kIROp_ControlBarrier: + { + m_writer->emit("barrier();\n"); + return true; + } case kIROp_MakeVectorFromScalar: case kIROp_MatrixReshape: { |
