Skip to content

Frames in Flight Feedback #302

@ASchuberth

Description

@ASchuberth

For the Frames in flight section of the tuorial, I have some feedback for it.

There are changes needed in recordCommandBuffers() as well that doesn't get mentioned now that commandBuffers is a vector.

void recordCommandBuffer(uint32_t imageIndex) {
+		auto &commandBuffer = commandBuffers[frameIndex];
		commandBuffer.begin({});
...
}

As well as in transition_image_layout():

void transition_image_layout(
	    uint32_t                imageIndex,
	    vk::ImageLayout         old_layout,
	    vk::ImageLayout         new_layout,
	    vk::AccessFlags2        src_access_mask,
	    vk::AccessFlags2        dst_access_mask,
	    vk::PipelineStageFlags2 src_stage_mask,
	    vk::PipelineStageFlags2 dst_stage_mask)
	{
		...
		vk::DependencyInfo dependency_info = {
		    .dependencyFlags         = {},
		    .imageMemoryBarrierCount = 1,
		    .pImageMemoryBarriers    = &barrier};
+		commandBuffers[frameIndex].pipelineBarrier2(dependency_info);
	}

This function also has a different naming convention using snake_case instead of camelCase like the other functions.

Lastly, just a very minor issue, the fence member variable gets renamed from drawFence to inFlightFences. Maybe consider naming it inFlightFence in the previous lesson.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions