From cab2fed135bc1edf7b65ddca3236020638427061 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 9 Aug 2012 20:59:44 -0600 Subject: 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. --- src/gallium/drivers/softpipe/sp_context.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/gallium/drivers/softpipe/sp_context.c') 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]); -- cgit v1.2.3