diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12screencapturesrc.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12screencapturesrc.cpp index 87eaed377f..2c5f2a1e6f 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12screencapturesrc.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12screencapturesrc.cpp @@ -34,6 +34,8 @@ #include "config.h" #endif +#include "gstd3d12plugin-config.h" + #include "gstd3d12screencapturesrc.h" #include "gstd3d12dxgicapture.h" #ifdef HAVE_WGC diff --git a/subprojects/gst-plugins-bad/sys/d3d12/meson.build b/subprojects/gst-plugins-bad/sys/d3d12/meson.build index cf25cde70e..d931ea250b 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/meson.build +++ b/subprojects/gst-plugins-bad/sys/d3d12/meson.build @@ -38,6 +38,8 @@ extra_args = [ '-DGST_D3D12_USE_DIRECTX_HEADERS', ] +d3d12_cdata = configuration_data() + # Disable this warning error. Otherwise d3dx12.h will break build if cc.get_argument_syntax() == 'msvc' extra_args += cc.get_supported_arguments([ @@ -145,20 +147,14 @@ if not have_d3d12_headers subdir_done() endif -# https://learn.microsoft.com/en-us/windows/win32/dxmath/pg-xnamath-internals#windows-sse-versus-sse2 -# x86 with Windows 7 or older may not support SSE2 -if host_machine.cpu_family() != 'x86' - extra_args += ['-DHAVE_DIRECTX_MATH_SIMD'] -endif - if have_wgc and dwmapi_lib.found() + d3d12_cdata.set('HAVE_WGC', true) d3d12_sources += ['gstd3d12graphicscapture.cpp'] - extra_args += ['-DHAVE_WGC'] extra_deps += [dwmapi_lib] endif if gstd3d11_dep.found() - extra_args += ['-DHAVE_GST_D3D11'] + d3d12_cdata.set('HAVE_GST_D3D11', true) extra_deps += [gstd3d11_dep] d3d12_sources += [ 'gstd3d12memorycopy.cpp', @@ -170,6 +166,11 @@ else ] endif +configure_file( + output: 'gstd3d12plugin-config.h', + configuration: d3d12_cdata, +) + gstd3d12 = library('gstd3d12', d3d12_sources, c_args : gst_plugins_bad_args + extra_args, diff --git a/subprojects/gst-plugins-bad/sys/d3d12/plugin.cpp b/subprojects/gst-plugins-bad/sys/d3d12/plugin.cpp index 7b777eda5b..52e931fee8 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/plugin.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/plugin.cpp @@ -27,6 +27,8 @@ #include #endif +#include "gstd3d12plugin-config.h" + #include #include #include "gstd3d12pluginutils.h"