core::ivk::drawpass class

a pass describes a start-to-finish sequence of commands to render into a set of rendertargets.

A pass is a collection of drawcalls, grouped into sets of drawgroups, and a target framebuffer or swapchain. This describes a full pipeline (synced) to get something into a set of rendertargets and to either use it in subsequent passes, or present it to a core::gfx::surface. Passes also make sure that they don't create race conditions with other passes that have been assigned as its dependencies.

constructors, destructors, conversion operators

drawpass
creates a pass that targets a framebuffer.
public
drawpass
creates a pass that targets a swapchain image set.
public

member-functions

prepare
prepares the pass for presenting (i.e. it does some basic housekeeping such as fetching the swapchain image if any)
public
present
submits the recorded instructions to the GPU, handling the dependencies accordingly.
public
bias
set the depth bias on the current pass.
public noexcept
bias
returns the current dept bias on this instance.
const public noexcept
build
build, and records the draw, and other instructions associated with this pass.
public
add
add an additional drawgroup to be included in this pass' draw instructions.
public noexcept
connect
makes the current pass wait for the given pass to complete
public noexcept
remove
removes an existing drawgroup from this pass' draw instructions.
public noexcept
clear
removes all drawgroups from this pass' draw instructions.
public noexcept
create_fences
creates the vk::Fence's that will be used to sync access to this pass.
private
destroy_fences
cleans up the created vk::Fence's of the core::ivk::pass::create_fences() method.
private

variables

vk::PipelineStageFlags
m_SubmitPipelineStages
Pipeline stages used to wait at for graphics queue submissions.
privateprivate

Function documentation

core::ivk::drawpass::drawpass(core::resource::handle<core::ivk::context> context, core::resource::handle<core::ivk::framebuffer_t> framebuffer)

Brief

creates a pass that targets a framebuffer.

Parameters
context in the valid and loaded context to bind this pass to.
framebuffer in the valid and loaded framebuffer that this pass will output to.

core::ivk::drawpass::drawpass(core::resource::handle<core::ivk::context> context, core::resource::handle<core::ivk::swapchain> swapchain)

Brief

creates a pass that targets a swapchain image set.

Parameters
context in the valid and loaded context to bind this pass to.
swapchain in the valid and loaded swapchain that this pass will output to.

core::ivk::depth_bias core::ivk::drawpass::bias() const noexcept

Brief

returns the current dept bias on this instance.

Returns the current dept bias on this instance.

bool core::ivk::drawpass::build()

Brief

build, and records the draw, and other instructions associated with this pass.

Returns true on success, false if submitting the instructions to the GPU failed.

void core::ivk::drawpass::create_fences(const size_t size = 1u) private

Brief

creates the vk::Fence's that will be used to sync access to this pass.

Parameters
size in the amount of fences to create.