Browse Source

glasm: Implement gl_FrongFacing attribute

nce_cpp
ReinUsesLisp 5 years ago
committed by ameerj
parent
commit
bf1ad74e8a
  1. 3
      src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp

3
src/shader_recompiler/backend/glasm/emit_glasm_context_get_set.cpp

@ -71,6 +71,9 @@ void EmitGetAttribute(EmitContext& ctx, IR::Inst& inst, IR::Attribute attr,
case IR::Attribute::VertexId:
ctx.Add("MOV.S {}.x,{}.id;", inst, ctx.stage_name);
break;
case IR::Attribute::FrontFace:
ctx.Add("CMP.S {}.x,{}.facing.x,0,-1;", inst, ctx.stage_name);
break;
default:
throw NotImplementedException("Get attribute {}", attr);
}

Loading…
Cancel
Save