summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-08-09 20:59:44 -0600
committerBrian Paul <[email protected]>2012-08-16 09:01:31 -0600
commitcab2fed135bc1edf7b65ddca3236020638427061 (patch)
tree17a56b4023ad6345eb1a7baf9813da7dcf0469ff /src/gallium/drivers/softpipe/sp_context.c
parenta2c1df4c9a7375bc5306e8cfd07a9f7087759a96 (diff)
gallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #define
PIPE_MAX_SAMPLERS, PIPE_MAX_VERTEX_SAMPLERS and PIPE_MAX_GEOMETRY_SAMPLERS were all defined to the same value (16). In various places we're creating arrays such as sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] so we were assuming the same number of max samplers for all shader stages anyway. Of course, drivers are still free to advertise different numbers of max samplers for different shaders.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index e2e32b9bd8c..0360b3ba9fb 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -216,10 +216,6 @@ softpipe_create_context( struct pipe_screen *screen,
struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context);
uint i, sh;
- /* Check since we have arrays[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] */
- STATIC_ASSERT(PIPE_MAX_SAMPLERS == PIPE_MAX_VERTEX_SAMPLERS);
- STATIC_ASSERT(PIPE_MAX_SAMPLERS == PIPE_MAX_GEOMETRY_SAMPLERS);
-
util_init_math();
softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE );
@@ -290,13 +286,13 @@ softpipe_create_context( struct pipe_screen *screen,
draw_texture_samplers(softpipe->draw,
PIPE_SHADER_VERTEX,
- PIPE_MAX_VERTEX_SAMPLERS,
+ PIPE_MAX_SAMPLERS,
(struct tgsi_sampler **)
softpipe->tgsi.samplers_list[PIPE_SHADER_VERTEX]);
draw_texture_samplers(softpipe->draw,
PIPE_SHADER_GEOMETRY,
- PIPE_MAX_GEOMETRY_SAMPLERS,
+ PIPE_MAX_SAMPLERS,
(struct tgsi_sampler **)
softpipe->tgsi.samplers_list[PIPE_SHADER_GEOMETRY]);