tnl->Driver.RunPipeline = _tnl_run_pipeline;
ctx->DriverFlags.NewTransformFeedback = BRW_NEW_TRANSFORM_FEEDBACK;
+ ctx->DriverFlags.NewRasterizerDiscard = BRW_NEW_RASTERIZER_DISCARD;
ctx->Const.MaxDualSourceDrawBuffers = 1;
ctx->Const.MaxDrawBuffers = BRW_MAX_DRAW_BUFFERS;
BRW_STATE_SOL_INDICES,
BRW_STATE_VUE_MAP_GEOM_OUT,
BRW_STATE_TRANSFORM_FEEDBACK,
+ BRW_STATE_RASTERIZER_DISCARD,
};
#define BRW_NEW_URB_FENCE (1 << BRW_STATE_URB_FENCE)
#define BRW_NEW_SOL_INDICES (1 << BRW_STATE_SOL_INDICES)
#define BRW_NEW_VUE_MAP_GEOM_OUT (1 << BRW_STATE_VUE_MAP_GEOM_OUT)
#define BRW_NEW_TRANSFORM_FEEDBACK (1 << BRW_STATE_TRANSFORM_FEEDBACK)
+#define BRW_NEW_RASTERIZER_DISCARD (1 << BRW_STATE_RASTERIZER_DISCARD)
struct brw_state_flags {
/** State update flags signalled by mesa internals */
}
}
/* On Gen6, GS is also used for rasterizer discard. */
- /* _NEW_RASTERIZER_DISCARD */
+ /* BRW_NEW_RASTERIZER_DISCARD */
if (ctx->RasterDiscard) {
key->need_gs_prog = true;
key->rasterizer_discard = true;
const struct brw_tracked_state brw_gs_prog = {
.dirty = {
- .mesa = (_NEW_LIGHT |
- _NEW_RASTERIZER_DISCARD),
+ .mesa = (_NEW_LIGHT),
.brw = (BRW_NEW_PRIMITIVE |
- BRW_NEW_TRANSFORM_FEEDBACK),
+ BRW_NEW_TRANSFORM_FEEDBACK |
+ BRW_NEW_RASTERIZER_DISCARD),
.cache = CACHE_NEW_VS_PROG
},
.emit = brw_upload_gs_prog
DEFINE_BIT(BRW_NEW_SOL_INDICES),
DEFINE_BIT(BRW_NEW_VUE_MAP_GEOM_OUT),
DEFINE_BIT(BRW_NEW_TRANSFORM_FEEDBACK),
+ DEFINE_BIT(BRW_NEW_RASTERIZER_DISCARD),
{0, 0, 0}
};
uint32_t dw1 = 0, dw2 = 0;
int i;
- /* _NEW_RASTERIZER_DISCARD */
+ /* BRW_NEW_RASTERIZER_DISCARD */
if (ctx->RasterDiscard)
dw1 |= SO_RENDERING_DISABLE;
const struct brw_tracked_state gen7_sol_state = {
.dirty = {
- .mesa = (_NEW_RASTERIZER_DISCARD |
- _NEW_LIGHT),
+ .mesa = (_NEW_LIGHT),
.brw = (BRW_NEW_BATCH |
BRW_NEW_VERTEX_PROGRAM |
BRW_NEW_VUE_MAP_GEOM_OUT |
- BRW_NEW_TRANSFORM_FEEDBACK)
+ BRW_NEW_TRANSFORM_FEEDBACK |
+ BRW_NEW_RASTERIZER_DISCARD)
},
.emit = upload_sol_state,
};
goto invalid_enum_error;
CHECK_EXTENSION(EXT_transform_feedback, cap);
if (ctx->RasterDiscard != state) {
- FLUSH_VERTICES(ctx, _NEW_RASTERIZER_DISCARD);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewRasterizerDiscard;
ctx->RasterDiscard = state;
}
break;
/* gap, re-use for core Mesa state only; use ctx->DriverFlags otherwise */
#define _NEW_VARYING_VP_INPUTS (1 << 31) /**< gl_context::varying_vp_inputs */
#define _NEW_ALL ~0
-
-/**
- * We use _NEW_TRANSFORM for GL_RASTERIZER_DISCARD. This #define is for
- * clarity.
- */
-#define _NEW_RASTERIZER_DISCARD _NEW_TRANSFORM
/*@}*/
/** gl_context::TransformFeedback::CurrentObject */
GLbitfield NewTransformFeedback;
+
+ /** gl_context::RasterDiscard */
+ GLbitfield NewRasterizerDiscard;
};
struct gl_uniform_buffer_binding
if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP)
raster->bottom_edge_rule = 1;
- /* _NEW_RASTERIZER_DISCARD */
+ /* ST_NEW_RASTERIZER */
raster->rasterizer_discard = ctx->RasterDiscard;
/* _NEW_TRANSFORM */
_NEW_PROGRAM |
_NEW_SCISSOR |
_NEW_FRAG_CLAMP |
- _NEW_RASTERIZER_DISCARD |
_NEW_TRANSFORM), /* mesa state dependencies*/
- ST_NEW_VERTEX_PROGRAM, /* state tracker dependencies */
+ (ST_NEW_VERTEX_PROGRAM |
+ ST_NEW_RASTERIZER), /* state tracker dependencies */
},
update_raster_state /* update function */
};
static void st_init_driver_flags(struct gl_driver_flags *f)
{
f->NewArray = ST_NEW_VERTEX_ARRAYS;
+ f->NewRasterizerDiscard = ST_NEW_RASTERIZER;
}
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
#define ST_NEW_EDGEFLAGS_DATA (1 << 4)
#define ST_NEW_GEOMETRY_PROGRAM (1 << 5)
#define ST_NEW_VERTEX_ARRAYS (1 << 6)
+#define ST_NEW_RASTERIZER (1 << 7)
struct st_state_flags {