summaryrefslogtreecommitdiff
path: root/gst-libs/gst/d3d11
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-01-18 19:17:14 +0900
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-01-19 11:23:56 +0000
commitd16b5b7f7f5342bed933478bcccdac02d0477038 (patch)
tree93a63294d708205326a6265a625e0c5e93591283 /gst-libs/gst/d3d11
parent46c577222d4577f65914370007052fe22ea080a4 (diff)
downloadgstreamer-plugins-bad-d16b5b7f7f5342bed933478bcccdac02d0477038.tar.gz
d3d11: Allow building UWP features with Desktop features if possible
WINAPI_PARTITION_DESKTOP and WINAPI_PARTITION_APP can coexist. Although UWP only binaries should be used for production stage, this change will be useful for development stage Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1962>
Diffstat (limited to 'gst-libs/gst/d3d11')
-rw-r--r--gst-libs/gst/d3d11/gstd3d11config.h.meson1
-rw-r--r--gst-libs/gst/d3d11/meson.build16
2 files changed, 11 insertions, 6 deletions
diff --git a/gst-libs/gst/d3d11/gstd3d11config.h.meson b/gst-libs/gst/d3d11/gstd3d11config.h.meson
index 65b725388..ababe80b6 100644
--- a/gst-libs/gst/d3d11/gstd3d11config.h.meson
+++ b/gst-libs/gst/d3d11/gstd3d11config.h.meson
@@ -10,6 +10,7 @@ G_BEGIN_DECLS
#mesondefine GST_D3D11_DXGI_HEADER_VERSION
#mesondefine GST_D3D11_HEADER_VERSION
#mesondefine GST_D3D11_WINAPI_ONLY_APP
+#mesondefine GST_D3D11_WINAPI_APP
G_END_DECLS
diff --git a/gst-libs/gst/d3d11/meson.build b/gst-libs/gst/d3d11/meson.build
index da08234ce..b699082d5 100644
--- a/gst-libs/gst/d3d11/meson.build
+++ b/gst-libs/gst/d3d11/meson.build
@@ -80,15 +80,15 @@ if not have_d3d11
subdir_done()
endif
-winapi_desktop = cxx.compiles('''#include <winapifamily.h>
+d3d11_winapi_desktop = cxx.compiles('''#include <winapifamily.h>
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#error "not win32"
#endif''',
dependencies: [d3d11_lib, dxgi_lib],
- name: 'checking if building for Win32')
+ name: 'building for Win32')
if runtimeobject_lib.found() and d3dcompiler_lib.found()
- winapi_app = cxx.compiles('''#include <winapifamily.h>
+ d3d11_winapi_app = cxx.compiles('''#include <winapifamily.h>
#include <windows.applicationmodel.core.h>
#include <wrl.h>
#include <wrl/wrappers/corewrappers.h>
@@ -96,17 +96,21 @@ if runtimeobject_lib.found() and d3dcompiler_lib.found()
#include <dxgi1_2.h>
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#error "not winrt"
+ #endif
+ #if (WINVER < 0x0A00)
+ #error "Windows 10 API is not guaranteed"
#endif''',
dependencies: [d3d11_lib, dxgi_lib, runtimeobject_lib],
- name: 'checking if building for WinRT')
+ name: 'building for WinRT')
endif
-if not winapi_desktop and not winapi_app
+if not d3d11_winapi_desktop and not d3d11_winapi_app
error('Neither Desktop partition nor App partition')
endif
-d3d11_winapi_only_app = winapi_app and not winapi_desktop
+d3d11_winapi_only_app = d3d11_winapi_app and not d3d11_winapi_desktop
d3d11_conf.set10('GST_D3D11_WINAPI_ONLY_APP', d3d11_winapi_only_app)
+d3d11_conf.set10('GST_D3D11_WINAPI_APP', d3d11_winapi_app)
# for enabling debug layer
# NOTE: Disable d3d11/dxgi debug layer in case of [UWP build + release CRT]