From 04f9d8b61a8cdc3192c1f4713580caa996f20b04 Mon Sep 17 00:00:00 2001 From: Zephyron Date: Mon, 20 Jan 2025 17:02:01 +1000 Subject: shader: Implement EmitInvocationInfo across all backends - Add proper invocation info handling for tessellation and fragment stages - Return patch vertices info shifted by 16 bits for tessellation stages - Return sample mask shifted by 16 bits for fragment stage - Return standard format (0x00ff0000) for compute and other stages - Implement consistently across SPIRV, GLSL, and GLASM backends - Remove stubbed warning message --- .../backend/glasm/emit_glasm_context_get_set.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/shader_recompiler/backend/glasm') diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp index c7d7d5fef..8d2b9d569 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp @@ -406,9 +406,15 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { case Stage::TessellationEval: ctx.Add("SHL.U {}.x,primitive.vertexcount,16;", inst); break; + case Stage::Fragment: + // Return sample mask in upper 16 bits + ctx.Add("SHL.U {}.x,fragment.samplemask,16;", inst); + break; + case Stage::Compute: default: - LOG_WARNING(Shader, "(STUBBED) called"); + // Return standard format (0x00ff0000) ctx.Add("MOV.S {}.x,0x00ff0000;", inst); + break; } } -- cgit v1.2.3