diff options
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index 1ae178aa8..293bcb891 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -2068,6 +2068,21 @@ bool GLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu maybeCloseParens(assignNeedsClose); return true; } + case kIROp_NonUniformResourceIndex: + { + // Need to emit as a Function call for HLSL + m_writer->emit("nonuniformEXT"); + m_writer->emit("("); + emitOperand(inst->getOperand(0), getInfo(EmitOp::General)); + m_writer->emit(")"); + + // Forcibly enabling the GL extension when using 'implict-sized' arrays + // with the qualifier. May be this is not advisable. + _requireGLSLExtension(UnownedStringSlice::fromLiteral("GL_EXT_nonuniform_qualifier")); + + // Handled + return true; + } default: break; } |
