From 2078e6cf55e3068454df9d843618b412b6abb811 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 9 Apr 2009 17:04:09 -0600 Subject: i965: new SURF_INDEX_ macros Used to map drawables, textures and constant buffers to surface binding table indexes. --- src/mesa/drivers/dri/i965/brw_context.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_context.h') 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 { -- cgit v1.2.3