aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_sol.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-04-15 00:50:20 +0200
committerMarek Olšák <[email protected]>2013-04-24 03:23:23 +0200
commitb95cbe5e800e95d888d148e20e6a4e34c8857a9e (patch)
treeae6f5de49fd974c8ab83116a331b4325f623fe9b /src/mesa/drivers/dri/i965/gen6_sol.c
parentef39bc4f2ee09ee020b52fff9a9c8dc680fc252e (diff)
mesa,i965: use NewDriverState to communicate TFB state changes with the driver
_NEW_TRANSFORM_FEEDBACK is not used by core Mesa, so it can be removed. Instead, an new private flag is added to i965 to serve the same purpose. If you're new to this: * When creating a context. you can set private dirty flags in gl_context::DriverFlags, eg.: ctx->DriverFlags.NewStateX = BRW_NEW_STATE_X; * When StateX is changed, core Mesa does: ctx->NewDriverState |= ctx->DriverFlags.NewStateX; * When you have to draw, read and clear ctx->NewDriverState. * Pros: not touching NewState, the driver decides the mapping between GL states and hw state groups, unlimited number of flags in core Mesa (still limited number of flags in the driver though) Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_sol.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sol.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sol.c b/src/mesa/drivers/dri/i965/gen6_sol.c
index cf7a60db6be..3cbf28e7dc4 100644
--- a/src/mesa/drivers/dri/i965/gen6_sol.c
+++ b/src/mesa/drivers/dri/i965/gen6_sol.c
@@ -37,7 +37,7 @@ static void
gen6_update_sol_surfaces(struct brw_context *brw)
{
struct gl_context *ctx = &brw->intel.ctx;
- /* _NEW_TRANSFORM_FEEDBACK */
+ /* BRW_NEW_TRANSFORM_FEEDBACK */
struct gl_transform_feedback_object *xfb_obj =
ctx->TransformFeedback.CurrentObject;
/* BRW_NEW_VERTEX_PROGRAM */
@@ -69,9 +69,10 @@ gen6_update_sol_surfaces(struct brw_context *brw)
const struct brw_tracked_state gen6_sol_surface = {
.dirty = {
- .mesa = _NEW_TRANSFORM_FEEDBACK,
+ .mesa = 0,
.brw = (BRW_NEW_BATCH |
- BRW_NEW_VERTEX_PROGRAM),
+ BRW_NEW_VERTEX_PROGRAM |
+ BRW_NEW_TRANSFORM_FEEDBACK),
.cache = 0
},
.emit = gen6_update_sol_surfaces,