v3dv: add more checks for device loss
VK_KHR_maintenance5 adds additional guarantees for functions that can return VK_ERROR_DEVICE_LOSS to return this error if the device was previously lost. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29668>
This commit is contained in:
committed by
Marge Bot
parent
56ac6f26e0
commit
14b0cb6b9f
@@ -450,6 +450,8 @@ v3dv_GetEventStatus(VkDevice _device, VkEvent _event)
|
||||
{
|
||||
V3DV_FROM_HANDLE(v3dv_device, device, _device);
|
||||
V3DV_FROM_HANDLE(v3dv_event, event, _event);
|
||||
if (vk_device_is_lost(&device->vk))
|
||||
return VK_ERROR_DEVICE_LOST;
|
||||
return event_get_value(device, event) ? VK_EVENT_SET : VK_EVENT_RESET;
|
||||
}
|
||||
|
||||
|
||||
@@ -773,6 +773,9 @@ v3dv_GetQueryPoolResults(VkDevice _device,
|
||||
V3DV_FROM_HANDLE(v3dv_device, device, _device);
|
||||
V3DV_FROM_HANDLE(v3dv_query_pool, pool, queryPool);
|
||||
|
||||
if (vk_device_is_lost(&device->vk))
|
||||
return VK_ERROR_DEVICE_LOST;
|
||||
|
||||
return v3dv_get_query_pool_results_cpu(device, pool, firstQuery, queryCount,
|
||||
pData, stride, flags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user