diff options
author | Tomeu Vizoso <[email protected]> | 2019-07-12 12:38:50 +0200 |
---|---|---|
committer | Tomeu Vizoso <[email protected]> | 2019-11-06 16:17:13 +0100 |
commit | 23fe7cd2d6a5bc162c044805223e22b117854e24 (patch) | |
tree | 3a4e7349be692a6ee491645cf948ea4de852429f /src/gallium/drivers/panfrost | |
parent | bc80900b6c8970a62e2161bee0ec3053852b1636 (diff) |
panfrost: Add checksum fields to SFBD descriptor
During tests on T720, these fields were discovered.
Signed-off-by: Tomeu Vizoso <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_sfbd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_sfbd.c b/src/gallium/drivers/panfrost/pan_sfbd.c index b5e18f07045..882c9990a30 100644 --- a/src/gallium/drivers/panfrost/pan_sfbd.c +++ b/src/gallium/drivers/panfrost/pan_sfbd.c @@ -147,5 +147,17 @@ panfrost_sfbd_fragment(struct panfrost_batch *batch, bool has_draws) if (batch->requirements & PAN_REQ_MSAA) fb.format |= MALI_FRAMEBUFFER_MSAA_A | MALI_FRAMEBUFFER_MSAA_B; + struct pipe_surface *surf = batch->key.cbufs[0]; + struct panfrost_resource *rsrc = pan_resource(surf->texture); + struct panfrost_bo *bo = rsrc->bo; + + if (rsrc->checksummed) { + unsigned level = surf->u.tex.level; + struct panfrost_slice *slice = &rsrc->slices[level]; + + fb.checksum_stride = slice->checksum_stride; + fb.checksum = bo->gpu + slice->checksum_offset; + } + return panfrost_upload_transient(batch, &fb, sizeof(fb)) | MALI_SFBD; } |