Mesa (staging/21.2): Revert "panfrost: Port v5 blend shader issue to blitter"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 24 20:29:58 UTC 2021


Module: Mesa
Branch: staging/21.2
Commit: 618a46f5ad4b4f14f4d52b4c823f64fdd18d6bfc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=618a46f5ad4b4f14f4d52b4c823f64fdd18d6bfc

Author: Dylan Baker <dylan.c.baker at intel.com>
Date:   Tue Aug 24 13:29:46 2021 -0700

Revert "panfrost: Port v5 blend shader issue to blitter"

This reverts commit 7dfef216bf5d30680b00eb55923f3092efb28f12.

---

 .pick_status.json                                    |  2 +-
 .../drivers/panfrost/ci/deqp-panfrost-t860-fails.txt | 17 +++++++++++++++++
 src/gallium/drivers/panfrost/pan_cmdstream.c         | 13 +++++++++++++
 src/panfrost/lib/pan_blitter.c                       | 20 +++++++++-----------
 src/panfrost/lib/pan_util.h                          | 13 -------------
 5 files changed, 40 insertions(+), 25 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 4a8f7048785..6330cf1ec50 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -265,7 +265,7 @@
         "description": "panfrost: Port v5 blend shader issue to blitter",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 1,
+        "resolution": 0,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/panfrost/ci/deqp-panfrost-t860-fails.txt b/src/gallium/drivers/panfrost/ci/deqp-panfrost-t860-fails.txt
index 73b25f1ef85..20ff4c22a83 100644
--- a/src/gallium/drivers/panfrost/ci/deqp-panfrost-t860-fails.txt
+++ b/src/gallium/drivers/panfrost/ci/deqp-panfrost-t860-fails.txt
@@ -12,6 +12,14 @@ dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_x,Fa
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_y,Fail
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_x,Fail
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_y,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common.common_blend_func_buffer_blend_func,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common.common_blend_func_buffer_separate_blend_func,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common.common_separate_blend_func_buffer_blend_func,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common.common_separate_blend_func_buffer_separate_blend_func,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.overwrite_indexed.common_blend_func_buffer_blend_func,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.overwrite_indexed.common_blend_func_buffer_separate_blend_func,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.overwrite_indexed.common_separate_blend_func_buffer_blend_func,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.overwrite_indexed.common_separate_blend_func_buffer_separate_blend_func,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.0,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.1,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.10,Fail
@@ -28,6 +36,7 @@ dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffe
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.3,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.4,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.5,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.6,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.7,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.8,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.9,Fail
@@ -40,6 +49,8 @@ dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.16,
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.17,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.18,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.2,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.3,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.8,Fail
 dEQP-GLES31.functional.separate_shader.random.23,Fail
 dEQP-GLES31.functional.separate_shader.random.35,Fail
 dEQP-GLES31.functional.separate_shader.random.68,Fail
@@ -53,6 +64,12 @@ dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec2_lowp_comp
 dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.uvec3_lowp_compute,Fail
 dEQP-GLES31.functional.shaders.builtin_functions.integer.imulextended.ivec3_highp_fragment,Fail
 dEQP-GLES31.functional.shaders.builtin_functions.integer.umulextended.uvec3_highp_fragment,Fail
+dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_expression_vertex,Fail
+dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_literal_vertex,Fail
+dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_expression_fragment,Fail
+dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_expression_vertex,Fail
+dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_literal_fragment,Fail
+dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.const_literal_vertex,Fail
 dEQP-GLES31.functional.synchronization.in_invocation.image_alias_overwrite,Crash
 dEQP-GLES31.functional.synchronization.in_invocation.image_atomic_alias_overwrite,Crash
 dEQP-GLES31.functional.synchronization.in_invocation.image_atomic_alias_write,Crash
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 587f994b3a7..4d3a442eac9 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -498,6 +498,19 @@ pan_merge_empty_fs(struct mali_renderer_state_packed *rsd, bool is_bifrost)
         pan_merge((*rsd), empty_rsd, RENDERER_STATE);
 }
 
