[vlc-devel] [PATCH 1/3] contrib:d3d11: compile dxgiformat.idl and dxgicommon.idl

Steve Lhomme robux4 at videolabs.io
Tue Dec 5 11:39:31 CET 2017


Now we build all the main DXGI/D3D11 files locally
No need for the dxgitype.patch anymore.
---
 contrib/src/d3d11/SHA512SUMS     |  4 +++-
 contrib/src/d3d11/dxgitype.patch | 42 ---------------------------------
 contrib/src/d3d11/rules.mak      | 50 +++++++++++++++++++++++++++++-----------
 3 files changed, 39 insertions(+), 57 deletions(-)
 delete mode 100644 contrib/src/d3d11/dxgitype.patch

diff --git a/contrib/src/d3d11/SHA512SUMS b/contrib/src/d3d11/SHA512SUMS
index 2599601903..f0c9ad4c01 100644
--- a/contrib/src/d3d11/SHA512SUMS
+++ b/contrib/src/d3d11/SHA512SUMS
@@ -2,4 +2,6 @@
 04b208ddf9c91f923d262ae68a5fb0588a3ef1a39ea450eaac9031e021bd5efdc7b30e3fb3e589b07bc88e41f8861caeb56934a2fa6cbf2efb7404f5f3453b70  dxgidebug.idl
 958d031b5a681318095ed17892b4a9bd2751dd57328f846ba2bb1a48130021fd32e7647d5051afb0b4d5bee24b722713788b53d5d07fdb6c7a0a5853a83b8398  dxgi.idl
 1bee79fcaf5db6e53510f49fb40009fe6291ffafe47e1aea46ae0068afd001b405b0d970a55af63e475fbb18108e1ca0f91d86a18b6598b922c454ed082e8941  dxgi1_2.idl
