From a24a1552794bd27bbacb29ba97fbde73dd75f382 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Fri, 15 Dec 2023 19:45:44 +0900 Subject: [PATCH] d3d12: Enable debug layer Part-of: --- .../sys/d3d12/gstd3d12device.cpp | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12device.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12device.cpp index d759ef53d6..5e6a348d13 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12device.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12device.cpp @@ -33,10 +33,7 @@ #include #include #include - -#ifdef HAVE_D3D12_SDKLAYERS_H #include -#endif GST_DEBUG_CATEGORY_STATIC (gst_d3d12_device_debug); GST_DEBUG_CATEGORY_STATIC (gst_d3d12_sdk_debug); @@ -172,9 +169,7 @@ struct _GstD3D12DevicePrivate ComPtr copy_queue; -#ifdef HAVE_D3D12_SDKLAYERS_H ComPtr info_queue; -#endif guint adapter_index = 0; guint device_id = 0; @@ -184,7 +179,6 @@ struct _GstD3D12DevicePrivate }; /* *INDENT-ON* */ -#ifdef HAVE_D3D12_SDKLAYERS_H static gboolean gst_d3d12_device_enable_debug (void) { @@ -211,7 +205,6 @@ gst_d3d12_device_enable_debug (void) GST_INFO ("D3D12 debug layer is enabled"); -#ifdef HAVE_D3D12DEBUG5 ComPtr < ID3D12Debug5 > d3d12_debug5; hr = d3d12_debug.As (&d3d12_debug5); if (SUCCEEDED (hr)) @@ -232,13 +225,11 @@ gst_d3d12_device_enable_debug (void) d3d12_debug1->SetEnableGPUBasedValidation (TRUE); GST_INFO ("Enabled GPU based validation"); -#endif } GST_D3D12_CALL_ONCE_END; return enabled; } -#endif #define gst_d3d12_device_parent_class parent_class G_DEFINE_TYPE (GstD3D12Device, gst_d3d12_device, GST_TYPE_OBJECT); @@ -490,10 +481,8 @@ gst_d3d12_device_find_adapter (const GstD3D12DeviceConstructData * data, HRESULT hr; UINT factory_flags = 0; -#ifdef HAVE_D3D12_SDKLAYERS_H if (gst_d3d12_device_enable_debug ()) factory_flags |= DXGI_CREATE_FACTORY_DEBUG; -#endif hr = CreateDXGIFactory2 (factory_flags, IID_PPV_ARGS (&factory)); if (FAILED (hr)) { @@ -555,10 +544,8 @@ gst_d3d12_device_new_internal (const GstD3D12DeviceConstructData * data) GST_DEBUG_CATEGORY_INIT (gst_d3d12_device_debug, "d3d12device", 0, "d3d12 device object"); -#ifdef HAVE_D3D12_SDKLAYERS_H if (gst_d3d12_device_enable_debug ()) factory_flags |= DXGI_CREATE_FACTORY_DEBUG; -#endif hr = CreateDXGIFactory2 (factory_flags, IID_PPV_ARGS (&factory)); if (FAILED (hr)) { @@ -608,13 +595,11 @@ gst_d3d12_device_new_internal (const GstD3D12DeviceConstructData * data) gst_d3d12_device_setup_format_table (self); -#ifdef HAVE_D3D12_SDKLAYERS_H if (gst_d3d12_device_enable_debug ()) { ComPtr < ID3D12InfoQueue > info_queue; device.As (&info_queue); priv->info_queue = info_queue; } -#endif return self; } @@ -786,7 +771,6 @@ d3d12_message_severity_to_gst (D3D12_MESSAGE_SEVERITY level) return GST_LEVEL_LOG; } -#ifdef HAVE_D3D12_SDKLAYERS_H void gst_d3d12_device_d3d12_debug (GstD3D12Device * device, const gchar * file, const gchar * function, gint line) @@ -836,10 +820,3 @@ gst_d3d12_device_d3d12_debug (GstD3D12Device * device, const gchar * file, info_queue->ClearStoredMessages (); } -#else -void -gst_d3d12_device_d3d12_debug (GstD3D12Device * device, const gchar * file, - const gchar * function, gint line) -{ -} -#endif