Updated directx-headers.
This commit is contained in:
parent
cb439deae3
commit
358f48879a
21
3rdparty/directx-headers/LICENSE
vendored
Normal file
21
3rdparty/directx-headers/LICENSE
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
MIT License
|
||||
|
||||
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.
|
File diff suppressed because it is too large
Load Diff
739
3rdparty/directx-headers/include/directx/d3d12compatibility.h
vendored
Normal file
739
3rdparty/directx-headers/include/directx/d3d12compatibility.h
vendored
Normal file
@ -0,0 +1,739 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
* Licensed under the MIT license
|
||||
*
|
||||
*-------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 8.01.0628 */
|
||||
|
||||
|
||||
|
||||
/* 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 __d3d12compatibility_h__
|
||||
#define __d3d12compatibility_h__
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifndef DECLSPEC_XFGVIRT
|
||||
#if defined(_CONTROL_FLOW_GUARD_XFG)
|
||||
#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
|
||||
#else
|
||||
#define DECLSPEC_XFGVIRT(base, func)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Forward Declarations */
|
||||
|
||||
#ifndef __ID3D12CompatibilityDevice_FWD_DEFINED__
|
||||
#define __ID3D12CompatibilityDevice_FWD_DEFINED__
|
||||
typedef interface ID3D12CompatibilityDevice ID3D12CompatibilityDevice;
|
||||
|
||||
#endif /* __ID3D12CompatibilityDevice_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __D3D11On12CreatorID_FWD_DEFINED__
|
||||
#define __D3D11On12CreatorID_FWD_DEFINED__
|
||||
typedef interface D3D11On12CreatorID D3D11On12CreatorID;
|
||||
|
||||
#endif /* __D3D11On12CreatorID_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __D3D9On12CreatorID_FWD_DEFINED__
|
||||
#define __D3D9On12CreatorID_FWD_DEFINED__
|
||||
typedef interface D3D9On12CreatorID D3D9On12CreatorID;
|
||||
|
||||
#endif /* __D3D9On12CreatorID_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __OpenGLOn12CreatorID_FWD_DEFINED__
|
||||
#define __OpenGLOn12CreatorID_FWD_DEFINED__
|
||||
typedef interface OpenGLOn12CreatorID OpenGLOn12CreatorID;
|
||||
|
||||
#endif /* __OpenGLOn12CreatorID_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __OpenCLOn12CreatorID_FWD_DEFINED__
|
||||
#define __OpenCLOn12CreatorID_FWD_DEFINED__
|
||||
typedef interface OpenCLOn12CreatorID OpenCLOn12CreatorID;
|
||||
|
||||
#endif /* __OpenCLOn12CreatorID_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __DirectMLTensorFlowCreatorID_FWD_DEFINED__
|
||||
#define __DirectMLTensorFlowCreatorID_FWD_DEFINED__
|
||||
typedef interface DirectMLTensorFlowCreatorID DirectMLTensorFlowCreatorID;
|
||||
|
||||
#endif /* __DirectMLTensorFlowCreatorID_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __DirectMLPyTorchCreatorID_FWD_DEFINED__
|
||||
#define __DirectMLPyTorchCreatorID_FWD_DEFINED__
|
||||
typedef interface DirectMLPyTorchCreatorID DirectMLPyTorchCreatorID;
|
||||
|
||||
#endif /* __DirectMLPyTorchCreatorID_FWD_DEFINED__ */
|
||||
|
||||
|
||||
/* header files for imported files */
|
||||
#include "oaidl.h"
|
||||
#include "ocidl.h"
|
||||
#include "d3d11on12.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3d12compatibility_0000_0000 */
|
||||
/* [local] */
|
||||
|
||||
#include <winapifamily.h>
|
||||
#pragma region Desktop Family
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
|
||||
typedef
|
||||
enum D3D12_COMPATIBILITY_SHARED_FLAGS
|
||||
{
|
||||
D3D12_COMPATIBILITY_SHARED_FLAG_NONE = 0,
|
||||
D3D12_COMPATIBILITY_SHARED_FLAG_NON_NT_HANDLE = 0x1,
|
||||
D3D12_COMPATIBILITY_SHARED_FLAG_KEYED_MUTEX = 0x2,
|
||||
D3D12_COMPATIBILITY_SHARED_FLAG_9_ON_12 = 0x4
|
||||
} D3D12_COMPATIBILITY_SHARED_FLAGS;
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMPATIBILITY_SHARED_FLAGS );
|
||||
typedef
|
||||
enum D3D12_REFLECT_SHARED_PROPERTY
|
||||
{
|
||||
D3D12_REFLECT_SHARED_PROPERTY_D3D11_RESOURCE_FLAGS = 0,
|
||||
D3D12_REFELCT_SHARED_PROPERTY_COMPATIBILITY_SHARED_FLAGS = ( D3D12_REFLECT_SHARED_PROPERTY_D3D11_RESOURCE_FLAGS + 1 ) ,
|
||||
D3D12_REFLECT_SHARED_PROPERTY_NON_NT_SHARED_HANDLE = ( D3D12_REFELCT_SHARED_PROPERTY_COMPATIBILITY_SHARED_FLAGS + 1 )
|
||||
} D3D12_REFLECT_SHARED_PROPERTY;
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compatibility_0000_0000_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compatibility_0000_0000_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __ID3D12CompatibilityDevice_INTERFACE_DEFINED__
|
||||
#define __ID3D12CompatibilityDevice_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3D12CompatibilityDevice */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3D12CompatibilityDevice;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("8f1c0e3c-fae3-4a82-b098-bfe1708207ff")
|
||||
ID3D12CompatibilityDevice : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateSharedResource(
|
||||
_In_ const D3D12_HEAP_PROPERTIES *pHeapProperties,
|
||||
D3D12_HEAP_FLAGS HeapFlags,
|
||||
_In_ const D3D12_RESOURCE_DESC *pDesc,
|
||||
D3D12_RESOURCE_STATES InitialResourceState,
|
||||
_In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue,
|
||||
_In_opt_ const D3D11_RESOURCE_FLAGS *pFlags11,
|
||||
D3D12_COMPATIBILITY_SHARED_FLAGS CompatibilityFlags,
|
||||
_In_opt_ ID3D12LifetimeTracker *pLifetimeTracker,
|
||||
_In_opt_ ID3D12SwapChainAssistant *pOwningSwapchain,
|
||||
REFIID riid,
|
||||
_COM_Outptr_opt_ void **ppResource) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateSharedHeap(
|
||||
_In_ const D3D12_HEAP_DESC *pHeapDesc,
|
||||
D3D12_COMPATIBILITY_SHARED_FLAGS CompatibilityFlags,
|
||||
REFIID riid,
|
||||
_COM_Outptr_opt_ void **ppHeap) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE ReflectSharedProperties(
|
||||
_In_ ID3D12Object *pHeapOrResource,
|
||||
D3D12_REFLECT_SHARED_PROPERTY ReflectType,
|
||||
_Out_writes_bytes_(DataSize) void *pData,
|
||||
UINT DataSize) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3D12CompatibilityDeviceVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3D12CompatibilityDevice * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3D12CompatibilityDevice * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3D12CompatibilityDevice * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompatibilityDevice, CreateSharedResource)
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateSharedResource )(
|
||||
ID3D12CompatibilityDevice * This,
|
||||
_In_ const D3D12_HEAP_PROPERTIES *pHeapProperties,
|
||||
D3D12_HEAP_FLAGS HeapFlags,
|
||||
_In_ const D3D12_RESOURCE_DESC *pDesc,
|
||||
D3D12_RESOURCE_STATES InitialResourceState,
|
||||
_In_opt_ const D3D12_CLEAR_VALUE *pOptimizedClearValue,
|
||||
_In_opt_ const D3D11_RESOURCE_FLAGS *pFlags11,
|
||||
D3D12_COMPATIBILITY_SHARED_FLAGS CompatibilityFlags,
|
||||
_In_opt_ ID3D12LifetimeTracker *pLifetimeTracker,
|
||||
_In_opt_ ID3D12SwapChainAssistant *pOwningSwapchain,
|
||||
REFIID riid,
|
||||
_COM_Outptr_opt_ void **ppResource);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompatibilityDevice, CreateSharedHeap)
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateSharedHeap )(
|
||||
ID3D12CompatibilityDevice * This,
|
||||
_In_ const D3D12_HEAP_DESC *pHeapDesc,
|
||||
D3D12_COMPATIBILITY_SHARED_FLAGS CompatibilityFlags,
|
||||
REFIID riid,
|
||||
_COM_Outptr_opt_ void **ppHeap);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompatibilityDevice, ReflectSharedProperties)
|
||||
HRESULT ( STDMETHODCALLTYPE *ReflectSharedProperties )(
|
||||
ID3D12CompatibilityDevice * This,
|
||||
_In_ ID3D12Object *pHeapOrResource,
|
||||
D3D12_REFLECT_SHARED_PROPERTY ReflectType,
|
||||
_Out_writes_bytes_(DataSize) void *pData,
|
||||
UINT DataSize);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3D12CompatibilityDeviceVtbl;
|
||||
|
||||
interface ID3D12CompatibilityDevice
|
||||
{
|
||||
CONST_VTBL struct ID3D12CompatibilityDeviceVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3D12CompatibilityDevice_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3D12CompatibilityDevice_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3D12CompatibilityDevice_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3D12CompatibilityDevice_CreateSharedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,pFlags11,CompatibilityFlags,pLifetimeTracker,pOwningSwapchain,riid,ppResource) \
|
||||
( (This)->lpVtbl -> CreateSharedResource(This,pHeapProperties,HeapFlags,pDesc,InitialResourceState,pOptimizedClearValue,pFlags11,CompatibilityFlags,pLifetimeTracker,pOwningSwapchain,riid,ppResource) )
|
||||
|
||||
#define ID3D12CompatibilityDevice_CreateSharedHeap(This,pHeapDesc,CompatibilityFlags,riid,ppHeap) \
|
||||
( (This)->lpVtbl -> CreateSharedHeap(This,pHeapDesc,CompatibilityFlags,riid,ppHeap) )
|
||||
|
||||
#define ID3D12CompatibilityDevice_ReflectSharedProperties(This,pHeapOrResource,ReflectType,pData,DataSize) \
|
||||
( (This)->lpVtbl -> ReflectSharedProperties(This,pHeapOrResource,ReflectType,pData,DataSize) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3D12CompatibilityDevice_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __D3D11On12CreatorID_INTERFACE_DEFINED__
|
||||
#define __D3D11On12CreatorID_INTERFACE_DEFINED__
|
||||
|
||||
/* interface D3D11On12CreatorID */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_D3D11On12CreatorID;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("edbf5678-2960-4e81-8429-99d4b2630c4e")
|
||||
D3D11On12CreatorID : public IUnknown
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct D3D11On12CreatorIDVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
D3D11On12CreatorID * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
D3D11On12CreatorID * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
D3D11On12CreatorID * This);
|
||||
|
||||
END_INTERFACE
|
||||
} D3D11On12CreatorIDVtbl;
|
||||
|
||||
interface D3D11On12CreatorID
|
||||
{
|
||||
CONST_VTBL struct D3D11On12CreatorIDVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define D3D11On12CreatorID_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define D3D11On12CreatorID_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define D3D11On12CreatorID_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __D3D11On12CreatorID_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __D3D9On12CreatorID_INTERFACE_DEFINED__
|
||||
#define __D3D9On12CreatorID_INTERFACE_DEFINED__
|
||||
|
||||
/* interface D3D9On12CreatorID */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_D3D9On12CreatorID;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("fffcbb7f-15d3-42a2-841e-9d8d32f37ddd")
|
||||
D3D9On12CreatorID : public IUnknown
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct D3D9On12CreatorIDVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
D3D9On12CreatorID * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
D3D9On12CreatorID * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
D3D9On12CreatorID * This);
|
||||
|
||||
END_INTERFACE
|
||||
} D3D9On12CreatorIDVtbl;
|
||||
|
||||
interface D3D9On12CreatorID
|
||||
{
|
||||
CONST_VTBL struct D3D9On12CreatorIDVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define D3D9On12CreatorID_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define D3D9On12CreatorID_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define D3D9On12CreatorID_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __D3D9On12CreatorID_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __OpenGLOn12CreatorID_INTERFACE_DEFINED__
|
||||
#define __OpenGLOn12CreatorID_INTERFACE_DEFINED__
|
||||
|
||||
/* interface OpenGLOn12CreatorID */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_OpenGLOn12CreatorID;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("6bb3cd34-0d19-45ab-97ed-d720ba3dfc80")
|
||||
OpenGLOn12CreatorID : public IUnknown
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct OpenGLOn12CreatorIDVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
OpenGLOn12CreatorID * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
OpenGLOn12CreatorID * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
OpenGLOn12CreatorID * This);
|
||||
|
||||
END_INTERFACE
|
||||
} OpenGLOn12CreatorIDVtbl;
|
||||
|
||||
interface OpenGLOn12CreatorID
|
||||
{
|
||||
CONST_VTBL struct OpenGLOn12CreatorIDVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define OpenGLOn12CreatorID_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define OpenGLOn12CreatorID_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define OpenGLOn12CreatorID_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __OpenGLOn12CreatorID_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __OpenCLOn12CreatorID_INTERFACE_DEFINED__
|
||||
#define __OpenCLOn12CreatorID_INTERFACE_DEFINED__
|
||||
|
||||
/* interface OpenCLOn12CreatorID */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_OpenCLOn12CreatorID;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("3f76bb74-91b5-4a88-b126-20ca0331cd60")
|
||||
OpenCLOn12CreatorID : public IUnknown
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct OpenCLOn12CreatorIDVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
OpenCLOn12CreatorID * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
OpenCLOn12CreatorID * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
OpenCLOn12CreatorID * This);
|
||||
|
||||
END_INTERFACE
|
||||
} OpenCLOn12CreatorIDVtbl;
|
||||
|
||||
interface OpenCLOn12CreatorID
|
||||
{
|
||||
CONST_VTBL struct OpenCLOn12CreatorIDVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define OpenCLOn12CreatorID_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define OpenCLOn12CreatorID_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define OpenCLOn12CreatorID_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __OpenCLOn12CreatorID_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __DirectMLTensorFlowCreatorID_INTERFACE_DEFINED__
|
||||
#define __DirectMLTensorFlowCreatorID_INTERFACE_DEFINED__
|
||||
|
||||
/* interface DirectMLTensorFlowCreatorID */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_DirectMLTensorFlowCreatorID;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("cb7490ac-8a0f-44ec-9b7b-6f4cafe8e9ab")
|
||||
DirectMLTensorFlowCreatorID : public IUnknown
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct DirectMLTensorFlowCreatorIDVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
DirectMLTensorFlowCreatorID * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
DirectMLTensorFlowCreatorID * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
DirectMLTensorFlowCreatorID * This);
|
||||
|
||||
END_INTERFACE
|
||||
} DirectMLTensorFlowCreatorIDVtbl;
|
||||
|
||||
interface DirectMLTensorFlowCreatorID
|
||||
{
|
||||
CONST_VTBL struct DirectMLTensorFlowCreatorIDVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define DirectMLTensorFlowCreatorID_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define DirectMLTensorFlowCreatorID_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define DirectMLTensorFlowCreatorID_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __DirectMLTensorFlowCreatorID_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __DirectMLPyTorchCreatorID_INTERFACE_DEFINED__
|
||||
#define __DirectMLPyTorchCreatorID_INTERFACE_DEFINED__
|
||||
|
||||
/* interface DirectMLPyTorchCreatorID */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_DirectMLPyTorchCreatorID;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("af029192-fba1-4b05-9116-235e06560354")
|
||||
DirectMLPyTorchCreatorID : public IUnknown
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct DirectMLPyTorchCreatorIDVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
DirectMLPyTorchCreatorID * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
DirectMLPyTorchCreatorID * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
DirectMLPyTorchCreatorID * This);
|
||||
|
||||
END_INTERFACE
|
||||
} DirectMLPyTorchCreatorIDVtbl;
|
||||
|
||||
interface DirectMLPyTorchCreatorID
|
||||
{
|
||||
CONST_VTBL struct DirectMLPyTorchCreatorIDVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define DirectMLPyTorchCreatorID_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define DirectMLPyTorchCreatorID_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define DirectMLPyTorchCreatorID_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __DirectMLPyTorchCreatorID_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3d12compatibility_0000_0007 */
|
||||
/* [local] */
|
||||
|
||||
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
|
||||
#pragma endregion
|
||||
DEFINE_GUID(IID_ID3D12CompatibilityDevice,0x8f1c0e3c,0xfae3,0x4a82,0xb0,0x98,0xbf,0xe1,0x70,0x82,0x07,0xff);
|
||||
DEFINE_GUID(IID_D3D11On12CreatorID,0xedbf5678,0x2960,0x4e81,0x84,0x29,0x99,0xd4,0xb2,0x63,0x0c,0x4e);
|
||||
DEFINE_GUID(IID_D3D9On12CreatorID,0xfffcbb7f,0x15d3,0x42a2,0x84,0x1e,0x9d,0x8d,0x32,0xf3,0x7d,0xdd);
|
||||
DEFINE_GUID(IID_OpenGLOn12CreatorID,0x6bb3cd34,0x0d19,0x45ab,0x97,0xed,0xd7,0x20,0xba,0x3d,0xfc,0x80);
|
||||
DEFINE_GUID(IID_OpenCLOn12CreatorID,0x3f76bb74,0x91b5,0x4a88,0xb1,0x26,0x20,0xca,0x03,0x31,0xcd,0x60);
|
||||
DEFINE_GUID(IID_DirectMLTensorFlowCreatorID,0xcb7490ac,0x8a0f,0x44ec,0x9b,0x7b,0x6f,0x4c,0xaf,0xe8,0xe9,0xab);
|
||||
DEFINE_GUID(IID_DirectMLPyTorchCreatorID,0xaf029192,0xfba1,0x4b05,0x91,0x16,0x23,0x5e,0x06,0x56,0x03,0x54);
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compatibility_0000_0007_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compatibility_0000_0007_v0_0_s_ifspec;
|
||||
|
||||
/* Additional Prototypes for ALL interfaces */
|
||||
|
||||
/* end of Additional Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
4110
3rdparty/directx-headers/include/directx/d3d12sdklayers.h
vendored
Normal file
4110
3rdparty/directx-headers/include/directx/d3d12sdklayers.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// File: D3D12Shader.h
|
||||
// Content: D3D12 Shader Types and APIs
|
||||
@ -23,6 +24,19 @@ typedef enum D3D12_SHADER_VERSION_TYPE
|
||||
D3D12_SHVER_DOMAIN_SHADER = 4,
|
||||
D3D12_SHVER_COMPUTE_SHADER = 5,
|
||||
|
||||
// D3D12 Shaders
|
||||
D3D12_SHVER_LIBRARY = 6,
|
||||
|
||||
D3D12_SHVER_RAY_GENERATION_SHADER = 7,
|
||||
D3D12_SHVER_INTERSECTION_SHADER = 8,
|
||||
D3D12_SHVER_ANY_HIT_SHADER = 9,
|
||||
D3D12_SHVER_CLOSEST_HIT_SHADER = 10,
|
||||
D3D12_SHVER_MISS_SHADER = 11,
|
||||
D3D12_SHVER_CALLABLE_SHADER = 12,
|
||||
|
||||
D3D12_SHVER_MESH_SHADER = 13,
|
||||
D3D12_SHVER_AMPLIFICATION_SHADER = 14,
|
||||
|
||||
D3D12_SHVER_RESERVED0 = 0xFFF0,
|
||||
} D3D12_SHADER_VERSION_TYPE;
|
||||
|
||||
@ -172,6 +186,23 @@ typedef struct _D3D12_SHADER_INPUT_BIND_DESC
|
||||
#define D3D_SHADER_REQUIRES_TYPED_UAV_LOAD_ADDITIONAL_FORMATS 0x00000800
|
||||
#define D3D_SHADER_REQUIRES_ROVS 0x00001000
|
||||
#define D3D_SHADER_REQUIRES_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER 0x00002000
|
||||
#define D3D_SHADER_REQUIRES_WAVE_OPS 0x00004000
|
||||
#define D3D_SHADER_REQUIRES_INT64_OPS 0x00008000
|
||||
#define D3D_SHADER_REQUIRES_VIEW_ID 0x00010000
|
||||
#define D3D_SHADER_REQUIRES_BARYCENTRICS 0x00020000
|
||||
#define D3D_SHADER_REQUIRES_NATIVE_16BIT_OPS 0x00040000
|
||||
#define D3D_SHADER_REQUIRES_SHADING_RATE 0x00080000
|
||||
#define D3D_SHADER_REQUIRES_RAYTRACING_TIER_1_1 0x00100000
|
||||
#define D3D_SHADER_REQUIRES_SAMPLER_FEEDBACK 0x00200000
|
||||
#define D3D_SHADER_REQUIRES_ATOMIC_INT64_ON_TYPED_RESOURCE 0x00400000
|
||||
#define D3D_SHADER_REQUIRES_ATOMIC_INT64_ON_GROUP_SHARED 0x00800000
|
||||
#define D3D_SHADER_REQUIRES_DERIVATIVES_IN_MESH_AND_AMPLIFICATION_SHADERS 0x01000000
|
||||
#define D3D_SHADER_REQUIRES_RESOURCE_DESCRIPTOR_HEAP_INDEXING 0x02000000
|
||||
#define D3D_SHADER_REQUIRES_SAMPLER_DESCRIPTOR_HEAP_INDEXING 0x04000000
|
||||
#define D3D_SHADER_REQUIRES_WAVE_MMA 0x08000000
|
||||
#define D3D_SHADER_REQUIRES_ATOMIC_INT64_ON_DESCRIPTOR_HEAP_RESOURCE 0x10000000
|
||||
#define D3D_SHADER_FEATURE_ADVANCED_TEXTURE_OPS 0x20000000
|
||||
#define D3D_SHADER_FEATURE_WRITEABLE_MSAA_TEXTURES 0x40000000
|
||||
|
||||
|
||||
typedef struct _D3D12_LIBRARY_DESC
|
8584
3rdparty/directx-headers/include/directx/d3d12video.h
vendored
Normal file
8584
3rdparty/directx-headers/include/directx/d3d12video.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,15 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
* Licensed under the MIT license
|
||||
*
|
||||
*-------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 8.01.0622 */
|
||||
/* File created by MIDL compiler version 8.01.0628 */
|
||||
/* @@MIDL_FILE_HEADING( ) */
|
||||
|
||||
|
||||
@ -37,59 +43,13 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1600
|
||||
#ifndef VS2008_SAL_COMPAT
|
||||
#define VS2008_SAL_COMPAT
|
||||
// BK - SAL compatibility for VS2008
|
||||
|
||||
#if _MSC_VER < 1600
|
||||
#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \
|
||||
extern "C++" { \
|
||||
inline ENUMTYPE operator | (ENUMTYPE _a, ENUMTYPE _b) { return ENUMTYPE ( ( (int) _a) | ( (int)_b) ); } \
|
||||
inline ENUMTYPE operator |= (ENUMTYPE &_a, ENUMTYPE _b) { return (ENUMTYPE &)( ( (int &)_a) |= ( (int)_b) ); } \
|
||||
inline ENUMTYPE operator & (ENUMTYPE _a, ENUMTYPE _b) { return ENUMTYPE ( ( (int) _a) & ( (int)_b) ); } \
|
||||
inline ENUMTYPE operator &= (ENUMTYPE &_a, ENUMTYPE _b) { return (ENUMTYPE &)( ( (int &)_a) &= ( (int)_b) ); } \
|
||||
inline ENUMTYPE operator ~ (ENUMTYPE _a) { return (ENUMTYPE) (~( (int) _a) ); } \
|
||||
inline ENUMTYPE operator ^ (ENUMTYPE _a, ENUMTYPE _b) { return ENUMTYPE ( ( (int) _a) ^ ( (int)_b) ); } \
|
||||
inline ENUMTYPE operator ^= (ENUMTYPE &_a, ENUMTYPE _b) { return (ENUMTYPE &)( ( (int &)_a) ^= ( (int)_b) ); } \
|
||||
}
|
||||
#endif // _MSC_VER < 1600
|
||||
|
||||
#undef _Out_
|
||||
#define _Out_
|
||||
#undef _In_
|
||||
#define _In_
|
||||
#undef _Always_
|
||||
#define _Always_(annos)
|
||||
#define _In_reads_(size)
|
||||
#define _In_reads_opt_(size)
|
||||
#define _In_reads_bytes_(size)
|
||||
#define _In_reads_bytes_opt_(size)
|
||||
#define _Inout_updates_bytes_(size)
|
||||
#define _Out_writes_(size)
|
||||
#define _Out_writes_opt_(size)
|
||||
#define _Out_writes_to_opt_(size,count)
|
||||
#define _Out_writes_bytes_(size)
|
||||
#define _Out_writes_bytes_opt_(size)
|
||||
#define _Out_writes_bytes_to_(size,count)
|
||||
#define _Outptr_
|
||||
#define _Outptr_opt_
|
||||
#define _Outptr_opt_result_maybenull_
|
||||
#define _Outptr_opt_result_bytebuffer_(size)
|
||||
#define _Outptr_result_maybenull_
|
||||
#define _Outptr_result_bytebuffer_(size)
|
||||
#define _Out_writes_all_opt_(size)
|
||||
#define _COM_Outptr_
|
||||
#define _COM_Outptr_opt_
|
||||
#define _COM_Outptr_opt_result_maybenull_
|
||||
#define _Field_size_(size)
|
||||
#define _Field_size_full_(size)
|
||||
#define _Field_size_opt_(size)
|
||||
#define _Field_size_bytes_full_(size)
|
||||
#define nullptr NULL
|
||||
|
||||
#endif // BK - VS2008_SAL_COMPAT
|
||||
#endif //
|
||||
#ifndef DECLSPEC_XFGVIRT
|
||||
#if defined(_CONTROL_FLOW_GUARD_XFG)
|
||||
#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
|
||||
#else
|
||||
#define DECLSPEC_XFGVIRT(base, func)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Forward Declarations */
|
||||
|
||||
@ -133,6 +93,7 @@ enum D3D_DRIVER_TYPE
|
||||
typedef
|
||||
enum D3D_FEATURE_LEVEL
|
||||
{
|
||||
D3D_FEATURE_LEVEL_1_0_CORE = 0x1000,
|
||||
D3D_FEATURE_LEVEL_9_1 = 0x9100,
|
||||
D3D_FEATURE_LEVEL_9_2 = 0x9200,
|
||||
D3D_FEATURE_LEVEL_9_3 = 0x9300,
|
||||
@ -141,7 +102,8 @@ enum D3D_FEATURE_LEVEL
|
||||
D3D_FEATURE_LEVEL_11_0 = 0xb000,
|
||||
D3D_FEATURE_LEVEL_11_1 = 0xb100,
|
||||
D3D_FEATURE_LEVEL_12_0 = 0xc000,
|
||||
D3D_FEATURE_LEVEL_12_1 = 0xc100
|
||||
D3D_FEATURE_LEVEL_12_1 = 0xc100,
|
||||
D3D_FEATURE_LEVEL_12_2 = 0xc200
|
||||
} D3D_FEATURE_LEVEL;
|
||||
|
||||
#define D3D_FL9_1_REQ_TEXTURE1D_U_DIMENSION 2048
|
||||
@ -168,6 +130,7 @@ enum D3D_PRIMITIVE_TOPOLOGY
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINESTRIP = 3,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLEFAN = 6,
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10,
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = 11,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = 12,
|
||||
@ -395,6 +358,37 @@ enum D3D_SRV_DIMENSION
|
||||
D3D11_SRV_DIMENSION_BUFFEREX = D3D_SRV_DIMENSION_BUFFEREX
|
||||
} D3D_SRV_DIMENSION;
|
||||
|
||||
#define D3D_SHADER_FEATURE_DOUBLES 0x00001
|
||||
#define D3D_SHADER_FEATURE_COMPUTE_SHADERS_PLUS_RAW_AND_STRUCTURED_BUFFERS_VIA_SHADER_4_X 0x00002
|
||||
#define D3D_SHADER_FEATURE_UAVS_AT_EVERY_STAGE 0x00004
|
||||
#define D3D_SHADER_FEATURE_64_UAVS 0x00008
|
||||
#define D3D_SHADER_FEATURE_MINIMUM_PRECISION 0x00010
|
||||
#define D3D_SHADER_FEATURE_11_1_DOUBLE_EXTENSIONS 0x00020
|
||||
#define D3D_SHADER_FEATURE_11_1_SHADER_EXTENSIONS 0x00040
|
||||
#define D3D_SHADER_FEATURE_LEVEL_9_COMPARISON_FILTERING 0x00080
|
||||
#define D3D_SHADER_FEATURE_TILED_RESOURCES 0x00100
|
||||
#define D3D_SHADER_FEATURE_STENCIL_REF 0x00200
|
||||
#define D3D_SHADER_FEATURE_INNER_COVERAGE 0x00400
|
||||
#define D3D_SHADER_FEATURE_TYPED_UAV_LOAD_ADDITIONAL_FORMATS 0x00800
|
||||
#define D3D_SHADER_FEATURE_ROVS 0x01000
|
||||
#define D3D_SHADER_FEATURE_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER 0x02000
|
||||
#define D3D_SHADER_FEATURE_WAVE_OPS 0x04000
|
||||
#define D3D_SHADER_FEATURE_INT64_OPS 0x08000
|
||||
#define D3D_SHADER_FEATURE_VIEW_ID 0x10000
|
||||
#define D3D_SHADER_FEATURE_BARYCENTRICS 0x20000
|
||||
#define D3D_SHADER_FEATURE_NATIVE_16BIT_OPS 0x40000
|
||||
#define D3D_SHADER_FEATURE_SHADING_RATE 0x80000
|
||||
#define D3D_SHADER_FEATURE_RAYTRACING_TIER_1_1 0x100000
|
||||
#define D3D_SHADER_FEATURE_SAMPLER_FEEDBACK 0x200000
|
||||
#define D3D_SHADER_FEATURE_ATOMIC_INT64_ON_TYPED_RESOURCE 0x400000
|
||||
#define D3D_SHADER_FEATURE_ATOMIC_INT64_ON_GROUP_SHARED 0x800000
|
||||
#define D3D_SHADER_FEATURE_DERIVATIVES_IN_MESH_AND_AMPLIFICATION_SHADERS 0x1000000
|
||||
#define D3D_SHADER_FEATURE_RESOURCE_DESCRIPTOR_HEAP_INDEXING 0x2000000
|
||||
#define D3D_SHADER_FEATURE_SAMPLER_DESCRIPTOR_HEAP_INDEXING 0x4000000
|
||||
#define D3D_SHADER_FEATURE_WAVE_MMA 0x8000000
|
||||
#define D3D_SHADER_FEATURE_ATOMIC_INT64_ON_DESCRIPTOR_HEAP_RESOURCE 0x10000000
|
||||
#define D3D_SHADER_FEATURE_ADVANCED_TEXTURE_OPS 0x20000000
|
||||
#define D3D_SHADER_FEATURE_WRITEABLE_MSAA_TEXTURES 0x40000000
|
||||
typedef struct _D3D_SHADER_MACRO
|
||||
{
|
||||
LPCSTR Name;
|
||||
@ -437,21 +431,26 @@ EXTERN_C const IID IID_ID3D10Blob;
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3D10Blob * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [annotation][iid_is][out] */
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3D10Blob * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3D10Blob * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D10Blob, GetBufferPointer)
|
||||
LPVOID ( STDMETHODCALLTYPE *GetBufferPointer )(
|
||||
ID3D10Blob * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D10Blob, GetBufferSize)
|
||||
SIZE_T ( STDMETHODCALLTYPE *GetBufferSize )(
|
||||
ID3D10Blob * This);
|
||||
|
||||
@ -547,18 +546,22 @@ EXTERN_C const IID IID_ID3DDestructionNotifier;
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3DDestructionNotifier * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [annotation][iid_is][out] */
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3DDestructionNotifier * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3DDestructionNotifier * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DDestructionNotifier, RegisterDestructionCallback)
|
||||
HRESULT ( STDMETHODCALLTYPE *RegisterDestructionCallback )(
|
||||
ID3DDestructionNotifier * This,
|
||||
/* [annotation] */
|
||||
@ -568,6 +571,7 @@ EXTERN_C const IID IID_ID3DDestructionNotifier;
|
||||
/* [annotation] */
|
||||
_Out_ UINT *pCallbackID);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DDestructionNotifier, UnregisterDestructionCallback)
|
||||
HRESULT ( STDMETHODCALLTYPE *UnregisterDestructionCallback )(
|
||||
ID3DDestructionNotifier * This,
|
||||
/* [annotation] */
|
||||
@ -732,6 +736,11 @@ enum _D3D_SHADER_VARIABLE_TYPE
|
||||
D3D_SVT_MIN12INT = 55,
|
||||
D3D_SVT_MIN16INT = 56,
|
||||
D3D_SVT_MIN16UINT = 57,
|
||||
D3D_SVT_INT16 = 58,
|
||||
D3D_SVT_UINT16 = 59,
|
||||
D3D_SVT_FLOAT16 = 60,
|
||||
D3D_SVT_INT64 = 61,
|
||||
D3D_SVT_UINT64 = 62,
|
||||
D3D10_SVT_VOID = D3D_SVT_VOID,
|
||||
D3D10_SVT_BOOL = D3D_SVT_BOOL,
|
||||
D3D10_SVT_INT = D3D_SVT_INT,
|
||||
@ -819,6 +828,8 @@ enum _D3D_SHADER_INPUT_TYPE
|
||||
D3D_SIT_UAV_APPEND_STRUCTURED = ( D3D_SIT_UAV_RWBYTEADDRESS + 1 ) ,
|
||||
D3D_SIT_UAV_CONSUME_STRUCTURED = ( D3D_SIT_UAV_APPEND_STRUCTURED + 1 ) ,
|
||||
D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = ( D3D_SIT_UAV_CONSUME_STRUCTURED + 1 ) ,
|
||||
D3D_SIT_RTACCELERATIONSTRUCTURE = ( D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER + 1 ) ,
|
||||
D3D_SIT_UAV_FEEDBACKTEXTURE = ( D3D_SIT_RTACCELERATIONSTRUCTURE + 1 ) ,
|
||||
D3D10_SIT_CBUFFER = D3D_SIT_CBUFFER,
|
||||
D3D10_SIT_TBUFFER = D3D_SIT_TBUFFER,
|
||||
D3D10_SIT_TEXTURE = D3D_SIT_TEXTURE,
|
||||
@ -876,6 +887,9 @@ enum D3D_NAME
|
||||
D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR = 14,
|
||||
D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR = 15,
|
||||
D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR = 16,
|
||||
D3D_NAME_BARYCENTRICS = 23,
|
||||
D3D_NAME_SHADINGRATE = 24,
|
||||
D3D_NAME_CULLPRIMITIVE = 25,
|
||||
D3D_NAME_TARGET = 64,
|
||||
D3D_NAME_DEPTH = 65,
|
||||
D3D_NAME_COVERAGE = 66,
|
||||
@ -906,7 +920,10 @@ enum D3D_NAME
|
||||
D3D11_NAME_DEPTH_GREATER_EQUAL = D3D_NAME_DEPTH_GREATER_EQUAL,
|
||||
D3D11_NAME_DEPTH_LESS_EQUAL = D3D_NAME_DEPTH_LESS_EQUAL,
|
||||
D3D11_NAME_STENCIL_REF = D3D_NAME_STENCIL_REF,
|
||||
D3D11_NAME_INNER_COVERAGE = D3D_NAME_INNER_COVERAGE
|
||||
D3D11_NAME_INNER_COVERAGE = D3D_NAME_INNER_COVERAGE,
|
||||
D3D12_NAME_BARYCENTRICS = D3D_NAME_BARYCENTRICS,
|
||||
D3D12_NAME_SHADINGRATE = D3D_NAME_SHADINGRATE,
|
||||
D3D12_NAME_CULLPRIMITIVE = D3D_NAME_CULLPRIMITIVE
|
||||
} D3D_NAME;
|
||||
|
||||
typedef
|
||||
@ -1027,9 +1044,50 @@ enum _D3D_PARAMETER_FLAGS
|
||||
D3D_PF_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_PARAMETER_FLAGS;
|
||||
|
||||
typedef
|
||||
enum D3D_FORMAT_LAYOUT
|
||||
{
|
||||
D3DFL_STANDARD = 0,
|
||||
D3DFL_CUSTOM = -1
|
||||
} D3D_FORMAT_LAYOUT;
|
||||
|
||||
typedef
|
||||
enum D3D_FORMAT_TYPE_LEVEL
|
||||
{
|
||||
D3DFTL_NO_TYPE = 0,
|
||||
D3DFTL_PARTIAL_TYPE = -2,
|
||||
D3DFTL_FULL_TYPE = -1
|
||||
} D3D_FORMAT_TYPE_LEVEL;
|
||||
|
||||
typedef
|
||||
enum D3D_FORMAT_COMPONENT_NAME
|
||||
{
|
||||
D3DFCN_R = -4,
|
||||
D3DFCN_G = -3,
|
||||
D3DFCN_B = -2,
|
||||
D3DFCN_A = -1,
|
||||
D3DFCN_D = 0,
|
||||
D3DFCN_S = 1,
|
||||
D3DFCN_X = 2
|
||||
} D3D_FORMAT_COMPONENT_NAME;
|
||||
|
||||
typedef
|
||||
enum D3D_FORMAT_COMPONENT_INTERPRETATION
|
||||
{
|
||||
D3DFCI_TYPELESS = 0,
|
||||
D3DFCI_FLOAT = -4,
|
||||
D3DFCI_SNORM = -3,
|
||||
D3DFCI_UNORM = -2,
|
||||
D3DFCI_SINT = -1,
|
||||
D3DFCI_UINT = 1,
|
||||
D3DFCI_UNORM_SRGB = 2,
|
||||
D3DFCI_BIASED_FIXED_2_8 = 3
|
||||
} D3D_FORMAT_COMPONENT_INTERPRETATION;
|
||||
|
||||
DEFINE_GUID(WKPDID_D3DDebugObjectName,0x429b8c22,0x9188,0x4b0c,0x87,0x42,0xac,0xb0,0xbf,0x85,0xc2,0x00);
|
||||
DEFINE_GUID(WKPDID_D3DDebugObjectNameW,0x4cca5fd8,0x921f,0x42c8,0x85,0x66,0x70,0xca,0xf2,0xa9,0xb7,0x41);
|
||||
DEFINE_GUID(WKPDID_CommentStringW,0xd0149dc0,0x90e8,0x4ec8,0x81, 0x44, 0xe9, 0x00, 0xad, 0x26, 0x6b, 0xb2);
|
||||
DEFINE_GUID(WKPDID_D3D12UniqueObjectId, 0x1b39de15, 0xec04, 0x4bae, 0xba, 0x4d, 0x8c, 0xef, 0x79, 0xfc, 0x04, 0xc1);
|
||||
#define D3D_SET_OBJECT_NAME_N_A(pObject, Chars, pName) (pObject)->SetPrivateData(WKPDID_D3DDebugObjectName, Chars, pName)
|
||||
#define D3D_SET_OBJECT_NAME_A(pObject, pName) D3D_SET_OBJECT_NAME_N_A(pObject, lstrlenA(pName), pName)
|
||||
#define D3D_SET_OBJECT_NAME_N_W(pObject, Chars, pName) (pObject)->SetPrivateData(WKPDID_D3DDebugObjectNameW, Chars*2, pName)
|
||||
@ -1038,6 +1096,8 @@ DEFINE_GUID(WKPDID_CommentStringW,0xd0149dc0,0x90e8,0x4ec8,0x81, 0x44, 0xe9, 0x0
|
||||
#define D3D_COMPONENT_MASK_Y 2
|
||||
#define D3D_COMPONENT_MASK_Z 4
|
||||
#define D3D_COMPONENT_MASK_W 8
|
||||
DEFINE_GUID(D3D_TEXTURE_LAYOUT_ROW_MAJOR,0xb5dc234f,0x72bb,0x4bec,0x97,0x05,0x8c,0xf2,0x58,0xdf,0x6b,0x6c);
|
||||
DEFINE_GUID(D3D_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE,0x4c0f29e3,0x3f5f,0x4d35,0x84,0xc9,0xbc,0x09,0x83,0xb6,0x2c,0x28);
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dcommon_0000_0002_v0_0_c_ifspec;
|
@ -1349,13 +1349,13 @@ namespace MinGW_Workaround
|
||||
{
|
||||
inline D3D12_RESOURCE_DESC ID3D12ResourceGetDesc(ID3D12Resource* _resource)
|
||||
{
|
||||
#if BX_COMPILER_MSVC
|
||||
return _resource->GetDesc();
|
||||
#else
|
||||
D3D12_RESOURCE_DESC desc;
|
||||
union {
|
||||
D3D12_RESOURCE_DESC (STDMETHODCALLTYPE ID3D12Resource::*w)();
|
||||
void (STDMETHODCALLTYPE ID3D12Resource::*f)(D3D12_RESOURCE_DESC *);
|
||||
} conversion = { &ID3D12Resource::GetDesc };
|
||||
(_resource->*conversion.f)(&desc);
|
||||
_resource->GetDesc(&desc);
|
||||
return desc;
|
||||
#endif // BX_COMPILER_MSVC
|
||||
}
|
||||
}
|
||||
|
41
3rdparty/directx-headers/include/directx/dxcore.h
vendored
Normal file
41
3rdparty/directx-headers/include/directx/dxcore.h
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
/************************************************************
|
||||
* *
|
||||
* Copyright (c) Microsoft Corporation. *
|
||||
* Licensed under the MIT license. *
|
||||
* *
|
||||
************************************************************/
|
||||
|
||||
#ifndef _DXCOREEXTMODULE_H_
|
||||
#define _DXCOREEXTMODULE_H_
|
||||
|
||||
#include <winapifamily.h>
|
||||
#include "dxcore_interface.h"
|
||||
|
||||
#pragma region Application Family or OneCore Family
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
|
||||
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
|
||||
|
||||
STDAPI
|
||||
DXCoreCreateAdapterFactory(
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void** ppvFactory
|
||||
);
|
||||
|
||||
template <class T>
|
||||
HRESULT
|
||||
DXCoreCreateAdapterFactory(
|
||||
_COM_Outptr_ T** ppvFactory
|
||||
)
|
||||
{
|
||||
return DXCoreCreateAdapterFactory(IID_PPV_ARGS(ppvFactory));
|
||||
}
|
||||
|
||||
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
|
||||
|
||||
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
|
||||
#pragma endregion
|
||||
|
||||
#endif // _DXCOREEXTMODULE_H_
|
||||
|
||||
|
316
3rdparty/directx-headers/include/directx/dxcore_interface.h
vendored
Normal file
316
3rdparty/directx-headers/include/directx/dxcore_interface.h
vendored
Normal file
@ -0,0 +1,316 @@
|
||||
//
|
||||
// DXCore Interface
|
||||
// Copyright (C) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
|
||||
#ifndef __dxcore_interface_h__
|
||||
#define __dxcore_interface_h__
|
||||
|
||||
#ifndef COM_NO_WINDOWS_H
|
||||
#include "windows.h"
|
||||
#include "ole2.h"
|
||||
#endif /*COM_NO_WINDOWS_H*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#define _FACDXCORE 0x880
|
||||
#define MAKE_DXCORE_HRESULT( code ) MAKE_HRESULT( 1, _FACDXCORE, code )
|
||||
|
||||
enum class DXCoreAdapterProperty : uint32_t
|
||||
{
|
||||
InstanceLuid = 0,
|
||||
DriverVersion = 1,
|
||||
DriverDescription = 2,
|
||||
HardwareID = 3, // Use HardwareIDParts instead, if available.
|
||||
KmdModelVersion = 4,
|
||||
ComputePreemptionGranularity = 5,
|
||||
GraphicsPreemptionGranularity = 6,
|
||||
DedicatedAdapterMemory = 7,
|
||||
DedicatedSystemMemory = 8,
|
||||
SharedSystemMemory = 9,
|
||||
AcgCompatible = 10,
|
||||
IsHardware = 11,
|
||||
IsIntegrated = 12,
|
||||
IsDetachable = 13,
|
||||
HardwareIDParts = 14
|
||||
};
|
||||
|
||||
enum class DXCoreAdapterState : uint32_t
|
||||
{
|
||||
IsDriverUpdateInProgress = 0,
|
||||
AdapterMemoryBudget = 1
|
||||
};
|
||||
|
||||
enum class DXCoreSegmentGroup : uint32_t
|
||||
{
|
||||
Local = 0,
|
||||
NonLocal = 1
|
||||
};
|
||||
|
||||
enum class DXCoreNotificationType : uint32_t
|
||||
{
|
||||
AdapterListStale = 0,
|
||||
AdapterNoLongerValid = 1,
|
||||
AdapterBudgetChange = 2,
|
||||
AdapterHardwareContentProtectionTeardown = 3
|
||||
};
|
||||
|
||||
enum class DXCoreAdapterPreference : uint32_t
|
||||
{
|
||||
Hardware = 0,
|
||||
MinimumPower = 1,
|
||||
HighPerformance = 2
|
||||
};
|
||||
|
||||
struct DXCoreHardwareID
|
||||
{
|
||||
uint32_t vendorID;
|
||||
uint32_t deviceID;
|
||||
uint32_t subSysID;
|
||||
uint32_t revision;
|
||||
};
|
||||
|
||||
struct DXCoreHardwareIDParts
|
||||
{
|
||||
uint32_t vendorID;
|
||||
uint32_t deviceID;
|
||||
uint32_t subSystemID;
|
||||
uint32_t subVendorID;
|
||||
uint32_t revisionID;
|
||||
};
|
||||
|
||||
struct DXCoreAdapterMemoryBudgetNodeSegmentGroup
|
||||
{
|
||||
uint32_t nodeIndex;
|
||||
DXCoreSegmentGroup segmentGroup;
|
||||
};
|
||||
|
||||
struct DXCoreAdapterMemoryBudget
|
||||
{
|
||||
uint64_t budget;
|
||||
uint64_t currentUsage;
|
||||
uint64_t availableForReservation;
|
||||
uint64_t currentReservation;
|
||||
};
|
||||
|
||||
typedef void (STDMETHODCALLTYPE *PFN_DXCORE_NOTIFICATION_CALLBACK)(
|
||||
DXCoreNotificationType notificationType,
|
||||
_In_ IUnknown *object,
|
||||
_In_opt_ void *context);
|
||||
|
||||
static_assert(sizeof(bool) == 1, "bool assumed as one byte");
|
||||
|
||||
DEFINE_GUID(IID_IDXCoreAdapterFactory, 0x78ee5945, 0xc36e, 0x4b13, 0xa6, 0x69, 0x00, 0x5d, 0xd1, 0x1c, 0x0f, 0x06);
|
||||
DEFINE_GUID(IID_IDXCoreAdapterList, 0x526c7776, 0x40e9, 0x459b, 0xb7, 0x11, 0xf3, 0x2a, 0xd7, 0x6d, 0xfc, 0x28);
|
||||
DEFINE_GUID(IID_IDXCoreAdapter, 0xf0db4c7f, 0xfe5a, 0x42a2, 0xbd, 0x62, 0xf2, 0xa6, 0xcf, 0x6f, 0xc8, 0x3e);
|
||||
DEFINE_GUID(DXCORE_ADAPTER_ATTRIBUTE_D3D11_GRAPHICS, 0x8c47866b, 0x7583, 0x450d, 0xf0, 0xf0, 0x6b, 0xad, 0xa8, 0x95, 0xaf, 0x4b);
|
||||
DEFINE_GUID(DXCORE_ADAPTER_ATTRIBUTE_D3D12_GRAPHICS, 0x0c9ece4d, 0x2f6e, 0x4f01, 0x8c, 0x96, 0xe8, 0x9e, 0x33, 0x1b, 0x47, 0xb1);
|
||||
DEFINE_GUID(DXCORE_ADAPTER_ATTRIBUTE_D3D12_CORE_COMPUTE, 0x248e2800, 0xa793, 0x4724, 0xab, 0xaa, 0x23, 0xa6, 0xde, 0x1b, 0xe0, 0x90);
|
||||
|
||||
/* interface IDXCoreAdapter */
|
||||
MIDL_INTERFACE("f0db4c7f-fe5a-42a2-bd62-f2a6cf6fc83e")
|
||||
IDXCoreAdapter : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual bool STDMETHODCALLTYPE IsValid() = 0;
|
||||
|
||||
virtual bool STDMETHODCALLTYPE IsAttributeSupported(
|
||||
REFGUID attributeGUID) = 0;
|
||||
|
||||
virtual bool STDMETHODCALLTYPE IsPropertySupported(
|
||||
DXCoreAdapterProperty property) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetProperty(
|
||||
DXCoreAdapterProperty property,
|
||||
size_t bufferSize,
|
||||
_Out_writes_bytes_(bufferSize) void *propertyData) = 0;
|
||||
|
||||
template <class T>
|
||||
HRESULT GetProperty(
|
||||
DXCoreAdapterProperty property,
|
||||
_Out_writes_bytes_(sizeof(T)) T *propertyData)
|
||||
{
|
||||
return GetProperty(property,
|
||||
sizeof(T),
|
||||
(void*)propertyData);
|
||||
}
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetPropertySize(
|
||||
DXCoreAdapterProperty property,
|
||||
_Out_ size_t *bufferSize) = 0;
|
||||
|
||||
virtual bool STDMETHODCALLTYPE IsQueryStateSupported(
|
||||
DXCoreAdapterState property) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryState(
|
||||
DXCoreAdapterState state,
|
||||
size_t inputStateDetailsSize,
|
||||
_In_reads_bytes_opt_(inputStateDetailsSize) const void *inputStateDetails,
|
||||
size_t outputBufferSize,
|
||||
_Out_writes_bytes_(outputBufferSize) void *outputBuffer) = 0;
|
||||
|
||||
template <class T1, class T2>
|
||||
HRESULT QueryState(
|
||||
DXCoreAdapterState state,
|
||||
_In_reads_bytes_opt_(sizeof(T1)) const T1 *inputStateDetails,
|
||||
_Out_writes_bytes_(sizeof(T2)) T2 *outputBuffer)
|
||||
{
|
||||
return QueryState(state,
|
||||
sizeof(T1),
|
||||
(const void*)inputStateDetails,
|
||||
sizeof(T2),
|
||||
(void*)outputBuffer);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
HRESULT QueryState(
|
||||
DXCoreAdapterState state,
|
||||
_Out_writes_bytes_(sizeof(T)) T *outputBuffer)
|
||||
{
|
||||
return QueryState(state,
|
||||
0,
|
||||
nullptr,
|
||||
sizeof(T),
|
||||
(void*)outputBuffer);
|
||||
}
|
||||
|
||||
virtual bool STDMETHODCALLTYPE IsSetStateSupported(
|
||||
DXCoreAdapterState property) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE SetState(
|
||||
DXCoreAdapterState state,
|
||||
size_t inputStateDetailsSize,
|
||||
_In_reads_bytes_opt_(inputStateDetailsSize) const void *inputStateDetails,
|
||||
size_t inputDataSize,
|
||||
_In_reads_bytes_(inputDataSize) const void *inputData) = 0;
|
||||
|
||||
template <class T1, class T2>
|
||||
HRESULT SetState(
|
||||
DXCoreAdapterState state,
|
||||
const T1 *inputStateDetails,
|
||||
const T2 *inputData)
|
||||
{
|
||||
return SetState(state,
|
||||
sizeof(T1),
|
||||
(const void*)inputStateDetails,
|
||||
sizeof(T2),
|
||||
(const void*)inputData);
|
||||
}
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetFactory(
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void** ppvFactory
|
||||
) = 0;
|
||||
|
||||
template <class T>
|
||||
HRESULT GetFactory(
|
||||
_COM_Outptr_ T** ppvFactory
|
||||
)
|
||||
{
|
||||
return GetFactory(IID_PPV_ARGS(ppvFactory));
|
||||
}
|
||||
};
|
||||
|
||||
/* interface IDXCoreAdapterList */
|
||||
MIDL_INTERFACE("526c7776-40e9-459b-b711-f32ad76dfc28")
|
||||
IDXCoreAdapterList : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetAdapter(
|
||||
uint32_t index,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvAdapter) = 0;
|
||||
|
||||
template<class T>
|
||||
HRESULT STDMETHODCALLTYPE GetAdapter(
|
||||
uint32_t index,
|
||||
_COM_Outptr_ T **ppvAdapter)
|
||||
{
|
||||
return GetAdapter(index,
|
||||
IID_PPV_ARGS(ppvAdapter));
|
||||
}
|
||||
|
||||
virtual uint32_t STDMETHODCALLTYPE GetAdapterCount() = 0;
|
||||
|
||||
virtual bool STDMETHODCALLTYPE IsStale() = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetFactory(
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void** ppvFactory
|
||||
) = 0;
|
||||
|
||||
template <class T>
|
||||
HRESULT GetFactory(
|
||||
_COM_Outptr_ T** ppvFactory
|
||||
)
|
||||
{
|
||||
return GetFactory(IID_PPV_ARGS(ppvFactory));
|
||||
}
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE Sort(
|
||||
uint32_t numPreferences,
|
||||
_In_reads_(numPreferences) const DXCoreAdapterPreference* preferences) = 0;
|
||||
|
||||
virtual bool STDMETHODCALLTYPE IsAdapterPreferenceSupported(
|
||||
DXCoreAdapterPreference preference) = 0;
|
||||
};
|
||||
|
||||
/* interface IDXCoreAdapterFactory */
|
||||
MIDL_INTERFACE("78ee5945-c36e-4b13-a669-005dd11c0f06")
|
||||
IDXCoreAdapterFactory : public IUnknown
|
||||
{
|
||||
public:
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateAdapterList(
|
||||
uint32_t numAttributes,
|
||||
_In_reads_(numAttributes) const GUID *filterAttributes,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvAdapterList) = 0;
|
||||
|
||||
template<class T>
|
||||
HRESULT STDMETHODCALLTYPE CreateAdapterList(
|
||||
uint32_t numAttributes,
|
||||
_In_reads_(numAttributes) const GUID *filterAttributes,
|
||||
_COM_Outptr_ T **ppvAdapterList)
|
||||
{
|
||||
return CreateAdapterList(numAttributes,
|
||||
filterAttributes,
|
||||
IID_PPV_ARGS(ppvAdapterList));
|
||||
}
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetAdapterByLuid(
|
||||
const LUID &adapterLUID,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvAdapter) = 0;
|
||||
|
||||
template<class T>
|
||||
HRESULT STDMETHODCALLTYPE GetAdapterByLuid(
|
||||
const LUID &adapterLUID,
|
||||
_COM_Outptr_ T **ppvAdapter)
|
||||
{
|
||||
return GetAdapterByLuid(adapterLUID,
|
||||
IID_PPV_ARGS(ppvAdapter));
|
||||
}
|
||||
|
||||
virtual bool STDMETHODCALLTYPE IsNotificationTypeSupported(
|
||||
DXCoreNotificationType notificationType) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE RegisterEventNotification(
|
||||
_In_ IUnknown *dxCoreObject,
|
||||
DXCoreNotificationType notificationType,
|
||||
_In_ PFN_DXCORE_NOTIFICATION_CALLBACK callbackFunction,
|
||||
_In_opt_ void *callbackContext,
|
||||
_Out_ uint32_t *eventCookie) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE UnregisterEventNotification(
|
||||
uint32_t eventCookie) = 0;
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __dxcore_interface_h__
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
// Copyright (C) Microsoft Corporation.
|
||||
// Licensed under the MIT license
|
||||
//
|
||||
|
||||
#ifndef __dxgicommon_h__
|
142
3rdparty/directx-headers/include/directx/dxgiformat.h
vendored
Normal file
142
3rdparty/directx-headers/include/directx/dxgiformat.h
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation.
|
||||
// Licensed under the MIT license
|
||||
//
|
||||
|
||||
#ifndef __dxgiformat_h__
|
||||
#define __dxgiformat_h__
|
||||
|
||||
#define DXGI_FORMAT_DEFINED 1
|
||||
|
||||
typedef enum DXGI_FORMAT
|
||||
{
|
||||
DXGI_FORMAT_UNKNOWN = 0,
|
||||
DXGI_FORMAT_R32G32B32A32_TYPELESS = 1,
|
||||
DXGI_FORMAT_R32G32B32A32_FLOAT = 2,
|
||||
DXGI_FORMAT_R32G32B32A32_UINT = 3,
|
||||
DXGI_FORMAT_R32G32B32A32_SINT = 4,
|
||||
DXGI_FORMAT_R32G32B32_TYPELESS = 5,
|
||||
DXGI_FORMAT_R32G32B32_FLOAT = 6,
|
||||
DXGI_FORMAT_R32G32B32_UINT = 7,
|
||||
DXGI_FORMAT_R32G32B32_SINT = 8,
|
||||
DXGI_FORMAT_R16G16B16A16_TYPELESS = 9,
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT = 10,
|
||||
DXGI_FORMAT_R16G16B16A16_UNORM = 11,
|
||||
DXGI_FORMAT_R16G16B16A16_UINT = 12,
|
||||
DXGI_FORMAT_R16G16B16A16_SNORM = 13,
|
||||
DXGI_FORMAT_R16G16B16A16_SINT = 14,
|
||||
DXGI_FORMAT_R32G32_TYPELESS = 15,
|
||||
DXGI_FORMAT_R32G32_FLOAT = 16,
|
||||
DXGI_FORMAT_R32G32_UINT = 17,
|
||||
DXGI_FORMAT_R32G32_SINT = 18,
|
||||
DXGI_FORMAT_R32G8X24_TYPELESS = 19,
|
||||
DXGI_FORMAT_D32_FLOAT_S8X24_UINT = 20,
|
||||
DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = 21,
|
||||
DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = 22,
|
||||
DXGI_FORMAT_R10G10B10A2_TYPELESS = 23,
|
||||
DXGI_FORMAT_R10G10B10A2_UNORM = 24,
|
||||
DXGI_FORMAT_R10G10B10A2_UINT = 25,
|
||||
DXGI_FORMAT_R11G11B10_FLOAT = 26,
|
||||
DXGI_FORMAT_R8G8B8A8_TYPELESS = 27,
|
||||
DXGI_FORMAT_R8G8B8A8_UNORM = 28,
|
||||
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29,
|
||||
DXGI_FORMAT_R8G8B8A8_UINT = 30,
|
||||
DXGI_FORMAT_R8G8B8A8_SNORM = 31,
|
||||
DXGI_FORMAT_R8G8B8A8_SINT = 32,
|
||||
DXGI_FORMAT_R16G16_TYPELESS = 33,
|
||||
DXGI_FORMAT_R16G16_FLOAT = 34,
|
||||
DXGI_FORMAT_R16G16_UNORM = 35,
|
||||
DXGI_FORMAT_R16G16_UINT = 36,
|
||||
DXGI_FORMAT_R16G16_SNORM = 37,
|
||||
DXGI_FORMAT_R16G16_SINT = 38,
|
||||
DXGI_FORMAT_R32_TYPELESS = 39,
|
||||
DXGI_FORMAT_D32_FLOAT = 40,
|
||||
DXGI_FORMAT_R32_FLOAT = 41,
|
||||
DXGI_FORMAT_R32_UINT = 42,
|
||||
DXGI_FORMAT_R32_SINT = 43,
|
||||
DXGI_FORMAT_R24G8_TYPELESS = 44,
|
||||
DXGI_FORMAT_D24_UNORM_S8_UINT = 45,
|
||||
DXGI_FORMAT_R24_UNORM_X8_TYPELESS = 46,
|
||||
DXGI_FORMAT_X24_TYPELESS_G8_UINT = 47,
|
||||
DXGI_FORMAT_R8G8_TYPELESS = 48,
|
||||
DXGI_FORMAT_R8G8_UNORM = 49,
|
||||
DXGI_FORMAT_R8G8_UINT = 50,
|
||||
DXGI_FORMAT_R8G8_SNORM = 51,
|
||||
DXGI_FORMAT_R8G8_SINT = 52,
|
||||
DXGI_FORMAT_R16_TYPELESS = 53,
|
||||
DXGI_FORMAT_R16_FLOAT = 54,
|
||||
DXGI_FORMAT_D16_UNORM = 55,
|
||||
DXGI_FORMAT_R16_UNORM = 56,
|
||||
DXGI_FORMAT_R16_UINT = 57,
|
||||
DXGI_FORMAT_R16_SNORM = 58,
|
||||
DXGI_FORMAT_R16_SINT = 59,
|
||||
DXGI_FORMAT_R8_TYPELESS = 60,
|
||||
DXGI_FORMAT_R8_UNORM = 61,
|
||||
DXGI_FORMAT_R8_UINT = 62,
|
||||
DXGI_FORMAT_R8_SNORM = 63,
|
||||
DXGI_FORMAT_R8_SINT = 64,
|
||||
DXGI_FORMAT_A8_UNORM = 65,
|
||||
DXGI_FORMAT_R1_UNORM = 66,
|
||||
DXGI_FORMAT_R9G9B9E5_SHAREDEXP = 67,
|
||||
DXGI_FORMAT_R8G8_B8G8_UNORM = 68,
|
||||
DXGI_FORMAT_G8R8_G8B8_UNORM = 69,
|
||||
DXGI_FORMAT_BC1_TYPELESS = 70,
|
||||
DXGI_FORMAT_BC1_UNORM = 71,
|
||||
DXGI_FORMAT_BC1_UNORM_SRGB = 72,
|
||||
DXGI_FORMAT_BC2_TYPELESS = 73,
|
||||
DXGI_FORMAT_BC2_UNORM = 74,
|
||||
DXGI_FORMAT_BC2_UNORM_SRGB = 75,
|
||||
DXGI_FORMAT_BC3_TYPELESS = 76,
|
||||
DXGI_FORMAT_BC3_UNORM = 77,
|
||||
DXGI_FORMAT_BC3_UNORM_SRGB = 78,
|
||||
DXGI_FORMAT_BC4_TYPELESS = 79,
|
||||
DXGI_FORMAT_BC4_UNORM = 80,
|
||||
DXGI_FORMAT_BC4_SNORM = 81,
|
||||
DXGI_FORMAT_BC5_TYPELESS = 82,
|
||||
DXGI_FORMAT_BC5_UNORM = 83,
|
||||
DXGI_FORMAT_BC5_SNORM = 84,
|
||||
DXGI_FORMAT_B5G6R5_UNORM = 85,
|
||||
DXGI_FORMAT_B5G5R5A1_UNORM = 86,
|
||||
DXGI_FORMAT_B8G8R8A8_UNORM = 87,
|
||||
DXGI_FORMAT_B8G8R8X8_UNORM = 88,
|
||||
DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM = 89,
|
||||
DXGI_FORMAT_B8G8R8A8_TYPELESS = 90,
|
||||
DXGI_FORMAT_B8G8R8A8_UNORM_SRGB = 91,
|
||||
DXGI_FORMAT_B8G8R8X8_TYPELESS = 92,
|
||||
DXGI_FORMAT_B8G8R8X8_UNORM_SRGB = 93,
|
||||
DXGI_FORMAT_BC6H_TYPELESS = 94,
|
||||
DXGI_FORMAT_BC6H_UF16 = 95,
|
||||
DXGI_FORMAT_BC6H_SF16 = 96,
|
||||
DXGI_FORMAT_BC7_TYPELESS = 97,
|
||||
DXGI_FORMAT_BC7_UNORM = 98,
|
||||
DXGI_FORMAT_BC7_UNORM_SRGB = 99,
|
||||
DXGI_FORMAT_AYUV = 100,
|
||||
DXGI_FORMAT_Y410 = 101,
|
||||
DXGI_FORMAT_Y416 = 102,
|
||||
DXGI_FORMAT_NV12 = 103,
|
||||
DXGI_FORMAT_P010 = 104,
|
||||
DXGI_FORMAT_P016 = 105,
|
||||
DXGI_FORMAT_420_OPAQUE = 106,
|
||||
DXGI_FORMAT_YUY2 = 107,
|
||||
DXGI_FORMAT_Y210 = 108,
|
||||
DXGI_FORMAT_Y216 = 109,
|
||||
DXGI_FORMAT_NV11 = 110,
|
||||
DXGI_FORMAT_AI44 = 111,
|
||||
DXGI_FORMAT_IA44 = 112,
|
||||
DXGI_FORMAT_P8 = 113,
|
||||
DXGI_FORMAT_A8P8 = 114,
|
||||
DXGI_FORMAT_B4G4R4A4_UNORM = 115,
|
||||
|
||||
DXGI_FORMAT_P208 = 130,
|
||||
DXGI_FORMAT_V208 = 131,
|
||||
DXGI_FORMAT_V408 = 132,
|
||||
|
||||
|
||||
DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE = 189,
|
||||
DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE = 190,
|
||||
|
||||
|
||||
DXGI_FORMAT_FORCE_UINT = 0xffffffff
|
||||
} DXGI_FORMAT;
|
||||
|
||||
#endif // __dxgiformat_h__
|
405
3rdparty/directx-headers/include/wsl/stubs/basetsd.h
vendored
Normal file
405
3rdparty/directx-headers/include/wsl/stubs/basetsd.h
vendored
Normal file
@ -0,0 +1,405 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
// These #defines prevent the idl-generated headers from trying to include
|
||||
// Windows.h from the SDK rather than this one.
|
||||
#define RPC_NO_WINDOWS_H
|
||||
#define COM_NO_WINDOWS_H
|
||||
|
||||
// Allcaps type definitions
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
// Note: using fixed-width here to match Windows widths
|
||||
// Specifically this is different for 'long' vs 'LONG'
|
||||
typedef uint8_t UINT8;
|
||||
typedef int8_t INT8;
|
||||
typedef uint16_t UINT16;
|
||||
typedef int16_t INT16;
|
||||
typedef uint32_t UINT32, UINT, ULONG, DWORD, BOOL, WINBOOL;
|
||||
typedef int32_t INT32, INT, LONG;
|
||||
typedef uint64_t UINT64, ULONG_PTR;
|
||||
typedef int64_t INT64, LONG_PTR;
|
||||
typedef void VOID, *HANDLE, *RPC_IF_HANDLE, *LPVOID;
|
||||
typedef const void *LPCVOID;
|
||||
typedef size_t SIZE_T;
|
||||
typedef float FLOAT;
|
||||
typedef double DOUBLE;
|
||||
typedef unsigned char BYTE;
|
||||
typedef int HWND;
|
||||
typedef int PALETTEENTRY;
|
||||
typedef int HDC;
|
||||
typedef uint16_t WORD;
|
||||
typedef void* PVOID;
|
||||
typedef char BOOLEAN;
|
||||
typedef uint64_t ULONGLONG;
|
||||
typedef uint16_t USHORT, *PUSHORT;
|
||||
typedef int64_t LONGLONG, *PLONGLONG;
|
||||
typedef int64_t LONG_PTR, *PLONG_PTR;
|
||||
typedef int64_t LONG64, *PLONG64;
|
||||
typedef uint64_t ULONG64, *PULONG64;
|
||||
typedef wchar_t WCHAR, *PWSTR;
|
||||
typedef uint8_t UCHAR, *PUCHAR;
|
||||
typedef uint64_t ULONG_PTR, *PULONG_PTR;
|
||||
typedef uint64_t UINT_PTR, *PUINT_PTR;
|
||||
typedef int64_t INT_PTR, *PINT_PTR;
|
||||
|
||||
// Note: WCHAR is not the same between Windows and Linux, to enable
|
||||
// string manipulation APIs to work with resulting strings.
|
||||
// APIs to D3D/DXCore will work on Linux wchars, but beware with
|
||||
// interactions directly with the Windows kernel.
|
||||
typedef char CHAR, *PSTR, *LPSTR, TCHAR, *PTSTR;
|
||||
typedef const char *LPCSTR, *PCSTR, *LPCTSTR, *PCTSTR;
|
||||
typedef wchar_t WCHAR, *PWSTR, *LPWSTR, *PWCHAR;
|
||||
typedef const wchar_t *LPCWSTR, *PCWSTR;
|
||||
|
||||
#undef LONG_MAX
|
||||
#define LONG_MAX INT_MAX
|
||||
#undef ULONG_MAX
|
||||
#define ULONG_MAX UINT_MAX
|
||||
|
||||
// Misc defines
|
||||
#define MIDL_INTERFACE(x) interface
|
||||
#define __analysis_assume(x)
|
||||
#define TRUE 1u
|
||||
#define FALSE 0u
|
||||
#define DECLSPEC_UUID(x)
|
||||
#define DECLSPEC_NOVTABLE
|
||||
#define DECLSPEC_SELECTANY
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN_C extern "C"
|
||||
#else
|
||||
#define EXTERN_C extern
|
||||
#endif
|
||||
#define APIENTRY
|
||||
#define OUT
|
||||
#define IN
|
||||
#define CONST const
|
||||
#define MAX_PATH 260
|
||||
#define GENERIC_ALL 0x10000000L
|
||||
#define C_ASSERT(expr) static_assert((expr))
|
||||
#define _countof(a) (sizeof(a) / sizeof(*(a)))
|
||||
|
||||
typedef struct tagRECTL
|
||||
{
|
||||
LONG left;
|
||||
LONG top;
|
||||
LONG right;
|
||||
LONG bottom;
|
||||
} RECTL;
|
||||
|
||||
typedef struct tagPOINT
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
} POINT;
|
||||
|
||||
typedef struct _GUID {
|
||||
uint32_t Data1;
|
||||
uint16_t Data2;
|
||||
uint16_t Data3;
|
||||
uint8_t Data4[ 8 ];
|
||||
} GUID;
|
||||
|
||||
#ifdef INITGUID
|
||||
#ifdef __cplusplus
|
||||
#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID DECLSPEC_SELECTANY name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
||||
#else
|
||||
#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID DECLSPEC_SELECTANY name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
|
||||
#endif
|
||||
#else
|
||||
#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) EXTERN_C const GUID name
|
||||
#endif
|
||||
|
||||
typedef GUID IID;
|
||||
typedef GUID UUID;
|
||||
typedef GUID CLSID;
|
||||
#ifdef __cplusplus
|
||||
#define REFGUID const GUID &
|
||||
#define REFIID const IID &
|
||||
#define REFCLSID const IID &
|
||||
|
||||
__inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
|
||||
{
|
||||
return (
|
||||
((uint32_t *)&rguid1)[0] == ((uint32_t *)&rguid2)[0] &&
|
||||
((uint32_t *)&rguid1)[1] == ((uint32_t *)&rguid2)[1] &&
|
||||
((uint32_t *)&rguid1)[2] == ((uint32_t *)&rguid2)[2] &&
|
||||
((uint32_t *)&rguid1)[3] == ((uint32_t *)&rguid2)[3]);
|
||||
}
|
||||
|
||||
inline bool operator==(REFGUID guidOne, REFGUID guidOther)
|
||||
{
|
||||
return !!InlineIsEqualGUID(guidOne, guidOther);
|
||||
}
|
||||
|
||||
inline bool operator!=(REFGUID guidOne, REFGUID guidOther)
|
||||
{
|
||||
return !(guidOne == guidOther);
|
||||
}
|
||||
|
||||
#else
|
||||
#define REFGUID const GUID *
|
||||
#define REFIID const IID *
|
||||
#define REFCLSID const IID *
|
||||
#endif
|
||||
|
||||
// SAL annotations
|
||||
#define _In_
|
||||
#define _In_z_
|
||||
#define _In_opt_
|
||||
#define _In_opt_z_
|
||||
#define _In_reads_(x)
|
||||
#define _In_reads_opt_(x)
|
||||
#define _In_reads_bytes_(x)
|
||||
#define _In_reads_bytes_opt_(x)
|
||||
#define _In_range_(x, y)
|
||||
#define _In_bytecount_(x)
|
||||
#define _Out_
|
||||
#define _Out_opt_
|
||||
#define _Outptr_
|
||||
#define _Outptr_opt_result_z_
|
||||
#define _Outptr_opt_result_bytebuffer_(x)
|
||||
#define _COM_Outptr_
|
||||
#define _COM_Outptr_result_maybenull_
|
||||
#define _COM_Outptr_opt_
|
||||
#define _COM_Outptr_opt_result_maybenull_
|
||||
#define _Out_writes_(x)
|
||||
#define _Out_writes_z_(x)
|
||||
#define _Out_writes_opt_(x)
|
||||
#define _Out_writes_all_(x)
|
||||
#define _Out_writes_all_opt_(x)
|
||||
#define _Out_writes_to_opt_(x, y)
|
||||
#define _Out_writes_bytes_(x)
|
||||
#define _Out_writes_bytes_all_(x)
|
||||
#define _Out_writes_bytes_all_opt_(x)
|
||||
#define _Out_writes_bytes_opt_(x)
|
||||
#define _Inout_
|
||||
#define _Inout_opt_
|
||||
#define _Inout_updates_(x)
|
||||
#define _Inout_updates_bytes_(x)
|
||||
#define _Field_size_(x)
|
||||
#define _Field_size_opt_(x)
|
||||
#define _Field_size_bytes_(x)
|
||||
#define _Field_size_full_(x)
|
||||
#define _Field_size_full_opt_(x)
|
||||
#define _Field_size_bytes_full_(x)
|
||||
#define _Field_size_bytes_full_opt_(x)
|
||||
#define _Field_size_bytes_part_(x, y)
|
||||
#define _Field_range_(x, y)
|
||||
#define _Field_z_
|
||||
#define _Check_return_
|
||||
#define _IRQL_requires_(x)
|
||||
#define _IRQL_requires_min_(x)
|
||||
#define _IRQL_requires_max_(x)
|
||||
#define _At_(x, y)
|
||||
#define _Always_(x)
|
||||
#define _Return_type_success_(x)
|
||||
#define _Translates_Win32_to_HRESULT_(x)
|
||||
#define _Maybenull_
|
||||
#define _Outptr_result_maybenull_
|
||||
#define _Outptr_result_nullonfailure_
|
||||
#define _Analysis_assume_(x)
|
||||
#define _Success_(x)
|
||||
#define _In_count_(x)
|
||||
#define _In_opt_count_(x)
|
||||
#define _Use_decl_annotations_
|
||||
#define _Null_terminated_
|
||||
|
||||
// Calling conventions
|
||||
#define __cdecl
|
||||
#define __stdcall
|
||||
#define STDMETHODCALLTYPE
|
||||
#define STDAPICALLTYPE
|
||||
#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
|
||||
#define WINAPI
|
||||
|
||||
#define interface struct
|
||||
#if defined (__cplusplus) && !defined (CINTERFACE)
|
||||
#define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
|
||||
#define STDMETHOD_(type, method) virtual type STDMETHODCALLTYPE method
|
||||
#define PURE = 0
|
||||
#define THIS_
|
||||
#define THIS void
|
||||
#define DECLARE_INTERFACE(iface) interface DECLSPEC_NOVTABLE iface
|
||||
#define DECLARE_INTERFACE_(iface, baseiface) interface DECLSPEC_NOVTABLE iface : public baseiface
|
||||
|
||||
interface IUnknown;
|
||||
extern "C++"
|
||||
{
|
||||
template<typename T> void** IID_PPV_ARGS_Helper(T** pp)
|
||||
{
|
||||
(void)static_cast<IUnknown*>(*pp);
|
||||
return reinterpret_cast<void**>(pp);
|
||||
}
|
||||
}
|
||||
#define IID_PPV_ARGS(ppType) __uuidof (**(ppType)), IID_PPV_ARGS_Helper (ppType)
|
||||
#else
|
||||
#define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE *method)
|
||||
#define STDMETHOD_(type, method) type (STDMETHODCALLTYPE *method)
|
||||
#define PURE
|
||||
#define THIS_ INTERFACE *This,
|
||||
#define THIS INTERFACE *This
|
||||
#ifdef CONST_VTABLE
|
||||
#define DECLARE_INTERFACE(iface) typedef interface iface { const struct iface##Vtbl *lpVtbl; } iface; typedef const struct iface##Vtbl iface##Vtbl; const struct iface##Vtbl
|
||||
#else
|
||||
#define DECLARE_INTERFACE(iface) typedef interface iface { struct iface##Vtbl *lpVtbl; } iface; typedef struct iface##Vtbl iface##Vtbl; struct iface##Vtbl
|
||||
#endif
|
||||
#define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE (iface)
|
||||
#endif
|
||||
|
||||
#define IFACEMETHOD(method) /*override*/ STDMETHOD (method)
|
||||
#define IFACEMETHOD_(type, method) /*override*/ STDMETHOD_(type, method)
|
||||
#ifndef BEGIN_INTERFACE
|
||||
#define BEGIN_INTERFACE
|
||||
#define END_INTERFACE
|
||||
#endif
|
||||
|
||||
// Error codes
|
||||
typedef LONG HRESULT;
|
||||
#define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0)
|
||||
#define FAILED(hr) (((HRESULT)(hr)) < 0)
|
||||
#define S_OK ((HRESULT)0L)
|
||||
#define S_FALSE ((HRESULT)1L)
|
||||
#define E_NOTIMPL ((HRESULT)0x80004001L)
|
||||
#define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
|
||||
#define E_INVALIDARG ((HRESULT)0x80070057L)
|
||||
#define E_NOINTERFACE ((HRESULT)0x80004002L)
|
||||
#define E_POINTER ((HRESULT)0x80004003L)
|
||||
#define E_HANDLE ((HRESULT)0x80070006L)
|
||||
#define E_ABORT ((HRESULT)0x80004004L)
|
||||
#define E_FAIL ((HRESULT)0x80004005L)
|
||||
#define E_ACCESSDENIED ((HRESULT)0x80070005L)
|
||||
#define E_UNEXPECTED ((HRESULT)0x8000FFFFL)
|
||||
#define DXGI_ERROR_INVALID_CALL ((HRESULT)0x887A0001L)
|
||||
#define DXGI_ERROR_NOT_FOUND ((HRESULT)0x887A0002L)
|
||||
#define DXGI_ERROR_MORE_DATA ((HRESULT)0x887A0003L)
|
||||
#define DXGI_ERROR_UNSUPPORTED ((HRESULT)0x887A0004L)
|
||||
#define DXGI_ERROR_DEVICE_REMOVED ((HRESULT)0x887A0005L)
|
||||
#define DXGI_ERROR_DEVICE_HUNG ((HRESULT)0x887A0006L)
|
||||
#define DXGI_ERROR_DEVICE_RESET ((HRESULT)0x887A0007L)
|
||||
#define DXGI_ERROR_DRIVER_INTERNAL_ERROR ((HRESULT)0x887A0020L)
|
||||
|
||||
typedef struct _LUID
|
||||
{
|
||||
ULONG LowPart;
|
||||
LONG HighPart;
|
||||
} LUID;
|
||||
|
||||
typedef struct _RECT
|
||||
{
|
||||
int left;
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
} RECT;
|
||||
|
||||
typedef union _LARGE_INTEGER {
|
||||
struct {
|
||||
uint32_t LowPart;
|
||||
uint32_t HighPart;
|
||||
} u;
|
||||
int64_t QuadPart;
|
||||
} LARGE_INTEGER;
|
||||
typedef LARGE_INTEGER *PLARGE_INTEGER;
|
||||
|
||||
typedef union _ULARGE_INTEGER {
|
||||
struct {
|
||||
uint32_t LowPart;
|
||||
uint32_t HighPart;
|
||||
} u;
|
||||
uint64_t QuadPart;
|
||||
} ULARGE_INTEGER;
|
||||
typedef ULARGE_INTEGER *PULARGE_INTEGER;
|
||||
|
||||
#define DECLARE_HANDLE(name) \
|
||||
struct name##__ { \
|
||||
int unused; \
|
||||
}; \
|
||||
typedef struct name##__ *name
|
||||
|
||||
typedef struct _SECURITY_ATTRIBUTES {
|
||||
DWORD nLength;
|
||||
LPVOID lpSecurityDescriptor;
|
||||
WINBOOL bInheritHandle;
|
||||
} SECURITY_ATTRIBUTES;
|
||||
|
||||
struct STATSTG;
|
||||
|
||||
#ifdef __cplusplus
|
||||
// ENUM_FLAG_OPERATORS
|
||||
// Define operator overloads to enable bit operations on enum values that are
|
||||
// used to define flags. Use DEFINE_ENUM_FLAG_OPERATORS(YOUR_TYPE) to enable these
|
||||
// operators on YOUR_TYPE.
|
||||
extern "C++" {
|
||||
template <size_t S>
|
||||
struct _ENUM_FLAG_INTEGER_FOR_SIZE;
|
||||
|
||||
template <>
|
||||
struct _ENUM_FLAG_INTEGER_FOR_SIZE<1>
|
||||
{
|
||||
typedef int8_t type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct _ENUM_FLAG_INTEGER_FOR_SIZE<2>
|
||||
{
|
||||
typedef int16_t type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct _ENUM_FLAG_INTEGER_FOR_SIZE<4>
|
||||
{
|
||||
typedef int32_t type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct _ENUM_FLAG_INTEGER_FOR_SIZE<8>
|
||||
{
|
||||
typedef int64_t type;
|
||||
};
|
||||
|
||||
// used as an approximation of std::underlying_type<T>
|
||||
template <class T>
|
||||
struct _ENUM_FLAG_SIZED_INTEGER
|
||||
{
|
||||
typedef typename _ENUM_FLAG_INTEGER_FOR_SIZE<sizeof(T)>::type type;
|
||||
};
|
||||
|
||||
}
|
||||
#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \
|
||||
extern "C++" { \
|
||||
inline constexpr ENUMTYPE operator | (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)a) | ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \
|
||||
inline ENUMTYPE &operator |= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type &)a) |= ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \
|
||||
inline constexpr ENUMTYPE operator & (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)a) & ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \
|
||||
inline ENUMTYPE &operator &= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type &)a) &= ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \
|
||||
inline constexpr ENUMTYPE operator ~ (ENUMTYPE a) { return ENUMTYPE(~((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)a)); } \
|
||||
inline constexpr ENUMTYPE operator ^ (ENUMTYPE a, ENUMTYPE b) { return ENUMTYPE(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)a) ^ ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \
|
||||
inline ENUMTYPE &operator ^= (ENUMTYPE &a, ENUMTYPE b) { return (ENUMTYPE &)(((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type &)a) ^= ((_ENUM_FLAG_SIZED_INTEGER<ENUMTYPE>::type)b)); } \
|
||||
}
|
||||
#else
|
||||
#define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) /* */
|
||||
#endif
|
||||
|
||||
// D3DX12 uses these
|
||||
#include <stdlib.h>
|
||||
#define HeapAlloc(heap, flags, size) malloc(size)
|
||||
#define HeapFree(heap, flags, ptr) free(ptr)
|
||||
|
||||
#if defined(lint)
|
||||
// Note: lint -e530 says don't complain about uninitialized variables for
|
||||
// this variable. Error 527 has to do with unreachable code.
|
||||
// -restore restores checking to the -save state
|
||||
#define UNREFERENCED_PARAMETER(P) \
|
||||
/*lint -save -e527 -e530 */ \
|
||||
{ \
|
||||
(P) = (P); \
|
||||
} \
|
||||
/*lint -restore */
|
||||
#else
|
||||
#define UNREFERENCED_PARAMETER(P) (P)
|
||||
#endif
|
5
3rdparty/directx-headers/include/wsl/stubs/oaidl.h
vendored
Normal file
5
3rdparty/directx-headers/include/wsl/stubs/oaidl.h
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// Stub header to satisfy d3d12.h include
|
||||
#pragma once
|
5
3rdparty/directx-headers/include/wsl/stubs/ocidl.h
vendored
Normal file
5
3rdparty/directx-headers/include/wsl/stubs/ocidl.h
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// Stub header to satisfy d3d12.h include
|
||||
#pragma once
|
5
3rdparty/directx-headers/include/wsl/stubs/rpc.h
vendored
Normal file
5
3rdparty/directx-headers/include/wsl/stubs/rpc.h
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// Stub header to satisfy d3d12.h include
|
||||
#pragma once
|
78
3rdparty/directx-headers/include/wsl/stubs/rpcndr.h
vendored
Normal file
78
3rdparty/directx-headers/include/wsl/stubs/rpcndr.h
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// Stub header to satisfy d3d12.h include
|
||||
#pragma once
|
||||
|
||||
#include "basetsd.h"
|
||||
|
||||
#define __RPCNDR_H_VERSION__
|
||||
|
||||
#ifdef CONST_VTABLE
|
||||
#define CONST_VTBL const
|
||||
#else
|
||||
#define CONST_VTBL
|
||||
#endif
|
||||
|
||||
/* Macros for __uuidof template-based emulation */
|
||||
#if defined(__cplusplus)
|
||||
#if __cpp_constexpr >= 200704l && __cpp_inline_variables >= 201606L
|
||||
#define __wsl_stub_uuidof_use_constexpr 1
|
||||
#else
|
||||
#define __wsl_stub_uuidof_use_constexpr 0
|
||||
#endif
|
||||
#ifndef __GNUC__
|
||||
#error "Only support for compilers that support for `GNU C++ extension`"
|
||||
#endif
|
||||
extern "C++" {
|
||||
#if __wsl_stub_uuidof_use_constexpr
|
||||
__extension__ template<typename T> struct __wsl_stub_uuidof_s;
|
||||
__extension__ template<typename T> constexpr const GUID &__wsl_stub_uuidof();
|
||||
#else
|
||||
__extension__ template<typename T> const GUID &__wsl_stub_uuidof();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if __wsl_stub_uuidof_use_constexpr
|
||||
#define __CRT_UUID_DECL(type, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
extern "C++" \
|
||||
{ \
|
||||
template <> \
|
||||
struct __wsl_stub_uuidof_s<type> \
|
||||
{ \
|
||||
static constexpr IID __uuid_inst = { \
|
||||
l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}; \
|
||||
}; \
|
||||
template <> \
|
||||
constexpr const GUID &__wsl_stub_uuidof<type>() \
|
||||
{ \
|
||||
return __wsl_stub_uuidof_s<type>::__uuid_inst; \
|
||||
} \
|
||||
template <> \
|
||||
constexpr const GUID &__wsl_stub_uuidof<type *>() \
|
||||
{ \
|
||||
return __wsl_stub_uuidof_s<type>::__uuid_inst; \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define __CRT_UUID_DECL(type, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
|
||||
extern "C++" \
|
||||
{ \
|
||||
template <> \
|
||||
inline const GUID &__wsl_stub_uuidof<type>() \
|
||||
{ \
|
||||
static const IID __uuid_inst = { \
|
||||
l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}; \
|
||||
return __uuid_inst; \
|
||||
} \
|
||||
template <> \
|
||||
inline const GUID &__wsl_stub_uuidof<type *>() \
|
||||
{ \
|
||||
return __wsl_stub_uuidof<type>(); \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
#define __uuidof(type) __wsl_stub_uuidof<__typeof(type)>()
|
||||
#else
|
||||
#define __CRT_UUID_DECL(type, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
|
||||
#endif
|
3
3rdparty/directx-headers/include/wsl/stubs/unknwn.h
vendored
Normal file
3
3rdparty/directx-headers/include/wsl/stubs/unknwn.h
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "unknwnbase.h"
|
124
3rdparty/directx-headers/include/wsl/stubs/unknwnbase.h
vendored
Normal file
124
3rdparty/directx-headers/include/wsl/stubs/unknwnbase.h
vendored
Normal file
@ -0,0 +1,124 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
* Licensed under the MIT license
|
||||
*
|
||||
*-------------------------------------------------------------------------------------*/
|
||||
|
||||
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
|
||||
|
||||
/* File created by MIDL compiler version 8.01.0627 */
|
||||
|
||||
/* 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 __unknwnbase_h__
|
||||
#define __unknwnbase_h__
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
/* Forward Declarations */
|
||||
|
||||
#ifndef __IUnknown_FWD_DEFINED__
|
||||
#define __IUnknown_FWD_DEFINED__
|
||||
typedef interface IUnknown IUnknown;
|
||||
|
||||
#endif /* __IUnknown_FWD_DEFINED__ */
|
||||
|
||||
#ifndef __IUnknown_INTERFACE_DEFINED__
|
||||
#define __IUnknown_INTERFACE_DEFINED__
|
||||
|
||||
/* interface IUnknown */
|
||||
/* [unique][uuid][object][local] */
|
||||
|
||||
typedef /* [unique] */ IUnknown *LPUNKNOWN;
|
||||
|
||||
EXTERN_C const IID IID_IUnknown;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
extern "C++"
|
||||
{
|
||||
MIDL_INTERFACE("00000000-0000-0000-c000-000000000046")
|
||||
IUnknown
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE QueryInterface(
|
||||
REFIID riid,
|
||||
void **ppvObject) = 0;
|
||||
|
||||
virtual ULONG STDMETHODCALLTYPE AddRef() = 0;
|
||||
|
||||
virtual ULONG STDMETHODCALLTYPE Release() = 0;
|
||||
|
||||
template <class Q>
|
||||
HRESULT
|
||||
STDMETHODCALLTYPE
|
||||
QueryInterface(_COM_Outptr_ Q * *pp)
|
||||
{
|
||||
return QueryInterface(__uuidof(Q), (void **)pp);
|
||||
}
|
||||
END_INTERFACE
|
||||
};
|
||||
}
|
||||
#ifdef __CRT_UUID_DECL
|
||||
__CRT_UUID_DECL(IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46)
|
||||
#endif
|
||||
#else
|
||||
typedef struct IUnknownVtbl {
|
||||
BEGIN_INTERFACE
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
HRESULT (STDMETHODCALLTYPE *QueryInterface)(
|
||||
IUnknown *This,
|
||||
REFIID riid,
|
||||
void **ppvObject);
|
||||
|
||||
ULONG (STDMETHODCALLTYPE *AddRef)(
|
||||
IUnknown *This);
|
||||
|
||||
ULONG (STDMETHODCALLTYPE *Release)(
|
||||
IUnknown *This);
|
||||
|
||||
END_INTERFACE
|
||||
} IUnknownVtbl;
|
||||
|
||||
interface IUnknown {
|
||||
CONST_VTBL IUnknownVtbl* lpVtbl;
|
||||
};
|
||||
|
||||
#ifdef COBJMACROS
|
||||
/*** IUnknown methods ***/
|
||||
#define IUnknown_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
|
||||
#define IUnknown_AddRef(This) (This)->lpVtbl->AddRef(This)
|
||||
#define IUnknown_Release(This) (This)->lpVtbl->Release(This)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __IUnknown_INTERFACE_DEFINED__ */
|
||||
|
||||
DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
|
||||
|
||||
#endif /* __unknwnbase_h__ */
|
6
3rdparty/directx-headers/include/wsl/stubs/winapifamily.h
vendored
Normal file
6
3rdparty/directx-headers/include/wsl/stubs/winapifamily.h
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// Stub header to satisfy d3d12.h include. Unconditionally light up all APIs.
|
||||
#pragma once
|
||||
#define WINAPI_FAMILY_PARTITION(Partitions) 1
|
6
3rdparty/directx-headers/include/wsl/stubs/wrl/client.h
vendored
Normal file
6
3rdparty/directx-headers/include/wsl/stubs/wrl/client.h
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// Stub to satisfy d3dx12.h include
|
||||
#pragma once
|
||||
#include <wsl/wrladapter.h>
|
6
3rdparty/directx-headers/include/wsl/stubs/wrl/implements.h
vendored
Normal file
6
3rdparty/directx-headers/include/wsl/stubs/wrl/implements.h
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// Stub to satisfy DML TF runtime includes
|
||||
#pragma once
|
||||
#include <wsl/wrladapter.h>
|
6
3rdparty/directx-headers/include/wsl/winadapter.h
vendored
Normal file
6
3rdparty/directx-headers/include/wsl/winadapter.h
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <unknwn.h>
|
803
3rdparty/directx-headers/include/wsl/wrladapter.h
vendored
Normal file
803
3rdparty/directx-headers/include/wsl/wrladapter.h
vendored
Normal file
@ -0,0 +1,803 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "winadapter.h"
|
||||
|
||||
// defined by winadapter.h and needed by some windows headers, but conflicts
|
||||
// with some libc++ implementation headers
|
||||
#ifdef __in
|
||||
#undef __in
|
||||
#endif
|
||||
#ifdef __out
|
||||
#undef __out
|
||||
#endif
|
||||
|
||||
#include <type_traits>
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <climits>
|
||||
#include <cassert>
|
||||
|
||||
namespace Microsoft
|
||||
{
|
||||
namespace WRL
|
||||
{
|
||||
namespace Details
|
||||
{
|
||||
struct BoolStruct { int Member; };
|
||||
typedef int BoolStruct::* BoolType;
|
||||
|
||||
template <typename T> // T should be the ComPtr<T> or a derived type of it, not just the interface
|
||||
class ComPtrRefBase
|
||||
{
|
||||
public:
|
||||
typedef typename T::InterfaceType InterfaceType;
|
||||
|
||||
operator IUnknown**() const throw()
|
||||
{
|
||||
static_assert(__is_base_of(IUnknown, InterfaceType), "Invalid cast: InterfaceType does not derive from IUnknown");
|
||||
return reinterpret_cast<IUnknown**>(ptr_->ReleaseAndGetAddressOf());
|
||||
}
|
||||
|
||||
protected:
|
||||
T* ptr_;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class ComPtrRef : public Details::ComPtrRefBase<T> // T should be the ComPtr<T> or a derived type of it, not just the interface
|
||||
{
|
||||
using Super = Details::ComPtrRefBase<T>;
|
||||
using InterfaceType = typename Super::InterfaceType;
|
||||
public:
|
||||
ComPtrRef(_In_opt_ T* ptr) throw()
|
||||
{
|
||||
this->ptr_ = ptr;
|
||||
}
|
||||
|
||||
// Conversion operators
|
||||
operator void**() const throw()
|
||||
{
|
||||
return reinterpret_cast<void**>(this->ptr_->ReleaseAndGetAddressOf());
|
||||
}
|
||||
|
||||
// This is our operator ComPtr<U> (or the latest derived class from ComPtr (e.g. WeakRef))
|
||||
operator T*() throw()
|
||||
{
|
||||
*this->ptr_ = nullptr;
|
||||
return this->ptr_;
|
||||
}
|
||||
|
||||
// We define operator InterfaceType**() here instead of on ComPtrRefBase<T>, since
|
||||
// if InterfaceType is IUnknown or IInspectable, having it on the base will collide.
|
||||
operator InterfaceType**() throw()
|
||||
{
|
||||
return this->ptr_->ReleaseAndGetAddressOf();
|
||||
}
|
||||
|
||||
// This is used for IID_PPV_ARGS in order to do __uuidof(**(ppType)).
|
||||
// It does not need to clear ptr_ at this point, it is done at IID_PPV_ARGS_Helper(ComPtrRef&) later in this file.
|
||||
InterfaceType* operator *() throw()
|
||||
{
|
||||
return this->ptr_->Get();
|
||||
}
|
||||
|
||||
// Explicit functions
|
||||
InterfaceType* const * GetAddressOf() const throw()
|
||||
{
|
||||
return this->ptr_->GetAddressOf();
|
||||
}
|
||||
|
||||
InterfaceType** ReleaseAndGetAddressOf() throw()
|
||||
{
|
||||
return this->ptr_->ReleaseAndGetAddressOf();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
class ComPtr
|
||||
{
|
||||
public:
|
||||
typedef T InterfaceType;
|
||||
|
||||
protected:
|
||||
InterfaceType *ptr_;
|
||||
template<class U> friend class ComPtr;
|
||||
|
||||
void InternalAddRef() const throw()
|
||||
{
|
||||
if (ptr_ != nullptr)
|
||||
{
|
||||
ptr_->AddRef();
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long InternalRelease() throw()
|
||||
{
|
||||
unsigned long ref = 0;
|
||||
T* temp = ptr_;
|
||||
|
||||
if (temp != nullptr)
|
||||
{
|
||||
ptr_ = nullptr;
|
||||
ref = temp->Release();
|
||||
}
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
public:
|
||||
ComPtr() throw() : ptr_(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
ComPtr(decltype(nullptr)) throw() : ptr_(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
template<class U>
|
||||
ComPtr(_In_opt_ U *other) throw() : ptr_(other)
|
||||
{
|
||||
InternalAddRef();
|
||||
}
|
||||
|
||||
ComPtr(const ComPtr& other) throw() : ptr_(other.ptr_)
|
||||
{
|
||||
InternalAddRef();
|
||||
}
|
||||
|
||||
// copy constructor that allows to instantiate class when U* is convertible to T*
|
||||
template<class U>
|
||||
ComPtr(const ComPtr<U> &other, typename std::enable_if<std::is_convertible<U*, T*>::value, void *>::type * = 0) throw() :
|
||||
ptr_(other.ptr_)
|
||||
{
|
||||
InternalAddRef();
|
||||
}
|
||||
|
||||
ComPtr(_Inout_ ComPtr &&other) throw() : ptr_(nullptr)
|
||||
{
|
||||
if (this != reinterpret_cast<ComPtr*>(&reinterpret_cast<unsigned char&>(other)))
|
||||
{
|
||||
Swap(other);
|
||||
}
|
||||
}
|
||||
|
||||
// Move constructor that allows instantiation of a class when U* is convertible to T*
|
||||
template<class U>
|
||||
ComPtr(_Inout_ ComPtr<U>&& other, typename std::enable_if<std::is_convertible<U*, T*>::value, void *>::type * = 0) throw() :
|
||||
ptr_(other.ptr_)
|
||||
{
|
||||
other.ptr_ = nullptr;
|
||||
}
|
||||
|
||||
~ComPtr() throw()
|
||||
{
|
||||
InternalRelease();
|
||||
}
|
||||
|
||||
ComPtr& operator=(decltype(nullptr)) throw()
|
||||
{
|
||||
InternalRelease();
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComPtr& operator=(_In_opt_ T *other) throw()
|
||||
{
|
||||
if (ptr_ != other)
|
||||
{
|
||||
ComPtr(other).Swap(*this);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename U>
|
||||
ComPtr& operator=(_In_opt_ U *other) throw()
|
||||
{
|
||||
ComPtr(other).Swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComPtr& operator=(const ComPtr &other) throw()
|
||||
{
|
||||
if (ptr_ != other.ptr_)
|
||||
{
|
||||
ComPtr(other).Swap(*this);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class U>
|
||||
ComPtr& operator=(const ComPtr<U>& other) throw()
|
||||
{
|
||||
ComPtr(other).Swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComPtr& operator=(_Inout_ ComPtr &&other) throw()
|
||||
{
|
||||
ComPtr(static_cast<ComPtr&&>(other)).Swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class U>
|
||||
ComPtr& operator=(_Inout_ ComPtr<U>&& other) throw()
|
||||
{
|
||||
ComPtr(static_cast<ComPtr<U>&&>(other)).Swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Swap(_Inout_ ComPtr&& r) throw()
|
||||
{
|
||||
T* tmp = ptr_;
|
||||
ptr_ = r.ptr_;
|
||||
r.ptr_ = tmp;
|
||||
}
|
||||
|
||||
void Swap(_Inout_ ComPtr& r) throw()
|
||||
{
|
||||
T* tmp = ptr_;
|
||||
ptr_ = r.ptr_;
|
||||
r.ptr_ = tmp;
|
||||
}
|
||||
|
||||
operator Details::BoolType() const throw()
|
||||
{
|
||||
return Get() != nullptr ? &Details::BoolStruct::Member : nullptr;
|
||||
}
|
||||
|
||||
T* Get() const throw()
|
||||
{
|
||||
return ptr_;
|
||||
}
|
||||
|
||||
InterfaceType* operator->() const throw()
|
||||
{
|
||||
return ptr_;
|
||||
}
|
||||
|
||||
Details::ComPtrRef<ComPtr<T>> operator&() throw()
|
||||
{
|
||||
return Details::ComPtrRef<ComPtr<T>>(this);
|
||||
}
|
||||
|
||||
const Details::ComPtrRef<const ComPtr<T>> operator&() const throw()
|
||||
{
|
||||
return Details::ComPtrRef<const ComPtr<T>>(this);
|
||||
}
|
||||
|
||||
T* const* GetAddressOf() const throw()
|
||||
{
|
||||
return &ptr_;
|
||||
}
|
||||
|
||||
T** GetAddressOf() throw()
|
||||
{
|
||||
return &ptr_;
|
||||
}
|
||||
|
||||
T** ReleaseAndGetAddressOf() throw()
|
||||
{
|
||||
InternalRelease();
|
||||
return &ptr_;
|
||||
}
|
||||
|
||||
T* Detach() throw()
|
||||
{
|
||||
T* ptr = ptr_;
|
||||
ptr_ = nullptr;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void Attach(_In_opt_ InterfaceType* other) throw()
|
||||
{
|
||||
if (ptr_ != nullptr)
|
||||
{
|
||||
auto ref = ptr_->Release();
|
||||
// DBG_UNREFERENCED_LOCAL_VARIABLE(ref);
|
||||
// Attaching to the same object only works if duplicate references are being coalesced. Otherwise
|
||||
// re-attaching will cause the pointer to be released and may cause a crash on a subsequent dereference.
|
||||
assert(ref != 0 || ptr_ != other);
|
||||
}
|
||||
|
||||
ptr_ = other;
|
||||
}
|
||||
|
||||
unsigned long Reset()
|
||||
{
|
||||
return InternalRelease();
|
||||
}
|
||||
|
||||
// Previously, unsafe behavior could be triggered when 'this' is ComPtr<IInspectable> or ComPtr<IUnknown> and CopyTo is used to copy to another type U.
|
||||
// The user will use operator& to convert the destination into a ComPtrRef, which can then implicit cast to IInspectable** and IUnknown**.
|
||||
// If this overload of CopyTo is not present, it will implicitly cast to IInspectable or IUnknown and match CopyTo(InterfaceType**) instead.
|
||||
// A valid polymoprhic downcast requires run-time type checking via QueryInterface, so CopyTo(InterfaceType**) will break type safety.
|
||||
// This overload matches ComPtrRef before the implicit cast takes place, preventing the unsafe downcast.
|
||||
template <typename U>
|
||||
HRESULT CopyTo(Details::ComPtrRef<ComPtr<U>> ptr, typename std::enable_if<
|
||||
(std::is_same<T, IUnknown>::value)
|
||||
&& !std::is_same<U*, T*>::value, void *>::type * = 0) const throw()
|
||||
{
|
||||
return ptr_->QueryInterface(__uuidof(U), ptr);
|
||||
}
|
||||
|
||||
HRESULT CopyTo(_Outptr_result_maybenull_ InterfaceType** ptr) const throw()
|
||||
{
|
||||
InternalAddRef();
|
||||
*ptr = ptr_;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CopyTo(REFIID riid, _Outptr_result_nullonfailure_ void** ptr) const throw()
|
||||
{
|
||||
return ptr_->QueryInterface(riid, ptr);
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
HRESULT CopyTo(_Outptr_result_nullonfailure_ U** ptr) const throw()
|
||||
{
|
||||
return ptr_->QueryInterface(__uuidof(U), reinterpret_cast<void**>(ptr));
|
||||
}
|
||||
|
||||
// query for U interface
|
||||
template<typename U>
|
||||
HRESULT As(_Inout_ Details::ComPtrRef<ComPtr<U>> p) const throw()
|
||||
{
|
||||
return ptr_->QueryInterface(__uuidof(U), p);
|
||||
}
|
||||
|
||||
// query for U interface
|
||||
template<typename U>
|
||||
HRESULT As(_Out_ ComPtr<U>* p) const throw()
|
||||
{
|
||||
return ptr_->QueryInterface(__uuidof(U), reinterpret_cast<void**>(p->ReleaseAndGetAddressOf()));
|
||||
}
|
||||
|
||||
// query for riid interface and return as IUnknown
|
||||
HRESULT AsIID(REFIID riid, _Out_ ComPtr<IUnknown>* p) const throw()
|
||||
{
|
||||
return ptr_->QueryInterface(riid, reinterpret_cast<void**>(p->ReleaseAndGetAddressOf()));
|
||||
}
|
||||
|
||||
}; // ComPtr
|
||||
|
||||
|
||||
namespace Details
|
||||
{
|
||||
// Empty struct used as default template parameter
|
||||
class Nil
|
||||
{
|
||||
};
|
||||
|
||||
// Empty struct used for validating template parameter types in Implements
|
||||
struct ImplementsBase
|
||||
{
|
||||
};
|
||||
|
||||
class RuntimeClassBase
|
||||
{
|
||||
protected:
|
||||
template<typename T>
|
||||
static HRESULT AsIID(_In_ T* implements, REFIID riid, _Outptr_result_nullonfailure_ void **ppvObject) noexcept
|
||||
{
|
||||
*ppvObject = nullptr;
|
||||
bool isRefDelegated = false;
|
||||
// Prefer InlineIsEqualGUID over other forms since it's better perf on 4-byte aligned data, which is almost always the case.
|
||||
if (InlineIsEqualGUID(riid, __uuidof(IUnknown)))
|
||||
{
|
||||
*ppvObject = implements->CastToUnknown();
|
||||
static_cast<IUnknown*>(*ppvObject)->AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT hr = implements->CanCastTo(riid, ppvObject, &isRefDelegated);
|
||||
if (SUCCEEDED(hr) && !isRefDelegated)
|
||||
{
|
||||
static_cast<IUnknown*>(*ppvObject)->AddRef();
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 6102) // '*ppvObject' is used but may not be initialized
|
||||
#endif
|
||||
_Analysis_assume_(SUCCEEDED(hr) || (*ppvObject == nullptr));
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
return hr;
|
||||
}
|
||||
|
||||
public:
|
||||
HRESULT RuntimeClassInitialize() noexcept
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
};
|
||||
|
||||
// Interface traits provides casting and filling iids methods helpers
|
||||
template<typename I0>
|
||||
struct InterfaceTraits
|
||||
{
|
||||
typedef I0 Base;
|
||||
|
||||
template<typename T>
|
||||
static Base* CastToBase(_In_ T* ptr) noexcept
|
||||
{
|
||||
return static_cast<Base*>(ptr);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static IUnknown* CastToUnknown(_In_ T* ptr) noexcept
|
||||
{
|
||||
return static_cast<IUnknown*>(static_cast<Base*>(ptr));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
_Success_(return == true)
|
||||
static bool CanCastTo(_In_ T* ptr, REFIID riid, _Outptr_ void **ppv) noexcept
|
||||
{
|
||||
// Prefer InlineIsEqualGUID over other forms since it's better perf on 4-byte aligned data, which is almost always the case.
|
||||
if (InlineIsEqualGUID(riid, __uuidof(Base)))
|
||||
{
|
||||
*ppv = static_cast<Base*>(ptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Specialization for Nil parameter
|
||||
template<>
|
||||
struct InterfaceTraits<Nil>
|
||||
{
|
||||
typedef Nil Base;
|
||||
|
||||
template <typename T>
|
||||
_Success_(return == true)
|
||||
static bool CanCastTo(_In_ T*, REFIID, _Outptr_ void **) noexcept
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// ChainInterfaces - template allows specifying a derived COM interface along with its class hierarchy to allow QI for the base interfaces
|
||||
template <typename I0, typename I1, typename I2 = Nil, typename I3 = Nil,
|
||||
typename I4 = Nil, typename I5 = Nil, typename I6 = Nil,
|
||||
typename I7 = Nil, typename I8 = Nil, typename I9 = Nil>
|
||||
struct ChainInterfaces : I0
|
||||
{
|
||||
protected:
|
||||
HRESULT CanCastTo(REFIID riid, _Outptr_ void **ppv) throw()
|
||||
{
|
||||
typename InterfaceTraits<I0>::Base* ptr = InterfaceTraits<I0>::CastToBase(this);
|
||||
|
||||
return (InterfaceTraits<I0>::CanCastTo(this, riid, ppv) ||
|
||||
InterfaceTraits<I1>::CanCastTo(ptr, riid, ppv) ||
|
||||
InterfaceTraits<I2>::CanCastTo(ptr, riid, ppv) ||
|
||||
InterfaceTraits<I3>::CanCastTo(ptr, riid, ppv) ||
|
||||
InterfaceTraits<I4>::CanCastTo(ptr, riid, ppv) ||
|
||||
InterfaceTraits<I5>::CanCastTo(ptr, riid, ppv) ||
|
||||
InterfaceTraits<I6>::CanCastTo(ptr, riid, ppv) ||
|
||||
InterfaceTraits<I7>::CanCastTo(ptr, riid, ppv) ||
|
||||
InterfaceTraits<I8>::CanCastTo(ptr, riid, ppv) ||
|
||||
InterfaceTraits<I9>::CanCastTo(ptr, riid, ppv)) ? S_OK : E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown* CastToUnknown() throw()
|
||||
{
|
||||
return InterfaceTraits<I0>::CastToUnknown(this);
|
||||
}
|
||||
};
|
||||
|
||||
// Helper template used by Implements. This template traverses a list of interfaces and adds them as base class and information
|
||||
// to enable QI.
|
||||
template <typename ...TInterfaces>
|
||||
struct ImplementsHelper;
|
||||
|
||||
template <typename T>
|
||||
struct ImplementsMarker
|
||||
{};
|
||||
|
||||
template <typename I0, bool isImplements>
|
||||
struct MarkImplements;
|
||||
|
||||
template <typename I0>
|
||||
struct MarkImplements<I0, false>
|
||||
{
|
||||
typedef I0 Type;
|
||||
};
|
||||
|
||||
template <typename I0>
|
||||
struct MarkImplements<I0, true>
|
||||
{
|
||||
typedef ImplementsMarker<I0> Type;
|
||||
};
|
||||
|
||||
// AdjustImplements pre-processes the type list for more efficient builds.
|
||||
template <typename ...Bases>
|
||||
struct AdjustImplements;
|
||||
|
||||
template <typename I0, typename ...Bases>
|
||||
struct AdjustImplements<I0, Bases...>
|
||||
{
|
||||
typedef ImplementsHelper<typename MarkImplements<I0, std::is_base_of<ImplementsBase, I0>::value>::Type, Bases...> Type;
|
||||
};
|
||||
|
||||
// Use AdjustImplements to remove instances of "Nil" from the type list.
|
||||
template <typename ...Bases>
|
||||
struct AdjustImplements<Nil, Bases...>
|
||||
{
|
||||
typedef typename AdjustImplements<Bases...>::Type Type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct AdjustImplements<>
|
||||
{
|
||||
typedef ImplementsHelper<> Type;
|
||||
};
|
||||
|
||||
// Specialization handles unadorned interfaces
|
||||
template <typename I0, typename ...TInterfaces>
|
||||
struct ImplementsHelper<I0, TInterfaces...> :
|
||||
I0,
|
||||
AdjustImplements<TInterfaces...>::Type
|
||||
{
|
||||
template <typename ...> friend struct ImplementsHelper;
|
||||
friend class RuntimeClassBase;
|
||||
|
||||
protected:
|
||||
|
||||
HRESULT CanCastTo(REFIID riid, _Outptr_ void **ppv, bool *pRefDelegated = nullptr) noexcept
|
||||
{
|
||||
// Prefer InlineIsEqualGUID over other forms since it's better perf on 4-byte aligned data, which is almost always the case.
|
||||
if (InlineIsEqualGUID(riid, __uuidof(I0)))
|
||||
{
|
||||
*ppv = reinterpret_cast<I0*>(reinterpret_cast<void*>(this));
|
||||
return S_OK;
|
||||
}
|
||||
return AdjustImplements<TInterfaces...>::Type::CanCastTo(riid, ppv, pRefDelegated);
|
||||
}
|
||||
|
||||
IUnknown* CastToUnknown() noexcept
|
||||
{
|
||||
return reinterpret_cast<I0*>(reinterpret_cast<void*>(this));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Selector is used to "tag" base interfaces to be used in casting, since a runtime class may indirectly derive from
|
||||
// the same interface or Implements<> template multiple times
|
||||
template <typename base, typename disciminator>
|
||||
struct Selector : public base
|
||||
{
|
||||
};
|
||||
|
||||
// Specialization handles types that derive from ImplementsHelper (e.g. nested Implements).
|
||||
template <typename I0, typename ...TInterfaces>
|
||||
struct ImplementsHelper<ImplementsMarker<I0>, TInterfaces...> :
|
||||
Selector<I0, ImplementsHelper<ImplementsMarker<I0>, TInterfaces...>>,
|
||||
Selector<typename AdjustImplements<TInterfaces...>::Type, ImplementsHelper<ImplementsMarker<I0>, TInterfaces...>>
|
||||
{
|
||||
template <typename ...> friend struct ImplementsHelper;
|
||||
friend class RuntimeClassBase;
|
||||
|
||||
protected:
|
||||
typedef Selector<I0, ImplementsHelper<ImplementsMarker<I0>, TInterfaces...>> CurrentType;
|
||||
typedef Selector<typename AdjustImplements<TInterfaces...>::Type, ImplementsHelper<ImplementsMarker<I0>, TInterfaces...>> BaseType;
|
||||
|
||||
HRESULT CanCastTo(REFIID riid, _Outptr_ void **ppv, bool *pRefDelegated = nullptr) noexcept
|
||||
{
|
||||
HRESULT hr = CurrentType::CanCastTo(riid, ppv);
|
||||
if (hr == E_NOINTERFACE)
|
||||
{
|
||||
hr = BaseType::CanCastTo(riid, ppv, pRefDelegated);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
||||
IUnknown* CastToUnknown() noexcept
|
||||
{
|
||||
// First in list wins.
|
||||
return CurrentType::CastToUnknown();
|
||||
}
|
||||
};
|
||||
|
||||
// terminal case specialization.
|
||||
template <>
|
||||
struct ImplementsHelper<>
|
||||
{
|
||||
template <typename ...> friend struct ImplementsHelper;
|
||||
friend class RuntimeClassBase;
|
||||
|
||||
protected:
|
||||
HRESULT CanCastTo(_In_ REFIID /*riid*/, _Outptr_ void ** /*ppv*/, bool * /*pRefDelegated*/ = nullptr) noexcept
|
||||
{
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
// IUnknown* CastToUnknown() noexcept; // not defined for terminal case.
|
||||
};
|
||||
|
||||
// Specialization handles chaining interfaces
|
||||
template <typename C0, typename C1, typename C2, typename C3, typename C4, typename C5, typename C6, typename C7, typename C8, typename C9, typename ...TInterfaces>
|
||||
struct ImplementsHelper<ChainInterfaces<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9>, TInterfaces...> :
|
||||
ChainInterfaces<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9>,
|
||||
AdjustImplements<TInterfaces...>::Type
|
||||
{
|
||||
template <typename ...> friend struct ImplementsHelper;
|
||||
friend class RuntimeClassBase;
|
||||
|
||||
protected:
|
||||
typedef typename AdjustImplements<TInterfaces...>::Type BaseType;
|
||||
|
||||
HRESULT CanCastTo(REFIID riid, _Outptr_ void **ppv, bool *pRefDelegated = nullptr) noexcept
|
||||
{
|
||||
HRESULT hr = ChainInterfaces<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9>::CanCastTo(riid, ppv);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
hr = BaseType::CanCastTo(riid, ppv, pRefDelegated);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
IUnknown* CastToUnknown() noexcept
|
||||
{
|
||||
return ChainInterfaces<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9>::CastToUnknown();
|
||||
}
|
||||
};
|
||||
|
||||
// Implements - template implementing QI using the information provided through its template parameters
|
||||
// Each template parameter has to be one of the following:
|
||||
// * COM Interface
|
||||
// * A class that implements one or more COM interfaces
|
||||
// * ChainInterfaces template
|
||||
template <typename I0, typename ...TInterfaces>
|
||||
struct Implements :
|
||||
AdjustImplements<I0, TInterfaces...>::Type,
|
||||
ImplementsBase
|
||||
{
|
||||
public:
|
||||
typedef I0 FirstInterface;
|
||||
protected:
|
||||
typedef typename AdjustImplements<I0, TInterfaces...>::Type BaseType;
|
||||
template <typename ...> friend struct ImplementsHelper;
|
||||
friend class RuntimeClassBase;
|
||||
|
||||
HRESULT CanCastTo(REFIID riid, _Outptr_ void **ppv) noexcept
|
||||
{
|
||||
return BaseType::CanCastTo(riid, ppv);
|
||||
}
|
||||
|
||||
IUnknown* CastToUnknown() noexcept
|
||||
{
|
||||
return BaseType::CastToUnknown();
|
||||
}
|
||||
};
|
||||
|
||||
// Used on RuntimeClass to protect it from being constructed with new
|
||||
class DontUseNewUseMake
|
||||
{
|
||||
private:
|
||||
void* operator new(size_t) noexcept
|
||||
{
|
||||
assert(false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public:
|
||||
void* operator new(size_t, _In_ void* placement) noexcept
|
||||
{
|
||||
return placement;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename ...TInterfaces>
|
||||
class RuntimeClassImpl :
|
||||
public AdjustImplements<TInterfaces...>::Type,
|
||||
public RuntimeClassBase,
|
||||
public DontUseNewUseMake
|
||||
{
|
||||
public:
|
||||
STDMETHOD(QueryInterface)(REFIID riid, _Outptr_result_nullonfailure_ void **ppvObject)
|
||||
{
|
||||
return Super::AsIID(this, riid, ppvObject);
|
||||
}
|
||||
|
||||
STDMETHOD_(ULONG, AddRef)()
|
||||
{
|
||||
return InternalAddRef();
|
||||
}
|
||||
|
||||
STDMETHOD_(ULONG, Release)()
|
||||
{
|
||||
ULONG ref = InternalRelease();
|
||||
if (ref == 0)
|
||||
{
|
||||
this->~RuntimeClassImpl();
|
||||
delete[] reinterpret_cast<char*>(this);
|
||||
}
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
protected:
|
||||
using Super = RuntimeClassBase;
|
||||
static const LONG c_lProtectDestruction = -(LONG_MAX / 2);
|
||||
|
||||
RuntimeClassImpl() noexcept = default;
|
||||
|
||||
virtual ~RuntimeClassImpl() noexcept
|
||||
{
|
||||
// Set refcount_ to -(LONG_MAX/2) to protect destruction and
|
||||
// also catch mismatched Release in debug builds
|
||||
refcount_ = static_cast<ULONG>(c_lProtectDestruction);
|
||||
}
|
||||
|
||||
ULONG InternalAddRef() noexcept
|
||||
{
|
||||
return ++refcount_;
|
||||
}
|
||||
|
||||
ULONG InternalRelease() noexcept
|
||||
{
|
||||
return --refcount_;
|
||||
}
|
||||
|
||||
unsigned long GetRefCount() const noexcept
|
||||
{
|
||||
return refcount_;
|
||||
}
|
||||
|
||||
std::atomic<ULONG> refcount_{1};
|
||||
};
|
||||
}
|
||||
|
||||
template <typename ...TInterfaces>
|
||||
class Base : public Details::RuntimeClassImpl<TInterfaces...>
|
||||
{
|
||||
Base(const Base&) = delete;
|
||||
Base& operator=(const Base&) = delete;
|
||||
|
||||
protected:
|
||||
HRESULT CustomQueryInterface(REFIID /*riid*/, _Outptr_result_nullonfailure_ void** /*ppvObject*/, _Out_ bool *handled)
|
||||
{
|
||||
*handled = false;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
public:
|
||||
Base() throw() = default;
|
||||
typedef Base RuntimeClassT;
|
||||
};
|
||||
|
||||
// Creates a Nano-COM object wrapped in a smart pointer.
|
||||
template <typename T, typename ...TArgs>
|
||||
ComPtr<T> Make(TArgs&&... args)
|
||||
{
|
||||
std::unique_ptr<char[]> buffer(new(std::nothrow) char[sizeof(T)]);
|
||||
ComPtr<T> object;
|
||||
|
||||
if (buffer)
|
||||
{
|
||||
T* ptr = new (buffer.get())T(std::forward<TArgs>(args)...);
|
||||
object.Attach(ptr);
|
||||
buffer.release();
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
using Details::ChainInterfaces;
|
||||
}
|
||||
}
|
||||
|
||||
// Overloaded global function to provide to IID_PPV_ARGS that support Details::ComPtrRef
|
||||
template<typename T>
|
||||
void** IID_PPV_ARGS_Helper(Microsoft::WRL::Details::ComPtrRef<T> pp) throw()
|
||||
{
|
||||
return pp;
|
||||
}
|
77
3rdparty/dxsdk/directx-sdk-eula.txt
vendored
77
3rdparty/dxsdk/directx-sdk-eula.txt
vendored
@ -1,77 +0,0 @@
|
||||
MICROSOFT SOFTWARE LICENSE TERMS
|
||||
MICROSOFT DIRECTX SOFTWARE DEVELOPMENT KIT (SDK)
|
||||
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
|
||||
• updates,
|
||||
• supplements,
|
||||
• Internet-based services, and
|
||||
• support services
|
||||
for this software, unless other terms accompany those items. If so, those terms apply.
|
||||
BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.
|
||||
If you comply with these license terms, you have the rights below.
|
||||
1. INSTALLATION AND USE RIGHTS.
|
||||
a. Installation and Use. You may install and use any number of copies of the software on your devices.
|
||||
b. Included Microsoft Programs. The software contains other Microsoft programs. The license terms with those programs apply to your use of them.
|
||||
2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
|
||||
a. Media Elements and Templates. You may copy and use images, clip art, animations, sounds, music, shapes, video clips and templates provided with the software and identified for such use in documents and projects that you create. You may distribute those documents and projects non-commercially. If you wish to use these media elements or templates for any other purpose, go to www.microsoft.com/permission to learn whether that use is allowed.
|
||||
b. Distributable Code. The software contains code that you are permitted to distribute in programs you develop if you comply with the terms below.
|
||||
i. Right to Use and Distribute. The code and text files listed below are “Distributable Code.”
|
||||
• DIRECTX REDIST.TXT Files. You may copy and distribute the object code form of code listed in DIRECTX REDIST.TXT files.
|
||||
• Sample Code. You may modify, copy, and distribute the source and object code form of code marked as “sample”, as well as those marked as follows:
|
||||
\Utilities\bin\x86\dxerr
|
||||
\Utilities\bin\x64\dxerr
|
||||
\Utilities\bin\x86\dxtex
|
||||
\Utilities\bin\x64\dxtex
|
||||
\Utilities\bin\x86\DxViewer
|
||||
\Utilities\bin\x64\DxViewer
|
||||
\Utilities\bin\x86\GDFTrace
|
||||
\Utilities\bin\x64\GDFTrace
|
||||
\Utilities\bin\x86\MeshConvert
|
||||
\Utilities\bin\x64\MeshConvert
|
||||
\Utilities\Source\Sas
|
||||
\Utilities\Source\Effects11
|
||||
• Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.
|
||||
ii. Distribution Requirements. For any Distributable Code you distribute, you must
|
||||
• add significant primary functionality to it in your programs;
|
||||
• require distributors and external end users to agree to terms that protect it at least as much as this agreement;
|
||||
• display your valid copyright notice on your programs; and
|
||||
• indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your programs.
|
||||
iii. Distribution Restrictions. You may not
|
||||
• alter any copyright, trademark or patent notice in the Distributable Code;
|
||||
• use Microsoft’s trademarks in your programs’ names or in a way that suggests your programs come from or are endorsed by Microsoft;
|
||||
• distribute Distributable Code to run on a platform other than the Windows, Xbox and Windows Mobile platforms;
|
||||
• include Distributable Code in malicious, deceptive or unlawful programs; or
|
||||
• modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
|
||||
• the code be disclosed or distributed in source code form; or
|
||||
• others have the right to modify it.
|
||||
3. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
|
||||
• disclose the results of any benchmark tests of the software to any third party without Microsoft’s prior written approval;
|
||||
• work around any technical limitations in the software;
|
||||
• reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
|
||||
• make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;
|
||||
• publish the software for others to copy;
|
||||
• rent, lease or lend the software; or
|
||||
• use the software for commercial software hosting services.
|
||||
4. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.
|
||||
5. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
|
||||
6. EXPORT RESTRICTIONS. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.
|
||||
7. SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it.
|
||||
8. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
|
||||
9. APPLICABLE LAW.
|
||||
a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
|
||||
b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.
|
||||
10. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
|
||||
11. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
12. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
|
||||
This limitation applies to
|
||||
• anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
|
||||
• claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
|
||||
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
|
||||
Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.
|
||||
Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.
|
||||
EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
|
||||
LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
|
||||
Cette limitation concerne :
|
||||
• tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et
|
||||
• les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
|
||||
Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.
|
||||
EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
|
2539
3rdparty/dxsdk/include/d3d12_1.h
vendored
2539
3rdparty/dxsdk/include/d3d12_1.h
vendored
File diff suppressed because it is too large
Load Diff
3225
3rdparty/dxsdk/include/d3d12sdklayers.h
vendored
3225
3rdparty/dxsdk/include/d3d12sdklayers.h
vendored
File diff suppressed because it is too large
Load Diff
3352
3rdparty/dxsdk/include/d3d12video.h
vendored
3352
3rdparty/dxsdk/include/d3d12video.h
vendored
File diff suppressed because it is too large
Load Diff
137
3rdparty/dxsdk/include/dxgiformat.h
vendored
137
3rdparty/dxsdk/include/dxgiformat.h
vendored
@ -1,137 +0,0 @@
|
||||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef __dxgiformat_h__
|
||||
#define __dxgiformat_h__
|
||||
|
||||
#define DXGI_FORMAT_DEFINED 1
|
||||
|
||||
typedef enum DXGI_FORMAT
|
||||
{
|
||||
DXGI_FORMAT_UNKNOWN = 0,
|
||||
DXGI_FORMAT_R32G32B32A32_TYPELESS = 1,
|
||||
DXGI_FORMAT_R32G32B32A32_FLOAT = 2,
|
||||
DXGI_FORMAT_R32G32B32A32_UINT = 3,
|
||||
DXGI_FORMAT_R32G32B32A32_SINT = 4,
|
||||
DXGI_FORMAT_R32G32B32_TYPELESS = 5,
|
||||
DXGI_FORMAT_R32G32B32_FLOAT = 6,
|
||||
DXGI_FORMAT_R32G32B32_UINT = 7,
|
||||
DXGI_FORMAT_R32G32B32_SINT = 8,
|
||||
DXGI_FORMAT_R16G16B16A16_TYPELESS = 9,
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT = 10,
|
||||
DXGI_FORMAT_R16G16B16A16_UNORM = 11,
|
||||
DXGI_FORMAT_R16G16B16A16_UINT = 12,
|
||||
DXGI_FORMAT_R16G16B16A16_SNORM = 13,
|
||||
DXGI_FORMAT_R16G16B16A16_SINT = 14,
|
||||
DXGI_FORMAT_R32G32_TYPELESS = 15,
|
||||
DXGI_FORMAT_R32G32_FLOAT = 16,
|
||||
DXGI_FORMAT_R32G32_UINT = 17,
|
||||
DXGI_FORMAT_R32G32_SINT = 18,
|
||||
DXGI_FORMAT_R32G8X24_TYPELESS = 19,
|
||||
DXGI_FORMAT_D32_FLOAT_S8X24_UINT = 20,
|
||||
DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = 21,
|
||||
DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = 22,
|
||||
DXGI_FORMAT_R10G10B10A2_TYPELESS = 23,
|
||||
DXGI_FORMAT_R10G10B10A2_UNORM = 24,
|
||||
DXGI_FORMAT_R10G10B10A2_UINT = 25,
|
||||
DXGI_FORMAT_R11G11B10_FLOAT = 26,
|
||||
DXGI_FORMAT_R8G8B8A8_TYPELESS = 27,
|
||||
DXGI_FORMAT_R8G8B8A8_UNORM = 28,
|
||||
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29,
|
||||
DXGI_FORMAT_R8G8B8A8_UINT = 30,
|
||||
DXGI_FORMAT_R8G8B8A8_SNORM = 31,
|
||||
DXGI_FORMAT_R8G8B8A8_SINT = 32,
|
||||
DXGI_FORMAT_R16G16_TYPELESS = 33,
|
||||
DXGI_FORMAT_R16G16_FLOAT = 34,
|
||||
DXGI_FORMAT_R16G16_UNORM = 35,
|
||||
DXGI_FORMAT_R16G16_UINT = 36,
|
||||
DXGI_FORMAT_R16G16_SNORM = 37,
|
||||
DXGI_FORMAT_R16G16_SINT = 38,
|
||||
DXGI_FORMAT_R32_TYPELESS = 39,
|
||||
DXGI_FORMAT_D32_FLOAT = 40,
|
||||
DXGI_FORMAT_R32_FLOAT = 41,
|
||||
DXGI_FORMAT_R32_UINT = 42,
|
||||
DXGI_FORMAT_R32_SINT = 43,
|
||||
DXGI_FORMAT_R24G8_TYPELESS = 44,
|
||||
DXGI_FORMAT_D24_UNORM_S8_UINT = 45,
|
||||
DXGI_FORMAT_R24_UNORM_X8_TYPELESS = 46,
|
||||
DXGI_FORMAT_X24_TYPELESS_G8_UINT = 47,
|
||||
DXGI_FORMAT_R8G8_TYPELESS = 48,
|
||||
DXGI_FORMAT_R8G8_UNORM = 49,
|
||||
DXGI_FORMAT_R8G8_UINT = 50,
|
||||
DXGI_FORMAT_R8G8_SNORM = 51,
|
||||
DXGI_FORMAT_R8G8_SINT = 52,
|
||||
DXGI_FORMAT_R16_TYPELESS = 53,
|
||||
DXGI_FORMAT_R16_FLOAT = 54,
|
||||
DXGI_FORMAT_D16_UNORM = 55,
|
||||
DXGI_FORMAT_R16_UNORM = 56,
|
||||
DXGI_FORMAT_R16_UINT = 57,
|
||||
DXGI_FORMAT_R16_SNORM = 58,
|
||||
DXGI_FORMAT_R16_SINT = 59,
|
||||
DXGI_FORMAT_R8_TYPELESS = 60,
|
||||
DXGI_FORMAT_R8_UNORM = 61,
|
||||
DXGI_FORMAT_R8_UINT = 62,
|
||||
DXGI_FORMAT_R8_SNORM = 63,
|
||||
DXGI_FORMAT_R8_SINT = 64,
|
||||
DXGI_FORMAT_A8_UNORM = 65,
|
||||
DXGI_FORMAT_R1_UNORM = 66,
|
||||
DXGI_FORMAT_R9G9B9E5_SHAREDEXP = 67,
|
||||
DXGI_FORMAT_R8G8_B8G8_UNORM = 68,
|
||||
DXGI_FORMAT_G8R8_G8B8_UNORM = 69,
|
||||
DXGI_FORMAT_BC1_TYPELESS = 70,
|
||||
DXGI_FORMAT_BC1_UNORM = 71,
|
||||
DXGI_FORMAT_BC1_UNORM_SRGB = 72,
|
||||
DXGI_FORMAT_BC2_TYPELESS = 73,
|
||||
DXGI_FORMAT_BC2_UNORM = 74,
|
||||
DXGI_FORMAT_BC2_UNORM_SRGB = 75,
|
||||
DXGI_FORMAT_BC3_TYPELESS = 76,
|
||||
DXGI_FORMAT_BC3_UNORM = 77,
|
||||
DXGI_FORMAT_BC3_UNORM_SRGB = 78,
|
||||
DXGI_FORMAT_BC4_TYPELESS = 79,
|
||||
DXGI_FORMAT_BC4_UNORM = 80,
|
||||
DXGI_FORMAT_BC4_SNORM = 81,
|
||||
DXGI_FORMAT_BC5_TYPELESS = 82,
|
||||
DXGI_FORMAT_BC5_UNORM = 83,
|
||||
DXGI_FORMAT_BC5_SNORM = 84,
|
||||
DXGI_FORMAT_B5G6R5_UNORM = 85,
|
||||
DXGI_FORMAT_B5G5R5A1_UNORM = 86,
|
||||
DXGI_FORMAT_B8G8R8A8_UNORM = 87,
|
||||
DXGI_FORMAT_B8G8R8X8_UNORM = 88,
|
||||
DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM = 89,
|
||||
DXGI_FORMAT_B8G8R8A8_TYPELESS = 90,
|
||||
DXGI_FORMAT_B8G8R8A8_UNORM_SRGB = 91,
|
||||
DXGI_FORMAT_B8G8R8X8_TYPELESS = 92,
|
||||
DXGI_FORMAT_B8G8R8X8_UNORM_SRGB = 93,
|
||||
DXGI_FORMAT_BC6H_TYPELESS = 94,
|
||||
DXGI_FORMAT_BC6H_UF16 = 95,
|
||||
DXGI_FORMAT_BC6H_SF16 = 96,
|
||||
DXGI_FORMAT_BC7_TYPELESS = 97,
|
||||
DXGI_FORMAT_BC7_UNORM = 98,
|
||||
DXGI_FORMAT_BC7_UNORM_SRGB = 99,
|
||||
DXGI_FORMAT_AYUV = 100,
|
||||
DXGI_FORMAT_Y410 = 101,
|
||||
DXGI_FORMAT_Y416 = 102,
|
||||
DXGI_FORMAT_NV12 = 103,
|
||||
DXGI_FORMAT_P010 = 104,
|
||||
DXGI_FORMAT_P016 = 105,
|
||||
DXGI_FORMAT_420_OPAQUE = 106,
|
||||
DXGI_FORMAT_YUY2 = 107,
|
||||
DXGI_FORMAT_Y210 = 108,
|
||||
DXGI_FORMAT_Y216 = 109,
|
||||
DXGI_FORMAT_NV11 = 110,
|
||||
DXGI_FORMAT_AI44 = 111,
|
||||
DXGI_FORMAT_IA44 = 112,
|
||||
DXGI_FORMAT_P8 = 113,
|
||||
DXGI_FORMAT_A8P8 = 114,
|
||||
DXGI_FORMAT_B4G4R4A4_UNORM = 115,
|
||||
|
||||
DXGI_FORMAT_P208 = 130,
|
||||
DXGI_FORMAT_V208 = 131,
|
||||
DXGI_FORMAT_V408 = 132,
|
||||
|
||||
|
||||
DXGI_FORMAT_FORCE_UINT = 0xffffffff
|
||||
} DXGI_FORMAT;
|
||||
|
||||
#endif // __dxgiformat_h__
|
@ -109,7 +109,9 @@ function bgfxProjectBase(_kind, _defines)
|
||||
|
||||
configuration { "vs* or mingw*", "not durango" }
|
||||
includedirs {
|
||||
path.join(BGFX_DIR, "3rdparty/dxsdk/include"),
|
||||
path.join(BGFX_DIR, "3rdparty/directx-headers/include/directx"),
|
||||
-- path.join(BGFX_DIR, "3rdparty/directx-headers/include"),
|
||||
-- path.join(BGFX_DIR, "3rdparty/directx-headers/include/wsl/stubs"),
|
||||
}
|
||||
|
||||
configuration { "android*" }
|
||||
|
@ -460,14 +460,13 @@ namespace bgfx { namespace d3d12
|
||||
|
||||
static inline D3D12_HEAP_PROPERTIES ID3D12DeviceGetCustomHeapProperties(ID3D12Device *device, UINT nodeMask, D3D12_HEAP_TYPE heapType)
|
||||
{
|
||||
// NOTICE: gcc trick for return struct
|
||||
union {
|
||||
D3D12_HEAP_PROPERTIES (STDMETHODCALLTYPE ID3D12Device::*w)(UINT, D3D12_HEAP_TYPE);
|
||||
void (STDMETHODCALLTYPE ID3D12Device::*f)(D3D12_HEAP_PROPERTIES *, UINT, D3D12_HEAP_TYPE);
|
||||
} conversion = { &ID3D12Device::GetCustomHeapProperties };
|
||||
#if BX_COMPILER_MSVC
|
||||
return device->GetCustomHeapProperties(nodeMask, heapType);
|
||||
#else
|
||||
D3D12_HEAP_PROPERTIES ret;
|
||||
(device->*conversion.f)(&ret, nodeMask, heapType);
|
||||
device->GetCustomHeapProperties(&ret, nodeMask, heapType);
|
||||
return ret;
|
||||
#endif // BX_COMPILER_MSVC
|
||||
}
|
||||
|
||||
static void initHeapProperties(ID3D12Device* _device, D3D12_HEAP_PROPERTIES& _properties)
|
||||
@ -509,7 +508,12 @@ namespace bgfx { namespace d3d12
|
||||
{
|
||||
void* ptr;
|
||||
DX_CHECK(resource->Map(0, NULL, &ptr) );
|
||||
D3D12_RESOURCE_ALLOCATION_INFO rai = _device->GetResourceAllocationInfo(1, 1, _resourceDesc);
|
||||
D3D12_RESOURCE_ALLOCATION_INFO rai;
|
||||
#if BX_COMPILER_MSVC
|
||||
rai = _device->GetResourceAllocationInfo(1, 1, _resourceDesc);
|
||||
#else
|
||||
_device->GetResourceAllocationInfo(&rai, 1, 1, _resourceDesc);
|
||||
#endif // BX_COMPILER_MSVC
|
||||
bx::memSet(ptr, 0, size_t(rai.SizeInBytes) );
|
||||
resource->Unmap(0, NULL);
|
||||
}
|
||||
@ -608,11 +612,7 @@ namespace bgfx { namespace d3d12
|
||||
return _heap->GetCPUDescriptorHandleForHeapStart();
|
||||
#else
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE handle;
|
||||
union {
|
||||
D3D12_CPU_DESCRIPTOR_HANDLE (WINAPI ID3D12DescriptorHeap::*w)();
|
||||
void (WINAPI ID3D12DescriptorHeap::*f)(D3D12_CPU_DESCRIPTOR_HANDLE *);
|
||||
} conversion = { &ID3D12DescriptorHeap::GetCPUDescriptorHandleForHeapStart };
|
||||
(_heap->*conversion.f)(&handle);
|
||||
_heap->GetCPUDescriptorHandleForHeapStart(&handle);
|
||||
return handle;
|
||||
#endif // BX_COMPILER_MSVC
|
||||
}
|
||||
@ -623,11 +623,7 @@ namespace bgfx { namespace d3d12
|
||||
return _heap->GetGPUDescriptorHandleForHeapStart();
|
||||
#else
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE handle;
|
||||
union {
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE (WINAPI ID3D12DescriptorHeap::*w)();
|
||||
void (WINAPI ID3D12DescriptorHeap::*f)(D3D12_GPU_DESCRIPTOR_HANDLE *);
|
||||
} conversion = { &ID3D12DescriptorHeap::GetGPUDescriptorHandleForHeapStart };
|
||||
(_heap->*conversion.f)(&handle);
|
||||
_heap->GetGPUDescriptorHandleForHeapStart(&handle);
|
||||
return handle;
|
||||
#endif // BX_COMPILER_MSVC
|
||||
}
|
||||
@ -638,11 +634,7 @@ namespace bgfx { namespace d3d12
|
||||
return _resource->GetDesc();
|
||||
#else
|
||||
D3D12_RESOURCE_DESC desc;
|
||||
union {
|
||||
D3D12_RESOURCE_DESC (STDMETHODCALLTYPE ID3D12Resource::*w)();
|
||||
void (STDMETHODCALLTYPE ID3D12Resource::*f)(D3D12_RESOURCE_DESC *);
|
||||
} conversion = { &ID3D12Resource::GetDesc };
|
||||
(_resource->*conversion.f)(&desc);
|
||||
_resource->GetDesc(&desc);
|
||||
return desc;
|
||||
#endif // BX_COMPILER_MSVC
|
||||
}
|
||||
@ -5128,8 +5120,6 @@ namespace bgfx { namespace d3d12
|
||||
box.right = box.left + _rect.m_width;
|
||||
box.bottom = box.top + _rect.m_height;
|
||||
|
||||
uint32_t layer = 0;
|
||||
|
||||
if (TextureD3D12::Texture3D == m_type)
|
||||
{
|
||||
box.front = _z;
|
||||
@ -5137,7 +5127,6 @@ namespace bgfx { namespace d3d12
|
||||
}
|
||||
else
|
||||
{
|
||||
layer = _z * (TextureD3D12::TextureCube == m_type ? 6 : 1);
|
||||
box.front = 0;
|
||||
box.back = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user