30 const void*
data =
nullptr;
73 uint32_t primitiveCount, uint32_t firstPrimitive,
PrimitiveShape shape,
74 std::span<const std::byte> primitives) = 0;
80 std::span<DeviceAddress> addresses) = 0;
87 std::span<DeviceAddress> addresses) = 0;
One frame's recording surface for one window.
Definition gui_rhi.h:62
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 fenc...
virtual void DrawPrimitives(const GpuPipeline &pipeline, const GPUDrawPushConstants &pushConstants, uint32_t primitiveCount, uint32_t firstPrimitive, PrimitiveShape shape, std::span< const std::byte > primitives)=0
Binds the pipeline and the GUI image set, pushes the constants and draws primitiveCount primitives st...
virtual ResidentState ResidentBufferState(ResidentBufferId id) const =0
virtual ~RenderCommandList()=default
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 fram...
virtual void ReleaseResidentBuffer(ResidentBufferId id)=0
Frees the buffer once no frame in flight reads it; an unknown id does nothing.
Device-lifetime operations.
Definition gui_rhi.h:48
virtual GpuPipeline CreatePrimitivePipeline(const PrimitiveSpec &spec)=0
Builds the pipeline for one primitive kind: the spec's shader pair + the fixed GUI pipeline state (tr...
virtual ~RenderDevice()=default
uint64_t ResidentBufferId
GPU storage kept across frames (UploadResidentBuffers); 0 is none.
Definition gui_rhi.h:36
ResidentState
Where a resident buffer is.
Definition gui_rhi.h:40
PrimitiveShape
The vertices a primitive's vertex shader is run for; gl_VertexIndex divided by their count is the pri...
Definition gui_render_primitives.h:225
@ Gone
released, or never made (or lost with its device)
Definition gui_rhi.h:41
@ Pending
its copy to the GPU isn't recorded yet: it can't be drawn from this frame
Definition gui_rhi.h:42
@ Ready
on the GPU: draws recorded from now on can read it
Definition gui_rhi.h:43
Definition gui_render_primitives.h:257
Definition gui_render_primitives.h:231
uint64_t pipeline
backend pipeline handle (VkPipeline on Vulkan)
Definition gui_rhi.h:23
bool IsValid() const
Definition gui_rhi.h:25
uint64_t layout
its layout, the shared GUI layout (VkPipelineLayout)
Definition gui_rhi.h:24
size_t bytes
Definition gui_rhi.h:31
const void * data
Definition gui_rhi.h:30
size_t alignment
Definition gui_rhi.h:32