summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_resource.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-07-19 16:11:27 -0700
committerAlyssa Rosenzweig <[email protected]>2019-07-22 08:20:34 -0700
commitf1dcaa0df67aa92ff236418e125adf3299bbf0fd (patch)
tree731a75d470b11318cec1a7056fc19a662f34cb6c /src/gallium/drivers/panfrost/pan_resource.c
parent9e3dc703ffd1fe78b3d99a0e2b3093415fbae610 (diff)
panfrost: Set `initialized` in more cases
Indirect linear writes were not being marked as initialized, causing the back blit to be dropped, breaking the listed tests. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_resource.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_resource.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index 3f8d50cad73..e7bd4442f94 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -592,23 +592,24 @@ panfrost_transfer_unmap(struct pipe_context *pctx,
struct panfrost_gtransfer *trans = pan_transfer(transfer);
struct panfrost_resource *prsrc = (struct panfrost_resource *) transfer->resource;
+ /* Mark whatever we wrote as written */
+ if (transfer->usage & PIPE_TRANSFER_WRITE)
+ prsrc->slices[transfer->level].initialized = true;
+
if (trans->map) {
struct panfrost_bo *bo = prsrc->bo;
if (transfer->usage & PIPE_TRANSFER_WRITE) {
- unsigned level = transfer->level;
- prsrc->slices[level].initialized = true;
-
if (prsrc->layout == PAN_AFBC) {
DBG("Unimplemented: writes to AFBC\n");
} else if (prsrc->layout == PAN_TILED) {
assert(transfer->box.depth == 1);
panfrost_store_tiled_image(
- bo->cpu + prsrc->slices[level].offset,
+ bo->cpu + prsrc->slices[transfer->level].offset,
trans->map,
&transfer->box,
- prsrc->slices[level].stride,
+ prsrc->slices[transfer->level].stride,
transfer->stride,
util_format_get_blocksize(prsrc->base.format));
}
@@ -638,6 +639,9 @@ panfrost_transfer_flush_region(struct pipe_context *pctx,
util_range_add(&rsc->valid_buffer_range,
transfer->box.x + box->x,
transfer->box.x + box->x + box->width);
+ } else {
+ unsigned level = transfer->level;
+ rsc->slices[level].initialized = true;
}
}