summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_state.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-05-05 14:05:54 -0700
committerEric Anholt <eric@anholt.net>2009-05-06 06:44:14 -0700
commit9490d86808300e5819941a40784e272c290e05ee (patch)
treed01298b6d85f1352ec63fa851158a20590a98417 /src/mesa/drivers/dri/i965/brw_state.h
parentd277547dc69c9004097afdc2ca56a7aed85c6f54 (diff)
i965: Disentangle VS constant surface state from WM surface state.
Also, only create VS surface state if there's a VS constant buffer to be uploaded, and set the contents of the buffer at the same time as creation.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_state.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 7ea2fc113c..1171e61ad4 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -72,6 +72,7 @@ const struct brw_tracked_state brw_sf_vp;
const struct brw_tracked_state brw_state_base_address;
const struct brw_tracked_state brw_urb_fence;
const struct brw_tracked_state brw_vertex_state;
+const struct brw_tracked_state brw_vs_surfaces;
const struct brw_tracked_state brw_vs_prog;
const struct brw_tracked_state brw_vs_unit;
const struct brw_tracked_state brw_wm_input_sizes;
@@ -91,6 +92,20 @@ const struct brw_tracked_state brw_drawing_rect;
const struct brw_tracked_state brw_indices;
const struct brw_tracked_state brw_vertices;
+/**
+ * Use same key for WM and VS surfaces.
+ */
+struct brw_surface_key {
+ GLenum target, depthmode;
+ dri_bo *bo;
+ GLint format, internal_format;
+ GLint first_level, last_level;
+ GLint width, height, depth;
+ GLint pitch, cpp;
+ uint32_t tiling;
+ GLuint offset;
+};
+
/***********************************************************************
* brw_state.c
*/
@@ -150,4 +165,9 @@ GLboolean brw_cached_batch_struct( struct brw_context *brw,
void brw_destroy_batch_cache( struct brw_context *brw );
void brw_clear_batch_cache_flush( struct brw_context *brw );
+/* brw_wm_surface_state.c */
+dri_bo *
+brw_create_constant_surface( struct brw_context *brw,
+ struct brw_surface_key *key );
+
#endif