#include <DrawPacketBuilder.h>
Classes | |
struct | DrawRequest |
Public Member Functions | |
DrawPacketBuilder (RHI::MultiDevice::DeviceMask deviceMask) | |
DrawPacketBuilder (const DrawPacketBuilder &other) | |
DrawPacketBuilder & | operator= (const DrawPacketBuilder &other) |
void | Begin (IAllocator *allocator) |
void | SetGeometryView (GeometryView *geometryView) |
Passes the GeometryView to all single-device DrawPacketBuilders. | |
void | SetDrawInstanceArguments (DrawInstanceArguments drawInstanceArguments) |
Passes the DrawInstanceArguments to all single-device DrawPacketBuilders. | |
void | SetRootConstants (AZStd::span< const uint8_t > rootConstants) |
Passes the RootConstants to all single-device DrawPacketBuilders. | |
void | SetScissors (AZStd::span< const Scissor > scissors) |
Passes the Scissors to all single-device DrawPacketBuilders. | |
void | SetScissor (const Scissor &scissor) |
Passes a Scissor to all single-device DrawPacketBuilders. | |
void | SetViewports (AZStd::span< const Viewport > viewports) |
Passes the Viewports to all single-device DrawPacketBuilders. | |
void | SetViewport (const Viewport &viewport) |
Passes a Viewport to all singl-device DrawPacketBuilders. | |
void | AddShaderResourceGroup (const ShaderResourceGroup *shaderResourceGroup) |
Passes the DeviceShaderResourceGroup to all single-device DrawPacketBuilders. | |
void | AddDrawItem (DrawRequest &request) |
RHI::Ptr< DrawPacket > | End () |
RHI::Ptr< DrawPacket > | Clone (const DrawPacket *original) |
Static Public Attributes | |
static const size_t | DrawItemCountMax = 16 |
DrawPacketBuilder builds a DrawPacket and its DrawItems contiguously in memory for cache efficiency Start by calling DrawPacketBuilder::Begin( ) Then Set the necessary data and add a DrawRequest for each DrawItem Finalize the DrawPacket with a call to DrawPacketBuilder::End( )
void AZ::RHI::DrawPacketBuilder::AddDrawItem | ( | DrawRequest & | request | ) |
Passes the single-device DrawRequests to all single-device DrawPacketBuilders, keeps the multi-device DeviceDrawRequest and sets the DrawListMask in the current multi-device DeviceDrawPacket
void AZ::RHI::DrawPacketBuilder::Begin | ( | IAllocator * | allocator | ) |
Passes the linear allocator to all single-device DrawPacketBuilders and initializes the multi-device DeviceDrawPacket which will be returned after calling End()
RHI::Ptr< DrawPacket > AZ::RHI::DrawPacketBuilder::Clone | ( | const DrawPacket * | original | ) |
Clones all single-device DrawPackets and then sets all corresponding pointers in the multi-device DeviceDrawPacket and DeviceDrawItem objects
RHI::Ptr< DrawPacket > AZ::RHI::DrawPacketBuilder::End | ( | ) |
Builds all single-device DrawPackets linearly in memory using their allocator and captures them in the multi-device DeviceDrawPacket, correctly linking the single-device DrawItems with the corresponding multi-device DeviceDrawItem as well