diff options
author | FengChen <vonchenplus@gmail.com> | 2022-10-30 12:59:11 +0100 |
---|---|---|
committer | Feng Chen <vonchenplus@gmail.com> | 2022-11-07 08:42:42 +0100 |
commit | a4472b55260ed1ccbad0d191d11abd2330145140 (patch) | |
tree | ed58bca8f35b79497099c8c73675332be455c28e /src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | |
parent | Merge pull request #9163 from vonchenplus/draw_error (diff) | |
download | yuzu-a4472b55260ed1ccbad0d191d11abd2330145140.tar yuzu-a4472b55260ed1ccbad0d191d11abd2330145140.tar.gz yuzu-a4472b55260ed1ccbad0d191d11abd2330145140.tar.bz2 yuzu-a4472b55260ed1ccbad0d191d11abd2330145140.tar.lz yuzu-a4472b55260ed1ccbad0d191d11abd2330145140.tar.xz yuzu-a4472b55260ed1ccbad0d191d11abd2330145140.tar.zst yuzu-a4472b55260ed1ccbad0d191d11abd2330145140.zip |
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp')
-rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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 0a7d42dda..d6562c842 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 @@ -379,6 +379,18 @@ void EmitInvocationId(EmitContext& ctx, IR::Inst& inst) { ctx.Add("MOV.S {}.x,primitive_invocation.x;", inst); } +void EmitInvocationInfo(EmitContext& ctx, IR::Inst& inst) { + switch (ctx.stage) { + case Stage::TessellationControl: + case Stage::TessellationEval: + ctx.Add("SHL.U {}.x,primitive.vertexcount,16;", inst); + break; + default: + LOG_WARNING(Shader, "(STUBBED) called"); + ctx.Add("MOV.S {}.x,0x00ff0000;", inst); + } +} + void EmitSampleId(EmitContext& ctx, IR::Inst& inst) { ctx.Add("MOV.S {}.x,fragment.sampleid.x;", inst); } |