Mesa (staging/22.1): gallium/u_threaded_context: Use PIPE_MAX_SHADER_SAMPLER_VIEWS for sampler_buffers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 11 04:23:24 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 3830fb9769b4c767b6cfffe9da8240377f483d55
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3830fb9769b4c767b6cfffe9da8240377f483d55

Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date:   Mon Apr 18 12:03:35 2022 -0500

gallium/u_threaded_context: Use PIPE_MAX_SHADER_SAMPLER_VIEWS for sampler_buffers

Sampler views and samplers may not be the same limit; in fact one is 32
while the other is 128.  The sampler_buffers field is tracking sampler
views (yes, naming is confusing) so we should use the right limit.

Fixes: e9c41b321488 ("gallium/u_threaded: add buffer lists - tracking of buffers referenced by tc")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15988>
(cherry picked from commit 620c5e9dd05c57c253fa1e56218e88fe7bd23d86)

---

 .pick_status.json                               | 2 +-
 src/gallium/auxiliary/util/u_threaded_context.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 14e5dd73fe5..bdaa9be782b 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -589,7 +589,7 @@
         "description": "gallium/u_threaded_context: Use PIPE_MAX_SHADER_SAMPLER_VIEWS for sampler_buffers",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "e9c41b321488c23b7d8ec5744f68218bac753505"
     },
diff --git a/src/gallium/auxiliary/util/u_threaded_context.h b/src/gallium/auxiliary/util/u_threaded_context.h
index 3b7ea7a2677..67d2d69d271 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.h
+++ b/src/gallium/auxiliary/util/u_threaded_context.h
@@ -516,7 +516,7 @@ struct threaded_context {
    uint32_t shader_buffers_writeable_mask[PIPE_SHADER_TYPES];
    uint32_t image_buffers_writeable_mask[PIPE_SHADER_TYPES];
    /* Don't use PIPE_MAX_SHADER_SAMPLER_VIEWS because it's too large. */
-   uint32_t sampler_buffers[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
+   uint32_t sampler_buffers[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_SAMPLER_VIEWS];
 
    struct tc_batch batch_slots[TC_MAX_BATCHES];
    struct tc_buffer_list buffer_lists[TC_MAX_BUFFER_LISTS];



More information about the mesa-commit mailing list