diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-06-17 15:53:09 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-18 09:59:28 -0700 |
commit | d50795109b306fadf6befe0cb25be84a0abacb12 (patch) | |
tree | 9ed4316a7a409354c248972206384da4338e9498 /src/gallium/drivers/panfrost/pan_mfbd.c | |
parent | 83c02a5ea99cd1c9b196cb79f00e6dda5ffe738c (diff) |
panfrost: Decode rendering block type
A mode for rendering tiled/uncompressed was noticed, so we reshuffle the
MFBD render target definitions to explicitly include block type.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_mfbd.c')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_mfbd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c index 17f59e0aab2..d2cccbe1a66 100644 --- a/src/gallium/drivers/panfrost/pan_mfbd.c +++ b/src/gallium/drivers/panfrost/pan_mfbd.c @@ -42,7 +42,8 @@ panfrost_mfbd_format(struct pipe_surface *surf) .unk1 = 0x4000000, .unk2 = 0x1, .nr_channels = MALI_POSITIVE(desc->nr_channels), - .flags = 0x444, + .unk3 = 0x4, + .flags = 0x8, .swizzle = panfrost_translate_swizzle_4(desc->swizzle), .unk4 = 0x8 }; @@ -52,7 +53,7 @@ panfrost_mfbd_format(struct pipe_surface *surf) if (surf->texture->format == PIPE_FORMAT_B5G6R5_UNORM) { fmt.unk1 = 0x14000000; fmt.nr_channels = MALI_POSITIVE(2); - fmt.flags |= 0x1; + fmt.unk3 |= 0x1; } return fmt; @@ -100,6 +101,7 @@ panfrost_mfbd_set_cbuf( /* Now, we set the layout specific pieces */ if (rsrc->bo->layout == PAN_LINEAR) { + rt->format.block = MALI_MFBD_BLOCK_LINEAR; rt->framebuffer = rsrc->bo->gpu + offset; rt->framebuffer_stride = stride / 16; } else if (rsrc->bo->layout == PAN_AFBC) { @@ -108,7 +110,7 @@ panfrost_mfbd_set_cbuf( rt->afbc.stride = 0; rt->afbc.unk = 0x30009; - rt->format.flags |= MALI_MFBD_FORMAT_AFBC; + rt->format.block = MALI_MFBD_BLOCK_AFBC; mali_ptr afbc_main = rsrc->bo->afbc_slab.gpu + rsrc->bo->afbc_metadata_size; rt->framebuffer = afbc_main; |