Diligent Engine  v.2.4.g
DeviceContext.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019-2021 Diligent Graphics LLC
3  * Copyright 2015-2019 Egor Yusov
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * In no event and under no legal theory, whether in tort (including negligence),
18  * contract, or otherwise, unless required by applicable law (such as deliberate
19  * and grossly negligent acts) or agreed to in writing, shall any Contributor be
20  * liable for any damages, including any direct, indirect, special, incidental,
21  * or consequential damages of any character arising as a result of this License or
22  * out of the use or inability to use the software (including but not limited to damages
23  * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
24  * all other commercial damages or losses), even if such Contributor has been advised
25  * of the possibility of such damages.
26  */
27 
28 #pragma once
29 
30 // clang-format off
31 
34 
35 #include "../../../Primitives/interface/Object.h"
36 #include "../../../Primitives/interface/FlagEnum.h"
37 #include "GraphicsTypes.h"
38 #include "Constants.h"
39 #include "Buffer.h"
40 #include "InputLayout.h"
41 #include "Shader.h"
42 #include "Texture.h"
43 #include "Sampler.h"
44 #include "ResourceMapping.h"
45 #include "TextureView.h"
46 #include "BufferView.h"
47 #include "DepthStencilState.h"
48 #include "BlendState.h"
49 #include "PipelineState.h"
50 #include "Fence.h"
51 #include "Query.h"
52 #include "RenderPass.h"
53 #include "Framebuffer.h"
54 #include "CommandList.h"
55 #include "SwapChain.h"
56 #include "BottomLevelAS.h"
57 #include "TopLevelAS.h"
58 #include "ShaderBindingTable.h"
59 
61 
62 
63 // {DC92711B-A1BE-4319-B2BD-C662D1CC19E4}
64 static const INTERFACE_ID IID_DeviceContext =
65  {0xdc92711b, 0xa1be, 0x4319, {0xb2, 0xbd, 0xc6, 0x62, 0xd1, 0xcc, 0x19, 0xe4}};
66 
69 {
72 
77 
80 
83 
86 
128 };
130 
131 
132 
137 {
141 
153 
163 };
164 
165 
167 
170 {
172  Uint32 NumVertices DEFAULT_INITIALIZER(0);
173 
176 
179  Uint32 NumInstances DEFAULT_INITIALIZER(1);
180 
183  Uint32 StartVertexLocation DEFAULT_INITIALIZER(0);
184 
187  Uint32 FirstInstanceLocation DEFAULT_INITIALIZER(0);
188 
189 
190 #if DILIGENT_CPP_INTERFACE
191 
202  DrawAttribs()noexcept{}
203 
205  DrawAttribs(Uint32 _NumVertices,
206  DRAW_FLAGS _Flags,
207  Uint32 _NumInstances = 1,
208  Uint32 _StartVertexLocation = 0,
209  Uint32 _FirstInstanceLocation = 0)noexcept :
210  NumVertices {_NumVertices },
211  Flags {_Flags },
212  NumInstances {_NumInstances },
213  StartVertexLocation {_StartVertexLocation },
214  FirstInstanceLocation{_FirstInstanceLocation}
215  {}
216 #endif
217 };
218 typedef struct DrawAttribs DrawAttribs;
219 
220 
222 
225 {
228 
232 
235 
238  Uint32 NumInstances DEFAULT_INITIALIZER(1);
239 
242  Uint32 FirstIndexLocation DEFAULT_INITIALIZER(0);
243 
246 
249  Uint32 FirstInstanceLocation DEFAULT_INITIALIZER(0);
250 
251 
252 #if DILIGENT_CPP_INTERFACE
253 
265  DrawIndexedAttribs()noexcept{}
266 
269  VALUE_TYPE _IndexType,
270  DRAW_FLAGS _Flags,
271  Uint32 _NumInstances = 1,
272  Uint32 _FirstIndexLocation = 0,
273  Uint32 _BaseVertex = 0,
274  Uint32 _FirstInstanceLocation = 0)noexcept :
275  NumIndices {_NumIndices },
276  IndexType {_IndexType },
277  Flags {_Flags },
278  NumInstances {_NumInstances },
279  FirstIndexLocation {_FirstIndexLocation },
280  BaseVertex {_BaseVertex },
281  FirstInstanceLocation{_FirstInstanceLocation}
282  {}
283 #endif
284 };
286 
287 
289 
292 {
295 
298 
300  Uint32 IndirectDrawArgsOffset DEFAULT_INITIALIZER(0);
301 
302 
303 #if DILIGENT_CPP_INTERFACE
304 
313 
316  RESOURCE_STATE_TRANSITION_MODE _IndirectAttribsBufferStateTransitionMode,
317  Uint32 _IndirectDrawArgsOffset = 0)noexcept :
318  Flags {_Flags },
319  IndirectAttribsBufferStateTransitionMode{_IndirectAttribsBufferStateTransitionMode},
320  IndirectDrawArgsOffset {_IndirectDrawArgsOffset }
321  {}
322 #endif
323 };
325 
326 
328 
331 {
335 
338 
341 
343  Uint32 IndirectDrawArgsOffset DEFAULT_INITIALIZER(0);
344 
345 
346 #if DILIGENT_CPP_INTERFACE
347 
357 
360  DRAW_FLAGS _Flags,
361  RESOURCE_STATE_TRANSITION_MODE _IndirectAttribsBufferStateTransitionMode,
362  Uint32 _IndirectDrawArgsOffset = 0)noexcept :
363  IndexType {_IndexType },
364  Flags {_Flags },
365  IndirectAttribsBufferStateTransitionMode{_IndirectAttribsBufferStateTransitionMode},
366  IndirectDrawArgsOffset {_IndirectDrawArgsOffset }
367  {}
368 #endif
369 };
371 
372 
374 
377 {
379  Uint32 ThreadGroupCount DEFAULT_INITIALIZER(1);
380 
383 
384 #if DILIGENT_CPP_INTERFACE
385  DrawMeshAttribs()noexcept{}
387 
389  DrawMeshAttribs(Uint32 _ThreadGroupCount,
390  DRAW_FLAGS _Flags)noexcept :
391  ThreadGroupCount {_ThreadGroupCount},
392  Flags {_Flags}
393  {}
394 #endif
395 };
397 
398 
400 
403 {
406 
409 
411  Uint32 IndirectDrawArgsOffset DEFAULT_INITIALIZER(0);
412 
413 #if DILIGENT_CPP_INTERFACE
414 
423 
426  RESOURCE_STATE_TRANSITION_MODE _IndirectAttribsBufferStateTransitionMode,
427  Uint32 _IndirectDrawArgsOffset = 0)noexcept :
428  Flags {_Flags },
429  IndirectAttribsBufferStateTransitionMode{_IndirectAttribsBufferStateTransitionMode},
430  IndirectDrawArgsOffset {_IndirectDrawArgsOffset }
431  {}
432 #endif
433 };
435 
436 
438 
441 {
444 
446  Uint32 MaxCommandCount DEFAULT_INITIALIZER(1);
447 
450 
452  Uint32 IndirectDrawArgsOffset DEFAULT_INITIALIZER(0);
453 
456 
458  Uint32 CountBufferOffset DEFAULT_INITIALIZER(0);
459 
460 #if DILIGENT_CPP_INTERFACE
462 
465  RESOURCE_STATE_TRANSITION_MODE _IndirectAttribsBufferStateTransitionMode,
466  Uint32 _IndirectDrawArgsOffset,
467  RESOURCE_STATE_TRANSITION_MODE _CountBufferStateTransitionMode,
468  Uint32 _CountBufferOffset)noexcept :
469  Flags {_Flags },
470  IndirectAttribsBufferStateTransitionMode{_IndirectAttribsBufferStateTransitionMode},
471  IndirectDrawArgsOffset {_IndirectDrawArgsOffset },
472  CountBufferStateTransitionMode {_CountBufferStateTransitionMode },
473  CountBufferOffset {_CountBufferOffset }
474  {}
475 #endif
476 };
478 
479 
481 
484 {
487 
490 
493 };
495 
496 
497 
501 {
502  Uint32 ThreadGroupCountX DEFAULT_INITIALIZER(1);
503  Uint32 ThreadGroupCountY DEFAULT_INITIALIZER(1);
504  Uint32 ThreadGroupCountZ DEFAULT_INITIALIZER(1);
505 
506 #if DILIGENT_CPP_INTERFACE
508 
510  DispatchComputeAttribs(Uint32 GroupsX, Uint32 GroupsY, Uint32 GroupsZ = 1)noexcept :
511  ThreadGroupCountX {GroupsX},
512  ThreadGroupCountY {GroupsY},
513  ThreadGroupCountZ {GroupsZ}
514  {}
515 #endif
516 };
518 
519 
521 
524 {
527 
529  Uint32 DispatchArgsByteOffset DEFAULT_INITIALIZER(0);
530 
531 #if DILIGENT_CPP_INTERFACE
533 
535  explicit
537  Uint32 Offset = 0) :
538  IndirectAttribsBufferStateTransitionMode{StateTransitionMode},
539  DispatchArgsByteOffset {Offset }
540  {}
541 #endif
542 };
544 
545 
547 
550 {
552  Uint32 SrcMipLevel DEFAULT_INITIALIZER(0);
553 
556 
559 
561  Uint32 DstMipLevel DEFAULT_INITIALIZER(0);
562 
565 
568 
573 };
575 
576 
579 {
582 
586 };
588 
589 
590 
593 struct Viewport
594 {
597 
603 
606 
609 
612 
615 
616 #if DILIGENT_CPP_INTERFACE
617  Viewport(Float32 _TopLeftX, Float32 _TopLeftY,
619  Float32 _Width, Float32 _Height,
620  Float32 _MinDepth = 0, Float32 _MaxDepth = 1)noexcept :
621  TopLeftX {_TopLeftX},
622  TopLeftY {_TopLeftY},
623  Width {_Width },
624  Height {_Height },
625  MinDepth {_MinDepth},
626  MaxDepth {_MaxDepth}
627  {}
628 
629  Viewport()noexcept{}
630 #endif
631 };
632 typedef struct Viewport Viewport;
633 
634 
636 
642 struct Rect
643 {
648 
649 #if DILIGENT_CPP_INTERFACE
650  Rect(Int32 _left, Int32 _top, Int32 _right, Int32 _bottom)noexcept :
652  left {_left },
653  top {_top },
654  right {_right },
655  bottom {_bottom}
656  {}
657 
658  Rect()noexcept{}
659 
660  bool IsValid() const
661  {
662  return right > left && bottom > top;
663  }
664 #endif
665 };
666 typedef struct Rect Rect;
667 
668 
670 
673 {
675  ITexture* pSrcTexture DEFAULT_INITIALIZER(nullptr);
676 
678  Uint32 SrcMipLevel DEFAULT_INITIALIZER(0);
679 
682 
684  const Box* pSrcBox DEFAULT_INITIALIZER(nullptr);
685 
688 
690  ITexture* pDstTexture DEFAULT_INITIALIZER(nullptr);
691 
693  Uint32 DstMipLevel DEFAULT_INITIALIZER(0);
694 
697 
700 
703 
706 
709 
710 
711 #if DILIGENT_CPP_INTERFACE
712  CopyTextureAttribs()noexcept{}
713 
715  RESOURCE_STATE_TRANSITION_MODE _SrcTextureTransitionMode,
716  ITexture* _pDstTexture,
717  RESOURCE_STATE_TRANSITION_MODE _DstTextureTransitionMode)noexcept :
718  pSrcTexture {_pSrcTexture },
719  SrcTextureTransitionMode{_SrcTextureTransitionMode},
720  pDstTexture {_pDstTexture },
721  DstTextureTransitionMode{_DstTextureTransitionMode}
722  {}
723 #endif
724 };
726 
727 
729 
732 {
734  IRenderPass* pRenderPass DEFAULT_INITIALIZER(nullptr);
735 
737  IFramebuffer* pFramebuffer DEFAULT_INITIALIZER(nullptr);
738 
740  Uint32 ClearValueCount DEFAULT_INITIALIZER(0);
741 
747  OptimizedClearValue* pClearValues DEFAULT_INITIALIZER(nullptr);
748 
750 
762 };
764 
765 
768 {
770 
773 
778 
782 
786 
788 };
790 
791 
792 
796 {
800 
806 
808 };
809 
810 
813 {
815 
818 
822 
824 };
826 
827 
830 {
833  const char* GeometryName DEFAULT_INITIALIZER(nullptr);
834 
838  IBuffer* pVertexBuffer DEFAULT_INITIALIZER(nullptr);
839 
841  Uint32 VertexOffset DEFAULT_INITIALIZER(0);
842 
844  Uint32 VertexStride DEFAULT_INITIALIZER(0);
845 
848  Uint32 VertexCount DEFAULT_INITIALIZER(0);
849 
853 
856  Uint8 VertexComponentCount DEFAULT_INITIALIZER(0);
857 
860  Uint32 PrimitiveCount DEFAULT_INITIALIZER(0);
861 
865  IBuffer* pIndexBuffer DEFAULT_INITIALIZER(nullptr);
866 
868  Uint32 IndexOffset DEFAULT_INITIALIZER(0);
869 
873 
876  IBuffer* pTransformBuffer DEFAULT_INITIALIZER(nullptr);
877 
879  Uint32 TransformBufferOffset DEFAULT_INITIALIZER(0);
880 
883 
884 #if DILIGENT_CPP_INTERFACE
885  BLASBuildTriangleData() noexcept {}
886 #endif
887 };
889 
890 
893 {
896  const char* GeometryName DEFAULT_INITIALIZER(nullptr);
897 
902  IBuffer* pBoxBuffer DEFAULT_INITIALIZER(nullptr);
903 
906 
909 
913 
916 
917 #if DILIGENT_CPP_INTERFACE
919 #endif
920 };
922 
923 
926 {
930 
933 
936 
942  BLASBuildTriangleData const* pTriangleData DEFAULT_INITIALIZER(nullptr);
943 
947  Uint32 TriangleDataCount DEFAULT_INITIALIZER(0);
948 
955 
959  Uint32 BoxDataCount DEFAULT_INITIALIZER(0);
960 
964  IBuffer* pScratchBuffer DEFAULT_INITIALIZER(nullptr);
965 
967  Uint32 ScratchBufferOffset DEFAULT_INITIALIZER(0);
968 
971 
976  Bool Update DEFAULT_INITIALIZER(False);
977 
978 #if DILIGENT_CPP_INTERFACE
979  BuildBLASAttribs() noexcept {}
980 #endif
981 };
983 
984 
995 static const Uint32 TLAS_INSTANCE_OFFSET_AUTO = ~0u;
996 
997 
1000 {
1005  float data [3][4];
1006 
1007 #if DILIGENT_CPP_INTERFACE
1008  InstanceMatrix() noexcept :
1010  data{{1.0f, 0.0f, 0.0f, 0.0f},
1011  {0.0f, 1.0f, 0.0f, 0.0f},
1012  {0.0f, 0.0f, 1.0f, 0.0f}}
1013  {}
1014 
1015  InstanceMatrix(const InstanceMatrix&) noexcept = default;
1016 
1018  InstanceMatrix& SetTranslation(float x, float y, float z) noexcept
1019  {
1020  data[0][3] = x;
1021  data[1][3] = y;
1022  data[2][3] = z;
1023  return *this;
1024  }
1025 
1027  InstanceMatrix& SetRotation(const float* pMatrix3x3) noexcept
1028  {
1029  data[0][0] = pMatrix3x3[0]; data[1][0] = pMatrix3x3[1]; data[2][0] = pMatrix3x3[2];
1030  data[0][1] = pMatrix3x3[3]; data[1][1] = pMatrix3x3[4]; data[2][1] = pMatrix3x3[5];
1031  data[0][2] = pMatrix3x3[6]; data[1][2] = pMatrix3x3[7]; data[2][2] = pMatrix3x3[8];
1032  return *this;
1033  }
1034 #endif
1035 };
1037 
1038 
1041 {
1043  const char* InstanceName DEFAULT_INITIALIZER(nullptr);
1044 
1049 
1052 
1056 
1059 
1063 
1067  Uint32 ContributionToHitGroupIndex DEFAULT_INITIALIZER(TLAS_INSTANCE_OFFSET_AUTO);
1068 
1069 #if DILIGENT_CPP_INTERFACE
1071 #endif
1072 };
1074 
1075 
1078 static const Uint32 TLAS_INSTANCE_DATA_SIZE = 64;
1079 
1080 
1083 {
1087 
1090 
1093 
1098  TLASBuildInstanceData const* pInstances DEFAULT_INITIALIZER(nullptr);
1099 
1103  Uint32 InstanceCount DEFAULT_INITIALIZER(0);
1104 
1108  IBuffer* pInstanceBuffer DEFAULT_INITIALIZER(nullptr);
1109 
1111  Uint32 InstanceBufferOffset DEFAULT_INITIALIZER(0);
1112 
1115 
1121  Uint32 HitGroupStride DEFAULT_INITIALIZER(1);
1122 
1127  Uint32 BaseContributionToHitGroupIndex DEFAULT_INITIALIZER(0);
1128 
1132 
1137  IBuffer* pScratchBuffer DEFAULT_INITIALIZER(nullptr);
1138 
1140  Uint32 ScratchBufferOffset DEFAULT_INITIALIZER(0);
1141 
1144 
1149  Bool Update DEFAULT_INITIALIZER(False);
1150 
1151 #if DILIGENT_CPP_INTERFACE
1152  BuildTLASAttribs() noexcept {}
1153 #endif
1154 };
1156 
1157 
1160 {
1164 
1170 
1173 
1176 
1179 
1180 #if DILIGENT_CPP_INTERFACE
1181  CopyBLASAttribs() noexcept {}
1182 #endif
1183 };
1185 
1186 
1189 {
1193 
1199 
1202 
1205 
1208 
1209 #if DILIGENT_CPP_INTERFACE
1210  CopyTLASAttribs() noexcept {}
1211 #endif
1212 };
1214 
1215 
1218 {
1221 
1223  IBuffer* pDestBuffer DEFAULT_INITIALIZER(nullptr);
1224 
1226  Uint32 DestBufferOffset DEFAULT_INITIALIZER(0);
1227 
1230 
1233 
1234 #if DILIGENT_CPP_INTERFACE
1236 #endif
1237 };
1239 
1240 
1243 {
1246 
1248  IBuffer* pDestBuffer DEFAULT_INITIALIZER(nullptr);
1249 
1251  Uint32 DestBufferOffset DEFAULT_INITIALIZER(0);
1252 
1255 
1258 
1259 #if DILIGENT_CPP_INTERFACE
1261 #endif
1262 };
1264 
1265 
1268 {
1271 
1272  Uint32 DimensionX DEFAULT_INITIALIZER(1);
1273  Uint32 DimensionY DEFAULT_INITIALIZER(1);
1274  Uint32 DimensionZ DEFAULT_INITIALIZER(1);
1275 
1276 #if DILIGENT_CPP_INTERFACE
1277  TraceRaysAttribs() noexcept {}
1278 #endif
1279 };
1281 
1282 
1285 {
1288 
1291 
1293  Uint32 ArgsByteOffset DEFAULT_INITIALIZER(0);
1294 
1295 #if DILIGENT_CPP_INTERFACE
1297 #endif
1298 };
1300 
1301 
1304 {
1306  IBuffer* pAttribsBuffer DEFAULT_INITIALIZER(nullptr);
1307 
1309  Uint32 AttribsBufferOffset DEFAULT_INITIALIZER(0);
1310 
1313 
1314 #if DILIGENT_CPP_INTERFACE
1316 
1317  explicit UpdateIndirectRTBufferAttribs(IBuffer* _pAttribsBuffer,
1318  Uint32 _AttribsBufferOffset = 0,
1320  pAttribsBuffer {_pAttribsBuffer },
1321  AttribsBufferOffset{_AttribsBufferOffset},
1322  TransitionMode {_TransitionMode }
1323  {}
1324 #endif
1325 };
1327 
1328 
1329 static const Uint32 REMAINING_MIP_LEVELS = ~0u;
1330 static const Uint32 REMAINING_ARRAY_SLICES = ~0u;
1331 
1334 {
1337  struct IDeviceObject* pResource DEFAULT_INITIALIZER(nullptr);
1338 
1340  Uint32 FirstMipLevel DEFAULT_INITIALIZER(0);
1341 
1343  Uint32 MipLevelsCount DEFAULT_INITIALIZER(REMAINING_MIP_LEVELS);
1344 
1347 
1349  Uint32 ArraySliceCount DEFAULT_INITIALIZER(REMAINING_ARRAY_SLICES);
1350 
1354 
1357 
1359 
1363 
1370  bool UpdateResourceState DEFAULT_INITIALIZER(false);
1371 
1372 #if DILIGENT_CPP_INTERFACE
1374 
1376  RESOURCE_STATE _OldState,
1377  RESOURCE_STATE _NewState,
1378  Uint32 _FirstMipLevel = 0,
1379  Uint32 _MipLevelsCount = REMAINING_MIP_LEVELS,
1380  Uint32 _FirstArraySlice = 0,
1381  Uint32 _ArraySliceCount = REMAINING_ARRAY_SLICES,
1383  bool _UpdateState = false)noexcept :
1384  pResource {static_cast<IDeviceObject*>(_pTexture)},
1385  FirstMipLevel {_FirstMipLevel },
1386  MipLevelsCount {_MipLevelsCount },
1387  FirstArraySlice {_FirstArraySlice},
1388  ArraySliceCount {_ArraySliceCount},
1389  OldState {_OldState },
1390  NewState {_NewState },
1391  TransitionType {_TransitionType },
1392  UpdateResourceState {_UpdateState }
1393  {}
1394 
1396  RESOURCE_STATE _OldState,
1397  RESOURCE_STATE _NewState,
1398  bool _UpdateState)noexcept :
1400  {
1401  _pTexture,
1402  _OldState,
1403  _NewState,
1404  0,
1405  REMAINING_MIP_LEVELS,
1406  0,
1407  REMAINING_ARRAY_SLICES,
1409  _UpdateState
1410  }
1411  {}
1412 
1414  RESOURCE_STATE _OldState,
1415  RESOURCE_STATE _NewState,
1416  bool _UpdateState)noexcept :
1417  pResource {_pBuffer },
1418  OldState {_OldState },
1419  NewState {_NewState },
1420  UpdateResourceState {_UpdateState}
1421  {}
1422 
1424  RESOURCE_STATE _OldState,
1425  RESOURCE_STATE _NewState,
1426  bool _UpdateState)noexcept :
1427  pResource {_pBLAS },
1428  OldState {_OldState },
1429  NewState {_NewState },
1430  UpdateResourceState {_UpdateState}
1431  {}
1432 
1434  RESOURCE_STATE _OldState,
1435  RESOURCE_STATE _NewState,
1436  bool _UpdateState)noexcept :
1437  pResource {_pTLAS },
1438  OldState {_OldState },
1439  NewState {_NewState },
1440  UpdateResourceState {_UpdateState}
1441  {}
1442 #endif
1443 };
1445 
1446 
1447 #define DILIGENT_INTERFACE_NAME IDeviceContext
1448 #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
1449 
1450 #define IDeviceContextInclusiveMethods \
1451  IObjectInclusiveMethods; \
1452  IDeviceContextMethods DeviceContext
1453 
1455 
1461 {
1463 
1465  VIRTUAL void METHOD(SetPipelineState)(THIS_
1466  IPipelineState* pPipelineState) PURE;
1467 
1468 
1487  VIRTUAL void METHOD(TransitionShaderResources)(THIS_
1488  IPipelineState* pPipelineState,
1489  IShaderResourceBinding* pShaderResourceBinding) PURE;
1490 
1492 
1528  VIRTUAL void METHOD(CommitShaderResources)(THIS_
1529  IShaderResourceBinding* pShaderResourceBinding,
1530  RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) PURE;
1531 
1533 
1535  VIRTUAL void METHOD(SetStencilRef)(THIS_
1536  Uint32 StencilRef) PURE;
1537 
1538 
1545  VIRTUAL void METHOD(SetBlendFactors)(THIS_
1546  const float* pBlendFactors DEFAULT_VALUE(nullptr)) PURE;
1547 
1548 
1550 
1579  VIRTUAL void METHOD(SetVertexBuffers)(THIS_
1580  Uint32 StartSlot,
1581  Uint32 NumBuffersSet,
1582  IBuffer** ppBuffers,
1583  Uint32* pOffsets,
1584  RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
1586 
1587 
1589 
1592  VIRTUAL void METHOD(InvalidateState)(THIS) PURE;
1593 
1594 
1596 
1616  VIRTUAL void METHOD(SetIndexBuffer)(THIS_
1617  IBuffer* pIndexBuffer,
1618  Uint32 ByteOffset,
1619  RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) PURE;
1620 
1621 
1623 
1640  VIRTUAL void METHOD(SetViewports)(THIS_
1641  Uint32 NumViewports,
1642  const Viewport* pViewports,
1643  Uint32 RTWidth,
1644  Uint32 RTHeight) PURE;
1645 
1646 
1648 
1661  VIRTUAL void METHOD(SetScissorRects)(THIS_
1662  Uint32 NumRects,
1663  const Rect* pRects,
1664  Uint32 RTWidth,
1665  Uint32 RTHeight) PURE;
1666 
1667 
1670 
1695  VIRTUAL void METHOD(SetRenderTargets)(THIS_
1696  Uint32 NumRenderTargets,
1697  ITextureView* ppRenderTargets[],
1698  ITextureView* pDepthStencil,
1699  RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) PURE;
1700 
1701 
1703 
1705  VIRTUAL void METHOD(BeginRenderPass)(THIS_
1706  const BeginRenderPassAttribs REF Attribs) PURE;
1707 
1708 
1710  VIRTUAL void METHOD(NextSubpass)(THIS) PURE;
1711 
1712 
1714  VIRTUAL void METHOD(EndRenderPass)(THIS) PURE;
1715 
1716 
1718 
1727  VIRTUAL void METHOD(Draw)(THIS_
1728  const DrawAttribs REF Attribs) PURE;
1729 
1730 
1732 
1741  VIRTUAL void METHOD(DrawIndexed)(THIS_
1742  const DrawIndexedAttribs REF Attribs) PURE;
1743 
1744 
1746 
1765  VIRTUAL void METHOD(DrawIndirect)(THIS_
1766  const DrawIndirectAttribs REF Attribs,
1767  IBuffer* pAttribsBuffer) PURE;
1768 
1769 
1771 
1791  VIRTUAL void METHOD(DrawIndexedIndirect)(THIS_
1792  const DrawIndexedIndirectAttribs REF Attribs,
1793  IBuffer* pAttribsBuffer) PURE;
1794 
1795 
1797 
1803  VIRTUAL void METHOD(DrawMesh)(THIS_
1804  const DrawMeshAttribs REF Attribs) PURE;
1805 
1806 
1808 
1829  VIRTUAL void METHOD(DrawMeshIndirect)(THIS_
1830  const DrawMeshIndirectAttribs REF Attribs,
1831  IBuffer* pAttribsBuffer) PURE;
1832 
1833 
1835 
1858  VIRTUAL void METHOD(DrawMeshIndirectCount)(THIS_
1859  const DrawMeshIndirectCountAttribs REF Attribs,
1860  IBuffer* pAttribsBuffer,
1861  IBuffer* pCountBuffer) PURE;
1862 
1863 
1865 
1867  VIRTUAL void METHOD(DispatchCompute)(THIS_
1868  const DispatchComputeAttribs REF Attribs) PURE;
1869 
1870 
1872 
1886  VIRTUAL void METHOD(DispatchComputeIndirect)(THIS_
1887  const DispatchComputeIndirectAttribs REF Attribs,
1888  IBuffer* pAttribsBuffer) PURE;
1889 
1890 
1892 
1912  VIRTUAL void METHOD(ClearDepthStencil)(THIS_
1913  ITextureView* pView,
1914  CLEAR_DEPTH_STENCIL_FLAGS ClearFlags,
1915  float fDepth,
1916  Uint8 Stencil,
1917  RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) PURE;
1918 
1919 
1921 
1945  VIRTUAL void METHOD(ClearRenderTarget)(THIS_
1946  ITextureView* pView,
1947  const float* RGBA,
1948  RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) PURE;
1949 
1950 
1952 
1954  VIRTUAL void METHOD(FinishCommandList)(THIS_
1955  ICommandList** ppCommandList) PURE;
1956 
1957 
1959 
1963  VIRTUAL void METHOD(ExecuteCommandLists)(THIS_
1964  Uint32 NumCommandLists,
1965  ICommandList* const* ppCommandLists) PURE;
1966 
1967 
1969 
1978  VIRTUAL void METHOD(SignalFence)(THIS_
1979  IFence* pFence,
1980  Uint64 Value) PURE;
1981 
1982 
1984 
2002  VIRTUAL void METHOD(WaitForFence)(THIS_
2003  IFence* pFence,
2004  Uint64 Value,
2005  bool FlushContext) PURE;
2006 
2007 
2009 
2016  VIRTUAL void METHOD(WaitForIdle)(THIS) PURE;
2017 
2018 
2020 
2037  VIRTUAL void METHOD(BeginQuery)(THIS_
2038  IQuery* pQuery) PURE;
2039 
2040 
2042 
2054  VIRTUAL void METHOD(EndQuery)(THIS_
2055  IQuery* pQuery) PURE;
2056 
2057 
2059 
2067  VIRTUAL void METHOD(Flush)(THIS) PURE;
2068 
2069 
2071 
2077  VIRTUAL void METHOD(UpdateBuffer)(THIS_
2078  IBuffer* pBuffer,
2079  Uint32 Offset,
2080  Uint32 Size,
2081  const void* pData,
2082  RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) PURE;
2083 
2084 
2086 
2095  VIRTUAL void METHOD(CopyBuffer)(THIS_
2096  IBuffer* pSrcBuffer,
2097  Uint32 SrcOffset,
2098  RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
2099  IBuffer* pDstBuffer,
2100  Uint32 DstOffset,
2101  Uint32 Size,
2102  RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) PURE;
2103 
2104 
2106 
2111  VIRTUAL void METHOD(MapBuffer)(THIS_
2112  IBuffer* pBuffer,
2113  MAP_TYPE MapType,
2114  MAP_FLAGS MapFlags,
2115  PVoid REF pMappedData) PURE;
2116 
2117 
2119 
2123  VIRTUAL void METHOD(UnmapBuffer)(THIS_
2124  IBuffer* pBuffer,
2125  MAP_TYPE MapType) PURE;
2126 
2127 
2129 
2139  VIRTUAL void METHOD(UpdateTexture)(THIS_
2140  ITexture* pTexture,
2141  Uint32 MipLevel,
2142  Uint32 Slice,
2143  const Box REF DstBox,
2144  const TextureSubResData REF SubresData,
2145  RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode,
2146  RESOURCE_STATE_TRANSITION_MODE TextureTransitionMode) PURE;
2147 
2148 
2150 
2152  VIRTUAL void METHOD(CopyTexture)(THIS_
2153  const CopyTextureAttribs REF CopyAttribs) PURE;
2154 
2155 
2157 
2170  VIRTUAL void METHOD(MapTextureSubresource)(THIS_
2171  ITexture* pTexture,
2172  Uint32 MipLevel,
2173  Uint32 ArraySlice,
2174  MAP_TYPE MapType,
2175  MAP_FLAGS MapFlags,
2176  const Box* pMapRegion,
2177  MappedTextureSubresource REF MappedData) PURE;
2178 
2179 
2181  VIRTUAL void METHOD(UnmapTextureSubresource)(THIS_
2182  ITexture* pTexture,
2183  Uint32 MipLevel,
2184  Uint32 ArraySlice) PURE;
2185 
2186 
2188 
2192  VIRTUAL void METHOD(GenerateMips)(THIS_
2193  ITextureView* pTextureView) PURE;
2194 
2195 
2197 
2208  VIRTUAL void METHOD(FinishFrame)(THIS) PURE;
2209 
2210 
2212 
2214  VIRTUAL Uint64 METHOD(GetFrameNumber)(THIS) CONST PURE;
2215 
2216 
2218 
2246  VIRTUAL void METHOD(TransitionResourceStates)(THIS_
2247  Uint32 BarrierCount,
2248  StateTransitionDesc* pResourceBarriers) PURE;
2249 
2250 
2252 
2256  VIRTUAL void METHOD(ResolveTextureSubresource)(THIS_
2257  ITexture* pSrcTexture,
2258  ITexture* pDstTexture,
2259  const ResolveTextureSubresourceAttribs REF ResolveAttribs) PURE;
2260 
2261 
2263 
2268  VIRTUAL void METHOD(BuildBLAS)(THIS_
2269  const BuildBLASAttribs REF Attribs) PURE;
2270 
2271 
2273 
2278  VIRTUAL void METHOD(BuildTLAS)(THIS_
2279  const BuildTLASAttribs REF Attribs) PURE;
2280 
2281 
2283 
2288  VIRTUAL void METHOD(CopyBLAS)(THIS_
2289  const CopyBLASAttribs REF Attribs) PURE;
2290 
2291 
2293 
2298  VIRTUAL void METHOD(CopyTLAS)(THIS_
2299  const CopyTLASAttribs REF Attribs) PURE;
2300 
2301 
2303 
2305  VIRTUAL void METHOD(WriteBLASCompactedSize)(THIS_
2306  const WriteBLASCompactedSizeAttribs REF Attribs) PURE;
2307 
2308 
2310 
2312  VIRTUAL void METHOD(WriteTLASCompactedSize)(THIS_
2313  const WriteTLASCompactedSizeAttribs REF Attribs) PURE;
2314 
2315 
2317 
2324  VIRTUAL void METHOD(TraceRays)(THIS_
2325  const TraceRaysAttribs REF Attribs) PURE;
2326 
2327 
2329 
2343  VIRTUAL void METHOD(TraceRaysIndirect)(THIS_
2344  const TraceRaysIndirectAttribs REF Attribs,
2345  IBuffer* pAttribsBuffer) PURE;
2346 
2347 
2349 
2364  VIRTUAL void METHOD(UpdateSBT)(THIS_
2365  IShaderBindingTable* pSBT,
2366  const UpdateIndirectRTBufferAttribs* pUpdateIndirectBufferAttribs DEFAULT_INITIALIZER(nullptr)) PURE;
2367 };
2369 
2370 #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
2371 
2372 #if DILIGENT_C_INTERFACE
2373 
2374 // clang-format off
2375 
2376 # define IDeviceContext_SetPipelineState(This, ...) CALL_IFACE_METHOD(DeviceContext, SetPipelineState, This, __VA_ARGS__)
2377 # define IDeviceContext_TransitionShaderResources(This, ...) CALL_IFACE_METHOD(DeviceContext, TransitionShaderResources, This, __VA_ARGS__)
2378 # define IDeviceContext_CommitShaderResources(This, ...) CALL_IFACE_METHOD(DeviceContext, CommitShaderResources, This, __VA_ARGS__)
2379 # define IDeviceContext_SetStencilRef(This, ...) CALL_IFACE_METHOD(DeviceContext, SetStencilRef, This, __VA_ARGS__)
2380 # define IDeviceContext_SetBlendFactors(This, ...) CALL_IFACE_METHOD(DeviceContext, SetBlendFactors, This, __VA_ARGS__)
2381 # define IDeviceContext_SetVertexBuffers(This, ...) CALL_IFACE_METHOD(DeviceContext, SetVertexBuffers, This, __VA_ARGS__)
2382 # define IDeviceContext_InvalidateState(This) CALL_IFACE_METHOD(DeviceContext, InvalidateState, This)
2383 # define IDeviceContext_SetIndexBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, SetIndexBuffer, This, __VA_ARGS__)
2384 # define IDeviceContext_SetViewports(This, ...) CALL_IFACE_METHOD(DeviceContext, SetViewports, This, __VA_ARGS__)
2385 # define IDeviceContext_SetScissorRects(This, ...) CALL_IFACE_METHOD(DeviceContext, SetScissorRects, This, __VA_ARGS__)
2386 # define IDeviceContext_SetRenderTargets(This, ...) CALL_IFACE_METHOD(DeviceContext, SetRenderTargets, This, __VA_ARGS__)
2387 # define IDeviceContext_Draw(This, ...) CALL_IFACE_METHOD(DeviceContext, Draw, This, __VA_ARGS__)
2388 # define IDeviceContext_DrawIndexed(This, ...) CALL_IFACE_METHOD(DeviceContext, DrawIndexed, This, __VA_ARGS__)
2389 # define IDeviceContext_DrawIndirect(This, ...) CALL_IFACE_METHOD(DeviceContext, DrawIndirect, This, __VA_ARGS__)
2390 # define IDeviceContext_DrawIndexedIndirect(This, ...) CALL_IFACE_METHOD(DeviceContext, DrawIndexedIndirect, This, __VA_ARGS__)
2391 # define IDeviceContext_DrawMesh(This, ...) CALL_IFACE_METHOD(DeviceContext, DrawMesh, This, __VA_ARGS__)
2392 # define IDeviceContext_DrawMeshIndirect(This, ...) CALL_IFACE_METHOD(DeviceContext, DrawMeshIndirect, This, __VA_ARGS__)
2393 # define IDeviceContext_DrawMeshIndirectCount(This, ...) CALL_IFACE_METHOD(DeviceContext, DrawMeshIndirectCount, This, __VA_ARGS__)
2394 # define IDeviceContext_DispatchCompute(This, ...) CALL_IFACE_METHOD(DeviceContext, DispatchCompute, This, __VA_ARGS__)
2395 # define IDeviceContext_DispatchComputeIndirect(This, ...) CALL_IFACE_METHOD(DeviceContext, DispatchComputeIndirect, This, __VA_ARGS__)
2396 # define IDeviceContext_ClearDepthStencil(This, ...) CALL_IFACE_METHOD(DeviceContext, ClearDepthStencil, This, __VA_ARGS__)
2397 # define IDeviceContext_ClearRenderTarget(This, ...) CALL_IFACE_METHOD(DeviceContext, ClearRenderTarget, This, __VA_ARGS__)
2398 # define IDeviceContext_FinishCommandList(This, ...) CALL_IFACE_METHOD(DeviceContext, FinishCommandList, This, __VA_ARGS__)
2399 # define IDeviceContext_ExecuteCommandLists(This, ...) CALL_IFACE_METHOD(DeviceContext, ExecuteCommandLists, This, __VA_ARGS__)
2400 # define IDeviceContext_SignalFence(This, ...) CALL_IFACE_METHOD(DeviceContext, SignalFence, This, __VA_ARGS__)
2401 # define IDeviceContext_WaitForFence(This, ...) CALL_IFACE_METHOD(DeviceContext, WaitForFence, This, __VA_ARGS__)
2402 # define IDeviceContext_WaitForIdle(This, ...) CALL_IFACE_METHOD(DeviceContext, WaitForIdle, This, __VA_ARGS__)
2403 # define IDeviceContext_BeginQuery(This, ...) CALL_IFACE_METHOD(DeviceContext, BeginQuery, This, __VA_ARGS__)
2404 # define IDeviceContext_EndQuery(This, ...) CALL_IFACE_METHOD(DeviceContext, EndQuery, This, __VA_ARGS__)
2405 # define IDeviceContext_Flush(This, ...) CALL_IFACE_METHOD(DeviceContext, Flush, This, __VA_ARGS__)
2406 # define IDeviceContext_UpdateBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, UpdateBuffer, This, __VA_ARGS__)
2407 # define IDeviceContext_CopyBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, CopyBuffer, This, __VA_ARGS__)
2408 # define IDeviceContext_MapBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, MapBuffer, This, __VA_ARGS__)
2409 # define IDeviceContext_UnmapBuffer(This, ...) CALL_IFACE_METHOD(DeviceContext, UnmapBuffer, This, __VA_ARGS__)
2410 # define IDeviceContext_UpdateTexture(This, ...) CALL_IFACE_METHOD(DeviceContext, UpdateTexture, This, __VA_ARGS__)
2411 # define IDeviceContext_CopyTexture(This, ...) CALL_IFACE_METHOD(DeviceContext, CopyTexture, This, __VA_ARGS__)
2412 # define IDeviceContext_MapTextureSubresource(This, ...) CALL_IFACE_METHOD(DeviceContext, MapTextureSubresource, This, __VA_ARGS__)
2413 # define IDeviceContext_UnmapTextureSubresource(This, ...) CALL_IFACE_METHOD(DeviceContext, UnmapTextureSubresource, This, __VA_ARGS__)
2414 # define IDeviceContext_GenerateMips(This, ...) CALL_IFACE_METHOD(DeviceContext, GenerateMips, This, __VA_ARGS__)
2415 # define IDeviceContext_FinishFrame(This) CALL_IFACE_METHOD(DeviceContext, FinishFrame, This)
2416 # define IDeviceContext_GetFrameNumber(This) CALL_IFACE_METHOD(DeviceContext, GetFrameNumber, This)
2417 # define IDeviceContext_TransitionResourceStates(This, ...) CALL_IFACE_METHOD(DeviceContext, TransitionResourceStates, This, __VA_ARGS__)
2418 # define IDeviceContext_ResolveTextureSubresource(This, ...) CALL_IFACE_METHOD(DeviceContext, ResolveTextureSubresource, This, __VA_ARGS__)
2419 # define IDeviceContext_BuildBLAS(This, ...) CALL_IFACE_METHOD(DeviceContext, BuildBLAS, This, __VA_ARGS__)
2420 # define IDeviceContext_BuildTLAS(This, ...) CALL_IFACE_METHOD(DeviceContext, BuildTLAS, This, __VA_ARGS__)
2421 # define IDeviceContext_CopyBLAS(This, ...) CALL_IFACE_METHOD(DeviceContext, CopyBLAS, This, __VA_ARGS__)
2422 # define IDeviceContext_CopyTLAS(This, ...) CALL_IFACE_METHOD(DeviceContext, CopyTLAS, This, __VA_ARGS__)
2423 # define IDeviceContext_WriteBLASCompactedSize(This, ...) CALL_IFACE_METHOD(DeviceContext, WriteBLASCompactedSize, This, __VA_ARGS__)
2424 # define IDeviceContext_WriteTLASCompactedSize(This, ...) CALL_IFACE_METHOD(DeviceContext, WriteTLASCompactedSize, This, __VA_ARGS__)
2425 # define IDeviceContext_TraceRays(This, ...) CALL_IFACE_METHOD(DeviceContext, TraceRays, This, __VA_ARGS__)
2426 # define IDeviceContext_TraceRaysIndirect(This, ...) CALL_IFACE_METHOD(DeviceContext, TraceRaysIndirect, This, __VA_ARGS__)
2427 # define IDeviceContext_UpdateSBT(This, ...) CALL_IFACE_METHOD(DeviceContext, UpdateSBT, This, __VA_ARGS__)
2428 
2429 // clang-format on
2430 
2431 #endif
2432 
2433 DILIGENT_END_NAMESPACE // namespace Diligent
Diligent::MAP_FLAGS
MAP_FLAGS
Special map flags.
Definition: GraphicsTypes.h:227
Texture.h
TopLevelAS.h
DILIGENT_END_INTERFACE
#define DILIGENT_END_INTERFACE
Definition: DefineInterfaceHelperMacros.h:88
Diligent::RAYTRACING_GEOMETRY_FLAGS_LAST
@ RAYTRACING_GEOMETRY_FLAGS_LAST
Definition: DeviceContext.h:823
Diligent::WriteBLASCompactedSizeAttribs::WriteBLASCompactedSizeAttribs
WriteBLASCompactedSizeAttribs() noexcept
Definition: DeviceContext.h:1235
Diligent::DrawMeshIndirectCountAttribs::DrawMeshIndirectCountAttribs
DrawMeshIndirectCountAttribs(DRAW_FLAGS _Flags, RESOURCE_STATE_TRANSITION_MODE _IndirectAttribsBufferStateTransitionMode, Uint32 _IndirectDrawArgsOffset, RESOURCE_STATE_TRANSITION_MODE _CountBufferStateTransitionMode, Uint32 _CountBufferOffset) noexcept
Initializes the structure members with user-specified values.
Definition: DeviceContext.h:464
Diligent::INTERFACE_ID
struct INTERFACE_ID INTERFACE_ID
Definition: InterfaceID.h:54
Diligent::DispatchComputeAttribs::DispatchComputeAttribs
DispatchComputeAttribs() noexcept
Definition: DeviceContext.h:507
VIRTUAL
#define VIRTUAL
Definition: DefineInterfaceHelperMacros.h:83
Diligent::PVoid
void * PVoid
Definition: BasicTypes.h:56
TextureView.h
Diligent::DrawAttribs::DrawAttribs
DrawAttribs(Uint32 _NumVertices, DRAW_FLAGS _Flags, Uint32 _NumInstances=1, Uint32 _StartVertexLocation=0, Uint32 _FirstInstanceLocation=0) noexcept
Initializes the structure with user-specified values.
Definition: DeviceContext.h:205
Diligent::UpdateIndirectRTBufferAttribs
This structure is used by IDeviceContext::UpdateSBT().
Definition: DeviceContext.h:1303
Diligent::TraceRaysIndirectAttribs
This structure is used by IDeviceContext::TraceRaysIndirect().
Definition: DeviceContext.h:1284
Diligent::IShaderResourceBinding
Shader resource binding interface.
Definition: ShaderResourceBinding.h:58
Diligent::COPY_AS_MODE
COPY_AS_MODE
Defines acceleration structure copy mode.
Definition: DeviceContext.h:795
Diligent::TraceRaysAttribs
This structure is used by IDeviceContext::TraceRays().
Definition: DeviceContext.h:1267
Diligent::CopyTLASAttribs::CopyTLASAttribs
CopyTLASAttribs() noexcept
Definition: DeviceContext.h:1210
Diligent::BeginRenderPassAttribs
BeginRenderPass command attributes.
Definition: DeviceContext.h:731
Diligent::IShaderBindingTable
Shader binding table interface.
Definition: ShaderBindingTable.h:93
Diligent::StateTransitionDesc::StateTransitionDesc
StateTransitionDesc(ITexture *_pTexture, RESOURCE_STATE _OldState, RESOURCE_STATE _NewState, bool _UpdateState) noexcept
Definition: DeviceContext.h:1395
Diligent::TLASBuildInstanceData::Transform
InstanceMatrix Transform
Instace to world transformation.
Definition: DeviceContext.h:1051
Diligent::DrawMeshIndirectCountAttribs
Defines the mesh indirect draw count command attributes.
Definition: DeviceContext.h:440
Diligent::IPipelineState
Pipeline state interface.
Definition: PipelineState.h:505
DILIGENT_BEGIN_INTERFACE
#define DILIGENT_BEGIN_INTERFACE(Name, Base)
Definition: CommonDefinitions.h:97
Diligent::DRAW_FLAG_NONE
@ DRAW_FLAG_NONE
No flags.
Definition: DeviceContext.h:71
Diligent::RESOURCE_STATE_TRANSITION_MODE
RESOURCE_STATE_TRANSITION_MODE
Defines resource state transition mode performed by various commands.
Definition: DeviceContext.h:136
Diligent::DispatchComputeIndirectAttribs::DispatchComputeIndirectAttribs
DispatchComputeIndirectAttribs(RESOURCE_STATE_TRANSITION_MODE StateTransitionMode, Uint32 Offset=0)
Initializes the structure with user-specified values.
Definition: DeviceContext.h:536
Diligent::DRAW_FLAG_VERIFY_DRAW_ATTRIBS
@ DRAW_FLAG_VERIFY_DRAW_ATTRIBS
Verify correctness of parameters passed to the draw command.
Definition: DeviceContext.h:79
Diligent::HIT_GROUP_BINDING_MODE_PER_GEOMETRY
@ HIT_GROUP_BINDING_MODE_PER_GEOMETRY
Each geometry in every instance may use a unique hit shader group. In this mode, the SBT reserves spa...
Definition: TopLevelAS.h:78
Flags
Uint32 Flags
Definition: DXBCUtils.cpp:71
Diligent::RAYTRACING_INSTANCE_NONE
@ RAYTRACING_INSTANCE_NONE
Definition: DeviceContext.h:769
Diligent::CLEAR_DEPTH_STENCIL_FLAGS
CLEAR_DEPTH_STENCIL_FLAGS
Defines which parts of the depth-stencil buffer to clear.
Definition: DeviceContext.h:483
Diligent::TLASBuildInstanceData::TLASBuildInstanceData
TLASBuildInstanceData() noexcept
Definition: DeviceContext.h:1070
Shader.h
Diligent::IObject
Base interface for all dynamic objects in the engine.
Definition: Object.h:41
Diligent::Uint64
uint64_t Uint64
64-bit unsigned integer
Definition: BasicTypes.h:50
Diligent::DrawIndirectAttribs::DrawIndirectAttribs
DrawIndirectAttribs() noexcept
Initializes the structure members with default values.
Definition: DeviceContext.h:312
Diligent::WriteBLASCompactedSizeAttribs
This structure is used by IDeviceContext::WriteBLASCompactedSize().
Definition: DeviceContext.h:1217
Diligent::ITopLevelAS
Top-level AS interface.
Definition: TopLevelAS.h:151
Diligent::Float32
float Float32
32-bit float
Definition: BasicTypes.h:43
Diligent::DispatchComputeAttribs::DispatchComputeAttribs
DispatchComputeAttribs(Uint32 GroupsX, Uint32 GroupsY, Uint32 GroupsZ=1) noexcept
Initializes the structure with user-specified values.
Definition: DeviceContext.h:510
Diligent::Rect::Rect
Rect() noexcept
Definition: DeviceContext.h:658
Diligent::DrawIndexedAttribs::DrawIndexedAttribs
DrawIndexedAttribs() noexcept
Initializes the structure members with default values.
Definition: DeviceContext.h:265
Diligent::InstanceMatrix
struct InstanceMatrix InstanceMatrix
Definition: DeviceContext.h:1036
Diligent::BLASBuildTriangleData
struct BLASBuildTriangleData BLASBuildTriangleData
Definition: DeviceContext.h:888
Diligent::WriteTLASCompactedSizeAttribs
This structure is used by IDeviceContext::WriteTLASCompactedSize().
Definition: DeviceContext.h:1242
Diligent::DrawMeshAttribs::DrawMeshAttribs
DrawMeshAttribs(Uint32 _ThreadGroupCount, DRAW_FLAGS _Flags) noexcept
Initializes the structure with user-specified values.
Definition: DeviceContext.h:389
Diligent::RAYTRACING_INSTANCE_FLAGS
RAYTRACING_INSTANCE_FLAGS
TLAS instance flags that are used in IDeviceContext::BuildTLAS().
Definition: DeviceContext.h:767
Diligent::ITextureView
Texture view interface.
Definition: TextureView.h:202
Diligent::InstanceMatrix
Row-major matrix.
Definition: DeviceContext.h:999
Diligent::IFramebuffer
Framebuffer interface.
Definition: Framebuffer.h:73
Diligent::DrawIndexedIndirectAttribs::DrawIndexedIndirectAttribs
DrawIndexedIndirectAttribs() noexcept
Initializes the structure members with default values.
Definition: DeviceContext.h:356
Diligent::DrawMeshAttribs
Defines the mesh draw command attributes.
Definition: DeviceContext.h:376
Diligent::VT_UNDEFINED
@ VT_UNDEFINED
Undefined type.
Definition: GraphicsTypes.h:51
Diligent::Box
Box.
Definition: GraphicsTypes.h:2407
Diligent::MappedTextureSubresource
Definition: Texture.h:245
Diligent::StateTransitionDesc::StateTransitionDesc
StateTransitionDesc(ITopLevelAS *_pTLAS, RESOURCE_STATE _OldState, RESOURCE_STATE _NewState, bool _UpdateState) noexcept
Definition: DeviceContext.h:1433
Query.h
Diligent::IDeviceObject
Base interface for all objects created by the render device Diligent::IRenderDevice.
Definition: DeviceObject.h:52
Diligent::UpdateIndirectRTBufferAttribs::UpdateIndirectRTBufferAttribs
UpdateIndirectRTBufferAttribs(IBuffer *_pAttribsBuffer, Uint32 _AttribsBufferOffset=0, RESOURCE_STATE_TRANSITION_MODE _TransitionMode=RESOURCE_STATE_TRANSITION_MODE_NONE) noexcept
Definition: DeviceContext.h:1317
THIS
#define THIS
Definition: DefineInterfaceHelperMacros.h:81
Diligent::Viewport
struct Viewport Viewport
Definition: DeviceContext.h:632
Constants.h
Diligent::IBuffer
Buffer interface.
Definition: Buffer.h:187
Diligent::StateTransitionDesc::StateTransitionDesc
StateTransitionDesc(IBottomLevelAS *_pBLAS, RESOURCE_STATE _OldState, RESOURCE_STATE _NewState, bool _UpdateState) noexcept
Definition: DeviceContext.h:1423
Diligent::TLASBuildInstanceData
This structure is used by BuildTLASAttribs.
Definition: DeviceContext.h:1040
Diligent::TEX_FORMAT_UNKNOWN
@ TEX_FORMAT_UNKNOWN
Unknown format.
Definition: GraphicsTypes.h:331
Diligent::RAYTRACING_INSTANCE_FORCE_OPAQUE
@ RAYTRACING_INSTANCE_FORCE_OPAQUE
Causes this instance to act as though RAYTRACING_GEOMETRY_FLAGS_OPAQUE were specified on all geometri...
Definition: DeviceContext.h:781
CommandList.h
Diligent::Rect
struct Rect Rect
Definition: DeviceContext.h:666
PURE
#define PURE
Definition: DefineInterfaceHelperMacros.h:85
Diligent::UpdateIndirectRTBufferAttribs::UpdateIndirectRTBufferAttribs
UpdateIndirectRTBufferAttribs() noexcept
Definition: DeviceContext.h:1315
Diligent::SET_VERTEX_BUFFERS_FLAG_NONE
@ SET_VERTEX_BUFFERS_FLAG_NONE
No extra operations.
Definition: DeviceContext.h:581
Diligent::Int32
int32_t Int32
32-bit signed integer
Definition: BasicTypes.h:46
ShaderBindingTable.h
Diligent::TraceRaysIndirectAttribs::TraceRaysIndirectAttribs
TraceRaysIndirectAttribs() noexcept
Definition: DeviceContext.h:1296
Diligent::CLEAR_DEPTH_FLAG
@ CLEAR_DEPTH_FLAG
Clear depth part of the buffer.
Definition: DeviceContext.h:489
Diligent::RAYTRACING_GEOMETRY_FLAG_OPAQUE
@ RAYTRACING_GEOMETRY_FLAG_OPAQUE
Indicates that this geometry does not invoke the any-hit shaders even if present in a hit group.
Definition: DeviceContext.h:817
BlendState.h
Diligent::StateTransitionDesc
Resource state transition barrier description.
Definition: DeviceContext.h:1333
Diligent::RAYTRACING_INSTANCE_FORCE_NO_OPAQUE
@ RAYTRACING_INSTANCE_FORCE_NO_OPAQUE
Causes this instance to act as though RAYTRACING_GEOMETRY_FLAGS_OPAQUE were not specified on all geom...
Definition: DeviceContext.h:785
Diligent::DRAW_FLAG_VERIFY_ALL
@ DRAW_FLAG_VERIFY_ALL
Perform all state validation checks.
Definition: DeviceContext.h:85
Diligent::ICommandList
Command list interface.
Definition: CommandList.h:48
Diligent::SET_VERTEX_BUFFERS_FLAGS
SET_VERTEX_BUFFERS_FLAGS
Defines allowed flags for IDeviceContext::SetVertexBuffers() function.
Definition: DeviceContext.h:578
Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION
@ RESOURCE_STATE_TRANSITION_MODE_TRANSITION
Transition resources to the states required by the specific command. Resources in unknown state are i...
Definition: DeviceContext.h:152
Diligent::InstanceMatrix::SetRotation
InstanceMatrix & SetRotation(const float *pMatrix3x3) noexcept
Sets the rotation part.
Definition: DeviceContext.h:1027
Diligent::RAYTRACING_GEOMETRY_FLAG_NONE
@ RAYTRACING_GEOMETRY_FLAG_NONE
Definition: DeviceContext.h:814
DILIGENT_END_NAMESPACE
#define DILIGENT_END_NAMESPACE
Definition: CommonDefinitions.h:86
Diligent::ResolveTextureSubresourceAttribs
Describes multi-sampled texture resolve command arguments.
Definition: DeviceContext.h:549
Diligent::DispatchComputeIndirectAttribs
Describes dispatch command arguments.
Definition: DeviceContext.h:523
InputLayout.h
Diligent::DrawMeshIndirectCountAttribs::DrawMeshIndirectCountAttribs
DrawMeshIndirectCountAttribs() noexcept
Definition: DeviceContext.h:461
Diligent::VALUE_TYPE
VALUE_TYPE
Value type.
Definition: GraphicsTypes.h:49
CONST
#define CONST
Definition: DefineInterfaceHelperMacros.h:84
Diligent::DrawIndexedIndirectAttribs
Defines the indexed indirect draw command attributes.
Definition: DeviceContext.h:330
ResourceMapping.h
Diligent::BLASBuildTriangleData::BLASBuildTriangleData
BLASBuildTriangleData() noexcept
Definition: DeviceContext.h:885
Diligent::RESOURCE_STATE_TRANSITION_MODE_NONE
@ RESOURCE_STATE_TRANSITION_MODE_NONE
Perform no state transitions and no state validation. Resource states are not accessed (either read o...
Definition: DeviceContext.h:140
Diligent::DRAW_FLAG_DYNAMIC_RESOURCE_BUFFERS_INTACT
@ DRAW_FLAG_DYNAMIC_RESOURCE_BUFFERS_INTACT
Indicates that none of the dynamic resource buffers used by the draw command have been modified by th...
Definition: DeviceContext.h:127
FirstArraySlice
int FirstArraySlice
Definition: GenerateMipsCS_inc.h:24
Diligent::BuildTLASAttribs
This structure is used by IDeviceContext::BuildTLAS().
Definition: DeviceContext.h:1082
Diligent::RESOURCE_STATE_TRANSITION_MODE_VERIFY
@ RESOURCE_STATE_TRANSITION_MODE_VERIFY
Do not transition, but verify that states are correct. No validation is performed if the state is unk...
Definition: DeviceContext.h:162
Diligent::DrawIndirectAttribs::DrawIndirectAttribs
DrawIndirectAttribs(DRAW_FLAGS _Flags, RESOURCE_STATE_TRANSITION_MODE _IndirectAttribsBufferStateTransitionMode, Uint32 _IndirectDrawArgsOffset=0) noexcept
Initializes the structure members with user-specified values.
Definition: DeviceContext.h:315
Diligent::Uint32
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
Buffer.h
DEFAULT_INITIALIZER
#define DEFAULT_INITIALIZER(x)
Definition: CommonDefinitions.h:93
Diligent::DrawMeshIndirectAttribs
Defines the mesh indirect draw command attributes.
Definition: DeviceContext.h:402
Diligent::BLASBuildTriangleData
Triangle geometry data description.
Definition: DeviceContext.h:829
Diligent::Bool
bool Bool
Boolean.
Definition: BasicTypes.h:59
Diligent::BLASBuildBoundingBoxData
AABB geometry data description.
Definition: DeviceContext.h:892
Diligent::Viewport
Describes the viewport.
Definition: DeviceContext.h:593
RenderPass.h
Diligent::DispatchComputeAttribs
Describes dispatch command arguments.
Definition: DeviceContext.h:500
Diligent::TraceRaysAttribs::TraceRaysAttribs
TraceRaysAttribs() noexcept
Definition: DeviceContext.h:1277
Diligent::DRAW_FLAG_VERIFY_STATES
@ DRAW_FLAG_VERIFY_STATES
Verify the sate of index and vertex buffers (if any) used by the draw command. State validation is on...
Definition: DeviceContext.h:76
Diligent::RESOURCE_STATE_UNKNOWN
@ RESOURCE_STATE_UNKNOWN
The resource state is not known to the engine and is managed by the application.
Definition: GraphicsTypes.h:2817
Diligent::DrawMeshIndirectAttribs::DrawMeshIndirectAttribs
DrawMeshIndirectAttribs(DRAW_FLAGS _Flags, RESOURCE_STATE_TRANSITION_MODE _IndirectAttribsBufferStateTransitionMode, Uint32 _IndirectDrawArgsOffset=0) noexcept
Initializes the structure members with user-specified values.
Definition: DeviceContext.h:425
Diligent::RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION
@ RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION
Indicates that the implementation must only call the any-hit shader a single time for each primitive ...
Definition: DeviceContext.h:821
Diligent::BLASBuildBoundingBoxData::BLASBuildBoundingBoxData
BLASBuildBoundingBoxData() noexcept
Definition: DeviceContext.h:918
Diligent::DrawMeshAttribs
struct DrawMeshAttribs DrawMeshAttribs
Definition: DeviceContext.h:396
Diligent::STATE_TRANSITION_TYPE_IMMEDIATE
@ STATE_TRANSITION_TYPE_IMMEDIATE
Perform state transition immediately.
Definition: GraphicsTypes.h:2895
Diligent::Rect::IsValid
bool IsValid() const
Definition: DeviceContext.h:660
PipelineState.h
Diligent::CopyTextureAttribs::CopyTextureAttribs
CopyTextureAttribs(ITexture *_pSrcTexture, RESOURCE_STATE_TRANSITION_MODE _SrcTextureTransitionMode, ITexture *_pDstTexture, RESOURCE_STATE_TRANSITION_MODE _DstTextureTransitionMode) noexcept
Definition: DeviceContext.h:714
Diligent::BuildBLASAttribs::BuildBLASAttribs
BuildBLASAttribs() noexcept
Definition: DeviceContext.h:979
Diligent::BuildBLASAttribs
This structure is used by IDeviceContext::BuildBLAS().
Definition: DeviceContext.h:925
Diligent::CopyBLASAttribs
This structure is used by IDeviceContext::CopyBLAS().
Definition: DeviceContext.h:1159
Diligent::DrawIndexedAttribs::DrawIndexedAttribs
DrawIndexedAttribs(Uint32 _NumIndices, VALUE_TYPE _IndexType, DRAW_FLAGS _Flags, Uint32 _NumInstances=1, Uint32 _FirstIndexLocation=0, Uint32 _BaseVertex=0, Uint32 _FirstInstanceLocation=0) noexcept
Initializes the structure members with user-specified values.
Definition: DeviceContext.h:268
BufferView.h
Diligent::DRAW_FLAG_VERIFY_RENDER_TARGETS
@ DRAW_FLAG_VERIFY_RENDER_TARGETS
Verify that render targets bound to the context are consistent with the pipeline state.
Definition: DeviceContext.h:82
Diligent::DrawAttribs::DrawAttribs
DrawAttribs() noexcept
Initializes the structure members with default values.
Definition: DeviceContext.h:202
Diligent::DrawIndexedIndirectAttribs::DrawIndexedIndirectAttribs
DrawIndexedIndirectAttribs(VALUE_TYPE _IndexType, DRAW_FLAGS _Flags, RESOURCE_STATE_TRANSITION_MODE _IndirectAttribsBufferStateTransitionMode, Uint32 _IndirectDrawArgsOffset=0) noexcept
Initializes the structure members with user-specified values.
Definition: DeviceContext.h:359
Diligent::TEXTURE_FORMAT
TEXTURE_FORMAT
Texture formats.
Definition: GraphicsTypes.h:328
Diligent::CopyTextureAttribs::CopyTextureAttribs
CopyTextureAttribs() noexcept
Definition: DeviceContext.h:712
REF
#define REF
Definition: DefineGlobalFuncHelperMacros.h:39
Diligent::DispatchComputeIndirectAttribs::DispatchComputeIndirectAttribs
DispatchComputeIndirectAttribs() noexcept
Definition: DeviceContext.h:532
Diligent::DrawIndirectAttribs
Defines the indirect draw command attributes.
Definition: DeviceContext.h:291
METHOD
#define METHOD(Name)
Definition: DefineInterfaceHelperMacros.h:87
DEFAULT_VALUE
#define DEFAULT_VALUE(x)
Definition: CommonDefinitions.h:99
Diligent::Viewport::Viewport
Viewport() noexcept
Definition: DeviceContext.h:629
Diligent::BuildTLASAttribs::BuildTLASAttribs
BuildTLASAttribs() noexcept
Definition: DeviceContext.h:1152
DILIGENT_TYPED_ENUM
#define DILIGENT_TYPED_ENUM(EnumName, EnumType)
Definition: CommonDefinitions.h:88
Diligent::DRAW_FLAGS
DRAW_FLAGS
Draw command flags.
Definition: DeviceContext.h:68
Diligent::CLEAR_STENCIL_FLAG
@ CLEAR_STENCIL_FLAG
Clear stencil part of the buffer.
Definition: DeviceContext.h:492
Diligent::CopyTLASAttribs
This structure is used by IDeviceContext::CopyTLAS().
Definition: DeviceContext.h:1188
SwapChain.h
Diligent::IFence
Fence interface.
Definition: Fence.h:62
Diligent::DrawIndexedAttribs
Defines the indexed draw command attributes.
Definition: DeviceContext.h:224
Diligent::RAYTRACING_INSTANCE_FLAGS_LAST
@ RAYTRACING_INSTANCE_FLAGS_LAST
Definition: DeviceContext.h:787
Diligent::STATE_TRANSITION_TYPE
STATE_TRANSITION_TYPE
State transition barrier type.
Definition: GraphicsTypes.h:2892
Diligent::IDeviceContext
Device context interface.
Definition: DeviceContext.h:1460
Diligent::InstanceMatrix::SetTranslation
InstanceMatrix & SetTranslation(float x, float y, float z) noexcept
Sets the translation part.
Definition: DeviceContext.h:1018
Diligent::HIT_GROUP_BINDING_MODE
HIT_GROUP_BINDING_MODE
Defines hit group binding mode used by the top-level AS.
Definition: TopLevelAS.h:72
Diligent::COPY_AS_MODE_CLONE
@ COPY_AS_MODE_CLONE
Creates a direct copy of the acceleration structure specified in pSrc into the one specified by pDst....
Definition: DeviceContext.h:799
DepthStencilState.h
Diligent::OptimizedClearValue
Defines optimized clear value.
Definition: GraphicsTypes.h:1168
Diligent::IQuery
Query interface.
Definition: Query.h:177
Diligent::Uint8
uint8_t Uint8
8-bit unsigned integer
Definition: BasicTypes.h:53
DILIGENT_BEGIN_NAMESPACE
#define DILIGENT_BEGIN_NAMESPACE(Name)
Definition: CommonDefinitions.h:82
Diligent::RAYTRACING_INSTANCE_TRIANGLE_FACING_CULL_DISABLE
@ RAYTRACING_INSTANCE_TRIANGLE_FACING_CULL_DISABLE
Disables face culling for this instance.
Definition: DeviceContext.h:772
GraphicsTypes.h
Diligent::IBottomLevelAS
Bottom-level AS interface.
Definition: BottomLevelAS.h:207
Diligent::Rect
Describes the rectangle.
Definition: DeviceContext.h:642
Diligent::COPY_AS_MODE_COMPACT
@ COPY_AS_MODE_COMPACT
Creates a more compact version of an acceleration structure pSrc into pDst. The acceleration structur...
Definition: DeviceContext.h:805
Diligent::DrawAttribs
Defines the draw command attributes.
Definition: DeviceContext.h:169
Framebuffer.h
Diligent::StateTransitionDesc::StateTransitionDesc
StateTransitionDesc() noexcept
Definition: DeviceContext.h:1373
DEFINE_FLAG_ENUM_OPERATORS
DEFINE_FLAG_ENUM_OPERATORS(FILE_DIALOG_FLAGS)
Sampler.h
Diligent::WriteTLASCompactedSizeAttribs::WriteTLASCompactedSizeAttribs
WriteTLASCompactedSizeAttribs() noexcept
Definition: DeviceContext.h:1260
Diligent::RESOURCE_STATE
RESOURCE_STATE
Resource usage state.
Definition: GraphicsTypes.h:2814
Diligent::RAYTRACING_GEOMETRY_FLAGS
RAYTRACING_GEOMETRY_FLAGS
Defines geometry flags for ray tracing.
Definition: DeviceContext.h:812
Diligent::DrawMeshIndirectAttribs::DrawMeshIndirectAttribs
DrawMeshIndirectAttribs() noexcept
Initializes the structure members with default values.
Definition: DeviceContext.h:422
Fence.h
Diligent::CopyBLASAttribs::CopyBLASAttribs
CopyBLASAttribs() noexcept
Definition: DeviceContext.h:1181
Diligent::MAP_TYPE
MAP_TYPE
Resource mapping type.
Definition: GraphicsTypes.h:206
Diligent::CopyTextureAttribs
Defines copy texture command attributes.
Definition: DeviceContext.h:672
Diligent::SET_VERTEX_BUFFERS_FLAG_RESET
@ SET_VERTEX_BUFFERS_FLAG_RESET
Reset the vertex buffers to only the buffers specified in this call. All buffers previously bound to ...
Definition: DeviceContext.h:585
Diligent::COPY_AS_MODE_LAST
@ COPY_AS_MODE_LAST
Definition: DeviceContext.h:807
Diligent::ITexture
Texture inteface.
Definition: Texture.h:273
Diligent::RAYTRACING_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE
@ RAYTRACING_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE
Indicates that the front face of the triangle for culling purposes is the face that is counter clockw...
Definition: DeviceContext.h:777
Diligent::CLEAR_DEPTH_FLAG_NONE
@ CLEAR_DEPTH_FLAG_NONE
Perform no clear.
Definition: DeviceContext.h:486
Diligent::IRenderPass
Render pass interface.
Definition: RenderPass.h:369
Diligent::StateTransitionDesc::StateTransitionDesc
StateTransitionDesc(ITexture *_pTexture, RESOURCE_STATE _OldState, RESOURCE_STATE _NewState, Uint32 _FirstMipLevel=0, Uint32 _MipLevelsCount=REMAINING_MIP_LEVELS, Uint32 _FirstArraySlice=0, Uint32 _ArraySliceCount=REMAINING_ARRAY_SLICES, STATE_TRANSITION_TYPE _TransitionType=STATE_TRANSITION_TYPE_IMMEDIATE, bool _UpdateState=false) noexcept
Definition: DeviceContext.h:1375
Diligent
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
THIS_
#define THIS_
Definition: DefineInterfaceHelperMacros.h:82
Diligent::TextureSubResData
Describes data for one subresource.
Definition: Texture.h:165
Diligent::StateTransitionDesc::StateTransitionDesc
StateTransitionDesc(IBuffer *_pBuffer, RESOURCE_STATE _OldState, RESOURCE_STATE _NewState, bool _UpdateState) noexcept
Definition: DeviceContext.h:1413
BottomLevelAS.h