anv: Use different BOs for different scratch sizes and stages

This solves a race condition where we can end up having different stages
stomp on each other because they're all trying to scratch in the same BO
but they have different views of its layout.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
Jason Ekstrand
2016-06-16 15:26:54 -07:00
parent 45c0f60999
commit c2f2c8e407
7 changed files with 32 additions and 55 deletions

View File

@@ -878,7 +878,7 @@ VkResult anv_CreateDevice(
anv_bo_init_new(&device->workaround_bo, device, 1024);
anv_block_pool_init(&device->scratch_block_pool, device, 0x10000);
anv_scratch_pool_init(device, &device->scratch_pool);
anv_queue_init(device, &device->queue);
@@ -947,7 +947,7 @@ void anv_DestroyDevice(
anv_block_pool_finish(&device->instruction_block_pool);
anv_state_pool_finish(&device->surface_state_pool);
anv_block_pool_finish(&device->surface_state_block_pool);
anv_block_pool_finish(&device->scratch_block_pool);
anv_scratch_pool_finish(device, &device->scratch_pool);
close(device->fd);