panfrost_batch_add_bo(batch, rsrc->bo, flags);
for (unsigned i = 0; i < MAX_MIP_LEVELS; i++)
- if (rsrc->slices[i].checksum_bo)
- panfrost_batch_add_bo(batch, rsrc->slices[i].checksum_bo, flags);
+ if (rsrc->checksum_bo)
+ panfrost_batch_add_bo(batch, rsrc->checksum_bo, flags);
if (rsrc->separate_stencil)
panfrost_batch_add_bo(batch, rsrc->separate_stencil->bo, flags);
struct panfrost_slice *slice = &rsrc->slices[level];
ext->crc_row_stride = slice->checksum_stride;
- if (slice->checksum_bo)
- ext->crc_base = slice->checksum_bo->ptr.gpu;
+ if (rsrc->checksum_bo)
+ ext->crc_base = rsrc->checksum_bo->ptr.gpu;
else
ext->crc_base = rsrc->bo->ptr.gpu + slice->checksum_offset;
templat->bind & PIPE_BIND_RENDER_TARGET) {
unsigned size = panfrost_compute_checksum_size(
&rsc->slices[0], templat->width0, templat->height0);
- rsc->slices[0].checksum_bo = panfrost_bo_create(dev, size, 0);
+ rsc->checksum_bo = panfrost_bo_create(dev, size, 0);
rsc->checksummed = true;
}
if (rsrc->bo)
panfrost_bo_unreference(rsrc->bo);
- if (rsrc->slices[0].checksum_bo)
- panfrost_bo_unreference(rsrc->slices[0].checksum_bo);
+ if (rsrc->checksum_bo)
+ panfrost_bo_unreference(rsrc->checksum_bo);
util_range_destroy(&rsrc->valid_buffer_range);
ralloc_free(rsrc);
if (panfrost_should_linear_convert(prsrc, transfer)) {
panfrost_bo_unreference(prsrc->bo);
- if (prsrc->slices[0].checksum_bo)
- panfrost_bo_unreference(prsrc->slices[0].checksum_bo);
+ if (prsrc->checksum_bo)
+ panfrost_bo_unreference(prsrc->checksum_bo);
panfrost_resource_setup(dev, prsrc, NULL, DRM_FORMAT_MOD_LINEAR);
/* Is transaciton elimination enabled? */
bool checksummed;
+ /* The CRC BO can be allocated separately */
+ struct panfrost_bo *checksum_bo;
+
/* Used to decide when to convert to another modifier */
uint16_t modifier_updates;
* is its offset/stride? */
unsigned checksum_offset;
unsigned checksum_stride;
- struct panfrost_bo *checksum_bo;
/* Has anything been written to this slice? */
bool initialized;