summaryrefslogtreecommitdiff
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2020-02-06 04:31:27 -0600
committerMarge Bot <eric+marge@anholt.net>2020-02-06 10:48:33 +0000
commit5aec9e84a86f578d0babae1d5c1800578c1c1b53 (patch)
treeb43243c1d22e41eed443882eee35a338d342d52d /src/intel
parentf9febfae416e9fdf39a501ceb53a65c99ca78eed (diff)
anv: No-op submit and wait calls when no_hw is set
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3734> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3734>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_queue.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
index b93d070711d..b9e19617d8a 100644
--- a/src/intel/vulkan/anv_queue.c
+++ b/src/intel/vulkan/anv_queue.c
@@ -564,6 +564,9 @@ VkResult
anv_queue_submit_simple_batch(struct anv_queue *queue,
struct anv_batch *batch)
{
+ if (queue->device->no_hw)
+ return VK_SUCCESS;
+
struct anv_device *device = queue->device;
struct anv_queue_submit *submit = anv_queue_submit_alloc(device);
if (!submit)
@@ -947,6 +950,9 @@ VkResult anv_QueueSubmit(
{
ANV_FROM_HANDLE(anv_queue, queue, _queue);
+ if (queue->device->no_hw)
+ return VK_SUCCESS;
+
/* Query for device status prior to submitting. Technically, we don't need
* to do this. However, if we have a client that's submitting piles of
* garbage, we would rather break as early as possible to keep the GPU
@@ -1537,6 +1543,9 @@ VkResult anv_WaitForFences(
{
ANV_FROM_HANDLE(anv_device, device, _device);
+ if (device->no_hw)
+ return VK_SUCCESS;
+
if (anv_device_is_lost(device))
return VK_ERROR_DEVICE_LOST;
@@ -2282,6 +2291,9 @@ VkResult anv_WaitSemaphores(
{
ANV_FROM_HANDLE(anv_device, device, _device);
+ if (device->no_hw)
+ return VK_SUCCESS;
+
struct anv_timeline **timelines =
vk_alloc(&device->alloc,
pWaitInfo->semaphoreCount * sizeof(*timelines),