d3d12: Fix build with GST_DISABLE_GST_DEBUG

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5585>
This commit is contained in:
Seungha Yang 2023-11-02 00:24:35 +09:00 committed by GStreamer Marge Bot
parent bf05cfea45
commit c3cef6e923
2 changed files with 6 additions and 1 deletions

View file

@ -66,8 +66,13 @@ gboolean _gst_d3d12_result (HRESULT hr,
*
* Returns: %TRUE if D3D12 API call result is SUCCESS
*/
#ifndef GST_DISABLE_GST_DEBUG
#define gst_d3d12_result(result,device) \
_gst_d3d12_result (result, device, GST_CAT_DEFAULT, __FILE__, GST_FUNCTION, __LINE__, GST_LEVEL_ERROR)
#else
#define gst_d3d12_result(result,device) \
_gst_d3d12_result (result, device, NULL, __FILE__, GST_FUNCTION, __LINE__, GST_LEVEL_ERROR)
#endif
guint gst_d3d12_calculate_subresource (guint mip_slice,
guint array_slice,

View file

@ -54,7 +54,7 @@ if not have_d3d12_headers
subdir_done()
endif
if cc.has_header('d3d12sdklayers.h')
if not gst_debug_disabled and cc.has_header('d3d12sdklayers.h')
extra_args += ['-DHAVE_D3D12_SDKLAYERS_H']
if cc.has_header_symbol('d3d12sdklayers.h', 'ID3D12Debug5')
extra_args += ['-DHAVE_D3D12DEBUG5']