summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-08-04 13:20:31 -0700
committerEric Anholt <[email protected]>2016-08-19 13:11:36 -0700
commitc078c41520214baf469dd4413f868e42c2959c5e (patch)
treecd80e21860e52cac2bfdc5fc5564d9253fb93eb2 /src/gallium/drivers/vc4
parent3f607f9e4f4a55d62088ea85192cda04a3e79a4e (diff)
ttn: Use nir_load_front_face instead of the TGSI-style input.
This reduces the diff between GLSL-to-NIR and TGSI-to-NIR, and gives NIR more optimization to work on. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers/vc4')
-rw-r--r--src/gallium/drivers/vc4/vc4_nir_lower_io.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_io.c b/src/gallium/drivers/vc4/vc4_nir_lower_io.c
index 2b4ad9c5ea6..e55f77cd38f 100644
--- a/src/gallium/drivers/vc4/vc4_nir_lower_io.c
+++ b/src/gallium/drivers/vc4/vc4_nir_lower_io.c
@@ -273,20 +273,7 @@ vc4_nir_lower_fs_input(struct vc4_compile *c, nir_builder *b,
dests[i] = &intr_comp->dest.ssa;
}
- if (input_var->data.location == VARYING_SLOT_FACE) {
- /* TGSI-to-NIR's front face. Convert to using the system
- * value boolean instead.
- */
- nir_ssa_def *face =
- nir_load_system_value(b,
- nir_intrinsic_load_front_face,
- 0);
- dests[0] = nir_bcsel(b, face, nir_imm_float(b, 1.0),
- nir_imm_float(b, -1.0));
- dests[1] = nir_imm_float(b, 0.0);
- dests[2] = nir_imm_float(b, 0.0);
- dests[3] = nir_imm_float(b, 1.0);
- } else if (input_var->data.location >= VARYING_SLOT_VAR0) {
+ if (input_var->data.location >= VARYING_SLOT_VAR0) {
if (c->fs_key->point_sprite_mask &
(1 << (input_var->data.location -
VARYING_SLOT_VAR0))) {