iris: Fix set_sampler_views with start > 0
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 3 Dec 2018 07:15:41 +0000 (23:15 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:10 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index 641af6d20735add759b2ed719d648d2986157281..7cd3e11a2b9ab5ba7ce7a7a5d7e0cf69b7aa2be3 100644 (file)
@@ -1765,7 +1765,7 @@ iris_set_sampler_views(struct pipe_context *ctx,
 
    for (unsigned i = 0; i < count; i++) {
       pipe_sampler_view_reference((struct pipe_sampler_view **)
-                                  &shs->textures[i], views[i]);
+                                  &shs->textures[start + i], views[i]);
       struct iris_sampler_view *view = (void *) views[i];
       if (view)
          view->res->bind_history |= PIPE_BIND_SAMPLER_VIEW;