diff --git a/src/panfrost/util/pan_lower_framebuffer.c b/src/panfrost/util/pan_lower_framebuffer.c index 33c1d5af75d..6ceb2e47a8a 100644 --- a/src/panfrost/util/pan_lower_framebuffer.c +++ b/src/panfrost/util/pan_lower_framebuffer.c @@ -113,3 +113,15 @@ pan_format_class_load(const struct util_format_description *desc, unsigned quirk /* Otherwise, we can do native */ return PAN_FORMAT_NATIVE; } + +enum pan_format_class +pan_format_class_store(const struct util_format_description *desc, unsigned quirks) +{ + /* Check if we can do anything better than software architecturally */ + if (quirks & MIDGARD_NO_TYPED_BLEND_STORES) { + return (quirks & NO_BLEND_PACKS) + ? PAN_FORMAT_SOFTWARE : PAN_FORMAT_PACK; + } + + return PAN_FORMAT_NATIVE; +} diff --git a/src/panfrost/util/pan_lower_framebuffer.h b/src/panfrost/util/pan_lower_framebuffer.h index 7bca12f561a..3804ff4beb9 100644 --- a/src/panfrost/util/pan_lower_framebuffer.h +++ b/src/panfrost/util/pan_lower_framebuffer.h @@ -41,5 +41,6 @@ enum pan_format_class { nir_alu_type 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); +enum pan_format_class pan_format_class_store(const struct util_format_description *desc, unsigned quirks); #endif