summaryrefslogtreecommitdiff
path: root/src/mesa/main/mtypes.h
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2013-04-15 00:50:20 +0200
committerMarek Olšák <maraeo@gmail.com>2013-04-24 03:23:23 +0200
commitb95cbe5e800e95d888d148e20e6a4e34c8857a9e (patch)
treeae6f5de49fd974c8ab83116a331b4325f623fe9b /src/mesa/main/mtypes.h
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 <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/main/mtypes.h')
-rw-r--r--src/mesa/main/mtypes.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 6108a35fd80..8d8622e9e1b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3148,7 +3148,7 @@ struct gl_matrix_stack
#define _NEW_PROGRAM_CONSTANTS (1 << 27)
#define _NEW_BUFFER_OBJECT (1 << 28)
#define _NEW_FRAG_CLAMP (1 << 29)
-#define _NEW_TRANSFORM_FEEDBACK (1 << 30) /**< gl_context::TransformFeedback */
+/* 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
@@ -3333,7 +3333,11 @@ typedef enum
*/
struct gl_driver_flags
{
- GLbitfield NewArray; /**< Vertex array state */
+ /** gl_context::Array::_DrawArrays (vertex array state) */
+ GLbitfield NewArray;
+
+ /** gl_context::TransformFeedback::CurrentObject */
+ GLbitfield NewTransformFeedback;
};
struct gl_uniform_buffer_binding