summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_context.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-04-09 17:04:09 -0600
committerBrian Paul <brianp@vmware.com>2009-04-09 17:04:09 -0600
commit2078e6cf55e3068454df9d843618b412b6abb811 (patch)
tree38b6c0bdf1281262683380d69fc3174bc1515bd8 /src/mesa/drivers/dri/i965/brw_context.h
parent7e0d4598fb7d2d7dd150870debeb102b5ce664bf (diff)
i965: new SURF_INDEX_ macros
Used to map drawables, textures and constant buffers to surface binding table indexes.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 01e07c967f..c6e15c8914 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -247,9 +247,18 @@ struct brw_vs_ouput_sizes {
/**
* Size of our surface binding table.
* This contains pointers to the drawing surfaces and current texture
- * objects and shader constant buffer (+1).
+ * objects and shader constant buffers (+2).
*/
-#define BRW_WM_MAX_SURF (MAX_DRAW_BUFFERS + BRW_MAX_TEX_UNIT + 1)
+#define BRW_WM_MAX_SURF (MAX_DRAW_BUFFERS + BRW_MAX_TEX_UNIT + 2)
+
+/**
+ * Helpers to convert drawing buffers, textures and constant buffers
+ * to surface binding table indexes.
+ */
+#define SURF_INDEX_DRAW(d) (d)
+#define SURF_INDEX_FRAG_CONST_BUFFER (MAX_DRAW_BUFFERS + 0)
+#define SURF_INDEX_VERT_CONST_BUFFER (MAX_DRAW_BUFFERS + 1)
+#define SURF_INDEX_TEXTURE(t) (MAX_DRAW_BUFFERS + 2 + t)
enum brw_cache_id {