mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-17 11:00:38 +02:00
Added modelviewer.
Added neural network code(turned off by default). Lots of editor and rendering fixes.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,899 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* 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 __VulkanOn12CreatorID_FWD_DEFINED__
|
||||
#define __VulkanOn12CreatorID_FWD_DEFINED__
|
||||
typedef interface VulkanOn12CreatorID VulkanOn12CreatorID;
|
||||
|
||||
#endif /* __VulkanOn12CreatorID_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__ */
|
||||
|
||||
|
||||
#ifndef __DirectMLWebNNCreatorID_FWD_DEFINED__
|
||||
#define __DirectMLWebNNCreatorID_FWD_DEFINED__
|
||||
typedef interface DirectMLWebNNCreatorID DirectMLWebNNCreatorID;
|
||||
|
||||
#endif /* __DirectMLWebNNCreatorID_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 __VulkanOn12CreatorID_INTERFACE_DEFINED__
|
||||
#define __VulkanOn12CreatorID_INTERFACE_DEFINED__
|
||||
|
||||
/* interface VulkanOn12CreatorID */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_VulkanOn12CreatorID;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("bc806e01-3052-406c-a3e8-9fc07f048f98")
|
||||
VulkanOn12CreatorID : public IUnknown
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct VulkanOn12CreatorIDVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
VulkanOn12CreatorID * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
VulkanOn12CreatorID * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
VulkanOn12CreatorID * This);
|
||||
|
||||
END_INTERFACE
|
||||
} VulkanOn12CreatorIDVtbl;
|
||||
|
||||
interface VulkanOn12CreatorID
|
||||
{
|
||||
CONST_VTBL struct VulkanOn12CreatorIDVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define VulkanOn12CreatorID_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define VulkanOn12CreatorID_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define VulkanOn12CreatorID_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __VulkanOn12CreatorID_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__ */
|
||||
|
||||
|
||||
#ifndef __DirectMLWebNNCreatorID_INTERFACE_DEFINED__
|
||||
#define __DirectMLWebNNCreatorID_INTERFACE_DEFINED__
|
||||
|
||||
/* interface DirectMLWebNNCreatorID */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_DirectMLWebNNCreatorID;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("fdf01a76-1e11-450f-902b-74f04ea08094")
|
||||
DirectMLWebNNCreatorID : public IUnknown
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct DirectMLWebNNCreatorIDVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
DirectMLWebNNCreatorID * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
DirectMLWebNNCreatorID * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
DirectMLWebNNCreatorID * This);
|
||||
|
||||
END_INTERFACE
|
||||
} DirectMLWebNNCreatorIDVtbl;
|
||||
|
||||
interface DirectMLWebNNCreatorID
|
||||
{
|
||||
CONST_VTBL struct DirectMLWebNNCreatorIDVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define DirectMLWebNNCreatorID_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define DirectMLWebNNCreatorID_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define DirectMLWebNNCreatorID_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __DirectMLWebNNCreatorID_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3d12compatibility_0000_0009 */
|
||||
/* [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_VulkanOn12CreatorID,0xbc806e01,0x3052,0x406c,0xa3,0xe8,0x9f,0xc0,0x7f,0x04,0x8f,0x98);
|
||||
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);
|
||||
DEFINE_GUID(IID_DirectMLWebNNCreatorID,0xfdf01a76,0x1e11,0x450f,0x90,0x2b,0x74,0xf0,0x4e,0xa0,0x80,0x94);
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compatibility_0000_0009_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compatibility_0000_0009_v0_0_s_ifspec;
|
||||
|
||||
/* Additional Prototypes for ALL interfaces */
|
||||
|
||||
/* end of Additional Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
* Licensed under the MIT license
|
||||
*
|
||||
*-------------------------------------------------------------------------------------*/
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
|
||||
import "d3d11on12.idl";
|
||||
|
||||
cpp_quote("#include <winapifamily.h>")
|
||||
|
||||
#pragma region Desktop Family
|
||||
cpp_quote("#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;
|
||||
cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMPATIBILITY_SHARED_FLAGS )" )
|
||||
|
||||
typedef enum D3D12_REFLECT_SHARED_PROPERTY
|
||||
{
|
||||
D3D12_REFLECT_SHARED_PROPERTY_D3D11_RESOURCE_FLAGS, // D3D11_RESOURCE_FLAGS
|
||||
D3D12_REFELCT_SHARED_PROPERTY_COMPATIBILITY_SHARED_FLAGS, // D3D12_COMPATIBILITY_SHARED_FLAGS
|
||||
D3D12_REFLECT_SHARED_PROPERTY_NON_NT_SHARED_HANDLE, // HANDLE
|
||||
} D3D12_REFLECT_SHARED_PROPERTY;
|
||||
|
||||
[ uuid( 8f1c0e3c-fae3-4a82-b098-bfe1708207ff ), object, local, pointer_default( unique ) ]
|
||||
interface ID3D12CompatibilityDevice
|
||||
: IUnknown
|
||||
{
|
||||
HRESULT CreateSharedResource(
|
||||
[annotation("_In_")] const D3D12_HEAP_PROPERTIES* pHeapProperties,
|
||||
D3D12_HEAP_FLAGS HeapFlags,
|
||||
[annotation("_In_")] const D3D12_RESOURCE_DESC* pDesc,
|
||||
D3D12_RESOURCE_STATES InitialResourceState,
|
||||
[annotation("_In_opt_")] const D3D12_CLEAR_VALUE* pOptimizedClearValue,
|
||||
[annotation("_In_opt_")] const D3D11_RESOURCE_FLAGS* pFlags11,
|
||||
D3D12_COMPATIBILITY_SHARED_FLAGS CompatibilityFlags,
|
||||
[annotation("_In_opt_")] ID3D12LifetimeTracker* pLifetimeTracker,
|
||||
[annotation("_In_opt_")] ID3D12SwapChainAssistant* pOwningSwapchain,
|
||||
REFIID riid,
|
||||
[out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppResource);
|
||||
|
||||
HRESULT CreateSharedHeap(
|
||||
[annotation("_In_")] const D3D12_HEAP_DESC* pHeapDesc,
|
||||
D3D12_COMPATIBILITY_SHARED_FLAGS CompatibilityFlags,
|
||||
REFIID riid,
|
||||
[out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppHeap);
|
||||
|
||||
HRESULT ReflectSharedProperties(
|
||||
[annotation("_In_")] ID3D12Object* pHeapOrResource,
|
||||
D3D12_REFLECT_SHARED_PROPERTY ReflectType,
|
||||
[annotation("_Out_writes_bytes_(DataSize)")] void* pData,
|
||||
UINT DataSize);
|
||||
}
|
||||
|
||||
[uuid(edbf5678-2960-4e81-8429-99d4b2630c4e), object, local, pointer_default(unique)]
|
||||
interface D3D11On12CreatorID : IUnknown { };
|
||||
|
||||
[uuid(fffcbb7f-15d3-42a2-841e-9d8d32f37ddd), object, local, pointer_default(unique)]
|
||||
interface D3D9On12CreatorID : IUnknown { };
|
||||
|
||||
[uuid(6bb3cd34-0d19-45ab-97ed-d720ba3dfc80), object, local, pointer_default(unique)]
|
||||
interface OpenGLOn12CreatorID : IUnknown { };
|
||||
|
||||
[uuid(3f76bb74-91b5-4a88-b126-20ca0331cd60), object, local, pointer_default(unique)]
|
||||
interface OpenCLOn12CreatorID : IUnknown { };
|
||||
|
||||
[uuid(bc806e01-3052-406c-a3e8-9fc07f048f98), object, local, pointer_default(unique)]
|
||||
interface VulkanOn12CreatorID : IUnknown { };
|
||||
|
||||
[uuid(cb7490ac-8a0f-44ec-9b7b-6f4cafe8e9ab), object, local, pointer_default(unique)]
|
||||
interface DirectMLTensorFlowCreatorID : IUnknown { };
|
||||
|
||||
[uuid(af029192-fba1-4b05-9116-235e06560354), object, local, pointer_default(unique)]
|
||||
interface DirectMLPyTorchCreatorID : IUnknown { };
|
||||
|
||||
[uuid(fdf01a76-1e11-450f-902b-74f04ea08094), object, local, pointer_default(unique)]
|
||||
interface DirectMLWebNNCreatorID : IUnknown { };
|
||||
|
||||
|
||||
cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */")
|
||||
#pragma endregion
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3D12CompatibilityDevice,0x8f1c0e3c,0xfae3,0x4a82,0xb0,0x98,0xbf,0xe1,0x70,0x82,0x07,0xff);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_D3D11On12CreatorID,0xedbf5678,0x2960,0x4e81,0x84,0x29,0x99,0xd4,0xb2,0x63,0x0c,0x4e);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_D3D9On12CreatorID,0xfffcbb7f,0x15d3,0x42a2,0x84,0x1e,0x9d,0x8d,0x32,0xf3,0x7d,0xdd);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_OpenGLOn12CreatorID,0x6bb3cd34,0x0d19,0x45ab,0x97,0xed,0xd7,0x20,0xba,0x3d,0xfc,0x80);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_OpenCLOn12CreatorID,0x3f76bb74,0x91b5,0x4a88,0xb1,0x26,0x20,0xca,0x03,0x31,0xcd,0x60);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_VulkanOn12CreatorID,0xbc806e01,0x3052,0x406c,0xa3,0xe8,0x9f,0xc0,0x7f,0x04,0x8f,0x98);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_DirectMLTensorFlowCreatorID,0xcb7490ac,0x8a0f,0x44ec,0x9b,0x7b,0x6f,0x4c,0xaf,0xe8,0xe9,0xab);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_DirectMLPyTorchCreatorID,0xaf029192,0xfba1,0x4b05,0x91,0x16,0x23,0x5e,0x06,0x56,0x03,0x54);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_DirectMLWebNNCreatorID,0xfdf01a76,0x1e11,0x450f,0x90,0x2b,0x74,0xf0,0x4e,0xa0,0x80,0x94);" )
|
||||
@@ -0,0 +1,977 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* 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 __d3d12compiler_h__
|
||||
#define __d3d12compiler_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 __ID3D12CompilerFactoryChild_FWD_DEFINED__
|
||||
#define __ID3D12CompilerFactoryChild_FWD_DEFINED__
|
||||
typedef interface ID3D12CompilerFactoryChild ID3D12CompilerFactoryChild;
|
||||
|
||||
#endif /* __ID3D12CompilerFactoryChild_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3D12CompilerCacheSession_FWD_DEFINED__
|
||||
#define __ID3D12CompilerCacheSession_FWD_DEFINED__
|
||||
typedef interface ID3D12CompilerCacheSession ID3D12CompilerCacheSession;
|
||||
|
||||
#endif /* __ID3D12CompilerCacheSession_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3D12CompilerStateObject_FWD_DEFINED__
|
||||
#define __ID3D12CompilerStateObject_FWD_DEFINED__
|
||||
typedef interface ID3D12CompilerStateObject ID3D12CompilerStateObject;
|
||||
|
||||
#endif /* __ID3D12CompilerStateObject_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3D12Compiler_FWD_DEFINED__
|
||||
#define __ID3D12Compiler_FWD_DEFINED__
|
||||
typedef interface ID3D12Compiler ID3D12Compiler;
|
||||
|
||||
#endif /* __ID3D12Compiler_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3D12CompilerFactory_FWD_DEFINED__
|
||||
#define __ID3D12CompilerFactory_FWD_DEFINED__
|
||||
typedef interface ID3D12CompilerFactory ID3D12CompilerFactory;
|
||||
|
||||
#endif /* __ID3D12CompilerFactory_FWD_DEFINED__ */
|
||||
|
||||
|
||||
/* header files for imported files */
|
||||
#include "oaidl.h"
|
||||
#include "ocidl.h"
|
||||
#include "dxgicommon.h"
|
||||
#include "d3d12.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3d12compiler_0000_0000 */
|
||||
/* [local] */
|
||||
|
||||
#include <winapifamily.h>
|
||||
#pragma region App Family
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)
|
||||
typedef struct D3D12_ADAPTER_FAMILY
|
||||
{
|
||||
WCHAR szAdapterFamily[ 128 ];
|
||||
} D3D12_ADAPTER_FAMILY;
|
||||
|
||||
typedef HRESULT (WINAPI* PFN_D3D12_COMPILER_CREATE_FACTORY)(
|
||||
_In_ LPCWSTR pPluginCompilerDllPath,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_opt_ void** ppFactory );
|
||||
|
||||
HRESULT WINAPI D3D12CompilerCreateFactory(
|
||||
_In_ LPCWSTR pPluginCompilerDllPath,
|
||||
_In_ REFIID riid, // Expected: ID3D12CompilerFactory
|
||||
_COM_Outptr_opt_ void** ppFactory );
|
||||
|
||||
typedef HRESULT (WINAPI* PFN_D3D12_COMPILER_SERIALIZE_VERSIONED_ROOT_SIGNATURE)(
|
||||
_In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature,
|
||||
_Out_ ID3DBlob** ppBlob,
|
||||
_Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob);
|
||||
|
||||
HRESULT WINAPI D3D12CompilerSerializeVersionedRootSignature(
|
||||
_In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature,
|
||||
_Out_ ID3DBlob** ppBlob,
|
||||
_Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob);
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compiler_0000_0000_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compiler_0000_0000_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __ID3D12CompilerFactoryChild_INTERFACE_DEFINED__
|
||||
#define __ID3D12CompilerFactoryChild_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3D12CompilerFactoryChild */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3D12CompilerFactoryChild;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("e0d06420-9f31-47e8-ae9a-dd2ba25ac0bc")
|
||||
ID3D12CompilerFactoryChild : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetFactory(
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerFactory) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3D12CompilerFactoryChildVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3D12CompilerFactoryChild * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3D12CompilerFactoryChild * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3D12CompilerFactoryChild * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerFactoryChild, GetFactory)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetFactory )(
|
||||
ID3D12CompilerFactoryChild * This,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerFactory);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3D12CompilerFactoryChildVtbl;
|
||||
|
||||
interface ID3D12CompilerFactoryChild
|
||||
{
|
||||
CONST_VTBL struct ID3D12CompilerFactoryChildVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3D12CompilerFactoryChild_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3D12CompilerFactoryChild_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3D12CompilerFactoryChild_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3D12CompilerFactoryChild_GetFactory(This,riid,ppCompilerFactory) \
|
||||
( (This)->lpVtbl -> GetFactory(This,riid,ppCompilerFactory) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3D12CompilerFactoryChild_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3d12compiler_0000_0001 */
|
||||
/* [local] */
|
||||
|
||||
typedef
|
||||
enum D3D12_COMPILER_VALUE_TYPE
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE_OBJECT_CODE = 0,
|
||||
D3D12_COMPILER_VALUE_TYPE_METADATA = 1,
|
||||
D3D12_COMPILER_VALUE_TYPE_DEBUG_PDB = 2,
|
||||
D3D12_COMPILER_VALUE_TYPE_PERFORMANCE_DATA = 3
|
||||
} D3D12_COMPILER_VALUE_TYPE;
|
||||
|
||||
typedef
|
||||
enum D3D12_COMPILER_VALUE_TYPE_FLAGS
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_NONE = 0,
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_OBJECT_CODE = ( 1 << D3D12_COMPILER_VALUE_TYPE_OBJECT_CODE ) ,
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_METADATA = ( 1 << D3D12_COMPILER_VALUE_TYPE_METADATA ) ,
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_DEBUG_PDB = ( 1 << D3D12_COMPILER_VALUE_TYPE_DEBUG_PDB ) ,
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_PERFORMANCE_DATA = ( 1 << D3D12_COMPILER_VALUE_TYPE_PERFORMANCE_DATA )
|
||||
} D3D12_COMPILER_VALUE_TYPE_FLAGS;
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMPILER_VALUE_TYPE_FLAGS )
|
||||
typedef struct D3D12_COMPILER_DATABASE_PATH
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS Types;
|
||||
LPCWSTR pPath;
|
||||
} D3D12_COMPILER_DATABASE_PATH;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_GROUP_KEY
|
||||
{
|
||||
_Field_size_bytes_full_(KeySize) const void *pKey;
|
||||
UINT KeySize;
|
||||
} D3D12_COMPILER_CACHE_GROUP_KEY;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_VALUE_KEY
|
||||
{
|
||||
_Field_size_bytes_full_(KeySize) const void *pKey;
|
||||
UINT KeySize;
|
||||
} D3D12_COMPILER_CACHE_VALUE_KEY;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_VALUE
|
||||
{
|
||||
_Field_size_bytes_full_(ValueSize) void *pValue;
|
||||
UINT ValueSize;
|
||||
} D3D12_COMPILER_CACHE_VALUE;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_TYPED_VALUE
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE Type;
|
||||
D3D12_COMPILER_CACHE_VALUE Value;
|
||||
} D3D12_COMPILER_CACHE_TYPED_VALUE;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_CONST_VALUE
|
||||
{
|
||||
_Field_size_bytes_full_(ValueSize) const void *pValue;
|
||||
UINT ValueSize;
|
||||
} D3D12_COMPILER_CACHE_CONST_VALUE;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_TYPED_CONST_VALUE
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE Type;
|
||||
D3D12_COMPILER_CACHE_CONST_VALUE Value;
|
||||
} D3D12_COMPILER_CACHE_TYPED_CONST_VALUE;
|
||||
|
||||
typedef struct D3D12_COMPILER_TARGET
|
||||
{
|
||||
UINT AdapterFamilyIndex;
|
||||
UINT64 ABIVersion;
|
||||
} D3D12_COMPILER_TARGET;
|
||||
|
||||
typedef void *( __stdcall *D3D12CompilerCacheSessionAllocationFunc )(
|
||||
SIZE_T SizeInBytes,
|
||||
_Inout_opt_ void *pContext);
|
||||
|
||||
typedef void ( __stdcall *D3D12CompilerCacheSessionGroupValueKeysFunc )(
|
||||
_In_ const D3D12_COMPILER_CACHE_VALUE_KEY *pValueKey,
|
||||
_Inout_opt_ void *pContext);
|
||||
|
||||
typedef void ( __stdcall *D3D12CompilerCacheSessionGroupValuesFunc )(
|
||||
UINT ValueKeyIndex,
|
||||
_In_ const D3D12_COMPILER_CACHE_TYPED_CONST_VALUE *pTypedValue,
|
||||
_Inout_opt_ void *pContext);
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compiler_0000_0001_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compiler_0000_0001_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __ID3D12CompilerCacheSession_INTERFACE_DEFINED__
|
||||
#define __ID3D12CompilerCacheSession_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3D12CompilerCacheSession */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3D12CompilerCacheSession;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("5704e5e6-054b-4738-b661-7b0d68d8dde2")
|
||||
ID3D12CompilerCacheSession : public ID3D12CompilerFactoryChild
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE FindGroup(
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
_Out_opt_ UINT *pGroupVersion) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE FindGroupValueKeys(
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
_In_opt_ const UINT *pExpectedGroupVersion,
|
||||
_In_ D3D12CompilerCacheSessionGroupValueKeysFunc CallbackFunc,
|
||||
_Inout_opt_ void *pContext) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE FindGroupValues(
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
_In_opt_ const UINT *pExpectedGroupVersion,
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS ValueTypeFlags,
|
||||
_In_opt_ D3D12CompilerCacheSessionGroupValuesFunc CallbackFunc,
|
||||
_Inout_opt_ void *pContext) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE FindValue(
|
||||
_In_ const D3D12_COMPILER_CACHE_VALUE_KEY *pValueKey,
|
||||
_Inout_count_(NumTypedValues) D3D12_COMPILER_CACHE_TYPED_VALUE *pTypedValues,
|
||||
UINT NumTypedValues,
|
||||
_In_opt_ D3D12CompilerCacheSessionAllocationFunc pCallbackFunc,
|
||||
_Inout_opt_ void *pContext) = 0;
|
||||
|
||||
virtual const D3D12_APPLICATION_DESC *STDMETHODCALLTYPE GetApplicationDesc( void) = 0;
|
||||
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
virtual D3D12_COMPILER_TARGET STDMETHODCALLTYPE GetCompilerTarget( void) = 0;
|
||||
#else
|
||||
virtual D3D12_COMPILER_TARGET *STDMETHODCALLTYPE GetCompilerTarget(
|
||||
D3D12_COMPILER_TARGET * RetVal) = 0;
|
||||
#endif
|
||||
|
||||
virtual D3D12_COMPILER_VALUE_TYPE_FLAGS STDMETHODCALLTYPE GetValueTypes( void) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE StoreGroupValueKeys(
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
UINT GroupVersion,
|
||||
_In_reads_(NumValueKeys) const D3D12_COMPILER_CACHE_VALUE_KEY *pValueKeys,
|
||||
UINT NumValueKeys) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE StoreValue(
|
||||
_In_ const D3D12_COMPILER_CACHE_VALUE_KEY *pValueKey,
|
||||
_In_reads_(NumTypedValues) const D3D12_COMPILER_CACHE_TYPED_CONST_VALUE *pTypedValues,
|
||||
UINT NumTypedValues) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3D12CompilerCacheSessionVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3D12CompilerCacheSession * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3D12CompilerCacheSession * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3D12CompilerCacheSession * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerFactoryChild, GetFactory)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetFactory )(
|
||||
ID3D12CompilerCacheSession * This,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerFactory);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerCacheSession, FindGroup)
|
||||
HRESULT ( STDMETHODCALLTYPE *FindGroup )(
|
||||
ID3D12CompilerCacheSession * This,
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
_Out_opt_ UINT *pGroupVersion);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerCacheSession, FindGroupValueKeys)
|
||||
HRESULT ( STDMETHODCALLTYPE *FindGroupValueKeys )(
|
||||
ID3D12CompilerCacheSession * This,
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
_In_opt_ const UINT *pExpectedGroupVersion,
|
||||
_In_ D3D12CompilerCacheSessionGroupValueKeysFunc CallbackFunc,
|
||||
_Inout_opt_ void *pContext);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerCacheSession, FindGroupValues)
|
||||
HRESULT ( STDMETHODCALLTYPE *FindGroupValues )(
|
||||
ID3D12CompilerCacheSession * This,
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
_In_opt_ const UINT *pExpectedGroupVersion,
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS ValueTypeFlags,
|
||||
_In_opt_ D3D12CompilerCacheSessionGroupValuesFunc CallbackFunc,
|
||||
_Inout_opt_ void *pContext);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerCacheSession, FindValue)
|
||||
HRESULT ( STDMETHODCALLTYPE *FindValue )(
|
||||
ID3D12CompilerCacheSession * This,
|
||||
_In_ const D3D12_COMPILER_CACHE_VALUE_KEY *pValueKey,
|
||||
_Inout_count_(NumTypedValues) D3D12_COMPILER_CACHE_TYPED_VALUE *pTypedValues,
|
||||
UINT NumTypedValues,
|
||||
_In_opt_ D3D12CompilerCacheSessionAllocationFunc pCallbackFunc,
|
||||
_Inout_opt_ void *pContext);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerCacheSession, GetApplicationDesc)
|
||||
const D3D12_APPLICATION_DESC *( STDMETHODCALLTYPE *GetApplicationDesc )(
|
||||
ID3D12CompilerCacheSession * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerCacheSession, GetCompilerTarget)
|
||||
#if !defined(_WIN32)
|
||||
D3D12_COMPILER_TARGET ( STDMETHODCALLTYPE *GetCompilerTarget )(
|
||||
ID3D12CompilerCacheSession * This);
|
||||
|
||||
#else
|
||||
D3D12_COMPILER_TARGET *( STDMETHODCALLTYPE *GetCompilerTarget )(
|
||||
ID3D12CompilerCacheSession * This,
|
||||
D3D12_COMPILER_TARGET * RetVal);
|
||||
|
||||
#endif
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerCacheSession, GetValueTypes)
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS ( STDMETHODCALLTYPE *GetValueTypes )(
|
||||
ID3D12CompilerCacheSession * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerCacheSession, StoreGroupValueKeys)
|
||||
HRESULT ( STDMETHODCALLTYPE *StoreGroupValueKeys )(
|
||||
ID3D12CompilerCacheSession * This,
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
UINT GroupVersion,
|
||||
_In_reads_(NumValueKeys) const D3D12_COMPILER_CACHE_VALUE_KEY *pValueKeys,
|
||||
UINT NumValueKeys);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerCacheSession, StoreValue)
|
||||
HRESULT ( STDMETHODCALLTYPE *StoreValue )(
|
||||
ID3D12CompilerCacheSession * This,
|
||||
_In_ const D3D12_COMPILER_CACHE_VALUE_KEY *pValueKey,
|
||||
_In_reads_(NumTypedValues) const D3D12_COMPILER_CACHE_TYPED_CONST_VALUE *pTypedValues,
|
||||
UINT NumTypedValues);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3D12CompilerCacheSessionVtbl;
|
||||
|
||||
interface ID3D12CompilerCacheSession
|
||||
{
|
||||
CONST_VTBL struct ID3D12CompilerCacheSessionVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3D12CompilerCacheSession_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3D12CompilerCacheSession_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3D12CompilerCacheSession_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3D12CompilerCacheSession_GetFactory(This,riid,ppCompilerFactory) \
|
||||
( (This)->lpVtbl -> GetFactory(This,riid,ppCompilerFactory) )
|
||||
|
||||
|
||||
#define ID3D12CompilerCacheSession_FindGroup(This,pGroupKey,pGroupVersion) \
|
||||
( (This)->lpVtbl -> FindGroup(This,pGroupKey,pGroupVersion) )
|
||||
|
||||
#define ID3D12CompilerCacheSession_FindGroupValueKeys(This,pGroupKey,pExpectedGroupVersion,CallbackFunc,pContext) \
|
||||
( (This)->lpVtbl -> FindGroupValueKeys(This,pGroupKey,pExpectedGroupVersion,CallbackFunc,pContext) )
|
||||
|
||||
#define ID3D12CompilerCacheSession_FindGroupValues(This,pGroupKey,pExpectedGroupVersion,ValueTypeFlags,CallbackFunc,pContext) \
|
||||
( (This)->lpVtbl -> FindGroupValues(This,pGroupKey,pExpectedGroupVersion,ValueTypeFlags,CallbackFunc,pContext) )
|
||||
|
||||
#define ID3D12CompilerCacheSession_FindValue(This,pValueKey,pTypedValues,NumTypedValues,pCallbackFunc,pContext) \
|
||||
( (This)->lpVtbl -> FindValue(This,pValueKey,pTypedValues,NumTypedValues,pCallbackFunc,pContext) )
|
||||
|
||||
#define ID3D12CompilerCacheSession_GetApplicationDesc(This) \
|
||||
( (This)->lpVtbl -> GetApplicationDesc(This) )
|
||||
#if !defined(_WIN32)
|
||||
|
||||
#define ID3D12CompilerCacheSession_GetCompilerTarget(This) \
|
||||
( (This)->lpVtbl -> GetCompilerTarget(This) )
|
||||
#else
|
||||
#define ID3D12CompilerCacheSession_GetCompilerTarget(This,RetVal) \
|
||||
( (This)->lpVtbl -> GetCompilerTarget(This,RetVal) )
|
||||
#endif
|
||||
|
||||
#define ID3D12CompilerCacheSession_GetValueTypes(This) \
|
||||
( (This)->lpVtbl -> GetValueTypes(This) )
|
||||
|
||||
#define ID3D12CompilerCacheSession_StoreGroupValueKeys(This,pGroupKey,GroupVersion,pValueKeys,NumValueKeys) \
|
||||
( (This)->lpVtbl -> StoreGroupValueKeys(This,pGroupKey,GroupVersion,pValueKeys,NumValueKeys) )
|
||||
|
||||
#define ID3D12CompilerCacheSession_StoreValue(This,pValueKey,pTypedValues,NumTypedValues) \
|
||||
( (This)->lpVtbl -> StoreValue(This,pValueKey,pTypedValues,NumTypedValues) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3D12CompilerCacheSession_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3D12CompilerStateObject_INTERFACE_DEFINED__
|
||||
#define __ID3D12CompilerStateObject_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3D12CompilerStateObject */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3D12CompilerStateObject;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("5981cca4-e8ae-44ca-9b92-4fa86f5a3a3a")
|
||||
ID3D12CompilerStateObject : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetCompiler(
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompiler) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3D12CompilerStateObjectVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3D12CompilerStateObject * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3D12CompilerStateObject * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3D12CompilerStateObject * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerStateObject, GetCompiler)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetCompiler )(
|
||||
ID3D12CompilerStateObject * This,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompiler);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3D12CompilerStateObjectVtbl;
|
||||
|
||||
interface ID3D12CompilerStateObject
|
||||
{
|
||||
CONST_VTBL struct ID3D12CompilerStateObjectVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3D12CompilerStateObject_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3D12CompilerStateObject_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3D12CompilerStateObject_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3D12CompilerStateObject_GetCompiler(This,riid,ppCompiler) \
|
||||
( (This)->lpVtbl -> GetCompiler(This,riid,ppCompiler) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3D12CompilerStateObject_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3d12compiler_0000_0003 */
|
||||
/* [local] */
|
||||
|
||||
typedef struct D3D12_COMPILER_EXISTING_COLLECTION_DESC
|
||||
{
|
||||
ID3D12CompilerStateObject *pExistingCollection;
|
||||
UINT NumExports;
|
||||
_In_reads_(NumExports) const D3D12_EXPORT_DESC *pExports;
|
||||
} D3D12_COMPILER_EXISTING_COLLECTION_DESC;
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compiler_0000_0003_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compiler_0000_0003_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __ID3D12Compiler_INTERFACE_DEFINED__
|
||||
#define __ID3D12Compiler_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3D12Compiler */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3D12Compiler;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("8c403c12-993b-4583-80f1-6824138fa68e")
|
||||
ID3D12Compiler : public ID3D12CompilerFactoryChild
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE CompilePipelineState(
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
UINT GroupVersion,
|
||||
_In_ const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE CompileStateObject(
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
UINT GroupVersion,
|
||||
_In_ const D3D12_STATE_OBJECT_DESC *pDesc,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerStateObject) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE CompileAddToStateObject(
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
UINT GroupVersion,
|
||||
_In_ const D3D12_STATE_OBJECT_DESC *pAddition,
|
||||
_In_ ID3D12CompilerStateObject *pCompilerStateObjectToGrowFrom,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppNewCompilerStateObject) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetCacheSession(
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerCacheSession) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3D12CompilerVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3D12Compiler * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3D12Compiler * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3D12Compiler * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerFactoryChild, GetFactory)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetFactory )(
|
||||
ID3D12Compiler * This,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerFactory);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12Compiler, CompilePipelineState)
|
||||
HRESULT ( STDMETHODCALLTYPE *CompilePipelineState )(
|
||||
ID3D12Compiler * This,
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
UINT GroupVersion,
|
||||
_In_ const D3D12_PIPELINE_STATE_STREAM_DESC *pDesc);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12Compiler, CompileStateObject)
|
||||
HRESULT ( STDMETHODCALLTYPE *CompileStateObject )(
|
||||
ID3D12Compiler * This,
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
UINT GroupVersion,
|
||||
_In_ const D3D12_STATE_OBJECT_DESC *pDesc,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerStateObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12Compiler, CompileAddToStateObject)
|
||||
HRESULT ( STDMETHODCALLTYPE *CompileAddToStateObject )(
|
||||
ID3D12Compiler * This,
|
||||
_In_ const D3D12_COMPILER_CACHE_GROUP_KEY *pGroupKey,
|
||||
UINT GroupVersion,
|
||||
_In_ const D3D12_STATE_OBJECT_DESC *pAddition,
|
||||
_In_ ID3D12CompilerStateObject *pCompilerStateObjectToGrowFrom,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppNewCompilerStateObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12Compiler, GetCacheSession)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetCacheSession )(
|
||||
ID3D12Compiler * This,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerCacheSession);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3D12CompilerVtbl;
|
||||
|
||||
interface ID3D12Compiler
|
||||
{
|
||||
CONST_VTBL struct ID3D12CompilerVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3D12Compiler_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3D12Compiler_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3D12Compiler_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3D12Compiler_GetFactory(This,riid,ppCompilerFactory) \
|
||||
( (This)->lpVtbl -> GetFactory(This,riid,ppCompilerFactory) )
|
||||
|
||||
|
||||
#define ID3D12Compiler_CompilePipelineState(This,pGroupKey,GroupVersion,pDesc) \
|
||||
( (This)->lpVtbl -> CompilePipelineState(This,pGroupKey,GroupVersion,pDesc) )
|
||||
|
||||
#define ID3D12Compiler_CompileStateObject(This,pGroupKey,GroupVersion,pDesc,riid,ppCompilerStateObject) \
|
||||
( (This)->lpVtbl -> CompileStateObject(This,pGroupKey,GroupVersion,pDesc,riid,ppCompilerStateObject) )
|
||||
|
||||
#define ID3D12Compiler_CompileAddToStateObject(This,pGroupKey,GroupVersion,pAddition,pCompilerStateObjectToGrowFrom,riid,ppNewCompilerStateObject) \
|
||||
( (This)->lpVtbl -> CompileAddToStateObject(This,pGroupKey,GroupVersion,pAddition,pCompilerStateObjectToGrowFrom,riid,ppNewCompilerStateObject) )
|
||||
|
||||
#define ID3D12Compiler_GetCacheSession(This,riid,ppCompilerCacheSession) \
|
||||
( (This)->lpVtbl -> GetCacheSession(This,riid,ppCompilerCacheSession) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3D12Compiler_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3D12CompilerFactory_INTERFACE_DEFINED__
|
||||
#define __ID3D12CompilerFactory_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3D12CompilerFactory */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3D12CompilerFactory;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("c1ee4b59-3f59-47a5-9b4e-a855c858a878")
|
||||
ID3D12CompilerFactory : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE EnumerateAdapterFamilies(
|
||||
UINT AdapterFamilyIndex,
|
||||
_Out_ D3D12_ADAPTER_FAMILY *pAdapterFamily) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE EnumerateAdapterFamilyABIVersions(
|
||||
UINT AdapterFamilyIndex,
|
||||
_Inout_ UINT32 *pNumABIVersions,
|
||||
_Out_writes_opt_(*pNumABIVersions) UINT64 *pABIVersions) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE EnumerateAdapterFamilyCompilerVersion(
|
||||
UINT AdapterFamilyIndex,
|
||||
_Out_ D3D12_VERSION_NUMBER *pCompilerVersion) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetApplicationProfileVersion(
|
||||
_In_ const D3D12_COMPILER_TARGET *pTarget,
|
||||
_In_ const D3D12_APPLICATION_DESC *pApplicationDesc,
|
||||
_Out_ D3D12_VERSION_NUMBER *pApplicationProfileVersion) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateCompilerCacheSession(
|
||||
_In_reads_(NumPaths) const D3D12_COMPILER_DATABASE_PATH *pPaths,
|
||||
UINT NumPaths,
|
||||
_In_opt_ const D3D12_COMPILER_TARGET *pTarget,
|
||||
_In_opt_ const D3D12_APPLICATION_DESC *pApplicationDesc,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerCacheSession) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateCompiler(
|
||||
_In_ ID3D12CompilerCacheSession *pCompilerCacheSession,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompiler) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3D12CompilerFactoryVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3D12CompilerFactory * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3D12CompilerFactory * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3D12CompilerFactory * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerFactory, EnumerateAdapterFamilies)
|
||||
HRESULT ( STDMETHODCALLTYPE *EnumerateAdapterFamilies )(
|
||||
ID3D12CompilerFactory * This,
|
||||
UINT AdapterFamilyIndex,
|
||||
_Out_ D3D12_ADAPTER_FAMILY *pAdapterFamily);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerFactory, EnumerateAdapterFamilyABIVersions)
|
||||
HRESULT ( STDMETHODCALLTYPE *EnumerateAdapterFamilyABIVersions )(
|
||||
ID3D12CompilerFactory * This,
|
||||
UINT AdapterFamilyIndex,
|
||||
_Inout_ UINT32 *pNumABIVersions,
|
||||
_Out_writes_opt_(*pNumABIVersions) UINT64 *pABIVersions);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerFactory, EnumerateAdapterFamilyCompilerVersion)
|
||||
HRESULT ( STDMETHODCALLTYPE *EnumerateAdapterFamilyCompilerVersion )(
|
||||
ID3D12CompilerFactory * This,
|
||||
UINT AdapterFamilyIndex,
|
||||
_Out_ D3D12_VERSION_NUMBER *pCompilerVersion);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerFactory, GetApplicationProfileVersion)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetApplicationProfileVersion )(
|
||||
ID3D12CompilerFactory * This,
|
||||
_In_ const D3D12_COMPILER_TARGET *pTarget,
|
||||
_In_ const D3D12_APPLICATION_DESC *pApplicationDesc,
|
||||
_Out_ D3D12_VERSION_NUMBER *pApplicationProfileVersion);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerFactory, CreateCompilerCacheSession)
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateCompilerCacheSession )(
|
||||
ID3D12CompilerFactory * This,
|
||||
_In_reads_(NumPaths) const D3D12_COMPILER_DATABASE_PATH *pPaths,
|
||||
UINT NumPaths,
|
||||
_In_opt_ const D3D12_COMPILER_TARGET *pTarget,
|
||||
_In_opt_ const D3D12_APPLICATION_DESC *pApplicationDesc,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompilerCacheSession);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3D12CompilerFactory, CreateCompiler)
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateCompiler )(
|
||||
ID3D12CompilerFactory * This,
|
||||
_In_ ID3D12CompilerCacheSession *pCompilerCacheSession,
|
||||
_In_ REFIID riid,
|
||||
_COM_Outptr_ void **ppCompiler);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3D12CompilerFactoryVtbl;
|
||||
|
||||
interface ID3D12CompilerFactory
|
||||
{
|
||||
CONST_VTBL struct ID3D12CompilerFactoryVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3D12CompilerFactory_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3D12CompilerFactory_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3D12CompilerFactory_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3D12CompilerFactory_EnumerateAdapterFamilies(This,AdapterFamilyIndex,pAdapterFamily) \
|
||||
( (This)->lpVtbl -> EnumerateAdapterFamilies(This,AdapterFamilyIndex,pAdapterFamily) )
|
||||
|
||||
#define ID3D12CompilerFactory_EnumerateAdapterFamilyABIVersions(This,AdapterFamilyIndex,pNumABIVersions,pABIVersions) \
|
||||
( (This)->lpVtbl -> EnumerateAdapterFamilyABIVersions(This,AdapterFamilyIndex,pNumABIVersions,pABIVersions) )
|
||||
|
||||
#define ID3D12CompilerFactory_EnumerateAdapterFamilyCompilerVersion(This,AdapterFamilyIndex,pCompilerVersion) \
|
||||
( (This)->lpVtbl -> EnumerateAdapterFamilyCompilerVersion(This,AdapterFamilyIndex,pCompilerVersion) )
|
||||
|
||||
#define ID3D12CompilerFactory_GetApplicationProfileVersion(This,pTarget,pApplicationDesc,pApplicationProfileVersion) \
|
||||
( (This)->lpVtbl -> GetApplicationProfileVersion(This,pTarget,pApplicationDesc,pApplicationProfileVersion) )
|
||||
|
||||
#define ID3D12CompilerFactory_CreateCompilerCacheSession(This,pPaths,NumPaths,pTarget,pApplicationDesc,riid,ppCompilerCacheSession) \
|
||||
( (This)->lpVtbl -> CreateCompilerCacheSession(This,pPaths,NumPaths,pTarget,pApplicationDesc,riid,ppCompilerCacheSession) )
|
||||
|
||||
#define ID3D12CompilerFactory_CreateCompiler(This,pCompilerCacheSession,riid,ppCompiler) \
|
||||
( (This)->lpVtbl -> CreateCompiler(This,pCompilerCacheSession,riid,ppCompiler) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3D12CompilerFactory_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3d12compiler_0000_0005 */
|
||||
/* [local] */
|
||||
|
||||
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */
|
||||
#pragma endregion
|
||||
DEFINE_GUID(IID_ID3D12CompilerFactoryChild,0xe0d06420,0x9f31,0x47e8,0xae,0x9a,0xdd,0x2b,0xa2,0x5a,0xc0,0xbc);
|
||||
DEFINE_GUID(IID_ID3D12CompilerCacheSession,0x5704e5e6,0x054b,0x4738,0xb6,0x61,0x7b,0x0d,0x68,0xd8,0xdd,0xe2);
|
||||
DEFINE_GUID(IID_ID3D12CompilerStateObject,0x5981cca4,0xe8ae,0x44ca,0x9b,0x92,0x4f,0xa8,0x6f,0x5a,0x3a,0x3a);
|
||||
DEFINE_GUID(IID_ID3D12Compiler,0x8c403c12,0x993b,0x4583,0x80,0xf1,0x68,0x24,0x13,0x8f,0xa6,0x8e);
|
||||
DEFINE_GUID(IID_ID3D12CompilerFactory,0xc1ee4b59,0x3f59,0x47a5,0x9b,0x4e,0xa8,0x55,0xc8,0x58,0xa8,0x78);
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compiler_0000_0005_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3d12compiler_0000_0005_v0_0_s_ifspec;
|
||||
|
||||
/* Additional Prototypes for ALL interfaces */
|
||||
|
||||
/* end of Additional Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
* Licensed under the MIT license
|
||||
*
|
||||
*-------------------------------------------------------------------------------------*/
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
|
||||
import "dxgicommon.idl";
|
||||
import "d3d12.idl";
|
||||
|
||||
cpp_quote("#include <winapifamily.h>")
|
||||
|
||||
#pragma region App Family
|
||||
cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)")
|
||||
|
||||
|
||||
typedef struct D3D12_ADAPTER_FAMILY
|
||||
{
|
||||
WCHAR szAdapterFamily[128];
|
||||
} D3D12_ADAPTER_FAMILY;
|
||||
|
||||
cpp_quote("typedef HRESULT (WINAPI* PFN_D3D12_COMPILER_CREATE_FACTORY)( ")
|
||||
cpp_quote(" _In_ LPCWSTR pPluginCompilerDllPath,")
|
||||
cpp_quote(" _In_ REFIID riid,")
|
||||
cpp_quote(" _COM_Outptr_opt_ void** ppFactory );")
|
||||
cpp_quote("")
|
||||
cpp_quote("HRESULT WINAPI D3D12CompilerCreateFactory(")
|
||||
cpp_quote(" _In_ LPCWSTR pPluginCompilerDllPath,")
|
||||
cpp_quote(" _In_ REFIID riid, // Expected: ID3D12CompilerFactory")
|
||||
cpp_quote(" _COM_Outptr_opt_ void** ppFactory );")
|
||||
cpp_quote("")
|
||||
cpp_quote("typedef HRESULT (WINAPI* PFN_D3D12_COMPILER_SERIALIZE_VERSIONED_ROOT_SIGNATURE)(")
|
||||
cpp_quote(" _In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature,")
|
||||
cpp_quote(" _Out_ ID3DBlob** ppBlob,")
|
||||
cpp_quote(" _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob);")
|
||||
cpp_quote("")
|
||||
cpp_quote("HRESULT WINAPI D3D12CompilerSerializeVersionedRootSignature(")
|
||||
cpp_quote(" _In_ const D3D12_VERSIONED_ROOT_SIGNATURE_DESC* pRootSignature,")
|
||||
cpp_quote(" _Out_ ID3DBlob** ppBlob,")
|
||||
cpp_quote(" _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorBlob);")
|
||||
cpp_quote("")
|
||||
|
||||
[uuid(e0d06420-9f31-47e8-ae9a-dd2ba25ac0bc), object, local, pointer_default(unique)]
|
||||
interface ID3D12CompilerFactoryChild
|
||||
: IUnknown
|
||||
{
|
||||
HRESULT GetFactory(
|
||||
[annotation("_In_")] REFIID riid, // ID3D12CompilerFactory
|
||||
[annotation("_COM_Outptr_")] void** ppCompilerFactory
|
||||
);
|
||||
};
|
||||
|
||||
typedef enum D3D12_COMPILER_VALUE_TYPE
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE_OBJECT_CODE = 0,
|
||||
D3D12_COMPILER_VALUE_TYPE_METADATA = 1,
|
||||
D3D12_COMPILER_VALUE_TYPE_DEBUG_PDB = 2,
|
||||
D3D12_COMPILER_VALUE_TYPE_PERFORMANCE_DATA = 3,
|
||||
|
||||
} D3D12_COMPILER_VALUE_TYPE;
|
||||
|
||||
typedef enum D3D12_COMPILER_VALUE_TYPE_FLAGS
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_NONE = 0x00000000,
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_OBJECT_CODE = (1 << D3D12_COMPILER_VALUE_TYPE_OBJECT_CODE),
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_METADATA = (1 << D3D12_COMPILER_VALUE_TYPE_METADATA),
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_DEBUG_PDB = (1 << D3D12_COMPILER_VALUE_TYPE_DEBUG_PDB),
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS_PERFORMANCE_DATA = (1 << D3D12_COMPILER_VALUE_TYPE_PERFORMANCE_DATA),
|
||||
|
||||
|
||||
} D3D12_COMPILER_VALUE_TYPE_FLAGS;
|
||||
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMPILER_VALUE_TYPE_FLAGS )")
|
||||
|
||||
typedef struct D3D12_COMPILER_DATABASE_PATH
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS Types;
|
||||
LPCWSTR pPath;
|
||||
} D3D12_COMPILER_DATABASE_PATH;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_GROUP_KEY
|
||||
{
|
||||
[annotation("_Field_size_bytes_full_(KeySize)")] const void* pKey;
|
||||
UINT KeySize;
|
||||
} D3D12_COMPILER_CACHE_GROUP_KEY;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_VALUE_KEY
|
||||
{
|
||||
[annotation("_Field_size_bytes_full_(KeySize)")] const void* pKey;
|
||||
UINT KeySize;
|
||||
} D3D12_COMPILER_CACHE_VALUE_KEY;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_VALUE
|
||||
{
|
||||
[annotation("_Field_size_bytes_full_(ValueSize)")] void* pValue;
|
||||
UINT ValueSize;
|
||||
} D3D12_COMPILER_CACHE_VALUE;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_TYPED_VALUE
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE Type;
|
||||
D3D12_COMPILER_CACHE_VALUE Value;
|
||||
} D3D12_COMPILER_CACHE_TYPED_VALUE;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_CONST_VALUE
|
||||
{
|
||||
[annotation("_Field_size_bytes_full_(ValueSize)")] const void* pValue;
|
||||
UINT ValueSize;
|
||||
} D3D12_COMPILER_CACHE_CONST_VALUE;
|
||||
|
||||
typedef struct D3D12_COMPILER_CACHE_TYPED_CONST_VALUE
|
||||
{
|
||||
D3D12_COMPILER_VALUE_TYPE Type;
|
||||
D3D12_COMPILER_CACHE_CONST_VALUE Value;
|
||||
} D3D12_COMPILER_CACHE_TYPED_CONST_VALUE;
|
||||
|
||||
typedef struct D3D12_COMPILER_TARGET
|
||||
{
|
||||
UINT AdapterFamilyIndex;
|
||||
UINT64 ABIVersion;
|
||||
} D3D12_COMPILER_TARGET;
|
||||
|
||||
typedef void* (__stdcall* D3D12CompilerCacheSessionAllocationFunc) (
|
||||
SIZE_T SizeInBytes,
|
||||
[annotation("_Inout_opt_")] void* pContext
|
||||
);
|
||||
|
||||
typedef void(__stdcall* D3D12CompilerCacheSessionGroupValueKeysFunc) (
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_VALUE_KEY* pValueKey,
|
||||
[annotation("_Inout_opt_")] void* pContext
|
||||
);
|
||||
|
||||
typedef void(__stdcall* D3D12CompilerCacheSessionGroupValuesFunc) (
|
||||
UINT ValueKeyIndex,
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_TYPED_CONST_VALUE* pTypedValue,
|
||||
[annotation("_Inout_opt_")] void* pContext
|
||||
);
|
||||
|
||||
[uuid(5704e5e6-054b-4738-b661-7b0d68d8dde2), object, local, pointer_default(unique)]
|
||||
interface ID3D12CompilerCacheSession
|
||||
: ID3D12CompilerFactoryChild
|
||||
{
|
||||
HRESULT FindGroup(
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_GROUP_KEY* pGroupKey,
|
||||
[annotation("_Out_opt_")] UINT* pGroupVersion
|
||||
);
|
||||
|
||||
HRESULT FindGroupValueKeys(
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_GROUP_KEY* pGroupKey,
|
||||
[annotation("_In_opt_")] const UINT* pExpectedGroupVersion,
|
||||
[annotation("_In_")] D3D12CompilerCacheSessionGroupValueKeysFunc CallbackFunc,
|
||||
[annotation("_Inout_opt_")] void* pContext
|
||||
);
|
||||
|
||||
HRESULT FindGroupValues(
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_GROUP_KEY* pGroupKey,
|
||||
[annotation("_In_opt_")] const UINT* pExpectedGroupVersion,
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS ValueTypeFlags,
|
||||
[annotation("_In_opt_")] D3D12CompilerCacheSessionGroupValuesFunc CallbackFunc,
|
||||
[annotation("_Inout_opt_")] void* pContext
|
||||
);
|
||||
|
||||
HRESULT FindValue(
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_VALUE_KEY* pValueKey,
|
||||
[annotation("_Inout_count_(NumTypedValues)")] D3D12_COMPILER_CACHE_TYPED_VALUE* pTypedValues,
|
||||
UINT NumTypedValues,
|
||||
[annotation("_In_opt_")] D3D12CompilerCacheSessionAllocationFunc pCallbackFunc,
|
||||
[annotation("_Inout_opt_")] void* pContext
|
||||
);
|
||||
|
||||
const D3D12_APPLICATION_DESC* GetApplicationDesc();
|
||||
|
||||
D3D12_COMPILER_TARGET GetCompilerTarget();
|
||||
|
||||
D3D12_COMPILER_VALUE_TYPE_FLAGS GetValueTypes();
|
||||
|
||||
HRESULT StoreGroupValueKeys(
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_GROUP_KEY* pGroupKey,
|
||||
UINT GroupVersion,
|
||||
[annotation("_In_reads_(NumValueKeys)")] const D3D12_COMPILER_CACHE_VALUE_KEY* pValueKeys,
|
||||
UINT NumValueKeys
|
||||
);
|
||||
|
||||
HRESULT StoreValue(
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_VALUE_KEY* pValueKey,
|
||||
[annotation("_In_reads_(NumTypedValues)")] const D3D12_COMPILER_CACHE_TYPED_CONST_VALUE* pTypedValues,
|
||||
UINT NumTypedValues
|
||||
);
|
||||
};
|
||||
|
||||
[uuid(5981cca4-e8ae-44ca-9b92-4fa86f5a3a3a), object, local, pointer_default(unique)]
|
||||
interface ID3D12CompilerStateObject
|
||||
: IUnknown
|
||||
{
|
||||
HRESULT GetCompiler(
|
||||
[annotation("_In_")] REFIID riid, // ID3D12Compiler
|
||||
[annotation("_COM_Outptr_")] void** ppCompiler
|
||||
);
|
||||
};
|
||||
|
||||
typedef struct D3D12_COMPILER_EXISTING_COLLECTION_DESC
|
||||
{
|
||||
ID3D12CompilerStateObject* pExistingCollection;
|
||||
UINT NumExports; // Optional, if 0 all exports in the library/collection will be surfaced
|
||||
[annotation("_In_reads_(NumExports)")] const D3D12_EXPORT_DESC* pExports;
|
||||
} D3D12_COMPILER_EXISTING_COLLECTION_DESC;
|
||||
|
||||
[uuid(8c403c12-993b-4583-80f1-6824138fa68e), object, local, pointer_default(unique)]
|
||||
interface ID3D12Compiler
|
||||
: ID3D12CompilerFactoryChild
|
||||
{
|
||||
HRESULT CompilePipelineState(
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_GROUP_KEY* pGroupKey,
|
||||
UINT GroupVersion,
|
||||
[annotation("_In_")] const D3D12_PIPELINE_STATE_STREAM_DESC* pDesc
|
||||
);
|
||||
|
||||
HRESULT CompileStateObject(
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_GROUP_KEY* pGroupKey,
|
||||
UINT GroupVersion,
|
||||
[annotation("_In_")] const D3D12_STATE_OBJECT_DESC* pDesc,
|
||||
[annotation("_In_")] REFIID riid, // ID3D12CompilerStateObject
|
||||
[annotation("_COM_Outptr_")] void** ppCompilerStateObject
|
||||
);
|
||||
|
||||
HRESULT CompileAddToStateObject(
|
||||
[annotation("_In_")] const D3D12_COMPILER_CACHE_GROUP_KEY* pGroupKey,
|
||||
UINT GroupVersion,
|
||||
[annotation("_In_")] const D3D12_STATE_OBJECT_DESC* pAddition,
|
||||
[annotation("_In_")] ID3D12CompilerStateObject* pCompilerStateObjectToGrowFrom,
|
||||
[annotation("_In_")] REFIID riid, // ID3D12CompilerStateObject
|
||||
[annotation("_COM_Outptr_")] void** ppNewCompilerStateObject
|
||||
);
|
||||
|
||||
HRESULT GetCacheSession(
|
||||
[annotation("_In_")] REFIID riid, // ID3D12CompilerCacheSession
|
||||
[annotation("_COM_Outptr_")] void** ppCompilerCacheSession
|
||||
);
|
||||
};
|
||||
|
||||
[uuid(c1ee4b59-3f59-47a5-9b4e-a855c858a878), object, local, pointer_default(unique)]
|
||||
interface ID3D12CompilerFactory
|
||||
: IUnknown
|
||||
{
|
||||
HRESULT EnumerateAdapterFamilies(
|
||||
UINT AdapterFamilyIndex,
|
||||
[annotation("_Out_")] D3D12_ADAPTER_FAMILY* pAdapterFamily
|
||||
);
|
||||
|
||||
HRESULT EnumerateAdapterFamilyABIVersions(
|
||||
UINT AdapterFamilyIndex,
|
||||
[annotation("_Inout_")] UINT32* pNumABIVersions,
|
||||
[annotation("_Out_writes_opt_(*pNumABIVersions)")] UINT64 * pABIVersions
|
||||
);
|
||||
|
||||
HRESULT EnumerateAdapterFamilyCompilerVersion(
|
||||
UINT AdapterFamilyIndex,
|
||||
[annotation("_Out_")] D3D12_VERSION_NUMBER* pCompilerVersion
|
||||
);
|
||||
|
||||
HRESULT GetApplicationProfileVersion(
|
||||
[annotation("_In_")] const D3D12_COMPILER_TARGET* pTarget,
|
||||
[annotation("_In_")] const D3D12_APPLICATION_DESC* pApplicationDesc,
|
||||
[annotation("_Out_")] D3D12_VERSION_NUMBER* pApplicationProfileVersion
|
||||
);
|
||||
|
||||
HRESULT CreateCompilerCacheSession(
|
||||
[annotation("_In_reads_(NumPaths)")] const D3D12_COMPILER_DATABASE_PATH* pPaths,
|
||||
UINT NumPaths,
|
||||
[annotation("_In_opt_")] const D3D12_COMPILER_TARGET* pTarget,
|
||||
[annotation("_In_opt_")] const D3D12_APPLICATION_DESC* pApplicationDesc,
|
||||
[annotation("_In_")] REFIID riid, // ID3D12CompilerCacheSession
|
||||
[annotation("_COM_Outptr_")] void** ppCompilerCacheSession
|
||||
);
|
||||
|
||||
HRESULT CreateCompiler(
|
||||
[annotation("_In_")] ID3D12CompilerCacheSession* pCompilerCacheSession,
|
||||
[annotation("_In_")] REFIID riid, // ID3D12Compiler
|
||||
[annotation("_COM_Outptr_")] void** ppCompiler
|
||||
);
|
||||
};
|
||||
|
||||
cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */")
|
||||
#pragma endregion
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3D12CompilerFactoryChild,0xe0d06420,0x9f31,0x47e8,0xae,0x9a,0xdd,0x2b,0xa2,0x5a,0xc0,0xbc);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3D12CompilerCacheSession,0x5704e5e6,0x054b,0x4738,0xb6,0x61,0x7b,0x0d,0x68,0xd8,0xdd,0xe2);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3D12CompilerStateObject,0x5981cca4,0xe8ae,0x44ca,0x9b,0x92,0x4f,0xa8,0x6f,0x5a,0x3a,0x3a);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3D12Compiler,0x8c403c12,0x993b,0x4583,0x80,0xf1,0x68,0x24,0x13,0x8f,0xa6,0x8e);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3D12CompilerFactory,0xc1ee4b59,0x3f59,0x47a5,0x9b,0x4e,0xa8,0x55,0xc8,0x58,0xa8,0x78);" )
|
||||
@@ -0,0 +1,147 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
*
|
||||
*-------------------------------------------------------------------------------------*/
|
||||
typedef enum D3D12_MARKER_API {
|
||||
D3D12_MARKER_API_SETMARKER = 0,
|
||||
D3D12_MARKER_API_BEGINEVENT = 1,
|
||||
D3D12_MARKER_API_ENDEVENT = 2,
|
||||
D3D12_MARKER_API_DRAWINSTANCED = 3,
|
||||
D3D12_MARKER_API_DRAWINDEXEDINSTANCED = 4,
|
||||
D3D12_MARKER_API_EXECUTEINDIRECT = 5,
|
||||
D3D12_MARKER_API_DISPATCH = 6,
|
||||
D3D12_MARKER_API_COPYBUFFERREGION = 7,
|
||||
D3D12_MARKER_API_COPYTEXTUREREGION = 8,
|
||||
D3D12_MARKER_API_COPYRESOURCE = 9,
|
||||
D3D12_MARKER_API_COPYTILES = 10,
|
||||
D3D12_MARKER_API_RESOLVESUBRESOURCE = 11,
|
||||
D3D12_MARKER_API_CLEARRENDERTARGETVIEW = 12,
|
||||
D3D12_MARKER_API_CLEARUNORDEREDACCESSVIEW = 13,
|
||||
D3D12_MARKER_API_CLEARDEPTHSTENCILVIEW = 14,
|
||||
D3D12_MARKER_API_RESOURCEBARRIER = 15,
|
||||
D3D12_MARKER_API_EXECUTEBUNDLE = 16,
|
||||
D3D12_MARKER_API_PRESENT = 17,
|
||||
D3D12_MARKER_API_RESOLVEQUERYDATA = 18,
|
||||
D3D12_MARKER_API_BEGINSUBMISSION = 19,
|
||||
D3D12_MARKER_API_ENDSUBMISSION = 20,
|
||||
D3D12_MARKER_API_DECODEFRAME = 21,
|
||||
D3D12_MARKER_API_PROCESSFRAMES = 22,
|
||||
D3D12_MARKER_API_ATOMICCOPYBUFFERUINT = 23,
|
||||
D3D12_MARKER_API_ATOMICCOPYBUFFERUINT64 = 24,
|
||||
D3D12_MARKER_API_RESOLVESUBRESOURCEREGION = 25,
|
||||
D3D12_MARKER_API_WRITEBUFFERIMMEDIATE = 26,
|
||||
D3D12_MARKER_API_DECODEFRAME1 = 27,
|
||||
D3D12_MARKER_API_SETPROTECTEDRESOURCESESSION = 28,
|
||||
D3D12_MARKER_API_DECODEFRAME2 = 29,
|
||||
D3D12_MARKER_API_PROCESSFRAMES1 = 30,
|
||||
D3D12_MARKER_API_BUILDRAYTRACINGACCELERATIONSTRUCTURE = 31,
|
||||
D3D12_MARKER_API_EMITRAYTRACINGACCELERATIONSTRUCTUREPOSTBUILDINFO = 32,
|
||||
D3D12_MARKER_API_COPYRAYTRACINGACCELERATIONSTRUCTURE = 33,
|
||||
D3D12_MARKER_API_DISPATCHRAYS = 34,
|
||||
D3D12_MARKER_API_INITIALIZEMETACOMMAND = 35,
|
||||
D3D12_MARKER_API_EXECUTEMETACOMMAND = 36,
|
||||
D3D12_MARKER_API_ESTIMATEMOTION = 37,
|
||||
D3D12_MARKER_API_RESOLVEMOTIONVECTORHEAP = 38,
|
||||
D3D12_MARKER_API_SETPIPELINESTATE1 = 39,
|
||||
D3D12_MARKER_API_INITIALIZEEXTENSIONCOMMAND = 40,
|
||||
D3D12_MARKER_API_EXECUTEEXTENSIONCOMMAND = 41,
|
||||
D3D12_MARKER_API_DISPATCHMESH = 42,
|
||||
D3D12_MARKER_API_ENCODEFRAME = 43,
|
||||
D3D12_MARKER_API_RESOLVEENCODEROUTPUTMETADATA = 44,
|
||||
D3D12_MARKER_API_BARRIER = 45,
|
||||
D3D12_MARKER_API_BEGIN_COMMAND_LIST = 46,
|
||||
D3D12_MARKER_API_DISPATCHGRAPH = 47,
|
||||
D3D12_MARKER_API_SETPROGRAM = 48,
|
||||
D3D12_MARKER_API_ENCODEFRAME1 = 49,
|
||||
D3D12_MARKER_API_RESOLVEENCODEROUTPUTMETADATA1 = 50,
|
||||
D3D12_MARKER_API_RESOLVEINPUTPARAMLAYOUT = 51,
|
||||
D3D12_MARKER_API_PROCESSFRAMES2 = 52,
|
||||
D3D12_MARKER_API_SET_WORK_GRAPH_MAXIMUM_GPU_INPUT_RECORDS = 53,
|
||||
D3D12_MARKER_API_WAITBARRIER = 54,
|
||||
D3D12_MARKER_API_SIGNALBARRIER = 55,
|
||||
D3D12_MARKER_API_CONVERT_LINEAR_ALGEBRA_MATRIX = 56,
|
||||
D3D12_MARKER_API_COPYBUFFERREGIONS = 57,
|
||||
D3D12_MARKER_API_COPYTEXTUREREGIONS = 58,
|
||||
D3D12_MARKER_API_COPYRESOURCES = 59,
|
||||
D3D12_MARKER_API_ASYNCCOPYTILES = 60,
|
||||
D3D12_MARKER_API_ASYNCRESOLVESUBRESOURCEREGION = 61,
|
||||
D3D12_MARKER_API_ASYNCRESOLVEQUERYDATA = 62,
|
||||
D3D12_MARKER_API_CLEARBOUNDDEPTHSTENCILVIEW = 63,
|
||||
D3D12_MARKER_API_CLEARBOUNDRENDERTARGETVIEWS = 64,
|
||||
D3D12_MARKER_API_CLEARTEXTURESUBRESOURCES = 65,
|
||||
D3D12_MARKER_API_FILLBUFFERS = 66,
|
||||
D3D12_MARKER_API_NONE = 255,
|
||||
} D3D12_MARKER_API;
|
||||
|
||||
typedef enum D3D12_AUTO_BREADCRUMB_OP {
|
||||
D3D12_AUTO_BREADCRUMB_OP_SETMARKER = D3D12_MARKER_API_SETMARKER,
|
||||
D3D12_AUTO_BREADCRUMB_OP_BEGINEVENT = D3D12_MARKER_API_BEGINEVENT,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ENDEVENT = D3D12_MARKER_API_ENDEVENT,
|
||||
D3D12_AUTO_BREADCRUMB_OP_DRAWINSTANCED = D3D12_MARKER_API_DRAWINSTANCED,
|
||||
D3D12_AUTO_BREADCRUMB_OP_DRAWINDEXEDINSTANCED = D3D12_MARKER_API_DRAWINDEXEDINSTANCED,
|
||||
D3D12_AUTO_BREADCRUMB_OP_EXECUTEINDIRECT = D3D12_MARKER_API_EXECUTEINDIRECT,
|
||||
D3D12_AUTO_BREADCRUMB_OP_DISPATCH = D3D12_MARKER_API_DISPATCH,
|
||||
D3D12_AUTO_BREADCRUMB_OP_COPYBUFFERREGION = D3D12_MARKER_API_COPYBUFFERREGION,
|
||||
D3D12_AUTO_BREADCRUMB_OP_COPYTEXTUREREGION = D3D12_MARKER_API_COPYTEXTUREREGION,
|
||||
D3D12_AUTO_BREADCRUMB_OP_COPYRESOURCE = D3D12_MARKER_API_COPYRESOURCE,
|
||||
D3D12_AUTO_BREADCRUMB_OP_COPYTILES = D3D12_MARKER_API_COPYTILES,
|
||||
D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCE = D3D12_MARKER_API_RESOLVESUBRESOURCE,
|
||||
D3D12_AUTO_BREADCRUMB_OP_CLEARRENDERTARGETVIEW = D3D12_MARKER_API_CLEARRENDERTARGETVIEW,
|
||||
D3D12_AUTO_BREADCRUMB_OP_CLEARUNORDEREDACCESSVIEW = D3D12_MARKER_API_CLEARUNORDEREDACCESSVIEW,
|
||||
D3D12_AUTO_BREADCRUMB_OP_CLEARDEPTHSTENCILVIEW = D3D12_MARKER_API_CLEARDEPTHSTENCILVIEW,
|
||||
D3D12_AUTO_BREADCRUMB_OP_RESOURCEBARRIER = D3D12_MARKER_API_RESOURCEBARRIER,
|
||||
D3D12_AUTO_BREADCRUMB_OP_EXECUTEBUNDLE = D3D12_MARKER_API_EXECUTEBUNDLE,
|
||||
D3D12_AUTO_BREADCRUMB_OP_PRESENT = D3D12_MARKER_API_PRESENT,
|
||||
D3D12_AUTO_BREADCRUMB_OP_RESOLVEQUERYDATA = D3D12_MARKER_API_RESOLVEQUERYDATA,
|
||||
D3D12_AUTO_BREADCRUMB_OP_BEGINSUBMISSION = D3D12_MARKER_API_BEGINSUBMISSION,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ENDSUBMISSION = D3D12_MARKER_API_ENDSUBMISSION,
|
||||
D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME = D3D12_MARKER_API_DECODEFRAME,
|
||||
D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES = D3D12_MARKER_API_PROCESSFRAMES,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT = D3D12_MARKER_API_ATOMICCOPYBUFFERUINT,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ATOMICCOPYBUFFERUINT64 = D3D12_MARKER_API_ATOMICCOPYBUFFERUINT64,
|
||||
D3D12_AUTO_BREADCRUMB_OP_RESOLVESUBRESOURCEREGION = D3D12_MARKER_API_RESOLVESUBRESOURCEREGION,
|
||||
D3D12_AUTO_BREADCRUMB_OP_WRITEBUFFERIMMEDIATE = D3D12_MARKER_API_WRITEBUFFERIMMEDIATE,
|
||||
D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME1 = D3D12_MARKER_API_DECODEFRAME1,
|
||||
D3D12_AUTO_BREADCRUMB_OP_SETPROTECTEDRESOURCESESSION = D3D12_MARKER_API_SETPROTECTEDRESOURCESESSION,
|
||||
D3D12_AUTO_BREADCRUMB_OP_DECODEFRAME2 = D3D12_MARKER_API_DECODEFRAME2,
|
||||
D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES1 = D3D12_MARKER_API_PROCESSFRAMES1,
|
||||
D3D12_AUTO_BREADCRUMB_OP_BUILDRAYTRACINGACCELERATIONSTRUCTURE = D3D12_MARKER_API_BUILDRAYTRACINGACCELERATIONSTRUCTURE,
|
||||
D3D12_AUTO_BREADCRUMB_OP_EMITRAYTRACINGACCELERATIONSTRUCTUREPOSTBUILDINFO = D3D12_MARKER_API_EMITRAYTRACINGACCELERATIONSTRUCTUREPOSTBUILDINFO,
|
||||
D3D12_AUTO_BREADCRUMB_OP_COPYRAYTRACINGACCELERATIONSTRUCTURE = D3D12_MARKER_API_COPYRAYTRACINGACCELERATIONSTRUCTURE,
|
||||
D3D12_AUTO_BREADCRUMB_OP_DISPATCHRAYS = D3D12_MARKER_API_DISPATCHRAYS,
|
||||
D3D12_AUTO_BREADCRUMB_OP_INITIALIZEMETACOMMAND = D3D12_MARKER_API_INITIALIZEMETACOMMAND,
|
||||
D3D12_AUTO_BREADCRUMB_OP_EXECUTEMETACOMMAND = D3D12_MARKER_API_EXECUTEMETACOMMAND,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ESTIMATEMOTION = D3D12_MARKER_API_ESTIMATEMOTION,
|
||||
D3D12_AUTO_BREADCRUMB_OP_RESOLVEMOTIONVECTORHEAP = D3D12_MARKER_API_RESOLVEMOTIONVECTORHEAP,
|
||||
D3D12_AUTO_BREADCRUMB_OP_SETPIPELINESTATE1 = D3D12_MARKER_API_SETPIPELINESTATE1,
|
||||
D3D12_AUTO_BREADCRUMB_OP_INITIALIZEEXTENSIONCOMMAND = D3D12_MARKER_API_INITIALIZEEXTENSIONCOMMAND,
|
||||
D3D12_AUTO_BREADCRUMB_OP_EXECUTEEXTENSIONCOMMAND = D3D12_MARKER_API_EXECUTEEXTENSIONCOMMAND,
|
||||
D3D12_AUTO_BREADCRUMB_OP_DISPATCHMESH = D3D12_MARKER_API_DISPATCHMESH,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ENCODEFRAME = D3D12_MARKER_API_ENCODEFRAME,
|
||||
D3D12_AUTO_BREADCRUMB_OP_RESOLVEENCODEROUTPUTMETADATA = D3D12_MARKER_API_RESOLVEENCODEROUTPUTMETADATA,
|
||||
D3D12_AUTO_BREADCRUMB_OP_BARRIER = D3D12_MARKER_API_BARRIER,
|
||||
D3D12_AUTO_BREADCRUMB_OP_BEGIN_COMMAND_LIST = D3D12_MARKER_API_BEGIN_COMMAND_LIST,
|
||||
D3D12_AUTO_BREADCRUMB_OP_DISPATCHGRAPH = D3D12_MARKER_API_DISPATCHGRAPH,
|
||||
D3D12_AUTO_BREADCRUMB_OP_SETPROGRAM = D3D12_MARKER_API_SETPROGRAM,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ENCODEFRAME1 = D3D12_MARKER_API_ENCODEFRAME1,
|
||||
D3D12_AUTO_BREADCRUMB_OP_RESOLVEENCODEROUTPUTMETADATA1 = D3D12_MARKER_API_RESOLVEENCODEROUTPUTMETADATA1,
|
||||
D3D12_AUTO_BREADCRUMB_OP_RESOLVEINPUTPARAMLAYOUT = D3D12_MARKER_API_RESOLVEINPUTPARAMLAYOUT,
|
||||
D3D12_AUTO_BREADCRUMB_OP_PROCESSFRAMES2 = D3D12_MARKER_API_PROCESSFRAMES2,
|
||||
D3D12_AUTO_BREADCRUMB_OP_SET_WORK_GRAPH_MAXIMUM_GPU_INPUT_RECORDS = D3D12_MARKER_API_SET_WORK_GRAPH_MAXIMUM_GPU_INPUT_RECORDS,
|
||||
D3D12_AUTO_BREADCRUMB_OP_WAITBARRIER = D3D12_MARKER_API_WAITBARRIER,
|
||||
D3D12_AUTO_BREADCRUMB_OP_SIGNALBARRIER = D3D12_MARKER_API_SIGNALBARRIER,
|
||||
D3D12_AUTO_BREADCRUMB_OP_CONVERT_LINEAR_ALGEBRA_MATRIX = D3D12_MARKER_API_CONVERT_LINEAR_ALGEBRA_MATRIX,
|
||||
D3D12_AUTO_BREADCRUMB_OP_COPYBUFFERREGIONS = D3D12_MARKER_API_COPYBUFFERREGIONS,
|
||||
D3D12_AUTO_BREADCRUMB_OP_COPYTEXTUREREGIONS = D3D12_MARKER_API_COPYTEXTUREREGIONS,
|
||||
D3D12_AUTO_BREADCRUMB_OP_COPYRESOURCES = D3D12_MARKER_API_COPYRESOURCES,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ASYNCCOPYTILES = D3D12_MARKER_API_ASYNCCOPYTILES,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ASYNCRESOLVESUBRESOURCEREGION = D3D12_MARKER_API_ASYNCRESOLVESUBRESOURCEREGION,
|
||||
D3D12_AUTO_BREADCRUMB_OP_ASYNCRESOLVEQUERYDATA = D3D12_MARKER_API_ASYNCRESOLVEQUERYDATA,
|
||||
D3D12_AUTO_BREADCRUMB_OP_CLEARBOUNDDEPTHSTENCILVIEW = D3D12_MARKER_API_CLEARBOUNDDEPTHSTENCILVIEW,
|
||||
D3D12_AUTO_BREADCRUMB_OP_CLEARBOUNDRENDERTARGETVIEWS = D3D12_MARKER_API_CLEARBOUNDRENDERTARGETVIEWS,
|
||||
D3D12_AUTO_BREADCRUMB_OP_CLEARTEXTURESUBRESOURCES = D3D12_MARKER_API_CLEARTEXTURESUBRESOURCES,
|
||||
D3D12_AUTO_BREADCRUMB_OP_FILLBUFFERS = D3D12_MARKER_API_FILLBUFFERS,
|
||||
D3D12_AUTO_BREADCRUMB_OP_NONE = D3D12_MARKER_API_NONE,
|
||||
} D3D12_AUTO_BREADCRUMB_OP;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,493 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
//
|
||||
// File: D3D12Shader.h
|
||||
// Content: D3D12 Shader Types and APIs
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3D12SHADER_H__
|
||||
#define __D3D12SHADER_H__
|
||||
|
||||
#include "d3dcommon.h"
|
||||
|
||||
typedef enum D3D12_SHADER_VERSION_TYPE
|
||||
{
|
||||
D3D12_SHVER_PIXEL_SHADER = 0,
|
||||
D3D12_SHVER_VERTEX_SHADER = 1,
|
||||
D3D12_SHVER_GEOMETRY_SHADER = 2,
|
||||
|
||||
// D3D11 Shaders
|
||||
D3D12_SHVER_HULL_SHADER = 3,
|
||||
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_NODE_SHADER = 15,
|
||||
|
||||
D3D12_SHVER_RESERVED0 = 0xFFF0,
|
||||
} D3D12_SHADER_VERSION_TYPE;
|
||||
|
||||
#define D3D12_SHVER_GET_TYPE(_Version) \
|
||||
(((_Version) >> 16) & 0xffff)
|
||||
#define D3D12_SHVER_GET_MAJOR(_Version) \
|
||||
(((_Version) >> 4) & 0xf)
|
||||
#define D3D12_SHVER_GET_MINOR(_Version) \
|
||||
(((_Version) >> 0) & 0xf)
|
||||
|
||||
// Slot ID for library function return
|
||||
#define D3D_RETURN_PARAMETER_INDEX (-1)
|
||||
|
||||
typedef D3D_RESOURCE_RETURN_TYPE D3D12_RESOURCE_RETURN_TYPE;
|
||||
|
||||
typedef D3D_CBUFFER_TYPE D3D12_CBUFFER_TYPE;
|
||||
|
||||
|
||||
typedef struct _D3D12_SIGNATURE_PARAMETER_DESC
|
||||
{
|
||||
LPCSTR SemanticName; // Name of the semantic
|
||||
UINT SemanticIndex; // Index of the semantic
|
||||
UINT Register; // Number of member variables
|
||||
D3D_NAME SystemValueType;// A predefined system value, or D3D_NAME_UNDEFINED if not applicable
|
||||
D3D_REGISTER_COMPONENT_TYPE ComponentType; // Scalar type (e.g. uint, float, etc.)
|
||||
BYTE Mask; // Mask to indicate which components of the register
|
||||
// are used (combination of D3D10_COMPONENT_MASK values)
|
||||
BYTE ReadWriteMask; // Mask to indicate whether a given component is
|
||||
// never written (if this is an output signature) or
|
||||
// always read (if this is an input signature).
|
||||
// (combination of D3D_MASK_* values)
|
||||
UINT Stream; // Stream index
|
||||
D3D_MIN_PRECISION MinPrecision; // Minimum desired interpolation precision
|
||||
} D3D12_SIGNATURE_PARAMETER_DESC;
|
||||
|
||||
typedef struct _D3D12_SHADER_BUFFER_DESC
|
||||
{
|
||||
LPCSTR Name; // Name of the constant buffer
|
||||
D3D_CBUFFER_TYPE Type; // Indicates type of buffer content
|
||||
UINT Variables; // Number of member variables
|
||||
UINT Size; // Size of CB (in bytes)
|
||||
UINT uFlags; // Buffer description flags
|
||||
} D3D12_SHADER_BUFFER_DESC;
|
||||
|
||||
typedef struct _D3D12_SHADER_VARIABLE_DESC
|
||||
{
|
||||
LPCSTR Name; // Name of the variable
|
||||
UINT StartOffset; // Offset in constant buffer's backing store
|
||||
UINT Size; // Size of variable (in bytes)
|
||||
UINT uFlags; // Variable flags
|
||||
LPVOID DefaultValue; // Raw pointer to default value
|
||||
UINT StartTexture; // First texture index (or -1 if no textures used)
|
||||
UINT TextureSize; // Number of texture slots possibly used.
|
||||
UINT StartSampler; // First sampler index (or -1 if no textures used)
|
||||
UINT SamplerSize; // Number of sampler slots possibly used.
|
||||
} D3D12_SHADER_VARIABLE_DESC;
|
||||
|
||||
typedef struct _D3D12_SHADER_TYPE_DESC
|
||||
{
|
||||
D3D_SHADER_VARIABLE_CLASS Class; // Variable class (e.g. object, matrix, etc.)
|
||||
D3D_SHADER_VARIABLE_TYPE Type; // Variable type (e.g. float, sampler, etc.)
|
||||
UINT Rows; // Number of rows (for matrices, 1 for other numeric, 0 if not applicable)
|
||||
UINT Columns; // Number of columns (for vectors & matrices, 1 for other numeric, 0 if not applicable)
|
||||
UINT Elements; // Number of elements (0 if not an array)
|
||||
UINT Members; // Number of members (0 if not a structure)
|
||||
UINT Offset; // Offset from the start of structure (0 if not a structure member)
|
||||
LPCSTR Name; // Name of type, can be NULL
|
||||
} D3D12_SHADER_TYPE_DESC;
|
||||
|
||||
typedef D3D_TESSELLATOR_DOMAIN D3D12_TESSELLATOR_DOMAIN;
|
||||
|
||||
typedef D3D_TESSELLATOR_PARTITIONING D3D12_TESSELLATOR_PARTITIONING;
|
||||
|
||||
typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D12_TESSELLATOR_OUTPUT_PRIMITIVE;
|
||||
|
||||
typedef struct _D3D12_SHADER_DESC
|
||||
{
|
||||
UINT Version; // Shader version
|
||||
LPCSTR Creator; // Creator string
|
||||
UINT Flags; // Shader compilation/parse flags
|
||||
|
||||
UINT ConstantBuffers; // Number of constant buffers
|
||||
UINT BoundResources; // Number of bound resources
|
||||
UINT InputParameters; // Number of parameters in the input signature
|
||||
UINT OutputParameters; // Number of parameters in the output signature
|
||||
|
||||
UINT InstructionCount; // Number of emitted instructions
|
||||
UINT TempRegisterCount; // Number of temporary registers used
|
||||
UINT TempArrayCount; // Number of temporary arrays used
|
||||
UINT DefCount; // Number of constant defines
|
||||
UINT DclCount; // Number of declarations (input + output)
|
||||
UINT TextureNormalInstructions; // Number of non-categorized texture instructions
|
||||
UINT TextureLoadInstructions; // Number of texture load instructions
|
||||
UINT TextureCompInstructions; // Number of texture comparison instructions
|
||||
UINT TextureBiasInstructions; // Number of texture bias instructions
|
||||
UINT TextureGradientInstructions; // Number of texture gradient instructions
|
||||
UINT FloatInstructionCount; // Number of floating point arithmetic instructions used
|
||||
UINT IntInstructionCount; // Number of signed integer arithmetic instructions used
|
||||
UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used
|
||||
UINT StaticFlowControlCount; // Number of static flow control instructions used
|
||||
UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used
|
||||
UINT MacroInstructionCount; // Number of macro instructions used
|
||||
UINT ArrayInstructionCount; // Number of array instructions used
|
||||
UINT CutInstructionCount; // Number of cut instructions used
|
||||
UINT EmitInstructionCount; // Number of emit instructions used
|
||||
D3D_PRIMITIVE_TOPOLOGY GSOutputTopology; // Geometry shader output topology
|
||||
UINT GSMaxOutputVertexCount; // Geometry shader maximum output vertex count
|
||||
D3D_PRIMITIVE InputPrimitive; // GS/HS input primitive
|
||||
UINT PatchConstantParameters; // Number of parameters in the patch constant signature
|
||||
UINT cGSInstanceCount; // Number of Geometry shader instances
|
||||
UINT cControlPoints; // Number of control points in the HS->DS stage
|
||||
D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive; // Primitive output by the tessellator
|
||||
D3D_TESSELLATOR_PARTITIONING HSPartitioning; // Partitioning mode of the tessellator
|
||||
D3D_TESSELLATOR_DOMAIN TessellatorDomain; // Domain of the tessellator (quad, tri, isoline)
|
||||
// instruction counts
|
||||
UINT cBarrierInstructions; // Number of barrier instructions in a compute shader
|
||||
UINT cInterlockedInstructions; // Number of interlocked instructions
|
||||
UINT cTextureStoreInstructions; // Number of texture writes
|
||||
} D3D12_SHADER_DESC;
|
||||
|
||||
typedef struct _D3D12_SHADER_INPUT_BIND_DESC
|
||||
{
|
||||
LPCSTR Name; // Name of the resource
|
||||
D3D_SHADER_INPUT_TYPE Type; // Type of resource (e.g. texture, cbuffer, etc.)
|
||||
UINT BindPoint; // Starting bind point
|
||||
UINT BindCount; // Number of contiguous bind points (for arrays)
|
||||
|
||||
UINT uFlags; // Input binding flags
|
||||
D3D_RESOURCE_RETURN_TYPE ReturnType; // Return type (if texture)
|
||||
D3D_SRV_DIMENSION Dimension; // Dimension (if texture)
|
||||
UINT NumSamples; // Number of samples (0 if not MS texture)
|
||||
UINT Space; // Register space
|
||||
UINT uID; // Range ID in the bytecode
|
||||
} D3D12_SHADER_INPUT_BIND_DESC;
|
||||
|
||||
#define D3D_SHADER_REQUIRES_DOUBLES 0x00000001
|
||||
#define D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL 0x00000002
|
||||
#define D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE 0x00000004
|
||||
#define D3D_SHADER_REQUIRES_64_UAVS 0x00000008
|
||||
#define D3D_SHADER_REQUIRES_MINIMUM_PRECISION 0x00000010
|
||||
#define D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS 0x00000020
|
||||
#define D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS 0x00000040
|
||||
#define D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING 0x00000080
|
||||
#define D3D_SHADER_REQUIRES_TILED_RESOURCES 0x00000100
|
||||
#define D3D_SHADER_REQUIRES_STENCIL_REF 0x00000200
|
||||
#define D3D_SHADER_REQUIRES_INNER_COVERAGE 0x00000400
|
||||
#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_REQUIRES_ADVANCED_TEXTURE_OPS 0x20000000
|
||||
#define D3D_SHADER_REQUIRES_WRITEABLE_MSAA_TEXTURES 0x40000000
|
||||
#define D3D_SHADER_REQUIRES_SAMPLE_CMP_GRADIENT_OR_BIAS 0x80000000
|
||||
#define D3D_SHADER_REQUIRES_EXTENDED_COMMAND_INFO 0x100000000ull
|
||||
|
||||
|
||||
typedef struct _D3D12_LIBRARY_DESC
|
||||
{
|
||||
LPCSTR Creator; // The name of the originator of the library.
|
||||
UINT Flags; // Compilation flags.
|
||||
UINT FunctionCount; // Number of functions exported from the library.
|
||||
} D3D12_LIBRARY_DESC;
|
||||
|
||||
typedef struct _D3D12_FUNCTION_DESC
|
||||
{
|
||||
UINT Version; // Shader version
|
||||
LPCSTR Creator; // Creator string
|
||||
UINT Flags; // Shader compilation/parse flags
|
||||
|
||||
UINT ConstantBuffers; // Number of constant buffers
|
||||
UINT BoundResources; // Number of bound resources
|
||||
|
||||
UINT InstructionCount; // Number of emitted instructions
|
||||
UINT TempRegisterCount; // Number of temporary registers used
|
||||
UINT TempArrayCount; // Number of temporary arrays used
|
||||
UINT DefCount; // Number of constant defines
|
||||
UINT DclCount; // Number of declarations (input + output)
|
||||
UINT TextureNormalInstructions; // Number of non-categorized texture instructions
|
||||
UINT TextureLoadInstructions; // Number of texture load instructions
|
||||
UINT TextureCompInstructions; // Number of texture comparison instructions
|
||||
UINT TextureBiasInstructions; // Number of texture bias instructions
|
||||
UINT TextureGradientInstructions; // Number of texture gradient instructions
|
||||
UINT FloatInstructionCount; // Number of floating point arithmetic instructions used
|
||||
UINT IntInstructionCount; // Number of signed integer arithmetic instructions used
|
||||
UINT UintInstructionCount; // Number of unsigned integer arithmetic instructions used
|
||||
UINT StaticFlowControlCount; // Number of static flow control instructions used
|
||||
UINT DynamicFlowControlCount; // Number of dynamic flow control instructions used
|
||||
UINT MacroInstructionCount; // Number of macro instructions used
|
||||
UINT ArrayInstructionCount; // Number of array instructions used
|
||||
UINT MovInstructionCount; // Number of mov instructions used
|
||||
UINT MovcInstructionCount; // Number of movc instructions used
|
||||
UINT ConversionInstructionCount; // Number of type conversion instructions used
|
||||
UINT BitwiseInstructionCount; // Number of bitwise arithmetic instructions used
|
||||
D3D_FEATURE_LEVEL MinFeatureLevel; // Min target of the function byte code
|
||||
UINT64 RequiredFeatureFlags; // Required feature flags
|
||||
|
||||
LPCSTR Name; // Function name
|
||||
INT FunctionParameterCount; // Number of logical parameters in the function signature (not including return)
|
||||
BOOL HasReturn; // TRUE, if function returns a value, false - it is a subroutine
|
||||
BOOL Has10Level9VertexShader; // TRUE, if there is a 10L9 VS blob
|
||||
BOOL Has10Level9PixelShader; // TRUE, if there is a 10L9 PS blob
|
||||
} D3D12_FUNCTION_DESC;
|
||||
|
||||
typedef struct _D3D12_PARAMETER_DESC
|
||||
{
|
||||
LPCSTR Name; // Parameter name.
|
||||
LPCSTR SemanticName; // Parameter semantic name (+index).
|
||||
D3D_SHADER_VARIABLE_TYPE Type; // Element type.
|
||||
D3D_SHADER_VARIABLE_CLASS Class; // Scalar/Vector/Matrix.
|
||||
UINT Rows; // Rows are for matrix parameters.
|
||||
UINT Columns; // Components or Columns in matrix.
|
||||
D3D_INTERPOLATION_MODE InterpolationMode; // Interpolation mode.
|
||||
D3D_PARAMETER_FLAGS Flags; // Parameter modifiers.
|
||||
|
||||
UINT FirstInRegister; // The first input register for this parameter.
|
||||
UINT FirstInComponent; // The first input register component for this parameter.
|
||||
UINT FirstOutRegister; // The first output register for this parameter.
|
||||
UINT FirstOutComponent; // The first output register component for this parameter.
|
||||
} D3D12_PARAMETER_DESC;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Interfaces ////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3D12ShaderReflectionType ID3D12ShaderReflectionType;
|
||||
typedef interface ID3D12ShaderReflectionType *LPD3D12SHADERREFLECTIONTYPE;
|
||||
|
||||
typedef interface ID3D12ShaderReflectionVariable ID3D12ShaderReflectionVariable;
|
||||
typedef interface ID3D12ShaderReflectionVariable *LPD3D12SHADERREFLECTIONVARIABLE;
|
||||
|
||||
typedef interface ID3D12ShaderReflectionConstantBuffer ID3D12ShaderReflectionConstantBuffer;
|
||||
typedef interface ID3D12ShaderReflectionConstantBuffer *LPD3D12SHADERREFLECTIONCONSTANTBUFFER;
|
||||
|
||||
typedef interface ID3D12ShaderReflection ID3D12ShaderReflection;
|
||||
typedef interface ID3D12ShaderReflection *LPD3D12SHADERREFLECTION;
|
||||
|
||||
typedef interface ID3D12LibraryReflection ID3D12LibraryReflection;
|
||||
typedef interface ID3D12LibraryReflection *LPD3D12LIBRARYREFLECTION;
|
||||
|
||||
typedef interface ID3D12FunctionReflection ID3D12FunctionReflection;
|
||||
typedef interface ID3D12FunctionReflection *LPD3D12FUNCTIONREFLECTION;
|
||||
|
||||
typedef interface ID3D12FunctionParameterReflection ID3D12FunctionParameterReflection;
|
||||
typedef interface ID3D12FunctionParameterReflection *LPD3D12FUNCTIONPARAMETERREFLECTION;
|
||||
|
||||
|
||||
// {E913C351-783D-48CA-A1D1-4F306284AD56}
|
||||
interface DECLSPEC_UUID("E913C351-783D-48CA-A1D1-4F306284AD56") ID3D12ShaderReflectionType;
|
||||
DEFINE_GUID(IID_ID3D12ShaderReflectionType,
|
||||
0xe913c351, 0x783d, 0x48ca, 0xa1, 0xd1, 0x4f, 0x30, 0x62, 0x84, 0xad, 0x56);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D12ShaderReflectionType
|
||||
|
||||
DECLARE_INTERFACE(ID3D12ShaderReflectionType)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_TYPE_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D12ShaderReflectionType*, GetMemberTypeByIndex)(THIS_ _In_ UINT Index) PURE;
|
||||
STDMETHOD_(ID3D12ShaderReflectionType*, GetMemberTypeByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||
STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ _In_ UINT Index) PURE;
|
||||
|
||||
STDMETHOD(IsEqual)(THIS_ _In_ ID3D12ShaderReflectionType* pType) PURE;
|
||||
STDMETHOD_(ID3D12ShaderReflectionType*, GetSubType)(THIS) PURE;
|
||||
STDMETHOD_(ID3D12ShaderReflectionType*, GetBaseClass)(THIS) PURE;
|
||||
STDMETHOD_(UINT, GetNumInterfaces)(THIS) PURE;
|
||||
STDMETHOD_(ID3D12ShaderReflectionType*, GetInterfaceByIndex)(THIS_ _In_ UINT uIndex) PURE;
|
||||
STDMETHOD(IsOfType)(THIS_ _In_ ID3D12ShaderReflectionType* pType) PURE;
|
||||
STDMETHOD(ImplementsInterface)(THIS_ _In_ ID3D12ShaderReflectionType* pBase) PURE;
|
||||
};
|
||||
|
||||
// {8337A8A6-A216-444A-B2F4-314733A73AEA}
|
||||
interface DECLSPEC_UUID("8337A8A6-A216-444A-B2F4-314733A73AEA") ID3D12ShaderReflectionVariable;
|
||||
DEFINE_GUID(IID_ID3D12ShaderReflectionVariable,
|
||||
0x8337a8a6, 0xa216, 0x444a, 0xb2, 0xf4, 0x31, 0x47, 0x33, 0xa7, 0x3a, 0xea);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D12ShaderReflectionVariable
|
||||
|
||||
DECLARE_INTERFACE(ID3D12ShaderReflectionVariable)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_VARIABLE_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D12ShaderReflectionType*, GetType)(THIS) PURE;
|
||||
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetBuffer)(THIS) PURE;
|
||||
|
||||
STDMETHOD_(UINT, GetInterfaceSlot)(THIS_ _In_ UINT uArrayIndex) PURE;
|
||||
};
|
||||
|
||||
// {C59598B4-48B3-4869-B9B1-B1618B14A8B7}
|
||||
interface DECLSPEC_UUID("C59598B4-48B3-4869-B9B1-B1618B14A8B7") ID3D12ShaderReflectionConstantBuffer;
|
||||
DEFINE_GUID(IID_ID3D12ShaderReflectionConstantBuffer,
|
||||
0xc59598b4, 0x48b3, 0x4869, 0xb9, 0xb1, 0xb1, 0x61, 0x8b, 0x14, 0xa8, 0xb7);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D12ShaderReflectionConstantBuffer
|
||||
|
||||
DECLARE_INTERFACE(ID3D12ShaderReflectionConstantBuffer)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ D3D12_SHADER_BUFFER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByIndex)(THIS_ _In_ UINT Index) PURE;
|
||||
STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||
};
|
||||
|
||||
// The ID3D12ShaderReflection IID may change from SDK version to SDK version
|
||||
// if the reflection API changes. This prevents new code with the new API
|
||||
// from working with an old binary. Recompiling with the new header
|
||||
// will pick up the new IID.
|
||||
|
||||
// {5A58797D-A72C-478D-8BA2-EFC6B0EFE88E}
|
||||
interface DECLSPEC_UUID("5A58797D-A72C-478D-8BA2-EFC6B0EFE88E") ID3D12ShaderReflection;
|
||||
DEFINE_GUID(IID_ID3D12ShaderReflection,
|
||||
0x5a58797d, 0xa72c, 0x478d, 0x8b, 0xa2, 0xef, 0xc6, 0xb0, 0xef, 0xe8, 0x8e);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D12ShaderReflection
|
||||
|
||||
DECLARE_INTERFACE_(ID3D12ShaderReflection, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid,
|
||||
_Out_ LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_SHADER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetConstantBufferByIndex)(THIS_ _In_ UINT Index) PURE;
|
||||
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer*, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex,
|
||||
_Out_ D3D12_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD(GetInputParameterDesc)(THIS_ _In_ UINT ParameterIndex,
|
||||
_Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
STDMETHOD(GetOutputParameterDesc)(THIS_ _In_ UINT ParameterIndex,
|
||||
_Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
STDMETHOD(GetPatchConstantParameterDesc)(THIS_ _In_ UINT ParameterIndex,
|
||||
_Out_ D3D12_SIGNATURE_PARAMETER_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D12ShaderReflectionVariable*, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name,
|
||||
_Out_ D3D12_SHADER_INPUT_BIND_DESC *pDesc) PURE;
|
||||
|
||||
STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE;
|
||||
STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE;
|
||||
STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE;
|
||||
STDMETHOD_(UINT, GetBitwiseInstructionCount)(THIS) PURE;
|
||||
|
||||
STDMETHOD_(D3D_PRIMITIVE, GetGSInputPrimitive)(THIS) PURE;
|
||||
STDMETHOD_(BOOL, IsSampleFrequencyShader)(THIS) PURE;
|
||||
|
||||
STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE;
|
||||
STDMETHOD(GetMinFeatureLevel)(THIS_ _Out_ enum D3D_FEATURE_LEVEL* pLevel) PURE;
|
||||
|
||||
STDMETHOD_(UINT, GetThreadGroupSize)(THIS_
|
||||
_Out_opt_ UINT* pSizeX,
|
||||
_Out_opt_ UINT* pSizeY,
|
||||
_Out_opt_ UINT* pSizeZ) PURE;
|
||||
|
||||
STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE;
|
||||
};
|
||||
|
||||
// {8E349D19-54DB-4A56-9DC9-119D87BDB804}
|
||||
interface DECLSPEC_UUID("8E349D19-54DB-4A56-9DC9-119D87BDB804") ID3D12LibraryReflection;
|
||||
DEFINE_GUID(IID_ID3D12LibraryReflection,
|
||||
0x8e349d19, 0x54db, 0x4a56, 0x9d, 0xc9, 0x11, 0x9d, 0x87, 0xbd, 0xb8, 0x4);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D12LibraryReflection
|
||||
|
||||
DECLARE_INTERFACE_(ID3D12LibraryReflection, IUnknown)
|
||||
{
|
||||
STDMETHOD(QueryInterface)(THIS_ _In_ REFIID iid, _Out_ LPVOID * ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_LIBRARY_DESC * pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D12FunctionReflection *, GetFunctionByIndex)(THIS_ _In_ INT FunctionIndex) PURE;
|
||||
};
|
||||
|
||||
// {1108795C-2772-4BA9-B2A8-D464DC7E2799}
|
||||
interface DECLSPEC_UUID("1108795C-2772-4BA9-B2A8-D464DC7E2799") ID3D12FunctionReflection;
|
||||
DEFINE_GUID(IID_ID3D12FunctionReflection,
|
||||
0x1108795c, 0x2772, 0x4ba9, 0xb2, 0xa8, 0xd4, 0x64, 0xdc, 0x7e, 0x27, 0x99);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D12FunctionReflection
|
||||
|
||||
DECLARE_INTERFACE(ID3D12FunctionReflection)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_FUNCTION_DESC * pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ _In_ UINT BufferIndex) PURE;
|
||||
STDMETHOD_(ID3D12ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDesc)(THIS_ _In_ UINT ResourceIndex,
|
||||
_Out_ D3D12_SHADER_INPUT_BIND_DESC * pDesc) PURE;
|
||||
|
||||
STDMETHOD_(ID3D12ShaderReflectionVariable *, GetVariableByName)(THIS_ _In_ LPCSTR Name) PURE;
|
||||
|
||||
STDMETHOD(GetResourceBindingDescByName)(THIS_ _In_ LPCSTR Name,
|
||||
_Out_ D3D12_SHADER_INPUT_BIND_DESC * pDesc) PURE;
|
||||
|
||||
// Use D3D_RETURN_PARAMETER_INDEX to get description of the return value.
|
||||
STDMETHOD_(ID3D12FunctionParameterReflection *, GetFunctionParameter)(THIS_ _In_ INT ParameterIndex) PURE;
|
||||
};
|
||||
|
||||
// {EC25F42D-7006-4F2B-B33E-02CC3375733F}
|
||||
interface DECLSPEC_UUID("EC25F42D-7006-4F2B-B33E-02CC3375733F") ID3D12FunctionParameterReflection;
|
||||
DEFINE_GUID(IID_ID3D12FunctionParameterReflection,
|
||||
0xec25f42d, 0x7006, 0x4f2b, 0xb3, 0x3e, 0x2, 0xcc, 0x33, 0x75, 0x73, 0x3f);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE ID3D12FunctionParameterReflection
|
||||
|
||||
DECLARE_INTERFACE(ID3D12FunctionParameterReflection)
|
||||
{
|
||||
STDMETHOD(GetDesc)(THIS_ _Out_ D3D12_PARAMETER_DESC * pDesc) PURE;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// APIs //////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3D12SHADER_H__
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,991 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
* Licensed under the MIT license
|
||||
*
|
||||
*-------------------------------------------------------------------------------------*/
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// D3D-version-neutral runtime information.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef enum D3D_DRIVER_TYPE
|
||||
{
|
||||
D3D_DRIVER_TYPE_UNKNOWN,
|
||||
D3D_DRIVER_TYPE_HARDWARE,
|
||||
D3D_DRIVER_TYPE_REFERENCE,
|
||||
D3D_DRIVER_TYPE_NULL,
|
||||
D3D_DRIVER_TYPE_SOFTWARE,
|
||||
D3D_DRIVER_TYPE_WARP,
|
||||
} D3D_DRIVER_TYPE;
|
||||
|
||||
typedef enum D3D_FEATURE_LEVEL
|
||||
{
|
||||
D3D_FEATURE_LEVEL_1_0_GENERIC = 0x100,
|
||||
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,
|
||||
D3D_FEATURE_LEVEL_10_0 = 0xa000,
|
||||
D3D_FEATURE_LEVEL_10_1 = 0xa100,
|
||||
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_2 = 0xc200
|
||||
} D3D_FEATURE_LEVEL;
|
||||
|
||||
cpp_quote("#define D3D_FL9_1_REQ_TEXTURE1D_U_DIMENSION 2048")
|
||||
cpp_quote("#define D3D_FL9_3_REQ_TEXTURE1D_U_DIMENSION 4096")
|
||||
cpp_quote("#define D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION 2048")
|
||||
cpp_quote("#define D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION 4096")
|
||||
cpp_quote("#define D3D_FL9_1_REQ_TEXTURECUBE_DIMENSION 512")
|
||||
cpp_quote("#define D3D_FL9_3_REQ_TEXTURECUBE_DIMENSION 4096")
|
||||
cpp_quote("#define D3D_FL9_1_REQ_TEXTURE3D_U_V_OR_W_DIMENSION 256")
|
||||
cpp_quote("#define D3D_FL9_1_DEFAULT_MAX_ANISOTROPY 2")
|
||||
cpp_quote("#define D3D_FL9_1_IA_PRIMITIVE_MAX_COUNT 65535")
|
||||
cpp_quote("#define D3D_FL9_2_IA_PRIMITIVE_MAX_COUNT 1048575")
|
||||
cpp_quote("#define D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT 1")
|
||||
cpp_quote("#define D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT 4")
|
||||
cpp_quote("#define D3D_FL9_1_MAX_TEXTURE_REPEAT 128")
|
||||
cpp_quote("#define D3D_FL9_2_MAX_TEXTURE_REPEAT 2048")
|
||||
cpp_quote("#define D3D_FL9_3_MAX_TEXTURE_REPEAT 8192")
|
||||
|
||||
typedef enum D3D_PRIMITIVE_TOPOLOGY
|
||||
{
|
||||
D3D_PRIMITIVE_TOPOLOGY_UNDEFINED = 0,
|
||||
D3D_PRIMITIVE_TOPOLOGY_POINTLIST = 1,
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINELIST = 2,
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINESTRIP = 3,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST = 4,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = 5,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLEFAN = 6,
|
||||
// Adjacency values should be equal to (0x8 & non-adjacency):
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = 10,
|
||||
D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = 11,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = 12,
|
||||
D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = 13,
|
||||
D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = 33,
|
||||
D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = 34,
|
||||
D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = 35,
|
||||
D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = 36,
|
||||
D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = 37,
|
||||
D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = 38,
|
||||
D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = 39,
|
||||
D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = 40,
|
||||
D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = 41,
|
||||
D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = 42,
|
||||
D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = 43,
|
||||
D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = 44,
|
||||
D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = 45,
|
||||
D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = 46,
|
||||
D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = 47,
|
||||
D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = 48,
|
||||
D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = 49,
|
||||
D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = 50,
|
||||
D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = 51,
|
||||
D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = 52,
|
||||
D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = 53,
|
||||
D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = 54,
|
||||
D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = 55,
|
||||
D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = 56,
|
||||
D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = 57,
|
||||
D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = 58,
|
||||
D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = 59,
|
||||
D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = 60,
|
||||
D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = 61,
|
||||
D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = 62,
|
||||
D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = 63,
|
||||
D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = 64,
|
||||
|
||||
D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_POINTLIST = D3D_PRIMITIVE_TOPOLOGY_POINTLIST,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_LINELIST = D3D_PRIMITIVE_TOPOLOGY_LINELIST,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ,
|
||||
D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ,
|
||||
|
||||
D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_POINTLIST = D3D_PRIMITIVE_TOPOLOGY_POINTLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_LINELIST = D3D_PRIMITIVE_TOPOLOGY_LINELIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ = D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST,
|
||||
D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST = D3D_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST
|
||||
} D3D_PRIMITIVE_TOPOLOGY;
|
||||
|
||||
typedef enum D3D_PRIMITIVE
|
||||
{
|
||||
D3D_PRIMITIVE_UNDEFINED = 0,
|
||||
D3D_PRIMITIVE_POINT = 1,
|
||||
D3D_PRIMITIVE_LINE = 2,
|
||||
D3D_PRIMITIVE_TRIANGLE = 3,
|
||||
// Adjacency values should be equal to (0x4 & non-adjacency):
|
||||
D3D_PRIMITIVE_LINE_ADJ = 6,
|
||||
D3D_PRIMITIVE_TRIANGLE_ADJ = 7,
|
||||
D3D_PRIMITIVE_1_CONTROL_POINT_PATCH = 8,
|
||||
D3D_PRIMITIVE_2_CONTROL_POINT_PATCH = 9,
|
||||
D3D_PRIMITIVE_3_CONTROL_POINT_PATCH = 10,
|
||||
D3D_PRIMITIVE_4_CONTROL_POINT_PATCH = 11,
|
||||
D3D_PRIMITIVE_5_CONTROL_POINT_PATCH = 12,
|
||||
D3D_PRIMITIVE_6_CONTROL_POINT_PATCH = 13,
|
||||
D3D_PRIMITIVE_7_CONTROL_POINT_PATCH = 14,
|
||||
D3D_PRIMITIVE_8_CONTROL_POINT_PATCH = 15,
|
||||
D3D_PRIMITIVE_9_CONTROL_POINT_PATCH = 16,
|
||||
D3D_PRIMITIVE_10_CONTROL_POINT_PATCH = 17,
|
||||
D3D_PRIMITIVE_11_CONTROL_POINT_PATCH = 18,
|
||||
D3D_PRIMITIVE_12_CONTROL_POINT_PATCH = 19,
|
||||
D3D_PRIMITIVE_13_CONTROL_POINT_PATCH = 20,
|
||||
D3D_PRIMITIVE_14_CONTROL_POINT_PATCH = 21,
|
||||
D3D_PRIMITIVE_15_CONTROL_POINT_PATCH = 22,
|
||||
D3D_PRIMITIVE_16_CONTROL_POINT_PATCH = 23,
|
||||
D3D_PRIMITIVE_17_CONTROL_POINT_PATCH = 24,
|
||||
D3D_PRIMITIVE_18_CONTROL_POINT_PATCH = 25,
|
||||
D3D_PRIMITIVE_19_CONTROL_POINT_PATCH = 26,
|
||||
D3D_PRIMITIVE_20_CONTROL_POINT_PATCH = 27,
|
||||
D3D_PRIMITIVE_21_CONTROL_POINT_PATCH = 28,
|
||||
D3D_PRIMITIVE_22_CONTROL_POINT_PATCH = 29,
|
||||
D3D_PRIMITIVE_23_CONTROL_POINT_PATCH = 30,
|
||||
D3D_PRIMITIVE_24_CONTROL_POINT_PATCH = 31,
|
||||
D3D_PRIMITIVE_25_CONTROL_POINT_PATCH = 32,
|
||||
D3D_PRIMITIVE_26_CONTROL_POINT_PATCH = 33,
|
||||
D3D_PRIMITIVE_27_CONTROL_POINT_PATCH = 34,
|
||||
D3D_PRIMITIVE_28_CONTROL_POINT_PATCH = 35,
|
||||
D3D_PRIMITIVE_29_CONTROL_POINT_PATCH = 36,
|
||||
D3D_PRIMITIVE_30_CONTROL_POINT_PATCH = 37,
|
||||
D3D_PRIMITIVE_31_CONTROL_POINT_PATCH = 38,
|
||||
D3D_PRIMITIVE_32_CONTROL_POINT_PATCH = 39,
|
||||
|
||||
D3D10_PRIMITIVE_UNDEFINED = D3D_PRIMITIVE_UNDEFINED,
|
||||
D3D10_PRIMITIVE_POINT = D3D_PRIMITIVE_POINT,
|
||||
D3D10_PRIMITIVE_LINE = D3D_PRIMITIVE_LINE,
|
||||
D3D10_PRIMITIVE_TRIANGLE = D3D_PRIMITIVE_TRIANGLE,
|
||||
D3D10_PRIMITIVE_LINE_ADJ = D3D_PRIMITIVE_LINE_ADJ,
|
||||
D3D10_PRIMITIVE_TRIANGLE_ADJ = D3D_PRIMITIVE_TRIANGLE_ADJ,
|
||||
|
||||
D3D11_PRIMITIVE_UNDEFINED = D3D_PRIMITIVE_UNDEFINED,
|
||||
D3D11_PRIMITIVE_POINT = D3D_PRIMITIVE_POINT,
|
||||
D3D11_PRIMITIVE_LINE = D3D_PRIMITIVE_LINE,
|
||||
D3D11_PRIMITIVE_TRIANGLE = D3D_PRIMITIVE_TRIANGLE,
|
||||
D3D11_PRIMITIVE_LINE_ADJ = D3D_PRIMITIVE_LINE_ADJ,
|
||||
D3D11_PRIMITIVE_TRIANGLE_ADJ = D3D_PRIMITIVE_TRIANGLE_ADJ,
|
||||
D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH = D3D_PRIMITIVE_1_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH = D3D_PRIMITIVE_2_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH = D3D_PRIMITIVE_3_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH = D3D_PRIMITIVE_4_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH = D3D_PRIMITIVE_5_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH = D3D_PRIMITIVE_6_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH = D3D_PRIMITIVE_7_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH = D3D_PRIMITIVE_8_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH = D3D_PRIMITIVE_9_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH = D3D_PRIMITIVE_10_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH = D3D_PRIMITIVE_11_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH = D3D_PRIMITIVE_12_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH = D3D_PRIMITIVE_13_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH = D3D_PRIMITIVE_14_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH = D3D_PRIMITIVE_15_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH = D3D_PRIMITIVE_16_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH = D3D_PRIMITIVE_17_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH = D3D_PRIMITIVE_18_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH = D3D_PRIMITIVE_19_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH = D3D_PRIMITIVE_20_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH = D3D_PRIMITIVE_21_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH = D3D_PRIMITIVE_22_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH = D3D_PRIMITIVE_23_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH = D3D_PRIMITIVE_24_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH = D3D_PRIMITIVE_25_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH = D3D_PRIMITIVE_26_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH = D3D_PRIMITIVE_27_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH = D3D_PRIMITIVE_28_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH = D3D_PRIMITIVE_29_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH = D3D_PRIMITIVE_30_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH = D3D_PRIMITIVE_31_CONTROL_POINT_PATCH,
|
||||
D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH = D3D_PRIMITIVE_32_CONTROL_POINT_PATCH,
|
||||
} D3D_PRIMITIVE;
|
||||
|
||||
typedef enum D3D_SRV_DIMENSION
|
||||
{
|
||||
D3D_SRV_DIMENSION_UNKNOWN = 0,
|
||||
D3D_SRV_DIMENSION_BUFFER = 1,
|
||||
D3D_SRV_DIMENSION_TEXTURE1D = 2,
|
||||
D3D_SRV_DIMENSION_TEXTURE1DARRAY = 3,
|
||||
D3D_SRV_DIMENSION_TEXTURE2D = 4,
|
||||
D3D_SRV_DIMENSION_TEXTURE2DARRAY = 5,
|
||||
D3D_SRV_DIMENSION_TEXTURE2DMS = 6,
|
||||
D3D_SRV_DIMENSION_TEXTURE2DMSARRAY = 7,
|
||||
D3D_SRV_DIMENSION_TEXTURE3D = 8,
|
||||
D3D_SRV_DIMENSION_TEXTURECUBE = 9,
|
||||
D3D_SRV_DIMENSION_TEXTURECUBEARRAY = 10,
|
||||
D3D_SRV_DIMENSION_BUFFEREX = 11,
|
||||
|
||||
D3D10_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN,
|
||||
D3D10_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER,
|
||||
D3D10_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D,
|
||||
D3D10_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY,
|
||||
D3D10_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D,
|
||||
D3D10_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY,
|
||||
D3D10_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS,
|
||||
D3D10_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY,
|
||||
D3D10_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D,
|
||||
D3D10_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE,
|
||||
|
||||
D3D10_1_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN,
|
||||
D3D10_1_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE,
|
||||
D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY,
|
||||
|
||||
D3D11_SRV_DIMENSION_UNKNOWN = D3D_SRV_DIMENSION_UNKNOWN,
|
||||
D3D11_SRV_DIMENSION_BUFFER = D3D_SRV_DIMENSION_BUFFER,
|
||||
D3D11_SRV_DIMENSION_TEXTURE1D = D3D_SRV_DIMENSION_TEXTURE1D,
|
||||
D3D11_SRV_DIMENSION_TEXTURE1DARRAY = D3D_SRV_DIMENSION_TEXTURE1DARRAY,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2D = D3D_SRV_DIMENSION_TEXTURE2D,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2DARRAY = D3D_SRV_DIMENSION_TEXTURE2DARRAY,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2DMS = D3D_SRV_DIMENSION_TEXTURE2DMS,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY = D3D_SRV_DIMENSION_TEXTURE2DMSARRAY,
|
||||
D3D11_SRV_DIMENSION_TEXTURE3D = D3D_SRV_DIMENSION_TEXTURE3D,
|
||||
D3D11_SRV_DIMENSION_TEXTURECUBE = D3D_SRV_DIMENSION_TEXTURECUBE,
|
||||
D3D11_SRV_DIMENSION_TEXTURECUBEARRAY = D3D_SRV_DIMENSION_TEXTURECUBEARRAY,
|
||||
D3D11_SRV_DIMENSION_BUFFEREX = D3D_SRV_DIMENSION_BUFFEREX,
|
||||
} D3D_SRV_DIMENSION;
|
||||
|
||||
// Bits in shaders indicating features they use which the runtime checks against current device support:
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_DOUBLES 0x00001")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_COMPUTE_SHADERS_PLUS_RAW_AND_STRUCTURED_BUFFERS_VIA_SHADER_4_X 0x00002")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_UAVS_AT_EVERY_STAGE 0x00004")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_64_UAVS 0x00008")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_MINIMUM_PRECISION 0x00010")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_11_1_DOUBLE_EXTENSIONS 0x00020")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_11_1_SHADER_EXTENSIONS 0x00040")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_LEVEL_9_COMPARISON_FILTERING 0x00080")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_TILED_RESOURCES 0x00100")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_STENCIL_REF 0x00200")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_INNER_COVERAGE 0x00400")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_TYPED_UAV_LOAD_ADDITIONAL_FORMATS 0x00800")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_ROVS 0x01000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER 0x02000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_WAVE_OPS 0x04000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_INT64_OPS 0x08000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_VIEW_ID 0x10000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_BARYCENTRICS 0x20000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_NATIVE_16BIT_OPS 0x40000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_SHADING_RATE 0x80000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_RAYTRACING_TIER_1_1 0x100000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_SAMPLER_FEEDBACK 0x200000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_ATOMIC_INT64_ON_TYPED_RESOURCE 0x400000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_ATOMIC_INT64_ON_GROUP_SHARED 0x800000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_DERIVATIVES_IN_MESH_AND_AMPLIFICATION_SHADERS 0x1000000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_RESOURCE_DESCRIPTOR_HEAP_INDEXING 0x2000000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_SAMPLER_DESCRIPTOR_HEAP_INDEXING 0x4000000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_WAVE_MMA 0x8000000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_ATOMIC_INT64_ON_DESCRIPTOR_HEAP_RESOURCE 0x10000000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_ADVANCED_TEXTURE_OPS 0x20000000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_WRITEABLE_MSAA_TEXTURES 0x40000000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_SAMPLE_CMP_GRADIENT_OR_BIAS 0x80000000")
|
||||
cpp_quote("#define D3D_SHADER_FEATURE_EXTENDED_COMMAND_INFO 0x100000000ull")
|
||||
|
||||
// This section is for flags that do not directly indicate a required feature,
|
||||
// but are used to indicate something about the shader.
|
||||
|
||||
// Flag for any derivative use. This allows call-graph validation
|
||||
// in the runtime to detect misuse of derivatives for an entry point that cannot
|
||||
// support it, or to determine when the flag
|
||||
// D3D_SHADER_FEATURE_DERIVATIVES_IN_MESH_AND_AMPLIFICATION_SHADERS is required.
|
||||
cpp_quote("#define D3D_OPT_SHADER_FEATURE_USES_DERIVATIVES 0x0000010000000000ull")
|
||||
|
||||
cpp_quote("#define D3D_OPT_SHADER_FEATURE_REQUIRES_GROUP 0x0000020000000000ull")
|
||||
|
||||
|
||||
// Additional internal shader feature flags are listed in dxbcutils.h (not relevant/useful for public to see)
|
||||
// When adding entries here, make sure they don't conflict with what's there.
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// Shader compilation information.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3D_SHADER_MACRO:
|
||||
// ----------
|
||||
// Preprocessor macro definition. The application pass in a NULL-terminated
|
||||
// array of this structure to various D3D APIs. This enables the application
|
||||
// to #define tokens at runtime, before the file is parsed.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef struct _D3D_SHADER_MACRO
|
||||
{
|
||||
LPCSTR Name;
|
||||
LPCSTR Definition;
|
||||
} D3D_SHADER_MACRO, *LPD3D_SHADER_MACRO;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ID3DBlob:
|
||||
// ------------
|
||||
// The buffer object is used by D3D to return arbitrary size data.
|
||||
// For compatibility with D3D10 this interface is also called ID3D10Blob,
|
||||
// but the version-neutral form is preferred.
|
||||
//
|
||||
// GetBufferPointer -
|
||||
// Returns a pointer to the beginning of the buffer.
|
||||
//
|
||||
// GetBufferSize -
|
||||
// Returns the size of the buffer, in bytes.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
// {8BA5FB08-5195-40e2-AC58-0D989C3A0102}
|
||||
cpp_quote("DEFINE_GUID(IID_ID3D10Blob, 0x8ba5fb08, 0x5195, 0x40e2, 0xac, 0x58, 0xd, 0x98, 0x9c, 0x3a, 0x1, 0x2);")
|
||||
|
||||
[ uuid( 8BA5FB08-5195-40e2-AC58-0D989C3A0102 ), object, local, pointer_default( unique ) ]
|
||||
interface ID3D10Blob : IUnknown
|
||||
{
|
||||
LPVOID GetBufferPointer();
|
||||
SIZE_T GetBufferSize();
|
||||
};
|
||||
|
||||
cpp_quote("typedef interface ID3D10Blob* LPD3D10BLOB;")
|
||||
|
||||
typedef ID3D10Blob ID3DBlob;
|
||||
cpp_quote("typedef ID3DBlob* LPD3DBLOB;")
|
||||
cpp_quote("#define IID_ID3DBlob IID_ID3D10Blob")
|
||||
|
||||
// ID3DDestructionNotifier: An interface to QI for, to set a callback which is triggered when the object is fully destroyed
|
||||
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void* pData);
|
||||
|
||||
[uuid(a06eb39a-50da-425b-8c31-4eecd6c270f3), object, local, pointer_default(unique)]
|
||||
interface ID3DDestructionNotifier
|
||||
: IUnknown
|
||||
{
|
||||
HRESULT RegisterDestructionCallback(
|
||||
[annotation("_In_")] PFN_DESTRUCTION_CALLBACK callbackFn,
|
||||
[annotation("_In_")] void* pData,
|
||||
[annotation("_Out_")] UINT* pCallbackID
|
||||
);
|
||||
HRESULT UnregisterDestructionCallback(
|
||||
[annotation("_In_")] UINT callbackID
|
||||
);
|
||||
};
|
||||
|
||||
typedef enum _D3D_INCLUDE_TYPE
|
||||
{
|
||||
D3D_INCLUDE_LOCAL,
|
||||
D3D_INCLUDE_SYSTEM,
|
||||
|
||||
D3D10_INCLUDE_LOCAL = D3D_INCLUDE_LOCAL,
|
||||
D3D10_INCLUDE_SYSTEM = D3D_INCLUDE_SYSTEM,
|
||||
|
||||
// force 32-bit size enum
|
||||
D3D_INCLUDE_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_INCLUDE_TYPE;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ID3DInclude:
|
||||
// -------------
|
||||
// This interface is intended to be implemented by the application, and can
|
||||
// be used by various D3D APIs. This enables application-specific handling
|
||||
// of #include directives in source files.
|
||||
//
|
||||
// Open()
|
||||
// Opens an include file. If successful, it should fill in ppData and
|
||||
// pBytes. The data pointer returned must remain valid until Close is
|
||||
// subsequently called. The name of the file is encoded in UTF-8 format.
|
||||
// Close()
|
||||
// Closes an include file. If Open was successful, Close is guaranteed
|
||||
// to be called before the API using this interface returns.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
cpp_quote("typedef interface ID3DInclude ID3DInclude;")
|
||||
|
||||
cpp_quote("#undef INTERFACE")
|
||||
cpp_quote("#define INTERFACE ID3DInclude")
|
||||
|
||||
cpp_quote("DECLARE_INTERFACE(ID3DInclude)")
|
||||
cpp_quote("{")
|
||||
cpp_quote(" STDMETHOD(Open)(THIS_ D3D_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID *ppData, UINT *pBytes) PURE;")
|
||||
cpp_quote(" STDMETHOD(Close)(THIS_ LPCVOID pData) PURE;")
|
||||
cpp_quote("};")
|
||||
|
||||
cpp_quote("typedef ID3DInclude* LPD3DINCLUDE;")
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// Shader reflection information.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
typedef enum _D3D_SHADER_VARIABLE_CLASS
|
||||
{
|
||||
D3D_SVC_SCALAR,
|
||||
D3D_SVC_VECTOR,
|
||||
D3D_SVC_MATRIX_ROWS,
|
||||
D3D_SVC_MATRIX_COLUMNS,
|
||||
D3D_SVC_OBJECT,
|
||||
D3D_SVC_STRUCT,
|
||||
D3D_SVC_INTERFACE_CLASS,
|
||||
D3D_SVC_INTERFACE_POINTER,
|
||||
|
||||
D3D10_SVC_SCALAR = D3D_SVC_SCALAR,
|
||||
D3D10_SVC_VECTOR = D3D_SVC_VECTOR,
|
||||
D3D10_SVC_MATRIX_ROWS = D3D_SVC_MATRIX_ROWS,
|
||||
D3D10_SVC_MATRIX_COLUMNS = D3D_SVC_MATRIX_COLUMNS,
|
||||
D3D10_SVC_OBJECT = D3D_SVC_OBJECT,
|
||||
D3D10_SVC_STRUCT = D3D_SVC_STRUCT,
|
||||
|
||||
D3D11_SVC_INTERFACE_CLASS = D3D_SVC_INTERFACE_CLASS,
|
||||
D3D11_SVC_INTERFACE_POINTER = D3D_SVC_INTERFACE_POINTER,
|
||||
|
||||
// force 32-bit size enum
|
||||
D3D_SVC_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_VARIABLE_CLASS;
|
||||
|
||||
typedef enum _D3D_SHADER_VARIABLE_FLAGS
|
||||
{
|
||||
D3D_SVF_USERPACKED = 1,
|
||||
D3D_SVF_USED = 2,
|
||||
|
||||
D3D_SVF_INTERFACE_POINTER = 4,
|
||||
D3D_SVF_INTERFACE_PARAMETER = 8,
|
||||
|
||||
D3D10_SVF_USERPACKED = D3D_SVF_USERPACKED,
|
||||
D3D10_SVF_USED = D3D_SVF_USED,
|
||||
|
||||
D3D11_SVF_INTERFACE_POINTER = D3D_SVF_INTERFACE_POINTER,
|
||||
D3D11_SVF_INTERFACE_PARAMETER = D3D_SVF_INTERFACE_PARAMETER,
|
||||
|
||||
// force 32-bit size enum
|
||||
D3D_SVF_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_VARIABLE_FLAGS;
|
||||
|
||||
typedef enum _D3D_SHADER_VARIABLE_TYPE
|
||||
{
|
||||
D3D_SVT_VOID = 0,
|
||||
D3D_SVT_BOOL = 1,
|
||||
D3D_SVT_INT = 2,
|
||||
D3D_SVT_FLOAT = 3,
|
||||
D3D_SVT_STRING = 4,
|
||||
D3D_SVT_TEXTURE = 5,
|
||||
D3D_SVT_TEXTURE1D = 6,
|
||||
D3D_SVT_TEXTURE2D = 7,
|
||||
D3D_SVT_TEXTURE3D = 8,
|
||||
D3D_SVT_TEXTURECUBE = 9,
|
||||
D3D_SVT_SAMPLER = 10,
|
||||
D3D_SVT_SAMPLER1D = 11,
|
||||
D3D_SVT_SAMPLER2D = 12,
|
||||
D3D_SVT_SAMPLER3D = 13,
|
||||
D3D_SVT_SAMPLERCUBE = 14,
|
||||
D3D_SVT_PIXELSHADER = 15,
|
||||
D3D_SVT_VERTEXSHADER = 16,
|
||||
D3D_SVT_PIXELFRAGMENT = 17,
|
||||
D3D_SVT_VERTEXFRAGMENT = 18,
|
||||
D3D_SVT_UINT = 19,
|
||||
D3D_SVT_UINT8 = 20,
|
||||
D3D_SVT_GEOMETRYSHADER = 21,
|
||||
D3D_SVT_RASTERIZER = 22,
|
||||
D3D_SVT_DEPTHSTENCIL = 23,
|
||||
D3D_SVT_BLEND = 24,
|
||||
D3D_SVT_BUFFER = 25,
|
||||
D3D_SVT_CBUFFER = 26,
|
||||
D3D_SVT_TBUFFER = 27,
|
||||
D3D_SVT_TEXTURE1DARRAY = 28,
|
||||
D3D_SVT_TEXTURE2DARRAY = 29,
|
||||
D3D_SVT_RENDERTARGETVIEW = 30,
|
||||
D3D_SVT_DEPTHSTENCILVIEW = 31,
|
||||
|
||||
D3D_SVT_TEXTURE2DMS = 32,
|
||||
D3D_SVT_TEXTURE2DMSARRAY = 33,
|
||||
|
||||
D3D_SVT_TEXTURECUBEARRAY = 34,
|
||||
|
||||
D3D_SVT_HULLSHADER = 35,
|
||||
D3D_SVT_DOMAINSHADER = 36,
|
||||
|
||||
D3D_SVT_INTERFACE_POINTER = 37,
|
||||
D3D_SVT_COMPUTESHADER = 38,
|
||||
|
||||
D3D_SVT_DOUBLE = 39,
|
||||
|
||||
D3D_SVT_RWTEXTURE1D = 40,
|
||||
D3D_SVT_RWTEXTURE1DARRAY = 41,
|
||||
D3D_SVT_RWTEXTURE2D = 42,
|
||||
D3D_SVT_RWTEXTURE2DARRAY = 43,
|
||||
D3D_SVT_RWTEXTURE3D = 44,
|
||||
D3D_SVT_RWBUFFER = 45,
|
||||
|
||||
D3D_SVT_BYTEADDRESS_BUFFER = 46,
|
||||
D3D_SVT_RWBYTEADDRESS_BUFFER = 47,
|
||||
D3D_SVT_STRUCTURED_BUFFER = 48,
|
||||
D3D_SVT_RWSTRUCTURED_BUFFER = 49,
|
||||
D3D_SVT_APPEND_STRUCTURED_BUFFER = 50,
|
||||
D3D_SVT_CONSUME_STRUCTURED_BUFFER = 51,
|
||||
|
||||
D3D_SVT_MIN8FLOAT = 52,
|
||||
D3D_SVT_MIN10FLOAT = 53,
|
||||
D3D_SVT_MIN16FLOAT = 54,
|
||||
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,
|
||||
D3D10_SVT_FLOAT = D3D_SVT_FLOAT,
|
||||
D3D10_SVT_STRING = D3D_SVT_STRING,
|
||||
D3D10_SVT_TEXTURE = D3D_SVT_TEXTURE,
|
||||
D3D10_SVT_TEXTURE1D = D3D_SVT_TEXTURE1D,
|
||||
D3D10_SVT_TEXTURE2D = D3D_SVT_TEXTURE2D,
|
||||
D3D10_SVT_TEXTURE3D = D3D_SVT_TEXTURE3D,
|
||||
D3D10_SVT_TEXTURECUBE = D3D_SVT_TEXTURECUBE,
|
||||
D3D10_SVT_SAMPLER = D3D_SVT_SAMPLER,
|
||||
D3D10_SVT_SAMPLER1D = D3D_SVT_SAMPLER1D,
|
||||
D3D10_SVT_SAMPLER2D = D3D_SVT_SAMPLER2D,
|
||||
D3D10_SVT_SAMPLER3D = D3D_SVT_SAMPLER3D,
|
||||
D3D10_SVT_SAMPLERCUBE = D3D_SVT_SAMPLERCUBE,
|
||||
D3D10_SVT_PIXELSHADER = D3D_SVT_PIXELSHADER,
|
||||
D3D10_SVT_VERTEXSHADER = D3D_SVT_VERTEXSHADER,
|
||||
D3D10_SVT_PIXELFRAGMENT = D3D_SVT_PIXELFRAGMENT,
|
||||
D3D10_SVT_VERTEXFRAGMENT = D3D_SVT_VERTEXFRAGMENT,
|
||||
D3D10_SVT_UINT = D3D_SVT_UINT,
|
||||
D3D10_SVT_UINT8 = D3D_SVT_UINT8,
|
||||
D3D10_SVT_GEOMETRYSHADER = D3D_SVT_GEOMETRYSHADER,
|
||||
D3D10_SVT_RASTERIZER = D3D_SVT_RASTERIZER,
|
||||
D3D10_SVT_DEPTHSTENCIL = D3D_SVT_DEPTHSTENCIL,
|
||||
D3D10_SVT_BLEND = D3D_SVT_BLEND,
|
||||
D3D10_SVT_BUFFER = D3D_SVT_BUFFER,
|
||||
D3D10_SVT_CBUFFER = D3D_SVT_CBUFFER,
|
||||
D3D10_SVT_TBUFFER = D3D_SVT_TBUFFER,
|
||||
D3D10_SVT_TEXTURE1DARRAY = D3D_SVT_TEXTURE1DARRAY,
|
||||
D3D10_SVT_TEXTURE2DARRAY = D3D_SVT_TEXTURE2DARRAY,
|
||||
D3D10_SVT_RENDERTARGETVIEW = D3D_SVT_RENDERTARGETVIEW,
|
||||
D3D10_SVT_DEPTHSTENCILVIEW = D3D_SVT_DEPTHSTENCILVIEW,
|
||||
|
||||
D3D10_SVT_TEXTURE2DMS = D3D_SVT_TEXTURE2DMS,
|
||||
D3D10_SVT_TEXTURE2DMSARRAY = D3D_SVT_TEXTURE2DMSARRAY,
|
||||
|
||||
D3D10_SVT_TEXTURECUBEARRAY = D3D_SVT_TEXTURECUBEARRAY,
|
||||
|
||||
D3D11_SVT_HULLSHADER = D3D_SVT_HULLSHADER,
|
||||
D3D11_SVT_DOMAINSHADER = D3D_SVT_DOMAINSHADER,
|
||||
|
||||
D3D11_SVT_INTERFACE_POINTER = D3D_SVT_INTERFACE_POINTER,
|
||||
D3D11_SVT_COMPUTESHADER = D3D_SVT_COMPUTESHADER,
|
||||
|
||||
D3D11_SVT_DOUBLE = D3D_SVT_DOUBLE,
|
||||
|
||||
D3D11_SVT_RWTEXTURE1D = D3D_SVT_RWTEXTURE1D,
|
||||
D3D11_SVT_RWTEXTURE1DARRAY = D3D_SVT_RWTEXTURE1DARRAY,
|
||||
D3D11_SVT_RWTEXTURE2D = D3D_SVT_RWTEXTURE2D,
|
||||
D3D11_SVT_RWTEXTURE2DARRAY = D3D_SVT_RWTEXTURE2DARRAY,
|
||||
D3D11_SVT_RWTEXTURE3D = D3D_SVT_RWTEXTURE3D,
|
||||
D3D11_SVT_RWBUFFER = D3D_SVT_RWBUFFER,
|
||||
|
||||
D3D11_SVT_BYTEADDRESS_BUFFER = D3D_SVT_BYTEADDRESS_BUFFER,
|
||||
D3D11_SVT_RWBYTEADDRESS_BUFFER = D3D_SVT_RWBYTEADDRESS_BUFFER,
|
||||
D3D11_SVT_STRUCTURED_BUFFER = D3D_SVT_STRUCTURED_BUFFER,
|
||||
D3D11_SVT_RWSTRUCTURED_BUFFER = D3D_SVT_RWSTRUCTURED_BUFFER,
|
||||
D3D11_SVT_APPEND_STRUCTURED_BUFFER = D3D_SVT_APPEND_STRUCTURED_BUFFER,
|
||||
D3D11_SVT_CONSUME_STRUCTURED_BUFFER = D3D_SVT_CONSUME_STRUCTURED_BUFFER,
|
||||
|
||||
// force 32-bit size enum
|
||||
D3D_SVT_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_VARIABLE_TYPE;
|
||||
|
||||
typedef enum _D3D_SHADER_INPUT_FLAGS
|
||||
{
|
||||
D3D_SIF_USERPACKED = 0x01,
|
||||
D3D_SIF_COMPARISON_SAMPLER = 0x02, // is this a comparison sampler?
|
||||
D3D_SIF_TEXTURE_COMPONENT_0 = 0x04, // this 2-bit value encodes c - 1, where c
|
||||
D3D_SIF_TEXTURE_COMPONENT_1 = 0x08, // is the number of components in the texture
|
||||
D3D_SIF_TEXTURE_COMPONENTS = 0x0c,
|
||||
D3D_SIF_UNUSED = 0x10,
|
||||
|
||||
D3D10_SIF_USERPACKED = D3D_SIF_USERPACKED,
|
||||
D3D10_SIF_COMPARISON_SAMPLER = D3D_SIF_COMPARISON_SAMPLER,
|
||||
D3D10_SIF_TEXTURE_COMPONENT_0 = D3D_SIF_TEXTURE_COMPONENT_0,
|
||||
D3D10_SIF_TEXTURE_COMPONENT_1 = D3D_SIF_TEXTURE_COMPONENT_1,
|
||||
D3D10_SIF_TEXTURE_COMPONENTS = D3D_SIF_TEXTURE_COMPONENTS,
|
||||
|
||||
// force 32-bit size enum
|
||||
D3D_SIF_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_INPUT_FLAGS;
|
||||
|
||||
typedef enum _D3D_SHADER_INPUT_TYPE
|
||||
{
|
||||
D3D_SIT_CBUFFER,
|
||||
D3D_SIT_TBUFFER,
|
||||
D3D_SIT_TEXTURE,
|
||||
D3D_SIT_SAMPLER,
|
||||
D3D_SIT_UAV_RWTYPED,
|
||||
D3D_SIT_STRUCTURED,
|
||||
D3D_SIT_UAV_RWSTRUCTURED,
|
||||
D3D_SIT_BYTEADDRESS,
|
||||
D3D_SIT_UAV_RWBYTEADDRESS,
|
||||
D3D_SIT_UAV_APPEND_STRUCTURED,
|
||||
D3D_SIT_UAV_CONSUME_STRUCTURED,
|
||||
D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER,
|
||||
D3D_SIT_RTACCELERATIONSTRUCTURE,
|
||||
D3D_SIT_UAV_FEEDBACKTEXTURE,
|
||||
|
||||
D3D10_SIT_CBUFFER = D3D_SIT_CBUFFER,
|
||||
D3D10_SIT_TBUFFER = D3D_SIT_TBUFFER,
|
||||
D3D10_SIT_TEXTURE = D3D_SIT_TEXTURE,
|
||||
D3D10_SIT_SAMPLER = D3D_SIT_SAMPLER,
|
||||
|
||||
D3D11_SIT_UAV_RWTYPED = D3D_SIT_UAV_RWTYPED,
|
||||
D3D11_SIT_STRUCTURED = D3D_SIT_STRUCTURED,
|
||||
D3D11_SIT_UAV_RWSTRUCTURED = D3D_SIT_UAV_RWSTRUCTURED,
|
||||
D3D11_SIT_BYTEADDRESS = D3D_SIT_BYTEADDRESS,
|
||||
D3D11_SIT_UAV_RWBYTEADDRESS = D3D_SIT_UAV_RWBYTEADDRESS,
|
||||
D3D11_SIT_UAV_APPEND_STRUCTURED = D3D_SIT_UAV_APPEND_STRUCTURED,
|
||||
D3D11_SIT_UAV_CONSUME_STRUCTURED = D3D_SIT_UAV_CONSUME_STRUCTURED,
|
||||
D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER = D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER,
|
||||
} D3D_SHADER_INPUT_TYPE;
|
||||
|
||||
typedef enum _D3D_SHADER_CBUFFER_FLAGS
|
||||
{
|
||||
D3D_CBF_USERPACKED = 1,
|
||||
|
||||
D3D10_CBF_USERPACKED = D3D_CBF_USERPACKED,
|
||||
|
||||
// force 32-bit size enum
|
||||
D3D_CBF_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_SHADER_CBUFFER_FLAGS;
|
||||
|
||||
typedef enum _D3D_CBUFFER_TYPE
|
||||
{
|
||||
D3D_CT_CBUFFER,
|
||||
D3D_CT_TBUFFER,
|
||||
D3D_CT_INTERFACE_POINTERS,
|
||||
D3D_CT_RESOURCE_BIND_INFO,
|
||||
|
||||
D3D10_CT_CBUFFER = D3D_CT_CBUFFER,
|
||||
D3D10_CT_TBUFFER = D3D_CT_TBUFFER,
|
||||
|
||||
D3D11_CT_CBUFFER = D3D_CT_CBUFFER,
|
||||
D3D11_CT_TBUFFER = D3D_CT_TBUFFER,
|
||||
D3D11_CT_INTERFACE_POINTERS = D3D_CT_INTERFACE_POINTERS,
|
||||
D3D11_CT_RESOURCE_BIND_INFO = D3D_CT_RESOURCE_BIND_INFO,
|
||||
} D3D_CBUFFER_TYPE;
|
||||
|
||||
typedef enum D3D_NAME
|
||||
{
|
||||
D3D_NAME_UNDEFINED = 0,
|
||||
|
||||
// Names meaningful to both HLSL and hardware
|
||||
D3D_NAME_POSITION = 1,
|
||||
D3D_NAME_CLIP_DISTANCE = 2,
|
||||
D3D_NAME_CULL_DISTANCE = 3,
|
||||
D3D_NAME_RENDER_TARGET_ARRAY_INDEX = 4,
|
||||
D3D_NAME_VIEWPORT_ARRAY_INDEX = 5,
|
||||
D3D_NAME_VERTEX_ID = 6,
|
||||
D3D_NAME_PRIMITIVE_ID = 7,
|
||||
D3D_NAME_INSTANCE_ID = 8,
|
||||
D3D_NAME_IS_FRONT_FACE = 9,
|
||||
D3D_NAME_SAMPLE_INDEX = 10,
|
||||
D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR = 11,
|
||||
D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = 12,
|
||||
D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR = 13,
|
||||
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,
|
||||
|
||||
// Names meaningful to HLSL only
|
||||
D3D_NAME_TARGET = 64,
|
||||
D3D_NAME_DEPTH = 65,
|
||||
D3D_NAME_COVERAGE = 66,
|
||||
D3D_NAME_DEPTH_GREATER_EQUAL = 67,
|
||||
D3D_NAME_DEPTH_LESS_EQUAL = 68,
|
||||
D3D_NAME_STENCIL_REF = 69,
|
||||
D3D_NAME_INNER_COVERAGE = 70,
|
||||
|
||||
D3D10_NAME_UNDEFINED = D3D_NAME_UNDEFINED,
|
||||
D3D10_NAME_POSITION = D3D_NAME_POSITION,
|
||||
D3D10_NAME_CLIP_DISTANCE = D3D_NAME_CLIP_DISTANCE,
|
||||
D3D10_NAME_CULL_DISTANCE = D3D_NAME_CULL_DISTANCE,
|
||||
D3D10_NAME_RENDER_TARGET_ARRAY_INDEX = D3D_NAME_RENDER_TARGET_ARRAY_INDEX,
|
||||
D3D10_NAME_VIEWPORT_ARRAY_INDEX = D3D_NAME_VIEWPORT_ARRAY_INDEX,
|
||||
D3D10_NAME_VERTEX_ID = D3D_NAME_VERTEX_ID,
|
||||
D3D10_NAME_PRIMITIVE_ID = D3D_NAME_PRIMITIVE_ID,
|
||||
D3D10_NAME_INSTANCE_ID = D3D_NAME_INSTANCE_ID,
|
||||
D3D10_NAME_IS_FRONT_FACE = D3D_NAME_IS_FRONT_FACE,
|
||||
D3D10_NAME_SAMPLE_INDEX = D3D_NAME_SAMPLE_INDEX,
|
||||
D3D10_NAME_TARGET = D3D_NAME_TARGET,
|
||||
D3D10_NAME_DEPTH = D3D_NAME_DEPTH,
|
||||
D3D10_NAME_COVERAGE = D3D_NAME_COVERAGE,
|
||||
|
||||
D3D11_NAME_FINAL_QUAD_EDGE_TESSFACTOR = D3D_NAME_FINAL_QUAD_EDGE_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_QUAD_INSIDE_TESSFACTOR = D3D_NAME_FINAL_QUAD_INSIDE_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_TRI_EDGE_TESSFACTOR = D3D_NAME_FINAL_TRI_EDGE_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_TRI_INSIDE_TESSFACTOR = D3D_NAME_FINAL_TRI_INSIDE_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_LINE_DETAIL_TESSFACTOR = D3D_NAME_FINAL_LINE_DETAIL_TESSFACTOR,
|
||||
D3D11_NAME_FINAL_LINE_DENSITY_TESSFACTOR = D3D_NAME_FINAL_LINE_DENSITY_TESSFACTOR,
|
||||
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,
|
||||
|
||||
D3D12_NAME_BARYCENTRICS = D3D_NAME_BARYCENTRICS,
|
||||
D3D12_NAME_SHADINGRATE = D3D_NAME_SHADINGRATE,
|
||||
D3D12_NAME_CULLPRIMITIVE = D3D_NAME_CULLPRIMITIVE,
|
||||
} D3D_NAME;
|
||||
|
||||
typedef enum D3D_RESOURCE_RETURN_TYPE
|
||||
{
|
||||
D3D_RETURN_TYPE_UNORM = 1,
|
||||
D3D_RETURN_TYPE_SNORM = 2,
|
||||
D3D_RETURN_TYPE_SINT = 3,
|
||||
D3D_RETURN_TYPE_UINT = 4,
|
||||
D3D_RETURN_TYPE_FLOAT = 5,
|
||||
D3D_RETURN_TYPE_MIXED = 6,
|
||||
D3D_RETURN_TYPE_DOUBLE = 7,
|
||||
D3D_RETURN_TYPE_CONTINUED = 8,
|
||||
|
||||
D3D10_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM,
|
||||
D3D10_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM,
|
||||
D3D10_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT,
|
||||
D3D10_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT,
|
||||
D3D10_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT,
|
||||
D3D10_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED,
|
||||
|
||||
D3D11_RETURN_TYPE_UNORM = D3D_RETURN_TYPE_UNORM,
|
||||
D3D11_RETURN_TYPE_SNORM = D3D_RETURN_TYPE_SNORM,
|
||||
D3D11_RETURN_TYPE_SINT = D3D_RETURN_TYPE_SINT,
|
||||
D3D11_RETURN_TYPE_UINT = D3D_RETURN_TYPE_UINT,
|
||||
D3D11_RETURN_TYPE_FLOAT = D3D_RETURN_TYPE_FLOAT,
|
||||
D3D11_RETURN_TYPE_MIXED = D3D_RETURN_TYPE_MIXED,
|
||||
D3D11_RETURN_TYPE_DOUBLE = D3D_RETURN_TYPE_DOUBLE,
|
||||
D3D11_RETURN_TYPE_CONTINUED = D3D_RETURN_TYPE_CONTINUED,
|
||||
} D3D_RESOURCE_RETURN_TYPE;
|
||||
|
||||
typedef enum D3D_REGISTER_COMPONENT_TYPE
|
||||
{
|
||||
D3D_REGISTER_COMPONENT_UNKNOWN = 0,
|
||||
D3D_REGISTER_COMPONENT_UINT32 = 1,
|
||||
D3D_REGISTER_COMPONENT_SINT32 = 2,
|
||||
D3D_REGISTER_COMPONENT_FLOAT32 = 3,
|
||||
D3D_REGISTER_COMPONENT_UINT16 = 4,
|
||||
D3D_REGISTER_COMPONENT_SINT16 = 5,
|
||||
D3D_REGISTER_COMPONENT_FLOAT16 = 6,
|
||||
D3D_REGISTER_COMPONENT_UINT64 = 7,
|
||||
D3D_REGISTER_COMPONENT_SINT64 = 8,
|
||||
D3D_REGISTER_COMPONENT_FLOAT64 = 9,
|
||||
|
||||
D3D10_REGISTER_COMPONENT_UNKNOWN = D3D_REGISTER_COMPONENT_UNKNOWN,
|
||||
D3D10_REGISTER_COMPONENT_UINT32 = D3D_REGISTER_COMPONENT_UINT32,
|
||||
D3D10_REGISTER_COMPONENT_SINT32 = D3D_REGISTER_COMPONENT_SINT32,
|
||||
D3D10_REGISTER_COMPONENT_FLOAT32 = D3D_REGISTER_COMPONENT_FLOAT32,
|
||||
D3D10_REGISTER_COMPONENT_UINT16 = D3D_REGISTER_COMPONENT_UINT16,
|
||||
D3D10_REGISTER_COMPONENT_SINT16 = D3D_REGISTER_COMPONENT_SINT16,
|
||||
D3D10_REGISTER_COMPONENT_FLOAT16 = D3D_REGISTER_COMPONENT_FLOAT16,
|
||||
D3D10_REGISTER_COMPONENT_UINT64 = D3D_REGISTER_COMPONENT_UINT64,
|
||||
D3D10_REGISTER_COMPONENT_SINT64 = D3D_REGISTER_COMPONENT_SINT64,
|
||||
D3D10_REGISTER_COMPONENT_FLOAT64 = D3D_REGISTER_COMPONENT_FLOAT64,
|
||||
} D3D_REGISTER_COMPONENT_TYPE;
|
||||
|
||||
typedef enum D3D_TESSELLATOR_DOMAIN
|
||||
{
|
||||
D3D_TESSELLATOR_DOMAIN_UNDEFINED = 0,
|
||||
D3D_TESSELLATOR_DOMAIN_ISOLINE = 1,
|
||||
D3D_TESSELLATOR_DOMAIN_TRI = 2,
|
||||
D3D_TESSELLATOR_DOMAIN_QUAD = 3,
|
||||
|
||||
D3D11_TESSELLATOR_DOMAIN_UNDEFINED = D3D_TESSELLATOR_DOMAIN_UNDEFINED,
|
||||
D3D11_TESSELLATOR_DOMAIN_ISOLINE = D3D_TESSELLATOR_DOMAIN_ISOLINE,
|
||||
D3D11_TESSELLATOR_DOMAIN_TRI = D3D_TESSELLATOR_DOMAIN_TRI,
|
||||
D3D11_TESSELLATOR_DOMAIN_QUAD = D3D_TESSELLATOR_DOMAIN_QUAD,
|
||||
} D3D_TESSELLATOR_DOMAIN;
|
||||
|
||||
typedef enum D3D_TESSELLATOR_PARTITIONING
|
||||
{
|
||||
D3D_TESSELLATOR_PARTITIONING_UNDEFINED = 0,
|
||||
D3D_TESSELLATOR_PARTITIONING_INTEGER = 1,
|
||||
D3D_TESSELLATOR_PARTITIONING_POW2 = 2,
|
||||
D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = 3,
|
||||
D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = 4,
|
||||
|
||||
D3D11_TESSELLATOR_PARTITIONING_UNDEFINED = D3D_TESSELLATOR_PARTITIONING_UNDEFINED,
|
||||
D3D11_TESSELLATOR_PARTITIONING_INTEGER = D3D_TESSELLATOR_PARTITIONING_INTEGER,
|
||||
D3D11_TESSELLATOR_PARTITIONING_POW2 = D3D_TESSELLATOR_PARTITIONING_POW2,
|
||||
D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD = D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD,
|
||||
D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN = D3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN,
|
||||
} D3D_TESSELLATOR_PARTITIONING;
|
||||
|
||||
typedef enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE
|
||||
{
|
||||
D3D_TESSELLATOR_OUTPUT_UNDEFINED = 0,
|
||||
D3D_TESSELLATOR_OUTPUT_POINT = 1,
|
||||
D3D_TESSELLATOR_OUTPUT_LINE = 2,
|
||||
D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW = 3,
|
||||
D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW = 4,
|
||||
|
||||
D3D11_TESSELLATOR_OUTPUT_UNDEFINED = D3D_TESSELLATOR_OUTPUT_UNDEFINED,
|
||||
D3D11_TESSELLATOR_OUTPUT_POINT = D3D_TESSELLATOR_OUTPUT_POINT,
|
||||
D3D11_TESSELLATOR_OUTPUT_LINE = D3D_TESSELLATOR_OUTPUT_LINE,
|
||||
D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CW = D3D_TESSELLATOR_OUTPUT_TRIANGLE_CW,
|
||||
D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW = D3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW,
|
||||
} D3D_TESSELLATOR_OUTPUT_PRIMITIVE;
|
||||
|
||||
typedef enum D3D_MIN_PRECISION
|
||||
{
|
||||
D3D_MIN_PRECISION_DEFAULT = 0, // Default precision for the shader model
|
||||
D3D_MIN_PRECISION_FLOAT_16 = 1, // Min 16 bit/component float
|
||||
D3D_MIN_PRECISION_FLOAT_2_8 = 2, // Min 10(2.8)bit/comp. float
|
||||
D3D_MIN_PRECISION_RESERVED = 3, // Reserved for future use
|
||||
D3D_MIN_PRECISION_SINT_16 = 4, // Min 16 bit/comp. signed integer
|
||||
D3D_MIN_PRECISION_UINT_16 = 5, // Min 16 bit/comp. unsigned integer
|
||||
|
||||
// These values are abstractions of width only for use in situations
|
||||
// where a general width is needed instead of specific types. They
|
||||
// will never be used in shader operands.
|
||||
D3D_MIN_PRECISION_ANY_16 = 0xf0,
|
||||
D3D_MIN_PRECISION_ANY_10 = 0xf1,
|
||||
} D3D_MIN_PRECISION;
|
||||
|
||||
typedef enum D3D_INTERPOLATION_MODE
|
||||
{
|
||||
D3D_INTERPOLATION_UNDEFINED = 0,
|
||||
D3D_INTERPOLATION_CONSTANT = 1,
|
||||
D3D_INTERPOLATION_LINEAR = 2,
|
||||
D3D_INTERPOLATION_LINEAR_CENTROID = 3,
|
||||
D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE = 4,
|
||||
D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_CENTROID = 5,
|
||||
D3D_INTERPOLATION_LINEAR_SAMPLE = 6,
|
||||
D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_SAMPLE = 7,
|
||||
} D3D_INTERPOLATION_MODE;
|
||||
|
||||
// Parameter flags.
|
||||
typedef enum _D3D_PARAMETER_FLAGS
|
||||
{
|
||||
D3D_PF_NONE = 0x00000000,
|
||||
D3D_PF_IN = 0x00000001,
|
||||
D3D_PF_OUT = 0x00000002,
|
||||
D3D_PF_FORCE_DWORD = 0x7fffffff
|
||||
} D3D_PARAMETER_FLAGS;
|
||||
|
||||
// Format Layout Properties
|
||||
typedef enum D3D_FORMAT_LAYOUT
|
||||
{
|
||||
D3DFL_STANDARD = 0, // standard layout
|
||||
D3DFL_CUSTOM = -1 // custom layout
|
||||
// Note, 1 bit allocated for this in FORMAT_DETAIL below. If you add fields here, add bits...
|
||||
// NOTE SIGNED VALUES ARE USED SINCE COMPILER MAKES ENUMS SIGNED, AND BITFIELDS ARE SIGN EXTENDED ON READ
|
||||
} D3D_FORMAT_LAYOUT;
|
||||
|
||||
typedef enum D3D_FORMAT_TYPE_LEVEL
|
||||
{
|
||||
D3DFTL_NO_TYPE = 0,
|
||||
D3DFTL_PARTIAL_TYPE = -2,
|
||||
D3DFTL_FULL_TYPE = -1,
|
||||
// Note, 2 bits allocated for this in FORMAT_DETAIL below. If you add fields here, add bits...
|
||||
// NOTE SIGNED VALUES ARE USED SINCE COMPILER MAKES ENUMS SIGNED, AND BITFIELDS ARE SIGN EXTENDED ON READ
|
||||
} 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,
|
||||
// Note, 3 bits allocated for this in FORMAT_DETAIL below. If you add fields here, add bits...
|
||||
// NOTE SIGNED VALUES ARE USED SINCE COMPILER MAKES ENUMS SIGNED, AND BITFIELDS ARE SIGN EXTENDED ON READ
|
||||
} 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,
|
||||
// Note, 3 bits allocated for this in FORMAT_DETAIL below. If you add fields here, add bits...
|
||||
// NOTE SIGNED VALUES ARE USED SINCE COMPILER MAKES ENUMS SIGNED, AND BITFIELDS ARE SIGN EXTENDED ON READ
|
||||
} D3D_FORMAT_COMPONENT_INTERPRETATION;
|
||||
|
||||
// Well-Known Private Data IDs (WKPDID_*):
|
||||
|
||||
// WKPDID_D3DDebugObjectName provides a unique name to objects in order to assist the developer during debugging.
|
||||
//
|
||||
// const char c_szName[] = "texture.jpg";
|
||||
// pObject->SetPrivateData( WKPDID_D3DDebugObjectName, sizeof( c_szName ) - 1, c_szName );
|
||||
cpp_quote("DEFINE_GUID(WKPDID_D3DDebugObjectName,0x429b8c22,0x9188,0x4b0c,0x87,0x42,0xac,0xb0,0xbf,0x85,0xc2,0x00);")
|
||||
cpp_quote("DEFINE_GUID(WKPDID_D3DDebugObjectNameW,0x4cca5fd8,0x921f,0x42c8,0x85,0x66,0x70,0xca,0xf2,0xa9,0xb7,0x41);")
|
||||
cpp_quote("DEFINE_GUID(WKPDID_CommentStringW,0xd0149dc0,0x90e8,0x4ec8,0x81, 0x44, 0xe9, 0x00, 0xad, 0x26, 0x6b, 0xb2);")
|
||||
cpp_quote("DEFINE_GUID(WKPDID_D3D12UniqueObjectId, 0x1b39de15, 0xec04, 0x4bae, 0xba, 0x4d, 0x8c, 0xef, 0x79, 0xfc, 0x04, 0xc1);")
|
||||
|
||||
cpp_quote("#define D3D_SET_OBJECT_NAME_N_A(pObject, Chars, pName) (pObject)->SetPrivateData(WKPDID_D3DDebugObjectName, Chars, pName)")
|
||||
cpp_quote("#define D3D_SET_OBJECT_NAME_A(pObject, pName) D3D_SET_OBJECT_NAME_N_A(pObject, lstrlenA(pName), pName)")
|
||||
cpp_quote("#define D3D_SET_OBJECT_NAME_N_W(pObject, Chars, pName) (pObject)->SetPrivateData(WKPDID_D3DDebugObjectNameW, Chars*2, pName)")
|
||||
cpp_quote("#define D3D_SET_OBJECT_NAME_W(pObject, pName) D3D_SET_OBJECT_NAME_N_W(pObject, wcslen(pName), pName)")
|
||||
|
||||
cpp_quote("#define D3D_COMPONENT_MASK_X 1")
|
||||
cpp_quote("#define D3D_COMPONENT_MASK_Y 2")
|
||||
cpp_quote("#define D3D_COMPONENT_MASK_Z 4")
|
||||
cpp_quote("#define D3D_COMPONENT_MASK_W 8")
|
||||
|
||||
cpp_quote("DEFINE_GUID(D3D_TEXTURE_LAYOUT_ROW_MAJOR,0xb5dc234f,0x72bb,0x4bec,0x97,0x05,0x8c,0xf2,0x58,0xdf,0x6b,0x6c);") // Feature_D3D1XDisplayable
|
||||
cpp_quote("DEFINE_GUID(D3D_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE,0x4c0f29e3,0x3f5f,0x4d35,0x84,0xc9,0xbc,0x09,0x83,0xb6,0x2c,0x28);") // Feature_D3D1XDisplayable
|
||||
|
||||
@@ -0,0 +1,998 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* 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 __d3dshadercacheregistration_h__
|
||||
#define __d3dshadercacheregistration_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 __ID3DShaderCacheInstallerClient_FWD_DEFINED__
|
||||
#define __ID3DShaderCacheInstallerClient_FWD_DEFINED__
|
||||
typedef interface ID3DShaderCacheInstallerClient ID3DShaderCacheInstallerClient;
|
||||
|
||||
#endif /* __ID3DShaderCacheInstallerClient_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3DShaderCacheComponent_FWD_DEFINED__
|
||||
#define __ID3DShaderCacheComponent_FWD_DEFINED__
|
||||
typedef interface ID3DShaderCacheComponent ID3DShaderCacheComponent;
|
||||
|
||||
#endif /* __ID3DShaderCacheComponent_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3DShaderCacheApplication_FWD_DEFINED__
|
||||
#define __ID3DShaderCacheApplication_FWD_DEFINED__
|
||||
typedef interface ID3DShaderCacheApplication ID3DShaderCacheApplication;
|
||||
|
||||
#endif /* __ID3DShaderCacheApplication_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3DShaderCacheInstaller_FWD_DEFINED__
|
||||
#define __ID3DShaderCacheInstaller_FWD_DEFINED__
|
||||
typedef interface ID3DShaderCacheInstaller ID3DShaderCacheInstaller;
|
||||
|
||||
#endif /* __ID3DShaderCacheInstaller_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3DShaderCacheExplorer_FWD_DEFINED__
|
||||
#define __ID3DShaderCacheExplorer_FWD_DEFINED__
|
||||
typedef interface ID3DShaderCacheExplorer ID3DShaderCacheExplorer;
|
||||
|
||||
#endif /* __ID3DShaderCacheExplorer_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3DShaderCacheInstallerFactory_FWD_DEFINED__
|
||||
#define __ID3DShaderCacheInstallerFactory_FWD_DEFINED__
|
||||
typedef interface ID3DShaderCacheInstallerFactory ID3DShaderCacheInstallerFactory;
|
||||
|
||||
#endif /* __ID3DShaderCacheInstallerFactory_FWD_DEFINED__ */
|
||||
|
||||
|
||||
/* header files for imported files */
|
||||
#include "oaidl.h"
|
||||
#include "ocidl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3dshadercacheregistration_0000_0000 */
|
||||
/* [local] */
|
||||
|
||||
#pragma once
|
||||
DEFINE_GUID(CLSID_D3DShaderCacheInstallerFactory, 0x16195a0b, 0x607c, 0x41f1, 0xbf, 0x03, 0xc7, 0x69, 0x4d, 0x60, 0xa8, 0xd4);
|
||||
typedef
|
||||
enum D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE
|
||||
{
|
||||
D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE_USER = 0,
|
||||
D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE_SYSTEM = ( D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE_USER + 1 )
|
||||
} D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE;
|
||||
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0000_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0000_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __ID3DShaderCacheInstallerClient_INTERFACE_DEFINED__
|
||||
#define __ID3DShaderCacheInstallerClient_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3DShaderCacheInstallerClient */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3DShaderCacheInstallerClient;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("a16ee930-d9f6-4222-a514-244473e5d266")
|
||||
ID3DShaderCacheInstallerClient
|
||||
{
|
||||
public:
|
||||
BEGIN_INTERFACE
|
||||
virtual HRESULT STDMETHODCALLTYPE GetInstallerName(
|
||||
_Inout_ SIZE_T *pNameLength,
|
||||
_Out_writes_opt_(*pNameLength) wchar_t *pName) = 0;
|
||||
|
||||
virtual D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE STDMETHODCALLTYPE GetInstallerScope( void) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE HandleDriverUpdate(
|
||||
_In_ ID3DShaderCacheInstaller *pInstaller) = 0;
|
||||
|
||||
END_INTERFACE
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3DShaderCacheInstallerClientVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstallerClient, GetInstallerName)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetInstallerName )(
|
||||
ID3DShaderCacheInstallerClient * This,
|
||||
_Inout_ SIZE_T *pNameLength,
|
||||
_Out_writes_opt_(*pNameLength) wchar_t *pName);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstallerClient, GetInstallerScope)
|
||||
D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE ( STDMETHODCALLTYPE *GetInstallerScope )(
|
||||
ID3DShaderCacheInstallerClient * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstallerClient, HandleDriverUpdate)
|
||||
HRESULT ( STDMETHODCALLTYPE *HandleDriverUpdate )(
|
||||
ID3DShaderCacheInstallerClient * This,
|
||||
_In_ ID3DShaderCacheInstaller *pInstaller);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3DShaderCacheInstallerClientVtbl;
|
||||
|
||||
interface ID3DShaderCacheInstallerClient
|
||||
{
|
||||
CONST_VTBL struct ID3DShaderCacheInstallerClientVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3DShaderCacheInstallerClient_GetInstallerName(This,pNameLength,pName) \
|
||||
( (This)->lpVtbl -> GetInstallerName(This,pNameLength,pName) )
|
||||
|
||||
#define ID3DShaderCacheInstallerClient_GetInstallerScope(This) \
|
||||
( (This)->lpVtbl -> GetInstallerScope(This) )
|
||||
|
||||
#define ID3DShaderCacheInstallerClient_HandleDriverUpdate(This,pInstaller) \
|
||||
( (This)->lpVtbl -> HandleDriverUpdate(This,pInstaller) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3DShaderCacheInstallerClient_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3dshadercacheregistration_0000_0001 */
|
||||
/* [local] */
|
||||
|
||||
typedef struct D3D_SHADER_CACHE_PSDB_PROPERTIES
|
||||
{
|
||||
const wchar_t *pAdapterFamily;
|
||||
const wchar_t *pPsdbPath;
|
||||
} D3D_SHADER_CACHE_PSDB_PROPERTIES;
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0001_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0001_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __ID3DShaderCacheComponent_INTERFACE_DEFINED__
|
||||
#define __ID3DShaderCacheComponent_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3DShaderCacheComponent */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3DShaderCacheComponent;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("eed1bf00-f5c7-4cf7-885c-d0f9c0cb4828")
|
||||
ID3DShaderCacheComponent : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetComponentName(
|
||||
_Out_ const wchar_t **pName) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetStateObjectDatabasePath(
|
||||
_Out_ const wchar_t **pPath) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetPrecompiledCachePath(
|
||||
_In_ const wchar_t *pAdapterFamily,
|
||||
_Inout_ const wchar_t **pPath) = 0;
|
||||
|
||||
virtual UINT STDMETHODCALLTYPE GetPrecompiledShaderDatabaseCount( void) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetPrecompiledShaderDatabases(
|
||||
UINT ArraySize,
|
||||
_Out_writes_(ArraySize) D3D_SHADER_CACHE_PSDB_PROPERTIES *pPSDBs) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3DShaderCacheComponentVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3DShaderCacheComponent * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3DShaderCacheComponent * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3DShaderCacheComponent * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheComponent, GetComponentName)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetComponentName )(
|
||||
ID3DShaderCacheComponent * This,
|
||||
_Out_ const wchar_t **pName);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheComponent, GetStateObjectDatabasePath)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetStateObjectDatabasePath )(
|
||||
ID3DShaderCacheComponent * This,
|
||||
_Out_ const wchar_t **pPath);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheComponent, GetPrecompiledCachePath)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetPrecompiledCachePath )(
|
||||
ID3DShaderCacheComponent * This,
|
||||
_In_ const wchar_t *pAdapterFamily,
|
||||
_Inout_ const wchar_t **pPath);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheComponent, GetPrecompiledShaderDatabaseCount)
|
||||
UINT ( STDMETHODCALLTYPE *GetPrecompiledShaderDatabaseCount )(
|
||||
ID3DShaderCacheComponent * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheComponent, GetPrecompiledShaderDatabases)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetPrecompiledShaderDatabases )(
|
||||
ID3DShaderCacheComponent * This,
|
||||
UINT ArraySize,
|
||||
_Out_writes_(ArraySize) D3D_SHADER_CACHE_PSDB_PROPERTIES *pPSDBs);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3DShaderCacheComponentVtbl;
|
||||
|
||||
interface ID3DShaderCacheComponent
|
||||
{
|
||||
CONST_VTBL struct ID3DShaderCacheComponentVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3DShaderCacheComponent_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3DShaderCacheComponent_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3DShaderCacheComponent_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3DShaderCacheComponent_GetComponentName(This,pName) \
|
||||
( (This)->lpVtbl -> GetComponentName(This,pName) )
|
||||
|
||||
#define ID3DShaderCacheComponent_GetStateObjectDatabasePath(This,pPath) \
|
||||
( (This)->lpVtbl -> GetStateObjectDatabasePath(This,pPath) )
|
||||
|
||||
#define ID3DShaderCacheComponent_GetPrecompiledCachePath(This,pAdapterFamily,pPath) \
|
||||
( (This)->lpVtbl -> GetPrecompiledCachePath(This,pAdapterFamily,pPath) )
|
||||
|
||||
#define ID3DShaderCacheComponent_GetPrecompiledShaderDatabaseCount(This) \
|
||||
( (This)->lpVtbl -> GetPrecompiledShaderDatabaseCount(This) )
|
||||
|
||||
#define ID3DShaderCacheComponent_GetPrecompiledShaderDatabases(This,ArraySize,pPSDBs) \
|
||||
( (This)->lpVtbl -> GetPrecompiledShaderDatabases(This,ArraySize,pPSDBs) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3DShaderCacheComponent_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3dshadercacheregistration_0000_0002 */
|
||||
/* [local] */
|
||||
|
||||
typedef
|
||||
enum D3D_SHADER_CACHE_TARGET_FLAGS
|
||||
{
|
||||
D3D_SHADER_CACHE_TARGET_FLAG_NONE = 0
|
||||
} D3D_SHADER_CACHE_TARGET_FLAGS;
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS( D3D_SHADER_CACHE_TARGET_FLAGS )
|
||||
typedef union D3D_VERSION_NUMBER
|
||||
{
|
||||
UINT64 Version;
|
||||
UINT16 VersionParts[ 4 ];
|
||||
} D3D_VERSION_NUMBER;
|
||||
|
||||
typedef struct D3D_SHADER_CACHE_COMPILER_PROPERTIES
|
||||
{
|
||||
wchar_t szAdapterFamily[ 128 ];
|
||||
UINT64 MinimumABISupportVersion;
|
||||
UINT64 MaximumABISupportVersion;
|
||||
D3D_VERSION_NUMBER CompilerVersion;
|
||||
D3D_VERSION_NUMBER ApplicationProfileVersion;
|
||||
} D3D_SHADER_CACHE_COMPILER_PROPERTIES;
|
||||
|
||||
typedef struct D3D_SHADER_CACHE_APPLICATION_DESC
|
||||
{
|
||||
const wchar_t *pExeFilename;
|
||||
const wchar_t *pName;
|
||||
D3D_VERSION_NUMBER Version;
|
||||
const wchar_t *pEngineName;
|
||||
D3D_VERSION_NUMBER EngineVersion;
|
||||
} D3D_SHADER_CACHE_APPLICATION_DESC;
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0002_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0002_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __ID3DShaderCacheApplication_INTERFACE_DEFINED__
|
||||
#define __ID3DShaderCacheApplication_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3DShaderCacheApplication */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3DShaderCacheApplication;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("fc688ee2-1b35-4913-93be-1ca3fa7df39e")
|
||||
ID3DShaderCacheApplication : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetExePath(
|
||||
_Out_ const wchar_t **pExePath) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetDesc(
|
||||
_Out_ D3D_SHADER_CACHE_APPLICATION_DESC *pApplicationDesc) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE RegisterComponent(
|
||||
_In_ const wchar_t *pName,
|
||||
_In_ const wchar_t *pStateObjectDBPath,
|
||||
_In_ UINT NumPSDB,
|
||||
_In_reads_(NumPSDB) const D3D_SHADER_CACHE_PSDB_PROPERTIES *pPSDBs,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvComponent) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE RemoveComponent(
|
||||
_In_ ID3DShaderCacheComponent *pComponent) = 0;
|
||||
|
||||
virtual UINT STDMETHODCALLTYPE GetComponentCount( void) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetComponent(
|
||||
_In_ UINT index,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvComponent) = 0;
|
||||
|
||||
virtual UINT STDMETHODCALLTYPE GetPrecompileTargetCount(
|
||||
D3D_SHADER_CACHE_TARGET_FLAGS flags) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetPrecompileTargets(
|
||||
_In_ UINT ArraySize,
|
||||
_In_reads_(ArraySize) D3D_SHADER_CACHE_COMPILER_PROPERTIES *pArray,
|
||||
D3D_SHADER_CACHE_TARGET_FLAGS flags) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetInstallerName(
|
||||
_Out_ const wchar_t **pInstallerName) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3DShaderCacheApplicationVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3DShaderCacheApplication * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3DShaderCacheApplication * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3DShaderCacheApplication * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheApplication, GetExePath)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetExePath )(
|
||||
ID3DShaderCacheApplication * This,
|
||||
_Out_ const wchar_t **pExePath);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheApplication, GetDesc)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetDesc )(
|
||||
ID3DShaderCacheApplication * This,
|
||||
_Out_ D3D_SHADER_CACHE_APPLICATION_DESC *pApplicationDesc);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheApplication, RegisterComponent)
|
||||
HRESULT ( STDMETHODCALLTYPE *RegisterComponent )(
|
||||
ID3DShaderCacheApplication * This,
|
||||
_In_ const wchar_t *pName,
|
||||
_In_ const wchar_t *pStateObjectDBPath,
|
||||
_In_ UINT NumPSDB,
|
||||
_In_reads_(NumPSDB) const D3D_SHADER_CACHE_PSDB_PROPERTIES *pPSDBs,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvComponent);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheApplication, RemoveComponent)
|
||||
HRESULT ( STDMETHODCALLTYPE *RemoveComponent )(
|
||||
ID3DShaderCacheApplication * This,
|
||||
_In_ ID3DShaderCacheComponent *pComponent);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheApplication, GetComponentCount)
|
||||
UINT ( STDMETHODCALLTYPE *GetComponentCount )(
|
||||
ID3DShaderCacheApplication * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheApplication, GetComponent)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetComponent )(
|
||||
ID3DShaderCacheApplication * This,
|
||||
_In_ UINT index,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvComponent);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheApplication, GetPrecompileTargetCount)
|
||||
UINT ( STDMETHODCALLTYPE *GetPrecompileTargetCount )(
|
||||
ID3DShaderCacheApplication * This,
|
||||
D3D_SHADER_CACHE_TARGET_FLAGS flags);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheApplication, GetPrecompileTargets)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetPrecompileTargets )(
|
||||
ID3DShaderCacheApplication * This,
|
||||
_In_ UINT ArraySize,
|
||||
_In_reads_(ArraySize) D3D_SHADER_CACHE_COMPILER_PROPERTIES *pArray,
|
||||
D3D_SHADER_CACHE_TARGET_FLAGS flags);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheApplication, GetInstallerName)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetInstallerName )(
|
||||
ID3DShaderCacheApplication * This,
|
||||
_Out_ const wchar_t **pInstallerName);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3DShaderCacheApplicationVtbl;
|
||||
|
||||
interface ID3DShaderCacheApplication
|
||||
{
|
||||
CONST_VTBL struct ID3DShaderCacheApplicationVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3DShaderCacheApplication_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3DShaderCacheApplication_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3DShaderCacheApplication_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3DShaderCacheApplication_GetExePath(This,pExePath) \
|
||||
( (This)->lpVtbl -> GetExePath(This,pExePath) )
|
||||
|
||||
#define ID3DShaderCacheApplication_GetDesc(This,pApplicationDesc) \
|
||||
( (This)->lpVtbl -> GetDesc(This,pApplicationDesc) )
|
||||
|
||||
#define ID3DShaderCacheApplication_RegisterComponent(This,pName,pStateObjectDBPath,NumPSDB,pPSDBs,riid,ppvComponent) \
|
||||
( (This)->lpVtbl -> RegisterComponent(This,pName,pStateObjectDBPath,NumPSDB,pPSDBs,riid,ppvComponent) )
|
||||
|
||||
#define ID3DShaderCacheApplication_RemoveComponent(This,pComponent) \
|
||||
( (This)->lpVtbl -> RemoveComponent(This,pComponent) )
|
||||
|
||||
#define ID3DShaderCacheApplication_GetComponentCount(This) \
|
||||
( (This)->lpVtbl -> GetComponentCount(This) )
|
||||
|
||||
#define ID3DShaderCacheApplication_GetComponent(This,index,riid,ppvComponent) \
|
||||
( (This)->lpVtbl -> GetComponent(This,index,riid,ppvComponent) )
|
||||
|
||||
#define ID3DShaderCacheApplication_GetPrecompileTargetCount(This,flags) \
|
||||
( (This)->lpVtbl -> GetPrecompileTargetCount(This,flags) )
|
||||
|
||||
#define ID3DShaderCacheApplication_GetPrecompileTargets(This,ArraySize,pArray,flags) \
|
||||
( (This)->lpVtbl -> GetPrecompileTargets(This,ArraySize,pArray,flags) )
|
||||
|
||||
#define ID3DShaderCacheApplication_GetInstallerName(This,pInstallerName) \
|
||||
( (This)->lpVtbl -> GetInstallerName(This,pInstallerName) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3DShaderCacheApplication_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3dshadercacheregistration_0000_0003 */
|
||||
/* [local] */
|
||||
|
||||
typedef struct SC_HANDLE__ *SC_HANDLE;
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0003_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0003_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __ID3DShaderCacheInstaller_INTERFACE_DEFINED__
|
||||
#define __ID3DShaderCacheInstaller_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3DShaderCacheInstaller */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3DShaderCacheInstaller;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("bbe30de1-6318-4526-ae17-776693191bb4")
|
||||
ID3DShaderCacheInstaller : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE RegisterDriverUpdateListener( void) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE UnregisterDriverUpdateListener( void) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE RegisterServiceDriverUpdateTrigger(
|
||||
SC_HANDLE hServiceHandle) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE UnregisterServiceDriverUpdateTrigger(
|
||||
SC_HANDLE hServiceHandle) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE RegisterApplication(
|
||||
_In_ const wchar_t *pExePath,
|
||||
_In_ const D3D_SHADER_CACHE_APPLICATION_DESC *pApplicationDesc,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvApp) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE RemoveApplication(
|
||||
_In_ ID3DShaderCacheApplication *pApplication) = 0;
|
||||
|
||||
virtual UINT STDMETHODCALLTYPE GetApplicationCount( void) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetApplication(
|
||||
_In_ UINT index,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvApp) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE ClearAllState( void) = 0;
|
||||
|
||||
virtual UINT STDMETHODCALLTYPE GetMaxPrecompileTargetCount( void) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetPrecompileTargets(
|
||||
_In_opt_ const D3D_SHADER_CACHE_APPLICATION_DESC *pApplicationDesc,
|
||||
_Inout_ UINT *pArraySize,
|
||||
_Out_writes_(*pArraySize) D3D_SHADER_CACHE_COMPILER_PROPERTIES *pArray,
|
||||
D3D_SHADER_CACHE_TARGET_FLAGS flags) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3DShaderCacheInstallerVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3DShaderCacheInstaller * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3DShaderCacheInstaller * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3DShaderCacheInstaller * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, RegisterDriverUpdateListener)
|
||||
HRESULT ( STDMETHODCALLTYPE *RegisterDriverUpdateListener )(
|
||||
ID3DShaderCacheInstaller * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, UnregisterDriverUpdateListener)
|
||||
HRESULT ( STDMETHODCALLTYPE *UnregisterDriverUpdateListener )(
|
||||
ID3DShaderCacheInstaller * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, RegisterServiceDriverUpdateTrigger)
|
||||
HRESULT ( STDMETHODCALLTYPE *RegisterServiceDriverUpdateTrigger )(
|
||||
ID3DShaderCacheInstaller * This,
|
||||
SC_HANDLE hServiceHandle);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, UnregisterServiceDriverUpdateTrigger)
|
||||
HRESULT ( STDMETHODCALLTYPE *UnregisterServiceDriverUpdateTrigger )(
|
||||
ID3DShaderCacheInstaller * This,
|
||||
SC_HANDLE hServiceHandle);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, RegisterApplication)
|
||||
HRESULT ( STDMETHODCALLTYPE *RegisterApplication )(
|
||||
ID3DShaderCacheInstaller * This,
|
||||
_In_ const wchar_t *pExePath,
|
||||
_In_ const D3D_SHADER_CACHE_APPLICATION_DESC *pApplicationDesc,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvApp);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, RemoveApplication)
|
||||
HRESULT ( STDMETHODCALLTYPE *RemoveApplication )(
|
||||
ID3DShaderCacheInstaller * This,
|
||||
_In_ ID3DShaderCacheApplication *pApplication);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, GetApplicationCount)
|
||||
UINT ( STDMETHODCALLTYPE *GetApplicationCount )(
|
||||
ID3DShaderCacheInstaller * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, GetApplication)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetApplication )(
|
||||
ID3DShaderCacheInstaller * This,
|
||||
_In_ UINT index,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvApp);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, ClearAllState)
|
||||
HRESULT ( STDMETHODCALLTYPE *ClearAllState )(
|
||||
ID3DShaderCacheInstaller * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, GetMaxPrecompileTargetCount)
|
||||
UINT ( STDMETHODCALLTYPE *GetMaxPrecompileTargetCount )(
|
||||
ID3DShaderCacheInstaller * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstaller, GetPrecompileTargets)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetPrecompileTargets )(
|
||||
ID3DShaderCacheInstaller * This,
|
||||
_In_opt_ const D3D_SHADER_CACHE_APPLICATION_DESC *pApplicationDesc,
|
||||
_Inout_ UINT *pArraySize,
|
||||
_Out_writes_(*pArraySize) D3D_SHADER_CACHE_COMPILER_PROPERTIES *pArray,
|
||||
D3D_SHADER_CACHE_TARGET_FLAGS flags);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3DShaderCacheInstallerVtbl;
|
||||
|
||||
interface ID3DShaderCacheInstaller
|
||||
{
|
||||
CONST_VTBL struct ID3DShaderCacheInstallerVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3DShaderCacheInstaller_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3DShaderCacheInstaller_RegisterDriverUpdateListener(This) \
|
||||
( (This)->lpVtbl -> RegisterDriverUpdateListener(This) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_UnregisterDriverUpdateListener(This) \
|
||||
( (This)->lpVtbl -> UnregisterDriverUpdateListener(This) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_RegisterServiceDriverUpdateTrigger(This,hServiceHandle) \
|
||||
( (This)->lpVtbl -> RegisterServiceDriverUpdateTrigger(This,hServiceHandle) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_UnregisterServiceDriverUpdateTrigger(This,hServiceHandle) \
|
||||
( (This)->lpVtbl -> UnregisterServiceDriverUpdateTrigger(This,hServiceHandle) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_RegisterApplication(This,pExePath,pApplicationDesc,riid,ppvApp) \
|
||||
( (This)->lpVtbl -> RegisterApplication(This,pExePath,pApplicationDesc,riid,ppvApp) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_RemoveApplication(This,pApplication) \
|
||||
( (This)->lpVtbl -> RemoveApplication(This,pApplication) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_GetApplicationCount(This) \
|
||||
( (This)->lpVtbl -> GetApplicationCount(This) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_GetApplication(This,index,riid,ppvApp) \
|
||||
( (This)->lpVtbl -> GetApplication(This,index,riid,ppvApp) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_ClearAllState(This) \
|
||||
( (This)->lpVtbl -> ClearAllState(This) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_GetMaxPrecompileTargetCount(This) \
|
||||
( (This)->lpVtbl -> GetMaxPrecompileTargetCount(This) )
|
||||
|
||||
#define ID3DShaderCacheInstaller_GetPrecompileTargets(This,pApplicationDesc,pArraySize,pArray,flags) \
|
||||
( (This)->lpVtbl -> GetPrecompileTargets(This,pApplicationDesc,pArraySize,pArray,flags) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3DShaderCacheInstaller_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3DShaderCacheExplorer_INTERFACE_DEFINED__
|
||||
#define __ID3DShaderCacheExplorer_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3DShaderCacheExplorer */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3DShaderCacheExplorer;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("90432322-32f5-487f-9264-e9390fa58b2a")
|
||||
ID3DShaderCacheExplorer : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetApplicationFromExePath(
|
||||
_In_ const wchar_t *pFullExePath,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvApp) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3DShaderCacheExplorerVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3DShaderCacheExplorer * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3DShaderCacheExplorer * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3DShaderCacheExplorer * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheExplorer, GetApplicationFromExePath)
|
||||
HRESULT ( STDMETHODCALLTYPE *GetApplicationFromExePath )(
|
||||
ID3DShaderCacheExplorer * This,
|
||||
_In_ const wchar_t *pFullExePath,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvApp);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3DShaderCacheExplorerVtbl;
|
||||
|
||||
interface ID3DShaderCacheExplorer
|
||||
{
|
||||
CONST_VTBL struct ID3DShaderCacheExplorerVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3DShaderCacheExplorer_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3DShaderCacheExplorer_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3DShaderCacheExplorer_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3DShaderCacheExplorer_GetApplicationFromExePath(This,pFullExePath,riid,ppvApp) \
|
||||
( (This)->lpVtbl -> GetApplicationFromExePath(This,pFullExePath,riid,ppvApp) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3DShaderCacheExplorer_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __ID3DShaderCacheInstallerFactory_INTERFACE_DEFINED__
|
||||
#define __ID3DShaderCacheInstallerFactory_INTERFACE_DEFINED__
|
||||
|
||||
/* interface ID3DShaderCacheInstallerFactory */
|
||||
/* [unique][local][object][uuid] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_ID3DShaderCacheInstallerFactory;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("09b2dfe4-840f-401a-804c-0dd8aadc9e9f")
|
||||
ID3DShaderCacheInstallerFactory : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateInstaller(
|
||||
_In_ ID3DShaderCacheInstallerClient *pClient,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvInstaller) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateExplorer(
|
||||
IUnknown *pUnknown,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvExplorer) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct ID3DShaderCacheInstallerFactoryVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
ID3DShaderCacheInstallerFactory * This,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvObject);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, AddRef)
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
ID3DShaderCacheInstallerFactory * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(IUnknown, Release)
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
ID3DShaderCacheInstallerFactory * This);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstallerFactory, CreateInstaller)
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateInstaller )(
|
||||
ID3DShaderCacheInstallerFactory * This,
|
||||
_In_ ID3DShaderCacheInstallerClient *pClient,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvInstaller);
|
||||
|
||||
DECLSPEC_XFGVIRT(ID3DShaderCacheInstallerFactory, CreateExplorer)
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateExplorer )(
|
||||
ID3DShaderCacheInstallerFactory * This,
|
||||
IUnknown *pUnknown,
|
||||
REFIID riid,
|
||||
_COM_Outptr_ void **ppvExplorer);
|
||||
|
||||
END_INTERFACE
|
||||
} ID3DShaderCacheInstallerFactoryVtbl;
|
||||
|
||||
interface ID3DShaderCacheInstallerFactory
|
||||
{
|
||||
CONST_VTBL struct ID3DShaderCacheInstallerFactoryVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define ID3DShaderCacheInstallerFactory_QueryInterface(This,riid,ppvObject) \
|
||||
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
|
||||
|
||||
#define ID3DShaderCacheInstallerFactory_AddRef(This) \
|
||||
( (This)->lpVtbl -> AddRef(This) )
|
||||
|
||||
#define ID3DShaderCacheInstallerFactory_Release(This) \
|
||||
( (This)->lpVtbl -> Release(This) )
|
||||
|
||||
|
||||
#define ID3DShaderCacheInstallerFactory_CreateInstaller(This,pClient,riid,ppvInstaller) \
|
||||
( (This)->lpVtbl -> CreateInstaller(This,pClient,riid,ppvInstaller) )
|
||||
|
||||
#define ID3DShaderCacheInstallerFactory_CreateExplorer(This,pUnknown,riid,ppvExplorer) \
|
||||
( (This)->lpVtbl -> CreateExplorer(This,pUnknown,riid,ppvExplorer) )
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __ID3DShaderCacheInstallerFactory_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* interface __MIDL_itf_d3dshadercacheregistration_0000_0006 */
|
||||
/* [local] */
|
||||
|
||||
DEFINE_GUID(IID_ID3DShaderCacheInstallerClient,0xa16ee930,0xd9f6,0x4222,0xa5,0x14,0x24,0x44,0x73,0xe5,0xd2,0x66);
|
||||
DEFINE_GUID(IID_ID3DShaderCacheComponent,0xeed1bf00,0xf5c7,0x4cf7,0x88,0x5c,0xd0,0xf9,0xc0,0xcb,0x48,0x28);
|
||||
DEFINE_GUID(IID_ID3DShaderCacheApplication,0xfc688ee2,0x1b35,0x4913,0x93,0xbe,0x1c,0xa3,0xfa,0x7d,0xf3,0x9e);
|
||||
DEFINE_GUID(IID_ID3DShaderCacheInstaller,0xbbe30de1,0x6318,0x4526,0xae,0x17,0x77,0x66,0x93,0x19,0x1b,0xb4);
|
||||
DEFINE_GUID(IID_ID3DShaderCacheExplorer,0x90432322,0x32f5,0x487f,0x92,0x64,0xe9,0x39,0x0f,0xa5,0x8b,0x2a);
|
||||
DEFINE_GUID(IID_ID3DShaderCacheInstallerFactory,0x09b2dfe4,0x840f,0x401a,0x80,0x4c,0x0d,0xd8,0xaa,0xdc,0x9e,0x9f);
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0006_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_d3dshadercacheregistration_0000_0006_v0_0_s_ifspec;
|
||||
|
||||
/* Additional Prototypes for ALL interfaces */
|
||||
|
||||
/* end of Additional Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/*-------------------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) Microsoft Corporation
|
||||
* Licensed under the MIT license
|
||||
*
|
||||
*-------------------------------------------------------------------------------------*/
|
||||
#pragma once
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
|
||||
cpp_quote("DEFINE_GUID(CLSID_D3DShaderCacheInstallerFactory, 0x16195a0b, 0x607c, 0x41f1, 0xbf, 0x03, 0xc7, 0x69, 0x4d, 0x60, 0xa8, 0xd4);")
|
||||
|
||||
typedef enum D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE
|
||||
{
|
||||
D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE_USER,
|
||||
D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE_SYSTEM
|
||||
} D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE;
|
||||
|
||||
interface ID3DShaderCacheInstaller;
|
||||
|
||||
// This interface is implemented by the game installer
|
||||
[uuid(a16ee930-d9f6-4222-a514-244473e5d266), object, local, pointer_default(unique)]
|
||||
interface ID3DShaderCacheInstallerClient
|
||||
{
|
||||
HRESULT GetInstallerName(
|
||||
[annotation("_Inout_")] SIZE_T* pNameLength,
|
||||
[annotation("_Out_writes_opt_(*pNameLength)")] wchar_t* pName);
|
||||
|
||||
D3D_SHADER_CACHE_APP_REGISTRATION_SCOPE GetInstallerScope();
|
||||
|
||||
HRESULT HandleDriverUpdate(
|
||||
[annotation("_In_")] ID3DShaderCacheInstaller* pInstaller);
|
||||
};
|
||||
|
||||
typedef struct D3D_SHADER_CACHE_PSDB_PROPERTIES
|
||||
{
|
||||
const wchar_t* pAdapterFamily;
|
||||
const wchar_t* pPsdbPath;
|
||||
} D3D_SHADER_CACHE_PSDB_PROPERTIES;
|
||||
|
||||
[uuid(eed1bf00-f5c7-4cf7-885c-d0f9c0cb4828), object, local, pointer_default(unique)]
|
||||
interface ID3DShaderCacheComponent : IUnknown
|
||||
{
|
||||
HRESULT GetComponentName(
|
||||
[annotation("_Out_")] const wchar_t** pName);
|
||||
|
||||
HRESULT GetStateObjectDatabasePath(
|
||||
[annotation("_Out_")] const wchar_t** pPath);
|
||||
|
||||
HRESULT GetPrecompiledCachePath(
|
||||
[annotation("_In_")] const wchar_t* pAdapterFamily,
|
||||
[annotation("_Inout_")] const wchar_t** pPath);
|
||||
|
||||
UINT GetPrecompiledShaderDatabaseCount();
|
||||
|
||||
HRESULT GetPrecompiledShaderDatabases(
|
||||
UINT ArraySize,
|
||||
[annotation("_Out_writes_(ArraySize)")] D3D_SHADER_CACHE_PSDB_PROPERTIES * pPSDBs);
|
||||
};
|
||||
|
||||
typedef enum D3D_SHADER_CACHE_TARGET_FLAGS
|
||||
{
|
||||
D3D_SHADER_CACHE_TARGET_FLAG_NONE = 0,
|
||||
}D3D_SHADER_CACHE_TARGET_FLAGS;
|
||||
cpp_quote("DEFINE_ENUM_FLAG_OPERATORS( D3D_SHADER_CACHE_TARGET_FLAGS )")
|
||||
|
||||
typedef union D3D_VERSION_NUMBER
|
||||
{
|
||||
UINT64 Version;
|
||||
UINT16 VersionParts[4];
|
||||
} D3D_VERSION_NUMBER;
|
||||
|
||||
typedef struct D3D_SHADER_CACHE_COMPILER_PROPERTIES
|
||||
{
|
||||
wchar_t szAdapterFamily[128];
|
||||
UINT64 MinimumABISupportVersion;
|
||||
UINT64 MaximumABISupportVersion;
|
||||
D3D_VERSION_NUMBER CompilerVersion;
|
||||
D3D_VERSION_NUMBER ApplicationProfileVersion;
|
||||
} D3D_SHADER_CACHE_COMPILER_PROPERTIES;
|
||||
|
||||
typedef struct D3D_SHADER_CACHE_APPLICATION_DESC
|
||||
{
|
||||
const wchar_t* pExeFilename;
|
||||
const wchar_t* pName;
|
||||
D3D_VERSION_NUMBER Version;
|
||||
const wchar_t* pEngineName;
|
||||
D3D_VERSION_NUMBER EngineVersion;
|
||||
} D3D_SHADER_CACHE_APPLICATION_DESC;
|
||||
|
||||
[uuid(fc688ee2-1b35-4913-93be-1ca3fa7df39e), object, local, pointer_default(unique)]
|
||||
interface ID3DShaderCacheApplication : IUnknown
|
||||
{
|
||||
HRESULT GetExePath(
|
||||
[annotation("_Out_")] const wchar_t** pExePath);
|
||||
|
||||
HRESULT GetDesc(
|
||||
[annotation("_Out_")] D3D_SHADER_CACHE_APPLICATION_DESC* pApplicationDesc);
|
||||
|
||||
HRESULT RegisterComponent(
|
||||
[annotation("_In_")] const wchar_t* pName,
|
||||
[annotation("_In_")] const wchar_t* pStateObjectDBPath,
|
||||
[annotation("_In_")] UINT NumPSDB,
|
||||
[annotation("_In_reads_(NumPSDB)")] const D3D_SHADER_CACHE_PSDB_PROPERTIES* pPSDBs,
|
||||
[in] REFIID riid,
|
||||
[out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvComponent);
|
||||
|
||||
HRESULT RemoveComponent(
|
||||
[annotation("_In_")] ID3DShaderCacheComponent* pComponent);
|
||||
|
||||
UINT GetComponentCount();
|
||||
|
||||
HRESULT GetComponent(
|
||||
[annotation("_In_")] UINT index,
|
||||
[in] REFIID riid,
|
||||
[out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvComponent);
|
||||
|
||||
UINT GetPrecompileTargetCount(D3D_SHADER_CACHE_TARGET_FLAGS flags);
|
||||
|
||||
HRESULT GetPrecompileTargets(
|
||||
[annotation("_In_")] UINT ArraySize,
|
||||
[annotation("_In_reads_(ArraySize)")] D3D_SHADER_CACHE_COMPILER_PROPERTIES* pArray,
|
||||
D3D_SHADER_CACHE_TARGET_FLAGS flags);
|
||||
|
||||
HRESULT GetInstallerName(
|
||||
[annotation("_Out_")] const wchar_t** pInstallerName);
|
||||
};
|
||||
|
||||
typedef struct SC_HANDLE__ *SC_HANDLE;
|
||||
[uuid(bbe30de1-6318-4526-ae17-776693191bb4), object, local, pointer_default(unique)]
|
||||
interface ID3DShaderCacheInstaller : IUnknown
|
||||
{
|
||||
HRESULT RegisterDriverUpdateListener();
|
||||
HRESULT UnregisterDriverUpdateListener();
|
||||
|
||||
HRESULT RegisterServiceDriverUpdateTrigger(SC_HANDLE hServiceHandle);
|
||||
HRESULT UnregisterServiceDriverUpdateTrigger(SC_HANDLE hServiceHandle);
|
||||
|
||||
HRESULT RegisterApplication(
|
||||
[annotation("_In_")] const wchar_t* pExePath,
|
||||
[annotation("_In_")] const D3D_SHADER_CACHE_APPLICATION_DESC* pApplicationDesc,
|
||||
[in] REFIID riid,
|
||||
[out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvApp); // Expected: ID3DShaderCacheApplication
|
||||
|
||||
HRESULT RemoveApplication(
|
||||
[annotation("_In_")] ID3DShaderCacheApplication* pApplication); // Expected: ID3DShaderCacheApplication
|
||||
|
||||
UINT GetApplicationCount();
|
||||
|
||||
HRESULT GetApplication(
|
||||
[annotation("_In_")] UINT index,
|
||||
[in] REFIID riid,
|
||||
[out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvApp); // Expected: ID3DShaderCacheApplication
|
||||
|
||||
HRESULT ClearAllState();
|
||||
|
||||
UINT GetMaxPrecompileTargetCount();
|
||||
|
||||
HRESULT GetPrecompileTargets(
|
||||
[annotation("_In_opt_")] const D3D_SHADER_CACHE_APPLICATION_DESC* pApplicationDesc,
|
||||
[annotation("_Inout_")] UINT* pArraySize,
|
||||
[annotation("_Out_writes_(*pArraySize)")] D3D_SHADER_CACHE_COMPILER_PROPERTIES* pArray,
|
||||
D3D_SHADER_CACHE_TARGET_FLAGS flags);
|
||||
};
|
||||
|
||||
[uuid(90432322-32f5-487f-9264-e9390fa58b2a), object, local, pointer_default(unique)]
|
||||
interface ID3DShaderCacheExplorer : IUnknown
|
||||
{
|
||||
HRESULT GetApplicationFromExePath(
|
||||
[annotation("_In_")] const wchar_t* pFullExePath,
|
||||
[in] REFIID riid,
|
||||
[out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvApp); // Expected: ID3DShaderCacheApplication
|
||||
};
|
||||
|
||||
[uuid(09b2dfe4-840f-401a-804c-0dd8aadc9e9f), object, local, pointer_default(unique)]
|
||||
interface ID3DShaderCacheInstallerFactory : IUnknown
|
||||
{
|
||||
HRESULT CreateInstaller(
|
||||
[annotation("_In_")] ID3DShaderCacheInstallerClient* pClient,
|
||||
[in] REFIID riid,
|
||||
[out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvInstaller);
|
||||
|
||||
HRESULT CreateExplorer(
|
||||
[in] IUnknown* pUnknown, // Expected: ID3D12Device, IDXCoreAdapter, IDXGIAdapter
|
||||
[in] REFIID riid,
|
||||
[out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvExplorer); // Expected: ID3DShaderCacheExplorer
|
||||
};
|
||||
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3DShaderCacheInstallerClient,0xa16ee930,0xd9f6,0x4222,0xa5,0x14,0x24,0x44,0x73,0xe5,0xd2,0x66);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3DShaderCacheComponent,0xeed1bf00,0xf5c7,0x4cf7,0x88,0x5c,0xd0,0xf9,0xc0,0xcb,0x48,0x28);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3DShaderCacheApplication,0xfc688ee2,0x1b35,0x4913,0x93,0xbe,0x1c,0xa3,0xfa,0x7d,0xf3,0x9e);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3DShaderCacheInstaller,0xbbe30de1,0x6318,0x4526,0xae,0x17,0x77,0x66,0x93,0x19,0x1b,0xb4);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3DShaderCacheExplorer,0x90432322,0x32f5,0x487f,0x92,0x64,0xe9,0x39,0x0f,0xa5,0x8b,0x2a);" )
|
||||
cpp_quote( "DEFINE_GUID(IID_ID3DShaderCacheInstallerFactory,0x09b2dfe4,0x840f,0x401a,0x80,0x4c,0x0d,0xd8,0xaa,0xdc,0x9e,0x9f);" )
|
||||
@@ -0,0 +1,34 @@
|
||||
//*********************************************************
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License (MIT).
|
||||
//
|
||||
//*********************************************************
|
||||
|
||||
#ifndef __D3DX12_H__
|
||||
#define __D3DX12_H__
|
||||
|
||||
#include "d3d12.h"
|
||||
|
||||
#if defined( __cplusplus )
|
||||
|
||||
#include "d3dx12_barriers.h"
|
||||
#include "d3dx12_core.h"
|
||||
#include "d3dx12_default.h"
|
||||
#include "d3dx12_pipeline_state_stream.h"
|
||||
#include "d3dx12_render_pass.h"
|
||||
#include "d3dx12_resource_helpers.h"
|
||||
#include "d3dx12_root_signature.h"
|
||||
#include "d3dx12_property_format_table.h"
|
||||
|
||||
#ifndef D3DX12_NO_STATE_OBJECT_HELPERS
|
||||
#include "d3dx12_state_object.h"
|
||||
#endif // !D3DX12_NO_STATE_OBJECT_HELPERS
|
||||
|
||||
#ifndef D3DX12_NO_CHECK_FEATURE_SUPPORT_CLASS
|
||||
#include "d3dx12_check_feature_support.h"
|
||||
#endif // !D3DX12_NO_CHECK_FEATURE_SUPPORT_CLASS
|
||||
|
||||
#endif // defined( __cplusplus )
|
||||
|
||||
#endif //__D3DX12_H__
|
||||
@@ -0,0 +1,192 @@
|
||||
//*********************************************************
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License (MIT).
|
||||
//
|
||||
//*********************************************************
|
||||
|
||||
#ifndef __D3DX12_BARRIERS_H__
|
||||
#define __D3DX12_BARRIERS_H__
|
||||
|
||||
#if defined( __cplusplus )
|
||||
|
||||
#include "d3d12.h"
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
struct CD3DX12_RESOURCE_BARRIER : public D3D12_RESOURCE_BARRIER
|
||||
{
|
||||
CD3DX12_RESOURCE_BARRIER() = default;
|
||||
explicit CD3DX12_RESOURCE_BARRIER(const D3D12_RESOURCE_BARRIER &o) noexcept :
|
||||
D3D12_RESOURCE_BARRIER(o)
|
||||
{}
|
||||
static inline CD3DX12_RESOURCE_BARRIER Transition(
|
||||
_In_ ID3D12Resource* pResource,
|
||||
D3D12_RESOURCE_STATES stateBefore,
|
||||
D3D12_RESOURCE_STATES stateAfter,
|
||||
UINT subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES,
|
||||
D3D12_RESOURCE_BARRIER_FLAGS flags = D3D12_RESOURCE_BARRIER_FLAG_NONE) noexcept
|
||||
{
|
||||
CD3DX12_RESOURCE_BARRIER result = {};
|
||||
D3D12_RESOURCE_BARRIER &barrier = result;
|
||||
result.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
|
||||
result.Flags = flags;
|
||||
barrier.Transition.pResource = pResource;
|
||||
barrier.Transition.StateBefore = stateBefore;
|
||||
barrier.Transition.StateAfter = stateAfter;
|
||||
barrier.Transition.Subresource = subresource;
|
||||
return result;
|
||||
}
|
||||
static inline CD3DX12_RESOURCE_BARRIER Aliasing(
|
||||
_In_opt_ ID3D12Resource* pResourceBefore,
|
||||
_In_opt_ ID3D12Resource* pResourceAfter) noexcept
|
||||
{
|
||||
CD3DX12_RESOURCE_BARRIER result = {};
|
||||
D3D12_RESOURCE_BARRIER &barrier = result;
|
||||
result.Type = D3D12_RESOURCE_BARRIER_TYPE_ALIASING;
|
||||
barrier.Aliasing.pResourceBefore = pResourceBefore;
|
||||
barrier.Aliasing.pResourceAfter = pResourceAfter;
|
||||
return result;
|
||||
}
|
||||
static inline CD3DX12_RESOURCE_BARRIER UAV(
|
||||
_In_opt_ ID3D12Resource* pResource) noexcept
|
||||
{
|
||||
CD3DX12_RESOURCE_BARRIER result = {};
|
||||
D3D12_RESOURCE_BARRIER &barrier = result;
|
||||
result.Type = D3D12_RESOURCE_BARRIER_TYPE_UAV;
|
||||
barrier.UAV.pResource = pResource;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 608)
|
||||
|
||||
//================================================================================================
|
||||
// D3DX12 Enhanced Barrier Helpers
|
||||
//================================================================================================
|
||||
|
||||
class CD3DX12_BARRIER_SUBRESOURCE_RANGE : public D3D12_BARRIER_SUBRESOURCE_RANGE
|
||||
{
|
||||
public:
|
||||
CD3DX12_BARRIER_SUBRESOURCE_RANGE() = default;
|
||||
CD3DX12_BARRIER_SUBRESOURCE_RANGE(const D3D12_BARRIER_SUBRESOURCE_RANGE &o) noexcept :
|
||||
D3D12_BARRIER_SUBRESOURCE_RANGE(o)
|
||||
{}
|
||||
explicit CD3DX12_BARRIER_SUBRESOURCE_RANGE(UINT Subresource) noexcept :
|
||||
D3D12_BARRIER_SUBRESOURCE_RANGE{ Subresource, 0, 0, 0, 0, 0 }
|
||||
{}
|
||||
CD3DX12_BARRIER_SUBRESOURCE_RANGE(
|
||||
UINT firstMipLevel,
|
||||
UINT numMips,
|
||||
UINT firstArraySlice,
|
||||
UINT numArraySlices,
|
||||
UINT firstPlane = 0,
|
||||
UINT numPlanes = 1) noexcept :
|
||||
D3D12_BARRIER_SUBRESOURCE_RANGE
|
||||
{
|
||||
firstMipLevel,
|
||||
numMips,
|
||||
firstArraySlice,
|
||||
numArraySlices,
|
||||
firstPlane,
|
||||
numPlanes
|
||||
}
|
||||
{}
|
||||
};
|
||||
|
||||
class CD3DX12_GLOBAL_BARRIER : public D3D12_GLOBAL_BARRIER
|
||||
{
|
||||
public:
|
||||
CD3DX12_GLOBAL_BARRIER() = default;
|
||||
CD3DX12_GLOBAL_BARRIER(const D3D12_GLOBAL_BARRIER &o) noexcept : D3D12_GLOBAL_BARRIER(o){}
|
||||
CD3DX12_GLOBAL_BARRIER(
|
||||
D3D12_BARRIER_SYNC syncBefore,
|
||||
D3D12_BARRIER_SYNC syncAfter,
|
||||
D3D12_BARRIER_ACCESS accessBefore,
|
||||
D3D12_BARRIER_ACCESS accessAfter) noexcept : D3D12_GLOBAL_BARRIER {
|
||||
syncBefore,
|
||||
syncAfter,
|
||||
accessBefore,
|
||||
accessAfter
|
||||
}
|
||||
{}
|
||||
};
|
||||
|
||||
class CD3DX12_BUFFER_BARRIER : public D3D12_BUFFER_BARRIER
|
||||
{
|
||||
public:
|
||||
CD3DX12_BUFFER_BARRIER() = default;
|
||||
CD3DX12_BUFFER_BARRIER(const D3D12_BUFFER_BARRIER &o) noexcept : D3D12_BUFFER_BARRIER(o){}
|
||||
CD3DX12_BUFFER_BARRIER(
|
||||
D3D12_BARRIER_SYNC syncBefore,
|
||||
D3D12_BARRIER_SYNC syncAfter,
|
||||
D3D12_BARRIER_ACCESS accessBefore,
|
||||
D3D12_BARRIER_ACCESS accessAfter,
|
||||
ID3D12Resource *pRes) noexcept : D3D12_BUFFER_BARRIER {
|
||||
syncBefore,
|
||||
syncAfter,
|
||||
accessBefore,
|
||||
accessAfter,
|
||||
pRes,
|
||||
0, ULLONG_MAX
|
||||
}
|
||||
{}
|
||||
};
|
||||
|
||||
class CD3DX12_TEXTURE_BARRIER : public D3D12_TEXTURE_BARRIER
|
||||
{
|
||||
public:
|
||||
CD3DX12_TEXTURE_BARRIER() = default;
|
||||
CD3DX12_TEXTURE_BARRIER(const D3D12_TEXTURE_BARRIER &o) noexcept : D3D12_TEXTURE_BARRIER(o){}
|
||||
CD3DX12_TEXTURE_BARRIER(
|
||||
D3D12_BARRIER_SYNC syncBefore,
|
||||
D3D12_BARRIER_SYNC syncAfter,
|
||||
D3D12_BARRIER_ACCESS accessBefore,
|
||||
D3D12_BARRIER_ACCESS accessAfter,
|
||||
D3D12_BARRIER_LAYOUT layoutBefore,
|
||||
D3D12_BARRIER_LAYOUT layoutAfter,
|
||||
ID3D12Resource *pRes,
|
||||
const D3D12_BARRIER_SUBRESOURCE_RANGE &subresources,
|
||||
D3D12_TEXTURE_BARRIER_FLAGS flag = D3D12_TEXTURE_BARRIER_FLAG_NONE) noexcept : D3D12_TEXTURE_BARRIER {
|
||||
syncBefore,
|
||||
syncAfter,
|
||||
accessBefore,
|
||||
accessAfter,
|
||||
layoutBefore,
|
||||
layoutAfter,
|
||||
pRes,
|
||||
subresources,
|
||||
flag
|
||||
}
|
||||
{}
|
||||
};
|
||||
|
||||
class CD3DX12_BARRIER_GROUP : public D3D12_BARRIER_GROUP
|
||||
{
|
||||
public:
|
||||
CD3DX12_BARRIER_GROUP() = default;
|
||||
CD3DX12_BARRIER_GROUP(const D3D12_BARRIER_GROUP &o) noexcept : D3D12_BARRIER_GROUP(o){}
|
||||
CD3DX12_BARRIER_GROUP(UINT32 numBarriers, const D3D12_BUFFER_BARRIER *pBarriers) noexcept
|
||||
{
|
||||
Type = D3D12_BARRIER_TYPE_BUFFER;
|
||||
NumBarriers = numBarriers;
|
||||
pBufferBarriers = pBarriers;
|
||||
}
|
||||
CD3DX12_BARRIER_GROUP(UINT32 numBarriers, const D3D12_TEXTURE_BARRIER *pBarriers) noexcept
|
||||
{
|
||||
Type = D3D12_BARRIER_TYPE_TEXTURE;
|
||||
NumBarriers = numBarriers;
|
||||
pTextureBarriers = pBarriers;
|
||||
}
|
||||
CD3DX12_BARRIER_GROUP(UINT32 numBarriers, const D3D12_GLOBAL_BARRIER *pBarriers) noexcept
|
||||
{
|
||||
Type = D3D12_BARRIER_TYPE_GLOBAL;
|
||||
NumBarriers = numBarriers;
|
||||
pGlobalBarriers = pBarriers;
|
||||
}
|
||||
};
|
||||
#endif // D3D12_SDK_VERSION >= 608
|
||||
|
||||
|
||||
#endif // defined( __cplusplus )
|
||||
|
||||
#endif // __D3DX12_BARRIERS_H__
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
//*********************************************************
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License (MIT).
|
||||
//
|
||||
//*********************************************************
|
||||
|
||||
#pragma once
|
||||
|
||||
struct CD3DX12_DEFAULT {};
|
||||
extern const DECLSPEC_SELECTANY CD3DX12_DEFAULT D3D12_DEFAULT;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,128 @@
|
||||
//*********************************************************
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License (MIT).
|
||||
//
|
||||
//*********************************************************
|
||||
#ifndef __D3D12_PROPERTY_LAYOUT_FORMAT_TABLE_H__
|
||||
#define __D3D12_PROPERTY_LAYOUT_FORMAT_TABLE_H__
|
||||
#include "d3d12.h"
|
||||
#define MAP_ALIGN_REQUIREMENT 16 // Map is required to return 16-byte aligned addresses
|
||||
|
||||
struct D3D12_PROPERTY_LAYOUT_FORMAT_TABLE
|
||||
{
|
||||
public:
|
||||
// ----------------------------------------------------------------------------
|
||||
// Information describing everything about a D3D Resource Format
|
||||
// ----------------------------------------------------------------------------
|
||||
typedef struct FORMAT_DETAIL
|
||||
{
|
||||
DXGI_FORMAT DXGIFormat;
|
||||
DXGI_FORMAT ParentFormat;
|
||||
const DXGI_FORMAT* pDefaultFormatCastSet; // This is dependent on FL/driver version, but is here to save a lot of space
|
||||
UINT8 BitsPerComponent[4]; // only used for D3DFTL_PARTIAL_TYPE or FULL_TYPE
|
||||
UINT8 BitsPerUnit;
|
||||
BYTE SRGBFormat : 1;
|
||||
UINT WidthAlignment : 4; // number of texels to align to in a mip level.
|
||||
UINT HeightAlignment : 4; // Top level dimensions must be a multiple of these
|
||||
UINT DepthAlignment : 1; // values.
|
||||
D3D_FORMAT_LAYOUT Layout : 1;
|
||||
D3D_FORMAT_TYPE_LEVEL TypeLevel : 2;
|
||||
D3D_FORMAT_COMPONENT_NAME ComponentName0 : 3; // RED ... only used for D3DFTL_PARTIAL_TYPE or FULL_TYPE
|
||||
D3D_FORMAT_COMPONENT_NAME ComponentName1 : 3; // GREEN ... only used for D3DFTL_PARTIAL_TYPE or FULL_TYPE
|
||||
D3D_FORMAT_COMPONENT_NAME ComponentName2 : 3; // BLUE ... only used for D3DFTL_PARTIAL_TYPE or FULL_TYPE
|
||||
D3D_FORMAT_COMPONENT_NAME ComponentName3 : 3; // ALPHA ... only used for D3DFTL_PARTIAL_TYPE or FULL_TYPE
|
||||
D3D_FORMAT_COMPONENT_INTERPRETATION ComponentInterpretation0 : 3; // only used for D3DFTL_FULL_TYPE
|
||||
D3D_FORMAT_COMPONENT_INTERPRETATION ComponentInterpretation1 : 3; // only used for D3DFTL_FULL_TYPE
|
||||
D3D_FORMAT_COMPONENT_INTERPRETATION ComponentInterpretation2 : 3; // only used for D3DFTL_FULL_TYPE
|
||||
D3D_FORMAT_COMPONENT_INTERPRETATION ComponentInterpretation3 : 3; // only used for D3DFTL_FULL_TYPE
|
||||
bool bDX9VertexOrIndexFormat : 1;
|
||||
bool bDX9TextureFormat : 1;
|
||||
bool bFloatNormFormat : 1;
|
||||
bool bPlanar : 1;
|
||||
bool bYUV : 1;
|
||||
bool bDependantFormatCastSet : 1; // This indicates that the format cast set is dependent on FL/driver version
|
||||
bool bInternal : 1;
|
||||
} FORMAT_DETAIL;
|
||||
|
||||
private:
|
||||
static const FORMAT_DETAIL s_FormatDetail[];
|
||||
static const UINT s_NumFormats;
|
||||
static const LPCSTR s_FormatNames[]; // separate from above structure so it can be compiled out of runtime.
|
||||
public:
|
||||
static UINT GetNumFormats();
|
||||
static const FORMAT_DETAIL* GetFormatTable();
|
||||
static D3D_FEATURE_LEVEL GetHighestDefinedFeatureLevel();
|
||||
|
||||
static DXGI_FORMAT GetFormat (SIZE_T Index);
|
||||
static bool FormatExists (DXGI_FORMAT Format);
|
||||
static bool FormatExistsInHeader (DXGI_FORMAT Format, bool bExternalHeader = true);
|
||||
static UINT GetByteAlignment (DXGI_FORMAT Format);
|
||||
static bool IsBlockCompressFormat (DXGI_FORMAT Format);
|
||||
static LPCSTR GetName (DXGI_FORMAT Format, bool bHideInternalFormats = true);
|
||||
static bool IsSRGBFormat (DXGI_FORMAT Format);
|
||||
static UINT GetBitsPerStencil (DXGI_FORMAT Format);
|
||||
static UINT GetBitsPerDepth (DXGI_FORMAT Format);
|
||||
static void GetFormatReturnTypes (DXGI_FORMAT Format, D3D_FORMAT_COMPONENT_INTERPRETATION* pInterpretations); // return array of 4 components
|
||||
static UINT GetNumComponentsInFormat(DXGI_FORMAT Format);
|
||||
static UINT GetMinNumComponentsInFormats(DXGI_FORMAT FormatA, DXGI_FORMAT FormatB);
|
||||
|
||||
// Converts the sequential component index (range from 0 to GetNumComponentsInFormat()) to
|
||||
// the absolute component index (range 0 to 3).
|
||||
static UINT Sequential2AbsoluteComponentIndex (DXGI_FORMAT Format, UINT SequentialComponentIndex);
|
||||
static bool CanBeCastEvenFullyTyped (DXGI_FORMAT Format, D3D_FEATURE_LEVEL fl);
|
||||
static UINT8 GetAddressingBitsPerAlignedSize (DXGI_FORMAT Format);
|
||||
static DXGI_FORMAT GetParentFormat (DXGI_FORMAT Format);
|
||||
static const DXGI_FORMAT* GetFormatCastSet (DXGI_FORMAT Format);
|
||||
static D3D_FORMAT_LAYOUT GetLayout (DXGI_FORMAT Format);
|
||||
static D3D_FORMAT_TYPE_LEVEL GetTypeLevel (DXGI_FORMAT Format);
|
||||
static UINT GetBitsPerUnit (DXGI_FORMAT Format);
|
||||
static UINT GetBitsPerUnitThrow (DXGI_FORMAT Format);
|
||||
static UINT GetBitsPerElement (DXGI_FORMAT Format); // Legacy function used to support D3D10on9 only. Do not use.
|
||||
static UINT GetWidthAlignment (DXGI_FORMAT Format);
|
||||
static UINT GetHeightAlignment (DXGI_FORMAT Format);
|
||||
static UINT GetDepthAlignment (DXGI_FORMAT Format);
|
||||
static BOOL Planar (DXGI_FORMAT Format);
|
||||
static BOOL NonOpaquePlanar (DXGI_FORMAT Format);
|
||||
static BOOL YUV (DXGI_FORMAT Format);
|
||||
static BOOL Opaque (DXGI_FORMAT Format);
|
||||
static bool FamilySupportsStencil (DXGI_FORMAT Format);
|
||||
static UINT NonOpaquePlaneCount (DXGI_FORMAT Format);
|
||||
static BOOL DX9VertexOrIndexFormat (DXGI_FORMAT Format);
|
||||
static BOOL DX9TextureFormat (DXGI_FORMAT Format);
|
||||
static BOOL FloatNormTextureFormat (DXGI_FORMAT Format);
|
||||
static bool DepthOnlyFormat (DXGI_FORMAT format);
|
||||
static UINT8 GetPlaneCount (DXGI_FORMAT Format);
|
||||
static bool MotionEstimatorAllowedInputFormat (DXGI_FORMAT Format);
|
||||
static bool SupportsSamplerFeedback (DXGI_FORMAT Format);
|
||||
static bool DecodeHistogramAllowedForOutputFormatSupport(DXGI_FORMAT Format);
|
||||
static UINT8 GetPlaneSliceFromViewFormat (DXGI_FORMAT ResourceFormat, DXGI_FORMAT ViewFormat);
|
||||
static bool FloatAndNotFloatFormats (DXGI_FORMAT FormatA, DXGI_FORMAT FormatB);
|
||||
static bool SNORMAndUNORMFormats (DXGI_FORMAT FormatA, DXGI_FORMAT FormatB);
|
||||
static bool ValidCastToR32UAV (DXGI_FORMAT from, DXGI_FORMAT to);
|
||||
static bool IsSupportedTextureDisplayableFormat (DXGI_FORMAT, bool bMediaFormatOnly);
|
||||
static D3D_FORMAT_COMPONENT_INTERPRETATION GetFormatComponentInterpretation (DXGI_FORMAT Format, UINT AbsoluteComponentIndex);
|
||||
static UINT GetBitsPerComponent (DXGI_FORMAT Format, UINT AbsoluteComponentIndex);
|
||||
static D3D_FORMAT_COMPONENT_NAME GetComponentName (DXGI_FORMAT Format, UINT AbsoluteComponentIndex);
|
||||
static HRESULT CalculateExtraPlanarRows (DXGI_FORMAT format, UINT plane0Height, _Out_ UINT& totalHeight);
|
||||
static HRESULT CalculateMinimumRowMajorRowPitch (DXGI_FORMAT Format, UINT Width, _Out_ UINT& RowPitch);
|
||||
static HRESULT CalculateMinimumRowMajorSlicePitch (DXGI_FORMAT Format, UINT ContextBasedRowPitch, UINT Height, _Out_ UINT& SlicePitch);
|
||||
static void GetYCbCrChromaSubsampling (DXGI_FORMAT Format, _Out_ UINT& HorizontalSubsampling, _Out_ UINT& VerticalSubsampling);
|
||||
|
||||
static HRESULT CalculateResourceSize (UINT width, UINT height, UINT depth, DXGI_FORMAT format, UINT mipLevels, UINT subresources, _Out_ SIZE_T& totalByteSize, _Out_writes_opt_(subresources) D3D12_MEMCPY_DEST* pDst = nullptr);
|
||||
static void GetTileShape (D3D12_TILE_SHAPE* pTileShape, DXGI_FORMAT Format, D3D12_RESOURCE_DIMENSION Dimension, UINT SampleCount);
|
||||
static void Get4KTileShape (D3D12_TILE_SHAPE* pTileShape, DXGI_FORMAT Format, D3D12_RESOURCE_DIMENSION Dimension, UINT SampleCount);
|
||||
static void GetMipDimensions (UINT8 mipSlice, _Inout_ UINT64* pWidth, _Inout_opt_ UINT64* pHeight = nullptr, _Inout_opt_ UINT64* pDepth = nullptr);
|
||||
static void GetPlaneSubsampledSizeAndFormatForCopyableLayout(UINT PlaneSlice, DXGI_FORMAT Format, UINT Width, UINT Height, _Out_ DXGI_FORMAT& PlaneFormat, _Out_ UINT& MinPlanePitchWidth, _Out_ UINT& PlaneWidth, _Out_ UINT& PlaneHeight);
|
||||
|
||||
static UINT GetDetailTableIndex (DXGI_FORMAT Format);
|
||||
static UINT GetDetailTableIndexNoThrow (DXGI_FORMAT Format);
|
||||
static UINT GetDetailTableIndexThrow (DXGI_FORMAT Format);
|
||||
static bool SupportsDepth (DXGI_FORMAT Format);
|
||||
static bool SupportsStencil (DXGI_FORMAT Format);
|
||||
private:
|
||||
static const FORMAT_DETAIL* GetFormatDetail (DXGI_FORMAT Format);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,105 @@
|
||||
//*********************************************************
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License (MIT).
|
||||
//
|
||||
//*********************************************************
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __cplusplus
|
||||
#error D3DX12 requires C++
|
||||
#endif
|
||||
|
||||
#include "d3d12.h"
|
||||
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
|
||||
inline bool operator==(const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& a, const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& b) noexcept
|
||||
{
|
||||
return ((a.AdditionalWidth == b.AdditionalWidth) && (a.AdditionalHeight == b.AdditionalHeight));
|
||||
}
|
||||
|
||||
inline bool operator==(const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& a, const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& b) noexcept
|
||||
{
|
||||
return ((a.AdditionalWidth == b.AdditionalWidth) && (a.AdditionalHeight == b.AdditionalHeight));
|
||||
}
|
||||
|
||||
inline bool operator==(const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& a, const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& b) noexcept
|
||||
{
|
||||
return ((a.AdditionalWidth == b.AdditionalWidth) && (a.AdditionalHeight == b.AdditionalHeight));
|
||||
}
|
||||
#endif
|
||||
|
||||
inline bool operator==( const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS &a, const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS &b) noexcept
|
||||
{
|
||||
return a.ClearValue == b.ClearValue;
|
||||
}
|
||||
|
||||
inline bool operator==( const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS &a, const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS &b) noexcept
|
||||
{
|
||||
if (a.pSrcResource != b.pSrcResource) return false;
|
||||
if (a.pDstResource != b.pDstResource) return false;
|
||||
if (a.SubresourceCount != b.SubresourceCount) return false;
|
||||
if (a.Format != b.Format) return false;
|
||||
if (a.ResolveMode != b.ResolveMode) return false;
|
||||
if (a.PreserveResolveSource != b.PreserveResolveSource) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool operator==( const D3D12_RENDER_PASS_BEGINNING_ACCESS &a, const D3D12_RENDER_PASS_BEGINNING_ACCESS &b) noexcept
|
||||
{
|
||||
if (a.Type != b.Type) return false;
|
||||
switch (a.Type)
|
||||
{
|
||||
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR:
|
||||
if (!(a.Clear == b.Clear)) return false;
|
||||
break;
|
||||
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
|
||||
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE_LOCAL_RENDER:
|
||||
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE_LOCAL_SRV:
|
||||
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE_LOCAL_UAV:
|
||||
if (!(a.PreserveLocal == b.PreserveLocal)) return false;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool operator==(const D3D12_RENDER_PASS_ENDING_ACCESS& a, const D3D12_RENDER_PASS_ENDING_ACCESS& b) noexcept
|
||||
{
|
||||
if (a.Type != b.Type) return false;
|
||||
switch (a.Type)
|
||||
{
|
||||
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE:
|
||||
if (!(a.Resolve == b.Resolve)) return false;
|
||||
break;
|
||||
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
|
||||
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_RENDER:
|
||||
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_SRV:
|
||||
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_UAV:
|
||||
if (!(a.PreserveLocal == b.PreserveLocal)) return false;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool operator==( const D3D12_RENDER_PASS_RENDER_TARGET_DESC &a, const D3D12_RENDER_PASS_RENDER_TARGET_DESC &b) noexcept
|
||||
{
|
||||
if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;
|
||||
if (!(a.BeginningAccess == b.BeginningAccess)) return false;
|
||||
if (!(a.EndingAccess == b.EndingAccess)) return false;
|
||||
return true;
|
||||
}
|
||||
inline bool operator==( const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &a, const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &b) noexcept
|
||||
{
|
||||
if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;
|
||||
if (!(a.DepthBeginningAccess == b.DepthBeginningAccess)) return false;
|
||||
if (!(a.StencilBeginningAccess == b.StencilBeginningAccess)) return false;
|
||||
if (!(a.DepthEndingAccess == b.DepthEndingAccess)) return false;
|
||||
if (!(a.StencilEndingAccess == b.StencilEndingAccess)) return false;
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,611 @@
|
||||
//*********************************************************
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License (MIT).
|
||||
//
|
||||
//*********************************************************
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __cplusplus
|
||||
#error D3DX12 requires C++
|
||||
#endif
|
||||
|
||||
#include "d3dx12_property_format_table.h"
|
||||
#include "d3d12.h"
|
||||
#include "d3dx12_core.h"
|
||||
//------------------------------------------------------------------------------------------------
|
||||
template <typename T, typename U, typename V>
|
||||
inline void D3D12DecomposeSubresource( UINT Subresource, UINT MipLevels, UINT ArraySize, _Out_ T& MipSlice, _Out_ U& ArraySlice, _Out_ V& PlaneSlice ) noexcept
|
||||
{
|
||||
MipSlice = static_cast<T>(Subresource % MipLevels);
|
||||
ArraySlice = static_cast<U>((Subresource / MipLevels) % ArraySize);
|
||||
PlaneSlice = static_cast<V>(Subresource / (MipLevels * ArraySize));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// Row-by-row memcpy
|
||||
inline void MemcpySubresource(
|
||||
_In_ const D3D12_MEMCPY_DEST* pDest,
|
||||
_In_ const D3D12_SUBRESOURCE_DATA* pSrc,
|
||||
SIZE_T RowSizeInBytes,
|
||||
UINT NumRows,
|
||||
UINT NumSlices) noexcept
|
||||
{
|
||||
for (UINT z = 0; z < NumSlices; ++z)
|
||||
{
|
||||
auto pDestSlice = static_cast<BYTE*>(pDest->pData) + pDest->SlicePitch * z;
|
||||
auto pSrcSlice = static_cast<const BYTE*>(pSrc->pData) + pSrc->SlicePitch * LONG_PTR(z);
|
||||
for (UINT y = 0; y < NumRows; ++y)
|
||||
{
|
||||
memcpy(pDestSlice + pDest->RowPitch * y,
|
||||
pSrcSlice + pSrc->RowPitch * LONG_PTR(y),
|
||||
RowSizeInBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// Row-by-row memcpy
|
||||
inline void MemcpySubresource(
|
||||
_In_ const D3D12_MEMCPY_DEST* pDest,
|
||||
_In_ const void* pResourceData,
|
||||
_In_ const D3D12_SUBRESOURCE_INFO* pSrc,
|
||||
SIZE_T RowSizeInBytes,
|
||||
UINT NumRows,
|
||||
UINT NumSlices) noexcept
|
||||
{
|
||||
for (UINT z = 0; z < NumSlices; ++z)
|
||||
{
|
||||
auto pDestSlice = static_cast<BYTE*>(pDest->pData) + pDest->SlicePitch * z;
|
||||
auto pSrcSlice = (static_cast<const BYTE*>(pResourceData) + pSrc->Offset) + pSrc->DepthPitch * ULONG_PTR(z);
|
||||
for (UINT y = 0; y < NumRows; ++y)
|
||||
{
|
||||
memcpy(pDestSlice + pDest->RowPitch * y,
|
||||
pSrcSlice + pSrc->RowPitch * ULONG_PTR(y),
|
||||
RowSizeInBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// Returns required size of a buffer to be used for data upload
|
||||
inline UINT64 GetRequiredIntermediateSize(
|
||||
_In_ ID3D12Resource* pDestinationResource,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources) noexcept
|
||||
{
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
const auto Desc = pDestinationResource->GetDesc();
|
||||
#else
|
||||
D3D12_RESOURCE_DESC tmpDesc;
|
||||
const auto& Desc = *pDestinationResource->GetDesc(&tmpDesc);
|
||||
#endif
|
||||
UINT64 RequiredSize = 0;
|
||||
|
||||
ID3D12Device* pDevice = nullptr;
|
||||
pDestinationResource->GetDevice(IID_ID3D12Device, reinterpret_cast<void**>(&pDevice));
|
||||
pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, 0, nullptr, nullptr, nullptr, &RequiredSize);
|
||||
pDevice->Release();
|
||||
|
||||
return RequiredSize;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// All arrays must be populated (e.g. by calling GetCopyableFootprints)
|
||||
inline UINT64 UpdateSubresources(
|
||||
_In_ ID3D12GraphicsCommandList* pCmdList,
|
||||
_In_ ID3D12Resource* pDestinationResource,
|
||||
_In_ ID3D12Resource* pIntermediate,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources,
|
||||
UINT64 RequiredSize,
|
||||
_In_reads_(NumSubresources) const D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts,
|
||||
_In_reads_(NumSubresources) const UINT* pNumRows,
|
||||
_In_reads_(NumSubresources) const UINT64* pRowSizesInBytes,
|
||||
_In_reads_(NumSubresources) const D3D12_SUBRESOURCE_DATA* pSrcData) noexcept
|
||||
{
|
||||
// Minor validation
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
const auto IntermediateDesc = pIntermediate->GetDesc();
|
||||
const auto DestinationDesc = pDestinationResource->GetDesc();
|
||||
#else
|
||||
D3D12_RESOURCE_DESC tmpDesc1, tmpDesc2;
|
||||
const auto& IntermediateDesc = *pIntermediate->GetDesc(&tmpDesc1);
|
||||
const auto& DestinationDesc = *pDestinationResource->GetDesc(&tmpDesc2);
|
||||
#endif
|
||||
if (IntermediateDesc.Dimension != D3D12_RESOURCE_DIMENSION_BUFFER ||
|
||||
IntermediateDesc.Width < RequiredSize + pLayouts[0].Offset ||
|
||||
RequiredSize > SIZE_T(-1) ||
|
||||
(DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER &&
|
||||
(FirstSubresource != 0 || NumSubresources != 1)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
BYTE* pData;
|
||||
HRESULT hr = pIntermediate->Map(0, nullptr, reinterpret_cast<void**>(&pData));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (UINT i = 0; i < NumSubresources; ++i)
|
||||
{
|
||||
if (pRowSizesInBytes[i] > SIZE_T(-1)) return 0;
|
||||
D3D12_MEMCPY_DEST DestData = { pData + pLayouts[i].Offset, pLayouts[i].Footprint.RowPitch, SIZE_T(pLayouts[i].Footprint.RowPitch) * SIZE_T(pNumRows[i]) };
|
||||
MemcpySubresource(&DestData, &pSrcData[i], static_cast<SIZE_T>(pRowSizesInBytes[i]), pNumRows[i], pLayouts[i].Footprint.Depth);
|
||||
}
|
||||
pIntermediate->Unmap(0, nullptr);
|
||||
|
||||
if (DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER)
|
||||
{
|
||||
pCmdList->CopyBufferRegion(
|
||||
pDestinationResource, 0, pIntermediate, pLayouts[0].Offset, pLayouts[0].Footprint.Width);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (UINT i = 0; i < NumSubresources; ++i)
|
||||
{
|
||||
const CD3DX12_TEXTURE_COPY_LOCATION Dst(pDestinationResource, i + FirstSubresource);
|
||||
const CD3DX12_TEXTURE_COPY_LOCATION Src(pIntermediate, pLayouts[i]);
|
||||
pCmdList->CopyTextureRegion(&Dst, 0, 0, 0, &Src, nullptr);
|
||||
}
|
||||
}
|
||||
return RequiredSize;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// All arrays must be populated (e.g. by calling GetCopyableFootprints)
|
||||
inline UINT64 UpdateSubresources(
|
||||
_In_ ID3D12GraphicsCommandList* pCmdList,
|
||||
_In_ ID3D12Resource* pDestinationResource,
|
||||
_In_ ID3D12Resource* pIntermediate,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources,
|
||||
UINT64 RequiredSize,
|
||||
_In_reads_(NumSubresources) const D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts,
|
||||
_In_reads_(NumSubresources) const UINT* pNumRows,
|
||||
_In_reads_(NumSubresources) const UINT64* pRowSizesInBytes,
|
||||
_In_ const void* pResourceData,
|
||||
_In_reads_(NumSubresources) const D3D12_SUBRESOURCE_INFO* pSrcData) noexcept
|
||||
{
|
||||
// Minor validation
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
const auto IntermediateDesc = pIntermediate->GetDesc();
|
||||
const auto DestinationDesc = pDestinationResource->GetDesc();
|
||||
#else
|
||||
D3D12_RESOURCE_DESC tmpDesc1, tmpDesc2;
|
||||
const auto& IntermediateDesc = *pIntermediate->GetDesc(&tmpDesc1);
|
||||
const auto& DestinationDesc = *pDestinationResource->GetDesc(&tmpDesc2);
|
||||
#endif
|
||||
if (IntermediateDesc.Dimension != D3D12_RESOURCE_DIMENSION_BUFFER ||
|
||||
IntermediateDesc.Width < RequiredSize + pLayouts[0].Offset ||
|
||||
RequiredSize > SIZE_T(-1) ||
|
||||
(DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER &&
|
||||
(FirstSubresource != 0 || NumSubresources != 1)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
BYTE* pData;
|
||||
HRESULT hr = pIntermediate->Map(0, nullptr, reinterpret_cast<void**>(&pData));
|
||||
if (FAILED(hr))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (UINT i = 0; i < NumSubresources; ++i)
|
||||
{
|
||||
if (pRowSizesInBytes[i] > SIZE_T(-1)) return 0;
|
||||
D3D12_MEMCPY_DEST DestData = { pData + pLayouts[i].Offset, pLayouts[i].Footprint.RowPitch, SIZE_T(pLayouts[i].Footprint.RowPitch) * SIZE_T(pNumRows[i]) };
|
||||
MemcpySubresource(&DestData, pResourceData, &pSrcData[i], static_cast<SIZE_T>(pRowSizesInBytes[i]), pNumRows[i], pLayouts[i].Footprint.Depth);
|
||||
}
|
||||
pIntermediate->Unmap(0, nullptr);
|
||||
|
||||
if (DestinationDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER)
|
||||
{
|
||||
pCmdList->CopyBufferRegion(
|
||||
pDestinationResource, 0, pIntermediate, pLayouts[0].Offset, pLayouts[0].Footprint.Width);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (UINT i = 0; i < NumSubresources; ++i)
|
||||
{
|
||||
const CD3DX12_TEXTURE_COPY_LOCATION Dst(pDestinationResource, i + FirstSubresource);
|
||||
const CD3DX12_TEXTURE_COPY_LOCATION Src(pIntermediate, pLayouts[i]);
|
||||
pCmdList->CopyTextureRegion(&Dst, 0, 0, 0, &Src, nullptr);
|
||||
}
|
||||
}
|
||||
return RequiredSize;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// Heap-allocating UpdateSubresources implementation
|
||||
inline UINT64 UpdateSubresources(
|
||||
_In_ ID3D12GraphicsCommandList* pCmdList,
|
||||
_In_ ID3D12Resource* pDestinationResource,
|
||||
_In_ ID3D12Resource* pIntermediate,
|
||||
UINT64 IntermediateOffset,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources,
|
||||
_In_reads_(NumSubresources) const D3D12_SUBRESOURCE_DATA* pSrcData) noexcept
|
||||
{
|
||||
UINT64 RequiredSize = 0;
|
||||
const auto MemToAlloc = static_cast<UINT64>(sizeof(D3D12_PLACED_SUBRESOURCE_FOOTPRINT) + sizeof(UINT) + sizeof(UINT64)) * NumSubresources;
|
||||
if (MemToAlloc > SIZE_MAX)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void* pMem = HeapAlloc(GetProcessHeap(), 0, static_cast<SIZE_T>(MemToAlloc));
|
||||
if (pMem == nullptr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
auto pLayouts = static_cast<D3D12_PLACED_SUBRESOURCE_FOOTPRINT*>(pMem);
|
||||
auto pRowSizesInBytes = reinterpret_cast<UINT64*>(pLayouts + NumSubresources);
|
||||
auto pNumRows = reinterpret_cast<UINT*>(pRowSizesInBytes + NumSubresources);
|
||||
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
const auto Desc = pDestinationResource->GetDesc();
|
||||
#else
|
||||
D3D12_RESOURCE_DESC tmpDesc;
|
||||
const auto& Desc = *pDestinationResource->GetDesc(&tmpDesc);
|
||||
#endif
|
||||
ID3D12Device* pDevice = nullptr;
|
||||
pDestinationResource->GetDevice(IID_ID3D12Device, reinterpret_cast<void**>(&pDevice));
|
||||
pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, IntermediateOffset, pLayouts, pNumRows, pRowSizesInBytes, &RequiredSize);
|
||||
pDevice->Release();
|
||||
|
||||
const UINT64 Result = UpdateSubresources(pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, pLayouts, pNumRows, pRowSizesInBytes, pSrcData);
|
||||
HeapFree(GetProcessHeap(), 0, pMem);
|
||||
return Result;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// Heap-allocating UpdateSubresources implementation
|
||||
inline UINT64 UpdateSubresources(
|
||||
_In_ ID3D12GraphicsCommandList* pCmdList,
|
||||
_In_ ID3D12Resource* pDestinationResource,
|
||||
_In_ ID3D12Resource* pIntermediate,
|
||||
UINT64 IntermediateOffset,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
|
||||
_In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources,
|
||||
_In_ const void* pResourceData,
|
||||
_In_reads_(NumSubresources) const D3D12_SUBRESOURCE_INFO* pSrcData) noexcept
|
||||
{
|
||||
UINT64 RequiredSize = 0;
|
||||
const auto MemToAlloc = static_cast<UINT64>(sizeof(D3D12_PLACED_SUBRESOURCE_FOOTPRINT) + sizeof(UINT) + sizeof(UINT64)) * NumSubresources;
|
||||
if (MemToAlloc > SIZE_MAX)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void* pMem = HeapAlloc(GetProcessHeap(), 0, static_cast<SIZE_T>(MemToAlloc));
|
||||
if (pMem == nullptr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
auto pLayouts = static_cast<D3D12_PLACED_SUBRESOURCE_FOOTPRINT*>(pMem);
|
||||
auto pRowSizesInBytes = reinterpret_cast<UINT64*>(pLayouts + NumSubresources);
|
||||
auto pNumRows = reinterpret_cast<UINT*>(pRowSizesInBytes + NumSubresources);
|
||||
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
const auto Desc = pDestinationResource->GetDesc();
|
||||
#else
|
||||
D3D12_RESOURCE_DESC tmpDesc;
|
||||
const auto& Desc = *pDestinationResource->GetDesc(&tmpDesc);
|
||||
#endif
|
||||
ID3D12Device* pDevice = nullptr;
|
||||
pDestinationResource->GetDevice(IID_ID3D12Device, reinterpret_cast<void**>(&pDevice));
|
||||
pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, IntermediateOffset, pLayouts, pNumRows, pRowSizesInBytes, &RequiredSize);
|
||||
pDevice->Release();
|
||||
|
||||
const UINT64 Result = UpdateSubresources(pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, pLayouts, pNumRows, pRowSizesInBytes, pResourceData, pSrcData);
|
||||
HeapFree(GetProcessHeap(), 0, pMem);
|
||||
return Result;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// Stack-allocating UpdateSubresources implementation
|
||||
template <UINT MaxSubresources>
|
||||
inline UINT64 UpdateSubresources(
|
||||
_In_ ID3D12GraphicsCommandList* pCmdList,
|
||||
_In_ ID3D12Resource* pDestinationResource,
|
||||
_In_ ID3D12Resource* pIntermediate,
|
||||
UINT64 IntermediateOffset,
|
||||
_In_range_(0,MaxSubresources) UINT FirstSubresource,
|
||||
_In_range_(1,MaxSubresources-FirstSubresource) UINT NumSubresources,
|
||||
_In_reads_(NumSubresources) const D3D12_SUBRESOURCE_DATA* pSrcData) noexcept
|
||||
{
|
||||
UINT64 RequiredSize = 0;
|
||||
D3D12_PLACED_SUBRESOURCE_FOOTPRINT Layouts[MaxSubresources];
|
||||
UINT NumRows[MaxSubresources];
|
||||
UINT64 RowSizesInBytes[MaxSubresources];
|
||||
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
const auto Desc = pDestinationResource->GetDesc();
|
||||
#else
|
||||
D3D12_RESOURCE_DESC tmpDesc;
|
||||
const auto& Desc = *pDestinationResource->GetDesc(&tmpDesc);
|
||||
#endif
|
||||
ID3D12Device* pDevice = nullptr;
|
||||
pDestinationResource->GetDevice(IID_ID3D12Device, reinterpret_cast<void**>(&pDevice));
|
||||
pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, IntermediateOffset, Layouts, NumRows, RowSizesInBytes, &RequiredSize);
|
||||
pDevice->Release();
|
||||
|
||||
return UpdateSubresources(pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, Layouts, NumRows, RowSizesInBytes, pSrcData);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// Stack-allocating UpdateSubresources implementation
|
||||
template <UINT MaxSubresources>
|
||||
inline UINT64 UpdateSubresources(
|
||||
_In_ ID3D12GraphicsCommandList* pCmdList,
|
||||
_In_ ID3D12Resource* pDestinationResource,
|
||||
_In_ ID3D12Resource* pIntermediate,
|
||||
UINT64 IntermediateOffset,
|
||||
_In_range_(0,MaxSubresources) UINT FirstSubresource,
|
||||
_In_range_(1,MaxSubresources-FirstSubresource) UINT NumSubresources,
|
||||
_In_ const void* pResourceData,
|
||||
_In_reads_(NumSubresources) const D3D12_SUBRESOURCE_INFO* pSrcData) noexcept
|
||||
{
|
||||
UINT64 RequiredSize = 0;
|
||||
D3D12_PLACED_SUBRESOURCE_FOOTPRINT Layouts[MaxSubresources];
|
||||
UINT NumRows[MaxSubresources];
|
||||
UINT64 RowSizesInBytes[MaxSubresources];
|
||||
|
||||
#if defined(_MSC_VER) || !defined(_WIN32)
|
||||
const auto Desc = pDestinationResource->GetDesc();
|
||||
#else
|
||||
D3D12_RESOURCE_DESC tmpDesc;
|
||||
const auto& Desc = *pDestinationResource->GetDesc(&tmpDesc);
|
||||
#endif
|
||||
ID3D12Device* pDevice = nullptr;
|
||||
pDestinationResource->GetDevice(IID_ID3D12Device, reinterpret_cast<void**>(&pDevice));
|
||||
pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, IntermediateOffset, Layouts, NumRows, RowSizesInBytes, &RequiredSize);
|
||||
pDevice->Release();
|
||||
|
||||
return UpdateSubresources(pCmdList, pDestinationResource, pIntermediate, FirstSubresource, NumSubresources, RequiredSize, Layouts, NumRows, RowSizesInBytes, pResourceData, pSrcData);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
constexpr bool D3D12IsLayoutOpaque( D3D12_TEXTURE_LAYOUT Layout ) noexcept
|
||||
{ return Layout == D3D12_TEXTURE_LAYOUT_UNKNOWN || Layout == D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE; }
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
template< typename T >
|
||||
inline T D3DX12Align(T uValue, T uAlign)
|
||||
{
|
||||
// Assert power of 2 alignment
|
||||
D3DX12_ASSERT(0 == (uAlign & (uAlign - 1)));
|
||||
T uMask = uAlign - 1;
|
||||
T uResult = (uValue + uMask) & ~uMask;
|
||||
D3DX12_ASSERT(uResult >= uValue);
|
||||
D3DX12_ASSERT(0 == (uResult % uAlign));
|
||||
return uResult;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
template< typename T >
|
||||
inline T D3DX12AlignAtLeast(T uValue, T uAlign)
|
||||
{
|
||||
T aligned = D3DX12Align(uValue, uAlign);
|
||||
return aligned > uAlign ? aligned : uAlign;
|
||||
}
|
||||
|
||||
inline const CD3DX12_RESOURCE_DESC1* D3DX12ConditionallyExpandAPIDesc(
|
||||
D3D12_RESOURCE_DESC1& LclDesc,
|
||||
const D3D12_RESOURCE_DESC1* pDesc,
|
||||
const bool tightAlignmentSupported = false,
|
||||
const bool alignAsCommitted = false)
|
||||
{
|
||||
return D3DX12ConditionallyExpandAPIDesc(static_cast<CD3DX12_RESOURCE_DESC1&>(LclDesc), static_cast<const CD3DX12_RESOURCE_DESC1*>(pDesc), tightAlignmentSupported, alignAsCommitted);
|
||||
}
|
||||
|
||||
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 606)
|
||||
//------------------------------------------------------------------------------------------------
|
||||
// The difference between D3DX12GetCopyableFootprints and ID3D12Device::GetCopyableFootprints
|
||||
// is that this one loses a lot of error checking by assuming the arguments are correct
|
||||
inline bool D3DX12GetCopyableFootprints(
|
||||
_In_ const D3D12_RESOURCE_DESC1& ResourceDesc,
|
||||
_In_range_(0, D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
|
||||
_In_range_(0, D3D12_REQ_SUBRESOURCES - FirstSubresource) UINT NumSubresources,
|
||||
UINT64 BaseOffset,
|
||||
_Out_writes_opt_(NumSubresources) D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts,
|
||||
_Out_writes_opt_(NumSubresources) UINT* pNumRows,
|
||||
_Out_writes_opt_(NumSubresources) UINT64* pRowSizeInBytes,
|
||||
_Out_opt_ UINT64* pTotalBytes)
|
||||
{
|
||||
constexpr UINT64 uint64_max = ~0ull;
|
||||
UINT64 TotalBytes = uint64_max;
|
||||
UINT uSubRes = 0;
|
||||
|
||||
bool bResourceOverflow = false;
|
||||
TotalBytes = 0;
|
||||
|
||||
const DXGI_FORMAT Format = ResourceDesc.Format;
|
||||
|
||||
CD3DX12_RESOURCE_DESC1 LresourceDesc;
|
||||
const CD3DX12_RESOURCE_DESC1& resourceDesc = *D3DX12ConditionallyExpandAPIDesc(LresourceDesc, &ResourceDesc);
|
||||
|
||||
// Check if its a valid format
|
||||
D3DX12_ASSERT(D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::FormatExists(Format));
|
||||
|
||||
// D3DX12GetCopyableFootprints does not support buffers with width larger than UINT_MAX.
|
||||
if (ResourceDesc.Dimension == D3D12_RESOURCE_DIMENSION_BUFFER && ResourceDesc.Width >= UINT_MAX)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const UINT WidthAlignment = D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::GetWidthAlignment( Format );
|
||||
const UINT HeightAlignment = D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::GetHeightAlignment( Format );
|
||||
const UINT16 DepthAlignment = UINT16( D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::GetDepthAlignment( Format ) );
|
||||
|
||||
for (; uSubRes < NumSubresources; ++uSubRes)
|
||||
{
|
||||
bool bOverflow = false;
|
||||
UINT Subresource = FirstSubresource + uSubRes;
|
||||
|
||||
D3DX12_ASSERT(resourceDesc.MipLevels != 0);
|
||||
UINT subresourceCount = resourceDesc.MipLevels * resourceDesc.ArraySize() * D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::GetPlaneCount(resourceDesc.Format);
|
||||
|
||||
if (Subresource > subresourceCount)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
TotalBytes = D3DX12Align< UINT64 >( TotalBytes, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT );
|
||||
|
||||
UINT MipLevel, ArraySlice, PlaneSlice;
|
||||
D3D12DecomposeSubresource(Subresource, resourceDesc.MipLevels, resourceDesc.ArraySize(), /*_Out_*/MipLevel, /*_Out_*/ArraySlice, /*_Out_*/PlaneSlice);
|
||||
|
||||
const UINT64 Width = D3DX12AlignAtLeast<UINT64>(resourceDesc.Width >> MipLevel, WidthAlignment);
|
||||
const UINT Height = D3DX12AlignAtLeast(resourceDesc.Height >> MipLevel, HeightAlignment);
|
||||
const UINT16 Depth = D3DX12AlignAtLeast<UINT16>(resourceDesc.Depth() >> MipLevel, DepthAlignment);
|
||||
|
||||
// Adjust for the current PlaneSlice. Most formats have only one plane.
|
||||
DXGI_FORMAT PlaneFormat;
|
||||
UINT32 MinPlanePitchWidth, PlaneWidth, PlaneHeight;
|
||||
D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::GetPlaneSubsampledSizeAndFormatForCopyableLayout(PlaneSlice, Format, (UINT)Width, Height, /*_Out_*/ PlaneFormat, /*_Out_*/ MinPlanePitchWidth, /* _Out_ */ PlaneWidth, /*_Out_*/ PlaneHeight);
|
||||
|
||||
D3D12_SUBRESOURCE_FOOTPRINT LocalPlacement = {};
|
||||
auto& Placement = pLayouts ? pLayouts[uSubRes].Footprint : LocalPlacement;
|
||||
Placement.Format = PlaneFormat;
|
||||
Placement.Width = PlaneWidth;
|
||||
Placement.Height = PlaneHeight;
|
||||
Placement.Depth = Depth;
|
||||
|
||||
// Calculate row pitch
|
||||
UINT MinPlaneRowPitch = 0;
|
||||
D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::CalculateMinimumRowMajorRowPitch(PlaneFormat, MinPlanePitchWidth, MinPlaneRowPitch);
|
||||
|
||||
// Formats with more than one plane choose a larger pitch alignment to ensure that each plane begins on the row
|
||||
// immediately following the previous plane while still adhering to subresource alignment restrictions.
|
||||
static_assert( D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT >= D3D12_TEXTURE_DATA_PITCH_ALIGNMENT
|
||||
&& ((D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT % D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) == 0),
|
||||
"D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT must be >= and evenly divisible by D3D12_TEXTURE_DATA_PITCH_ALIGNMENT." );
|
||||
|
||||
Placement.RowPitch = D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::Planar(Format)
|
||||
? D3DX12Align< UINT >( MinPlaneRowPitch, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT )
|
||||
: D3DX12Align< UINT >( MinPlaneRowPitch, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT );
|
||||
|
||||
if (pRowSizeInBytes)
|
||||
{
|
||||
UINT PlaneRowSize = 0;
|
||||
D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::CalculateMinimumRowMajorRowPitch(PlaneFormat, PlaneWidth, PlaneRowSize);
|
||||
|
||||
pRowSizeInBytes[uSubRes] = PlaneRowSize;
|
||||
}
|
||||
|
||||
// Number of rows (accounting for block compression and additional planes)
|
||||
UINT NumRows = 0;
|
||||
if (D3D12_PROPERTY_LAYOUT_FORMAT_TABLE::Planar(Format))
|
||||
{
|
||||
NumRows = PlaneHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
D3DX12_ASSERT(Height % HeightAlignment == 0);
|
||||
NumRows = Height / HeightAlignment;
|
||||
}
|
||||
|
||||
if (pNumRows)
|
||||
{
|
||||
pNumRows[uSubRes] = NumRows;
|
||||
}
|
||||
|
||||
// Offsetting
|
||||
if (pLayouts)
|
||||
{
|
||||
pLayouts[uSubRes].Offset = (bOverflow ? uint64_max : TotalBytes + BaseOffset);
|
||||
}
|
||||
|
||||
const UINT16 NumSlices = Depth;
|
||||
const UINT64 SubresourceSize = (NumRows * NumSlices - 1) * Placement.RowPitch + MinPlaneRowPitch;
|
||||
|
||||
// uint64 addition with overflow checking
|
||||
TotalBytes = TotalBytes + SubresourceSize;
|
||||
if(TotalBytes < SubresourceSize)
|
||||
{
|
||||
TotalBytes = uint64_max;
|
||||
}
|
||||
bResourceOverflow = bResourceOverflow || bOverflow;
|
||||
}
|
||||
|
||||
// Overflow error
|
||||
if (bResourceOverflow)
|
||||
{
|
||||
TotalBytes = uint64_max;
|
||||
}
|
||||
|
||||
|
||||
if (pLayouts)
|
||||
{
|
||||
memset( pLayouts + uSubRes, -1, sizeof( *pLayouts ) * (NumSubresources - uSubRes) );
|
||||
}
|
||||
if (pNumRows)
|
||||
{
|
||||
memset(pNumRows + uSubRes, -1, sizeof(*pNumRows) * (NumSubresources - uSubRes));
|
||||
}
|
||||
if (pRowSizeInBytes)
|
||||
{
|
||||
memset(pRowSizeInBytes + uSubRes, -1, sizeof(*pRowSizeInBytes) * (NumSubresources - uSubRes));
|
||||
}
|
||||
if (pTotalBytes)
|
||||
{
|
||||
*pTotalBytes = TotalBytes;
|
||||
}
|
||||
if(TotalBytes == uint64_max)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
inline D3D12_RESOURCE_DESC1 D3DX12ResourceDesc0ToDesc1(D3D12_RESOURCE_DESC const& desc0)
|
||||
{
|
||||
D3D12_RESOURCE_DESC1 desc1;
|
||||
desc1.Dimension = desc0.Dimension;
|
||||
desc1.Alignment = desc0.Alignment;
|
||||
desc1.Width = desc0.Width;
|
||||
desc1.Height = desc0.Height;
|
||||
desc1.DepthOrArraySize = desc0.DepthOrArraySize;
|
||||
desc1.MipLevels = desc0.MipLevels;
|
||||
desc1.Format = desc0.Format;
|
||||
desc1.SampleDesc.Count = desc0.SampleDesc.Count;
|
||||
desc1.SampleDesc.Quality = desc0.SampleDesc.Quality;
|
||||
desc1.Layout = desc0.Layout;
|
||||
desc1.Flags = desc0.Flags;
|
||||
desc1.SamplerFeedbackMipRegion.Width = 0;
|
||||
desc1.SamplerFeedbackMipRegion.Height = 0;
|
||||
desc1.SamplerFeedbackMipRegion.Depth = 0;
|
||||
return desc1;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
inline bool D3DX12GetCopyableFootprints(
|
||||
_In_ const D3D12_RESOURCE_DESC& pResourceDesc,
|
||||
_In_range_(0, D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
|
||||
_In_range_(0, D3D12_REQ_SUBRESOURCES - FirstSubresource) UINT NumSubresources,
|
||||
UINT64 BaseOffset,
|
||||
_Out_writes_opt_(NumSubresources) D3D12_PLACED_SUBRESOURCE_FOOTPRINT* pLayouts,
|
||||
_Out_writes_opt_(NumSubresources) UINT* pNumRows,
|
||||
_Out_writes_opt_(NumSubresources) UINT64* pRowSizeInBytes,
|
||||
_Out_opt_ UINT64* pTotalBytes)
|
||||
{
|
||||
// From D3D12_RESOURCE_DESC to D3D12_RESOURCE_DESC1
|
||||
D3D12_RESOURCE_DESC1 desc = D3DX12ResourceDesc0ToDesc1(pResourceDesc);
|
||||
return D3DX12GetCopyableFootprints(
|
||||
*static_cast<CD3DX12_RESOURCE_DESC1*>(&desc),// From D3D12_RESOURCE_DESC1 to CD3DX12_RESOURCE_DESC1
|
||||
FirstSubresource,
|
||||
NumSubresources,
|
||||
BaseOffset,
|
||||
pLayouts,
|
||||
pNumRows,
|
||||
pRowSizeInBytes,
|
||||
pTotalBytes);
|
||||
}
|
||||
|
||||
#endif // D3D12_SDK_VERSION >= 606
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,144 @@
|
||||
//
|
||||
// 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_A4B4G4R4_UNORM = 191,
|
||||
|
||||
|
||||
DXGI_FORMAT_FORCE_UINT = 0xffffffff
|
||||
} DXGI_FORMAT;
|
||||
|
||||
#endif // __dxgiformat_h__
|
||||
@@ -0,0 +1,139 @@
|
||||
//
|
||||
// Copyright (C) Microsoft Corporation.
|
||||
// Licensed under the MIT license
|
||||
//
|
||||
|
||||
|
||||
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_A4B4G4R4_UNORM = 191,
|
||||
|
||||
|
||||
DXGI_FORMAT_FORCE_UINT = 0xffffffff
|
||||
} DXGI_FORMAT;
|
||||
|
||||
Reference in New Issue
Block a user