From c6a8b6852c06ed064109712b9e6fdd70df76bcc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Tue, 4 Jun 2024 18:30:53 +0200 Subject: [PATCH] win32: remove dxgi debug checks No longer needed after 9f8b4b38c97f0697fbc3a9b30e4e856337cd6dcf. --- meson.build | 1 - video/out/d3d11/ra_d3d11.c | 12 ------------ video/out/gpu/d3d11_helpers.c | 2 -- video/out/gpu/d3d11_helpers.h | 5 ----- 4 files changed, 20 deletions(-) diff --git a/meson.build b/meson.build index 8cb2cc0855..8d80e03c28 100644 --- a/meson.build +++ b/meson.build @@ -1012,7 +1012,6 @@ if features['d3d11'] sources += files('video/out/d3d11/context.c', 'video/out/d3d11/ra_d3d11.c') features += {'dxgi-debug-d3d11': cc.has_header_symbol('d3d11sdklayers.h', 'DXGI_DEBUG_D3D11')} - features += {'dxgi-debug': cc.has_header_symbol('dxgidebug.h', 'IID_IDXGIInfoQueue')} endif wayland = { diff --git a/video/out/d3d11/ra_d3d11.c b/video/out/d3d11/ra_d3d11.c index 2b35686111..d4273dea50 100644 --- a/video/out/d3d11/ra_d3d11.c +++ b/video/out/d3d11/ra_d3d11.c @@ -44,11 +44,9 @@ struct ra_d3d11 { struct dll_version d3d_compiler_ver; -#if HAVE_DXGI_DEBUG // Debug interfaces (--gpu-debug) IDXGIDebug *debug; IDXGIInfoQueue *iqueue; -#endif // Device capabilities D3D_FEATURE_LEVEL fl; @@ -2097,7 +2095,6 @@ static uint64_t timer_stop(struct ra *ra, ra_timer *ratimer) return timer->result; } -#if HAVE_DXGI_DEBUG static int map_msg_severity(DXGI_INFO_QUEUE_MESSAGE_SEVERITY sev) { switch (sev) { @@ -2172,11 +2169,9 @@ static int map_msg_severity_by_id(D3D11_MESSAGE_ID id, return map_msg_severity(sev); } } -#endif static void debug_marker(struct ra *ra, const char *msg) { -#if HAVE_DXGI_DEBUG struct ra_d3d11 *p = ra->priv; void *talloc_ctx = talloc_new(NULL); HRESULT hr; @@ -2217,7 +2212,6 @@ static void debug_marker(struct ra *ra, const char *msg) IDXGIInfoQueue_ClearStoredMessages(p->iqueue, DXGI_DEBUG_ALL); done: talloc_free(talloc_ctx); -#endif } static void destroy(struct ra *ra) @@ -2248,7 +2242,6 @@ static void destroy(struct ra *ra) } SAFE_RELEASE(p->ctx); -#if HAVE_DXGI_DEBUG if (p->debug) { // Report any leaked objects debug_marker(ra, "after destroy"); @@ -2259,7 +2252,6 @@ static void destroy(struct ra *ra) } SAFE_RELEASE(p->debug); SAFE_RELEASE(p->iqueue); -#endif talloc_free(ra); } @@ -2451,10 +2443,8 @@ struct ra *ra_d3d11_create(ID3D11Device *dev, struct mp_log *log, p->max_uavs = D3D11_PS_CS_UAV_REGISTER_COUNT; } -#if HAVE_DXGI_DEBUG if (ID3D11Device_GetCreationFlags(p->dev) & D3D11_CREATE_DEVICE_DEBUG) mp_d3d11_get_debug_interfaces(ra->log, &p->debug, &p->iqueue); -#endif // Some level 9_x devices don't have timestamp queries hr = ID3D11Device_CreateQuery(p->dev, @@ -2468,11 +2458,9 @@ struct ra *ra_d3d11_create(ID3D11Device *dev, struct mp_log *log, // https://msdn.microsoft.com/en-us/library/windows/desktop/ff476874.aspx find_max_texture_dimension(ra); -#if HAVE_DXGI_DEBUG // Ignore any messages during find_max_texture_dimension if (p->iqueue) IDXGIInfoQueue_ClearStoredMessages(p->iqueue, DXGI_DEBUG_ALL); -#endif MP_VERBOSE(ra, "Maximum Texture2D size: %dx%d\n", ra->max_texture_wh, ra->max_texture_wh); diff --git a/video/out/gpu/d3d11_helpers.c b/video/out/gpu/d3d11_helpers.c index fa37d5ef30..358a7deb8b 100644 --- a/video/out/gpu/d3d11_helpers.c +++ b/video/out/gpu/d3d11_helpers.c @@ -1003,7 +1003,6 @@ done: return ret; } -#if HAVE_DXGI_DEBUG void mp_d3d11_get_debug_interfaces(struct mp_log *log, IDXGIDebug **debug, IDXGIInfoQueue **iqueue) { @@ -1038,4 +1037,3 @@ void mp_d3d11_get_debug_interfaces(struct mp_log *log, IDXGIDebug **debug, return; } } -#endif diff --git a/video/out/gpu/d3d11_helpers.h b/video/out/gpu/d3d11_helpers.h index 92322b9152..166d451933 100644 --- a/video/out/gpu/d3d11_helpers.h +++ b/video/out/gpu/d3d11_helpers.h @@ -23,10 +23,7 @@ #include #include #include - -#if HAVE_DXGI_DEBUG #include -#endif #include "video/mp_image.h" @@ -117,9 +114,7 @@ bool mp_d3d11_create_swapchain(ID3D11Device *dev, struct mp_log *log, struct d3d11_swapchain_opts *opts, IDXGISwapChain **swapchain_out); -#if HAVE_DXGI_DEBUG void mp_d3d11_get_debug_interfaces(struct mp_log *log, IDXGIDebug **debug, IDXGIInfoQueue **iqueue); -#endif #endif