aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-17 19:25:19 -0300
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:31 -0400
commit4bad415bcab581c55770a16ef2e8fe1e6d105ff1 (patch)
tree18b56f314a2043a84dbc468a7978314b55e586a9 /src/shader_recompiler
parentafcb14018542825e23f392698b93fb4a9a4b4a8b (diff)
glasm: Implement InstanceId and VertexId
Diffstat (limited to 'src/shader_recompiler')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp6
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 9ce6c92148..ceadb3333a 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,
case IR::Attribute::PositionW:
ctx.Add("MOV.F {}.x,{}.position.{};", inst, ctx.stage_name, swizzle);
break;
+ case IR::Attribute::InstanceId:
+ ctx.Add("MOV.S {}.x,{}.instance;", inst, ctx.stage_name);
+ break;
+ case IR::Attribute::VertexId:
+ ctx.Add("MOV.S {}.x,{}.id;", inst, ctx.stage_name);
+ break;
default:
throw NotImplementedException("Get attribute {}", attr);
}