Module: Mesa
Branch: staging/21.0
Commit: 7d7c26751855bd6069ca032fe08fc68fef44faf8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d7c26751855bd6069ca032fe08fc68fef44faf8

Author: Lucas Stach <[email protected]>
Date:   Mon May 10 12:15:46 2021 +0200

etnaviv: fix vertex sampler setup

The start offset of the vertex samplers isn't zero, but the indexing of
the passed in views array is still zero based. Use the correct indexing
variable to fix vertex sampler setup.

Cc: <[email protected]>
Fixes: 81ab9fe2d0c2 ("etnaviv: handle NULL views in set_sampler_views")
Signed-off-by: Lucas Stach <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10724>
(cherry picked from commit 92ed827fbdb4debedf2ed534daab4e3d8d8f6b9a)

---

 .pick_status.json                             | 2 +-
 src/gallium/drivers/etnaviv/etnaviv_texture.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index d8816c20d08..ad63615d95a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1219,7 +1219,7 @@
         "description": "etnaviv: fix vertex sampler setup",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "81ab9fe2d0c2c2d9961107c88209f2fff1f136c4"
     },
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c 
b/src/gallium/drivers/etnaviv/etnaviv_texture.c
index ac3f85269dd..123c93f2cfe 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_texture.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c
@@ -247,7 +247,7 @@ set_sampler_views(struct etna_context *ctx, unsigned start, 
unsigned end,
    uint32_t prev_active_sampler_views = ctx->active_sampler_views;
 
    for (i = start, j = 0; j < nr; i++, j++, mask <<= 1) {
-      struct pipe_sampler_view *view = views ? views[i] : NULL;
+      struct pipe_sampler_view *view = views ? views[j] : NULL;
 
       pipe_sampler_view_reference(&ctx->sampler_view[i], view);
       if (view) {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to