Rename transitionImageLayout to transitionSwapChainImageLayout

This commit is contained in:
2025-12-20 20:48:41 +00:00
parent 7dbb43f9d1
commit 284a7a818a
10 changed files with 30 additions and 30 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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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
transitionImageLayout( transitionSwapChainImageLayout(
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 transitionImageLayout( void transitionSwapChainImageLayout(
uint32_t imageIndex, uint32_t imageIndex,
vk::ImageLayout oldLayout, vk::ImageLayout oldLayout,
vk::ImageLayout newLayout, vk::ImageLayout newLayout,