diff options
| author | 2021-05-17 19:25:19 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:31 -0400 | |
| commit | 4bad415bcab581c55770a16ef2e8fe1e6d105ff1 (patch) | |
| tree | 18b56f314a2043a84dbc468a7978314b55e586a9 | |
| parent | glasm: Add missing return value on move assignment (diff) | |
| download | yuzu-4bad415bcab581c55770a16ef2e8fe1e6d105ff1.tar.gz yuzu-4bad415bcab581c55770a16ef2e8fe1e6d105ff1.tar.xz yuzu-4bad415bcab581c55770a16ef2e8fe1e6d105ff1.zip | |
glasm: Implement InstanceId and VertexId
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp | 6 |
1 files changed, 6 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 9ce6c9214..ceadb3333 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 | |||
| @@ -65,6 +65,12 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, | |||
| 65 | case IR::Attribute::PositionW: | 65 | case IR::Attribute::PositionW: |
| 66 | ctx.Add("MOV.F {}.x,{}.position.{};", inst, ctx.stage_name, swizzle); | 66 | ctx.Add("MOV.F {}.x,{}.position.{};", inst, ctx.stage_name, swizzle); |
| 67 | break; | 67 | break; |
| 68 | case IR::Attribute::InstanceId: | ||
| 69 | ctx.Add("MOV.S {}.x,{}.instance;", inst, ctx.stage_name); | ||
| 70 | break; | ||
| 71 | case IR::Attribute::VertexId: | ||
| 72 | ctx.Add("MOV.S {}.x,{}.id;", inst, ctx.stage_name); | ||
| 73 | break; | ||
| 68 | default: | 74 | default: |
| 69 | throw NotImplementedException("Get attribute {}", attr); | 75 | throw NotImplementedException("Get attribute {}", attr); |
| 70 | } | 76 | } |