Mesa (main): clover: use max shader sampler view/images queries for clover.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 19 01:17:11 UTC 2021


Module: Mesa
Branch: main
Commit: cae1ef0a11a6846d3caafd7fcafeadd6fa7ca6d2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cae1ef0a11a6846d3caafd7fcafeadd6fa7ca6d2

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Oct 19 06:40:24 2021 +1000

clover: use max shader sampler view/images queries for clover.

This is probably sane than my last answer to this question

Reviewed-by: Karol Herbst <kherbst at redhat.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13398>

---

 src/gallium/frontends/clover/core/device.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/frontends/clover/core/device.cpp b/src/gallium/frontends/clover/core/device.cpp
index 7ef66d50492..2e3d77d2bf3 100644
--- a/src/gallium/frontends/clover/core/device.cpp
+++ b/src/gallium/frontends/clover/core/device.cpp
@@ -221,12 +221,14 @@ device::vendor_id() const {
 
 size_t
 device::max_images_read() const {
-   return PIPE_MAX_SHADER_SAMPLER_VIEWS;
+   return pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE,
+                                 PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS);
 }
 
 size_t
 device::max_images_write() const {
-   return PIPE_MAX_SHADER_IMAGES;
+   return pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE,
+                                 PIPE_SHADER_CAP_MAX_SHADER_IMAGES);
 }
 
 size_t



More information about the mesa-commit mailing list