mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 23:30:10 +01:00
softpipe: don't iterate through PIPE_MAX_SHADER_SAMPLER_VIEWS
We were setting view to NULL if the iteration was larger than i. But in fact if the view is NULL the code did nothing anyway... Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
parent
b923f21eaa
commit
26103487b5
1 changed files with 2 additions and 2 deletions
|
|
@ -181,8 +181,8 @@ prepare_shader_sampling(
|
|||
if (!num)
|
||||
return;
|
||||
|
||||
for (i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; i++) {
|
||||
struct pipe_sampler_view *view = i < num ? views[i] : NULL;
|
||||
for (i = 0; i < num; i++) {
|
||||
struct pipe_sampler_view *view = views[i];
|
||||
|
||||
if (view) {
|
||||
struct pipe_resource *tex = view->texture;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue