summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_context.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-08-09 20:59:44 -0600
committerBrian Paul <brianp@vmware.com>2012-08-16 09:01:31 -0600
commitcab2fed135bc1edf7b65ddca3236020638427061 (patch)
tree17a56b4023ad6345eb1a7baf9813da7dcf0469ff /src/gallium/drivers/llvmpipe/lp_context.c
parenta2c1df4c9a7375bc5306e8cfd07a9f7087759a96 (diff)
downloadexternal_mesa3d-cab2fed135bc1edf7b65ddca3236020638427061.zip
external_mesa3d-cab2fed135bc1edf7b65ddca3236020638427061.tar.gz
external_mesa3d-cab2fed135bc1edf7b65ddca3236020638427061.tar.bz2
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/llvmpipe/lp_context.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index 7d0ca1f..dec3473 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -69,11 +69,11 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
pipe_surface_reference(&llvmpipe->framebuffer.zsbuf, NULL);
- for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
+ for (i = 0; i < Elements(llvmpipe->sampler_views[0]); i++) {
pipe_sampler_view_reference(&llvmpipe->sampler_views[PIPE_SHADER_FRAGMENT][i], NULL);
}
- for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
+ for (i = 0; i < Elements(llvmpipe->sampler_views[0]); i++) {
pipe_sampler_view_reference(&llvmpipe->sampler_views[PIPE_SHADER_VERTEX][i], NULL);
}