summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2020-02-18 12:17:59 -0500
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2020-02-21 07:27:01 -0500
commit58f14018b4f0e47d72f718f322f8aa0a5b8d0f0a (patch)
tree73e4bdc479dcfc718c84c9a3acac5491fab2f7a4
parent5ddf7ad9d2098d21e1346b8ceb2756901ae1b0c1 (diff)
downloadmesa-58f14018b4f0e47d72f718f322f8aa0a5b8d0f0a.tar.gz
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 <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3858>
-rw-r--r--src/gallium/drivers/panfrost/meson.build1
-rw-r--r--src/gallium/drivers/panfrost/pan_resource.h8
-rw-r--r--src/panfrost/encoder/meson.build1
-rw-r--r--src/panfrost/encoder/pan_afbc.c (renamed from src/gallium/drivers/panfrost/pan_afbc.c)3
-rw-r--r--src/panfrost/encoder/pan_texture.h9
5 files changed, 11 insertions, 11 deletions
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
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 <alyssa.rosenzweig@collabora.com>
*/
-#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 <stdbool.h>
+#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