diff options
author | Roland Scheidegger <[email protected]> | 2018-02-25 04:26:37 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2018-02-28 18:22:28 +0100 |
commit | 89ae5def8cea9311727ac80d7274f80650279373 (patch) | |
tree | 7300f06653419d493149056864da3197602f399b /src/gallium/auxiliary/draw | |
parent | 6d8ab53303331a2438ab7c89c94be31c44e70bb1 (diff) |
draw: don't needlessly iterate through all sampler view slots
We already stored the highest (potentially) used number.
Reviewed-by: Jose Fonseca <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 9791ec5506a..e887272e154 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -973,7 +973,7 @@ draw_set_sampler_views(struct draw_context *draw, for (i = 0; i < num; ++i) draw->sampler_views[shader_stage][i] = views[i]; - for (i = num; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; ++i) + for (i = num; i < draw->num_sampler_views[shader_stage]; ++i) draw->sampler_views[shader_stage][i] = NULL; draw->num_sampler_views[shader_stage] = num; |