Rename transitionSwapChainImageLayout to transitionRenderingImageLayout

This commit is contained in:
2025-12-22 03:05:57 +00:00
parent 717a8f1869
commit c909a10304
13 changed files with 39 additions and 39 deletions

View File

@@ -393,7 +393,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -438,7 +438,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -451,7 +451,7 @@ class HelloTriangleApplication {
// Finish recording the command buffer // Finish recording the command buffer
commandBuffer.end(); commandBuffer.end();
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -446,7 +446,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -491,7 +491,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -504,7 +504,7 @@ class HelloTriangleApplication {
// Finish recording the command buffer // Finish recording the command buffer
commandBuffer.end(); commandBuffer.end();
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -456,7 +456,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -501,7 +501,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -514,7 +514,7 @@ class HelloTriangleApplication {
// Finish recording the command buffer // Finish recording the command buffer
commandBuffer.end(); commandBuffer.end();
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -489,7 +489,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -534,7 +534,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -547,7 +547,7 @@ class HelloTriangleApplication {
// Finish recording the command buffer // Finish recording the command buffer
commandBuffer.end(); commandBuffer.end();
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -534,7 +534,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -579,7 +579,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -592,7 +592,7 @@ class HelloTriangleApplication {
// Finish recording the command buffer // Finish recording the command buffer
commandBuffer.end(); commandBuffer.end();
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -558,7 +558,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -604,7 +604,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -627,7 +627,7 @@ class HelloTriangleApplication {
throw std::runtime_error("failed to find suitable memory type!"); throw std::runtime_error("failed to find suitable memory type!");
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -562,7 +562,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -608,7 +608,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -676,7 +676,7 @@ class HelloTriangleApplication {
throw std::runtime_error("failed to find suitable memory type!"); throw std::runtime_error("failed to find suitable memory type!");
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -592,7 +592,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -639,7 +639,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -707,7 +707,7 @@ class HelloTriangleApplication {
throw std::runtime_error("failed to find suitable memory type!"); throw std::runtime_error("failed to find suitable memory type!");
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -648,7 +648,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -695,7 +695,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -763,7 +763,7 @@ class HelloTriangleApplication {
throw std::runtime_error("failed to find suitable memory type!"); throw std::runtime_error("failed to find suitable memory type!");
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -688,7 +688,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -738,7 +738,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -806,7 +806,7 @@ class HelloTriangleApplication {
throw std::runtime_error("failed to find suitable memory type!"); throw std::runtime_error("failed to find suitable memory type!");
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -759,7 +759,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -809,7 +809,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -917,7 +917,7 @@ class HelloTriangleApplication {
commandBuffer.pipelineBarrier(sourceStage, destinationStage, {}, {}, nullptr, barrier); commandBuffer.pipelineBarrier(sourceStage, destinationStage, {}, {}, nullptr, barrier);
endSingleTimeCommands(commandBuffer); endSingleTimeCommands(commandBuffer);
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -791,7 +791,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -841,7 +841,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -949,7 +949,7 @@ class HelloTriangleApplication {
commandBuffer.pipelineBarrier(sourceStage, destinationStage, {}, {}, nullptr, barrier); commandBuffer.pipelineBarrier(sourceStage, destinationStage, {}, {}, nullptr, barrier);
endSingleTimeCommands(commandBuffer); endSingleTimeCommands(commandBuffer);
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,

View File

@@ -820,7 +820,7 @@ class HelloTriangleApplication {
commandBuffer.begin({}); commandBuffer.begin({});
// Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL // Before starting rendering, transition the swapchain image to COLOR_ATTACHMENT_OPTIMAL
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eUndefined, vk::ImageLayout::eUndefined,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
@@ -870,7 +870,7 @@ class HelloTriangleApplication {
commandBuffer.endRendering(); commandBuffer.endRendering();
// After rendering, transition the swapchain image to PRESENT_SRC // After rendering, transition the swapchain image to PRESENT_SRC
transitionSwapChainImageLayout( transitionRenderingImageLayout(
imageIndex, imageIndex,
vk::ImageLayout::eColorAttachmentOptimal, vk::ImageLayout::eColorAttachmentOptimal,
vk::ImageLayout::ePresentSrcKHR, vk::ImageLayout::ePresentSrcKHR,
@@ -978,7 +978,7 @@ class HelloTriangleApplication {
commandBuffer.pipelineBarrier(sourceStage, destinationStage, {}, {}, nullptr, barrier); commandBuffer.pipelineBarrier(sourceStage, destinationStage, {}, {}, nullptr, barrier);
endSingleTimeCommands(commandBuffer); endSingleTimeCommands(commandBuffer);
} }
void transitionSwapChainImageLayout( void transitionRenderingImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,