summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_context.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-08-08 13:58:48 -0700
committerEric Anholt <eric@anholt.net>2008-08-08 14:00:43 -0700
commitd2796939f18815935c8fe1effb01fa9765d6c7d8 (patch)
tree207b657f757db711640029fe2e27ee657cbc04d0 /src/mesa/drivers/dri/i965/brw_context.h
parent527e1cf172cb0a4d1f2891a351498669be1620cd (diff)
intel-gem: Update to new check_aperture API for classic mode.
To do this, I had to clean up some of 965 state upload stuff. We may end up over-emitting state in the aperture overflow case, but that should be rare, and I'd rather have the simplification of state management.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 32e05542e0..330d5714da 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -135,6 +135,8 @@ struct brw_context;
#define BRW_NEW_METAOPS 0x1000
#define BRW_NEW_FENCE 0x2000
#define BRW_NEW_LOCK 0x4000
+#define BRW_NEW_INDICES 0x8000
+#define BRW_NEW_VERTICES 0x10000
/**
* Used for any batch entry with a relocated pointer that will be used
* by any 3D rendering.
@@ -332,7 +334,7 @@ struct brw_state_pointers {
*/
struct brw_tracked_state {
struct brw_state_flags dirty;
- int (*prepare)( struct brw_context *brw );
+ void (*prepare)( struct brw_context *brw );
void (*emit)( struct brw_context *brw );
};
@@ -450,9 +452,22 @@ struct brw_context
* for changes to this state:
*/
struct brw_vertex_info info;
+ unsigned int min_index, max_index;
} vb;
struct {
+ /**
+ * Index buffer for this draw_prims call.
+ *
+ * Updates are signaled by BRW_NEW_INDICES.
+ */
+ const struct _mesa_index_buffer *ib;
+
+ dri_bo *bo;
+ unsigned int offset;
+ } ib;
+
+ struct {
/* Will be allocated on demand if needed.
*/
struct brw_state_pointers attribs;
@@ -641,7 +656,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
/*======================================================================
* brw_state.c
*/
-int brw_validate_state( struct brw_context *brw );
+void brw_validate_state( struct brw_context *brw );
void brw_init_state( struct brw_context *brw );
void brw_destroy_state( struct brw_context *brw );