d3d12device: Prevent too many in-flight GPU commands

Even if each element is checking its own in-flight commands,
total number of commands can get larger in case of complex pipeline.
Limits total number of in-flight commands at command queue level

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7066>
This commit is contained in:
Seungha Yang 2024-06-20 00:09:16 +09:00
parent 143efa2f86
commit bdb12db5c6

View file

@ -1088,7 +1088,7 @@ gst_d3d12_device_new_internal (const GstD3D12DeviceConstructData * data)
queue_desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE; queue_desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
priv->direct_queue = gst_d3d12_command_queue_new (device.Get (), priv->direct_queue = gst_d3d12_command_queue_new (device.Get (),
&queue_desc, D3D12_FENCE_FLAG_SHARED, 0); &queue_desc, D3D12_FENCE_FLAG_SHARED, 32);
if (!priv->direct_queue) if (!priv->direct_queue)
goto error; goto error;
@ -1104,7 +1104,7 @@ gst_d3d12_device_new_internal (const GstD3D12DeviceConstructData * data)
queue_desc.Type = D3D12_COMMAND_LIST_TYPE_COPY; queue_desc.Type = D3D12_COMMAND_LIST_TYPE_COPY;
priv->copy_queue = gst_d3d12_command_queue_new (device.Get (), priv->copy_queue = gst_d3d12_command_queue_new (device.Get (),
&queue_desc, D3D12_FENCE_FLAG_NONE, 0); &queue_desc, D3D12_FENCE_FLAG_NONE, 32);
if (!priv->copy_queue) if (!priv->copy_queue)
goto error; goto error;