diff options
author | Zephyron <zephyron@citron-emu.org> | 2025-01-20 17:02:01 +1000 |
---|---|---|
committer | Zephyron <zephyron@citron-emu.org> | 2025-01-20 17:02:01 +1000 |
commit | 04f9d8b61a8cdc3192c1f4713580caa996f20b04 (patch) | |
tree | 3a104a083e76346f402f42cfb74bb4a226098d9f /src/shader_recompiler/backend/glsl | |
parent | b574aba98b6714b9229a3b0fadf5aaf92851dd51 (diff) |
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
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
-rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp index 2e369ed72..fea325df9 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp @@ -426,9 +426,15 @@ void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { case Stage::TessellationEval: ctx.AddU32("{}=uint(gl_PatchVerticesIn)<<16;", inst); break; + case Stage::Fragment: + // Return sample mask in upper 16 bits + ctx.AddU32("{}=uint(gl_SampleMaskIn[0])<<16;", inst); + break; + case Stage::Compute: default: - LOG_WARNING(Shader, "(STUBBED) called"); - ctx.AddU32("{}=uint(0x00ff0000);", inst); + // Return standard format (0x00ff0000) + ctx.AddU32("{}=0x00ff0000u;", inst); + break; } } |