summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c5
-rw-r--r--src/mesa/main/enable.c2
-rw-r--r--src/mesa/main/mtypes.h6
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c4
4 files changed, 12 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 2495ad5fe0b..886bf98fb85 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -209,7 +209,7 @@ static void populate_key( struct brw_context *brw,
}
}
/* On Gen6, GS is also used for rasterizer discard. */
- /* _NEW_TRANSFORM_FEEDBACK */
+ /* _NEW_RASTERIZER_DISCARD */
if (ctx->RasterDiscard) {
key->need_gs_prog = true;
key->rasterizer_discard = true;
@@ -258,7 +258,8 @@ const struct brw_tracked_state brw_gs_prog = {
.dirty = {
.mesa = (_NEW_LIGHT |
_NEW_TRANSFORM |
- _NEW_TRANSFORM_FEEDBACK),
+ _NEW_TRANSFORM_FEEDBACK |
+ _NEW_RASTERIZER_DISCARD),
.brw = BRW_NEW_PRIMITIVE,
.cache = CACHE_NEW_VS_PROG
},
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 749ae98f5ec..270b24045ba 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -890,7 +890,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
case GL_RASTERIZER_DISCARD:
CHECK_EXTENSION(EXT_transform_feedback, cap);
if (ctx->RasterDiscard != state) {
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+ FLUSH_VERTICES(ctx, _NEW_RASTERIZER_DISCARD);
ctx->RasterDiscard = state;
}
break;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index ff97ea91af2..3d3b006d56b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3073,6 +3073,12 @@ struct gl_matrix_stack
#define _NEW_FRAG_CLAMP (1 << 29)
#define _NEW_TRANSFORM_FEEDBACK (1 << 30) /**< gl_context::TransformFeedback */
#define _NEW_ALL ~0
+
+/**
+ * We use _NEW_TRANSFORM for GL_RASTERIZER_DISCARD. This #define is for
+ * clarity.
+ */
+#define _NEW_RASTERIZER_DISCARD _NEW_TRANSFORM
/*@}*/
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index 7ebc8728166..2d6ad45bad9 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -258,7 +258,7 @@ static void update_raster_state( struct st_context *st )
raster->clamp_fragment_color = ctx->Color._ClampFragmentColor;
raster->gl_rasterization_rules = 1;
- /* _NEW_TRANSFORM */
+ /* _NEW_RASTERIZER_DISCARD */
raster->rasterizer_discard = ctx->RasterDiscard;
cso_set_rasterizer(st->cso_context, raster);
@@ -276,7 +276,7 @@ const struct st_tracked_state st_update_rasterizer = {
_NEW_PROGRAM |
_NEW_SCISSOR |
_NEW_FRAG_CLAMP |
- _NEW_TRANSFORM), /* mesa state dependencies*/
+ _NEW_RASTERIZER_DISCARD), /* mesa state dependencies*/
ST_NEW_VERTEX_PROGRAM, /* state tracker dependencies */
},
update_raster_state /* update function */