Browse Source

glasm: Implement InstanceId and VertexId

pull/15/merge
ReinUsesLisp 5 years ago
committed by ameerj
parent
commit
4bad415bca
  1. 6
      src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp

6
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);
}

Loading…
Cancel
Save