diff --git a/src/intel/compiler/jay/jay_from_nir.c b/src/intel/compiler/jay/jay_from_nir.c index eacd0588f97..02f7646ef64 100644 --- a/src/intel/compiler/jay/jay_from_nir.c +++ b/src/intel/compiler/jay/jay_from_nir.c @@ -1506,9 +1506,10 @@ jay_emit_intrinsic(struct nir_to_jay_state *nj, nir_intrinsic_instr *intr) break; case nir_intrinsic_load_front_face: { - /* Bit 11 is facingness for the first polygon. TODO: Multipolygon. */ - jay_inst *and = jay_AND(b, JAY_TYPE_U32, jay_null(), - jay_extract(nj->payload.u0, 9), BITFIELD_BIT(11)); + /* Bit 11 is facingness for subspans 1-2 and 5-6. */ + jay_inst *and = + jay_EXTRACT_SUBSPAN_INFO(b, jay_null(), jay_extract(nj->payload.u0, 9), + payload_u1(nj, 9, 1), BITFIELD_BIT(11)); /* The bit is actually backfacingness so check for equality with 0 */ jay_set_conditional_mod(b, and, dst, GEN_CONDITION_EQ);