summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-06-25 18:13:39 +0200
committerNicolai Hähnle <[email protected]>2017-07-05 12:27:12 +0200
commitc2065ed687dd714240928827f620852e37f7dffc (patch)
tree2c1ed39c316b15f88eccf77af4e19bea1ee91806 /src/mesa/state_tracker/st_program.c
parent8a4cd79d0049f98d1c0aff7a77aca73647e3f647 (diff)
st/glsl_to_nir: fix edgeflag passthrough
We have to mark the additional shader input as used, otherwise it will be eliminated, and we have to setup its index correctly. This is a bit of a hack, but so is everything surrounding edgeflag passthrough. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index eb44fc57b57..6b6d41536cf 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -557,8 +557,10 @@ st_create_vp_variant(struct st_context *st,
vpv->tgsi.ir.nir = nir_shader_clone(NULL, stvp->tgsi.ir.nir);
if (key->clamp_color)
NIR_PASS_V(vpv->tgsi.ir.nir, nir_lower_clamp_color_outputs);
- if (key->passthrough_edgeflags)
+ if (key->passthrough_edgeflags) {
NIR_PASS_V(vpv->tgsi.ir.nir, nir_lower_passthrough_edgeflags);
+ vpv->num_inputs++;
+ }
st_finalize_nir(st, &stvp->Base, vpv->tgsi.ir.nir);