mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 22:45:45 +00:00
emit_glasm_context_get_set: Fix GetAttribute return value type.
GetAttribute expects an F32 result type at the IR level, this fixes the return value of attributes which were not returning an F32
This commit is contained in:
parent
6d60524568
commit
44832be5d2
1 changed files with 4 additions and 4 deletions
|
@ -86,7 +86,7 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, Scal
|
||||||
}
|
}
|
||||||
switch (attr) {
|
switch (attr) {
|
||||||
case IR::Attribute::PrimitiveId:
|
case IR::Attribute::PrimitiveId:
|
||||||
ctx.Add("MOV.S {}.x,primitive.id;", inst);
|
ctx.Add("MOV.F {}.x,primitive.id;", inst);
|
||||||
break;
|
break;
|
||||||
case IR::Attribute::PositionX:
|
case IR::Attribute::PositionX:
|
||||||
case IR::Attribute::PositionY:
|
case IR::Attribute::PositionY:
|
||||||
|
@ -113,13 +113,13 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr, Scal
|
||||||
ctx.Add("MOV.F {}.x,vertex.tesscoord.{};", inst, swizzle);
|
ctx.Add("MOV.F {}.x,vertex.tesscoord.{};", inst, swizzle);
|
||||||
break;
|
break;
|
||||||
case IR::Attribute::InstanceId:
|
case IR::Attribute::InstanceId:
|
||||||
ctx.Add("MOV.S {}.x,{}.instance;", inst, ctx.attrib_name);
|
ctx.Add("MOV.F {}.x,{}.instance;", inst, ctx.attrib_name);
|
||||||
break;
|
break;
|
||||||
case IR::Attribute::VertexId:
|
case IR::Attribute::VertexId:
|
||||||
ctx.Add("MOV.S {}.x,{}.id;", inst, ctx.attrib_name);
|
ctx.Add("MOV.F {}.x,{}.id;", inst, ctx.attrib_name);
|
||||||
break;
|
break;
|
||||||
case IR::Attribute::FrontFace:
|
case IR::Attribute::FrontFace:
|
||||||
ctx.Add("CMP.S {}.x,{}.facing.x,0,-1;", inst, ctx.attrib_name);
|
ctx.Add("CMP.F {}.x,{}.facing.x,0,-1;", inst, ctx.attrib_name);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw NotImplementedException("Get attribute {}", attr);
|
throw NotImplementedException("Get attribute {}", attr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue