diff options
Diffstat (limited to 'source/slang/slang-emit-glsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-glsl.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index 1191a170c..cd11e2ac4 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -470,10 +470,15 @@ bool GLSLSourceEmitter::_emitGLSLLayoutQualifier(LayoutResourceKind kind, EmitVa } break; - case LayoutResourceKind::VertexInput: - case LayoutResourceKind::FragmentOutput: + case LayoutResourceKind::VaryingInput: + case LayoutResourceKind::VaryingOutput: m_writer->emit("layout(location = "); m_writer->emit(index); + if( space ) + { + m_writer->emit(", index = "); + m_writer->emit(space); + } m_writer->emit(")\n"); break; |
