diff options
| -rw-r--r-- | Main.hs | 10 | ||||
| -rw-r--r-- | Shaders.hs | 4 |
2 files changed, 5 insertions, 9 deletions
@@ -83,19 +83,15 @@ instanceConfig exts = , Vk.enabledExtensionNames = exts } -deviceConfig :: Word32 -> Vk.DeviceCreateInfo '[Vk.PhysicalDeviceVulkan13Features, Vk.PhysicalDeviceVulkan12Features] +deviceConfig :: Word32 -> Vk.DeviceCreateInfo '[Vk.PhysicalDeviceVulkan13Features] deviceConfig gqueueIndex = - zero { Vk.next = (vkFeatures13, (vkFeatures12, ())) + zero { Vk.next = (vkFeatures13, ()) , Vk.queueCreateInfos = V.singleton $ SomeStruct zero { Vk.queueFamilyIndex = gqueueIndex , Vk.queuePriorities = V.singleton 1 } , Vk.enabledExtensionNames = extensions } -vkFeatures12 :: Vk.PhysicalDeviceVulkan12Features -vkFeatures12 = - zero - vkFeatures13 :: Vk.PhysicalDeviceVulkan13Features vkFeatures13 = zero { Vk.synchronization2 = True @@ -276,7 +272,7 @@ gameloop' dev q pipeline swapchain imageViews images cbuffers queue sImageAcquir , Vk.extent = q.surfaceCapabilities.currentExtent } Vk.cmdBindPipeline cbuffer Vk.PIPELINE_BIND_POINT_GRAPHICS pipeline - Vk.cmdDraw cbuffer 3 0 0 0 + Vk.cmdDraw cbuffer 3 1 0 0 Vk.cmdPipelineBarrier2 cbuffer $ zero { Vk.imageMemoryBarriers = V.singleton $ SomeStruct zero { Vk.srcStageMask = Vk.PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT , Vk.srcAccessMask = Vk.ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT , Vk.dstStageMask = Vk.PIPELINE_STAGE_2_NONE @@ -25,7 +25,7 @@ vertex :: ShaderModule "main" VertexShader VertexDefs _ vertex = shader do i <- get @"gl_VertexIndex" (Vec2 x y) <- let' $ atv3v2f vertices i (Vec2 0 0) - put @"gl_Position" (Vec4 x y 0.0 1.0) + put @"gl_Position" (Vec4 x y 0 1) type FragmentDefs = '[ "main" ':-> EntryPoint '[ OriginUpperLeft ] Fragment @@ -34,7 +34,7 @@ type FragmentDefs = fragment :: ShaderModule "main" FragmentShader FragmentDefs _ fragment = shader do - put @"out_color" (Vec4 1.0 1.0 0.0 1.0) + put @"out_color" (Vec4 1.0 0.0 1.0 1.0) atv3v2f :: Code (V 3 (V 2 Float)) -> Code Word32 -> Code (V 2 Float) -> Code (V 2 Float) atv3v2f (Vec3 x y z) i d = |
