d3d12: Fix SDK debug layer activation

Debug layer must be enabled before creating device. Otherwise
already opened devices before the activation will be removed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6383>
This commit is contained in:
Seungha Yang 2024-03-16 21:25:38 +09:00 committed by Tim-Philipp Müller
parent 80cd85d03d
commit 9061e464a8

View file

@ -725,6 +725,8 @@ gst_d3d12_device_new_internal (const GstD3D12DeviceConstructData * data)
GST_DEBUG_CATEGORY_INIT (gst_d3d12_device_debug, GST_DEBUG_CATEGORY_INIT (gst_d3d12_device_debug,
"d3d12device", 0, "d3d12 device object"); "d3d12device", 0, "d3d12 device object");
gst_d3d12_device_enable_debug ();
hr = CreateDXGIFactory2 (factory_flags, IID_PPV_ARGS (&factory)); hr = CreateDXGIFactory2 (factory_flags, IID_PPV_ARGS (&factory));
if (FAILED (hr)) { if (FAILED (hr)) {
GST_WARNING ("Could create dxgi factory, hr: 0x%x", (guint) hr); GST_WARNING ("Could create dxgi factory, hr: 0x%x", (guint) hr);