[vlc-devel] [PATCH] contrib: d3d11: add missing SwapChain flags
Steve Lhomme
robux4 at videolabs.io
Tue Oct 24 14:02:24 CEST 2017
---
contrib/src/d3d11/SHA512SUMS | 1 +
contrib/src/d3d11/dxgi.patch | 27 +++++++++++++++++++++++++++
contrib/src/d3d11/rules.mak | 23 ++++++++++++++++++++---
3 files changed, 48 insertions(+), 3 deletions(-)
create mode 100644 contrib/src/d3d11/dxgi.patch
diff --git a/contrib/src/d3d11/SHA512SUMS b/contrib/src/d3d11/SHA512SUMS
index 04c5eafa93..2599601903 100644
--- a/contrib/src/d3d11/SHA512SUMS
+++ b/contrib/src/d3d11/SHA512SUMS
@@ -1,4 +1,5 @@
0d97a004acd9d99d685aef6ae3c41b9951b41170d197173838ad2dbad4db309debcc2dd6ab2cfaa849ab9ca9841ae80232739b113b3e72c35ec8a481066acff5 d3d11.idl
04b208ddf9c91f923d262ae68a5fb0588a3ef1a39ea450eaac9031e021bd5efdc7b30e3fb3e589b07bc88e41f8861caeb56934a2fa6cbf2efb7404f5f3453b70 dxgidebug.idl
+958d031b5a681318095ed17892b4a9bd2751dd57328f846ba2bb1a48130021fd32e7647d5051afb0b4d5bee24b722713788b53d5d07fdb6c7a0a5853a83b8398 dxgi.idl
1bee79fcaf5db6e53510f49fb40009fe6291ffafe47e1aea46ae0068afd001b405b0d970a55af63e475fbb18108e1ca0f91d86a18b6598b922c454ed082e8941 dxgi1_2.idl
3f24632a71c96498f3432ed55ebdbe0a90e00c86ff88e4a41d1d04fdda14532aeff7799401803a03c6f69b3a07930d3f190211accef4ca199a21b3671acdcc45 dxgitype.h
diff --git a/contrib/src/d3d11/dxgi.patch b/contrib/src/d3d11/dxgi.patch
new file mode 100644
index 0000000000..24dfeacc03
--- /dev/null
+++ b/contrib/src/d3d11/dxgi.patch
@@ -0,0 +1,27 @@
+--- tarballs/dxgi.idl.orig
++++ tarballs/dxgi.idl
+@@ -99,9 +99,18 @@ typedef struct DXGI_ADAPTER_DESC {
+ } DXGI_ADAPTER_DESC;
+
+ typedef enum DXGI_SWAP_CHAIN_FLAG {
+- DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1,
+- DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2,
+- DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4
++ DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1,
++ DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2,
++ DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4,
++ DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT = 8,
++ DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER = 16,
++ DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY = 32,
++ DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT = 64,
++ DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER = 128,
++ DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO = 256,
++ DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO = 512,
++ DXGI_SWAP_CHAIN_FLAG_HW_PROTECTED = 1024,
++ DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING = 2048
+ } DXGI_SWAP_CHAIN_FLAG;
+
+ typedef struct DXGI_SWAP_CHAIN_DESC {
+--
+2.10.1.windows.1
+
diff --git a/contrib/src/d3d11/rules.mak b/contrib/src/d3d11/rules.mak
index a91ede4f35..cbe3238ccc 100644
--- a/contrib/src/d3d11/rules.mak
+++ b/contrib/src/d3d11/rules.mak
@@ -8,14 +8,17 @@ IDL_INC_PATH = /`echo $(MSYSTEM) | tr A-Z a-z`/$(BUILD)/include
endif
D3D11_COMMIT_ID := a0cd5afeb60be3be0860e9a203314c10485bb9b8
+DXGI_COMMIT_ID := 4143271759d986807a5cafbe78f67d11ac43892c
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
+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
DST_D3D11_H = $(PREFIX)/include/d3d11.h
DST_DXGIDEBUG_H = $(PREFIX)/include/dxgidebug.h
DST_DXGITYPE_H = $(PREFIX)/include/dxgitype.h
+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
@@ -33,18 +36,25 @@ $(TARBALLS)/d3d11.idl:
$(TARBALLS)/dxgidebug.idl:
(cd $(TARBALLS) && patch -fp1) < $(SRC)/d3d11/dxgidebug.patch
+$(TARBALLS)/dxgi.idl:
+ $(call download,$(DXGI_IDL_URL))
+
$(TARBALLS)/dxgi1_2.idl:
$(call download,$(DXGI12_IDL_URL))
$(TARBALLS)/dxgitype.h:
$(call download,$(DXGITYPE_H_URL))
-.sum-d3d11: $(TARBALLS)/d3d11.idl $(TARBALLS)/dxgidebug.idl $(TARBALLS)/dxgi1_2.idl $(TARBALLS)/dxgitype.h
+.sum-d3d11: $(TARBALLS)/d3d11.idl $(TARBALLS)/dxgidebug.idl $(TARBALLS)/dxgi.idl $(TARBALLS)/dxgi1_2.idl $(TARBALLS)/dxgitype.h
d3d11: .sum-d3d11
mkdir -p $@
cp $(TARBALLS)/d3d11.idl $@ && cd $@ && patch -fp1 < ../$(SRC)/d3d11/processor_format.patch
+dxgi: .sum-d3d11
+ mkdir -p $@
+ cp $(TARBALLS)/dxgi.idl $@ && cd $@ && patch -fp1 < ../$(SRC)/d3d11/dxgi.patch
+
dxgi12: .sum-d3d11
mkdir -p $@
cp $(TARBALLS)/dxgi1_2.idl $@ && cd $@ && patch -fp1 < ../$(SRC)/d3d11/dxgi12.patch
@@ -61,7 +71,11 @@ $(DST_DXGITYPE_H): $(TARBALLS)/dxgitype.h
mkdir -p -- "$(PREFIX)/include/"
cp $(TARBALLS)/dxgitype.h $@
-$(DST_DXGI12_H): dxgi12
+$(DST_DXGI_H): dxgi
+ mkdir -p -- "$(PREFIX)/include/"
+ $(WIDL) -DBOOL=WINBOOL -I$(IDL_INC_PATH) -h -o $@ $</dxgi.idl
+
+$(DST_DXGI12_H): dxgi12 $(DST_DXGI_H)
mkdir -p -- "$(PREFIX)/include/"
$(WIDL) -DBOOL=WINBOOL -I$(IDL_INC_PATH) -h -o $@ $</dxgi1_2.idl
@@ -84,7 +98,10 @@ $(DST_DXGI16_H): $(SRC)/d3d11/dxgi1_6.idl $(DST_DXGI15_H)
.dxgitype: $(DST_DXGITYPE_H)
touch $@
-.dxgi12: .dxgitype $(DST_DXGI12_H)
+.dxgi: .dxgitype $(DST_DXGI_H)
+ touch $@
+
+.dxgi12: .dxgi $(DST_DXGI12_H)
touch $@
.dxgi13: .dxgi12 $(DST_DXGI13_H)
--
2.14.2
More information about the vlc-devel
mailing list