tex_cache_flush_hack(batch, ISL_FORMAT_UNSUPPORTED, src_res->surf.format);
}
-static struct crocus_batch *
-get_preferred_batch(struct crocus_context *ice, struct crocus_bo *bo)
-{
- /* If the compute batch is already using this buffer, we'd prefer to
- * continue queueing in the compute batch.
- */
- if (crocus_batch_references(&ice->batches[CROCUS_BATCH_COMPUTE], bo))
- return &ice->batches[CROCUS_BATCH_COMPUTE];
-
- /* Otherwise default to the render batch. */
- return &ice->batches[CROCUS_BATCH_RENDER];
-}
-
-
/**
* The pipe->resource_copy_region() driver hook.
*
if (crocus_resource_unfinished_aux_import(dst))
crocus_resource_finish_aux_import(ctx->screen, dst);
- /* Use MI_COPY_MEM_MEM for tiny (<= 16 byte, % 4) buffer copies. */
- if (p_src->target == PIPE_BUFFER && p_dst->target == PIPE_BUFFER &&
- (src_box->width % 4 == 0) && src_box->width <= 16 &&
- screen->vtbl.copy_mem_mem) {
- struct crocus_bo *dst_bo = crocus_resource_bo(p_dst);
- batch = get_preferred_batch(ice, dst_bo);
- crocus_batch_maybe_flush(batch, 24 + 5 * (src_box->width / 4));
- crocus_emit_pipe_control_flush(batch,
- "stall for MI_COPY_MEM_MEM copy_region",
- PIPE_CONTROL_CS_STALL);
- screen->vtbl.copy_mem_mem(batch, dst_bo, dstx, crocus_resource_bo(p_src),
- src_box->x, src_box->width);
- return;
- }
-
if (devinfo->ver < 6 && util_format_is_depth_or_stencil(p_dst->format)) {
util_resource_copy_region(ctx, p_dst, dst_level, dstx, dsty, dstz,
p_src, src_level, src_box);