+/* Get the last blend shader, for an erratum workaround */
+
+static mali_ptr
+panfrost_last_nonnull(mali_ptr *ptrs, unsigned count)
+{
+        for (signed i = ((signed) count - 1); i >= 0; --i) {
+                if (ptrs[i])
+                        return ptrs[i];
+        }
+
+        return 0;
+}
+
 static void
 panfrost_prepare_fs_state(struct panfrost_context *ctx,
                           mali_ptr *blend_shaders,
diff --git a/src/panfrost/lib/pan_blitter.c b/src/panfrost/lib/pan_blitter.c
index e305f028b9d..23de9d67135 100644
--- a/src/panfrost/lib/pan_blitter.c
+++ b/src/panfrost/lib/pan_blitter.c
@@ -113,25 +113,23 @@ struct pan_blit_rsd_data {
 static void
 pan_blitter_prepare_midgard_rsd(const struct panfrost_device *dev,
                                 const struct pan_image_view **rts,
-                                mali_ptr *blend_shaders, unsigned rt_count,
-                                bool zs, struct MALI_RENDERER_STATE *rsd)
+                                mali_ptr *blend_shaders, bool zs,
+                                struct MALI_RENDERER_STATE *rsd)
 {
-        mali_ptr blend_shader = blend_shaders ?
-                panfrost_last_nonnull(blend_shaders, rt_count) : 0;
+        mali_ptr blend_shader = blend_shaders ? blend_shaders[0] : 0;
 
         rsd->properties.midgard.work_register_count = 4;
         rsd->properties.midgard.force_early_z = !zs;
         rsd->stencil_mask_misc.alpha_test_compare_function = MALI_FUNC_ALWAYS;
-
-        /* Set even on v5 for erratum workaround */
-        rsd->sfbd_blend_shader = blend_shader;
-
-        if (!(dev->quirks & MIDGARD_SFBD))
+        if (!(dev->quirks & MIDGARD_SFBD)) {
+                rsd->sfbd_blend_shader = blend_shader;
                 return;
+        }
 
         rsd->stencil_mask_misc.sfbd_write_enable = true;
         rsd->stencil_mask_misc.sfbd_dither_disable = true;
         rsd->multisample_misc.sfbd_blend_shader = !!blend_shader;
+        rsd->sfbd_blend_shader = blend_shader;
         if (rsd->multisample_misc.sfbd_blend_shader)
                 return;
 
@@ -336,8 +334,8 @@ pan_blitter_emit_rsd(const struct panfrost_device *dev,
                         pan_blitter_prepare_bifrost_rsd(dev, zs, ms, &cfg);
                 } else {
                         pan_blitter_prepare_midgard_rsd(dev, rts,
-                                                        blend_shaders,
-                                                        rt_count, zs, &cfg);
+                                                        blend_shaders, zs,
+                                                        &cfg);
                 }
         }
 
diff --git a/src/panfrost/lib/pan_util.h b/src/panfrost/lib/pan_util.h
index 03d4bbeaaf4..7caa0e4cfde 100644
--- a/src/panfrost/lib/pan_util.h
+++ b/src/panfrost/lib/pan_util.h
@@ -63,17 +63,4 @@ void
 pan_pack_color(uint32_t *packed, const union pipe_color_union *color,
                enum pipe_format format, bool dithered);
 
-/* Get the last blend shader, for an erratum workaround on v5 */
-
-static inline uint64_t
-panfrost_last_nonnull(uint64_t *ptrs, unsigned count)
-{
-        for (signed i = ((signed) count - 1); i >= 0; --i) {
-                if (ptrs[i])
-                        return ptrs[i];
-        }
-
-        return 0;
-}
-
 #endif /* PAN_UTIL_H */



More information about the mesa-commit mailing list