From 154aab7c4b1986b3befee548e5b918782b4cf986 Mon Sep 17 00:00:00 2001 From: EmulationEnjoyer Date: Tue, 12 Nov 2024 21:21:24 +0000 Subject: [PATCH] feat(shader): implement geometry shader invocation info - Update EmitInvocationInfo in SPIRV backend to handle geometry shader stage ref: https://git.citron-emu.org/Citron/Citron/commit/1266fad68128b3779dcd9bbb6c5f77ec1055e2e6#diff-4cbf73a98ed4ad649a4a6f38b569bc31fcf68cf7 --- .../backend/spirv/emit_spirv_context_get_set.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp index 7a7eed4424..be65db7657 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp @@ -547,10 +547,9 @@ Id EmitInvocationInfo(EmitContext& ctx) { switch (ctx.stage) { case Stage::TessellationControl: case Stage::TessellationEval: - return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.patch_vertices_in), - ctx.Const(16u)); + return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.patch_vertices_in), ctx.Const(16u)); case Stage::Geometry: - return ctx.Const(InputTopologyVertices::vertices(ctx.runtime_info.input_topology) << 16); + return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.Const(InputTopologyVertices::vertices(ctx.runtime_info.input_topology)), ctx.Const(16u)); default: LOG_WARNING(Shader, "(STUBBED) called"); return ctx.Const(0x00ff0000u);