-3f24632a71c96498f3432ed55ebdbe0a90e00c86ff88e4a41d1d04fdda14532aeff7799401803a03c6f69b3a07930d3f190211accef4ca199a21b3671acdcc45  dxgitype.h
+26f3aa5b623b3790459f6982adc848f24026da84c74144e1a6e550ad42b6c420d91382ff2b6ec17201341c9128add9733329c1d32d5538ea27d84e47ff3947f6  dxgitype.idl
+a102d0878c4b734352d9072c762e62eec040e980258aaa6e513576d6e12b125217742d09e66e59bc542e65fba210ff8c423011cd718fa51be589825c75471eba  dxgiformat.idl
+a74bf1db781aa2fa3605efaefded08f98818a3e5da6209fb3ac13a762d7cacbc8f08e63159d5d3c5d7b4338d0cbb9fe9a05d26460ef8c025f62cb6d7f98e0d27  dxgicommon.idl
\ No newline at end of file
diff --git a/contrib/src/d3d11/dxgitype.patch b/contrib/src/d3d11/dxgitype.patch
deleted file mode 100644
index 6d83bdaf8c..0000000000
--- a/contrib/src/d3d11/dxgitype.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- tarballs/dxgitype.h	2017-10-23 12:03:45.140603400 +0200
-+++ tarballs/dxgitype.h.mscver	2017-10-23 14:09:19.847274000 +0200
-@@ -21,6 +21,10 @@
- 
- #include "dxgiformat.h"
- 
-+#ifdef _MSC_VER
-+#define WINBOOL BOOL
-+#endif /* _MSC_VER */
-+
- #ifndef D3DCOLORVALUE_DEFINED
- typedef struct _D3DCOLORVALUE {
-     float r;
---- dxgitype/dxgitype.h	2017-10-25 11:23:25.635996000 +0200
-+++ dxgitype/dxgitype.h.color	2017-10-25 11:39:35.837007000 +0200
-@@ -97,4 +97,26 @@ typedef struct DXGI_GAMMA_CONTROL {
-     DXGI_RGB GammaCurve[1025];
- } DXGI_GAMMA_CONTROL;
- 
-+typedef enum DXGI_COLOR_SPACE_TYPE {
-+    DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709         = 0,
-+    DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709         = 1,
-+    DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709       = 2,
-+    DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020      = 3,
-+    DXGI_COLOR_SPACE_RESERVED                       = 4,
-+    DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601  = 5,
-+    DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601     = 6,
-+    DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601       = 7,
-+    DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709     = 8,
-+    DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709       = 9,
-+    DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020    = 10,
-+    DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020      = 11,
-+    DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020      = 12,
-+    DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020  = 13,
-+    DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020    = 14,
-+    DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020 = 15,
-+    DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020 = 16,
-+    DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020        = 17,
-+    DXGI_COLOR_SPACE_CUSTOM                         = 0xFFFFFFFF,
-+} DXGI_COLOR_SPACE_TYPE;
-+
- #endif
diff --git a/contrib/src/d3d11/rules.mak b/contrib/src/d3d11/rules.mak
index 42c3648147..fc5f2e9545 100644
--- a/contrib/src/d3d11/rules.mak
+++ b/contrib/src/d3d11/rules.mak
@@ -10,14 +10,20 @@ endif
 D3D11_COMMIT_ID := a0cd5afeb60be3be0860e9a203314c10485bb9b8
 DXGI_COMMIT_ID := 4143271759d986807a5cafbe78f67d11ac43892c
 DXGI12_COMMIT_ID := 790a6544347b53c314b9c6f1ea757a2d5504c67e
-DXGITYPE_COMMIT_ID := f4aba520d014ecfe3563e33860de001caf2804e2
+DXGITYPE_COMMIT_ID := f25c9a89ed2b2d98bc2658cfa4dc97a2c837c725
+DXGIFORMAT_COMMIT_ID := f25c9a89ed2b2d98bc2658cfa4dc97a2c837c725
+DXGICOMMON_COMMIT_ID := f25c9a89ed2b2d98bc2658cfa4dc97a2c837c725
 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
 DXGI_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(DXGI_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/$(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
+DXGITYPE_IDL_URL := http://sourceforge.net/p/mingw-w64/mingw-w64/ci/$(DXGITYPE_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/$(DXGIFORMAT_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/$(DXGICOMMON_COMMIT_ID)/tree/mingw-w64-headers/direct-x/include/dxgicommon.idl?format=raw
 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_H   = $(PREFIX)/include/dxgi.h
 DST_DXGI12_H = $(PREFIX)/include/dxgi1_2.h
 DST_DXGI13_H = $(PREFIX)/include/dxgi1_3.h
@@ -42,10 +48,16 @@ $(TARBALLS)/dxgi.idl:
 $(TARBALLS)/dxgi1_2.idl:
 	$(call download,$(DXGI12_IDL_URL))
 
-$(TARBALLS)/dxgitype.h:
-	$(call download,$(DXGITYPE_H_URL))
+$(TARBALLS)/dxgitype.idl:
+	$(call download,$(DXGITYPE_IDL_URL))
 
-.sum-d3d11: $(TARBALLS)/d3d11.idl $(TARBALLS)/dxgidebug.idl $(TARBALLS)/dxgi.idl $(TARBALLS)/dxgi1_2.idl $(TARBALLS)/dxgitype.h
+$(TARBALLS)/dxgiformat.idl:
+	$(call download,$(DXGIFORMAT_IDL_URL))
+
+$(TARBALLS)/dxgicommon.idl:
+	$(call download,$(DXGICOMMON_IDL_URL))
+
+.sum-d3d11: $(TARBALLS)/d3d11.idl $(TARBALLS)/dxgidebug.idl $(TARBALLS)/dxgi.idl $(TARBALLS)/dxgi1_2.idl $(TARBALLS)/dxgitype.idl $(TARBALLS)/dxgiformat.idl $(TARBALLS)/dxgicommon.idl
 
 d3d11: .sum-d3d11
 	mkdir -p $@
@@ -57,7 +69,9 @@ dxgi: .sum-d3d11
 
 dxgitype: .sum-d3d11
 	mkdir -p $@
-	cp $(TARBALLS)/dxgitype.h $@ && cd $@ && patch -fp1 < ../$(SRC)/d3d11/dxgitype.patch
+	cp $(TARBALLS)/dxgitype.idl   $@
+	cp $(TARBALLS)/dxgiformat.idl $@
+	cp $(TARBALLS)/dxgicommon.idl $@
 
 dxgi12: .sum-d3d11
 	mkdir -p $@
@@ -73,33 +87,41 @@ $(DST_DXGIDEBUG_H): $(TARBALLS)/dxgidebug.idl
 
 $(DST_DXGITYPE_H): dxgitype
 	mkdir -p -- "$(PREFIX)/include/"
-	cp dxgitype/dxgitype.h $@
+	$(WIDL) -Idxgitype -I$(IDL_INC_PATH) -h -o $@ $</dxgitype.idl
+
+$(DST_DXGIFORMAT_H): dxgitype
+	mkdir -p -- "$(PREFIX)/include/"
+	$(WIDL) -Idxgitype -I$(IDL_INC_PATH) -h -o $@ $</dxgiformat.idl
+
+$(DST_DXGICOMMON_H): dxgitype
+	mkdir -p -- "$(PREFIX)/include/"
+	$(WIDL) -Idxgitype -I$(IDL_INC_PATH) -h -o $@ $</dxgicommon.idl
 
 $(DST_DXGI_H): dxgi
 	mkdir -p -- "$(PREFIX)/include/"
-	$(WIDL) -DBOOL=WINBOOL -I$(IDL_INC_PATH) -h -o $@ $</dxgi.idl
+	$(WIDL) -I$(IDL_INC_PATH) -h -o $@ $</dxgi.idl
 
 $(DST_DXGI12_H): dxgi12 $(DST_DXGI_H)
 	mkdir -p -- "$(PREFIX)/include/"
-	$(WIDL) -I$(IDL_INC_PATH) -h -o $@ $</dxgi1_2.idl
+	$(WIDL) -Idxgitype -I$(IDL_INC_PATH) -h -o $@ $</dxgi1_2.idl
 
 $(DST_DXGI13_H): $(SRC)/d3d11/dxgi1_3.idl $(DST_DXGI12_H)
 	mkdir -p -- "$(PREFIX)/include/"
-	$(WIDL) -Idxgi12 -I../src/d3d11 -I$(IDL_INC_PATH) -h -o $@ $<
+	$(WIDL) -Idxgitype -Idxgi12 -I../src/d3d11 -I$(IDL_INC_PATH) -h -o $@ $<
 
 $(DST_DXGI14_H): $(SRC)/d3d11/dxgi1_4.idl $(DST_DXGI13_H)
 	mkdir -p -- "$(PREFIX)/include/"
-	$(WIDL) -Idxgi12 -I../src/d3d11 -I$(IDL_INC_PATH) -h -o $@ $<
+	$(WIDL) -Idxgitype -Idxgi12 -I../src/d3d11 -I$(IDL_INC_PATH) -h -o $@ $<
 
 $(DST_DXGI15_H): $(SRC)/d3d11/dxgi1_5.idl $(DST_DXGI14_H)
 	mkdir -p -- "$(PREFIX)/include/"
-	$(WIDL) -Idxgi12 -I../src/d3d11 -I$(IDL_INC_PATH) -h -o $@ $<
+	$(WIDL) -Idxgitype -Idxgi12 -I../src/d3d11 -I$(IDL_INC_PATH) -h -o $@ $<
 
 $(DST_DXGI16_H): $(SRC)/d3d11/dxgi1_6.idl $(DST_DXGI15_H)
 	mkdir -p -- "$(PREFIX)/include/"
-	$(WIDL) -Idxgi12 -I../src/d3d11 -I$(IDL_INC_PATH) -h -o $@ $<
+	$(WIDL) -Idxgitype -Idxgi12 -I../src/d3d11 -I$(IDL_INC_PATH) -h -o $@ $<
 
-.dxgitype: $(DST_DXGITYPE_H)
+.dxgitype: $(DST_DXGITYPE_H) $(DST_DXGIFORMAT_H) $(DST_DXGICOMMON_H)
 	touch $@
 
 .dxgi: .dxgitype $(DST_DXGI_H)
-- 
2.14.2



More information about the vlc-devel mailing list