[vlc-commits] contrib: d3d11: add dxgi 1.6 to read IDXGIOutput6

Steve Lhomme git at videolan.org
Mon Oct 9 18:51:31 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Sep 14 15:04:17 2017 +0200| [81b00519b5e72e317024cdc23a77bb2d5a10302d] | committer: Jean-Baptiste Kempf

contrib: d3d11: add dxgi 1.6 to read IDXGIOutput6

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

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

 contrib/src/d3d11/dxgi1_6.idl | 72 +++++++++++++++++++++++++++++++++++++++++++
 contrib/src/d3d11/rules.mak   | 10 +++++-
 2 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/contrib/src/d3d11/dxgi1_6.idl b/contrib/src/d3d11/dxgi1_6.idl
new file mode 100644
index 0000000000..5db720305e
--- /dev/null
+++ b/contrib/src/d3d11/dxgi1_6.idl
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2017 Steve Lhomme
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+import "dxgi1_4.idl";
+
+cpp_quote("/* HACK as widl segfaults with too many imports */")
+cpp_quote("#include <dxgi1_5.h>")
+cpp_quote("#ifndef __dxgi1_5_h__")
+
+[
+    object,
+    local,
+    uuid(80A07424-AB52-42EB-833C-0C42FD282D98)
+]
+interface IDXGIOutput5 : IDXGIOutput4
+{
+    HRESULT DuplicateOutput1(
+        [in]        IUnknown               *pDevice,
+                    UINT                   Flags,
+        [in]        UINT                   SupportedFormatsCount,
+        [in]  const DXGI_FORMAT            *pSupportedFormats,
+        [out]       IDXGIOutputDuplication **ppOutputDuplication
+    );
+}
+
+cpp_quote("#endif /* __dxgi1_5_h__ */")
+
+typedef struct DXGI_OUTPUT_DESC1
+{
+    WCHAR                 DeviceName[32];
+    RECT                  DesktopCoordinates;
+    BOOL                  AttachedToDesktop;
+    DXGI_MODE_ROTATION    Rotation;
+    HMONITOR              Monitor;
+    UINT                  BitsPerColor;
+    DXGI_COLOR_SPACE_TYPE ColorSpace;
+    FLOAT                 RedPrimary[2];
+    FLOAT                 GreenPrimary[2];
+    FLOAT                 BluePrimary[2];
+    FLOAT                 WhitePoint[2];
+    FLOAT                 MinLuminance;
+    FLOAT                 MaxLuminance;
+    FLOAT                 MaxFullFrameLuminance;
+    BOOL                  InternalOutput;
+} DXGI_OUTPUT_DESC1;
+
+[
+    object,
+    local,
+    uuid(068346e8-aaec-4b84-add7-137f513f77a1)
+]
+interface IDXGIOutput6 : IDXGIOutput5
+{
+    HRESULT GetDesc1(
+        [out] DXGI_OUTPUT_DESC1 *pDesc
+    );
+}
diff --git a/contrib/src/d3d11/rules.mak b/contrib/src/d3d11/rules.mak
index fffc59fb95..a91ede4f35 100644
--- a/contrib/src/d3d11/rules.mak
+++ b/contrib/src/d3d11/rules.mak
@@ -20,6 +20,7 @@ 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
 
 
 ifdef HAVE_WIN32
@@ -76,6 +77,10 @@ $(DST_DXGI15_H): $(SRC)/d3d11/dxgi1_5.idl $(DST_DXGI14_H)
 	mkdir -p -- "$(PREFIX)/include/"
 	$(WIDL) -DBOOL=WINBOOL -Idxgi12 -I$(IDL_INC_PATH) -h -o $@ $<
 
+$(DST_DXGI16_H): $(SRC)/d3d11/dxgi1_6.idl $(DST_DXGI15_H)
+	mkdir -p -- "$(PREFIX)/include/"
+	$(WIDL) -DBOOL=WINBOOL -Idxgi12 -I$(IDL_INC_PATH) -h -o $@ $<
+
 .dxgitype: $(DST_DXGITYPE_H)
 	touch $@
 
@@ -91,5 +96,8 @@ $(DST_DXGI15_H): $(SRC)/d3d11/dxgi1_5.idl $(DST_DXGI14_H)
 .dxgi15: .dxgi14 $(DST_DXGI15_H)
 	touch $@
 
-.d3d11: $(DST_D3D11_H) $(DST_DXGIDEBUG_H) .dxgi15
+.dxgi16: .dxgi15 $(DST_DXGI16_H)
+	touch $@
+
+.d3d11: $(DST_D3D11_H) $(DST_DXGIDEBUG_H) .dxgi16
 	touch $@



More information about the vlc-commits mailing list