summaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
authorandromeda <andromeda@lenovo>2026-08-20 05:55:14 +0200
committerandromeda <andromeda@lenovo>2026-08-20 05:55:14 +0200
commit612cdef000d9637f8ed94b24d0d9b81bb640c9ab (patch)
tree9db9ccbca83c98eea3c8d57ed28ebe891a8e9eb0 /Main.hs
parent6e22095099194460e3bd8eceac89329b4bd249d7 (diff)
pre-refactor
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Main.hs b/Main.hs
index 9b24672..8108882 100644
--- a/Main.hs
+++ b/Main.hs
@@ -90,13 +90,13 @@ main = withRGFW "rgfw instance title" (fromIntegral $ RGFW.unwrapRGFW_initFlags_
, Vk.imageArrayLayers = 1
, Vk.imageColorSpace = (V.head forms).colorSpace
, Vk.imageExtent = caps.currentExtent
- , Vk.imageFormat = (V.head forms).format -- TODO fetch the best format
+ , Vk.imageFormat = (V.head forms).format
, Vk.imageSharingMode = Vk.SHARING_MODE_EXCLUSIVE
, Vk.imageUsage = Vk.IMAGE_USAGE_COLOR_ATTACHMENT_BIT
, Vk.minImageCount = caps.minImageCount
, Vk.presentMode = Vk.PRESENT_MODE_FIFO_KHR
, Vk.preTransform = caps.currentTransform
- , Vk.queueFamilyIndices = V.singleton gqueueIndex -- TODO what if pqueue and gqueue are different!?
+ , Vk.queueFamilyIndices = V.singleton gqueueIndex
, Vk.surface = surface
} Nothing bracket $ \swapchain -> do
(_, images) <- Vk.getSwapchainImagesKHR dev swapchain
@@ -106,12 +106,12 @@ main = withRGFW "rgfw instance title" (fromIntegral $ RGFW.unwrapRGFW_initFlags_
, Vk.levelCount = Vk.REMAINING_MIP_LEVELS
, Vk.layerCount = Vk.REMAINING_ARRAY_LAYERS
}
- , Vk.format = (V.head forms).format -- TODO fetch the best format
+ , Vk.format = (V.head forms).format
}) images) Nothing $ \imageViews -> do
let colorAttachmentRef = zero { Vk.attachment = 0
, Vk.layout = Vk.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
}
- let colorAttachment = zero { Vk.format = (V.head forms).format -- TODO fetch the best format
+ let colorAttachment = zero { Vk.format = (V.head forms).format
, Vk.samples = Vk.SAMPLE_COUNT_1_BIT
, Vk.loadOp = Vk.ATTACHMENT_LOAD_OP_CLEAR
, Vk.storeOp = Vk.ATTACHMENT_STORE_OP_STORE
@@ -119,7 +119,7 @@ main = withRGFW "rgfw instance title" (fromIntegral $ RGFW.unwrapRGFW_initFlags_
, Vk.stencilStoreOp = Vk.ATTACHMENT_STORE_OP_DONT_CARE
, Vk.initialLayout = Vk.IMAGE_LAYOUT_UNDEFINED
, Vk.finalLayout = Vk.IMAGE_LAYOUT_PRESENT_SRC_KHR
- }
+ }
Vk.withRenderPass dev zero { Vk.attachments = V.singleton colorAttachment
, Vk.subpasses = V.singleton zero { Vk.pipelineBindPoint = Vk.PIPELINE_BIND_POINT_GRAPHICS
, Vk.colorAttachments = V.singleton colorAttachmentRef