summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/galahad
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/galahad
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/galahad')
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index 01ab92341a0..dc7f017d91e 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -208,10 +208,10 @@ galahad_context_bind_vertex_sampler_states(struct pipe_context *_pipe,
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
- if (num_samplers > PIPE_MAX_VERTEX_SAMPLERS) {
+ if (num_samplers > PIPE_MAX_SAMPLERS) {
glhd_error("%u vertex samplers requested, "
"but only %u are permitted by API",
- num_samplers, PIPE_MAX_VERTEX_SAMPLERS);
+ num_samplers, PIPE_MAX_SAMPLERS);
}
pipe->bind_vertex_sampler_states(pipe,
@@ -587,14 +587,14 @@ galahad_context_set_vertex_sampler_views(struct pipe_context *_pipe,
{
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
- struct pipe_sampler_view *unwrapped_views[PIPE_MAX_VERTEX_SAMPLERS];
+ struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
struct pipe_sampler_view **views = NULL;
unsigned i;
if (_views) {
for (i = 0; i < num; i++)
unwrapped_views[i] = galahad_sampler_view_unwrap(_views[i]);
- for (; i < PIPE_MAX_VERTEX_SAMPLERS; i++)
+ for (; i < Elements(unwrapped_views); i++)
unwrapped_views[i] = NULL;
views = unwrapped_views;