Mesa (staging/21.3): freedreno/a6xx: Emit a null descriptor for unoccupied IBO slots.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 9 22:08:45 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: aec5302799afa0121561066578873b16b6cadae2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aec5302799afa0121561066578873b16b6cadae2

Author: Emma Anholt <emma at anholt.net>
Date:   Mon Oct 25 12:57:15 2021 -0700

freedreno/a6xx: Emit a null descriptor for unoccupied IBO slots.

Fixes a crash in some desktop GL testcases in piglit.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13635>
(cherry picked from commit 7b578c12497cfea2249467951e270993462ff4a9)

---

 .pick_status.json                              | 2 +-
 src/freedreno/ci/freedreno-a630-fails.txt      | 8 +++-----
 src/gallium/drivers/freedreno/a6xx/fd6_image.c | 8 ++++++++
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index be2c5ce6a8c..7d8bd2f17bc 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1921,7 +1921,7 @@
         "description": "freedreno/a6xx: Emit a null descriptor for unoccupied IBO slots.",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt
index aead328e822..d35e8dbf17f 100644
--- a/src/freedreno/ci/freedreno-a630-fails.txt
+++ b/src/freedreno/ci/freedreno-a630-fails.txt
@@ -262,9 +262,6 @@ spec at arb_texture_rg@texwrap formats-int bordercolor-swizzled at GL_RG32UI- swizzled
 spec at arb_texture_rg@texwrap formats-int bordercolor-swizzled at GL_RG8I- swizzled- border color only,Fail
 spec at arb_texture_rg@texwrap formats-int bordercolor-swizzled at GL_RG8UI- swizzled- border color only,Fail
 
-# segfault on fd6_emit_image_tex() of null image resource
-spec at arb_texture_view@bug-layers-image,Crash
-
 spec at arb_texture_view@rendering-layers-image,Fail
 spec at arb_texture_view@rendering-layers-image at layers rendering of image1DArray,Fail
 spec at arb_timer_query@timestamp-get,Fail
@@ -523,8 +520,9 @@ spec at nv_copy_depth_to_color@nv_copy_depth_to_color 1 0x223344ff,Crash
 spec at nv_copy_depth_to_color@nv_copy_depth_to_color 1 0x76356278,Crash
 spec at nv_copy_depth_to_color@nv_copy_depth_to_color,Crash
 
-# segfault on fd6_emit_image_tex() of null image resource
-spec at oes_egl_image_external_essl3@oes_egl_image_external_essl3,Crash
+spec at oes_egl_image_external_essl3@oes_egl_image_external_essl3 at oes_egl_image_external_essl3_imageLoad,Fail
+spec at oes_egl_image_external_essl3@oes_egl_image_external_essl3 at oes_egl_image_external_essl3_imageStore,Fail
+spec at oes_egl_image_external_essl3@oes_egl_image_external_essl3,Fail
 
 # "MESA: error: unknown vertex shader output name: VARYING_SLOT_EDGE
 #  gl-2.0-edgeflag: ../src/freedreno/ir3/ir3_context.c:411: ir3_context_error: Assertion `!""' failed."
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_image.c b/src/gallium/drivers/freedreno/a6xx/fd6_image.c
index 61c6ccbee78..9da1e27faae 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_image.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_image.c
@@ -35,6 +35,8 @@
 #include "fd6_resource.h"
 #include "fd6_texture.h"
 
+#define FDL6_TEX_CONST_DWORDS 16
+
 struct fd6_image {
    struct pipe_resource *prsc;
    enum pipe_format pfmt;
@@ -174,6 +176,12 @@ translate_buf(struct fd6_image *img, const struct pipe_shader_buffer *pimg)
 static void
 emit_image_tex(struct fd_ringbuffer *ring, struct fd6_image *img)
 {
+   if (!img->prsc) {
+      for (int i = 0; i < FDL6_TEX_CONST_DWORDS; i++)
+         OUT_RING(ring, 0);
+      return;
+   }
+
    struct fd_resource *rsc = fd_resource(img->prsc);
    bool ubwc_enabled = fd_resource_ubwc_enabled(rsc, img->level);
 



More information about the mesa-commit mailing list