Blender V4.3
blender::gpu::VKDrawList Class Reference

#include <vk_drawlist.hh>

Inherits blender::gpu::DrawList, and blender::gpu::VKResourceTracker< VKBuffer >.

Public Member Functions

 VKDrawList (int list_length)
void append (Batch *batch, int instance_first, int instance_count) override
void submit () override
Public Member Functions inherited from blender::gpu::DrawList
virtual ~DrawList ()

Protected Member Functions

std::unique_ptr< VKBuffercreate_resource (VKContext &context) override

Detailed Description

Definition at line 19 of file vk_drawlist.hh.

Constructor & Destructor Documentation

◆ VKDrawList()

blender::gpu::VKDrawList::VKDrawList ( int list_length)

Definition at line 20 of file vk_drawlist.cc.

Member Function Documentation

◆ append()

void blender::gpu::VKDrawList::append ( Batch * batch,
int instance_first,
int instance_count )
overridevirtual

Append a new command for the given batch to the draw list.

Will flush when batch is different than the previous one or when the command_buffer_ is full.

Implements blender::gpu::DrawList.

Definition at line 22 of file vk_drawlist.cc.

References batch, blender::gpu::VKContext::get(), blender::gpu::IndexBuf::index_base_get(), blender::gpu::IndexBuf::index_len_get(), blender::gpu::IndexBuf::index_start_get(), submit(), blender::gpu::VKResourceTracker< VKBuffer >::tracked_resource_for(), blender::gpu::unwrap(), and blender::gpu::VertBuf::vertex_len.

◆ create_resource()

std::unique_ptr< VKBuffer > blender::gpu::VKDrawList::create_resource ( VKContext & context)
overrideprotectedvirtual

Callback to create a new resource. Can be called by the tracked_resource_for method.

Implements blender::gpu::VKResourceTracker< VKBuffer >.

Definition at line 94 of file vk_drawlist.cc.

References GPU_USAGE_DYNAMIC, blender::gpu::debug::object_label(), and result.

◆ submit()

void blender::gpu::VKDrawList::submit ( )
overridevirtual

Submit buffered commands to the GPU.

NOTE: after calling this method the command_index_ and the batch_ are reset.

Implements blender::gpu::DrawList.

Definition at line 74 of file vk_drawlist.cc.

References blender::gpu::VKResourceTracker< VKBuffer >::active_resource(), and blender::gpu::VKBuffer::vk_handle().

Referenced by append().


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