aboutsummaryrefslogtreecommitdiff
path: root/src/platform/vulkan/vulkan_swapchain.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
committerhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
commita34c49f103c8950a57687ea3d866c244d95b4414 (patch)
treeff268f4a7f52769a252443d6f2822c9814e3bb1c /src/platform/vulkan/vulkan_swapchain.cpp
parent06398a7a176e123506de6e8851866a8bec0b3427 (diff)
[docs]: added a few comments cause i wont be able to read this in a week's time
Diffstat (limited to 'src/platform/vulkan/vulkan_swapchain.cpp')
-rw-r--r--src/platform/vulkan/vulkan_swapchain.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/platform/vulkan/vulkan_swapchain.cpp b/src/platform/vulkan/vulkan_swapchain.cpp
index 5bf2f60..cbd4512 100644
--- a/src/platform/vulkan/vulkan_swapchain.cpp
+++ b/src/platform/vulkan/vulkan_swapchain.cpp
@@ -117,8 +117,8 @@ namespace Donut::RHI
sci.imageExtent = m_extent; sci.imageArrayLayers = 1;
sci.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
sci.preTransform = caps.currentTransform; sci.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
- // FIFO is always available (vsync). With vsync off, prefer IMMEDIATE
- // (uncapped, may tear) then MAILBOX, if the surface supports them.
+ // FIFO is always there (that's vsync). with vsync off we'd rather have
+ // IMMEDIATE (uncapped, might tear) then MAILBOX, if the surface is cool with it.
VkPresentModeKHR present_mode = VK_PRESENT_MODE_FIFO_KHR;
if (!m_vsync)
{
@@ -153,11 +153,11 @@ namespace Donut::RHI
return true;
}
- // A render pass for one attachment signature, created once and cached.
+ // a render pass for one attachment signature, created once and cached.
// `present` targets (the swapchain) finish PRESENT_SRC and sync on the
// colour-output stage; `sampled` targets (off-screen) finish
// SHADER_READ_ONLY and round-trip through the fragment shader so the next
- // pass can sample them. Depth (VK_FORMAT_UNDEFINED = none) is optional.
+ // pass can sample them. depth (VK_FORMAT_UNDEFINED = none) is optional.
auto VulkanDevice::get_render_pass(VkFormat color, VkFormat depth, bool present) -> VkRenderPass
{
uint64_t key = (uint64_t)(uint32_t)color