From 58f14018b4f0e47d72f718f322f8aa0a5b8d0f0a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 18 Feb 2020 12:17:59 -0500 Subject: [PATCH] panfrost: Move pan_afbc.c to root Now that PIPE formats are shared across Mesa, this well-documented piece of code is a good fit for root panfrost, let's move it and get a little closer to taming the mess of resources. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/meson.build | 1 - src/gallium/drivers/panfrost/pan_resource.h | 8 -------- src/panfrost/encoder/meson.build | 1 + .../drivers/panfrost => panfrost/encoder}/pan_afbc.c | 3 +-- src/panfrost/encoder/pan_texture.h | 9 +++++++++ 5 files changed, 11 insertions(+), 11 deletions(-) rename src/{gallium/drivers/panfrost => panfrost/encoder}/pan_afbc.c (98%) diff --git a/src/gallium/drivers/panfrost/meson.build b/src/gallium/drivers/panfrost/meson.build index 87eb74b5305..7b01ee47635 100644 --- a/src/gallium/drivers/panfrost/meson.build +++ b/src/gallium/drivers/panfrost/meson.build @@ -30,7 +30,6 @@ files_panfrost = files( 'nir/nir_lower_framebuffer.c', 'pan_context.c', - 'pan_afbc.c', 'pan_bo.c', 'pan_blit.c', 'pan_job.c', diff --git a/src/gallium/drivers/panfrost/pan_resource.h b/src/gallium/drivers/panfrost/pan_resource.h index 2af06208f2c..7173526023f 100644 --- a/src/gallium/drivers/panfrost/pan_resource.h +++ b/src/gallium/drivers/panfrost/pan_resource.h @@ -95,14 +95,6 @@ panfrost_resource_hint_layout( enum mali_texture_layout layout, signed weight); -/* AFBC */ - -bool -panfrost_format_supports_afbc(enum pipe_format format); - -unsigned -panfrost_afbc_header_size(unsigned width, unsigned height); - /* Blitting */ void diff --git a/src/panfrost/encoder/meson.build b/src/panfrost/encoder/meson.build index d1335ab8f02..650289586fa 100644 --- a/src/panfrost/encoder/meson.build +++ b/src/panfrost/encoder/meson.build @@ -22,6 +22,7 @@ libpanfrost_encoder_files = files( 'pan_encoder.h', + 'pan_afbc.c', 'pan_attributes.c', 'pan_invocation.c', 'pan_sampler.c', diff --git a/src/gallium/drivers/panfrost/pan_afbc.c b/src/panfrost/encoder/pan_afbc.c similarity index 98% rename from src/gallium/drivers/panfrost/pan_afbc.c rename to src/panfrost/encoder/pan_afbc.c index 9de10e4ac48..f29020e15b8 100644 --- a/src/gallium/drivers/panfrost/pan_afbc.c +++ b/src/panfrost/encoder/pan_afbc.c @@ -24,8 +24,7 @@ * Alyssa Rosenzweig */ -#include "pan_resource.h" -#include "util/format/u_format.h" +#include "pan_texture.h" /* Arm FrameBuffer Compression (AFBC) is a lossless compression scheme natively * implemented in Mali GPUs (as well as many display controllers paired with diff --git a/src/panfrost/encoder/pan_texture.h b/src/panfrost/encoder/pan_texture.h index 54b2e39122e..043fcc3af10 100644 --- a/src/panfrost/encoder/pan_texture.h +++ b/src/panfrost/encoder/pan_texture.h @@ -29,6 +29,7 @@ #define __PAN_TEXTURE_H #include +#include "util/format/u_format.h" struct panfrost_slice { unsigned offset; @@ -54,4 +55,12 @@ panfrost_compute_checksum_size( unsigned width, unsigned height); +/* AFBC */ + +bool +panfrost_format_supports_afbc(enum pipe_format format); + +unsigned +panfrost_afbc_header_size(unsigned width, unsigned height); + #endif -- 2.30.2