aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-11-14 14:37:00 -0800
committerEric Anholt <[email protected]>2012-11-17 12:55:54 -0800
commit3c368bb307544a51f8b8d13f0d496a742086c9e2 (patch)
tree7c1e1d2ca8a3b98f7061f5a7698d2f277d6fa655 /src/mesa
parent94e82b2e6cabd7ad26ff35067f6b6675168649d3 (diff)
i965/gen4: Respect the VERTEX_PROGRAM_TWO_SIDE vertex program/shader flag.
Fixes piglit "vertex-program-two-side enabled front back" and 4 others. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 23a874aa8ec..eb361a97092 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -190,9 +190,10 @@ brw_upload_sf_prog(struct brw_context *brw)
if ((ctx->Point.SpriteOrigin == GL_LOWER_LEFT) != render_to_fbo)
key.sprite_origin_lower_left = true;
- /* _NEW_LIGHT */
+ /* _NEW_LIGHT | _NEW_PROGRAM */
key.do_flat_shading = (ctx->Light.ShadeModel == GL_FLAT);
- key.do_twoside_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide);
+ key.do_twoside_color = ((ctx->Light.Enabled && ctx->Light.Model.TwoSide) ||
+ ctx->VertexProgram._TwoSideEnabled);
/* _NEW_POLYGON */
if (key.do_twoside_color) {
@@ -214,7 +215,7 @@ brw_upload_sf_prog(struct brw_context *brw)
const struct brw_tracked_state brw_sf_prog = {
.dirty = {
.mesa = (_NEW_HINT | _NEW_LIGHT | _NEW_POLYGON | _NEW_POINT |
- _NEW_TRANSFORM | _NEW_BUFFERS),
+ _NEW_TRANSFORM | _NEW_BUFFERS | _NEW_PROGRAM),
.brw = (BRW_NEW_REDUCED_PRIMITIVE),
.cache = CACHE_NEW_VS_PROG
},