Mesa (staging/21.0): panfrost: Stub out set_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: a132e464f8af105ceaa6665ad47f435cd1d14b3c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a132e464f8af105ceaa6665ad47f435cd1d14b3c

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jan 20 10:29:38 2021 -0800

panfrost: Stub out set_shader_images().

If PAN_MESA_DEBUG=deqp is set to enable testing, then we advertise shader
images to get GLES3.1, even though we don't have any of the shader image
funcs hooked up.  This caused breakage when cso started unbinding shader
images at context destruction.

Just stub out the function for now, you'll still segfault when creating an
image.

Cc: mesa-stable (for the next commit)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530>
(cherry picked from commit f259fcae83c12e4df10ec2415a1660cc44810eb7)

---

 .pick_status.json                          |  2 +-
 src/gallium/drivers/panfrost/pan_context.c | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 5773c28d1e5..0696dcfaaeb 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -436,7 +436,7 @@
         "description": "panfrost: Stub out set_shader_images().",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 54a279ec35d..cc1cc36b6e2 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1178,6 +1178,16 @@ panfrost_set_shader_buffers(
                         buffers, start, count);
 }
 
+static void
+panfrost_set_shader_images(
+        struct pipe_context *pctx,
+        enum pipe_shader_type shader,
+        unsigned start, unsigned count,
+        const struct pipe_image_view *images)
+{
+        /* TODO */
+}
+
 static void
 panfrost_set_framebuffer_state(struct pipe_context *pctx,
                                const struct pipe_framebuffer_state *fb)
@@ -1587,6 +1597,7 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags)
         gallium->set_vertex_buffers = panfrost_set_vertex_buffers;
         gallium->set_constant_buffer = panfrost_set_constant_buffer;
         gallium->set_shader_buffers = panfrost_set_shader_buffers;
+        gallium->set_shader_images = panfrost_set_shader_images;
 
         gallium->set_stencil_ref = panfrost_set_stencil_ref;
 



More information about the mesa-commit mailing list