CommonLibVR
D3D11_3.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "REX/W32/D3D11_2.h"
4 
5 namespace REX::W32
6 {
7  struct ID3D11Device3;
8  struct ID3D11DeviceContext3;
9  struct ID3D11DeviceContext4;
10  struct ID3D11Fence;
11  struct ID3D11Query1;
12  struct ID3D11RasterizerState2;
13  struct ID3D11RenderTargetView1;
14  struct ID3D11ShaderResourceView1;
15  struct ID3D11Texture2D1;
16  struct ID3D11Texture3D1;
17  struct ID3D11UnorderedAccessView1;
18 }
19 
20 namespace REX::W32
21 {
23  {
26  };
27 
29  {
35  };
36 
38  {
43  };
44 
46  {
50  };
51 }
52 
53 namespace REX::W32
54 {
56  {
57  std::uint32_t mipSlice;
58  std::uint32_t firstArraySlice;
59  std::uint32_t arraySize;
60  std::uint32_t planeSlice;
61  };
62 
64  {
65  std::uint32_t mostDetailedMip;
66  std::uint32_t mipLevels;
67  std::uint32_t firstArraySlice;
68  std::uint32_t arraySize;
69  std::uint32_t planeSlice;
70  };
71 
73  {
74  std::uint32_t mipSlice;
75  std::uint32_t firstArraySlice;
76  std::uint32_t arraySize;
77  std::uint32_t planeSlice;
78  };
79 
81  {
82  std::uint32_t mipSlice;
83  std::uint32_t planeSlice;
84  };
85 
87  {
88  std::uint32_t mostDetailedMip;
89  std::uint32_t mipLevels;
90  std::uint32_t planeSlice;
91  };
92 
94  {
95  std::uint32_t mipSlice;
96  std::uint32_t planeSlice;
97  };
98 
100  {
102  std::uint32_t miscFlags;
104  };
105 
107  {
111  std::int32_t depthBias;
118  std::uint32_t forcedSampleCount;
120  };
121 
123  {
126  union
127  {
136  };
137  };
138 
140  {
141  std::uint32_t width;
142  std::uint32_t height;
143  std::uint32_t mipLevels;
144  std::uint32_t arraySize;
148  std::uint32_t bindFlags;
149  std::uint32_t cpuAccessFlags;
150  std::uint32_t miscFlags;
152  };
153 
155  {
156  std::uint32_t width;
157  std::uint32_t height;
158  std::uint32_t depth;
159  std::uint32_t mipLevels;
162  std::uint32_t bindFlags;
163  std::uint32_t cpuAccessFlags;
164  std::uint32_t miscFlags;
166  };
167 
169  {
172  union
173  {
185  };
186  };
187 
189  {
192  union
193  {
200  };
201  };
202 }
203 
204 namespace REX::W32
205 {
206  struct __declspec(novtable, uuid("A05C8C37-D2C6-4732-B3A0-9CE0B0DC9AE6"))
207  ID3D11Device3 : public ID3D11Device2
208  {
209  virtual HRESULT CreateTexture2D1(const D3D11_TEXTURE2D_DESC1* a_desc1, const D3D11_SUBRESOURCE_DATA* a_initialData, ID3D11Texture2D1** a_texture2D) = 0;
210  virtual HRESULT CreateTexture3D1(const D3D11_TEXTURE3D_DESC1* a_desc1, const D3D11_SUBRESOURCE_DATA* a_initialData, ID3D11Texture3D1** a_texture3D) = 0;
211  virtual HRESULT CreateRasterizerState2(const D3D11_RASTERIZER_DESC2* a_rasterizerDesc, ID3D11RasterizerState2** a_rasterizerState) = 0;
212  virtual HRESULT CreateShaderResourceView1(ID3D11Resource* a_resource, const D3D11_SHADER_RESOURCE_VIEW_DESC1* a_desc1, ID3D11ShaderResourceView1** a_srView1) = 0;
213  virtual HRESULT CreateUnorderedAccessView1(ID3D11Resource* a_resource, const D3D11_UNORDERED_ACCESS_VIEW_DESC1* a_desc1, ID3D11UnorderedAccessView1** a_uaView1) = 0;
214  virtual HRESULT CreateRenderTargetView1(ID3D11Resource* a_resource, const D3D11_RENDER_TARGET_VIEW_DESC1* a_desc1, ID3D11RenderTargetView1** a_rtView1) = 0;
215  virtual HRESULT CreateQuery1(const D3D11_QUERY_DESC1* a_queryDesc1, ID3D11Query1** a_query1) = 0;
216  virtual void GetImmediateContext3(ID3D11DeviceContext3** a_immediateContext) = 0;
217  virtual HRESULT CreateDeferredContext3(std::uint32_t a_contextFlags, ID3D11DeviceContext3** a_deferredContext) = 0;
218  virtual void WriteToSubresource(ID3D11Resource* a_dstResource, std::uint32_t a_dstSubresource, const D3D11_BOX* a_dstBox, const void* a_srcData, std::uint32_t a_srcRowPitch, std::uint32_t a_srcDepthPitch) = 0;
219  virtual void ReadFromSubresource(void* a_dstData, std::uint32_t a_dstRowPitch, std::uint32_t a_dstDepthPitch, ID3D11Resource* a_srcResource, std::uint32_t a_srcSubresource, const D3D11_BOX* a_srcBox) = 0;
220  };
221 
222  struct __declspec(novtable, uuid("b4e3c01d-e79e-4637-91b2-510e9f4c9b8f"))
223  ID3D11DeviceContext3 : public ID3D11DeviceContext2
224  {
225  virtual void Flush1(D3D11_CONTEXT_TYPE a_contextType, HANDLE a_event) = 0;
226  virtual void SetHardwareProtectionState(BOOL a_hwProtectionEnable) = 0;
227  virtual void GetHardwareProtectionState(BOOL* a_hwProtectionEnable) = 0;
228  };
229 
230  struct __declspec(novtable, uuid("917600da-f58c-4c33-98d8-3e15b390fa24"))
231  ID3D11DeviceContext4 : public ID3D11DeviceContext3
232  {
233  virtual HRESULT Signal(ID3D11Fence* a_fence, std::uint64_t a_value) = 0;
234  virtual HRESULT Wait(ID3D11Fence* a_fence, std::uint64_t a_value) = 0;
235  };
236 
237  struct __declspec(novtable, uuid("affde9d1-1df7-4bb7-8a34-0f46251dab80"))
238  ID3D11Fence : public ID3D11DeviceChild
239  {
240  virtual HRESULT CreateSharedHandle(const SECURITY_ATTRIBUTES* a_attributes, std::uint32_t a_access, const wchar_t* a_name, HANDLE* a_handle) = 0;
241  virtual std::uint64_t GetCompletedValue(void) = 0;
242  virtual HRESULT SetEventOnCompletion(std::uint64_t a_value, HANDLE a_event) = 0;
243  };
244 
245  struct __declspec(novtable, uuid("631b4766-36dc-461d-8db6-c47e13e60916"))
246  ID3D11Query1 : public ID3D11Query
247  {
248  virtual void GetDesc1(D3D11_QUERY_DESC1* a_desc) = 0;
249  };
250 
251  struct __declspec(novtable, uuid("6fbd02fb-209f-46c4-b059-2ed15586a6ac"))
252  ID3D11RasterizerState2 : public ID3D11RasterizerState1
253  {
254  virtual void GetDesc2(D3D11_RASTERIZER_DESC2* a_desc) = 0;
255  };
256 
257  struct __declspec(novtable, uuid("ffbe2e23-f011-418a-ac56-5ceed7c5b94b"))
258  ID3D11RenderTargetView1 : public ID3D11RenderTargetView
259  {
260  virtual void GetDesc1(D3D11_RENDER_TARGET_VIEW_DESC1* a_desc1) = 0;
261  };
262 
263  struct __declspec(novtable, uuid("91308b87-9040-411d-8c67-c39253ce3802"))
264  ID3D11ShaderResourceView1 : public ID3D11ShaderResourceView
265  {
266  virtual void GetDesc1(D3D11_SHADER_RESOURCE_VIEW_DESC1* a_desc) = 0;
267  };
268 
269  struct __declspec(novtable, uuid("51218251-1E33-4617-9CCB-4D3A4367E7BB"))
270  ID3D11Texture2D1 : public ID3D11Texture2D
271  {
272  virtual void GetDesc1(D3D11_TEXTURE2D_DESC1* a_desc) = 0;
273  };
274 
275  struct __declspec(novtable, uuid("0C711683-2853-4846-9BB0-F3E60639E46A"))
276  ID3D11Texture3D1 : public ID3D11Texture3D
277  {
278  virtual void GetDesc1(D3D11_TEXTURE3D_DESC1* a_desc) = 0;
279  };
280 
281  struct __declspec(novtable, uuid("7b3b6153-a886-4544-ab37-6537c8500403"))
282  ID3D11UnorderedAccessView1 : public ID3D11UnorderedAccessView
283  {
284  virtual void GetDesc1(D3D11_UNORDERED_ACCESS_VIEW_DESC1* a_desc) = 0;
285  };
286 }
287 
288 namespace REX::W32
289 {
290  inline constexpr IID IID_ID3D11Device3{ 0xA05C8C37, 0xD2C6, 0x4732, { 0xB3, 0xA0, 0x9C, 0xE0, 0xB0, 0xDC, 0x9A, 0xE6 } };
291  inline constexpr IID IID_ID3D11DeviceContext3{ 0xB4E3C01D, 0xE79E, 0x4637, { 0x91, 0xB2, 0x51, 0x0E, 0x9F, 0x4C, 0x9B, 0x8F } };
292  inline constexpr IID IID_ID3D11DeviceContext4{ 0x917600DA, 0xF58C, 0x4C33, { 0x98, 0xD8, 0x3E, 0x15, 0xB3, 0x90, 0xFA, 0x24 } };
293  inline constexpr IID IID_ID3D11Fence{ 0xAFFDE9D1, 0x1DF7, 0x4BB7, { 0x8A, 0x34, 0x0F, 0x46, 0x25, 0x1D, 0xAB, 0x80 } };
294  inline constexpr IID IID_ID3D11Query1{ 0x631B4766, 0x36DC, 0x461D, { 0x8D, 0xB6, 0xC4, 0x7E, 0x13, 0xE6, 0x09, 0x16 } };
295  inline constexpr IID IID_ID3D11RasterizerState2{ 0x6FBD02FB, 0x209F, 0x46C4, { 0xb0, 0x59, 0x2E, 0xD1, 0x55, 0x86, 0xA6, 0xAC } };
296  inline constexpr IID IID_ID3D11RenderTargetView1{ 0xFFBE2E23, 0xF011, 0x418A, { 0xAC, 0x56, 0x5C, 0xEE, 0xD7, 0xC5, 0xB9, 0x4B } };
297  inline constexpr IID IID_ID3D11ShaderResourceView1{ 0x91308B87, 0x9040, 0x411D, { 0x8C, 0x67, 0xC3, 0x92, 0x53, 0xCE, 0x38, 0x02 } };
298  inline constexpr IID IID_ID3D11Texture2D1{ 0x51218251, 0x1E33, 0x4617, { 0x9C, 0xCB, 0x4D, 0x3A, 0x43, 0x67, 0xE7, 0xBB } };
299  inline constexpr IID IID_ID3D11Texture3D1{ 0x0C711683, 0x2853, 0x4846, { 0x9B, 0xB0, 0xF3, 0xE6, 0x06, 0x39, 0xE4, 0x6A } };
300  inline constexpr IID IID_ID3D11UnorderedAccessView1{ 0x7B3B6153, 0xA886, 0x4544, { 0xAB, 0x37, 0x65, 0x37, 0xC8, 0x50, 0x04, 0x03 } };
301 }
Definition: BSDirectInputManager.h:8
constexpr IID IID_ID3D11Texture3D1
Definition: D3D11_3.h:299
constexpr IID IID_ID3D11DeviceContext4
Definition: D3D11_3.h:292
void * HANDLE
Definition: BASE.h:14
D3D11_TEXTURE_LAYOUT
Definition: D3D11_3.h:46
@ D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE
Definition: D3D11_3.h:49
@ D3D11_TEXTURE_LAYOUT_UNDEFINED
Definition: D3D11_3.h:47
@ D3D11_TEXTURE_LAYOUT_ROW_MAJOR
Definition: D3D11_3.h:48
constexpr IID IID_ID3D11UnorderedAccessView1
Definition: D3D11_3.h:300
D3D11_FILL_MODE
Definition: D3D11.h:787
struct __declspec(novtable, uuid("00000000-0000-0000-c000-000000000046")) IUnknown
Definition: COM.h:7
D3D11_RTV_DIMENSION
Definition: D3D11.h:984
std::int32_t BOOL
Definition: BASE.h:13
D3D11_UAV_DIMENSION
Definition: D3D11.h:1036
D3D11_FENCE_FLAG
Definition: D3D11_3.h:38
@ D3D11_FENCE_FLAG_SHARED_CROSS_ADAPTER
Definition: D3D11_3.h:41
@ D3D11_FENCE_FLAG_SHARED
Definition: D3D11_3.h:40
@ D3D11_FENCE_FLAG_NONE
Definition: D3D11_3.h:39
@ D3D11_FENCE_FLAG_NON_MONITORED
Definition: D3D11_3.h:42
D3D_SRV_DIMENSION
Definition: D3D.h:582
constexpr IID IID_ID3D11Texture2D1
Definition: D3D11_3.h:298
constexpr IID IID_ID3D11ShaderResourceView1
Definition: D3D11_3.h:297
DXGI_FORMAT
Definition: DXGI.h:63
constexpr IID IID_ID3D11Fence
Definition: D3D11_3.h:293
constexpr IID IID_ID3D11DeviceContext3
Definition: D3D11_3.h:291
D3D11_USAGE
Definition: D3D11.h:1047
D3D11_CONTEXT_TYPE
Definition: D3D11_3.h:29
@ D3D11_CONTEXT_TYPE_3D
Definition: D3D11_3.h:31
@ D3D11_CONTEXT_TYPE_COMPUTE
Definition: D3D11_3.h:32
@ D3D11_CONTEXT_TYPE_ALL
Definition: D3D11_3.h:30
@ D3D11_CONTEXT_TYPE_VIDEO
Definition: D3D11_3.h:34
@ D3D11_CONTEXT_TYPE_COPY
Definition: D3D11_3.h:33
D3D11_CULL_MODE
Definition: D3D11.h:726
constexpr IID IID_ID3D11RenderTargetView1
Definition: D3D11_3.h:296
D3D11_QUERY
Definition: D3D11.h:922
std::int32_t HRESULT
Definition: BASE.h:28
constexpr IID IID_ID3D11Query1
Definition: D3D11_3.h:294
D3D11_CONSERVATIVE_RASTERIZATION_MODE
Definition: D3D11_3.h:23
@ D3D11_CONSERVATIVE_RASTERIZATION_MODE_ON
Definition: D3D11_3.h:25
@ D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF
Definition: D3D11_3.h:24
constexpr IID IID_ID3D11Device3
Definition: D3D11_3.h:290
constexpr IID IID_ID3D11RasterizerState2
Definition: D3D11_3.h:295
Definition: D3D11.h:1324
Definition: D3D11.h:1289
Definition: D3D11.h:1303
Definition: D3D11.h:1317
Definition: D3D11_3.h:100
D3D11_CONTEXT_TYPE contextType
Definition: D3D11_3.h:103
std::uint32_t miscFlags
Definition: D3D11_3.h:102
D3D11_QUERY query
Definition: D3D11_3.h:101
Definition: D3D11_3.h:107
BOOL frontCounterClockwise
Definition: D3D11_3.h:110
BOOL multisampleEnable
Definition: D3D11_3.h:116
BOOL antialiasedLineEnable
Definition: D3D11_3.h:117
D3D11_FILL_MODE fillMode
Definition: D3D11_3.h:108
D3D11_CONSERVATIVE_RASTERIZATION_MODE conservativeRaster
Definition: D3D11_3.h:119
BOOL depthClipEnable
Definition: D3D11_3.h:114
float depthBiasClamp
Definition: D3D11_3.h:112
std::uint32_t forcedSampleCount
Definition: D3D11_3.h:118
D3D11_CULL_MODE cullMode
Definition: D3D11_3.h:109
BOOL scissorEnable
Definition: D3D11_3.h:115
std::int32_t depthBias
Definition: D3D11_3.h:111
float slopeScaledDepthBias
Definition: D3D11_3.h:113
D3D11_BUFFER_RTV buffer
Definition: D3D11_3.h:128
D3D11_TEX2D_RTV1 texture2D
Definition: D3D11_3.h:131
D3D11_TEX1D_ARRAY_RTV texture1DArray
Definition: D3D11_3.h:130
D3D11_TEX3D_RTV texture3D
Definition: D3D11_3.h:135
D3D11_TEX2D_ARRAY_RTV1 texture2DArray
Definition: D3D11_3.h:132
D3D11_TEX2DMS_ARRAY_RTV texture2DMSArray
Definition: D3D11_3.h:134
D3D11_RTV_DIMENSION viewDimension
Definition: D3D11_3.h:125
D3D11_TEX1D_RTV texture1D
Definition: D3D11_3.h:129
DXGI_FORMAT format
Definition: D3D11_3.h:124
D3D11_TEX2DMS_RTV texture2DMS
Definition: D3D11_3.h:133
D3D11_BUFFEREX_SRV bufferEx
Definition: D3D11_3.h:184
D3D11_TEX2DMS_ARRAY_SRV texture2DMSArray
Definition: D3D11_3.h:180
D3D11_TEX2D_SRV1 texture2D
Definition: D3D11_3.h:177
D3D11_TEX1D_SRV texture1D
Definition: D3D11_3.h:175
D3D11_BUFFER_SRV buffer
Definition: D3D11_3.h:174
D3D11_TEX2DMS_SRV texture2DMS
Definition: D3D11_3.h:179
D3D11_TEX1D_ARRAY_SRV texture1DArray
Definition: D3D11_3.h:176
D3D11_TEXCUBE_ARRAY_SRV textureCubeArray
Definition: D3D11_3.h:183
D3D11_TEX3D_SRV texture3D
Definition: D3D11_3.h:181
D3D11_TEX2D_ARRAY_SRV1 texture2DArray
Definition: D3D11_3.h:178
D3D11_SRV_DIMENSION viewDimension
Definition: D3D11_3.h:171
D3D11_TEXCUBE_SRV textureCube
Definition: D3D11_3.h:182
DXGI_FORMAT format
Definition: D3D11_3.h:170
Definition: D3D11.h:1523
Definition: D3D11.h:1530
Definition: D3D11.h:1538
Definition: D3D11.h:1500
Definition: D3D11.h:1505
Definition: D3D11.h:1511
Definition: D3D11.h:1639
Definition: D3D11.h:1645
Definition: D3D11.h:1623
Definition: D3D11.h:1628
Definition: D3D11_3.h:56
std::uint32_t firstArraySlice
Definition: D3D11_3.h:58
std::uint32_t arraySize
Definition: D3D11_3.h:59
std::uint32_t mipSlice
Definition: D3D11_3.h:57
std::uint32_t planeSlice
Definition: D3D11_3.h:60
Definition: D3D11_3.h:64
std::uint32_t firstArraySlice
Definition: D3D11_3.h:67
std::uint32_t planeSlice
Definition: D3D11_3.h:69
std::uint32_t mostDetailedMip
Definition: D3D11_3.h:65
std::uint32_t arraySize
Definition: D3D11_3.h:68
std::uint32_t mipLevels
Definition: D3D11_3.h:66
Definition: D3D11_3.h:73
std::uint32_t planeSlice
Definition: D3D11_3.h:77
std::uint32_t mipSlice
Definition: D3D11_3.h:74
std::uint32_t firstArraySlice
Definition: D3D11_3.h:75
std::uint32_t arraySize
Definition: D3D11_3.h:76
Definition: D3D11_3.h:81
std::uint32_t planeSlice
Definition: D3D11_3.h:83
std::uint32_t mipSlice
Definition: D3D11_3.h:82
Definition: D3D11_3.h:87
std::uint32_t mipLevels
Definition: D3D11_3.h:89
std::uint32_t mostDetailedMip
Definition: D3D11_3.h:88
std::uint32_t planeSlice
Definition: D3D11_3.h:90
Definition: D3D11_3.h:94
std::uint32_t mipSlice
Definition: D3D11_3.h:95
std::uint32_t planeSlice
Definition: D3D11_3.h:96
Definition: D3D11.h:1651
Definition: D3D11.h:1658
Definition: D3D11.h:1664
Definition: D3D11.h:1677
Definition: D3D11.h:1671
Definition: D3D11_3.h:140
D3D11_USAGE usage
Definition: D3D11_3.h:147
std::uint32_t arraySize
Definition: D3D11_3.h:144
std::uint32_t mipLevels
Definition: D3D11_3.h:143
std::uint32_t width
Definition: D3D11_3.h:141
std::uint32_t height
Definition: D3D11_3.h:142
std::uint32_t miscFlags
Definition: D3D11_3.h:150
std::uint32_t cpuAccessFlags
Definition: D3D11_3.h:149
D3D11_TEXTURE_LAYOUT textureLayout
Definition: D3D11_3.h:151
std::uint32_t bindFlags
Definition: D3D11_3.h:148
DXGI_SAMPLE_DESC sampleDesc
Definition: D3D11_3.h:146
DXGI_FORMAT format
Definition: D3D11_3.h:145
Definition: D3D11_3.h:155
D3D11_USAGE usage
Definition: D3D11_3.h:161
std::uint32_t cpuAccessFlags
Definition: D3D11_3.h:163
std::uint32_t width
Definition: D3D11_3.h:156
D3D11_TEXTURE_LAYOUT textureLayout
Definition: D3D11_3.h:165
DXGI_FORMAT format
Definition: D3D11_3.h:160
std::uint32_t bindFlags
Definition: D3D11_3.h:162
std::uint32_t depth
Definition: D3D11_3.h:158
std::uint32_t height
Definition: D3D11_3.h:157
std::uint32_t mipLevels
Definition: D3D11_3.h:159
std::uint32_t miscFlags
Definition: D3D11_3.h:164
D3D11_TEX1D_ARRAY_UAV texture1DArray
Definition: D3D11_3.h:196
D3D11_TEX2D_UAV1 texture2D
Definition: D3D11_3.h:197
D3D11_UAV_DIMENSION viewDimension
Definition: D3D11_3.h:191
D3D11_TEX2D_ARRAY_UAV1 texture2DArray
Definition: D3D11_3.h:198
DXGI_FORMAT format
Definition: D3D11_3.h:190
D3D11_BUFFER_UAV buffer
Definition: D3D11_3.h:194
D3D11_TEX3D_UAV texture3D
Definition: D3D11_3.h:199
D3D11_TEX1D_UAV texture1D
Definition: D3D11_3.h:195
Definition: DXGI.h:367
Definition: BASE.h:62