Mesa (master): panfrost: Always use SOFTWARE for pure formats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 13 14:04:07 UTC 2020


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Fri Jul 10 12:12:36 2020 -0400

panfrost: Always use SOFTWARE for pure formats

Otherwise we end up implicitly converting ints to floating point.
Likewise for floats which again have strange interactions.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5755>

---

 src/panfrost/util/pan_lower_framebuffer.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/panfrost/util/pan_lower_framebuffer.c b/src/panfrost/util/pan_lower_framebuffer.c
index a8bc759225e..3295d5697e0 100644
--- a/src/panfrost/util/pan_lower_framebuffer.c
+++ b/src/panfrost/util/pan_lower_framebuffer.c
@@ -89,6 +89,15 @@ pan_unpacked_type_for_format(const struct util_format_description *desc)
 enum pan_format_class
 pan_format_class_load(const struct util_format_description *desc, unsigned quirks)
 {
+        /* Pure integers can be loaded via EXT_framebuffer_fetch and should be
+         * handled as a raw load with a size conversion (it's cheap). Likewise,
+         * since float framebuffers are internally implemented as raw (i.e.
+         * integer) framebuffers with blend shaders to go back and forth, they
+         * should be s/w as well */
+
+        if (util_format_is_pure_integer(desc->format) || util_format_is_float(desc->format))
+                return PAN_FORMAT_SOFTWARE;
+
         /* Check if we can do anything better than software architecturally */
         if (quirks & MIDGARD_NO_TYPED_BLEND_LOADS) {
                 return (quirks & NO_BLEND_PACKS)



More information about the mesa-commit mailing list