TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::metal::MetalCommandList Class Referencefinal

#include <gui_core/graphics/metal/metal_rhi.h>

Inheritance diagram for tachyon::metal::MetalCommandList:

Public Member Functions

 MetalCommandList (MetalGraphicsContext::Impl &device, id< MTLRenderCommandEncoder > encoder, FrameArena &arena)
DeviceAddress Push (const void *data, size_t bytes, size_t alignment)
 Writes bytes into the arena, alignment apart; the address of the copy, or 0.
void Bind (NSUInteger index, DeviceAddress address)
 Binds a buffer the shaders read at index in both stages, as the address names it; the empty buffer for 0.
void DrawPrimitives (const RHI::GpuPipeline &pipeline, const GPUDrawPushConstants &pushConstants, uint32_t primitiveCount, uint32_t firstPrimitive, PrimitiveShape shape, std::span< const std::byte > primitives) override
 Binds the pipeline and the GUI image set, pushes the constants and draws primitiveCount primitives starting at firstPrimitive, each as shape says; the vertex shader builds the vertices from the primitive.
void UploadTransientBuffers (std::span< const RHI::UploadRequest > requests, std::span< DeviceAddress > addresses) override
RHI::ResidentBufferId UploadResidentBuffers (std::span< const RHI::UploadRequest > requests, std::span< DeviceAddress > addresses) override
RHI::ResidentState ResidentBufferState (RHI::ResidentBufferId id) const override
void ReleaseResidentBuffer (RHI::ResidentBufferId id) override
 Frees the buffer once no frame in flight reads it; an unknown id does nothing.
Public Member Functions inherited from tachyon::RHI::RenderCommandList
virtual ~RenderCommandList ()=default
virtual void UploadTransientBuffers (std::span< const UploadRequest > requests, std::span< DeviceAddress > addresses)=0
 Copies a batch of transient data into storage that remains valid until this command list's frame fence signals.
virtual ResidentBufferId UploadResidentBuffers (std::span< const UploadRequest > requests, std::span< DeviceAddress > addresses)=0
 Copies a batch of data into GPU memory that stays until released, for data drawn again over many frames (a cached scope's primitives).

Constructor & Destructor Documentation

◆ MetalCommandList()

tachyon::metal::MetalCommandList::MetalCommandList ( MetalGraphicsContext::Impl & device,
id< MTLRenderCommandEncoder > encoder,
FrameArena & arena )
inline

Member Function Documentation

◆ Push()

DeviceAddress tachyon::metal::MetalCommandList::Push ( const void * data,
size_t bytes,
size_t alignment )

Writes bytes into the arena, alignment apart; the address of the copy, or 0.

◆ Bind()

void tachyon::metal::MetalCommandList::Bind ( NSUInteger index,
DeviceAddress address )

Binds a buffer the shaders read at index in both stages, as the address names it; the empty buffer for 0.

◆ DrawPrimitives()

void tachyon::metal::MetalCommandList::DrawPrimitives ( const RHI::GpuPipeline & pipeline,
const GPUDrawPushConstants & pushConstants,
uint32_t primitiveCount,
uint32_t firstPrimitive,
PrimitiveShape shape,
std::span< const std::byte > primitives )
overridevirtual

Binds the pipeline and the GUI image set, pushes the constants and draws primitiveCount primitives starting at firstPrimitive, each as shape says; the vertex shader builds the vertices from the primitive.

primitives are those primitives as the CPU wrote them, for a backend that binds only the images a draw reads (ImageBatcher); the others don't need them.

Implements tachyon::RHI::RenderCommandList.

◆ UploadTransientBuffers()

void tachyon::metal::MetalCommandList::UploadTransientBuffers ( std::span< const RHI::UploadRequest > requests,
std::span< DeviceAddress > addresses )
override

◆ UploadResidentBuffers()

RHI::ResidentBufferId tachyon::metal::MetalCommandList::UploadResidentBuffers ( std::span< const RHI::UploadRequest > requests,
std::span< DeviceAddress > addresses )
override

◆ ResidentBufferState()

RHI::ResidentState tachyon::metal::MetalCommandList::ResidentBufferState ( RHI::ResidentBufferId id) const
overridevirtual

◆ ReleaseResidentBuffer()

void tachyon::metal::MetalCommandList::ReleaseResidentBuffer ( RHI::ResidentBufferId id)
overridevirtual

Frees the buffer once no frame in flight reads it; an unknown id does nothing.

Implements tachyon::RHI::RenderCommandList.


The documentation for this class was generated from the following file: