diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-11 08:03:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-11 08:03:40 -0500 |
| commit | c973029374a731e13f2de240820c818fa2899c2b (patch) | |
| tree | ab20b418b3c6465e4e9b9503d8d3744f3560ad4b /src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | |
| parent | 5eb30c7827959075cd240f39c6ab57d2c2a8197e (diff) | |
| parent | a4472b55260ed1ccbad0d191d11abd2330145140 (diff) | |
Merge pull request #9167 from vonchenplus/tess
video_core: Fix few issues in Tess stage
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp | 12 |
1 files changed, 12 insertions, 0 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 d7c845469..c1671c37b 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 @@ -399,6 +399,18 @@ void EmitInvocationId(EmitContext& ctx, IR::Inst& inst) { ctx.AddU32("{}=uint(gl_InvocationID);", inst); } +void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { + switch (ctx.stage) { + case Stage::TessellationControl: + case Stage::TessellationEval: + ctx.AddU32("{}=uint(gl_PatchVerticesIn)<<16;", inst); + break; + default: + LOG_WARNING(Shader, "(STUBBED) called"); + ctx.AddU32("{}=uint(0x00ff0000);", inst); + } +} + void EmitSampleId(EmitContext& ctx, IR::Inst& inst) { ctx.AddU32("{}=uint(gl_SampleID);", inst); } |
