Преглед изворни кода

glasm: Fix tessellation input attributes

ReinUsesLisp пре 5 година
родитељ
комит
a5d978e91e
1 измењених фајлова са 5 додато и 2 уклоњено
  1. 5 2
      src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp

+ 5 - 2
src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp

@@ -21,9 +21,12 @@ void GetCbuf(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, ScalarU
 }
 
 std::string VertexIndex(EmitContext& ctx, ScalarU32 vertex) {
-    if (ctx.stage == Stage::Geometry) {
+    switch (ctx.stage) {
+    case Stage::TessellationControl:
+    case Stage::TessellationEval:
+    case Stage::Geometry:
         return fmt::format("[{}]", vertex);
-    } else {
+    default:
         return "";
     }
 }