summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_shader.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-01-11 18:38:03 +0100
committerMarek Olšák <[email protected]>2015-01-19 20:15:27 +0100
commit5b01512df3328711968dea7240ae817721c79774 (patch)
treecd8607a4a77203219030be47e38730c2b45f05c8 /src/mesa/state_tracker/st_atom_shader.c
parentccc5b60b06269a5d847b7fe9ebe08dc61b4d2030 (diff)
st/mesa: don't set vs.key.clamp_color if a shader doesn't write any colors
And update some comments.
Diffstat (limited to 'src/mesa/state_tracker/st_atom_shader.c')
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 6515a98a3fb..73768ed1237 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -149,7 +149,12 @@ update_vp( struct st_context *st )
key.passthrough_edgeflags = st->vertdata_edgeflags;
key.clamp_color = st->clamp_vert_color_in_shader &&
- st->ctx->Light._ClampVertexColor;
+ st->ctx->Light._ClampVertexColor &&
+ (stvp->Base.Base.OutputsWritten &
+ (VARYING_SLOT_COL0 |
+ VARYING_SLOT_COL1 |
+ VARYING_SLOT_BFC0 |
+ VARYING_SLOT_BFC1));
st->vp_variant = st_get_vp_variant(st, stvp, &key);