Skip to content

Commit c2e1ac6

Browse files
Add DrawMeshIndirectAttribs::pMtlAttribs for Metal mesh draw threadgroup sizes (API256017)
1 parent 801e12d commit c2e1ac6

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

Graphics/GraphicsEngine/interface/APIInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/// \file
3131
/// Diligent API information
3232

33-
#define DILIGENT_API_VERSION 256016
33+
#define DILIGENT_API_VERSION 256017
3434

3535
#include "../../../Primitives/interface/BasicTypes.h"
3636

Graphics/GraphicsEngine/interface/DeviceContext.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,12 @@ struct DrawMeshIndirectAttribs
714714
/// When pCounterBuffer is not null, state transition mode for the count buffer.
715715
RESOURCE_STATE_TRANSITION_MODE CounterBufferStateTransitionMode DEFAULT_INITIALIZER(RESOURCE_STATE_TRANSITION_MODE_NONE);
716716

717+
/// Metal-specific mesh draw command attributes.
718+
///
719+
/// \remarks
720+
/// This member is only used by Metal backend and is ignored by others.
721+
const DrawMeshAttribsMtl* pMtlAttribs DEFAULT_INITIALIZER(nullptr);
722+
717723
#if DILIGENT_CPP_INTERFACE
718724
/// Initializes the structure members with default values
719725
constexpr DrawMeshIndirectAttribs() noexcept {}
@@ -726,15 +732,17 @@ struct DrawMeshIndirectAttribs
726732
RESOURCE_STATE_TRANSITION_MODE _AttribsBufferStateTransitionMode = DrawMeshIndirectAttribs{}.AttribsBufferStateTransitionMode,
727733
IBuffer* _pCounterBuffer = DrawMeshIndirectAttribs{}.pCounterBuffer,
728734
Uint64 _CounterOffset = DrawMeshIndirectAttribs{}.CounterOffset,
729-
RESOURCE_STATE_TRANSITION_MODE _CounterBufferStateTransitionMode = DrawMeshIndirectAttribs{}.CounterBufferStateTransitionMode) noexcept :
735+
RESOURCE_STATE_TRANSITION_MODE _CounterBufferStateTransitionMode = DrawMeshIndirectAttribs{}.CounterBufferStateTransitionMode,
736+
const DrawMeshAttribsMtl* _pMtlAttribs = DrawMeshIndirectAttribs{}.pMtlAttribs) noexcept :
730737
pAttribsBuffer {_pAttribsBuffer },
731738
DrawArgsOffset {_DrawArgsOffset },
732739
Flags {_Flags },
733740
CommandCount {_CommandCount },
734741
AttribsBufferStateTransitionMode{_AttribsBufferStateTransitionMode},
735742
pCounterBuffer {_pCounterBuffer },
736743
CounterOffset {_CounterOffset },
737-
CounterBufferStateTransitionMode{_CounterBufferStateTransitionMode}
744+
CounterBufferStateTransitionMode{_CounterBufferStateTransitionMode},
745+
pMtlAttribs {_pMtlAttribs }
738746
{}
739747
#endif
740748
};

ReleaseHistory.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Current progress
44

5+
* Added `DrawMeshIndirectAttribs::pMtlAttribs` member (API256017)
6+
* `DrawMeshIndirectAttribs::pMtlAttribs` allows specifying Metal object and mesh thread group sizes for `IDeviceContext::DrawMeshIndirect()`
57
* Added `DrawMeshAttribsMtl` struct and `DrawMeshAttribs::pMtlAttribs` member (API256016)
68
* `DrawMeshAttribsMtl` allows specifying Metal object and mesh thread group sizes for `IDeviceContext::DrawMesh()`
79
* Added `TextureUpdateOffsetAlignment` and `TextureUpdateStrideAlignment` members to `BufferProperties` struct (API256015)

0 commit comments

Comments
 (0)