d3d12: Early error out on Signal() fail

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7642>
This commit is contained in:
Seungha Yang 2024-10-09 15:19:52 -04:00
parent b923a3ed61
commit ef55b31f46

View file

@ -223,10 +223,12 @@ gst_d3d12_command_queue_execute_command_lists_unlocked (GstD3D12CommandQueue *
priv->fence_val++;
if (num_command_lists)
priv->cq->ExecuteCommandLists (num_command_lists, command_lists);
auto hr = priv->cq->Signal (priv->fence.Get (), priv->fence_val);
if (FAILED (hr)) {
GST_ERROR_OBJECT (queue, "Signal failed");
priv->fence_val--;
return hr;
} else if (fence_value) {
*fence_value = priv->fence_val;
}