anv: If softpin is supported, use it with the hiz clear value bo
authorJordan Justen <jordan.l.justen@intel.com>
Tue, 1 May 2018 23:14:06 +0000 (16:14 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Wed, 26 Sep 2018 17:21:23 +0000 (10:21 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/intel/vulkan/anv_device.c

index f2755ab68e342aa9eebe3aa3e19b72f1f66f9de1..aa75de4e1ac0886091492ecbeadde1d14a4767af 100644 (file)
@@ -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);