summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-11-06 01:31:31 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-11-06 01:31:31 +0000
commit569fb5a399cdb1cb39fb10d8db1fd78ab56f6c9e (patch)
treea40a058f9e9fe805be88d6625681c4e93880c0e0 /Graphics/GraphicsEngine
parentAdded support for local root signature & shader record. (diff)
downloadDiligentCore-569fb5a399cdb1cb39fb10d8db1fd78ab56f6c9e.tar.gz
DiligentCore-569fb5a399cdb1cb39fb10d8db1fd78ab56f6c9e.zip
A number of minor updates/fixes
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/DeviceContextBase.hpp13
-rw-r--r--Graphics/GraphicsEngine/include/PipelineStateBase.hpp4
-rw-r--r--Graphics/GraphicsEngine/include/ShaderBindingTableBase.hpp34
-rw-r--r--Graphics/GraphicsEngine/interface/BottomLevelAS.h30
-rw-r--r--Graphics/GraphicsEngine/interface/DeviceContext.h130
-rw-r--r--Graphics/GraphicsEngine/interface/GraphicsTypes.h20
-rw-r--r--Graphics/GraphicsEngine/interface/PipelineState.h32
-rw-r--r--Graphics/GraphicsEngine/interface/TopLevelAS.h12
8 files changed, 139 insertions, 136 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.hpp b/Graphics/GraphicsEngine/include/DeviceContextBase.hpp
index 8200012b..ee9a2dd4 100644
--- a/Graphics/GraphicsEngine/include/DeviceContextBase.hpp
+++ b/Graphics/GraphicsEngine/include/DeviceContextBase.hpp
@@ -1529,9 +1529,9 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>::
LOG_WARNING_MESSAGE("DrawMesh command arguments are invalid: number of groups to dispatch is zero.");
}
- if (Attribs.ThreadGroupCount > m_pDevice->GetMaxDrawMeshTasksCount())
+ if (Attribs.ThreadGroupCount > m_pDevice->GetProperties().MaxDrawMeshTasksCount)
{
- LOG_WARNING_MESSAGE("DrawMesh command arguments are invalid: number of groups to dispatch must be less then ", m_pDevice->GetMaxDrawMeshTasksCount());
+ LOG_WARNING_MESSAGE("DrawMesh command arguments are invalid: number of groups to dispatch must be less then ", m_pDevice->GetProperties().MaxDrawMeshTasksCount);
}
return true;
@@ -2272,11 +2272,11 @@ bool DeviceContextBase<BaseInterface, ImplementationTraits>::BuildTLAS(const Bui
// calculate instance data size
for (Uint32 i = 0; i < Attribs.InstanceCount; ++i)
{
- VERIFY((Attribs.pInstances[i].CustomId & ~0x00FFFFFF) == 0, "Only first 24 bits are used");
+ VERIFY((Attribs.pInstances[i].CustomId & ~0x00FFFFFF) == 0, "Only the lower 24 bits are used");
VERIFY(Attribs.pInstances[i].ContributionToHitGroupIndex == TLAS_INSTANCE_OFFSET_AUTO ||
(Attribs.pInstances[i].ContributionToHitGroupIndex & ~0x00FFFFFF) == 0,
- "Only first 24 bits are used");
+ "Only the lower 24 bits are used");
if (Attribs.pInstances[i].InstanceName == nullptr)
{
@@ -2302,8 +2302,9 @@ bool DeviceContextBase<BaseInterface, ImplementationTraits>::BuildTLAS(const Bui
if (TLASDesc.BindingMode != SHADER_BINDING_USER_DEFINED && Attribs.pInstances[i].ContributionToHitGroupIndex != TLAS_INSTANCE_OFFSET_AUTO)
{
- LOG_ERROR_MESSAGE("IDeviceContext::BuildTLAS: pInstances[", i, "].ContributionToHitGroupIndex must be TLAS_INSTANCE_OFFSET_AUTO "
- "if TLAS created with BindingMode that is not SHADER_BINDING_USER_DEFINED");
+ LOG_ERROR_MESSAGE("IDeviceContext::BuildTLAS: pInstances[", i,
+ "].ContributionToHitGroupIndex must be TLAS_INSTANCE_OFFSET_AUTO "
+ "if TLAS created with BindingMode that is not SHADER_BINDING_USER_DEFINED");
return false;
}
}
diff --git a/Graphics/GraphicsEngine/include/PipelineStateBase.hpp b/Graphics/GraphicsEngine/include/PipelineStateBase.hpp
index d0685e4e..caa96110 100644
--- a/Graphics/GraphicsEngine/include/PipelineStateBase.hpp
+++ b/Graphics/GraphicsEngine/include/PipelineStateBase.hpp
@@ -361,7 +361,7 @@ protected:
size_t RTDataSize = sizeof(RayTracingPipelineData);
// reserve size for shader handles
- const auto ShaderHandleSize = this->m_pDevice->GetShaderGroupHandleSize();
+ const auto ShaderHandleSize = this->m_pDevice->GetProperties().ShaderGroupHandleSize;
RTDataSize += ShaderHandleSize * (CreateInfo.GeneralShaderCount + CreateInfo.TriangleHitShaderCount + CreateInfo.ProceduralHitShaderCount);
// Extra bytes are reserved to avoid compiler errors on zero-sized arrays
RTDataSize -= sizeof(RayTracingPipelineData::Shaders);
@@ -642,7 +642,7 @@ protected:
size_t RTDataSize = sizeof(RayTracingPipelineData);
// reserve size for shader handles
- const auto ShaderHandleSize = this->m_pDevice->GetShaderGroupHandleSize();
+ const auto ShaderHandleSize = this->m_pDevice->GetProperties().ShaderGroupHandleSize;
const auto ShaderDataSize = ShaderHandleSize * (CreateInfo.GeneralShaderCount + CreateInfo.TriangleHitShaderCount + CreateInfo.ProceduralHitShaderCount);
RTDataSize += ShaderDataSize;
// Extra bytes are reserved to avoid compiler errors on zero-sized arrays
diff --git a/Graphics/GraphicsEngine/include/ShaderBindingTableBase.hpp b/Graphics/GraphicsEngine/include/ShaderBindingTableBase.hpp
index ce4e0e4c..cc657844 100644
--- a/Graphics/GraphicsEngine/include/ShaderBindingTableBase.hpp
+++ b/Graphics/GraphicsEngine/include/ShaderBindingTableBase.hpp
@@ -68,7 +68,7 @@ public:
this->m_pPSO = ValidatedCast<PipelineStateImplType>(this->m_Desc.pPSO);
this->m_ShaderRecordSize = this->m_pPSO->GetRayTracingPipelineDesc().ShaderRecordSize;
- this->m_ShaderRecordStride = this->m_ShaderRecordSize + this->m_pDevice->GetShaderGroupHandleSize();
+ this->m_ShaderRecordStride = this->m_ShaderRecordSize + this->m_pDevice->GetProperties().ShaderGroupHandleSize;
}
~ShaderBindingTableBase()
@@ -97,7 +97,7 @@ public:
this->m_Desc = Desc;
this->m_pPSO = ValidatedCast<PipelineStateImplType>(this->m_Desc.pPSO);
this->m_ShaderRecordSize = this->m_pPSO->GetRayTracingPipelineDesc().ShaderRecordSize;
- this->m_ShaderRecordStride = this->m_ShaderRecordSize + this->m_pDevice->GetShaderGroupHandleSize();
+ this->m_ShaderRecordStride = this->m_ShaderRecordSize + this->m_pDevice->GetProperties().ShaderGroupHandleSize;
}
void DILIGENT_CALL_TYPE BindRayGenShader(const char* ShaderGroupName, const void* Data, Uint32 DataSize) override final
@@ -108,7 +108,7 @@ public:
this->m_RayGenShaderRecord.resize(this->m_ShaderRecordStride, EmptyElem);
this->m_pPSO->CopyShaderHandle(ShaderGroupName, this->m_RayGenShaderRecord.data(), this->m_ShaderRecordStride);
- const Uint32 GroupSize = this->m_pDevice->GetShaderGroupHandleSize();
+ const Uint32 GroupSize = this->m_pDevice->GetProperties().ShaderGroupHandleSize;
std::memcpy(this->m_RayGenShaderRecord.data() + GroupSize, Data, DataSize);
this->m_Changed = true;
}
@@ -118,7 +118,7 @@ public:
VERIFY_EXPR((Data == nullptr) == (DataSize == 0));
VERIFY_EXPR(Data == nullptr || (DataSize == this->m_ShaderRecordSize));
- const Uint32 GroupSize = this->m_pDevice->GetShaderGroupHandleSize();
+ const Uint32 GroupSize = this->m_pDevice->GetProperties().ShaderGroupHandleSize;
const Uint32 Offset = MissIndex * this->m_ShaderRecordStride;
this->m_MissShadersRecord.resize(std::max<size_t>(this->m_MissShadersRecord.size(), Offset + this->m_ShaderRecordStride), EmptyElem);
@@ -148,7 +148,7 @@ public:
const Uint32 GeometryIndex = Desc.pBLAS->GetGeometryIndex(GeometryName);
const Uint32 Index = InstanceIndex + GeometryIndex * this->m_Desc.HitShadersPerInstance + RayOffsetInHitGroupIndex;
const Uint32 Offset = Index * this->m_ShaderRecordStride;
- const Uint32 GroupSize = this->m_pDevice->GetShaderGroupHandleSize();
+ const Uint32 GroupSize = this->m_pDevice->GetProperties().ShaderGroupHandleSize;
this->m_HitGroupsRecord.resize(std::max<size_t>(this->m_HitGroupsRecord.size(), Offset + this->m_ShaderRecordStride), EmptyElem);
@@ -190,7 +190,7 @@ public:
const Uint32 BeginIndex = InstanceIndex + 0 * this->m_Desc.HitShadersPerInstance + RayOffsetInHitGroupIndex;
const Uint32 EndIndex = InstanceIndex + GeometryCount * this->m_Desc.HitShadersPerInstance + RayOffsetInHitGroupIndex;
- const Uint32 GroupSize = this->m_pDevice->GetShaderGroupHandleSize();
+ const Uint32 GroupSize = this->m_pDevice->GetProperties().ShaderGroupHandleSize;
const auto* DataPtr = static_cast<const Uint8*>(Data);
this->m_HitGroupsRecord.resize(std::max<size_t>(this->m_HitGroupsRecord.size(), EndIndex * this->m_ShaderRecordStride), EmptyElem);
@@ -214,7 +214,7 @@ public:
VERIFY_EXPR((Data == nullptr) == (DataSize == 0));
VERIFY_EXPR(Data == nullptr || (DataSize == this->m_ShaderRecordSize));
- const Uint32 GroupSize = this->m_pDevice->GetShaderGroupHandleSize();
+ const Uint32 GroupSize = this->m_pDevice->GetProperties().ShaderGroupHandleSize;
const Uint32 Offset = CallableIndex * this->m_ShaderRecordStride;
this->m_CallableShadersRecord.resize(std::max<size_t>(this->m_CallableShadersRecord.size(), Offset + this->m_ShaderRecordStride), EmptyElem);
@@ -228,7 +228,7 @@ public:
Uint32 ShCounter = 0;
Uint32 RecCounter = 0;
const auto Stride = this->m_ShaderRecordStride;
- const auto ShSize = this->m_pDevice->GetShaderGroupHandleSize();
+ const auto ShSize = this->m_pDevice->GetProperties().ShaderGroupHandleSize;
const auto FindPattern = [&ShCounter, &RecCounter, Stride, ShSize](const std::vector<Uint8>& Data, const char* Name) -> bool //
{
for (size_t i = 0; i < Data.size(); i += Stride)
@@ -281,7 +281,7 @@ public:
BindingTable& HitShaderBindingTable,
BindingTable& CallableShaderBindingTable)
{
- const auto ShaderGroupBaseAlignment = this->m_pDevice->GetShaderGroupBaseAlignment();
+ const auto ShaderGroupBaseAlignment = this->m_pDevice->GetProperties().ShaderGroupBaseAlignment;
const auto AlignToLarger = [ShaderGroupBaseAlignment](size_t offset) -> Uint32 {
return Align(static_cast<Uint32>(offset), ShaderGroupBaseAlignment);
@@ -367,19 +367,19 @@ protected:
LOG_SBT_ERROR_AND_THROW("pPSO must be ray tracing pipeline");
}
- const auto ShaderGroupHandleSize = this->m_pDevice->GetShaderGroupHandleSize();
- const auto MaxShaderRecordStride = this->m_pDevice->GetMaxShaderRecordStride();
- const auto ShaderRecordSize = Desc.pPSO->GetRayTracingPipelineDesc().ShaderRecordSize;
- const auto ShaderRecordStride = ShaderRecordSize + ShaderGroupHandleSize;
+ const auto& DeviceProps = this->m_pDevice->GetProperties();
+ const auto ShaderRecordSize = Desc.pPSO->GetRayTracingPipelineDesc().ShaderRecordSize;
+ const auto ShaderRecordStride = ShaderRecordSize + DeviceProps.ShaderGroupHandleSize;
- if (ShaderRecordStride > MaxShaderRecordStride)
+ if (ShaderRecordStride > DeviceProps.MaxShaderRecordStride)
{
- LOG_SBT_ERROR_AND_THROW("ShaderRecordSize(", ShaderRecordSize, ") is too big, max size is: ", MaxShaderRecordStride - ShaderGroupHandleSize);
+ LOG_SBT_ERROR_AND_THROW("ShaderRecordSize(", ShaderRecordSize, ") is too big, max size is: ", DeviceProps.MaxShaderRecordStride - DeviceProps.ShaderGroupHandleSize);
}
- if (ShaderRecordStride % ShaderGroupHandleSize != 0)
+ if (ShaderRecordStride % DeviceProps.ShaderGroupHandleSize != 0)
{
- LOG_SBT_ERROR_AND_THROW("ShaderRecordSize(", ShaderRecordSize, ") plus ShaderGroupHandleSize(", ShaderGroupHandleSize, ") must be multiple of ", ShaderGroupHandleSize);
+ LOG_SBT_ERROR_AND_THROW("ShaderRecordSize(", ShaderRecordSize, ") plus ShaderGroupHandleSize(", DeviceProps.ShaderGroupHandleSize,
+ ") must be a multiple of ", DeviceProps.ShaderGroupHandleSize);
}
#undef LOG_SBT_ERROR_AND_THROW
}
diff --git a/Graphics/GraphicsEngine/interface/BottomLevelAS.h b/Graphics/GraphicsEngine/interface/BottomLevelAS.h
index ac521756..cfabc1d5 100644
--- a/Graphics/GraphicsEngine/interface/BottomLevelAS.h
+++ b/Graphics/GraphicsEngine/interface/BottomLevelAS.h
@@ -50,27 +50,27 @@ static const INTERFACE_ID IID_BottomLevelAS =
struct BLASTriangleDesc
{
/// Geometry name.
- /// The name is used to map triangles data (BLASBuildTriangleData) to this geometry.
+ /// The name is used to map triangle data (BLASBuildTriangleData) to this geometry.
const char* GeometryName DEFAULT_INITIALIZER(nullptr);
- /// The maximum vertex count for this geometry.
+ /// The maximum vertex count in this geometry.
/// Current number of vertices is defined in BLASBuildTriangleData::VertexCount.
Uint32 MaxVertexCount DEFAULT_INITIALIZER(0);
/// The type of vertices in this geometry, see Diligent::VALUE_TYPE.
VALUE_TYPE VertexValueType DEFAULT_INITIALIZER(VT_UNDEFINED);
- /// The number of components in vertex.
+ /// The number of components in the vertex.
/// 2 and 3 are supported.
Uint8 VertexComponentCount DEFAULT_INITIALIZER(0);
- /// The maximum primitive count of this geometry.
+ /// The maximum primitive count in this geometry.
/// The current number of primitives is defined in BLASBuildTriangleData::PrimitiveCount.
Uint32 MaxPrimitiveCount DEFAULT_INITIALIZER(0);
/// Index type of this geometry, see Diligent::VALUE_TYPE.
/// Must be VT_UINT16, VT_UINT32 or VT_UNDEFINED.
- /// If not defined then used vertex array instead of indexed vertices.
+ /// If not defined then vertex array is used instead of indexed vertices.
VALUE_TYPE IndexType DEFAULT_INITIALIZER(VT_UNDEFINED);
/// Vulkan only, allows to use transformations in BLASBuildTriangleData.
@@ -83,7 +83,7 @@ struct BLASTriangleDesc
typedef struct BLASTriangleDesc BLASTriangleDesc;
-/// Defines bottom level acceleration structure axis aligned bounding boxes description.
+/// Defines bottom level acceleration structure axis-aligned bounding boxes description.
/// AABB geometry description.
struct BLASBoundingBoxDesc
@@ -92,8 +92,8 @@ struct BLASBoundingBoxDesc
/// The name is used to map AABB data (BLASBuildBoundingBoxData) to this geometry.
const char* GeometryName DEFAULT_INITIALIZER(nullptr);
- /// The maximum AABBs count.
- /// Current number of AABBs defined in BLASBuildBoundingBoxData::BoxCount.
+ /// The maximum AABB count.
+ /// Current number of AABBs is defined in BLASBuildBoundingBoxData::BoxCount.
Uint32 MaxBoxCount DEFAULT_INITIALIZER(0);
#if DILIGENT_CPP_INTERFACE
@@ -113,7 +113,7 @@ DILIGENT_TYPED_ENUM(RAYTRACING_BUILD_AS_FLAGS, Uint8)
/// Indicates that the specified acceleration structure can act as the source for
/// a copy acceleration structure command IDeviceContext::CopyBLAS() or IDeviceContext::CopyTLAS()
- /// with mode of COPY_AS_MODE_COMPACT to produce a compacted acceleration structure.
+ /// with COPY_AS_MODE_COMPACT mode to produce a compacted acceleration structure.
RAYTRACING_BUILD_AS_ALLOW_COMPACTION = 0x02,
/// Indicates that the given acceleration structure build should prioritize trace performance over build time.
@@ -163,7 +163,7 @@ struct BottomLevelASDesc DILIGENT_DERIVE(DeviceObjectAttribs)
typedef struct BottomLevelASDesc BottomLevelASDesc;
-/// Defines scratch buffer info for acceleration structure.
+/// Defines the scratch buffer info for acceleration structure.
struct ScratchBufferSizes
{
/// Scratch buffer size for acceleration structure building.
@@ -196,19 +196,19 @@ DILIGENT_BEGIN_INTERFACE(IBottomLevelAS, IDeviceObject)
virtual const BottomLevelASDesc& DILIGENT_CALL_TYPE GetDesc() const override = 0;
#endif
- /// Returns geometry index that can be used in shader binding table.
+ /// Returns the geometry index that can be used in a shader binding table.
- /// \param [in] Name - Geometry name that specified in BLASTriangleDesc or BLASBoundingBoxDesc.
+ /// \param [in] Name - Geometry name that is specified in BLASTriangleDesc or BLASBoundingBoxDesc.
/// \return Geometry index.
VIRTUAL Uint32 METHOD(GetGeometryIndex)(THIS_
const char* Name) CONST PURE;
- /// Returns scratch buffer info for current acceleration structure.
+ /// Returns the scratch buffer info for the current acceleration structure.
- /// \return structure object.
+ /// \return ScratchBufferSizes object, see Diligent::ScratchBufferSizes.
VIRTUAL ScratchBufferSizes METHOD(GetScratchBufferSizes)(THIS) CONST PURE;
- /// Returns native acceleration structure handle specific to the underlying graphics API
+ /// Returns the native acceleration structure handle specific to the underlying graphics API
/// \return pointer to ID3D12Resource interface, for D3D12 implementation\n
/// VkAccelerationStructureKHR handle, for Vulkan implementation
diff --git a/Graphics/GraphicsEngine/interface/DeviceContext.h b/Graphics/GraphicsEngine/interface/DeviceContext.h
index 1e9bb188..d19021f1 100644
--- a/Graphics/GraphicsEngine/interface/DeviceContext.h
+++ b/Graphics/GraphicsEngine/interface/DeviceContext.h
@@ -720,7 +720,7 @@ struct BeginRenderPassAttribs
typedef struct BeginRenderPassAttribs BeginRenderPassAttribs;
-/// TLAS instance flags that used in IDeviceContext::BuildTLAS().
+/// TLAS instance flags that are used in IDeviceContext::BuildTLAS().
DILIGENT_TYPED_ENUM(RAYTRACING_INSTANCE_FLAGS, Uint8)
{
RAYTRACING_INSTANCE_NONE = 0,
@@ -734,11 +734,11 @@ DILIGENT_TYPED_ENUM(RAYTRACING_INSTANCE_FLAGS, Uint8)
RAYTRACING_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE = 0x02,
/// Causes this instance to act as though RAYTRACING_GEOMETRY_FLAGS_OPAQUE were specified on all
- /// geometries referenced by this instance. This behavior can be overridden in shader by ray flags.
+ /// geometries referenced by this instance. This behavior can be overridden in the shader with ray flags.
RAYTRACING_INSTANCE_FORCE_OPAQUE = 0x04,
/// Causes this instance to act as though RAYTRACING_GEOMETRY_FLAGS_OPAQUE were not specified on all
- /// geometries referenced by this instance. This behavior can be overridden shader by ray flags.
+ /// geometries referenced by this instance. This behavior can be overridden in the shader with ray flags.
RAYTRACING_INSTANCE_FORCE_NO_OPAQUE = 0x08,
RAYTRACING_INSTANCE_FLAGS_LAST = RAYTRACING_INSTANCE_FORCE_NO_OPAQUE
@@ -748,7 +748,7 @@ DEFINE_FLAG_ENUM_OPERATORS(RAYTRACING_INSTANCE_FLAGS)
/// Defines acceleration structure copy mode.
-/// These flags are used by IDeviceContext::CopyBLAS() and IDeviceContext::CopyTLAS().
+/// These the flags used by IDeviceContext::CopyBLAS() and IDeviceContext::CopyTLAS().
DILIGENT_TYPED_ENUM(COPY_AS_MODE, Uint8)
{
/// Creates a direct copy of the acceleration structure specified in pSrc into the one specified by pDst.
@@ -768,16 +768,16 @@ DILIGENT_TYPED_ENUM(COPY_AS_MODE, Uint8)
/// Defines geometry flags for ray tracing.
DILIGENT_TYPED_ENUM(RAYTRACING_GEOMETRY_FLAGS, Uint8)
{
- RAYTRACING_GEOMETRY_NONE = 0,
+ RAYTRACING_GEOMETRY_FLAG_NONE = 0,
/// Indicates that this geometry does not invoke the any-hit shaders even if present in a hit group.
- RAYTRACING_GEOMETRY_OPAQUE = 0x01,
+ RAYTRACING_GEOMETRY_FLAG_OPAQUE = 0x01,
/// Indicates that the implementation must only call the any-hit shader a single time for each primitive in this geometry.
/// If this bit is absent an implementation may invoke the any-hit shader more than once for this geometry.
- RAYTRACING_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION = 0x02,
+ RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION = 0x02,
- RAYTRACING_GEOMETRY_FLAGS_LAST = RAYTRACING_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION
+ RAYTRACING_GEOMETRY_FLAGS_LAST = RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION
};
DEFINE_FLAG_ENUM_OPERATORS(RAYTRACING_GEOMETRY_FLAGS)
@@ -785,55 +785,57 @@ DEFINE_FLAG_ENUM_OPERATORS(RAYTRACING_GEOMETRY_FLAGS)
/// Triangle geometry data description.
struct BLASBuildTriangleData
{
- /// Geometry name used to map geometry to hit group in shader binding table.
- /// Put geometry data to geometry that allocated by BLASTriangleDesc with the same name.
+ /// Geometry name used to map a geometry to a hit group in the shader binding table.
+ /// Add geometry data to the geometry that is allocated by BLASTriangleDesc with the same name.
const char* GeometryName DEFAULT_INITIALIZER(nullptr);
/// Triangle vertices data source.
/// Triangles are considered "inactive" if the x component of each vertex is NaN.
- /// Buffer must be created with BIND_RAY_TRACING flag.
+ /// The buffer must be created with BIND_RAY_TRACING flag.
IBuffer* pVertexBuffer DEFAULT_INITIALIZER(nullptr);
/// Data offset in bytes in pVertexBuffer.
Uint32 VertexOffset DEFAULT_INITIALIZER(0);
- /// Stride in bytes between each vertex.
+ /// Stride in bytes between vertices.
Uint32 VertexStride DEFAULT_INITIALIZER(0);
- /// Number of triangle vertices.
+ /// The number of triangle vertices.
/// Must be less than or equal to BLASTriangleDesc::MaxVertexCount.
Uint32 VertexCount DEFAULT_INITIALIZER(0);
- /// The type of vertex and number of components.
- /// This is optional values. Must be undefined or same as in BLASTriangleDesc.
+ /// The type of the vertex components.
+ /// This is an optional values. Must be undefined or same as in BLASTriangleDesc.
VALUE_TYPE VertexValueType DEFAULT_INITIALIZER(VT_UNDEFINED);
+
+ /// The number of vertex components
Uint8 VertexComponentCount DEFAULT_INITIALIZER(0);
- /// Number of triangles.
- /// Must equal to VertexCount / 3 if pIndexBuffer is null or must equal to index count / 3.
+ /// The number of triangles.
+ /// Must equal to VertexCount / 3 if pIndexBuffer is null or must be equal to index count / 3.
Uint32 PrimitiveCount DEFAULT_INITIALIZER(0);
/// Triangle indices data source.
/// Must be null if BLASTriangleDesc::IndexType is undefined.
- /// Buffer must be created with BIND_RAY_TRACING flag.
+ /// The buffer must be created with BIND_RAY_TRACING flag.
IBuffer* pIndexBuffer DEFAULT_INITIALIZER(nullptr);
/// Data offset in bytes in pIndexBuffer.
Uint32 IndexOffset DEFAULT_INITIALIZER(0);
- /// Type of triangle indices, see Diligent::VALUE_TYPE.
- /// This is optional value. Must be undefined or same as in BLASTriangleDesc.
+ /// The type of triangle indices, see Diligent::VALUE_TYPE.
+ /// This is an optional value. Must be undefined or same as in BLASTriangleDesc.
VALUE_TYPE IndexType DEFAULT_INITIALIZER(VT_UNDEFINED);
/// Geometry transformation data source.
- /// Buffer must be created with BIND_RAY_TRACING flag.
+ /// The buffer must be created with BIND_RAY_TRACING flag.
IBuffer* pTransformBuffer DEFAULT_INITIALIZER(nullptr);
/// Data offset in bytes in pTransformBuffer.
Uint32 TransformBufferOffset DEFAULT_INITIALIZER(0);
- /// Geometry flags.
- RAYTRACING_GEOMETRY_FLAGS Flags DEFAULT_INITIALIZER(RAYTRACING_GEOMETRY_NONE);
+ /// Geometry flags, se Diligent::RAYTRACING_GEOMETRY_FLAGS.
+ RAYTRACING_GEOMETRY_FLAGS Flags DEFAULT_INITIALIZER(RAYTRACING_GEOMETRY_FLAG_NONE);
#if DILIGENT_CPP_INTERFACE
BLASBuildTriangleData() noexcept {}
@@ -866,7 +868,7 @@ struct BLASBuildBoundingBoxData
Uint32 BoxCount DEFAULT_INITIALIZER(0);
/// Geometry flags, see Diligent::RAYTRACING_GEOMETRY_FLAGS.
- RAYTRACING_GEOMETRY_FLAGS Flags DEFAULT_INITIALIZER(RAYTRACING_GEOMETRY_NONE);
+ RAYTRACING_GEOMETRY_FLAGS Flags DEFAULT_INITIALIZER(RAYTRACING_GEOMETRY_FLAG_NONE);
#if DILIGENT_CPP_INTERFACE
BLASBuildBoundingBoxData() noexcept {}
@@ -890,20 +892,20 @@ struct BuildBLASAttribs
/// A pointer to an array of TriangleDataCount BLASBuildTriangleData structures that contains triangle geometry data.
BLASBuildTriangleData const* pTriangleData DEFAULT_INITIALIZER(nullptr);
- /// Number of triangle grometries.
+ /// The number of triangle grometries.
/// Must be less than or equal to BottomLevelASDesc::TriangleCount.
Uint32 TriangleDataCount DEFAULT_INITIALIZER(0);
- /// A pointer to an array of BoxDataCount BLASBuildBoundingBoxData structures that contains AABB geometry data.
+ /// A pointer to an array of BoxDataCount BLASBuildBoundingBoxData structures that contain AABB geometry data.
BLASBuildBoundingBoxData const* pBoxData DEFAULT_INITIALIZER(nullptr);
- /// Number of AABB geometries.
+ /// The number of AABB geometries.
/// Must be less than or equal to BottomLevelASDesc::BoxCount.
Uint32 BoxDataCount DEFAULT_INITIALIZER(0);
- /// Buffer that used for acceleration structure building.
+ /// The buffer that is used for acceleration structure building.
/// Must be created with BIND_RAY_TRACING.
- /// Call IBottomLevelAS::GetScratchBufferSizes().Build to get minimal size for scratch buffer.
+ /// Call IBottomLevelAS::GetScratchBufferSizes().Build to get the minimal size for the scratch buffer.
IBuffer* pScratchBuffer DEFAULT_INITIALIZER(nullptr);
/// Offset from the beginning of the buffer.
@@ -919,7 +921,7 @@ struct BuildBLASAttribs
typedef struct BuildBLASAttribs BuildBLASAttribs;
-/// Can be used in TLASBuildInstanceData::ContributionToHitGroupIndex to calculate index
+/// Can be used in TLASBuildInstanceData::ContributionToHitGroupIndex to calculate the index
/// depending on geometry count in TLASBuildInstanceData::pBLAS and shader binding mode in TopLevelASDesc::BindingMode.
///
/// Example:
@@ -934,11 +936,10 @@ static const Uint32 TLAS_INSTANCE_OFFSET_AUTO = ~0u;
/// Row-major matrix
struct InstanceMatrix
{
- /// (0.0 1.0 2.0)
- /// (0.1 1.1 2.1) - rotation
- /// (0.2 1.2 2.2)
- ///
- /// [0.3 1.3 2.3] - translation
+ /// rotation translation
+ /// ([0,0] [0,1] [0,2]) ([0,3])
+ /// ([1,0] [1,1] [1,2]) ([1,3])
+ /// ([2,0] [2,1] [2,2]) ([2,3])
float data [3][4];
#if DILIGENT_CPP_INTERFACE
@@ -951,7 +952,7 @@ struct InstanceMatrix
InstanceMatrix(const InstanceMatrix&) noexcept = default;
- /// Set matrix translation.
+ /// Sets the translation part.
InstanceMatrix& SetTranslation(float x, float y, float z) noexcept
{
data[0][3] = x;
@@ -960,7 +961,7 @@ struct InstanceMatrix
return *this;
}
- /// Set matrix rotation basis.
+ /// Sets the rotation part.
InstanceMatrix& SetRotation(const float* pMatrix3x3) noexcept
{
data[0][0] = pMatrix3x3[0]; data[1][0] = pMatrix3x3[1]; data[2][0] = pMatrix3x3[2];
@@ -976,7 +977,7 @@ typedef struct InstanceMatrix InstanceMatrix;
/// This structure is used by BuildTLASAttribs.
struct TLASBuildInstanceData
{
- /// Instance name that used to map instance to hit group in shader binding table.
+ /// Instance name that is used to map an instance to a hit group in shader binding table.
const char* InstanceName DEFAULT_INITIALIZER(nullptr);
/// Bottom-level AS that represents instance geometry.
@@ -985,20 +986,21 @@ struct TLASBuildInstanceData
/// Instace to world transformation.
InstanceMatrix Transform;
- /// User-defined value that can be accessed in shader via InstanceID() in HLSL and gl_InstanceCustomIndex in GLSL.
- /// Used only first 24 bits.
+ /// User-defined value that can be accessed in the shader via InstanceID() in HLSL and gl_InstanceCustomIndex in GLSL.
+ /// Only the lower 24 bits are used.
Uint32 CustomId DEFAULT_INITIALIZER(0);
/// Instance flags, see Diligent::RAYTRACING_INSTANCE_FLAGS.
RAYTRACING_INSTANCE_FLAGS Flags DEFAULT_INITIALIZER(RAYTRACING_INSTANCE_NONE);
/// Visibility mask for the geometry, the instance may only be hit if rayMask & instance.Mask != 0.
- /// (rayMask in GLSL is a cullMask argument of traceRayEXT(), rayMask in HLSL is a InstanceInclusionMask argument of TraceRay()).
+ /// (rayMask in GLSL is a cullMask argument of traceRayEXT(), rayMask in HLSL is an InstanceInclusionMask argument of TraceRay()).
Uint8 Mask DEFAULT_INITIALIZER(0xFF);
- /// Index used to calculate hit group location in shader binding table.
- /// Must be TLAS_INSTANCE_OFFSET_AUTO is TLAS created with BindingMode SHADER_BINDING_MODE_PER_GEOMETRY or SHADER_BINDING_MODE_PER_INSTANCE.
- /// Used only first 24 bits.
+ /// The index used to calculate the hit group location in the shader binding table.
+ /// Must be TLAS_INSTANCE_OFFSET_AUTO if TLAS is created with BindingMode SHADER_BINDING_MODE_PER_GEOMETRY,
+ /// or SHADER_BINDING_MODE_PER_INSTANCE otherwise.
+ /// Only the lower 24 bits are used.
Uint32 ContributionToHitGroupIndex DEFAULT_INITIALIZER(TLAS_INSTANCE_OFFSET_AUTO);
#if DILIGENT_CPP_INTERFACE
@@ -1025,19 +1027,19 @@ struct BuildTLASAttribs
/// Bottom-level AS (in TLASBuildInstanceData::pBLAS) state transition mode (see Diligent::RESOURCE_STATE_TRANSITION_MODE).
RESOURCE_STATE_TRANSITION_MODE BLASTransitionMode DEFAULT_INITIALIZER(RESOURCE_STATE_TRANSITION_MODE_NONE);
- /// A pointer to an array of InstanceCount TLASBuildInstanceData structures that contains instance data.
+ /// A pointer to an array of InstanceCount TLASBuildInstanceData structures that contain instance data.
TLASBuildInstanceData const* pInstances DEFAULT_INITIALIZER(nullptr);
- /// Number of instances.
+ /// The number of instances.
/// Must be less than or equal to TopLevelASDesc::MaxInstanceCount.
Uint32 InstanceCount DEFAULT_INITIALIZER(0);
- /// Buffer that will be used to store instance data during AS building.
- /// Buffer size must be at least TLAS_INSTANCE_DATA_SIZE * InstanceCount.
- /// Buffer must be created with BIND_RAY_TRACING flag.
+ /// The buffer that will be used to store instance data during AS building.
+ /// The buffer size must be at least TLAS_INSTANCE_DATA_SIZE * InstanceCount.
+ /// The buffer must be created with BIND_RAY_TRACING flag.
IBuffer* pInstanceBuffer DEFAULT_INITIALIZER(nullptr);
- /// Offset from the beginning of the buffer to location of instance data.
+ /// Offset from the beginning of the buffer to the location of instance data.
Uint32 InstanceBufferOffset DEFAULT_INITIALIZER(0);
/// Instance buffer state transition mode (see Diligent::RESOURCE_STATE_TRANSITION_MODE).
@@ -1046,9 +1048,9 @@ struct BuildTLASAttribs
/// AZ TODO
Uint32 HitShadersPerInstance DEFAULT_INITIALIZER(1);
- /// Buffer that used for acceleration structure building.
+ /// Buffer that is used for acceleration structure building.
/// Must be created with BIND_RAY_TRACING.
- /// Call ITopLevelAS::GetScratchBufferSizes().Build to get minimal size for scratch buffer.
+ /// Call ITopLevelAS::GetScratchBufferSizes().Build to get the minimal size for the scratch buffer.
IBuffer* pScratchBuffer DEFAULT_INITIALIZER(nullptr);
/// Offset from the beginning of the buffer.
@@ -1072,7 +1074,7 @@ struct CopyBLASAttribs
/// Destination bottom-level AS.
/// If Mode is COPY_AS_MODE_COMPACT then pDst must be created with CompactedSize
- /// that is greater or equal to size that returned by IDeviceContext::WriteBLASCompactedSize.
+ /// that is greater or equal to the size returned by IDeviceContext::WriteBLASCompactedSize.
IBottomLevelAS* pDst DEFAULT_INITIALIZER(nullptr);
/// Acceleration structure copy mode, see Diligent::COPY_AS_MODE.
@@ -1124,10 +1126,10 @@ struct WriteBLASCompactedSizeAttribs
/// Bottom-level AS.
IBottomLevelAS* pBLAS DEFAULT_INITIALIZER(nullptr);
- /// Command will writes 64 bit value with acceleration structure compacted size into buffer.
+ /// The destination buffer into which a 64-bit value representing the acceleration structure compacted size will be written to.
IBuffer* pDestBuffer DEFAULT_INITIALIZER(nullptr);
- /// Offset from the beginning of the buffer to location of AS compacted size.
+ /// Offset from the beginning of the buffer to the location of the AS compacted size.
Uint32 DestBufferOffset DEFAULT_INITIALIZER(0);
/// Bottom-level AS state transition mode (see Diligent::RESOURCE_STATE_TRANSITION_MODE).
@@ -1149,10 +1151,10 @@ struct WriteTLASCompactedSizeAttribs
/// Top-level AS.
ITopLevelAS* pTLAS DEFAULT_INITIALIZER(nullptr);
- /// Command will writes 64 bit value with acceleration structure compacted size into buffer.
+ /// The destination buffer into which a 64-bit value representing the acceleration structure compacted size will be written to.
IBuffer* pDestBuffer DEFAULT_INITIALIZER(nullptr);
- /// Offset from the beginning of the buffer to location of AS compacted size.
+ /// Offset from the beginning of the buffer to the location of the AS compacted size.
Uint32 DestBufferOffset DEFAULT_INITIALIZER(0);
/// Top-level AS state transition mode (see Diligent::RESOURCE_STATE_TRANSITION_MODE).
@@ -1174,9 +1176,9 @@ struct TraceRaysAttribs
/// Shader binding table.
IShaderBindingTable* pSBT DEFAULT_INITIALIZER(nullptr);
- Uint32 DimensionX DEFAULT_INITIALIZER(1); ///< Number of rays dispatched in X direction.
- Uint32 DimensionY DEFAULT_INITIALIZER(1); ///< Number of rays dispatched in Y direction.
- Uint32 DimensionZ DEFAULT_INITIALIZER(1); ///< Number of rays dispatched in Z direction.
+ Uint32 DimensionX DEFAULT_INITIALIZER(1); ///< The number of rays dispatched in X direction.
+ Uint32 DimensionY DEFAULT_INITIALIZER(1); ///< The number of rays dispatched in Y direction.
+ Uint32 DimensionZ DEFAULT_INITIALIZER(1); ///< The number of rays dispatched in Z direction.
/// Shader binding table buffer state transition mode (see Diligent::RESOURCE_STATE_TRANSITION_MODE).
RESOURCE_STATE_TRANSITION_MODE SBTTransitionMode DEFAULT_INITIALIZER(RESOURCE_STATE_TRANSITION_MODE_NONE);
@@ -2083,14 +2085,14 @@ DILIGENT_BEGIN_INTERFACE(IDeviceContext, IObject)
const ResolveTextureSubresourceAttribs REF ResolveAttribs) PURE;
- /// Build Bottom-level acceleration structure with the specified geometries.
+ /// Builds a bottom-level acceleration structure with the specified geometries.
/// \param [in] Attribs - Structure describing build BLAS command attributes, see Diligent::BuildBLASAttribs for details.
VIRTUAL void METHOD(BuildBLAS)(THIS_
const BuildBLASAttribs REF Attribs) PURE;
- /// Build Top-level acceleration structure with the specified instances.
+ /// Builds a top-level acceleration structure with the specified instances.
/// \param [in] Attribs - Structure describing build TLAS command attributes, see Diligent::BuildTLASAttribs for details.
VIRTUAL void METHOD(BuildTLAS)(THIS_
@@ -2111,14 +2113,14 @@ DILIGENT_BEGIN_INTERFACE(IDeviceContext, IObject)
const CopyTLASAttribs REF Attribs) PURE;
- /// Writes acceleration structure memory size to the buffer for compacting operation.
+ /// Writes a bottom-level acceleration structure memory size required for compacting operation to a buffer.
/// \param [in] Attribs - Structure describing write BLAS compacted size command attributes, see Diligent::WriteBLASCompactedSizeAttribs for details.
VIRTUAL void METHOD(WriteBLASCompactedSize)(THIS_
const WriteBLASCompactedSizeAttribs REF Attribs) PURE;
- /// Writes acceleration structure memory size to the buffer for compacting operation.
+ /// Writes a top-level acceleration structure memory size required for compacting operation to a buffer.
/// \param [in] Attribs - Structure describing write TLAS compacted size command attributes, see Diligent::WriteTLASCompactedSizeAttribs for details.
VIRTUAL void METHOD(WriteTLASCompactedSize)(THIS_
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
index cd32efc4..e9983eb0 100644
--- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h
+++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
@@ -2683,16 +2683,16 @@ DILIGENT_TYPED_ENUM(RESOURCE_STATE, Uint32)
/// The resource state is known to the engine, but is undefined. A resource is typically in an undefined state right after initialization.
RESOURCE_STATE_UNDEFINED = 0x00001,
- /// The resource is accessed as vertex buffer
+ /// The resource is accessed as a vertex buffer
RESOURCE_STATE_VERTEX_BUFFER = 0x00002,
- /// The resource is accessed as constant (uniform) buffer
+ /// The resource is accessed as a constant (uniform) buffer
RESOURCE_STATE_CONSTANT_BUFFER = 0x00004,
- /// The resource is accessed as index buffer
+ /// The resource is accessed as an index buffer
RESOURCE_STATE_INDEX_BUFFER = 0x00008,
- /// The resource is accessed as render target
+ /// The resource is accessed as a render target
RESOURCE_STATE_RENDER_TARGET = 0x00010,
/// The resource is used for unordered access
@@ -2710,7 +2710,7 @@ DILIGENT_TYPED_ENUM(RESOURCE_STATE, Uint32)
/// The resource is used as the destination for stream output
RESOURCE_STATE_STREAM_OUT = 0x00200,
- /// The resource is used as indirect draw/dispatch arguments buffer
+ /// The resource is used as an indirect draw/dispatch arguments buffer
RESOURCE_STATE_INDIRECT_ARGUMENT = 0x00400,
/// The resource is used as the destination in a copy operation
@@ -2725,20 +2725,20 @@ DILIGENT_TYPED_ENUM(RESOURCE_STATE, Uint32)
/// The resource is used as the source in a resolve operation
RESOURCE_STATE_RESOLVE_SOURCE = 0x04000,
- /// The resource is used as input attachment in a render pass subpass
+ /// The resource is used as an input attachment in a render pass subpass
RESOURCE_STATE_INPUT_ATTACHMENT = 0x08000,
/// The resource is used for present
RESOURCE_STATE_PRESENT = 0x10000,
- /// The resource is used as vertex/index/instance buffer in a AS building operation
- /// or as acceleration structure source in a AS copy operation.
+ /// The resource is used as vertex/index/instance buffer in an AS building operation
+ /// or as an acceleration structure source in an AS copy operation.
RESOURCE_STATE_BUILD_AS_READ = 0x20000,
- /// The resource is used as target in a AS building or AS copy operations.
+ /// The resource is used as the target for AS building or AS copy operations.
RESOURCE_STATE_BUILD_AS_WRITE = 0x40000,
- /// The resource is used as top-level AS shader resource in a trace rays operation.
+ /// The resource is used as a top-level AS shader resource in a trace rays operation.
RESOURCE_STATE_RAY_TRACING = 0x80000,
RESOURCE_STATE_MAX_BIT = RESOURCE_STATE_RAY_TRACING,
diff --git a/Graphics/GraphicsEngine/interface/PipelineState.h b/Graphics/GraphicsEngine/interface/PipelineState.h
index 6c46fd27..7e592ba7 100644
--- a/Graphics/GraphicsEngine/interface/PipelineState.h
+++ b/Graphics/GraphicsEngine/interface/PipelineState.h
@@ -221,7 +221,7 @@ struct RayTracingGeneralShaderGroup
/// Unique group name.
const char* Name DEFAULT_INITIALIZER(nullptr);
- /// Shader type must be SHADER_TYPE_RAY_GEN or SHADER_TYPE_RAY_MISS or SHADER_TYPE_CALLABLE.
+ /// Shader type must be SHADER_TYPE_RAY_GEN, SHADER_TYPE_RAY_MISS or SHADER_TYPE_CALLABLE.
IShader* pShader DEFAULT_INITIALIZER(nullptr);
#if DILIGENT_CPP_INTERFACE
@@ -244,11 +244,11 @@ struct RayTracingTriangleHitShaderGroup
const char* Name DEFAULT_INITIALIZER(nullptr);
/// Closest hit shader.
- /// Shader type must be SHADER_TYPE_RAY_CLOSEST_HIT.
+ /// The shader type must be SHADER_TYPE_RAY_CLOSEST_HIT.
IShader* pClosestHitShader DEFAULT_INITIALIZER(nullptr);
/// Any-hit shader. Can be null.
- /// Shader type must be SHADER_TYPE_RAY_ANY_HIT.
+ /// The shader type must be SHADER_TYPE_RAY_ANY_HIT.
IShader* pAnyHitShader DEFAULT_INITIALIZER(nullptr); // can be null
#if DILIGENT_CPP_INTERFACE
@@ -273,15 +273,15 @@ struct RayTracingProceduralHitShaderGroup
const char* Name DEFAULT_INITIALIZER(nullptr);
/// Intersection shader.
- /// Shader type must be SHADER_TYPE_RAY_INTERSECTION.
+ /// The shader type must be SHADER_TYPE_RAY_INTERSECTION.
IShader* pIntersectionShader DEFAULT_INITIALIZER(nullptr);
/// Closest hit shader. Can be null.
- /// Shader type must be SHADER_TYPE_RAY_CLOSEST_HIT.
+ /// The shader type must be SHADER_TYPE_RAY_CLOSEST_HIT.
IShader* pClosestHitShader DEFAULT_INITIALIZER(nullptr);
/// Any-hit shader. Can be null.
- /// Shader type must be SHADER_TYPE_RAY_ANY_HIT.
+ /// The shader type must be SHADER_TYPE_RAY_ANY_HIT.
IShader* pAnyHitShader DEFAULT_INITIALIZER(nullptr);
#if DILIGENT_CPP_INTERFACE
@@ -309,7 +309,7 @@ struct RayTracingPipelineDesc
/// Shader record size plus shader group size (32 bytes) must not exceed 4096 bytes.
Uint16 ShaderRecordSize DEFAULT_INITIALIZER(0);
- /// Number of recursive call of TraceRay() in HLSL or traceRay() in GLSL.
+ /// Number of recursive calls of TraceRay() in HLSL or traceRay() in GLSL.
Uint8 MaxRecursionDepth DEFAULT_INITIALIZER(0); // must be 0..31 (check current device limits)
};
typedef struct RayTracingPipelineDesc RayTracingPipelineDesc;
@@ -450,34 +450,34 @@ struct RayTracingPipelineStateCreateInfo DILIGENT_DERIVE(PipelineStateCreateInfo
/// Ray tracing pipeline description.
RayTracingPipelineDesc RayTracingPipeline;
- /// A pointer to an array of GeneralShaderCount RayTracingGeneralShaderGroup structures that contains shader group description.
+ /// A pointer to an array of GeneralShaderCount RayTracingGeneralShaderGroup structures that contain shader group description.
const RayTracingGeneralShaderGroup* pGeneralShaders DEFAULT_INITIALIZER(nullptr);
- /// Number of general shader groups.
+ /// The number of general shader groups.
Uint32 GeneralShaderCount DEFAULT_INITIALIZER(0);
- /// A pointer to an array of TriangleHitShaderCount RayTracingTriangleHitShaderGroup structures that contains shader group description.
+ /// A pointer to an array of TriangleHitShaderCount RayTracingTriangleHitShaderGroup structures that contain shader group description.
/// Can be null.
const RayTracingTriangleHitShaderGroup* pTriangleHitShaders DEFAULT_INITIALIZER(nullptr);
- /// Number of triangle hit shader groups.
+ /// The number of triangle hit shader groups.
Uint32 TriangleHitShaderCount DEFAULT_INITIALIZER(0);
- /// A pointer to an array of ProceduralHitShaderCount RayTracingProceduralHitShaderGroup structures that contains shader group description.
+ /// A pointer to an array of ProceduralHitShaderCount RayTracingProceduralHitShaderGroup structures that contain shader group description.
/// Can be null.
const RayTracingProceduralHitShaderGroup* pProceduralHitShaders DEFAULT_INITIALIZER(nullptr);
- /// Number of procedural shader groups.
+ /// The number of procedural shader groups.
Uint32 ProceduralHitShaderCount DEFAULT_INITIALIZER(0);
- /// Direct3D12 only: set name of constant buffer that will be used by local root signature.
+ /// Direct3D12 only: the name of the constant buffer that will be used by the local root signature.
/// Ignored if RayTracingPipelineDesc::ShaderRecordSize is zero.
const char* pShaderRecordName DEFAULT_INITIALIZER(nullptr);
- /// Direct3D12 only: set max hit shader attribute size in bytes.
+ /// Direct3D12 only: the maximum hit shader attribute size in bytes.
Uint32 MaxAttributeSize DEFAULT_INITIALIZER(0);
- /// Direct3D12 only: set max payload size in bytes.
+ /// Direct3D12 only: the maximum payload size in bytes.
Uint32 MaxPayloadSize DEFAULT_INITIALIZER(0);
};
typedef struct RayTracingPipelineStateCreateInfo RayTracingPipelineStateCreateInfo;
diff --git a/Graphics/GraphicsEngine/interface/TopLevelAS.h b/Graphics/GraphicsEngine/interface/TopLevelAS.h
index 2efd8518..0c02b920 100644
--- a/Graphics/GraphicsEngine/interface/TopLevelAS.h
+++ b/Graphics/GraphicsEngine/interface/TopLevelAS.h
@@ -68,11 +68,11 @@ struct TopLevelASDesc DILIGENT_DERIVE(DeviceObjectAttribs)
/// Ray tracing build flags, see Diligent::RAYTRACING_BUILD_AS_FLAGS.
RAYTRACING_BUILD_AS_FLAGS Flags DEFAULT_INITIALIZER(RAYTRACING_BUILD_AS_NONE);
- /// Size from the result of IDeviceContext::WriteTLASCompactedSize() if this acceleration structure
+ /// The size returned by IDeviceContext::WriteTLASCompactedSize(), if this acceleration structure
/// is going to be the target of a compacting copy (IDeviceContext::CopyTLAS() with COPY_AS_MODE_COMPACT).
Uint32 CompactedSize DEFAULT_INITIALIZER(0);
- /// Binding mode that used for TLASBuildInstanceData::ContributionToHitGroupIndex calculation,
+ /// Binding mode that i used for TLASBuildInstanceData::ContributionToHitGroupIndex calculation,
/// see Diligent::SHADER_BINDING_MODE.
SHADER_BINDING_MODE BindingMode DEFAULT_INITIALIZER(SHADER_BINDING_MODE_PER_GEOMETRY);
@@ -89,10 +89,10 @@ typedef struct TopLevelASDesc TopLevelASDesc;
/// Top-level AS instance description.
struct TLASInstanceDesc
{
- /// Index that specified in TLASBuildInstanceData::ContributionToHitGroupIndex.
+ /// Index that corresponds to the one specified in TLASBuildInstanceData::ContributionToHitGroupIndex.
Uint32 ContributionToHitGroupIndex DEFAULT_INITIALIZER(0);
- /// Bottom-level AS that specified in TLASBuildInstanceData::pBLAS.
+ /// Bottom-level AS that is specified in TLASBuildInstanceData::pBLAS.
IBottomLevelAS* pBLAS DEFAULT_INITIALIZER(nullptr);
#if DILIGENT_CPP_INTERFACE
@@ -121,12 +121,12 @@ DILIGENT_BEGIN_INTERFACE(ITopLevelAS, IDeviceObject)
/// Returns instance description that can be used in shader binding table.
- /// \param [in] Name - Instance name that specified in TLASBuildInstanceData::InstanceName.
+ /// \param [in] Name - Instance name that is specified in TLASBuildInstanceData::InstanceName.
/// \return structure object.
VIRTUAL TLASInstanceDesc METHOD(GetInstanceDesc)(THIS_
const char* Name) CONST PURE;
- /// Returns scratch buffer info for current acceleration structure.
+ /// Returns scratch buffer info for the current acceleration structure.
/// \return structure object.
VIRTUAL ScratchBufferSizes METHOD(GetScratchBufferSizes)(THIS) CONST PURE;