summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2018-05-01 16:14:06 -0700
committerJordan Justen <[email protected]>2018-09-26 10:21:23 -0700
commitca1d3fc538d0b232809125861284165612448767 (patch)
tree1d62f98e1cf42378146e0b7c6aed612fb8d73cc7 /src
parent2a97390552da7bcd5173f73cdfb6476b888fb4d0 (diff)
anv: If softpin is supported, use it with the hiz clear value bo
Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_device.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index f2755ab68e3..aa75de4e1ac 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1569,6 +1569,15 @@ static void
anv_device_init_hiz_clear_value_bo(struct anv_device *device)
{
anv_bo_init_new(&device->hiz_clear_bo, device, 4096);
+
+ if (device->instance->physicalDevice.has_exec_async)
+ device->hiz_clear_bo.flags |= EXEC_OBJECT_ASYNC;
+
+ if (device->instance->physicalDevice.use_softpin)
+ device->hiz_clear_bo.flags |= EXEC_OBJECT_PINNED;
+
+ anv_vma_alloc(device, &device->hiz_clear_bo);
+
uint32_t *map = anv_gem_mmap(device, device->hiz_clear_bo.gem_handle,
0, 4096, 0);