panfrost: Remove duplicated format arg for ASTC
We don't want to hang onto the raw mali_format, but we already have the
pipe format right here, so just use that instead, avoiding a (false)
dependency.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7352>
diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c
index 011ca39..ff5aee3 100644
--- a/src/panfrost/lib/pan_texture.c
+++ b/src/panfrost/lib/pan_texture.c
@@ -118,12 +118,11 @@
static unsigned
panfrost_compression_tag(
- const struct util_format_description *desc,
- enum mali_format format, uint64_t modifier)
+ const struct util_format_description *desc, uint64_t modifier)
{
if (drm_is_afbc(modifier))
return (modifier & AFBC_FORMAT_MOD_YTR) ? 1 : 0;
- else if (format == MALI_ASTC_2D_LDR || format == MALI_ASTC_2D_HDR)
+ else if (desc->layout == UTIL_FORMAT_LAYOUT_ASTC)
return (panfrost_astc_stretch(desc->block.height) << 3) |
panfrost_astc_stretch(desc->block.width);
else
@@ -256,7 +255,6 @@
panfrost_emit_texture_payload(
mali_ptr *payload,
const struct util_format_description *desc,
- enum mali_format mali_format,
enum mali_texture_dimension dim,
uint64_t modifier,
unsigned width, unsigned height,
@@ -268,7 +266,7 @@
mali_ptr base,
struct panfrost_slice *slices)
{
- base |= panfrost_compression_tag(desc, mali_format, modifier);
+ base |= panfrost_compression_tag(desc, modifier);
/* Inject the addresses in, interleaving array indices, mip levels,
* cube faces, and strides in that order */
@@ -372,7 +370,6 @@
panfrost_emit_texture_payload(
(mali_ptr *) (out + MALI_MIDGARD_TEXTURE_LENGTH),
desc,
- mali_format,
dim,
modifier,
width, height,
@@ -412,7 +409,6 @@
panfrost_emit_texture_payload(
payload->cpu,
desc,
- mali_format,
dim,
modifier,
width, height,