iris: Use copy_region and staging resources to avoid transfer stalls

This is similar to intel_miptree_map_blit and intel_buffer_object.c's
temporary blits in i965.

Improves performance of DiRT Rally by 20-25% by eliminating stalls.

Breaks piglit's spec/arb_shader_image_load_store/host-mem-barrier,
by using the GPU to do uploads, exposing a st/mesa issue where it
doesn't give us memory_barrier() calls.  This is a pre-existing issue
and will be fixed by a later patch (currently out for review).
This commit is contained in:
Kenneth Graunke
2018-12-21 03:04:18 -08:00
parent f67c870179
commit 9d1334d2a0
4 changed files with 161 additions and 14 deletions

View File

@@ -180,6 +180,11 @@ struct iris_transfer {
void *buffer;
void *ptr;
/** A linear staging resource for GPU-based copy_region transfers. */
struct pipe_resource *staging;
struct blorp_context *blorp;
struct iris_batch *batch;
void (*unmap)(struct iris_transfer *);
};