summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-06-16 15:26:54 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-06-22 12:39:45 -0700
commitc2f2c8e407207c31c29aab5570d23cd6e98d287a (patch)
treead4cecf8a32a0293e0c63d1a5f91353f860d083f /src/intel/vulkan/anv_device.c
parent45c0f60999587ed29a7a9b81f09950dd8f58fb49 (diff)
downloadexternal_mesa3d-c2f2c8e407207c31c29aab5570d23cd6e98d287a.zip
external_mesa3d-c2f2c8e407207c31c29aab5570d23cd6e98d287a.tar.gz
external_mesa3d-c2f2c8e407207c31c29aab5570d23cd6e98d287a.tar.bz2
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>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 97300c3..ea8e875 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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);