aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_mfbd.c
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-10-30 12:05:30 +0100
committerTomeu Vizoso <[email protected]>2019-11-06 16:18:46 +0100
commit9447a84f69c639cdd84fccec7e9447b88be35e30 (patch)
tree52f33bf0c1b59b0b3ae30bed8a7bee1e61325b3c /src/gallium/drivers/panfrost/pan_mfbd.c
parente40d11ccb27f4ebfc2d7874443fe44969a3f28df (diff)
panfrost: Rework format encoding on SFBD
Signed-off-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_mfbd.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_mfbd.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c
index b01f8289bf9..75f8887ec6d 100644
--- a/src/gallium/drivers/panfrost/pan_mfbd.c
+++ b/src/gallium/drivers/panfrost/pan_mfbd.c
@@ -29,30 +29,6 @@
#include "util/u_format.h"
-static void
-panfrost_invert_swizzle(const unsigned char *in, unsigned char *out)
-{
- /* First, default to all zeroes to prevent uninitialized junk */
-
- for (unsigned c = 0; c < 4; ++c)
- out[c] = PIPE_SWIZZLE_0;
-
- /* Now "do" what the swizzle says */
-
- for (unsigned c = 0; c < 4; ++c) {
- unsigned char i = in[c];
-
- /* Who cares? */
- assert(PIPE_SWIZZLE_X == 0);
- if (i > PIPE_SWIZZLE_W)
- continue;
-
- /* Invert */
- unsigned idx = i - PIPE_SWIZZLE_X;
- out[idx] = PIPE_SWIZZLE_X + c;
- }
-}
-
static struct mali_rt_format
panfrost_mfbd_format(struct pipe_surface *surf)
{
@@ -224,15 +200,15 @@ panfrost_mfbd_set_cbuf(
/* Now, we set the layout specific pieces */
if (rsrc->layout == PAN_LINEAR) {
- rt->format.block = MALI_MFBD_BLOCK_LINEAR;
+ rt->format.block = MALI_BLOCK_LINEAR;
rt->framebuffer = base;
rt->framebuffer_stride = stride / 16;
} else if (rsrc->layout == PAN_TILED) {
- rt->format.block = MALI_MFBD_BLOCK_TILED;
+ rt->format.block = MALI_BLOCK_TILED;
rt->framebuffer = base;
rt->framebuffer_stride = stride;
} else if (rsrc->layout == PAN_AFBC) {
- rt->format.block = MALI_MFBD_BLOCK_AFBC;
+ rt->format.block = MALI_BLOCK_AFBC;
unsigned header_size = rsrc->slices[level].header_size;