summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_context.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-08-04 08:46:41 -0600
committerBrian Paul <[email protected]>2012-08-06 08:33:17 -0600
commit0a14e9f09fc1cf9d5c277bb239f349203d3bed79 (patch)
tree96ce96ffcfc14a4d464bb369b4da084be2860ff7 /src/gallium/drivers/softpipe/sp_context.h
parent61b62c007a7941e9b45e83440e932160a597e0e1 (diff)
softpipe: combine vert/frag/geom texture caches in an array
This lets us consolidate some code now, and more in subsequent patches. Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.h')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index 7634254104b..95f5b769a5a 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -184,9 +184,13 @@ struct softpipe_context {
struct softpipe_tile_cache *zsbuf_cache;
unsigned tex_timestamp;
- struct softpipe_tex_tile_cache *fragment_tex_cache[PIPE_MAX_SAMPLERS];
- struct softpipe_tex_tile_cache *vertex_tex_cache[PIPE_MAX_VERTEX_SAMPLERS];
- struct softpipe_tex_tile_cache *geometry_tex_cache[PIPE_MAX_GEOMETRY_SAMPLERS];
+
+ /*
+ * Texture caches for vertex, fragment, geometry stages.
+ * Don't use PIPE_SHADER_TYPES here to avoid allocating unused memory
+ * for compute shaders.
+ */
+ struct softpipe_tex_tile_cache *tex_cache[PIPE_SHADER_GEOMETRY+1][PIPE_MAX_SAMPLERS];
unsigned dump_fs : 1;
unsigned dump_gs : 1;