Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::DrawMeshIndirectAttribs Struct Reference

Defines the mesh indirect draw command attributes. More...

#include <DeviceContext.h>

Public Member Functions

constexpr DrawMeshIndirectAttribs () noexcept
 Initializes the structure members with default values.
 
constexpr DrawMeshIndirectAttribs (IBuffer *_pAttribsBuffer, DRAW_FLAGS _Flags, Uint32 _CommandCount, Uint64 _DrawArgsOffset=DrawMeshIndirectAttribs{}.DrawArgsOffset, RESOURCE_STATE_TRANSITION_MODE _AttribsBufferStateTransitionMode=DrawMeshIndirectAttribs{}.AttribsBufferStateTransitionMode, IBuffer *_pCounterBuffer=DrawMeshIndirectAttribs{}.pCounterBuffer, Uint64 _CounterOffset=DrawMeshIndirectAttribs{}.CounterOffset, RESOURCE_STATE_TRANSITION_MODE _CounterBufferStateTransitionMode=DrawMeshIndirectAttribs{}.CounterBufferStateTransitionMode) noexcept
 Initializes the structure members with user-specified values.
 

Public Attributes

IBufferpAttribsBuffer = nullptr
 
Uint64 DrawArgsOffset = 0
 Offset from the beginning of the attribs buffer to the location of the draw command attributes.
 
DRAW_FLAGS Flags = DRAW_FLAG_NONE
 Additional flags, see Diligent::DRAW_FLAGS.
 
Uint32 CommandCount = 1
 
RESOURCE_STATE_TRANSITION_MODE AttribsBufferStateTransitionMode = RESOURCE_STATE_TRANSITION_MODE_NONE
 State transition mode for indirect draw arguments buffer.
 
IBufferpCounterBuffer = nullptr
 A pointer to the optional buffer, from which Uint32 value with the draw count will be read.
 
Uint64 CounterOffset = 0
 When pCounterBuffer is not null, an offset from the beginning of the buffer to the location of the command counter.
 
RESOURCE_STATE_TRANSITION_MODE CounterBufferStateTransitionMode = RESOURCE_STATE_TRANSITION_MODE_NONE
 When pCounterBuffer is not null, state transition mode for the count buffer.
 

Detailed Description

Defines the mesh indirect draw command attributes.

This structure is used by IDeviceContext::DrawMeshIndirect().

Member Data Documentation

◆ CommandCount

Uint32 Diligent::DrawMeshIndirectAttribs::CommandCount = 1

When pCounterBuffer is null, the number of commands to run. When pCounterBuffer is not null, the maximum number of commands that will be read from the count buffer.

◆ pAttribsBuffer

IBuffer* Diligent::DrawMeshIndirectAttribs::pAttribsBuffer = nullptr

A pointer to the buffer, from which indirect draw attributes will be read. The buffer must contain the following arguments at the specified offset:

Direct3D12:

 Uint32 ThreadGroupCountX;
 Uint32 ThreadGroupCountY;
 Uint32 ThreadGroupCountZ;

Vulkan:

 Uint32 TaskCount;
 Uint32 FirstTask;

Size of the buffer must be sizeof(Uint32[3]) * Attribs.MaxDrawCommands.