Explorar o código

glsl: Add gl_PerVertex in for GS

ameerj %!s(int64=5) %!d(string=hai) anos
pai
achega
d1a68f7997
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/shader_recompiler/backend/glsl/emit_context.cpp

+ 2 - 1
src/shader_recompiler/backend/glsl/emit_context.cpp

@@ -245,7 +245,8 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
         break;
     case Stage::Geometry:
         stage_name = "gs";
-        header += fmt::format("layout({})in;layout({},max_vertices={})out;",
+        header += fmt::format("layout({})in;layout({},max_vertices={})out;"
+                              "in gl_PerVertex{{vec4 gl_Position;}}gl_in[];",
                               InputPrimitive(runtime_info.input_topology),
                               OutputPrimitive(program.output_topology), program.output_vertices);
         break;