From d94584c5a6647b15872244cbd1babb3077318c21 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 10 Jul 2020 12:12:36 -0400 Subject: [PATCH] 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 Part-of: --- 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) -- 2.30.2