(usage & PIPE_TRANSFER_MAP_DIRECTLY))
return NULL;
+ if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
+ iris_batch_references(&ice->render_batch, res->bo)) {
+ iris_batch_flush(&ice->render_batch);
+ }
+
+ if ((usage & PIPE_TRANSFER_DONTBLOCK) && iris_bo_busy(res->bo))
+ return NULL;
+
struct iris_transfer *map = calloc(1, sizeof(struct iris_transfer));
struct pipe_transfer *xfer = &map->base;
xfer->layer_stride = isl_surf_get_array_pitch(surf);
*ptransfer = xfer;
- if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
- iris_batch_references(&ice->render_batch, res->bo)) {
- iris_batch_flush(&ice->render_batch);
- }
-
- if ((usage & PIPE_TRANSFER_DONTBLOCK) && iris_bo_busy(res->bo))
- return NULL;
-
xfer->usage &= (PIPE_TRANSFER_READ |
PIPE_TRANSFER_WRITE |
PIPE_TRANSFER_UNSYNCHRONIZED |