RetroArch
d3dx11core.h
Go to the documentation of this file.
1 //
3 // Copyright (C) Microsoft Corporation. All Rights Reserved.
4 //
5 // File: d3dx11core.h
6 // Content: D3DX11 core types and functions
7 //
9 
10 #include "d3dx11.h"
11 
12 #ifndef __D3DX11CORE_H__
13 #define __D3DX11CORE_H__
14 
15 // Current name of the DLL shipped in the same SDK as this header.
16 
17 
18 #define D3DX11_DLL_W L"d3dx11_43.dll"
19 #define D3DX11_DLL_A "d3dx11_43.dll"
20 
21 #ifdef UNICODE
22  #define D3DX11_DLL D3DX11_DLL_W
23 #else
24  #define D3DX11_DLL D3DX11_DLL_A
25 #endif
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif //__cplusplus
30 
32 // D3DX11_SDK_VERSION:
33 // -----------------
34 // This identifier is passed to D3DX11CheckVersion in order to ensure that an
35 // application was built against the correct header files and lib files.
36 // This number is incremented whenever a header (or other) change would
37 // require applications to be rebuilt. If the version doesn't match,
38 // D3DX11CreateVersion will return FALSE. (The number itself has no meaning.)
40 
41 
42 #define D3DX11_SDK_VERSION 43
43 
44 
45 #ifdef D3D_DIAG_DLL
46 BOOL WINAPI D3DX11DebugMute(BOOL Mute);
47 #endif
48 HRESULT WINAPI D3DX11CheckVersion(UINT D3DSdkVersion, UINT D3DX11SdkVersion);
49 
50 #ifdef __cplusplus
51 }
52 #endif //__cplusplus
53 
54 
55 
57 // ID3DX11ThreadPump:
59 
60 #undef INTERFACE
61 #define INTERFACE ID3DX11DataLoader
62 
63 DECLARE_INTERFACE(ID3DX11DataLoader)
64 {
65  STDMETHOD(Load)(THIS) PURE;
66  STDMETHOD(Decompress)(THIS_ void **ppData, SIZE_T *pcBytes) PURE;
67  STDMETHOD(Destroy)(THIS) PURE;
68 };
69 
70 #undef INTERFACE
71 #define INTERFACE ID3DX11DataProcessor
72 
73 DECLARE_INTERFACE(ID3DX11DataProcessor)
74 {
75  STDMETHOD(Process)(THIS_ void *pData, SIZE_T cBytes) PURE;
76  STDMETHOD(CreateDeviceObject)(THIS_ void **ppDataObject) PURE;
77  STDMETHOD(Destroy)(THIS) PURE;
78 };
79 
80 // {C93FECFA-6967-478a-ABBC-402D90621FCB}
81 DEFINE_GUID(IID_ID3DX11ThreadPump,
82 0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb);
83 
84 #undef INTERFACE
85 #define INTERFACE ID3DX11ThreadPump
86 
87 DECLARE_INTERFACE_(ID3DX11ThreadPump, IUnknown)
88 {
89  // IUnknown
90  STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
91  STDMETHOD_(ULONG, AddRef)(THIS) PURE;
92  STDMETHOD_(ULONG, Release)(THIS) PURE;
93 
94  // ID3DX11ThreadPump
95  STDMETHOD(AddWorkItem)(THIS_ ID3DX11DataLoader *pDataLoader, ID3DX11DataProcessor *pDataProcessor, HRESULT *pHResult, void **ppDeviceObject) PURE;
96  STDMETHOD_(UINT, GetWorkItemCount)(THIS) PURE;
97 
98  STDMETHOD(WaitForAllItems)(THIS) PURE;
99  STDMETHOD(ProcessDeviceWorkItems)(THIS_ UINT iWorkItemCount);
100 
101  STDMETHOD(PurgeAllItems)(THIS) PURE;
102  STDMETHOD(GetQueueStatus)(THIS_ UINT *pIoQueue, UINT *pProcessQueue, UINT *pDeviceQueue) PURE;
103 
104 };
105 
106 #ifdef __cplusplus
107 extern "C" {
108 #endif //__cplusplus
109 
110 HRESULT WINAPI D3DX11CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX11ThreadPump **ppThreadPump);
111 
113 
114 #ifdef __cplusplus
115 }
116 #endif //__cplusplus
117 
119 
120 #define _FACD3D 0x876
121 #define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code )
122 #define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code )
123 
124 #define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156)
125 #define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540)
126 
127 #endif //__D3DX11CORE_H__
128 
HRESULT WINAPI D3DX11UnsetAllDeviceObjects(ID3D11DeviceContext *pContext)
typedef HRESULT(WINAPI *PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(_In_ const D3D12_ROOT_SIGNATURE_DESC *pRootSignature
DEFINE_GUID(IID_ID3DX11ThreadPump, 0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb)
static INLINE ULONG Release(void *object)
Definition: dxgi_common.h:253
unsigned int BOOL
Definition: gctypes.h:51
interface ID3D11DeviceContext ID3D11DeviceContext
Definition: d3d11.h:252
Definition: glslang_tab.cpp:136
DECLARE_INTERFACE(ID3DX11DataLoader)
Definition: d3dx11core.h:63
DECLARE_INTERFACE_(ID3DX11ThreadPump, IUnknown)
Definition: d3dx11core.h:87
HRESULT WINAPI D3DX11CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX11ThreadPump **ppThreadPump)
HRESULT WINAPI D3DX11CheckVersion(UINT D3DSdkVersion, UINT D3DX11SdkVersion)