Mesa (staging/21.0): swr: Don't report support for shader images.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 26 17:20:06 UTC 2021


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jan 22 11:23:35 2021 -0800

swr: Don't report support for shader images.

gallivm has images support, but this driver doesn't.

Cc: mesa-stable (for the upcoming shader image leak fix)
Acked-by: Jan Zielinski <jan.zielinski at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530>
(cherry picked from commit 9445c3d59ff25e61e94f3fa888dd2ac16126b4ce)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/swr/swr_screen.cpp | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 6461e0fd1b3..5773c28d1e5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -445,7 +445,7 @@
         "description": "swr: Don't report support for shader images.",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp
index cd899a6178c..fee417cef1c 100644
--- a/src/gallium/drivers/swr/swr_screen.cpp
+++ b/src/gallium/drivers/swr/swr_screen.cpp
@@ -349,8 +349,10 @@ swr_get_shader_param(struct pipe_screen *screen,
        shader != PIPE_SHADER_TESS_EVAL)
       return 0;
 
-   if (param == PIPE_SHADER_CAP_MAX_SHADER_BUFFERS)
+   if (param == PIPE_SHADER_CAP_MAX_SHADER_BUFFERS ||
+       param == PIPE_SHADER_CAP_MAX_SHADER_IMAGES) {
       return 0;
+   }
 
    return gallivm_get_shader_param(param);
 }



More information about the mesa-commit mailing list