|
|
@ -626,7 +626,9 @@ private:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (stage != ShaderType::Vertex || device.HasVertexViewportLayer()) {
|
|
|
|
|
|
|
|
|
|
|
|
if (stage != ShaderType::Geometry &&
|
|
|
|
|
|
|
|
(stage != ShaderType::Vertex || device.HasVertexViewportLayer())) {
|
|
|
|
if (ir.UsesLayer()) {
|
|
|
|
if (ir.UsesLayer()) {
|
|
|
|
code.AddLine("int gl_Layer;");
|
|
|
|
code.AddLine("int gl_Layer;");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -655,6 +657,16 @@ private:
|
|
|
|
--code.scope;
|
|
|
|
--code.scope;
|
|
|
|
code.AddLine("}};");
|
|
|
|
code.AddLine("}};");
|
|
|
|
code.AddNewLine();
|
|
|
|
code.AddNewLine();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (stage == ShaderType::Geometry) {
|
|
|
|
|
|
|
|
if (ir.UsesLayer()) {
|
|
|
|
|
|
|
|
code.AddLine("out int gl_Layer;");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ir.UsesViewportIndex()) {
|
|
|
|
|
|
|
|
code.AddLine("out int gl_ViewportIndex;");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
code.AddNewLine();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DeclareRegisters() {
|
|
|
|
void DeclareRegisters() {
|
|
|
|