[vlc-devel] [RFC 06/82] d3d11: update directX header for crosscompilation
Pierre Lamot
pierre at videolabs.io
Fri Feb 1 14:01:10 CET 2019
updated headers are required to compile ANGLE support in Qt
---
contrib/src/d3d11/SHA512SUMS | 14 ++-
contrib/src/d3d11/processor_format.patch | 14 +--
contrib/src/d3d11/rules.mak | 122 ++++++++++++++++++-----
modules/hw/d3d11/d3d11_deinterlace.c | 2 -
4 files changed, 109 insertions(+), 43 deletions(-)
diff --git a/contrib/src/d3d11/SHA512SUMS b/contrib/src/d3d11/SHA512SUMS
index 96c760804c..bad2544123 100644
--- a/contrib/src/d3d11/SHA512SUMS
+++ b/contrib/src/d3d11/SHA512SUMS
@@ -1,6 +1,10 @@
-0d97a004acd9d99d685aef6ae3c41b9951b41170d197173838ad2dbad4db309debcc2dd6ab2cfaa849ab9ca9841ae80232739b113b3e72c35ec8a481066acff5 d3d11.idl
+ba36135eb24775b929a3321423216f3f34c75145d7428d520378cd30d72b5f776261417ec0c0c08a2a6ffd9a60de7159454f3931e27dc50a01bb1767cf19ff79 d3d11.idl
+840be0925d6599013d03c734b1f9b96623440a6c88ba5aff046f4581ebd8b41ee09210723ee50f7f3da95fc368f833e5acd182b80364deeff82cc75d7a534396 d3d11_1.h
+5a0cb7185a9686debcf094b7c2342fb5c9af4f8003b1a9f985bb16671f07b50d0b453c5ef9e8222c5c24534fce84a4881bd6511d07623bc2801a7ff61f3cd3df d3d11_2.h
+30b891715e5cd489be9bb023eba0160a0bf6d3a62ae115a82b861396ca5e1caa3a7572fd89585126a8e631f5daff87a02b4eb665334463ee6fdfffb0aa28cd12 d3d11_3.h
04b208ddf9c91f923d262ae68a5fb0588a3ef1a39ea450eaac9031e021bd5efdc7b30e3fb3e589b07bc88e41f8861caeb56934a2fa6cbf2efb7404f5f3453b70 dxgidebug.idl
-1bee79fcaf5db6e53510f49fb40009fe6291ffafe47e1aea46ae0068afd001b405b0d970a55af63e475fbb18108e1ca0f91d86a18b6598b922c454ed082e8941 dxgi1_2.idl
-3f24632a71c96498f3432ed55ebdbe0a90e00c86ff88e4a41d1d04fdda14532aeff7799401803a03c6f69b3a07930d3f190211accef4ca199a21b3671acdcc45 dxgitype.h
-bba687b7cd4fd321f99d70a8137b1aa01851d8fd72a007cf5f8e5bce55fe06e15c27fe82de6493291b7c9932ceb43642234ed07d9a6bcb6140229cdbeb4a49bd dxgiformat.h
-40eec2c5a96aeafb18ed9936c6ca9fc05303a08572efe6a3483e316b8af4e392eba863af86cdbb1342ac3ccb039be1b962688b05610e07f426bab6474073bfa3 dxgi.idl
+b698933af1158ba681eec59260b3ed148688cde0966cf1a213bed532465a008493ca4a5ba157fbc2903c85d0482a3142c1505c408e3f8320128c9c130e6ea8e6 dxgi1_2.idl
+26f3aa5b623b3790459f6982adc848f24026da84c74144e1a6e550ad42b6c420d91382ff2b6ec17201341c9128add9733329c1d32d5538ea27d84e47ff3947f6 dxgitype.idl
+a102d0878c4b734352d9072c762e62eec040e980258aaa6e513576d6e12b125217742d09e66e59bc542e65fba210ff8c423011cd718fa51be589825c75471eba dxgiformat.idl
+35de2fa980ac74a93173806a446c09afc33d5e49e195da11c28cd34fe7c914290da7dc867f145d11f1ed117b96be4fd4157750d48c0b5f4b10610dd95d8a29da dxgi.idl
+a74bf1db781aa2fa3605efaefded08f98818a3e5da6209fb3ac13a762d7cacbc8f08e63159d5d3c5d7b4338d0cbb9fe9a05d26460ef8c025f62cb6d7f98e0d27 dxgicommon.idl
diff --git a/contrib/src/d3d11/processor_format.patch b/contrib/src/d3d11/processor_format.patch
index ce7bcfd010..9d361b9d89 100644
--- a/contrib/src/d3d11/processor_format.patch
+++ b/contrib/src/d3d11/processor_format.patch
@@ -1,6 +1,8 @@
---- a/d3d11.idl 2016-02-26 09:21:48.019575300 +0100
-+++ b/d3d11.idl 2016-02-26 10:41:58.461027900 +0100
-@@ -3199,6 +3199,18 @@ typedef enum D3D11_CREATE_DEVICE_FLAG {
+diff --git a/d3d11.idl b/d3d11.idl
+index 53906df..cdb3cfd 100644
+--- a/d3d11.idl
++++ b/d3d11.idl
+@@ -3793,6 +3793,12 @@ typedef enum D3D11_CREATE_DEVICE_FLAG {
D3D11_CREATE_DEVICE_VIDEO_SUPPORT = 0x0800
} D3D11_CREATE_DEVICE_FLAG;
@@ -9,12 +11,6 @@
+ D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT = 0x00000001,
+ D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT = 0x00000002,
+} D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT;
-+
-+typedef struct D3D11_FEATURE_DATA_THREADING
-+{
-+ BOOL DriverConcurrentCreates;
-+ BOOL DriverCommandLists;
-+} D3D11_FEATURE_DATA_THREADING;
+
const UINT D3D11_SDK_VERSION = 7;
diff --git a/contrib/src/d3d11/rules.mak b/contrib/src/d3d11/rules.mak
index d2c1d9760e..e4206b2dcd 100644
--- a/contrib/src/d3d11/rules.mak
+++ b/contrib/src/d3d11/rules.mak
@@ -8,24 +8,41 @@ IDL_INCLUDES = -I/`echo $(MSYSTEM) | tr A-Z a-z`/$(BUILD)/include
endif
D3D11_COMMIT_ID := a0cd5afeb60be3be0860e9a203314c10485bb9b8
+D3D11_X_COMMIT_ID := cb090affef8ebcd8c13ffc271b4500dea3b52f33
DXGI12_COMMIT_ID := 790a6544347b53c314b9c6f1ea757a2d5504c67e
DXGITYPE_COMMIT_ID := f4aba520d014ecfe3563e33860de001caf2804e2
-D3D11_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/d3d11.idl?format=raw
-DXGI12_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(DXGI12_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgi1_2.idl?format=raw
-DXGITYPE_H_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(DXGITYPE_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgitype.h?format=raw
-DXGIFORMAT_H_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(DXGITYPE_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgiformat.h?format=raw
-DXGI_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(DXGITYPE_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgi.idl?format=raw
+D3D11_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/d3d11.idl?format=raw
+D3D11_1_H_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/d3d11_1.h?format=raw
+D3D11_2_H_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/d3d11_2.h?format=raw
+D3D11_3_H_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/d3d11_3.h?format=raw
+
+DXGI12_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgi1_2.idl?format=raw
+DXGITYPE_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgitype.idl?format=raw
+DXGIFORMAT_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgiformat.idl?format=raw
+DXGICOMMON_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgicommon.idl?format=raw
+DXGI_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgi.idl?format=raw
+DXGI12_IDL_URL = http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgi1_2.idl?format=raw
+DXGI13_IDL_URL = http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgi1_3.idl?format=raw
+DXGI14_IDL_URL = http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgi1_4.idl?format=raw
+DXGI15_IDL_URL = http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgi1_5.idl?format=raw
+DXGI16_IDL_URL = http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(D3D11_X_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgi1_6.idl?format=raw
+
+DST_D3D11_H = $(PREFIX)/include/d3d11.h
DST_D3D11_H = $(PREFIX)/include/d3d11.h
DST_DXGIDEBUG_H = $(PREFIX)/include/dxgidebug.h
DST_DXGITYPE_H = $(PREFIX)/include/dxgitype.h
DST_DXGIFORMAT_H = $(PREFIX)/include/dxgiformat.h
+DST_DXGICOMMON_H = $(PREFIX)/include/dxgicommon.h
DST_DXGI_IDL = $(PREFIX)/include/dxgi.idl
+DST_DXGI_H = $(PREFIX)/include/dxgi.h
DST_DXGI12_H = $(PREFIX)/include/dxgi1_2.h
DST_DXGI13_H = $(PREFIX)/include/dxgi1_3.h
DST_DXGI14_H = $(PREFIX)/include/dxgi1_4.h
DST_DXGI15_H = $(PREFIX)/include/dxgi1_5.h
DST_DXGI16_H = $(PREFIX)/include/dxgi1_6.h
-
+DST_D3D11_1_H = $(PREFIX)/include/d3d11_1.h
+DST_D3D11_2_H = $(PREFIX)/include/d3d11_2.h
+DST_D3D11_3_H = $(PREFIX)/include/d3d11_3.h
ifdef HAVE_WIN32
PKGS += d3d11
@@ -34,22 +51,47 @@ endif
$(TARBALLS)/d3d11.idl:
$(call download_pkg,$(D3D11_IDL_URL),d3d11)
+$(TARBALLS)/d3d11_1.h:
+ $(call download_pkg,$(D3D11_1_H_URL),d3d11)
+
+$(TARBALLS)/d3d11_2.h:
+ $(call download_pkg,$(D3D11_2_H_URL),d3d11)
+
+$(TARBALLS)/d3d11_3.h:
+ $(call download_pkg,$(D3D11_3_H_URL),d3d11)
+
$(TARBALLS)/dxgidebug.idl:
(cd $(TARBALLS) && patch -fp1) < $(SRC)/d3d11/dxgidebug.patch
-$(TARBALLS)/dxgi1_2.idl:
- $(call download_pkg,$(DXGI12_IDL_URL),d3d11)
+$(TARBALLS)/dxgitype.idl:
+ $(call download_pkg,$(DXGITYPE_IDL_URL),d3d11)
-$(TARBALLS)/dxgitype.h:
- $(call download_pkg,$(DXGITYPE_H_URL),d3d11)
+$(TARBALLS)/dxgiformat.idl:
+ $(call download_pkg,$(DXGIFORMAT_IDL_URL),d3d11)
-$(TARBALLS)/dxgiformat.h:
- $(call download_pkg,$(DXGIFORMAT_H_URL),d3d11)
+$(TARBALLS)/dxgicommon.idl:
+ $(call download_pkg,$(DXGICOMMON_IDL_URL),d3d11)
$(TARBALLS)/dxgi.idl:
$(call download_pkg,$(DXGI_IDL_URL),d3d11)
-.sum-d3d11: $(TARBALLS)/d3d11.idl $(TARBALLS)/dxgidebug.idl $(TARBALLS)/dxgi1_2.idl $(TARBALLS)/dxgitype.h $(TARBALLS)/dxgiformat.h $(TARBALLS)/dxgi.idl
+$(TARBALLS)/dxgi1_2.idl:
+ $(call download_pkg,$(DXGI12_IDL_URL),d3d11)
+
+$(TARBALLS)/dxgi1_3.idl:
+ $(call download_pkg,$(DXGI13_IDL_URL),d3d11)
+
+$(TARBALLS)/dxgi1_4.idl:
+ $(call download_pkg,$(DXGI14_IDL_URL),d3d11)
+
+$(TARBALLS)/dxgi1_5.idl:
+ $(call download_pkg,$(DXGI15_IDL_URL),d3d11)
+
+$(TARBALLS)/dxgi1_6.idl:
+ $(call download_pkg,$(DXGI16_IDL_URL),d3d11)
+
+
+.sum-d3d11: $(TARBALLS)/d3d11.idl $(TARBALLS)/d3d11_1.h $(TARBALLS)/d3d11_2.h $(TARBALLS)/d3d11_3.h $(TARBALLS)/dxgidebug.idl $(TARBALLS)/dxgi1_2.idl $(TARBALLS)/dxgitype.idl $(TARBALLS)/dxgiformat.idl $(TARBALLS)/dxgi.idl $(TARBALLS)/dxgicommon.idl
d3d11: .sum-d3d11
mkdir -p $@
@@ -63,45 +105,62 @@ $(DST_D3D11_H): d3d11
mkdir -p -- "$(PREFIX)/include/"
$(WIDL) -DBOOL=WINBOOL -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $</d3d11.idl
+$(DST_D3D11_1_H): d3d11
+ mkdir -p -- "$(PREFIX)/include/"
+ cp $(TARBALLS)/d3d11_1.h $@
+
+$(DST_D3D11_2_H): d3d11
+ mkdir -p -- "$(PREFIX)/include/"
+ cp $(TARBALLS)/d3d11_2.h $@
+
+$(DST_D3D11_3_H): d3d11
+ mkdir -p -- "$(PREFIX)/include/"
+ cp $(TARBALLS)/d3d11_3.h $@
+
$(DST_DXGIDEBUG_H): $(TARBALLS)/dxgidebug.idl
mkdir -p -- "$(PREFIX)/include/"
$(WIDL) -DBOOL=WINBOOL -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $<
-$(DST_DXGITYPE_H): $(TARBALLS)/dxgitype.h
+$(DST_DXGITYPE_H): $(TARBALLS)/dxgitype.idl
mkdir -p -- "$(PREFIX)/include/"
- cp $(TARBALLS)/dxgitype.h $@
+ $(WIDL) -DBOOL=WINBOOL -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $<
-$(DST_DXGIFORMAT_H): $(TARBALLS)/dxgiformat.h
+$(DST_DXGIFORMAT_H): $(TARBALLS)/dxgiformat.idl
mkdir -p -- "$(PREFIX)/include/"
- cp $(TARBALLS)/dxgiformat.h $@
+ $(WIDL) -DBOOL=WINBOOL -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $<
-$(DST_DXGI_IDL): $(TARBALLS)/dxgi.idl
+$(DST_DXGICOMMON_H): $(TARBALLS)/dxgicommon.idl
mkdir -p -- "$(PREFIX)/include/"
- cp $(TARBALLS)/dxgi.idl $@
+ $(WIDL) -DBOOL=WINBOOL -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $<
-$(DST_DXGI12_H): dxgi12
+$(DST_DXGI_H): $(TARBALLS)/dxgi.idl
mkdir -p -- "$(PREFIX)/include/"
- $(WIDL) -DBOOL=WINBOOL -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $</dxgi1_2.idl
+ $(WIDL) -DBOOL=WINBOOL -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $<
-$(DST_DXGI13_H): $(SRC)/d3d11/dxgi1_3.idl $(DST_DXGI12_H)
+$(DST_DXGI12_H): $(TARBALLS)/dxgi1_2.idl
+ mkdir -p -- "$(PREFIX)/include/"
+ $(WIDL) -DBOOL=WINBOOL -I$(PREFIX)/include -I$(IDL_INCLUDES) -h -o $@ $<
+
+$(DST_DXGI13_H): $(TARBALLS)/dxgi1_3.idl $(DST_DXGI12_H)
mkdir -p -- "$(PREFIX)/include/"
$(WIDL) -DBOOL=WINBOOL -Idxgi12 -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $<
-$(DST_DXGI14_H): $(SRC)/d3d11/dxgi1_4.idl $(DST_DXGI13_H)
+$(DST_DXGI14_H): $(TARBALLS)/dxgi1_4.idl $(DST_DXGI13_H)
mkdir -p -- "$(PREFIX)/include/"
$(WIDL) -DBOOL=WINBOOL -Idxgi12 -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $<
-$(DST_DXGI15_H): $(SRC)/d3d11/dxgi1_5.idl $(DST_DXGI14_H)
+$(DST_DXGI15_H): $(TARBALLS)/dxgi1_5.idl $(DST_DXGI14_H)
mkdir -p -- "$(PREFIX)/include/"
$(WIDL) -DBOOL=WINBOOL -Idxgi12 -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $<
-$(DST_DXGI16_H): $(SRC)/d3d11/dxgi1_6.idl $(DST_DXGI15_H)
+$(DST_DXGI16_H): $(TARBALLS)/dxgi1_6.idl $(DST_DXGI15_H)
mkdir -p -- "$(PREFIX)/include/"
$(WIDL) -DBOOL=WINBOOL -Idxgi12 -I$(PREFIX)/include $(IDL_INCLUDES) -h -o $@ $<
-.dxgitype: $(DST_DXGITYPE_H) $(DST_DXGIFORMAT_H) $(DST_DXGI_IDL)
+.dxgitype: $(DST_DXGITYPE_H) $(DST_DXGIFORMAT_H) $(DST_DXGICOMMON_H) $(DST_DXGI_H)
touch $@
+
.dxgi12: .dxgitype $(DST_DXGI12_H)
touch $@
@@ -117,5 +176,14 @@ $(DST_DXGI16_H): $(SRC)/d3d11/dxgi1_6.idl $(DST_DXGI15_H)
.dxgi16: .dxgi15 $(DST_DXGI16_H)
touch $@
-.d3d11: $(DST_D3D11_H) $(DST_DXGIDEBUG_H) .dxgi16
+.d3d11_1: $(DST_D3D11_H) $(DST_D3D11_1_H)
+ touch $@
+
+.d3d11_2: .d3d11_1 $(DST_D3D11_2_H)
+ touch $@
+
+.d3d11_3: .d3d11_2 $(DST_D3D11_3_H)
+ touch $@
+
+.d3d11: .d3d11_3 $(DST_DXGIDEBUG_H) .dxgi16
touch $@
diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c
index 21bc53f8a0..f7f7203236 100644
--- a/modules/hw/d3d11/d3d11_deinterlace.c
+++ b/modules/hw/d3d11/d3d11_deinterlace.c
@@ -40,7 +40,6 @@
#include "../../video_filter/deinterlace/common.h"
#ifdef __MINGW32__
-typedef UINT D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS;
#define D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND 0x1
#define D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB 0x2
#define D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE 0x4
@@ -504,4 +503,3 @@ void D3D11CloseDeinterlace(vlc_object_t *obj)
free(sys);
}
-
--
2.19.1
More information about the vlc-devel
mailing list