mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
d3d12commandqueue: Detect device removed event
Early return if device removed event is detected Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7066>
This commit is contained in:
parent
327fb9924c
commit
143efa2f86
1 changed files with 5 additions and 0 deletions
|
@ -244,6 +244,11 @@ gst_d3d12_command_queue_execute_command_lists_unlocked (GstD3D12CommandQueue *
|
|||
|
||||
if (priv->queue_size > 0) {
|
||||
auto completed = priv->fence->GetCompletedValue ();
|
||||
if (completed == G_MAXUINT64) {
|
||||
GST_ERROR_OBJECT (queue, "Device removed");
|
||||
return DXGI_ERROR_DEVICE_REMOVED;
|
||||
}
|
||||
|
||||
if (completed + priv->queue_size < priv->fence_val) {
|
||||
hr = priv->fence->SetEventOnCompletion (priv->fence_val -
|
||||
priv->queue_size, priv->event_handle);
|
||||
|
|
Loading…
Reference in a new issue