[vlc-commits] d3d11: patch dxgitype.h to add DXGI_COLOR_SPACE_TYPE

Steve Lhomme git at videolan.org
Sun Apr 17 10:39:56 CEST 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Sat Apr 16 18:47:31 2016 +0300| [85a450edf396b81e11ae14c29f41b7557908eb7a] | committer: Jean-Baptiste Kempf

d3d11: patch dxgitype.h to add DXGI_COLOR_SPACE_TYPE

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=85a450edf396b81e11ae14c29f41b7557908eb7a
---

 contrib/src/d3d11/SHA512SUMS     |    1 +
 contrib/src/d3d11/dxgitype.patch |   23 +++++++++++++++++++++++
 contrib/src/d3d11/rules.mak      |   17 +++++++++++++++--
 3 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/contrib/src/d3d11/SHA512SUMS b/contrib/src/d3d11/SHA512SUMS
index e9eca45..04c5eaf 100644
--- a/contrib/src/d3d11/SHA512SUMS
+++ b/contrib/src/d3d11/SHA512SUMS
@@ -1,3 +1,4 @@
 0d97a004acd9d99d685aef6ae3c41b9951b41170d197173838ad2dbad4db309debcc2dd6ab2cfaa849ab9ca9841ae80232739b113b3e72c35ec8a481066acff5  d3d11.idl
 04b208ddf9c91f923d262ae68a5fb0588a3ef1a39ea450eaac9031e021bd5efdc7b30e3fb3e589b07bc88e41f8861caeb56934a2fa6cbf2efb7404f5f3453b70  dxgidebug.idl
 1bee79fcaf5db6e53510f49fb40009fe6291ffafe47e1aea46ae0068afd001b405b0d970a55af63e475fbb18108e1ca0f91d86a18b6598b922c454ed082e8941  dxgi1_2.idl
+3f24632a71c96498f3432ed55ebdbe0a90e00c86ff88e4a41d1d04fdda14532aeff7799401803a03c6f69b3a07930d3f190211accef4ca199a21b3671acdcc45  dxgitype.h
diff --git a/contrib/src/d3d11/dxgitype.patch b/contrib/src/d3d11/dxgitype.patch
new file mode 100644
index 0000000..5165cb9
--- /dev/null
+++ b/contrib/src/d3d11/dxgitype.patch
@@ -0,0 +1,23 @@
+--- include/dxgitype.h.new	2015-09-03 05:13:15.000000000 +0300
++++ include/dxgitype.h	2016-04-16 14:52:29.751438300 +0300
+@@ -93,4 +93,20 @@ 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_CUSTOM                         = 0xFFFFFFFF,
++} DXGI_COLOR_SPACE_TYPE;
++
+ #endif
diff --git a/contrib/src/d3d11/rules.mak b/contrib/src/d3d11/rules.mak
index 1fd834d..21570ae 100644
--- a/contrib/src/d3d11/rules.mak
+++ b/contrib/src/d3d11/rules.mak
@@ -9,16 +9,19 @@ endif
 
 D3D11_COMMIT_ID := a0cd5afeb60be3be0860e9a203314c10485bb9b8
 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
 DST_D3D11_H = $(PREFIX)/include/d3d11.h
 DST_DXGIDEBUG_H = $(PREFIX)/include/dxgidebug.h
+DST_DXGITYPE_H = $(PREFIX)/include/dxgitype.h
 DST_DXGI12_H = $(PREFIX)/include/dxgi1_2.h
 DST_DXGI13_H = $(PREFIX)/include/dxgi1_3.h
 
 
 ifdef HAVE_WIN32
-PKGS += d3d11 dxgi13
+PKGS += d3d11 dxgi13 dxgitype
 endif
 
 $(TARBALLS)/d3d11.idl:
@@ -30,7 +33,10 @@ $(TARBALLS)/dxgidebug.idl:
 $(TARBALLS)/dxgi1_2.idl:
 	$(call download,$(DXGI12_IDL_URL))
 
-.sum-d3d11: $(TARBALLS)/d3d11.idl $(TARBALLS)/dxgidebug.idl $(TARBALLS)/dxgi1_2.idl
+$(TARBALLS)/dxgitype.h:
+	$(call download,$(DXGITYPE_H_URL))
+
+.sum-d3d11: $(TARBALLS)/d3d11.idl $(TARBALLS)/dxgidebug.idl $(TARBALLS)/dxgi1_2.idl $(TARBALLS)/dxgitype.h
 
 d3d11: .sum-d3d11
 	mkdir -p $@
@@ -48,6 +54,10 @@ $(DST_DXGIDEBUG_H): $(TARBALLS)/dxgidebug.idl
 	mkdir -p -- "$(PREFIX)/include/"
 	$(WIDL) -DBOOL=WINBOOL -I$(IDL_INC_PATH) -h -o $@ $<
 
+$(DST_DXGITYPE_H): $(TARBALLS)/dxgitype.h
+	mkdir -p -- "$(PREFIX)/include/"
+	cp $(TARBALLS)/dxgitype.h $@ && cd "$(PREFIX)/include/" && patch -fp1 < ../$(SRC)/d3d11/dxgitype.patch
+
 $(DST_DXGI12_H): dxgi12
 	mkdir -p -- "$(PREFIX)/include/"
 	$(WIDL) -DBOOL=WINBOOL -I$(IDL_INC_PATH) -h -o $@ $</dxgi1_2.idl
@@ -59,5 +69,8 @@ $(DST_DXGI13_H): $(SRC)/d3d11/dxgi1_3.idl $(DST_DXGI12_H)
 .dxgi13: $(DST_DXGI13_H)
 	touch $@
 
+.dxgitype: $(DST_DXGITYPE_H)
+	touch $@
+
 .d3d11: $(DST_D3D11_H) $(DST_DXGIDEBUG_H) $(DST_DXGI12_H) dxgi12
 	touch $@



More information about the vlc-commits mailing list