yuzu-emu
/
yuzu
Archived
1
0
Fork 0

glasm: Implement InstanceId and VertexId

This commit is contained in:
ReinUsesLisp 2021-05-17 19:25:19 -03:00 committed by ameerj
parent afcb140185
commit 4bad415bca
1 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,12 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr,
case IR::Attribute::PositionW: case IR::Attribute::PositionW:
ctx.Add("MOV.F {}.x,{}.position.{};", inst, ctx.stage_name, swizzle); ctx.Add("MOV.F {}.x,{}.position.{};", inst, ctx.stage_name, swizzle);
break; 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: default:
throw NotImplementedException("Get attribute {}", attr); throw NotImplementedException("Get attribute {}", attr);
} }