From: Alyssa Rosenzweig Date: Fri, 10 Jul 2020 16:12:36 +0000 (-0400) Subject: panfrost: Always use SOFTWARE for pure formats X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d94584c5a6647b15872244cbd1babb3077318c21;p=mesa.git 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: --- 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)