summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/panfrost/pan_resource.c25
-rw-r--r--src/gallium/drivers/panfrost/pan_resource.h19
2 files changed, 2 insertions, 42 deletions
diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index 483450af9f8..5c90a5e9b4c 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -235,29 +235,6 @@ panfrost_create_scanout_res(struct pipe_screen *screen,
return res;
}
-/* Computes sizes for checksumming, which is 8 bytes per 16x16 tile */
-
-#define CHECKSUM_TILE_WIDTH 16
-#define CHECKSUM_TILE_HEIGHT 16
-#define CHECKSUM_BYTES_PER_TILE 8
-
-static unsigned
-panfrost_compute_checksum_sizes(
- struct panfrost_slice *slice,
- unsigned width,
- unsigned height)
-{
- unsigned aligned_width = ALIGN_POT(width, CHECKSUM_TILE_WIDTH);
- unsigned aligned_height = ALIGN_POT(height, CHECKSUM_TILE_HEIGHT);
-
- unsigned tile_count_x = aligned_width / CHECKSUM_TILE_WIDTH;
- unsigned tile_count_y = aligned_height / CHECKSUM_TILE_HEIGHT;
-
- slice->checksum_stride = tile_count_x * CHECKSUM_BYTES_PER_TILE;
-
- return slice->checksum_stride * tile_count_y;
-}
-
/* Setup the mip tree given a particular layout, possibly with checksumming */
static void
@@ -349,7 +326,7 @@ panfrost_setup_slices(struct panfrost_resource *pres, size_t *bo_size)
if (pres->checksummed) {
slice->checksum_offset = offset;
- unsigned size = panfrost_compute_checksum_sizes(
+ unsigned size = panfrost_compute_checksum_size(
slice, width, height);
offset += size;
diff --git a/src/gallium/drivers/panfrost/pan_resource.h b/src/gallium/drivers/panfrost/pan_resource.h
index f3ba339add7..2af06208f2c 100644
--- a/src/gallium/drivers/panfrost/pan_resource.h
+++ b/src/gallium/drivers/panfrost/pan_resource.h
@@ -29,27 +29,10 @@
#include <panfrost-job.h>
#include "pan_screen.h"
#include "pan_allocate.h"
+#include "pan_texture.h"
#include "drm-uapi/drm.h"
#include "util/u_range.h"
-struct panfrost_slice {
- unsigned offset;
- unsigned stride;
- unsigned size0;
-
- /* If there is a header preceding each slice, how big is
- * that header? Used for AFBC */
- unsigned header_size;
-
- /* If checksumming is enabled following the slice, what
- * is its offset/stride? */
- unsigned checksum_offset;
- unsigned checksum_stride;
-
- /* Has anything been written to this slice? */
- bool initialized;
-};
-
struct panfrost_resource {
struct pipe_resource base;
struct {