mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
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>
This commit is contained in:
parent
44155fa661
commit
870283bcc4
1 changed files with 3 additions and 7 deletions
|
|
@ -118,12 +118,11 @@ panfrost_astc_stretch(unsigned dim)
|
||||||
|
|
||||||
static unsigned
|
static unsigned
|
||||||
panfrost_compression_tag(
|
panfrost_compression_tag(
|
||||||
const struct util_format_description *desc,
|
const struct util_format_description *desc, uint64_t modifier)
|
||||||
enum mali_format format, uint64_t modifier)
|
|
||||||
{
|
{
|
||||||
if (drm_is_afbc(modifier))
|
if (drm_is_afbc(modifier))
|
||||||
return (modifier & AFBC_FORMAT_MOD_YTR) ? 1 : 0;
|
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) |
|
return (panfrost_astc_stretch(desc->block.height) << 3) |
|
||||||
panfrost_astc_stretch(desc->block.width);
|
panfrost_astc_stretch(desc->block.width);
|
||||||
else
|
else
|
||||||
|
|
@ -256,7 +255,6 @@ static void
|
||||||
panfrost_emit_texture_payload(
|
panfrost_emit_texture_payload(
|
||||||
mali_ptr *payload,
|
mali_ptr *payload,
|
||||||
const struct util_format_description *desc,
|
const struct util_format_description *desc,
|
||||||
enum mali_format mali_format,
|
|
||||||
enum mali_texture_dimension dim,
|
enum mali_texture_dimension dim,
|
||||||
uint64_t modifier,
|
uint64_t modifier,
|
||||||
unsigned width, unsigned height,
|
unsigned width, unsigned height,
|
||||||
|
|
@ -268,7 +266,7 @@ panfrost_emit_texture_payload(
|
||||||
mali_ptr base,
|
mali_ptr base,
|
||||||
struct panfrost_slice *slices)
|
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,
|
/* Inject the addresses in, interleaving array indices, mip levels,
|
||||||
* cube faces, and strides in that order */
|
* cube faces, and strides in that order */
|
||||||
|
|
@ -372,7 +370,6 @@ panfrost_new_texture(
|
||||||
panfrost_emit_texture_payload(
|
panfrost_emit_texture_payload(
|
||||||
(mali_ptr *) (out + MALI_MIDGARD_TEXTURE_LENGTH),
|
(mali_ptr *) (out + MALI_MIDGARD_TEXTURE_LENGTH),
|
||||||
desc,
|
desc,
|
||||||
mali_format,
|
|
||||||
dim,
|
dim,
|
||||||
modifier,
|
modifier,
|
||||||
width, height,
|
width, height,
|
||||||
|
|
@ -412,7 +409,6 @@ panfrost_new_texture_bifrost(
|
||||||
panfrost_emit_texture_payload(
|
panfrost_emit_texture_payload(
|
||||||
payload->cpu,
|
payload->cpu,
|
||||||
desc,
|
desc,
|
||||||
mali_format,
|
|
||||||
dim,
|
dim,
|
||||||
modifier,
|
modifier,
|
||||||
width, height,
|
width, height,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue