summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_program.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 34420aaa975..0a7bcb0374c 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1387,10 +1387,6 @@ ntq_setup_inputs(struct vc4_compile *c)
if (c->stage == QSTAGE_FRAG) {
if (var->data.location == VARYING_SLOT_POS) {
emit_fragcoord_input(c, loc);
- } else if (var->data.location == VARYING_SLOT_FACE) {
- c->inputs[loc * 4 + 0] =
- qir_ITOF(c, qir_reg(QFILE_FRAG_REV_FLAG,
- 0));
} else if (var->data.location >= VARYING_SLOT_VAR0 &&
(c->fs_key->point_sprite_mask &
(1 << (var->data.location -
@@ -1546,6 +1542,15 @@ ntq_emit_intrinsic(struct vc4_compile *c, nir_intrinsic_instr *instr)
*dest = qir_uniform(c, QUNIFORM_SAMPLE_MASK, 0);
break;
+ case nir_intrinsic_load_front_face:
+ /* The register contains 0 (front) or 1 (back), and we need to
+ * turn it into a NIR bool where true means front.
+ */
+ *dest = qir_ADD(c,
+ qir_uniform_ui(c, -1),
+ qir_reg(QFILE_FRAG_REV_FLAG, 0));
+ break;
+
case nir_intrinsic_load_input:
assert(instr->num_components == 1);
const_offset = nir_src_as_const_value(instr->src[0]);