Prechádzať zdrojové kódy

Update to bgfx rev fa60f67.

woollybah 6 rokov pred
rodič
commit
d1cce900ce
71 zmenil súbory, kde vykonal 19017 pridanie a 5357 odobranie
  1. 8 8
      bgfx.mod/bgfx.bmx
  2. 0 1
      bgfx.mod/bgfx/.appveyor.yml
  3. 5 5
      bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d11.h
  4. 6028 439
      bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d12.h
  5. 2539 0
      bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d12_1.h
  6. 675 32
      bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d12sdklayers.h
  7. 2452 0
      bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d12video.h
  8. 24 0
      bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d9types.h
  9. 123 3
      bgfx.mod/bgfx/3rdparty/dxsdk/include/d3dcommon.h
  10. 34 4
      bgfx.mod/bgfx/3rdparty/dxsdk/include/d3dcompiler.h
  11. 5 2
      bgfx.mod/bgfx/3rdparty/dxsdk/include/d3dx12.h
  12. 9 0
      bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_2.h
  13. 13 0
      bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_3.h
  14. 5 0
      bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_4.h
  15. 12 1
      bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_5.h
  16. 796 2
      bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_6.h
  17. 1945 0
      bgfx.mod/bgfx/3rdparty/dxsdk/include/dxva2api.h
  18. 24 0
      bgfx.mod/bgfx/3rdparty/dxsdk/include/winapifamily.h
  19. 0 1416
      bgfx.mod/bgfx/3rdparty/openvr/openvr_capi.h
  20. 680 0
      bgfx.mod/bgfx/3rdparty/renderdoc/renderdoc_app.h
  21. 57 8
      bgfx.mod/bgfx/README.md
  22. 195 134
      bgfx.mod/bgfx/include/bgfx/bgfx.h
  23. 65 48
      bgfx.mod/bgfx/include/bgfx/c99/bgfx.h
  24. 18 27
      bgfx.mod/bgfx/include/bgfx/c99/platform.h
  25. 191 147
      bgfx.mod/bgfx/include/bgfx/defines.h
  26. 1 15
      bgfx.mod/bgfx/include/bgfx/platform.h
  27. 3 25
      bgfx.mod/bgfx/makefile
  28. 0 3
      bgfx.mod/bgfx/src/amalgamated.cpp
  29. 468 136
      bgfx.mod/bgfx/src/bgfx.cpp
  30. 72 49
      bgfx.mod/bgfx/src/bgfx_compute.sh
  31. 293 241
      bgfx.mod/bgfx/src/bgfx_p.h
  32. 79 5
      bgfx.mod/bgfx/src/bgfx_shader.sh
  33. 4 5
      bgfx.mod/bgfx/src/config.h
  34. 2 2
      bgfx.mod/bgfx/src/debug_renderdoc.cpp
  35. 224 174
      bgfx.mod/bgfx/src/dxgi.cpp
  36. 8 1
      bgfx.mod/bgfx/src/dxgi.h
  37. 3 3
      bgfx.mod/bgfx/src/glcontext_egl.cpp
  38. 53 31
      bgfx.mod/bgfx/src/glcontext_glx.cpp
  39. 2 0
      bgfx.mod/bgfx/src/glcontext_glx.h
  40. 2 0
      bgfx.mod/bgfx/src/glimports.h
  41. 0 218
      bgfx.mod/bgfx/src/hmd.cpp
  42. 0 102
      bgfx.mod/bgfx/src/hmd.h
  43. 0 95
      bgfx.mod/bgfx/src/hmd_openvr.cpp
  44. 0 18
      bgfx.mod/bgfx/src/hmd_openvr.h
  45. 0 210
      bgfx.mod/bgfx/src/hmd_ovr.cpp
  46. 0 70
      bgfx.mod/bgfx/src/hmd_ovr.h
  47. 96 31
      bgfx.mod/bgfx/src/nvapi.cpp
  48. 24 1
      bgfx.mod/bgfx/src/nvapi.h
  49. 7 7
      bgfx.mod/bgfx/src/renderer.h
  50. 46 2
      bgfx.mod/bgfx/src/renderer_d3d.h
  51. 297 276
      bgfx.mod/bgfx/src/renderer_d3d11.cpp
  52. 6 6
      bgfx.mod/bgfx/src/renderer_d3d11.h
  53. 378 285
      bgfx.mod/bgfx/src/renderer_d3d12.cpp
  54. 4 4
      bgfx.mod/bgfx/src/renderer_d3d12.h
  55. 96 70
      bgfx.mod/bgfx/src/renderer_d3d9.cpp
  56. 6 6
      bgfx.mod/bgfx/src/renderer_d3d9.h
  57. 147 439
      bgfx.mod/bgfx/src/renderer_gl.cpp
  58. 76 8
      bgfx.mod/bgfx/src/renderer_gl.h
  59. 36 5
      bgfx.mod/bgfx/src/renderer_mtl.h
  60. 366 295
      bgfx.mod/bgfx/src/renderer_mtl.mm
  61. 26 10
      bgfx.mod/bgfx/src/renderer_noop.cpp
  62. 102 74
      bgfx.mod/bgfx/src/renderer_vk.cpp
  63. 14 5
      bgfx.mod/bgfx/src/shader.cpp
  64. 3 3
      bgfx.mod/bgfx/src/shader_dxbc.cpp
  65. 3 2
      bgfx.mod/bgfx/src/shader_spirv.h
  66. 47 9
      bgfx.mod/bgfx/src/topology.cpp
  67. 23 53
      bgfx.mod/bgfx/src/vertexdecl.cpp
  68. 2 2
      bgfx.mod/bgfx/src/vertexdecl.h
  69. 88 78
      bgfx.mod/common.bmx
  70. 1 1
      bgfx.mod/examples/example_01.bmx
  71. 6 5
      bgfx.mod/glue.c

+ 8 - 8
bgfx.mod/bgfx.bmx

@@ -38,16 +38,16 @@ ModuleInfo "History: 1.00"
 ModuleInfo "History: Initial Release."
 
 ?linuxx86
-ModuleInfo "CC_OPTS: -mfpmath=sse -msse2 -std=c++0x"
+ModuleInfo "CC_OPTS: -mfpmath=sse -msse2 -std=c++14"
 ?linuxx64
-ModuleInfo "CC_OPTS: -mfpmath=sse -msse2 -std=c++0x"
+ModuleInfo "CC_OPTS: -mfpmath=sse -msse2 -std=c++14"
 ?macos
 ModuleInfo "CC_OPTS: -msse2"
 ?win32
-ModuleInfo "CC_OPTS: -mfpmath=sse -msse2 -std=c++0x"
+ModuleInfo "CC_OPTS: -mfpmath=sse -msse2 -std=c++14"
 
 ?raspberrypi
-ModuleInfo "CC_OPTS: -std=c++0x"
+ModuleInfo "CC_OPTS: -std=c++14"
 ?
 
 ModuleInfo "CC_OPTS: -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS"
@@ -73,8 +73,8 @@ Type TBGFX
 	bbdoc: Resets graphic settings and back-buffer size.
 	about: This call doesn't actually change window size, it just resizes back-buffer. Windowing code has to change window size.
 	End Rem
-	Function Reset(width:Int, height:Int, flags:Int = BGFX_RESET_NONE)
-		bmx_bgfx_reset(width, height, flags)
+	Function Reset(width:Int, height:Int, flags:Int = BGFX_RESET_NONE, format:Int = BGFX_TEXTURE_FORMAT_COUNT)
+		bmx_bgfx_reset(width, height, flags, format)
 	End Function
 
 '	Rem
@@ -102,8 +102,8 @@ Type TBGFX
 		bmx_bgfx_dbg_text_clear(attr, small)
 	End Function
 	
-	Function DebugTextPrint(x:Short, y:Short, attr:Byte, text:String)
-		bmx_bgfx_dbg_text_printf(x, y, attr, text)
+	Function DebugTextPrint(x:Short, y:Short, attr:Byte, Text:String)
+		bmx_bgfx_dbg_text_printf(x, y, attr, Text)
 	End Function
 	
 	Function DebugTextImage(x:Short, y:Short, width:Short, height:Short, data:Byte Ptr, pitch:Short)

+ 0 - 1
bgfx.mod/bgfx/.appveyor.yml

@@ -5,7 +5,6 @@ os:
 
 environment:
   matrix:
-  - TOOLSET: vs2015
   - TOOLSET: vs2017
 
 configuration:

+ 5 - 5
bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d11.h

@@ -14400,11 +14400,11 @@ enum D3D11_CREATE_DEVICE_FLAG
 #if !defined( D3D11_IGNORE_SDK_LAYERS ) 
 #include "d3d11sdklayers.h" 
 #endif 
-#include "d3d10_1.h"
-#include "d3d10shader.h" 
-#include "d3d10_1shader.h" 
-#include "d3d10misc.h" 
-#include "d3d10effect.h" 
+// BK - #include "d3d10_1.h"
+// BK - #include "d3d10shader.h"
+// BK - #include "d3d10_1shader.h"
+// BK - #include "d3d10misc.h"
+// BK - #include "d3d10effect.h"
 
 ///////////////////////////////////////////////////////////////////////////
 // D3D11CreateDevice

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 6028 - 439
bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d12.h


+ 2539 - 0
bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d12_1.h

@@ -0,0 +1,2539 @@
+/*-------------------------------------------------------------------------------------
+ *
+ * Copyright (c) Microsoft Corporation
+ *
+ *-------------------------------------------------------------------------------------*/
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 8.01.0622 */
+
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif /* __RPCNDR_H_VERSION__ */
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __d3d12_1_h__
+#define __d3d12_1_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+#ifndef __ID3D12CryptoSession_FWD_DEFINED__
+#define __ID3D12CryptoSession_FWD_DEFINED__
+typedef interface ID3D12CryptoSession ID3D12CryptoSession;
+
+#endif 	/* __ID3D12CryptoSession_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12CryptoSessionPolicy_FWD_DEFINED__
+#define __ID3D12CryptoSessionPolicy_FWD_DEFINED__
+typedef interface ID3D12CryptoSessionPolicy ID3D12CryptoSessionPolicy;
+
+#endif 	/* __ID3D12CryptoSessionPolicy_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12ContentProtectionDevice_FWD_DEFINED__
+#define __ID3D12ContentProtectionDevice_FWD_DEFINED__
+typedef interface ID3D12ContentProtectionDevice ID3D12ContentProtectionDevice;
+
+#endif 	/* __ID3D12ContentProtectionDevice_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12VideoDecodeCommandList2_FWD_DEFINED__
+#define __ID3D12VideoDecodeCommandList2_FWD_DEFINED__
+typedef interface ID3D12VideoDecodeCommandList2 ID3D12VideoDecodeCommandList2;
+
+#endif 	/* __ID3D12VideoDecodeCommandList2_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12VideoProcessCommandList2_FWD_DEFINED__
+#define __ID3D12VideoProcessCommandList2_FWD_DEFINED__
+typedef interface ID3D12VideoProcessCommandList2 ID3D12VideoProcessCommandList2;
+
+#endif 	/* __ID3D12VideoProcessCommandList2_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12StateObjectPrototype_FWD_DEFINED__
+#define __ID3D12StateObjectPrototype_FWD_DEFINED__
+typedef interface ID3D12StateObjectPrototype ID3D12StateObjectPrototype;
+
+#endif 	/* __ID3D12StateObjectPrototype_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12StateObjectPropertiesPrototype_FWD_DEFINED__
+#define __ID3D12StateObjectPropertiesPrototype_FWD_DEFINED__
+typedef interface ID3D12StateObjectPropertiesPrototype ID3D12StateObjectPropertiesPrototype;
+
+#endif 	/* __ID3D12StateObjectPropertiesPrototype_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12DeviceRaytracingPrototype_FWD_DEFINED__
+#define __ID3D12DeviceRaytracingPrototype_FWD_DEFINED__
+typedef interface ID3D12DeviceRaytracingPrototype ID3D12DeviceRaytracingPrototype;
+
+#endif 	/* __ID3D12DeviceRaytracingPrototype_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12CommandListRaytracingPrototype_FWD_DEFINED__
+#define __ID3D12CommandListRaytracingPrototype_FWD_DEFINED__
+typedef interface ID3D12CommandListRaytracingPrototype ID3D12CommandListRaytracingPrototype;
+
+#endif 	/* __ID3D12CommandListRaytracingPrototype_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12DeviceMetaCommand_FWD_DEFINED__
+#define __ID3D12DeviceMetaCommand_FWD_DEFINED__
+typedef interface ID3D12DeviceMetaCommand ID3D12DeviceMetaCommand;
+
+#endif 	/* __ID3D12DeviceMetaCommand_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12MetaCommand_FWD_DEFINED__
+#define __ID3D12MetaCommand_FWD_DEFINED__
+typedef interface ID3D12MetaCommand ID3D12MetaCommand;
+
+#endif 	/* __ID3D12MetaCommand_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12CommandListMetaCommand_FWD_DEFINED__
+#define __ID3D12CommandListMetaCommand_FWD_DEFINED__
+typedef interface ID3D12CommandListMetaCommand ID3D12CommandListMetaCommand;
+
+#endif 	/* __ID3D12CommandListMetaCommand_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "oaidl.h"
+#include "ocidl.h"
+#include "dxgicommon.h"
+#include "d3dcommon.h"
+#include "d3d12.h"
+#include "d3d12video.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_d3d12_1_0000_0000 */
+/* [local] */ 
+
+#include <winapifamily.h>
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+#define D3D12_FEATURE_VIDEO_DECODE_BITSTREAM_ENCRYPTION_SCHEMES       static_cast<D3D12_FEATURE_VIDEO>(4)
+#define D3D12_FEATURE_VIDEO_DECODE_BITSTREAM_ENCRYPTION_SCHEME_COUNT  static_cast<D3D12_FEATURE_VIDEO>(12)
+#define D3D12_FEATURE_VIDEO_CRYPTO_SESSION_SUPPORT                    static_cast<D3D12_FEATURE_VIDEO>(13)
+#define D3D12_FEATURE_VIDEO_CONTENT_PROTECTION_SYSTEM_COUNT           static_cast<D3D12_FEATURE_VIDEO>(14)
+#define D3D12_FEATURE_VIDEO_CONTENT_PROTECTION_SYSTEM_SUPPORT         static_cast<D3D12_FEATURE_VIDEO>(15)
+#define D3D12_FEATURE_VIDEO_CRYPTO_SESSION_TRANSFORM_SUPPORT          static_cast<D3D12_FEATURE_VIDEO>(16)
+#define D3D12_BITSTREAM_ENCRYPTION_TYPE_CENC_AES_CTR_128              static_cast<D3D12_BITSTREAM_ENCRYPTION_TYPE>(1)
+typedef struct D3D12_FEATURE_DATA_VIDEO_CONTENT_PROTECTION_SYSTEM_COUNT
+    {
+    UINT NodeIndex;
+    UINT ContentProtectionSystemCount;
+    } 	D3D12_FEATURE_DATA_VIDEO_CONTENT_PROTECTION_SYSTEM_COUNT;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_CONTENT_PROTECTION_SYSTEM_SUPPORT
+    {
+    UINT NodeIndex;
+    UINT ContentProtectionSystemCount;
+    GUID *pContentProtectionSystems;
+    } 	D3D12_FEATURE_DATA_VIDEO_CONTENT_PROTECTION_SYSTEM_SUPPORT;
+
+typedef 
+enum D3D12_CRYPTO_SESSION_SUPPORT_FLAGS
+    {
+        D3D12_CRYPTO_SESSION_SUPPORT_FLAG_NONE	= 0,
+        D3D12_CRYPTO_SESSION_SUPPORT_FLAG_SUPPORTED	= 0x1,
+        D3D12_CRYPTO_SESSION_SUPPORT_FLAG_HEADER_DECRYPTION_REQUIRED	= 0x2,
+        D3D12_CRYPTO_SESSION_SUPPORT_FLAG_INDEPENDENT_DECRYPTION_REQUIRED	= 0x4,
+        D3D12_CRYPTO_SESSION_SUPPORT_FLAG_TRANSCRYPTION_REQUIRED	= 0x8
+    } 	D3D12_CRYPTO_SESSION_SUPPORT_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS( D3D12_CRYPTO_SESSION_SUPPORT_FLAGS );
+typedef 
+enum D3D12_CRYPTO_SESSION_FLAGS
+    {
+        D3D12_CRYPTO_SESSION_FLAG_NONE	= 0,
+        D3D12_CRYPTO_SESSION_FLAG_HARDWARE	= 0x1
+    } 	D3D12_CRYPTO_SESSION_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS( D3D12_CRYPTO_SESSION_FLAGS );
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_BITSTREAM_ENCRYPTION_SCHEME_COUNT
+    {
+    UINT NodeIndex;
+    GUID DecodeProfile;
+    UINT EncryptionSchemeCount;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODE_BITSTREAM_ENCRYPTION_SCHEME_COUNT;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_BITSTREAM_ENCRYPTION_SCHEMES
+    {
+    UINT NodeIndex;
+    GUID DecodeProfile;
+    UINT EncryptionSchemeCount;
+    _Field_size_full_(EncryptionSchemeCount)  D3D12_BITSTREAM_ENCRYPTION_TYPE *pEncryptionSchemes;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODE_BITSTREAM_ENCRYPTION_SCHEMES;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_CRYPTO_SESSION_SUPPORT
+    {
+    UINT NodeIndex;
+    GUID DecodeProfile;
+    GUID ContentProtectionSystem;
+    D3D12_CRYPTO_SESSION_FLAGS Flags;
+    D3D12_BITSTREAM_ENCRYPTION_TYPE BitstreamEncryption;
+    UINT KeyBaseDataSize;
+    D3D12_CRYPTO_SESSION_SUPPORT_FLAGS Support;
+    } 	D3D12_FEATURE_DATA_VIDEO_CRYPTO_SESSION_SUPPORT;
+
+typedef struct D3D12_CRYPTO_SESSION_DESC
+    {
+    UINT NodeMask;
+    GUID DecodeProfile;
+    GUID ContentProtectionSystem;
+    D3D12_BITSTREAM_ENCRYPTION_TYPE BitstreamEncryption;
+    D3D12_CRYPTO_SESSION_FLAGS Flags;
+    } 	D3D12_CRYPTO_SESSION_DESC;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0000_v0_0_s_ifspec;
+
+#ifndef __ID3D12CryptoSession_INTERFACE_DEFINED__
+#define __ID3D12CryptoSession_INTERFACE_DEFINED__
+
+/* interface ID3D12CryptoSession */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12CryptoSession;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("FC7C6C9D-C27D-4904-835D-A5F2096EC65F")
+    ID3D12CryptoSession : public ID3D12ProtectedSession
+    {
+    public:
+        virtual D3D12_CRYPTO_SESSION_DESC STDMETHODCALLTYPE GetDesc( void) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetKeyBaseData( 
+            UINT KeyInputDataSize,
+            _In_reads_bytes_( KeyInputDataSize )  const void *pKeyInputData,
+            UINT KeyBaseDataSize,
+            _Out_writes_bytes_( KeyBaseDataSize )  void *pKeyBaseData) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12CryptoSessionVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12CryptoSession * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12CryptoSession * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12CryptoSession * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12CryptoSession * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12CryptoSession * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12CryptoSession * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12CryptoSession * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12CryptoSession * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetStatusFence )( 
+            ID3D12CryptoSession * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppFence);
+        
+        D3D12_PROTECTED_SESSION_STATUS ( STDMETHODCALLTYPE *GetSessionStatus )( 
+            ID3D12CryptoSession * This);
+        
+        D3D12_CRYPTO_SESSION_DESC ( STDMETHODCALLTYPE *GetDesc )( 
+            ID3D12CryptoSession * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetKeyBaseData )( 
+            ID3D12CryptoSession * This,
+            UINT KeyInputDataSize,
+            _In_reads_bytes_( KeyInputDataSize )  const void *pKeyInputData,
+            UINT KeyBaseDataSize,
+            _Out_writes_bytes_( KeyBaseDataSize )  void *pKeyBaseData);
+        
+        END_INTERFACE
+    } ID3D12CryptoSessionVtbl;
+
+    interface ID3D12CryptoSession
+    {
+        CONST_VTBL struct ID3D12CryptoSessionVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12CryptoSession_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12CryptoSession_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12CryptoSession_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12CryptoSession_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12CryptoSession_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12CryptoSession_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12CryptoSession_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12CryptoSession_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+#define ID3D12CryptoSession_GetStatusFence(This,riid,ppFence)	\
+    ( (This)->lpVtbl -> GetStatusFence(This,riid,ppFence) ) 
+
+#define ID3D12CryptoSession_GetSessionStatus(This)	\
+    ( (This)->lpVtbl -> GetSessionStatus(This) ) 
+
+
+#define ID3D12CryptoSession_GetDesc(This)	\
+    ( (This)->lpVtbl -> GetDesc(This) ) 
+
+#define ID3D12CryptoSession_GetKeyBaseData(This,KeyInputDataSize,pKeyInputData,KeyBaseDataSize,pKeyBaseData)	\
+    ( (This)->lpVtbl -> GetKeyBaseData(This,KeyInputDataSize,pKeyInputData,KeyBaseDataSize,pKeyBaseData) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12CryptoSession_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12CryptoSessionPolicy_INTERFACE_DEFINED__
+#define __ID3D12CryptoSessionPolicy_INTERFACE_DEFINED__
+
+/* interface ID3D12CryptoSessionPolicy */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12CryptoSessionPolicy;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("69FE3108-01A4-4AC3-AB91-F51E377A62AC")
+    ID3D12CryptoSessionPolicy : public ID3D12DeviceChild
+    {
+    public:
+        virtual UINT STDMETHODCALLTYPE GetKeyInfoSize( void) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetKeyInfo( 
+            _Out_writes_bytes_( KeyInfoDataSize )  void *pKeyInfo,
+            UINT KeyInfoDataSize) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetCryptoSession( 
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppCryptoSession) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12CryptoSessionPolicyVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12CryptoSessionPolicy * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12CryptoSessionPolicy * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12CryptoSessionPolicy * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12CryptoSessionPolicy * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12CryptoSessionPolicy * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12CryptoSessionPolicy * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12CryptoSessionPolicy * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12CryptoSessionPolicy * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        UINT ( STDMETHODCALLTYPE *GetKeyInfoSize )( 
+            ID3D12CryptoSessionPolicy * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetKeyInfo )( 
+            ID3D12CryptoSessionPolicy * This,
+            _Out_writes_bytes_( KeyInfoDataSize )  void *pKeyInfo,
+            UINT KeyInfoDataSize);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCryptoSession )( 
+            ID3D12CryptoSessionPolicy * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppCryptoSession);
+        
+        END_INTERFACE
+    } ID3D12CryptoSessionPolicyVtbl;
+
+    interface ID3D12CryptoSessionPolicy
+    {
+        CONST_VTBL struct ID3D12CryptoSessionPolicyVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12CryptoSessionPolicy_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12CryptoSessionPolicy_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12CryptoSessionPolicy_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12CryptoSessionPolicy_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12CryptoSessionPolicy_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12CryptoSessionPolicy_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12CryptoSessionPolicy_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12CryptoSessionPolicy_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+#define ID3D12CryptoSessionPolicy_GetKeyInfoSize(This)	\
+    ( (This)->lpVtbl -> GetKeyInfoSize(This) ) 
+
+#define ID3D12CryptoSessionPolicy_GetKeyInfo(This,pKeyInfo,KeyInfoDataSize)	\
+    ( (This)->lpVtbl -> GetKeyInfo(This,pKeyInfo,KeyInfoDataSize) ) 
+
+#define ID3D12CryptoSessionPolicy_GetCryptoSession(This,riid,ppCryptoSession)	\
+    ( (This)->lpVtbl -> GetCryptoSession(This,riid,ppCryptoSession) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12CryptoSessionPolicy_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12_1_0000_0002 */
+/* [local] */ 
+
+typedef 
+enum D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION
+    {
+        D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION_NONE	= 0,
+        D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION_DECRYPT	= 1,
+        D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION_DECRYPT_WITH_HEADER	= 2,
+        D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION_TRANSCRYPT	= 3,
+        D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION_TRANSCRYPT_WITH_HEADER	= 4,
+        D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION_DECRYPT_HEADER	= 5
+    } 	D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION;
+
+typedef 
+enum D3D12_CRYPTO_SESSION_TRANSFORM_SUPPORT_FLAGS
+    {
+        D3D12_CRYPTO_SESSION_TRANSFORM_SUPPORT_FLAG_NONE	= 0,
+        D3D12_CRYPTO_SESSION_TRANSFORM_SUPPORT_FLAG_SUPPORTED	= 0x1
+    } 	D3D12_CRYPTO_SESSION_TRANSFORM_SUPPORT_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS( D3D12_CRYPTO_SESSION_TRANSFORM_SUPPORT_FLAGS );
+typedef struct D3D12_FEATURE_DATA_VIDEO_CRYPTO_SESSION_TRANSFORM_SUPPORT
+    {
+    UINT NodeIndex;
+    GUID DecodeProfile;
+    GUID ContentProtectionSystem;
+    D3D12_CRYPTO_SESSION_FLAGS Flags;
+    D3D12_BITSTREAM_ENCRYPTION_TYPE BitstreamEncryption;
+    D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION Operation;
+    BOOL ProtectedOutputRequired;
+    UINT64 InputAlignment;
+    UINT64 InputPreambleSize;
+    UINT64 OutputAlignment;
+    UINT64 OutputPreambleSize;
+    D3D12_CRYPTO_SESSION_TRANSFORM_SUPPORT_FLAGS Support;
+    } 	D3D12_FEATURE_DATA_VIDEO_CRYPTO_SESSION_TRANSFORM_SUPPORT;
+
+typedef struct D3D12_CRYPTO_SESSION_TRANSFORM_DECRYPT_HEADER_INPUT_ARGUMENTS
+    {
+    BOOL Enable;
+    _Field_size_bytes_full_(SliceHeadersSize)  const void *pSliceHeaders;
+    UINT64 SliceHeadersSize;
+    _Field_size_full_(SliceHeaderCount)  const DWORD *pSliceHeadersOffsets;
+    UINT64 SliceHeaderCount;
+    _Field_size_bytes_full_(ContextSize)  const void *pContext;
+    UINT64 ContextSize;
+    } 	D3D12_CRYPTO_SESSION_TRANSFORM_DECRYPT_HEADER_INPUT_ARGUMENTS;
+
+typedef struct D3D12_CRYPTO_SESSION_TRANSFORM_INPUT_ARGUMENTS
+    {
+    ID3D12CryptoSessionPolicy *pCryptoSessionPolicy;
+    ID3D12Resource *pBuffer;
+    UINT64 Size;
+    UINT64 Offset;
+    _Field_size_bytes_full_(IVSize)  const void *pIV;
+    UINT IVSize;
+    UINT SubSampleMappingCount;
+    _Field_size_bytes_full_(SubSampleMappingCount)  const void *pSubSampleMappingBlock;
+    UINT64 ContextSize;
+    _Field_size_bytes_full_(ContextSize)  const void *pContext;
+    D3D12_CRYPTO_SESSION_TRANSFORM_DECRYPT_HEADER_INPUT_ARGUMENTS EncryptedHeader;
+    } 	D3D12_CRYPTO_SESSION_TRANSFORM_INPUT_ARGUMENTS;
+
+typedef struct D3D12_CRYPTO_SESSION_TRANSFORM_DECRYPT_OUTPUT_ARGUMENTS
+    {
+    BOOL Enable;
+    ID3D12ProtectedSession *pProtectedSession;
+    ID3D12Resource *pBuffer;
+    UINT64 Size;
+    UINT64 Offset;
+    } 	D3D12_CRYPTO_SESSION_TRANSFORM_DECRYPT_OUTPUT_ARGUMENTS;
+
+typedef struct D3D12_CRYPTO_SESSION_TRANSFORM_TRANSCRYPT_OUTPUT_ARGUMENTS
+    {
+    BOOL Enable;
+    _Field_size_bytes_full_(IVSize)  void *pIV;
+    UINT IVSize;
+    } 	D3D12_CRYPTO_SESSION_TRANSFORM_TRANSCRYPT_OUTPUT_ARGUMENTS;
+
+typedef struct D3D12_CRYPTO_SESSION_TRANSFORM_DECRYPT_HEADER_OUTPUT_ARGUMENTS
+    {
+    BOOL Enable;
+    UINT64 SliceHeadersSize;
+    _Field_size_bytes_full_(SliceHeadersSize)  const void *pSliceHeaders;
+    UINT64 ContextSize;
+    _Field_size_bytes_full_(ContextSize)  const void *pContext;
+    } 	D3D12_CRYPTO_SESSION_TRANSFORM_DECRYPT_HEADER_OUTPUT_ARGUMENTS;
+
+typedef struct D3D12_CRYPTO_SESSION_TRANSFORM_OUTPUT_ARGUMENTS
+    {
+    D3D12_CRYPTO_SESSION_TRANSFORM_DECRYPT_OUTPUT_ARGUMENTS Decrypt;
+    D3D12_CRYPTO_SESSION_TRANSFORM_TRANSCRYPT_OUTPUT_ARGUMENTS Transcrypt;
+    D3D12_CRYPTO_SESSION_TRANSFORM_DECRYPT_HEADER_OUTPUT_ARGUMENTS ClearHeader;
+    } 	D3D12_CRYPTO_SESSION_TRANSFORM_OUTPUT_ARGUMENTS;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0002_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0002_v0_0_s_ifspec;
+
+#ifndef __ID3D12ContentProtectionDevice_INTERFACE_DEFINED__
+#define __ID3D12ContentProtectionDevice_INTERFACE_DEFINED__
+
+/* interface ID3D12ContentProtectionDevice */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12ContentProtectionDevice;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("59975f53-bf5f-42f2-b84f-5e347c1e3d43")
+    ID3D12ContentProtectionDevice : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE CreateCryptoSession( 
+            _In_  const D3D12_CRYPTO_SESSION_DESC *pDesc,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppSession) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE CreateCryptoSessionPolicy( 
+            _In_reads_bytes_( KeyInfoSize )  const void *pKeyInfo,
+            UINT KeyInfoSize,
+            _In_  ID3D12CryptoSession *pCryptoSession,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppCryptoSessionPolicy) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE TransformEncryptedData( 
+            D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION Operation,
+            _In_  const D3D12_CRYPTO_SESSION_TRANSFORM_OUTPUT_ARGUMENTS *pOutputArguments,
+            _In_  const D3D12_CRYPTO_SESSION_TRANSFORM_INPUT_ARGUMENTS *pInputArguments) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12ContentProtectionDeviceVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12ContentProtectionDevice * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12ContentProtectionDevice * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12ContentProtectionDevice * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateCryptoSession )( 
+            ID3D12ContentProtectionDevice * This,
+            _In_  const D3D12_CRYPTO_SESSION_DESC *pDesc,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppSession);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateCryptoSessionPolicy )( 
+            ID3D12ContentProtectionDevice * This,
+            _In_reads_bytes_( KeyInfoSize )  const void *pKeyInfo,
+            UINT KeyInfoSize,
+            _In_  ID3D12CryptoSession *pCryptoSession,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppCryptoSessionPolicy);
+        
+        HRESULT ( STDMETHODCALLTYPE *TransformEncryptedData )( 
+            ID3D12ContentProtectionDevice * This,
+            D3D12_CRYPTO_SESSION_TRANSFORM_OPERATION Operation,
+            _In_  const D3D12_CRYPTO_SESSION_TRANSFORM_OUTPUT_ARGUMENTS *pOutputArguments,
+            _In_  const D3D12_CRYPTO_SESSION_TRANSFORM_INPUT_ARGUMENTS *pInputArguments);
+        
+        END_INTERFACE
+    } ID3D12ContentProtectionDeviceVtbl;
+
+    interface ID3D12ContentProtectionDevice
+    {
+        CONST_VTBL struct ID3D12ContentProtectionDeviceVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12ContentProtectionDevice_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12ContentProtectionDevice_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12ContentProtectionDevice_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12ContentProtectionDevice_CreateCryptoSession(This,pDesc,riid,ppSession)	\
+    ( (This)->lpVtbl -> CreateCryptoSession(This,pDesc,riid,ppSession) ) 
+
+#define ID3D12ContentProtectionDevice_CreateCryptoSessionPolicy(This,pKeyInfo,KeyInfoSize,pCryptoSession,riid,ppCryptoSessionPolicy)	\
+    ( (This)->lpVtbl -> CreateCryptoSessionPolicy(This,pKeyInfo,KeyInfoSize,pCryptoSession,riid,ppCryptoSessionPolicy) ) 
+
+#define ID3D12ContentProtectionDevice_TransformEncryptedData(This,Operation,pOutputArguments,pInputArguments)	\
+    ( (This)->lpVtbl -> TransformEncryptedData(This,Operation,pOutputArguments,pInputArguments) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12ContentProtectionDevice_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12_1_0000_0003 */
+/* [local] */ 
+
+typedef struct D3D12_VIDEO_DECODE_DECRYPTION_ARGUMENTS
+    {
+    ID3D12CryptoSessionPolicy *pCryptoSessionPolicy;
+    _Field_size_bytes_full_(IVSize)  const void *pIV;
+    UINT IVSize;
+    _Field_size_bytes_full_(SubSampleMappingCount)  const void *pSubSampleMappingBlock;
+    UINT SubSampleMappingCount;
+    UINT cBlocksStripeEncrypted;
+    UINT cBlocksStripeClear;
+    } 	D3D12_VIDEO_DECODE_DECRYPTION_ARGUMENTS;
+
+typedef struct D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS1
+    {
+    UINT NumFrameArguments;
+    D3D12_VIDEO_DECODE_FRAME_ARGUMENT FrameArguments[ 10 ];
+    D3D12_VIDEO_DECODE_REFERENCE_FRAMES ReferenceFrames;
+    D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM CompressedBitstream;
+    D3D12_VIDEO_DECODE_DECRYPTION_ARGUMENTS DecryptionArguments;
+    ID3D12VideoDecoderHeap *pHeap;
+    } 	D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS1;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0003_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0003_v0_0_s_ifspec;
+
+#ifndef __ID3D12VideoDecodeCommandList2_INTERFACE_DEFINED__
+#define __ID3D12VideoDecodeCommandList2_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoDecodeCommandList2 */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoDecodeCommandList2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("EAD05737-EE1D-4442-9B18-7D992E9A8960")
+    ID3D12VideoDecodeCommandList2 : public ID3D12VideoDecodeCommandList1
+    {
+    public:
+        virtual void STDMETHODCALLTYPE DecodeFrame2( 
+            _In_  ID3D12VideoDecoder *pDecoder,
+            _In_  const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1 *pOutputArguments,
+            _In_  const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS1 *pInputArguments) = 0;
+        
+        virtual void STDMETHODCALLTYPE SetProtectedResourceSession( 
+            _In_opt_  ID3D12ProtectedResourceSession *pProtectedResourceSession) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoDecodeCommandList2Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoDecodeCommandList2 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoDecodeCommandList2 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( 
+            ID3D12VideoDecodeCommandList2 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Close )( 
+            ID3D12VideoDecodeCommandList2 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Reset )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  ID3D12CommandAllocator *pAllocator);
+        
+        void ( STDMETHODCALLTYPE *ClearState )( 
+            ID3D12VideoDecodeCommandList2 * This);
+        
+        void ( STDMETHODCALLTYPE *ResourceBarrier )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  UINT NumBarriers,
+            _In_reads_(NumBarriers)  const D3D12_RESOURCE_BARRIER *pBarriers);
+        
+        void ( STDMETHODCALLTYPE *DiscardResource )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  ID3D12Resource *pResource,
+            _In_opt_  const D3D12_DISCARD_REGION *pRegion);
+        
+        void ( STDMETHODCALLTYPE *BeginQuery )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *EndQuery )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *ResolveQueryData )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT StartIndex,
+            _In_  UINT NumQueries,
+            _In_  ID3D12Resource *pDestinationBuffer,
+            _In_  UINT64 AlignedDestinationBufferOffset);
+        
+        void ( STDMETHODCALLTYPE *SetPredication )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_opt_  ID3D12Resource *pBuffer,
+            _In_  UINT64 AlignedBufferOffset,
+            _In_  D3D12_PREDICATION_OP Operation);
+        
+        void ( STDMETHODCALLTYPE *SetMarker )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *BeginEvent )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *EndEvent )( 
+            ID3D12VideoDecodeCommandList2 * This);
+        
+        void ( STDMETHODCALLTYPE *DecodeFrame )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  ID3D12VideoDecoder *pDecoder,
+            _In_  const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            _In_  const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments);
+        
+        void ( STDMETHODCALLTYPE *WriteBufferImmediate )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            UINT Count,
+            _In_reads_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams,
+            _In_reads_opt_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes);
+        
+        void ( STDMETHODCALLTYPE *DecodeFrame1 )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  ID3D12VideoDecoder *pDecoder,
+            _In_  const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1 *pOutputArguments,
+            _In_  const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments);
+        
+        void ( STDMETHODCALLTYPE *DecodeFrame2 )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_  ID3D12VideoDecoder *pDecoder,
+            _In_  const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1 *pOutputArguments,
+            _In_  const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS1 *pInputArguments);
+        
+        void ( STDMETHODCALLTYPE *SetProtectedResourceSession )( 
+            ID3D12VideoDecodeCommandList2 * This,
+            _In_opt_  ID3D12ProtectedResourceSession *pProtectedResourceSession);
+        
+        END_INTERFACE
+    } ID3D12VideoDecodeCommandList2Vtbl;
+
+    interface ID3D12VideoDecodeCommandList2
+    {
+        CONST_VTBL struct ID3D12VideoDecodeCommandList2Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoDecodeCommandList2_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoDecodeCommandList2_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoDecodeCommandList2_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoDecodeCommandList2_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12VideoDecodeCommandList2_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12VideoDecodeCommandList2_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12VideoDecodeCommandList2_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12VideoDecodeCommandList2_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+#define ID3D12VideoDecodeCommandList2_GetType(This)	\
+    ( (This)->lpVtbl -> GetType(This) ) 
+
+
+#define ID3D12VideoDecodeCommandList2_Close(This)	\
+    ( (This)->lpVtbl -> Close(This) ) 
+
+#define ID3D12VideoDecodeCommandList2_Reset(This,pAllocator)	\
+    ( (This)->lpVtbl -> Reset(This,pAllocator) ) 
+
+#define ID3D12VideoDecodeCommandList2_ClearState(This)	\
+    ( (This)->lpVtbl -> ClearState(This) ) 
+
+#define ID3D12VideoDecodeCommandList2_ResourceBarrier(This,NumBarriers,pBarriers)	\
+    ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) 
+
+#define ID3D12VideoDecodeCommandList2_DiscardResource(This,pResource,pRegion)	\
+    ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) 
+
+#define ID3D12VideoDecodeCommandList2_BeginQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoDecodeCommandList2_EndQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoDecodeCommandList2_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset)	\
+    ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) 
+
+#define ID3D12VideoDecodeCommandList2_SetPredication(This,pBuffer,AlignedBufferOffset,Operation)	\
+    ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) 
+
+#define ID3D12VideoDecodeCommandList2_SetMarker(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoDecodeCommandList2_BeginEvent(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoDecodeCommandList2_EndEvent(This)	\
+    ( (This)->lpVtbl -> EndEvent(This) ) 
+
+#define ID3D12VideoDecodeCommandList2_DecodeFrame(This,pDecoder,pOutputArguments,pInputArguments)	\
+    ( (This)->lpVtbl -> DecodeFrame(This,pDecoder,pOutputArguments,pInputArguments) ) 
+
+#define ID3D12VideoDecodeCommandList2_WriteBufferImmediate(This,Count,pParams,pModes)	\
+    ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) 
+
+
+#define ID3D12VideoDecodeCommandList2_DecodeFrame1(This,pDecoder,pOutputArguments,pInputArguments)	\
+    ( (This)->lpVtbl -> DecodeFrame1(This,pDecoder,pOutputArguments,pInputArguments) ) 
+
+
+#define ID3D12VideoDecodeCommandList2_DecodeFrame2(This,pDecoder,pOutputArguments,pInputArguments)	\
+    ( (This)->lpVtbl -> DecodeFrame2(This,pDecoder,pOutputArguments,pInputArguments) ) 
+
+#define ID3D12VideoDecodeCommandList2_SetProtectedResourceSession(This,pProtectedResourceSession)	\
+    ( (This)->lpVtbl -> SetProtectedResourceSession(This,pProtectedResourceSession) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12VideoDecodeCommandList2_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12VideoProcessCommandList2_INTERFACE_DEFINED__
+#define __ID3D12VideoProcessCommandList2_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoProcessCommandList2 */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoProcessCommandList2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("569AB919-94DE-4529-8292-35DE97848059")
+    ID3D12VideoProcessCommandList2 : public ID3D12VideoProcessCommandList1
+    {
+    public:
+        virtual void STDMETHODCALLTYPE SetProtectedResourceSession( 
+            _In_opt_  ID3D12ProtectedResourceSession *pProtectedResourceSession) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoProcessCommandList2Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoProcessCommandList2 * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoProcessCommandList2 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoProcessCommandList2 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12VideoProcessCommandList2 * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( 
+            ID3D12VideoProcessCommandList2 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Close )( 
+            ID3D12VideoProcessCommandList2 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Reset )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  ID3D12CommandAllocator *pAllocator);
+        
+        void ( STDMETHODCALLTYPE *ClearState )( 
+            ID3D12VideoProcessCommandList2 * This);
+        
+        void ( STDMETHODCALLTYPE *ResourceBarrier )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  UINT NumBarriers,
+            _In_reads_(NumBarriers)  const D3D12_RESOURCE_BARRIER *pBarriers);
+        
+        void ( STDMETHODCALLTYPE *DiscardResource )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  ID3D12Resource *pResource,
+            _In_opt_  const D3D12_DISCARD_REGION *pRegion);
+        
+        void ( STDMETHODCALLTYPE *BeginQuery )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *EndQuery )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *ResolveQueryData )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT StartIndex,
+            _In_  UINT NumQueries,
+            _In_  ID3D12Resource *pDestinationBuffer,
+            _In_  UINT64 AlignedDestinationBufferOffset);
+        
+        void ( STDMETHODCALLTYPE *SetPredication )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_opt_  ID3D12Resource *pBuffer,
+            _In_  UINT64 AlignedBufferOffset,
+            _In_  D3D12_PREDICATION_OP Operation);
+        
+        void ( STDMETHODCALLTYPE *SetMarker )( 
+            ID3D12VideoProcessCommandList2 * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *BeginEvent )( 
+            ID3D12VideoProcessCommandList2 * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *EndEvent )( 
+            ID3D12VideoProcessCommandList2 * This);
+        
+        void ( STDMETHODCALLTYPE *ProcessFrames )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  ID3D12VideoProcessor *pVideoProcessor,
+            _In_  const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            UINT NumInputStreams,
+            _In_reads_(NumInputStreams)  const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS *pInputArguments);
+        
+        void ( STDMETHODCALLTYPE *WriteBufferImmediate )( 
+            ID3D12VideoProcessCommandList2 * This,
+            UINT Count,
+            _In_reads_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams,
+            _In_reads_opt_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes);
+        
+        void ( STDMETHODCALLTYPE *ProcessFrames1 )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_  ID3D12VideoProcessor *pVideoProcessor,
+            _In_  const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            UINT NumInputStreams,
+            _In_reads_(NumInputStreams)  const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1 *pInputArguments);
+        
+        void ( STDMETHODCALLTYPE *SetProtectedResourceSession )( 
+            ID3D12VideoProcessCommandList2 * This,
+            _In_opt_  ID3D12ProtectedResourceSession *pProtectedResourceSession);
+        
+        END_INTERFACE
+    } ID3D12VideoProcessCommandList2Vtbl;
+
+    interface ID3D12VideoProcessCommandList2
+    {
+        CONST_VTBL struct ID3D12VideoProcessCommandList2Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoProcessCommandList2_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoProcessCommandList2_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoProcessCommandList2_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoProcessCommandList2_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12VideoProcessCommandList2_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12VideoProcessCommandList2_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12VideoProcessCommandList2_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12VideoProcessCommandList2_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+#define ID3D12VideoProcessCommandList2_GetType(This)	\
+    ( (This)->lpVtbl -> GetType(This) ) 
+
+
+#define ID3D12VideoProcessCommandList2_Close(This)	\
+    ( (This)->lpVtbl -> Close(This) ) 
+
+#define ID3D12VideoProcessCommandList2_Reset(This,pAllocator)	\
+    ( (This)->lpVtbl -> Reset(This,pAllocator) ) 
+
+#define ID3D12VideoProcessCommandList2_ClearState(This)	\
+    ( (This)->lpVtbl -> ClearState(This) ) 
+
+#define ID3D12VideoProcessCommandList2_ResourceBarrier(This,NumBarriers,pBarriers)	\
+    ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) 
+
+#define ID3D12VideoProcessCommandList2_DiscardResource(This,pResource,pRegion)	\
+    ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) 
+
+#define ID3D12VideoProcessCommandList2_BeginQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoProcessCommandList2_EndQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoProcessCommandList2_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset)	\
+    ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) 
+
+#define ID3D12VideoProcessCommandList2_SetPredication(This,pBuffer,AlignedBufferOffset,Operation)	\
+    ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) 
+
+#define ID3D12VideoProcessCommandList2_SetMarker(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoProcessCommandList2_BeginEvent(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoProcessCommandList2_EndEvent(This)	\
+    ( (This)->lpVtbl -> EndEvent(This) ) 
+
+#define ID3D12VideoProcessCommandList2_ProcessFrames(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments)	\
+    ( (This)->lpVtbl -> ProcessFrames(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments) ) 
+
+#define ID3D12VideoProcessCommandList2_WriteBufferImmediate(This,Count,pParams,pModes)	\
+    ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) 
+
+
+#define ID3D12VideoProcessCommandList2_ProcessFrames1(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments)	\
+    ( (This)->lpVtbl -> ProcessFrames1(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments) ) 
+
+
+#define ID3D12VideoProcessCommandList2_SetProtectedResourceSession(This,pProtectedResourceSession)	\
+    ( (This)->lpVtbl -> SetProtectedResourceSession(This,pProtectedResourceSession) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12VideoProcessCommandList2_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12StateObjectPrototype_INTERFACE_DEFINED__
+#define __ID3D12StateObjectPrototype_INTERFACE_DEFINED__
+
+/* interface ID3D12StateObjectPrototype */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12StateObjectPrototype;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("47016943-fca8-4594-93ea-af258b55346d")
+    ID3D12StateObjectPrototype : public ID3D12Pageable
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetCachedBlob( 
+            _COM_Outptr_  ID3DBlob **ppBlob) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12StateObjectPrototypeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12StateObjectPrototype * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12StateObjectPrototype * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12StateObjectPrototype * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12StateObjectPrototype * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12StateObjectPrototype * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12StateObjectPrototype * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12StateObjectPrototype * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12StateObjectPrototype * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCachedBlob )( 
+            ID3D12StateObjectPrototype * This,
+            _COM_Outptr_  ID3DBlob **ppBlob);
+        
+        END_INTERFACE
+    } ID3D12StateObjectPrototypeVtbl;
+
+    interface ID3D12StateObjectPrototype
+    {
+        CONST_VTBL struct ID3D12StateObjectPrototypeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12StateObjectPrototype_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12StateObjectPrototype_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12StateObjectPrototype_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12StateObjectPrototype_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12StateObjectPrototype_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12StateObjectPrototype_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12StateObjectPrototype_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12StateObjectPrototype_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+
+#define ID3D12StateObjectPrototype_GetCachedBlob(This,ppBlob)	\
+    ( (This)->lpVtbl -> GetCachedBlob(This,ppBlob) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12StateObjectPrototype_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12StateObjectPropertiesPrototype_INTERFACE_DEFINED__
+#define __ID3D12StateObjectPropertiesPrototype_INTERFACE_DEFINED__
+
+/* interface ID3D12StateObjectPropertiesPrototype */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12StateObjectPropertiesPrototype;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("de5fa827-9bf9-4f26-89ff-d7f56fde3860")
+    ID3D12StateObjectPropertiesPrototype : public IUnknown
+    {
+    public:
+        virtual void *STDMETHODCALLTYPE GetShaderIdentifier( 
+            _In_  LPCWSTR pExportName) = 0;
+        
+        virtual UINT64 STDMETHODCALLTYPE GetShaderStackSize( 
+            _In_  LPCWSTR pExportName) = 0;
+        
+        virtual UINT64 STDMETHODCALLTYPE GetPipelineStackSize( void) = 0;
+        
+        virtual void STDMETHODCALLTYPE SetPipelineStackSize( 
+            UINT64 PipelineStackSizeInBytes) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12StateObjectPropertiesPrototypeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12StateObjectPropertiesPrototype * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12StateObjectPropertiesPrototype * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12StateObjectPropertiesPrototype * This);
+        
+        void *( STDMETHODCALLTYPE *GetShaderIdentifier )( 
+            ID3D12StateObjectPropertiesPrototype * This,
+            _In_  LPCWSTR pExportName);
+        
+        UINT64 ( STDMETHODCALLTYPE *GetShaderStackSize )( 
+            ID3D12StateObjectPropertiesPrototype * This,
+            _In_  LPCWSTR pExportName);
+        
+        UINT64 ( STDMETHODCALLTYPE *GetPipelineStackSize )( 
+            ID3D12StateObjectPropertiesPrototype * This);
+        
+        void ( STDMETHODCALLTYPE *SetPipelineStackSize )( 
+            ID3D12StateObjectPropertiesPrototype * This,
+            UINT64 PipelineStackSizeInBytes);
+        
+        END_INTERFACE
+    } ID3D12StateObjectPropertiesPrototypeVtbl;
+
+    interface ID3D12StateObjectPropertiesPrototype
+    {
+        CONST_VTBL struct ID3D12StateObjectPropertiesPrototypeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12StateObjectPropertiesPrototype_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12StateObjectPropertiesPrototype_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12StateObjectPropertiesPrototype_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12StateObjectPropertiesPrototype_GetShaderIdentifier(This,pExportName)	\
+    ( (This)->lpVtbl -> GetShaderIdentifier(This,pExportName) ) 
+
+#define ID3D12StateObjectPropertiesPrototype_GetShaderStackSize(This,pExportName)	\
+    ( (This)->lpVtbl -> GetShaderStackSize(This,pExportName) ) 
+
+#define ID3D12StateObjectPropertiesPrototype_GetPipelineStackSize(This)	\
+    ( (This)->lpVtbl -> GetPipelineStackSize(This) ) 
+
+#define ID3D12StateObjectPropertiesPrototype_SetPipelineStackSize(This,PipelineStackSizeInBytes)	\
+    ( (This)->lpVtbl -> SetPipelineStackSize(This,PipelineStackSizeInBytes) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12StateObjectPropertiesPrototype_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12_1_0000_0007 */
+/* [local] */ 
+
+typedef 
+enum D3D12_STATE_SUBOBJECT_TYPE
+    {
+        D3D12_STATE_SUBOBJECT_TYPE_FLAGS	= 0,
+        D3D12_STATE_SUBOBJECT_TYPE_ROOT_SIGNATURE	= 1,
+        D3D12_STATE_SUBOBJECT_TYPE_LOCAL_ROOT_SIGNATURE	= 2,
+        D3D12_STATE_SUBOBJECT_TYPE_NODE_MASK	= 3,
+        D3D12_STATE_SUBOBJECT_TYPE_CACHED_STATE_OBJECT	= 4,
+        D3D12_STATE_SUBOBJECT_TYPE_DXIL_LIBRARY	= 5,
+        D3D12_STATE_SUBOBJECT_TYPE_EXISTING_COLLECTION	= 6,
+        D3D12_STATE_SUBOBJECT_TYPE_SUBOBJECT_TO_EXPORTS_ASSOCIATION	= 7,
+        D3D12_STATE_SUBOBJECT_TYPE_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION	= 8,
+        D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_SHADER_CONFIG	= 9,
+        D3D12_STATE_SUBOBJECT_TYPE_RAYTRACING_PIPELINE_CONFIG	= 10,
+        D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP	= 11,
+        D3D12_STATE_SUBOBJECT_TYPE_MAX_VALID	= ( D3D12_STATE_SUBOBJECT_TYPE_HIT_GROUP + 1 ) 
+    } 	D3D12_STATE_SUBOBJECT_TYPE;
+
+typedef struct D3D12_STATE_SUBOBJECT
+    {
+    D3D12_STATE_SUBOBJECT_TYPE Type;
+    const void *pDesc;
+    } 	D3D12_STATE_SUBOBJECT;
+
+typedef 
+enum D3D12_STATE_OBJECT_FLAGS
+    {
+        D3D12_STATE_OBJECT_FLAG_NONE	= 0
+    } 	D3D12_STATE_OBJECT_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS( D3D12_STATE_OBJECT_FLAGS );
+typedef 
+enum D3D12_EXPORT_FLAGS
+    {
+        D3D12_EXPORT_FLAG_NONE	= 0
+    } 	D3D12_EXPORT_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS( D3D12_EXPORT_FLAGS );
+typedef struct D3D12_EXPORT_DESC
+    {
+    LPCWSTR Name;
+    _In_opt_  LPCWSTR ExportToRename;
+    D3D12_EXPORT_FLAGS Flags;
+    } 	D3D12_EXPORT_DESC;
+
+typedef struct D3D12_DXIL_LIBRARY_DESC
+    {
+    D3D12_SHADER_BYTECODE DXILLibrary;
+    UINT NumExports;
+    _In_reads_(NumExports)  D3D12_EXPORT_DESC *pExports;
+    } 	D3D12_DXIL_LIBRARY_DESC;
+
+typedef struct D3D12_EXISTING_COLLECTION_DESC
+    {
+    ID3D12StateObjectPrototype *pExistingCollection;
+    UINT NumExports;
+    _In_reads_(NumExports)  D3D12_EXPORT_DESC *pExports;
+    } 	D3D12_EXISTING_COLLECTION_DESC;
+
+typedef struct D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION
+    {
+    const D3D12_STATE_SUBOBJECT *pSubobjectToAssociate;
+    UINT NumExports;
+    _In_reads_(NumExports)  LPCWSTR *pExports;
+    } 	D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION;
+
+typedef struct D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION
+    {
+    LPCWSTR SubobjectToAssociate;
+    UINT NumExports;
+    _In_reads_(NumExports)  LPCWSTR *pExports;
+    } 	D3D12_DXIL_SUBOBJECT_TO_EXPORTS_ASSOCIATION;
+
+typedef struct D3D12_HIT_GROUP_DESC
+    {
+    LPCWSTR HitGroupExport;
+    _In_opt_  LPCWSTR AnyHitShaderImport;
+    _In_opt_  LPCWSTR ClosestHitShaderImport;
+    _In_opt_  LPCWSTR IntersectionShaderImport;
+    } 	D3D12_HIT_GROUP_DESC;
+
+typedef struct D3D12_RAYTRACING_SHADER_CONFIG
+    {
+    UINT MaxPayloadSizeInBytes;
+    UINT MaxAttributeSizeInBytes;
+    } 	D3D12_RAYTRACING_SHADER_CONFIG;
+
+typedef struct D3D12_RAYTRACING_PIPELINE_CONFIG
+    {
+    UINT MaxTraceRecursionDepth;
+    } 	D3D12_RAYTRACING_PIPELINE_CONFIG;
+
+typedef 
+enum D3D12_STATE_OBJECT_TYPE
+    {
+        D3D12_STATE_OBJECT_TYPE_COLLECTION	= 0,
+        D3D12_STATE_OBJECT_TYPE_RAYTRACING_PIPELINE	= 3
+    } 	D3D12_STATE_OBJECT_TYPE;
+
+typedef struct D3D12_STATE_OBJECT_DESC
+    {
+    D3D12_STATE_OBJECT_TYPE Type;
+    UINT NumSubobjects;
+    _In_reads_(NumSubobjects)  const D3D12_STATE_SUBOBJECT *pSubobjects;
+    } 	D3D12_STATE_OBJECT_DESC;
+
+typedef 
+enum D3D12_RAYTRACING_GEOMETRY_FLAGS
+    {
+        D3D12_RAYTRACING_GEOMETRY_FLAG_NONE	= 0,
+        D3D12_RAYTRACING_GEOMETRY_FLAG_OPAQUE	= 0x1,
+        D3D12_RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANYHIT_INVOCATION	= 0x2
+    } 	D3D12_RAYTRACING_GEOMETRY_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_GEOMETRY_FLAGS );
+typedef 
+enum D3D12_RAYTRACING_GEOMETRY_TYPE
+    {
+        D3D12_RAYTRACING_GEOMETRY_TYPE_TRIANGLES	= 0,
+        D3D12_RAYTRACING_GEOMETRY_TYPE_PROCEDURAL_PRIMITIVE_AABBS	= ( D3D12_RAYTRACING_GEOMETRY_TYPE_TRIANGLES + 1 ) 
+    } 	D3D12_RAYTRACING_GEOMETRY_TYPE;
+
+typedef 
+enum D3D12_RAYTRACING_INSTANCE_FLAGS
+    {
+        D3D12_RAYTRACING_INSTANCE_FLAG_NONE	= 0,
+        D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_CULL_DISABLE	= 0x1,
+        D3D12_RAYTRACING_INSTANCE_FLAG_TRIANGLE_FRONT_COUNTERCLOCKWISE	= 0x2,
+        D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_OPAQUE	= 0x4,
+        D3D12_RAYTRACING_INSTANCE_FLAG_FORCE_NON_OPAQUE	= 0x8
+    } 	D3D12_RAYTRACING_INSTANCE_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_INSTANCE_FLAGS );
+typedef struct D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE
+    {
+    D3D12_GPU_VIRTUAL_ADDRESS StartAddress;
+    UINT64 StrideInBytes;
+    } 	D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE;
+
+typedef struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE
+    {
+    D3D12_GPU_VIRTUAL_ADDRESS StartAddress;
+    UINT64 SizeInBytes;
+    } 	D3D12_GPU_VIRTUAL_ADDRESS_RANGE;
+
+typedef struct D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE
+    {
+    D3D12_GPU_VIRTUAL_ADDRESS StartAddress;
+    UINT64 SizeInBytes;
+    UINT64 StrideInBytes;
+    } 	D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE;
+
+typedef struct D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC
+    {
+    D3D12_GPU_VIRTUAL_ADDRESS Transform;
+    DXGI_FORMAT IndexFormat;
+    DXGI_FORMAT VertexFormat;
+    UINT IndexCount;
+    UINT VertexCount;
+    D3D12_GPU_VIRTUAL_ADDRESS IndexBuffer;
+    D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE VertexBuffer;
+    } 	D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC;
+
+typedef struct D3D12_RAYTRACING_AABB
+    {
+    FLOAT MinX;
+    FLOAT MinY;
+    FLOAT MinZ;
+    FLOAT MaxX;
+    FLOAT MaxY;
+    FLOAT MaxZ;
+    } 	D3D12_RAYTRACING_AABB;
+
+typedef struct D3D12_RAYTRACING_GEOMETRY_AABBS_DESC
+    {
+    UINT64 AABBCount;
+    D3D12_GPU_VIRTUAL_ADDRESS_AND_STRIDE AABBs;
+    } 	D3D12_RAYTRACING_GEOMETRY_AABBS_DESC;
+
+typedef struct D3D12_RAYTRACING_GEOMETRY_DESC
+    {
+    D3D12_RAYTRACING_GEOMETRY_TYPE Type;
+    D3D12_RAYTRACING_GEOMETRY_FLAGS Flags;
+    union 
+        {
+        D3D12_RAYTRACING_GEOMETRY_TRIANGLES_DESC Triangles;
+        D3D12_RAYTRACING_GEOMETRY_AABBS_DESC AABBs;
+        } 	;
+    } 	D3D12_RAYTRACING_GEOMETRY_DESC;
+
+typedef 
+enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS
+    {
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_NONE	= 0,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_UPDATE	= 0x1,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_COMPACTION	= 0x2,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_TRACE	= 0x4,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_BUILD	= 0x8,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_MINIMIZE_MEMORY	= 0x10,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PERFORM_UPDATE	= 0x20
+    } 	D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS( D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS );
+typedef 
+enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE
+    {
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_CLONE	= 0,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_COMPACT	= 0x1,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_VISUALIZATION_DECODE_FOR_TOOLS	= 0x2,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_SERIALIZE	= 0x3,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE_DESERIALIZE	= 0x4
+    } 	D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE;
+
+typedef 
+enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE
+    {
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL	= 0,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL	= 0x1
+    } 	D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE;
+
+typedef struct D3D12_RAYTRACING_INSTANCE_DESC
+    {
+    FLOAT Transform[ 12 ];
+    UINT InstanceID	: 24;
+    UINT InstanceMask	: 8;
+    UINT InstanceContributionToHitGroupIndex	: 24;
+    UINT Flags	: 8;
+    D3D12_GPU_VIRTUAL_ADDRESS AccelerationStructure;
+    } 	D3D12_RAYTRACING_INSTANCE_DESC;
+
+typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO
+    {
+    UINT64 ResultDataMaxSizeInBytes;
+    UINT64 ScratchDataSizeInBytes;
+    UINT64 UpdateScratchDataSizeInBytes;
+    } 	D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO;
+
+typedef 
+enum D3D12_ELEMENTS_LAYOUT
+    {
+        D3D12_ELEMENTS_LAYOUT_ARRAY	= 0,
+        D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS	= 0x1
+    } 	D3D12_ELEMENTS_LAYOUT;
+
+typedef struct D3D12_GET_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO_DESC
+    {
+    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type;
+    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS Flags;
+    UINT NumDescs;
+    D3D12_ELEMENTS_LAYOUT DescsLayout;
+    union 
+        {
+        const D3D12_RAYTRACING_GEOMETRY_DESC *pGeometryDescs;
+        const D3D12_RAYTRACING_GEOMETRY_DESC *const *ppGeometryDescs;
+        } 	;
+    } 	D3D12_GET_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO_DESC;
+
+typedef 
+enum D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE
+    {
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE	= 0,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION	= ( D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE + 1 ) ,
+        D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION	= ( D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION + 1 ) 
+    } 	D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE;
+
+typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC
+    {
+    UINT64 CompactedSizeInBytes;
+    } 	D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_COMPACTED_SIZE_DESC;
+
+typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION_DESC
+    {
+    UINT64 DecodedSizeInBytes;
+    } 	D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TOOLS_VISUALIZATION_DESC;
+
+typedef struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER
+    {
+    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type;
+    UINT NumDescs;
+    } 	D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER;
+
+// Regarding D3D12_BUILD_RAY_TRACING_ACCELERATION_STRUCTURE_TOOLS_VISUALIZATION_HEADER above,
+// depending on Type field, NumDescs above is followed by either:
+//       D3D12_RAY_TRACING_INSTANCE_DESC InstanceDescs[NumDescs]
+//    or D3D12_RAY_TRACING_GEOMETRY_DESC GeometryDescs[NumDescs].
+// There is 4 bytes of padding between GeometryDesc structs in the array so alignment is natural when viewed by CPU.
+
+typedef struct D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC
+    {
+    UINT64 SerializedSizeInBytes;
+    UINT64 NumBottomLevelAccelerationStructurePointers;
+    } 	D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_SERIALIZATION_DESC;
+
+typedef struct D3D12_SERIALIZED_ACCELERATION_STRUCTURE_HEADER
+    {
+    UINT64 SerializedSizeInBytesIncludingHeader;
+    UINT64 DeserializedSizeInBytes;
+    UINT64 NumBottomLevelAccelerationStructurePointersAfterHeader;
+    } 	D3D12_SERIALIZED_ACCELERATION_STRUCTURE_HEADER;
+
+typedef struct D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC
+    {
+    D3D12_GPU_VIRTUAL_ADDRESS_RANGE DestAccelerationStructureData;
+    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_TYPE Type;
+    UINT NumDescs;
+    D3D12_ELEMENTS_LAYOUT DescsLayout;
+    union 
+        {
+        D3D12_GPU_VIRTUAL_ADDRESS InstanceDescs;
+        const D3D12_RAYTRACING_GEOMETRY_DESC *pGeometryDescs;
+        const D3D12_RAYTRACING_GEOMETRY_DESC *const *ppGeometryDescs;
+        } 	;
+    D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS Flags;
+    _In_opt_  D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData;
+    D3D12_GPU_VIRTUAL_ADDRESS_RANGE ScratchAccelerationStructureData;
+    } 	D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC;
+
+typedef struct D3D12_DISPATCH_RAYS_DESC
+    {
+    D3D12_GPU_VIRTUAL_ADDRESS_RANGE RayGenerationShaderRecord;
+    D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE MissShaderTable;
+    D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE HitGroupTable;
+    D3D12_GPU_VIRTUAL_ADDRESS_RANGE_AND_STRIDE CallableShaderTable;
+    UINT Width;
+    UINT Height;
+    } 	D3D12_DISPATCH_RAYS_DESC;
+
+#define D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BYTE_ALIGNMENT 256
+#define D3D12_RAYTRACING_INSTANCE_DESCS_BYTE_ALIGNMENT 16
+#define D3D12_RAYTRACING_MAX_ATTRIBUTE_SIZE_IN_BYTES 32
+#define D3D12_RAYTRACING_SHADER_RECORD_BYTE_ALIGNMENT 16
+#define D3D12_RAYTRACING_MAX_DECLARABLE_TRACE_RECURSION_DEPTH 31
+#define D3D12_RAYTRACING_AABB_BYTE_ALIGNMENT 4
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0007_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0007_v0_0_s_ifspec;
+
+#ifndef __ID3D12DeviceRaytracingPrototype_INTERFACE_DEFINED__
+#define __ID3D12DeviceRaytracingPrototype_INTERFACE_DEFINED__
+
+/* interface ID3D12DeviceRaytracingPrototype */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12DeviceRaytracingPrototype;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("f52ef3ca-f710-4ee4-b873-a7f504e43995")
+    ID3D12DeviceRaytracingPrototype : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE CreateStateObject( 
+            const D3D12_STATE_OBJECT_DESC *pDesc,
+            REFIID riid,
+            _COM_Outptr_  void **ppStateObject) = 0;
+        
+        virtual UINT STDMETHODCALLTYPE GetShaderIdentifierSize( void) = 0;
+        
+        virtual void STDMETHODCALLTYPE GetRaytracingAccelerationStructurePrebuildInfo( 
+            _In_  D3D12_GET_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO_DESC *pDesc,
+            _Out_  D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO *pInfo) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12DeviceRaytracingPrototypeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12DeviceRaytracingPrototype * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12DeviceRaytracingPrototype * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12DeviceRaytracingPrototype * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateStateObject )( 
+            ID3D12DeviceRaytracingPrototype * This,
+            const D3D12_STATE_OBJECT_DESC *pDesc,
+            REFIID riid,
+            _COM_Outptr_  void **ppStateObject);
+        
+        UINT ( STDMETHODCALLTYPE *GetShaderIdentifierSize )( 
+            ID3D12DeviceRaytracingPrototype * This);
+        
+        void ( STDMETHODCALLTYPE *GetRaytracingAccelerationStructurePrebuildInfo )( 
+            ID3D12DeviceRaytracingPrototype * This,
+            _In_  D3D12_GET_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO_DESC *pDesc,
+            _Out_  D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO *pInfo);
+        
+        END_INTERFACE
+    } ID3D12DeviceRaytracingPrototypeVtbl;
+
+    interface ID3D12DeviceRaytracingPrototype
+    {
+        CONST_VTBL struct ID3D12DeviceRaytracingPrototypeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12DeviceRaytracingPrototype_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12DeviceRaytracingPrototype_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12DeviceRaytracingPrototype_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12DeviceRaytracingPrototype_CreateStateObject(This,pDesc,riid,ppStateObject)	\
+    ( (This)->lpVtbl -> CreateStateObject(This,pDesc,riid,ppStateObject) ) 
+
+#define ID3D12DeviceRaytracingPrototype_GetShaderIdentifierSize(This)	\
+    ( (This)->lpVtbl -> GetShaderIdentifierSize(This) ) 
+
+#define ID3D12DeviceRaytracingPrototype_GetRaytracingAccelerationStructurePrebuildInfo(This,pDesc,pInfo)	\
+    ( (This)->lpVtbl -> GetRaytracingAccelerationStructurePrebuildInfo(This,pDesc,pInfo) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12DeviceRaytracingPrototype_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12CommandListRaytracingPrototype_INTERFACE_DEFINED__
+#define __ID3D12CommandListRaytracingPrototype_INTERFACE_DEFINED__
+
+/* interface ID3D12CommandListRaytracingPrototype */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12CommandListRaytracingPrototype;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("3c69787a-28fa-4701-970a-37a1ed1f9cab")
+    ID3D12CommandListRaytracingPrototype : public IUnknown
+    {
+    public:
+        virtual void STDMETHODCALLTYPE BuildRaytracingAccelerationStructure( 
+            _In_  const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC *pDesc) = 0;
+        
+        virtual void STDMETHODCALLTYPE EmitRaytracingAccelerationStructurePostBuildInfo( 
+            _In_  D3D12_GPU_VIRTUAL_ADDRESS_RANGE DestBuffer,
+            _In_  D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE InfoType,
+            _In_  UINT NumSourceAccelerationStructures,
+            _In_reads_( NumSourceAccelerationStructures )  const D3D12_GPU_VIRTUAL_ADDRESS *pSourceAccelerationStructureData) = 0;
+        
+        virtual void STDMETHODCALLTYPE CopyRaytracingAccelerationStructure( 
+            _In_  D3D12_GPU_VIRTUAL_ADDRESS_RANGE DestAccelerationStructureData,
+            _In_  D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData,
+            _In_  D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode) = 0;
+        
+        virtual void STDMETHODCALLTYPE DispatchRays( 
+            _In_  ID3D12StateObjectPrototype *pRaytracingPipelineState,
+            _In_  const D3D12_DISPATCH_RAYS_DESC *pDesc) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12CommandListRaytracingPrototypeVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12CommandListRaytracingPrototype * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12CommandListRaytracingPrototype * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12CommandListRaytracingPrototype * This);
+        
+        void ( STDMETHODCALLTYPE *BuildRaytracingAccelerationStructure )( 
+            ID3D12CommandListRaytracingPrototype * This,
+            _In_  const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC *pDesc);
+        
+        void ( STDMETHODCALLTYPE *EmitRaytracingAccelerationStructurePostBuildInfo )( 
+            ID3D12CommandListRaytracingPrototype * This,
+            _In_  D3D12_GPU_VIRTUAL_ADDRESS_RANGE DestBuffer,
+            _In_  D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_TYPE InfoType,
+            _In_  UINT NumSourceAccelerationStructures,
+            _In_reads_( NumSourceAccelerationStructures )  const D3D12_GPU_VIRTUAL_ADDRESS *pSourceAccelerationStructureData);
+        
+        void ( STDMETHODCALLTYPE *CopyRaytracingAccelerationStructure )( 
+            ID3D12CommandListRaytracingPrototype * This,
+            _In_  D3D12_GPU_VIRTUAL_ADDRESS_RANGE DestAccelerationStructureData,
+            _In_  D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData,
+            _In_  D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode);
+        
+        void ( STDMETHODCALLTYPE *DispatchRays )( 
+            ID3D12CommandListRaytracingPrototype * This,
+            _In_  ID3D12StateObjectPrototype *pRaytracingPipelineState,
+            _In_  const D3D12_DISPATCH_RAYS_DESC *pDesc);
+        
+        END_INTERFACE
+    } ID3D12CommandListRaytracingPrototypeVtbl;
+
+    interface ID3D12CommandListRaytracingPrototype
+    {
+        CONST_VTBL struct ID3D12CommandListRaytracingPrototypeVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12CommandListRaytracingPrototype_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12CommandListRaytracingPrototype_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12CommandListRaytracingPrototype_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12CommandListRaytracingPrototype_BuildRaytracingAccelerationStructure(This,pDesc)	\
+    ( (This)->lpVtbl -> BuildRaytracingAccelerationStructure(This,pDesc) ) 
+
+#define ID3D12CommandListRaytracingPrototype_EmitRaytracingAccelerationStructurePostBuildInfo(This,DestBuffer,InfoType,NumSourceAccelerationStructures,pSourceAccelerationStructureData)	\
+    ( (This)->lpVtbl -> EmitRaytracingAccelerationStructurePostBuildInfo(This,DestBuffer,InfoType,NumSourceAccelerationStructures,pSourceAccelerationStructureData) ) 
+
+#define ID3D12CommandListRaytracingPrototype_CopyRaytracingAccelerationStructure(This,DestAccelerationStructureData,SourceAccelerationStructureData,Mode)	\
+    ( (This)->lpVtbl -> CopyRaytracingAccelerationStructure(This,DestAccelerationStructureData,SourceAccelerationStructureData,Mode) ) 
+
+#define ID3D12CommandListRaytracingPrototype_DispatchRays(This,pRaytracingPipelineState,pDesc)	\
+    ( (This)->lpVtbl -> DispatchRays(This,pRaytracingPipelineState,pDesc) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12CommandListRaytracingPrototype_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12_1_0000_0009 */
+/* [local] */ 
+
+typedef 
+enum D3D12_METACOMMAND_PARAMETER_TYPE
+    {
+        D3D12_METACOMMAND_PARAMETER_FLOAT	= 0,
+        D3D12_METACOMMAND_PARAMETER_UINT64	= 1,
+        D3D12_METACOMMAND_PARAMETER_BUFFER_UAV	= 2,
+        D3D12_METACOMMAND_PARAMETER_BINDPOINT_IN_SHADER	= 3
+    } 	D3D12_METACOMMAND_PARAMETER_TYPE;
+
+typedef 
+enum D3D12_METACOMMAND_PARAMETER_ATTRIBUTES
+    {
+        D3D12_METACOMMAND_PARAMETER_INPUT	= 0x1,
+        D3D12_METACOMMAND_PARAMETER_OUTPUT	= 0x2
+    } 	D3D12_METACOMMAND_PARAMETER_ATTRIBUTES;
+
+DEFINE_ENUM_FLAG_OPERATORS( D3D12_METACOMMAND_PARAMETER_ATTRIBUTES );
+typedef 
+enum D3D12_METACOMMAND_PARAMETER_MUTABILITY
+    {
+        D3D12_METACOMMAND_PARAMETER_MUTABILITY_PER_EXECUTE	= 0,
+        D3D12_METACOMMAND_PARAMETER_MUTABILITY_CREATION_ONLY	= 1,
+        D3D12_METACOMMAND_PARAMETER_MUTABILITY_INITIALIZATION_ONLY	= 2
+    } 	D3D12_METACOMMAND_PARAMETER_MUTABILITY;
+
+typedef struct D3D12_METACOMMAND_PARAMETER_DESC
+    {
+    char Name[ 128 ];
+    D3D12_METACOMMAND_PARAMETER_TYPE Type;
+    D3D12_METACOMMAND_PARAMETER_ATTRIBUTES Attributes;
+    D3D12_METACOMMAND_PARAMETER_MUTABILITY Mutability;
+    } 	D3D12_METACOMMAND_PARAMETER_DESC;
+
+typedef 
+enum D3D12_METACOMMAND_BINDPOINT_PARAMETER_TYPE
+    {
+        D3D12_METACOMMAND_BINDPOINT_PARAMETER_TYPE_CBV	= 0,
+        D3D12_METACOMMAND_BINDPOINT_PARAMETER_TYPE_SRV	= ( D3D12_METACOMMAND_BINDPOINT_PARAMETER_TYPE_CBV + 1 ) ,
+        D3D12_METACOMMAND_BINDPOINT_PARAMETER_TYPE_UAV	= ( D3D12_METACOMMAND_BINDPOINT_PARAMETER_TYPE_SRV + 1 ) 
+    } 	D3D12_METACOMMAND_BINDPOINT_PARAMETER_TYPE;
+
+typedef struct D3D12_BINDPOINT_IN_SHADER
+    {
+    D3D12_METACOMMAND_BINDPOINT_PARAMETER_TYPE Type;
+    UINT Register;
+    UINT Space;
+    } 	D3D12_BINDPOINT_IN_SHADER;
+
+typedef struct D3D12_METACOMMAND_PARAMETER_DATA
+    {
+    UINT ParameterIndex;
+    union 
+        {
+        FLOAT FloatValue;
+        UINT64 UnsignedInt64Value;
+        D3D12_GPU_VIRTUAL_ADDRESS BufferLocation;
+        D3D12_BINDPOINT_IN_SHADER BindingInfo;
+        } 	;
+    } 	D3D12_METACOMMAND_PARAMETER_DATA;
+
+typedef struct D3D12_METACOMMAND_DESCRIPTION
+    {
+    GUID Id;
+    char Name[ 128 ];
+    UINT SignatureCount;
+    } 	D3D12_METACOMMAND_DESCRIPTION;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0009_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0009_v0_0_s_ifspec;
+
+#ifndef __ID3D12DeviceMetaCommand_INTERFACE_DEFINED__
+#define __ID3D12DeviceMetaCommand_INTERFACE_DEFINED__
+
+/* interface ID3D12DeviceMetaCommand */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12DeviceMetaCommand;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("547e33c7-ff86-4cd9-bea3-5d4a28375396")
+    ID3D12DeviceMetaCommand : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE EnumerateMetaCommands( 
+            _Inout_  UINT *pNumMetaCommands,
+            _Out_writes_opt_(*pNumMetaCommands)  D3D12_METACOMMAND_DESCRIPTION *pDescs) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE EnumerateMetaCommandSignature( 
+            _In_  REFGUID CommandId,
+            _In_  UINT SignatureId,
+            _Inout_  UINT *pParameterCount,
+            _Out_writes_opt_(*pParameterCount)  D3D12_METACOMMAND_PARAMETER_DESC *pParameterDescs) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE CreateMetaCommand( 
+            _In_  REFGUID CommandId,
+            _In_  UINT SignatureId,
+            _In_opt_  ID3D12RootSignature *pRootSignature,
+            _In_  UINT NumParameters,
+            _In_reads_(NumParameters)  const D3D12_METACOMMAND_PARAMETER_DATA *pParameters,
+            REFIID riid,
+            _COM_Outptr_  void **ppMetaCommand) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12DeviceMetaCommandVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12DeviceMetaCommand * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12DeviceMetaCommand * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12DeviceMetaCommand * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumerateMetaCommands )( 
+            ID3D12DeviceMetaCommand * This,
+            _Inout_  UINT *pNumMetaCommands,
+            _Out_writes_opt_(*pNumMetaCommands)  D3D12_METACOMMAND_DESCRIPTION *pDescs);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumerateMetaCommandSignature )( 
+            ID3D12DeviceMetaCommand * This,
+            _In_  REFGUID CommandId,
+            _In_  UINT SignatureId,
+            _Inout_  UINT *pParameterCount,
+            _Out_writes_opt_(*pParameterCount)  D3D12_METACOMMAND_PARAMETER_DESC *pParameterDescs);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateMetaCommand )( 
+            ID3D12DeviceMetaCommand * This,
+            _In_  REFGUID CommandId,
+            _In_  UINT SignatureId,
+            _In_opt_  ID3D12RootSignature *pRootSignature,
+            _In_  UINT NumParameters,
+            _In_reads_(NumParameters)  const D3D12_METACOMMAND_PARAMETER_DATA *pParameters,
+            REFIID riid,
+            _COM_Outptr_  void **ppMetaCommand);
+        
+        END_INTERFACE
+    } ID3D12DeviceMetaCommandVtbl;
+
+    interface ID3D12DeviceMetaCommand
+    {
+        CONST_VTBL struct ID3D12DeviceMetaCommandVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12DeviceMetaCommand_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12DeviceMetaCommand_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12DeviceMetaCommand_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12DeviceMetaCommand_EnumerateMetaCommands(This,pNumMetaCommands,pDescs)	\
+    ( (This)->lpVtbl -> EnumerateMetaCommands(This,pNumMetaCommands,pDescs) ) 
+
+#define ID3D12DeviceMetaCommand_EnumerateMetaCommandSignature(This,CommandId,SignatureId,pParameterCount,pParameterDescs)	\
+    ( (This)->lpVtbl -> EnumerateMetaCommandSignature(This,CommandId,SignatureId,pParameterCount,pParameterDescs) ) 
+
+#define ID3D12DeviceMetaCommand_CreateMetaCommand(This,CommandId,SignatureId,pRootSignature,NumParameters,pParameters,riid,ppMetaCommand)	\
+    ( (This)->lpVtbl -> CreateMetaCommand(This,CommandId,SignatureId,pRootSignature,NumParameters,pParameters,riid,ppMetaCommand) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12DeviceMetaCommand_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12MetaCommand_INTERFACE_DEFINED__
+#define __ID3D12MetaCommand_INTERFACE_DEFINED__
+
+/* interface ID3D12MetaCommand */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12MetaCommand;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("8AFDA767-8003-494F-9E9A-4AA8864F3524")
+    ID3D12MetaCommand : public ID3D12Pageable
+    {
+    public:
+        virtual void STDMETHODCALLTYPE GetRequiredParameterResourceSize( 
+            UINT32 ParameterIndex,
+            UINT64 *SizeInBytes) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12MetaCommandVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12MetaCommand * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12MetaCommand * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12MetaCommand * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12MetaCommand * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12MetaCommand * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12MetaCommand * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12MetaCommand * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12MetaCommand * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        void ( STDMETHODCALLTYPE *GetRequiredParameterResourceSize )( 
+            ID3D12MetaCommand * This,
+            UINT32 ParameterIndex,
+            UINT64 *SizeInBytes);
+        
+        END_INTERFACE
+    } ID3D12MetaCommandVtbl;
+
+    interface ID3D12MetaCommand
+    {
+        CONST_VTBL struct ID3D12MetaCommandVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12MetaCommand_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12MetaCommand_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12MetaCommand_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12MetaCommand_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12MetaCommand_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12MetaCommand_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12MetaCommand_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12MetaCommand_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+
+#define ID3D12MetaCommand_GetRequiredParameterResourceSize(This,ParameterIndex,SizeInBytes)	\
+    ( (This)->lpVtbl -> GetRequiredParameterResourceSize(This,ParameterIndex,SizeInBytes) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12MetaCommand_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12CommandListMetaCommand_INTERFACE_DEFINED__
+#define __ID3D12CommandListMetaCommand_INTERFACE_DEFINED__
+
+/* interface ID3D12CommandListMetaCommand */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12CommandListMetaCommand;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("5A5F59F3-7124-4766-8E9E-CB637764FB0B")
+    ID3D12CommandListMetaCommand : public IUnknown
+    {
+    public:
+        virtual void STDMETHODCALLTYPE InitializeMetaCommand( 
+            _In_  ID3D12MetaCommand *pMetaCommand,
+            _In_  UINT NumParameters,
+            _In_reads_(NumParameters)  const D3D12_METACOMMAND_PARAMETER_DATA *pParameters) = 0;
+        
+        virtual void STDMETHODCALLTYPE ExecuteMetaCommand( 
+            _In_  ID3D12MetaCommand *pMetaCommand,
+            _In_  UINT NumParameters,
+            _In_reads_(NumParameters)  const D3D12_METACOMMAND_PARAMETER_DATA *pParameters) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12CommandListMetaCommandVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12CommandListMetaCommand * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12CommandListMetaCommand * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12CommandListMetaCommand * This);
+        
+        void ( STDMETHODCALLTYPE *InitializeMetaCommand )( 
+            ID3D12CommandListMetaCommand * This,
+            _In_  ID3D12MetaCommand *pMetaCommand,
+            _In_  UINT NumParameters,
+            _In_reads_(NumParameters)  const D3D12_METACOMMAND_PARAMETER_DATA *pParameters);
+        
+        void ( STDMETHODCALLTYPE *ExecuteMetaCommand )( 
+            ID3D12CommandListMetaCommand * This,
+            _In_  ID3D12MetaCommand *pMetaCommand,
+            _In_  UINT NumParameters,
+            _In_reads_(NumParameters)  const D3D12_METACOMMAND_PARAMETER_DATA *pParameters);
+        
+        END_INTERFACE
+    } ID3D12CommandListMetaCommandVtbl;
+
+    interface ID3D12CommandListMetaCommand
+    {
+        CONST_VTBL struct ID3D12CommandListMetaCommandVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12CommandListMetaCommand_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12CommandListMetaCommand_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12CommandListMetaCommand_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12CommandListMetaCommand_InitializeMetaCommand(This,pMetaCommand,NumParameters,pParameters)	\
+    ( (This)->lpVtbl -> InitializeMetaCommand(This,pMetaCommand,NumParameters,pParameters) ) 
+
+#define ID3D12CommandListMetaCommand_ExecuteMetaCommand(This,pMetaCommand,NumParameters,pParameters)	\
+    ( (This)->lpVtbl -> ExecuteMetaCommand(This,pMetaCommand,NumParameters,pParameters) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12CommandListMetaCommand_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12_1_0000_0012 */
+/* [local] */ 
+
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
+DEFINE_GUID(IID_ID3D12CryptoSession,0xFC7C6C9D,0xC27D,0x4904,0x83,0x5D,0xA5,0xF2,0x09,0x6E,0xC6,0x5F);
+DEFINE_GUID(IID_ID3D12CryptoSessionPolicy,0x69FE3108,0x01A4,0x4AC3,0xAB,0x91,0xF5,0x1E,0x37,0x7A,0x62,0xAC);
+DEFINE_GUID(IID_ID3D12ContentProtectionDevice,0x59975f53,0xbf5f,0x42f2,0xb8,0x4f,0x5e,0x34,0x7c,0x1e,0x3d,0x43);
+DEFINE_GUID(IID_ID3D12VideoDecodeCommandList2,0xEAD05737,0xEE1D,0x4442,0x9B,0x18,0x7D,0x99,0x2E,0x9A,0x89,0x60);
+DEFINE_GUID(IID_ID3D12VideoProcessCommandList2,0x569AB919,0x94DE,0x4529,0x82,0x92,0x35,0xDE,0x97,0x84,0x80,0x59);
+DEFINE_GUID(IID_ID3D12StateObjectPrototype,0x47016943,0xfca8,0x4594,0x93,0xea,0xaf,0x25,0x8b,0x55,0x34,0x6d);
+DEFINE_GUID(IID_ID3D12StateObjectPropertiesPrototype,0xde5fa827,0x9bf9,0x4f26,0x89,0xff,0xd7,0xf5,0x6f,0xde,0x38,0x60);
+DEFINE_GUID(IID_ID3D12DeviceRaytracingPrototype,0xf52ef3ca,0xf710,0x4ee4,0xb8,0x73,0xa7,0xf5,0x04,0xe4,0x39,0x95);
+DEFINE_GUID(IID_ID3D12CommandListRaytracingPrototype,0x3c69787a,0x28fa,0x4701,0x97,0x0a,0x37,0xa1,0xed,0x1f,0x9c,0xab);
+DEFINE_GUID(IID_ID3D12DeviceMetaCommand,0x547e33c7,0xff86,0x4cd9,0xbe,0xa3,0x5d,0x4a,0x28,0x37,0x53,0x96);
+DEFINE_GUID(IID_ID3D12MetaCommand,0x8AFDA767,0x8003,0x494F,0x9E,0x9A,0x4A,0xA8,0x86,0x4F,0x35,0x24);
+DEFINE_GUID(IID_ID3D12CommandListMetaCommand,0x5A5F59F3,0x7124,0x4766,0x8E,0x9E,0xCB,0x63,0x77,0x64,0xFB,0x0B);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0012_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12_1_0000_0012_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+

+ 675 - 32
bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d12sdklayers.h

@@ -64,6 +64,13 @@ typedef interface ID3D12Debug2 ID3D12Debug2;
 #endif 	/* __ID3D12Debug2_FWD_DEFINED__ */
 
 
+#ifndef __ID3D12Debug3_FWD_DEFINED__
+#define __ID3D12Debug3_FWD_DEFINED__
+typedef interface ID3D12Debug3 ID3D12Debug3;
+
+#endif 	/* __ID3D12Debug3_FWD_DEFINED__ */
+
+
 #ifndef __ID3D12DebugDevice1_FWD_DEFINED__
 #define __ID3D12DebugDevice1_FWD_DEFINED__
 typedef interface ID3D12DebugDevice1 ID3D12DebugDevice1;
@@ -78,6 +85,13 @@ typedef interface ID3D12DebugDevice ID3D12DebugDevice;
 #endif 	/* __ID3D12DebugDevice_FWD_DEFINED__ */
 
 
+#ifndef __ID3D12DebugDevice2_FWD_DEFINED__
+#define __ID3D12DebugDevice2_FWD_DEFINED__
+typedef interface ID3D12DebugDevice2 ID3D12DebugDevice2;
+
+#endif 	/* __ID3D12DebugDevice2_FWD_DEFINED__ */
+
+
 #ifndef __ID3D12DebugCommandQueue_FWD_DEFINED__
 #define __ID3D12DebugCommandQueue_FWD_DEFINED__
 typedef interface ID3D12DebugCommandQueue ID3D12DebugCommandQueue;
@@ -99,6 +113,20 @@ typedef interface ID3D12DebugCommandList ID3D12DebugCommandList;
 #endif 	/* __ID3D12DebugCommandList_FWD_DEFINED__ */
 
 
+#ifndef __ID3D12DebugCommandList2_FWD_DEFINED__
+#define __ID3D12DebugCommandList2_FWD_DEFINED__
+typedef interface ID3D12DebugCommandList2 ID3D12DebugCommandList2;
+
+#endif 	/* __ID3D12DebugCommandList2_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12SharingContract_FWD_DEFINED__
+#define __ID3D12SharingContract_FWD_DEFINED__
+typedef interface ID3D12SharingContract ID3D12SharingContract;
+
+#endif 	/* __ID3D12SharingContract_FWD_DEFINED__ */
+
+
 #ifndef __ID3D12InfoQueue_FWD_DEFINED__
 #define __ID3D12InfoQueue_FWD_DEFINED__
 typedef interface ID3D12InfoQueue ID3D12InfoQueue;
@@ -119,6 +147,9 @@ extern "C"{
 /* interface __MIDL_itf_d3d12sdklayers_0000_0000 */
 /* [local] */ 
 
+#include <winapifamily.h>
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
 
 
 extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0000_v0_0_c_ifspec;
@@ -201,6 +232,22 @@ EXTERN_C const IID IID_ID3D12Debug;
 #endif 	/* __ID3D12Debug_INTERFACE_DEFINED__ */
 
 
+/* interface __MIDL_itf_d3d12sdklayers_0000_0001 */
+/* [local] */ 
+
+typedef 
+enum D3D12_GPU_BASED_VALIDATION_FLAGS
+    {
+        D3D12_GPU_BASED_VALIDATION_FLAGS_NONE	= 0,
+        D3D12_GPU_BASED_VALIDATION_FLAGS_DISABLE_STATE_TRACKING	= 0x1
+    } 	D3D12_GPU_BASED_VALIDATION_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_GPU_BASED_VALIDATION_FLAGS)
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0001_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0001_v0_0_s_ifspec;
+
 #ifndef __ID3D12Debug1_INTERFACE_DEFINED__
 #define __ID3D12Debug1_INTERFACE_DEFINED__
 
@@ -298,22 +345,6 @@ EXTERN_C const IID IID_ID3D12Debug1;
 #endif 	/* __ID3D12Debug1_INTERFACE_DEFINED__ */
 
 
-/* interface __MIDL_itf_d3d12sdklayers_0000_0002 */
-/* [local] */ 
-
-typedef 
-enum D3D12_GPU_BASED_VALIDATION_FLAGS
-    {
-        D3D12_GPU_BASED_VALIDATION_FLAGS_NONE	= 0,
-        D3D12_GPU_BASED_VALIDATION_FLAGS_DISABLE_STATE_TRACKING	= 0x1
-    } 	D3D12_GPU_BASED_VALIDATION_FLAGS;
-
-DEFINE_ENUM_FLAG_OPERATORS(D3D12_GPU_BASED_VALIDATION_FLAGS)
-
-
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0002_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0002_v0_0_s_ifspec;
-
 #ifndef __ID3D12Debug2_INTERFACE_DEFINED__
 #define __ID3D12Debug2_INTERFACE_DEFINED__
 
@@ -393,7 +424,113 @@ EXTERN_C const IID IID_ID3D12Debug2;
 #endif 	/* __ID3D12Debug2_INTERFACE_DEFINED__ */
 
 
-/* interface __MIDL_itf_d3d12sdklayers_0000_0003 */
+#ifndef __ID3D12Debug3_INTERFACE_DEFINED__
+#define __ID3D12Debug3_INTERFACE_DEFINED__
+
+/* interface ID3D12Debug3 */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12Debug3;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("5cf4e58f-f671-4ff1-a542-3686e3d153d1")
+    ID3D12Debug3 : public ID3D12Debug
+    {
+    public:
+        virtual void STDMETHODCALLTYPE SetEnableGPUBasedValidation( 
+            BOOL Enable) = 0;
+        
+        virtual void STDMETHODCALLTYPE SetEnableSynchronizedCommandQueueValidation( 
+            BOOL Enable) = 0;
+        
+        virtual void STDMETHODCALLTYPE SetGPUBasedValidationFlags( 
+            D3D12_GPU_BASED_VALIDATION_FLAGS Flags) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12Debug3Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12Debug3 * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12Debug3 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12Debug3 * This);
+        
+        void ( STDMETHODCALLTYPE *EnableDebugLayer )( 
+            ID3D12Debug3 * This);
+        
+        void ( STDMETHODCALLTYPE *SetEnableGPUBasedValidation )( 
+            ID3D12Debug3 * This,
+            BOOL Enable);
+        
+        void ( STDMETHODCALLTYPE *SetEnableSynchronizedCommandQueueValidation )( 
+            ID3D12Debug3 * This,
+            BOOL Enable);
+        
+        void ( STDMETHODCALLTYPE *SetGPUBasedValidationFlags )( 
+            ID3D12Debug3 * This,
+            D3D12_GPU_BASED_VALIDATION_FLAGS Flags);
+        
+        END_INTERFACE
+    } ID3D12Debug3Vtbl;
+
+    interface ID3D12Debug3
+    {
+        CONST_VTBL struct ID3D12Debug3Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12Debug3_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12Debug3_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12Debug3_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12Debug3_EnableDebugLayer(This)	\
+    ( (This)->lpVtbl -> EnableDebugLayer(This) ) 
+
+
+#define ID3D12Debug3_SetEnableGPUBasedValidation(This,Enable)	\
+    ( (This)->lpVtbl -> SetEnableGPUBasedValidation(This,Enable) ) 
+
+#define ID3D12Debug3_SetEnableSynchronizedCommandQueueValidation(This,Enable)	\
+    ( (This)->lpVtbl -> SetEnableSynchronizedCommandQueueValidation(This,Enable) ) 
+
+#define ID3D12Debug3_SetGPUBasedValidationFlags(This,Flags)	\
+    ( (This)->lpVtbl -> SetGPUBasedValidationFlags(This,Flags) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12Debug3_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12sdklayers_0000_0004 */
 /* [local] */ 
 
 typedef 
@@ -460,8 +597,8 @@ typedef struct D3D12_DEBUG_DEVICE_GPU_SLOWDOWN_PERFORMANCE_FACTOR
 
 
 
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0003_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0003_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0004_v0_0_s_ifspec;
 
 #ifndef __ID3D12DebugDevice1_INTERFACE_DEFINED__
 #define __ID3D12DebugDevice1_INTERFACE_DEFINED__
@@ -667,14 +804,132 @@ EXTERN_C const IID IID_ID3D12DebugDevice;
 #endif 	/* __ID3D12DebugDevice_INTERFACE_DEFINED__ */
 
 
-/* interface __MIDL_itf_d3d12sdklayers_0000_0005 */
+#ifndef __ID3D12DebugDevice2_INTERFACE_DEFINED__
+#define __ID3D12DebugDevice2_INTERFACE_DEFINED__
+
+/* interface ID3D12DebugDevice2 */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12DebugDevice2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("60eccbc1-378d-4df1-894c-f8ac5ce4d7dd")
+    ID3D12DebugDevice2 : public ID3D12DebugDevice
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE SetDebugParameter( 
+            D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type,
+            _In_reads_bytes_(DataSize)  const void *pData,
+            UINT DataSize) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetDebugParameter( 
+            D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type,
+            _Out_writes_bytes_(DataSize)  void *pData,
+            UINT DataSize) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12DebugDevice2Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12DebugDevice2 * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12DebugDevice2 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12DebugDevice2 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetFeatureMask )( 
+            ID3D12DebugDevice2 * This,
+            D3D12_DEBUG_FEATURE Mask);
+        
+        D3D12_DEBUG_FEATURE ( STDMETHODCALLTYPE *GetFeatureMask )( 
+            ID3D12DebugDevice2 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *ReportLiveDeviceObjects )( 
+            ID3D12DebugDevice2 * This,
+            D3D12_RLDO_FLAGS Flags);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetDebugParameter )( 
+            ID3D12DebugDevice2 * This,
+            D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type,
+            _In_reads_bytes_(DataSize)  const void *pData,
+            UINT DataSize);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDebugParameter )( 
+            ID3D12DebugDevice2 * This,
+            D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type,
+            _Out_writes_bytes_(DataSize)  void *pData,
+            UINT DataSize);
+        
+        END_INTERFACE
+    } ID3D12DebugDevice2Vtbl;
+
+    interface ID3D12DebugDevice2
+    {
+        CONST_VTBL struct ID3D12DebugDevice2Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12DebugDevice2_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12DebugDevice2_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12DebugDevice2_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12DebugDevice2_SetFeatureMask(This,Mask)	\
+    ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) 
+
+#define ID3D12DebugDevice2_GetFeatureMask(This)	\
+    ( (This)->lpVtbl -> GetFeatureMask(This) ) 
+
+#define ID3D12DebugDevice2_ReportLiveDeviceObjects(This,Flags)	\
+    ( (This)->lpVtbl -> ReportLiveDeviceObjects(This,Flags) ) 
+
+
+#define ID3D12DebugDevice2_SetDebugParameter(This,Type,pData,DataSize)	\
+    ( (This)->lpVtbl -> SetDebugParameter(This,Type,pData,DataSize) ) 
+
+#define ID3D12DebugDevice2_GetDebugParameter(This,Type,pData,DataSize)	\
+    ( (This)->lpVtbl -> GetDebugParameter(This,Type,pData,DataSize) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12DebugDevice2_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12sdklayers_0000_0007 */
 /* [local] */ 
 
 DEFINE_GUID(DXGI_DEBUG_D3D12, 0xcf59a98c, 0xa950, 0x4326, 0x91, 0xef, 0x9b, 0xba, 0xa1, 0x7b, 0xfd, 0x95);
 
 
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0005_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0005_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0007_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0007_v0_0_s_ifspec;
 
 #ifndef __ID3D12DebugCommandQueue_INTERFACE_DEFINED__
 #define __ID3D12DebugCommandQueue_INTERFACE_DEFINED__
@@ -759,7 +1014,7 @@ EXTERN_C const IID IID_ID3D12DebugCommandQueue;
 #endif 	/* __ID3D12DebugCommandQueue_INTERFACE_DEFINED__ */
 
 
-/* interface __MIDL_itf_d3d12sdklayers_0000_0006 */
+/* interface __MIDL_itf_d3d12sdklayers_0000_0008 */
 /* [local] */ 
 
 typedef 
@@ -775,8 +1030,8 @@ typedef struct D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS
 
 
 
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0006_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0006_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0008_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0008_v0_0_s_ifspec;
 
 #ifndef __ID3D12DebugCommandList1_INTERFACE_DEFINED__
 #define __ID3D12DebugCommandList1_INTERFACE_DEFINED__
@@ -990,7 +1245,242 @@ EXTERN_C const IID IID_ID3D12DebugCommandList;
 #endif 	/* __ID3D12DebugCommandList_INTERFACE_DEFINED__ */
 
 
-/* interface __MIDL_itf_d3d12sdklayers_0000_0008 */
+#ifndef __ID3D12DebugCommandList2_INTERFACE_DEFINED__
+#define __ID3D12DebugCommandList2_INTERFACE_DEFINED__
+
+/* interface ID3D12DebugCommandList2 */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12DebugCommandList2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("aeb575cf-4e06-48be-ba3b-c450fc96652e")
+    ID3D12DebugCommandList2 : public ID3D12DebugCommandList
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE SetDebugParameter( 
+            D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type,
+            _In_reads_bytes_(DataSize)  const void *pData,
+            UINT DataSize) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetDebugParameter( 
+            D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type,
+            _Out_writes_bytes_(DataSize)  void *pData,
+            UINT DataSize) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12DebugCommandList2Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12DebugCommandList2 * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12DebugCommandList2 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12DebugCommandList2 * This);
+        
+        BOOL ( STDMETHODCALLTYPE *AssertResourceState )( 
+            ID3D12DebugCommandList2 * This,
+            _In_  ID3D12Resource *pResource,
+            UINT Subresource,
+            UINT State);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetFeatureMask )( 
+            ID3D12DebugCommandList2 * This,
+            D3D12_DEBUG_FEATURE Mask);
+        
+        D3D12_DEBUG_FEATURE ( STDMETHODCALLTYPE *GetFeatureMask )( 
+            ID3D12DebugCommandList2 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetDebugParameter )( 
+            ID3D12DebugCommandList2 * This,
+            D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type,
+            _In_reads_bytes_(DataSize)  const void *pData,
+            UINT DataSize);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDebugParameter )( 
+            ID3D12DebugCommandList2 * This,
+            D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type,
+            _Out_writes_bytes_(DataSize)  void *pData,
+            UINT DataSize);
+        
+        END_INTERFACE
+    } ID3D12DebugCommandList2Vtbl;
+
+    interface ID3D12DebugCommandList2
+    {
+        CONST_VTBL struct ID3D12DebugCommandList2Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12DebugCommandList2_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12DebugCommandList2_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12DebugCommandList2_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12DebugCommandList2_AssertResourceState(This,pResource,Subresource,State)	\
+    ( (This)->lpVtbl -> AssertResourceState(This,pResource,Subresource,State) ) 
+
+#define ID3D12DebugCommandList2_SetFeatureMask(This,Mask)	\
+    ( (This)->lpVtbl -> SetFeatureMask(This,Mask) ) 
+
+#define ID3D12DebugCommandList2_GetFeatureMask(This)	\
+    ( (This)->lpVtbl -> GetFeatureMask(This) ) 
+
+
+#define ID3D12DebugCommandList2_SetDebugParameter(This,Type,pData,DataSize)	\
+    ( (This)->lpVtbl -> SetDebugParameter(This,Type,pData,DataSize) ) 
+
+#define ID3D12DebugCommandList2_GetDebugParameter(This,Type,pData,DataSize)	\
+    ( (This)->lpVtbl -> GetDebugParameter(This,Type,pData,DataSize) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12DebugCommandList2_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12SharingContract_INTERFACE_DEFINED__
+#define __ID3D12SharingContract_INTERFACE_DEFINED__
+
+/* interface ID3D12SharingContract */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12SharingContract;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("0adf7d52-929c-4e61-addb-ffed30de66ef")
+    ID3D12SharingContract : public IUnknown
+    {
+    public:
+        virtual void STDMETHODCALLTYPE Present( 
+            _In_  ID3D12Resource *pResource,
+            UINT Subresource,
+            _In_  HWND window) = 0;
+        
+        virtual void STDMETHODCALLTYPE SharedFenceSignal( 
+            _In_  ID3D12Fence *pFence,
+            UINT64 FenceValue) = 0;
+        
+        virtual void STDMETHODCALLTYPE BeginCapturableWork( 
+            _In_  REFGUID guid) = 0;
+        
+        virtual void STDMETHODCALLTYPE EndCapturableWork( 
+            _In_  REFGUID guid) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12SharingContractVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12SharingContract * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12SharingContract * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12SharingContract * This);
+        
+        void ( STDMETHODCALLTYPE *Present )( 
+            ID3D12SharingContract * This,
+            _In_  ID3D12Resource *pResource,
+            UINT Subresource,
+            _In_  HWND window);
+        
+        void ( STDMETHODCALLTYPE *SharedFenceSignal )( 
+            ID3D12SharingContract * This,
+            _In_  ID3D12Fence *pFence,
+            UINT64 FenceValue);
+        
+        void ( STDMETHODCALLTYPE *BeginCapturableWork )( 
+            ID3D12SharingContract * This,
+            _In_  REFGUID guid);
+        
+        void ( STDMETHODCALLTYPE *EndCapturableWork )( 
+            ID3D12SharingContract * This,
+            _In_  REFGUID guid);
+        
+        END_INTERFACE
+    } ID3D12SharingContractVtbl;
+
+    interface ID3D12SharingContract
+    {
+        CONST_VTBL struct ID3D12SharingContractVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12SharingContract_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12SharingContract_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12SharingContract_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12SharingContract_Present(This,pResource,Subresource,window)	\
+    ( (This)->lpVtbl -> Present(This,pResource,Subresource,window) ) 
+
+#define ID3D12SharingContract_SharedFenceSignal(This,pFence,FenceValue)	\
+    ( (This)->lpVtbl -> SharedFenceSignal(This,pFence,FenceValue) ) 
+
+#define ID3D12SharingContract_BeginCapturableWork(This,guid)	\
+    ( (This)->lpVtbl -> BeginCapturableWork(This,guid) ) 
+
+#define ID3D12SharingContract_EndCapturableWork(This,guid)	\
+    ( (This)->lpVtbl -> EndCapturableWork(This,guid) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12SharingContract_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12sdklayers_0000_0012 */
 /* [local] */ 
 
 typedef 
@@ -2087,7 +2577,154 @@ enum D3D12_MESSAGE_ID
         D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSSTREAM	= ( D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSOR + 1 ) ,
         D3D12_MESSAGE_ID_PROCESS_FRAME_INVALID_PARAMETERS	= ( D3D12_MESSAGE_ID_DESTROY_VIDEOPROCESSSTREAM + 1 ) ,
         D3D12_MESSAGE_ID_COPY_INVALIDLAYOUT	= ( D3D12_MESSAGE_ID_PROCESS_FRAME_INVALID_PARAMETERS + 1 ) ,
-        D3D12_MESSAGE_ID_D3D12_MESSAGES_END	= ( D3D12_MESSAGE_ID_COPY_INVALIDLAYOUT + 1 ) 
+        D3D12_MESSAGE_ID_CREATE_CRYPTO_SESSION	= 1068,
+        D3D12_MESSAGE_ID_CREATE_CRYPTO_SESSION_POLICY	= 1069,
+        D3D12_MESSAGE_ID_CREATE_PROTECTED_RESOURCE_SESSION	= 1070,
+        D3D12_MESSAGE_ID_LIVE_CRYPTO_SESSION	= 1071,
+        D3D12_MESSAGE_ID_LIVE_CRYPTO_SESSION_POLICY	= 1072,
+        D3D12_MESSAGE_ID_LIVE_PROTECTED_RESOURCE_SESSION	= 1073,
+        D3D12_MESSAGE_ID_DESTROY_CRYPTO_SESSION	= 1074,
+        D3D12_MESSAGE_ID_DESTROY_CRYPTO_SESSION_POLICY	= 1075,
+        D3D12_MESSAGE_ID_DESTROY_PROTECTED_RESOURCE_SESSION	= 1076,
+        D3D12_MESSAGE_ID_PROTECTED_RESOURCE_SESSION_UNSUPPORTED	= 1077,
+        D3D12_MESSAGE_ID_FENCE_INVALIDOPERATION	= 1078,
+        D3D12_MESSAGE_ID_CREATEQUERY_HEAP_COPY_QUEUE_TIMESTAMPS_NOT_SUPPORTED	= 1079,
+        D3D12_MESSAGE_ID_SAMPLEPOSITIONS_MISMATCH_DEFERRED	= 1080,
+        D3D12_MESSAGE_ID_SAMPLEPOSITIONS_MISMATCH_RECORDTIME_ASSUMEDFROMFIRSTUSE	= 1081,
+        D3D12_MESSAGE_ID_SAMPLEPOSITIONS_MISMATCH_RECORDTIME_ASSUMEDFROMCLEAR	= 1082,
+        D3D12_MESSAGE_ID_CREATE_VIDEODECODERHEAP	= 1083,
+        D3D12_MESSAGE_ID_LIVE_VIDEODECODERHEAP	= 1084,
+        D3D12_MESSAGE_ID_DESTROY_VIDEODECODERHEAP	= 1085,
+        D3D12_MESSAGE_ID_OPENEXISTINGHEAP_INVALIDARG_RETURN	= 1086,
+        D3D12_MESSAGE_ID_OPENEXISTINGHEAP_OUTOFMEMORY_RETURN	= 1087,
+        D3D12_MESSAGE_ID_OPENEXISTINGHEAP_INVALIDADDRESS	= 1088,
+        D3D12_MESSAGE_ID_OPENEXISTINGHEAP_INVALIDHANDLE	= 1089,
+        D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_INVALID_DEST	= 1090,
+        D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_INVALID_MODE	= 1091,
+        D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_INVALID_ALIGNMENT	= 1092,
+        D3D12_MESSAGE_ID_WRITEBUFFERIMMEDIATE_NOT_SUPPORTED	= 1093,
+        D3D12_MESSAGE_ID_SETVIEWINSTANCEMASK_INVALIDARGS	= 1094,
+        D3D12_MESSAGE_ID_VIEW_INSTANCING_UNSUPPORTED	= 1095,
+        D3D12_MESSAGE_ID_VIEW_INSTANCING_INVALIDARGS	= 1096,
+        D3D12_MESSAGE_ID_COPYTEXTUREREGION_MISMATCH_DECODE_REFERENCE_ONLY_FLAG	= 1097,
+        D3D12_MESSAGE_ID_COPYRESOURCE_MISMATCH_DECODE_REFERENCE_ONLY_FLAG	= 1098,
+        D3D12_MESSAGE_ID_CREATE_VIDEO_DECODE_HEAP_CAPS_FAILURE	= 1099,
+        D3D12_MESSAGE_ID_CREATE_VIDEO_DECODE_HEAP_CAPS_UNSUPPORTED	= 1100,
+        D3D12_MESSAGE_ID_VIDEO_DECODE_SUPPORT_INVALID_INPUT	= 1101,
+        D3D12_MESSAGE_ID_CREATE_VIDEO_DECODER_UNSUPPORTED	= 1102,
+        D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_METADATA_ERROR	= 1103,
+        D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_VIEW_INSTANCING_VERTEX_SIZE_EXCEEDED	= 1104,
+        D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RUNTIME_INTERNAL_ERROR	= 1105,
+        D3D12_MESSAGE_ID_NO_VIDEO_API_SUPPORT	= 1106,
+        D3D12_MESSAGE_ID_VIDEO_PROCESS_SUPPORT_INVALID_INPUT	= 1107,
+        D3D12_MESSAGE_ID_CREATE_VIDEO_PROCESSOR_CAPS_FAILURE	= 1108,
+        D3D12_MESSAGE_ID_VIDEO_PROCESS_SUPPORT_UNSUPPORTED_FORMAT	= 1109,
+        D3D12_MESSAGE_ID_VIDEO_DECODE_FRAME_INVALID_ARGUMENT	= 1110,
+        D3D12_MESSAGE_ID_ENQUEUE_MAKE_RESIDENT_INVALID_FLAGS	= 1111,
+        D3D12_MESSAGE_ID_OPENEXISTINGHEAP_UNSUPPORTED	= 1112,
+        D3D12_MESSAGE_ID_VIDEO_PROCESS_FRAMES_INVALID_ARGUMENT	= 1113,
+        D3D12_MESSAGE_ID_VIDEO_DECODE_SUPPORT_UNSUPPORTED	= 1114,
+        D3D12_MESSAGE_ID_CREATE_COMMANDRECORDER	= 1115,
+        D3D12_MESSAGE_ID_LIVE_COMMANDRECORDER	= 1116,
+        D3D12_MESSAGE_ID_DESTROY_COMMANDRECORDER	= 1117,
+        D3D12_MESSAGE_ID_CREATE_COMMAND_RECORDER_VIDEO_NOT_SUPPORTED	= 1118,
+        D3D12_MESSAGE_ID_CREATE_COMMAND_RECORDER_INVALID_SUPPORT_FLAGS	= 1119,
+        D3D12_MESSAGE_ID_CREATE_COMMAND_RECORDER_INVALID_FLAGS	= 1120,
+        D3D12_MESSAGE_ID_CREATE_COMMAND_RECORDER_MORE_RECORDERS_THAN_LOGICAL_PROCESSORS	= 1121,
+        D3D12_MESSAGE_ID_CREATE_COMMANDPOOL	= 1122,
+        D3D12_MESSAGE_ID_LIVE_COMMANDPOOL	= 1123,
+        D3D12_MESSAGE_ID_DESTROY_COMMANDPOOL	= 1124,
+        D3D12_MESSAGE_ID_CREATE_COMMAND_POOL_INVALID_FLAGS	= 1125,
+        D3D12_MESSAGE_ID_CREATE_COMMAND_LIST_VIDEO_NOT_SUPPORTED	= 1126,
+        D3D12_MESSAGE_ID_COMMAND_RECORDER_SUPPORT_FLAGS_MISMATCH	= 1127,
+        D3D12_MESSAGE_ID_COMMAND_RECORDER_CONTENTION	= 1128,
+        D3D12_MESSAGE_ID_COMMAND_RECORDER_USAGE_WITH_CREATECOMMANDLIST_COMMAND_LIST	= 1129,
+        D3D12_MESSAGE_ID_COMMAND_ALLOCATOR_USAGE_WITH_CREATECOMMANDLIST1_COMMAND_LIST	= 1130,
+        D3D12_MESSAGE_ID_CANNOT_EXECUTE_EMPTY_COMMAND_LIST	= 1131,
+        D3D12_MESSAGE_ID_CANNOT_RESET_COMMAND_POOL_WITH_OPEN_COMMAND_LISTS	= 1132,
+        D3D12_MESSAGE_ID_CANNOT_USE_COMMAND_RECORDER_WITHOUT_CURRENT_TARGET	= 1133,
+        D3D12_MESSAGE_ID_CANNOT_CHANGE_COMMAND_RECORDER_TARGET_WHILE_RECORDING	= 1134,
+        D3D12_MESSAGE_ID_COMMAND_POOL_SYNC	= 1135,
+        D3D12_MESSAGE_ID_EVICT_UNDERFLOW	= 1136,
+        D3D12_MESSAGE_ID_CREATE_META_COMMAND	= 1137,
+        D3D12_MESSAGE_ID_LIVE_META_COMMAND	= 1138,
+        D3D12_MESSAGE_ID_DESTROY_META_COMMAND	= 1139,
+        D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALID_DST_RESOURCE	= 1140,
+        D3D12_MESSAGE_ID_COPYBUFFERREGION_INVALID_SRC_RESOURCE	= 1141,
+        D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_DST_RESOURCE	= 1142,
+        D3D12_MESSAGE_ID_ATOMICCOPYBUFFER_INVALID_SRC_RESOURCE	= 1143,
+        D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_NULL_BUFFER	= 1144,
+        D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_NULL_RESOURCE_DESC	= 1145,
+        D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_UNSUPPORTED	= 1146,
+        D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_BUFFER_DIMENSION	= 1147,
+        D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_BUFFER_FLAGS	= 1148,
+        D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_BUFFER_OFFSET	= 1149,
+        D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_RESOURCE_DIMENSION	= 1150,
+        D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_INVALID_RESOURCE_FLAGS	= 1151,
+        D3D12_MESSAGE_ID_CREATEPLACEDRESOURCEONBUFFER_OUTOFMEMORY_RETURN	= 1152,
+        D3D12_MESSAGE_ID_CANNOT_CREATE_GRAPHICS_AND_VIDEO_COMMAND_RECORDER	= 1153,
+        D3D12_MESSAGE_ID_UPDATETILEMAPPINGS_POSSIBLY_MISMATCHING_PROPERTIES	= 1154,
+        D3D12_MESSAGE_ID_CREATE_COMMAND_LIST_INVALID_COMMAND_LIST_TYPE	= 1155,
+        D3D12_MESSAGE_ID_CLEARUNORDEREDACCESSVIEW_INCOMPATIBLE_WITH_STRUCTURED_BUFFERS	= 1156,
+        D3D12_MESSAGE_ID_COMPUTE_ONLY_DEVICE_OPERATION_UNSUPPORTED	= 1157,
+        D3D12_MESSAGE_ID_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INVALID	= 1158,
+        D3D12_MESSAGE_ID_EMIT_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_INVALID	= 1159,
+        D3D12_MESSAGE_ID_COPY_RAYTRACING_ACCELERATION_STRUCTURE_INVALID	= 1160,
+        D3D12_MESSAGE_ID_DISPATCH_RAYS_INVALID	= 1161,
+        D3D12_MESSAGE_ID_GET_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO_INVALID	= 1162,
+        D3D12_MESSAGE_ID_CREATE_LIFETIMETRACKER	= 1163,
+        D3D12_MESSAGE_ID_LIVE_LIFETIMETRACKER	= 1164,
+        D3D12_MESSAGE_ID_DESTROY_LIFETIMETRACKER	= 1165,
+        D3D12_MESSAGE_ID_DESTROYOWNEDOBJECT_OBJECTNOTOWNED	= 1166,
+        D3D12_MESSAGE_ID_CREATE_TRACKEDWORKLOAD	= 1167,
+        D3D12_MESSAGE_ID_LIVE_TRACKEDWORKLOAD	= 1168,
+        D3D12_MESSAGE_ID_DESTROY_TRACKEDWORKLOAD	= 1169,
+        D3D12_MESSAGE_ID_RENDER_PASS_ERROR	= 1170,
+        D3D12_MESSAGE_ID_META_COMMAND_ID_INVALID	= 1171,
+        D3D12_MESSAGE_ID_META_COMMAND_UNSUPPORTED_PARAMS	= 1172,
+        D3D12_MESSAGE_ID_META_COMMAND_FAILED_ENUMERATION	= 1173,
+        D3D12_MESSAGE_ID_META_COMMAND_PARAMETER_SIZE_MISMATCH	= 1174,
+        D3D12_MESSAGE_ID_UNINITIALIZED_META_COMMAND	= 1175,
+        D3D12_MESSAGE_ID_META_COMMAND_INVALID_GPU_VIRTUAL_ADDRESS	= 1176,
+        D3D12_MESSAGE_ID_CREATE_VIDEOENCODECOMMANDLIST	= 1177,
+        D3D12_MESSAGE_ID_LIVE_VIDEOENCODECOMMANDLIST	= 1178,
+        D3D12_MESSAGE_ID_DESTROY_VIDEOENCODECOMMANDLIST	= 1179,
+        D3D12_MESSAGE_ID_CREATE_VIDEOENCODECOMMANDQUEUE	= 1180,
+        D3D12_MESSAGE_ID_LIVE_VIDEOENCODECOMMANDQUEUE	= 1181,
+        D3D12_MESSAGE_ID_DESTROY_VIDEOENCODECOMMANDQUEUE	= 1182,
+        D3D12_MESSAGE_ID_CREATE_VIDEOMOTIONESTIMATOR	= 1183,
+        D3D12_MESSAGE_ID_LIVE_VIDEOMOTIONESTIMATOR	= 1184,
+        D3D12_MESSAGE_ID_DESTROY_VIDEOMOTIONESTIMATOR	= 1185,
+        D3D12_MESSAGE_ID_CREATE_VIDEOMOTIONVECTORHEAP	= 1186,
+        D3D12_MESSAGE_ID_LIVE_VIDEOMOTIONVECTORHEAP	= 1187,
+        D3D12_MESSAGE_ID_DESTROY_VIDEOMOTIONVECTORHEAP	= 1188,
+        D3D12_MESSAGE_ID_MULTIPLE_TRACKED_WORKLOADS	= 1189,
+        D3D12_MESSAGE_ID_MULTIPLE_TRACKED_WORKLOAD_PAIRS	= 1190,
+        D3D12_MESSAGE_ID_OUT_OF_ORDER_TRACKED_WORKLOAD_PAIR	= 1191,
+        D3D12_MESSAGE_ID_CANNOT_ADD_TRACKED_WORKLOAD	= 1192,
+        D3D12_MESSAGE_ID_INCOMPLETE_TRACKED_WORKLOAD_PAIR	= 1193,
+        D3D12_MESSAGE_ID_CREATE_STATE_OBJECT_ERROR	= 1194,
+        D3D12_MESSAGE_ID_GET_SHADER_IDENTIFIER_ERROR	= 1195,
+        D3D12_MESSAGE_ID_GET_SHADER_STACK_SIZE_ERROR	= 1196,
+        D3D12_MESSAGE_ID_GET_PIPELINE_STACK_SIZE_ERROR	= 1197,
+        D3D12_MESSAGE_ID_SET_PIPELINE_STACK_SIZE_ERROR	= 1198,
+        D3D12_MESSAGE_ID_GET_SHADER_IDENTIFIER_SIZE_INVALID	= 1199,
+        D3D12_MESSAGE_ID_CHECK_DRIVER_MATCHING_IDENTIFIER_INVALID	= 1200,
+        D3D12_MESSAGE_ID_CHECK_DRIVER_MATCHING_IDENTIFIER_DRIVER_REPORTED_ISSUE	= 1201,
+        D3D12_MESSAGE_ID_RENDER_PASS_INVALID_RESOURCE_BARRIER	= 1202,
+        D3D12_MESSAGE_ID_RENDER_PASS_DISALLOWED_API_CALLED	= 1203,
+        D3D12_MESSAGE_ID_RENDER_PASS_CANNOT_NEST_RENDER_PASSES	= 1204,
+        D3D12_MESSAGE_ID_RENDER_PASS_CANNOT_END_WITHOUT_BEGIN	= 1205,
+        D3D12_MESSAGE_ID_RENDER_PASS_CANNOT_CLOSE_COMMAND_LIST	= 1206,
+        D3D12_MESSAGE_ID_RENDER_PASS_GPU_WORK_WHILE_SUSPENDED	= 1207,
+        D3D12_MESSAGE_ID_RENDER_PASS_MISMATCHING_SUSPEND_RESUME	= 1208,
+        D3D12_MESSAGE_ID_RENDER_PASS_NO_PRIOR_SUSPEND_WITHIN_EXECUTECOMMANDLISTS	= 1209,
+        D3D12_MESSAGE_ID_RENDER_PASS_NO_SUBSEQUENT_RESUME_WITHIN_EXECUTECOMMANDLISTS	= 1210,
+        D3D12_MESSAGE_ID_TRACKED_WORKLOAD_COMMAND_QUEUE_MISMATCH	= 1211,
+        D3D12_MESSAGE_ID_TRACKED_WORKLOAD_NOT_SUPPORTED	= 1212,
+        D3D12_MESSAGE_ID_RENDER_PASS_MISMATCHING_NO_ACCESS	= 1213,
+        D3D12_MESSAGE_ID_RENDER_PASS_UNSUPPORTED_RESOLVE	= 1214,
+        D3D12_MESSAGE_ID_D3D12_MESSAGES_END	= ( D3D12_MESSAGE_ID_RENDER_PASS_UNSUPPORTED_RESOLVE + 1 ) 
     } 	D3D12_MESSAGE_ID;
 
 static_assert(D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_UNSUPPORTED == 1000, "Publicly released SDK D3D12_MESSAGE_ID enum values must not be changed. New enum values must be added to the end of the list.");
@@ -2120,8 +2757,8 @@ typedef struct D3D12_INFO_QUEUE_FILTER
 #define D3D12_INFO_QUEUE_DEFAULT_MESSAGE_COUNT_LIMIT 1024
 
 
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0008_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0008_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0012_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0012_v0_0_s_ifspec;
 
 #ifndef __ID3D12InfoQueue_INTERFACE_DEFINED__
 #define __ID3D12InfoQueue_INTERFACE_DEFINED__
@@ -2528,22 +3165,28 @@ EXTERN_C const IID IID_ID3D12InfoQueue;
 #endif 	/* __ID3D12InfoQueue_INTERFACE_DEFINED__ */
 
 
-/* interface __MIDL_itf_d3d12sdklayers_0000_0009 */
+/* interface __MIDL_itf_d3d12sdklayers_0000_0013 */
 /* [local] */ 
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
 DEFINE_GUID(IID_ID3D12Debug,0x344488b7,0x6846,0x474b,0xb9,0x89,0xf0,0x27,0x44,0x82,0x45,0xe0);
 DEFINE_GUID(IID_ID3D12Debug1,0xaffaa4ca,0x63fe,0x4d8e,0xb8,0xad,0x15,0x90,0x00,0xaf,0x43,0x04);
 DEFINE_GUID(IID_ID3D12Debug2,0x93a665c4,0xa3b2,0x4e5d,0xb6,0x92,0xa2,0x6a,0xe1,0x4e,0x33,0x74);
+DEFINE_GUID(IID_ID3D12Debug3,0x5cf4e58f,0xf671,0x4ff1,0xa5,0x42,0x36,0x86,0xe3,0xd1,0x53,0xd1);
 DEFINE_GUID(IID_ID3D12DebugDevice1,0xa9b71770,0xd099,0x4a65,0xa6,0x98,0x3d,0xee,0x10,0x02,0x0f,0x88);
 DEFINE_GUID(IID_ID3D12DebugDevice,0x3febd6dd,0x4973,0x4787,0x81,0x94,0xe4,0x5f,0x9e,0x28,0x92,0x3e);
+DEFINE_GUID(IID_ID3D12DebugDevice2,0x60eccbc1,0x378d,0x4df1,0x89,0x4c,0xf8,0xac,0x5c,0xe4,0xd7,0xdd);
 DEFINE_GUID(IID_ID3D12DebugCommandQueue,0x09e0bf36,0x54ac,0x484f,0x88,0x47,0x4b,0xae,0xea,0xb6,0x05,0x3a);
 DEFINE_GUID(IID_ID3D12DebugCommandList1,0x102ca951,0x311b,0x4b01,0xb1,0x1f,0xec,0xb8,0x3e,0x06,0x1b,0x37);
 DEFINE_GUID(IID_ID3D12DebugCommandList,0x09e0bf36,0x54ac,0x484f,0x88,0x47,0x4b,0xae,0xea,0xb6,0x05,0x3f);
+DEFINE_GUID(IID_ID3D12DebugCommandList2,0xaeb575cf,0x4e06,0x48be,0xba,0x3b,0xc4,0x50,0xfc,0x96,0x65,0x2e);
+DEFINE_GUID(IID_ID3D12SharingContract,0x0adf7d52,0x929c,0x4e61,0xad,0xdb,0xff,0xed,0x30,0xde,0x66,0xef);
 DEFINE_GUID(IID_ID3D12InfoQueue,0x0742a90b,0xc387,0x483f,0xb9,0x46,0x30,0xa7,0xe4,0xe6,0x14,0x58);
 
 
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0009_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0009_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0013_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12sdklayers_0000_0013_v0_0_s_ifspec;
 
 /* Additional Prototypes for ALL interfaces */
 

+ 2452 - 0
bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d12video.h

@@ -0,0 +1,2452 @@
+/*-------------------------------------------------------------------------------------
+ *
+ * Copyright (c) Microsoft Corporation
+ *
+ *-------------------------------------------------------------------------------------*/
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 8.01.0622 */
+
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif /* __RPCNDR_H_VERSION__ */
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __d3d12video_h__
+#define __d3d12video_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+#ifndef __ID3D12VideoDecoderHeap_FWD_DEFINED__
+#define __ID3D12VideoDecoderHeap_FWD_DEFINED__
+typedef interface ID3D12VideoDecoderHeap ID3D12VideoDecoderHeap;
+
+#endif 	/* __ID3D12VideoDecoderHeap_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12VideoDevice_FWD_DEFINED__
+#define __ID3D12VideoDevice_FWD_DEFINED__
+typedef interface ID3D12VideoDevice ID3D12VideoDevice;
+
+#endif 	/* __ID3D12VideoDevice_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12VideoDecoder_FWD_DEFINED__
+#define __ID3D12VideoDecoder_FWD_DEFINED__
+typedef interface ID3D12VideoDecoder ID3D12VideoDecoder;
+
+#endif 	/* __ID3D12VideoDecoder_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12VideoProcessor_FWD_DEFINED__
+#define __ID3D12VideoProcessor_FWD_DEFINED__
+typedef interface ID3D12VideoProcessor ID3D12VideoProcessor;
+
+#endif 	/* __ID3D12VideoProcessor_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12VideoDecodeCommandList_FWD_DEFINED__
+#define __ID3D12VideoDecodeCommandList_FWD_DEFINED__
+typedef interface ID3D12VideoDecodeCommandList ID3D12VideoDecodeCommandList;
+
+#endif 	/* __ID3D12VideoDecodeCommandList_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12VideoProcessCommandList_FWD_DEFINED__
+#define __ID3D12VideoProcessCommandList_FWD_DEFINED__
+typedef interface ID3D12VideoProcessCommandList ID3D12VideoProcessCommandList;
+
+#endif 	/* __ID3D12VideoProcessCommandList_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12VideoDecodeCommandList1_FWD_DEFINED__
+#define __ID3D12VideoDecodeCommandList1_FWD_DEFINED__
+typedef interface ID3D12VideoDecodeCommandList1 ID3D12VideoDecodeCommandList1;
+
+#endif 	/* __ID3D12VideoDecodeCommandList1_FWD_DEFINED__ */
+
+
+#ifndef __ID3D12VideoProcessCommandList1_FWD_DEFINED__
+#define __ID3D12VideoProcessCommandList1_FWD_DEFINED__
+typedef interface ID3D12VideoProcessCommandList1 ID3D12VideoProcessCommandList1;
+
+#endif 	/* __ID3D12VideoProcessCommandList1_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "oaidl.h"
+#include "ocidl.h"
+#include "dxgicommon.h"
+#include "d3d12.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_d3d12video_0000_0000 */
+/* [local] */ 
+
+#include <winapifamily.h>
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+typedef 
+enum D3D12_VIDEO_FIELD_TYPE
+    {
+        D3D12_VIDEO_FIELD_TYPE_NONE	= 0,
+        D3D12_VIDEO_FIELD_TYPE_INTERLACED_TOP_FIELD_FIRST	= 1,
+        D3D12_VIDEO_FIELD_TYPE_INTERLACED_BOTTOM_FIELD_FIRST	= 2
+    } 	D3D12_VIDEO_FIELD_TYPE;
+
+typedef 
+enum D3D12_VIDEO_FRAME_STEREO_FORMAT
+    {
+        D3D12_VIDEO_FRAME_STEREO_FORMAT_NONE	= 0,
+        D3D12_VIDEO_FRAME_STEREO_FORMAT_MONO	= 1,
+        D3D12_VIDEO_FRAME_STEREO_FORMAT_HORIZONTAL	= 2,
+        D3D12_VIDEO_FRAME_STEREO_FORMAT_VERTICAL	= 3,
+        D3D12_VIDEO_FRAME_STEREO_FORMAT_SEPARATE	= 4
+    } 	D3D12_VIDEO_FRAME_STEREO_FORMAT;
+
+typedef struct D3D12_VIDEO_FORMAT
+    {
+    DXGI_FORMAT Format;
+    DXGI_COLOR_SPACE_TYPE ColorSpace;
+    } 	D3D12_VIDEO_FORMAT;
+
+typedef struct D3D12_VIDEO_SAMPLE
+    {
+    UINT Width;
+    UINT Height;
+    D3D12_VIDEO_FORMAT Format;
+    } 	D3D12_VIDEO_SAMPLE;
+
+typedef 
+enum D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE
+    {
+        D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE_NONE	= 0,
+        D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE_FIELD_BASED	= 1
+    } 	D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE;
+
+typedef 
+enum D3D12_FEATURE_VIDEO
+    {
+        D3D12_FEATURE_VIDEO_DECODE_SUPPORT	= 0,
+        D3D12_FEATURE_VIDEO_DECODE_PROFILES	= 1,
+        D3D12_FEATURE_VIDEO_DECODE_FORMATS	= 2,
+        D3D12_FEATURE_VIDEO_DECODE_CONVERSION_SUPPORT	= 3,
+        D3D12_FEATURE_VIDEO_PROCESS_SUPPORT	= 5,
+        D3D12_FEATURE_VIDEO_PROCESS_MAX_INPUT_STREAMS	= 6,
+        D3D12_FEATURE_VIDEO_PROCESS_REFERENCE_INFO	= 7,
+        D3D12_FEATURE_VIDEO_DECODER_HEAP_SIZE	= 8,
+        D3D12_FEATURE_VIDEO_PROCESSOR_SIZE	= 9,
+        D3D12_FEATURE_VIDEO_DECODE_PROFILE_COUNT	= 10,
+        D3D12_FEATURE_VIDEO_DECODE_FORMAT_COUNT	= 11,
+        D3D12_FEATURE_VIDEO_ARCHITECTURE	= 17,
+        D3D12_FEATURE_VIDEO_DECODE_HISTOGRAM	= 18
+    } 	D3D12_FEATURE_VIDEO;
+
+typedef 
+enum D3D12_BITSTREAM_ENCRYPTION_TYPE
+    {
+        D3D12_BITSTREAM_ENCRYPTION_TYPE_NONE	= 0
+    } 	D3D12_BITSTREAM_ENCRYPTION_TYPE;
+
+typedef struct D3D12_VIDEO_DECODE_CONFIGURATION
+    {
+    GUID DecodeProfile;
+    D3D12_BITSTREAM_ENCRYPTION_TYPE BitstreamEncryption;
+    D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE InterlaceType;
+    } 	D3D12_VIDEO_DECODE_CONFIGURATION;
+
+typedef struct D3D12_VIDEO_DECODER_DESC
+    {
+    UINT NodeMask;
+    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
+    } 	D3D12_VIDEO_DECODER_DESC;
+
+typedef struct D3D12_VIDEO_DECODER_HEAP_DESC
+    {
+    UINT NodeMask;
+    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
+    UINT DecodeWidth;
+    UINT DecodeHeight;
+    DXGI_FORMAT Format;
+    DXGI_RATIONAL FrameRate;
+    UINT BitRate;
+    UINT MaxDecodePictureBufferCount;
+    } 	D3D12_VIDEO_DECODER_HEAP_DESC;
+
+typedef struct D3D12_VIDEO_SIZE_RANGE
+    {
+    UINT MaxWidth;
+    UINT MaxHeight;
+    UINT MinWidth;
+    UINT MinHeight;
+    } 	D3D12_VIDEO_SIZE_RANGE;
+
+typedef 
+enum D3D12_VIDEO_PROCESS_FILTER
+    {
+        D3D12_VIDEO_PROCESS_FILTER_BRIGHTNESS	= 0,
+        D3D12_VIDEO_PROCESS_FILTER_CONTRAST	= 1,
+        D3D12_VIDEO_PROCESS_FILTER_HUE	= 2,
+        D3D12_VIDEO_PROCESS_FILTER_SATURATION	= 3,
+        D3D12_VIDEO_PROCESS_FILTER_NOISE_REDUCTION	= 4,
+        D3D12_VIDEO_PROCESS_FILTER_EDGE_ENHANCEMENT	= 5,
+        D3D12_VIDEO_PROCESS_FILTER_ANAMORPHIC_SCALING	= 6,
+        D3D12_VIDEO_PROCESS_FILTER_STEREO_ADJUSTMENT	= 7
+    } 	D3D12_VIDEO_PROCESS_FILTER;
+
+typedef 
+enum D3D12_VIDEO_PROCESS_FILTER_FLAGS
+    {
+        D3D12_VIDEO_PROCESS_FILTER_FLAG_NONE	= 0,
+        D3D12_VIDEO_PROCESS_FILTER_FLAG_BRIGHTNESS	= ( 1 << D3D12_VIDEO_PROCESS_FILTER_BRIGHTNESS ) ,
+        D3D12_VIDEO_PROCESS_FILTER_FLAG_CONTRAST	= ( 1 << D3D12_VIDEO_PROCESS_FILTER_CONTRAST ) ,
+        D3D12_VIDEO_PROCESS_FILTER_FLAG_HUE	= ( 1 << D3D12_VIDEO_PROCESS_FILTER_HUE ) ,
+        D3D12_VIDEO_PROCESS_FILTER_FLAG_SATURATION	= ( 1 << D3D12_VIDEO_PROCESS_FILTER_SATURATION ) ,
+        D3D12_VIDEO_PROCESS_FILTER_FLAG_NOISE_REDUCTION	= ( 1 << D3D12_VIDEO_PROCESS_FILTER_NOISE_REDUCTION ) ,
+        D3D12_VIDEO_PROCESS_FILTER_FLAG_EDGE_ENHANCEMENT	= ( 1 << D3D12_VIDEO_PROCESS_FILTER_EDGE_ENHANCEMENT ) ,
+        D3D12_VIDEO_PROCESS_FILTER_FLAG_ANAMORPHIC_SCALING	= ( 1 << D3D12_VIDEO_PROCESS_FILTER_ANAMORPHIC_SCALING ) ,
+        D3D12_VIDEO_PROCESS_FILTER_FLAG_STEREO_ADJUSTMENT	= ( 1 << D3D12_VIDEO_PROCESS_FILTER_STEREO_ADJUSTMENT ) 
+    } 	D3D12_VIDEO_PROCESS_FILTER_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_FILTER_FLAGS );
+typedef 
+enum D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS
+    {
+        D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_NONE	= 0,
+        D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_BOB	= 0x1,
+        D3D12_VIDEO_PROCESS_DEINTERLACE_FLAG_CUSTOM	= 0x80000000
+    } 	D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS );
+typedef struct D3D12_VIDEO_PROCESS_ALPHA_BLENDING
+    {
+    BOOL Enable;
+    FLOAT Alpha;
+    } 	D3D12_VIDEO_PROCESS_ALPHA_BLENDING;
+
+typedef struct D3D12_VIDEO_PROCESS_LUMA_KEY
+    {
+    BOOL Enable;
+    FLOAT Lower;
+    FLOAT Upper;
+    } 	D3D12_VIDEO_PROCESS_LUMA_KEY;
+
+typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC
+    {
+    DXGI_FORMAT Format;
+    DXGI_COLOR_SPACE_TYPE ColorSpace;
+    DXGI_RATIONAL SourceAspectRatio;
+    DXGI_RATIONAL DestinationAspectRatio;
+    DXGI_RATIONAL FrameRate;
+    D3D12_VIDEO_SIZE_RANGE SourceSizeRange;
+    D3D12_VIDEO_SIZE_RANGE DestinationSizeRange;
+    BOOL EnableOrientation;
+    D3D12_VIDEO_PROCESS_FILTER_FLAGS FilterFlags;
+    D3D12_VIDEO_FRAME_STEREO_FORMAT StereoFormat;
+    D3D12_VIDEO_FIELD_TYPE FieldType;
+    D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceMode;
+    BOOL EnableAlphaBlending;
+    D3D12_VIDEO_PROCESS_LUMA_KEY LumaKey;
+    UINT NumPastFrames;
+    UINT NumFutureFrames;
+    BOOL EnableAutoProcessing;
+    } 	D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC;
+
+typedef 
+enum D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE
+    {
+        D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_OPAQUE	= 0,
+        D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_BACKGROUND	= 1,
+        D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_DESTINATION	= 2,
+        D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE_SOURCE_STREAM	= 3
+    } 	D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE;
+
+typedef struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC
+    {
+    DXGI_FORMAT Format;
+    DXGI_COLOR_SPACE_TYPE ColorSpace;
+    D3D12_VIDEO_PROCESS_ALPHA_FILL_MODE AlphaFillMode;
+    UINT AlphaFillModeSourceStreamIndex;
+    FLOAT BackgroundColor[ 4 ];
+    DXGI_RATIONAL FrameRate;
+    BOOL EnableStereo;
+    } 	D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0000_v0_0_s_ifspec;
+
+#ifndef __ID3D12VideoDecoderHeap_INTERFACE_DEFINED__
+#define __ID3D12VideoDecoderHeap_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoDecoderHeap */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoDecoderHeap;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("0946B7C9-EBF6-4047-BB73-8683E27DBB1F")
+    ID3D12VideoDecoderHeap : public ID3D12Pageable
+    {
+    public:
+        virtual D3D12_VIDEO_DECODER_HEAP_DESC STDMETHODCALLTYPE GetDesc( void) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoDecoderHeapVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoDecoderHeap * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoDecoderHeap * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoDecoderHeap * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12VideoDecoderHeap * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12VideoDecoderHeap * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12VideoDecoderHeap * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12VideoDecoderHeap * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12VideoDecoderHeap * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        D3D12_VIDEO_DECODER_HEAP_DESC ( STDMETHODCALLTYPE *GetDesc )( 
+            ID3D12VideoDecoderHeap * This);
+        
+        END_INTERFACE
+    } ID3D12VideoDecoderHeapVtbl;
+
+    interface ID3D12VideoDecoderHeap
+    {
+        CONST_VTBL struct ID3D12VideoDecoderHeapVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoDecoderHeap_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoDecoderHeap_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoDecoderHeap_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoDecoderHeap_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12VideoDecoderHeap_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12VideoDecoderHeap_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12VideoDecoderHeap_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12VideoDecoderHeap_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+
+#define ID3D12VideoDecoderHeap_GetDesc(This)	\
+    ( (This)->lpVtbl -> GetDesc(This) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+
+
+
+
+#endif 	/* __ID3D12VideoDecoderHeap_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12VideoDevice_INTERFACE_DEFINED__
+#define __ID3D12VideoDevice_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoDevice */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoDevice;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("1F052807-0B46-4ACC-8A89-364F793718A4")
+    ID3D12VideoDevice : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport( 
+            D3D12_FEATURE_VIDEO FeatureVideo,
+            _Inout_updates_bytes_(FeatureSupportDataSize)  void *pFeatureSupportData,
+            UINT FeatureSupportDataSize) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoder( 
+            _In_  const D3D12_VIDEO_DECODER_DESC *pDesc,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppVideoDecoder) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoderHeap( 
+            _In_  const D3D12_VIDEO_DECODER_HEAP_DESC *pVideoDecoderHeapDesc,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppVideoDecoderHeap) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessor( 
+            UINT NodeMask,
+            _In_  const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC *pOutputStreamDesc,
+            UINT NumInputStreamDescs,
+            _In_reads_(NumInputStreamDescs)  const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppVideoProcessor) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoDeviceVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoDevice * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoDevice * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoDevice * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( 
+            ID3D12VideoDevice * This,
+            D3D12_FEATURE_VIDEO FeatureVideo,
+            _Inout_updates_bytes_(FeatureSupportDataSize)  void *pFeatureSupportData,
+            UINT FeatureSupportDataSize);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateVideoDecoder )( 
+            ID3D12VideoDevice * This,
+            _In_  const D3D12_VIDEO_DECODER_DESC *pDesc,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppVideoDecoder);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateVideoDecoderHeap )( 
+            ID3D12VideoDevice * This,
+            _In_  const D3D12_VIDEO_DECODER_HEAP_DESC *pVideoDecoderHeapDesc,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppVideoDecoderHeap);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessor )( 
+            ID3D12VideoDevice * This,
+            UINT NodeMask,
+            _In_  const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC *pOutputStreamDesc,
+            UINT NumInputStreamDescs,
+            _In_reads_(NumInputStreamDescs)  const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs,
+            _In_  REFIID riid,
+            _COM_Outptr_  void **ppVideoProcessor);
+        
+        END_INTERFACE
+    } ID3D12VideoDeviceVtbl;
+
+    interface ID3D12VideoDevice
+    {
+        CONST_VTBL struct ID3D12VideoDeviceVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoDevice_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoDevice_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoDevice_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoDevice_CheckFeatureSupport(This,FeatureVideo,pFeatureSupportData,FeatureSupportDataSize)	\
+    ( (This)->lpVtbl -> CheckFeatureSupport(This,FeatureVideo,pFeatureSupportData,FeatureSupportDataSize) ) 
+
+#define ID3D12VideoDevice_CreateVideoDecoder(This,pDesc,riid,ppVideoDecoder)	\
+    ( (This)->lpVtbl -> CreateVideoDecoder(This,pDesc,riid,ppVideoDecoder) ) 
+
+#define ID3D12VideoDevice_CreateVideoDecoderHeap(This,pVideoDecoderHeapDesc,riid,ppVideoDecoderHeap)	\
+    ( (This)->lpVtbl -> CreateVideoDecoderHeap(This,pVideoDecoderHeapDesc,riid,ppVideoDecoderHeap) ) 
+
+#define ID3D12VideoDevice_CreateVideoProcessor(This,NodeMask,pOutputStreamDesc,NumInputStreamDescs,pInputStreamDescs,riid,ppVideoProcessor)	\
+    ( (This)->lpVtbl -> CreateVideoProcessor(This,NodeMask,pOutputStreamDesc,NumInputStreamDescs,pInputStreamDescs,riid,ppVideoProcessor) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12VideoDevice_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12VideoDecoder_INTERFACE_DEFINED__
+#define __ID3D12VideoDecoder_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoDecoder */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoDecoder;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("C59B6BDC-7720-4074-A136-17A156037470")
+    ID3D12VideoDecoder : public ID3D12Pageable
+    {
+    public:
+        virtual D3D12_VIDEO_DECODER_DESC STDMETHODCALLTYPE GetDesc( void) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoDecoderVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoDecoder * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoDecoder * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoDecoder * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12VideoDecoder * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12VideoDecoder * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12VideoDecoder * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12VideoDecoder * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12VideoDecoder * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        D3D12_VIDEO_DECODER_DESC ( STDMETHODCALLTYPE *GetDesc )( 
+            ID3D12VideoDecoder * This);
+        
+        END_INTERFACE
+    } ID3D12VideoDecoderVtbl;
+
+    interface ID3D12VideoDecoder
+    {
+        CONST_VTBL struct ID3D12VideoDecoderVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoDecoder_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoDecoder_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoDecoder_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoDecoder_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12VideoDecoder_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12VideoDecoder_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12VideoDecoder_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12VideoDecoder_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+
+#define ID3D12VideoDecoder_GetDesc(This)	\
+    ( (This)->lpVtbl -> GetDesc(This) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+
+
+
+
+#endif 	/* __ID3D12VideoDecoder_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12video_0000_0003 */
+/* [local] */ 
+
+typedef 
+enum D3D12_VIDEO_DECODE_TIER
+    {
+        D3D12_VIDEO_DECODE_TIER_NOT_SUPPORTED	= 0,
+        D3D12_VIDEO_DECODE_TIER_1	= 1,
+        D3D12_VIDEO_DECODE_TIER_2	= 2,
+        D3D12_VIDEO_DECODE_TIER_3	= 3
+    } 	D3D12_VIDEO_DECODE_TIER;
+
+typedef 
+enum D3D12_VIDEO_DECODE_SUPPORT_FLAGS
+    {
+        D3D12_VIDEO_DECODE_SUPPORT_FLAG_NONE	= 0,
+        D3D12_VIDEO_DECODE_SUPPORT_FLAG_SUPPORTED	= 0x1
+    } 	D3D12_VIDEO_DECODE_SUPPORT_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_DECODE_SUPPORT_FLAGS );
+typedef 
+enum D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS
+    {
+        D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_NONE	= 0,
+        D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_HEIGHT_ALIGNMENT_MULTIPLE_32_REQUIRED	= 0x1,
+        D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_POST_PROCESSING_SUPPORTED	= 0x2,
+        D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_REFERENCE_ONLY_ALLOCATIONS_REQUIRED	= 0x4,
+        D3D12_VIDEO_DECODE_CONFIGURATION_FLAG_ALLOW_RESOLUTION_CHANGE_ON_NON_KEY_FRAME	= 0x8
+    } 	D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS );
+typedef 
+enum D3D12_VIDEO_DECODE_STATUS
+    {
+        D3D12_VIDEO_DECODE_STATUS_OK	= 0,
+        D3D12_VIDEO_DECODE_STATUS_CONTINUE	= 1,
+        D3D12_VIDEO_DECODE_STATUS_CONTINUE_SKIP_DISPLAY	= 2,
+        D3D12_VIDEO_DECODE_STATUS_RESTART	= 3
+    } 	D3D12_VIDEO_DECODE_STATUS;
+
+typedef 
+enum D3D12_VIDEO_DECODE_ARGUMENT_TYPE
+    {
+        D3D12_VIDEO_DECODE_ARGUMENT_TYPE_PICTURE_PARAMETERS	= 0,
+        D3D12_VIDEO_DECODE_ARGUMENT_TYPE_INVERSE_QUANTIZATION_MATRIX	= 1,
+        D3D12_VIDEO_DECODE_ARGUMENT_TYPE_SLICE_CONTROL	= 2,
+        D3D12_VIDEO_DECODE_ARGUMENT_TYPE_MAX_VALID	= 3
+    } 	D3D12_VIDEO_DECODE_ARGUMENT_TYPE;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_SUPPORT
+    {
+    UINT NodeIndex;
+    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
+    UINT Width;
+    UINT Height;
+    DXGI_FORMAT DecodeFormat;
+    DXGI_RATIONAL FrameRate;
+    UINT BitRate;
+    D3D12_VIDEO_DECODE_SUPPORT_FLAGS SupportFlags;
+    D3D12_VIDEO_DECODE_CONFIGURATION_FLAGS ConfigurationFlags;
+    D3D12_VIDEO_DECODE_TIER DecodeTier;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODE_SUPPORT;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILE_COUNT
+    {
+    UINT NodeIndex;
+    UINT ProfileCount;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILE_COUNT;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILES
+    {
+    UINT NodeIndex;
+    UINT ProfileCount;
+    _Field_size_full_(ProfileCount)  GUID *pProfiles;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODE_PROFILES;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT
+    {
+    UINT NodeIndex;
+    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
+    UINT FormatCount;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS
+    {
+    UINT NodeIndex;
+    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
+    UINT FormatCount;
+    _Field_size_full_(FormatCount)  DXGI_FORMAT *pOutputFormats;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODE_FORMATS;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_ARCHITECTURE
+    {
+    BOOL IOCoherent;
+    } 	D3D12_FEATURE_DATA_VIDEO_ARCHITECTURE;
+
+typedef 
+enum D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT
+    {
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_Y	= 0,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_U	= 1,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_V	= 2,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_R	= 0,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_G	= 1,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_B	= 2,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_A	= 3
+    } 	D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT;
+
+typedef 
+enum D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS
+    {
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_NONE	= 0,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_Y	= ( 1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_Y ) ,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_U	= ( 1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_U ) ,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_V	= ( 1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_V ) ,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_R	= ( 1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_R ) ,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_G	= ( 1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_G ) ,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_B	= ( 1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_B ) ,
+        D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAG_A	= ( 1 << D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_A ) 
+    } 	D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS );
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM
+    {
+    UINT NodeIndex;
+    GUID DecodeProfile;
+    UINT Width;
+    UINT Height;
+    DXGI_FORMAT DecodeFormat;
+    D3D12_VIDEO_DECODE_HISTOGRAM_COMPONENT_FLAGS Components;
+    UINT BinCount;
+    UINT CounterBitDepth;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODE_HISTOGRAM;
+
+typedef 
+enum D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS
+    {
+        D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAG_NONE	= 0,
+        D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAG_SUPPORTED	= 0x1
+    } 	D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS );
+typedef 
+enum D3D12_VIDEO_SCALE_SUPPORT_FLAGS
+    {
+        D3D12_VIDEO_SCALE_SUPPORT_FLAG_NONE	= 0,
+        D3D12_VIDEO_SCALE_SUPPORT_FLAG_POW2_ONLY	= 0x1,
+        D3D12_VIDEO_SCALE_SUPPORT_FLAG_EVEN_DIMENSIONS_ONLY	= 0x2
+    } 	D3D12_VIDEO_SCALE_SUPPORT_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_SCALE_SUPPORT_FLAGS );
+typedef struct D3D12_VIDEO_SCALE_SUPPORT
+    {
+    D3D12_VIDEO_SIZE_RANGE OutputSizeRange;
+    D3D12_VIDEO_SCALE_SUPPORT_FLAGS Flags;
+    } 	D3D12_VIDEO_SCALE_SUPPORT;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_CONVERSION_SUPPORT
+    {
+    UINT NodeIndex;
+    D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
+    D3D12_VIDEO_SAMPLE DecodeSample;
+    D3D12_VIDEO_FORMAT OutputFormat;
+    DXGI_RATIONAL FrameRate;
+    UINT BitRate;
+    D3D12_VIDEO_DECODE_CONVERSION_SUPPORT_FLAGS SupportFlags;
+    D3D12_VIDEO_SCALE_SUPPORT ScaleSupport;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODE_CONVERSION_SUPPORT;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_DECODER_HEAP_SIZE
+    {
+    D3D12_VIDEO_DECODER_HEAP_DESC VideoDecoderHeapDesc;
+    UINT64 MemoryPoolL0Size;
+    UINT64 MemoryPoolL1Size;
+    } 	D3D12_FEATURE_DATA_VIDEO_DECODER_HEAP_SIZE;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE
+    {
+    UINT NodeMask;
+    const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC *pOutputStreamDesc;
+    UINT NumInputStreamDescs;
+    const D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs;
+    UINT64 MemoryPoolL0Size;
+    UINT64 MemoryPoolL1Size;
+    } 	D3D12_FEATURE_DATA_VIDEO_PROCESSOR_SIZE;
+
+typedef struct D3D12_QUERY_DATA_VIDEO_DECODE_STATISTICS
+    {
+    UINT64 Status;
+    UINT64 NumMacroblocksAffected;
+    DXGI_RATIONAL FrameRate;
+    UINT BitRate;
+    } 	D3D12_QUERY_DATA_VIDEO_DECODE_STATISTICS;
+
+typedef struct D3D12_VIDEO_DECODE_SUB_SAMPLE_MAPPING_BLOCK
+    {
+    UINT ClearSize;
+    UINT EncryptedSize;
+    } 	D3D12_VIDEO_DECODE_SUB_SAMPLE_MAPPING_BLOCK;
+
+typedef struct D3D12_VIDEO_DECODE_FRAME_ARGUMENT
+    {
+    D3D12_VIDEO_DECODE_ARGUMENT_TYPE Type;
+    UINT Size;
+    _Field_size_bytes_full_(Size)  void *pData;
+    } 	D3D12_VIDEO_DECODE_FRAME_ARGUMENT;
+
+typedef struct D3D12_VIDEO_DECODE_REFERENCE_FRAMES
+    {
+    UINT NumTexture2Ds;
+    _Field_size_full_(NumTexture2Ds)  ID3D12Resource **ppTexture2Ds;
+    _Field_size_full_(NumTexture2Ds)  UINT *pSubresources;
+    _Field_size_full_opt_(NumTexture2Ds)  ID3D12VideoDecoderHeap **ppHeaps;
+    } 	D3D12_VIDEO_DECODE_REFERENCE_FRAMES;
+
+typedef struct D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM
+    {
+    ID3D12Resource *pBuffer;
+    UINT64 Offset;
+    UINT64 Size;
+    } 	D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM;
+
+typedef struct D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS
+    {
+    BOOL Enable;
+    ID3D12Resource *pReferenceTexture2D;
+    UINT ReferenceSubresource;
+    DXGI_COLOR_SPACE_TYPE OutputColorSpace;
+    DXGI_COLOR_SPACE_TYPE DecodeColorSpace;
+    } 	D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS;
+
+typedef struct D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS
+    {
+    UINT NumFrameArguments;
+    D3D12_VIDEO_DECODE_FRAME_ARGUMENT FrameArguments[ 10 ];
+    D3D12_VIDEO_DECODE_REFERENCE_FRAMES ReferenceFrames;
+    D3D12_VIDEO_DECODE_COMPRESSED_BITSTREAM CompressedBitstream;
+    ID3D12VideoDecoderHeap *pHeap;
+    } 	D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS;
+
+typedef struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS
+    {
+    ID3D12Resource *pOutputTexture2D;
+    UINT OutputSubresource;
+    D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS ConversionArguments;
+    } 	D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0003_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0003_v0_0_s_ifspec;
+
+#ifndef __ID3D12VideoProcessor_INTERFACE_DEFINED__
+#define __ID3D12VideoProcessor_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoProcessor */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoProcessor;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("304FDB32-BEDE-410A-8545-943AC6A46138")
+    ID3D12VideoProcessor : public ID3D12Pageable
+    {
+    public:
+        virtual UINT STDMETHODCALLTYPE GetNodeMask( void) = 0;
+        
+        virtual UINT STDMETHODCALLTYPE GetNumInputStreamDescs( void) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetInputStreamDescs( 
+            UINT NumInputStreamDescs,
+            _Out_writes_(NumInputStreamDescs)  D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs) = 0;
+        
+        virtual D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC STDMETHODCALLTYPE GetOutputStreamDesc( void) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoProcessorVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoProcessor * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoProcessor * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoProcessor * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12VideoProcessor * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12VideoProcessor * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12VideoProcessor * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12VideoProcessor * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12VideoProcessor * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        UINT ( STDMETHODCALLTYPE *GetNodeMask )( 
+            ID3D12VideoProcessor * This);
+        
+        UINT ( STDMETHODCALLTYPE *GetNumInputStreamDescs )( 
+            ID3D12VideoProcessor * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetInputStreamDescs )( 
+            ID3D12VideoProcessor * This,
+            UINT NumInputStreamDescs,
+            _Out_writes_(NumInputStreamDescs)  D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC *pInputStreamDescs);
+        
+        D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC ( STDMETHODCALLTYPE *GetOutputStreamDesc )( 
+            ID3D12VideoProcessor * This);
+        
+        END_INTERFACE
+    } ID3D12VideoProcessorVtbl;
+
+    interface ID3D12VideoProcessor
+    {
+        CONST_VTBL struct ID3D12VideoProcessorVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoProcessor_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoProcessor_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoProcessor_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoProcessor_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12VideoProcessor_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12VideoProcessor_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12VideoProcessor_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12VideoProcessor_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+
+#define ID3D12VideoProcessor_GetNodeMask(This)	\
+    ( (This)->lpVtbl -> GetNodeMask(This) ) 
+
+#define ID3D12VideoProcessor_GetNumInputStreamDescs(This)	\
+    ( (This)->lpVtbl -> GetNumInputStreamDescs(This) ) 
+
+#define ID3D12VideoProcessor_GetInputStreamDescs(This,NumInputStreamDescs,pInputStreamDescs)	\
+    ( (This)->lpVtbl -> GetInputStreamDescs(This,NumInputStreamDescs,pInputStreamDescs) ) 
+
+#define ID3D12VideoProcessor_GetOutputStreamDesc(This)	\
+    ( (This)->lpVtbl -> GetOutputStreamDesc(This) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+
+
+
+
+#endif 	/* __ID3D12VideoProcessor_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12video_0000_0004 */
+/* [local] */ 
+
+typedef 
+enum D3D12_VIDEO_PROCESS_FEATURE_FLAGS
+    {
+        D3D12_VIDEO_PROCESS_FEATURE_FLAG_NONE	= 0,
+        D3D12_VIDEO_PROCESS_FEATURE_FLAG_ALPHA_FILL	= 0x1,
+        D3D12_VIDEO_PROCESS_FEATURE_FLAG_LUMA_KEY	= 0x2,
+        D3D12_VIDEO_PROCESS_FEATURE_FLAG_STEREO	= 0x4,
+        D3D12_VIDEO_PROCESS_FEATURE_FLAG_ROTATION	= 0x8,
+        D3D12_VIDEO_PROCESS_FEATURE_FLAG_FLIP	= 0x10,
+        D3D12_VIDEO_PROCESS_FEATURE_FLAG_ALPHA_BLENDING	= 0x20,
+        D3D12_VIDEO_PROCESS_FEATURE_FLAG_PIXEL_ASPECT_RATIO	= 0x40
+    } 	D3D12_VIDEO_PROCESS_FEATURE_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_FEATURE_FLAGS );
+typedef 
+enum D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS
+    {
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_NONE	= 0,
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_DENOISE	= 0x1,
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_DERINGING	= 0x2,
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_EDGE_ENHANCEMENT	= 0x4,
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_COLOR_CORRECTION	= 0x8,
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_FLESH_TONE_MAPPING	= 0x10,
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_IMAGE_STABILIZATION	= 0x20,
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_SUPER_RESOLUTION	= 0x40,
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_ANAMORPHIC_SCALING	= 0x80,
+        D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAG_CUSTOM	= 0x80000000
+    } 	D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS );
+typedef 
+enum D3D12_VIDEO_PROCESS_ORIENTATION
+    {
+        D3D12_VIDEO_PROCESS_ORIENTATION_DEFAULT	= 0,
+        D3D12_VIDEO_PROCESS_ORIENTATION_FLIP_HORIZONTAL	= 1,
+        D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_90	= 2,
+        D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_90_FLIP_HORIZONTAL	= 3,
+        D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_180	= 4,
+        D3D12_VIDEO_PROCESS_ORIENTATION_FLIP_VERTICAL	= 5,
+        D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_270	= 6,
+        D3D12_VIDEO_PROCESS_ORIENTATION_CLOCKWISE_270_FLIP_HORIZONTAL	= 7
+    } 	D3D12_VIDEO_PROCESS_ORIENTATION;
+
+typedef 
+enum D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS
+    {
+        D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_NONE	= 0,
+        D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_FRAME_DISCONTINUITY	= 0x1,
+        D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAG_FRAME_REPEAT	= 0x2
+    } 	D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS );
+typedef struct D3D12_VIDEO_PROCESS_FILTER_RANGE
+    {
+    INT Minimum;
+    INT Maximum;
+    INT Default;
+    FLOAT Multiplier;
+    } 	D3D12_VIDEO_PROCESS_FILTER_RANGE;
+
+typedef 
+enum D3D12_VIDEO_PROCESS_SUPPORT_FLAGS
+    {
+        D3D12_VIDEO_PROCESS_SUPPORT_FLAG_NONE	= 0,
+        D3D12_VIDEO_PROCESS_SUPPORT_FLAG_SUPPORTED	= 0x1
+    } 	D3D12_VIDEO_PROCESS_SUPPORT_FLAGS;
+
+DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_PROCESS_SUPPORT_FLAGS );
+typedef struct D3D12_FEATURE_DATA_VIDEO_PROCESS_SUPPORT
+    {
+    UINT NodeIndex;
+    D3D12_VIDEO_SAMPLE InputSample;
+    D3D12_VIDEO_FIELD_TYPE InputFieldType;
+    D3D12_VIDEO_FRAME_STEREO_FORMAT InputStereoFormat;
+    DXGI_RATIONAL InputFrameRate;
+    D3D12_VIDEO_FORMAT OutputFormat;
+    D3D12_VIDEO_FRAME_STEREO_FORMAT OutputStereoFormat;
+    DXGI_RATIONAL OutputFrameRate;
+    D3D12_VIDEO_PROCESS_SUPPORT_FLAGS SupportFlags;
+    D3D12_VIDEO_SCALE_SUPPORT ScaleSupport;
+    D3D12_VIDEO_PROCESS_FEATURE_FLAGS FeatureSupport;
+    D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceSupport;
+    D3D12_VIDEO_PROCESS_AUTO_PROCESSING_FLAGS AutoProcessingSupport;
+    D3D12_VIDEO_PROCESS_FILTER_FLAGS FilterSupport;
+    D3D12_VIDEO_PROCESS_FILTER_RANGE FilterRangeSupport[ 32 ];
+    } 	D3D12_FEATURE_DATA_VIDEO_PROCESS_SUPPORT;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_PROCESS_MAX_INPUT_STREAMS
+    {
+    UINT NodeIndex;
+    UINT MaxInputStreams;
+    } 	D3D12_FEATURE_DATA_VIDEO_PROCESS_MAX_INPUT_STREAMS;
+
+typedef struct D3D12_FEATURE_DATA_VIDEO_PROCESS_REFERENCE_INFO
+    {
+    UINT NodeIndex;
+    D3D12_VIDEO_PROCESS_DEINTERLACE_FLAGS DeinterlaceMode;
+    D3D12_VIDEO_PROCESS_FILTER_FLAGS Filters;
+    D3D12_VIDEO_PROCESS_FEATURE_FLAGS FeatureSupport;
+    DXGI_RATIONAL InputFrameRate;
+    DXGI_RATIONAL OutputFrameRate;
+    BOOL EnableAutoProcessing;
+    UINT PastFrames;
+    UINT FutureFrames;
+    } 	D3D12_FEATURE_DATA_VIDEO_PROCESS_REFERENCE_INFO;
+
+typedef struct D3D12_VIDEO_PROCESS_REFERENCE_SET
+    {
+    UINT NumPastFrames;
+    ID3D12Resource **ppPastFrames;
+    UINT *pPastSubresources;
+    UINT NumFutureFrames;
+    ID3D12Resource **ppFutureFrames;
+    UINT *pFutureSubresources;
+    } 	D3D12_VIDEO_PROCESS_REFERENCE_SET;
+
+typedef struct D3D12_VIDEO_PROCESS_TRANSFORM
+    {
+    D3D12_RECT SourceRectangle;
+    D3D12_RECT DestinationRectangle;
+    D3D12_VIDEO_PROCESS_ORIENTATION Orientation;
+    } 	D3D12_VIDEO_PROCESS_TRANSFORM;
+
+typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE
+    {
+    UINT OutputIndex;
+    UINT InputFrameOrField;
+    } 	D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE;
+
+typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM
+    {
+    ID3D12Resource *pTexture2D;
+    UINT Subresource;
+    D3D12_VIDEO_PROCESS_REFERENCE_SET ReferenceSet;
+    } 	D3D12_VIDEO_PROCESS_INPUT_STREAM;
+
+typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS
+    {
+    D3D12_VIDEO_PROCESS_INPUT_STREAM InputStream[ 2 ];
+    D3D12_VIDEO_PROCESS_TRANSFORM Transform;
+    D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS Flags;
+    D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE RateInfo;
+    INT FilterLevels[ 32 ];
+    D3D12_VIDEO_PROCESS_ALPHA_BLENDING AlphaBlending;
+    } 	D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS;
+
+typedef struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM
+    {
+    ID3D12Resource *pTexture2D;
+    UINT Subresource;
+    } 	D3D12_VIDEO_PROCESS_OUTPUT_STREAM;
+
+typedef struct D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS
+    {
+    D3D12_VIDEO_PROCESS_OUTPUT_STREAM OutputStream[ 2 ];
+    D3D12_RECT TargetRectangle;
+    } 	D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0004_v0_0_s_ifspec;
+
+#ifndef __ID3D12VideoDecodeCommandList_INTERFACE_DEFINED__
+#define __ID3D12VideoDecodeCommandList_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoDecodeCommandList */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoDecodeCommandList;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("3B60536E-AD29-4E64-A269-F853837E5E53")
+    ID3D12VideoDecodeCommandList : public ID3D12CommandList
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Close( void) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Reset( 
+            _In_  ID3D12CommandAllocator *pAllocator) = 0;
+        
+        virtual void STDMETHODCALLTYPE ClearState( void) = 0;
+        
+        virtual void STDMETHODCALLTYPE ResourceBarrier( 
+            _In_  UINT NumBarriers,
+            _In_reads_(NumBarriers)  const D3D12_RESOURCE_BARRIER *pBarriers) = 0;
+        
+        virtual void STDMETHODCALLTYPE DiscardResource( 
+            _In_  ID3D12Resource *pResource,
+            _In_opt_  const D3D12_DISCARD_REGION *pRegion) = 0;
+        
+        virtual void STDMETHODCALLTYPE BeginQuery( 
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index) = 0;
+        
+        virtual void STDMETHODCALLTYPE EndQuery( 
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index) = 0;
+        
+        virtual void STDMETHODCALLTYPE ResolveQueryData( 
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT StartIndex,
+            _In_  UINT NumQueries,
+            _In_  ID3D12Resource *pDestinationBuffer,
+            _In_  UINT64 AlignedDestinationBufferOffset) = 0;
+        
+        virtual void STDMETHODCALLTYPE SetPredication( 
+            _In_opt_  ID3D12Resource *pBuffer,
+            _In_  UINT64 AlignedBufferOffset,
+            _In_  D3D12_PREDICATION_OP Operation) = 0;
+        
+        virtual void STDMETHODCALLTYPE SetMarker( 
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size) = 0;
+        
+        virtual void STDMETHODCALLTYPE BeginEvent( 
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size) = 0;
+        
+        virtual void STDMETHODCALLTYPE EndEvent( void) = 0;
+        
+        virtual void STDMETHODCALLTYPE DecodeFrame( 
+            _In_  ID3D12VideoDecoder *pDecoder,
+            _In_  const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            _In_  const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments) = 0;
+        
+        virtual void STDMETHODCALLTYPE WriteBufferImmediate( 
+            UINT Count,
+            _In_reads_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams,
+            _In_reads_opt_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoDecodeCommandListVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoDecodeCommandList * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoDecodeCommandList * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoDecodeCommandList * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12VideoDecodeCommandList * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( 
+            ID3D12VideoDecodeCommandList * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Close )( 
+            ID3D12VideoDecodeCommandList * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Reset )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  ID3D12CommandAllocator *pAllocator);
+        
+        void ( STDMETHODCALLTYPE *ClearState )( 
+            ID3D12VideoDecodeCommandList * This);
+        
+        void ( STDMETHODCALLTYPE *ResourceBarrier )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  UINT NumBarriers,
+            _In_reads_(NumBarriers)  const D3D12_RESOURCE_BARRIER *pBarriers);
+        
+        void ( STDMETHODCALLTYPE *DiscardResource )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  ID3D12Resource *pResource,
+            _In_opt_  const D3D12_DISCARD_REGION *pRegion);
+        
+        void ( STDMETHODCALLTYPE *BeginQuery )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *EndQuery )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *ResolveQueryData )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT StartIndex,
+            _In_  UINT NumQueries,
+            _In_  ID3D12Resource *pDestinationBuffer,
+            _In_  UINT64 AlignedDestinationBufferOffset);
+        
+        void ( STDMETHODCALLTYPE *SetPredication )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_opt_  ID3D12Resource *pBuffer,
+            _In_  UINT64 AlignedBufferOffset,
+            _In_  D3D12_PREDICATION_OP Operation);
+        
+        void ( STDMETHODCALLTYPE *SetMarker )( 
+            ID3D12VideoDecodeCommandList * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *BeginEvent )( 
+            ID3D12VideoDecodeCommandList * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *EndEvent )( 
+            ID3D12VideoDecodeCommandList * This);
+        
+        void ( STDMETHODCALLTYPE *DecodeFrame )( 
+            ID3D12VideoDecodeCommandList * This,
+            _In_  ID3D12VideoDecoder *pDecoder,
+            _In_  const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            _In_  const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments);
+        
+        void ( STDMETHODCALLTYPE *WriteBufferImmediate )( 
+            ID3D12VideoDecodeCommandList * This,
+            UINT Count,
+            _In_reads_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams,
+            _In_reads_opt_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes);
+        
+        END_INTERFACE
+    } ID3D12VideoDecodeCommandListVtbl;
+
+    interface ID3D12VideoDecodeCommandList
+    {
+        CONST_VTBL struct ID3D12VideoDecodeCommandListVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoDecodeCommandList_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoDecodeCommandList_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoDecodeCommandList_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoDecodeCommandList_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12VideoDecodeCommandList_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12VideoDecodeCommandList_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12VideoDecodeCommandList_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12VideoDecodeCommandList_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+#define ID3D12VideoDecodeCommandList_GetType(This)	\
+    ( (This)->lpVtbl -> GetType(This) ) 
+
+
+#define ID3D12VideoDecodeCommandList_Close(This)	\
+    ( (This)->lpVtbl -> Close(This) ) 
+
+#define ID3D12VideoDecodeCommandList_Reset(This,pAllocator)	\
+    ( (This)->lpVtbl -> Reset(This,pAllocator) ) 
+
+#define ID3D12VideoDecodeCommandList_ClearState(This)	\
+    ( (This)->lpVtbl -> ClearState(This) ) 
+
+#define ID3D12VideoDecodeCommandList_ResourceBarrier(This,NumBarriers,pBarriers)	\
+    ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) 
+
+#define ID3D12VideoDecodeCommandList_DiscardResource(This,pResource,pRegion)	\
+    ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) 
+
+#define ID3D12VideoDecodeCommandList_BeginQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoDecodeCommandList_EndQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoDecodeCommandList_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset)	\
+    ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) 
+
+#define ID3D12VideoDecodeCommandList_SetPredication(This,pBuffer,AlignedBufferOffset,Operation)	\
+    ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) 
+
+#define ID3D12VideoDecodeCommandList_SetMarker(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoDecodeCommandList_BeginEvent(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoDecodeCommandList_EndEvent(This)	\
+    ( (This)->lpVtbl -> EndEvent(This) ) 
+
+#define ID3D12VideoDecodeCommandList_DecodeFrame(This,pDecoder,pOutputArguments,pInputArguments)	\
+    ( (This)->lpVtbl -> DecodeFrame(This,pDecoder,pOutputArguments,pInputArguments) ) 
+
+#define ID3D12VideoDecodeCommandList_WriteBufferImmediate(This,Count,pParams,pModes)	\
+    ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12VideoDecodeCommandList_INTERFACE_DEFINED__ */
+
+
+#ifndef __ID3D12VideoProcessCommandList_INTERFACE_DEFINED__
+#define __ID3D12VideoProcessCommandList_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoProcessCommandList */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoProcessCommandList;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("AEB2543A-167F-4682-ACC8-D159ED4A6209")
+    ID3D12VideoProcessCommandList : public ID3D12CommandList
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE Close( void) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Reset( 
+            _In_  ID3D12CommandAllocator *pAllocator) = 0;
+        
+        virtual void STDMETHODCALLTYPE ClearState( void) = 0;
+        
+        virtual void STDMETHODCALLTYPE ResourceBarrier( 
+            _In_  UINT NumBarriers,
+            _In_reads_(NumBarriers)  const D3D12_RESOURCE_BARRIER *pBarriers) = 0;
+        
+        virtual void STDMETHODCALLTYPE DiscardResource( 
+            _In_  ID3D12Resource *pResource,
+            _In_opt_  const D3D12_DISCARD_REGION *pRegion) = 0;
+        
+        virtual void STDMETHODCALLTYPE BeginQuery( 
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index) = 0;
+        
+        virtual void STDMETHODCALLTYPE EndQuery( 
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index) = 0;
+        
+        virtual void STDMETHODCALLTYPE ResolveQueryData( 
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT StartIndex,
+            _In_  UINT NumQueries,
+            _In_  ID3D12Resource *pDestinationBuffer,
+            _In_  UINT64 AlignedDestinationBufferOffset) = 0;
+        
+        virtual void STDMETHODCALLTYPE SetPredication( 
+            _In_opt_  ID3D12Resource *pBuffer,
+            _In_  UINT64 AlignedBufferOffset,
+            _In_  D3D12_PREDICATION_OP Operation) = 0;
+        
+        virtual void STDMETHODCALLTYPE SetMarker( 
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size) = 0;
+        
+        virtual void STDMETHODCALLTYPE BeginEvent( 
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size) = 0;
+        
+        virtual void STDMETHODCALLTYPE EndEvent( void) = 0;
+        
+        virtual void STDMETHODCALLTYPE ProcessFrames( 
+            _In_  ID3D12VideoProcessor *pVideoProcessor,
+            _In_  const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            UINT NumInputStreams,
+            _In_reads_(NumInputStreams)  const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS *pInputArguments) = 0;
+        
+        virtual void STDMETHODCALLTYPE WriteBufferImmediate( 
+            UINT Count,
+            _In_reads_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams,
+            _In_reads_opt_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoProcessCommandListVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoProcessCommandList * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoProcessCommandList * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoProcessCommandList * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12VideoProcessCommandList * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( 
+            ID3D12VideoProcessCommandList * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Close )( 
+            ID3D12VideoProcessCommandList * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Reset )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  ID3D12CommandAllocator *pAllocator);
+        
+        void ( STDMETHODCALLTYPE *ClearState )( 
+            ID3D12VideoProcessCommandList * This);
+        
+        void ( STDMETHODCALLTYPE *ResourceBarrier )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  UINT NumBarriers,
+            _In_reads_(NumBarriers)  const D3D12_RESOURCE_BARRIER *pBarriers);
+        
+        void ( STDMETHODCALLTYPE *DiscardResource )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  ID3D12Resource *pResource,
+            _In_opt_  const D3D12_DISCARD_REGION *pRegion);
+        
+        void ( STDMETHODCALLTYPE *BeginQuery )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *EndQuery )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *ResolveQueryData )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT StartIndex,
+            _In_  UINT NumQueries,
+            _In_  ID3D12Resource *pDestinationBuffer,
+            _In_  UINT64 AlignedDestinationBufferOffset);
+        
+        void ( STDMETHODCALLTYPE *SetPredication )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_opt_  ID3D12Resource *pBuffer,
+            _In_  UINT64 AlignedBufferOffset,
+            _In_  D3D12_PREDICATION_OP Operation);
+        
+        void ( STDMETHODCALLTYPE *SetMarker )( 
+            ID3D12VideoProcessCommandList * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *BeginEvent )( 
+            ID3D12VideoProcessCommandList * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *EndEvent )( 
+            ID3D12VideoProcessCommandList * This);
+        
+        void ( STDMETHODCALLTYPE *ProcessFrames )( 
+            ID3D12VideoProcessCommandList * This,
+            _In_  ID3D12VideoProcessor *pVideoProcessor,
+            _In_  const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            UINT NumInputStreams,
+            _In_reads_(NumInputStreams)  const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS *pInputArguments);
+        
+        void ( STDMETHODCALLTYPE *WriteBufferImmediate )( 
+            ID3D12VideoProcessCommandList * This,
+            UINT Count,
+            _In_reads_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams,
+            _In_reads_opt_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes);
+        
+        END_INTERFACE
+    } ID3D12VideoProcessCommandListVtbl;
+
+    interface ID3D12VideoProcessCommandList
+    {
+        CONST_VTBL struct ID3D12VideoProcessCommandListVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoProcessCommandList_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoProcessCommandList_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoProcessCommandList_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoProcessCommandList_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12VideoProcessCommandList_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12VideoProcessCommandList_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12VideoProcessCommandList_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12VideoProcessCommandList_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+#define ID3D12VideoProcessCommandList_GetType(This)	\
+    ( (This)->lpVtbl -> GetType(This) ) 
+
+
+#define ID3D12VideoProcessCommandList_Close(This)	\
+    ( (This)->lpVtbl -> Close(This) ) 
+
+#define ID3D12VideoProcessCommandList_Reset(This,pAllocator)	\
+    ( (This)->lpVtbl -> Reset(This,pAllocator) ) 
+
+#define ID3D12VideoProcessCommandList_ClearState(This)	\
+    ( (This)->lpVtbl -> ClearState(This) ) 
+
+#define ID3D12VideoProcessCommandList_ResourceBarrier(This,NumBarriers,pBarriers)	\
+    ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) 
+
+#define ID3D12VideoProcessCommandList_DiscardResource(This,pResource,pRegion)	\
+    ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) 
+
+#define ID3D12VideoProcessCommandList_BeginQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoProcessCommandList_EndQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoProcessCommandList_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset)	\
+    ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) 
+
+#define ID3D12VideoProcessCommandList_SetPredication(This,pBuffer,AlignedBufferOffset,Operation)	\
+    ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) 
+
+#define ID3D12VideoProcessCommandList_SetMarker(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoProcessCommandList_BeginEvent(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoProcessCommandList_EndEvent(This)	\
+    ( (This)->lpVtbl -> EndEvent(This) ) 
+
+#define ID3D12VideoProcessCommandList_ProcessFrames(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments)	\
+    ( (This)->lpVtbl -> ProcessFrames(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments) ) 
+
+#define ID3D12VideoProcessCommandList_WriteBufferImmediate(This,Count,pParams,pModes)	\
+    ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12VideoProcessCommandList_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12video_0000_0006 */
+/* [local] */ 
+
+typedef struct D3D12_VIDEO_DECODE_OUTPUT_HISTOGRAM
+    {
+    UINT64 Offset;
+    ID3D12Resource *pBuffer;
+    } 	D3D12_VIDEO_DECODE_OUTPUT_HISTOGRAM;
+
+typedef struct D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS1
+    {
+    BOOL Enable;
+    ID3D12Resource *pReferenceTexture2D;
+    UINT ReferenceSubresource;
+    DXGI_COLOR_SPACE_TYPE OutputColorSpace;
+    DXGI_COLOR_SPACE_TYPE DecodeColorSpace;
+    UINT OutputWidth;
+    UINT OutputHeight;
+    } 	D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS1;
+
+typedef struct D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1
+    {
+    ID3D12Resource *pOutputTexture2D;
+    UINT OutputSubresource;
+    D3D12_VIDEO_DECODE_CONVERSION_ARGUMENTS1 ConversionArguments;
+    D3D12_VIDEO_DECODE_OUTPUT_HISTOGRAM Histograms[ 4 ];
+    } 	D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0006_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0006_v0_0_s_ifspec;
+
+#ifndef __ID3D12VideoDecodeCommandList1_INTERFACE_DEFINED__
+#define __ID3D12VideoDecodeCommandList1_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoDecodeCommandList1 */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoDecodeCommandList1;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("D52F011B-B56E-453C-A05A-A7F311C8F472")
+    ID3D12VideoDecodeCommandList1 : public ID3D12VideoDecodeCommandList
+    {
+    public:
+        virtual void STDMETHODCALLTYPE DecodeFrame1( 
+            _In_  ID3D12VideoDecoder *pDecoder,
+            _In_  const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1 *pOutputArguments,
+            _In_  const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoDecodeCommandList1Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoDecodeCommandList1 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoDecodeCommandList1 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( 
+            ID3D12VideoDecodeCommandList1 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Close )( 
+            ID3D12VideoDecodeCommandList1 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Reset )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  ID3D12CommandAllocator *pAllocator);
+        
+        void ( STDMETHODCALLTYPE *ClearState )( 
+            ID3D12VideoDecodeCommandList1 * This);
+        
+        void ( STDMETHODCALLTYPE *ResourceBarrier )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  UINT NumBarriers,
+            _In_reads_(NumBarriers)  const D3D12_RESOURCE_BARRIER *pBarriers);
+        
+        void ( STDMETHODCALLTYPE *DiscardResource )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  ID3D12Resource *pResource,
+            _In_opt_  const D3D12_DISCARD_REGION *pRegion);
+        
+        void ( STDMETHODCALLTYPE *BeginQuery )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *EndQuery )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *ResolveQueryData )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT StartIndex,
+            _In_  UINT NumQueries,
+            _In_  ID3D12Resource *pDestinationBuffer,
+            _In_  UINT64 AlignedDestinationBufferOffset);
+        
+        void ( STDMETHODCALLTYPE *SetPredication )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_opt_  ID3D12Resource *pBuffer,
+            _In_  UINT64 AlignedBufferOffset,
+            _In_  D3D12_PREDICATION_OP Operation);
+        
+        void ( STDMETHODCALLTYPE *SetMarker )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *BeginEvent )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *EndEvent )( 
+            ID3D12VideoDecodeCommandList1 * This);
+        
+        void ( STDMETHODCALLTYPE *DecodeFrame )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  ID3D12VideoDecoder *pDecoder,
+            _In_  const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            _In_  const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments);
+        
+        void ( STDMETHODCALLTYPE *WriteBufferImmediate )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            UINT Count,
+            _In_reads_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams,
+            _In_reads_opt_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes);
+        
+        void ( STDMETHODCALLTYPE *DecodeFrame1 )( 
+            ID3D12VideoDecodeCommandList1 * This,
+            _In_  ID3D12VideoDecoder *pDecoder,
+            _In_  const D3D12_VIDEO_DECODE_OUTPUT_STREAM_ARGUMENTS1 *pOutputArguments,
+            _In_  const D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *pInputArguments);
+        
+        END_INTERFACE
+    } ID3D12VideoDecodeCommandList1Vtbl;
+
+    interface ID3D12VideoDecodeCommandList1
+    {
+        CONST_VTBL struct ID3D12VideoDecodeCommandList1Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoDecodeCommandList1_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoDecodeCommandList1_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoDecodeCommandList1_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoDecodeCommandList1_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12VideoDecodeCommandList1_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12VideoDecodeCommandList1_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12VideoDecodeCommandList1_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12VideoDecodeCommandList1_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+#define ID3D12VideoDecodeCommandList1_GetType(This)	\
+    ( (This)->lpVtbl -> GetType(This) ) 
+
+
+#define ID3D12VideoDecodeCommandList1_Close(This)	\
+    ( (This)->lpVtbl -> Close(This) ) 
+
+#define ID3D12VideoDecodeCommandList1_Reset(This,pAllocator)	\
+    ( (This)->lpVtbl -> Reset(This,pAllocator) ) 
+
+#define ID3D12VideoDecodeCommandList1_ClearState(This)	\
+    ( (This)->lpVtbl -> ClearState(This) ) 
+
+#define ID3D12VideoDecodeCommandList1_ResourceBarrier(This,NumBarriers,pBarriers)	\
+    ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) 
+
+#define ID3D12VideoDecodeCommandList1_DiscardResource(This,pResource,pRegion)	\
+    ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) 
+
+#define ID3D12VideoDecodeCommandList1_BeginQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoDecodeCommandList1_EndQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoDecodeCommandList1_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset)	\
+    ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) 
+
+#define ID3D12VideoDecodeCommandList1_SetPredication(This,pBuffer,AlignedBufferOffset,Operation)	\
+    ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) 
+
+#define ID3D12VideoDecodeCommandList1_SetMarker(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoDecodeCommandList1_BeginEvent(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoDecodeCommandList1_EndEvent(This)	\
+    ( (This)->lpVtbl -> EndEvent(This) ) 
+
+#define ID3D12VideoDecodeCommandList1_DecodeFrame(This,pDecoder,pOutputArguments,pInputArguments)	\
+    ( (This)->lpVtbl -> DecodeFrame(This,pDecoder,pOutputArguments,pInputArguments) ) 
+
+#define ID3D12VideoDecodeCommandList1_WriteBufferImmediate(This,Count,pParams,pModes)	\
+    ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) 
+
+
+#define ID3D12VideoDecodeCommandList1_DecodeFrame1(This,pDecoder,pOutputArguments,pInputArguments)	\
+    ( (This)->lpVtbl -> DecodeFrame1(This,pDecoder,pOutputArguments,pInputArguments) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12VideoDecodeCommandList1_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12video_0000_0007 */
+/* [local] */ 
+
+typedef struct D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1
+    {
+    D3D12_VIDEO_PROCESS_INPUT_STREAM InputStream[ 2 ];
+    D3D12_VIDEO_PROCESS_TRANSFORM Transform;
+    D3D12_VIDEO_PROCESS_INPUT_STREAM_FLAGS Flags;
+    D3D12_VIDEO_PROCESS_INPUT_STREAM_RATE RateInfo;
+    INT FilterLevels[ 32 ];
+    D3D12_VIDEO_PROCESS_ALPHA_BLENDING AlphaBlending;
+    D3D12_VIDEO_FIELD_TYPE FieldType;
+    } 	D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0007_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0007_v0_0_s_ifspec;
+
+#ifndef __ID3D12VideoProcessCommandList1_INTERFACE_DEFINED__
+#define __ID3D12VideoProcessCommandList1_INTERFACE_DEFINED__
+
+/* interface ID3D12VideoProcessCommandList1 */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3D12VideoProcessCommandList1;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("542C5C4D-7596-434F-8C93-4EFA6766F267")
+    ID3D12VideoProcessCommandList1 : public ID3D12VideoProcessCommandList
+    {
+    public:
+        virtual void STDMETHODCALLTYPE ProcessFrames1( 
+            _In_  ID3D12VideoProcessor *pVideoProcessor,
+            _In_  const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            UINT NumInputStreams,
+            _In_reads_(NumInputStreams)  const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1 *pInputArguments) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3D12VideoProcessCommandList1Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3D12VideoProcessCommandList1 * This,
+            REFIID riid,
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3D12VideoProcessCommandList1 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3D12VideoProcessCommandList1 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  REFGUID guid,
+            _Inout_  UINT *pDataSize,
+            _Out_writes_bytes_opt_( *pDataSize )  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  REFGUID guid,
+            _In_  UINT DataSize,
+            _In_reads_bytes_opt_( DataSize )  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  REFGUID guid,
+            _In_opt_  const IUnknown *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetName )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_z_  LPCWSTR Name);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDevice )( 
+            ID3D12VideoProcessCommandList1 * This,
+            REFIID riid,
+            _COM_Outptr_opt_  void **ppvDevice);
+        
+        D3D12_COMMAND_LIST_TYPE ( STDMETHODCALLTYPE *GetType )( 
+            ID3D12VideoProcessCommandList1 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Close )( 
+            ID3D12VideoProcessCommandList1 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *Reset )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  ID3D12CommandAllocator *pAllocator);
+        
+        void ( STDMETHODCALLTYPE *ClearState )( 
+            ID3D12VideoProcessCommandList1 * This);
+        
+        void ( STDMETHODCALLTYPE *ResourceBarrier )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  UINT NumBarriers,
+            _In_reads_(NumBarriers)  const D3D12_RESOURCE_BARRIER *pBarriers);
+        
+        void ( STDMETHODCALLTYPE *DiscardResource )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  ID3D12Resource *pResource,
+            _In_opt_  const D3D12_DISCARD_REGION *pRegion);
+        
+        void ( STDMETHODCALLTYPE *BeginQuery )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *EndQuery )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT Index);
+        
+        void ( STDMETHODCALLTYPE *ResolveQueryData )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  ID3D12QueryHeap *pQueryHeap,
+            _In_  D3D12_QUERY_TYPE Type,
+            _In_  UINT StartIndex,
+            _In_  UINT NumQueries,
+            _In_  ID3D12Resource *pDestinationBuffer,
+            _In_  UINT64 AlignedDestinationBufferOffset);
+        
+        void ( STDMETHODCALLTYPE *SetPredication )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_opt_  ID3D12Resource *pBuffer,
+            _In_  UINT64 AlignedBufferOffset,
+            _In_  D3D12_PREDICATION_OP Operation);
+        
+        void ( STDMETHODCALLTYPE *SetMarker )( 
+            ID3D12VideoProcessCommandList1 * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *BeginEvent )( 
+            ID3D12VideoProcessCommandList1 * This,
+            UINT Metadata,
+            _In_reads_bytes_opt_(Size)  const void *pData,
+            UINT Size);
+        
+        void ( STDMETHODCALLTYPE *EndEvent )( 
+            ID3D12VideoProcessCommandList1 * This);
+        
+        void ( STDMETHODCALLTYPE *ProcessFrames )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  ID3D12VideoProcessor *pVideoProcessor,
+            _In_  const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            UINT NumInputStreams,
+            _In_reads_(NumInputStreams)  const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS *pInputArguments);
+        
+        void ( STDMETHODCALLTYPE *WriteBufferImmediate )( 
+            ID3D12VideoProcessCommandList1 * This,
+            UINT Count,
+            _In_reads_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *pParams,
+            _In_reads_opt_(Count)  const D3D12_WRITEBUFFERIMMEDIATE_MODE *pModes);
+        
+        void ( STDMETHODCALLTYPE *ProcessFrames1 )( 
+            ID3D12VideoProcessCommandList1 * This,
+            _In_  ID3D12VideoProcessor *pVideoProcessor,
+            _In_  const D3D12_VIDEO_PROCESS_OUTPUT_STREAM_ARGUMENTS *pOutputArguments,
+            UINT NumInputStreams,
+            _In_reads_(NumInputStreams)  const D3D12_VIDEO_PROCESS_INPUT_STREAM_ARGUMENTS1 *pInputArguments);
+        
+        END_INTERFACE
+    } ID3D12VideoProcessCommandList1Vtbl;
+
+    interface ID3D12VideoProcessCommandList1
+    {
+        CONST_VTBL struct ID3D12VideoProcessCommandList1Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3D12VideoProcessCommandList1_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3D12VideoProcessCommandList1_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3D12VideoProcessCommandList1_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3D12VideoProcessCommandList1_GetPrivateData(This,guid,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,guid,pDataSize,pData) ) 
+
+#define ID3D12VideoProcessCommandList1_SetPrivateData(This,guid,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,guid,DataSize,pData) ) 
+
+#define ID3D12VideoProcessCommandList1_SetPrivateDataInterface(This,guid,pData)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,guid,pData) ) 
+
+#define ID3D12VideoProcessCommandList1_SetName(This,Name)	\
+    ( (This)->lpVtbl -> SetName(This,Name) ) 
+
+
+#define ID3D12VideoProcessCommandList1_GetDevice(This,riid,ppvDevice)	\
+    ( (This)->lpVtbl -> GetDevice(This,riid,ppvDevice) ) 
+
+
+#define ID3D12VideoProcessCommandList1_GetType(This)	\
+    ( (This)->lpVtbl -> GetType(This) ) 
+
+
+#define ID3D12VideoProcessCommandList1_Close(This)	\
+    ( (This)->lpVtbl -> Close(This) ) 
+
+#define ID3D12VideoProcessCommandList1_Reset(This,pAllocator)	\
+    ( (This)->lpVtbl -> Reset(This,pAllocator) ) 
+
+#define ID3D12VideoProcessCommandList1_ClearState(This)	\
+    ( (This)->lpVtbl -> ClearState(This) ) 
+
+#define ID3D12VideoProcessCommandList1_ResourceBarrier(This,NumBarriers,pBarriers)	\
+    ( (This)->lpVtbl -> ResourceBarrier(This,NumBarriers,pBarriers) ) 
+
+#define ID3D12VideoProcessCommandList1_DiscardResource(This,pResource,pRegion)	\
+    ( (This)->lpVtbl -> DiscardResource(This,pResource,pRegion) ) 
+
+#define ID3D12VideoProcessCommandList1_BeginQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> BeginQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoProcessCommandList1_EndQuery(This,pQueryHeap,Type,Index)	\
+    ( (This)->lpVtbl -> EndQuery(This,pQueryHeap,Type,Index) ) 
+
+#define ID3D12VideoProcessCommandList1_ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset)	\
+    ( (This)->lpVtbl -> ResolveQueryData(This,pQueryHeap,Type,StartIndex,NumQueries,pDestinationBuffer,AlignedDestinationBufferOffset) ) 
+
+#define ID3D12VideoProcessCommandList1_SetPredication(This,pBuffer,AlignedBufferOffset,Operation)	\
+    ( (This)->lpVtbl -> SetPredication(This,pBuffer,AlignedBufferOffset,Operation) ) 
+
+#define ID3D12VideoProcessCommandList1_SetMarker(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> SetMarker(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoProcessCommandList1_BeginEvent(This,Metadata,pData,Size)	\
+    ( (This)->lpVtbl -> BeginEvent(This,Metadata,pData,Size) ) 
+
+#define ID3D12VideoProcessCommandList1_EndEvent(This)	\
+    ( (This)->lpVtbl -> EndEvent(This) ) 
+
+#define ID3D12VideoProcessCommandList1_ProcessFrames(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments)	\
+    ( (This)->lpVtbl -> ProcessFrames(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments) ) 
+
+#define ID3D12VideoProcessCommandList1_WriteBufferImmediate(This,Count,pParams,pModes)	\
+    ( (This)->lpVtbl -> WriteBufferImmediate(This,Count,pParams,pModes) ) 
+
+
+#define ID3D12VideoProcessCommandList1_ProcessFrames1(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments)	\
+    ( (This)->lpVtbl -> ProcessFrames1(This,pVideoProcessor,pOutputArguments,NumInputStreams,pInputArguments) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3D12VideoProcessCommandList1_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3d12video_0000_0008 */
+/* [local] */ 
+
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_MPEG2, 0xee27417f, 0x5e28, 0x4e65, 0xbe, 0xea, 0x1d, 0x26, 0xb5, 0x08, 0xad, 0xc9); 
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_MPEG1_AND_MPEG2, 0x86695f12, 0x340e, 0x4f04, 0x9f, 0xd3, 0x92, 0x53, 0xdd, 0x32, 0x74, 0x60); 
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_H264, 0x1b81be68, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_H264_STEREO_PROGRESSIVE, 0xd79be8da, 0x0cf1, 0x4c81, 0xb8, 0x2a, 0x69, 0xa4, 0xe2, 0x36, 0xf4, 0x3d);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_H264_STEREO, 0xf9aaccbb, 0xc2b6, 0x4cfc, 0x87, 0x79, 0x57, 0x07, 0xb1, 0x76, 0x05, 0x52);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_H264_MULTIVIEW, 0x705b9d82, 0x76cf, 0x49d6, 0xb7, 0xe6, 0xac, 0x88, 0x72, 0xdb, 0x01, 0x3c);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VC1, 0x1b81beA3, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VC1_D2010, 0x1b81beA4, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_MPEG4PT2_SIMPLE, 0xefd64d74, 0xc9e8,0x41d7,0xa5,0xe9,0xe9,0xb0,0xe3,0x9f,0xa3,0x19);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_MPEG4PT2_ADVSIMPLE_NOGMC, 0xed418a9f, 0x010d, 0x4eda, 0x9a, 0xe3, 0x9a, 0x65, 0x35, 0x8d, 0x8d, 0x2e);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN, 0x5b11d51b, 0x2f4c, 0x4452, 0xbc, 0xc3, 0x09, 0xf2, 0xa1, 0x16, 0x0c, 0xc0);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_HEVC_MAIN10, 0x107af0e0, 0xef1a, 0x4d19, 0xab, 0xa8, 0x67, 0xa1, 0x63, 0x07, 0x3d, 0x13);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VP9, 0x463707f8, 0xa1d0, 0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VP9_10BIT_PROFILE2, 0xa4c749ef, 0x6ecf, 0x48aa, 0x84, 0x48, 0x50, 0xa7, 0xa1, 0x16, 0x5f, 0xf7);
+DEFINE_GUID(D3D12_VIDEO_DECODE_PROFILE_VP8, 0x90b899ea, 0x3a62, 0x4705, 0x88, 0xb3, 0x8d, 0xf0, 0x4b, 0x27, 0x44, 0xe7);
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
+DEFINE_GUID(IID_ID3D12VideoDecoderHeap,0x0946B7C9,0xEBF6,0x4047,0xBB,0x73,0x86,0x83,0xE2,0x7D,0xBB,0x1F);
+DEFINE_GUID(IID_ID3D12VideoDevice,0x1F052807,0x0B46,0x4ACC,0x8A,0x89,0x36,0x4F,0x79,0x37,0x18,0xA4);
+DEFINE_GUID(IID_ID3D12VideoDecoder,0xC59B6BDC,0x7720,0x4074,0xA1,0x36,0x17,0xA1,0x56,0x03,0x74,0x70);
+DEFINE_GUID(IID_ID3D12VideoProcessor,0x304FDB32,0xBEDE,0x410A,0x85,0x45,0x94,0x3A,0xC6,0xA4,0x61,0x38);
+DEFINE_GUID(IID_ID3D12VideoDecodeCommandList,0x3B60536E,0xAD29,0x4E64,0xA2,0x69,0xF8,0x53,0x83,0x7E,0x5E,0x53);
+DEFINE_GUID(IID_ID3D12VideoProcessCommandList,0xAEB2543A,0x167F,0x4682,0xAC,0xC8,0xD1,0x59,0xED,0x4A,0x62,0x09);
+DEFINE_GUID(IID_ID3D12VideoDecodeCommandList1,0xD52F011B,0xB56E,0x453C,0xA0,0x5A,0xA7,0xF3,0x11,0xC8,0xF4,0x72);
+DEFINE_GUID(IID_ID3D12VideoProcessCommandList1,0x542C5C4D,0x7596,0x434F,0x8C,0x93,0x4E,0xFA,0x67,0x66,0xF2,0x67);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0008_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3d12video_0000_0008_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+

+ 24 - 0
bgfx.mod/bgfx/3rdparty/dxsdk/include/d3d9types.h

@@ -10,6 +10,7 @@
 #ifndef _d3d9TYPES_H_
 #define _d3d9TYPES_H_
 
+
 #ifndef DIRECT3D_VERSION
 #define DIRECT3D_VERSION         0x0900
 #endif  //DIRECT3D_VERSION
@@ -78,6 +79,8 @@ typedef struct _D3DRECT {
 #define D3DRECT_DEFINED
 #endif
 
+
+
 #ifndef D3DMATRIX_DEFINED
 typedef struct _D3DMATRIX {
     union {
@@ -94,6 +97,8 @@ typedef struct _D3DMATRIX {
 #define D3DMATRIX_DEFINED
 #endif
 
+
+
 typedef struct _D3DVIEWPORT9 {
     DWORD       X;
     DWORD       Y;            /* Viewport Top left */
@@ -1166,6 +1171,24 @@ typedef enum _D3DSHADER_PARAM_SRCMOD_TYPE
     D3DSPSM_FORCE_DWORD = 0x7fffffff,        // force 32-bit size enum
 } D3DSHADER_PARAM_SRCMOD_TYPE;
 
+// Source or dest token bits [15:14]:
+// destination parameter modifiers
+#define D3DSP_MIN_PRECISION_SHIFT      14
+#define D3DSP_MIN_PRECISION_MASK       0x0000C000
+
+typedef enum _D3DSHADER_MIN_PRECISION
+{
+    D3DMP_DEFAULT   = 0, // Default precision for the shader model
+    D3DMP_16        = 1, // 16 bit per component
+    D3DMP_2_8       = 2, // 10 bits (2.8) per component
+} D3DSHADER_MIN_PRECISION;
+// If the older D3DSPDM_PARTIALPRECISION is set,
+// that is equivalent to the whole operation specifying
+// D3DMP_16 (on all operands).  The two encodings are not 
+// used together however.
+
+
+
 // pixel shader version token
 #define D3DPS_VERSION(_Major,_Minor) (0xFFFF0000|((_Major)<<8)|(_Minor))
 
@@ -1641,6 +1664,7 @@ typedef enum _D3DRESOURCETYPE {
 
 
 
+
 /* CubeMap Face identifiers */
 typedef enum _D3DCUBEMAP_FACES
 {

+ 123 - 3
bgfx.mod/bgfx/3rdparty/dxsdk/include/d3dcommon.h

@@ -3,7 +3,7 @@
 /* this ALWAYS GENERATED file contains the definitions for the interfaces */
 
 
- /* File created by MIDL compiler version 8.00.0613 */
+ /* File created by MIDL compiler version 8.01.0622 */
 /* @@MIDL_FILE_HEADING(  ) */
 
 
@@ -100,6 +100,13 @@ typedef interface ID3D10Blob ID3D10Blob;
 #endif 	/* __ID3D10Blob_FWD_DEFINED__ */
 
 
+#ifndef __ID3DDestructionNotifier_FWD_DEFINED__
+#define __ID3DDestructionNotifier_FWD_DEFINED__
+typedef interface ID3DDestructionNotifier ID3DDestructionNotifier;
+
+#endif 	/* __ID3DDestructionNotifier_FWD_DEFINED__ */
+
+
 /* header files for imported files */
 #include "oaidl.h"
 #include "ocidl.h"
@@ -496,6 +503,119 @@ typedef ID3D10Blob ID3DBlob;
 
 typedef ID3DBlob* LPD3DBLOB;
 #define IID_ID3DBlob IID_ID3D10Blob
+typedef void ( __stdcall *PFN_DESTRUCTION_CALLBACK )( 
+    void *pData);
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_s_ifspec;
+
+#ifndef __ID3DDestructionNotifier_INTERFACE_DEFINED__
+#define __ID3DDestructionNotifier_INTERFACE_DEFINED__
+
+/* interface ID3DDestructionNotifier */
+/* [unique][local][object][uuid] */ 
+
+
+EXTERN_C const IID IID_ID3DDestructionNotifier;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("a06eb39a-50da-425b-8c31-4eecd6c270f3")
+    ID3DDestructionNotifier : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE RegisterDestructionCallback( 
+            /* [annotation] */ 
+            _In_  PFN_DESTRUCTION_CALLBACK callbackFn,
+            /* [annotation] */ 
+            _In_  void *pData,
+            /* [annotation] */ 
+            _Out_  UINT *pCallbackID) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE UnregisterDestructionCallback( 
+            /* [annotation] */ 
+            _In_  UINT callbackID) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct ID3DDestructionNotifierVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            ID3DDestructionNotifier * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            ID3DDestructionNotifier * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            ID3DDestructionNotifier * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterDestructionCallback )( 
+            ID3DDestructionNotifier * This,
+            /* [annotation] */ 
+            _In_  PFN_DESTRUCTION_CALLBACK callbackFn,
+            /* [annotation] */ 
+            _In_  void *pData,
+            /* [annotation] */ 
+            _Out_  UINT *pCallbackID);
+        
+        HRESULT ( STDMETHODCALLTYPE *UnregisterDestructionCallback )( 
+            ID3DDestructionNotifier * This,
+            /* [annotation] */ 
+            _In_  UINT callbackID);
+        
+        END_INTERFACE
+    } ID3DDestructionNotifierVtbl;
+
+    interface ID3DDestructionNotifier
+    {
+        CONST_VTBL struct ID3DDestructionNotifierVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define ID3DDestructionNotifier_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define ID3DDestructionNotifier_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define ID3DDestructionNotifier_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define ID3DDestructionNotifier_RegisterDestructionCallback(This,callbackFn,pData,pCallbackID)	\
+    ( (This)->lpVtbl -> RegisterDestructionCallback(This,callbackFn,pData,pCallbackID) ) 
+
+#define ID3DDestructionNotifier_UnregisterDestructionCallback(This,callbackID)	\
+    ( (This)->lpVtbl -> UnregisterDestructionCallback(This,callbackID) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __ID3DDestructionNotifier_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_d3dcommon_0000_0002 */
+/* [local] */ 
+
 typedef 
 enum _D3D_INCLUDE_TYPE
     {
@@ -920,8 +1040,8 @@ DEFINE_GUID(WKPDID_CommentStringW,0xd0149dc0,0x90e8,0x4ec8,0x81, 0x44, 0xe9, 0x0
 #define D3D_COMPONENT_MASK_W   8
 
 
-extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0001_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0002_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0002_v0_0_s_ifspec;
 
 /* Additional Prototypes for ALL interfaces */
 

+ 34 - 4
bgfx.mod/bgfx/3rdparty/dxsdk/include/d3dcompiler.h

@@ -10,6 +10,7 @@
 #ifndef __D3DCOMPILER_H__
 #define __D3DCOMPILER_H__
 
+#include <winapifamily.h>
 
 // Current name of the DLL shipped in the same SDK as this header.
 
@@ -40,6 +41,8 @@ extern "C" {
 #endif //__cplusplus
 
 
+// BK - pragma region Application Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
 
 //----------------------------------------------------------------------------
 // D3DReadFileToBlob:
@@ -123,6 +126,16 @@ D3DWriteBlobToFile(_In_ ID3DBlob* pBlob,
 // D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY
 //   This enables older shaders to compile to 4_0 targets.
 //
+// D3DCOMPILE_DEBUG_NAME_FOR_SOURCE
+//   This enables a debug name to be generated based on source information.
+//   It requires D3DCOMPILE_DEBUG to be set, and is exclusive with
+//   D3DCOMPILE_DEBUG_NAME_FOR_BINARY.
+//
+// D3DCOMPILE_DEBUG_NAME_FOR_BINARY
+//   This enables a debug name to be generated based on compiled information.
+//   It requires D3DCOMPILE_DEBUG to be set, and is exclusive with
+//   D3DCOMPILE_DEBUG_NAME_FOR_SOURCE.
+//
 //----------------------------------------------------------------------------
 
 #define D3DCOMPILE_DEBUG                                (1 << 0)
@@ -149,6 +162,8 @@ D3DWriteBlobToFile(_In_ ID3DBlob* pBlob,
 #define D3DCOMPILE_RESOURCES_MAY_ALIAS                  (1 << 19)
 #define D3DCOMPILE_ENABLE_UNBOUNDED_DESCRIPTOR_TABLES   (1 << 20)
 #define D3DCOMPILE_ALL_RESOURCES_BOUND                  (1 << 21)
+#define D3DCOMPILE_DEBUG_NAME_FOR_SOURCE                (1 << 22)
+#define D3DCOMPILE_DEBUG_NAME_FOR_BINARY                (1 << 23)
 
 //----------------------------------------------------------------------------
 // D3DCOMPILE_EFFECT flags:
@@ -173,6 +188,14 @@ D3DWriteBlobToFile(_In_ ID3DBlob* pBlob,
 #define D3DCOMPILE_EFFECT_CHILD_EFFECT              (1 << 0)
 #define D3DCOMPILE_EFFECT_ALLOW_SLOW_OPS            (1 << 1)
 
+//----------------------------------------------------------------------------
+// D3DCOMPILE Flags2:
+// -----------------
+// Root signature flags. (passed in Flags2)
+#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_LATEST		0
+#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_0			(1 << 4)
+#define D3DCOMPILE_FLAGS2_FORCE_ROOT_SIGNATURE_1_1			(1 << 5)
+
 //----------------------------------------------------------------------------
 // D3DCompile:
 // ----------
@@ -303,9 +326,9 @@ D3DReflect(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
 
 HRESULT WINAPI
 D3DReflectLibrary(__in_bcount(SrcDataSize) LPCVOID pSrcData,
-                  SIZE_T SrcDataSize,
-	              REFIID riid,
-                  LPVOID * ppReflector);
+                  __in SIZE_T SrcDataSize,
+	              __in REFIID riid,
+                  __out LPVOID * ppReflector);
 
 //----------------------------------------------------------------------------
 // D3DDisassemble:
@@ -350,7 +373,7 @@ D3DDisassembleRegion(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
 // Shader linking and Function Linking Graph (FLG) APIs
 //----------------------------------------------------------------------------
 HRESULT WINAPI
-D3DCreateLinker(interface ID3D11Linker ** ppLinker);
+D3DCreateLinker(__out interface ID3D11Linker ** ppLinker);
 
 HRESULT WINAPI
 D3DLoadModule(_In_ LPCVOID pSrcData,
@@ -455,6 +478,7 @@ typedef enum D3D_BLOB_PART
     D3D_BLOB_PDB,
     D3D_BLOB_PRIVATE_DATA,
     D3D_BLOB_ROOT_SIGNATURE,
+    D3D_BLOB_DEBUG_NAME,
 
     // Test parts are only produced by special compiler versions and so
     // are usually not present in shaders.
@@ -532,8 +556,12 @@ D3DDecompressShaders(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData,
                      _Out_writes_(uNumShaders) ID3DBlob** ppShaders,
                      _Out_opt_ UINT* pTotalShaders);
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
 
 
+// BK - pragma region Desktop Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
 
 //----------------------------------------------------------------------------
 // D3DDisassemble10Effect:
@@ -547,6 +575,8 @@ D3DDisassemble10Effect(_In_ interface ID3D10Effect *pEffect,
                        _In_ UINT Flags,
                        _Out_ ID3DBlob** ppDisassembly);
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
+// BK - pragma endregion
 
 
 #ifdef __cplusplus

+ 5 - 2
bgfx.mod/bgfx/3rdparty/dxsdk/include/d3dx12.h

@@ -1349,9 +1349,12 @@ namespace MinGW_Workaround
 {
 	inline D3D12_RESOURCE_DESC ID3D12ResourceGetDesc(ID3D12Resource* _resource)
 	{
-		typedef void (STDMETHODCALLTYPE ID3D12Resource::*PFN_GET_GET_DESC)(D3D12_RESOURCE_DESC*);
 		D3D12_RESOURCE_DESC desc;
-		(_resource->*(PFN_GET_GET_DESC)(&ID3D12Resource::GetDesc))(&desc);
+		union {
+			D3D12_RESOURCE_DESC (STDMETHODCALLTYPE ID3D12Resource::*w)();
+			void (STDMETHODCALLTYPE ID3D12Resource::*f)(D3D12_RESOURCE_DESC *);
+		} conversion = { &ID3D12Resource::GetDesc };
+		(_resource->*conversion.f)(&desc);
 		return desc;
 	}
 }

+ 9 - 0
bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_2.h

@@ -113,6 +113,9 @@ extern "C"{
 /* interface __MIDL_itf_dxgi1_2_0000_0000 */
 /* [local] */ 
 
+#include <winapifamily.h>
+// BK - pragma region Desktop Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
 
 
 extern RPC_IF_HANDLE __MIDL_itf_dxgi1_2_0000_0000_v0_0_c_ifspec;
@@ -503,6 +506,10 @@ EXTERN_C const IID IID_IDXGIOutputDuplication;
 /* interface __MIDL_itf_dxgi1_2_0000_0002 */
 /* [local] */ 
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
+// BK - pragma endregion
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
 typedef 
 enum DXGI_ALPHA_MODE
     {
@@ -2439,6 +2446,8 @@ EXTERN_C const IID IID_IDXGIOutput1;
 /* interface __MIDL_itf_dxgi1_2_0000_0009 */
 /* [local] */ 
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
 DEFINE_GUID(IID_IDXGIDisplayControl,0xea9dbf1a,0xc88e,0x4486,0x85,0x4a,0x98,0xaa,0x01,0x38,0xf3,0x0c);
 DEFINE_GUID(IID_IDXGIOutputDuplication,0x191cfac3,0xa341,0x470d,0xb2,0x6e,0xa8,0x64,0xf4,0x28,0x31,0x9c);
 DEFINE_GUID(IID_IDXGISurface2,0xaba496dd,0xb617,0x4cb8,0xa8,0x66,0xbc,0x44,0xd7,0xeb,0x1f,0xa2);

+ 13 - 0
bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_3.h

@@ -106,6 +106,9 @@ extern "C"{
 /* interface __MIDL_itf_dxgi1_3_0000_0000 */
 /* [local] */ 
 
+#include <winapifamily.h>
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
 #define DXGI_CREATE_FACTORY_DEBUG 0x1
 HRESULT WINAPI CreateDXGIFactory2(UINT Flags, REFIID riid, _COM_Outptr_ void **ppFactory);
 HRESULT WINAPI DXGIGetDebugInterface1(UINT Flags, REFIID riid, _COM_Outptr_ void **pDebug);
@@ -1318,6 +1321,10 @@ EXTERN_C const IID IID_IDXGIFactory3;
 /* interface __MIDL_itf_dxgi1_3_0000_0004 */
 /* [local] */ 
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
 typedef struct DXGI_DECODE_SWAP_CHAIN_DESC
     {
     UINT Flags;
@@ -1788,6 +1795,10 @@ enum DXGI_OVERLAY_SUPPORT_FLAG
         DXGI_OVERLAY_SUPPORT_FLAG_SCALING	= 0x2
     } 	DXGI_OVERLAY_SUPPORT_FLAG;
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
+// BK - pragma endregion
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
 
 
 extern RPC_IF_HANDLE __MIDL_itf_dxgi1_3_0000_0007_v0_0_c_ifspec;
@@ -2082,6 +2093,8 @@ EXTERN_C const IID IID_IDXGIOutput3;
 /* interface __MIDL_itf_dxgi1_3_0000_0008 */
 /* [local] */ 
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
 DEFINE_GUID(IID_IDXGIDevice3,0x6007896c,0x3244,0x4afd,0xbf,0x18,0xa6,0xd3,0xbe,0xda,0x50,0x23);
 DEFINE_GUID(IID_IDXGISwapChain2,0xa8be2ac4,0x199f,0x4946,0xb3,0x31,0x79,0x59,0x9f,0xb9,0x8d,0xe7);
 DEFINE_GUID(IID_IDXGIOutput2,0x595e39d1,0x2724,0x4663,0x99,0xb1,0xda,0x96,0x9d,0xe2,0x83,0x64);

+ 5 - 0
bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_4.h

@@ -78,6 +78,9 @@ extern "C"{
 /* interface __MIDL_itf_dxgi1_4_0000_0000 */
 /* [local] */ 
 
+#include <winapifamily.h>
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
 typedef 
 enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG
     {
@@ -1467,6 +1470,8 @@ EXTERN_C const IID IID_IDXGIAdapter3;
 /* interface __MIDL_itf_dxgi1_4_0000_0004 */
 /* [local] */ 
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
 DEFINE_GUID(IID_IDXGISwapChain3,0x94d99bdb,0xf1f8,0x4ab0,0xb2,0x36,0x7d,0xa0,0x17,0x0e,0xda,0xb1);
 DEFINE_GUID(IID_IDXGIOutput4,0xdc7dca35,0x2196,0x414d,0x9F,0x53,0x61,0x78,0x84,0x03,0x2a,0x60);
 DEFINE_GUID(IID_IDXGIFactory4,0x1bc6ea02,0xef36,0x464f,0xbf,0x0c,0x21,0xca,0x39,0xe5,0x16,0x8a);

+ 12 - 1
bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_5.h

@@ -78,6 +78,9 @@ extern "C"{
 /* interface __MIDL_itf_dxgi1_5_0000_0000 */
 /* [local] */ 
 
+#include <winapifamily.h>
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
 typedef 
 enum DXGI_OUTDUPL_FLAG
     {
@@ -416,7 +419,8 @@ typedef
 enum DXGI_HDR_METADATA_TYPE
     {
         DXGI_HDR_METADATA_TYPE_NONE	= 0,
-        DXGI_HDR_METADATA_TYPE_HDR10	= 1
+        DXGI_HDR_METADATA_TYPE_HDR10	= 1,
+        DXGI_HDR_METADATA_TYPE_HDR10PLUS	= 2
     } 	DXGI_HDR_METADATA_TYPE;
 
 typedef struct DXGI_HDR_METADATA_HDR10
@@ -431,6 +435,11 @@ typedef struct DXGI_HDR_METADATA_HDR10
     UINT16 MaxFrameAverageLightLevel;
     } 	DXGI_HDR_METADATA_HDR10;
 
+typedef struct DXGI_HDR_METADATA_HDR10PLUS
+    {
+    BYTE Data[ 72 ];
+    } 	DXGI_HDR_METADATA_HDR10PLUS;
+
 
 
 extern RPC_IF_HANDLE __MIDL_itf_dxgi1_5_0000_0001_v0_0_c_ifspec;
@@ -1512,6 +1521,8 @@ EXTERN_C const IID IID_IDXGIFactory5;
 /* interface __MIDL_itf_dxgi1_5_0000_0004 */
 /* [local] */ 
 
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
 DEFINE_GUID(IID_IDXGIOutput5,0x80A07424,0xAB52,0x42EB,0x83,0x3C,0x0C,0x42,0xFD,0x28,0x2D,0x98);
 DEFINE_GUID(IID_IDXGISwapChain4,0x3D585D5A,0xBD4A,0x489E,0xB1,0xF4,0x3D,0xBC,0xB6,0x45,0x2F,0xFB);
 DEFINE_GUID(IID_IDXGIDevice4,0x95B4F95F,0xD8DA,0x4CA4,0x9E,0xE6,0x3B,0x76,0xD5,0x96,0x8A,0x10);

+ 796 - 2
bgfx.mod/bgfx/3rdparty/dxsdk/include/dxgi1_6.h

@@ -53,6 +53,20 @@ typedef interface IDXGIOutput6 IDXGIOutput6;
 #endif 	/* __IDXGIOutput6_FWD_DEFINED__ */
 
 
+#ifndef __IDXGIFactory6_FWD_DEFINED__
+#define __IDXGIFactory6_FWD_DEFINED__
+typedef interface IDXGIFactory6 IDXGIFactory6;
+
+#endif 	/* __IDXGIFactory6_FWD_DEFINED__ */
+
+
+#ifndef __IDXGIFactory7_FWD_DEFINED__
+#define __IDXGIFactory7_FWD_DEFINED__
+typedef interface IDXGIFactory7 IDXGIFactory7;
+
+#endif 	/* __IDXGIFactory7_FWD_DEFINED__ */
+
+
 /* header files for imported files */
 #include "dxgi1_5.h"
 
@@ -65,6 +79,10 @@ extern "C"{
 /* [local] */ 
 
 // Copyright (c) Microsoft Corporation.  All Rights Reserved
+#include <winapifamily.h>
+// BK - pragma region App Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+HRESULT WINAPI DXGIDeclareAdapterRemovalSupport();
 typedef 
 enum DXGI_ADAPTER_FLAG3
     {
@@ -72,6 +90,9 @@ enum DXGI_ADAPTER_FLAG3
         DXGI_ADAPTER_FLAG3_REMOTE	= 1,
         DXGI_ADAPTER_FLAG3_SOFTWARE	= 2,
         DXGI_ADAPTER_FLAG3_ACG_COMPATIBLE	= 4,
+        DXGI_ADAPTER_FLAG3_SUPPORT_MONITORED_FENCES	= 8,
+        DXGI_ADAPTER_FLAG3_SUPPORT_NON_MONITORED_FENCES	= 0x10,
+        DXGI_ADAPTER_FLAG3_KEYED_MUTEX_CONFORMANCE	= 0x20,
         DXGI_ADAPTER_FLAG3_FORCE_DWORD	= 0xffffffff
     } 	DXGI_ADAPTER_FLAG3;
 
@@ -702,13 +723,786 @@ EXTERN_C const IID IID_IDXGIOutput6;
 /* interface __MIDL_itf_dxgi1_6_0000_0002 */
 /* [local] */ 
 
-DEFINE_GUID(IID_IDXGIAdapter4,0x3c8d99d1,0x4fbf,0x4181,0xa8,0x2c,0xaf,0x66,0xbf,0x7b,0xd2,0x4e);
-DEFINE_GUID(IID_IDXGIOutput6,0x068346e8,0xaaec,0x4b84,0xad,0xd7,0x13,0x7f,0x51,0x3f,0x77,0xa1);
+typedef 
+enum DXGI_GPU_PREFERENCE
+    {
+        DXGI_GPU_PREFERENCE_UNSPECIFIED	= 0,
+        DXGI_GPU_PREFERENCE_MINIMUM_POWER	= ( DXGI_GPU_PREFERENCE_UNSPECIFIED + 1 ) ,
+        DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE	= ( DXGI_GPU_PREFERENCE_MINIMUM_POWER + 1 ) 
+    } 	DXGI_GPU_PREFERENCE;
+
 
 
 extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0002_v0_0_c_ifspec;
 extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0002_v0_0_s_ifspec;
 
+#ifndef __IDXGIFactory6_INTERFACE_DEFINED__
+#define __IDXGIFactory6_INTERFACE_DEFINED__
+
+/* interface IDXGIFactory6 */
+/* [unique][local][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IDXGIFactory6;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("c1b6694f-ff09-44a9-b03c-77900a0a1d17")
+    IDXGIFactory6 : public IDXGIFactory5
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE EnumAdapterByGpuPreference( 
+            /* [annotation] */ 
+            _In_  UINT Adapter,
+            /* [annotation] */ 
+            _In_  DXGI_GPU_PREFERENCE GpuPreference,
+            /* [annotation] */ 
+            _In_  REFIID riid,
+            /* [annotation] */ 
+            _COM_Outptr_  void **ppvAdapter) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct IDXGIFactory6Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDXGIFactory6 * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDXGIFactory6 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDXGIFactory6 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID Name,
+            /* [in] */ UINT DataSize,
+            /* [annotation][in] */ 
+            _In_reads_bytes_(DataSize)  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID Name,
+            /* [annotation][in] */ 
+            _In_opt_  const IUnknown *pUnknown);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID Name,
+            /* [annotation][out][in] */ 
+            _Inout_  UINT *pDataSize,
+            /* [annotation][out] */ 
+            _Out_writes_bytes_(*pDataSize)  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetParent )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  REFIID riid,
+            /* [annotation][retval][out] */ 
+            _COM_Outptr_  void **ppParent);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( 
+            IDXGIFactory6 * This,
+            /* [in] */ UINT Adapter,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGIAdapter **ppAdapter);
+        
+        HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( 
+            IDXGIFactory6 * This,
+            HWND WindowHandle,
+            UINT Flags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( 
+            IDXGIFactory6 * This,
+            /* [annotation][out] */ 
+            _Out_  HWND *pWindowHandle);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pDevice,
+            /* [annotation][in] */ 
+            _In_  DXGI_SWAP_CHAIN_DESC *pDesc,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGISwapChain **ppSwapChain);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( 
+            IDXGIFactory6 * This,
+            /* [in] */ HMODULE Module,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGIAdapter **ppAdapter);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )( 
+            IDXGIFactory6 * This,
+            /* [in] */ UINT Adapter,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGIAdapter1 **ppAdapter);
+        
+        BOOL ( STDMETHODCALLTYPE *IsCurrent )( 
+            IDXGIFactory6 * This);
+        
+        BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )( 
+            IDXGIFactory6 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pDevice,
+            /* [annotation][in] */ 
+            _In_  HWND hWnd,
+            /* [annotation][in] */ 
+            _In_  const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+            /* [annotation][in] */ 
+            _In_opt_  const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+            /* [annotation][in] */ 
+            _In_opt_  IDXGIOutput *pRestrictToOutput,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGISwapChain1 **ppSwapChain);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pDevice,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pWindow,
+            /* [annotation][in] */ 
+            _In_  const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+            /* [annotation][in] */ 
+            _In_opt_  IDXGIOutput *pRestrictToOutput,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGISwapChain1 **ppSwapChain);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )( 
+            IDXGIFactory6 * This,
+            /* [annotation] */ 
+            _In_  HANDLE hResource,
+            /* [annotation] */ 
+            _Out_  LUID *pLuid);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  HWND WindowHandle,
+            /* [annotation][in] */ 
+            _In_  UINT wMsg,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hEvent,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie);
+        
+        void ( STDMETHODCALLTYPE *UnregisterStereoStatus )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  DWORD dwCookie);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  HWND WindowHandle,
+            /* [annotation][in] */ 
+            _In_  UINT wMsg,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hEvent,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie);
+        
+        void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  DWORD dwCookie);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )( 
+            IDXGIFactory6 * This,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pDevice,
+            /* [annotation][in] */ 
+            _In_  const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+            /* [annotation][in] */ 
+            _In_opt_  IDXGIOutput *pRestrictToOutput,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGISwapChain1 **ppSwapChain);
+        
+        UINT ( STDMETHODCALLTYPE *GetCreationFlags )( 
+            IDXGIFactory6 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumAdapterByLuid )( 
+            IDXGIFactory6 * This,
+            /* [annotation] */ 
+            _In_  LUID AdapterLuid,
+            /* [annotation] */ 
+            _In_  REFIID riid,
+            /* [annotation] */ 
+            _COM_Outptr_  void **ppvAdapter);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumWarpAdapter )( 
+            IDXGIFactory6 * This,
+            /* [annotation] */ 
+            _In_  REFIID riid,
+            /* [annotation] */ 
+            _COM_Outptr_  void **ppvAdapter);
+        
+        HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( 
+            IDXGIFactory6 * This,
+            DXGI_FEATURE Feature,
+            /* [annotation] */ 
+            _Inout_updates_bytes_(FeatureSupportDataSize)  void *pFeatureSupportData,
+            UINT FeatureSupportDataSize);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumAdapterByGpuPreference )( 
+            IDXGIFactory6 * This,
+            /* [annotation] */ 
+            _In_  UINT Adapter,
+            /* [annotation] */ 
+            _In_  DXGI_GPU_PREFERENCE GpuPreference,
+            /* [annotation] */ 
+            _In_  REFIID riid,
+            /* [annotation] */ 
+            _COM_Outptr_  void **ppvAdapter);
+        
+        END_INTERFACE
+    } IDXGIFactory6Vtbl;
+
+    interface IDXGIFactory6
+    {
+        CONST_VTBL struct IDXGIFactory6Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDXGIFactory6_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDXGIFactory6_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDXGIFactory6_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDXGIFactory6_SetPrivateData(This,Name,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) 
+
+#define IDXGIFactory6_SetPrivateDataInterface(This,Name,pUnknown)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) 
+
+#define IDXGIFactory6_GetPrivateData(This,Name,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) 
+
+#define IDXGIFactory6_GetParent(This,riid,ppParent)	\
+    ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) 
+
+
+#define IDXGIFactory6_EnumAdapters(This,Adapter,ppAdapter)	\
+    ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) 
+
+#define IDXGIFactory6_MakeWindowAssociation(This,WindowHandle,Flags)	\
+    ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) 
+
+#define IDXGIFactory6_GetWindowAssociation(This,pWindowHandle)	\
+    ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) 
+
+#define IDXGIFactory6_CreateSwapChain(This,pDevice,pDesc,ppSwapChain)	\
+    ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) 
+
+#define IDXGIFactory6_CreateSoftwareAdapter(This,Module,ppAdapter)	\
+    ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) 
+
+
+#define IDXGIFactory6_EnumAdapters1(This,Adapter,ppAdapter)	\
+    ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) 
+
+#define IDXGIFactory6_IsCurrent(This)	\
+    ( (This)->lpVtbl -> IsCurrent(This) ) 
+
+
+#define IDXGIFactory6_IsWindowedStereoEnabled(This)	\
+    ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) 
+
+#define IDXGIFactory6_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain)	\
+    ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) ) 
+
+#define IDXGIFactory6_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain)	\
+    ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) ) 
+
+#define IDXGIFactory6_GetSharedResourceAdapterLuid(This,hResource,pLuid)	\
+    ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) ) 
+
+#define IDXGIFactory6_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie)	\
+    ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) 
+
+#define IDXGIFactory6_RegisterStereoStatusEvent(This,hEvent,pdwCookie)	\
+    ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) ) 
+
+#define IDXGIFactory6_UnregisterStereoStatus(This,dwCookie)	\
+    ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) ) 
+
+#define IDXGIFactory6_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie)	\
+    ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) 
+
+#define IDXGIFactory6_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie)	\
+    ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) ) 
+
+#define IDXGIFactory6_UnregisterOcclusionStatus(This,dwCookie)	\
+    ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) ) 
+
+#define IDXGIFactory6_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain)	\
+    ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) 
+
+
+#define IDXGIFactory6_GetCreationFlags(This)	\
+    ( (This)->lpVtbl -> GetCreationFlags(This) ) 
+
+
+#define IDXGIFactory6_EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter)	\
+    ( (This)->lpVtbl -> EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) ) 
+
+#define IDXGIFactory6_EnumWarpAdapter(This,riid,ppvAdapter)	\
+    ( (This)->lpVtbl -> EnumWarpAdapter(This,riid,ppvAdapter) ) 
+
+
+#define IDXGIFactory6_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize)	\
+    ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) 
+
+
+#define IDXGIFactory6_EnumAdapterByGpuPreference(This,Adapter,GpuPreference,riid,ppvAdapter)	\
+    ( (This)->lpVtbl -> EnumAdapterByGpuPreference(This,Adapter,GpuPreference,riid,ppvAdapter) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDXGIFactory6_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDXGIFactory7_INTERFACE_DEFINED__
+#define __IDXGIFactory7_INTERFACE_DEFINED__
+
+/* interface IDXGIFactory7 */
+/* [unique][local][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IDXGIFactory7;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("a4966eed-76db-44da-84c1-ee9a7afb20a8")
+    IDXGIFactory7 : public IDXGIFactory6
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE RegisterAdaptersChangedEvent( 
+            /* [annotation][in] */ 
+            _In_  HANDLE hEvent,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE UnregisterAdaptersChangedEvent( 
+            /* [annotation][in] */ 
+            _In_  DWORD dwCookie) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct IDXGIFactory7Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDXGIFactory7 * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDXGIFactory7 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDXGIFactory7 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateData )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID Name,
+            /* [in] */ UINT DataSize,
+            /* [annotation][in] */ 
+            _In_reads_bytes_(DataSize)  const void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetPrivateDataInterface )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID Name,
+            /* [annotation][in] */ 
+            _In_opt_  const IUnknown *pUnknown);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetPrivateData )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID Name,
+            /* [annotation][out][in] */ 
+            _Inout_  UINT *pDataSize,
+            /* [annotation][out] */ 
+            _Out_writes_bytes_(*pDataSize)  void *pData);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetParent )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  REFIID riid,
+            /* [annotation][retval][out] */ 
+            _COM_Outptr_  void **ppParent);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumAdapters )( 
+            IDXGIFactory7 * This,
+            /* [in] */ UINT Adapter,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGIAdapter **ppAdapter);
+        
+        HRESULT ( STDMETHODCALLTYPE *MakeWindowAssociation )( 
+            IDXGIFactory7 * This,
+            HWND WindowHandle,
+            UINT Flags);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetWindowAssociation )( 
+            IDXGIFactory7 * This,
+            /* [annotation][out] */ 
+            _Out_  HWND *pWindowHandle);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSwapChain )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pDevice,
+            /* [annotation][in] */ 
+            _In_  DXGI_SWAP_CHAIN_DESC *pDesc,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGISwapChain **ppSwapChain);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSoftwareAdapter )( 
+            IDXGIFactory7 * This,
+            /* [in] */ HMODULE Module,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGIAdapter **ppAdapter);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumAdapters1 )( 
+            IDXGIFactory7 * This,
+            /* [in] */ UINT Adapter,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGIAdapter1 **ppAdapter);
+        
+        BOOL ( STDMETHODCALLTYPE *IsCurrent )( 
+            IDXGIFactory7 * This);
+        
+        BOOL ( STDMETHODCALLTYPE *IsWindowedStereoEnabled )( 
+            IDXGIFactory7 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForHwnd )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pDevice,
+            /* [annotation][in] */ 
+            _In_  HWND hWnd,
+            /* [annotation][in] */ 
+            _In_  const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+            /* [annotation][in] */ 
+            _In_opt_  const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *pFullscreenDesc,
+            /* [annotation][in] */ 
+            _In_opt_  IDXGIOutput *pRestrictToOutput,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGISwapChain1 **ppSwapChain);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForCoreWindow )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pDevice,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pWindow,
+            /* [annotation][in] */ 
+            _In_  const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+            /* [annotation][in] */ 
+            _In_opt_  IDXGIOutput *pRestrictToOutput,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGISwapChain1 **ppSwapChain);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetSharedResourceAdapterLuid )( 
+            IDXGIFactory7 * This,
+            /* [annotation] */ 
+            _In_  HANDLE hResource,
+            /* [annotation] */ 
+            _Out_  LUID *pLuid);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusWindow )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  HWND WindowHandle,
+            /* [annotation][in] */ 
+            _In_  UINT wMsg,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterStereoStatusEvent )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hEvent,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie);
+        
+        void ( STDMETHODCALLTYPE *UnregisterStereoStatus )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  DWORD dwCookie);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusWindow )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  HWND WindowHandle,
+            /* [annotation][in] */ 
+            _In_  UINT wMsg,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterOcclusionStatusEvent )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hEvent,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie);
+        
+        void ( STDMETHODCALLTYPE *UnregisterOcclusionStatus )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  DWORD dwCookie);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSwapChainForComposition )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  IUnknown *pDevice,
+            /* [annotation][in] */ 
+            _In_  const DXGI_SWAP_CHAIN_DESC1 *pDesc,
+            /* [annotation][in] */ 
+            _In_opt_  IDXGIOutput *pRestrictToOutput,
+            /* [annotation][out] */ 
+            _COM_Outptr_  IDXGISwapChain1 **ppSwapChain);
+        
+        UINT ( STDMETHODCALLTYPE *GetCreationFlags )( 
+            IDXGIFactory7 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumAdapterByLuid )( 
+            IDXGIFactory7 * This,
+            /* [annotation] */ 
+            _In_  LUID AdapterLuid,
+            /* [annotation] */ 
+            _In_  REFIID riid,
+            /* [annotation] */ 
+            _COM_Outptr_  void **ppvAdapter);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumWarpAdapter )( 
+            IDXGIFactory7 * This,
+            /* [annotation] */ 
+            _In_  REFIID riid,
+            /* [annotation] */ 
+            _COM_Outptr_  void **ppvAdapter);
+        
+        HRESULT ( STDMETHODCALLTYPE *CheckFeatureSupport )( 
+            IDXGIFactory7 * This,
+            DXGI_FEATURE Feature,
+            /* [annotation] */ 
+            _Inout_updates_bytes_(FeatureSupportDataSize)  void *pFeatureSupportData,
+            UINT FeatureSupportDataSize);
+        
+        HRESULT ( STDMETHODCALLTYPE *EnumAdapterByGpuPreference )( 
+            IDXGIFactory7 * This,
+            /* [annotation] */ 
+            _In_  UINT Adapter,
+            /* [annotation] */ 
+            _In_  DXGI_GPU_PREFERENCE GpuPreference,
+            /* [annotation] */ 
+            _In_  REFIID riid,
+            /* [annotation] */ 
+            _COM_Outptr_  void **ppvAdapter);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterAdaptersChangedEvent )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hEvent,
+            /* [annotation][out] */ 
+            _Out_  DWORD *pdwCookie);
+        
+        HRESULT ( STDMETHODCALLTYPE *UnregisterAdaptersChangedEvent )( 
+            IDXGIFactory7 * This,
+            /* [annotation][in] */ 
+            _In_  DWORD dwCookie);
+        
+        END_INTERFACE
+    } IDXGIFactory7Vtbl;
+
+    interface IDXGIFactory7
+    {
+        CONST_VTBL struct IDXGIFactory7Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDXGIFactory7_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDXGIFactory7_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDXGIFactory7_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDXGIFactory7_SetPrivateData(This,Name,DataSize,pData)	\
+    ( (This)->lpVtbl -> SetPrivateData(This,Name,DataSize,pData) ) 
+
+#define IDXGIFactory7_SetPrivateDataInterface(This,Name,pUnknown)	\
+    ( (This)->lpVtbl -> SetPrivateDataInterface(This,Name,pUnknown) ) 
+
+#define IDXGIFactory7_GetPrivateData(This,Name,pDataSize,pData)	\
+    ( (This)->lpVtbl -> GetPrivateData(This,Name,pDataSize,pData) ) 
+
+#define IDXGIFactory7_GetParent(This,riid,ppParent)	\
+    ( (This)->lpVtbl -> GetParent(This,riid,ppParent) ) 
+
+
+#define IDXGIFactory7_EnumAdapters(This,Adapter,ppAdapter)	\
+    ( (This)->lpVtbl -> EnumAdapters(This,Adapter,ppAdapter) ) 
+
+#define IDXGIFactory7_MakeWindowAssociation(This,WindowHandle,Flags)	\
+    ( (This)->lpVtbl -> MakeWindowAssociation(This,WindowHandle,Flags) ) 
+
+#define IDXGIFactory7_GetWindowAssociation(This,pWindowHandle)	\
+    ( (This)->lpVtbl -> GetWindowAssociation(This,pWindowHandle) ) 
+
+#define IDXGIFactory7_CreateSwapChain(This,pDevice,pDesc,ppSwapChain)	\
+    ( (This)->lpVtbl -> CreateSwapChain(This,pDevice,pDesc,ppSwapChain) ) 
+
+#define IDXGIFactory7_CreateSoftwareAdapter(This,Module,ppAdapter)	\
+    ( (This)->lpVtbl -> CreateSoftwareAdapter(This,Module,ppAdapter) ) 
+
+
+#define IDXGIFactory7_EnumAdapters1(This,Adapter,ppAdapter)	\
+    ( (This)->lpVtbl -> EnumAdapters1(This,Adapter,ppAdapter) ) 
+
+#define IDXGIFactory7_IsCurrent(This)	\
+    ( (This)->lpVtbl -> IsCurrent(This) ) 
+
+
+#define IDXGIFactory7_IsWindowedStereoEnabled(This)	\
+    ( (This)->lpVtbl -> IsWindowedStereoEnabled(This) ) 
+
+#define IDXGIFactory7_CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain)	\
+    ( (This)->lpVtbl -> CreateSwapChainForHwnd(This,pDevice,hWnd,pDesc,pFullscreenDesc,pRestrictToOutput,ppSwapChain) ) 
+
+#define IDXGIFactory7_CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain)	\
+    ( (This)->lpVtbl -> CreateSwapChainForCoreWindow(This,pDevice,pWindow,pDesc,pRestrictToOutput,ppSwapChain) ) 
+
+#define IDXGIFactory7_GetSharedResourceAdapterLuid(This,hResource,pLuid)	\
+    ( (This)->lpVtbl -> GetSharedResourceAdapterLuid(This,hResource,pLuid) ) 
+
+#define IDXGIFactory7_RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie)	\
+    ( (This)->lpVtbl -> RegisterStereoStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) 
+
+#define IDXGIFactory7_RegisterStereoStatusEvent(This,hEvent,pdwCookie)	\
+    ( (This)->lpVtbl -> RegisterStereoStatusEvent(This,hEvent,pdwCookie) ) 
+
+#define IDXGIFactory7_UnregisterStereoStatus(This,dwCookie)	\
+    ( (This)->lpVtbl -> UnregisterStereoStatus(This,dwCookie) ) 
+
+#define IDXGIFactory7_RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie)	\
+    ( (This)->lpVtbl -> RegisterOcclusionStatusWindow(This,WindowHandle,wMsg,pdwCookie) ) 
+
+#define IDXGIFactory7_RegisterOcclusionStatusEvent(This,hEvent,pdwCookie)	\
+    ( (This)->lpVtbl -> RegisterOcclusionStatusEvent(This,hEvent,pdwCookie) ) 
+
+#define IDXGIFactory7_UnregisterOcclusionStatus(This,dwCookie)	\
+    ( (This)->lpVtbl -> UnregisterOcclusionStatus(This,dwCookie) ) 
+
+#define IDXGIFactory7_CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain)	\
+    ( (This)->lpVtbl -> CreateSwapChainForComposition(This,pDevice,pDesc,pRestrictToOutput,ppSwapChain) ) 
+
+
+#define IDXGIFactory7_GetCreationFlags(This)	\
+    ( (This)->lpVtbl -> GetCreationFlags(This) ) 
+
+
+#define IDXGIFactory7_EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter)	\
+    ( (This)->lpVtbl -> EnumAdapterByLuid(This,AdapterLuid,riid,ppvAdapter) ) 
+
+#define IDXGIFactory7_EnumWarpAdapter(This,riid,ppvAdapter)	\
+    ( (This)->lpVtbl -> EnumWarpAdapter(This,riid,ppvAdapter) ) 
+
+
+#define IDXGIFactory7_CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize)	\
+    ( (This)->lpVtbl -> CheckFeatureSupport(This,Feature,pFeatureSupportData,FeatureSupportDataSize) ) 
+
+
+#define IDXGIFactory7_EnumAdapterByGpuPreference(This,Adapter,GpuPreference,riid,ppvAdapter)	\
+    ( (This)->lpVtbl -> EnumAdapterByGpuPreference(This,Adapter,GpuPreference,riid,ppvAdapter) ) 
+
+
+#define IDXGIFactory7_RegisterAdaptersChangedEvent(This,hEvent,pdwCookie)	\
+    ( (This)->lpVtbl -> RegisterAdaptersChangedEvent(This,hEvent,pdwCookie) ) 
+
+#define IDXGIFactory7_UnregisterAdaptersChangedEvent(This,dwCookie)	\
+    ( (This)->lpVtbl -> UnregisterAdaptersChangedEvent(This,dwCookie) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDXGIFactory7_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxgi1_6_0000_0004 */
+/* [local] */ 
+
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
+// BK - pragma endregion
+DEFINE_GUID(IID_IDXGIAdapter4,0x3c8d99d1,0x4fbf,0x4181,0xa8,0x2c,0xaf,0x66,0xbf,0x7b,0xd2,0x4e);
+DEFINE_GUID(IID_IDXGIOutput6,0x068346e8,0xaaec,0x4b84,0xad,0xd7,0x13,0x7f,0x51,0x3f,0x77,0xa1);
+DEFINE_GUID(IID_IDXGIFactory6,0xc1b6694f,0xff09,0x44a9,0xb0,0x3c,0x77,0x90,0x0a,0x0a,0x1d,0x17);
+DEFINE_GUID(IID_IDXGIFactory7,0xa4966eed,0x76db,0x44da,0x84,0xc1,0xee,0x9a,0x7a,0xfb,0x20,0xa8);
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0004_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxgi1_6_0000_0004_v0_0_s_ifspec;
+
 /* Additional Prototypes for ALL interfaces */
 
 /* end of Additional Prototypes */

+ 1945 - 0
bgfx.mod/bgfx/3rdparty/dxsdk/include/dxva2api.h

@@ -0,0 +1,1945 @@
+
+
+/* this ALWAYS GENERATED file contains the definitions for the interfaces */
+
+
+ /* File created by MIDL compiler version 8.01.0622 */
+/* @@MIDL_FILE_HEADING(  ) */
+
+
+
+/* verify that the <rpcndr.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCNDR_H_VERSION__
+#define __REQUIRED_RPCNDR_H_VERSION__ 500
+#endif
+
+/* verify that the <rpcsal.h> version is high enough to compile this file*/
+#ifndef __REQUIRED_RPCSAL_H_VERSION__
+#define __REQUIRED_RPCSAL_H_VERSION__ 100
+#endif
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#ifndef __RPCNDR_H_VERSION__
+#error this stub requires an updated version of <rpcndr.h>
+#endif /* __RPCNDR_H_VERSION__ */
+
+#ifndef COM_NO_WINDOWS_H
+#include "windows.h"
+#include "ole2.h"
+#endif /*COM_NO_WINDOWS_H*/
+
+#ifndef __dxva2api_h__
+#define __dxva2api_h__
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#pragma once
+#endif
+
+/* Forward Declarations */ 
+
+#ifndef __IDirect3DDeviceManager9_FWD_DEFINED__
+#define __IDirect3DDeviceManager9_FWD_DEFINED__
+typedef interface IDirect3DDeviceManager9 IDirect3DDeviceManager9;
+
+#endif 	/* __IDirect3DDeviceManager9_FWD_DEFINED__ */
+
+
+#ifndef __IDirectXVideoAccelerationService_FWD_DEFINED__
+#define __IDirectXVideoAccelerationService_FWD_DEFINED__
+typedef interface IDirectXVideoAccelerationService IDirectXVideoAccelerationService;
+
+#endif 	/* __IDirectXVideoAccelerationService_FWD_DEFINED__ */
+
+
+#ifndef __IDirectXVideoDecoderService_FWD_DEFINED__
+#define __IDirectXVideoDecoderService_FWD_DEFINED__
+typedef interface IDirectXVideoDecoderService IDirectXVideoDecoderService;
+
+#endif 	/* __IDirectXVideoDecoderService_FWD_DEFINED__ */
+
+
+#ifndef __IDirectXVideoProcessorService_FWD_DEFINED__
+#define __IDirectXVideoProcessorService_FWD_DEFINED__
+typedef interface IDirectXVideoProcessorService IDirectXVideoProcessorService;
+
+#endif 	/* __IDirectXVideoProcessorService_FWD_DEFINED__ */
+
+
+#ifndef __IDirectXVideoDecoder_FWD_DEFINED__
+#define __IDirectXVideoDecoder_FWD_DEFINED__
+typedef interface IDirectXVideoDecoder IDirectXVideoDecoder;
+
+#endif 	/* __IDirectXVideoDecoder_FWD_DEFINED__ */
+
+
+#ifndef __IDirectXVideoProcessor_FWD_DEFINED__
+#define __IDirectXVideoProcessor_FWD_DEFINED__
+typedef interface IDirectXVideoProcessor IDirectXVideoProcessor;
+
+#endif 	/* __IDirectXVideoProcessor_FWD_DEFINED__ */
+
+
+#ifndef __IDirectXVideoMemoryConfiguration_FWD_DEFINED__
+#define __IDirectXVideoMemoryConfiguration_FWD_DEFINED__
+typedef interface IDirectXVideoMemoryConfiguration IDirectXVideoMemoryConfiguration;
+
+#endif 	/* __IDirectXVideoMemoryConfiguration_FWD_DEFINED__ */
+
+
+/* header files for imported files */
+#include "unknwn.h"
+
+#ifdef __cplusplus
+extern "C"{
+#endif 
+
+
+/* interface __MIDL_itf_dxva2api_0000_0000 */
+/* [local] */ 
+
+//
+//   The following declarations within the 'if 0' block are dummy typedefs used to make
+//   the evr.idl file build. The actual definitions are contained in d3d9.h
+//
+#if 0
+typedef DWORD IDirect3DDevice9;
+
+typedef DWORD IDirect3DSurface9;
+
+typedef DWORD D3DFORMAT;
+
+typedef DWORD D3DPOOL;
+
+#endif
+#ifndef DXVA2_API_DEFINED
+#define DXVA2_API_DEFINED
+DEFINE_GUID(DXVA2_ModeMPEG2_MoComp, 0xe6a9f44b, 0x61b0, 0x4563,0x9e,0xa4,0x63,0xd2,0xa3,0xc6,0xfe,0x66);
+DEFINE_GUID(DXVA2_ModeMPEG2_IDCT,   0xbf22ad00, 0x03ea, 0x4690,0x80,0x77,0x47,0x33,0x46,0x20,0x9b,0x7e);
+DEFINE_GUID(DXVA2_ModeMPEG2_VLD,    0xee27417f, 0x5e28, 0x4e65,0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);
+DEFINE_GUID(DXVA2_ModeMPEG1_VLD,    0x6f3ec719, 0x3735, 0x42cc,0x80,0x63,0x65,0xcc,0x3c,0xb3,0x66,0x16);
+DEFINE_GUID(DXVA2_ModeMPEG2and1_VLD,0x86695f12, 0x340e, 0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60);
+DEFINE_GUID(DXVA2_ModeH264_A,  0x1b81be64, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeH264_B,  0x1b81be65, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeH264_C,  0x1b81be66, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeH264_D,  0x1b81be67, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeH264_E,  0x1b81be68, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeH264_F,  0x1b81be69, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeH264_VLD_WithFMOASO_NoFGT,  0xd5f04ff9, 0x3418,0x45d8,0x95,0x61,0x32,0xa7,0x6a,0xae,0x2d,0xdd);
+DEFINE_GUID(DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT, 0xd79be8da, 0x0cf1,0x4c81,0xb8,0x2a,0x69,0xa4,0xe2,0x36,0xf4,0x3d);
+DEFINE_GUID(DXVA2_ModeH264_VLD_Stereo_NoFGT,             0xf9aaccbb, 0xc2b6,0x4cfc,0x87,0x79,0x57,0x07,0xb1,0x76,0x05,0x52);
+DEFINE_GUID(DXVA2_ModeH264_VLD_Multiview_NoFGT,          0x705b9d82, 0x76cf,0x49d6,0xb7,0xe6,0xac,0x88,0x72,0xdb,0x01,0x3c);
+DEFINE_GUID(DXVA2_ModeWMV8_A,  0x1b81be80, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeWMV8_B,  0x1b81be81, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeWMV9_A,  0x1b81be90, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeWMV9_B,  0x1b81be91, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeWMV9_C,  0x1b81be94, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeVC1_A,   0x1b81beA0, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeVC1_B,   0x1b81beA1, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeVC1_C,   0x1b81beA2, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeVC1_D,   0x1b81beA3, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_ModeVC1_D2010,0x1b81beA4, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_NoEncrypt,   0x1b81beD0, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+DEFINE_GUID(DXVA2_VideoProcProgressiveDevice, 0x5a54a0c9,0xc7ec,0x4bd9,0x8e,0xde,0xf3,0xc7,0x5d,0xc4,0x39,0x3b);
+DEFINE_GUID(DXVA2_VideoProcBobDevice,         0x335aa36e,0x7884,0x43a4,0x9c,0x91,0x7f,0x87,0xfa,0xf3,0xe3,0x7e);
+DEFINE_GUID(DXVA2_VideoProcSoftwareDevice,    0x4553d47f,0xee7e,0x4e3f,0x94,0x75,0xdb,0xf1,0x37,0x6c,0x48,0x10);
+DEFINE_GUID(DXVA2_ModeMPEG4pt2_VLD_Simple,           0xefd64d74, 0xc9e8,0x41d7,0xa5,0xe9,0xe9,0xb0,0xe3,0x9f,0xa3,0x19);
+DEFINE_GUID(DXVA2_ModeMPEG4pt2_VLD_AdvSimple_NoGMC,  0xed418a9f, 0x010d,0x4eda,0x9a,0xe3,0x9a,0x65,0x35,0x8d,0x8d,0x2e);
+DEFINE_GUID(DXVA2_ModeMPEG4pt2_VLD_AdvSimple_GMC,    0xab998b5b, 0x4258,0x44a9,0x9f,0xeb,0x94,0xe5,0x97,0xa6,0xba,0xae);
+DEFINE_GUID(DXVA2_ModeHEVC_VLD_Main,    0x5b11d51b, 0x2f4c,0x4452,0xbc,0xc3,0x09,0xf2,0xa1,0x16,0x0c,0xc0);
+DEFINE_GUID(DXVA2_ModeHEVC_VLD_Main10,  0x107af0e0, 0xef1a,0x4d19,0xab,0xa8,0x67,0xa1,0x63,0x07,0x3d,0x13);
+DEFINE_GUID(DXVA2_ModeVP9_VLD_Profile0,       0x463707f8, 0xa1d0, 0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e);
+DEFINE_GUID(DXVA2_ModeVP9_VLD_10bit_Profile2, 0xa4c749ef, 0x6ecf, 0x48aa, 0x84, 0x48, 0x50, 0xa7, 0xa1, 0x16, 0x5f, 0xf7);
+DEFINE_GUID(DXVA2_ModeVP8_VLD,                0x90b899ea, 0x3a62, 0x4705, 0x88, 0xb3, 0x8d, 0xf0, 0x4b, 0x27, 0x44, 0xe7);
+#define DXVA2_ModeMPEG2_MOCOMP      DXVA2_ModeMPEG2_MoComp
+#define DXVA2_ModeWMV8_PostProc     DXVA2_ModeWMV8_A
+#define DXVA2_ModeWMV8_MoComp       DXVA2_ModeWMV8_B
+#define DXVA2_ModeWMV9_PostProc     DXVA2_ModeWMV9_A
+#define DXVA2_ModeWMV9_MoComp       DXVA2_ModeWMV9_B
+#define DXVA2_ModeWMV9_IDCT         DXVA2_ModeWMV9_C
+#define DXVA2_ModeVC1_PostProc      DXVA2_ModeVC1_A
+#define DXVA2_ModeVC1_MoComp        DXVA2_ModeVC1_B
+#define DXVA2_ModeVC1_IDCT          DXVA2_ModeVC1_C
+#define DXVA2_ModeVC1_VLD           DXVA2_ModeVC1_D
+#define DXVA2_ModeH264_MoComp_NoFGT DXVA2_ModeH264_A
+#define DXVA2_ModeH264_MoComp_FGT   DXVA2_ModeH264_B
+#define DXVA2_ModeH264_IDCT_NoFGT   DXVA2_ModeH264_C
+#define DXVA2_ModeH264_IDCT_FGT     DXVA2_ModeH264_D
+#define DXVA2_ModeH264_VLD_NoFGT    DXVA2_ModeH264_E
+#define DXVA2_ModeH264_VLD_FGT      DXVA2_ModeH264_F
+#define DXVA2_E_NOT_INITIALIZED     ((HRESULT)0x80041000L)
+#define DXVA2_E_NEW_VIDEO_DEVICE    ((HRESULT)0x80041001L)
+#define DXVA2_E_VIDEO_DEVICE_LOCKED ((HRESULT)0x80041002L)
+#define DXVA2_E_NOT_AVAILABLE       ((HRESULT)0x80041003L)
+#if defined(_WIN32) && !defined(_NO_COM)
+DEFINE_GUID(IID_IDirect3DDeviceManager9,          0xa0cade0f,0x06d5,0x4cf4,0xa1,0xc7,0xf3,0xcd,0xd7,0x25,0xaa,0x75);
+DEFINE_GUID(IID_IDirectXVideoAccelerationService, 0xfc51a550,0xd5e7,0x11d9,0xaf,0x55,0x00,0x05,0x4e,0x43,0xff,0x02);
+DEFINE_GUID(IID_IDirectXVideoDecoderService,      0xfc51a551,0xd5e7,0x11d9,0xaf,0x55,0x00,0x05,0x4e,0x43,0xff,0x02);
+DEFINE_GUID(IID_IDirectXVideoProcessorService,    0xfc51a552,0xd5e7,0x11d9,0xaf,0x55,0x00,0x05,0x4e,0x43,0xff,0x02);
+DEFINE_GUID(IID_IDirectXVideoDecoder,             0xf2b0810a,0xfd00,0x43c9,0x91,0x8c,0xdf,0x94,0xe2,0xd8,0xef,0x7d);
+DEFINE_GUID(IID_IDirectXVideoProcessor,           0x8c3a39f0,0x916e,0x4690,0x80,0x4f,0x4c,0x80,0x01,0x35,0x5d,0x25);
+DEFINE_GUID(IID_IDirectXVideoMemoryConfiguration, 0xb7f916dd,0xdb3b,0x49c1,0x84,0xd7,0xe4,0x5e,0xf9,0x9e,0xc7,0x26);
+#endif
+#ifndef MAX_DEINTERLACE_SURFACES
+#define MAX_DEINTERLACE_SURFACES 32
+#endif
+#ifndef MAX_SUBSTREAMS
+#define MAX_SUBSTREAMS 15
+#endif
+#pragma warning( push )
+#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
+typedef struct _DXVA2_ExtendedFormat
+    {
+    union 
+        {
+        struct 
+            {
+            UINT SampleFormat	: 8;
+            UINT VideoChromaSubsampling	: 4;
+            UINT NominalRange	: 3;
+            UINT VideoTransferMatrix	: 3;
+            UINT VideoLighting	: 4;
+            UINT VideoPrimaries	: 5;
+            UINT VideoTransferFunction	: 5;
+            } 	;
+        UINT value;
+        } 	;
+    } 	DXVA2_ExtendedFormat;
+
+#pragma warning( pop )
+typedef 
+enum _DXVA2_SampleFormat
+    {
+        DXVA2_SampleFormatMask	= 0xff,
+        DXVA2_SampleUnknown	= 0,
+        DXVA2_SampleProgressiveFrame	= 2,
+        DXVA2_SampleFieldInterleavedEvenFirst	= 3,
+        DXVA2_SampleFieldInterleavedOddFirst	= 4,
+        DXVA2_SampleFieldSingleEven	= 5,
+        DXVA2_SampleFieldSingleOdd	= 6,
+        DXVA2_SampleSubStream	= 7
+    } 	DXVA2_SampleFormat;
+
+typedef 
+enum _DXVA2_VideoChromaSubSampling
+    {
+        DXVA2_VideoChromaSubsamplingMask	= 0xf,
+        DXVA2_VideoChromaSubsampling_Unknown	= 0,
+        DXVA2_VideoChromaSubsampling_ProgressiveChroma	= 0x8,
+        DXVA2_VideoChromaSubsampling_Horizontally_Cosited	= 0x4,
+        DXVA2_VideoChromaSubsampling_Vertically_Cosited	= 0x2,
+        DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes	= 0x1,
+        DXVA2_VideoChromaSubsampling_MPEG2	= ( DXVA2_VideoChromaSubsampling_Horizontally_Cosited | DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes ) ,
+        DXVA2_VideoChromaSubsampling_MPEG1	= DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes,
+        DXVA2_VideoChromaSubsampling_DV_PAL	= ( DXVA2_VideoChromaSubsampling_Horizontally_Cosited | DXVA2_VideoChromaSubsampling_Vertically_Cosited ) ,
+        DXVA2_VideoChromaSubsampling_Cosited	= ( ( DXVA2_VideoChromaSubsampling_Horizontally_Cosited | DXVA2_VideoChromaSubsampling_Vertically_Cosited )  | DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes ) 
+    } 	DXVA2_VideoChromaSubSampling;
+
+typedef 
+enum _DXVA2_NominalRange
+    {
+        DXVA2_NominalRangeMask	= 0x7,
+        DXVA2_NominalRange_Unknown	= 0,
+        DXVA2_NominalRange_Normal	= 1,
+        DXVA2_NominalRange_Wide	= 2,
+        DXVA2_NominalRange_0_255	= 1,
+        DXVA2_NominalRange_16_235	= 2,
+        DXVA2_NominalRange_48_208	= 3
+    } 	DXVA2_NominalRange;
+
+typedef 
+enum _DXVA2_VideoTransferMatrix
+    {
+        DXVA2_VideoTransferMatrixMask	= 0x7,
+        DXVA2_VideoTransferMatrix_Unknown	= 0,
+        DXVA2_VideoTransferMatrix_BT709	= 1,
+        DXVA2_VideoTransferMatrix_BT601	= 2,
+        DXVA2_VideoTransferMatrix_SMPTE240M	= 3
+    } 	DXVA2_VideoTransferMatrix;
+
+typedef 
+enum _DXVA2_VideoLighting
+    {
+        DXVA2_VideoLightingMask	= 0xf,
+        DXVA2_VideoLighting_Unknown	= 0,
+        DXVA2_VideoLighting_bright	= 1,
+        DXVA2_VideoLighting_office	= 2,
+        DXVA2_VideoLighting_dim	= 3,
+        DXVA2_VideoLighting_dark	= 4
+    } 	DXVA2_VideoLighting;
+
+typedef 
+enum _DXVA2_VideoPrimaries
+    {
+        DXVA2_VideoPrimariesMask	= 0x1f,
+        DXVA2_VideoPrimaries_Unknown	= 0,
+        DXVA2_VideoPrimaries_reserved	= 1,
+        DXVA2_VideoPrimaries_BT709	= 2,
+        DXVA2_VideoPrimaries_BT470_2_SysM	= 3,
+        DXVA2_VideoPrimaries_BT470_2_SysBG	= 4,
+        DXVA2_VideoPrimaries_SMPTE170M	= 5,
+        DXVA2_VideoPrimaries_SMPTE240M	= 6,
+        DXVA2_VideoPrimaries_EBU3213	= 7,
+        DXVA2_VideoPrimaries_SMPTE_C	= 8
+    } 	DXVA2_VideoPrimaries;
+
+typedef 
+enum _DXVA2_VideoTransferFunction
+    {
+        DXVA2_VideoTransFuncMask	= 0x1f,
+        DXVA2_VideoTransFunc_Unknown	= 0,
+        DXVA2_VideoTransFunc_10	= 1,
+        DXVA2_VideoTransFunc_18	= 2,
+        DXVA2_VideoTransFunc_20	= 3,
+        DXVA2_VideoTransFunc_22	= 4,
+        DXVA2_VideoTransFunc_709	= 5,
+        DXVA2_VideoTransFunc_240M	= 6,
+        DXVA2_VideoTransFunc_sRGB	= 7,
+        DXVA2_VideoTransFunc_28	= 8
+    } 	DXVA2_VideoTransferFunction;
+
+//
+// Deprecated labels - please use the ones in the DXVA2_VideoTransferFunction enum.
+//
+#define DXVA2_VideoTransFunc_22_709         DXVA2_VideoTransFunc_709     
+#define DXVA2_VideoTransFunc_22_240M        DXVA2_VideoTransFunc_240M    
+#define DXVA2_VideoTransFunc_22_8bit_sRGB   DXVA2_VideoTransFunc_sRGB    
+typedef struct _DXVA2_Frequency
+    {
+    UINT Numerator;
+    UINT Denominator;
+    } 	DXVA2_Frequency;
+
+typedef struct _DXVA2_VideoDesc
+    {
+    UINT SampleWidth;
+    UINT SampleHeight;
+    DXVA2_ExtendedFormat SampleFormat;
+    D3DFORMAT Format;
+    DXVA2_Frequency InputSampleFreq;
+    DXVA2_Frequency OutputFrameFreq;
+    UINT UABProtectionLevel;
+    UINT Reserved;
+    } 	DXVA2_VideoDesc;
+
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0003
+    {
+        DXVA2_DeinterlaceTech_Unknown	= 0,
+        DXVA2_DeinterlaceTech_BOBLineReplicate	= 0x1,
+        DXVA2_DeinterlaceTech_BOBVerticalStretch	= 0x2,
+        DXVA2_DeinterlaceTech_BOBVerticalStretch4Tap	= 0x4,
+        DXVA2_DeinterlaceTech_MedianFiltering	= 0x8,
+        DXVA2_DeinterlaceTech_EdgeFiltering	= 0x10,
+        DXVA2_DeinterlaceTech_FieldAdaptive	= 0x20,
+        DXVA2_DeinterlaceTech_PixelAdaptive	= 0x40,
+        DXVA2_DeinterlaceTech_MotionVectorSteered	= 0x80,
+        DXVA2_DeinterlaceTech_InverseTelecine	= 0x100,
+        DXVA2_DeinterlaceTech_Mask	= 0x1ff
+    } ;
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0004
+    {
+        DXVA2_NoiseFilterLumaLevel	= 1,
+        DXVA2_NoiseFilterLumaThreshold	= 2,
+        DXVA2_NoiseFilterLumaRadius	= 3,
+        DXVA2_NoiseFilterChromaLevel	= 4,
+        DXVA2_NoiseFilterChromaThreshold	= 5,
+        DXVA2_NoiseFilterChromaRadius	= 6,
+        DXVA2_DetailFilterLumaLevel	= 7,
+        DXVA2_DetailFilterLumaThreshold	= 8,
+        DXVA2_DetailFilterLumaRadius	= 9,
+        DXVA2_DetailFilterChromaLevel	= 10,
+        DXVA2_DetailFilterChromaThreshold	= 11,
+        DXVA2_DetailFilterChromaRadius	= 12
+    } ;
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0005
+    {
+        DXVA2_NoiseFilterTech_Unsupported	= 0,
+        DXVA2_NoiseFilterTech_Unknown	= 0x1,
+        DXVA2_NoiseFilterTech_Median	= 0x2,
+        DXVA2_NoiseFilterTech_Temporal	= 0x4,
+        DXVA2_NoiseFilterTech_BlockNoise	= 0x8,
+        DXVA2_NoiseFilterTech_MosquitoNoise	= 0x10,
+        DXVA2_NoiseFilterTech_Mask	= 0x1f
+    } ;
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0006
+    {
+        DXVA2_DetailFilterTech_Unsupported	= 0,
+        DXVA2_DetailFilterTech_Unknown	= 0x1,
+        DXVA2_DetailFilterTech_Edge	= 0x2,
+        DXVA2_DetailFilterTech_Sharpening	= 0x4,
+        DXVA2_DetailFilterTech_Mask	= 0x7
+    } ;
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0007
+    {
+        DXVA2_ProcAmp_None	= 0,
+        DXVA2_ProcAmp_Brightness	= 0x1,
+        DXVA2_ProcAmp_Contrast	= 0x2,
+        DXVA2_ProcAmp_Hue	= 0x4,
+        DXVA2_ProcAmp_Saturation	= 0x8,
+        DXVA2_ProcAmp_Mask	= 0xf
+    } ;
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0008
+    {
+        DXVA2_VideoProcess_None	= 0,
+        DXVA2_VideoProcess_YUV2RGB	= 0x1,
+        DXVA2_VideoProcess_StretchX	= 0x2,
+        DXVA2_VideoProcess_StretchY	= 0x4,
+        DXVA2_VideoProcess_AlphaBlend	= 0x8,
+        DXVA2_VideoProcess_SubRects	= 0x10,
+        DXVA2_VideoProcess_SubStreams	= 0x20,
+        DXVA2_VideoProcess_SubStreamsExtended	= 0x40,
+        DXVA2_VideoProcess_YUV2RGBExtended	= 0x80,
+        DXVA2_VideoProcess_AlphaBlendExtended	= 0x100,
+        DXVA2_VideoProcess_Constriction	= 0x200,
+        DXVA2_VideoProcess_NoiseFilter	= 0x400,
+        DXVA2_VideoProcess_DetailFilter	= 0x800,
+        DXVA2_VideoProcess_PlanarAlpha	= 0x1000,
+        DXVA2_VideoProcess_LinearScaling	= 0x2000,
+        DXVA2_VideoProcess_GammaCompensated	= 0x4000,
+        DXVA2_VideoProcess_MaintainsOriginalFieldData	= 0x8000,
+        DXVA2_VideoProcess_Mask	= 0xffff
+    } ;
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0009
+    {
+        DXVA2_VPDev_HardwareDevice	= 0x1,
+        DXVA2_VPDev_EmulatedDXVA1	= 0x2,
+        DXVA2_VPDev_SoftwareDevice	= 0x4,
+        DXVA2_VPDev_Mask	= 0x7
+    } ;
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0010
+    {
+        DXVA2_SampleData_RFF	= 0x1,
+        DXVA2_SampleData_TFF	= 0x2,
+        DXVA2_SampleData_RFF_TFF_Present	= 0x4,
+        DXVA2_SampleData_Mask	= 0xffff
+    } ;
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0011
+    {
+        DXVA2_DestData_RFF	= 0x1,
+        DXVA2_DestData_TFF	= 0x2,
+        DXVA2_DestData_RFF_TFF_Present	= 0x4,
+        DXVA2_DestData_Mask	= 0xffff
+    } ;
+typedef struct _DXVA2_VideoProcessorCaps
+    {
+    UINT DeviceCaps;
+    D3DPOOL InputPool;
+    UINT NumForwardRefSamples;
+    UINT NumBackwardRefSamples;
+    UINT Reserved;
+    UINT DeinterlaceTechnology;
+    UINT ProcAmpControlCaps;
+    UINT VideoProcessorOperations;
+    UINT NoiseFilterTechnology;
+    UINT DetailFilterTechnology;
+    } 	DXVA2_VideoProcessorCaps;
+
+#ifdef __midl
+typedef LONG DXVA2_Fixed32;
+
+#else
+#pragma warning( push )
+#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union
+typedef struct _DXVA2_Fixed32
+{
+    union {
+        struct {
+            USHORT  Fraction;
+            SHORT   Value;
+        };
+        LONG ll;
+    };
+} DXVA2_Fixed32;
+#pragma warning( pop )
+#endif
+typedef struct _DXVA2_AYUVSample8
+    {
+    UCHAR Cr;
+    UCHAR Cb;
+    UCHAR Y;
+    UCHAR Alpha;
+    } 	DXVA2_AYUVSample8;
+
+typedef struct _DXVA2_AYUVSample16
+    {
+    USHORT Cr;
+    USHORT Cb;
+    USHORT Y;
+    USHORT Alpha;
+    } 	DXVA2_AYUVSample16;
+
+typedef LONGLONG REFERENCE_TIME;
+
+#if defined(_D3D9_H_) || defined(_d3d9P_H_)
+typedef struct _DXVA2_VideoSample
+    {
+    REFERENCE_TIME Start;
+    REFERENCE_TIME End;
+    DXVA2_ExtendedFormat SampleFormat;
+    IDirect3DSurface9 *SrcSurface;
+    RECT SrcRect;
+    RECT DstRect;
+    DXVA2_AYUVSample8 Pal[ 16 ];
+    DXVA2_Fixed32 PlanarAlpha;
+    DWORD SampleData;
+    } 	DXVA2_VideoSample;
+
+#endif  // _D3D9_H_
+typedef struct _DXVA2_ValueRange
+    {
+    DXVA2_Fixed32 MinValue;
+    DXVA2_Fixed32 MaxValue;
+    DXVA2_Fixed32 DefaultValue;
+    DXVA2_Fixed32 StepSize;
+    } 	DXVA2_ValueRange;
+
+typedef struct _DXVA2_ProcAmpValues
+    {
+    DXVA2_Fixed32 Brightness;
+    DXVA2_Fixed32 Contrast;
+    DXVA2_Fixed32 Hue;
+    DXVA2_Fixed32 Saturation;
+    } 	DXVA2_ProcAmpValues;
+
+typedef struct _DXVA2_FilterValues
+    {
+    DXVA2_Fixed32 Level;
+    DXVA2_Fixed32 Threshold;
+    DXVA2_Fixed32 Radius;
+    } 	DXVA2_FilterValues;
+
+typedef struct _DXVA2_VideoProcessBltParams
+    {
+    REFERENCE_TIME TargetFrame;
+    RECT TargetRect;
+    SIZE ConstrictionSize;
+    UINT StreamingFlags;
+    DXVA2_AYUVSample16 BackgroundColor;
+    DXVA2_ExtendedFormat DestFormat;
+    DXVA2_ProcAmpValues ProcAmpValues;
+    DXVA2_Fixed32 Alpha;
+    DXVA2_FilterValues NoiseFilterLuma;
+    DXVA2_FilterValues NoiseFilterChroma;
+    DXVA2_FilterValues DetailFilterLuma;
+    DXVA2_FilterValues DetailFilterChroma;
+    DWORD DestData;
+    } 	DXVA2_VideoProcessBltParams;
+
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0012
+    {
+        DXVA2_PictureParametersBufferType	= 0,
+        DXVA2_MacroBlockControlBufferType	= 1,
+        DXVA2_ResidualDifferenceBufferType	= 2,
+        DXVA2_DeblockingControlBufferType	= 3,
+        DXVA2_InverseQuantizationMatrixBufferType	= 4,
+        DXVA2_SliceControlBufferType	= 5,
+        DXVA2_BitStreamDateBufferType	= 6,
+        DXVA2_MotionVectorBuffer	= 7,
+        DXVA2_FilmGrainBuffer	= 8
+    } ;
+
+enum __MIDL___MIDL_itf_dxva2api_0000_0000_0013
+    {
+        DXVA2_VideoDecoderRenderTarget	= 0,
+        DXVA2_VideoProcessorRenderTarget	= 1,
+        DXVA2_VideoSoftwareRenderTarget	= 2
+    } ;
+typedef struct _DXVA2_ConfigPictureDecode
+    {
+    GUID guidConfigBitstreamEncryption;
+    GUID guidConfigMBcontrolEncryption;
+    GUID guidConfigResidDiffEncryption;
+    UINT ConfigBitstreamRaw;
+    UINT ConfigMBcontrolRasterOrder;
+    UINT ConfigResidDiffHost;
+    UINT ConfigSpatialResid8;
+    UINT ConfigResid8Subtraction;
+    UINT ConfigSpatialHost8or9Clipping;
+    UINT ConfigSpatialResidInterleaved;
+    UINT ConfigIntraResidUnsigned;
+    UINT ConfigResidDiffAccelerator;
+    UINT ConfigHostInverseScan;
+    UINT ConfigSpecificIDCT;
+    UINT Config4GroupedCoefs;
+    USHORT ConfigMinRenderTargetBuffCount;
+    USHORT ConfigDecoderSpecific;
+    } 	DXVA2_ConfigPictureDecode;
+
+typedef struct _DXVA2_DecodeBufferDesc
+    {
+    DWORD CompressedBufferType;
+    UINT BufferIndex;
+    UINT DataOffset;
+    UINT DataSize;
+    UINT FirstMBaddress;
+    UINT NumMBsInBuffer;
+    UINT Width;
+    UINT Height;
+    UINT Stride;
+    UINT ReservedBits;
+    PVOID pvPVPState;
+    } 	DXVA2_DecodeBufferDesc;
+
+// The value in pvPVPState depends on the type of crypo used.  For 
+// D3DCRYPTOTYPE_AES128_CTR, pvPState points to the following structure:
+ 
+typedef struct _DXVA2_AES_CTR_IV
+    {
+    UINT64 IV;
+    UINT64 Count;
+    } 	DXVA2_AES_CTR_IV;
+
+typedef struct _DXVA2_DecodeExtensionData
+    {
+    UINT Function;
+    PVOID pPrivateInputData;
+    UINT PrivateInputDataSize;
+    PVOID pPrivateOutputData;
+    UINT PrivateOutputDataSize;
+    } 	DXVA2_DecodeExtensionData;
+
+// DXVA2_DECODE_GET_DRIVER_HANDLE is an extension function that allows the 
+// driver to return a handle for the DXVA2 decode device that can be used to
+// associate it with a IDirect3DCryptoSession9 interface.  When this function
+// is used:
+//     pPrivateInputData = NULL
+//     pPrivateInputDataSize = 0
+//     pPrivateOutputData = HANDLE*
+//     pPrivateOutputDataSize = sizeof(HANDLE)
+#define DXVA2_DECODE_GET_DRIVER_HANDLE               0x725
+ 
+// DXVA2_DECODE_SPECIFY_ENCRYPTED_BLOCKS is an extension function that that allows 
+// the decoder to specify which portions of the compressed buffers are encrypted. 
+// If this fucntion is not used to specify this information, it is assumed that 
+// the entire buffer is encrypted. 
+//     pPrivateInputData = D3DENCRYPTED_BLOCK_INFO*; 
+//     PrivateInputDataSize = sizeof(D3DENCRYPTED_BLOCK_INFO); 
+//     pPrivateOutputData = NULL; 
+//     PrivateOutputDataSize = 0; 
+#define DXVA2_DECODE_SPECIFY_ENCRYPTED_BLOCKS	0x724 
+ 
+typedef struct _DXVA2_DecodeExecuteParams
+    {
+    UINT NumCompBuffers;
+    DXVA2_DecodeBufferDesc *pCompressedBuffers;
+    DXVA2_DecodeExtensionData *pExtensionData;
+    } 	DXVA2_DecodeExecuteParams;
+
+#if defined(_D3D9_H_) || defined(_d3d9P_H_)
+
+
+
+
+
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxva2api_0000_0000_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxva2api_0000_0000_v0_0_s_ifspec;
+
+#ifndef __IDirect3DDeviceManager9_INTERFACE_DEFINED__
+#define __IDirect3DDeviceManager9_INTERFACE_DEFINED__
+
+/* interface IDirect3DDeviceManager9 */
+/* [local][helpstring][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IDirect3DDeviceManager9;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("a0cade0f-06d5-4cf4-a1c7-f3cdd725aa75")
+    IDirect3DDeviceManager9 : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE ResetDevice( 
+            /* [annotation][in] */ 
+            _In_  IDirect3DDevice9 *pDevice,
+            /* [annotation][in] */ 
+            _In_  UINT resetToken) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE OpenDeviceHandle( 
+            /* [annotation][out] */ 
+            _Out_  HANDLE *phDevice) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE CloseDeviceHandle( 
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE TestDevice( 
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE LockDevice( 
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice,
+            /* [annotation][out] */ 
+            _Outptr_  IDirect3DDevice9 **ppDevice,
+            /* [annotation][in] */ 
+            _In_  BOOL fBlock) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE UnlockDevice( 
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice,
+            /* [annotation][in] */ 
+            _In_  BOOL fSaveState) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetVideoService( 
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice,
+            /* [annotation][in] */ 
+            _In_  REFIID riid,
+            /* [annotation][out] */ 
+            _Outptr_  void **ppService) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct IDirect3DDeviceManager9Vtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDirect3DDeviceManager9 * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDirect3DDeviceManager9 * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDirect3DDeviceManager9 * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *ResetDevice )( 
+            IDirect3DDeviceManager9 * This,
+            /* [annotation][in] */ 
+            _In_  IDirect3DDevice9 *pDevice,
+            /* [annotation][in] */ 
+            _In_  UINT resetToken);
+        
+        HRESULT ( STDMETHODCALLTYPE *OpenDeviceHandle )( 
+            IDirect3DDeviceManager9 * This,
+            /* [annotation][out] */ 
+            _Out_  HANDLE *phDevice);
+        
+        HRESULT ( STDMETHODCALLTYPE *CloseDeviceHandle )( 
+            IDirect3DDeviceManager9 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice);
+        
+        HRESULT ( STDMETHODCALLTYPE *TestDevice )( 
+            IDirect3DDeviceManager9 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice);
+        
+        HRESULT ( STDMETHODCALLTYPE *LockDevice )( 
+            IDirect3DDeviceManager9 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice,
+            /* [annotation][out] */ 
+            _Outptr_  IDirect3DDevice9 **ppDevice,
+            /* [annotation][in] */ 
+            _In_  BOOL fBlock);
+        
+        HRESULT ( STDMETHODCALLTYPE *UnlockDevice )( 
+            IDirect3DDeviceManager9 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice,
+            /* [annotation][in] */ 
+            _In_  BOOL fSaveState);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetVideoService )( 
+            IDirect3DDeviceManager9 * This,
+            /* [annotation][in] */ 
+            _In_  HANDLE hDevice,
+            /* [annotation][in] */ 
+            _In_  REFIID riid,
+            /* [annotation][out] */ 
+            _Outptr_  void **ppService);
+        
+        END_INTERFACE
+    } IDirect3DDeviceManager9Vtbl;
+
+    interface IDirect3DDeviceManager9
+    {
+        CONST_VTBL struct IDirect3DDeviceManager9Vtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDirect3DDeviceManager9_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDirect3DDeviceManager9_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDirect3DDeviceManager9_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDirect3DDeviceManager9_ResetDevice(This,pDevice,resetToken)	\
+    ( (This)->lpVtbl -> ResetDevice(This,pDevice,resetToken) ) 
+
+#define IDirect3DDeviceManager9_OpenDeviceHandle(This,phDevice)	\
+    ( (This)->lpVtbl -> OpenDeviceHandle(This,phDevice) ) 
+
+#define IDirect3DDeviceManager9_CloseDeviceHandle(This,hDevice)	\
+    ( (This)->lpVtbl -> CloseDeviceHandle(This,hDevice) ) 
+
+#define IDirect3DDeviceManager9_TestDevice(This,hDevice)	\
+    ( (This)->lpVtbl -> TestDevice(This,hDevice) ) 
+
+#define IDirect3DDeviceManager9_LockDevice(This,hDevice,ppDevice,fBlock)	\
+    ( (This)->lpVtbl -> LockDevice(This,hDevice,ppDevice,fBlock) ) 
+
+#define IDirect3DDeviceManager9_UnlockDevice(This,hDevice,fSaveState)	\
+    ( (This)->lpVtbl -> UnlockDevice(This,hDevice,fSaveState) ) 
+
+#define IDirect3DDeviceManager9_GetVideoService(This,hDevice,riid,ppService)	\
+    ( (This)->lpVtbl -> GetVideoService(This,hDevice,riid,ppService) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDirect3DDeviceManager9_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDirectXVideoAccelerationService_INTERFACE_DEFINED__
+#define __IDirectXVideoAccelerationService_INTERFACE_DEFINED__
+
+/* interface IDirectXVideoAccelerationService */
+/* [local][helpstring][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IDirectXVideoAccelerationService;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("fc51a550-d5e7-11d9-af55-00054e43ff02")
+    IDirectXVideoAccelerationService : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE CreateSurface( 
+            /* [annotation][in] */ 
+            _In_  UINT Width,
+            /* [annotation][in] */ 
+            _In_  UINT Height,
+            /* [annotation][in] */ 
+            _In_  UINT BackBuffers,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT Format,
+            /* [annotation][in] */ 
+            _In_  D3DPOOL Pool,
+            /* [annotation][in] */ 
+            _In_  DWORD Usage,
+            /* [annotation][in] */ 
+            _In_  DWORD DxvaType,
+            /* [annotation][size_is][out] */ 
+            _Out_writes_(BackBuffers+1)  IDirect3DSurface9 **ppSurface,
+            /* [annotation][out][in] */ 
+            _Inout_opt_  HANDLE *pSharedHandle) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct IDirectXVideoAccelerationServiceVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDirectXVideoAccelerationService * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDirectXVideoAccelerationService * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDirectXVideoAccelerationService * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSurface )( 
+            IDirectXVideoAccelerationService * This,
+            /* [annotation][in] */ 
+            _In_  UINT Width,
+            /* [annotation][in] */ 
+            _In_  UINT Height,
+            /* [annotation][in] */ 
+            _In_  UINT BackBuffers,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT Format,
+            /* [annotation][in] */ 
+            _In_  D3DPOOL Pool,
+            /* [annotation][in] */ 
+            _In_  DWORD Usage,
+            /* [annotation][in] */ 
+            _In_  DWORD DxvaType,
+            /* [annotation][size_is][out] */ 
+            _Out_writes_(BackBuffers+1)  IDirect3DSurface9 **ppSurface,
+            /* [annotation][out][in] */ 
+            _Inout_opt_  HANDLE *pSharedHandle);
+        
+        END_INTERFACE
+    } IDirectXVideoAccelerationServiceVtbl;
+
+    interface IDirectXVideoAccelerationService
+    {
+        CONST_VTBL struct IDirectXVideoAccelerationServiceVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDirectXVideoAccelerationService_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDirectXVideoAccelerationService_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDirectXVideoAccelerationService_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDirectXVideoAccelerationService_CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle)	\
+    ( (This)->lpVtbl -> CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDirectXVideoAccelerationService_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDirectXVideoDecoderService_INTERFACE_DEFINED__
+#define __IDirectXVideoDecoderService_INTERFACE_DEFINED__
+
+/* interface IDirectXVideoDecoderService */
+/* [local][helpstring][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IDirectXVideoDecoderService;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("fc51a551-d5e7-11d9-af55-00054e43ff02")
+    IDirectXVideoDecoderService : public IDirectXVideoAccelerationService
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetDecoderDeviceGuids( 
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  GUID **pGuids) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetDecoderRenderTargets( 
+            /* [annotation][in] */ 
+            _In_  REFGUID Guid,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  D3DFORMAT **pFormats) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetDecoderConfigurations( 
+            /* [annotation][in] */ 
+            _In_  REFGUID Guid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _Reserved_  void *pReserved,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  DXVA2_ConfigPictureDecode **ppConfigs) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoder( 
+            /* [annotation][in] */ 
+            _In_  REFGUID Guid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_ConfigPictureDecode *pConfig,
+            /* [annotation][size_is][in] */ 
+            _In_reads_(NumRenderTargets)  IDirect3DSurface9 **ppDecoderRenderTargets,
+            /* [annotation][in] */ 
+            _In_  UINT NumRenderTargets,
+            /* [annotation][out] */ 
+            _Outptr_  IDirectXVideoDecoder **ppDecode) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct IDirectXVideoDecoderServiceVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDirectXVideoDecoderService * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDirectXVideoDecoderService * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDirectXVideoDecoderService * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSurface )( 
+            IDirectXVideoDecoderService * This,
+            /* [annotation][in] */ 
+            _In_  UINT Width,
+            /* [annotation][in] */ 
+            _In_  UINT Height,
+            /* [annotation][in] */ 
+            _In_  UINT BackBuffers,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT Format,
+            /* [annotation][in] */ 
+            _In_  D3DPOOL Pool,
+            /* [annotation][in] */ 
+            _In_  DWORD Usage,
+            /* [annotation][in] */ 
+            _In_  DWORD DxvaType,
+            /* [annotation][size_is][out] */ 
+            _Out_writes_(BackBuffers+1)  IDirect3DSurface9 **ppSurface,
+            /* [annotation][out][in] */ 
+            _Inout_opt_  HANDLE *pSharedHandle);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDecoderDeviceGuids )( 
+            IDirectXVideoDecoderService * This,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  GUID **pGuids);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDecoderRenderTargets )( 
+            IDirectXVideoDecoderService * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID Guid,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  D3DFORMAT **pFormats);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetDecoderConfigurations )( 
+            IDirectXVideoDecoderService * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID Guid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _Reserved_  void *pReserved,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  DXVA2_ConfigPictureDecode **ppConfigs);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateVideoDecoder )( 
+            IDirectXVideoDecoderService * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID Guid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_ConfigPictureDecode *pConfig,
+            /* [annotation][size_is][in] */ 
+            _In_reads_(NumRenderTargets)  IDirect3DSurface9 **ppDecoderRenderTargets,
+            /* [annotation][in] */ 
+            _In_  UINT NumRenderTargets,
+            /* [annotation][out] */ 
+            _Outptr_  IDirectXVideoDecoder **ppDecode);
+        
+        END_INTERFACE
+    } IDirectXVideoDecoderServiceVtbl;
+
+    interface IDirectXVideoDecoderService
+    {
+        CONST_VTBL struct IDirectXVideoDecoderServiceVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDirectXVideoDecoderService_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDirectXVideoDecoderService_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDirectXVideoDecoderService_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDirectXVideoDecoderService_CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle)	\
+    ( (This)->lpVtbl -> CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle) ) 
+
+
+#define IDirectXVideoDecoderService_GetDecoderDeviceGuids(This,pCount,pGuids)	\
+    ( (This)->lpVtbl -> GetDecoderDeviceGuids(This,pCount,pGuids) ) 
+
+#define IDirectXVideoDecoderService_GetDecoderRenderTargets(This,Guid,pCount,pFormats)	\
+    ( (This)->lpVtbl -> GetDecoderRenderTargets(This,Guid,pCount,pFormats) ) 
+
+#define IDirectXVideoDecoderService_GetDecoderConfigurations(This,Guid,pVideoDesc,pReserved,pCount,ppConfigs)	\
+    ( (This)->lpVtbl -> GetDecoderConfigurations(This,Guid,pVideoDesc,pReserved,pCount,ppConfigs) ) 
+
+#define IDirectXVideoDecoderService_CreateVideoDecoder(This,Guid,pVideoDesc,pConfig,ppDecoderRenderTargets,NumRenderTargets,ppDecode)	\
+    ( (This)->lpVtbl -> CreateVideoDecoder(This,Guid,pVideoDesc,pConfig,ppDecoderRenderTargets,NumRenderTargets,ppDecode) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDirectXVideoDecoderService_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDirectXVideoProcessorService_INTERFACE_DEFINED__
+#define __IDirectXVideoProcessorService_INTERFACE_DEFINED__
+
+/* interface IDirectXVideoProcessorService */
+/* [local][helpstring][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IDirectXVideoProcessorService;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("fc51a552-d5e7-11d9-af55-00054e43ff02")
+    IDirectXVideoProcessorService : public IDirectXVideoAccelerationService
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE RegisterVideoProcessorSoftwareDevice( 
+            /* [annotation][in] */ 
+            _In_  void *pCallbacks) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorDeviceGuids( 
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  GUID **pGuids) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorRenderTargets( 
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  D3DFORMAT **pFormats) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorSubStreamFormats( 
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  D3DFORMAT **pFormats) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCaps( 
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_VideoProcessorCaps *pCaps) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetProcAmpRange( 
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][in] */ 
+            _In_  UINT ProcAmpCap,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_ValueRange *pRange) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetFilterPropertyRange( 
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][in] */ 
+            _In_  UINT FilterSetting,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_ValueRange *pRange) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessor( 
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][in] */ 
+            _In_  UINT MaxNumSubStreams,
+            /* [annotation][out] */ 
+            _Outptr_  IDirectXVideoProcessor **ppVidProcess) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct IDirectXVideoProcessorServiceVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDirectXVideoProcessorService * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDirectXVideoProcessorService * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDirectXVideoProcessorService * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateSurface )( 
+            IDirectXVideoProcessorService * This,
+            /* [annotation][in] */ 
+            _In_  UINT Width,
+            /* [annotation][in] */ 
+            _In_  UINT Height,
+            /* [annotation][in] */ 
+            _In_  UINT BackBuffers,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT Format,
+            /* [annotation][in] */ 
+            _In_  D3DPOOL Pool,
+            /* [annotation][in] */ 
+            _In_  DWORD Usage,
+            /* [annotation][in] */ 
+            _In_  DWORD DxvaType,
+            /* [annotation][size_is][out] */ 
+            _Out_writes_(BackBuffers+1)  IDirect3DSurface9 **ppSurface,
+            /* [annotation][out][in] */ 
+            _Inout_opt_  HANDLE *pSharedHandle);
+        
+        HRESULT ( STDMETHODCALLTYPE *RegisterVideoProcessorSoftwareDevice )( 
+            IDirectXVideoProcessorService * This,
+            /* [annotation][in] */ 
+            _In_  void *pCallbacks);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorDeviceGuids )( 
+            IDirectXVideoProcessorService * This,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  GUID **pGuids);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorRenderTargets )( 
+            IDirectXVideoProcessorService * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  D3DFORMAT **pFormats);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorSubStreamFormats )( 
+            IDirectXVideoProcessorService * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][out] */ 
+            _Out_  UINT *pCount,
+            /* [annotation][size_is][unique][out] */ 
+            _Outptr_result_buffer_maybenull_(*pCount)  D3DFORMAT **pFormats);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorCaps )( 
+            IDirectXVideoProcessorService * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_VideoProcessorCaps *pCaps);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetProcAmpRange )( 
+            IDirectXVideoProcessorService * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][in] */ 
+            _In_  UINT ProcAmpCap,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_ValueRange *pRange);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetFilterPropertyRange )( 
+            IDirectXVideoProcessorService * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][in] */ 
+            _In_  UINT FilterSetting,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_ValueRange *pRange);
+        
+        HRESULT ( STDMETHODCALLTYPE *CreateVideoProcessor )( 
+            IDirectXVideoProcessorService * This,
+            /* [annotation][in] */ 
+            _In_  REFGUID VideoProcDeviceGuid,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][in] */ 
+            _In_  D3DFORMAT RenderTargetFormat,
+            /* [annotation][in] */ 
+            _In_  UINT MaxNumSubStreams,
+            /* [annotation][out] */ 
+            _Outptr_  IDirectXVideoProcessor **ppVidProcess);
+        
+        END_INTERFACE
+    } IDirectXVideoProcessorServiceVtbl;
+
+    interface IDirectXVideoProcessorService
+    {
+        CONST_VTBL struct IDirectXVideoProcessorServiceVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDirectXVideoProcessorService_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDirectXVideoProcessorService_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDirectXVideoProcessorService_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDirectXVideoProcessorService_CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle)	\
+    ( (This)->lpVtbl -> CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle) ) 
+
+
+#define IDirectXVideoProcessorService_RegisterVideoProcessorSoftwareDevice(This,pCallbacks)	\
+    ( (This)->lpVtbl -> RegisterVideoProcessorSoftwareDevice(This,pCallbacks) ) 
+
+#define IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids(This,pVideoDesc,pCount,pGuids)	\
+    ( (This)->lpVtbl -> GetVideoProcessorDeviceGuids(This,pVideoDesc,pCount,pGuids) ) 
+
+#define IDirectXVideoProcessorService_GetVideoProcessorRenderTargets(This,VideoProcDeviceGuid,pVideoDesc,pCount,pFormats)	\
+    ( (This)->lpVtbl -> GetVideoProcessorRenderTargets(This,VideoProcDeviceGuid,pVideoDesc,pCount,pFormats) ) 
+
+#define IDirectXVideoProcessorService_GetVideoProcessorSubStreamFormats(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCount,pFormats)	\
+    ( (This)->lpVtbl -> GetVideoProcessorSubStreamFormats(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCount,pFormats) ) 
+
+#define IDirectXVideoProcessorService_GetVideoProcessorCaps(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCaps)	\
+    ( (This)->lpVtbl -> GetVideoProcessorCaps(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCaps) ) 
+
+#define IDirectXVideoProcessorService_GetProcAmpRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,ProcAmpCap,pRange)	\
+    ( (This)->lpVtbl -> GetProcAmpRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,ProcAmpCap,pRange) ) 
+
+#define IDirectXVideoProcessorService_GetFilterPropertyRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,FilterSetting,pRange)	\
+    ( (This)->lpVtbl -> GetFilterPropertyRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,FilterSetting,pRange) ) 
+
+#define IDirectXVideoProcessorService_CreateVideoProcessor(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,MaxNumSubStreams,ppVidProcess)	\
+    ( (This)->lpVtbl -> CreateVideoProcessor(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,MaxNumSubStreams,ppVidProcess) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDirectXVideoProcessorService_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDirectXVideoDecoder_INTERFACE_DEFINED__
+#define __IDirectXVideoDecoder_INTERFACE_DEFINED__
+
+/* interface IDirectXVideoDecoder */
+/* [local][helpstring][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IDirectXVideoDecoder;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("f2b0810a-fd00-43c9-918c-df94e2d8ef7d")
+    IDirectXVideoDecoder : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderService( 
+            /* [annotation][out] */ 
+            _Outptr_  IDirectXVideoDecoderService **ppService) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetCreationParameters( 
+            /* [annotation][out] */ 
+            _Out_opt_  GUID *pDeviceGuid,
+            /* [annotation][out] */ 
+            _Out_opt_  DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][out] */ 
+            _Out_opt_  DXVA2_ConfigPictureDecode *pConfig,
+            /* [annotation][size_is][unique][out] */ 
+            _Out_writes_(*pNumSurfaces)  IDirect3DSurface9 ***pDecoderRenderTargets,
+            /* [annotation][out] */ 
+            _Out_opt_  UINT *pNumSurfaces) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetBuffer( 
+            /* [annotation][in] */ 
+            _In_  UINT BufferType,
+            /* [annotation][out] */ 
+            _Out_  void **ppBuffer,
+            /* [annotation][out] */ 
+            _Out_  UINT *pBufferSize) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( 
+            /* [annotation][in] */ 
+            _In_  UINT BufferType) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE BeginFrame( 
+            /* [annotation][in] */ 
+            _In_  IDirect3DSurface9 *pRenderTarget,
+            /* [annotation][in] */ 
+            _In_opt_  void *pvPVPData) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE EndFrame( 
+            /* [annotation][out] */ 
+            _Inout_opt_  HANDLE *pHandleComplete) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE Execute( 
+            /* [annotation][in] */ 
+            _In_  const DXVA2_DecodeExecuteParams *pExecuteParams) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct IDirectXVideoDecoderVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDirectXVideoDecoder * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDirectXVideoDecoder * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDirectXVideoDecoder * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetVideoDecoderService )( 
+            IDirectXVideoDecoder * This,
+            /* [annotation][out] */ 
+            _Outptr_  IDirectXVideoDecoderService **ppService);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCreationParameters )( 
+            IDirectXVideoDecoder * This,
+            /* [annotation][out] */ 
+            _Out_opt_  GUID *pDeviceGuid,
+            /* [annotation][out] */ 
+            _Out_opt_  DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][out] */ 
+            _Out_opt_  DXVA2_ConfigPictureDecode *pConfig,
+            /* [annotation][size_is][unique][out] */ 
+            _Out_writes_(*pNumSurfaces)  IDirect3DSurface9 ***pDecoderRenderTargets,
+            /* [annotation][out] */ 
+            _Out_opt_  UINT *pNumSurfaces);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetBuffer )( 
+            IDirectXVideoDecoder * This,
+            /* [annotation][in] */ 
+            _In_  UINT BufferType,
+            /* [annotation][out] */ 
+            _Out_  void **ppBuffer,
+            /* [annotation][out] */ 
+            _Out_  UINT *pBufferSize);
+        
+        HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( 
+            IDirectXVideoDecoder * This,
+            /* [annotation][in] */ 
+            _In_  UINT BufferType);
+        
+        HRESULT ( STDMETHODCALLTYPE *BeginFrame )( 
+            IDirectXVideoDecoder * This,
+            /* [annotation][in] */ 
+            _In_  IDirect3DSurface9 *pRenderTarget,
+            /* [annotation][in] */ 
+            _In_opt_  void *pvPVPData);
+        
+        HRESULT ( STDMETHODCALLTYPE *EndFrame )( 
+            IDirectXVideoDecoder * This,
+            /* [annotation][out] */ 
+            _Inout_opt_  HANDLE *pHandleComplete);
+        
+        HRESULT ( STDMETHODCALLTYPE *Execute )( 
+            IDirectXVideoDecoder * This,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_DecodeExecuteParams *pExecuteParams);
+        
+        END_INTERFACE
+    } IDirectXVideoDecoderVtbl;
+
+    interface IDirectXVideoDecoder
+    {
+        CONST_VTBL struct IDirectXVideoDecoderVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDirectXVideoDecoder_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDirectXVideoDecoder_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDirectXVideoDecoder_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDirectXVideoDecoder_GetVideoDecoderService(This,ppService)	\
+    ( (This)->lpVtbl -> GetVideoDecoderService(This,ppService) ) 
+
+#define IDirectXVideoDecoder_GetCreationParameters(This,pDeviceGuid,pVideoDesc,pConfig,pDecoderRenderTargets,pNumSurfaces)	\
+    ( (This)->lpVtbl -> GetCreationParameters(This,pDeviceGuid,pVideoDesc,pConfig,pDecoderRenderTargets,pNumSurfaces) ) 
+
+#define IDirectXVideoDecoder_GetBuffer(This,BufferType,ppBuffer,pBufferSize)	\
+    ( (This)->lpVtbl -> GetBuffer(This,BufferType,ppBuffer,pBufferSize) ) 
+
+#define IDirectXVideoDecoder_ReleaseBuffer(This,BufferType)	\
+    ( (This)->lpVtbl -> ReleaseBuffer(This,BufferType) ) 
+
+#define IDirectXVideoDecoder_BeginFrame(This,pRenderTarget,pvPVPData)	\
+    ( (This)->lpVtbl -> BeginFrame(This,pRenderTarget,pvPVPData) ) 
+
+#define IDirectXVideoDecoder_EndFrame(This,pHandleComplete)	\
+    ( (This)->lpVtbl -> EndFrame(This,pHandleComplete) ) 
+
+#define IDirectXVideoDecoder_Execute(This,pExecuteParams)	\
+    ( (This)->lpVtbl -> Execute(This,pExecuteParams) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDirectXVideoDecoder_INTERFACE_DEFINED__ */
+
+
+#ifndef __IDirectXVideoProcessor_INTERFACE_DEFINED__
+#define __IDirectXVideoProcessor_INTERFACE_DEFINED__
+
+/* interface IDirectXVideoProcessor */
+/* [local][helpstring][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IDirectXVideoProcessor;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("8c3a39f0-916e-4690-804f-4c8001355d25")
+    IDirectXVideoProcessor : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorService( 
+            /* [annotation][out] */ 
+            _Outptr_  IDirectXVideoProcessorService **ppService) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetCreationParameters( 
+            /* [annotation][out] */ 
+            _Out_opt_  GUID *pDeviceGuid,
+            /* [annotation][out] */ 
+            _Out_opt_  DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][out] */ 
+            _Out_opt_  D3DFORMAT *pRenderTargetFormat,
+            /* [annotation][out] */ 
+            _Out_opt_  UINT *pMaxNumSubStreams) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCaps( 
+            /* [annotation][out] */ 
+            _Out_  DXVA2_VideoProcessorCaps *pCaps) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetProcAmpRange( 
+            /* [annotation][in] */ 
+            _In_  UINT ProcAmpCap,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_ValueRange *pRange) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE GetFilterPropertyRange( 
+            /* [annotation][in] */ 
+            _In_  UINT FilterSetting,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_ValueRange *pRange) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE VideoProcessBlt( 
+            /* [annotation][in] */ 
+            _In_  IDirect3DSurface9 *pRenderTarget,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoProcessBltParams *pBltParams,
+            /* [annotation][size_is][in] */ 
+            _In_reads_(NumSamples)  const DXVA2_VideoSample *pSamples,
+            /* [annotation][in] */ 
+            _In_  UINT NumSamples,
+            /* [annotation][out] */ 
+            _Inout_opt_  HANDLE *pHandleComplete) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct IDirectXVideoProcessorVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDirectXVideoProcessor * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDirectXVideoProcessor * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDirectXVideoProcessor * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorService )( 
+            IDirectXVideoProcessor * This,
+            /* [annotation][out] */ 
+            _Outptr_  IDirectXVideoProcessorService **ppService);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetCreationParameters )( 
+            IDirectXVideoProcessor * This,
+            /* [annotation][out] */ 
+            _Out_opt_  GUID *pDeviceGuid,
+            /* [annotation][out] */ 
+            _Out_opt_  DXVA2_VideoDesc *pVideoDesc,
+            /* [annotation][out] */ 
+            _Out_opt_  D3DFORMAT *pRenderTargetFormat,
+            /* [annotation][out] */ 
+            _Out_opt_  UINT *pMaxNumSubStreams);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetVideoProcessorCaps )( 
+            IDirectXVideoProcessor * This,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_VideoProcessorCaps *pCaps);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetProcAmpRange )( 
+            IDirectXVideoProcessor * This,
+            /* [annotation][in] */ 
+            _In_  UINT ProcAmpCap,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_ValueRange *pRange);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetFilterPropertyRange )( 
+            IDirectXVideoProcessor * This,
+            /* [annotation][in] */ 
+            _In_  UINT FilterSetting,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_ValueRange *pRange);
+        
+        HRESULT ( STDMETHODCALLTYPE *VideoProcessBlt )( 
+            IDirectXVideoProcessor * This,
+            /* [annotation][in] */ 
+            _In_  IDirect3DSurface9 *pRenderTarget,
+            /* [annotation][in] */ 
+            _In_  const DXVA2_VideoProcessBltParams *pBltParams,
+            /* [annotation][size_is][in] */ 
+            _In_reads_(NumSamples)  const DXVA2_VideoSample *pSamples,
+            /* [annotation][in] */ 
+            _In_  UINT NumSamples,
+            /* [annotation][out] */ 
+            _Inout_opt_  HANDLE *pHandleComplete);
+        
+        END_INTERFACE
+    } IDirectXVideoProcessorVtbl;
+
+    interface IDirectXVideoProcessor
+    {
+        CONST_VTBL struct IDirectXVideoProcessorVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDirectXVideoProcessor_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDirectXVideoProcessor_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDirectXVideoProcessor_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDirectXVideoProcessor_GetVideoProcessorService(This,ppService)	\
+    ( (This)->lpVtbl -> GetVideoProcessorService(This,ppService) ) 
+
+#define IDirectXVideoProcessor_GetCreationParameters(This,pDeviceGuid,pVideoDesc,pRenderTargetFormat,pMaxNumSubStreams)	\
+    ( (This)->lpVtbl -> GetCreationParameters(This,pDeviceGuid,pVideoDesc,pRenderTargetFormat,pMaxNumSubStreams) ) 
+
+#define IDirectXVideoProcessor_GetVideoProcessorCaps(This,pCaps)	\
+    ( (This)->lpVtbl -> GetVideoProcessorCaps(This,pCaps) ) 
+
+#define IDirectXVideoProcessor_GetProcAmpRange(This,ProcAmpCap,pRange)	\
+    ( (This)->lpVtbl -> GetProcAmpRange(This,ProcAmpCap,pRange) ) 
+
+#define IDirectXVideoProcessor_GetFilterPropertyRange(This,FilterSetting,pRange)	\
+    ( (This)->lpVtbl -> GetFilterPropertyRange(This,FilterSetting,pRange) ) 
+
+#define IDirectXVideoProcessor_VideoProcessBlt(This,pRenderTarget,pBltParams,pSamples,NumSamples,pHandleComplete)	\
+    ( (This)->lpVtbl -> VideoProcessBlt(This,pRenderTarget,pBltParams,pSamples,NumSamples,pHandleComplete) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDirectXVideoProcessor_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxva2api_0000_0006 */
+/* [local] */ 
+
+typedef /* [public][public][public] */ 
+enum __MIDL___MIDL_itf_dxva2api_0000_0006_0001
+    {
+        DXVA2_SurfaceType_DecoderRenderTarget	= 0,
+        DXVA2_SurfaceType_ProcessorRenderTarget	= 1,
+        DXVA2_SurfaceType_D3DRenderTargetTexture	= 2
+    } 	DXVA2_SurfaceType;
+
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxva2api_0000_0006_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxva2api_0000_0006_v0_0_s_ifspec;
+
+#ifndef __IDirectXVideoMemoryConfiguration_INTERFACE_DEFINED__
+#define __IDirectXVideoMemoryConfiguration_INTERFACE_DEFINED__
+
+/* interface IDirectXVideoMemoryConfiguration */
+/* [local][helpstring][uuid][object] */ 
+
+
+EXTERN_C const IID IID_IDirectXVideoMemoryConfiguration;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+    
+    MIDL_INTERFACE("b7f916dd-db3b-49c1-84d7-e45ef99ec726")
+    IDirectXVideoMemoryConfiguration : public IUnknown
+    {
+    public:
+        virtual HRESULT STDMETHODCALLTYPE GetAvailableSurfaceTypeByIndex( 
+            /* [annotation][in] */ 
+            _In_  DWORD dwTypeIndex,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_SurfaceType *pdwType) = 0;
+        
+        virtual HRESULT STDMETHODCALLTYPE SetSurfaceType( 
+            /* [annotation][in] */ 
+            _In_  DXVA2_SurfaceType dwType) = 0;
+        
+    };
+    
+    
+#else 	/* C style interface */
+
+    typedef struct IDirectXVideoMemoryConfigurationVtbl
+    {
+        BEGIN_INTERFACE
+        
+        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
+            IDirectXVideoMemoryConfiguration * This,
+            /* [in] */ REFIID riid,
+            /* [annotation][iid_is][out] */ 
+            _COM_Outptr_  void **ppvObject);
+        
+        ULONG ( STDMETHODCALLTYPE *AddRef )( 
+            IDirectXVideoMemoryConfiguration * This);
+        
+        ULONG ( STDMETHODCALLTYPE *Release )( 
+            IDirectXVideoMemoryConfiguration * This);
+        
+        HRESULT ( STDMETHODCALLTYPE *GetAvailableSurfaceTypeByIndex )( 
+            IDirectXVideoMemoryConfiguration * This,
+            /* [annotation][in] */ 
+            _In_  DWORD dwTypeIndex,
+            /* [annotation][out] */ 
+            _Out_  DXVA2_SurfaceType *pdwType);
+        
+        HRESULT ( STDMETHODCALLTYPE *SetSurfaceType )( 
+            IDirectXVideoMemoryConfiguration * This,
+            /* [annotation][in] */ 
+            _In_  DXVA2_SurfaceType dwType);
+        
+        END_INTERFACE
+    } IDirectXVideoMemoryConfigurationVtbl;
+
+    interface IDirectXVideoMemoryConfiguration
+    {
+        CONST_VTBL struct IDirectXVideoMemoryConfigurationVtbl *lpVtbl;
+    };
+
+    
+
+#ifdef COBJMACROS
+
+
+#define IDirectXVideoMemoryConfiguration_QueryInterface(This,riid,ppvObject)	\
+    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
+
+#define IDirectXVideoMemoryConfiguration_AddRef(This)	\
+    ( (This)->lpVtbl -> AddRef(This) ) 
+
+#define IDirectXVideoMemoryConfiguration_Release(This)	\
+    ( (This)->lpVtbl -> Release(This) ) 
+
+
+#define IDirectXVideoMemoryConfiguration_GetAvailableSurfaceTypeByIndex(This,dwTypeIndex,pdwType)	\
+    ( (This)->lpVtbl -> GetAvailableSurfaceTypeByIndex(This,dwTypeIndex,pdwType) ) 
+
+#define IDirectXVideoMemoryConfiguration_SetSurfaceType(This,dwType)	\
+    ( (This)->lpVtbl -> SetSurfaceType(This,dwType) ) 
+
+#endif /* COBJMACROS */
+
+
+#endif 	/* C style interface */
+
+
+
+
+#endif 	/* __IDirectXVideoMemoryConfiguration_INTERFACE_DEFINED__ */
+
+
+/* interface __MIDL_itf_dxva2api_0000_0007 */
+/* [local] */ 
+
+STDAPI DXVA2CreateDirect3DDeviceManager9(
+    _Out_ UINT* pResetToken,
+    _Outptr_ IDirect3DDeviceManager9** ppDeviceManager
+    );
+STDAPI DXVA2CreateVideoService(
+    _In_ IDirect3DDevice9* pDD,
+    _In_ REFIID riid,
+    _Outptr_ void** ppService
+    );
+#endif  // _D3D9_H_
+__inline DXVA2_Fixed32 DXVA2FloatToFixed(_In_ const float _float_)
+{
+    DXVA2_Fixed32 _fixed_;
+    _fixed_.Fraction = LOWORD(_float_ * 0x10000);
+    _fixed_.Value = HIWORD(_float_ * 0x10000);
+    return _fixed_;
+}
+__inline float DXVA2FixedToFloat(_In_ const DXVA2_Fixed32 _fixed_)
+{
+    return (FLOAT)_fixed_.Value + (FLOAT)_fixed_.Fraction / 0x10000;
+}
+__inline const DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha()
+{
+    DXVA2_Fixed32 _fixed_ = {0, 0};
+    return _fixed_;
+}
+__inline const DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha()
+{
+    DXVA2_Fixed32 _fixed_ = {0, 1};
+    return _fixed_;
+}
+#endif
+
+
+extern RPC_IF_HANDLE __MIDL_itf_dxva2api_0000_0007_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_dxva2api_0000_0007_v0_0_s_ifspec;
+
+/* Additional Prototypes for ALL interfaces */
+
+/* end of Additional Prototypes */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+

+ 24 - 0
bgfx.mod/bgfx/3rdparty/dxsdk/include/winapifamily.h

@@ -0,0 +1,24 @@
+/**
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#ifndef _INC_WINAPIFAMILY
+#define _INC_WINAPIFAMILY
+
+#define WINAPI_PARTITION_DESKTOP 0x1
+#define WINAPI_PARTITION_APP     0x2    
+
+#define WINAPI_FAMILY_APP WINAPI_PARTITION_APP
+#define WINAPI_FAMILY_DESKTOP_APP (WINAPI_PARTITION_DESKTOP \
+				   | WINAPI_PARTITION_APP)    
+
+/* WINAPI_FAMILY can be either desktop + App, or App.  */
+#ifndef WINAPI_FAMILY
+#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
+#endif
+
+#define WINAPI_FAMILY_PARTITION(v) ((WINAPI_FAMILY & v) == v)
+#define WINAPI_FAMILY_ONE_PARTITION(vset, v) ((WINAPI_FAMILY & vset) == v)
+
+#endif 

+ 0 - 1416
bgfx.mod/bgfx/3rdparty/openvr/openvr_capi.h

@@ -1,1416 +0,0 @@
-//======= Copyright 1996-2016, Valve Corporation, All rights reserved. ========
-//
-// Purpose: Header for flatted SteamAPI. Use this for binding to other languages.
-// This file is auto-generated, do not edit it.
-//
-//=============================================================================
-
-#ifndef __OPENVR_API_FLAT_H__
-#define __OPENVR_API_FLAT_H__
-#if defined( _WIN32 ) || defined( __clang__ )
-#pragma once
-#endif
-
-#ifdef __cplusplus
-#define EXTERN_C extern "C"
-#else
-#define EXTERN_C
-#endif
-
-#if defined( _WIN32 )
-#	define OPENVR_FNTABLE_CALLTYPE __stdcall
-#else
-#	define OPENVR_FNTABLE_CALLTYPE
-#endif //
-
-// OPENVR API export macro
-#if defined( _WIN32 ) && !defined( _X360 )
-	#if defined( OPENVR_API_EXPORTS )
-	#define S_API EXTERN_C __declspec( dllexport )
-	#elif defined( OPENVR_API_NODLL )
-	#define S_API EXTERN_C
-	#else
-	#define S_API extern "C" __declspec( dllimport ) 
-	#endif // OPENVR_API_EXPORTS
-#elif defined( GNUC )
-	#if defined( OPENVR_API_EXPORTS )
-	#define S_API EXTERN_C __attribute__ ((visibility("default")))
-	#else
-	#define S_API EXTERN_C
-	#endif // OPENVR_API_EXPORTS
-#else // !WIN32
-	#if defined( OPENVR_API_EXPORTS )
-	#define S_API EXTERN_C
-	#else
-	#define S_API EXTERN_C
-	#endif // OPENVR_API_EXPORTS
-#endif
-
-#include <stdint.h>
-
-// OpenVR Constants
-
-static const unsigned int k_unTrackingStringSize = 32;
-static const unsigned int k_unMaxDriverDebugResponseSize = 32768;
-static const unsigned int k_unTrackedDeviceIndex_Hmd = 0;
-static const unsigned int k_unMaxTrackedDeviceCount = 16;
-static const unsigned int k_unTrackedDeviceIndexInvalid = 4294967295;
-static const unsigned int k_unMaxPropertyStringSize = 32768;
-static const unsigned int k_unControllerStateAxisCount = 5;
-static const unsigned long k_ulOverlayHandleInvalid = 0;
-static const char * IVRSystem_Version = "IVRSystem_012";
-static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
-static const unsigned int k_unMaxApplicationKeyLength = 128;
-static const char * IVRApplications_Version = "IVRApplications_005";
-static const char * IVRChaperone_Version = "IVRChaperone_003";
-static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
-static const char * IVRCompositor_Version = "IVRCompositor_013";
-static const unsigned int k_unVROverlayMaxKeyLength = 128;
-static const unsigned int k_unVROverlayMaxNameLength = 128;
-static const unsigned int k_unMaxOverlayCount = 32;
-static const char * IVROverlay_Version = "IVROverlay_011";
-static const char * k_pch_Controller_Component_GDC2015 = "gdc2015";
-static const char * k_pch_Controller_Component_Base = "base";
-static const char * k_pch_Controller_Component_Tip = "tip";
-static const char * k_pch_Controller_Component_HandGrip = "handgrip";
-static const char * k_pch_Controller_Component_Status = "status";
-static const char * IVRRenderModels_Version = "IVRRenderModels_005";
-static const unsigned int k_unNotificationTextMaxSize = 256;
-static const char * IVRNotifications_Version = "IVRNotifications_002";
-static const unsigned int k_unMaxSettingsKeyLength = 128;
-static const char * k_pch_SteamVR_Section = "steamvr";
-static const char * k_pch_SteamVR_RequireHmd_String = "requireHmd";
-static const char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
-static const char * k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
-static const char * k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
-static const char * k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe";
-static const char * k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
-static const char * k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
-static const char * k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
-static const char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps";
-static const char * k_pch_SteamVR_LogLevel_Int32 = "loglevel";
-static const char * k_pch_SteamVR_IPD_Float = "ipd";
-static const char * k_pch_SteamVR_Background_String = "background";
-static const char * k_pch_SteamVR_GridColor_String = "gridColor";
-static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
-static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
-static const char * k_pch_SteamVR_PowerOffOnExit_Bool = "powerOffOnExit";
-static const char * k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
-static const char * k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout";
-static const char * k_pch_SteamVR_DirectMode_Bool = "directMode";
-static const char * k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid";
-static const char * k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid";
-static const char * k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
-static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
-static const char * k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
-static const char * k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
-static const char * k_pch_Lighthouse_Section = "driver_lighthouse";
-static const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
-static const char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
-static const char * k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
-static const char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
-static const char * k_pch_Lighthouse_LighthouseName_String = "lighthousename";
-static const char * k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
-static const char * k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
-static const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
-static const char * k_pch_Lighthouse_OriginOffsetX_Float = "originoffsetx";
-static const char * k_pch_Lighthouse_OriginOffsetY_Float = "originoffsety";
-static const char * k_pch_Lighthouse_OriginOffsetZ_Float = "originoffsetz";
-static const char * k_pch_Lighthouse_HeadingOffset_Float = "headingoffset";
-static const char * k_pch_Null_Section = "driver_null";
-static const char * k_pch_Null_EnableNullDriver_Bool = "enable";
-static const char * k_pch_Null_SerialNumber_String = "serialNumber";
-static const char * k_pch_Null_ModelNumber_String = "modelNumber";
-static const char * k_pch_Null_WindowX_Int32 = "windowX";
-static const char * k_pch_Null_WindowY_Int32 = "windowY";
-static const char * k_pch_Null_WindowWidth_Int32 = "windowWidth";
-static const char * k_pch_Null_WindowHeight_Int32 = "windowHeight";
-static const char * k_pch_Null_RenderWidth_Int32 = "renderWidth";
-static const char * k_pch_Null_RenderHeight_Int32 = "renderHeight";
-static const char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
-static const char * k_pch_Null_DisplayFrequency_Float = "displayFrequency";
-static const char * k_pch_UserInterface_Section = "userinterface";
-static const char * k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
-static const char * k_pch_Notifications_Section = "notifications";
-static const char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
-static const char * k_pch_Keyboard_Section = "keyboard";
-static const char * k_pch_Keyboard_TutorialCompletions = "TutorialCompletions";
-static const char * k_pch_Perf_Section = "perfcheck";
-static const char * k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
-static const char * k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
-static const char * k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
-static const char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
-static const char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
-static const char * k_pch_Perf_TestData_Float = "perfTestData";
-static const char * k_pch_Camera_Section = "camera";
-static const char * IVRSettings_Version = "IVRSettings_001";
-static const char * k_pch_audio_Section = "audio";
-static const char * k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice";
-static const char * k_pch_audio_OnRecordDevice_String = "onRecordDevice";
-static const char * k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice";
-static const char * k_pch_audio_OffRecordDevice_String = "offRecordDevice";
-static const char * k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
-
-// OpenVR Enums
-
-typedef enum EVREye
-{
-	EVREye_Eye_Left = 0,
-	EVREye_Eye_Right = 1,
-} EVREye;
-
-typedef enum EGraphicsAPIConvention
-{
-	EGraphicsAPIConvention_API_DirectX = 0,
-	EGraphicsAPIConvention_API_OpenGL = 1,
-} EGraphicsAPIConvention;
-
-typedef enum EColorSpace
-{
-	EColorSpace_ColorSpace_Auto = 0,
-	EColorSpace_ColorSpace_Gamma = 1,
-	EColorSpace_ColorSpace_Linear = 2,
-} EColorSpace;
-
-typedef enum ETrackingResult
-{
-	ETrackingResult_TrackingResult_Uninitialized = 1,
-	ETrackingResult_TrackingResult_Calibrating_InProgress = 100,
-	ETrackingResult_TrackingResult_Calibrating_OutOfRange = 101,
-	ETrackingResult_TrackingResult_Running_OK = 200,
-	ETrackingResult_TrackingResult_Running_OutOfRange = 201,
-} ETrackingResult;
-
-typedef enum ETrackedDeviceClass
-{
-	ETrackedDeviceClass_TrackedDeviceClass_Invalid = 0,
-	ETrackedDeviceClass_TrackedDeviceClass_HMD = 1,
-	ETrackedDeviceClass_TrackedDeviceClass_Controller = 2,
-	ETrackedDeviceClass_TrackedDeviceClass_TrackingReference = 4,
-	ETrackedDeviceClass_TrackedDeviceClass_Other = 1000,
-} ETrackedDeviceClass;
-
-typedef enum ETrackedControllerRole
-{
-	ETrackedControllerRole_TrackedControllerRole_Invalid = 0,
-	ETrackedControllerRole_TrackedControllerRole_LeftHand = 1,
-	ETrackedControllerRole_TrackedControllerRole_RightHand = 2,
-} ETrackedControllerRole;
-
-typedef enum ETrackingUniverseOrigin
-{
-	ETrackingUniverseOrigin_TrackingUniverseSeated = 0,
-	ETrackingUniverseOrigin_TrackingUniverseStanding = 1,
-	ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated = 2,
-} ETrackingUniverseOrigin;
-
-typedef enum ETrackedDeviceProperty
-{
-	ETrackedDeviceProperty_Prop_TrackingSystemName_String = 1000,
-	ETrackedDeviceProperty_Prop_ModelNumber_String = 1001,
-	ETrackedDeviceProperty_Prop_SerialNumber_String = 1002,
-	ETrackedDeviceProperty_Prop_RenderModelName_String = 1003,
-	ETrackedDeviceProperty_Prop_WillDriftInYaw_Bool = 1004,
-	ETrackedDeviceProperty_Prop_ManufacturerName_String = 1005,
-	ETrackedDeviceProperty_Prop_TrackingFirmwareVersion_String = 1006,
-	ETrackedDeviceProperty_Prop_HardwareRevision_String = 1007,
-	ETrackedDeviceProperty_Prop_AllWirelessDongleDescriptions_String = 1008,
-	ETrackedDeviceProperty_Prop_ConnectedWirelessDongle_String = 1009,
-	ETrackedDeviceProperty_Prop_DeviceIsWireless_Bool = 1010,
-	ETrackedDeviceProperty_Prop_DeviceIsCharging_Bool = 1011,
-	ETrackedDeviceProperty_Prop_DeviceBatteryPercentage_Float = 1012,
-	ETrackedDeviceProperty_Prop_StatusDisplayTransform_Matrix34 = 1013,
-	ETrackedDeviceProperty_Prop_Firmware_UpdateAvailable_Bool = 1014,
-	ETrackedDeviceProperty_Prop_Firmware_ManualUpdate_Bool = 1015,
-	ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_String = 1016,
-	ETrackedDeviceProperty_Prop_HardwareRevision_Uint64 = 1017,
-	ETrackedDeviceProperty_Prop_FirmwareVersion_Uint64 = 1018,
-	ETrackedDeviceProperty_Prop_FPGAVersion_Uint64 = 1019,
-	ETrackedDeviceProperty_Prop_VRCVersion_Uint64 = 1020,
-	ETrackedDeviceProperty_Prop_RadioVersion_Uint64 = 1021,
-	ETrackedDeviceProperty_Prop_DongleVersion_Uint64 = 1022,
-	ETrackedDeviceProperty_Prop_BlockServerShutdown_Bool = 1023,
-	ETrackedDeviceProperty_Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024,
-	ETrackedDeviceProperty_Prop_ContainsProximitySensor_Bool = 1025,
-	ETrackedDeviceProperty_Prop_DeviceProvidesBatteryStatus_Bool = 1026,
-	ETrackedDeviceProperty_Prop_DeviceCanPowerOff_Bool = 1027,
-	ETrackedDeviceProperty_Prop_Firmware_ProgrammingTarget_String = 1028,
-	ETrackedDeviceProperty_Prop_DeviceClass_Int32 = 1029,
-	ETrackedDeviceProperty_Prop_HasCamera_Bool = 1030,
-	ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000,
-	ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001,
-	ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002,
-	ETrackedDeviceProperty_Prop_UserIpdMeters_Float = 2003,
-	ETrackedDeviceProperty_Prop_CurrentUniverseId_Uint64 = 2004,
-	ETrackedDeviceProperty_Prop_PreviousUniverseId_Uint64 = 2005,
-	ETrackedDeviceProperty_Prop_DisplayFirmwareVersion_Uint64 = 2006,
-	ETrackedDeviceProperty_Prop_IsOnDesktop_Bool = 2007,
-	ETrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008,
-	ETrackedDeviceProperty_Prop_DisplayMCOffset_Float = 2009,
-	ETrackedDeviceProperty_Prop_DisplayMCScale_Float = 2010,
-	ETrackedDeviceProperty_Prop_EdidVendorID_Int32 = 2011,
-	ETrackedDeviceProperty_Prop_DisplayMCImageLeft_String = 2012,
-	ETrackedDeviceProperty_Prop_DisplayMCImageRight_String = 2013,
-	ETrackedDeviceProperty_Prop_DisplayGCBlackClamp_Float = 2014,
-	ETrackedDeviceProperty_Prop_EdidProductID_Int32 = 2015,
-	ETrackedDeviceProperty_Prop_CameraToHeadTransform_Matrix34 = 2016,
-	ETrackedDeviceProperty_Prop_DisplayGCType_Int32 = 2017,
-	ETrackedDeviceProperty_Prop_DisplayGCOffset_Float = 2018,
-	ETrackedDeviceProperty_Prop_DisplayGCScale_Float = 2019,
-	ETrackedDeviceProperty_Prop_DisplayGCPrescale_Float = 2020,
-	ETrackedDeviceProperty_Prop_DisplayGCImage_String = 2021,
-	ETrackedDeviceProperty_Prop_LensCenterLeftU_Float = 2022,
-	ETrackedDeviceProperty_Prop_LensCenterLeftV_Float = 2023,
-	ETrackedDeviceProperty_Prop_LensCenterRightU_Float = 2024,
-	ETrackedDeviceProperty_Prop_LensCenterRightV_Float = 2025,
-	ETrackedDeviceProperty_Prop_UserHeadToEyeDepthMeters_Float = 2026,
-	ETrackedDeviceProperty_Prop_CameraFirmwareVersion_Uint64 = 2027,
-	ETrackedDeviceProperty_Prop_CameraFirmwareDescription_String = 2028,
-	ETrackedDeviceProperty_Prop_DisplayFPGAVersion_Uint64 = 2029,
-	ETrackedDeviceProperty_Prop_DisplayBootloaderVersion_Uint64 = 2030,
-	ETrackedDeviceProperty_Prop_DisplayHardwareVersion_Uint64 = 2031,
-	ETrackedDeviceProperty_Prop_AudioFirmwareVersion_Uint64 = 2032,
-	ETrackedDeviceProperty_Prop_CameraCompatibilityMode_Int32 = 2033,
-	ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000,
-	ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001,
-	ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002,
-	ETrackedDeviceProperty_Prop_Axis1Type_Int32 = 3003,
-	ETrackedDeviceProperty_Prop_Axis2Type_Int32 = 3004,
-	ETrackedDeviceProperty_Prop_Axis3Type_Int32 = 3005,
-	ETrackedDeviceProperty_Prop_Axis4Type_Int32 = 3006,
-	ETrackedDeviceProperty_Prop_FieldOfViewLeftDegrees_Float = 4000,
-	ETrackedDeviceProperty_Prop_FieldOfViewRightDegrees_Float = 4001,
-	ETrackedDeviceProperty_Prop_FieldOfViewTopDegrees_Float = 4002,
-	ETrackedDeviceProperty_Prop_FieldOfViewBottomDegrees_Float = 4003,
-	ETrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004,
-	ETrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005,
-	ETrackedDeviceProperty_Prop_ModeLabel_String = 4006,
-	ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000,
-	ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999,
-} ETrackedDeviceProperty;
-
-typedef enum ETrackedPropertyError
-{
-	ETrackedPropertyError_TrackedProp_Success = 0,
-	ETrackedPropertyError_TrackedProp_WrongDataType = 1,
-	ETrackedPropertyError_TrackedProp_WrongDeviceClass = 2,
-	ETrackedPropertyError_TrackedProp_BufferTooSmall = 3,
-	ETrackedPropertyError_TrackedProp_UnknownProperty = 4,
-	ETrackedPropertyError_TrackedProp_InvalidDevice = 5,
-	ETrackedPropertyError_TrackedProp_CouldNotContactServer = 6,
-	ETrackedPropertyError_TrackedProp_ValueNotProvidedByDevice = 7,
-	ETrackedPropertyError_TrackedProp_StringExceedsMaximumLength = 8,
-	ETrackedPropertyError_TrackedProp_NotYetAvailable = 9,
-} ETrackedPropertyError;
-
-typedef enum EVRSubmitFlags
-{
-	EVRSubmitFlags_Submit_Default = 0,
-	EVRSubmitFlags_Submit_LensDistortionAlreadyApplied = 1,
-	EVRSubmitFlags_Submit_GlRenderBuffer = 2,
-} EVRSubmitFlags;
-
-typedef enum EVRState
-{
-	EVRState_VRState_Undefined = -1,
-	EVRState_VRState_Off = 0,
-	EVRState_VRState_Searching = 1,
-	EVRState_VRState_Searching_Alert = 2,
-	EVRState_VRState_Ready = 3,
-	EVRState_VRState_Ready_Alert = 4,
-	EVRState_VRState_NotReady = 5,
-} EVRState;
-
-typedef enum EVREventType
-{
-	EVREventType_VREvent_None = 0,
-	EVREventType_VREvent_TrackedDeviceActivated = 100,
-	EVREventType_VREvent_TrackedDeviceDeactivated = 101,
-	EVREventType_VREvent_TrackedDeviceUpdated = 102,
-	EVREventType_VREvent_TrackedDeviceUserInteractionStarted = 103,
-	EVREventType_VREvent_TrackedDeviceUserInteractionEnded = 104,
-	EVREventType_VREvent_IpdChanged = 105,
-	EVREventType_VREvent_EnterStandbyMode = 106,
-	EVREventType_VREvent_LeaveStandbyMode = 107,
-	EVREventType_VREvent_TrackedDeviceRoleChanged = 108,
-	EVREventType_VREvent_ButtonPress = 200,
-	EVREventType_VREvent_ButtonUnpress = 201,
-	EVREventType_VREvent_ButtonTouch = 202,
-	EVREventType_VREvent_ButtonUntouch = 203,
-	EVREventType_VREvent_MouseMove = 300,
-	EVREventType_VREvent_MouseButtonDown = 301,
-	EVREventType_VREvent_MouseButtonUp = 302,
-	EVREventType_VREvent_FocusEnter = 303,
-	EVREventType_VREvent_FocusLeave = 304,
-	EVREventType_VREvent_Scroll = 305,
-	EVREventType_VREvent_TouchPadMove = 306,
-	EVREventType_VREvent_InputFocusCaptured = 400,
-	EVREventType_VREvent_InputFocusReleased = 401,
-	EVREventType_VREvent_SceneFocusLost = 402,
-	EVREventType_VREvent_SceneFocusGained = 403,
-	EVREventType_VREvent_SceneApplicationChanged = 404,
-	EVREventType_VREvent_SceneFocusChanged = 405,
-	EVREventType_VREvent_HideRenderModels = 410,
-	EVREventType_VREvent_ShowRenderModels = 411,
-	EVREventType_VREvent_OverlayShown = 500,
-	EVREventType_VREvent_OverlayHidden = 501,
-	EVREventType_VREvent_DashboardActivated = 502,
-	EVREventType_VREvent_DashboardDeactivated = 503,
-	EVREventType_VREvent_DashboardThumbSelected = 504,
-	EVREventType_VREvent_DashboardRequested = 505,
-	EVREventType_VREvent_ResetDashboard = 506,
-	EVREventType_VREvent_RenderToast = 507,
-	EVREventType_VREvent_ImageLoaded = 508,
-	EVREventType_VREvent_ShowKeyboard = 509,
-	EVREventType_VREvent_HideKeyboard = 510,
-	EVREventType_VREvent_OverlayGamepadFocusGained = 511,
-	EVREventType_VREvent_OverlayGamepadFocusLost = 512,
-	EVREventType_VREvent_OverlaySharedTextureChanged = 513,
-	EVREventType_VREvent_Notification_Shown = 600,
-	EVREventType_VREvent_Notification_Hidden = 601,
-	EVREventType_VREvent_Notification_BeginInteraction = 602,
-	EVREventType_VREvent_Notification_Destroyed = 603,
-	EVREventType_VREvent_Quit = 700,
-	EVREventType_VREvent_ProcessQuit = 701,
-	EVREventType_VREvent_QuitAborted_UserPrompt = 702,
-	EVREventType_VREvent_QuitAcknowledged = 703,
-	EVREventType_VREvent_ChaperoneDataHasChanged = 800,
-	EVREventType_VREvent_ChaperoneUniverseHasChanged = 801,
-	EVREventType_VREvent_ChaperoneTempDataHasChanged = 802,
-	EVREventType_VREvent_ChaperoneSettingsHaveChanged = 803,
-	EVREventType_VREvent_SeatedZeroPoseReset = 804,
-	EVREventType_VREvent_BackgroundSettingHasChanged = 850,
-	EVREventType_VREvent_CameraSettingsHaveChanged = 851,
-	EVREventType_VREvent_StatusUpdate = 900,
-	EVREventType_VREvent_MCImageUpdated = 1000,
-	EVREventType_VREvent_FirmwareUpdateStarted = 1100,
-	EVREventType_VREvent_FirmwareUpdateFinished = 1101,
-	EVREventType_VREvent_KeyboardClosed = 1200,
-	EVREventType_VREvent_KeyboardCharInput = 1201,
-	EVREventType_VREvent_KeyboardDone = 1202,
-	EVREventType_VREvent_ApplicationTransitionStarted = 1300,
-	EVREventType_VREvent_ApplicationTransitionAborted = 1301,
-	EVREventType_VREvent_ApplicationTransitionNewAppStarted = 1302,
-	EVREventType_VREvent_Compositor_MirrorWindowShown = 1400,
-	EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401,
-	EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410,
-	EVREventType_VREvent_Compositor_ChaperoneBoundsHidden = 1411,
-	EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500,
-	EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501,
-	EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502,
-	EVREventType_VREvent_TrackedCamera_ResumeVideoStream = 1503,
-	EVREventType_VREvent_PerformanceTest_EnableCapture = 1600,
-	EVREventType_VREvent_PerformanceTest_DisableCapture = 1601,
-	EVREventType_VREvent_PerformanceTest_FidelityLevel = 1602,
-	EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000,
-	EVREventType_VREvent_VendorSpecific_Reserved_End = 19999,
-} EVREventType;
-
-typedef enum EDeviceActivityLevel
-{
-	EDeviceActivityLevel_k_EDeviceActivityLevel_Unknown = -1,
-	EDeviceActivityLevel_k_EDeviceActivityLevel_Idle = 0,
-	EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction = 1,
-	EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction_Timeout = 2,
-	EDeviceActivityLevel_k_EDeviceActivityLevel_Standby = 3,
-} EDeviceActivityLevel;
-
-typedef enum EVRButtonId
-{
-	EVRButtonId_k_EButton_System = 0,
-	EVRButtonId_k_EButton_ApplicationMenu = 1,
-	EVRButtonId_k_EButton_Grip = 2,
-	EVRButtonId_k_EButton_DPad_Left = 3,
-	EVRButtonId_k_EButton_DPad_Up = 4,
-	EVRButtonId_k_EButton_DPad_Right = 5,
-	EVRButtonId_k_EButton_DPad_Down = 6,
-	EVRButtonId_k_EButton_A = 7,
-	EVRButtonId_k_EButton_Axis0 = 32,
-	EVRButtonId_k_EButton_Axis1 = 33,
-	EVRButtonId_k_EButton_Axis2 = 34,
-	EVRButtonId_k_EButton_Axis3 = 35,
-	EVRButtonId_k_EButton_Axis4 = 36,
-	EVRButtonId_k_EButton_SteamVR_Touchpad = 32,
-	EVRButtonId_k_EButton_SteamVR_Trigger = 33,
-	EVRButtonId_k_EButton_Dashboard_Back = 2,
-	EVRButtonId_k_EButton_Max = 64,
-} EVRButtonId;
-
-typedef enum EVRMouseButton
-{
-	EVRMouseButton_VRMouseButton_Left = 1,
-	EVRMouseButton_VRMouseButton_Right = 2,
-	EVRMouseButton_VRMouseButton_Middle = 4,
-} EVRMouseButton;
-
-typedef enum EVRControllerAxisType
-{
-	EVRControllerAxisType_k_eControllerAxis_None = 0,
-	EVRControllerAxisType_k_eControllerAxis_TrackPad = 1,
-	EVRControllerAxisType_k_eControllerAxis_Joystick = 2,
-	EVRControllerAxisType_k_eControllerAxis_Trigger = 3,
-} EVRControllerAxisType;
-
-typedef enum EVRControllerEventOutputType
-{
-	EVRControllerEventOutputType_ControllerEventOutput_OSEvents = 0,
-	EVRControllerEventOutputType_ControllerEventOutput_VREvents = 1,
-} EVRControllerEventOutputType;
-
-typedef enum ECollisionBoundsStyle
-{
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_BEGINNER = 0,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_SQUARES = 2,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_ADVANCED = 3,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_NONE = 4,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_COUNT = 5,
-} ECollisionBoundsStyle;
-
-typedef enum EVROverlayError
-{
-	EVROverlayError_VROverlayError_None = 0,
-	EVROverlayError_VROverlayError_UnknownOverlay = 10,
-	EVROverlayError_VROverlayError_InvalidHandle = 11,
-	EVROverlayError_VROverlayError_PermissionDenied = 12,
-	EVROverlayError_VROverlayError_OverlayLimitExceeded = 13,
-	EVROverlayError_VROverlayError_WrongVisibilityType = 14,
-	EVROverlayError_VROverlayError_KeyTooLong = 15,
-	EVROverlayError_VROverlayError_NameTooLong = 16,
-	EVROverlayError_VROverlayError_KeyInUse = 17,
-	EVROverlayError_VROverlayError_WrongTransformType = 18,
-	EVROverlayError_VROverlayError_InvalidTrackedDevice = 19,
-	EVROverlayError_VROverlayError_InvalidParameter = 20,
-	EVROverlayError_VROverlayError_ThumbnailCantBeDestroyed = 21,
-	EVROverlayError_VROverlayError_ArrayTooSmall = 22,
-	EVROverlayError_VROverlayError_RequestFailed = 23,
-	EVROverlayError_VROverlayError_InvalidTexture = 24,
-	EVROverlayError_VROverlayError_UnableToLoadFile = 25,
-	EVROverlayError_VROVerlayError_KeyboardAlreadyInUse = 26,
-	EVROverlayError_VROverlayError_NoNeighbor = 27,
-} EVROverlayError;
-
-typedef enum EVRApplicationType
-{
-	EVRApplicationType_VRApplication_Other = 0,
-	EVRApplicationType_VRApplication_Scene = 1,
-	EVRApplicationType_VRApplication_Overlay = 2,
-	EVRApplicationType_VRApplication_Background = 3,
-	EVRApplicationType_VRApplication_Utility = 4,
-} EVRApplicationType;
-
-typedef enum EVRFirmwareError
-{
-	EVRFirmwareError_VRFirmwareError_None = 0,
-	EVRFirmwareError_VRFirmwareError_Success = 1,
-	EVRFirmwareError_VRFirmwareError_Fail = 2,
-} EVRFirmwareError;
-
-typedef enum EVRNotificationError
-{
-	EVRNotificationError_VRNotificationError_OK = 0,
-	EVRNotificationError_VRNotificationError_InvalidNotificationId = 100,
-	EVRNotificationError_VRNotificationError_NotificationQueueFull = 101,
-	EVRNotificationError_VRNotificationError_InvalidOverlayHandle = 102,
-} EVRNotificationError;
-
-typedef enum EVRInitError
-{
-	EVRInitError_VRInitError_None = 0,
-	EVRInitError_VRInitError_Unknown = 1,
-	EVRInitError_VRInitError_Init_InstallationNotFound = 100,
-	EVRInitError_VRInitError_Init_InstallationCorrupt = 101,
-	EVRInitError_VRInitError_Init_VRClientDLLNotFound = 102,
-	EVRInitError_VRInitError_Init_FileNotFound = 103,
-	EVRInitError_VRInitError_Init_FactoryNotFound = 104,
-	EVRInitError_VRInitError_Init_InterfaceNotFound = 105,
-	EVRInitError_VRInitError_Init_InvalidInterface = 106,
-	EVRInitError_VRInitError_Init_UserConfigDirectoryInvalid = 107,
-	EVRInitError_VRInitError_Init_HmdNotFound = 108,
-	EVRInitError_VRInitError_Init_NotInitialized = 109,
-	EVRInitError_VRInitError_Init_PathRegistryNotFound = 110,
-	EVRInitError_VRInitError_Init_NoConfigPath = 111,
-	EVRInitError_VRInitError_Init_NoLogPath = 112,
-	EVRInitError_VRInitError_Init_PathRegistryNotWritable = 113,
-	EVRInitError_VRInitError_Init_AppInfoInitFailed = 114,
-	EVRInitError_VRInitError_Init_Retry = 115,
-	EVRInitError_VRInitError_Init_InitCanceledByUser = 116,
-	EVRInitError_VRInitError_Init_AnotherAppLaunching = 117,
-	EVRInitError_VRInitError_Init_SettingsInitFailed = 118,
-	EVRInitError_VRInitError_Init_ShuttingDown = 119,
-	EVRInitError_VRInitError_Init_TooManyObjects = 120,
-	EVRInitError_VRInitError_Init_NoServerForBackgroundApp = 121,
-	EVRInitError_VRInitError_Init_NotSupportedWithCompositor = 122,
-	EVRInitError_VRInitError_Init_NotAvailableToUtilityApps = 123,
-	EVRInitError_VRInitError_Driver_Failed = 200,
-	EVRInitError_VRInitError_Driver_Unknown = 201,
-	EVRInitError_VRInitError_Driver_HmdUnknown = 202,
-	EVRInitError_VRInitError_Driver_NotLoaded = 203,
-	EVRInitError_VRInitError_Driver_RuntimeOutOfDate = 204,
-	EVRInitError_VRInitError_Driver_HmdInUse = 205,
-	EVRInitError_VRInitError_Driver_NotCalibrated = 206,
-	EVRInitError_VRInitError_Driver_CalibrationInvalid = 207,
-	EVRInitError_VRInitError_Driver_HmdDisplayNotFound = 208,
-	EVRInitError_VRInitError_IPC_ServerInitFailed = 300,
-	EVRInitError_VRInitError_IPC_ConnectFailed = 301,
-	EVRInitError_VRInitError_IPC_SharedStateInitFailed = 302,
-	EVRInitError_VRInitError_IPC_CompositorInitFailed = 303,
-	EVRInitError_VRInitError_IPC_MutexInitFailed = 304,
-	EVRInitError_VRInitError_IPC_Failed = 305,
-	EVRInitError_VRInitError_Compositor_Failed = 400,
-	EVRInitError_VRInitError_Compositor_D3D11HardwareRequired = 401,
-	EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
-	EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000,
-} EVRInitError;
-
-typedef enum EVRApplicationError
-{
-	EVRApplicationError_VRApplicationError_None = 0,
-	EVRApplicationError_VRApplicationError_AppKeyAlreadyExists = 100,
-	EVRApplicationError_VRApplicationError_NoManifest = 101,
-	EVRApplicationError_VRApplicationError_NoApplication = 102,
-	EVRApplicationError_VRApplicationError_InvalidIndex = 103,
-	EVRApplicationError_VRApplicationError_UnknownApplication = 104,
-	EVRApplicationError_VRApplicationError_IPCFailed = 105,
-	EVRApplicationError_VRApplicationError_ApplicationAlreadyRunning = 106,
-	EVRApplicationError_VRApplicationError_InvalidManifest = 107,
-	EVRApplicationError_VRApplicationError_InvalidApplication = 108,
-	EVRApplicationError_VRApplicationError_LaunchFailed = 109,
-	EVRApplicationError_VRApplicationError_ApplicationAlreadyStarting = 110,
-	EVRApplicationError_VRApplicationError_LaunchInProgress = 111,
-	EVRApplicationError_VRApplicationError_OldApplicationQuitting = 112,
-	EVRApplicationError_VRApplicationError_TransitionAborted = 113,
-	EVRApplicationError_VRApplicationError_IsTemplate = 114,
-	EVRApplicationError_VRApplicationError_BufferTooSmall = 200,
-	EVRApplicationError_VRApplicationError_PropertyNotSet = 201,
-	EVRApplicationError_VRApplicationError_UnknownProperty = 202,
-} EVRApplicationError;
-
-typedef enum EVRApplicationProperty
-{
-	EVRApplicationProperty_VRApplicationProperty_Name_String = 0,
-	EVRApplicationProperty_VRApplicationProperty_LaunchType_String = 11,
-	EVRApplicationProperty_VRApplicationProperty_WorkingDirectory_String = 12,
-	EVRApplicationProperty_VRApplicationProperty_BinaryPath_String = 13,
-	EVRApplicationProperty_VRApplicationProperty_Arguments_String = 14,
-	EVRApplicationProperty_VRApplicationProperty_URL_String = 15,
-	EVRApplicationProperty_VRApplicationProperty_Description_String = 50,
-	EVRApplicationProperty_VRApplicationProperty_NewsURL_String = 51,
-	EVRApplicationProperty_VRApplicationProperty_ImagePath_String = 52,
-	EVRApplicationProperty_VRApplicationProperty_Source_String = 53,
-	EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60,
-	EVRApplicationProperty_VRApplicationProperty_IsTemplate_Bool = 61,
-	EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62,
-	EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70,
-} EVRApplicationProperty;
-
-typedef enum EVRApplicationTransitionState
-{
-	EVRApplicationTransitionState_VRApplicationTransition_None = 0,
-	EVRApplicationTransitionState_VRApplicationTransition_OldAppQuitSent = 10,
-	EVRApplicationTransitionState_VRApplicationTransition_WaitingForExternalLaunch = 11,
-	EVRApplicationTransitionState_VRApplicationTransition_NewAppLaunched = 20,
-} EVRApplicationTransitionState;
-
-typedef enum ChaperoneCalibrationState
-{
-	ChaperoneCalibrationState_OK = 1,
-	ChaperoneCalibrationState_Warning = 100,
-	ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101,
-	ChaperoneCalibrationState_Warning_BaseStationRemoved = 102,
-	ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103,
-	ChaperoneCalibrationState_Error = 200,
-	ChaperoneCalibrationState_Error_BaseStationUninitalized = 201,
-	ChaperoneCalibrationState_Error_BaseStationConflict = 202,
-	ChaperoneCalibrationState_Error_PlayAreaInvalid = 203,
-	ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204,
-} ChaperoneCalibrationState;
-
-typedef enum EChaperoneConfigFile
-{
-	EChaperoneConfigFile_Live = 1,
-	EChaperoneConfigFile_Temp = 2,
-} EChaperoneConfigFile;
-
-typedef enum EChaperoneImportFlags
-{
-	EChaperoneImportFlags_EChaperoneImport_BoundsOnly = 1,
-} EChaperoneImportFlags;
-
-typedef enum EVRCompositorError
-{
-	EVRCompositorError_VRCompositorError_None = 0,
-	EVRCompositorError_VRCompositorError_IncompatibleVersion = 100,
-	EVRCompositorError_VRCompositorError_DoNotHaveFocus = 101,
-	EVRCompositorError_VRCompositorError_InvalidTexture = 102,
-	EVRCompositorError_VRCompositorError_IsNotSceneApplication = 103,
-	EVRCompositorError_VRCompositorError_TextureIsOnWrongDevice = 104,
-	EVRCompositorError_VRCompositorError_TextureUsesUnsupportedFormat = 105,
-	EVRCompositorError_VRCompositorError_SharedTexturesNotSupported = 106,
-	EVRCompositorError_VRCompositorError_IndexOutOfRange = 107,
-} EVRCompositorError;
-
-typedef enum VROverlayInputMethod
-{
-	VROverlayInputMethod_None = 0,
-	VROverlayInputMethod_Mouse = 1,
-} VROverlayInputMethod;
-
-typedef enum VROverlayTransformType
-{
-	VROverlayTransformType_VROverlayTransform_Absolute = 0,
-	VROverlayTransformType_VROverlayTransform_TrackedDeviceRelative = 1,
-	VROverlayTransformType_VROverlayTransform_SystemOverlay = 2,
-	VROverlayTransformType_VROverlayTransform_TrackedComponent = 3,
-} VROverlayTransformType;
-
-typedef enum VROverlayFlags
-{
-	VROverlayFlags_None = 0,
-	VROverlayFlags_Curved = 1,
-	VROverlayFlags_RGSS4X = 2,
-	VROverlayFlags_NoDashboardTab = 3,
-	VROverlayFlags_AcceptsGamepadEvents = 4,
-	VROverlayFlags_ShowGamepadFocus = 5,
-	VROverlayFlags_SendVRScrollEvents = 6,
-	VROverlayFlags_SendVRTouchpadEvents = 7,
-	VROverlayFlags_ShowTouchPadScrollWheel = 8,
-} VROverlayFlags;
-
-typedef enum EGamepadTextInputMode
-{
-	EGamepadTextInputMode_k_EGamepadTextInputModeNormal = 0,
-	EGamepadTextInputMode_k_EGamepadTextInputModePassword = 1,
-	EGamepadTextInputMode_k_EGamepadTextInputModeSubmit = 2,
-} EGamepadTextInputMode;
-
-typedef enum EGamepadTextInputLineMode
-{
-	EGamepadTextInputLineMode_k_EGamepadTextInputLineModeSingleLine = 0,
-	EGamepadTextInputLineMode_k_EGamepadTextInputLineModeMultipleLines = 1,
-} EGamepadTextInputLineMode;
-
-typedef enum EOverlayDirection
-{
-	EOverlayDirection_OverlayDirection_Up = 0,
-	EOverlayDirection_OverlayDirection_Down = 1,
-	EOverlayDirection_OverlayDirection_Left = 2,
-	EOverlayDirection_OverlayDirection_Right = 3,
-	EOverlayDirection_OverlayDirection_Count = 4,
-} EOverlayDirection;
-
-typedef enum EVRRenderModelError
-{
-	EVRRenderModelError_VRRenderModelError_None = 0,
-	EVRRenderModelError_VRRenderModelError_Loading = 100,
-	EVRRenderModelError_VRRenderModelError_NotSupported = 200,
-	EVRRenderModelError_VRRenderModelError_InvalidArg = 300,
-	EVRRenderModelError_VRRenderModelError_InvalidModel = 301,
-	EVRRenderModelError_VRRenderModelError_NoShapes = 302,
-	EVRRenderModelError_VRRenderModelError_MultipleShapes = 303,
-	EVRRenderModelError_VRRenderModelError_TooManyIndices = 304,
-	EVRRenderModelError_VRRenderModelError_MultipleTextures = 305,
-	EVRRenderModelError_VRRenderModelError_InvalidTexture = 400,
-} EVRRenderModelError;
-
-typedef enum EVRComponentProperty
-{
-	EVRComponentProperty_VRComponentProperty_IsStatic = 1,
-	EVRComponentProperty_VRComponentProperty_IsVisible = 2,
-	EVRComponentProperty_VRComponentProperty_IsTouched = 4,
-	EVRComponentProperty_VRComponentProperty_IsPressed = 8,
-	EVRComponentProperty_VRComponentProperty_IsScrolled = 16,
-} EVRComponentProperty;
-
-typedef enum EVRNotificationType
-{
-	EVRNotificationType_Transient = 0,
-	EVRNotificationType_Persistent = 1,
-} EVRNotificationType;
-
-typedef enum EVRNotificationStyle
-{
-	EVRNotificationStyle_None = 0,
-	EVRNotificationStyle_Application = 100,
-	EVRNotificationStyle_Contact_Disabled = 200,
-	EVRNotificationStyle_Contact_Enabled = 201,
-	EVRNotificationStyle_Contact_Active = 202,
-} EVRNotificationStyle;
-
-typedef enum EVRSettingsError
-{
-	EVRSettingsError_VRSettingsError_None = 0,
-	EVRSettingsError_VRSettingsError_IPCFailed = 1,
-	EVRSettingsError_VRSettingsError_WriteFailed = 2,
-	EVRSettingsError_VRSettingsError_ReadFailed = 3,
-} EVRSettingsError;
-
-
-// OpenVR typedefs
-
-typedef uint32_t TrackedDeviceIndex_t;
-typedef uint32_t VRNotificationId;
-typedef uint64_t VROverlayHandle_t;
-typedef void * glSharedTextureHandle_t;
-typedef int32_t glInt_t;
-typedef uint32_t glUInt_t;
-typedef uint32_t TrackedDeviceIndex_t;
-typedef uint64_t VROverlayHandle_t;
-typedef uint32_t VRComponentProperties;
-typedef int32_t TextureID_t;
-typedef uint32_t VRNotificationId;
-typedef EVRInitError HmdError;
-typedef EVREye Hmd_Eye;
-typedef EGraphicsAPIConvention GraphicsAPIConvention;
-typedef EColorSpace ColorSpace;
-typedef ETrackingResult HmdTrackingResult;
-typedef ETrackedDeviceClass TrackedDeviceClass;
-typedef ETrackingUniverseOrigin TrackingUniverseOrigin;
-typedef ETrackedDeviceProperty TrackedDeviceProperty;
-typedef ETrackedPropertyError TrackedPropertyError;
-typedef EVRSubmitFlags VRSubmitFlags_t;
-typedef EVRState VRState_t;
-typedef ECollisionBoundsStyle CollisionBoundsStyle_t;
-typedef EVROverlayError VROverlayError;
-typedef EVRFirmwareError VRFirmwareError;
-typedef EVRCompositorError VRCompositorError;
-
-// OpenVR Structs
-
-typedef struct HmdMatrix34_t
-{
-	float m[3][4]; //float[3][4]
-} HmdMatrix34_t;
-
-typedef struct HmdMatrix44_t
-{
-	float m[4][4]; //float[4][4]
-} HmdMatrix44_t;
-
-typedef struct HmdVector3_t
-{
-	float v[3]; //float[3]
-} HmdVector3_t;
-
-typedef struct HmdVector4_t
-{
-	float v[4]; //float[4]
-} HmdVector4_t;
-
-typedef struct HmdVector3d_t
-{
-	double v[3]; //double[3]
-} HmdVector3d_t;
-
-typedef struct HmdVector2_t
-{
-	float v[2]; //float[2]
-} HmdVector2_t;
-
-typedef struct HmdQuaternion_t
-{
-	double w;
-	double x;
-	double y;
-	double z;
-} HmdQuaternion_t;
-
-typedef struct HmdColor_t
-{
-	float r;
-	float g;
-	float b;
-	float a;
-} HmdColor_t;
-
-typedef struct HmdQuad_t
-{
-	struct HmdVector3_t vCorners[4]; //struct vr::HmdVector3_t[4]
-} HmdQuad_t;
-
-typedef struct HmdRect2_t
-{
-	struct HmdVector2_t vTopLeft;
-	struct HmdVector2_t vBottomRight;
-} HmdRect2_t;
-
-typedef struct DistortionCoordinates_t
-{
-	float rfRed[2]; //float[2]
-	float rfGreen[2]; //float[2]
-	float rfBlue[2]; //float[2]
-} DistortionCoordinates_t;
-
-typedef struct Texture_t
-{
-	void * handle; // void *
-	enum EGraphicsAPIConvention eType;
-	enum EColorSpace eColorSpace;
-} Texture_t;
-
-typedef struct TrackedDevicePose_t
-{
-	struct HmdMatrix34_t mDeviceToAbsoluteTracking;
-	struct HmdVector3_t vVelocity;
-	struct HmdVector3_t vAngularVelocity;
-	enum ETrackingResult eTrackingResult;
-	bool bPoseIsValid;
-	bool bDeviceIsConnected;
-} TrackedDevicePose_t;
-
-typedef struct VRTextureBounds_t
-{
-	float uMin;
-	float vMin;
-	float uMax;
-	float vMax;
-} VRTextureBounds_t;
-
-typedef struct VREvent_Controller_t
-{
-	uint32_t button;
-} VREvent_Controller_t;
-
-typedef struct VREvent_Mouse_t
-{
-	float x;
-	float y;
-	uint32_t button;
-} VREvent_Mouse_t;
-
-typedef struct VREvent_Scroll_t
-{
-	float xdelta;
-	float ydelta;
-	uint32_t repeatCount;
-} VREvent_Scroll_t;
-
-typedef struct VREvent_TouchPadMove_t
-{
-	bool bFingerDown;
-	float flSecondsFingerDown;
-	float fValueXFirst;
-	float fValueYFirst;
-	float fValueXRaw;
-	float fValueYRaw;
-} VREvent_TouchPadMove_t;
-
-typedef struct VREvent_Notification_t
-{
-	uint64_t ulUserValue;
-	uint32_t notificationId;
-} VREvent_Notification_t;
-
-typedef struct VREvent_Process_t
-{
-	uint32_t pid;
-	uint32_t oldPid;
-	bool bForced;
-} VREvent_Process_t;
-
-typedef struct VREvent_Overlay_t
-{
-	uint64_t overlayHandle;
-} VREvent_Overlay_t;
-
-typedef struct VREvent_Status_t
-{
-	uint32_t statusState;
-} VREvent_Status_t;
-
-typedef struct VREvent_Keyboard_t
-{
-	char * cNewInput[8]; //char[8]
-	uint64_t uUserValue;
-} VREvent_Keyboard_t;
-
-typedef struct VREvent_Ipd_t
-{
-	float ipdMeters;
-} VREvent_Ipd_t;
-
-typedef struct VREvent_Chaperone_t
-{
-	uint64_t m_nPreviousUniverse;
-	uint64_t m_nCurrentUniverse;
-} VREvent_Chaperone_t;
-
-typedef struct VREvent_Reserved_t
-{
-	uint64_t reserved0;
-	uint64_t reserved1;
-} VREvent_Reserved_t;
-
-typedef struct VREvent_PerformanceTest_t
-{
-	uint32_t m_nFidelityLevel;
-} VREvent_PerformanceTest_t;
-
-typedef struct VREvent_SeatedZeroPoseReset_t
-{
-	bool bResetBySystemMenu;
-} VREvent_SeatedZeroPoseReset_t;
-
-typedef struct HiddenAreaMesh_t
-{
-	struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t *
-	uint32_t unTriangleCount;
-} HiddenAreaMesh_t;
-
-typedef struct VRControllerAxis_t
-{
-	float x;
-	float y;
-} VRControllerAxis_t;
-
-typedef struct VRControllerState_t
-{
-	uint32_t unPacketNum;
-	uint64_t ulButtonPressed;
-	uint64_t ulButtonTouched;
-	struct VRControllerAxis_t rAxis[5]; //struct vr::VRControllerAxis_t[5]
-} VRControllerState_t;
-
-typedef struct Compositor_OverlaySettings
-{
-	uint32_t size;
-	bool curved;
-	bool antialias;
-	float scale;
-	float distance;
-	float alpha;
-	float uOffset;
-	float vOffset;
-	float uScale;
-	float vScale;
-	float gridDivs;
-	float gridWidth;
-	float gridScale;
-	struct HmdMatrix44_t transform;
-} Compositor_OverlaySettings;
-
-typedef struct AppOverrideKeys_t
-{
-	char * pchKey; // const char *
-	char * pchValue; // const char *
-} AppOverrideKeys_t;
-
-typedef struct Compositor_FrameTiming
-{
-	uint32_t m_nSize;
-	uint32_t m_nFrameIndex;
-	uint32_t m_nNumFramePresents;
-	uint32_t m_nNumDroppedFrames;
-	double m_flSystemTimeInSeconds;
-	float m_flSceneRenderGpuMs;
-	float m_flTotalRenderGpuMs;
-	float m_flCompositorRenderGpuMs;
-	float m_flCompositorRenderCpuMs;
-	float m_flCompositorIdleCpuMs;
-	float m_flClientFrameIntervalMs;
-	float m_flPresentCallCpuMs;
-	float m_flWaitForPresentCpuMs;
-	float m_flSubmitFrameMs;
-	float m_flWaitGetPosesCalledMs;
-	float m_flNewPosesReadyMs;
-	float m_flNewFrameReadyMs;
-	float m_flCompositorUpdateStartMs;
-	float m_flCompositorUpdateEndMs;
-	float m_flCompositorRenderStartMs;
-	TrackedDevicePose_t m_HmdPose;
-	int32_t m_nFidelityLevel;
-} Compositor_FrameTiming;
-
-typedef struct VROverlayIntersectionParams_t
-{
-	struct HmdVector3_t vSource;
-	struct HmdVector3_t vDirection;
-	enum ETrackingUniverseOrigin eOrigin;
-} VROverlayIntersectionParams_t;
-
-typedef struct VROverlayIntersectionResults_t
-{
-	struct HmdVector3_t vPoint;
-	struct HmdVector3_t vNormal;
-	struct HmdVector2_t vUVs;
-	float fDistance;
-} VROverlayIntersectionResults_t;
-
-typedef struct RenderModel_ComponentState_t
-{
-	struct HmdMatrix34_t mTrackingToComponentRenderModel;
-	struct HmdMatrix34_t mTrackingToComponentLocal;
-	VRComponentProperties uProperties;
-} RenderModel_ComponentState_t;
-
-typedef struct RenderModel_Vertex_t
-{
-	struct HmdVector3_t vPosition;
-	struct HmdVector3_t vNormal;
-	float rfTextureCoord[2]; //float[2]
-} RenderModel_Vertex_t;
-
-typedef struct RenderModel_TextureMap_t
-{
-	uint16_t unWidth;
-	uint16_t unHeight;
-	uint8_t * rubTextureMapData; // const uint8_t *
-} RenderModel_TextureMap_t;
-
-typedef struct RenderModel_t
-{
-	struct RenderModel_Vertex_t * rVertexData; // const struct vr::RenderModel_Vertex_t *
-	uint32_t unVertexCount;
-	uint16_t * rIndexData; // const uint16_t *
-	uint32_t unTriangleCount;
-	TextureID_t diffuseTextureId;
-} RenderModel_t;
-
-typedef struct RenderModel_ControllerMode_State_t
-{
-	bool bScrollWheelVisible;
-} RenderModel_ControllerMode_State_t;
-
-typedef struct NotificationBitmap_t
-{
-	void * bytes; // void *
-	int32_t width;
-	int32_t height;
-	int32_t depth;
-} NotificationBitmap_t;
-
-typedef struct COpenVRContext
-{
-	intptr_t m_pVRSystem; // class vr::IVRSystem *
-	intptr_t m_pVRChaperone; // class vr::IVRChaperone *
-	intptr_t m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup *
-	intptr_t m_pVRCompositor; // class vr::IVRCompositor *
-	intptr_t m_pVROverlay; // class vr::IVROverlay *
-	intptr_t m_pVRRenderModels; // class vr::IVRRenderModels *
-	intptr_t m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
-	intptr_t m_pVRSettings; // class vr::IVRSettings *
-	intptr_t m_pVRApplications; // class vr::IVRApplications *
-} COpenVRContext;
-
-
-typedef union
-{
-	VREvent_Reserved_t reserved;
-	VREvent_Controller_t controller;
-	VREvent_Mouse_t mouse;
-	VREvent_Scroll_t scroll;
-	VREvent_Process_t process;
-	VREvent_Notification_t notification;
-	VREvent_Overlay_t overlay;
-	VREvent_Status_t status;
-	VREvent_Keyboard_t keyboard;
-	VREvent_Ipd_t ipd;
-	VREvent_Chaperone_t chaperone;
-	VREvent_PerformanceTest_t performanceTest;
-	VREvent_TouchPadMove_t touchPadMove;
-	VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
-} VREvent_Data_t;
-
-/** An event posted by the server to all running applications */
-struct VREvent_t
-{
-	uint32_t eventType; // EVREventType enum
-	TrackedDeviceIndex_t trackedDeviceIndex;
-	float eventAgeSeconds;
-	// event data must be the end of the struct as its size is variable
-	VREvent_Data_t data;
-};
-
-
-// OpenVR Function Pointer Tables
-
-struct VR_IVRSystem_FnTable
-{
-	void (OPENVR_FNTABLE_CALLTYPE *GetRecommendedRenderTargetSize)(uint32_t * pnWidth, uint32_t * pnHeight);
-	struct HmdMatrix44_t (OPENVR_FNTABLE_CALLTYPE *GetProjectionMatrix)(EVREye eEye, float fNearZ, float fFarZ, EGraphicsAPIConvention eProjType);
-	void (OPENVR_FNTABLE_CALLTYPE *GetProjectionRaw)(EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom);
-	struct DistortionCoordinates_t (OPENVR_FNTABLE_CALLTYPE *ComputeDistortion)(EVREye eEye, float fU, float fV);
-	struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetEyeToHeadTransform)(EVREye eEye);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetTimeSinceLastVsync)(float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter);
-	int32_t (OPENVR_FNTABLE_CALLTYPE *GetD3D9AdapterIndex)();
-	void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsDisplayOnDesktop)();
-	bool (OPENVR_FNTABLE_CALLTYPE *SetDisplayVisibility)(bool bIsVisibleOnDesktop);
-	void (OPENVR_FNTABLE_CALLTYPE *GetDeviceToAbsoluteTrackingPose)(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, struct TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount);
-	void (OPENVR_FNTABLE_CALLTYPE *ResetSeatedZeroPose)();
-	struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetSeatedZeroPoseToStandingAbsoluteTrackingPose)();
-	struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetRawZeroPoseToStandingAbsoluteTrackingPose)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetSortedTrackedDeviceIndicesOfClass)(ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex);
-	EDeviceActivityLevel (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceActivityLevel)(TrackedDeviceIndex_t unDeviceId);
-	void (OPENVR_FNTABLE_CALLTYPE *ApplyTransform)(struct TrackedDevicePose_t * pOutputPose, struct TrackedDevicePose_t * pTrackedDevicePose, struct HmdMatrix34_t * pTransform);
-	TrackedDeviceIndex_t (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceIndexForControllerRole)(ETrackedControllerRole unDeviceType);
-	ETrackedControllerRole (OPENVR_FNTABLE_CALLTYPE *GetControllerRoleForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex);
-	ETrackedDeviceClass (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceClass)(TrackedDeviceIndex_t unDeviceIndex);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsTrackedDeviceConnected)(TrackedDeviceIndex_t unDeviceIndex);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetBoolTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	float (OPENVR_FNTABLE_CALLTYPE *GetFloatTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	int32_t (OPENVR_FNTABLE_CALLTYPE *GetInt32TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	uint64_t (OPENVR_FNTABLE_CALLTYPE *GetUint64TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetMatrix34TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetStringTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetPropErrorNameFromEnum)(ETrackedPropertyError error);
-	bool (OPENVR_FNTABLE_CALLTYPE *PollNextEvent)(struct VREvent_t * pEvent, uint32_t uncbVREvent);
-	bool (OPENVR_FNTABLE_CALLTYPE *PollNextEventWithPose)(ETrackingUniverseOrigin eOrigin, struct VREvent_t * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetEventTypeNameFromEnum)(EVREventType eType);
-	struct HiddenAreaMesh_t (OPENVR_FNTABLE_CALLTYPE *GetHiddenAreaMesh)(EVREye eEye);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetControllerState)(TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetControllerStateWithPose)(ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, struct TrackedDevicePose_t * pTrackedDevicePose);
-	void (OPENVR_FNTABLE_CALLTYPE *TriggerHapticPulse)(TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetButtonIdNameFromEnum)(EVRButtonId eButtonId);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetControllerAxisTypeNameFromEnum)(EVRControllerAxisType eAxisType);
-	bool (OPENVR_FNTABLE_CALLTYPE *CaptureInputFocus)();
-	void (OPENVR_FNTABLE_CALLTYPE *ReleaseInputFocus)();
-	bool (OPENVR_FNTABLE_CALLTYPE *IsInputFocusCapturedByAnotherProcess)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *DriverDebugRequest)(TrackedDeviceIndex_t unDeviceIndex, char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize);
-	EVRFirmwareError (OPENVR_FNTABLE_CALLTYPE *PerformFirmwareUpdate)(TrackedDeviceIndex_t unDeviceIndex);
-	void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_Exiting)();
-	void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_UserPrompt)();
-};
-
-struct VR_IVRExtendedDisplay_FnTable
-{
-	void (OPENVR_FNTABLE_CALLTYPE *GetWindowBounds)(int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight);
-	void (OPENVR_FNTABLE_CALLTYPE *GetEyeOutputViewport)(EVREye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight);
-	void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex);
-};
-
-struct VR_IVRApplications_FnTable
-{
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *AddApplicationManifest)(char * pchApplicationManifestFullPath, bool bTemporary);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *RemoveApplicationManifest)(char * pchApplicationManifestFullPath);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsApplicationInstalled)(char * pchAppKey);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationCount)();
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetApplicationKeyByIndex)(uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetApplicationKeyByProcessId)(uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchApplication)(char * pchAppKey);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchTemplateApplication)(char * pchTemplateAppKey, char * pchNewAppKey, struct AppOverrideKeys_t * pKeys, uint32_t unKeys);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchDashboardOverlay)(char * pchAppKey);
-	bool (OPENVR_FNTABLE_CALLTYPE *CancelApplicationLaunch)(char * pchAppKey);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *IdentifyApplication)(uint32_t unProcessId, char * pchAppKey);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationProcessId)(char * pchAppKey);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetApplicationsErrorNameFromEnum)(EVRApplicationError error);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyString)(char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyBool)(char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError);
-	uint64_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyUint64)(char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *SetApplicationAutoLaunch)(char * pchAppKey, bool bAutoLaunch);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationAutoLaunch)(char * pchAppKey);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetStartingApplication)(char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
-	EVRApplicationTransitionState (OPENVR_FNTABLE_CALLTYPE *GetTransitionState)();
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *PerformApplicationPrelaunchCheck)(char * pchAppKey);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetApplicationsTransitionStateNameFromEnum)(EVRApplicationTransitionState state);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsQuitUserPromptRequested)();
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchInternalProcess)(char * pchBinaryPath, char * pchArguments, char * pchWorkingDirectory);
-};
-
-struct VR_IVRChaperone_FnTable
-{
-	ChaperoneCalibrationState (OPENVR_FNTABLE_CALLTYPE *GetCalibrationState)();
-	bool (OPENVR_FNTABLE_CALLTYPE *GetPlayAreaSize)(float * pSizeX, float * pSizeZ);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetPlayAreaRect)(struct HmdQuad_t * rect);
-	void (OPENVR_FNTABLE_CALLTYPE *ReloadInfo)();
-	void (OPENVR_FNTABLE_CALLTYPE *SetSceneColor)(struct HmdColor_t color);
-	void (OPENVR_FNTABLE_CALLTYPE *GetBoundsColor)(struct HmdColor_t * pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, struct HmdColor_t * pOutputCameraColor);
-	bool (OPENVR_FNTABLE_CALLTYPE *AreBoundsVisible)();
-	void (OPENVR_FNTABLE_CALLTYPE *ForceBoundsVisible)(bool bForce);
-};
-
-struct VR_IVRChaperoneSetup_FnTable
-{
-	bool (OPENVR_FNTABLE_CALLTYPE *CommitWorkingCopy)(EChaperoneConfigFile configFile);
-	void (OPENVR_FNTABLE_CALLTYPE *RevertWorkingCopy)();
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingPlayAreaSize)(float * pSizeX, float * pSizeZ);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingPlayAreaRect)(struct HmdQuad_t * rect);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetLiveCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatStandingZeroPoseToRawTrackingPose);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingPlayAreaSize)(float sizeX, float sizeZ);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatSeatedZeroPoseToRawTrackingPose);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose);
-	void (OPENVR_FNTABLE_CALLTYPE *ReloadFromDisk)(EChaperoneConfigFile configFile);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetLiveSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingCollisionBoundsTagsInfo)(uint8_t * pTagsBuffer, uint32_t unTagCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetLiveCollisionBoundsTagsInfo)(uint8_t * pTagsBuffer, uint32_t * punTagCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *SetWorkingPhysicalBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetLivePhysicalBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *ExportLiveToBuffer)(char * pBuffer, uint32_t * pnBufferLength);
-	bool (OPENVR_FNTABLE_CALLTYPE *ImportFromBufferToWorking)(char * pBuffer, uint32_t nImportFlags);
-};
-
-struct VR_IVRCompositor_FnTable
-{
-	void (OPENVR_FNTABLE_CALLTYPE *SetTrackingSpace)(ETrackingUniverseOrigin eOrigin);
-	ETrackingUniverseOrigin (OPENVR_FNTABLE_CALLTYPE *GetTrackingSpace)();
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *WaitGetPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount);
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount);
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoseForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex, struct TrackedDevicePose_t * pOutputPose, struct TrackedDevicePose_t * pOutputGamePose);
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *Submit)(EVREye eEye, struct Texture_t * pTexture, struct VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags);
-	void (OPENVR_FNTABLE_CALLTYPE *ClearLastSubmittedFrame)();
-	void (OPENVR_FNTABLE_CALLTYPE *PostPresentHandoff)();
-	bool (OPENVR_FNTABLE_CALLTYPE *GetFrameTiming)(struct Compositor_FrameTiming * pTiming, uint32_t unFramesAgo);
-	float (OPENVR_FNTABLE_CALLTYPE *GetFrameTimeRemaining)();
-	void (OPENVR_FNTABLE_CALLTYPE *FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
-	void (OPENVR_FNTABLE_CALLTYPE *FadeGrid)(float fSeconds, bool bFadeIn);
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetSkyboxOverride)(struct Texture_t * pTextures, uint32_t unTextureCount);
-	void (OPENVR_FNTABLE_CALLTYPE *ClearSkyboxOverride)();
-	void (OPENVR_FNTABLE_CALLTYPE *CompositorBringToFront)();
-	void (OPENVR_FNTABLE_CALLTYPE *CompositorGoToBack)();
-	void (OPENVR_FNTABLE_CALLTYPE *CompositorQuit)();
-	bool (OPENVR_FNTABLE_CALLTYPE *IsFullscreen)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentSceneFocusProcess)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetLastFrameRenderer)();
-	bool (OPENVR_FNTABLE_CALLTYPE *CanRenderScene)();
-	void (OPENVR_FNTABLE_CALLTYPE *ShowMirrorWindow)();
-	void (OPENVR_FNTABLE_CALLTYPE *HideMirrorWindow)();
-	bool (OPENVR_FNTABLE_CALLTYPE *IsMirrorWindowVisible)();
-	void (OPENVR_FNTABLE_CALLTYPE *CompositorDumpImages)();
-	bool (OPENVR_FNTABLE_CALLTYPE *ShouldAppRenderWithLowResources)();
-	void (OPENVR_FNTABLE_CALLTYPE *ForceInterleavedReprojectionOn)(bool bOverride);
-};
-
-struct VR_IVROverlay_FnTable
-{
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *FindOverlay)(char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateOverlay)(char * pchOverlayKey, char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *DestroyOverlay)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetHighQualityOverlay)(VROverlayHandle_t ulOverlayHandle);
-	VROverlayHandle_t (OPENVR_FNTABLE_CALLTYPE *GetHighQualityOverlay)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayImageData)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetOverlayErrorNameFromEnum)(EVROverlayError error);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle, uint32_t unPID);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float * pfAlpha);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAutoCurveDistanceRangeInMeters)(VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayAutoCurveDistanceRangeInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformType)(VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, char * pchComponentName);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowOverlay)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *HideOverlay)(VROverlayHandle_t ulOverlayHandle);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetTransformForOverlayCoordinates)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdVector2_t coordinatesInOverlay, struct HmdMatrix34_t * pmatTransform);
-	bool (OPENVR_FNTABLE_CALLTYPE *PollNextOverlayEvent)(VROverlayHandle_t ulOverlayHandle, struct VREvent_t * pEvent, uint32_t uncbVREvent);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale);
-	bool (OPENVR_FNTABLE_CALLTYPE *ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionParams_t * pParams, struct VROverlayIntersectionResults_t * pResults);
-	bool (OPENVR_FNTABLE_CALLTYPE *HandleControllerOverlayInteractionAsMouse)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle);
-	VROverlayHandle_t (OPENVR_FNTABLE_CALLTYPE *GetGamepadFocusOverlay)();
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetGamepadFocusOverlay)(VROverlayHandle_t ulNewFocusOverlay);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *MoveGamepadFocusToNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, struct Texture_t * pTexture);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, char * pchFilePath);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, void ** pNativeTextureHandle, void * pNativeTextureRef, uint32_t * pWidth, uint32_t * pHeight, uint32_t * pNativeFormat, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateDashboardOverlay)(char * pchOverlayKey, char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsDashboardVisible)();
-	bool (OPENVR_FNTABLE_CALLTYPE *IsActiveDashboardOverlay)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId);
-	void (OPENVR_FNTABLE_CALLTYPE *ShowDashboard)(char * pchOverlayToShow);
-	TrackedDeviceIndex_t (OPENVR_FNTABLE_CALLTYPE *GetPrimaryDashboardDevice)();
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, char * pchDescription, uint32_t unCharMax, char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, char * pchDescription, uint32_t unCharMax, char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetKeyboardText)(char * pchText, uint32_t cchText);
-	void (OPENVR_FNTABLE_CALLTYPE *HideKeyboard)();
-	void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform);
-	void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, struct HmdRect2_t avoidRect);
-};
-
-struct VR_IVRRenderModels_FnTable
-{
-	EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadRenderModel_Async)(char * pchRenderModelName, struct RenderModel_t ** ppRenderModel);
-	void (OPENVR_FNTABLE_CALLTYPE *FreeRenderModel)(struct RenderModel_t * pRenderModel);
-	EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadTexture_Async)(TextureID_t textureId, struct RenderModel_TextureMap_t ** ppTexture);
-	void (OPENVR_FNTABLE_CALLTYPE *FreeTexture)(struct RenderModel_TextureMap_t * pTexture);
-	EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadTextureD3D11_Async)(TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D);
-	EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadIntoTextureD3D11_Async)(TextureID_t textureId, void * pDstTexture);
-	void (OPENVR_FNTABLE_CALLTYPE *FreeTextureD3D11)(void * pD3D11Texture2D);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelName)(uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelCount)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentCount)(char * pchRenderModelName);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentName)(char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen);
-	uint64_t (OPENVR_FNTABLE_CALLTYPE *GetComponentButtonMask)(char * pchRenderModelName, char * pchComponentName);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentRenderModelName)(char * pchRenderModelName, char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetComponentState)(char * pchRenderModelName, char * pchComponentName, VRControllerState_t * pControllerState, struct RenderModel_ControllerMode_State_t * pState, struct RenderModel_ComponentState_t * pComponentState);
-	bool (OPENVR_FNTABLE_CALLTYPE *RenderModelHasComponent)(char * pchRenderModelName, char * pchComponentName);
-};
-
-struct VR_IVRNotifications_FnTable
-{
-	EVRNotificationError (OPENVR_FNTABLE_CALLTYPE *CreateNotification)(VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, char * pchText, EVRNotificationStyle style, struct NotificationBitmap_t * pImage, VRNotificationId * pNotificationId);
-	EVRNotificationError (OPENVR_FNTABLE_CALLTYPE *RemoveNotification)(VRNotificationId notificationId);
-};
-
-struct VR_IVRSettings_FnTable
-{
-	char * (OPENVR_FNTABLE_CALLTYPE *GetSettingsErrorNameFromEnum)(EVRSettingsError eError);
-	bool (OPENVR_FNTABLE_CALLTYPE *Sync)(bool bForce, EVRSettingsError * peError);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetBool)(char * pchSection, char * pchSettingsKey, bool bDefaultValue, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *SetBool)(char * pchSection, char * pchSettingsKey, bool bValue, EVRSettingsError * peError);
-	int32_t (OPENVR_FNTABLE_CALLTYPE *GetInt32)(char * pchSection, char * pchSettingsKey, int32_t nDefaultValue, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *SetInt32)(char * pchSection, char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError);
-	float (OPENVR_FNTABLE_CALLTYPE *GetFloat)(char * pchSection, char * pchSettingsKey, float flDefaultValue, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *SetFloat)(char * pchSection, char * pchSettingsKey, float flValue, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *GetString)(char * pchSection, char * pchSettingsKey, char * pchValue, uint32_t unValueLen, char * pchDefaultValue, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *SetString)(char * pchSection, char * pchSettingsKey, char * pchValue, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *RemoveSection)(char * pchSection, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *RemoveKeyInSection)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError);
-};
-
-
-#if 0
-// Global entry points
-S_API intptr_t VR_InitInternal( EVRInitError *peError, EVRApplicationType eType );
-S_API void VR_ShutdownInternal();
-S_API bool VR_IsHmdPresent();
-S_API intptr_t VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError );
-S_API bool VR_IsRuntimeInstalled();
-S_API const char * VR_GetVRInitErrorAsSymbol( EVRInitError error );
-S_API const char * VR_GetVRInitErrorAsEnglishDescription( EVRInitError error );
-#endif
-
-#endif // __OPENVR_API_FLAT_H__
-
-

+ 680 - 0
bgfx.mod/bgfx/3rdparty/renderdoc/renderdoc_app.h

@@ -0,0 +1,680 @@
+/******************************************************************************
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2015-2018 Baldur Karlsson
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ ******************************************************************************/
+
+#pragma once
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// Documentation for the API is available at https://renderdoc.org/docs/in_application_api.html
+//
+
+#if !defined(RENDERDOC_NO_STDINT)
+#include <stdint.h>
+#endif
+
+#if defined(WIN32)
+#define RENDERDOC_CC __cdecl
+#elif defined(__linux__)
+#define RENDERDOC_CC
+#elif defined(__APPLE__)
+#define RENDERDOC_CC
+#else
+#error "Unknown platform"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+// Constants not used directly in below API
+
+// This is a GUID/magic value used for when applications pass a path where shader debug
+// information can be found to match up with a stripped shader.
+// the define can be used like so: const GUID RENDERDOC_ShaderDebugMagicValue =
+// RENDERDOC_ShaderDebugMagicValue_value
+#define RENDERDOC_ShaderDebugMagicValue_struct                                \
+  {                                                                           \
+    0xeab25520, 0x6670, 0x4865, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff \
+  }
+
+// as an alternative when you want a byte array (assuming x86 endianness):
+#define RENDERDOC_ShaderDebugMagicValue_bytearray                                                 \
+  {                                                                                               \
+    0x20, 0x55, 0xb2, 0xea, 0x70, 0x66, 0x65, 0x48, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff \
+  }
+
+// truncated version when only a uint64_t is available (e.g. Vulkan tags):
+#define RENDERDOC_ShaderDebugMagicValue_truncated 0x48656670eab25520ULL
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+// RenderDoc capture options
+//
+
+typedef enum {
+  // Allow the application to enable vsync
+  //
+  // Default - enabled
+  //
+  // 1 - The application can enable or disable vsync at will
+  // 0 - vsync is force disabled
+  eRENDERDOC_Option_AllowVSync = 0,
+
+  // Allow the application to enable fullscreen
+  //
+  // Default - enabled
+  //
+  // 1 - The application can enable or disable fullscreen at will
+  // 0 - fullscreen is force disabled
+  eRENDERDOC_Option_AllowFullscreen = 1,
+
+  // Record API debugging events and messages
+  //
+  // Default - disabled
+  //
+  // 1 - Enable built-in API debugging features and records the results into
+  //     the capture, which is matched up with events on replay
+  // 0 - no API debugging is forcibly enabled
+  eRENDERDOC_Option_APIValidation = 2,
+  eRENDERDOC_Option_DebugDeviceMode = 2,    // deprecated name of this enum
+
+  // Capture CPU callstacks for API events
+  //
+  // Default - disabled
+  //
+  // 1 - Enables capturing of callstacks
+  // 0 - no callstacks are captured
+  eRENDERDOC_Option_CaptureCallstacks = 3,
+
+  // When capturing CPU callstacks, only capture them from drawcalls.
+  // This option does nothing without the above option being enabled
+  //
+  // Default - disabled
+  //
+  // 1 - Only captures callstacks for drawcall type API events.
+  //     Ignored if CaptureCallstacks is disabled
+  // 0 - Callstacks, if enabled, are captured for every event.
+  eRENDERDOC_Option_CaptureCallstacksOnlyDraws = 4,
+
+  // Specify a delay in seconds to wait for a debugger to attach, after
+  // creating or injecting into a process, before continuing to allow it to run.
+  //
+  // 0 indicates no delay, and the process will run immediately after injection
+  //
+  // Default - 0 seconds
+  //
+  eRENDERDOC_Option_DelayForDebugger = 5,
+
+  // Verify any writes to mapped buffers, by checking the memory after the
+  // bounds of the returned pointer to detect any modification.
+  //
+  // Default - disabled
+  //
+  // 1 - Verify any writes to mapped buffers
+  // 0 - No verification is performed, and overwriting bounds may cause
+  //     crashes or corruption in RenderDoc
+  eRENDERDOC_Option_VerifyMapWrites = 6,
+
+  // Hooks any system API calls that create child processes, and injects
+  // RenderDoc into them recursively with the same options.
+  //
+  // Default - disabled
+  //
+  // 1 - Hooks into spawned child processes
+  // 0 - Child processes are not hooked by RenderDoc
+  eRENDERDOC_Option_HookIntoChildren = 7,
+
+  // By default RenderDoc only includes resources in the final capture necessary
+  // for that frame, this allows you to override that behaviour.
+  //
+  // Default - disabled
+  //
+  // 1 - all live resources at the time of capture are included in the capture
+  //     and available for inspection
+  // 0 - only the resources referenced by the captured frame are included
+  eRENDERDOC_Option_RefAllResources = 8,
+
+  // By default RenderDoc skips saving initial states for resources where the
+  // previous contents don't appear to be used, assuming that writes before
+  // reads indicate previous contents aren't used.
+  //
+  // Default - disabled
+  //
+  // 1 - initial contents at the start of each captured frame are saved, even if
+  //     they are later overwritten or cleared before being used.
+  // 0 - unless a read is detected, initial contents will not be saved and will
+  //     appear as black or empty data.
+  eRENDERDOC_Option_SaveAllInitials = 9,
+
+  // In APIs that allow for the recording of command lists to be replayed later,
+  // RenderDoc may choose to not capture command lists before a frame capture is
+  // triggered, to reduce overheads. This means any command lists recorded once
+  // and replayed many times will not be available and may cause a failure to
+  // capture.
+  //
+  // Note this is only true for APIs where multithreading is difficult or
+  // discouraged. Newer APIs like Vulkan and D3D12 will ignore this option
+  // and always capture all command lists since the API is heavily oriented
+  // around it and the overheads have been reduced by API design.
+  //
+  // 1 - All command lists are captured from the start of the application
+  // 0 - Command lists are only captured if their recording begins during
+  //     the period when a frame capture is in progress.
+  eRENDERDOC_Option_CaptureAllCmdLists = 10,
+
+  // Mute API debugging output when the API validation mode option is enabled
+  //
+  // Default - enabled
+  //
+  // 1 - Mute any API debug messages from being displayed or passed through
+  // 0 - API debugging is displayed as normal
+  eRENDERDOC_Option_DebugOutputMute = 11,
+
+} RENDERDOC_CaptureOption;
+
+// Sets an option that controls how RenderDoc behaves on capture.
+//
+// Returns 1 if the option and value are valid
+// Returns 0 if either is invalid and the option is unchanged
+typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionU32)(RENDERDOC_CaptureOption opt, uint32_t val);
+typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionF32)(RENDERDOC_CaptureOption opt, float val);
+
+// Gets the current value of an option as a uint32_t
+//
+// If the option is invalid, 0xffffffff is returned
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionU32)(RENDERDOC_CaptureOption opt);
+
+// Gets the current value of an option as a float
+//
+// If the option is invalid, -FLT_MAX is returned
+typedef float(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionF32)(RENDERDOC_CaptureOption opt);
+
+typedef enum {
+  // '0' - '9' matches ASCII values
+  eRENDERDOC_Key_0 = 0x30,
+  eRENDERDOC_Key_1 = 0x31,
+  eRENDERDOC_Key_2 = 0x32,
+  eRENDERDOC_Key_3 = 0x33,
+  eRENDERDOC_Key_4 = 0x34,
+  eRENDERDOC_Key_5 = 0x35,
+  eRENDERDOC_Key_6 = 0x36,
+  eRENDERDOC_Key_7 = 0x37,
+  eRENDERDOC_Key_8 = 0x38,
+  eRENDERDOC_Key_9 = 0x39,
+
+  // 'A' - 'Z' matches ASCII values
+  eRENDERDOC_Key_A = 0x41,
+  eRENDERDOC_Key_B = 0x42,
+  eRENDERDOC_Key_C = 0x43,
+  eRENDERDOC_Key_D = 0x44,
+  eRENDERDOC_Key_E = 0x45,
+  eRENDERDOC_Key_F = 0x46,
+  eRENDERDOC_Key_G = 0x47,
+  eRENDERDOC_Key_H = 0x48,
+  eRENDERDOC_Key_I = 0x49,
+  eRENDERDOC_Key_J = 0x4A,
+  eRENDERDOC_Key_K = 0x4B,
+  eRENDERDOC_Key_L = 0x4C,
+  eRENDERDOC_Key_M = 0x4D,
+  eRENDERDOC_Key_N = 0x4E,
+  eRENDERDOC_Key_O = 0x4F,
+  eRENDERDOC_Key_P = 0x50,
+  eRENDERDOC_Key_Q = 0x51,
+  eRENDERDOC_Key_R = 0x52,
+  eRENDERDOC_Key_S = 0x53,
+  eRENDERDOC_Key_T = 0x54,
+  eRENDERDOC_Key_U = 0x55,
+  eRENDERDOC_Key_V = 0x56,
+  eRENDERDOC_Key_W = 0x57,
+  eRENDERDOC_Key_X = 0x58,
+  eRENDERDOC_Key_Y = 0x59,
+  eRENDERDOC_Key_Z = 0x5A,
+
+  // leave the rest of the ASCII range free
+  // in case we want to use it later
+  eRENDERDOC_Key_NonPrintable = 0x100,
+
+  eRENDERDOC_Key_Divide,
+  eRENDERDOC_Key_Multiply,
+  eRENDERDOC_Key_Subtract,
+  eRENDERDOC_Key_Plus,
+
+  eRENDERDOC_Key_F1,
+  eRENDERDOC_Key_F2,
+  eRENDERDOC_Key_F3,
+  eRENDERDOC_Key_F4,
+  eRENDERDOC_Key_F5,
+  eRENDERDOC_Key_F6,
+  eRENDERDOC_Key_F7,
+  eRENDERDOC_Key_F8,
+  eRENDERDOC_Key_F9,
+  eRENDERDOC_Key_F10,
+  eRENDERDOC_Key_F11,
+  eRENDERDOC_Key_F12,
+
+  eRENDERDOC_Key_Home,
+  eRENDERDOC_Key_End,
+  eRENDERDOC_Key_Insert,
+  eRENDERDOC_Key_Delete,
+  eRENDERDOC_Key_PageUp,
+  eRENDERDOC_Key_PageDn,
+
+  eRENDERDOC_Key_Backspace,
+  eRENDERDOC_Key_Tab,
+  eRENDERDOC_Key_PrtScrn,
+  eRENDERDOC_Key_Pause,
+
+  eRENDERDOC_Key_Max,
+} RENDERDOC_InputButton;
+
+// Sets which key or keys can be used to toggle focus between multiple windows
+//
+// If keys is NULL or num is 0, toggle keys will be disabled
+typedef void(RENDERDOC_CC *pRENDERDOC_SetFocusToggleKeys)(RENDERDOC_InputButton *keys, int num);
+
+// Sets which key or keys can be used to capture the next frame
+//
+// If keys is NULL or num is 0, captures keys will be disabled
+typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureKeys)(RENDERDOC_InputButton *keys, int num);
+
+typedef enum {
+  // This single bit controls whether the overlay is enabled or disabled globally
+  eRENDERDOC_Overlay_Enabled = 0x1,
+
+  // Show the average framerate over several seconds as well as min/max
+  eRENDERDOC_Overlay_FrameRate = 0x2,
+
+  // Show the current frame number
+  eRENDERDOC_Overlay_FrameNumber = 0x4,
+
+  // Show a list of recent captures, and how many captures have been made
+  eRENDERDOC_Overlay_CaptureList = 0x8,
+
+  // Default values for the overlay mask
+  eRENDERDOC_Overlay_Default = (eRENDERDOC_Overlay_Enabled | eRENDERDOC_Overlay_FrameRate |
+                                eRENDERDOC_Overlay_FrameNumber | eRENDERDOC_Overlay_CaptureList),
+
+  // Enable all bits
+  eRENDERDOC_Overlay_All = ~0U,
+
+  // Disable all bits
+  eRENDERDOC_Overlay_None = 0,
+} RENDERDOC_OverlayBits;
+
+// returns the overlay bits that have been set
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetOverlayBits)();
+// sets the overlay bits with an and & or mask
+typedef void(RENDERDOC_CC *pRENDERDOC_MaskOverlayBits)(uint32_t And, uint32_t Or);
+
+// this function will attempt to shut down RenderDoc.
+//
+// Note: that this will only work correctly if done immediately after
+// the dll is loaded, before any API work happens. RenderDoc will remove its
+// injected hooks and shut down. Behaviour is undefined if this is called
+// after any API functions have been called.
+typedef void(RENDERDOC_CC *pRENDERDOC_Shutdown)();
+
+// This function will unload RenderDoc's crash handler.
+//
+// If you use your own crash handler and don't want RenderDoc's handler to
+// intercede, you can call this function to unload it and any unhandled
+// exceptions will pass to the next handler.
+typedef void(RENDERDOC_CC *pRENDERDOC_UnloadCrashHandler)();
+
+// Sets the capture file path template
+//
+// pathtemplate is a UTF-8 string that gives a template for how captures will be named
+// and where they will be saved.
+//
+// Any extension is stripped off the path, and captures are saved in the directory
+// specified, and named with the filename and the frame number appended. If the
+// directory does not exist it will be created, including any parent directories.
+//
+// If pathtemplate is NULL, the template will remain unchanged
+//
+// Example:
+//
+// SetCaptureFilePathTemplate("my_captures/example");
+//
+// Capture #1 -> my_captures/example_frame123.rdc
+// Capture #2 -> my_captures/example_frame456.rdc
+typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureFilePathTemplate)(const char *pathtemplate);
+
+// returns the current capture path template, see SetCaptureFileTemplate above, as a UTF-8 string
+typedef const char *(RENDERDOC_CC *pRENDERDOC_GetCaptureFilePathTemplate)();
+
+// DEPRECATED: compatibility for code compiled against pre-1.1.2 headers.
+typedef void(RENDERDOC_CC *pRENDERDOC_SetLogFilePathTemplate)(const char *pathtemplate);
+typedef const char *(RENDERDOC_CC *pRENDERDOC_GetLogFilePathTemplate)();
+
+// returns the number of captures that have been made
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetNumCaptures)();
+
+// This function returns the details of a capture, by index. New captures are added
+// to the end of the list.
+//
+// filename will be filled with the absolute path to the capture file, as a UTF-8 string
+// pathlength will be written with the length in bytes of the filename string
+// timestamp will be written with the time of the capture, in seconds since the Unix epoch
+//
+// Any of the parameters can be NULL and they'll be skipped.
+//
+// The function will return 1 if the capture index is valid, or 0 if the index is invalid
+// If the index is invalid, the values will be unchanged
+//
+// Note: when captures are deleted in the UI they will remain in this list, so the
+// capture path may not exist anymore.
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCapture)(uint32_t idx, char *filename,
+                                                      uint32_t *pathlength, uint64_t *timestamp);
+
+// returns 1 if the RenderDoc UI is connected to this application, 0 otherwise
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsTargetControlConnected)();
+
+// DEPRECATED: compatibility for code compiled against pre-1.1.1 headers.
+// This was renamed to IsTargetControlConnected in API 1.1.1, the old typedef is kept here for
+// backwards compatibility with old code, it is castable either way since it's ABI compatible
+// as the same function pointer type.
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsRemoteAccessConnected)();
+
+// This function will launch the Replay UI associated with the RenderDoc library injected
+// into the running application.
+//
+// if connectTargetControl is 1, the Replay UI will be launched with a command line parameter
+// to connect to this application
+// cmdline is the rest of the command line, as a UTF-8 string. E.g. a captures to open
+// if cmdline is NULL, the command line will be empty.
+//
+// returns the PID of the replay UI if successful, 0 if not successful.
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_LaunchReplayUI)(uint32_t connectTargetControl,
+                                                          const char *cmdline);
+
+// RenderDoc can return a higher version than requested if it's backwards compatible,
+// this function returns the actual version returned. If a parameter is NULL, it will be
+// ignored and the others will be filled out.
+typedef void(RENDERDOC_CC *pRENDERDOC_GetAPIVersion)(int *major, int *minor, int *patch);
+
+//////////////////////////////////////////////////////////////////////////
+// Capturing functions
+//
+
+// A device pointer is a pointer to the API's root handle.
+//
+// This would be an ID3D11Device, HGLRC/GLXContext, ID3D12Device, etc
+typedef void *RENDERDOC_DevicePointer;
+
+// A window handle is the OS's native window handle
+//
+// This would be an HWND, GLXDrawable, etc
+typedef void *RENDERDOC_WindowHandle;
+
+// A helper macro for Vulkan, where the device handle cannot be used directly.
+//
+// Passing the VkInstance to this macro will return the RENDERDOC_DevicePointer to use.
+//
+// Specifically, the value needed is the dispatch table pointer, which sits as the first
+// pointer-sized object in the memory pointed to by the VkInstance. Thus we cast to a void** and
+// indirect once.
+#define RENDERDOC_DEVICEPOINTER_FROM_VKINSTANCE(inst) (*((void **)(inst)))
+
+// This sets the RenderDoc in-app overlay in the API/window pair as 'active' and it will
+// respond to keypresses. Neither parameter can be NULL
+typedef void(RENDERDOC_CC *pRENDERDOC_SetActiveWindow)(RENDERDOC_DevicePointer device,
+                                                       RENDERDOC_WindowHandle wndHandle);
+
+// capture the next frame on whichever window and API is currently considered active
+typedef void(RENDERDOC_CC *pRENDERDOC_TriggerCapture)();
+
+// capture the next N frames on whichever window and API is currently considered active
+typedef void(RENDERDOC_CC *pRENDERDOC_TriggerMultiFrameCapture)(uint32_t numFrames);
+
+// When choosing either a device pointer or a window handle to capture, you can pass NULL.
+// Passing NULL specifies a 'wildcard' match against anything. This allows you to specify
+// any API rendering to a specific window, or a specific API instance rendering to any window,
+// or in the simplest case of one window and one API, you can just pass NULL for both.
+//
+// In either case, if there are two or more possible matching (device,window) pairs it
+// is undefined which one will be captured.
+//
+// Note: for headless rendering you can pass NULL for the window handle and either specify
+// a device pointer or leave it NULL as above.
+
+// Immediately starts capturing API calls on the specified device pointer and window handle.
+//
+// If there is no matching thing to capture (e.g. no supported API has been initialised),
+// this will do nothing.
+//
+// The results are undefined (including crashes) if two captures are started overlapping,
+// even on separate devices and/oror windows.
+typedef void(RENDERDOC_CC *pRENDERDOC_StartFrameCapture)(RENDERDOC_DevicePointer device,
+                                                         RENDERDOC_WindowHandle wndHandle);
+
+// Returns whether or not a frame capture is currently ongoing anywhere.
+//
+// This will return 1 if a capture is ongoing, and 0 if there is no capture running
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsFrameCapturing)();
+
+// Ends capturing immediately.
+//
+// This will return 1 if the capture succeeded, and 0 if there was an error capturing.
+typedef uint32_t(RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(RENDERDOC_DevicePointer device,
+                                                           RENDERDOC_WindowHandle wndHandle);
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+// RenderDoc API versions
+//
+
+// RenderDoc uses semantic versioning (http://semver.org/).
+//
+// MAJOR version is incremented when incompatible API changes happen.
+// MINOR version is incremented when functionality is added in a backwards-compatible manner.
+// PATCH version is incremented when backwards-compatible bug fixes happen.
+//
+// Note that this means the API returned can be higher than the one you might have requested.
+// e.g. if you are running against a newer RenderDoc that supports 1.0.1, it will be returned
+// instead of 1.0.0. You can check this with the GetAPIVersion entry point
+typedef enum {
+  eRENDERDOC_API_Version_1_0_0 = 10000,    // RENDERDOC_API_1_0_0 = 1 00 00
+  eRENDERDOC_API_Version_1_0_1 = 10001,    // RENDERDOC_API_1_0_1 = 1 00 01
+  eRENDERDOC_API_Version_1_0_2 = 10002,    // RENDERDOC_API_1_0_2 = 1 00 02
+  eRENDERDOC_API_Version_1_1_0 = 10100,    // RENDERDOC_API_1_1_0 = 1 01 00
+  eRENDERDOC_API_Version_1_1_1 = 10101,    // RENDERDOC_API_1_1_1 = 1 01 01
+  eRENDERDOC_API_Version_1_1_2 = 10102,    // RENDERDOC_API_1_1_2 = 1 01 02
+} RENDERDOC_Version;
+
+// API version changelog:
+//
+// 1.0.0 - initial release
+// 1.0.1 - Bugfix: IsFrameCapturing() was returning false for captures that were triggered
+//         by keypress or TriggerCapture, instead of Start/EndFrameCapture.
+// 1.0.2 - Refactor: Renamed eRENDERDOC_Option_DebugDeviceMode to eRENDERDOC_Option_APIValidation
+// 1.1.0 - Add feature: TriggerMultiFrameCapture(). Backwards compatible with 1.0.x since the new
+//         function pointer is added to the end of the struct, the original layout is identical
+// 1.1.1 - Refactor: Renamed remote access to target control (to better disambiguate from remote
+//         replay/remote server concept in replay UI)
+// 1.1.2 - Refactor: Renamed "log file" in function names to just capture, to clarify that these
+//         are captures and not debug logging files. This is the first API version in the v1.0
+//         branch.
+
+// eRENDERDOC_API_Version_1_1_0
+typedef struct
+{
+  pRENDERDOC_GetAPIVersion GetAPIVersion;
+
+  pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32;
+  pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32;
+
+  pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32;
+  pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32;
+
+  pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys;
+  pRENDERDOC_SetCaptureKeys SetCaptureKeys;
+
+  pRENDERDOC_GetOverlayBits GetOverlayBits;
+  pRENDERDOC_MaskOverlayBits MaskOverlayBits;
+
+  pRENDERDOC_Shutdown Shutdown;
+  pRENDERDOC_UnloadCrashHandler UnloadCrashHandler;
+
+  pRENDERDOC_SetLogFilePathTemplate SetLogFilePathTemplate;
+  pRENDERDOC_GetLogFilePathTemplate GetLogFilePathTemplate;
+
+  pRENDERDOC_GetNumCaptures GetNumCaptures;
+  pRENDERDOC_GetCapture GetCapture;
+
+  pRENDERDOC_TriggerCapture TriggerCapture;
+
+  pRENDERDOC_IsRemoteAccessConnected IsRemoteAccessConnected;
+  pRENDERDOC_LaunchReplayUI LaunchReplayUI;
+
+  pRENDERDOC_SetActiveWindow SetActiveWindow;
+
+  pRENDERDOC_StartFrameCapture StartFrameCapture;
+  pRENDERDOC_IsFrameCapturing IsFrameCapturing;
+  pRENDERDOC_EndFrameCapture EndFrameCapture;
+
+  pRENDERDOC_TriggerMultiFrameCapture TriggerMultiFrameCapture;
+} RENDERDOC_API_1_1_0;
+
+typedef RENDERDOC_API_1_1_0 RENDERDOC_API_1_0_0;
+typedef RENDERDOC_API_1_1_0 RENDERDOC_API_1_0_1;
+typedef RENDERDOC_API_1_1_0 RENDERDOC_API_1_0_2;
+
+// although this structure is identical to RENDERDOC_API_1_1_0, the member
+// IsRemoteAccessConnected was renamed to IsTargetControlConnected. So that
+// old code can still compile with a new header, we must declare a new struct
+// type. It can be casted back and forth though, so we will still return a
+// pointer to this type for all previous API versions - the above struct is
+// purely legacy for compilation compatibility
+
+// eRENDERDOC_API_Version_1_1_1
+typedef struct
+{
+  pRENDERDOC_GetAPIVersion GetAPIVersion;
+
+  pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32;
+  pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32;
+
+  pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32;
+  pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32;
+
+  pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys;
+  pRENDERDOC_SetCaptureKeys SetCaptureKeys;
+
+  pRENDERDOC_GetOverlayBits GetOverlayBits;
+  pRENDERDOC_MaskOverlayBits MaskOverlayBits;
+
+  pRENDERDOC_Shutdown Shutdown;
+  pRENDERDOC_UnloadCrashHandler UnloadCrashHandler;
+
+  pRENDERDOC_SetLogFilePathTemplate SetLogFilePathTemplate;
+  pRENDERDOC_GetLogFilePathTemplate GetLogFilePathTemplate;
+
+  pRENDERDOC_GetNumCaptures GetNumCaptures;
+  pRENDERDOC_GetCapture GetCapture;
+
+  pRENDERDOC_TriggerCapture TriggerCapture;
+
+  pRENDERDOC_IsTargetControlConnected IsTargetControlConnected;
+  pRENDERDOC_LaunchReplayUI LaunchReplayUI;
+
+  pRENDERDOC_SetActiveWindow SetActiveWindow;
+
+  pRENDERDOC_StartFrameCapture StartFrameCapture;
+  pRENDERDOC_IsFrameCapturing IsFrameCapturing;
+  pRENDERDOC_EndFrameCapture EndFrameCapture;
+
+  pRENDERDOC_TriggerMultiFrameCapture TriggerMultiFrameCapture;
+} RENDERDOC_API_1_1_1;
+
+// similarly to above, we renamed Get/SetLogFilePathTemplate to Get/SetCaptureFilePathTemplate.
+// We thus declare a new struct so that code that was referencing the RENDERDOC_API_1_1_1 struct
+// can still compile without changes, but new code will use the new struct members
+
+// eRENDERDOC_API_Version_1_1_2
+typedef struct
+{
+  pRENDERDOC_GetAPIVersion GetAPIVersion;
+
+  pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32;
+  pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32;
+
+  pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32;
+  pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32;
+
+  pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys;
+  pRENDERDOC_SetCaptureKeys SetCaptureKeys;
+
+  pRENDERDOC_GetOverlayBits GetOverlayBits;
+  pRENDERDOC_MaskOverlayBits MaskOverlayBits;
+
+  pRENDERDOC_Shutdown Shutdown;
+  pRENDERDOC_UnloadCrashHandler UnloadCrashHandler;
+
+  pRENDERDOC_SetCaptureFilePathTemplate SetCaptureFilePathTemplate;
+  pRENDERDOC_GetCaptureFilePathTemplate GetCaptureFilePathTemplate;
+
+  pRENDERDOC_GetNumCaptures GetNumCaptures;
+  pRENDERDOC_GetCapture GetCapture;
+
+  pRENDERDOC_TriggerCapture TriggerCapture;
+
+  pRENDERDOC_IsTargetControlConnected IsTargetControlConnected;
+  pRENDERDOC_LaunchReplayUI LaunchReplayUI;
+
+  pRENDERDOC_SetActiveWindow SetActiveWindow;
+
+  pRENDERDOC_StartFrameCapture StartFrameCapture;
+  pRENDERDOC_IsFrameCapturing IsFrameCapturing;
+  pRENDERDOC_EndFrameCapture EndFrameCapture;
+
+  pRENDERDOC_TriggerMultiFrameCapture TriggerMultiFrameCapture;
+} RENDERDOC_API_1_1_2;
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+// RenderDoc API entry point
+//
+// This entry point can be obtained via GetProcAddress/dlsym if RenderDoc is available.
+//
+// The name is the same as the typedef - "RENDERDOC_GetAPI"
+//
+// This function is not thread safe, and should not be called on multiple threads at once.
+// Ideally, call this once as early as possible in your application's startup, before doing
+// any API work, since some configuration functionality etc has to be done also before
+// initialising any APIs.
+//
+// Parameters:
+//   version is a single value from the RENDERDOC_Version above.
+//
+//   outAPIPointers will be filled out with a pointer to the corresponding struct of function
+//   pointers.
+//
+// Returns:
+//   1 - if the outAPIPointers has been filled with a pointer to the API struct requested
+//   0 - if the requested version is not supported or the arguments are invalid.
+//
+typedef int(RENDERDOC_CC *pRENDERDOC_GetAPI)(RENDERDOC_Version version, void **outAPIPointers);
+
+#ifdef __cplusplus
+}    // extern "C"
+#endif

+ 57 - 8
bgfx.mod/bgfx/README.md

@@ -25,10 +25,6 @@ Supported rendering backends:
  * WebGL 1.0
  * WebGL 2.0
 
-Supported HMD:
-
- * OculusVR (1.3.0)
-
 Supported platforms:
 
  * Android (14+, ARM, x86, MIPS)
@@ -46,8 +42,8 @@ Supported platforms:
 Supported compilers:
 
  * Clang 3.3 and above
- * GCC 4.6 and above
- * VS2015 and above
+ * GCC 5 and above
+ * VS2017 and above
 
 Languages:
 
@@ -57,8 +53,7 @@ Languages:
  * [Go language API bindings](https://github.com/james4k/go-bgfx)
  * [Haskell language API bindings](https://github.com/haskell-game/bgfx)
  * [Lightweight Java Game Library 3 bindings](https://github.com/LWJGL/lwjgl3)
- * [Lua language API bindings 1](https://github.com/excessive/lua-bgfx)
- * [Lua language API bindings 2](https://github.com/cloudwu/lua-bgfx)
+ * [Lua language API bindings](https://github.com/cloudwu/lua-bgfx)
  * [Nim language API bindings](https://github.com/Halsys/nim-bgfx)
  * [Python language API bindings](https://github.com/jnadro/pybgfx#pybgf)
  * [Rust language API bindings](https://github.com/rhoot/bgfx-rs)
@@ -70,6 +65,9 @@ Languages:
  - AppVeyor https://ci.appveyor.com/project/bkaradzic/bgfx
  - TravisCI https://travis-ci.org/bkaradzic/bgfx
 
+[Getting involved](https://bkaradzic.github.io/bgfx/overview.html#getting-involved)
+-----------------------------------------------------------------------------------
+
 [Examples](https://bkaradzic.github.io/bgfx/examples.html)
 ----------------------------------------------------------
 
@@ -291,6 +289,57 @@ focused towards live graphical apps and games.
 
 ![mud](https://raw.githubusercontent.com/hugoam/mud-io/master/media/14_live_gfx.png)
 
+## Talking Tom Pool
+
+https://outfit7.com/apps/talking-tom-pool/ - "Sling and match” puzzle game for
+mobile devices.
+
+<a href="http://www.youtube.com/watch?feature=player_embedded&v=eNSI45zDEo0" 
+target="_blank"><img src="http://img.youtube.com/vi/eNSI45zDEo0/0.jpg" 
+alt="Talking Tom Pool"
+width="640" height="480" border="0" /></a>
+
+## GPlayEngine
+
+https://github.com/fredakilla/GPlayEngine#gplayengine - GPlayEngine is C++ 
+cross-platform game engine for creating 2D/3D games based on the GamePlay 3D 
+engine v3.0.
+
+![](https://camo.githubusercontent.com/d89a364fb306f208ca14a58267c8303f60f0f0cf/68747470733a2f2f692e696d6775722e636f6d2f306569395932382e706e67)
+
+## Off The Road
+
+http://www.dogbytegames.com/off_the_road.html - Sandbox off-road driving
+simulator.
+
+<a href="http://www.youtube.com/watch?feature=player_embedded&v=IUmxqAWdXvk" 
+target="_blank"><img src="http://img.youtube.com/vi/IUmxqAWdXvk/0.jpg" 
+alt="Off The Road"
+width="640" height="480" border="0" /></a>
+
+## Coal Burnout
+
+https://beardsvibe.com/ - Multiplayer PVP rhythm game.
+
+![coal-burnout](https://beardsvibe.com/scr/0l.png)
+
+## Project Aero
+
+https://www.adobe.com/products/projectaero.html - Project Aero, a powerful new
+augmented reality (AR) authoring tool that makes it easier for designers to
+create immersive content.
+
+![project-aero](https://www.adobe.com/content/dam/acom/en/products/aero/pod2.jpg/_jcr_content/renditions/cq5dam.mobile_640.640.462.jpg)
+
+## My Talking Tom 2
+
+https://outfit7.com/apps/my-talking-tom-2/ - Many mini games for mobile devices.
+
+<a href="http://www.youtube.com/watch?feature=player_embedded&v=I0U7EQKKDjw" 
+target="_blank"><img src="http://img.youtube.com/vi/I0U7EQKKDjw/0.jpg" 
+alt="My Talking Tom 2"
+width="640" height="480" border="0" /></a>
+
 [License (BSD 2-clause)](https://bkaradzic.github.io/bgfx/license.html)
 -----------------------------------------------------------------------
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 195 - 134
bgfx.mod/bgfx/include/bgfx/bgfx.h


+ 65 - 48
bgfx.mod/bgfx/include/bgfx/c99/bgfx.h

@@ -15,6 +15,10 @@
 
 #include <bx/platform.h>
 
+#if !defined(BGFX_INVALID_HANDLE)
+#   define BGFX_INVALID_HANDLE { UINT16_MAX }
+#endif // !defined(BGFX_INVALID_HANDLE)
+
 #ifndef BGFX_SHARED_LIB_BUILD
 #    define BGFX_SHARED_LIB_BUILD 0
 #endif // BGFX_SHARED_LIB_BUILD
@@ -129,6 +133,15 @@ typedef enum bgfx_texture_format
     BGFX_TEXTURE_FORMAT_PTC14A,
     BGFX_TEXTURE_FORMAT_PTC22,
     BGFX_TEXTURE_FORMAT_PTC24,
+    BGFX_TEXTURE_FORMAT_ATC,
+    BGFX_TEXTURE_FORMAT_ATCE,
+    BGFX_TEXTURE_FORMAT_ATCI,
+    BGFX_TEXTURE_FORMAT_ASTC4x4,
+    BGFX_TEXTURE_FORMAT_ASTC5x5,
+    BGFX_TEXTURE_FORMAT_ASTC6x6,
+    BGFX_TEXTURE_FORMAT_ASTC8x5,
+    BGFX_TEXTURE_FORMAT_ASTC8x6,
+    BGFX_TEXTURE_FORMAT_ASTC10x5,
 
     BGFX_TEXTURE_FORMAT_UNKNOWN,
 
@@ -248,6 +261,7 @@ typedef enum bgfx_topology
 typedef enum bgfx_topology_convert
 {
     BGFX_TOPOLOGY_CONVERT_TRI_LIST_FLIP_WINDING,
+    BGFX_TOPOLOGY_CONVERT_TRI_STRIP_FLIP_WINDING,
     BGFX_TOPOLOGY_CONVERT_TRI_LIST_TO_LINE_LIST,
     BGFX_TOPOLOGY_CONVERT_TRI_STRIP_TO_TRI_LIST,
     BGFX_TOPOLOGY_CONVERT_LINE_STRIP_TO_LINE_LIST,
@@ -323,30 +337,6 @@ typedef struct bgfx_transform_s
 
 } bgfx_transform_t;
 
-/**/
-typedef struct bgfx_hmd_eye_s
-{
-    float rotation[4];
-    float translation[3];
-    float fov[4];
-    float viewOffset[3];
-    float projection[16];
-    float pixelsPerTanAngle[2];
-
-} bgfx_hmd_eye_t;
-
-/**/
-typedef struct bgfx_hmd_s
-{
-    bgfx_hmd_eye_t eye[2];
-    uint16_t width;
-    uint16_t height;
-    uint32_t deviceWidth;
-    uint32_t deviceHeight;
-    uint8_t flags;
-
-} bgfx_hmd_t;
-
 /**/
 typedef uint16_t bgfx_view_id_t;
 
@@ -384,6 +374,7 @@ typedef struct bgfx_stats_s
 
     uint32_t numDraw;
     uint32_t numCompute;
+    uint32_t numBlit;
     uint32_t maxGpuLatency;
 
     uint16_t numDynamicIndexBuffers;
@@ -492,9 +483,11 @@ typedef struct bgfx_uniform_info_s
 /**/
 typedef struct bgfx_attachment_s
 {
+    bgfx_access_t access;
     bgfx_texture_handle_t handle;
     uint16_t mip;
     uint16_t layer;
+    uint8_t  resolve;
 
 } bgfx_attachment_t;
 
@@ -519,6 +512,7 @@ typedef struct bgfx_caps_limits_s
     uint32_t maxShaders;
     uint32_t maxTextures;
     uint32_t maxTextureSamplers;
+    uint32_t maxComputeBindings;
     uint32_t maxVertexDecls;
     uint32_t maxVertexStreams;
     uint32_t maxIndexBuffers;
@@ -576,7 +570,7 @@ typedef struct bgfx_callback_interface_s
 /**/
 typedef struct bgfx_callback_vtbl_s
 {
-    void (*fatal)(bgfx_callback_interface_t* _this, bgfx_fatal_t _code, const char* _str);
+    void (*fatal)(bgfx_callback_interface_t* _this, const char* _filePath, uint16_t _line, bgfx_fatal_t _code, const char* _str);
     void (*trace_vargs)(bgfx_callback_interface_t* _this, const char* _filePath, uint16_t _line, const char* _format, va_list _argList);
     void (*profiler_begin)(bgfx_callback_interface_t* _this, const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line);
     void (*profiler_begin_literal)(bgfx_callback_interface_t* _this, const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line);
@@ -605,12 +599,26 @@ typedef struct bgfx_allocator_vtbl_s
 
 } bgfx_allocator_vtbl_t;
 
+/**/
+typedef struct bgfx_platform_data
+{
+    void* ndt;
+    void* nwh;
+    void* context;
+    void* backBuffer;
+    void* backBufferDS;
+
+} bgfx_platform_data_t;
+
 /**/
 typedef struct bgfx_resolution_s
 {
+    bgfx_texture_format_t format;
     uint32_t width;
     uint32_t height;
     uint32_t reset;
+    uint8_t  numBackBuffers;
+    uint8_t  maxFrameLatency;
 
 } bgfx_resolution_t;
 
@@ -629,9 +637,12 @@ typedef struct bgfx_init_s
     bgfx_renderer_type_t type;
     uint16_t vendorId;
     uint16_t deviceId;
+    bool debug;
+    bool profile;
 
-    bgfx_resolution_t  resolution;
-    bgfx_init_limits_t limits;
+    bgfx_platform_data_t platformData;
+    bgfx_resolution_t    resolution;
+    bgfx_init_limits_t   limits;
 
     bgfx_callback_interface_t*  callback;
     bgfx_allocator_interface_t* allocator;
@@ -644,6 +655,12 @@ BGFX_C_API void bgfx_vertex_decl_begin(bgfx_vertex_decl_t* _decl, bgfx_renderer_
 /**/
 BGFX_C_API void bgfx_vertex_decl_add(bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
 
+/**/
+BGFX_C_API void bgfx_vertex_decl_decode(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
+
+/**/
+BGFX_C_API bool bgfx_vertex_decl_has(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib);
+
 /**/
 BGFX_C_API void bgfx_vertex_decl_skip(bgfx_vertex_decl_t* _decl, uint8_t _num);
 
@@ -684,7 +701,7 @@ BGFX_C_API bool bgfx_init(const bgfx_init_t* _init);
 BGFX_C_API void bgfx_shutdown(void);
 
 /**/
-BGFX_C_API void bgfx_reset(uint32_t _width, uint32_t _height, uint32_t _flags);
+BGFX_C_API void bgfx_reset(uint32_t _width, uint32_t _height, uint32_t _flags, bgfx_texture_format_t _format);
 
 /**/
 BGFX_C_API struct bgfx_encoder_s* bgfx_begin(void);
@@ -701,9 +718,6 @@ BGFX_C_API bgfx_renderer_type_t bgfx_get_renderer_type(void);
 /**/
 BGFX_C_API const bgfx_caps_t* bgfx_get_caps(void);
 
-/**/
-BGFX_C_API const bgfx_hmd_t* bgfx_get_hmd(void);
-
 /**/
 BGFX_C_API const bgfx_stats_t* bgfx_get_stats(void);
 
@@ -807,7 +821,7 @@ BGFX_C_API uint16_t bgfx_get_shader_uniforms(bgfx_shader_handle_t _handle, bgfx_
 BGFX_C_API void bgfx_get_uniform_info(bgfx_uniform_handle_t _handle, bgfx_uniform_info_t* _info);
 
 /**/
-BGFX_C_API void bgfx_set_shader_name(bgfx_shader_handle_t _handle, const char* _name);
+BGFX_C_API void bgfx_set_shader_name(bgfx_shader_handle_t _handle, const char* _name, int32_t _len);
 
 /**/
 BGFX_C_API void bgfx_destroy_shader(bgfx_shader_handle_t _handle);
@@ -822,25 +836,25 @@ BGFX_C_API bgfx_program_handle_t bgfx_create_compute_program(bgfx_shader_handle_
 BGFX_C_API void bgfx_destroy_program(bgfx_program_handle_t _handle);
 
 /**/
-BGFX_C_API bool bgfx_is_texture_valid(uint16_t _depth, bool _cubeMap, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags);
+BGFX_C_API bool bgfx_is_texture_valid(uint16_t _depth, bool _cubeMap, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags);
 
 /**/
 BGFX_C_API void bgfx_calc_texture_size(bgfx_texture_info_t* _info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format);
 
 /**/
-BGFX_C_API bgfx_texture_handle_t bgfx_create_texture(const bgfx_memory_t* _mem, uint32_t _flags, uint8_t _skip, bgfx_texture_info_t* _info);
+BGFX_C_API bgfx_texture_handle_t bgfx_create_texture(const bgfx_memory_t* _mem, uint64_t _flags, uint8_t _skip, bgfx_texture_info_t* _info);
 
 /**/
-BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_2d(uint16_t _width, uint16_t _height, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem);
+BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_2d(uint16_t _width, uint16_t _height, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t* _mem);
 
 /**/
-BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_2d_scaled(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags);
+BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_2d_scaled(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags);
 
 /**/
-BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_3d(uint16_t _width, uint16_t _height, uint16_t _depth, bool _hasMips, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem);
+BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_3d(uint16_t _width, uint16_t _height, uint16_t _depth, bool _hasMips, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t* _mem);
 
 /**/
-BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_cube(uint16_t _size, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem);
+BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_cube(uint16_t _size, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t* _mem);
 
 /**/
 BGFX_C_API void bgfx_update_texture_2d(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t* _mem, uint16_t _pitch);
@@ -855,16 +869,16 @@ BGFX_C_API void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, uint16_t
 BGFX_C_API uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data, uint8_t _mip);
 
 /**/
-BGFX_C_API void bgfx_set_texture_name(bgfx_texture_handle_t _handle, const char* _name);
+BGFX_C_API void bgfx_set_texture_name(bgfx_texture_handle_t _handle, const char* _name, int32_t _len);
 
 /**/
 BGFX_C_API void bgfx_destroy_texture(bgfx_texture_handle_t _handle);
 
 /**/
-BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint32_t _textureFlags);
+BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint64_t _textureFlags);
 
 /**/
-BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint32_t _textureFlags);
+BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint64_t _textureFlags);
 
 /**/
 BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, const bgfx_texture_handle_t* _handles, bool _destroyTextures);
@@ -873,7 +887,7 @@ BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint
 BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_attachment(uint8_t _num, const bgfx_attachment_t* _attachment, bool _destroyTextures);
 
 /**/
-BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_nwh(void* _nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _depthFormat);
+BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_nwh(void* _nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, bgfx_texture_format_t _depthFormat);
 
 /**/
 BGFX_C_API bgfx_texture_handle_t bgfx_get_texture(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment);
@@ -995,6 +1009,9 @@ BGFX_C_API void bgfx_set_instance_data_from_vertex_buffer(bgfx_vertex_buffer_han
 /**/
 BGFX_C_API void bgfx_set_instance_data_from_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num);
 
+/**/
+BGFX_C_API void bgfx_set_instance_count(uint32_t _numInstances);
+
 /**/
 BGFX_C_API void bgfx_set_texture(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags);
 
@@ -1002,13 +1019,13 @@ BGFX_C_API void bgfx_set_texture(uint8_t _stage, bgfx_uniform_handle_t _sampler,
 BGFX_C_API void bgfx_touch(bgfx_view_id_t _id);
 
 /**/
-BGFX_C_API void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState);
+BGFX_C_API void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _depth, bool _preserveState);
 
 /**/
-BGFX_C_API void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState);
+BGFX_C_API void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint32_t _depth, bool _preserveState);
 
 /**/
-BGFX_C_API void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState);
+BGFX_C_API void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint32_t _depth, bool _preserveState);
 
 /**/
 BGFX_C_API void bgfx_set_image(uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
@@ -1107,13 +1124,13 @@ BGFX_C_API void bgfx_encoder_set_texture(struct bgfx_encoder_s* _encoder, uint8_
 BGFX_C_API void bgfx_encoder_touch(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id);
 
 /**/
-BGFX_C_API void bgfx_encoder_submit(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState);
+BGFX_C_API void bgfx_encoder_submit(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _depth, bool _preserveState);
 
 /**/
-BGFX_C_API void bgfx_encoder_submit_occlusion_query(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState);
+BGFX_C_API void bgfx_encoder_submit_occlusion_query(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint32_t _depth, bool _preserveState);
 
 /**/
-BGFX_C_API void bgfx_encoder_submit_indirect(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState);
+BGFX_C_API void bgfx_encoder_submit_indirect(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint32_t _depth, bool _preserveState);
 
 /**/
 BGFX_C_API void bgfx_encoder_set_image(struct bgfx_encoder_s* _encoder, uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format);

+ 18 - 27
bgfx.mod/bgfx/include/bgfx/c99/platform.h

@@ -33,17 +33,6 @@ typedef enum bgfx_render_frame
  */
 BGFX_C_API bgfx_render_frame_t bgfx_render_frame(int32_t _msecs);
 
-typedef struct bgfx_platform_data
-{
-    void* ndt;
-    void* nwh;
-    void* context;
-    void* backBuffer;
-    void* backBufferDS;
-    void* session;
-
-} bgfx_platform_data_t;
-
 /**/
 BGFX_C_API void bgfx_set_platform_data(const bgfx_platform_data_t* _data);
 
@@ -73,6 +62,8 @@ typedef struct bgfx_interface_vtbl
     uintptr_t (*override_internal_texture)(bgfx_texture_handle_t _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags);
     void (*vertex_decl_begin)(bgfx_vertex_decl_t* _decl, bgfx_renderer_type_t _renderer);
     void (*vertex_decl_add)(bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
+    void (*vertex_decl_decode)(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
+    bool (*vertex_decl_has)(const bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib);
     void (*vertex_decl_skip)(bgfx_vertex_decl_t* _decl, uint8_t _num);
     void (*vertex_decl_end)(bgfx_vertex_decl_t* _decl);
     void (*vertex_pack)(const float _input[4], bool _inputNormalized, bgfx_attrib_t _attr, const bgfx_vertex_decl_t* _decl, void* _data, uint32_t _index);
@@ -86,11 +77,10 @@ typedef struct bgfx_interface_vtbl
     void (*init_ctor)(bgfx_init_t* _init);
     bool (*init)(const bgfx_init_t* _init);
     void (*shutdown)();
-    void (*reset)(uint32_t _width, uint32_t _height, uint32_t _flags);
+    void (*reset)(uint32_t _width, uint32_t _height, uint32_t _flags, bgfx_texture_format_t _format);
     uint32_t (*frame)(bool _capture);
     bgfx_renderer_type_t (*get_renderer_type)();
     const bgfx_caps_t* (*get_caps)();
-    const bgfx_hmd_t* (*get_hmd)();
     const bgfx_stats_t* (*get_stats)();
     const bgfx_memory_t* (*alloc)(uint32_t _size);
     const bgfx_memory_t* (*copy)(const void* _data, uint32_t _size);
@@ -124,29 +114,29 @@ typedef struct bgfx_interface_vtbl
     void (*destroy_indirect_buffer)(bgfx_indirect_buffer_handle_t _handle);
     bgfx_shader_handle_t (*create_shader)(const bgfx_memory_t* _mem);
     uint16_t (*get_shader_uniforms)(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t* _uniforms, uint16_t _max);
-    void (*set_shader_name)(bgfx_shader_handle_t _handle, const char* _name);
+    void (*set_shader_name)(bgfx_shader_handle_t _handle, const char* _name, int32_t _len);
     void (*destroy_shader)(bgfx_shader_handle_t _handle);
     bgfx_program_handle_t (*create_program)(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders);
     bgfx_program_handle_t (*create_compute_program)(bgfx_shader_handle_t _csh, bool _destroyShaders);
     void (*destroy_program)(bgfx_program_handle_t _handle);
-    bool (*is_texture_valid)(uint16_t _depth, bool _cubeMap, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags);
+    bool (*is_texture_valid)(uint16_t _depth, bool _cubeMap, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags);
     void (*calc_texture_size)(bgfx_texture_info_t* _info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format);
-    bgfx_texture_handle_t (*create_texture)(const bgfx_memory_t* _mem, uint32_t _flags, uint8_t _skip, bgfx_texture_info_t* _info);
-    bgfx_texture_handle_t (*create_texture_2d)(uint16_t _width, uint16_t _height, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem);
-    bgfx_texture_handle_t (*create_texture_2d_scaled)(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags);
-    bgfx_texture_handle_t (*create_texture_3d)(uint16_t _width, uint16_t _height, uint16_t _depth, bool _hasMips, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem);
-    bgfx_texture_handle_t (*create_texture_cube)(uint16_t _size, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem);
+    bgfx_texture_handle_t (*create_texture)(const bgfx_memory_t* _mem, uint64_t _flags, uint8_t _skip, bgfx_texture_info_t* _info);
+    bgfx_texture_handle_t (*create_texture_2d)(uint16_t _width, uint16_t _height, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t* _mem);
+    bgfx_texture_handle_t (*create_texture_2d_scaled)(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags);
+    bgfx_texture_handle_t (*create_texture_3d)(uint16_t _width, uint16_t _height, uint16_t _depth, bool _hasMips, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t* _mem);
+    bgfx_texture_handle_t (*create_texture_cube)(uint16_t _size, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t* _mem);
     void (*update_texture_2d)(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t* _mem, uint16_t _pitch);
     void (*update_texture_3d)(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t* _mem);
     void (*update_texture_cube)(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t* _mem, uint16_t _pitch);
     uint32_t (*read_texture)(bgfx_texture_handle_t _handle, void* _data, uint8_t _mip);
-    void (*set_texture_name)(bgfx_texture_handle_t _handle, const char* _name);
+    void (*set_texture_name)(bgfx_texture_handle_t _handle, const char* _name, int32_t _len);
     void* (*get_direct_access_ptr)(bgfx_texture_handle_t _handle);
     void (*destroy_texture)(bgfx_texture_handle_t _handle);
-    bgfx_frame_buffer_handle_t (*create_frame_buffer)(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint32_t _textureFlags);
-    bgfx_frame_buffer_handle_t (*create_frame_buffer_scaled)(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint32_t _textureFlags);
+    bgfx_frame_buffer_handle_t (*create_frame_buffer)(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint64_t _textureFlags);
+    bgfx_frame_buffer_handle_t (*create_frame_buffer_scaled)(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint64_t _textureFlags);
     bgfx_frame_buffer_handle_t (*create_frame_buffer_from_attachment)(uint8_t _num, const bgfx_attachment_t* _attachment, bool _destroyTextures);
-    bgfx_frame_buffer_handle_t (*create_frame_buffer_from_nwh)(void* _nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _depthFormat);
+    bgfx_frame_buffer_handle_t (*create_frame_buffer_from_nwh)(void* _nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, bgfx_texture_format_t _depthFormat);
     bgfx_texture_handle_t (*get_texture)(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment);
     void (*destroy_frame_buffer)(bgfx_frame_buffer_handle_t _handle);
     bgfx_uniform_handle_t (*create_uniform)(const char* _name, bgfx_uniform_type_t _type, uint16_t _num);
@@ -186,11 +176,12 @@ typedef struct bgfx_interface_vtbl
     void (*encoder_set_instance_data_buffer)(struct bgfx_encoder_s* _encoder, const bgfx_instance_data_buffer_t* _idb, uint32_t _start, uint32_t _num);
     void (*encoder_set_instance_data_from_vertex_buffer)(struct bgfx_encoder_s* _encoder, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num);
     void (*encoder_set_instance_data_from_dynamic_vertex_buffer)(struct bgfx_encoder_s* _encoder, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num);
+    void (*encoder_set_instance_count)(struct bgfx_encoder_s* _encoder, uint32_t _numInstance);
     void (*encoder_set_texture)(struct bgfx_encoder_s* _encoder, uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags);
     void (*encoder_touch)(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id);
-    void (*encoder_submit)(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState);
-    void (*encoder_submit_occlusion_query)(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState);
-    void (*encoder_submit_indirect)(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState);
+    void (*encoder_submit)(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _depth, bool _preserveState);
+    void (*encoder_submit_occlusion_query)(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint32_t _depth, bool _preserveState);
+    void (*encoder_submit_indirect)(struct bgfx_encoder_s* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint32_t _depth, bool _preserveState);
     void (*encoder_set_image)(struct bgfx_encoder_s* _encoder, uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
     void (*encoder_set_compute_index_buffer)(struct bgfx_encoder_s* _encoder, uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
     void (*encoder_set_compute_vertex_buffer)(struct bgfx_encoder_s* _encoder, uint8_t _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access);

+ 191 - 147
bgfx.mod/bgfx/include/bgfx/defines.h

@@ -6,7 +6,7 @@
 #ifndef BGFX_DEFINES_H_HEADER_GUARD
 #define BGFX_DEFINES_H_HEADER_GUARD
 
-#define BGFX_API_VERSION UINT32_C(69)
+#define BGFX_API_VERSION UINT32_C(90)
 
 /// Color RGB/alpha/depth write. When it's not specified write will be disabled.
 #define BGFX_STATE_WRITE_R                 UINT64_C(0x0000000000000001) //!< Enable R write.
@@ -16,18 +16,18 @@
 #define BGFX_STATE_WRITE_Z                 UINT64_C(0x0000004000000000) //!< Enable depth write.
 
 /// Enable RGB write.
-#define BGFX_STATE_WRITE_RGB (0  \
-			| BGFX_STATE_WRITE_R \
-			| BGFX_STATE_WRITE_G \
-			| BGFX_STATE_WRITE_B \
-			)
+#define BGFX_STATE_WRITE_RGB (0 \
+	| BGFX_STATE_WRITE_R        \
+	| BGFX_STATE_WRITE_G        \
+	| BGFX_STATE_WRITE_B        \
+	)
 
 /// Write all channels mask.
-#define BGFX_STATE_WRITE_MASK (0   \
-			| BGFX_STATE_WRITE_RGB \
-			| BGFX_STATE_WRITE_A   \
-			| BGFX_STATE_WRITE_Z   \
-			)
+#define BGFX_STATE_WRITE_MASK (0 \
+	| BGFX_STATE_WRITE_RGB       \
+	| BGFX_STATE_WRITE_A         \
+	| BGFX_STATE_WRITE_Z         \
+	)
 
 /// Depth test state. When `BGFX_STATE_DEPTH_` is not specified depth test will be disabled.
 #define BGFX_STATE_DEPTH_TEST_LESS         UINT64_C(0x0000000000000010) //!< Enable depth test, less.
@@ -103,19 +103,20 @@
 #define BGFX_STATE_RESERVED_SHIFT          61                           //!< Internal bits shift.
 #define BGFX_STATE_RESERVED_MASK           UINT64_C(0xe000000000000000) //!< Internal bits mask.
 
+///
 #define BGFX_STATE_NONE                    UINT64_C(0x0000000000000000) //!< No state.
 #define BGFX_STATE_MASK                    UINT64_C(0xffffffffffffffff) //!< State mask.
 
 /// Default state is write to RGB, alpha, and depth with depth test less enabled, with clockwise
 /// culling and MSAA (when writing into MSAA frame buffer, otherwise this flag is ignored).
-#define BGFX_STATE_DEFAULT (0            \
-			| BGFX_STATE_WRITE_RGB       \
-			| BGFX_STATE_WRITE_A         \
-			| BGFX_STATE_WRITE_Z         \
-			| BGFX_STATE_DEPTH_TEST_LESS \
-			| BGFX_STATE_CULL_CW         \
-			| BGFX_STATE_MSAA            \
-			)
+#define BGFX_STATE_DEFAULT (0    \
+	| BGFX_STATE_WRITE_RGB       \
+	| BGFX_STATE_WRITE_A         \
+	| BGFX_STATE_WRITE_Z         \
+	| BGFX_STATE_DEPTH_TEST_LESS \
+	| BGFX_STATE_CULL_CW         \
+	| BGFX_STATE_MSAA            \
+	)
 
 /// Alpha reference value.
 #define BGFX_STATE_ALPHA_REF(_ref)   ( ( (uint64_t)(_ref )<<BGFX_STATE_ALPHA_REF_SHIFT )&BGFX_STATE_ALPHA_REF_MASK)
@@ -125,9 +126,9 @@
 
 /// Blend function separate.
 #define BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA) (UINT64_C(0) \
-			| ( ( (uint64_t)(_srcRGB)|( (uint64_t)(_dstRGB)<<4) )   )               \
-			| ( ( (uint64_t)(_srcA  )|( (uint64_t)(_dstA  )<<4) )<<8)               \
-			)
+	| ( ( (uint64_t)(_srcRGB)|( (uint64_t)(_dstRGB)<<4) )   )                       \
+	| ( ( (uint64_t)(_srcA  )|( (uint64_t)(_dstA  )<<4) )<<8)                       \
+	)
 
 /// Blend equation separate.
 #define BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA) ( (uint64_t)(_equationRGB)|( (uint64_t)(_equationA)<<3) )
@@ -184,15 +185,16 @@
 	)
 
 ///
-#define BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst) (0               \
-			| ( (uint32_t)( (_src)>>BGFX_STATE_BLEND_SHIFT)       \
-			| ( (uint32_t)( (_dst)>>BGFX_STATE_BLEND_SHIFT)<<4) ) \
-			)
+#define BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst) (0         \
+	| ( (uint32_t)( (_src)>>BGFX_STATE_BLEND_SHIFT)       \
+	| ( (uint32_t)( (_dst)>>BGFX_STATE_BLEND_SHIFT)<<4) ) \
+	)
 
-#define BGFX_STATE_BLEND_FUNC_RT_xE(_src, _dst, _equation) (0               \
-			| BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst)                        \
-			| ( (uint32_t)( (_equation)>>BGFX_STATE_BLEND_EQUATION_SHIFT)<<8) \
-			)
+///
+#define BGFX_STATE_BLEND_FUNC_RT_xE(_src, _dst, _equation) (0         \
+	| BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst)                          \
+	| ( (uint32_t)( (_equation)>>BGFX_STATE_BLEND_EQUATION_SHIFT)<<8) \
+	)
 
 #define BGFX_STATE_BLEND_FUNC_RT_1(_src, _dst)  (BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst)<< 0)
 #define BGFX_STATE_BLEND_FUNC_RT_2(_src, _dst)  (BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst)<<11)
@@ -208,6 +210,7 @@
 #define BGFX_STENCIL_FUNC_RMASK_SHIFT    8                    //!<
 #define BGFX_STENCIL_FUNC_RMASK_MASK     UINT32_C(0x0000ff00) //!<
 
+///
 #define BGFX_STENCIL_TEST_LESS           UINT32_C(0x00010000) //!< Enable stencil test, less.
 #define BGFX_STENCIL_TEST_LEQUAL         UINT32_C(0x00020000) //!< Enable stencil test, less or equal.
 #define BGFX_STENCIL_TEST_EQUAL          UINT32_C(0x00030000) //!< Enable stencil test, equal.
@@ -219,6 +222,7 @@
 #define BGFX_STENCIL_TEST_SHIFT          16                   //!< Stencil test bit shift.
 #define BGFX_STENCIL_TEST_MASK           UINT32_C(0x000f0000) //!< Stencil test bit mask.
 
+///
 #define BGFX_STENCIL_OP_FAIL_S_ZERO      UINT32_C(0x00000000) //!< Zero.
 #define BGFX_STENCIL_OP_FAIL_S_KEEP      UINT32_C(0x00100000) //!< Keep.
 #define BGFX_STENCIL_OP_FAIL_S_REPLACE   UINT32_C(0x00200000) //!< Replace.
@@ -230,6 +234,7 @@
 #define BGFX_STENCIL_OP_FAIL_S_SHIFT     20                   //!< Stencil operation fail bit shift.
 #define BGFX_STENCIL_OP_FAIL_S_MASK      UINT32_C(0x00f00000) //!< Stencil operation fail bit mask.
 
+///
 #define BGFX_STENCIL_OP_FAIL_Z_ZERO      UINT32_C(0x00000000) //!< Zero.
 #define BGFX_STENCIL_OP_FAIL_Z_KEEP      UINT32_C(0x01000000) //!< Keep.
 #define BGFX_STENCIL_OP_FAIL_Z_REPLACE   UINT32_C(0x02000000) //!< Replace.
@@ -241,6 +246,7 @@
 #define BGFX_STENCIL_OP_FAIL_Z_SHIFT     24                   //!< Stencil operation depth fail bit shift
 #define BGFX_STENCIL_OP_FAIL_Z_MASK      UINT32_C(0x0f000000) //!< Stencil operation depth fail bit mask.
 
+///
 #define BGFX_STENCIL_OP_PASS_Z_ZERO      UINT32_C(0x00000000) //!< Zero.
 #define BGFX_STENCIL_OP_PASS_Z_KEEP      UINT32_C(0x10000000) //!< Keep.
 #define BGFX_STENCIL_OP_PASS_Z_REPLACE   UINT32_C(0x20000000) //!< Replace.
@@ -252,6 +258,7 @@
 #define BGFX_STENCIL_OP_PASS_Z_SHIFT     28                   //!< Stencil operation depth pass bit shift
 #define BGFX_STENCIL_OP_PASS_Z_MASK      UINT32_C(0xf0000000) //!< Stencil operation depth pass bit mask.
 
+///
 #define BGFX_STENCIL_NONE                UINT32_C(0x00000000) //!<
 #define BGFX_STENCIL_MASK                UINT32_C(0xffffffff) //!<
 #define BGFX_STENCIL_DEFAULT             UINT32_C(0x00000000) //!<
@@ -278,21 +285,24 @@
 #define BGFX_CLEAR_DISCARD_DEPTH         UINT16_C(0x0800) //!< Discard frame buffer depth attachment.
 #define BGFX_CLEAR_DISCARD_STENCIL       UINT16_C(0x1000) //!< Discard frame buffer stencil attachment.
 
-#define BGFX_CLEAR_DISCARD_COLOR_MASK (0    \
-			| BGFX_CLEAR_DISCARD_COLOR_0    \
-			| BGFX_CLEAR_DISCARD_COLOR_1    \
-			| BGFX_CLEAR_DISCARD_COLOR_2    \
-			| BGFX_CLEAR_DISCARD_COLOR_3    \
-			| BGFX_CLEAR_DISCARD_COLOR_4    \
-			| BGFX_CLEAR_DISCARD_COLOR_5    \
-			| BGFX_CLEAR_DISCARD_COLOR_6    \
-			| BGFX_CLEAR_DISCARD_COLOR_7    \
-			)
-#define BGFX_CLEAR_DISCARD_MASK (0          \
-			| BGFX_CLEAR_DISCARD_COLOR_MASK \
-			| BGFX_CLEAR_DISCARD_DEPTH      \
-			| BGFX_CLEAR_DISCARD_STENCIL    \
-			)
+///
+#define BGFX_CLEAR_DISCARD_COLOR_MASK (0 \
+	| BGFX_CLEAR_DISCARD_COLOR_0         \
+	| BGFX_CLEAR_DISCARD_COLOR_1         \
+	| BGFX_CLEAR_DISCARD_COLOR_2         \
+	| BGFX_CLEAR_DISCARD_COLOR_3         \
+	| BGFX_CLEAR_DISCARD_COLOR_4         \
+	| BGFX_CLEAR_DISCARD_COLOR_5         \
+	| BGFX_CLEAR_DISCARD_COLOR_6         \
+	| BGFX_CLEAR_DISCARD_COLOR_7         \
+	)
+
+///
+#define BGFX_CLEAR_DISCARD_MASK (0  \
+	| BGFX_CLEAR_DISCARD_COLOR_MASK \
+	| BGFX_CLEAR_DISCARD_DEPTH      \
+	| BGFX_CLEAR_DISCARD_STENCIL    \
+	)
 
 ///
 #define BGFX_DEBUG_NONE                  UINT32_C(0x00000000) //!< No debug.
@@ -305,6 +315,7 @@
 ///
 #define BGFX_BUFFER_NONE                 UINT16_C(0x0000) //!<
 
+///
 #define BGFX_BUFFER_COMPUTE_FORMAT_8x1   UINT16_C(0x0001) //!< 1 8-bit value
 #define BGFX_BUFFER_COMPUTE_FORMAT_8x2   UINT16_C(0x0002) //!< 2 8-bit values
 #define BGFX_BUFFER_COMPUTE_FORMAT_8x4   UINT16_C(0x0003) //!< 4 8-bit values
@@ -317,91 +328,128 @@
 #define BGFX_BUFFER_COMPUTE_FORMAT_SHIFT 0                //!<
 #define BGFX_BUFFER_COMPUTE_FORMAT_MASK  UINT16_C(0x000f) //!<
 
+///
 #define BGFX_BUFFER_COMPUTE_TYPE_INT     UINT16_C(0x0010) //!< Type `int`.
 #define BGFX_BUFFER_COMPUTE_TYPE_UINT    UINT16_C(0x0020) //!< Type `uint`.
 #define BGFX_BUFFER_COMPUTE_TYPE_FLOAT   UINT16_C(0x0030) //!< Type `float`.
 #define BGFX_BUFFER_COMPUTE_TYPE_SHIFT   4                //!<
 #define BGFX_BUFFER_COMPUTE_TYPE_MASK    UINT16_C(0x0030) //!<
 
+///
 #define BGFX_BUFFER_COMPUTE_READ         UINT16_C(0x0100) //!< Buffer will be read by shader.
 #define BGFX_BUFFER_COMPUTE_WRITE        UINT16_C(0x0200) //!< Buffer will be used for writing.
 #define BGFX_BUFFER_DRAW_INDIRECT        UINT16_C(0x0400) //!< Buffer will be used for storing draw indirect commands.
 #define BGFX_BUFFER_ALLOW_RESIZE         UINT16_C(0x0800) //!< Allow dynamic index/vertex buffer resize during update.
 #define BGFX_BUFFER_INDEX32              UINT16_C(0x1000) //!< Index buffer contains 32-bit indices.
 
+///
 #define BGFX_BUFFER_COMPUTE_READ_WRITE (0 \
-			| BGFX_BUFFER_COMPUTE_READ    \
-			| BGFX_BUFFER_COMPUTE_WRITE   \
-			)
-
-///
-#define BGFX_TEXTURE_NONE                UINT32_C(0x00000000) //!<
-#define BGFX_TEXTURE_U_MIRROR            UINT32_C(0x00000001) //!< Wrap U mode: Mirror
-#define BGFX_TEXTURE_U_CLAMP             UINT32_C(0x00000002) //!< Wrap U mode: Clamp
-#define BGFX_TEXTURE_U_BORDER            UINT32_C(0x00000003) //!< Wrap U mode: Border
-#define BGFX_TEXTURE_U_SHIFT             0                    //!<
-#define BGFX_TEXTURE_U_MASK              UINT32_C(0x00000003) //!<
-#define BGFX_TEXTURE_V_MIRROR            UINT32_C(0x00000004) //!< Wrap V mode: Mirror
-#define BGFX_TEXTURE_V_CLAMP             UINT32_C(0x00000008) //!< Wrap V mode: Clamp
-#define BGFX_TEXTURE_V_BORDER            UINT32_C(0x0000000c) //!< Wrap V mode: Border
-#define BGFX_TEXTURE_V_SHIFT             2                    //!<
-#define BGFX_TEXTURE_V_MASK              UINT32_C(0x0000000c) //!<
-#define BGFX_TEXTURE_W_MIRROR            UINT32_C(0x00000010) //!< Wrap W mode: Mirror
-#define BGFX_TEXTURE_W_CLAMP             UINT32_C(0x00000020) //!< Wrap W mode: Clamp
-#define BGFX_TEXTURE_W_BORDER            UINT32_C(0x00000030) //!< Wrap W mode: Border
-#define BGFX_TEXTURE_W_SHIFT             4                    //!<
-#define BGFX_TEXTURE_W_MASK              UINT32_C(0x00000030) //!<
-#define BGFX_TEXTURE_MIN_POINT           UINT32_C(0x00000040) //!< Min sampling mode: Point
-#define BGFX_TEXTURE_MIN_ANISOTROPIC     UINT32_C(0x00000080) //!< Min sampling mode: Anisotropic
-#define BGFX_TEXTURE_MIN_SHIFT           6                    //!<
-#define BGFX_TEXTURE_MIN_MASK            UINT32_C(0x000000c0) //!<
-#define BGFX_TEXTURE_MAG_POINT           UINT32_C(0x00000100) //!< Mag sampling mode: Point
-#define BGFX_TEXTURE_MAG_ANISOTROPIC     UINT32_C(0x00000200) //!< Mag sampling mode: Anisotropic
-#define BGFX_TEXTURE_MAG_SHIFT           8                    //!<
-#define BGFX_TEXTURE_MAG_MASK            UINT32_C(0x00000300) //!<
-#define BGFX_TEXTURE_MIP_POINT           UINT32_C(0x00000400) //!< Mip sampling mode: Point
-#define BGFX_TEXTURE_MIP_SHIFT           10                   //!<
-#define BGFX_TEXTURE_MIP_MASK            UINT32_C(0x00000400) //!<
-#define BGFX_TEXTURE_MSAA_SAMPLE         UINT32_C(0x00000800) //!< Texture will be used for MSAA sampling.
-#define BGFX_TEXTURE_RT                  UINT32_C(0x00001000) //!<
-#define BGFX_TEXTURE_RT_MSAA_X2          UINT32_C(0x00002000) //!< Render target MSAAx2 mode.
-#define BGFX_TEXTURE_RT_MSAA_X4          UINT32_C(0x00003000) //!< Render target MSAAx4 mode.
-#define BGFX_TEXTURE_RT_MSAA_X8          UINT32_C(0x00004000) //!< Render target MSAAx8 mode.
-#define BGFX_TEXTURE_RT_MSAA_X16         UINT32_C(0x00005000) //!< Render target MSAAx16 mode.
-#define BGFX_TEXTURE_RT_MSAA_SHIFT       12                   //!<
-#define BGFX_TEXTURE_RT_MSAA_MASK        UINT32_C(0x00007000) //!<
-#define BGFX_TEXTURE_RT_WRITE_ONLY       UINT32_C(0x00008000) //!< Render target will be used for writing only.
-#define BGFX_TEXTURE_RT_MASK             UINT32_C(0x0000f000) //!<
-#define BGFX_TEXTURE_COMPARE_LESS        UINT32_C(0x00010000) //!< Compare when sampling depth texture: less.
-#define BGFX_TEXTURE_COMPARE_LEQUAL      UINT32_C(0x00020000) //!< Compare when sampling depth texture: less or equal.
-#define BGFX_TEXTURE_COMPARE_EQUAL       UINT32_C(0x00030000) //!< Compare when sampling depth texture: equal.
-#define BGFX_TEXTURE_COMPARE_GEQUAL      UINT32_C(0x00040000) //!< Compare when sampling depth texture: greater or equal.
-#define BGFX_TEXTURE_COMPARE_GREATER     UINT32_C(0x00050000) //!< Compare when sampling depth texture: greater.
-#define BGFX_TEXTURE_COMPARE_NOTEQUAL    UINT32_C(0x00060000) //!< Compare when sampling depth texture: not equal.
-#define BGFX_TEXTURE_COMPARE_NEVER       UINT32_C(0x00070000) //!< Compare when sampling depth texture: never.
-#define BGFX_TEXTURE_COMPARE_ALWAYS      UINT32_C(0x00080000) //!< Compare when sampling depth texture: always.
-#define BGFX_TEXTURE_COMPARE_SHIFT       16                   //!<
-#define BGFX_TEXTURE_COMPARE_MASK        UINT32_C(0x000f0000) //!<
-#define BGFX_TEXTURE_COMPUTE_WRITE       UINT32_C(0x00100000) //!< Texture will be used for compute write.
-#define BGFX_TEXTURE_SRGB                UINT32_C(0x00200000) //!< Sample texture as sRGB.
-#define BGFX_TEXTURE_BLIT_DST            UINT32_C(0x00400000) //!< Texture will be used as blit destination.
-#define BGFX_TEXTURE_READ_BACK           UINT32_C(0x00800000) //!< Texture will be used for read back from GPU.
-#define BGFX_TEXTURE_BORDER_COLOR_SHIFT  24                   //!<
-#define BGFX_TEXTURE_BORDER_COLOR_MASK   UINT32_C(0x0f000000) //!<
-#define BGFX_TEXTURE_RESERVED_SHIFT      28                   //!<
-#define BGFX_TEXTURE_RESERVED_MASK       UINT32_C(0xf0000000) //!<
-
-#define BGFX_TEXTURE_BORDER_COLOR(_index) ( (_index << BGFX_TEXTURE_BORDER_COLOR_SHIFT) & BGFX_TEXTURE_BORDER_COLOR_MASK)
-
-#define BGFX_TEXTURE_SAMPLER_BITS_MASK (0 \
-			| BGFX_TEXTURE_U_MASK         \
-			| BGFX_TEXTURE_V_MASK         \
-			| BGFX_TEXTURE_W_MASK         \
-			| BGFX_TEXTURE_MIN_MASK       \
-			| BGFX_TEXTURE_MAG_MASK       \
-			| BGFX_TEXTURE_MIP_MASK       \
-			| BGFX_TEXTURE_COMPARE_MASK   \
-			)
+	| BGFX_BUFFER_COMPUTE_READ            \
+	| BGFX_BUFFER_COMPUTE_WRITE           \
+	)
+
+/// Texture creation flags.
+#define BGFX_TEXTURE_NONE                UINT64_C(0x0000000000000000) //!<
+#define BGFX_TEXTURE_MSAA_SAMPLE         UINT64_C(0x0000000800000000) //!< Texture will be used for MSAA sampling.
+#define BGFX_TEXTURE_RT                  UINT64_C(0x0000001000000000) //!< Render target no MSAA.
+#define BGFX_TEXTURE_RT_MSAA_X2          UINT64_C(0x0000002000000000) //!< Render target MSAAx2 mode.
+#define BGFX_TEXTURE_RT_MSAA_X4          UINT64_C(0x0000003000000000) //!< Render target MSAAx4 mode.
+#define BGFX_TEXTURE_RT_MSAA_X8          UINT64_C(0x0000004000000000) //!< Render target MSAAx8 mode.
+#define BGFX_TEXTURE_RT_MSAA_X16         UINT64_C(0x0000005000000000) //!< Render target MSAAx16 mode.
+#define BGFX_TEXTURE_RT_MSAA_SHIFT       36                           //!<
+#define BGFX_TEXTURE_RT_MSAA_MASK        UINT64_C(0x0000007000000000) //!<
+#define BGFX_TEXTURE_RT_WRITE_ONLY       UINT64_C(0x0000008000000000) //!< Render target will be used for writing only.
+#define BGFX_TEXTURE_RT_MASK             UINT64_C(0x000000f000000000) //!<
+#define BGFX_TEXTURE_COMPUTE_WRITE       UINT64_C(0x0000100000000000) //!< Texture will be used for compute write.
+#define BGFX_TEXTURE_SRGB                UINT64_C(0x0000200000000000) //!< Sample texture as sRGB.
+#define BGFX_TEXTURE_BLIT_DST            UINT64_C(0x0000400000000000) //!< Texture will be used as blit destination.
+#define BGFX_TEXTURE_READ_BACK           UINT64_C(0x0000800000000000) //!< Texture will be used for read back from GPU.
+
+/// Sampler flags.
+#define BGFX_SAMPLER_NONE                UINT32_C(0x00000000) //!<
+#define BGFX_SAMPLER_U_MIRROR            UINT32_C(0x00000001) //!< Wrap U mode: Mirror
+#define BGFX_SAMPLER_U_CLAMP             UINT32_C(0x00000002) //!< Wrap U mode: Clamp
+#define BGFX_SAMPLER_U_BORDER            UINT32_C(0x00000003) //!< Wrap U mode: Border
+#define BGFX_SAMPLER_U_SHIFT             0                    //!<
+#define BGFX_SAMPLER_U_MASK              UINT32_C(0x00000003) //!<
+#define BGFX_SAMPLER_V_MIRROR            UINT32_C(0x00000004) //!< Wrap V mode: Mirror
+#define BGFX_SAMPLER_V_CLAMP             UINT32_C(0x00000008) //!< Wrap V mode: Clamp
+#define BGFX_SAMPLER_V_BORDER            UINT32_C(0x0000000c) //!< Wrap V mode: Border
+#define BGFX_SAMPLER_V_SHIFT             2                    //!<
+#define BGFX_SAMPLER_V_MASK              UINT32_C(0x0000000c) //!<
+#define BGFX_SAMPLER_W_MIRROR            UINT32_C(0x00000010) //!< Wrap W mode: Mirror
+#define BGFX_SAMPLER_W_CLAMP             UINT32_C(0x00000020) //!< Wrap W mode: Clamp
+#define BGFX_SAMPLER_W_BORDER            UINT32_C(0x00000030) //!< Wrap W mode: Border
+#define BGFX_SAMPLER_W_SHIFT             4                    //!<
+#define BGFX_SAMPLER_W_MASK              UINT32_C(0x00000030) //!<
+#define BGFX_SAMPLER_MIN_POINT           UINT32_C(0x00000040) //!< Min sampling mode: Point
+#define BGFX_SAMPLER_MIN_ANISOTROPIC     UINT32_C(0x00000080) //!< Min sampling mode: Anisotropic
+#define BGFX_SAMPLER_MIN_SHIFT           6                    //!<
+#define BGFX_SAMPLER_MIN_MASK            UINT32_C(0x000000c0) //!<
+#define BGFX_SAMPLER_MAG_POINT           UINT32_C(0x00000100) //!< Mag sampling mode: Point
+#define BGFX_SAMPLER_MAG_ANISOTROPIC     UINT32_C(0x00000200) //!< Mag sampling mode: Anisotropic
+#define BGFX_SAMPLER_MAG_SHIFT           8                    //!<
+#define BGFX_SAMPLER_MAG_MASK            UINT32_C(0x00000300) //!<
+#define BGFX_SAMPLER_MIP_POINT           UINT32_C(0x00000400) //!< Mip sampling mode: Point
+#define BGFX_SAMPLER_MIP_SHIFT           10                   //!<
+#define BGFX_SAMPLER_MIP_MASK            UINT32_C(0x00000400) //!<
+#define BGFX_SAMPLER_COMPARE_LESS        UINT32_C(0x00010000) //!< Compare when sampling depth texture: less.
+#define BGFX_SAMPLER_COMPARE_LEQUAL      UINT32_C(0x00020000) //!< Compare when sampling depth texture: less or equal.
+#define BGFX_SAMPLER_COMPARE_EQUAL       UINT32_C(0x00030000) //!< Compare when sampling depth texture: equal.
+#define BGFX_SAMPLER_COMPARE_GEQUAL      UINT32_C(0x00040000) //!< Compare when sampling depth texture: greater or equal.
+#define BGFX_SAMPLER_COMPARE_GREATER     UINT32_C(0x00050000) //!< Compare when sampling depth texture: greater.
+#define BGFX_SAMPLER_COMPARE_NOTEQUAL    UINT32_C(0x00060000) //!< Compare when sampling depth texture: not equal.
+#define BGFX_SAMPLER_COMPARE_NEVER       UINT32_C(0x00070000) //!< Compare when sampling depth texture: never.
+#define BGFX_SAMPLER_COMPARE_ALWAYS      UINT32_C(0x00080000) //!< Compare when sampling depth texture: always.
+#define BGFX_SAMPLER_COMPARE_SHIFT       16                   //!<
+#define BGFX_SAMPLER_COMPARE_MASK        UINT32_C(0x000f0000) //!<
+#define BGFX_SAMPLER_SAMPLE_STENCIL      UINT32_C(0x00100000) //!< Sample stencil instead of depth.
+#define BGFX_SAMPLER_BORDER_COLOR_SHIFT  24                   //!<
+#define BGFX_SAMPLER_BORDER_COLOR_MASK   UINT32_C(0x0f000000) //!<
+#define BGFX_SAMPLER_RESERVED_SHIFT      28                   //!<
+#define BGFX_SAMPLER_RESERVED_MASK       UINT32_C(0xf0000000) //!<
+
+///
+#define BGFX_SAMPLER_BORDER_COLOR(_index) ( (_index << BGFX_SAMPLER_BORDER_COLOR_SHIFT) & BGFX_SAMPLER_BORDER_COLOR_MASK)
+
+///
+#define BGFX_SAMPLER_POINT (0 \
+	| BGFX_SAMPLER_MIN_POINT  \
+	| BGFX_SAMPLER_MAG_POINT  \
+	| BGFX_SAMPLER_MIP_POINT  \
+	)
+
+///
+#define BGFX_SAMPLER_UVW_MIRROR (0 \
+	| BGFX_SAMPLER_U_MIRROR        \
+	| BGFX_SAMPLER_V_MIRROR        \
+	| BGFX_SAMPLER_W_MIRROR        \
+	)
+
+///
+#define BGFX_SAMPLER_UVW_CLAMP (0 \
+	| BGFX_SAMPLER_U_CLAMP        \
+	| BGFX_SAMPLER_V_CLAMP        \
+	| BGFX_SAMPLER_W_CLAMP        \
+	)
+
+///
+#define BGFX_SAMPLER_UVW_BORDER (0 \
+	| BGFX_SAMPLER_U_BORDER        \
+	| BGFX_SAMPLER_V_BORDER        \
+	| BGFX_SAMPLER_W_BORDER        \
+	)
+
+///
+#define BGFX_SAMPLER_BITS_MASK (0 \
+	| BGFX_SAMPLER_U_MASK         \
+	| BGFX_SAMPLER_V_MASK         \
+	| BGFX_SAMPLER_W_MASK         \
+	| BGFX_SAMPLER_MIN_MASK       \
+	| BGFX_SAMPLER_MAG_MASK       \
+	| BGFX_SAMPLER_MIP_MASK       \
+	| BGFX_SAMPLER_COMPARE_MASK   \
+	)
 
 ///
 #define BGFX_RESET_NONE                  UINT32_C(0x00000000) //!< No reset flags.
@@ -417,16 +465,13 @@
 #define BGFX_RESET_VSYNC                 UINT32_C(0x00000080) //!< Enable V-Sync.
 #define BGFX_RESET_MAXANISOTROPY         UINT32_C(0x00000100) //!< Turn on/off max anisotropy.
 #define BGFX_RESET_CAPTURE               UINT32_C(0x00000200) //!< Begin screen capture.
-#define BGFX_RESET_HMD                   UINT32_C(0x00000400) //!< HMD stereo rendering.
-#define BGFX_RESET_HMD_DEBUG             UINT32_C(0x00000800) //!< HMD stereo rendering debug mode.
-#define BGFX_RESET_HMD_RECENTER          UINT32_C(0x00001000) //!< HMD calibration.
 #define BGFX_RESET_FLUSH_AFTER_RENDER    UINT32_C(0x00002000) //!< Flush rendering after submitting to GPU.
 #define BGFX_RESET_FLIP_AFTER_RENDER     UINT32_C(0x00004000) //!< This flag  specifies where flip occurs. Default behavior is that flip occurs before rendering new frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
 #define BGFX_RESET_SRGB_BACKBUFFER       UINT32_C(0x00008000) //!< Enable sRGB backbuffer.
-#define BGFX_RESET_HIDPI                 UINT32_C(0x00010000) //!< Enable HiDPI rendering.
-#define BGFX_RESET_DEPTH_CLAMP           UINT32_C(0x00020000) //!< Enable depth clamp.
-#define BGFX_RESET_SUSPEND               UINT32_C(0x00040000) //!< Suspend rendering.
-
+#define BGFX_RESET_HDR10                 UINT32_C(0x00010000) //!< Enable HDR10 rendering.
+#define BGFX_RESET_HIDPI                 UINT32_C(0x00020000) //!< Enable HiDPI rendering.
+#define BGFX_RESET_DEPTH_CLAMP           UINT32_C(0x00040000) //!< Enable depth clamp.
+#define BGFX_RESET_SUSPEND               UINT32_C(0x00080000) //!< Suspend rendering.
 #define BGFX_RESET_RESERVED_SHIFT        31                   //!< Internal bits shift.
 #define BGFX_RESET_RESERVED_MASK         UINT32_C(0x80000000) //!< Internal bits mask.
 
@@ -439,24 +484,24 @@
 #define BGFX_CAPS_FRAGMENT_DEPTH         UINT64_C(0x0000000000000020) //!< Fragment depth is accessible in fragment shader.
 #define BGFX_CAPS_FRAGMENT_ORDERING      UINT64_C(0x0000000000000040) //!< Fragment ordering is available in fragment shader.
 #define BGFX_CAPS_GRAPHICS_DEBUGGER      UINT64_C(0x0000000000000080) //!< Graphics debugger is present.
-#define BGFX_CAPS_HIDPI                  UINT64_C(0x0000000000000100) //!< HiDPI rendering is supported.
-#define BGFX_CAPS_HMD                    UINT64_C(0x0000000000000200) //!< Head Mounted Display is available.
-#define BGFX_CAPS_INDEX32                UINT64_C(0x0000000000000400) //!< 32-bit indices are supported.
-#define BGFX_CAPS_INSTANCING             UINT64_C(0x0000000000000800) //!< Instancing is supported.
-#define BGFX_CAPS_OCCLUSION_QUERY        UINT64_C(0x0000000000001000) //!< Occlusion query is supported.
-#define BGFX_CAPS_RENDERER_MULTITHREADED UINT64_C(0x0000000000002000) //!< Renderer is on separate thread.
-#define BGFX_CAPS_SWAP_CHAIN             UINT64_C(0x0000000000004000) //!< Multiple windows are supported.
-#define BGFX_CAPS_TEXTURE_2D_ARRAY       UINT64_C(0x0000000000008000) //!< 2D texture array is supported.
-#define BGFX_CAPS_TEXTURE_3D             UINT64_C(0x0000000000010000) //!< 3D textures are supported.
-#define BGFX_CAPS_TEXTURE_BLIT           UINT64_C(0x0000000000020000) //!< Texture blit is supported.
-#define BGFX_CAPS_TEXTURE_COMPARE_ALL    UINT64_C(0x00000000000c0000) //!< All texture compare modes are supported.
-#define BGFX_CAPS_TEXTURE_COMPARE_LEQUAL UINT64_C(0x0000000000080000) //!< Texture compare less equal mode is supported.
-#define BGFX_CAPS_TEXTURE_CUBE_ARRAY     UINT64_C(0x0000000000100000) //!< Cubemap texture array is supported.
-#define BGFX_CAPS_TEXTURE_DIRECT_ACCESS  UINT64_C(0x0000000000200000) //!< CPU direct access to GPU texture memory.
-#define BGFX_CAPS_TEXTURE_READ_BACK      UINT64_C(0x0000000000400000) //!< Read-back texture is supported.
-#define BGFX_CAPS_VERTEX_ATTRIB_HALF     UINT64_C(0x0000000000800000) //!< Vertex attribute half-float is supported.
-#define BGFX_CAPS_VERTEX_ATTRIB_UINT10   UINT64_C(0x0000000000800000) //!< Vertex attribute 10_10_10_2 is supported.
-#define BGFX_CAPS_VERTEX_ID              UINT64_C(0x0000000001000000) //!< Rendering with VertexID only is supported.
+#define BGFX_CAPS_HDR10                  UINT64_C(0x0000000000000100) //!< HDR10 rendering is supported.
+#define BGFX_CAPS_HIDPI                  UINT64_C(0x0000000000000400) //!< HiDPI rendering is supported.
+#define BGFX_CAPS_INDEX32                UINT64_C(0x0000000000000800) //!< 32-bit indices are supported.
+#define BGFX_CAPS_INSTANCING             UINT64_C(0x0000000000001000) //!< Instancing is supported.
+#define BGFX_CAPS_OCCLUSION_QUERY        UINT64_C(0x0000000000002000) //!< Occlusion query is supported.
+#define BGFX_CAPS_RENDERER_MULTITHREADED UINT64_C(0x0000000000004000) //!< Renderer is on separate thread.
+#define BGFX_CAPS_SWAP_CHAIN             UINT64_C(0x0000000000008000) //!< Multiple windows are supported.
+#define BGFX_CAPS_TEXTURE_2D_ARRAY       UINT64_C(0x0000000000010000) //!< 2D texture array is supported.
+#define BGFX_CAPS_TEXTURE_3D             UINT64_C(0x0000000000020000) //!< 3D textures are supported.
+#define BGFX_CAPS_TEXTURE_BLIT           UINT64_C(0x0000000000040000) //!< Texture blit is supported.
+#define BGFX_CAPS_TEXTURE_COMPARE_ALL    UINT64_C(0x0000000000180000) //!< All texture compare modes are supported.
+#define BGFX_CAPS_TEXTURE_COMPARE_LEQUAL UINT64_C(0x0000000000100000) //!< Texture compare less equal mode is supported.
+#define BGFX_CAPS_TEXTURE_CUBE_ARRAY     UINT64_C(0x0000000000200000) //!< Cubemap texture array is supported.
+#define BGFX_CAPS_TEXTURE_DIRECT_ACCESS  UINT64_C(0x0000000000400000) //!< CPU direct access to GPU texture memory.
+#define BGFX_CAPS_TEXTURE_READ_BACK      UINT64_C(0x0000000000800000) //!< Read-back texture is supported.
+#define BGFX_CAPS_VERTEX_ATTRIB_HALF     UINT64_C(0x0000000001000000) //!< Vertex attribute half-float is supported.
+#define BGFX_CAPS_VERTEX_ATTRIB_UINT10   UINT64_C(0x0000000002000000) //!< Vertex attribute 10_10_10_2 is supported.
+#define BGFX_CAPS_VERTEX_ID              UINT64_C(0x0000000004000000) //!< Rendering with VertexID only is supported.
 
 ///
 #define BGFX_CAPS_FORMAT_TEXTURE_NONE             UINT16_C(0x0000) //!< Texture format is not supported.
@@ -489,6 +534,10 @@
 #define BGFX_SUBMIT_RESERVED_SHIFT 7             //!< Internal bits shift.
 #define BGFX_SUBMIT_RESERVED_MASK  UINT8_C(0x80) //!< Internal bits mask.
 
+///
+#define BGFX_RESOLVE_NONE          UINT8_C(0x00) //!< No resolve flags.
+#define BGFX_RESOLVE_AUTO_GEN_MIPS UINT8_C(0x01) //!< Auto-generate mip maps on resolve.
+
 ///
 #define BGFX_PCI_ID_NONE                UINT16_C(0x0000) //!< Autoselect adapter.
 #define BGFX_PCI_ID_SOFTWARE_RASTERIZER UINT16_C(0x0001) //!< Software rasterizer.
@@ -496,11 +545,6 @@
 #define BGFX_PCI_ID_INTEL               UINT16_C(0x8086) //!< Intel adapter.
 #define BGFX_PCI_ID_NVIDIA              UINT16_C(0x10de) //!< nVidia adapter.
 
-///
-#define BGFX_HMD_NONE              UINT8_C(0x00) //!< None.
-#define BGFX_HMD_DEVICE_RESOLUTION UINT8_C(0x01) //!< Has HMD native resolution.
-#define BGFX_HMD_RENDERING         UINT8_C(0x02) //!< Rendering to HMD.
-
 ///
 #define BGFX_CUBE_MAP_POSITIVE_X UINT8_C(0x00) //!< Cubemap +x.
 #define BGFX_CUBE_MAP_NEGATIVE_X UINT8_C(0x01) //!< Cubemap -x.

+ 1 - 15
bgfx.mod/bgfx/include/bgfx/platform.h

@@ -48,20 +48,6 @@ namespace bgfx
 	///   to bgfx::init, render thread won't be created by bgfx::init call.
 	RenderFrame::Enum renderFrame(int32_t _msecs = -1);
 
-	/// Platform data.
-	///
-	/// @attention C99 equivalent is `bgfx_platform_data_t`.
-	///
-	struct PlatformData
-	{
-		void* ndt;          //!< Native display type.
-		void* nwh;          //!< Native window handle.
-		void* context;      //!< GL context, or D3D device.
-		void* backBuffer;   //!< GL backbuffer, or D3D render target view.
-		void* backBufferDS; //!< Backbuffer depth/stencil.
-		void* session;      //!< ovrSession, for Oculus SDK
-	};
-
 	/// Set platform data.
 	///
 	/// @warning Must be called before `bgfx::init`.
@@ -134,7 +120,7 @@ namespace bgfx
 	///
 	/// @attention C99 equivalent is `bgfx_override_internal_texture`.
 	///
-	uintptr_t overrideInternal(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags = BGFX_TEXTURE_NONE);
+	uintptr_t overrideInternal(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags = BGFX_SAMPLER_NONE);
 
 } // namespace bgfx
 

+ 3 - 25
bgfx.mod/bgfx/makefile

@@ -39,17 +39,15 @@ clean: ## Clean all intermediate files.
 	@mkdir .build
 
 projgen: ## Generate project files for all configurations.
-	$(GENIE) --with-tools --with-combined-examples --with-shared-lib                       vs2015
 	$(GENIE) --with-tools --with-combined-examples --with-shared-lib                       vs2017
 	$(GENIE) --with-tools --with-combined-examples                   --vs=winstore100      vs2017
 	$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc       gmake
 	$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc       gmake
 	$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx             gmake
-	$(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=osx           xcode4
-	$(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=ios           xcode4
+	$(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=osx           xcode8
+	$(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=ios           xcode8
 	$(GENIE)              --with-combined-examples --with-shared-lib --gcc=freebsd         gmake
 	$(GENIE)              --with-combined-examples                   --gcc=android-arm     gmake
-	$(GENIE)              --with-combined-examples                   --gcc=android-mips    gmake
 	$(GENIE)              --with-combined-examples                   --gcc=android-x86     gmake
 	$(GENIE)              --with-combined-examples                   --gcc=asmjs           gmake
 	$(GENIE)              --with-combined-examples                   --gcc=ios-arm         gmake
@@ -66,14 +64,6 @@ android-arm-release: .build/projects/gmake-android-arm ## Build - Android ARM Re
 	$(MAKE) -R -C .build/projects/gmake-android-arm config=release
 android-arm: android-arm-debug android-arm-release ## Build - Android ARM Debug and Release
 
-.build/projects/gmake-android-mips:
-	$(GENIE) --gcc=android-mips gmake
-android-mips-debug: .build/projects/gmake-android-mips ## Build - Android MIPS Debug
-	$(MAKE) -R -C .build/projects/gmake-android-mips config=debug
-android-mips-release: .build/projects/gmake-android-mips ## Build - Android MIPS Release
-	$(MAKE) -R -C .build/projects/gmake-android-mips config=release
-android-mips: android-mips-debug android-mips-release ## Build - Android MIPS Debug and Release
-
 .build/projects/gmake-android-x86:
 	$(GENIE) --gcc=android-x86 gmake
 android-x86-debug: .build/projects/gmake-android-x86 ## Build - Android x86 Debug and Release
@@ -111,7 +101,7 @@ freebsd-release64: .build/projects/gmake-freebsd ## Build - FreeBSD x86 Release
 freebsd: freebsd-debug32 freebsd-release32 freebsd-debug64 freebsd-release64 ## Build - FreeBSD x86/x64 Debug and Release
 
 .build/projects/gmake-mingw-gcc:
-	$(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake
+	$(GENIE) --with-tools --with-combined-examples --with-shared-lib --os=windows --gcc=mingw-gcc gmake
 mingw-gcc-debug32: .build/projects/gmake-mingw-gcc ## Build - MinGW GCC x86 Debug
 	$(MAKE) -R -C .build/projects/gmake-mingw-gcc config=debug32
 mingw-gcc-release32: .build/projects/gmake-mingw-gcc ## Build - MinGW GCC x86 Release
@@ -134,18 +124,6 @@ mingw-clang-release64: .build/projects/gmake-mingw-clang ## Build - MinGW Clang
 	$(MAKE) -R -C .build/projects/gmake-mingw-clang config=release64
 mingw-clang: mingw-clang-debug32 mingw-clang-release32 mingw-clang-debug64 mingw-clang-release64 ## Build - MinGW Clang x86/x64 Debug and Release
 
-.build/projects/vs2015:
-	$(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2015
-vs2015-debug32: .build/projects/vs2015 ## Build - VS2015 x86 Debug
-	devenv .build/projects/vs2015/bgfx.sln /Build "Debug|Win32"
-vs2015-release32: .build/projects/vs2015 ## Build - VS2015 x86 Release
-	devenv .build/projects/vs2015/bgfx.sln /Build "Release|Win32"
-vs2015-debug64: .build/projects/vs2015 ## Build - VS2015 x64 Debug
-	devenv .build/projects/vs2015/bgfx.sln /Build "Debug|x64"
-vs2015-release64: .build/projects/vs2015 ## Build - VS2015 x64 Release
-	devenv .build/projects/vs2015/bgfx.sln /Build "Release|x64"
-vs2015: vs2015-debug32 vs2015-release32 vs2015-debug64 vs2015-release64 ## Build - VS2015 x86/x64 Debug and Release
-
 .build/projects/vs2017:
 	$(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2017
 vs2017-debug32: .build/projects/vs2017 ## Build - vs2017 x86 Debug

+ 0 - 3
bgfx.mod/bgfx/src/amalgamated.cpp

@@ -9,9 +9,6 @@
 #include "glcontext_egl.cpp"
 #include "glcontext_glx.cpp"
 #include "glcontext_wgl.cpp"
-#include "hmd.cpp"
-#include "hmd_ovr.cpp"
-#include "hmd_openvr.cpp"
 #include "nvapi.cpp"
 #include "renderer_d3d9.cpp"
 #include "renderer_d3d11.cpp"

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 468 - 136
bgfx.mod/bgfx/src/bgfx.cpp


+ 72 - 49
bgfx.mod/bgfx/src/bgfx_compute.sh

@@ -51,13 +51,14 @@
 
 #define NUM_THREADS(_x, _y, _z) layout (local_size_x = _x, local_size_y = _y, local_size_z = _z) in;
 
-#define atomicFetchAndAdd(_mem, _data, _original)      _original = atomicAdd(_mem, _data)
-#define atomicFetchAndAnd(_mem, _data, _original)      _original = atomicAnd(_mem, _data)
-#define atomicFetchAndMax(_mem, _data, _original)      _original = atomicMax(_mem, _data)
-#define atomicFetchAndMin(_mem, _data, _original)      _original = atomicMin(_mem, _data)
-#define atomicFetchAndOr(_mem, _data, _original)       _original = atomicOrnterlockedOr(_mem, _data)
-#define atomicFetchAndXor(_mem, _data, _original)      _original = atomicXor(_mem, _data)
-#define atomicFetchAndExchange(_mem, _data, _original) _original = atomicExchange(_mem, _data)
+#define atomicFetchAndAdd(_mem, _data, _original)                    _original = atomicAdd(_mem, _data)
+#define atomicFetchAndAnd(_mem, _data, _original)                    _original = atomicAnd(_mem, _data)
+#define atomicFetchAndMax(_mem, _data, _original)                    _original = atomicMax(_mem, _data)
+#define atomicFetchAndMin(_mem, _data, _original)                    _original = atomicMin(_mem, _data)
+#define atomicFetchAndOr(_mem, _data, _original)                     _original = atomicOr(_mem, _data)
+#define atomicFetchAndXor(_mem, _data, _original)                    _original = atomicXor(_mem, _data)
+#define atomicFetchAndExchange(_mem, _data, _original)               _original = atomicExchange(_mem, _data)
+#define atomicFetchCompareExchange(_mem, _compare, _data, _original) _original = atomicCompSwap(_mem,_compare, _data)
 
 #else
 
@@ -67,12 +68,17 @@
 #define rg32ui   uint2
 #define rgba32ui uint4
 #define r32f     float
+#define r16f     float
 #define rg16f    float2
 #define rgba16f  float4
 #if BGFX_SHADER_LANGUAGE_HLSL
 #	define rgba8 unorm float4
+#	define rg8   unorm float2
+#	define r8    unorm float
 #else
 #	define rgba8       float4
+#	define rg8         float2
+#	define r8          float
 #endif // BGFX_SHADER_LANGUAGE_HLSL
 #define rgba32f  float4
 
@@ -246,12 +252,24 @@
 		_image.m_texture[_uvw] = _value._storeComponents;                            \
 	}
 
+#define __IMAGE_IMPL_ATOMIC(_format, _storeComponents, _type, _loadComponents)            \
+	\
+	void imageAtomicAdd(BgfxRWImage2D_ ## _format _image, ivec2 _uv,  _type _value)  \
+	{				                                                                 \
+		InterlockedAdd(_image.m_texture[_uv], _value._storeComponents);	             \
+	}                                                                                \
+
+
 __IMAGE_IMPL_A(rgba8,       xyzw, vec4,  xyzw)
+__IMAGE_IMPL_A(rg8,         xy,   vec4,  xyyy)
+__IMAGE_IMPL_A(r8,          x,    vec4,  xxxx)
 __IMAGE_IMPL_A(rg16f,       xy,   vec4,  xyyy)
 #if BGFX_SHADER_LANGUAGE_HLSL
 __IMAGE_IMPL_S(rgba16f,     xyzw, vec4,  xyzw)
+__IMAGE_IMPL_S(r16f,        x,    vec4,  xxxx)
 #else
 __IMAGE_IMPL_A(rgba16f,     xyzw, vec4,  xyzw)
+__IMAGE_IMPL_A(r16f,        x,    vec4,  xxxx)
 #endif // BGFX_SHADER_LANGUAGE_HLSL
 __IMAGE_IMPL_A(r32f,        x,    vec4,  xxxx)
 __IMAGE_IMPL_A(rgba32f,     xyzw, vec4,  xyzw)
@@ -259,60 +277,65 @@ __IMAGE_IMPL_A(r32ui,       x,    uvec4, xxxx)
 __IMAGE_IMPL_A(rg32ui,      xy,   uvec4, xyyy)
 __IMAGE_IMPL_A(rgba32ui,    xyzw, uvec4, xyzw)
 
-#define atomicAdd(_mem, _data)                         InterlockedAdd(_mem, _data)
-#define atomicAnd(_mem, _data)                         InterlockedAnd(_mem, _data)
-#define atomicMax(_mem, _data)                         InterlockedMax(_mem, _data)
-#define atomicMin(_mem, _data)                         InterlockedMin(_mem, _data)
-#define atomicOr(_mem,  _data)                         InterlockedOr(_mem, _data)
-#define atomicXor(_mem, _data)                         InterlockedXor(_mem, _data)
-#define atomicFetchAndAdd(_mem, _data, _original)      InterlockedAdd(_mem, _data, _original)
-#define atomicFetchAndAnd(_mem, _data, _original)      InterlockedAnd(_mem, _data, _original)
-#define atomicFetchAndMax(_mem, _data, _original)      InterlockedMax(_mem, _data, _original)
-#define atomicFetchAndMin(_mem, _data, _original)      InterlockedMin(_mem, _data, _original)
-#define atomicFetchAndOr(_mem, _data, _original)       InterlockedOr(_mem, _data, _original)
-#define atomicFetchAndXor(_mem, _data, _original)      InterlockedXor(_mem, _data, _original)
-#define atomicFetchAndExchange(_mem, _data, _original) InterlockedExchange(_mem, _data, _original)
-#define atomicCompSwap(_mem, _compare, _data)          InterlockedCompareExchange(_mem,_compare, _data)
+__IMAGE_IMPL_ATOMIC(r32ui,       x,    uvec4, xxxx)
+
+#define atomicAdd(_mem, _data)                                       InterlockedAdd(_mem, _data)
+#define atomicAnd(_mem, _data)                                       InterlockedAnd(_mem, _data)
+#define atomicMax(_mem, _data)                                       InterlockedMax(_mem, _data)
+#define atomicMin(_mem, _data)                                       InterlockedMin(_mem, _data)
+#define atomicOr(_mem, _data)                                        InterlockedOr(_mem, _data)
+#define atomicXor(_mem, _data)                                       InterlockedXor(_mem, _data)
+#define atomicFetchAndAdd(_mem, _data, _original)                    InterlockedAdd(_mem, _data, _original)
+#define atomicFetchAndAnd(_mem, _data, _original)                    InterlockedAnd(_mem, _data, _original)
+#define atomicFetchAndMax(_mem, _data, _original)                    InterlockedMax(_mem, _data, _original)
+#define atomicFetchAndMin(_mem, _data, _original)                    InterlockedMin(_mem, _data, _original)
+#define atomicFetchAndOr(_mem, _data, _original)                     InterlockedOr(_mem, _data, _original)
+#define atomicFetchAndXor(_mem, _data, _original)                    InterlockedXor(_mem, _data, _original)
+#define atomicFetchAndExchange(_mem, _data, _original)               InterlockedExchange(_mem, _data, _original)
+#define atomicFetchCompareExchange(_mem, _compare, _data, _original) InterlockedCompareExchange(_mem,_compare, _data, _original)
 
 // InterlockedCompareStore
 
 #define barrier()                    GroupMemoryBarrierWithGroupSync()
 #define memoryBarrier()              GroupMemoryBarrierWithGroupSync()
 #define memoryBarrierAtomicCounter() GroupMemoryBarrierWithGroupSync()
-#define memoryBarrierBuffer()        GroupMemoryBarrierWithGroupSync()
+#define memoryBarrierBuffer()        AllMemoryBarrierWithGroupSync()
 #define memoryBarrierImage()         GroupMemoryBarrierWithGroupSync()
 #define memoryBarrierShared()        GroupMemoryBarrierWithGroupSync()
 #define groupMemoryBarrier()         GroupMemoryBarrierWithGroupSync()
 
 #endif // BGFX_SHADER_LANGUAGE_GLSL
 
-#define dispatchIndirect(_buffer \
-			, _offset            \
-			, _numX              \
-			, _numY              \
-			, _numZ              \
-			)                    \
-			_buffer[_offset*2+0] = uvec4(_numX, _numY, _numZ, 0u)
-
-#define drawIndirect(_buffer \
-			, _offset        \
-			, _numVertices   \
-			, _numInstances  \
-			, _startVertex   \
-			, _startInstance \
-			)                \
-			_buffer[_offset*2+0] = uvec4(_numVertices, _numInstances, _startVertex, _startInstance)
-
-#define drawIndexedIndirect(_buffer \
-			, _offset               \
-			, _numIndices           \
-			, _numInstances         \
-			, _startIndex           \
-			, _startVertex          \
-			, _startInstance        \
-			)                       \
-			_buffer[_offset*2+0] = uvec4(_numIndices, _numInstances, _startIndex, _startVertex); \
-			_buffer[_offset*2+1] = uvec4(_startInstance, 0u, 0u, 0u)
+#define dispatchIndirect( \
+	  _buffer             \
+	, _offset             \
+	, _numX               \
+	, _numY               \
+	, _numZ               \
+	)                     \
+	_buffer[_offset*2+0] = uvec4(_numX, _numY, _numZ, 0u)
+
+#define drawIndirect( \
+	  _buffer         \
+	, _offset         \
+	, _numVertices    \
+	, _numInstances   \
+	, _startVertex    \
+	, _startInstance  \
+	)                 \
+	_buffer[_offset*2+0] = uvec4(_numVertices, _numInstances, _startVertex, _startInstance)
+
+#define drawIndexedIndirect( \
+	  _buffer                \
+	, _offset                \
+	, _numIndices            \
+	, _numInstances          \
+	, _startIndex            \
+	, _startVertex           \
+	, _startInstance         \
+	)                        \
+	_buffer[_offset*2+0] = uvec4(_numIndices, _numInstances, _startIndex, _startVertex); \
+	_buffer[_offset*2+1] = uvec4(_startInstance, 0u, 0u, 0u)
 
 #endif // __cplusplus
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 293 - 241
bgfx.mod/bgfx/src/bgfx_p.h


+ 79 - 5
bgfx.mod/bgfx/src/bgfx_shader.sh

@@ -128,6 +128,12 @@ struct BgfxSampler2DShadow
 	Texture2D m_texture;
 };
 
+struct BgfxSampler2DArrayShadow
+{
+	SamplerComparisonState m_sampler;
+	Texture2DArray m_texture;
+};
+
 struct BgfxSampler3D
 {
 	SamplerState m_sampler;
@@ -150,6 +156,12 @@ struct BgfxSamplerCube
 	TextureCube m_texture;
 };
 
+struct BgfxSamplerCubeShadow
+{
+	SamplerComparisonState m_sampler;
+	TextureCube m_texture;
+};
+
 struct BgfxSampler2DMS
 {
 	Texture2DMS<vec4> m_texture;
@@ -165,6 +177,11 @@ vec4 bgfxTexture2DLod(BgfxSampler2D _sampler, vec2 _coord, float _level)
 	return _sampler.m_texture.SampleLevel(_sampler.m_sampler, _coord, _level);
 }
 
+vec4 bgfxTexture2DLodOffset(BgfxSampler2D _sampler, vec2 _coord, float _level, ivec2 _offset)
+{
+	return _sampler.m_texture.SampleLevel(_sampler.m_sampler, _coord, _level, _offset);
+}
+
 vec4 bgfxTexture2DProj(BgfxSampler2D _sampler, vec3 _coord)
 {
 	vec2 coord = _coord.xy * rcp(_coord.z);
@@ -192,6 +209,11 @@ vec4 bgfxTexture2DArrayLod(BgfxSampler2DArray _sampler, vec3 _coord, float _lod)
 	return _sampler.m_texture.SampleLevel(_sampler.m_sampler, _coord, _lod);
 }
 
+vec4 bgfxTexture2DArrayLodOffset(BgfxSampler2DArray _sampler, vec3 _coord, float _level, ivec2 _offset)
+{
+	return _sampler.m_texture.SampleLevel(_sampler.m_sampler, _coord, _level, _offset);
+}
+
 float bgfxShadow2D(BgfxSampler2DShadow _sampler, vec3 _coord)
 {
 	return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, _coord.xy, _coord.z);
@@ -203,6 +225,11 @@ float bgfxShadow2DProj(BgfxSampler2DShadow _sampler, vec4 _coord)
 	return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, coord.xy, coord.z);
 }
 
+vec4 bgfxShadow2DArray(BgfxSampler2DArrayShadow _sampler, vec4 _coord)
+{
+	return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, _coord.xyz, _coord.w);
+}
+
 vec4 bgfxTexture3D(BgfxSampler3D _sampler, vec3 _coord)
 {
 	return _sampler.m_texture.Sample(_sampler.m_sampler, _coord);
@@ -237,11 +264,21 @@ vec4 bgfxTextureCubeLod(BgfxSamplerCube _sampler, vec3 _coord, float _level)
 	return _sampler.m_texture.SampleLevel(_sampler.m_sampler, _coord, _level);
 }
 
+float bgfxShadowCube(BgfxSamplerCubeShadow _sampler, vec4 _coord)
+{
+	return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, _coord.xyz, _coord.w);
+}
+
 vec4 bgfxTexelFetch(BgfxSampler2D _sampler, ivec2 _coord, int _lod)
 {
 	return _sampler.m_texture.Load(ivec3(_coord, _lod) );
 }
 
+vec4 bgfxTexelFetchOffset(BgfxSampler2D _sampler, ivec2 _coord, int _lod, ivec2 _offset)
+{
+	return _sampler.m_texture.Load(ivec3(_coord, _lod), _offset );
+}
+
 vec2 bgfxTextureSize(BgfxSampler2D _sampler, int _lod)
 {
 	vec2 result;
@@ -249,6 +286,19 @@ vec2 bgfxTextureSize(BgfxSampler2D _sampler, int _lod)
 	return result;
 }
 
+vec4 bgfxTextureGather(BgfxSampler2D _sampler, vec2 _coord)
+{
+	return _sampler.m_texture.GatherRed(_sampler.m_sampler, _coord );
+}
+vec4 bgfxTextureGatherOffset(BgfxSampler2D _sampler, vec2 _coord, ivec2 _offset)
+{
+	return _sampler.m_texture.GatherRed(_sampler.m_sampler, _coord, _offset );
+}
+vec4 bgfxTextureGather(BgfxSampler2DArray _sampler, vec3 _coord)
+{
+	return _sampler.m_texture.GatherRed(_sampler.m_sampler, _coord );
+}
+
 ivec4 bgfxTexelFetch(BgfxISampler2D _sampler, ivec2 _coord, int _lod)
 {
 	return _sampler.m_texture.Load(ivec3(_coord, _lod) );
@@ -264,6 +314,11 @@ vec4 bgfxTexelFetch(BgfxSampler2DMS _sampler, ivec2 _coord, int _sampleIdx)
 	return _sampler.m_texture.Load(_coord, _sampleIdx);
 }
 
+vec4 bgfxTexelFetch(BgfxSampler2DArray _sampler, ivec3 _coord, int _lod)
+{
+	return _sampler.m_texture.Load(ivec4(_coord, _lod) );
+}
+
 vec4 bgfxTexelFetch(BgfxSampler3D _sampler, ivec3 _coord, int _lod)
 {
 	return _sampler.m_texture.Load(ivec4(_coord, _lod) );
@@ -289,6 +344,7 @@ vec3 bgfxTextureSize(BgfxSampler3D _sampler, int _lod)
 #		define sampler2D BgfxSampler2D
 #		define texture2D(_sampler, _coord) bgfxTexture2D(_sampler, _coord)
 #		define texture2DLod(_sampler, _coord, _level) bgfxTexture2DLod(_sampler, _coord, _level)
+#		define texture2DLodOffset(_sampler, _coord, _level, _offset) bgfxTexture2DLodOffset(_sampler, _coord, _level, _offset)
 #		define texture2DProj(_sampler, _coord) bgfxTexture2DProj(_sampler, _coord)
 #		define texture2DGrad(_sampler, _coord, _dPdx, _dPdy) bgfxTexture2DGrad(_sampler, _coord, _dPdx, _dPdy)
 
@@ -299,6 +355,7 @@ vec3 bgfxTextureSize(BgfxSampler3D _sampler, int _lod)
 #		define sampler2DArray BgfxSampler2DArray
 #		define texture2DArray(_sampler, _coord) bgfxTexture2DArray(_sampler, _coord)
 #		define texture2DArrayLod(_sampler, _coord, _lod) bgfxTexture2DArrayLod(_sampler, _coord, _lod)
+#		define texture2DArrayLodOffset(_sampler, _coord, _level, _offset) bgfxTexture2DArrayLodOffset(_sampler, _coord, _level, _offset)
 
 #		define SAMPLER2DMS(_name, _reg) \
 			uniform Texture2DMS<vec4> _name ## Texture : REGISTER(t, _reg); \
@@ -313,6 +370,13 @@ vec3 bgfxTextureSize(BgfxSampler3D _sampler, int _lod)
 #		define shadow2D(_sampler, _coord) bgfxShadow2D(_sampler, _coord)
 #		define shadow2DProj(_sampler, _coord) bgfxShadow2DProj(_sampler, _coord)
 
+#		define SAMPLER2DARRAYSHADOW(_name, _reg) \
+			SamplerComparisonState _name ## SamplerComparison : REGISTER(s, _reg); \
+			Texture2DArray _name ## Texture : REGISTER(t, _reg); \
+			BgfxSampler2DArrayShadow _name = { _name ## SamplerComparison, _name ## Texture }
+#		define sampler2DArrayShadow BgfxSampler2DArrayShadow
+#		define shadow2DArray(_sampler, _coord) bgfxShadow2DArray(_sampler, _coord)
+
 #		define SAMPLER3D(_name, _reg) \
 			uniform SamplerState _name ## Sampler : REGISTER(s, _reg); \
 			uniform Texture3D _name ## Texture : REGISTER(t, _reg); \
@@ -335,8 +399,18 @@ vec3 bgfxTextureSize(BgfxSampler3D _sampler, int _lod)
 #		define textureCube(_sampler, _coord) bgfxTextureCube(_sampler, _coord)
 #		define textureCubeLod(_sampler, _coord, _level) bgfxTextureCubeLod(_sampler, _coord, _level)
 
+#		define SAMPLERCUBESHADOW(_name, _reg) \
+			uniform SamplerComparisonState _name ## SamplerComparison : REGISTER(s, _reg); \
+			uniform TextureCube _name ## Texture : REGISTER(t, _reg); \
+			static BgfxSamplerCubeShadow _name = { _name ## SamplerComparison, _name ## Texture }
+#		define samplerCubeShadow BgfxSamplerCubeShadow
+#		define shadowCube(_sampler, _coord) bgfxShadowCube(_sampler, _coord)
+
 #		define texelFetch(_sampler, _coord, _lod) bgfxTexelFetch(_sampler, _coord, _lod)
+#		define texelFetchOffset(_sampler, _coord, _lod, _offset) bgfxTexelFetchOffset(_sampler, _coord, _lod, _offset)
 #		define textureSize(_sampler, _lod) bgfxTextureSize(_sampler, _lod)
+#		define textureGather(_sampler, _coord) bgfxTextureGather(_sampler, _coord)
+#		define textureGatherOffset(_sampler, _coord, _offset) bgfxTextureGatherOffset(_sampler, _coord, _offset)
 #	else
 
 #		define sampler2DShadow sampler2D
@@ -460,12 +534,12 @@ vec4  mod(vec4  _a, vec4  _b) { return _a - _b * floor(_a / _b); }
 #	define SAMPLERCUBEARRAY(_name, _reg)     uniform samplerCubeArray _name
 #	define SAMPLER2DARRAYSHADOW(_name, _reg) uniform sampler2DArrayShadow _name
 
-#	if BGFX_SHADER_LANGUAGE_GLSL >= 130
-#		define ISAMPLER2D(_name, _reg) uniform isampler2D _name
-#		define USAMPLER2D(_name, _reg) uniform usampler2D _name
-#		define ISAMPLER3D(_name, _reg) uniform isampler3D _name
-#		define USAMPLER3D(_name, _reg) uniform usampler3D _name
+#	define ISAMPLER2D(_name, _reg) uniform isampler2D _name
+#	define USAMPLER2D(_name, _reg) uniform usampler2D _name
+#	define ISAMPLER3D(_name, _reg) uniform isampler3D _name
+#	define USAMPLER3D(_name, _reg) uniform usampler3D _name
 
+#	if BGFX_SHADER_LANGUAGE_GLSL >= 130
 #		define texture2D(_sampler, _coord)      texture(_sampler, _coord)
 #		define texture2DArray(_sampler, _coord) texture(_sampler, _coord)
 #		define texture3D(_sampler, _coord)      texture(_sampler, _coord)

+ 4 - 5
bgfx.mod/bgfx/src/config.h

@@ -143,11 +143,6 @@
 #	define BGFX_CONFIG_USE_TINYSTL 1
 #endif // BGFX_CONFIG_USE_TINYSTL
 
-/// Enable OculusVR integration.
-#ifndef BGFX_CONFIG_USE_OVR
-#	define BGFX_CONFIG_USE_OVR 0
-#endif // BGFX_CONFIG_USE_OVR
-
 /// Enable nVidia PerfHUD integration.
 #ifndef BGFX_CONFIG_DEBUG_PERFHUD
 #	define BGFX_CONFIG_DEBUG_PERFHUD 0
@@ -331,4 +326,8 @@ BX_STATIC_ASSERT(bx::isPowerOf2(BGFX_CONFIG_MAX_VIEWS), "BGFX_CONFIG_MAX_VIEWS m
 #	define BGFX_CONFIG_DEFAULT_MAX_ENCODERS ( (0 != BGFX_CONFIG_MULTITHREADED) ? 8 : 1)
 #endif // BGFX_CONFIG_DEFAULT_MAX_ENCODERS
 
+#ifndef BGFX_CONFIG_MAX_BACK_BUFFERS
+#	define BGFX_CONFIG_MAX_BACK_BUFFERS 4
+#endif // BGFX_CONFIG_MAX_BACK_BUFFERS
+
 #endif // BGFX_CONFIG_H_HEADER_GUARD

+ 2 - 2
bgfx.mod/bgfx/src/debug_renderdoc.cpp

@@ -5,7 +5,7 @@
 
 #include "bgfx_p.h"
 
-#if BGFX_CONFIG_DEBUG_PIX && (BX_PLATFORM_WINDOWS || BX_PLATFORM_LINUX)
+#if BX_PLATFORM_WINDOWS || BX_PLATFORM_LINUX
 #	if BX_PLATFORM_WINDOWS
 #		include <psapi.h>
 #	endif // BX_PLATFORM_WINDOWS
@@ -154,4 +154,4 @@ namespace bgfx
 
 } // namespace bgfx
 
-#endif // BGFX_CONFIG_DEBUG_PIX && (BX_PLATFORM_WINDOWS || BX_PLATFORM_LINUX)
+#endif // BX_PLATFORM_WINDOWS || BX_PLATFORM_LINUX

+ 224 - 174
bgfx.mod/bgfx/src/dxgi.cpp

@@ -189,54 +189,58 @@ namespace bgfx
 				; ++ii
 				)
 			{
-				DXGI_ADAPTER_DESC desc;
-				hr = adapter->GetDesc(&desc);
-				if (SUCCEEDED(hr) )
 				{
-					BX_TRACE("Adapter #%d", ii);
-
-					char description[BX_COUNTOF(desc.Description)];
-					wcstombs(description, desc.Description, BX_COUNTOF(desc.Description) );
-					BX_TRACE("\tDescription: %s", description);
-					BX_TRACE("\tVendorId: 0x%08x, DeviceId: 0x%08x, SubSysId: 0x%08x, Revision: 0x%08x"
-						, desc.VendorId
-						, desc.DeviceId
-						, desc.SubSysId
-						, desc.Revision
-						);
-					BX_TRACE("\tMemory: %" PRIi64 " (video), %" PRIi64 " (system), %" PRIi64 " (shared)"
-						, desc.DedicatedVideoMemory
-						, desc.DedicatedSystemMemory
-						, desc.SharedSystemMemory
-						);
-
-					_caps.gpu[ii].vendorId = (uint16_t)desc.VendorId;
-					_caps.gpu[ii].deviceId = (uint16_t)desc.DeviceId;
-					++_caps.numGPUs;
-
-					if (NULL == m_adapter)
+					DXGI_ADAPTER_DESC desc;
+					hr = adapter->GetDesc(&desc);
+					if (SUCCEEDED(hr) )
 					{
-						if ( (BGFX_PCI_ID_NONE != _caps.vendorId ||             0 != _caps.deviceId)
-						&&   (BGFX_PCI_ID_NONE == _caps.vendorId || desc.VendorId == _caps.vendorId)
-						&&   (               0 == _caps.deviceId || desc.DeviceId == _caps.deviceId) )
-						{
-							m_adapter = adapter;
-							m_adapter->AddRef();
-							m_driverType = D3D_DRIVER_TYPE_UNKNOWN;
-						}
+						BX_TRACE("Adapter #%d", ii);
+
+						char description[BX_COUNTOF(desc.Description)];
+						wcstombs(description, desc.Description, BX_COUNTOF(desc.Description) );
+						BX_TRACE("\tDescription: %s", description);
+						BX_TRACE("\tVendorId: 0x%08x, DeviceId: 0x%08x, SubSysId: 0x%08x, Revision: 0x%08x"
+							, desc.VendorId
+							, desc.DeviceId
+							, desc.SubSysId
+							, desc.Revision
+							);
+						BX_TRACE("\tMemory: %" PRIi64 " (video), %" PRIi64 " (system), %" PRIi64 " (shared)"
+							, desc.DedicatedVideoMemory
+							, desc.DedicatedSystemMemory
+							, desc.SharedSystemMemory
+							);
+
+						_caps.gpu[ii].vendorId = (uint16_t)desc.VendorId;
+						_caps.gpu[ii].deviceId = (uint16_t)desc.DeviceId;
+						++_caps.numGPUs;
 
-						if (BX_ENABLED(BGFX_CONFIG_DEBUG_PERFHUD)
-						&&  0 != bx::strFind(description, "PerfHUD") )
+						if (NULL == m_adapter)
 						{
-							m_adapter = adapter;
-							m_driverType = D3D_DRIVER_TYPE_REFERENCE;
+							if ( (BGFX_PCI_ID_NONE != _caps.vendorId ||             0 != _caps.deviceId)
+							&&   (BGFX_PCI_ID_NONE == _caps.vendorId || desc.VendorId == _caps.vendorId)
+							&&   (               0 == _caps.deviceId || desc.DeviceId == _caps.deviceId) )
+							{
+								m_adapter = adapter;
+								m_adapter->AddRef();
+								m_driverType = D3D_DRIVER_TYPE_UNKNOWN;
+							}
+
+							if (BX_ENABLED(BGFX_CONFIG_DEBUG_PERFHUD)
+							&&  !bx::strFind(description, "PerfHUD").isEmpty() )
+							{
+								m_adapter = adapter;
+								m_driverType = D3D_DRIVER_TYPE_REFERENCE;
+							}
 						}
 					}
 				}
 
+				bool hdr10 = false;
+
 				IDXGIOutput* output;
 				for (uint32_t jj = 0
-					; DXGI_ERROR_NOT_FOUND != adapter->EnumOutputs(jj, &output)
+					; SUCCEEDED(adapter->EnumOutputs(jj, &output) )
 					; ++jj
 					)
 				{
@@ -248,20 +252,52 @@ namespace bgfx
 
 						char deviceName[BX_COUNTOF(outputDesc.DeviceName)];
 						wcstombs(deviceName, outputDesc.DeviceName, BX_COUNTOF(outputDesc.DeviceName));
-						BX_TRACE("\t\tDeviceName: %s", deviceName);
-						BX_TRACE("\t\tDesktopCoordinates: %d, %d, %d, %d"
+						BX_TRACE("\t\t           DeviceName: %s", deviceName);
+						BX_TRACE("\t\t   DesktopCoordinates: %d, %d, %d, %d"
 							, outputDesc.DesktopCoordinates.left
 							, outputDesc.DesktopCoordinates.top
 							, outputDesc.DesktopCoordinates.right
 							, outputDesc.DesktopCoordinates.bottom
 							);
-						BX_TRACE("\t\tAttachedToDesktop: %d", outputDesc.AttachedToDesktop);
-						BX_TRACE("\t\tRotation: %d", outputDesc.Rotation);
+						BX_TRACE("\t\t    AttachedToDesktop: %d", outputDesc.AttachedToDesktop);
+						BX_TRACE("\t\t             Rotation: %d", outputDesc.Rotation);
+
+#if BX_PLATFORM_WINDOWS
+						IDXGIOutput6* output6;
+						hr = output->QueryInterface(IID_IDXGIOutput6, (void**)&output6);
+						if (SUCCEEDED(hr) )
+						{
+							DXGI_OUTPUT_DESC1 desc;
+							hr = output6->GetDesc1(&desc);
+							if (SUCCEEDED(hr) )
+							{
+								BX_TRACE("\t\t         BitsPerColor: %d", desc.BitsPerColor);
+								BX_TRACE("\t\t          Color space: %s (colorspace, range, gamma, sitting, primaries, transform)"
+									, s_colorSpaceStr[bx::min<uint32_t>(desc.ColorSpace, kDxgiLastColorSpace+1)]
+									);
+								BX_TRACE("\t\t           RedPrimary: %f, %f", desc.RedPrimary[0],   desc.RedPrimary[1]);
+								BX_TRACE("\t\t         GreenPrimary: %f, %f", desc.GreenPrimary[0], desc.GreenPrimary[1]);
+								BX_TRACE("\t\t          BluePrimary: %f, %f", desc.BluePrimary[0],  desc.BluePrimary[1]);
+								BX_TRACE("\t\t           WhitePoint: %f, %f", desc.WhitePoint[0],   desc.WhitePoint[1]);
+								BX_TRACE("\t\t         MinLuminance: %f", desc.MinLuminance);
+								BX_TRACE("\t\t         MaxLuminance: %f", desc.MaxLuminance);
+								BX_TRACE("\t\tMaxFullFrameLuminance: %f", desc.MaxFullFrameLuminance);
+								BX_TRACE("\t\t          HDR support: %s", DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 == desc.ColorSpace ? "true" : "false");
+
+								hdr10 |= DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 == desc.ColorSpace;
+							}
+
+							// BK - warn only because RenderDoc might be present.
+							DX_RELEASE_W(output6, 1);
+						}
+#endif // BX_PLATFORM_WINDOWS
 
 						DX_RELEASE(output, 0);
 					}
 				}
 
+				_caps.supported |= hdr10 ? BGFX_CAPS_HDR10 : 0;
+
 				DX_RELEASE(adapter, adapter == m_adapter ? 1 : 0);
 			}
 
@@ -283,38 +319,6 @@ namespace bgfx
 				: (uint16_t)m_adapterDesc.VendorId
 				;
 			_caps.deviceId = (uint16_t)m_adapterDesc.DeviceId;
-
-			{
-				IDXGIDevice* dxgiDevice = NULL;
-				hr = E_FAIL;
-				for (uint32_t ii = 0; ii < BX_COUNTOF(s_dxgiDeviceIIDs) && FAILED(hr); ++ii)
-				{
-					hr = m_factory->QueryInterface(s_dxgiDeviceIIDs[ii], (void**)&dxgiDevice);
-					BX_TRACE("DXGI device 11.%d, hr %x", BX_COUNTOF(s_dxgiDeviceIIDs) - 1 - ii, hr);
-
-					if (SUCCEEDED(hr))
-					{
-#if BX_COMPILER_MSVC
-						BX_PRAGMA_DIAGNOSTIC_PUSH();
-						BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4530) // warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
-						try
-						{
-							// QueryInterface above can succeed, but getting adapter call might crash on Win7.
-							hr = dxgiDevice->GetAdapter(reinterpret_cast<IDXGIAdapter**>(&adapter) );
-						}
-						catch (...)
-						{
-							BX_TRACE("Failed to get adapter for IID_IDXGIDevice%d.", BX_COUNTOF(s_dxgiDeviceIIDs) - 1 - ii);
-							DX_RELEASE(dxgiDevice, 0);
-							hr = E_FAIL;
-						}
-						BX_PRAGMA_DIAGNOSTIC_POP();
-#else
-						hr = dxgiDevice->GetAdapter(reinterpret_cast<IDXGIAdapter**>(&adapter) );
-#endif // BX_COMPILER_MSVC
-					}
-				}
-			}
 		}
 
 		return true;
@@ -335,64 +339,26 @@ namespace bgfx
 
 	void Dxgi::update(IUnknown* _device)
 	{
-		if (NULL == m_factory)
+		IDXGIDevice* dxgiDevice = NULL;
+		HRESULT hr = E_FAIL;
+		for (uint32_t ii = 0; ii < BX_COUNTOF(s_dxgiDeviceIIDs) && FAILED(hr); ++ii)
 		{
-			IDXGIDevice* dxgiDevice = NULL;
-			HRESULT hr = E_FAIL;
-			for (uint32_t ii = 0; ii < BX_COUNTOF(s_dxgiDeviceIIDs) && FAILED(hr); ++ii)
-			{
-				hr = _device->QueryInterface(s_dxgiDeviceIIDs[ii], (void**)&dxgiDevice);
-				BX_TRACE("DXGI device 11.%d, hr %x", BX_COUNTOF(s_dxgiDeviceIIDs) - 1 - ii, hr);
+			hr = _device->QueryInterface(s_dxgiDeviceIIDs[ii], (void**)&dxgiDevice);
+			BX_TRACE("DXGI device 11.%d, hr %x", BX_COUNTOF(s_dxgiDeviceIIDs) - 1 - ii, hr);
+		}
 
-				if (SUCCEEDED(hr) )
-				{
-					DX_CHECK(dxgiDevice->GetAdapter(reinterpret_cast<IDXGIAdapter**>(&m_adapter) ) );
-					DX_RELEASE(dxgiDevice, 1);
-				}
-			}
+		if (NULL == m_factory)
+		{
+			DX_CHECK(dxgiDevice->GetAdapter(reinterpret_cast<IDXGIAdapter**>(&m_adapter) ) );
 
 			bx::memSet(&m_adapterDesc, 0, sizeof(m_adapterDesc) );
 			hr = m_adapter->GetDesc(&m_adapterDesc);
 			BX_WARN(SUCCEEDED(hr), "Adapter GetDesc failed 0x%08x.", hr);
 
 			DX_CHECK(m_adapter->GetParent(IID_IDXGIFactory2, (void**)&m_factory) );
-
-#if 0
-			bx::memSet(&m_adapterDesc, 0, sizeof(m_adapterDesc) );
-//	NOTICE:
-//		LUID STDMETHODCALLTYPE ID3D12Device::GetAdapterLuid() has a different behaviour in gcc ,
-//		because gcc64 returns small struct in RAX, but the microsoft implemention of ID3D12Device::GetAdapterLuid() in d3d12.dll
-//		pass the struct LUID's address as the second parameter.
-			typedef void (STDMETHODCALLTYPE ID3D12Device::*ID3D12Device_GetAdapterLuid_f)(LUID *);
-			(m_device->*(ID3D12Device_GetAdapterLuid_f)(&ID3D12Device::GetAdapterLuid))(&luid);
-			AdapterI* adapter;
-			for (uint32_t ii = 0; DXGI_ERROR_NOT_FOUND != m_factory->EnumAdapters(ii, reinterpret_cast<IDXGIAdapter**>(&adapter) ); ++ii)
-			{
-				adapter->GetDesc(&m_adapterDesc);
-				if (m_adapterDesc.AdapterLuid.LowPart  == luid.LowPart
-				&&  m_adapterDesc.AdapterLuid.HighPart == luid.HighPart)
-				{
-					if (NULL == m_adapter)
-					{
-						m_adapter = adapter;
-					}
-					else
-					{
-#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT
-						DX_RELEASE(adapter, 0);
-#else
-						DX_RELEASE(adapter, 2);
-#endif // BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT
-					}
-					break;
-				}
-				DX_RELEASE(adapter, 0);
-			}
-
-			g_caps.vendorId = (uint16_t)m_adapterDesc.VendorId;
-			g_caps.deviceId = (uint16_t)m_adapterDesc.DeviceId;
-#endif // 0
 		}
+
+		DX_RELEASE_I(dxgiDevice);
 	}
 
 	static const GUID IID_ID3D12CommandQueue = { 0x0ec870a6, 0x5d7e, 0x4c22, { 0x8c, 0xfc, 0x5b, 0xaa, 0xe0, 0x76, 0x16, 0xed } };
@@ -404,7 +370,7 @@ namespace bgfx
 		bool allowTearing = false;
 
 #if BX_PLATFORM_WINDOWS
-		if (windowsVersionIs(Condition::GreaterEqual, 0x0602) )
+		if (windowsVersionIs(Condition::GreaterEqual, 0x0604) )
 		{
 			// BK - CheckFeatureSupport with DXGI_FEATURE_PRESENT_ALLOW_TEARING
 			//      will crash on pre Windows 8. Issue #1356.
@@ -420,7 +386,8 @@ namespace bgfx
 		scd.BufferDesc.Format = _scd.format;
 		scd.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
 		scd.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
-		scd.SampleDesc   = _scd.sampleDesc;
+		scd.SampleDesc.Count   = 1;
+		scd.SampleDesc.Quality = 0;
 		scd.BufferUsage  = _scd.bufferUsage;
 		scd.BufferCount  = _scd.bufferCount;
 		scd.OutputWindow = (HWND)_scd.nwh;
@@ -431,24 +398,30 @@ namespace bgfx
 			| (allowTearing ? DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0)
 			;
 
-		if (isType(_device, IID_ID3D12CommandQueue) )
+		hr = m_factory->CreateSwapChain(
+			  _device
+			, &scd
+			, reinterpret_cast<IDXGISwapChain**>(_swapChain)
+			);
+
+		if (SUCCEEDED(hr) )
 		{
-			scd.SampleDesc.Count   = 1;
-			scd.SampleDesc.Quality = 0;
+			IDXGIDevice1* dxgiDevice1;
+			_device->QueryInterface(IID_IDXGIDevice1, (void**)&dxgiDevice1);
+			if (NULL != dxgiDevice1)
+			{
+				dxgiDevice1->SetMaximumFrameLatency(_scd.maxFrameLatency);
+				DX_RELEASE_I(dxgiDevice1);
+			}
 		}
-
-		hr = m_factory->CreateSwapChain(
-				  _device
-				, &scd
-				, reinterpret_cast<IDXGISwapChain**>(_swapChain)
-				);
 #else
 		DXGI_SWAP_CHAIN_DESC1 scd;
 		scd.Width  = _scd.width;
 		scd.Height = _scd.height;
 		scd.Format = _scd.format;
 		scd.Stereo = _scd.stereo;
-		scd.SampleDesc  = _scd.sampleDesc;
+		scd.SampleDesc.Count   = 1;
+		scd.SampleDesc.Quality = 0;
 		scd.BufferUsage = _scd.bufferUsage;
 		scd.BufferCount = _scd.bufferCount;
 		scd.Scaling     = _scd.scaling;
@@ -456,21 +429,15 @@ namespace bgfx
 		scd.AlphaMode   = _scd.alphaMode;
 		scd.Flags       = _scd.flags;
 
-		if (isType(_device, IID_ID3D12CommandQueue) )
-		{
-			scd.SampleDesc.Count   = 1;
-			scd.SampleDesc.Quality = 0;
-		}
-
 		if (NULL == _scd.ndt)
 		{
 			hr = m_factory->CreateSwapChainForCoreWindow(
-					  _device
-					, (::IUnknown*)_scd.nwh
-					, &scd
-					, NULL
-					, reinterpret_cast<IDXGISwapChain1**>(_swapChain)
-					);
+				  _device
+				, (::IUnknown*)_scd.nwh
+				, &scd
+				, NULL
+				, reinterpret_cast<IDXGISwapChain1**>(_swapChain)
+				);
 		}
 		else if (reinterpret_cast<void*>(1) == _scd.ndt)
 		{
@@ -479,11 +446,11 @@ namespace bgfx
 		else
 		{
 			hr = m_factory->CreateSwapChainForComposition(
-					  _device
-					, &scd
-					, NULL
-					, reinterpret_cast<IDXGISwapChain1**>(_swapChain)
-					);
+				  _device
+				, &scd
+				, NULL
+				, reinterpret_cast<IDXGISwapChain1**>(_swapChain)
+				);
 			if (FAILED(hr) )
 			{
 				return hr;
@@ -540,8 +507,9 @@ namespace bgfx
 					{
 						uint32_t colorSpaceSupport;
 						reinterpret_cast<IDXGISwapChain3*>(*_swapChain)->CheckColorSpaceSupport(s_colorSpace[jj], &colorSpaceSupport);
-						BX_TRACE("\t%2d, 0x%08x, %s"
+						BX_TRACE("\t%2d: \"%-20s\", 0x%08x, %s"
 							, s_colorSpace[jj]
+							, s_colorSpaceStr[s_colorSpace[jj]]
 							, colorSpaceSupport
 							, 0 != (colorSpaceSupport & DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT)
 							? "supported"
@@ -553,43 +521,125 @@ namespace bgfx
 				}
 			}
 		}
+#endif // BX_PLATFORM_WINDOWS
+
+		updateHdr10(*_swapChain, _scd);
+
+		return S_OK;
+	}
+
+	void Dxgi::updateHdr10(SwapChainI* _swapChain, const SwapChainDesc& _scd)
+	{
+#if BX_PLATFORM_WINDOWS
+		::IDXGISwapChain4* swapChain4;
+		HRESULT hr = _swapChain->QueryInterface(IID_IDXGISwapChain4, (void**)&swapChain4);
 
+		if (SUCCEEDED(hr) )
 		{
-			IDXGIOutput* output;
-			hr = (*_swapChain)->GetContainingOutput(&output);
+			const DXGI_COLOR_SPACE_TYPE colorSpace =
+				  _scd.format == DXGI_FORMAT_R10G10B10A2_UNORM  ? DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
+				: _scd.format == DXGI_FORMAT_R16G16B16A16_FLOAT ? DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709
+				:                                                 DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
+				;
+
+			hr = swapChain4->SetColorSpace1(colorSpace);
+
 			if (SUCCEEDED(hr) )
 			{
-				IDXGIOutput6* output6;
-				hr = output->QueryInterface(IID_IDXGIOutput6, (void**)&output6);
+				DXGI_OUTPUT_DESC1 desc;
+
+				IDXGIOutput* output;
+				hr = _swapChain->GetContainingOutput(&output);
 				if (SUCCEEDED(hr) )
 				{
-					DXGI_OUTPUT_DESC1 desc;
-					hr = output6->GetDesc1(&desc);
+					IDXGIOutput6* output6;
+					hr = output->QueryInterface(IID_IDXGIOutput6, (void**)&output6);
 					if (SUCCEEDED(hr) )
 					{
-						BX_TRACE("Display specs:")
-						BX_TRACE("\t         BitsPerColor: %d", desc.BitsPerColor);
-						BX_TRACE("\t          Color space: %s (colorspace, range, gamma, sitting, primaries, transform)"
-							, s_colorSpaceStr[bx::min<uint32_t>(desc.ColorSpace, kDxgiLastColorSpace+1)]
-							);
-						BX_TRACE("\t           RedPrimary: %f, %f", desc.RedPrimary[0],   desc.RedPrimary[1]);
-						BX_TRACE("\t         GreenPrimary: %f, %f", desc.GreenPrimary[0], desc.GreenPrimary[1]);
-						BX_TRACE("\t          BluePrimary: %f, %f", desc.BluePrimary[0],  desc.BluePrimary[1]);
-						BX_TRACE("\t           WhitePoint: %f, %f", desc.WhitePoint[0],   desc.WhitePoint[1]);
-						BX_TRACE("\t         MinLuminance: %f", desc.MinLuminance);
-						BX_TRACE("\t         MaxLuminance: %f", desc.MaxLuminance);
-						BX_TRACE("\tMaxFullFrameLuminance: %f", desc.MaxFullFrameLuminance);
+						hr = output6->GetDesc1(&desc);
+						if (SUCCEEDED(hr) )
+						{
+							BX_TRACE("Display specs:")
+							BX_TRACE("\t         BitsPerColor: %d", desc.BitsPerColor);
+							BX_TRACE("\t          Color space: %s (colorspace, range, gamma, sitting, primaries, transform)"
+								, s_colorSpaceStr[bx::min<uint32_t>(desc.ColorSpace, kDxgiLastColorSpace+1)]
+								);
+							BX_TRACE("\t           RedPrimary: %f, %f", desc.RedPrimary[0],   desc.RedPrimary[1]);
+							BX_TRACE("\t         GreenPrimary: %f, %f", desc.GreenPrimary[0], desc.GreenPrimary[1]);
+							BX_TRACE("\t          BluePrimary: %f, %f", desc.BluePrimary[0],  desc.BluePrimary[1]);
+							BX_TRACE("\t           WhitePoint: %f, %f", desc.WhitePoint[0],   desc.WhitePoint[1]);
+							BX_TRACE("\t         MinLuminance: %f", desc.MinLuminance);
+							BX_TRACE("\t         MaxLuminance: %f", desc.MaxLuminance);
+							BX_TRACE("\tMaxFullFrameLuminance: %f", desc.MaxFullFrameLuminance);
+						}
+
+						DX_RELEASE(output6, 1);
 					}
 
-					DX_RELEASE(output6, 1);
+					DX_RELEASE(output, 0);
 				}
 
-				DX_RELEASE(output, 0);
+				DXGI_HDR_METADATA_HDR10 hdr10;
+				hdr10.RedPrimary[0]   = uint16_t(desc.RedPrimary[0]   * 50000.0f);
+				hdr10.RedPrimary[1]   = uint16_t(desc.RedPrimary[1]   * 50000.0f);
+				hdr10.GreenPrimary[0] = uint16_t(desc.GreenPrimary[0] * 50000.0f);
+				hdr10.GreenPrimary[1] = uint16_t(desc.GreenPrimary[1] * 50000.0f);
+				hdr10.BluePrimary[0]  = uint16_t(desc.BluePrimary[0]  * 50000.0f);
+				hdr10.BluePrimary[1]  = uint16_t(desc.BluePrimary[1]  * 50000.0f);
+				hdr10.WhitePoint[0]   = uint16_t(desc.WhitePoint[0]   * 50000.0f);
+				hdr10.WhitePoint[1]   = uint16_t(desc.WhitePoint[1]   * 50000.0f);
+				hdr10.MaxMasteringLuminance     = uint32_t(desc.MaxLuminance * 10000.0f);
+				hdr10.MinMasteringLuminance     = uint32_t(desc.MinLuminance * 10000.0f);
+				hdr10.MaxContentLightLevel      = uint16_t(desc.MaxFullFrameLuminance);
+				hdr10.MaxFrameAverageLightLevel = uint16_t(desc.MaxFullFrameLuminance);
+				hr = swapChain4->SetHDRMetaData(DXGI_HDR_METADATA_TYPE_HDR10, sizeof(DXGI_HDR_METADATA_HDR10), &hdr10);
 			}
+
+			DX_RELEASE(swapChain4, 1);
 		}
+#else
+		BX_UNUSED(_swapChain, _scd);
 #endif // BX_PLATFORM_WINDOWS
+	}
 
-		return S_OK;
+	HRESULT Dxgi::resizeBuffers(SwapChainI* _swapChain, const SwapChainDesc& _scd, const uint32_t* _nodeMask, IUnknown* const* _presentQueue)
+	{
+		HRESULT hr;
+
+#if BX_PLATFORM_WINDOWS
+		if (NULL != _nodeMask
+		&&  NULL != _presentQueue)
+		{
+			hr = _swapChain->ResizeBuffers1(
+				  _scd.bufferCount
+				, _scd.width
+				, _scd.height
+				, _scd.format
+				, _scd.flags
+				, _nodeMask
+				, _presentQueue
+				);
+		}
+		else
+#endif // BX_PLATFORM_WINDOWS
+		{
+			BX_UNUSED(_nodeMask, _presentQueue);
+
+			hr = _swapChain->ResizeBuffers(
+				  _scd.bufferCount
+				, _scd.width
+				, _scd.height
+				, _scd.format
+				, _scd.flags
+				);
+		}
+
+		if (SUCCEEDED(hr) )
+		{
+			updateHdr10(_swapChain, _scd);
+		}
+
+		return hr;
 	}
 
 	void Dxgi::trim()

+ 8 - 1
bgfx.mod/bgfx/src/dxgi.h

@@ -38,6 +38,7 @@ namespace bgfx
 		DXGI_SWAP_EFFECT swapEffect;
 		DXGI_ALPHA_MODE alphaMode;
 		uint32_t flags;
+		uint8_t maxFrameLatency;
 		void* nwh;
 		void* ndt;
 		bool windowed;
@@ -82,7 +83,13 @@ namespace bgfx
 		void update(IUnknown* _device);
 
 		///
-		HRESULT createSwapChain(IUnknown* _device, const SwapChainDesc& _desc, SwapChainI** _swapChain);
+		HRESULT createSwapChain(IUnknown* _device, const SwapChainDesc& _scd, SwapChainI** _swapChain);
+
+		///
+		void updateHdr10(SwapChainI* _swapChain, const SwapChainDesc& _scd);
+
+		///
+		HRESULT resizeBuffers(SwapChainI* _swapChain, const SwapChainDesc& _scd, const uint32_t* _nodeMask = NULL, IUnknown* const* _presentQueue = NULL);
 
 		///
 		void trim();

+ 3 - 3
bgfx.mod/bgfx/src/glcontext_egl.cpp

@@ -196,7 +196,7 @@ EGL_IMPORT
 			dumpExtensions(extensions);
 
 			// https://www.khronos.org/registry/EGL/extensions/ANDROID/EGL_ANDROID_recordable.txt
-			const bool hasEglAndroidRecordable = !!bx::findIdentifierMatch(extensions, "EGL_ANDROID_recordable");
+			const bool hasEglAndroidRecordable = !bx::findIdentifierMatch(extensions, "EGL_ANDROID_recordable").isEmpty();
 
 			EGLint attrs[] =
 			{
@@ -256,8 +256,8 @@ EGL_IMPORT
 			m_surface = eglCreateWindowSurface(m_display, m_config, nwh, NULL);
 			BGFX_FATAL(m_surface != EGL_NO_SURFACE, Fatal::UnableToInitialize, "Failed to create surface.");
 
-			const bool hasEglKhrCreateContext = !!bx::findIdentifierMatch(extensions, "EGL_KHR_create_context");
-			const bool hasEglKhrNoError       = !!bx::findIdentifierMatch(extensions, "EGL_KHR_create_context_no_error");
+			const bool hasEglKhrCreateContext = !bx::findIdentifierMatch(extensions, "EGL_KHR_create_context").isEmpty();
+			const bool hasEglKhrNoError       = !bx::findIdentifierMatch(extensions, "EGL_KHR_create_context_no_error").isEmpty();
 
 			const uint32_t gles = BGFX_CONFIG_RENDERER_OPENGLES;
 

+ 53 - 31
bgfx.mod/bgfx/src/glcontext_glx.cpp

@@ -29,28 +29,30 @@ namespace bgfx { namespace gl
 
 	struct SwapChainGL
 	{
-		SwapChainGL(::Window _window, XVisualInfo* _visualInfo, GLXContext _context)
-			: m_window(_window)
+		SwapChainGL(::Display* display, ::Window _window, XVisualInfo* _visualInfo, GLXContext _context)
+			: m_display(display)
+			, m_window(_window)
 		{
-			m_context = glXCreateContext( (::Display*)g_platformData.ndt, _visualInfo, _context, GL_TRUE);
+			m_context = glXCreateContext(m_display, _visualInfo, _context, GL_TRUE);
 		}
 
 		~SwapChainGL()
 		{
-			glXMakeCurrent( (::Display*)g_platformData.ndt, 0, 0);
-			glXDestroyContext( (::Display*)g_platformData.ndt, m_context);
+			glXMakeCurrent(m_display, 0, 0);
+			glXDestroyContext(m_display, m_context);
 		}
 
 		void makeCurrent()
 		{
-			glXMakeCurrent( (::Display*)g_platformData.ndt, m_window, m_context);
+			glXMakeCurrent(m_display, m_window, m_context);
 		}
 
 		void swapBuffers()
 		{
-			glXSwapBuffers( (::Display*)g_platformData.ndt, m_window);
+			glXSwapBuffers(m_display, m_window);
 		}
 
+		::Display* m_display;
 		Window m_window;
 		GLXContext m_context;
 	};
@@ -60,13 +62,23 @@ namespace bgfx { namespace gl
 		BX_UNUSED(_width, _height);
 
 		m_context = (GLXContext)g_platformData.context;
+		m_display = (::Display*)g_platformData.ndt;
+
+		// It's possible the user has provided the window handle, but not
+		// the display handle. If this is the case, try opening the default
+		// display
+		if (NULL == m_display)
+		{
+			m_display = XOpenDisplay(NULL);
+			BGFX_FATAL(m_display, Fatal::UnableToInitialize, "XOpenDisplay(NULL) : Failed to open default display");
+		}
 
 		if (NULL == g_platformData.context)
 		{
-			XLockDisplay( (::Display*)g_platformData.ndt);
+			XLockDisplay(m_display);
 
 			int major, minor;
-			bool version = glXQueryVersion( (::Display*)g_platformData.ndt, &major, &minor);
+			bool version = glXQueryVersion(m_display, &major, &minor);
 			BGFX_FATAL(version, Fatal::UnableToInitialize, "Failed to query GLX version");
 			BGFX_FATAL( (major == 1 && minor >= 2) || major > 1
 					, Fatal::UnableToInitialize
@@ -75,9 +87,9 @@ namespace bgfx { namespace gl
 					, minor
 					);
 
-			int32_t screen = DefaultScreen( (::Display*)g_platformData.ndt);
+			int32_t screen = DefaultScreen(m_display);
 
-			const char* extensions = glXQueryExtensionsString( (::Display*)g_platformData.ndt, screen);
+			const char* extensions = glXQueryExtensionsString(m_display, screen);
 			BX_TRACE("GLX extensions:");
 			dumpExtensions(extensions);
 
@@ -99,13 +111,13 @@ namespace bgfx { namespace gl
 			GLXFBConfig bestConfig = NULL;
 
 			int numConfigs;
-			GLXFBConfig* configs = glXChooseFBConfig( (::Display*)g_platformData.ndt, screen, attrsGlx, &numConfigs);
+			GLXFBConfig* configs = glXChooseFBConfig(m_display, screen, attrsGlx, &numConfigs);
 
 			BX_TRACE("glX num configs %d", numConfigs);
 
 			for (int ii = 0; ii < numConfigs; ++ii)
 			{
-				m_visualInfo = glXGetVisualFromFBConfig( (::Display*)g_platformData.ndt, configs[ii]);
+				m_visualInfo = glXGetVisualFromFBConfig(m_display, configs[ii]);
 				if (NULL != m_visualInfo)
 				{
 					BX_TRACE("---");
@@ -113,7 +125,7 @@ namespace bgfx { namespace gl
 					for (uint32_t attr = 6; attr < BX_COUNTOF(attrsGlx)-1 && attrsGlx[attr] != 0; attr += 2)
 					{
 						int value;
-						glXGetFBConfigAttrib( (::Display*)g_platformData.ndt, configs[ii], attrsGlx[attr], &value);
+						glXGetFBConfigAttrib(m_display, configs[ii], attrsGlx[attr], &value);
 						BX_TRACE("glX %d/%d %2d: %4x, %8x (%8x%s)"
 								, ii
 								, numConfigs
@@ -149,46 +161,50 @@ namespace bgfx { namespace gl
 			BGFX_FATAL(m_visualInfo, Fatal::UnableToInitialize, "Failed to find a suitable X11 display configuration.");
 
 			BX_TRACE("Create GL 2.1 context.");
-			m_context = glXCreateContext( (::Display*)g_platformData.ndt, m_visualInfo, 0, GL_TRUE);
+			m_context = glXCreateContext(m_display, m_visualInfo, 0, GL_TRUE);
 			BGFX_FATAL(NULL != m_context, Fatal::UnableToInitialize, "Failed to create GL 2.1 context.");
 
+#if BGFX_CONFIG_RENDERER_OPENGL >= 31
 			glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress( (const GLubyte*)"glXCreateContextAttribsARB");
 
 			if (NULL != glXCreateContextAttribsARB)
 			{
-				BX_TRACE("Create GL 3.1 context.");
+				BX_TRACE("Create GL %d.%d context.", BGFX_CONFIG_RENDERER_OPENGL / 10, BGFX_CONFIG_RENDERER_OPENGL % 10);
 				int32_t flags = BGFX_CONFIG_DEBUG ? GLX_CONTEXT_DEBUG_BIT_ARB : 0;
 				const int contextAttrs[] =
 				{
-					GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
-					GLX_CONTEXT_MINOR_VERSION_ARB, 1,
+					GLX_CONTEXT_MAJOR_VERSION_ARB, BGFX_CONFIG_RENDERER_OPENGL / 10,
+					GLX_CONTEXT_MINOR_VERSION_ARB, BGFX_CONFIG_RENDERER_OPENGL % 10,
 					GLX_CONTEXT_FLAGS_ARB, flags,
 					GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
 					0,
 				};
 
-				GLXContext context = glXCreateContextAttribsARB( (::Display*)g_platformData.ndt, bestConfig, 0, true, contextAttrs);
+				GLXContext context = glXCreateContextAttribsARB(m_display, bestConfig, 0, true, contextAttrs);
 
 				if (NULL != context)
 				{
-					glXDestroyContext( (::Display*)g_platformData.ndt, m_context);
+					glXDestroyContext(m_display, m_context);
 					m_context = context;
 				}
 			}
+#else
+			BX_UNUSED(bestConfig);
+#endif // BGFX_CONFIG_RENDERER_OPENGL >= 31
 
-			XUnlockDisplay( (::Display*)g_platformData.ndt);
+			XUnlockDisplay(m_display);
 		}
 
 		import();
 
-		glXMakeCurrent( (::Display*)g_platformData.ndt, (::Window)g_platformData.nwh, m_context);
+		glXMakeCurrent(m_display, (::Window)g_platformData.nwh, m_context);
 		m_current = NULL;
 
 		glXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)glXGetProcAddress( (const GLubyte*)"glXSwapIntervalEXT");
 		if (NULL != glXSwapIntervalEXT)
 		{
 			BX_TRACE("Using glXSwapIntervalEXT.");
-			glXSwapIntervalEXT( (::Display*)g_platformData.ndt, (::Window)g_platformData.nwh, 0);
+			glXSwapIntervalEXT(m_display, (::Window)g_platformData.nwh, 0);
 		}
 		else
 		{
@@ -211,21 +227,27 @@ namespace bgfx { namespace gl
 
 		glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
 		glClear(GL_COLOR_BUFFER_BIT);
-		glXSwapBuffers( (::Display*)g_platformData.ndt, (::Window)g_platformData.nwh);
+		glXSwapBuffers(m_display, (::Window)g_platformData.nwh);
 
 		g_internalData.context = m_context;
 	}
 
 	void GlContext::destroy()
 	{
-		glXMakeCurrent( (::Display*)g_platformData.ndt, 0, 0);
+		glXMakeCurrent(m_display, 0, 0);
 		if (NULL == g_platformData.context)
 		{
-			glXDestroyContext( (::Display*)g_platformData.ndt, m_context);
+			glXDestroyContext(m_display, m_context);
 			XFree(m_visualInfo);
 		}
+		// If we opened the display, have to close it
+		if (NULL == g_platformData.ndt)
+		{
+			XCloseDisplay(m_display);
+		}
 		m_context    = NULL;
 		m_visualInfo = NULL;
+		m_display    = NULL;
 	}
 
 	void GlContext::resize(uint32_t /*_width*/, uint32_t /*_height*/, uint32_t _flags)
@@ -235,7 +257,7 @@ namespace bgfx { namespace gl
 
 		if (NULL != glXSwapIntervalEXT)
 		{
-			glXSwapIntervalEXT( (::Display*)g_platformData.ndt, (::Window)g_platformData.nwh, interval);
+			glXSwapIntervalEXT(m_display, (::Window)g_platformData.nwh, interval);
 		}
 		else if (NULL != glXSwapIntervalMESA)
 		{
@@ -254,13 +276,13 @@ namespace bgfx { namespace gl
 
 	SwapChainGL* GlContext::createSwapChain(void* _nwh)
 	{
-		return BX_NEW(g_allocator, SwapChainGL)( (::Window)_nwh, m_visualInfo, m_context);
+		return BX_NEW(g_allocator, SwapChainGL)(m_display, (::Window)_nwh, m_visualInfo, m_context);
 	}
 
 	void GlContext::destroySwapChain(SwapChainGL* _swapChain)
 	{
 		BX_DELETE(g_allocator, _swapChain);
-		glXMakeCurrent( (::Display*)g_platformData.ndt, (::Window)g_platformData.nwh, m_context);
+		glXMakeCurrent(m_display, (::Window)g_platformData.nwh, m_context);
 	}
 
 	void GlContext::swap(SwapChainGL* _swapChain)
@@ -269,7 +291,7 @@ namespace bgfx { namespace gl
 
 		if (NULL == _swapChain)
 		{
-			glXSwapBuffers( (::Display*)g_platformData.ndt, (::Window)g_platformData.nwh);
+			glXSwapBuffers(m_display, (::Window)g_platformData.nwh);
 		}
 		else
 		{
@@ -285,7 +307,7 @@ namespace bgfx { namespace gl
 
 			if (NULL == _swapChain)
 			{
-				glXMakeCurrent( (::Display*)g_platformData.ndt, (::Window)g_platformData.nwh, m_context);
+				glXMakeCurrent(m_display, (::Window)g_platformData.nwh, m_context);
 			}
 			else
 			{

+ 2 - 0
bgfx.mod/bgfx/src/glcontext_glx.h

@@ -21,6 +21,7 @@ namespace bgfx { namespace gl
 			: m_current(NULL)
 			, m_context(0)
 			, m_visualInfo(NULL)
+			, m_display(NULL)
 		{
 		}
 
@@ -44,6 +45,7 @@ namespace bgfx { namespace gl
 		SwapChainGL* m_current;
 		GLXContext m_context;
 		XVisualInfo* m_visualInfo;
+		::Display* m_display;
 	};
 } /* namespace gl */ } // namespace bgfx
 

+ 2 - 0
bgfx.mod/bgfx/src/glimports.h

@@ -113,6 +113,7 @@ typedef void           (GL_APIENTRYP PFNGLFLUSHPROC) ();
 typedef void           (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
 typedef void           (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
 typedef void           (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void           (GL_APIENTRYP PFNGLFRONTFACE)(GLenum mode);
 typedef void           (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
 typedef void           (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
 typedef void           (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
@@ -304,6 +305,7 @@ GL_IMPORT______(false, PFNGLFLUSHPROC,                             glFlush);
 GL_IMPORT______(true,  PFNGLFRAMEBUFFERRENDERBUFFERPROC,           glFramebufferRenderbuffer);
 GL_IMPORT______(true,  PFNGLFRAMEBUFFERTEXTURE2DPROC,              glFramebufferTexture2D);
 GL_IMPORT______(true,  PFNGLFRAMEBUFFERTEXTURELAYERPROC,           glFramebufferTextureLayer);
+GL_IMPORT______(false, PFNGLFRONTFACE,                             glFrontFace);
 GL_IMPORT______(false, PFNGLGENBUFFERSPROC,                        glGenBuffers);
 GL_IMPORT______(true,  PFNGLGENERATEMIPMAPPROC,                    glGenerateMipmap);
 GL_IMPORT______(true,  PFNGLGENFRAMEBUFFERSPROC,                   glGenFramebuffers);

+ 0 - 218
bgfx.mod/bgfx/src/hmd.cpp

@@ -1,218 +0,0 @@
-/*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
- */
-
-#include "hmd.h"
-
-namespace bgfx
-{
-	VR::VR()
-		: m_impl(NULL)
-		, m_framesUntilReconnect(0)
-		, m_enabled(false)
-	{
-	}
-
-	void VR::init(VRImplI* _impl)
-	{
-		if (NULL == _impl)
-		{
-			return;
-		}
-
-		if (!_impl->init() )
-		{
-			return;
-		}
-
-		m_impl = _impl;
-		m_impl->connect(&m_desc);
-
-		if (!m_impl->isConnected() )
-		{
-			connectFailed();
-			return;
-		}
-
-		m_hmdSize.m_w = m_desc.m_eyeSize[0].m_w + m_desc.m_eyeSize[1].m_w;
-		m_hmdSize.m_h = bx::uint32_max(m_desc.m_eyeSize[0].m_h, m_desc.m_eyeSize[1].m_h);
-	}
-
-	void VR::shutdown()
-	{
-		if (NULL == m_impl)
-		{
-			return;
-		}
-
-		m_impl->destroySwapChain();
-
-		if (m_impl->isConnected() )
-		{
-			m_impl->disconnect();
-		}
-
-		m_impl->shutdown();
-		m_impl = NULL;
-		m_enabled = false;
-	}
-
-	void VR::getViewport(uint8_t _eye, Rect* _viewport) const
-	{
-		_viewport->m_x      = uint16_t(_eye * (m_desc.m_eyeSize[_eye].m_w + 1) );
-		_viewport->m_y      = 0;
-		_viewport->m_width  = uint16_t(m_desc.m_eyeSize[_eye].m_w);
-		_viewport->m_height = uint16_t(m_desc.m_eyeSize[_eye].m_h);
-	}
-
-	void VR::makeRenderTargetActive()
-	{
-		BX_CHECK(m_enabled, "VR::renderEyeStart called while not enabled - render usage error");
-
-		if (NULL != m_impl)
-		{
-			m_impl->makeRenderTargetActive(m_desc);
-		}
-	}
-
-	void VR::recenter()
-	{
-		if (NULL != m_impl)
-		{
-			m_impl->recenter();
-		}
-	}
-
-	void VR::preReset()
-	{
-		if (NULL != m_impl)
-		{
-			m_impl->destroyMirror();
-		}
-
-		m_enabled = false;
-	}
-
-	void VR::postReset(int _msaaSamples, int _mirrorWidth, int _mirrorHeight)
-	{
-		if (NULL != m_impl
-		&&  m_impl->createSwapChain(m_desc, _msaaSamples, _mirrorWidth, _mirrorHeight) )
-		{
-			m_enabled = true;
-		}
-	}
-
-	void VR::flip()
-	{
-		if (NULL == m_impl
-		||  !m_enabled)
-		{
-			return;
-		}
-		else if (!m_impl->isConnected()
-			 &&  !tryReconnect() )
-		{
-			return;
-		}
-
-		if (!m_impl->submitSwapChain(m_desc) )
-		{
-			m_impl->destroySwapChain();
-			m_impl->disconnect();
-			return;
-		}
-	}
-
-	void VR::swap(HMD& _hmd)
-	{
-		_hmd.flags = BGFX_HMD_NONE;
-
-		if (NULL == m_impl)
-		{
-			return;
-		}
-
-		_hmd.flags = BGFX_HMD_DEVICE_RESOLUTION;
-		_hmd.deviceWidth  = m_desc.m_deviceSize.m_w;
-		_hmd.deviceHeight = m_desc.m_deviceSize.m_h;
-		_hmd.width  = uint16_t(m_hmdSize.m_w);
-		_hmd.height = uint16_t(m_hmdSize.m_h);
-
-		if (!m_impl->updateTracking(_hmd) )
-		{
-			m_impl->destroySwapChain();
-			m_impl->disconnect();
-		}
-
-		if (!m_impl->isConnected() )
-		{
-			return;
-		}
-
-		for (int eye = 0; eye < 2; ++eye)
-		{
-			_hmd.eye[eye].fov[0] = m_desc.m_eyeFov[eye].m_up;
-			_hmd.eye[eye].fov[1] = m_desc.m_eyeFov[eye].m_down;
-			_hmd.eye[eye].fov[2] = m_desc.m_eyeFov[eye].m_left;
-			_hmd.eye[eye].fov[3] = m_desc.m_eyeFov[eye].m_right;
-		}
-
-		m_impl->updateInput(_hmd);
-		if (m_enabled)
-		{
-			_hmd.flags |= BGFX_HMD_RENDERING;
-		}
-	}
-
-	bool VR::tryReconnect()
-	{
-		if (!m_impl)
-		{
-			return false;
-		}
-
-		BX_CHECK(!m_impl->isConnected(), "VR::tryReconnect called when already connected. Usage error");
-
-		--m_framesUntilReconnect;
-		if (m_framesUntilReconnect > 0)
-		{
-			return false;
-		}
-
-		m_framesUntilReconnect = 90;
-		m_impl->connect(&m_desc);
-		if (!m_impl->isConnected() )
-		{
-			connectFailed();
-			return false;
-		}
-
-		m_hmdSize.m_w = m_desc.m_eyeSize[0].m_w + m_desc.m_eyeSize[1].m_w;
-		m_hmdSize.m_h = bx::uint32_max(m_desc.m_eyeSize[0].m_h, m_desc.m_eyeSize[1].m_h);
-		return true;
-	}
-
-	void VR::connectFailed()
-	{
-		// sane defaults
-		m_desc.m_deviceSize.m_w = 2160;
-		m_desc.m_deviceSize.m_h = 1200;
-		m_desc.m_deviceType     = 0;
-		m_desc.m_refreshRate    = 90.0f;
-		m_desc.m_neckOffset[0]  = 0.0805f;
-		m_desc.m_neckOffset[1]  = 0.075f;
-
-		for (int eye = 0; eye < 2; ++eye)
-		{
-			m_desc.m_eyeFov[eye].m_up   = 1.32928634f;
-			m_desc.m_eyeFov[eye].m_down = 1.32928634f;
-		}
-
-		m_desc.m_eyeFov[0].m_left  = 1.05865765f;
-		m_desc.m_eyeFov[0].m_right = 1.09236801f;
-		m_desc.m_eyeFov[1].m_left  = 1.09236801f;
-		m_desc.m_eyeFov[1].m_right = 1.05865765f;
-	}
-
-} // namesapce bgfx

+ 0 - 102
bgfx.mod/bgfx/src/hmd.h

@@ -1,102 +0,0 @@
-/*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
- */
-
-#ifndef BGFX_HMD_H_HEADER_GUARD
-#define BGFX_HMD_H_HEADER_GUARD
-
-#include "bgfx_p.h"
-
-namespace bgfx
-{
-	struct VRSize
-	{
-		uint32_t m_w;
-		uint32_t m_h;
-	};
-
-	struct VRFovTan
-	{
-		float m_up;
-		float m_down;
-		float m_left;
-		float m_right;
-	};
-
-	struct VRDesc
-	{
-		uint32_t m_deviceType;
-		float m_refreshRate;
-		VRSize m_deviceSize;
-		VRSize m_eyeSize[2];
-		VRFovTan m_eyeFov[2];
-		float m_neckOffset[2];
-	};
-
-	struct BX_NO_VTABLE VRImplI
-	{
-		virtual ~VRImplI() = 0;
-
-		virtual bool init() = 0;
-		virtual void shutdown() = 0;
-		virtual void connect(VRDesc* _desc) = 0;
-		virtual void disconnect() = 0;
-		virtual bool isConnected() const = 0;
-
-		virtual bool updateTracking(HMD& _hmd) = 0;
-		virtual void updateInput(HMD& _hmd) = 0;
-		virtual void recenter() = 0;
-
-		virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight) = 0;
-		virtual void destroySwapChain() = 0;
-		virtual void destroyMirror() = 0;
-		virtual void makeRenderTargetActive(const VRDesc& _desc) = 0;
-		virtual bool submitSwapChain(const VRDesc& _desc) = 0;
-	};
-
-	inline VRImplI::~VRImplI()
-	{
-	}
-
-	class VR
-	{
-	public:
-		VR();
-
-		void init(VRImplI* _impl);
-		void shutdown();
-
-		bool isInitialized() const
-		{
-			return NULL != m_impl;
-		}
-
-		bool isEnabled() const
-		{
-			return m_enabled;
-		}
-
-		void getViewport(uint8_t _eye, Rect* _viewport) const;
-		void makeRenderTargetActive();
-		void recenter();
-
-		void preReset();
-		void postReset(int _msaaSamples, int _mirrorWidth, int _mirrorHeight);
-		void flip();
-		void swap(HMD& _hmd);
-
-	private:
-		bool tryReconnect();
-		void connectFailed();
-
-		VRImplI* m_impl;
-		VRDesc m_desc;
-		VRSize m_hmdSize;
-		uint32_t m_framesUntilReconnect;
-		bool m_enabled;
-	};
-
-} // namespace bgfx
-
-#endif // BGFX_HMD_H_HEADER_GUARD

+ 0 - 95
bgfx.mod/bgfx/src/hmd_openvr.cpp

@@ -1,95 +0,0 @@
-/*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
- */
-
-#include "hmd_openvr.h"
-
-BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-variable")
-#include <openvr/openvr_capi.h>
-
-namespace bgfx
-{
-#if BX_PLATFORM_WINDOWS
-#	define VR_CALLTYPE __cdecl
-#else
-#	define VR_CALLTYPE
-#endif
-
-	typedef uint32_t    (VR_CALLTYPE *PFN_VR_INITINTERNAL)(EVRInitError* peError, EVRApplicationType eType);
-	typedef void        (VR_CALLTYPE *PFN_VR_SHUTDOWNINTERNAL)();
-	typedef bool        (VR_CALLTYPE *PFN_VR_ISHMDPRESENT)();
-	typedef void*       (VR_CALLTYPE *PFN_VR_GETGENERICINTERFACE)(const char* pchInterfaceVersion, EVRInitError* peError);
-	typedef bool        (VR_CALLTYPE *PFN_VR_ISRUNTIMEINSTALLED)();
-	typedef bool        (VR_CALLTYPE *PFN_VR_ISINTERFACEVERSIONVALID)(const char *pchInterfaceVersion);
-	typedef uint32_t    (VR_CALLTYPE *PFN_VR_GETINITTOKEN)();
-	typedef const char* (VR_CALLTYPE *PFN_VR_GETVRINITERRORASSYMBOL)(EVRInitError error);
-	typedef const char* (VR_CALLTYPE *PFN_VR_GETVRINITERRORASENGLISHDESCRIPTION)(EVRInitError error);
-
-	PFN_VR_INITINTERNAL                       VR_InitInternal;
-	PFN_VR_SHUTDOWNINTERNAL                   VR_ShutdownInternal;
-	PFN_VR_ISHMDPRESENT                       VR_IsHmdPresent;
-	PFN_VR_GETGENERICINTERFACE                VR_GetGenericInterface;
-	PFN_VR_ISRUNTIMEINSTALLED                 VR_IsRuntimeInstalled;
-	PFN_VR_ISINTERFACEVERSIONVALID            VR_IsInterfaceVersionValid;
-	PFN_VR_GETINITTOKEN                       VR_GetInitToken;
-	PFN_VR_GETVRINITERRORASSYMBOL             VR_GetVRInitErrorAsSymbol;
-	PFN_VR_GETVRINITERRORASENGLISHDESCRIPTION VR_GetVRInitErrorAsEnglishDescription;
-
-	void* loadOpenVR()
-	{
-		void* openvrdll = bx::dlopen(
-#if BX_PLATFORM_LINUX
-			"libopenvr_api.so"
-#elif BX_PLATFORM_OSX
-			"libopenvr_api.dylib"
-#else
-			"openvr_api.dll"
-#endif // BX_PLATFORM_*
-			);
-		if (NULL != openvrdll)
-		{
-			VR_InitInternal            = (PFN_VR_INITINTERNAL           )bx::dlsym(openvrdll, "VR_InitInternal");
-			VR_ShutdownInternal        = (PFN_VR_SHUTDOWNINTERNAL       )bx::dlsym(openvrdll, "VR_ShutdownInternal");
-			VR_IsHmdPresent            = (PFN_VR_ISHMDPRESENT           )bx::dlsym(openvrdll, "VR_IsHmdPresent");
-			VR_GetGenericInterface     = (PFN_VR_GETGENERICINTERFACE    )bx::dlsym(openvrdll, "VR_GetGenericInterface");
-			VR_IsRuntimeInstalled      = (PFN_VR_ISRUNTIMEINSTALLED     )bx::dlsym(openvrdll, "VR_IsRuntimeInstalled");
-			VR_IsInterfaceVersionValid = (PFN_VR_ISINTERFACEVERSIONVALID)bx::dlsym(openvrdll, "VR_IsInterfaceVersionValid");
-			VR_GetInitToken            = (PFN_VR_GETINITTOKEN           )bx::dlsym(openvrdll, "VR_GetInitToken");
-			VR_GetVRInitErrorAsSymbol             = (PFN_VR_GETVRINITERRORASSYMBOL            )bx::dlsym(openvrdll, "VR_GetVRInitErrorAsSymbol");
-			VR_GetVRInitErrorAsEnglishDescription = (PFN_VR_GETVRINITERRORASENGLISHDESCRIPTION)bx::dlsym(openvrdll, "VR_GetVRInitErrorAsEnglishDescription");
-
-			if (NULL == VR_InitInternal
-			||  NULL == VR_ShutdownInternal
-			||  NULL == VR_IsHmdPresent
-			||  NULL == VR_GetGenericInterface
-			||  NULL == VR_IsRuntimeInstalled
-			||  NULL == VR_IsInterfaceVersionValid
-			||  NULL == VR_GetInitToken
-			||  NULL == VR_GetVRInitErrorAsSymbol
-			||  NULL == VR_GetVRInitErrorAsEnglishDescription)
-			{
-				bx::dlclose(openvrdll);
-				return NULL;
-			}
-
-			EVRInitError err;
-			uint32_t token = VR_InitInternal(&err, EVRApplicationType_VRApplication_Scene);
-			BX_UNUSED(token);
-
-			BX_TRACE("OpenVR: HMD is %spresent, Runtime is %sinstalled."
-				, VR_IsHmdPresent() ? "" : "not "
-				, VR_IsRuntimeInstalled() ? "" : "not "
-				);
-		}
-
-		return openvrdll;
-	}
-
-	void unloadOpenVR(void* _openvrdll)
-	{
-		VR_ShutdownInternal();
-		bx::dlclose(_openvrdll);
-	}
-
-} // namespace bgfx

+ 0 - 18
bgfx.mod/bgfx/src/hmd_openvr.h

@@ -1,18 +0,0 @@
-/*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
- */
-
-#ifndef BGFX_OPENVR_H_HEADER_GUARD
-#define BGFX_OPENVR_H_HEADER_GUARD
-
-#include "bgfx_p.h"
-
-namespace bgfx
-{
-	void* loadOpenVR();
-	void unloadOpenVR(void*);
-
-} // namespace bgfx
-
-#endif // BGFX_OPENVR_H_HEADER_GUARD

+ 0 - 210
bgfx.mod/bgfx/src/hmd_ovr.cpp

@@ -1,210 +0,0 @@
-/*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
- */
-
-#include "bgfx_p.h"
-
-#if BGFX_CONFIG_USE_OVR
-
-#include "hmd_ovr.h"
-
-namespace bgfx
-{
-#define _OVR_CHECK(_call) \
-			BX_MACRO_BLOCK_BEGIN \
-				ovrResult __result__ = _call; \
-				BX_CHECK(OVR_SUCCESS(__result__), #_call " FAILED %d", __result__); \
-			BX_MACRO_BLOCK_END
-
-#if BGFX_CONFIG_DEBUG
-#	define OVR_CHECK(_call) _OVR_CHECK(_call)
-#else
-#	define OVR_CHECK(_call) _call
-#endif // BGFX_CONFIG_DEBUG
-
-	VRImplOVR::VRImplOVR()
-		: m_session(NULL)
-	{
-	}
-
-	VRImplOVR::~VRImplOVR()
-	{
-		if (NULL != g_platformData.session)
-		{
-			return;
-		}
-
-		BX_CHECK(NULL == m_session, "OVR not shutdown properly.");
-	}
-
-	bool VRImplOVR::init()
-	{
-		if (NULL != g_platformData.session)
-		{
-			return true;
-		}
-
-		ovrResult initialized = ovr_Initialize(NULL);
-		if (!OVR_SUCCESS(initialized))
-		{
-			BX_TRACE("Unable to initialize OVR runtime.");
-			return false;
-		}
-
-		return true;
-	}
-
-	void VRImplOVR::shutdown()
-	{
-		if (NULL != g_platformData.session)
-		{
-			return;
-		}
-
-		ovr_Shutdown();
-	}
-
-	void VRImplOVR::connect(VRDesc* _desc)
-	{
-		if (NULL == g_platformData.session)
-		{
-			ovrGraphicsLuid luid;
-			ovrResult result = ovr_Create(&m_session, &luid);
-			if (!OVR_SUCCESS(result))
-			{
-				BX_TRACE("Failed to create OVR device.");
-				return;
-			}
-		}
-		else
-		{
-			m_session = (ovrSession)g_platformData.session;
-		}
-
-		ovrHmdDesc hmdDesc = ovr_GetHmdDesc(m_session);
-		_desc->m_deviceType = hmdDesc.Type;
-		_desc->m_refreshRate = hmdDesc.DisplayRefreshRate;
-		_desc->m_deviceSize.m_w = hmdDesc.Resolution.w;
-		_desc->m_deviceSize.m_h = hmdDesc.Resolution.h;
-
-		BX_TRACE("OVR HMD: %s, %s, firmware: %d.%d"
-			, hmdDesc.ProductName
-			, hmdDesc.Manufacturer
-			, hmdDesc.FirmwareMajor
-			, hmdDesc.FirmwareMinor
-			);
-
-		ovrSizei eyeSize[2] =
-		{
-			ovr_GetFovTextureSize(m_session, ovrEye_Left, hmdDesc.DefaultEyeFov[0], 1.0f),
-			ovr_GetFovTextureSize(m_session, ovrEye_Right, hmdDesc.DefaultEyeFov[0], 1.0f),
-		};
-
-		for (int eye = 0; eye < 2; ++eye)
-		{
-			BX_STATIC_ASSERT(sizeof(_desc->m_eyeFov[eye]) == sizeof(hmdDesc.DefaultEyeFov[eye]));
-			bx::memCopy(&_desc->m_eyeFov[eye], &hmdDesc.DefaultEyeFov[eye], sizeof(_desc->m_eyeFov[eye]));
-			_desc->m_eyeSize[eye].m_w = eyeSize[eye].w;
-			_desc->m_eyeSize[eye].m_h = eyeSize[eye].h;
-		}
-
-		float neckOffset[2] = {OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL, OVR_DEFAULT_NECK_TO_EYE_VERTICAL};
-		ovr_GetFloatArray(m_session, OVR_KEY_NECK_TO_EYE_DISTANCE, neckOffset, 2);
-		_desc->m_neckOffset[0] = neckOffset[0];
-		_desc->m_neckOffset[1] = neckOffset[1];
-
-		// build constant layer settings
-		m_renderLayer.Header.Type = ovrLayerType_EyeFov;
-		m_renderLayer.Header.Flags = 0;
-		m_renderLayer.Fov[0] = hmdDesc.DefaultEyeFov[0];
-		m_renderLayer.Fov[1] = hmdDesc.DefaultEyeFov[1];
-		m_renderLayer.Viewport[0].Pos.x = 0;
-		m_renderLayer.Viewport[0].Pos.y = 0;
-		m_renderLayer.Viewport[0].Size.w = _desc->m_eyeSize[0].m_w;
-		m_renderLayer.Viewport[0].Size.h = _desc->m_eyeSize[0].m_h;
-		m_renderLayer.Viewport[1].Pos.x = _desc->m_eyeSize[0].m_w+1;
-		m_renderLayer.Viewport[1].Pos.y = 0;
-		m_renderLayer.Viewport[1].Size.w = _desc->m_eyeSize[1].m_w;
-		m_renderLayer.Viewport[1].Size.h = _desc->m_eyeSize[1].m_h;
-
-		m_viewScale.HmdSpaceToWorldScaleInMeters = 1.0f;
-		for (int eye = 0; eye < 2; ++eye)
-		{
-			ovrEyeRenderDesc erd = ovr_GetRenderDesc(m_session, static_cast<ovrEyeType>(eye), hmdDesc.DefaultEyeFov[eye]);
-			m_viewScale.HmdToEyeOffset[eye] = erd.HmdToEyeOffset;
-			m_eyeFov[eye] = erd.Fov;
-			m_pixelsPerTanAngleAtCenter[eye] = erd.PixelsPerTanAngleAtCenter;
-		}
-	}
-
-	void VRImplOVR::disconnect()
-	{
-		if (NULL != g_platformData.session)
-		{
-			return;
-		}
-
-		if (NULL != m_session)
-		{
-			ovr_Destroy(m_session);
-			m_session = NULL;
-		}
-	}
-
-	bool VRImplOVR::updateTracking(HMD& _hmd)
-	{
-		if (NULL == m_session)
-		{
-			return false;
-		}
-
-		ovr_GetEyePoses(m_session, 0, ovrTrue, m_viewScale.HmdToEyeOffset, m_renderLayer.RenderPose, &m_renderLayer.SensorSampleTime);
-
-		for (int eye = 0; eye < 2; ++eye)
-		{
-			const ovrPosef& pose = m_renderLayer.RenderPose[eye];
-			HMD::Eye& hmdEye = _hmd.eye[eye];
-
-			hmdEye.rotation[0] = pose.Orientation.x;
-			hmdEye.rotation[1] = pose.Orientation.y;
-			hmdEye.rotation[2] = pose.Orientation.z;
-			hmdEye.rotation[3] = pose.Orientation.w;
-			hmdEye.translation[0] = pose.Position.x;
-			hmdEye.translation[1] = pose.Position.y;
-			hmdEye.translation[2] = pose.Position.z;
-			hmdEye.viewOffset[0] = -m_viewScale.HmdToEyeOffset[eye].x;
-			hmdEye.viewOffset[1] = -m_viewScale.HmdToEyeOffset[eye].y;
-			hmdEye.viewOffset[2] = -m_viewScale.HmdToEyeOffset[eye].z;
-
-			hmdEye.pixelsPerTanAngle[0] = m_pixelsPerTanAngleAtCenter[eye].x;
-			hmdEye.pixelsPerTanAngle[1] = m_pixelsPerTanAngleAtCenter[eye].y;
-
-			ovrMatrix4f projection = ovrMatrix4f_Projection(m_eyeFov[eye], 0.1f, 1000.0f, ovrProjection_LeftHanded);
-			for (uint32_t ii = 0; ii < 4; ++ii)
-			{
-				for (uint32_t jj = 0; jj < 4; ++jj)
-				{
-					hmdEye.projection[4*ii + jj] = projection.M[jj][ii];
-				}
-			}
-		}
-
-		return true;
-	}
-
-	void VRImplOVR::updateInput(HMD& /* _hmd */)
-	{
-	}
-
-	void VRImplOVR::recenter()
-	{
-		if (NULL != m_session)
-		{
-			ovr_RecenterTrackingOrigin(m_session);
-		}
-	}
-
-} // namespace bgfx
-
-#endif // BGFX_CONFIG_USE_OVR

+ 0 - 70
bgfx.mod/bgfx/src/hmd_ovr.h

@@ -1,70 +0,0 @@
-/*
- * Copyright 2011-2018 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
- */
-
-#ifndef BGFX_OVR_H_HEADER_GUARD
-#define BGFX_OVR_H_HEADER_GUARD
-
-#include "bgfx_p.h"
-
-#if BGFX_CONFIG_USE_OVR
-
-#	include "hmd.h"
-#	include <OVR_Version.h>
-
-#	define OVR_VERSION_(_a, _b, _c) (_a * 10000 + _b * 100 + _c)
-#	define OVR_VERSION     OVR_VERSION_(OVR_PRODUCT_VERSION, OVR_MAJOR_VERSION, OVR_MINOR_VERSION)
-
-#	include <OVR_CAPI.h>
-
-#	if BGFX_CONFIG_RENDERER_DIRECT3D11
-#		include <OVR_CAPI_D3D.h>
-#	endif // BGFX_CONFIG_RENDERER_DIRECT3D11
-
-#	if BGFX_CONFIG_RENDERER_OPENGL
-#		include <OVR_CAPI_GL.h>
-#	endif // BGFX_CONFIG_RENDERER_OPENGL
-
-
-namespace bgfx
-{
-	class VRImplOVR : public VRImplI
-	{
-	public:
-		VRImplOVR();
-		virtual ~VRImplOVR() = 0;
-
-		virtual bool init() override;
-		virtual void shutdown() override;
-		virtual void connect(VRDesc* _desc) override;
-		virtual void disconnect() override;
-
-		virtual bool isConnected() const override
-		{
-			return NULL != m_session;
-		}
-
-		virtual bool updateTracking(HMD& _hmd) override;
-		virtual void updateInput(HMD& _hmd) override;
-		virtual void recenter() override;
-
-		virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight) override = 0;
-		virtual void destroySwapChain() override = 0;
-		virtual void destroyMirror() override = 0;
-		virtual void makeRenderTargetActive(const VRDesc& _desc) override = 0;
-		virtual bool submitSwapChain(const VRDesc& _desc) override = 0;
-
-	protected:
-		ovrSession m_session;
-		ovrLayerEyeFov m_renderLayer;
-		ovrViewScaleDesc m_viewScale;
-		ovrFovPort m_eyeFov[2];
-		ovrVector2f m_pixelsPerTanAngleAtCenter[2];
-	};
-
-} // namespace bgfx
-
-#endif // BGFX_CONFIG_USE_OVR
-
-#endif // BGFX_OVR_H_HEADER_GUARD

+ 96 - 31
bgfx.mod/bgfx/src/nvapi.cpp

@@ -11,9 +11,9 @@ namespace bgfx
 	/*
 	 * NVAPI
 	 *
-	 * Reference:
-	 * http://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/index.html
-	 * https://github.com/jNizM/AHK_NVIDIA_NvAPI/blob/master/info/NvAPI_IDs.txt
+	 * Reference(s):
+	 * - https://web.archive.org/web/20181126035649/https://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/index.html
+	 * - https://web.archive.org/web/20181126035710/https://github.com/jNizM/AHK_NVIDIA_NvAPI/blob/master/info/NvAPI_IDs.txt
 	 */
 
 	struct NvPhysicalGpuHandle;
@@ -72,10 +72,12 @@ namespace bgfx
 	/*
 	 * NVIDIA Aftermath
 	 *
-	 * Reference:
-	 * https://developer.nvidia.com/nvidia-aftermath
+	 * Reference(s):
+	 * - https://web.archive.org/web/20181126035743/https://developer.nvidia.com/nvidia-aftermath
 	 */
 
+	typedef int32_t (*PFN_NVAFTERMATH_DX11_INITIALIZE)(int32_t _version, int32_t _flags, const ID3D11Device* _device);
+	typedef int32_t (*PFN_NVAFTERMATH_DX11_CREATECONTEXTHANDLE)(const ID3D11DeviceContext* _deviceCtx, NvAftermathContextHandle** _outContextHandle);
 	typedef int32_t (*PFN_NVAFTERMATH_DX12_INITIALIZE)(int32_t _version, int32_t _flags, const ID3D12Device* _device);
 	typedef int32_t (*PFN_NVAFTERMATH_DX12_CREATECONTEXTHANDLE)(const ID3D12CommandList* _commandList, NvAftermathContextHandle** _outContextHandle);
 	typedef int32_t (*PFN_NVAFTERMATH_RELEASECONTEXTHANDLE)(const NvAftermathContextHandle* _contextHandle);
@@ -84,6 +86,8 @@ namespace bgfx
 	typedef int32_t (*PFN_NVAFTERMATH_GETDEVICESTATUS)(void* _outStatus);
 	typedef int32_t (*PFN_NVAFTERMATH_GETPAGEFAULTINFORMATION)(void* _outPageFaultInformation);
 
+	static PFN_NVAFTERMATH_DX11_INITIALIZE          nvAftermathDx11Initialize;
+	static PFN_NVAFTERMATH_DX11_CREATECONTEXTHANDLE nvAftermathDx11CreateContextHandle;
 	static PFN_NVAFTERMATH_DX12_INITIALIZE          nvAftermathDx12Initialize;
 	static PFN_NVAFTERMATH_DX12_CREATECONTEXTHANDLE nvAftermathDx12CreateContextHandle;
 	static PFN_NVAFTERMATH_RELEASECONTEXTHANDLE     nvAftermathReleaseContextHandle;
@@ -147,18 +151,19 @@ namespace bgfx
 					if (initialized)
 					{
 						m_nvGpu = physicalGpus[0];
-					}
-
-					char name[64];
-					nvApiGpuGetFullName(m_nvGpu, name);
-					BX_TRACE("%s", name);
-				}
-
-				initialized = NULL != m_nvGpu;
 
-				if (!initialized)
-				{
-					nvApiUnload();
+						initialized = NULL != m_nvGpu;
+						if (initialized)
+						{
+							char name[64];
+							nvApiGpuGetFullName(m_nvGpu, name);
+							BX_TRACE("%s", name);
+						}
+						else
+						{
+							nvApiUnload();
+						}
+					}
 				}
 			}
 
@@ -213,7 +218,7 @@ namespace bgfx
 		}
 	}
 
-	bool NvApi::initAftermath(const ID3D12Device* _device, const ID3D12CommandList* _commandList)
+	bool NvApi::loadAftermath()
 	{
 		m_nvAftermathDll = bx::dlopen(
 			"GFSDK_Aftermath_Lib."
@@ -227,6 +232,8 @@ namespace bgfx
 
 		if (NULL != m_nvAftermathDll)
 		{
+			nvAftermathDx11Initialize          = (PFN_NVAFTERMATH_DX11_INITIALIZE         )bx::dlsym(m_nvAftermathDll, "GFSDK_Aftermath_DX11_Initialize");
+			nvAftermathDx11CreateContextHandle = (PFN_NVAFTERMATH_DX11_CREATECONTEXTHANDLE)bx::dlsym(m_nvAftermathDll, "GFSDK_Aftermath_DX11_CreateContextHandle");
 			nvAftermathDx12Initialize          = (PFN_NVAFTERMATH_DX12_INITIALIZE         )bx::dlsym(m_nvAftermathDll, "GFSDK_Aftermath_DX12_Initialize");
 			nvAftermathDx12CreateContextHandle = (PFN_NVAFTERMATH_DX12_CREATECONTEXTHANDLE)bx::dlsym(m_nvAftermathDll, "GFSDK_Aftermath_DX12_CreateContextHandle");
 			nvAftermathReleaseContextHandle	   = (PFN_NVAFTERMATH_RELEASECONTEXTHANDLE    )bx::dlsym(m_nvAftermathDll, "GFSDK_Aftermath_ReleaseContextHandle");
@@ -236,6 +243,8 @@ namespace bgfx
 			nvAftermathGetPageFaultInformation = (PFN_NVAFTERMATH_GETPAGEFAULTINFORMATION )bx::dlsym(m_nvAftermathDll, "GFSDK_Aftermath_GetPageFaultInformation");
 
 			bool initialized = true
+				&& NULL != nvAftermathDx11Initialize
+				&& NULL != nvAftermathDx11CreateContextHandle
 				&& NULL != nvAftermathDx12Initialize
 				&& NULL != nvAftermathDx12CreateContextHandle
 				&& NULL != nvAftermathReleaseContextHandle
@@ -247,25 +256,68 @@ namespace bgfx
 
 			if (initialized)
 			{
-				int32_t result;
-				result = nvAftermathDx12Initialize(0x13, 1, _device);
+				return true;
+			}
+
+			shutdownAftermath();
+		}
+
+		return false;
+	}
+
+	bool NvApi::initAftermath(const ID3D11Device* _device, const ID3D11DeviceContext* _deviceCtx)
+	{
+		if (loadAftermath() )
+		{
+			int32_t result;
+			result = nvAftermathDx11Initialize(0x13, 1, _device);
+			if (1 == result)
+			{
+				result = nvAftermathDx11CreateContextHandle(_deviceCtx, &m_aftermathHandle);
+				BX_WARN(1 == result, "NV Aftermath: nvAftermathDx12CreateContextHandle failed %x", result);
+
 				if (1 == result)
 				{
-					result = nvAftermathDx12CreateContextHandle(_commandList, &m_aftermathHandle);
-					BX_WARN(1 == result, "NV Aftermath: nvAftermathDx12CreateContextHandle failed %x", result);
+					return true;
+				}
+			}
+			else
+			{
+				switch (result)
+				{
+				case int32_t(0xbad0000a): BX_TRACE("NV Aftermath: Debug layer not compatible with Aftermath."); break;
+				default:                  BX_TRACE("NV Aftermath: Failed to initialize."); break;
+				}
+			}
 
-					if (1 == result)
-					{
-						return true;
-					}
+			shutdownAftermath();
+		}
+
+		return false;
+	}
+
+	bool NvApi::initAftermath(const ID3D12Device* _device, const ID3D12CommandList* _commandList)
+	{
+		if (loadAftermath() )
+		{
+			int32_t result;
+			result = nvAftermathDx12Initialize(0x13, 1, _device);
+			if (1 == result)
+			{
+				result = nvAftermathDx12CreateContextHandle(_commandList, &m_aftermathHandle);
+				BX_WARN(1 == result, "NV Aftermath: nvAftermathDx12CreateContextHandle failed %x", result);
+
+				if (1 == result)
+				{
+					return true;
 				}
-				else
+			}
+			else
+			{
+				switch (result)
 				{
-					switch (result)
-					{
-					case int32_t(0xbad0000a): BX_TRACE("NV Aftermath: Debug layer not compatible with Aftermath."); break;
-					default:                  BX_TRACE("NV Aftermath: Failed to initialize."); break;
-					}
+				case int32_t(0xbad0000a): BX_TRACE("NV Aftermath: Debug layer not compatible with Aftermath."); break;
+				default:                  BX_TRACE("NV Aftermath: Failed to initialize."); break;
 				}
 			}
 
@@ -275,6 +327,19 @@ namespace bgfx
 		return false;
 	}
 
+	NvAftermathDeviceStatus::Enum NvApi::getDeviceStatus() const
+	{
+		if (NULL != m_aftermathHandle)
+		{
+			int32_t status;
+			nvAftermathGetDeviceStatus(&status);
+
+			return NvAftermathDeviceStatus::Enum(status);
+		}
+
+		return NvAftermathDeviceStatus::NotInitialized;
+	}
+
 	void NvApi::shutdownAftermath()
 	{
 		if (NULL != m_nvAftermathDll)

+ 24 - 1
bgfx.mod/bgfx/src/nvapi.h

@@ -6,6 +6,7 @@
 #ifndef BGFX_NVAPI_H_HEADER_GUARD
 #define BGFX_NVAPI_H_HEADER_GUARD
 
+struct ID3D11Device;
 struct ID3D11DeviceContext;
 struct ID3D11Buffer;
 struct ID3D12Device;
@@ -16,6 +17,19 @@ namespace bgfx
 	struct NvPhysicalGpuHandle;
 	struct NvAftermathContextHandle;
 
+	struct NvAftermathDeviceStatus
+	{
+		enum Enum
+		{
+			Active,
+			Timeout,
+			OutOfMemory,
+			PageFault,
+			Unknown,
+			NotInitialized
+		};
+	};
+
 	typedef void (*PFN_NVAPI_MULTIDRAWINDIRECT)(ID3D11DeviceContext* _deviceCtx, uint32_t _numDrawIndirect, ID3D11Buffer* _ptr, uint32_t _offset, uint32_t _stride);
 
 	///
@@ -35,10 +49,19 @@ namespace bgfx
 
 		///
 		void getMemoryInfo(int64_t& _gpuMemoryUsed, int64_t& _gpuMemoryMax);
-		
+
+		///
+		bool loadAftermath();
+
+		///
+		bool initAftermath(const ID3D11Device* _device, const ID3D11DeviceContext* _deviceCtx);
+
 		///
 		bool initAftermath(const ID3D12Device* _device, const ID3D12CommandList* _commandList);
 
+		///
+		NvAftermathDeviceStatus::Enum getDeviceStatus() const;
+
 		///
 		void shutdownAftermath();
 

+ 7 - 7
bgfx.mod/bgfx/src/renderer.h

@@ -47,12 +47,12 @@ namespace bgfx
 		{
 		}
 
-		ViewState(Frame* _frame, bool _hmdEnabled)
+		ViewState(Frame* _frame, bool _stereo)
 		{
-			reset(_frame, _hmdEnabled);
+			reset(_frame, _stereo);
 		}
 
-		void reset(Frame* _frame, bool _hmdEnabled)
+		void reset(Frame* _frame, bool _stereo)
 		{
 			m_alphaRef = 0.0f;
 			m_invViewCached = UINT16_MAX;
@@ -62,16 +62,15 @@ namespace bgfx
 			m_view[0] = m_viewTmp[0];
 			m_view[1] = m_viewTmp[1];
 
-			if (_hmdEnabled)
+			if (_stereo)
 			{
-				HMD& hmd = _frame->m_hmd;
-
 				m_view[0] = m_viewTmp[0];
 				Matrix4 viewAdjust;
 				bx::mtxIdentity(viewAdjust.un.val);
 
 				for (uint32_t eye = 0; eye < 2; ++eye)
 				{
+/*
 					const HMD::Eye& hmdEye = hmd.eye[eye];
 					viewAdjust.un.val[12] = hmdEye.viewOffset[0];
 					viewAdjust.un.val[13] = hmdEye.viewOffset[1];
@@ -91,6 +90,7 @@ namespace bgfx
 							bx::memCopy(&m_view[0][ii].un.f4x4, &_frame->m_view[ii].m_view.un.f4x4, sizeof(Matrix4) );
 						}
 					}
+*/
 				}
 			}
 			else
@@ -103,7 +103,7 @@ namespace bgfx
 
 			for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii)
 			{
-				for (uint32_t eye = 0; eye < uint32_t(_hmdEnabled)+1; ++eye)
+				for (uint32_t eye = 0; eye < uint32_t(_stereo)+1; ++eye)
 				{
 					bx::float4x4_mul(&m_viewProj[eye][ii].un.f4x4
 						, &m_view[eye][ii].un.f4x4

+ 46 - 2
bgfx.mod/bgfx/src/renderer_d3d.h

@@ -19,6 +19,49 @@
 #	define DX_CHECK_EXTRA_ARGS
 #endif // BGFX_CONFIG_DEBUG && BGFX_CONFIG_RENDERER_DIRECT3D9
 
+#define DXGI_FORMAT_ASTC_4X4_TYPELESS     DXGI_FORMAT(133)
+#define DXGI_FORMAT_ASTC_4X4_UNORM        DXGI_FORMAT(134)
+#define DXGI_FORMAT_ASTC_4X4_UNORM_SRGB   DXGI_FORMAT(135)
+#define DXGI_FORMAT_ASTC_5X4_TYPELESS     DXGI_FORMAT(137)
+#define DXGI_FORMAT_ASTC_5X4_UNORM        DXGI_FORMAT(138)
+#define DXGI_FORMAT_ASTC_5X4_UNORM_SRGB   DXGI_FORMAT(139)
+#define DXGI_FORMAT_ASTC_5X5_TYPELESS     DXGI_FORMAT(141)
+#define DXGI_FORMAT_ASTC_5X5_UNORM        DXGI_FORMAT(142)
+#define DXGI_FORMAT_ASTC_5X5_UNORM_SRGB   DXGI_FORMAT(143)
+#define DXGI_FORMAT_ASTC_6X5_TYPELESS     DXGI_FORMAT(145)
+#define DXGI_FORMAT_ASTC_6X5_UNORM        DXGI_FORMAT(146)
+#define DXGI_FORMAT_ASTC_6X5_UNORM_SRGB   DXGI_FORMAT(147)
+#define DXGI_FORMAT_ASTC_6X6_TYPELESS     DXGI_FORMAT(149)
+#define DXGI_FORMAT_ASTC_6X6_UNORM        DXGI_FORMAT(150)
+#define DXGI_FORMAT_ASTC_6X6_UNORM_SRGB   DXGI_FORMAT(151)
+#define DXGI_FORMAT_ASTC_8X5_TYPELESS     DXGI_FORMAT(153)
+#define DXGI_FORMAT_ASTC_8X5_UNORM        DXGI_FORMAT(154)
+#define DXGI_FORMAT_ASTC_8X5_UNORM_SRGB   DXGI_FORMAT(155)
+#define DXGI_FORMAT_ASTC_8X6_TYPELESS     DXGI_FORMAT(157)
+#define DXGI_FORMAT_ASTC_8X6_UNORM        DXGI_FORMAT(158)
+#define DXGI_FORMAT_ASTC_8X6_UNORM_SRGB   DXGI_FORMAT(159)
+#define DXGI_FORMAT_ASTC_8X8_TYPELESS     DXGI_FORMAT(161)
+#define DXGI_FORMAT_ASTC_8X8_UNORM        DXGI_FORMAT(162)
+#define DXGI_FORMAT_ASTC_8X8_UNORM_SRGB   DXGI_FORMAT(163)
+#define DXGI_FORMAT_ASTC_10X5_TYPELESS    DXGI_FORMAT(165)
+#define DXGI_FORMAT_ASTC_10X5_UNORM       DXGI_FORMAT(166)
+#define DXGI_FORMAT_ASTC_10X5_UNORM_SRGB  DXGI_FORMAT(167)
+#define DXGI_FORMAT_ASTC_10X6_TYPELESS    DXGI_FORMAT(169)
+#define DXGI_FORMAT_ASTC_10X6_UNORM       DXGI_FORMAT(170)
+#define DXGI_FORMAT_ASTC_10X6_UNORM_SRGB  DXGI_FORMAT(171)
+#define DXGI_FORMAT_ASTC_10X8_TYPELESS    DXGI_FORMAT(173)
+#define DXGI_FORMAT_ASTC_10X8_UNORM       DXGI_FORMAT(174)
+#define DXGI_FORMAT_ASTC_10X8_UNORM_SRGB  DXGI_FORMAT(175)
+#define DXGI_FORMAT_ASTC_10X10_TYPELESS   DXGI_FORMAT(177)
+#define DXGI_FORMAT_ASTC_10X10_UNORM      DXGI_FORMAT(178)
+#define DXGI_FORMAT_ASTC_10X10_UNORM_SRGB DXGI_FORMAT(179)
+#define DXGI_FORMAT_ASTC_12X10_TYPELESS   DXGI_FORMAT(181)
+#define DXGI_FORMAT_ASTC_12X10_UNORM      DXGI_FORMAT(182)
+#define DXGI_FORMAT_ASTC_12X10_UNORM_SRGB DXGI_FORMAT(183)
+#define DXGI_FORMAT_ASTC_12X12_TYPELESS   DXGI_FORMAT(185)
+#define DXGI_FORMAT_ASTC_12X12_UNORM      DXGI_FORMAT(186)
+#define DXGI_FORMAT_ASTC_12X12_UNORM_SRGB DXGI_FORMAT(187)
+
 namespace bgfx
 {
 	constexpr uint32_t toRgba8(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a)
@@ -79,7 +122,8 @@ namespace bgfx
 #endif // BGFX_CONFIG_DEBUG_OBJECT_NAME
 
 #define DX_RELEASE(_ptr, _expected) _DX_RELEASE(_ptr, _expected, BX_CHECK)
-#define DX_RELEASE_WARNONLY(_ptr, _expected) _DX_RELEASE(_ptr, _expected, BX_WARN)
+#define DX_RELEASE_W(_ptr, _expected) _DX_RELEASE(_ptr, _expected, BX_WARN)
+#define DX_RELEASE_I(_ptr) _DX_RELEASE(_ptr, 0, BX_NOOP)
 
 	typedef int     (WINAPI* PFN_D3DPERF_BEGIN_EVENT)(DWORD _color, LPCWSTR _name);
 	typedef int     (WINAPI* PFN_D3DPERF_END_EVENT)();
@@ -161,7 +205,7 @@ namespace bgfx
 			typename HashMap::iterator it = m_hashMap.find(_key);
 			if (it != m_hashMap.end() )
 			{
-				DX_RELEASE_WARNONLY(it->second, 0);
+				DX_RELEASE_W(it->second, 0);
 				m_hashMap.erase(it);
 			}
 		}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 297 - 276
bgfx.mod/bgfx/src/renderer_d3d11.cpp


+ 6 - 6
bgfx.mod/bgfx/src/renderer_d3d11.h

@@ -36,8 +36,6 @@ BX_PRAGMA_DIAGNOSTIC_POP()
 #include "renderer.h"
 #include "renderer_d3d.h"
 #include "shader_dxbc.h"
-#include "hmd.h"
-#include "hmd_openvr.h"
 #include "debug_renderdoc.h"
 #include "nvapi.h"
 #include "dxgi.h"
@@ -266,12 +264,12 @@ namespace bgfx { namespace d3d11
 		{
 		}
 
-		void* create(const Memory* _mem, uint32_t _flags, uint8_t _skip);
+		void* create(const Memory* _mem, uint64_t _flags, uint8_t _skip);
 		void destroy();
 		void overrideInternal(uintptr_t _ptr);
 		void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem);
 		void commit(uint8_t _stage, uint32_t _flags, const float _palette[][4]);
-		void resolve() const;
+		void resolve(uint8_t _resolve) const;
 		TextureHandle getHandle() const;
 		DXGI_FORMAT getSrvFormat() const;
 
@@ -292,7 +290,7 @@ namespace bgfx { namespace d3d11
 
 		ID3D11ShaderResourceView*  m_srv;
 		ID3D11UnorderedAccessView* m_uav;
-		uint32_t m_flags;
+		uint64_t m_flags;
 		uint32_t m_width;
 		uint32_t m_height;
 		uint32_t m_depth;
@@ -307,6 +305,7 @@ namespace bgfx { namespace d3d11
 		FrameBufferD3D11()
 			: m_dsv(NULL)
 			, m_swapChain(NULL)
+			, m_nwh(NULL)
 			, m_width(0)
 			, m_height(0)
 			, m_denseIdx(UINT16_MAX)
@@ -317,7 +316,7 @@ namespace bgfx { namespace d3d11
 		}
 
 		void create(uint8_t _num, const Attachment* _attachment);
-		void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat);
+		void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat);
 		uint16_t destroy();
 		void preReset(bool _force = false);
 		void postReset();
@@ -330,6 +329,7 @@ namespace bgfx { namespace d3d11
 		ID3D11ShaderResourceView* m_srv[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS-1];
 		ID3D11DepthStencilView* m_dsv;
 		Dxgi::SwapChainI* m_swapChain;
+		void* m_nwh;
 		uint32_t m_width;
 		uint32_t m_height;
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 378 - 285
bgfx.mod/bgfx/src/renderer_d3d12.cpp


+ 4 - 4
bgfx.mod/bgfx/src/renderer_d3d12.h

@@ -311,10 +311,10 @@ namespace bgfx { namespace d3d12
 			bx::memSet(&m_uavd, 0, sizeof(m_uavd) );
 		}
 
-		void* create(const Memory* _mem, uint32_t _flags, uint8_t _skip);
+		void* create(const Memory* _mem, uint64_t _flags, uint8_t _skip);
 		void destroy();
 		void update(ID3D12GraphicsCommandList* _commandList, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem);
-		void resolve();
+		void resolve(uint8_t _resolve) const;
 		D3D12_RESOURCE_STATES setState(ID3D12GraphicsCommandList* _commandList, D3D12_RESOURCE_STATES _state);
 
 		D3D12_SHADER_RESOURCE_VIEW_DESC  m_srvd;
@@ -322,7 +322,7 @@ namespace bgfx { namespace d3d12
 		ID3D12Resource* m_ptr;
 		void* m_directAccessPtr;
 		D3D12_RESOURCE_STATES m_state;
-		uint32_t m_flags;
+		uint64_t m_flags;
 		uint32_t m_width;
 		uint32_t m_height;
 		uint32_t m_depth;
@@ -350,7 +350,7 @@ namespace bgfx { namespace d3d12
 		}
 
 		void create(uint8_t _num, const Attachment* _attachment);
-		void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat);
+		void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat);
 		uint16_t destroy();
 		HRESULT present(uint32_t _syncInterval, uint32_t _flags);
 		void preReset();

+ 96 - 70
bgfx.mod/bgfx/src/renderer_d3d9.cpp

@@ -180,6 +180,15 @@ namespace bgfx { namespace d3d9
 		{ D3DFMT_UNKNOWN       }, // PTC14A
 		{ D3DFMT_UNKNOWN       }, // PTC22
 		{ D3DFMT_UNKNOWN       }, // PTC24
+		{ D3DFMT_UNKNOWN       }, // ATC,
+		{ D3DFMT_UNKNOWN       }, // ATCE,
+		{ D3DFMT_UNKNOWN       }, // ATCI,
+		{ D3DFMT_UNKNOWN       }, // ASTC4x4,
+		{ D3DFMT_UNKNOWN       }, // ASTC5x5,
+		{ D3DFMT_UNKNOWN       }, // ASTC6x6,
+		{ D3DFMT_UNKNOWN       }, // ASTC8x5,
+		{ D3DFMT_UNKNOWN       }, // ASTC8x6,
+		{ D3DFMT_UNKNOWN       }, // ASTC10x5,
 		{ D3DFMT_UNKNOWN       }, // Unknown
 		{ D3DFMT_A1            }, // R1
 		{ D3DFMT_A8            }, // A8
@@ -416,8 +425,8 @@ namespace bgfx { namespace d3d9
 			m_params.BackBufferWidth  = _init.resolution.width;
 			m_params.BackBufferHeight = _init.resolution.height;
 			m_params.BackBufferFormat = adapterFormat;
-			m_params.BackBufferCount = 1;
-			m_params.MultiSampleType = D3DMULTISAMPLE_NONE;
+			m_params.BackBufferCount  = bx::clamp<uint8_t>(_init.resolution.numBackBuffers, 2, BGFX_CONFIG_MAX_BACK_BUFFERS);
+			m_params.MultiSampleType  = D3DMULTISAMPLE_NONE;
 			m_params.MultiSampleQuality = 0;
 			m_params.EnableAutoDepthStencil = TRUE;
 			m_params.AutoDepthStencilFormat = D3DFMT_D24S8;
@@ -434,9 +443,9 @@ namespace bgfx { namespace d3d9
 			m_params.BackBufferWidth  = rect.right-rect.left;
 			m_params.BackBufferHeight = rect.bottom-rect.top;
 
-			m_d3d9dll = bx::dlopen("d3d9.dll");
+			m_d3d9Dll = bx::dlopen("d3d9.dll");
 
-			if (NULL == m_d3d9dll)
+			if (NULL == m_d3d9Dll)
 			{
 				BX_TRACE("Init error: Failed to load d3d9.dll.");
 				goto error;
@@ -448,9 +457,9 @@ namespace bgfx { namespace d3d9
 
 			if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) )
 			{
-				D3DPERF_SetMarker  = (PFN_D3DPERF_SET_MARKER )bx::dlsym(m_d3d9dll, "D3DPERF_SetMarker");
-				D3DPERF_BeginEvent = (PFN_D3DPERF_BEGIN_EVENT)bx::dlsym(m_d3d9dll, "D3DPERF_BeginEvent");
-				D3DPERF_EndEvent   = (PFN_D3DPERF_END_EVENT  )bx::dlsym(m_d3d9dll, "D3DPERF_EndEvent");
+				D3DPERF_SetMarker  = (PFN_D3DPERF_SET_MARKER )bx::dlsym(m_d3d9Dll, "D3DPERF_SetMarker");
+				D3DPERF_BeginEvent = (PFN_D3DPERF_BEGIN_EVENT)bx::dlsym(m_d3d9Dll, "D3DPERF_BeginEvent");
+				D3DPERF_EndEvent   = (PFN_D3DPERF_END_EVENT  )bx::dlsym(m_d3d9Dll, "D3DPERF_EndEvent");
 
 				BX_CHECK(NULL != D3DPERF_SetMarker
 					  && NULL != D3DPERF_BeginEvent
@@ -462,7 +471,7 @@ namespace bgfx { namespace d3d9
 			m_d3d9ex   = NULL;
 			m_deviceEx = NULL;
 
-			Direct3DCreate9Ex = (Direct3DCreate9ExFn)bx::dlsym(m_d3d9dll, "Direct3DCreate9Ex");
+			Direct3DCreate9Ex = (Direct3DCreate9ExFn)bx::dlsym(m_d3d9Dll, "Direct3DCreate9Ex");
 			if (BX_ENABLED(BGFX_CONFIG_RENDERER_DIRECT3D9EX)
 			&&  NULL != Direct3DCreate9Ex)
 			{
@@ -484,7 +493,7 @@ namespace bgfx { namespace d3d9
 
 			if (NULL == m_d3d9)
 			{
-				Direct3DCreate9 = (Direct3DCreate9Fn)bx::dlsym(m_d3d9dll, "Direct3DCreate9");
+				Direct3DCreate9 = (Direct3DCreate9Fn)bx::dlsym(m_d3d9Dll, "Direct3DCreate9");
 
 				if (NULL == Direct3DCreate9)
 				{
@@ -542,7 +551,7 @@ namespace bgfx { namespace d3d9
 							}
 
 							if (BX_ENABLED(BGFX_CONFIG_DEBUG_PERFHUD)
-							&&  0 != bx::strFind(desc.Description, "PerfHUD") )
+							&&  !bx::strFind(desc.Description, "PerfHUD").isEmpty() )
 							{
 								m_adapter = ii;
 								m_deviceType = D3DDEVTYPE_REF;
@@ -876,7 +885,7 @@ namespace bgfx { namespace d3d9
 
 			case ErrorState::LoadedD3D9:
 				m_nvapi.shutdown();
-				bx::dlclose(m_d3d9dll);
+				bx::dlclose(m_d3d9Dll);
 				BX_FALLTHROUGH;
 
 			case ErrorState::Default:
@@ -924,7 +933,7 @@ namespace bgfx { namespace d3d9
 			}
 
 			m_nvapi.shutdown();
-			bx::dlclose(m_d3d9dll);
+			bx::dlclose(m_d3d9Dll);
 
 			m_initialized = false;
 		}
@@ -1026,7 +1035,7 @@ namespace bgfx { namespace d3d9
 			m_program[_handle.idx].destroy();
 		}
 
-		void* createTexture(TextureHandle _handle, const Memory* _mem, uint32_t _flags, uint8_t _skip) override
+		void* createTexture(TextureHandle _handle, const Memory* _mem, uint64_t _flags, uint8_t _skip) override
 		{
 			m_textures[_handle.idx].create(_mem, _flags, _skip);
 			return NULL;
@@ -1082,7 +1091,7 @@ namespace bgfx { namespace d3d9
 			DX_CHECK(texture.m_texture2d->UnlockRect(_mip) );
 		}
 
-		void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) override
+		void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, uint16_t _numLayers) override
 		{
 			TextureD3D9& texture = m_textures[_handle.idx];
 
@@ -1097,7 +1106,7 @@ namespace bgfx { namespace d3d9
 			tc.m_width     = _width;
 			tc.m_height    = _height;
 			tc.m_depth     = 0;
-			tc.m_numLayers = 1;
+			tc.m_numLayers = _numLayers;
 			tc.m_numMips   = _numMips;
 			tc.m_format    = TextureFormat::Enum(texture.m_requestedFormat);
 			tc.m_cubeMap   = false;
@@ -1136,11 +1145,11 @@ namespace bgfx { namespace d3d9
 			m_frameBuffers[_handle.idx].create(_num, _attachment);
 		}
 
-		void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) override
+		void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat) override
 		{
 			uint16_t denseIdx = m_numWindows++;
 			m_windows[denseIdx] = _handle;
-			m_frameBuffers[_handle.idx].create(denseIdx, _nwh, _width, _height, _depthFormat);
+			m_frameBuffers[_handle.idx].create(denseIdx, _nwh, _width, _height, _format, _depthFormat);
 		}
 
 		void destroyFrameBuffer(FrameBufferHandle _handle) override
@@ -1152,8 +1161,12 @@ namespace bgfx { namespace d3d9
 				if (m_numWindows > 1)
 				{
 					FrameBufferHandle handle = m_windows[m_numWindows];
-					m_windows[denseIdx] = handle;
-					m_frameBuffers[handle.idx].m_denseIdx = denseIdx;
+					m_windows[m_numWindows]  = {kInvalidHandle};
+					if (m_numWindows != denseIdx)
+					{
+						m_windows[denseIdx] = handle;
+						m_frameBuffers[handle.idx].m_denseIdx = denseIdx;
+					}
 				}
 			}
 		}
@@ -1338,7 +1351,7 @@ namespace bgfx { namespace d3d9
 			uint8_t flags = predefined.m_type;
 			setShaderUniform(flags, predefined.m_loc, proj, 4);
 
-			m_textures[_blitter.m_texture.idx].commit(0, BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER, NULL);
+			m_textures[_blitter.m_texture.idx].commit(0, BGFX_SAMPLER_INTERNAL_DEFAULT, NULL);
 		}
 
 		void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) override
@@ -1394,7 +1407,6 @@ namespace bgfx { namespace d3d9
 				: 1
 				;
 			const uint32_t maskFlags = ~(0
-				| BGFX_RESET_HMD_RECENTER
 				| BGFX_RESET_MAXANISOTROPY
 				| BGFX_RESET_DEPTH_CLAMP
 				| BGFX_RESET_SUSPEND
@@ -1514,7 +1526,7 @@ namespace bgfx { namespace d3d9
 			return false;
 		}
 
-		void flip(HMD& /*_hmd*/) override
+		void flip() override
 		{
 			if (NULL != m_swapChain)
 			{
@@ -1688,18 +1700,18 @@ namespace bgfx { namespace d3d9
 
 		void setSamplerState(uint8_t _stage, uint32_t _flags, const float _rgba[4])
 		{
-			const uint32_t flags = _flags&( (~BGFX_TEXTURE_RESERVED_MASK) | BGFX_TEXTURE_SAMPLER_BITS_MASK | BGFX_TEXTURE_SRGB);
+			const uint32_t flags = _flags&( (~BGFX_SAMPLER_RESERVED_MASK) | BGFX_SAMPLER_BITS_MASK | BGFX_TEXTURE_SRGB);
 			BX_CHECK(_stage < BX_COUNTOF(m_samplerFlags), "");
 			if (m_samplerFlags[_stage] != flags)
 			{
 				m_samplerFlags[_stage] = flags;
 				IDirect3DDevice9* device = m_device;
-				D3DTEXTUREADDRESS tau = s_textureAddress[(_flags&BGFX_TEXTURE_U_MASK)>>BGFX_TEXTURE_U_SHIFT];
-				D3DTEXTUREADDRESS tav = s_textureAddress[(_flags&BGFX_TEXTURE_V_MASK)>>BGFX_TEXTURE_V_SHIFT];
-				D3DTEXTUREADDRESS taw = s_textureAddress[(_flags&BGFX_TEXTURE_W_MASK)>>BGFX_TEXTURE_W_SHIFT];
-				D3DTEXTUREFILTERTYPE minFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MIN_MASK)>>BGFX_TEXTURE_MIN_SHIFT];
-				D3DTEXTUREFILTERTYPE magFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MAG_MASK)>>BGFX_TEXTURE_MAG_SHIFT];
-				D3DTEXTUREFILTERTYPE mipFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MIP_MASK)>>BGFX_TEXTURE_MIP_SHIFT];
+				D3DTEXTUREADDRESS tau = s_textureAddress[(_flags&BGFX_SAMPLER_U_MASK)>>BGFX_SAMPLER_U_SHIFT];
+				D3DTEXTUREADDRESS tav = s_textureAddress[(_flags&BGFX_SAMPLER_V_MASK)>>BGFX_SAMPLER_V_SHIFT];
+				D3DTEXTUREADDRESS taw = s_textureAddress[(_flags&BGFX_SAMPLER_W_MASK)>>BGFX_SAMPLER_W_SHIFT];
+				D3DTEXTUREFILTERTYPE minFilter = s_textureFilter[(_flags&BGFX_SAMPLER_MIN_MASK)>>BGFX_SAMPLER_MIN_SHIFT];
+				D3DTEXTUREFILTERTYPE magFilter = s_textureFilter[(_flags&BGFX_SAMPLER_MAG_MASK)>>BGFX_SAMPLER_MAG_SHIFT];
+				D3DTEXTUREFILTERTYPE mipFilter = s_textureFilter[(_flags&BGFX_SAMPLER_MIP_MASK)>>BGFX_SAMPLER_MIP_SHIFT];
 
 				setSamplerState(device, _stage, D3DSAMP_ADDRESSU,  tau);
 				setSamplerState(device, _stage, D3DSAMP_ADDRESSV,  tav);
@@ -2194,7 +2206,7 @@ namespace bgfx { namespace d3d9
 
 		IDirect3DVertexDeclaration9* m_instanceDataDecls[BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT];
 
-		void* m_d3d9dll;
+		void* m_d3d9Dll;
 		NvApi m_nvapi;
 		uint32_t m_adapter;
 		D3DDEVTYPE m_deviceType;
@@ -2382,21 +2394,21 @@ namespace bgfx { namespace d3d9
 		uint32_t magic;
 		bx::read(&reader, magic);
 
-		switch (magic)
-		{
-		case BGFX_CHUNK_MAGIC_FSH:
-		case BGFX_CHUNK_MAGIC_VSH:
-			break;
+		const bool fragment = isShaderType(magic, 'F');
 
-		default:
-			BGFX_FATAL(false, Fatal::InvalidShader, "Unknown shader format %x.", magic);
-			break;
-		}
+		uint32_t hashIn;
+		bx::read(&reader, hashIn);
 
-		bool fragment = BGFX_CHUNK_MAGIC_FSH == magic;
+		uint32_t hashOut;
 
-		uint32_t iohash;
-		bx::read(&reader, iohash);
+		if (isShaderVerLess(magic, 6) )
+		{
+			hashOut = hashIn;
+		}
+		else
+		{
+			bx::read(&reader, hashOut);
+		}
 
 		uint16_t count;
 		bx::read(&reader, count);
@@ -2886,7 +2898,7 @@ namespace bgfx { namespace d3d9
 		return surface;
 	}
 
-	void TextureD3D9::create(const Memory* _mem, uint32_t _flags, uint8_t _skip)
+	void TextureD3D9::create(const Memory* _mem, uint64_t _flags, uint8_t _skip)
 	{
 		bimg::ImageContainer imageContainer;
 
@@ -3099,11 +3111,11 @@ namespace bgfx { namespace d3d9
 
 	void TextureD3D9::commit(uint8_t _stage, uint32_t _flags, const float _palette[][4])
 	{
-		uint32_t flags = 0 == (BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER & _flags)
+		const uint32_t flags = 0 == (BGFX_SAMPLER_INTERNAL_DEFAULT & _flags)
 			? _flags
-			: m_flags
+			: uint32_t(m_flags)
 			;
-		uint32_t index = (flags & BGFX_TEXTURE_BORDER_COLOR_MASK) >> BGFX_TEXTURE_BORDER_COLOR_SHIFT;
+		uint32_t index = (flags & BGFX_SAMPLER_BORDER_COLOR_MASK) >> BGFX_SAMPLER_BORDER_COLOR_SHIFT;
 		s_renderD3D9->setSamplerState(_stage, flags, _palette[index]);
 
 		IDirect3DDevice9* device = s_renderD3D9->m_device;
@@ -3114,7 +3126,7 @@ namespace bgfx { namespace d3d9
 		}
 	}
 
-	void TextureD3D9::resolve() const
+	void TextureD3D9::resolve(uint8_t _resolve) const
 	{
 		if (NULL != m_surface
 		&&  NULL != m_ptr)
@@ -3128,7 +3140,8 @@ namespace bgfx { namespace d3d9
 				) );
 			DX_RELEASE(surface, 1);
 
-			if (1 < m_numMips)
+			if (1 < m_numMips
+			&&  0 != (_resolve & BGFX_RESOLVE_AUTO_GEN_MIPS) )
 			{
 				m_ptr->GenerateMipSubLevels();
 			}
@@ -3184,10 +3197,11 @@ namespace bgfx { namespace d3d9
 
 		for (uint32_t ii = 0; ii < _num; ++ii)
 		{
-			TextureHandle handle = m_attachment[ii].handle;
-			if (isValid(handle) )
+			const Attachment& at = m_attachment[ii];
+
+			if (isValid(at.handle) )
 			{
-				const TextureD3D9& texture = s_renderD3D9->m_textures[handle.idx];
+				const TextureD3D9& texture = s_renderD3D9->m_textures[at.handle.idx];
 
 				if (NULL != texture.m_surface)
 				{
@@ -3196,7 +3210,7 @@ namespace bgfx { namespace d3d9
 				}
 				else
 				{
-					m_surface[ii] = texture.getSurface(uint8_t(m_attachment[ii].layer), uint8_t(m_attachment[ii].mip) );
+					m_surface[ii] = texture.getSurface(uint8_t(at.layer), uint8_t(at.mip) );
 				}
 
 				if (0 == m_num)
@@ -3227,7 +3241,7 @@ namespace bgfx { namespace d3d9
 		}
 	}
 
-	void FrameBufferD3D9::create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat)
+	void FrameBufferD3D9::create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat)
 	{
 		BX_UNUSED(_depthFormat);
 
@@ -3238,6 +3252,7 @@ namespace bgfx { namespace d3d9
 
 		D3DPRESENT_PARAMETERS params;
 		bx::memCopy(&params, &s_renderD3D9->m_params, sizeof(D3DPRESENT_PARAMETERS) );
+		params.BackBufferFormat = TextureFormat::Count == _format ? params.BackBufferFormat : s_textureFormat[_format].m_fmt;
 		params.BackBufferWidth  = m_width;
 		params.BackBufferHeight = m_height;
 
@@ -3315,8 +3330,13 @@ namespace bgfx { namespace d3d9
 		{
 			for (uint32_t ii = 0, num = m_numTh; ii < num; ++ii)
 			{
-				const TextureD3D9& texture = s_renderD3D9->m_textures[m_attachment[ii].handle.idx];
-				texture.resolve();
+				const Attachment& at = m_attachment[ii];
+
+				if (isValid(at.handle) )
+				{
+					const TextureD3D9& texture = s_renderD3D9->m_textures[at.handle.idx];
+					texture.resolve(at.resolve);
+				}
 			}
 		}
 	}
@@ -3367,19 +3387,24 @@ namespace bgfx { namespace d3d9
 		{
 			for (uint32_t ii = 0, num = m_numTh; ii < num; ++ii)
 			{
-				TextureHandle th = m_attachment[ii].handle;
+				const Attachment& at = m_attachment[ii];
 
-				if (isValid(th) )
+				if (isValid(at.handle) )
 				{
-					TextureD3D9& texture = s_renderD3D9->m_textures[th.idx];
+					TextureD3D9& texture = s_renderD3D9->m_textures[at.handle.idx];
+
 					if (NULL != texture.m_surface)
 					{
 						m_surface[ii] = texture.m_surface;
 						m_surface[ii]->AddRef();
 					}
+					else if (Access::Write == at.access)
+					{
+						m_surface[ii] = texture.getSurface(uint8_t(at.layer), uint8_t(at.mip) );
+					}
 					else
 					{
-						m_surface[ii] = texture.getSurface(uint8_t(m_attachment[ii].layer), uint8_t(m_attachment[ii].mip) );
+						BX_CHECK(false, "");
 					}
 				}
 			}
@@ -3723,7 +3748,7 @@ namespace bgfx { namespace d3d9
 		ViewState viewState(_render, false);
 
 		DX_CHECK(device->SetRenderState(D3DRS_FILLMODE, _render->m_debug&BGFX_DEBUG_WIREFRAME ? D3DFILL_WIREFRAME : D3DFILL_SOLID) );
-		uint16_t programIdx = kInvalidHandle;
+		ProgramHandle currentProgram = BGFX_INVALID_HANDLE;
 		SortKey key;
 		uint16_t view = UINT16_MAX;
 		FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS };
@@ -3813,7 +3838,7 @@ namespace bgfx { namespace d3d9
 					currentState.m_stencil    = newStencil;
 
 					view = key.m_view;
-					programIdx = kInvalidHandle;
+					currentProgram = BGFX_INVALID_HANDLE;
 
 					if (_render->m_view[view].m_fbh.idx != fbh.idx)
 					{
@@ -4089,18 +4114,18 @@ namespace bgfx { namespace d3d9
 				bool constantsChanged = draw.m_uniformBegin < draw.m_uniformEnd;
 				rendererUpdateUniforms(this, _render->m_uniformBuffer[draw.m_uniformIdx], draw.m_uniformBegin, draw.m_uniformEnd);
 
-				if (key.m_program != programIdx)
+				if (key.m_program.idx != currentProgram.idx)
 				{
-					programIdx = key.m_program;
+					currentProgram = key.m_program;
 
-					if (kInvalidHandle == programIdx)
+					if (!isValid(currentProgram) )
 					{
 						device->SetVertexShader(NULL);
 						device->SetPixelShader(NULL);
 					}
 					else
 					{
-						ProgramD3D9& program = m_program[programIdx];
+						ProgramD3D9& program = m_program[currentProgram.idx];
 						device->SetVertexShader(program.m_vsh->m_vertexShader);
 						device->SetPixelShader(NULL == program.m_fsh
 							? NULL
@@ -4112,9 +4137,9 @@ namespace bgfx { namespace d3d9
 						constantsChanged = true;
 				}
 
-				if (kInvalidHandle != programIdx)
+				if (isValid(currentProgram) )
 				{
-					ProgramD3D9& program = m_program[programIdx];
+					ProgramD3D9& program = m_program[currentProgram.idx];
 
 					if (constantsChanged)
 					{
@@ -4143,13 +4168,13 @@ namespace bgfx { namespace d3d9
 						const Binding& bind = renderBind.m_bind[stage];
 						Binding& current = currentBind.m_bind[stage];
 
-						if (current.m_idx != bind.m_idx
-						||  current.m_un.m_draw.m_textureFlags != bind.m_un.m_draw.m_textureFlags
+						if (current.m_idx          != bind.m_idx
+						||  current.m_samplerFlags != bind.m_samplerFlags
 						||  programChanged)
 						{
 							if (kInvalidHandle != bind.m_idx)
 							{
-								m_textures[bind.m_idx].commit(stage, bind.m_un.m_draw.m_textureFlags, _render->m_colorPalette);
+								m_textures[bind.m_idx].commit(stage, bind.m_samplerFlags, _render->m_colorPalette);
 							}
 							else
 							{
@@ -4382,6 +4407,7 @@ namespace bgfx { namespace d3d9
 		perfStats.gpuTimerFreq  = result.m_frequency;
 		perfStats.numDraw       = statsKeyType[0];
 		perfStats.numCompute    = statsKeyType[1];
+		perfStats.numBlit       = _render->m_numBlitItems;
 		perfStats.maxGpuLatency = maxGpuLatency;
 		bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) );
 		m_nvapi.getMemoryInfo(perfStats.gpuMemoryUsed, perfStats.gpuMemoryMax);

+ 6 - 6
bgfx.mod/bgfx/src/renderer_d3d9.h

@@ -314,11 +314,11 @@ namespace bgfx { namespace d3d9
 		void dirty(uint8_t _side, const Rect& _rect, uint16_t _z, uint16_t _depth);
 		IDirect3DSurface9* getSurface(uint8_t _side = 0, uint8_t _mip = 0) const;
 
-		void create(const Memory* _mem, uint32_t _flags, uint8_t _skip);
+		void create(const Memory* _mem, uint64_t _flags, uint8_t _skip);
 
 		void destroy(bool _resize = false)
 		{
-			if (0 == (m_flags & BGFX_TEXTURE_INTERNAL_SHARED) )
+			if (0 == (m_flags & BGFX_SAMPLER_INTERNAL_SHARED) )
 			{
 				if (_resize)
 				{
@@ -340,7 +340,7 @@ namespace bgfx { namespace d3d9
 		void overrideInternal(uintptr_t _ptr)
 		{
 			destroy();
-			m_flags |= BGFX_TEXTURE_INTERNAL_SHARED;
+			m_flags |= BGFX_SAMPLER_INTERNAL_SHARED;
 			m_ptr = (IDirect3DBaseTexture9*)_ptr;
 		}
 
@@ -348,7 +348,7 @@ namespace bgfx { namespace d3d9
 		void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem);
 		void updateEnd();
 		void commit(uint8_t _stage, uint32_t _flags, const float _palette[][4]);
-		void resolve() const;
+		void resolve(uint8_t _resolve) const;
 
 		void preReset();
 		void postReset();
@@ -371,7 +371,7 @@ namespace bgfx { namespace d3d9
 			IDirect3DCubeTexture9*   m_stagingCube;
 		};
 
-		uint32_t m_flags;
+		uint64_t m_flags;
 		uint32_t m_width;
 		uint32_t m_height;
 		uint32_t m_depth;
@@ -395,7 +395,7 @@ namespace bgfx { namespace d3d9
 		}
 
 		void create(uint8_t _num, const Attachment* _attachment);
-		void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat);
+		void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat);
 		uint16_t destroy();
 		HRESULT present();
 		void resolve() const;

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 147 - 439
bgfx.mod/bgfx/src/renderer_gl.cpp


+ 76 - 8
bgfx.mod/bgfx/src/renderer_gl.h

@@ -113,8 +113,6 @@ typedef uint64_t GLuint64;
 #endif // BGFX_CONFIG_RENDERER_OPENGL
 
 #include "renderer.h"
-#include "hmd.h"
-#include "hmd_openvr.h"
 #include "debug_renderdoc.h"
 
 #ifndef GL_LUMINANCE
@@ -457,6 +455,66 @@ typedef uint64_t GLuint64;
 #	define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
 #endif // GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT
 
+#ifndef ATC_RGB_AMD
+	#define GL_ATC_RGB_AMD 0x8C92
+#endif
+
+#ifndef GL_ATC_RGBA_EXPLICIT_ALPHA_AMD
+#   define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
+#endif
+
+#ifndef ATC_RGBA_INTERPOLATED_ALPHA_AMD
+#   define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
+#endif
+
+#ifndef GL_COMPRESSED_RGBA_ASTC_4x4_KHR
+#   define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
+#endif
+
+#ifndef GL_COMPRESSED_RGBA_ASTC_5x5_KHR
+#   define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
+#endif
+
+#ifndef GL_COMPRESSED_RGBA_ASTC_6x6_KHR
+#   define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
+#endif
+
+#ifndef GL_COMPRESSED_RGBA_ASTC_8x5_KHR
+#   define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
+#endif
+
+#ifndef GL_COMPRESSED_RGBA_ASTC_8x6_KHR
+#   define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
+#endif
+
+#ifndef GL_COMPRESSED_RGBA_ASTC_10x5_KHR
+#   define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
+#endif
+
+#ifndef GL_COMPRESSED_SRGB8_ASTC_4x4_KHR
+#   define GL_COMPRESSED_SRGB8_ASTC_4x4_KHR 0x93D0
+#endif
+
+#ifndef GL_COMPRESSED_SRGB8_ASTC_5x5_KHR
+#   define GL_COMPRESSED_SRGB8_ASTC_5x5_KHR 0x93D2
+#endif
+
+#ifndef GL_COMPRESSED_SRGB8_ASTC_6x6_KHR
+#   define GL_COMPRESSED_SRGB8_ASTC_6x6_KHR 0x93D4
+#endif
+
+#ifndef GL_COMPRESSED_SRGB8_ASTC_8x5_KHR
+#   define GL_COMPRESSED_SRGB8_ASTC_8x5_KHR 0x93D5
+#endif
+
+#ifndef GL_COMPRESSED_SRGB8_ASTC_8x6_KHR
+#   define GL_COMPRESSED_SRGB8_ASTC_8x6_KHR 0x93D6
+#endif
+
+#ifndef GL_COMPRESSED_SRGB8_ASTC_10x5_KHR
+#   define GL_COMPRESSED_SRGB8_ASTC_10x5_KHR 0x93D8
+#endif
+
 #ifndef GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
 #	define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
 #endif // GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
@@ -1180,14 +1238,14 @@ namespace bgfx { namespace gl
 		{
 		}
 
-		bool init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips, uint32_t _flags);
-		void create(const Memory* _mem, uint32_t _flags, uint8_t _skip);
+		bool init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips, uint64_t _flags);
+		void create(const Memory* _mem, uint64_t _flags, uint8_t _skip);
 		void destroy();
 		void overrideInternal(uintptr_t _ptr);
 		void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem);
 		void setSamplerState(uint32_t _flags, const float _rgba[4]);
 		void commit(uint32_t _stage, uint32_t _flags, const float _palette[][4]);
-		void resolve() const;
+		void resolve(uint8_t _resolve) const;
 
 		bool isCubeMap() const
 		{
@@ -1202,7 +1260,7 @@ namespace bgfx { namespace gl
 		GLenum m_target;
 		GLenum m_fmt;
 		GLenum m_type;
-		uint32_t m_flags;
+		uint64_t m_flags;
 		uint32_t m_currentSamplerHash;
 		uint32_t m_width;
 		uint32_t m_height;
@@ -1241,7 +1299,7 @@ namespace bgfx { namespace gl
 		}
 
 		void create(uint8_t _num, const Attachment* _attachment);
-		void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat);
+		void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat);
 		void postReset();
 		uint16_t destroy();
 		void resolve();
@@ -1271,6 +1329,7 @@ namespace bgfx { namespace gl
 		void destroy();
 		void init();
 		void bindInstanceData(uint32_t _stride, uint32_t _baseVertex = 0) const;
+		void unbindInstanceData() const;
 
 		void bindAttributesBegin()
 		{
@@ -1292,6 +1351,8 @@ namespace bgfx { namespace gl
 			}
 		}
 
+		void unbindAttributes();
+
 		GLuint m_id;
 
 		uint8_t m_unboundUsedAttrib[Attrib::Count]; // For tracking unbound used attributes between begin()/end().
@@ -1483,6 +1544,13 @@ namespace bgfx { namespace gl
 		{
 		}
 
+		LineReader(const bx::StringView& _str)
+			: m_str(_str.getPtr() )
+			, m_pos(0)
+			, m_size(_str.getLength() )
+		{
+		}
+
 		virtual int32_t read(void* _data, int32_t _size, bx::Error* _err) override
 		{
 			if (m_str[m_pos] == '\0'
@@ -1494,7 +1562,7 @@ namespace bgfx { namespace gl
 
 			uint32_t pos = m_pos;
 			const char* str = &m_str[pos];
-			const char* nl = bx::strnl(str);
+			const char* nl = bx::strFindNl(str).getPtr();
 			pos += (uint32_t)(nl - str);
 
 			const char* eol = &m_str[pos];

+ 36 - 5
bgfx.mod/bgfx/src/renderer_mtl.h

@@ -838,7 +838,7 @@ namespace bgfx { namespace mtl
 
 		TextureMtl()
 			: m_ptr(NULL)
-			, m_ptrMSAA(NULL)
+			, m_ptrMsaa(NULL)
 			, m_ptrStencil(NULL)
 			, m_sampler(NULL)
 			, m_flags(0)
@@ -849,7 +849,7 @@ namespace bgfx { namespace mtl
 		{
 		}
 
-		void create(const Memory* _mem, uint32_t _flags, uint8_t _skip);
+		void create(const Memory* _mem, uint64_t _flags, uint8_t _skip);
 
 		void destroy()
 		{
@@ -871,14 +871,14 @@ namespace bgfx { namespace mtl
 			  uint8_t _stage
 			, bool _vertex
 			, bool _fragment
-			, uint32_t _flags = BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER
+			, uint32_t _flags = BGFX_SAMPLER_INTERNAL_DEFAULT
 			);
 
 		Texture m_ptr;
-		Texture m_ptrMSAA;
+		Texture m_ptrMsaa;
 		Texture m_ptrStencil; // for emulating packed depth/stencil formats - only for iOS8...
 		SamplerState m_sampler;
-		uint32_t m_flags;
+		uint64_t m_flags;
 		uint32_t m_width;
 		uint32_t m_height;
 		uint32_t m_depth;
@@ -888,6 +888,35 @@ namespace bgfx { namespace mtl
 		uint8_t m_numMips;
 	};
 
+	struct FrameBufferMtl;
+
+	struct SwapChainMtl
+	{
+		SwapChainMtl()
+			: m_metalLayer(nil)
+			, m_drawable(nil)
+			, m_backBufferColorMsaa()
+			, m_backBufferDepth()
+			, m_backBufferStencil()
+			, m_maxAnisotropy(0)
+		{
+		}
+
+		~SwapChainMtl();
+
+		void init(void* _nwh);
+		void resize(FrameBufferMtl &_frameBuffer, uint32_t _width, uint32_t _height, uint32_t _flags);
+
+		id<CAMetalDrawable> currentDrawable();
+
+		CAMetalLayer* m_metalLayer;
+		id <CAMetalDrawable> m_drawable;
+		Texture m_backBufferColorMsaa;
+		Texture m_backBufferDepth;
+		Texture m_backBufferStencil;
+		uint32_t m_maxAnisotropy;
+	};
+
 	struct FrameBufferMtl
 	{
 		FrameBufferMtl()
@@ -904,11 +933,13 @@ namespace bgfx { namespace mtl
 			, void* _nwh
 			, uint32_t _width
 			, uint32_t _height
+			, TextureFormat::Enum _format
 			, TextureFormat::Enum _depthFormat
 			);
 		void postReset();
 		uint16_t destroy();
 
+		SwapChainMtl* m_swapChain;
 		uint32_t m_width;
 		uint32_t m_height;
 		uint16_t m_denseIdx;

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 366 - 295
bgfx.mod/bgfx/src/renderer_mtl.mm


+ 26 - 10
bgfx.mod/bgfx/src/renderer_noop.cpp

@@ -22,7 +22,6 @@ namespace bgfx { namespace noop
 				| BGFX_CAPS_FRAGMENT_ORDERING
 				| BGFX_CAPS_GRAPHICS_DEBUGGER
 				| BGFX_CAPS_HIDPI
-				| BGFX_CAPS_HMD
 				| BGFX_CAPS_INDEX32
 				| BGFX_CAPS_INSTANCING
 				| BGFX_CAPS_OCCLUSION_QUERY
@@ -63,10 +62,11 @@ namespace bgfx { namespace noop
 			}
 
 			// Pretend we have no limits
-			g_caps.limits.maxTextureSize   = 16384;
-			g_caps.limits.maxTextureLayers = 2048;
-			g_caps.limits.maxFBAttachments = BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS;
-			g_caps.limits.maxVertexStreams = BGFX_CONFIG_MAX_VERTEX_STREAMS;
+			g_caps.limits.maxTextureSize     = 16384;
+			g_caps.limits.maxTextureLayers   = 2048;
+			g_caps.limits.maxComputeBindings = g_caps.limits.maxTextureSamplers;
+			g_caps.limits.maxFBAttachments   = BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS;
+			g_caps.limits.maxVertexStreams   = BGFX_CONFIG_MAX_VERTEX_STREAMS;
 		}
 
 		~RendererContextNOOP()
@@ -88,7 +88,7 @@ namespace bgfx { namespace noop
 			return false;
 		}
 
-		void flip(HMD& /*_hmd*/) override
+		void flip() override
 		{
 		}
 
@@ -156,7 +156,7 @@ namespace bgfx { namespace noop
 		{
 		}
 
-		void* createTexture(TextureHandle /*_handle*/, const Memory* /*_mem*/, uint32_t /*_flags*/, uint8_t /*_skip*/) override
+		void* createTexture(TextureHandle /*_handle*/, const Memory* /*_mem*/, uint64_t /*_flags*/, uint8_t /*_skip*/) override
 		{
 			return NULL;
 		}
@@ -177,7 +177,7 @@ namespace bgfx { namespace noop
 		{
 		}
 
-		void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/, uint8_t /*_numMips*/) override
+		void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/, uint8_t /*_numMips*/, uint16_t /*_numLayers*/) override
 		{
 		}
 
@@ -198,7 +198,7 @@ namespace bgfx { namespace noop
 		{
 		}
 
-		void createFrameBuffer(FrameBufferHandle /*_handle*/, void* /*_nwh*/, uint32_t /*_width*/, uint32_t /*_height*/, TextureFormat::Enum /*_depthFormat*/) override
+		void createFrameBuffer(FrameBufferHandle /*_handle*/, void* /*_nwh*/, uint32_t /*_width*/, uint32_t /*_height*/, TextureFormat::Enum /*_format*/, TextureFormat::Enum /*_depthFormat*/) override
 		{
 		}
 
@@ -238,8 +238,24 @@ namespace bgfx { namespace noop
 		{
 		}
 
-		void submit(Frame* /*_render*/, ClearQuad& /*_clearQuad*/, TextVideoMemBlitter& /*_textVideoMemBlitter*/) override
+		void submit(Frame* _render, ClearQuad& /*_clearQuad*/, TextVideoMemBlitter& /*_textVideoMemBlitter*/) override
 		{
+			const int64_t timerFreq = bx::getHPFrequency();
+			const int64_t timeBegin = bx::getHPCounter();
+
+			Stats& perfStats = _render->m_perfStats;
+			perfStats.cpuTimeBegin  = timeBegin;
+			perfStats.cpuTimeEnd    = timeBegin;
+			perfStats.cpuTimerFreq  = timerFreq;
+
+			perfStats.gpuTimeBegin  = 0;
+			perfStats.gpuTimeEnd    = 0;
+			perfStats.gpuTimerFreq  = 1000000000;
+
+			bx::memSet(perfStats.numPrims, 0, sizeof(perfStats.numPrims) );
+
+			perfStats.gpuMemoryMax  = -INT64_MAX;
+			perfStats.gpuMemoryUsed = -INT64_MAX;
 		}
 
 		void blitSetup(TextVideoMemBlitter& /*_blitter*/) override

+ 102 - 74
bgfx.mod/bgfx/src/renderer_vk.cpp

@@ -153,6 +153,15 @@ VK_IMPORT_DEVICE
 		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // PTC14A
 		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // PTC22
 		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // PTC24
+		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // ATC
+		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // ATCE
+		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // ATCI
+		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // ASTC4x4
+		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // ASTC5x5
+		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // ASTC6x6
+		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // ASTC8x5
+		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // ASTC8x6
+		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // ASTC10x5
 		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // Unknown
 		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // R1
 		{ VK_FORMAT_UNDEFINED,                 VK_FORMAT_UNDEFINED,                VK_FORMAT_UNDEFINED,           VK_FORMAT_UNDEFINED                }, // A8
@@ -691,8 +700,8 @@ VK_IMPORT_DEVICE
 	{
 		RendererContextVK()
 			: m_allocatorCb(NULL)
-			, m_renderdocdll(NULL)
-			, m_vulkan1dll(NULL)
+			, m_renderDocDll(NULL)
+			, m_vulkan1Dll(NULL)
 			, m_maxAnisotropy(1)
 			, m_depthClamp(false)
 			, m_wireframe(false)
@@ -734,8 +743,13 @@ VK_IMPORT_DEVICE
 			m_qfiGraphics = UINT32_MAX;
 			m_qfiCompute  = UINT32_MAX;
 
-			m_renderdocdll = loadRenderDoc();
-			m_vulkan1dll = bx::dlopen(
+			if (_init.debug
+			||  _init.profile)
+			{
+				m_renderDocDll = loadRenderDoc();
+			}
+
+			m_vulkan1Dll = bx::dlopen(
 #if BX_PLATFORM_WINDOWS
 					"vulkan-1.dll"
 #elif BX_PLATFORM_ANDROID
@@ -745,7 +759,7 @@ VK_IMPORT_DEVICE
 #endif // BX_PLATFORM_*
 					);
 
-			if (NULL == m_vulkan1dll)
+			if (NULL == m_vulkan1Dll)
 			{
 				BX_TRACE("Init error: Failed to load vulkan dynamic library.");
 				goto error;
@@ -754,10 +768,10 @@ VK_IMPORT_DEVICE
 			errorState = ErrorState::LoadedVulkan1;
 
 			BX_TRACE("Shared library functions:");
-#define VK_IMPORT_FUNC(_optional, _func) \
-			_func = (PFN_##_func)bx::dlsym(m_vulkan1dll, #_func); \
-			BX_TRACE("\t%p " #_func, _func); \
-			imported &= _optional || NULL != _func
+#define VK_IMPORT_FUNC(_optional, _func)                  \
+	_func = (PFN_##_func)bx::dlsym(m_vulkan1Dll, #_func); \
+	BX_TRACE("\t%p " #_func, _func);                      \
+	imported &= _optional || NULL != _func
 VK_IMPORT
 #undef VK_IMPORT_FUNC
 
@@ -963,8 +977,9 @@ VK_IMPORT_INSTANCE
 				g_caps.vendorId = uint16_t(m_deviceProperties.vendorID);
 				g_caps.deviceId = uint16_t(m_deviceProperties.deviceID);
 
-				g_caps.limits.maxTextureSize   = m_deviceProperties.limits.maxImageDimension2D;
-				g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(m_deviceProperties.limits.maxFragmentOutputAttachments, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) );
+				g_caps.limits.maxTextureSize     = m_deviceProperties.limits.maxImageDimension2D;
+				g_caps.limits.maxFBAttachments   = uint8_t(bx::uint32_min(m_deviceProperties.limits.maxFragmentOutputAttachments, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) );
+				g_caps.limits.maxComputeBindings = BGFX_MAX_COMPUTE_BINDINGS;
 
 				{
 //					VkFormatProperties fp;
@@ -1828,10 +1843,10 @@ VK_IMPORT_DEVICE
 				BX_FALLTHROUGH;
 
 			case ErrorState::LoadedVulkan1:
-				bx::dlclose(m_vulkan1dll);
-				m_vulkan1dll  = NULL;
+				bx::dlclose(m_vulkan1Dll);
+				m_vulkan1Dll  = NULL;
 				m_allocatorCb = NULL;
-				unloadRenderDoc(m_renderdocdll);
+				unloadRenderDoc(m_renderDocDll);
 				BX_FALLTHROUGH;
 
 			case ErrorState::Default:
@@ -1924,10 +1939,10 @@ VK_IMPORT_DEVICE
 
 			vkDestroyInstance(m_instance, m_allocatorCb);
 
-			bx::dlclose(m_vulkan1dll);
-			m_vulkan1dll  = NULL;
+			bx::dlclose(m_vulkan1Dll);
+			m_vulkan1Dll  = NULL;
 			m_allocatorCb = NULL;
-			unloadRenderDoc(m_renderdocdll);
+			unloadRenderDoc(m_renderDocDll);
 		}
 
 		RendererType::Enum getRendererType() const override
@@ -1945,7 +1960,7 @@ VK_IMPORT_DEVICE
 			return false;
 		}
 
-		void flip(HMD& /*_hmd*/) override
+		void flip() override
 		{
 			if (VK_NULL_HANDLE != m_swapchain)
 			{
@@ -2046,7 +2061,7 @@ VK_IMPORT_DEVICE
 			m_program[_handle.idx].destroy();
 		}
 
-		void* createTexture(TextureHandle /*_handle*/, const Memory* /*_mem*/, uint32_t /*_flags*/, uint8_t /*_skip*/) override
+		void* createTexture(TextureHandle /*_handle*/, const Memory* /*_mem*/, uint64_t /*_flags*/, uint8_t /*_skip*/) override
 		{
 			return NULL;
 		}
@@ -2067,7 +2082,7 @@ VK_IMPORT_DEVICE
 		{
 		}
 
-		void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/, uint8_t /*_numMips*/) override
+		void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/, uint8_t /*_numMips*/, uint16_t /*_numLayers*/) override
 		{
 		}
 
@@ -2088,7 +2103,7 @@ VK_IMPORT_DEVICE
 		{
 		}
 
-		void createFrameBuffer(FrameBufferHandle /*_handle*/, void* /*_nwh*/, uint32_t /*_width*/, uint32_t /*_height*/, TextureFormat::Enum /*_depthFormat*/) override
+		void createFrameBuffer(FrameBufferHandle /*_handle*/, void* /*_nwh*/, uint32_t /*_width*/, uint32_t /*_height*/, TextureFormat::Enum /*_format*/, TextureFormat::Enum /*_depthFormat*/) override
 		{
 		}
 
@@ -2178,7 +2193,7 @@ VK_IMPORT_DEVICE
 				m_pipelineStateCache.invalidate();
 			}
 
-			uint32_t flags = _resolution.reset & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY | BGFX_RESET_DEPTH_CLAMP);
+			uint32_t flags = _resolution.reset & ~(BGFX_RESET_MAXANISOTROPY | BGFX_RESET_DEPTH_CLAMP);
 
 			if (m_resolution.width  != _resolution.width
 			||  m_resolution.height != _resolution.height
@@ -2263,9 +2278,9 @@ VK_IMPORT_DEVICE
 			setShaderUniform(_flags, _regIndex, _val, _numRegs);
 		}
 
-		void commitShaderUniforms(VkCommandBuffer _commandBuffer, uint16_t _programIdx)
+		void commitShaderUniforms(VkCommandBuffer _commandBuffer, ProgramHandle _program)
 		{
-			const ProgramVK& program = m_program[_programIdx];
+			const ProgramVK& program = m_program[_program.idx];
 			VkDescriptorBufferInfo descriptorBufferInfo;
 			uint32_t total = 0
 				+ program.m_vsh->m_size
@@ -2575,16 +2590,16 @@ VK_IMPORT_DEVICE
 			return num;
 		}
 
-		VkPipeline getPipeline(uint16_t _programIdx)
+		VkPipeline getPipeline(ProgramHandle _program)
 		{
-			BX_UNUSED(_programIdx);
+			BX_UNUSED(_program);
 			// vkCreateComputePipelines
 			return VK_NULL_HANDLE;
 		}
 
-		VkPipeline getPipeline(uint64_t _state, uint64_t _stencil, uint16_t _declIdx, uint16_t _programIdx, uint8_t _numInstanceData)
+		VkPipeline getPipeline(uint64_t _state, uint64_t _stencil, uint16_t _declIdx, ProgramHandle _program, uint8_t _numInstanceData)
 		{
-			ProgramVK& program = m_program[_programIdx];
+			ProgramVK& program = m_program[_program.idx];
 
 			_state &= 0
 				| BGFX_STATE_WRITE_RGB
@@ -3037,8 +3052,8 @@ VK_IMPORT_DEVICE
 		VkPipelineCache m_pipelineCache;
 		VkCommandPool m_commandPool;
 
-		void* m_renderdocdll;
-		void* m_vulkan1dll;
+		void* m_renderDocDll;
+		void* m_vulkan1Dll;
 
 		IndexBufferVK m_indexBuffers[BGFX_CONFIG_MAX_INDEX_BUFFERS];
 		VertexBufferVK m_vertexBuffers[BGFX_CONFIG_MAX_VERTEX_BUFFERS];
@@ -3422,21 +3437,35 @@ VK_DESTROY
 
 		VkShaderStageFlagBits shaderStage;
 		BX_UNUSED(shaderStage);
-		switch (magic)
-		{
-		case BGFX_CHUNK_MAGIC_CSH: shaderStage = VK_SHADER_STAGE_COMPUTE_BIT;  break;
-		case BGFX_CHUNK_MAGIC_FSH: shaderStage = VK_SHADER_STAGE_FRAGMENT_BIT; break;
-		case BGFX_CHUNK_MAGIC_VSH: shaderStage = VK_SHADER_STAGE_VERTEX_BIT;   break;
 
-		default:
-			BGFX_FATAL(false, Fatal::InvalidShader, "Unknown shader format %x.", magic);
-			break;
+		if (isShaderType(magic, 'C') )
+		{
+			shaderStage = VK_SHADER_STAGE_COMPUTE_BIT;
+		}
+		else if (isShaderType(magic, 'F') )
+		{
+			shaderStage = VK_SHADER_STAGE_FRAGMENT_BIT;
 		}
+		else if (isShaderType(magic, 'V') )
+		{
+			shaderStage = VK_SHADER_STAGE_VERTEX_BIT;
+		}
+
+		const bool fragment = isShaderType(magic, 'F');
 
-		bool fragment = BGFX_CHUNK_MAGIC_FSH == magic;
+		uint32_t hashIn;
+		bx::read(&reader, hashIn);
 
-		uint32_t iohash;
-		bx::read(&reader, iohash);
+		uint32_t hashOut;
+
+		if (isShaderVerLess(magic, 6) )
+		{
+			hashOut = hashIn;
+		}
+		else
+		{
+			bx::read(&reader, hashOut);
+		}
 
 		uint16_t count;
 		bx::read(&reader, count);
@@ -3445,7 +3474,7 @@ VK_DESTROY
 		m_numUniforms = count;
 
 		BX_TRACE("%s Shader consts %d"
-			, BGFX_CHUNK_MAGIC_FSH == magic ? "Fragment" : BGFX_CHUNK_MAGIC_VSH == magic ? "Vertex" : "Compute"
+			, getShaderTypeName(magic)
 			, count
 			);
 
@@ -3569,7 +3598,8 @@ VK_DESTROY
 
 		bx::HashMurmur2A murmur;
 		murmur.begin();
-		murmur.add(iohash);
+		murmur.add(hashIn);
+		murmur.add(hashOut);
 		murmur.add(m_code->data, m_code->size);
 		murmur.add(m_numAttrs);
 		murmur.add(m_attrMask,  m_numAttrs);
@@ -3649,8 +3679,6 @@ VK_DESTROY
 		currentState.m_stateFlags = BGFX_STATE_NONE;
 		currentState.m_stencil    = packStencil(BGFX_STENCIL_NONE, BGFX_STENCIL_NONE);
 
-		_render->m_hmdInitialized = false;
-
 		const bool hmdEnabled = false;
 		ViewState viewState(_render, hmdEnabled);
 		viewState.reset(_render, hmdEnabled);
@@ -3659,7 +3687,7 @@ VK_DESTROY
 // 		setDebugWireframe(wireframe);
 
 		uint16_t currentSamplerStateIdx = kInvalidHandle;
-		uint16_t currentProgramIdx      = kInvalidHandle;
+		ProgramHandle currentProgram    = BGFX_INVALID_HANDLE;
 		uint32_t currentBindHash        = 0;
 		bool     hasPredefined          = false;
 		bool     commandListChanged     = false;
@@ -3682,6 +3710,9 @@ VK_DESTROY
 		Rect viewScissorRect;
 		viewScissorRect.clear();
 
+		const uint32_t maxComputeBindings = g_caps.limits.maxComputeBindings;
+		BX_UNUSED(maxComputeBindings);
+
 		uint32_t statsNumPrimsSubmitted[BX_COUNTOF(s_primInfo)] = {};
 		uint32_t statsNumPrimsRendered[BX_COUNTOF(s_primInfo)] = {};
 		uint32_t statsNumInstances[BX_COUNTOF(s_primInfo)] = {};
@@ -3780,7 +3811,7 @@ finishAll();
 					currentPipeline = VK_NULL_HANDLE;
 					currentSamplerStateIdx = kInvalidHandle;
 BX_UNUSED(currentSamplerStateIdx);
-					currentProgramIdx      = kInvalidHandle;
+					currentProgram         = BGFX_INVALID_HANDLE;
 					hasPredefined          = false;
 
 					fbh = _render->m_view[view].m_fbh;
@@ -3866,7 +3897,7 @@ BX_UNUSED(currentSamplerStateIdx);
 //							D3D12_GPU_DESCRIPTOR_HANDLE srvHandle[BGFX_MAX_COMPUTE_BINDINGS] = {};
 //							uint32_t samplerFlags[BGFX_MAX_COMPUTE_BINDINGS] = {};
 //
-//							for (uint32_t ii = 0; ii < BGFX_MAX_COMPUTE_BINDINGS; ++ii)
+//							for (uint32_t ii = 0; ii < maxComputeBindings; ++ii)
 //							{
 //								const Binding& bind = renderBind.m_bind[ii];
 //								if (kInvalidHandle != bind.m_idx)
@@ -3877,15 +3908,15 @@ BX_UNUSED(currentSamplerStateIdx);
 //										{
 //											TextureD3D12& texture = m_textures[bind.m_idx];
 //
-//											if (Access::Read != bind.m_un.m_compute.m_access)
+//											if (Access::Read != bind.m_access)
 //											{
 //												texture.setState(m_commandList, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
-//												scratchBuffer.allocUav(srvHandle[ii], texture, bind.m_un.m_compute.m_mip);
+//												scratchBuffer.allocUav(srvHandle[ii], texture, bind.m_mip);
 //											}
 //											else
 //											{
 //												texture.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ);
-//												scratchBuffer.allocSrv(srvHandle[ii], texture, bind.m_un.m_compute.m_mip);
+//												scratchBuffer.allocSrv(srvHandle[ii], texture, bind.m_mip);
 //												samplerFlags[ii] = texture.m_flags;
 //											}
 //										}
@@ -3899,7 +3930,7 @@ BX_UNUSED(currentSamplerStateIdx);
 //												: m_vertexBuffers[bind.m_idx]
 //												;
 //
-//											if (Access::Read != bind.m_un.m_compute.m_access)
+//											if (Access::Read != bind.m_access)
 //											{
 //												buffer.setState(m_commandList, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
 //												scratchBuffer.allocUav(srvHandle[ii], buffer);
@@ -3915,7 +3946,7 @@ BX_UNUSED(currentSamplerStateIdx);
 //								}
 //							}
 //
-//							uint16_t samplerStateIdx = getSamplerState(samplerFlags, BGFX_MAX_COMPUTE_BINDINGS, _render->m_colorPalette);
+//							uint16_t samplerStateIdx = getSamplerState(samplerFlags, maxComputeBindings, _render->m_colorPalette);
 //							if (samplerStateIdx != currentSamplerStateIdx)
 //							{
 //								currentSamplerStateIdx = samplerStateIdx;
@@ -3945,12 +3976,12 @@ BX_UNUSED(currentSamplerStateIdx);
 
 					bool constantsChanged = false;
 					if (compute.m_uniformBegin < compute.m_uniformEnd
-					||  currentProgramIdx != key.m_program)
+					||  currentProgram.idx != key.m_program.idx)
 					{
 						rendererUpdateUniforms(this, _render->m_uniformBuffer[compute.m_uniformIdx], compute.m_uniformBegin, compute.m_uniformEnd);
 
-						currentProgramIdx = key.m_program;
-						ProgramVK& program = m_program[currentProgramIdx];
+						currentProgram = key.m_program;
+						ProgramVK& program = m_program[currentProgram.idx];
 
 						UniformBuffer* vcb = program.m_vsh->m_constantBuffer;
 						if (NULL != vcb)
@@ -3965,7 +3996,7 @@ BX_UNUSED(currentSamplerStateIdx);
 					if (constantsChanged
 					||  hasPredefined)
 					{
-						ProgramVK& program = m_program[currentProgramIdx];
+						ProgramVK& program = m_program[currentProgram.idx];
 						viewState.setPredefined<4>(this, view, 0, program, _render, compute);
 //						commitShaderConstants(key.m_program, gpuAddress);
 //						m_commandList->SetComputeRootConstantBufferView(Rdt::CBV, gpuAddress);
@@ -4061,7 +4092,7 @@ BX_UNUSED(currentSamplerStateIdx);
 					currentPipeline        = VK_NULL_HANDLE;
 					currentBindHash        = 0;
 					currentSamplerStateIdx = kInvalidHandle;
-					currentProgramIdx      = kInvalidHandle;
+					currentProgram         = BGFX_INVALID_HANDLE;
 					currentState.clear();
 					currentState.m_scissor = !draw.m_scissor;
 					changedFlags = BGFX_STATE_MASK;
@@ -4127,8 +4158,8 @@ BX_UNUSED(currentSamplerStateIdx);
 //										TextureD3D12& texture = m_textures[bind.m_idx];
 //										texture.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ);
 //										scratchBuffer.allocSrv(srvHandle[stage], texture);
-//										samplerFlags[stage] = (0 == (BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER & bind.m_un.m_draw.m_textureFlags)
-//											? bind.m_un.m_draw.m_textureFlags
+//										samplerFlags[stage] = (0 == (BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER & bind.m_textureFlags)
+//											? bind.m_textureFlags
 //											: texture.m_flags
 //											) & (BGFX_TEXTURE_SAMPLER_BITS_MASK|BGFX_TEXTURE_BORDER_COLOR_MASK)
 //											;
@@ -4241,11 +4272,11 @@ BX_UNUSED(currentSamplerStateIdx);
 
 					bool constantsChanged = false;
 					if (draw.m_uniformBegin < draw.m_uniformEnd
-					||  currentProgramIdx != key.m_program
+					||  currentProgram.idx != key.m_program.idx
 					||  BGFX_STATE_ALPHA_REF_MASK & changedFlags)
 					{
-						currentProgramIdx = key.m_program;
-						ProgramVK& program = m_program[currentProgramIdx];
+						currentProgram = key.m_program;
+						ProgramVK& program = m_program[currentProgram.idx];
 
 						UniformBuffer* vcb = program.m_vsh->m_constantBuffer;
 						if (NULL != vcb)
@@ -4266,7 +4297,7 @@ BX_UNUSED(currentSamplerStateIdx);
 					if (constantsChanged
 					||  hasPredefined)
 					{
-						ProgramVK& program = m_program[currentProgramIdx];
+						ProgramVK& program = m_program[currentProgram.idx];
 						uint32_t ref = (newFlags&BGFX_STATE_ALPHA_REF_MASK)>>BGFX_STATE_ALPHA_REF_SHIFT;
 						viewState.m_alphaRef = ref/255.0f;
 						viewState.setPredefined<4>(this, view, 0, program, _render, draw);
@@ -4356,8 +4387,8 @@ BX_UNUSED(currentSamplerStateIdx);
 
 		static int64_t min = frameTime;
 		static int64_t max = frameTime;
-		min = bx::int64_min(min, frameTime);
-		max = bx::int64_max(max, frameTime);
+		min = bx::min<int64_t>(min, frameTime);
+		max = bx::max<int64_t>(max, frameTime);
 
 		static uint32_t maxGpuLatency = 0;
 		static double   maxGpuElapsed = 0.0f;
@@ -4367,8 +4398,8 @@ BX_UNUSED(maxGpuLatency, maxGpuElapsed, elapsedGpuMs);
 		static int64_t presentMin = 0; //m_presentElapsed;
 		static int64_t presentMax = 0; //m_presentElapsed;
 BX_UNUSED(presentMin, presentMax);
-//		presentMin = bx::int64_min(presentMin, m_presentElapsed);
-//		presentMax = bx::int64_max(presentMax, m_presentElapsed);
+//		presentMin = bx::min<int64_t>(presentMin, m_presentElapsed);
+//		presentMax = bx::max<int64_t>(presentMax, m_presentElapsed);
 
 //		m_gpuTimer.end(m_commandList);
 
@@ -4391,6 +4422,7 @@ BX_UNUSED(presentMin, presentMax);
 //		perfStats.gpuTimerFreq  = m_gpuTimer.m_frequency;
 //		perfStats.numDraw       = statsKeyType[0];
 //		perfStats.numCompute    = statsKeyType[1];
+		perfStats.numBlit       = _render->m_numBlitItems;
 //		perfStats.maxGpuLatency = maxGpuLatency;
 		bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) );
 		perfStats.gpuMemoryMax  = -INT64_MAX;
@@ -4478,15 +4510,11 @@ BX_UNUSED(presentMin, presentMax);
 //					, double(presentMax)*toMs
 //					);
 
-				char hmd[16];
-				bx::snprintf(hmd, BX_COUNTOF(hmd), ", [%c] HMD ", hmdEnabled ? '\xfe' : ' ');
-
 				const uint32_t msaa = (m_resolution.reset&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT;
-				tvm.printf(10, pos++, 0x8b, " Reset flags: [%c] vsync, [%c] MSAAx%d%s, [%c] MaxAnisotropy "
+				tvm.printf(10, pos++, 0x8b, " Reset flags: [%c] vsync, [%c] MSAAx%d, [%c] MaxAnisotropy "
 					, !!(m_resolution.reset&BGFX_RESET_VSYNC) ? '\xfe' : ' '
 					, 0 != msaa ? '\xfe' : ' '
 					, 1<<msaa
-					, ", no-HMD "
 					, !!(m_resolution.reset&BGFX_RESET_MAXANISOTROPY) ? '\xfe' : ' '
 					);
 
@@ -4520,7 +4548,7 @@ BX_UNUSED(presentMin, presentMax);
 //					, m_batch.m_stats.m_numImmediate[BatchD3D12::DrawIndexed]
 //					);
 
- 				if (NULL != m_renderdocdll)
+ 				if (NULL != m_renderDocDll)
  				{
  					tvm.printf(tvm.m_width-27, 0, 0x4f, " [F11 - RenderDoc capture] ");
  				}

+ 14 - 5
bgfx.mod/bgfx/src/shader.cpp

@@ -75,14 +75,23 @@ namespace bgfx
 		uint32_t magic;
 		bx::peek(_reader, magic);
 
-		if (BGFX_CHUNK_MAGIC_CSH == magic
-		||  BGFX_CHUNK_MAGIC_FSH == magic
-		||  BGFX_CHUNK_MAGIC_VSH == magic)
+		if (isShaderBin(magic) )
 		{
 			bx::read(_reader, magic);
 
-			uint32_t iohash;
-			bx::read(_reader, iohash, _err);
+			uint32_t hashIn;
+			bx::read(_reader, hashIn);
+
+			uint32_t hashOut;
+
+			if (isShaderVerLess(magic, 6) )
+			{
+				hashOut = hashIn;
+			}
+			else
+			{
+				bx::read(_reader, hashOut);
+			}
 
 			uint16_t count;
 			bx::read(_reader, count, _err);

+ 3 - 3
bgfx.mod/bgfx/src/shader_dxbc.cpp

@@ -147,7 +147,7 @@ namespace bgfx
 		{ 5, 0 }, // GATHER4_C
 		{ 5, 0 }, // GATHER4_PO
 		{ 0, 0 }, // GATHER4_PO_C
-		{ 0, 0 }, // RCP
+		{ 2, 0 }, // RCP
 		{ 0, 0 }, // F32TOF16
 		{ 0, 0 }, // F16TOF32
 		{ 0, 0 }, // UADDC
@@ -156,8 +156,8 @@ namespace bgfx
 		{ 0, 0 }, // FIRSTBIT_HI
 		{ 0, 0 }, // FIRSTBIT_LO
 		{ 0, 0 }, // FIRSTBIT_SHI
-		{ 0, 0 }, // UBFE
-		{ 0, 0 }, // IBFE
+		{ 4, 0 }, // UBFE
+		{ 4, 0 }, // IBFE
 		{ 5, 0 }, // BFI
 		{ 0, 0 }, // BFREV
 		{ 5, 0 }, // SWAPC

+ 3 - 2
bgfx.mod/bgfx/src/shader_spirv.h

@@ -15,8 +15,9 @@ BX_ERROR_RESULT(BGFX_SHADER_SPIRV_INVALID_INSTRUCTION, BX_MAKEFOURCC('S', 'H', 0
 
 namespace bgfx
 {
-	// Reference: https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html
-
+	// Reference(s):
+	// - https://web.archive.org/web/20181126035927/https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html
+	//
 	struct SpvOpcode
 	{
 		enum Enum

+ 47 - 9
bgfx.mod/bgfx/src/topology.cpp

@@ -37,6 +37,37 @@ namespace bgfx
 		return _numIndices;
 	}
 
+	inline bool isEven(uint32_t _num)
+	{
+		return 0 == (_num & 1);
+	}
+
+	template<typename IndexT>
+	static uint32_t topologyConvertTriStripFlipWinding(void* _dst, uint32_t _dstSize, const IndexT* _indices, uint32_t _numIndices)
+	{
+		const uint32_t numIndices = isEven(_numIndices) ? _numIndices + 1 : _numIndices;
+
+		if (NULL != _dst)
+		{
+			return numIndices;
+		}
+
+		IndexT* dst = (IndexT*)_dst;
+		IndexT* end = &dst[_dstSize/sizeof(IndexT)];
+
+		if (isEven(_numIndices) )
+		{
+			*dst++ = _indices[_numIndices-1];
+		}
+
+		for (uint32_t ii = 1; ii <= _numIndices && dst < end; ++ii)
+		{
+			*dst++ = _indices[_numIndices - ii];
+		}
+
+		return numIndices;
+	}
+
 	template<typename IndexT, typename SortT>
 	static uint32_t topologyConvertTriListToLineList(void* _dst, uint32_t _dstSize, const IndexT* _indices, uint32_t _numIndices, IndexT* _temp, SortT* _tempSort)
 	{
@@ -47,9 +78,9 @@ namespace bgfx
 			const IndexT* tri = &_indices[ii];
 			IndexT i0 = tri[0], i1 = tri[1], i2 = tri[2];
 
-			if (i0 > i1) { bx::xchg(i0, i1); }
-			if (i1 > i2) { bx::xchg(i1, i2); }
-			if (i0 > i1) { bx::xchg(i0, i1); }
+			if (i0 > i1) { bx::swap(i0, i1); }
+			if (i1 > i2) { bx::swap(i1, i2); }
+			if (i0 > i1) { bx::swap(i0, i1); }
 			BX_CHECK(i0 < i1 && i1 < i2, "");
 
 			dst[1] = i0; dst[0] = i1;
@@ -195,6 +226,14 @@ namespace bgfx
 
 			return topologyConvertTriListFlipWinding(_dst, _dstSize, (const uint16_t*)_indices, _numIndices);
 
+		case TopologyConvert::TriStripFlipWinding:
+			if (_index32)
+			{
+				return topologyConvertTriStripFlipWinding(_dst, _dstSize, (const uint32_t*)_indices, _numIndices);
+			}
+
+			return topologyConvertTriStripFlipWinding(_dst, _dstSize, (const uint16_t*)_indices, _numIndices);
+
 		case TopologyConvert::TriListToLineList:
 			if (NULL == _allocator)
 			{
@@ -238,22 +277,21 @@ namespace bgfx
 		return (_a + _b + _c) * 1.0f/3.0f;
 	}
 
-	const float* vertexPos(const void* _vertices, uint32_t _stride, uint32_t _index)
+	const bx::Vec3 vertexPos(const void* _vertices, uint32_t _stride, uint32_t _index)
 	{
 		const uint8_t* vertices = (const uint8_t*)_vertices;
-		return (const float*)&vertices[_index*_stride];
+		return bx::load(&vertices[_index*_stride]);
 	}
 
 	inline float distanceDir(const float* __restrict _dir, const void* __restrict _vertices, uint32_t _stride, uint32_t _index)
 	{
-		return bx::vec3Dot(vertexPos(_vertices, _stride, _index), _dir);
+		return bx::dot(vertexPos(_vertices, _stride, _index), bx::load(_dir) );
 	}
 
 	inline float distancePos(const float* __restrict _pos, const void* __restrict _vertices, uint32_t _stride, uint32_t _index)
 	{
-		float tmp[3];
-		bx::vec3Sub(tmp, _pos, vertexPos(_vertices, _stride, _index) );
-		return bx::sqrt(bx::vec3Dot(tmp, tmp) );
+		const bx::Vec3 tmp = bx::sub(bx::load(_pos), vertexPos(_vertices, _stride, _index) );
+		return bx::sqrt(bx::dot(tmp, tmp) );
 	}
 
 	typedef float (*KeyFn)(float, float, float);

+ 23 - 53
bgfx.mod/bgfx/src/vertexdecl.cpp

@@ -10,7 +10,6 @@
 #include <bx/string.h>
 #include <bx/uint32_t.h>
 
-#include "config.h"
 #include "vertexdecl.h"
 
 namespace bgfx
@@ -122,64 +121,35 @@ namespace bgfx
 
 	static const char* s_attrName[] =
 	{
-		"Attrib::Position",
-		"Attrib::Normal",
-		"Attrib::Tangent",
-		"Attrib::Bitangent",
-		"Attrib::Color0",
-		"Attrib::Color1",
-		"Attrib::Color2",
-		"Attrib::Color3",
-		"Attrib::Indices",
-		"Attrib::Weights",
-		"Attrib::TexCoord0",
-		"Attrib::TexCoord1",
-		"Attrib::TexCoord2",
-		"Attrib::TexCoord3",
-		"Attrib::TexCoord4",
-		"Attrib::TexCoord5",
-		"Attrib::TexCoord6",
-		"Attrib::TexCoord7",
+		"P",  "Attrib::Position",
+		"N",  "Attrib::Normal",
+		"T",  "Attrib::Tangent",
+		"B",  "Attrib::Bitangent",
+		"C0", "Attrib::Color0",
+		"C1", "Attrib::Color1",
+		"C2", "Attrib::Color2",
+		"C3", "Attrib::Color3",
+		"I",  "Attrib::Indices",
+		"W",  "Attrib::Weights",
+		"T0", "Attrib::TexCoord0",
+		"T1", "Attrib::TexCoord1",
+		"T2", "Attrib::TexCoord2",
+		"T3", "Attrib::TexCoord3",
+		"T4", "Attrib::TexCoord4",
+		"T5", "Attrib::TexCoord5",
+		"T6", "Attrib::TexCoord6",
+		"T7", "Attrib::TexCoord7",
 	};
-	BX_STATIC_ASSERT(BX_COUNTOF(s_attrName) == Attrib::Count);
+	BX_STATIC_ASSERT(BX_COUNTOF(s_attrName) == Attrib::Count*2);
 
-	const char* getAttribName(Attrib::Enum _attr)
+	const char* getAttribNameShort(Attrib::Enum _attr)
 	{
-		return s_attrName[_attr];
+		return s_attrName[_attr*2+0];
 	}
 
-	void dump(const VertexDecl& _decl)
+	const char* getAttribName(Attrib::Enum _attr)
 	{
-		if (BX_ENABLED(BGFX_CONFIG_DEBUG) )
-		{
-			bx::debugPrintf("vertexdecl %08x (%08x), stride %d\n"
-				, _decl.m_hash
-				, bx::hash<bx::HashMurmur2A>(_decl.m_attributes)
-				, _decl.m_stride
-				);
-
-			for (uint32_t attr = 0; attr < Attrib::Count; ++attr)
-			{
-				if (UINT16_MAX != _decl.m_attributes[attr])
-				{
-					uint8_t num;
-					AttribType::Enum type;
-					bool normalized;
-					bool asInt;
-					_decl.decode(Attrib::Enum(attr), num, type, normalized, asInt);
-
-					bx::debugPrintf("\tattr %d - %s, num %d, type %d, norm %d, asint %d, offset %d\n"
-						, attr
-						, getAttribName(Attrib::Enum(attr) )
-						, num
-						, type
-						, normalized
-						, asInt
-						, _decl.m_offset[attr]
-					);
-				}
-			}
-		}
+		return s_attrName[_attr*2+1];
 	}
 
 	struct AttribToId

+ 2 - 2
bgfx.mod/bgfx/src/vertexdecl.h

@@ -17,8 +17,8 @@ namespace bgfx
 	/// Returns attribute name.
 	const char* getAttribName(Attrib::Enum _attr);
 
-	/// Dump vertex declaration into debug output.
-	void dump(const VertexDecl& _decl);
+	///
+	const char* getAttribNameShort(Attrib::Enum _attr);
 
 	///
 	Attrib::Enum idToAttrib(uint16_t id);

+ 88 - 78
bgfx.mod/common.bmx

@@ -46,7 +46,7 @@ Extern
 '	Function bgfx_init(renderType:Int, vendorId:Short, deviceId:Short, cb1:Byte Ptr, cb2:Byte Ptr)
 	Function bmx_bgfx_init:Int(width:Int, height:Int, rendererType:Int)
 	Function bmx_bgfx_frame:Int(capture:Int)
-	Function bmx_bgfx_reset(width:Int, height:Int, flags:Int)
+	Function bmx_bgfx_reset(width:Int, height:Int, flags:Int, format:Int)
 	Function bmx_bgfx_shutdown()
 	Function bgfx_alloc:Byte Ptr(size:Int)
 	Function bgfx_copy:Byte Ptr(data:Byte Ptr, size:Int)
@@ -87,7 +87,7 @@ Extern
 
 	Function bmx_bgfx_set_debug(debugFlags:Int)
 	Function bmx_bgfx_dbg_text_clear(attr:Byte, small:Int)
-	Function bmx_bgfx_dbg_text_printf(x:Short, y:Short, attr:Byte, text:String)
+	Function bmx_bgfx_dbg_text_printf(x:Short, y:Short, attr:Byte, Text:String)
 	Function bmx_bgfx_dbg_text_image(x:Short, y:Short, width:Short, height:Short, data:Byte Ptr, pitch:Short)
 
 
@@ -422,82 +422,92 @@ Const BGFX_BUFFER_ALLOW_RESIZE:Int = $04
 Const BGFX_BUFFER_INDEX32:Int = $08
 Const BGFX_BUFFER_COMPUTE_READ_WRITE:Int = BGFX_BUFFER_COMPUTE_READ | BGFX_BUFFER_COMPUTE_WRITE
 
-Const BGFX_TEXTURE_FORMAT_BC1:Int = 0
-Const BGFX_TEXTURE_FORMAT_BC2:Int = 1
-Const BGFX_TEXTURE_FORMAT_BC3:Int = 2
-Const BGFX_TEXTURE_FORMAT_BC4:Int = 3
-Const BGFX_TEXTURE_FORMAT_BC5:Int = 4
-Const BGFX_TEXTURE_FORMAT_BC6H:Int = 5
-Const BGFX_TEXTURE_FORMAT_BC7:Int = 6
-Const BGFX_TEXTURE_FORMAT_ETC1:Int = 7
-Const BGFX_TEXTURE_FORMAT_ETC2:Int = 8
-Const BGFX_TEXTURE_FORMAT_ETC2A:Int = 9
-Const BGFX_TEXTURE_FORMAT_ETC2A1:Int = 10
-Const BGFX_TEXTURE_FORMAT_PTC12:Int = 11
-Const BGFX_TEXTURE_FORMAT_PTC14:Int = 12
-Const BGFX_TEXTURE_FORMAT_PTC12A:Int = 13
-Const BGFX_TEXTURE_FORMAT_PTC14A:Int = 14
-Const BGFX_TEXTURE_FORMAT_PTC22:Int = 15
-Const BGFX_TEXTURE_FORMAT_PTC24:Int = 16
-Const BGFX_TEXTURE_FORMAT_UNKNOWN:Int = 17
-Const BGFX_TEXTURE_FORMAT_R1:Int = 18
-Const BGFX_TEXTURE_FORMAT_A8:Int = 19
-Const BGFX_TEXTURE_FORMAT_R8:Int = 20
-Const BGFX_TEXTURE_FORMAT_R8I:Int = 21
-Const BGFX_TEXTURE_FORMAT_R8U:Int = 22
-Const BGFX_TEXTURE_FORMAT_R8S:Int = 23
-Const BGFX_TEXTURE_FORMAT_R16:Int = 24
-Const BGFX_TEXTURE_FORMAT_R16I:Int = 25
-Const BGFX_TEXTURE_FORMAT_R16U:Int = 26
-Const BGFX_TEXTURE_FORMAT_R16F:Int = 27
-Const BGFX_TEXTURE_FORMAT_R16S:Int = 28
-Const BGFX_TEXTURE_FORMAT_R32I:Int = 29
-Const BGFX_TEXTURE_FORMAT_R32U:Int = 30
-Const BGFX_TEXTURE_FORMAT_R32F:Int = 31
-Const BGFX_TEXTURE_FORMAT_RG8:Int = 32
-Const BGFX_TEXTURE_FORMAT_RG8I:Int = 33
-Const BGFX_TEXTURE_FORMAT_RG8U:Int = 34
-Const BGFX_TEXTURE_FORMAT_RG8S:Int = 35
-Const BGFX_TEXTURE_FORMAT_RG16:Int = 36
-Const BGFX_TEXTURE_FORMAT_RG16I:Int = 37
-Const BGFX_TEXTURE_FORMAT_RG16U:Int = 38
-Const BGFX_TEXTURE_FORMAT_RG16F:Int = 39
-Const BGFX_TEXTURE_FORMAT_RG16S:Int = 40
-Const BGFX_TEXTURE_FORMAT_RG32I:Int = 41
-Const BGFX_TEXTURE_FORMAT_RG32U:Int = 42
-Const BGFX_TEXTURE_FORMAT_RG32F:Int = 43
-Const BGFX_TEXTURE_FORMAT_RGB8:Int = 44
-Const BGFX_TEXTURE_FORMAT_RGB8I:Int = 45
-Const BGFX_TEXTURE_FORMAT_RGB8U:Int = 46
-Const BGFX_TEXTURE_FORMAT_RGB8S:Int = 47
-Const BGFX_TEXTURE_FORMAT_RGB9E5F:Int = 48
-Const BGFX_TEXTURE_FORMAT_BGRA8:Int = 49
-Const BGFX_TEXTURE_FORMAT_RGBA8:Int = 50
-Const BGFX_TEXTURE_FORMAT_RGBA8I:Int = 51
-Const BGFX_TEXTURE_FORMAT_RGBA8U:Int = 52
-Const BGFX_TEXTURE_FORMAT_RGBA8S:Int = 53
-Const BGFX_TEXTURE_FORMAT_RGBA16:Int = 54
-Const BGFX_TEXTURE_FORMAT_RGBA16I:Int = 55
-Const BGFX_TEXTURE_FORMAT_RGBA16U:Int = 56
-Const BGFX_TEXTURE_FORMAT_RGBA16F:Int = 57
-Const BGFX_TEXTURE_FORMAT_RGBA16S:Int = 58
-Const BGFX_TEXTURE_FORMAT_RGBA32I:Int = 59
-Const BGFX_TEXTURE_FORMAT_RGBA32U:Int = 60
-Const BGFX_TEXTURE_FORMAT_RGBA32F:Int = 61
-Const BGFX_TEXTURE_FORMAT_R5G6B5:Int = 62
-Const BGFX_TEXTURE_FORMAT_RGBA4:Int = 63
-Const BGFX_TEXTURE_FORMAT_RGB5A1:Int = 64
-Const BGFX_TEXTURE_FORMAT_RGB10A2:Int = 65
-Const BGFX_TEXTURE_FORMAT_RG11B10F:Int = 66
-Const BGFX_TEXTURE_FORMAT_UNKNOWN_DEPTH:Int = 67
-Const BGFX_TEXTURE_FORMAT_D16:Int = 68
-Const BGFX_TEXTURE_FORMAT_D24:Int = 69
-Const BGFX_TEXTURE_FORMAT_D24S8:Int = 70
-Const BGFX_TEXTURE_FORMAT_D32:Int = 71
-Const BGFX_TEXTURE_FORMAT_D16F:Int = 72
-Const BGFX_TEXTURE_FORMAT_D24F:Int = 73
-Const BGFX_TEXTURE_FORMAT_D32F:Int = 74
-Const BGFX_TEXTURE_FORMAT_D0S8:Int = 75
+Const BGFX_TEXTURE_FORMAT_BC1:Int = 0          ' DXT1
+Const BGFX_TEXTURE_FORMAT_BC2:Int = 1          ' DXT3
+Const BGFX_TEXTURE_FORMAT_BC3:Int = 2          ' DXT5
+Const BGFX_TEXTURE_FORMAT_BC4:Int = 3          ' LATC1/ATI1
+Const BGFX_TEXTURE_FORMAT_BC5:Int = 4          ' LATC2/ATI2
+Const BGFX_TEXTURE_FORMAT_BC6H:Int = 5         ' BC6H
+Const BGFX_TEXTURE_FORMAT_BC7:Int = 6          ' BC7
+Const BGFX_TEXTURE_FORMAT_ETC1:Int = 7         ' ETC1 RGB8
+Const BGFX_TEXTURE_FORMAT_ETC2:Int = 8         ' ETC2 RGB8
+Const BGFX_TEXTURE_FORMAT_ETC2A:Int = 9        ' ETC2 RGBA8
+Const BGFX_TEXTURE_FORMAT_ETC2A1:Int = 10      ' ETC2 RGB8A1
+Const BGFX_TEXTURE_FORMAT_PTC12:Int = 11       ' PVRTC1 RGB 2BPP
+Const BGFX_TEXTURE_FORMAT_PTC14:Int = 12       ' PVRTC1 RGB 4BPP
+Const BGFX_TEXTURE_FORMAT_PTC12A:Int = 13      ' PVRTC1 RGBA 2BPP
+Const BGFX_TEXTURE_FORMAT_PTC14A:Int = 14      ' PVRTC1 RGBA 4BPP
+Const BGFX_TEXTURE_FORMAT_PTC22:Int = 15       ' PVRTC2 RGBA 2BPP
+Const BGFX_TEXTURE_FORMAT_PTC24:Int = 16       ' PVRTC2 RGBA 4BPP
+Const BGFX_TEXTURE_FORMAT_ATC:Int = 17         ' ATC RGB 4BPP
+Const BGFX_TEXTURE_FORMAT_ATCE:Int = 18        ' ATCE RGBA 8 BPP explicit alpha
+Const BGFX_TEXTURE_FORMAT_ATCI:Int = 19        ' ATCI RGBA 8 BPP interpolated alpha
+Const BGFX_TEXTURE_FORMAT_ASTC4x4:Int = 20     ' ASTC 4x4 8.0 BPP
+Const BGFX_TEXTURE_FORMAT_ASTC5x5:Int = 21     ' ASTC 5x5 5.12 BPP
+Const BGFX_TEXTURE_FORMAT_ASTC6x6:Int = 22     ' ASTC 6x6 3.56 BPP
+Const BGFX_TEXTURE_FORMAT_ASTC8x5:Int = 23     ' ASTC 8x5 3.20 BPP
+Const BGFX_TEXTURE_FORMAT_ASTC8x6:Int = 24     ' ASTC 8x6 2.67 BPP
+Const BGFX_TEXTURE_FORMAT_ASTC10x5:Int = 25    ' ASTC 10x5 2.56 BPP
+Const BGFX_TEXTURE_FORMAT_UNKNOWN:Int = 26     ' Compressed formats above.
+Const BGFX_TEXTURE_FORMAT_R1:Int = 27
+Const BGFX_TEXTURE_FORMAT_A8:Int = 28
+Const BGFX_TEXTURE_FORMAT_R8:Int = 29
+Const BGFX_TEXTURE_FORMAT_R8I:Int = 30
+Const BGFX_TEXTURE_FORMAT_R8U:Int = 31
+Const BGFX_TEXTURE_FORMAT_R8S:Int = 32
+Const BGFX_TEXTURE_FORMAT_R16:Int = 33
+Const BGFX_TEXTURE_FORMAT_R16I:Int = 34
+Const BGFX_TEXTURE_FORMAT_R16U:Int = 35
+Const BGFX_TEXTURE_FORMAT_R16F:Int = 36
+Const BGFX_TEXTURE_FORMAT_R16S:Int = 37
+Const BGFX_TEXTURE_FORMAT_R32I:Int = 38
+Const BGFX_TEXTURE_FORMAT_R32U:Int = 39
+Const BGFX_TEXTURE_FORMAT_R32F:Int = 40
+Const BGFX_TEXTURE_FORMAT_RG8:Int = 41
+Const BGFX_TEXTURE_FORMAT_RG8I:Int = 42
+Const BGFX_TEXTURE_FORMAT_RG8U:Int = 43
+Const BGFX_TEXTURE_FORMAT_RG8S:Int = 44
+Const BGFX_TEXTURE_FORMAT_RG16:Int = 45
+Const BGFX_TEXTURE_FORMAT_RG16I:Int = 46
+Const BGFX_TEXTURE_FORMAT_RG16U:Int = 47
+Const BGFX_TEXTURE_FORMAT_RG16F:Int = 48
+Const BGFX_TEXTURE_FORMAT_RG16S:Int = 49
+Const BGFX_TEXTURE_FORMAT_RG32I:Int = 50
+Const BGFX_TEXTURE_FORMAT_RG32U:Int = 51
+Const BGFX_TEXTURE_FORMAT_RG32F:Int = 52
+Const BGFX_TEXTURE_FORMAT_RGB8:Int = 53
+Const BGFX_TEXTURE_FORMAT_RGB8I:Int = 54
+Const BGFX_TEXTURE_FORMAT_RGB8U:Int = 55
+Const BGFX_TEXTURE_FORMAT_RGB8S:Int = 56
+Const BGFX_TEXTURE_FORMAT_RGB9E5F:Int = 57
+Const BGFX_TEXTURE_FORMAT_BGRA8:Int = 58
+Const BGFX_TEXTURE_FORMAT_RGBA8:Int = 59
+Const BGFX_TEXTURE_FORMAT_RGBA8I:Int = 60
+Const BGFX_TEXTURE_FORMAT_RGBA8U:Int = 61
+Const BGFX_TEXTURE_FORMAT_RGBA8S:Int = 62
+Const BGFX_TEXTURE_FORMAT_RGBA16:Int = 63
+Const BGFX_TEXTURE_FORMAT_RGBA16I:Int = 64
+Const BGFX_TEXTURE_FORMAT_RGBA16U:Int = 65
+Const BGFX_TEXTURE_FORMAT_RGBA16F:Int = 66
+Const BGFX_TEXTURE_FORMAT_RGBA16S:Int = 67
+Const BGFX_TEXTURE_FORMAT_RGBA32I:Int = 68
+Const BGFX_TEXTURE_FORMAT_RGBA32U:Int = 69
+Const BGFX_TEXTURE_FORMAT_RGBA32F:Int = 70
+Const BGFX_TEXTURE_FORMAT_R5G6B5:Int = 71
+Const BGFX_TEXTURE_FORMAT_RGBA4:Int = 72
+Const BGFX_TEXTURE_FORMAT_RGB5A1:Int = 73
+Const BGFX_TEXTURE_FORMAT_RGB10A2:Int = 74
+Const BGFX_TEXTURE_FORMAT_RG11B10F:Int = 75
+Const BGFX_TEXTURE_FORMAT_UNKNOWNDEPTH:Int = 76 ' Depth formats below.
+Const BGFX_TEXTURE_FORMAT_D16:Int = 77
+Const BGFX_TEXTURE_FORMAT_D24:Int = 78
+Const BGFX_TEXTURE_FORMAT_D24S8:Int = 79
+Const BGFX_TEXTURE_FORMAT_D32:Int = 80
+Const BGFX_TEXTURE_FORMAT_D16F:Int = 81
+Const BGFX_TEXTURE_FORMAT_D24F:Int = 82
+Const BGFX_TEXTURE_FORMAT_D32F:Int = 83
+Const BGFX_TEXTURE_FORMAT_D0S8:Int = 84
+Const BGFX_TEXTURE_FORMAT_COUNT:Int = 85
 
 
 Const BGFX_ATTRIB_POSITION:Int = 0

+ 1 - 1
bgfx.mod/examples/example_01.bmx

@@ -1,3 +1,3 @@
 SuperStrict
 
-Framework bgfx.bgfx
+Framework gfx.bgfx

+ 6 - 5
bgfx.mod/glue.c

@@ -33,7 +33,7 @@
 int bmx_bgfx_init(int width, int height, int rendererType);
 
 uint32_t bmx_bgfx_frame(int capture);
-void bmx_bgfx_reset(uint32_t width, uint32_t height, uint32_t flags);
+void bmx_bgfx_reset(uint32_t width, uint32_t height, uint32_t flags, int format);
 void bmx_bgfx_shutdown();
 
 //void bmx_bgfx_set_clear_color(int index, int r, int g, int b, int a);
@@ -207,7 +207,7 @@ int bmx_bgfx_init(int width, int height, int rendererType) {
 		return 0;
 	}
 
-	bgfx_reset(width, height, BGFX_RESET_VSYNC);	
+	bgfx_reset(width, height, BGFX_RESET_VSYNC, BGFX_TEXTURE_FORMAT_COUNT);	
 
 	return 1;
 }
@@ -216,8 +216,8 @@ uint32_t bmx_bgfx_frame(int capture) {
 	return bgfx_frame(capture);
 }
 
-void bmx_bgfx_reset(uint32_t width, uint32_t height, uint32_t flags) {
-	bgfx_reset(width, height, flags);
+void bmx_bgfx_reset(uint32_t width, uint32_t height, uint32_t flags, int format) {
+	bgfx_reset(width, height, flags, format);
 }
 
 void bmx_bgfx_shutdown() {
@@ -345,7 +345,8 @@ uint16_t bmx_bgfx_get_shader_uniforms(uint16_t shader, uint16_t * uniforms, uint
 
 void bmx_bgfx_set_shader_name(uint16_t shader, BBString * name) {
 	char * n = bbStringToUTF8String(name);
-	bgfx_set_shader_name(*(bgfx_shader_handle_t*)(&shader), n);
+	int len = strlen(n);
+	bgfx_set_shader_name(*(bgfx_shader_handle_t*)(&shader), n, len);
 	bbMemFree(n);
 }
 

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov