vulkan 1.5.1.0 → 1.6.0.0
raw patch · 34 files changed
+1140/−140 lines, 34 filesdep ~vector-sized
Dependency ranges changed: vector-sized
Files
- changelog.md +3/−0
- src/Graphics/Vulkan.hs +8/−0
- src/Graphics/Vulkan/Buffer.hs +2/−2
- src/Graphics/Vulkan/BufferView.hs +2/−2
- src/Graphics/Vulkan/CommandBuffer.hs +5/−5
- src/Graphics/Vulkan/CommandBufferBuilding.hs +44/−44
- src/Graphics/Vulkan/CommandPool.hs +3/−3
- src/Graphics/Vulkan/DescriptorSet.hs +8/−8
- src/Graphics/Vulkan/Device.hs +2/−2
- src/Graphics/Vulkan/DeviceInitialization.hs +11/−11
- src/Graphics/Vulkan/EXT/DebugReport.hs +271/−0
- src/Graphics/Vulkan/Event.hs +5/−5
- src/Graphics/Vulkan/ExtensionDiscovery.hs +2/−2
- src/Graphics/Vulkan/Fence.hs +5/−5
- src/Graphics/Vulkan/Image.hs +3/−3
- src/Graphics/Vulkan/ImageView.hs +2/−2
- src/Graphics/Vulkan/KHR/Display.hs +336/−0
- src/Graphics/Vulkan/KHR/DisplaySwapchain.hs +85/−0
- src/Graphics/Vulkan/KHR/Surface.hs +110/−1
- src/Graphics/Vulkan/KHR/Swapchain.hs +184/−0
- src/Graphics/Vulkan/LayerDiscovery.hs +2/−2
- src/Graphics/Vulkan/Memory.hs +7/−7
- src/Graphics/Vulkan/MemoryManagement.hs +4/−4
- src/Graphics/Vulkan/Pass.hs +5/−5
- src/Graphics/Vulkan/Pipeline.hs +3/−3
- src/Graphics/Vulkan/PipelineCache.hs +4/−4
- src/Graphics/Vulkan/PipelineLayout.hs +2/−2
- src/Graphics/Vulkan/Query.hs +3/−3
- src/Graphics/Vulkan/Queue.hs +4/−4
- src/Graphics/Vulkan/QueueSemaphore.hs +2/−2
- src/Graphics/Vulkan/Sampler.hs +2/−2
- src/Graphics/Vulkan/Shader.hs +2/−2
- src/Graphics/Vulkan/SparseResourceMemoryManagement.hs +3/−3
- vulkan.cabal +6/−2
changelog.md view
@@ -1,5 +1,8 @@ # Change Log +## [1.6.0.0] - 2016-03-30+ - Add DebugReport, Display, DisplaySwapchain and Swapchain extension modules+ ## [1.5.1.0] - 2016-03-07 - Add enumeration values for VkCompositeAlphaFlagsKHR and VkSurfaceTransformFlagsKHR
src/Graphics/Vulkan.hs view
@@ -9,12 +9,16 @@ , module Graphics.Vulkan.DescriptorSet , module Graphics.Vulkan.Device , module Graphics.Vulkan.DeviceInitialization+ , module Graphics.Vulkan.EXT.DebugReport , module Graphics.Vulkan.Event , module Graphics.Vulkan.ExtensionDiscovery , module Graphics.Vulkan.Fence , module Graphics.Vulkan.Image , module Graphics.Vulkan.ImageView+ , module Graphics.Vulkan.KHR.Display+ , module Graphics.Vulkan.KHR.DisplaySwapchain , module Graphics.Vulkan.KHR.Surface+ , module Graphics.Vulkan.KHR.Swapchain , module Graphics.Vulkan.LayerDiscovery , module Graphics.Vulkan.Memory , module Graphics.Vulkan.MemoryManagement@@ -42,12 +46,16 @@ import Graphics.Vulkan.DescriptorSet import Graphics.Vulkan.Device import Graphics.Vulkan.DeviceInitialization+import Graphics.Vulkan.EXT.DebugReport import Graphics.Vulkan.Event import Graphics.Vulkan.ExtensionDiscovery import Graphics.Vulkan.Fence import Graphics.Vulkan.Image import Graphics.Vulkan.ImageView+import Graphics.Vulkan.KHR.Display+import Graphics.Vulkan.KHR.DisplaySwapchain import Graphics.Vulkan.KHR.Surface+import Graphics.Vulkan.KHR.Swapchain import Graphics.Vulkan.LayerDiscovery import Graphics.Vulkan.Memory import Graphics.Vulkan.MemoryManagement
src/Graphics/Vulkan/Buffer.hs view
@@ -50,7 +50,7 @@ ) -- ** vkCreateBuffer-foreign import ccall "vkCreateBuffer" vkCreateBuffer :: +foreign import ccall "vkCreateBuffer" vkCreateBuffer :: VkDevice -> Ptr VkBufferCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkBuffer -> IO VkResult@@ -150,7 +150,7 @@ -- ** vkDestroyBuffer-foreign import ccall "vkDestroyBuffer" vkDestroyBuffer :: +foreign import ccall "vkDestroyBuffer" vkDestroyBuffer :: VkDevice -> VkBuffer -> Ptr VkAllocationCallbacks -> IO () newtype VkBuffer = VkBuffer Word64
src/Graphics/Vulkan/BufferView.hs view
@@ -36,7 +36,7 @@ ) -- ** vkCreateBufferView-foreign import ccall "vkCreateBufferView" vkCreateBufferView :: +foreign import ccall "vkCreateBufferView" vkCreateBufferView :: VkDevice -> Ptr VkBufferViewCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkBufferView -> IO VkResult@@ -81,6 +81,6 @@ deriving (Eq, Storable) -- ** vkDestroyBufferView-foreign import ccall "vkDestroyBufferView" vkDestroyBufferView :: +foreign import ccall "vkDestroyBufferView" vkDestroyBufferView :: VkDevice -> VkBufferView -> Ptr VkAllocationCallbacks -> IO ()
src/Graphics/Vulkan/CommandBuffer.hs view
@@ -76,17 +76,17 @@ pattern VK_COMMAND_BUFFER_LEVEL_SECONDARY = VkCommandBufferLevel 1 -- ** vkAllocateCommandBuffers-foreign import ccall "vkAllocateCommandBuffers" vkAllocateCommandBuffers :: +foreign import ccall "vkAllocateCommandBuffers" vkAllocateCommandBuffers :: VkDevice -> Ptr VkCommandBufferAllocateInfo -> Ptr VkCommandBuffer -> IO VkResult -- ** vkResetCommandBuffer-foreign import ccall "vkResetCommandBuffer" vkResetCommandBuffer :: +foreign import ccall "vkResetCommandBuffer" vkResetCommandBuffer :: VkCommandBuffer -> VkCommandBufferResetFlags -> IO VkResult -- ** vkFreeCommandBuffers-foreign import ccall "vkFreeCommandBuffers" vkFreeCommandBuffers :: +foreign import ccall "vkFreeCommandBuffers" vkFreeCommandBuffers :: VkDevice -> VkCommandPool -> Word32 -> Ptr VkCommandBuffer -> IO () -- ** VkCommandBufferUsageFlags@@ -211,11 +211,11 @@ -- ** vkEndCommandBuffer-foreign import ccall "vkEndCommandBuffer" vkEndCommandBuffer :: +foreign import ccall "vkEndCommandBuffer" vkEndCommandBuffer :: VkCommandBuffer -> IO VkResult -- ** vkBeginCommandBuffer-foreign import ccall "vkBeginCommandBuffer" vkBeginCommandBuffer :: +foreign import ccall "vkBeginCommandBuffer" vkBeginCommandBuffer :: VkCommandBuffer -> Ptr VkCommandBufferBeginInfo -> IO VkResult
src/Graphics/Vulkan/CommandBufferBuilding.hs view
@@ -93,41 +93,41 @@ ) -- ** vkCmdPushConstants-foreign import ccall "vkCmdPushConstants" vkCmdPushConstants :: +foreign import ccall "vkCmdPushConstants" vkCmdPushConstants :: VkCommandBuffer -> VkPipelineLayout -> VkShaderStageFlags -> Word32 -> Word32 -> Ptr Void -> IO () -- ** vkCmdSetStencilWriteMask-foreign import ccall "vkCmdSetStencilWriteMask" vkCmdSetStencilWriteMask :: +foreign import ccall "vkCmdSetStencilWriteMask" vkCmdSetStencilWriteMask :: VkCommandBuffer -> VkStencilFaceFlags -> Word32 -> IO () -- ** vkCmdBindIndexBuffer-foreign import ccall "vkCmdBindIndexBuffer" vkCmdBindIndexBuffer :: +foreign import ccall "vkCmdBindIndexBuffer" vkCmdBindIndexBuffer :: VkCommandBuffer -> VkBuffer -> VkDeviceSize -> VkIndexType -> IO () -- ** vkCmdResetQueryPool-foreign import ccall "vkCmdResetQueryPool" vkCmdResetQueryPool :: +foreign import ccall "vkCmdResetQueryPool" vkCmdResetQueryPool :: VkCommandBuffer -> VkQueryPool -> Word32 -> Word32 -> IO () -- ** vkCmdResolveImage-foreign import ccall "vkCmdResolveImage" vkCmdResolveImage :: +foreign import ccall "vkCmdResolveImage" vkCmdResolveImage :: VkCommandBuffer -> VkImage -> VkImageLayout -> VkImage -> VkImageLayout -> Word32 -> Ptr VkImageResolve -> IO () -- ** vkCmdBindPipeline-foreign import ccall "vkCmdBindPipeline" vkCmdBindPipeline :: +foreign import ccall "vkCmdBindPipeline" vkCmdBindPipeline :: VkCommandBuffer -> VkPipelineBindPoint -> VkPipeline -> IO () -- ** vkCmdBindVertexBuffers-foreign import ccall "vkCmdBindVertexBuffers" vkCmdBindVertexBuffers :: +foreign import ccall "vkCmdBindVertexBuffers" vkCmdBindVertexBuffers :: VkCommandBuffer -> Word32 -> Word32 -> Ptr VkBuffer -> Ptr VkDeviceSize -> IO () -- ** vkCmdDraw-foreign import ccall "vkCmdDraw" vkCmdDraw :: +foreign import ccall "vkCmdDraw" vkCmdDraw :: VkCommandBuffer -> Word32 -> Word32 -> Word32 -> Word32 -> IO () @@ -156,43 +156,43 @@ -- ** vkCmdNextSubpass-foreign import ccall "vkCmdNextSubpass" vkCmdNextSubpass :: +foreign import ccall "vkCmdNextSubpass" vkCmdNextSubpass :: VkCommandBuffer -> VkSubpassContents -> IO () -- ** vkCmdEndQuery-foreign import ccall "vkCmdEndQuery" vkCmdEndQuery :: +foreign import ccall "vkCmdEndQuery" vkCmdEndQuery :: VkCommandBuffer -> VkQueryPool -> Word32 -> IO () -- ** vkCmdSetScissor-foreign import ccall "vkCmdSetScissor" vkCmdSetScissor :: +foreign import ccall "vkCmdSetScissor" vkCmdSetScissor :: VkCommandBuffer -> Word32 -> Word32 -> Ptr VkRect2D -> IO () -- ** vkCmdSetEvent-foreign import ccall "vkCmdSetEvent" vkCmdSetEvent :: +foreign import ccall "vkCmdSetEvent" vkCmdSetEvent :: VkCommandBuffer -> VkEvent -> VkPipelineStageFlags -> IO () -- ** vkCmdCopyImageToBuffer-foreign import ccall "vkCmdCopyImageToBuffer" vkCmdCopyImageToBuffer :: +foreign import ccall "vkCmdCopyImageToBuffer" vkCmdCopyImageToBuffer :: VkCommandBuffer -> VkImage -> VkImageLayout -> VkBuffer -> Word32 -> Ptr VkBufferImageCopy -> IO () -- ** vkCmdDispatchIndirect-foreign import ccall "vkCmdDispatchIndirect" vkCmdDispatchIndirect :: +foreign import ccall "vkCmdDispatchIndirect" vkCmdDispatchIndirect :: VkCommandBuffer -> VkBuffer -> VkDeviceSize -> IO () -- ** vkCmdBeginQuery-foreign import ccall "vkCmdBeginQuery" vkCmdBeginQuery :: +foreign import ccall "vkCmdBeginQuery" vkCmdBeginQuery :: VkCommandBuffer -> VkQueryPool -> Word32 -> VkQueryControlFlags -> IO () -- ** vkCmdEndRenderPass-foreign import ccall "vkCmdEndRenderPass" vkCmdEndRenderPass :: +foreign import ccall "vkCmdEndRenderPass" vkCmdEndRenderPass :: VkCommandBuffer -> IO () -- ** vkCmdFillBuffer-foreign import ccall "vkCmdFillBuffer" vkCmdFillBuffer :: +foreign import ccall "vkCmdFillBuffer" vkCmdFillBuffer :: VkCommandBuffer -> VkBuffer -> VkDeviceSize -> VkDeviceSize -> Word32 -> IO () @@ -216,7 +216,7 @@ -- ** vkCmdWaitEvents-foreign import ccall "vkCmdWaitEvents" vkCmdWaitEvents :: +foreign import ccall "vkCmdWaitEvents" vkCmdWaitEvents :: VkCommandBuffer -> Word32 -> Ptr VkEvent ->@@ -229,7 +229,7 @@ Word32 -> Ptr VkImageMemoryBarrier -> IO () -- ** vkCmdClearColorImage-foreign import ccall "vkCmdClearColorImage" vkCmdClearColorImage :: +foreign import ccall "vkCmdClearColorImage" vkCmdClearColorImage :: VkCommandBuffer -> VkImage -> VkImageLayout ->@@ -291,35 +291,35 @@ -- ** vkCmdSetDepthBounds-foreign import ccall "vkCmdSetDepthBounds" vkCmdSetDepthBounds :: +foreign import ccall "vkCmdSetDepthBounds" vkCmdSetDepthBounds :: VkCommandBuffer -> CFloat -> CFloat -> IO () -- ** vkCmdCopyBufferToImage-foreign import ccall "vkCmdCopyBufferToImage" vkCmdCopyBufferToImage :: +foreign import ccall "vkCmdCopyBufferToImage" vkCmdCopyBufferToImage :: VkCommandBuffer -> VkBuffer -> VkImage -> VkImageLayout -> Word32 -> Ptr VkBufferImageCopy -> IO () -- ** vkCmdDrawIndexedIndirect-foreign import ccall "vkCmdDrawIndexedIndirect" vkCmdDrawIndexedIndirect :: +foreign import ccall "vkCmdDrawIndexedIndirect" vkCmdDrawIndexedIndirect :: VkCommandBuffer -> VkBuffer -> VkDeviceSize -> Word32 -> Word32 -> IO () -- ** vkCmdUpdateBuffer-foreign import ccall "vkCmdUpdateBuffer" vkCmdUpdateBuffer :: +foreign import ccall "vkCmdUpdateBuffer" vkCmdUpdateBuffer :: VkCommandBuffer -> VkBuffer -> VkDeviceSize -> VkDeviceSize -> Ptr Word32 -> IO () -- ** vkCmdCopyImage-foreign import ccall "vkCmdCopyImage" vkCmdCopyImage :: +foreign import ccall "vkCmdCopyImage" vkCmdCopyImage :: VkCommandBuffer -> VkImage -> VkImageLayout -> VkImage -> VkImageLayout -> Word32 -> Ptr VkImageCopy -> IO () -- ** vkCmdWriteTimestamp-foreign import ccall "vkCmdWriteTimestamp" vkCmdWriteTimestamp :: +foreign import ccall "vkCmdWriteTimestamp" vkCmdWriteTimestamp :: VkCommandBuffer -> VkPipelineStageFlagBits -> VkQueryPool -> Word32 -> IO () @@ -346,16 +346,16 @@ -- ** vkCmdDrawIndexed-foreign import ccall "vkCmdDrawIndexed" vkCmdDrawIndexed :: +foreign import ccall "vkCmdDrawIndexed" vkCmdDrawIndexed :: VkCommandBuffer -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO () -- ** vkCmdSetDepthBias-foreign import ccall "vkCmdSetDepthBias" vkCmdSetDepthBias :: +foreign import ccall "vkCmdSetDepthBias" vkCmdSetDepthBias :: VkCommandBuffer -> CFloat -> CFloat -> CFloat -> IO () -- ** vkCmdDrawIndirect-foreign import ccall "vkCmdDrawIndirect" vkCmdDrawIndirect :: +foreign import ccall "vkCmdDrawIndirect" vkCmdDrawIndirect :: VkCommandBuffer -> VkBuffer -> VkDeviceSize -> Word32 -> Word32 -> IO () @@ -395,22 +395,22 @@ -- ** vkCmdClearAttachments-foreign import ccall "vkCmdClearAttachments" vkCmdClearAttachments :: +foreign import ccall "vkCmdClearAttachments" vkCmdClearAttachments :: VkCommandBuffer -> Word32 -> Ptr VkClearAttachment -> Word32 -> Ptr VkClearRect -> IO () -- ** vkCmdSetViewport-foreign import ccall "vkCmdSetViewport" vkCmdSetViewport :: +foreign import ccall "vkCmdSetViewport" vkCmdSetViewport :: VkCommandBuffer -> Word32 -> Word32 -> Ptr VkViewport -> IO () -- ** vkCmdCopyBuffer-foreign import ccall "vkCmdCopyBuffer" vkCmdCopyBuffer :: +foreign import ccall "vkCmdCopyBuffer" vkCmdCopyBuffer :: VkCommandBuffer -> VkBuffer -> VkBuffer -> Word32 -> Ptr VkBufferCopy -> IO () -- ** vkCmdBindDescriptorSets-foreign import ccall "vkCmdBindDescriptorSets" vkCmdBindDescriptorSets :: +foreign import ccall "vkCmdBindDescriptorSets" vkCmdBindDescriptorSets :: VkCommandBuffer -> VkPipelineBindPoint -> VkPipelineLayout ->@@ -418,11 +418,11 @@ Word32 -> Ptr VkDescriptorSet -> Word32 -> Ptr Word32 -> IO () -- ** vkCmdSetLineWidth-foreign import ccall "vkCmdSetLineWidth" vkCmdSetLineWidth :: +foreign import ccall "vkCmdSetLineWidth" vkCmdSetLineWidth :: VkCommandBuffer -> CFloat -> IO () -- ** vkCmdExecuteCommands-foreign import ccall "vkCmdExecuteCommands" vkCmdExecuteCommands :: +foreign import ccall "vkCmdExecuteCommands" vkCmdExecuteCommands :: VkCommandBuffer -> Word32 -> Ptr VkCommandBuffer -> IO () @@ -457,7 +457,7 @@ -- ** vkCmdSetStencilCompareMask-foreign import ccall "vkCmdSetStencilCompareMask" vkCmdSetStencilCompareMask :: +foreign import ccall "vkCmdSetStencilCompareMask" vkCmdSetStencilCompareMask :: VkCommandBuffer -> VkStencilFaceFlags -> Word32 -> IO () @@ -593,7 +593,7 @@ pattern VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = VkSubpassContents 1 -- ** vkCmdCopyQueryPoolResults-foreign import ccall "vkCmdCopyQueryPoolResults" vkCmdCopyQueryPoolResults :: +foreign import ccall "vkCmdCopyQueryPoolResults" vkCmdCopyQueryPoolResults :: VkCommandBuffer -> VkQueryPool -> Word32 ->@@ -602,7 +602,7 @@ VkDeviceSize -> VkDeviceSize -> VkQueryResultFlags -> IO () -- ** vkCmdBlitImage-foreign import ccall "vkCmdBlitImage" vkCmdBlitImage :: +foreign import ccall "vkCmdBlitImage" vkCmdBlitImage :: VkCommandBuffer -> VkImage -> VkImageLayout ->@@ -610,11 +610,11 @@ VkImageLayout -> Word32 -> Ptr VkImageBlit -> VkFilter -> IO () -- ** vkCmdSetBlendConstants-foreign import ccall "vkCmdSetBlendConstants" vkCmdSetBlendConstants :: +foreign import ccall "vkCmdSetBlendConstants" vkCmdSetBlendConstants :: VkCommandBuffer -> Ptr CFloat -> IO () -- ** vkCmdClearDepthStencilImage-foreign import ccall "vkCmdClearDepthStencilImage" vkCmdClearDepthStencilImage :: +foreign import ccall "vkCmdClearDepthStencilImage" vkCmdClearDepthStencilImage :: VkCommandBuffer -> VkImage -> VkImageLayout ->@@ -647,15 +647,15 @@ -- ** vkCmdDispatch-foreign import ccall "vkCmdDispatch" vkCmdDispatch :: +foreign import ccall "vkCmdDispatch" vkCmdDispatch :: VkCommandBuffer -> Word32 -> Word32 -> Word32 -> IO () -- ** vkCmdSetStencilReference-foreign import ccall "vkCmdSetStencilReference" vkCmdSetStencilReference :: +foreign import ccall "vkCmdSetStencilReference" vkCmdSetStencilReference :: VkCommandBuffer -> VkStencilFaceFlags -> Word32 -> IO () -- ** vkCmdPipelineBarrier-foreign import ccall "vkCmdPipelineBarrier" vkCmdPipelineBarrier :: +foreign import ccall "vkCmdPipelineBarrier" vkCmdPipelineBarrier :: VkCommandBuffer -> VkPipelineStageFlags -> VkPipelineStageFlags ->@@ -667,11 +667,11 @@ Word32 -> Ptr VkImageMemoryBarrier -> IO () -- ** vkCmdBeginRenderPass-foreign import ccall "vkCmdBeginRenderPass" vkCmdBeginRenderPass :: +foreign import ccall "vkCmdBeginRenderPass" vkCmdBeginRenderPass :: VkCommandBuffer -> Ptr VkRenderPassBeginInfo -> VkSubpassContents -> IO () -- ** vkCmdResetEvent-foreign import ccall "vkCmdResetEvent" vkCmdResetEvent :: +foreign import ccall "vkCmdResetEvent" vkCmdResetEvent :: VkCommandBuffer -> VkEvent -> VkPipelineStageFlags -> IO ()
src/Graphics/Vulkan/CommandPool.hs view
@@ -70,11 +70,11 @@ -- ** vkDestroyCommandPool-foreign import ccall "vkDestroyCommandPool" vkDestroyCommandPool :: +foreign import ccall "vkDestroyCommandPool" vkDestroyCommandPool :: VkDevice -> VkCommandPool -> Ptr VkAllocationCallbacks -> IO () -- ** vkResetCommandPool-foreign import ccall "vkResetCommandPool" vkResetCommandPool :: +foreign import ccall "vkResetCommandPool" vkResetCommandPool :: VkDevice -> VkCommandPool -> VkCommandPoolResetFlags -> IO VkResult -- ** VkCommandPoolCreateFlags@@ -109,7 +109,7 @@ -- ** vkCreateCommandPool-foreign import ccall "vkCreateCommandPool" vkCreateCommandPool :: +foreign import ccall "vkCreateCommandPool" vkCreateCommandPool :: VkDevice -> Ptr VkCommandPoolCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkCommandPool -> IO VkResult
src/Graphics/Vulkan/DescriptorSet.hs view
@@ -64,7 +64,7 @@ ) -- ** vkUpdateDescriptorSets-foreign import ccall "vkUpdateDescriptorSets" vkUpdateDescriptorSets :: +foreign import ccall "vkUpdateDescriptorSets" vkUpdateDescriptorSets :: VkDevice -> Word32 -> Ptr VkWriteDescriptorSet ->@@ -76,7 +76,7 @@ deriving (Eq, Storable) -- ** vkAllocateDescriptorSets-foreign import ccall "vkAllocateDescriptorSets" vkAllocateDescriptorSets :: +foreign import ccall "vkAllocateDescriptorSets" vkAllocateDescriptorSets :: VkDevice -> Ptr VkDescriptorSetAllocateInfo -> Ptr VkDescriptorSet -> IO VkResult@@ -157,11 +157,11 @@ -- ** vkDestroyDescriptorPool-foreign import ccall "vkDestroyDescriptorPool" vkDestroyDescriptorPool :: +foreign import ccall "vkDestroyDescriptorPool" vkDestroyDescriptorPool :: VkDevice -> VkDescriptorPool -> Ptr VkAllocationCallbacks -> IO () -- ** vkCreateDescriptorSetLayout-foreign import ccall "vkCreateDescriptorSetLayout" vkCreateDescriptorSetLayout :: +foreign import ccall "vkCreateDescriptorSetLayout" vkCreateDescriptorSetLayout :: VkDevice -> Ptr VkDescriptorSetLayoutCreateInfo -> Ptr VkAllocationCallbacks ->@@ -171,7 +171,7 @@ deriving (Eq, Storable) -- ** vkResetDescriptorPool-foreign import ccall "vkResetDescriptorPool" vkResetDescriptorPool :: +foreign import ccall "vkResetDescriptorPool" vkResetDescriptorPool :: VkDevice -> VkDescriptorPool -> VkDescriptorPoolResetFlags -> IO VkResult @@ -179,7 +179,7 @@ deriving (Eq, Storable) -- ** vkFreeDescriptorSets-foreign import ccall "vkFreeDescriptorSets" vkFreeDescriptorSets :: +foreign import ccall "vkFreeDescriptorSets" vkFreeDescriptorSets :: VkDevice -> VkDescriptorPool -> Word32 -> Ptr VkDescriptorSet -> IO VkResult @@ -328,13 +328,13 @@ -- ** vkCreateDescriptorPool-foreign import ccall "vkCreateDescriptorPool" vkCreateDescriptorPool :: +foreign import ccall "vkCreateDescriptorPool" vkCreateDescriptorPool :: VkDevice -> Ptr VkDescriptorPoolCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkDescriptorPool -> IO VkResult -- ** vkDestroyDescriptorSetLayout-foreign import ccall "vkDestroyDescriptorSetLayout" vkDestroyDescriptorSetLayout :: +foreign import ccall "vkDestroyDescriptorSetLayout" vkDestroyDescriptorSetLayout :: VkDevice -> VkDescriptorSetLayout -> Ptr VkAllocationCallbacks -> IO ()
src/Graphics/Vulkan/Device.hs view
@@ -33,7 +33,7 @@ ) -- ** vkCreateDevice-foreign import ccall "vkCreateDevice" vkCreateDevice :: +foreign import ccall "vkCreateDevice" vkCreateDevice :: VkPhysicalDevice -> Ptr VkDeviceCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkDevice -> IO VkResult@@ -252,7 +252,7 @@ deriving (Eq, Storable) -- ** vkDestroyDevice-foreign import ccall "vkDestroyDevice" vkDestroyDevice :: +foreign import ccall "vkDestroyDevice" vkDestroyDevice :: VkDevice -> Ptr VkAllocationCallbacks -> IO () data VkPhysicalDevice_T
src/Graphics/Vulkan/DeviceInitialization.hs view
@@ -152,7 +152,7 @@ -- ** vkGetPhysicalDeviceImageFormatProperties-foreign import ccall "vkGetPhysicalDeviceImageFormatProperties" vkGetPhysicalDeviceImageFormatProperties :: +foreign import ccall "vkGetPhysicalDeviceImageFormatProperties" vkGetPhysicalDeviceImageFormatProperties :: VkPhysicalDevice -> VkFormat -> VkImageType ->@@ -538,15 +538,15 @@ -- ** vkEnumeratePhysicalDevices-foreign import ccall "vkEnumeratePhysicalDevices" vkEnumeratePhysicalDevices :: +foreign import ccall "vkEnumeratePhysicalDevices" vkEnumeratePhysicalDevices :: VkInstance -> Ptr Word32 -> Ptr VkPhysicalDevice -> IO VkResult -- ** vkGetDeviceProcAddr-foreign import ccall "vkGetDeviceProcAddr" vkGetDeviceProcAddr :: +foreign import ccall "vkGetDeviceProcAddr" vkGetDeviceProcAddr :: VkDevice -> Ptr CChar -> IO PFN_vkVoidFunction -- ** vkCreateInstance-foreign import ccall "vkCreateInstance" vkCreateInstance :: +foreign import ccall "vkCreateInstance" vkCreateInstance :: Ptr VkInstanceCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkInstance -> IO VkResult @@ -750,11 +750,11 @@ -- ** vkGetPhysicalDeviceFeatures-foreign import ccall "vkGetPhysicalDeviceFeatures" vkGetPhysicalDeviceFeatures :: +foreign import ccall "vkGetPhysicalDeviceFeatures" vkGetPhysicalDeviceFeatures :: VkPhysicalDevice -> Ptr VkPhysicalDeviceFeatures -> IO () -- ** vkGetPhysicalDeviceMemoryProperties-foreign import ccall "vkGetPhysicalDeviceMemoryProperties" vkGetPhysicalDeviceMemoryProperties :: +foreign import ccall "vkGetPhysicalDeviceMemoryProperties" vkGetPhysicalDeviceMemoryProperties :: VkPhysicalDevice -> Ptr VkPhysicalDeviceMemoryProperties -> IO () @@ -795,7 +795,7 @@ -- ** vkGetPhysicalDeviceQueueFamilyProperties-foreign import ccall "vkGetPhysicalDeviceQueueFamilyProperties" vkGetPhysicalDeviceQueueFamilyProperties :: +foreign import ccall "vkGetPhysicalDeviceQueueFamilyProperties" vkGetPhysicalDeviceQueueFamilyProperties :: VkPhysicalDevice -> Ptr Word32 -> Ptr VkQueueFamilyProperties -> IO () @@ -816,7 +816,7 @@ -- ** vkGetInstanceProcAddr-foreign import ccall "vkGetInstanceProcAddr" vkGetInstanceProcAddr :: +foreign import ccall "vkGetInstanceProcAddr" vkGetInstanceProcAddr :: VkInstance -> Ptr CChar -> IO PFN_vkVoidFunction -- ** VkMemoryPropertyFlags@@ -863,7 +863,7 @@ -- ** vkDestroyInstance-foreign import ccall "vkDestroyInstance" vkDestroyInstance :: +foreign import ccall "vkDestroyInstance" vkDestroyInstance :: VkInstance -> Ptr VkAllocationCallbacks -> IO () -- ** VkQueueFlags@@ -906,7 +906,7 @@ -- ** vkGetPhysicalDeviceProperties-foreign import ccall "vkGetPhysicalDeviceProperties" vkGetPhysicalDeviceProperties :: +foreign import ccall "vkGetPhysicalDeviceProperties" vkGetPhysicalDeviceProperties :: VkPhysicalDevice -> Ptr VkPhysicalDeviceProperties -> IO () -- ** VkInstanceCreateFlags@@ -915,7 +915,7 @@ deriving (Eq, Storable) -- ** vkGetPhysicalDeviceFormatProperties-foreign import ccall "vkGetPhysicalDeviceFormatProperties" vkGetPhysicalDeviceFormatProperties :: +foreign import ccall "vkGetPhysicalDeviceFormatProperties" vkGetPhysicalDeviceFormatProperties :: VkPhysicalDevice -> VkFormat -> Ptr VkFormatProperties -> IO ()
+ src/Graphics/Vulkan/EXT/DebugReport.hs view
@@ -0,0 +1,271 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE Strict #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+module Graphics.Vulkan.EXT.DebugReport where++import Text.Read.Lex( Lexeme(Ident)+ )+import GHC.Read( expectP+ , choose+ )+import Data.Word( Word64+ , Word32+ )+import Foreign.Ptr( Ptr+ , FunPtr+ , plusPtr+ )+import Data.Int( Int32+ )+import Foreign.Storable( Storable(..)+ )+import Data.Void( Void+ )+import Graphics.Vulkan.Memory( VkInternalAllocationType(..)+ , PFN_vkAllocationFunction+ , PFN_vkReallocationFunction+ , PFN_vkInternalAllocationNotification+ , VkAllocationCallbacks(..)+ , VkSystemAllocationScope(..)+ , PFN_vkFreeFunction+ , PFN_vkInternalFreeNotification+ )+import Text.Read( Read(..)+ , parens+ )+import Text.ParserCombinators.ReadPrec( prec+ , (+++)+ , step+ )+import Graphics.Vulkan.DeviceInitialization( VkInstance(..)+ )+import Graphics.Vulkan.Core( VkResult(..)+ , VkBool32(..)+ , VkFlags(..)+ , VkStructureType(..)+ )+import Foreign.C.Types( CSize+ , CChar+ , CSize(..)+ )++-- ** vkDebugReportMessageEXT+foreign import ccall "vkDebugReportMessageEXT" vkDebugReportMessageEXT ::+ VkInstance ->+ VkDebugReportFlagsEXT ->+ VkDebugReportObjectTypeEXT ->+ Word64 -> CSize -> Int32 -> Ptr CChar -> Ptr CChar -> IO ()++newtype VkDebugReportCallbackEXT = VkDebugReportCallbackEXT Word64+ deriving (Eq, Storable)++-- ** VkDebugReportObjectTypeEXT++newtype VkDebugReportObjectTypeEXT = VkDebugReportObjectTypeEXT Int32+ deriving (Eq, Storable)++instance Show VkDebugReportObjectTypeEXT where+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT"+ showsPrec _ VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = showString "VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT"+ showsPrec p (VkDebugReportObjectTypeEXT x) = showParen (p >= 11) (showString "VkDebugReportObjectTypeEXT " . showsPrec 11 x)++instance Read VkDebugReportObjectTypeEXT where+ readPrec = parens ( choose [ ("VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT)+ , ("VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT", pure VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT)+ ] ++++ prec 10 (do+ expectP (Ident "VkDebugReportObjectTypeEXT")+ v <- step readPrec+ pure (VkDebugReportObjectTypeEXT v)+ )+ )+++pattern VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = VkDebugReportObjectTypeEXT 0++pattern VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = VkDebugReportObjectTypeEXT 1++pattern VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = VkDebugReportObjectTypeEXT 2++pattern VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = VkDebugReportObjectTypeEXT 3++pattern VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = VkDebugReportObjectTypeEXT 4++pattern VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = VkDebugReportObjectTypeEXT 5++pattern VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = VkDebugReportObjectTypeEXT 6++pattern VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = VkDebugReportObjectTypeEXT 7++pattern VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = VkDebugReportObjectTypeEXT 8++pattern VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = VkDebugReportObjectTypeEXT 9++pattern VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = VkDebugReportObjectTypeEXT 10++pattern VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = VkDebugReportObjectTypeEXT 11++pattern VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = VkDebugReportObjectTypeEXT 12++pattern VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = VkDebugReportObjectTypeEXT 13++pattern VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = VkDebugReportObjectTypeEXT 14++pattern VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = VkDebugReportObjectTypeEXT 15++pattern VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = VkDebugReportObjectTypeEXT 16++pattern VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = VkDebugReportObjectTypeEXT 17++pattern VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = VkDebugReportObjectTypeEXT 18++pattern VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = VkDebugReportObjectTypeEXT 19++pattern VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = VkDebugReportObjectTypeEXT 20++pattern VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = VkDebugReportObjectTypeEXT 21++pattern VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = VkDebugReportObjectTypeEXT 22++pattern VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = VkDebugReportObjectTypeEXT 23++pattern VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = VkDebugReportObjectTypeEXT 24++pattern VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = VkDebugReportObjectTypeEXT 25++pattern VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = VkDebugReportObjectTypeEXT 26++pattern VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = VkDebugReportObjectTypeEXT 27++pattern VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VkDebugReportObjectTypeEXT 28++-- ** VkDebugReportErrorEXT++newtype VkDebugReportErrorEXT = VkDebugReportErrorEXT Int32+ deriving (Eq, Storable)++instance Show VkDebugReportErrorEXT where+ showsPrec _ VK_DEBUG_REPORT_ERROR_NONE_EXT = showString "VK_DEBUG_REPORT_ERROR_NONE_EXT"+ showsPrec _ VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = showString "VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT"+ showsPrec p (VkDebugReportErrorEXT x) = showParen (p >= 11) (showString "VkDebugReportErrorEXT " . showsPrec 11 x)++instance Read VkDebugReportErrorEXT where+ readPrec = parens ( choose [ ("VK_DEBUG_REPORT_ERROR_NONE_EXT", pure VK_DEBUG_REPORT_ERROR_NONE_EXT)+ , ("VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT", pure VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT)+ ] ++++ prec 10 (do+ expectP (Ident "VkDebugReportErrorEXT")+ v <- step readPrec+ pure (VkDebugReportErrorEXT v)+ )+ )+++pattern VK_DEBUG_REPORT_ERROR_NONE_EXT = VkDebugReportErrorEXT 0++pattern VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT = VkDebugReportErrorEXT 1+++data VkDebugReportCallbackCreateInfoEXT =+ VkDebugReportCallbackCreateInfoEXT{ vkSType :: VkStructureType + , vkPNext :: Ptr Void + , vkFlags :: VkDebugReportFlagsEXT + , vkPfnCallback :: PFN_vkDebugReportCallbackEXT + , vkPUserData :: Ptr Void + }+ deriving (Eq)++instance Storable VkDebugReportCallbackCreateInfoEXT where+ sizeOf ~_ = 40+ alignment ~_ = 8+ peek ptr = VkDebugReportCallbackCreateInfoEXT <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ <*> peek (ptr `plusPtr` 16)+ <*> peek (ptr `plusPtr` 24)+ <*> peek (ptr `plusPtr` 32)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkSType (poked :: VkDebugReportCallbackCreateInfoEXT))+ *> poke (ptr `plusPtr` 8) (vkPNext (poked :: VkDebugReportCallbackCreateInfoEXT))+ *> poke (ptr `plusPtr` 16) (vkFlags (poked :: VkDebugReportCallbackCreateInfoEXT))+ *> poke (ptr `plusPtr` 24) (vkPfnCallback (poked :: VkDebugReportCallbackCreateInfoEXT))+ *> poke (ptr `plusPtr` 32) (vkPUserData (poked :: VkDebugReportCallbackCreateInfoEXT))+++-- ** vkDestroyDebugReportCallbackEXT+foreign import ccall "vkDestroyDebugReportCallbackEXT" vkDestroyDebugReportCallbackEXT ::+ VkInstance ->+ VkDebugReportCallbackEXT -> Ptr VkAllocationCallbacks -> IO ()++-- ** VkDebugReportFlagsEXT+-- | Opaque flag+newtype VkDebugReportFlagsEXT = VkDebugReportFlagsEXT VkFlags+ deriving (Eq, Storable)++type PFN_vkDebugReportCallbackEXT = FunPtr+ (VkDebugReportFlagsEXT ->+ VkDebugReportObjectTypeEXT ->+ Word64 ->+ CSize ->+ Int32 -> Ptr CChar -> Ptr CChar -> Ptr Void -> IO VkBool32)++-- ** vkCreateDebugReportCallbackEXT+foreign import ccall "vkCreateDebugReportCallbackEXT" vkCreateDebugReportCallbackEXT ::+ VkInstance ->+ Ptr VkDebugReportCallbackCreateInfoEXT ->+ Ptr VkAllocationCallbacks ->+ Ptr VkDebugReportCallbackEXT -> IO VkResult+
src/Graphics/Vulkan/Event.hs view
@@ -32,7 +32,7 @@ ) -- ** vkDestroyEvent-foreign import ccall "vkDestroyEvent" vkDestroyEvent :: +foreign import ccall "vkDestroyEvent" vkDestroyEvent :: VkDevice -> VkEvent -> Ptr VkAllocationCallbacks -> IO () @@ -55,19 +55,19 @@ -- ** vkSetEvent-foreign import ccall "vkSetEvent" vkSetEvent :: +foreign import ccall "vkSetEvent" vkSetEvent :: VkDevice -> VkEvent -> IO VkResult -- ** vkGetEventStatus-foreign import ccall "vkGetEventStatus" vkGetEventStatus :: +foreign import ccall "vkGetEventStatus" vkGetEventStatus :: VkDevice -> VkEvent -> IO VkResult -- ** vkResetEvent-foreign import ccall "vkResetEvent" vkResetEvent :: +foreign import ccall "vkResetEvent" vkResetEvent :: VkDevice -> VkEvent -> IO VkResult -- ** vkCreateEvent-foreign import ccall "vkCreateEvent" vkCreateEvent :: +foreign import ccall "vkCreateEvent" vkCreateEvent :: VkDevice -> Ptr VkEventCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkEvent -> IO VkResult
src/Graphics/Vulkan/ExtensionDiscovery.hs view
@@ -38,11 +38,11 @@ -- ** vkEnumerateInstanceExtensionProperties-foreign import ccall "vkEnumerateInstanceExtensionProperties" vkEnumerateInstanceExtensionProperties :: +foreign import ccall "vkEnumerateInstanceExtensionProperties" vkEnumerateInstanceExtensionProperties :: Ptr CChar -> Ptr Word32 -> Ptr VkExtensionProperties -> IO VkResult -- ** vkEnumerateDeviceExtensionProperties-foreign import ccall "vkEnumerateDeviceExtensionProperties" vkEnumerateDeviceExtensionProperties :: +foreign import ccall "vkEnumerateDeviceExtensionProperties" vkEnumerateDeviceExtensionProperties :: VkPhysicalDevice -> Ptr CChar -> Ptr Word32 -> Ptr VkExtensionProperties -> IO VkResult
src/Graphics/Vulkan/Fence.hs view
@@ -68,20 +68,20 @@ -- ** vkResetFences-foreign import ccall "vkResetFences" vkResetFences :: +foreign import ccall "vkResetFences" vkResetFences :: VkDevice -> Word32 -> Ptr VkFence -> IO VkResult -- ** vkDestroyFence-foreign import ccall "vkDestroyFence" vkDestroyFence :: +foreign import ccall "vkDestroyFence" vkDestroyFence :: VkDevice -> VkFence -> Ptr VkAllocationCallbacks -> IO () -- ** vkWaitForFences-foreign import ccall "vkWaitForFences" vkWaitForFences :: +foreign import ccall "vkWaitForFences" vkWaitForFences :: VkDevice -> Word32 -> Ptr VkFence -> VkBool32 -> Word64 -> IO VkResult -- ** vkGetFenceStatus-foreign import ccall "vkGetFenceStatus" vkGetFenceStatus :: +foreign import ccall "vkGetFenceStatus" vkGetFenceStatus :: VkDevice -> VkFence -> IO VkResult -- ** VkFenceCreateFlags@@ -112,7 +112,7 @@ -- ** vkCreateFence-foreign import ccall "vkCreateFence" vkCreateFence :: +foreign import ccall "vkCreateFence" vkCreateFence :: VkDevice -> Ptr VkFenceCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkFence -> IO VkResult
src/Graphics/Vulkan/Image.hs view
@@ -56,7 +56,7 @@ ) -- ** vkCreateImage-foreign import ccall "vkCreateImage" vkCreateImage :: +foreign import ccall "vkCreateImage" vkCreateImage :: VkDevice -> Ptr VkImageCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkImage -> IO VkResult@@ -337,7 +337,7 @@ pattern VK_IMAGE_TYPE_3D = VkImageType 2 -- ** vkDestroyImage-foreign import ccall "vkDestroyImage" vkDestroyImage :: +foreign import ccall "vkDestroyImage" vkDestroyImage :: VkDevice -> VkImage -> Ptr VkAllocationCallbacks -> IO () @@ -385,7 +385,7 @@ -- ** vkGetImageSubresourceLayout-foreign import ccall "vkGetImageSubresourceLayout" vkGetImageSubresourceLayout :: +foreign import ccall "vkGetImageSubresourceLayout" vkGetImageSubresourceLayout :: VkDevice -> VkImage -> Ptr VkImageSubresource -> Ptr VkSubresourceLayout -> IO ()
src/Graphics/Vulkan/ImageView.hs view
@@ -87,7 +87,7 @@ -- ** vkCreateImageView-foreign import ccall "vkCreateImageView" vkCreateImageView :: +foreign import ccall "vkCreateImageView" vkCreateImageView :: VkDevice -> Ptr VkImageViewCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkImageView -> IO VkResult@@ -215,6 +215,6 @@ pattern VK_COMPONENT_SWIZZLE_A = VkComponentSwizzle 6 -- ** vkDestroyImageView-foreign import ccall "vkDestroyImageView" vkDestroyImageView :: +foreign import ccall "vkDestroyImageView" vkDestroyImageView :: VkDevice -> VkImageView -> Ptr VkAllocationCallbacks -> IO ()
+ src/Graphics/Vulkan/KHR/Display.hs view
@@ -0,0 +1,336 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE Strict #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+module Graphics.Vulkan.KHR.Display where++import Graphics.Vulkan.Device( VkPhysicalDevice(..)+ )+import Text.Read.Lex( Lexeme(Ident)+ )+import GHC.Read( expectP+ , choose+ )+import Data.Word( Word64+ , Word32+ )+import Foreign.Ptr( Ptr+ , plusPtr+ )+import Graphics.Vulkan.KHR.Surface( VkSurfaceTransformFlagBitsKHR(..)+ , VkSurfaceTransformFlagsKHR(..)+ , VkSurfaceKHR(..)+ )+import Data.Int( Int32+ )+import Data.Bits( Bits+ , FiniteBits+ )+import Foreign.Storable( Storable(..)+ )+import Data.Void( Void+ )+import Graphics.Vulkan.Memory( VkInternalAllocationType(..)+ , PFN_vkAllocationFunction+ , PFN_vkReallocationFunction+ , PFN_vkInternalAllocationNotification+ , VkAllocationCallbacks(..)+ , VkSystemAllocationScope(..)+ , PFN_vkFreeFunction+ , PFN_vkInternalFreeNotification+ )+import Text.Read( Read(..)+ , parens+ )+import Text.ParserCombinators.ReadPrec( prec+ , (+++)+ , step+ )+import Graphics.Vulkan.DeviceInitialization( VkInstance(..)+ )+import Graphics.Vulkan.Core( VkResult(..)+ , VkBool32(..)+ , VkExtent2D(..)+ , VkFlags(..)+ , VkOffset2D(..)+ , VkStructureType(..)+ )+import Foreign.C.Types( CFloat+ , CFloat(..)+ , CChar+ , CSize(..)+ )+++data VkDisplaySurfaceCreateInfoKHR =+ VkDisplaySurfaceCreateInfoKHR{ vkSType :: VkStructureType + , vkPNext :: Ptr Void + , vkFlags :: VkDisplaySurfaceCreateFlagsKHR + , vkDisplayMode :: VkDisplayModeKHR + , vkPlaneIndex :: Word32 + , vkPlaneStackIndex :: Word32 + , vkTransform :: VkSurfaceTransformFlagBitsKHR + , vkGlobalAlpha :: CFloat + , vkAlphaMode :: VkDisplayPlaneAlphaFlagBitsKHR + , vkImageExtent :: VkExtent2D + }+ deriving (Eq)++instance Storable VkDisplaySurfaceCreateInfoKHR where+ sizeOf ~_ = 64+ alignment ~_ = 8+ peek ptr = VkDisplaySurfaceCreateInfoKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ <*> peek (ptr `plusPtr` 16)+ <*> peek (ptr `plusPtr` 24)+ <*> peek (ptr `plusPtr` 32)+ <*> peek (ptr `plusPtr` 36)+ <*> peek (ptr `plusPtr` 40)+ <*> peek (ptr `plusPtr` 44)+ <*> peek (ptr `plusPtr` 48)+ <*> peek (ptr `plusPtr` 52)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkSType (poked :: VkDisplaySurfaceCreateInfoKHR))+ *> poke (ptr `plusPtr` 8) (vkPNext (poked :: VkDisplaySurfaceCreateInfoKHR))+ *> poke (ptr `plusPtr` 16) (vkFlags (poked :: VkDisplaySurfaceCreateInfoKHR))+ *> poke (ptr `plusPtr` 24) (vkDisplayMode (poked :: VkDisplaySurfaceCreateInfoKHR))+ *> poke (ptr `plusPtr` 32) (vkPlaneIndex (poked :: VkDisplaySurfaceCreateInfoKHR))+ *> poke (ptr `plusPtr` 36) (vkPlaneStackIndex (poked :: VkDisplaySurfaceCreateInfoKHR))+ *> poke (ptr `plusPtr` 40) (vkTransform (poked :: VkDisplaySurfaceCreateInfoKHR))+ *> poke (ptr `plusPtr` 44) (vkGlobalAlpha (poked :: VkDisplaySurfaceCreateInfoKHR))+ *> poke (ptr `plusPtr` 48) (vkAlphaMode (poked :: VkDisplaySurfaceCreateInfoKHR))+ *> poke (ptr `plusPtr` 52) (vkImageExtent (poked :: VkDisplaySurfaceCreateInfoKHR))++++data VkDisplayPlaneCapabilitiesKHR =+ VkDisplayPlaneCapabilitiesKHR{ vkSupportedAlpha :: VkDisplayPlaneAlphaFlagsKHR + , vkMinSrcPosition :: VkOffset2D + , vkMaxSrcPosition :: VkOffset2D + , vkMinSrcExtent :: VkExtent2D + , vkMaxSrcExtent :: VkExtent2D + , vkMinDstPosition :: VkOffset2D + , vkMaxDstPosition :: VkOffset2D + , vkMinDstExtent :: VkExtent2D + , vkMaxDstExtent :: VkExtent2D + }+ deriving (Eq)++instance Storable VkDisplayPlaneCapabilitiesKHR where+ sizeOf ~_ = 68+ alignment ~_ = 4+ peek ptr = VkDisplayPlaneCapabilitiesKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 4)+ <*> peek (ptr `plusPtr` 12)+ <*> peek (ptr `plusPtr` 20)+ <*> peek (ptr `plusPtr` 28)+ <*> peek (ptr `plusPtr` 36)+ <*> peek (ptr `plusPtr` 44)+ <*> peek (ptr `plusPtr` 52)+ <*> peek (ptr `plusPtr` 60)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkSupportedAlpha (poked :: VkDisplayPlaneCapabilitiesKHR))+ *> poke (ptr `plusPtr` 4) (vkMinSrcPosition (poked :: VkDisplayPlaneCapabilitiesKHR))+ *> poke (ptr `plusPtr` 12) (vkMaxSrcPosition (poked :: VkDisplayPlaneCapabilitiesKHR))+ *> poke (ptr `plusPtr` 20) (vkMinSrcExtent (poked :: VkDisplayPlaneCapabilitiesKHR))+ *> poke (ptr `plusPtr` 28) (vkMaxSrcExtent (poked :: VkDisplayPlaneCapabilitiesKHR))+ *> poke (ptr `plusPtr` 36) (vkMinDstPosition (poked :: VkDisplayPlaneCapabilitiesKHR))+ *> poke (ptr `plusPtr` 44) (vkMaxDstPosition (poked :: VkDisplayPlaneCapabilitiesKHR))+ *> poke (ptr `plusPtr` 52) (vkMinDstExtent (poked :: VkDisplayPlaneCapabilitiesKHR))+ *> poke (ptr `plusPtr` 60) (vkMaxDstExtent (poked :: VkDisplayPlaneCapabilitiesKHR))+++-- ** vkGetDisplayModePropertiesKHR+foreign import ccall "vkGetDisplayModePropertiesKHR" vkGetDisplayModePropertiesKHR ::+ VkPhysicalDevice ->+ VkDisplayKHR ->+ Ptr Word32 -> Ptr VkDisplayModePropertiesKHR -> IO VkResult+++data VkDisplayPropertiesKHR =+ VkDisplayPropertiesKHR{ vkDisplay :: VkDisplayKHR + , vkDisplayName :: Ptr CChar + , vkPhysicalDimensions :: VkExtent2D + , vkPhysicalResolution :: VkExtent2D + , vkSupportedTransforms :: VkSurfaceTransformFlagsKHR + , vkPlaneReorderPossible :: VkBool32 + , vkPersistentContent :: VkBool32 + }+ deriving (Eq)++instance Storable VkDisplayPropertiesKHR where+ sizeOf ~_ = 48+ alignment ~_ = 8+ peek ptr = VkDisplayPropertiesKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ <*> peek (ptr `plusPtr` 16)+ <*> peek (ptr `plusPtr` 24)+ <*> peek (ptr `plusPtr` 32)+ <*> peek (ptr `plusPtr` 36)+ <*> peek (ptr `plusPtr` 40)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkDisplay (poked :: VkDisplayPropertiesKHR))+ *> poke (ptr `plusPtr` 8) (vkDisplayName (poked :: VkDisplayPropertiesKHR))+ *> poke (ptr `plusPtr` 16) (vkPhysicalDimensions (poked :: VkDisplayPropertiesKHR))+ *> poke (ptr `plusPtr` 24) (vkPhysicalResolution (poked :: VkDisplayPropertiesKHR))+ *> poke (ptr `plusPtr` 32) (vkSupportedTransforms (poked :: VkDisplayPropertiesKHR))+ *> poke (ptr `plusPtr` 36) (vkPlaneReorderPossible (poked :: VkDisplayPropertiesKHR))+ *> poke (ptr `plusPtr` 40) (vkPersistentContent (poked :: VkDisplayPropertiesKHR))+++-- ** vkGetDisplayPlaneSupportedDisplaysKHR+foreign import ccall "vkGetDisplayPlaneSupportedDisplaysKHR" vkGetDisplayPlaneSupportedDisplaysKHR ::+ VkPhysicalDevice ->+ Word32 -> Ptr Word32 -> Ptr VkDisplayKHR -> IO VkResult++-- ** vkCreateDisplayModeKHR+foreign import ccall "vkCreateDisplayModeKHR" vkCreateDisplayModeKHR ::+ VkPhysicalDevice ->+ VkDisplayKHR ->+ Ptr VkDisplayModeCreateInfoKHR ->+ Ptr VkAllocationCallbacks -> Ptr VkDisplayModeKHR -> IO VkResult+++data VkDisplayPlanePropertiesKHR =+ VkDisplayPlanePropertiesKHR{ vkCurrentDisplay :: VkDisplayKHR + , vkCurrentStackIndex :: Word32 + }+ deriving (Eq)++instance Storable VkDisplayPlanePropertiesKHR where+ sizeOf ~_ = 16+ alignment ~_ = 8+ peek ptr = VkDisplayPlanePropertiesKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkCurrentDisplay (poked :: VkDisplayPlanePropertiesKHR))+ *> poke (ptr `plusPtr` 8) (vkCurrentStackIndex (poked :: VkDisplayPlanePropertiesKHR))+++-- ** vkGetDisplayPlaneCapabilitiesKHR+foreign import ccall "vkGetDisplayPlaneCapabilitiesKHR" vkGetDisplayPlaneCapabilitiesKHR ::+ VkPhysicalDevice ->+ VkDisplayModeKHR ->+ Word32 -> Ptr VkDisplayPlaneCapabilitiesKHR -> IO VkResult+++data VkDisplayModePropertiesKHR =+ VkDisplayModePropertiesKHR{ vkDisplayMode :: VkDisplayModeKHR + , vkParameters :: VkDisplayModeParametersKHR + }+ deriving (Eq)++instance Storable VkDisplayModePropertiesKHR where+ sizeOf ~_ = 24+ alignment ~_ = 8+ peek ptr = VkDisplayModePropertiesKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkDisplayMode (poked :: VkDisplayModePropertiesKHR))+ *> poke (ptr `plusPtr` 8) (vkParameters (poked :: VkDisplayModePropertiesKHR))+++-- ** VkDisplayPlaneAlphaFlagsKHR++newtype VkDisplayPlaneAlphaFlagBitsKHR = VkDisplayPlaneAlphaFlagBitsKHR VkFlags+ deriving (Eq, Storable, Bits, FiniteBits)++-- | Alias for VkDisplayPlaneAlphaFlagBitsKHR+type VkDisplayPlaneAlphaFlagsKHR = VkDisplayPlaneAlphaFlagBitsKHR++instance Show VkDisplayPlaneAlphaFlagBitsKHR where+ showsPrec _ VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = showString "VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR"+ showsPrec _ VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = showString "VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR"+ showsPrec _ VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = showString "VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR"+ showsPrec _ VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = showString "VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR"+ + showsPrec p (VkDisplayPlaneAlphaFlagBitsKHR x) = showParen (p >= 11) (showString "VkDisplayPlaneAlphaFlagBitsKHR " . showsPrec 11 x)++instance Read VkDisplayPlaneAlphaFlagBitsKHR where+ readPrec = parens ( choose [ ("VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR", pure VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR)+ , ("VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR", pure VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR)+ , ("VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR", pure VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR)+ , ("VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR", pure VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR)+ ] ++++ prec 10 (do+ expectP (Ident "VkDisplayPlaneAlphaFlagBitsKHR")+ v <- step readPrec+ pure (VkDisplayPlaneAlphaFlagBitsKHR v)+ )+ )+++pattern VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = VkDisplayPlaneAlphaFlagBitsKHR 0x1++pattern VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = VkDisplayPlaneAlphaFlagBitsKHR 0x2++pattern VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = VkDisplayPlaneAlphaFlagBitsKHR 0x4++pattern VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = VkDisplayPlaneAlphaFlagBitsKHR 0x8+++-- ** VkDisplayModeCreateFlagsKHR+-- | Opaque flag+newtype VkDisplayModeCreateFlagsKHR = VkDisplayModeCreateFlagsKHR VkFlags+ deriving (Eq, Storable)+++data VkDisplayModeCreateInfoKHR =+ VkDisplayModeCreateInfoKHR{ vkSType :: VkStructureType + , vkPNext :: Ptr Void + , vkFlags :: VkDisplayModeCreateFlagsKHR + , vkParameters :: VkDisplayModeParametersKHR + }+ deriving (Eq)++instance Storable VkDisplayModeCreateInfoKHR where+ sizeOf ~_ = 32+ alignment ~_ = 8+ peek ptr = VkDisplayModeCreateInfoKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ <*> peek (ptr `plusPtr` 16)+ <*> peek (ptr `plusPtr` 20)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkSType (poked :: VkDisplayModeCreateInfoKHR))+ *> poke (ptr `plusPtr` 8) (vkPNext (poked :: VkDisplayModeCreateInfoKHR))+ *> poke (ptr `plusPtr` 16) (vkFlags (poked :: VkDisplayModeCreateInfoKHR))+ *> poke (ptr `plusPtr` 20) (vkParameters (poked :: VkDisplayModeCreateInfoKHR))+++-- ** vkGetPhysicalDeviceDisplayPlanePropertiesKHR+foreign import ccall "vkGetPhysicalDeviceDisplayPlanePropertiesKHR" vkGetPhysicalDeviceDisplayPlanePropertiesKHR ::+ VkPhysicalDevice ->+ Ptr Word32 -> Ptr VkDisplayPlanePropertiesKHR -> IO VkResult++newtype VkDisplayModeKHR = VkDisplayModeKHR Word64+ deriving (Eq, Storable)+++data VkDisplayModeParametersKHR =+ VkDisplayModeParametersKHR{ vkVisibleRegion :: VkExtent2D + , vkRefreshRate :: Word32 + }+ deriving (Eq)++instance Storable VkDisplayModeParametersKHR where+ sizeOf ~_ = 12+ alignment ~_ = 4+ peek ptr = VkDisplayModeParametersKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkVisibleRegion (poked :: VkDisplayModeParametersKHR))+ *> poke (ptr `plusPtr` 8) (vkRefreshRate (poked :: VkDisplayModeParametersKHR))+++-- ** VkDisplaySurfaceCreateFlagsKHR+-- | Opaque flag+newtype VkDisplaySurfaceCreateFlagsKHR = VkDisplaySurfaceCreateFlagsKHR VkFlags+ deriving (Eq, Storable)++newtype VkDisplayKHR = VkDisplayKHR Word64+ deriving (Eq, Storable)++-- ** vkGetPhysicalDeviceDisplayPropertiesKHR+foreign import ccall "vkGetPhysicalDeviceDisplayPropertiesKHR" vkGetPhysicalDeviceDisplayPropertiesKHR ::+ VkPhysicalDevice ->+ Ptr Word32 -> Ptr VkDisplayPropertiesKHR -> IO VkResult++-- ** vkCreateDisplayPlaneSurfaceKHR+foreign import ccall "vkCreateDisplayPlaneSurfaceKHR" vkCreateDisplayPlaneSurfaceKHR ::+ VkInstance ->+ Ptr VkDisplaySurfaceCreateInfoKHR ->+ Ptr VkAllocationCallbacks -> Ptr VkSurfaceKHR -> IO VkResult+
+ src/Graphics/Vulkan/KHR/DisplaySwapchain.hs view
@@ -0,0 +1,85 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE Strict #-}+module Graphics.Vulkan.KHR.DisplaySwapchain where++import Graphics.Vulkan.Device( VkDevice(..)+ )+import Graphics.Vulkan.KHR.Swapchain( VkSwapchainKHR(..)+ , VkSwapchainCreateInfoKHR(..)+ , VkSwapchainCreateFlagsKHR(..)+ )+import Data.Word( Word64+ , Word32+ )+import Foreign.Ptr( Ptr+ , plusPtr+ )+import Graphics.Vulkan.KHR.Surface( VkColorSpaceKHR(..)+ , VkSurfaceTransformFlagBitsKHR(..)+ , VkPresentModeKHR(..)+ , VkCompositeAlphaFlagBitsKHR(..)+ , VkSurfaceKHR(..)+ )+import Data.Int( Int32+ )+import Foreign.Storable( Storable(..)+ )+import Data.Void( Void+ )+import Graphics.Vulkan.Memory( VkInternalAllocationType(..)+ , PFN_vkAllocationFunction+ , PFN_vkReallocationFunction+ , PFN_vkInternalAllocationNotification+ , VkAllocationCallbacks(..)+ , VkSystemAllocationScope(..)+ , PFN_vkFreeFunction+ , PFN_vkInternalFreeNotification+ )+import Graphics.Vulkan.Image( VkImageUsageFlags(..)+ , VkImageUsageFlagBits(..)+ )+import Graphics.Vulkan.Core( VkResult(..)+ , VkBool32(..)+ , VkExtent2D(..)+ , VkFlags(..)+ , VkFormat(..)+ , VkOffset2D(..)+ , VkRect2D(..)+ , VkStructureType(..)+ , VkSharingMode(..)+ )+import Foreign.C.Types( CSize(..)+ )+++data VkDisplayPresentInfoKHR =+ VkDisplayPresentInfoKHR{ vkSType :: VkStructureType + , vkPNext :: Ptr Void + , vkSrcRect :: VkRect2D + , vkDstRect :: VkRect2D + , vkPersistent :: VkBool32 + }+ deriving (Eq)++instance Storable VkDisplayPresentInfoKHR where+ sizeOf ~_ = 56+ alignment ~_ = 8+ peek ptr = VkDisplayPresentInfoKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ <*> peek (ptr `plusPtr` 16)+ <*> peek (ptr `plusPtr` 32)+ <*> peek (ptr `plusPtr` 48)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkSType (poked :: VkDisplayPresentInfoKHR))+ *> poke (ptr `plusPtr` 8) (vkPNext (poked :: VkDisplayPresentInfoKHR))+ *> poke (ptr `plusPtr` 16) (vkSrcRect (poked :: VkDisplayPresentInfoKHR))+ *> poke (ptr `plusPtr` 32) (vkDstRect (poked :: VkDisplayPresentInfoKHR))+ *> poke (ptr `plusPtr` 48) (vkPersistent (poked :: VkDisplayPresentInfoKHR))+++-- ** vkCreateSharedSwapchainsKHR+foreign import ccall "vkCreateSharedSwapchainsKHR" vkCreateSharedSwapchainsKHR ::+ VkDevice ->+ Word32 ->+ Ptr VkSwapchainCreateInfoKHR ->+ Ptr VkAllocationCallbacks -> Ptr VkSwapchainKHR -> IO VkResult+
src/Graphics/Vulkan/KHR/Surface.hs view
@@ -1,7 +1,11 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE Strict #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Graphics.Vulkan.KHR.Surface where +import Graphics.Vulkan.Device( VkPhysicalDevice(..)+ ) import Text.Read.Lex( Lexeme(Ident) ) import GHC.Read( expectP@@ -10,6 +14,9 @@ import Data.Word( Word64 , Word32 )+import Foreign.Ptr( Ptr+ , plusPtr+ ) import Data.Int( Int32 ) import Data.Bits( Bits@@ -17,6 +24,17 @@ ) import Foreign.Storable( Storable(..) )+import Data.Void( Void+ )+import Graphics.Vulkan.Memory( VkInternalAllocationType(..)+ , PFN_vkAllocationFunction+ , PFN_vkReallocationFunction+ , PFN_vkInternalAllocationNotification+ , VkAllocationCallbacks(..)+ , VkSystemAllocationScope(..)+ , PFN_vkFreeFunction+ , PFN_vkInternalFreeNotification+ ) import Text.Read( Read(..) , parens )@@ -24,9 +42,30 @@ , (+++) , step )-import Graphics.Vulkan.Core( VkFlags(..)+import Graphics.Vulkan.Image( VkImageUsageFlags(..)+ , VkImageUsageFlagBits(..)+ )+import Graphics.Vulkan.DeviceInitialization( VkInstance(..)+ )+import Graphics.Vulkan.Core( VkResult(..)+ , VkBool32(..)+ , VkExtent2D(..)+ , VkFlags(..)+ , VkFormat(..) )+import Foreign.C.Types( CSize(..)+ ) +-- ** vkGetPhysicalDeviceSurfaceFormatsKHR+foreign import ccall "vkGetPhysicalDeviceSurfaceFormatsKHR" vkGetPhysicalDeviceSurfaceFormatsKHR ::+ VkPhysicalDevice ->+ VkSurfaceKHR -> Ptr Word32 -> Ptr VkSurfaceFormatKHR -> IO VkResult++-- ** vkGetPhysicalDeviceSurfaceCapabilitiesKHR+foreign import ccall "vkGetPhysicalDeviceSurfaceCapabilitiesKHR" vkGetPhysicalDeviceSurfaceCapabilitiesKHR ::+ VkPhysicalDevice ->+ VkSurfaceKHR -> Ptr VkSurfaceCapabilitiesKHR -> IO VkResult+ -- ** VkCompositeAlphaFlagsKHR newtype VkCompositeAlphaFlagBitsKHR = VkCompositeAlphaFlagBitsKHR VkFlags@@ -103,6 +142,31 @@ newtype VkSurfaceKHR = VkSurfaceKHR Word64 deriving (Eq, Storable) +-- ** vkGetPhysicalDeviceSurfaceSupportKHR+foreign import ccall "vkGetPhysicalDeviceSurfaceSupportKHR" vkGetPhysicalDeviceSurfaceSupportKHR ::+ VkPhysicalDevice ->+ Word32 -> VkSurfaceKHR -> Ptr VkBool32 -> IO VkResult+++data VkSurfaceFormatKHR =+ VkSurfaceFormatKHR{ vkFormat :: VkFormat + , vkColorSpace :: VkColorSpaceKHR + }+ deriving (Eq)++instance Storable VkSurfaceFormatKHR where+ sizeOf ~_ = 8+ alignment ~_ = 4+ peek ptr = VkSurfaceFormatKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 4)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkFormat (poked :: VkSurfaceFormatKHR))+ *> poke (ptr `plusPtr` 4) (vkColorSpace (poked :: VkSurfaceFormatKHR))+++-- ** vkDestroySurfaceKHR+foreign import ccall "vkDestroySurfaceKHR" vkDestroySurfaceKHR ::+ VkInstance -> VkSurfaceKHR -> Ptr VkAllocationCallbacks -> IO ()+ -- ** VkColorSpaceKHR newtype VkColorSpaceKHR = VkColorSpaceKHR Int32@@ -125,6 +189,11 @@ pattern VK_COLORSPACE_SRGB_NONLINEAR_KHR = VkColorSpaceKHR 0 +-- ** vkGetPhysicalDeviceSurfacePresentModesKHR+foreign import ccall "vkGetPhysicalDeviceSurfacePresentModesKHR" vkGetPhysicalDeviceSurfacePresentModesKHR ::+ VkPhysicalDevice ->+ VkSurfaceKHR -> Ptr Word32 -> Ptr VkPresentModeKHR -> IO VkResult+ -- ** VkSurfaceTransformFlagsKHR newtype VkSurfaceTransformFlagBitsKHR = VkSurfaceTransformFlagBitsKHR VkFlags@@ -182,5 +251,45 @@ pattern VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = VkSurfaceTransformFlagBitsKHR 0x80 pattern VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = VkSurfaceTransformFlagBitsKHR 0x100++++data VkSurfaceCapabilitiesKHR =+ VkSurfaceCapabilitiesKHR{ vkMinImageCount :: Word32 + , vkMaxImageCount :: Word32 + , vkCurrentExtent :: VkExtent2D + , vkMinImageExtent :: VkExtent2D + , vkMaxImageExtent :: VkExtent2D + , vkMaxImageArrayLayers :: Word32 + , vkSupportedTransforms :: VkSurfaceTransformFlagsKHR + , vkCurrentTransform :: VkSurfaceTransformFlagBitsKHR + , vkSupportedCompositeAlpha :: VkCompositeAlphaFlagsKHR + , vkSupportedUsageFlags :: VkImageUsageFlags + }+ deriving (Eq)++instance Storable VkSurfaceCapabilitiesKHR where+ sizeOf ~_ = 52+ alignment ~_ = 4+ peek ptr = VkSurfaceCapabilitiesKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 4)+ <*> peek (ptr `plusPtr` 8)+ <*> peek (ptr `plusPtr` 16)+ <*> peek (ptr `plusPtr` 24)+ <*> peek (ptr `plusPtr` 32)+ <*> peek (ptr `plusPtr` 36)+ <*> peek (ptr `plusPtr` 40)+ <*> peek (ptr `plusPtr` 44)+ <*> peek (ptr `plusPtr` 48)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkMinImageCount (poked :: VkSurfaceCapabilitiesKHR))+ *> poke (ptr `plusPtr` 4) (vkMaxImageCount (poked :: VkSurfaceCapabilitiesKHR))+ *> poke (ptr `plusPtr` 8) (vkCurrentExtent (poked :: VkSurfaceCapabilitiesKHR))+ *> poke (ptr `plusPtr` 16) (vkMinImageExtent (poked :: VkSurfaceCapabilitiesKHR))+ *> poke (ptr `plusPtr` 24) (vkMaxImageExtent (poked :: VkSurfaceCapabilitiesKHR))+ *> poke (ptr `plusPtr` 32) (vkMaxImageArrayLayers (poked :: VkSurfaceCapabilitiesKHR))+ *> poke (ptr `plusPtr` 36) (vkSupportedTransforms (poked :: VkSurfaceCapabilitiesKHR))+ *> poke (ptr `plusPtr` 40) (vkCurrentTransform (poked :: VkSurfaceCapabilitiesKHR))+ *> poke (ptr `plusPtr` 44) (vkSupportedCompositeAlpha (poked :: VkSurfaceCapabilitiesKHR))+ *> poke (ptr `plusPtr` 48) (vkSupportedUsageFlags (poked :: VkSurfaceCapabilitiesKHR))
+ src/Graphics/Vulkan/KHR/Swapchain.hs view
@@ -0,0 +1,184 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE Strict #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+module Graphics.Vulkan.KHR.Swapchain where++import Graphics.Vulkan.Device( VkDevice(..)+ )+import Data.Word( Word64+ , Word32+ )+import Foreign.Ptr( Ptr+ , plusPtr+ )+import Graphics.Vulkan.KHR.Surface( VkColorSpaceKHR(..)+ , VkSurfaceTransformFlagBitsKHR(..)+ , VkPresentModeKHR(..)+ , VkCompositeAlphaFlagBitsKHR(..)+ , VkSurfaceKHR(..)+ )+import Graphics.Vulkan.Queue( VkQueue(..)+ )+import Foreign.Storable( Storable(..)+ )+import Graphics.Vulkan.Fence( VkFence(..)+ )+import Data.Void( Void+ )+import Graphics.Vulkan.Memory( VkInternalAllocationType(..)+ , PFN_vkAllocationFunction+ , PFN_vkReallocationFunction+ , PFN_vkInternalAllocationNotification+ , VkAllocationCallbacks(..)+ , VkSystemAllocationScope(..)+ , PFN_vkFreeFunction+ , PFN_vkInternalFreeNotification+ )+import Graphics.Vulkan.Image( VkImageUsageFlags(..)+ , VkImage(..)+ , VkImageUsageFlagBits(..)+ )+import Graphics.Vulkan.QueueSemaphore( VkSemaphore(..)+ )+import Graphics.Vulkan.Core( VkResult(..)+ , VkBool32(..)+ , VkExtent2D(..)+ , VkFlags(..)+ , VkFormat(..)+ , VkStructureType(..)+ , VkSharingMode(..)+ )+import Foreign.C.Types( CSize(..)+ )+++data VkSwapchainCreateInfoKHR =+ VkSwapchainCreateInfoKHR{ vkSType :: VkStructureType + , vkPNext :: Ptr Void + , vkFlags :: VkSwapchainCreateFlagsKHR + , vkSurface :: VkSurfaceKHR + , vkMinImageCount :: Word32 + , vkImageFormat :: VkFormat + , vkImageColorSpace :: VkColorSpaceKHR + , vkImageExtent :: VkExtent2D + , vkImageArrayLayers :: Word32 + , vkImageUsage :: VkImageUsageFlags + , vkImageSharingMode :: VkSharingMode + , vkQueueFamilyIndexCount :: Word32 + , vkPQueueFamilyIndices :: Ptr Word32 + , vkPreTransform :: VkSurfaceTransformFlagBitsKHR + , vkCompositeAlpha :: VkCompositeAlphaFlagBitsKHR + , vkPresentMode :: VkPresentModeKHR + , vkClipped :: VkBool32 + , vkOldSwapchain :: VkSwapchainKHR + }+ deriving (Eq)++instance Storable VkSwapchainCreateInfoKHR where+ sizeOf ~_ = 104+ alignment ~_ = 8+ peek ptr = VkSwapchainCreateInfoKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ <*> peek (ptr `plusPtr` 16)+ <*> peek (ptr `plusPtr` 24)+ <*> peek (ptr `plusPtr` 32)+ <*> peek (ptr `plusPtr` 36)+ <*> peek (ptr `plusPtr` 40)+ <*> peek (ptr `plusPtr` 44)+ <*> peek (ptr `plusPtr` 52)+ <*> peek (ptr `plusPtr` 56)+ <*> peek (ptr `plusPtr` 60)+ <*> peek (ptr `plusPtr` 64)+ <*> peek (ptr `plusPtr` 72)+ <*> peek (ptr `plusPtr` 80)+ <*> peek (ptr `plusPtr` 84)+ <*> peek (ptr `plusPtr` 88)+ <*> peek (ptr `plusPtr` 92)+ <*> peek (ptr `plusPtr` 96)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkSType (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 8) (vkPNext (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 16) (vkFlags (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 24) (vkSurface (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 32) (vkMinImageCount (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 36) (vkImageFormat (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 40) (vkImageColorSpace (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 44) (vkImageExtent (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 52) (vkImageArrayLayers (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 56) (vkImageUsage (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 60) (vkImageSharingMode (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 64) (vkQueueFamilyIndexCount (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 72) (vkPQueueFamilyIndices (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 80) (vkPreTransform (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 84) (vkCompositeAlpha (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 88) (vkPresentMode (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 92) (vkClipped (poked :: VkSwapchainCreateInfoKHR))+ *> poke (ptr `plusPtr` 96) (vkOldSwapchain (poked :: VkSwapchainCreateInfoKHR))+++-- ** vkGetSwapchainImagesKHR+foreign import ccall "vkGetSwapchainImagesKHR" vkGetSwapchainImagesKHR ::+ VkDevice ->+ VkSwapchainKHR -> Ptr Word32 -> Ptr VkImage -> IO VkResult++-- ** vkDestroySwapchainKHR+foreign import ccall "vkDestroySwapchainKHR" vkDestroySwapchainKHR ::+ VkDevice -> VkSwapchainKHR -> Ptr VkAllocationCallbacks -> IO ()++-- ** vkQueuePresentKHR+foreign import ccall "vkQueuePresentKHR" vkQueuePresentKHR ::+ VkQueue -> Ptr VkPresentInfoKHR -> IO VkResult++-- ** VkSwapchainCreateFlagsKHR+-- | Opaque flag+newtype VkSwapchainCreateFlagsKHR = VkSwapchainCreateFlagsKHR VkFlags+ deriving (Eq, Storable)++-- ** vkCreateSwapchainKHR+foreign import ccall "vkCreateSwapchainKHR" vkCreateSwapchainKHR ::+ VkDevice ->+ Ptr VkSwapchainCreateInfoKHR ->+ Ptr VkAllocationCallbacks -> Ptr VkSwapchainKHR -> IO VkResult++-- ** vkAcquireNextImageKHR+foreign import ccall "vkAcquireNextImageKHR" vkAcquireNextImageKHR ::+ VkDevice ->+ VkSwapchainKHR ->+ Word64 -> VkSemaphore -> VkFence -> Ptr Word32 -> IO VkResult+++data VkPresentInfoKHR =+ VkPresentInfoKHR{ vkSType :: VkStructureType + , vkPNext :: Ptr Void + , vkWaitSemaphoreCount :: Word32 + , vkPWaitSemaphores :: Ptr VkSemaphore + , vkSwapchainCount :: Word32 + , vkPSwapchains :: Ptr VkSwapchainKHR + , vkPImageIndices :: Ptr Word32 + , vkPResults :: Ptr VkResult + }+ deriving (Eq)++instance Storable VkPresentInfoKHR where+ sizeOf ~_ = 64+ alignment ~_ = 8+ peek ptr = VkPresentInfoKHR <$> peek (ptr `plusPtr` 0)+ <*> peek (ptr `plusPtr` 8)+ <*> peek (ptr `plusPtr` 16)+ <*> peek (ptr `plusPtr` 24)+ <*> peek (ptr `plusPtr` 32)+ <*> peek (ptr `plusPtr` 40)+ <*> peek (ptr `plusPtr` 48)+ <*> peek (ptr `plusPtr` 56)+ poke ptr poked = poke (ptr `plusPtr` 0) (vkSType (poked :: VkPresentInfoKHR))+ *> poke (ptr `plusPtr` 8) (vkPNext (poked :: VkPresentInfoKHR))+ *> poke (ptr `plusPtr` 16) (vkWaitSemaphoreCount (poked :: VkPresentInfoKHR))+ *> poke (ptr `plusPtr` 24) (vkPWaitSemaphores (poked :: VkPresentInfoKHR))+ *> poke (ptr `plusPtr` 32) (vkSwapchainCount (poked :: VkPresentInfoKHR))+ *> poke (ptr `plusPtr` 40) (vkPSwapchains (poked :: VkPresentInfoKHR))+ *> poke (ptr `plusPtr` 48) (vkPImageIndices (poked :: VkPresentInfoKHR))+ *> poke (ptr `plusPtr` 56) (vkPResults (poked :: VkPresentInfoKHR))+++newtype VkSwapchainKHR = VkSwapchainKHR Word64+ deriving (Eq, Storable)+
src/Graphics/Vulkan/LayerDiscovery.hs view
@@ -45,11 +45,11 @@ -- ** vkEnumerateInstanceLayerProperties-foreign import ccall "vkEnumerateInstanceLayerProperties" vkEnumerateInstanceLayerProperties :: +foreign import ccall "vkEnumerateInstanceLayerProperties" vkEnumerateInstanceLayerProperties :: Ptr Word32 -> Ptr VkLayerProperties -> IO VkResult -- ** vkEnumerateDeviceLayerProperties-foreign import ccall "vkEnumerateDeviceLayerProperties" vkEnumerateDeviceLayerProperties :: +foreign import ccall "vkEnumerateDeviceLayerProperties" vkEnumerateDeviceLayerProperties :: VkPhysicalDevice -> Ptr Word32 -> Ptr VkLayerProperties -> IO VkResult
src/Graphics/Vulkan/Memory.hs view
@@ -44,7 +44,7 @@ deriving (Eq, Storable) -- ** vkMapMemory-foreign import ccall "vkMapMemory" vkMapMemory :: +foreign import ccall "vkMapMemory" vkMapMemory :: VkDevice -> VkDeviceMemory -> VkDeviceSize ->@@ -84,7 +84,7 @@ -- ** vkInvalidateMappedMemoryRanges-foreign import ccall "vkInvalidateMappedMemoryRanges" vkInvalidateMappedMemoryRanges :: +foreign import ccall "vkInvalidateMappedMemoryRanges" vkInvalidateMappedMemoryRanges :: VkDevice -> Word32 -> Ptr VkMappedMemoryRange -> IO VkResult -- ** VkSystemAllocationScope@@ -126,7 +126,7 @@ pattern VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = VkSystemAllocationScope 4 -- ** vkFlushMappedMemoryRanges-foreign import ccall "vkFlushMappedMemoryRanges" vkFlushMappedMemoryRanges :: +foreign import ccall "vkFlushMappedMemoryRanges" vkFlushMappedMemoryRanges :: VkDevice -> Word32 -> Ptr VkMappedMemoryRange -> IO VkResult -- ** VkMemoryMapFlags@@ -140,7 +140,7 @@ VkInternalAllocationType -> VkSystemAllocationScope -> IO ()) -- ** vkFreeMemory-foreign import ccall "vkFreeMemory" vkFreeMemory :: +foreign import ccall "vkFreeMemory" vkFreeMemory :: VkDevice -> VkDeviceMemory -> Ptr VkAllocationCallbacks -> IO () type PFN_vkReallocationFunction = FunPtr@@ -149,7 +149,7 @@ CSize -> CSize -> VkSystemAllocationScope -> IO (Ptr Void)) -- ** vkUnmapMemory-foreign import ccall "vkUnmapMemory" vkUnmapMemory :: +foreign import ccall "vkUnmapMemory" vkUnmapMemory :: VkDevice -> VkDeviceMemory -> IO () type PFN_vkAllocationFunction = FunPtr@@ -181,11 +181,11 @@ type PFN_vkFreeFunction = FunPtr (Ptr Void -> Ptr Void -> IO ()) -- ** vkGetDeviceMemoryCommitment-foreign import ccall "vkGetDeviceMemoryCommitment" vkGetDeviceMemoryCommitment :: +foreign import ccall "vkGetDeviceMemoryCommitment" vkGetDeviceMemoryCommitment :: VkDevice -> VkDeviceMemory -> Ptr VkDeviceSize -> IO () -- ** vkAllocateMemory-foreign import ccall "vkAllocateMemory" vkAllocateMemory :: +foreign import ccall "vkAllocateMemory" vkAllocateMemory :: VkDevice -> Ptr VkMemoryAllocateInfo -> Ptr VkAllocationCallbacks -> Ptr VkDeviceMemory -> IO VkResult
src/Graphics/Vulkan/MemoryManagement.hs view
@@ -25,7 +25,7 @@ ) -- ** vkGetImageMemoryRequirements-foreign import ccall "vkGetImageMemoryRequirements" vkGetImageMemoryRequirements :: +foreign import ccall "vkGetImageMemoryRequirements" vkGetImageMemoryRequirements :: VkDevice -> VkImage -> Ptr VkMemoryRequirements -> IO () @@ -48,16 +48,16 @@ -- ** vkGetBufferMemoryRequirements-foreign import ccall "vkGetBufferMemoryRequirements" vkGetBufferMemoryRequirements :: +foreign import ccall "vkGetBufferMemoryRequirements" vkGetBufferMemoryRequirements :: VkDevice -> VkBuffer -> Ptr VkMemoryRequirements -> IO () -- ** vkBindBufferMemory-foreign import ccall "vkBindBufferMemory" vkBindBufferMemory :: +foreign import ccall "vkBindBufferMemory" vkBindBufferMemory :: VkDevice -> VkBuffer -> VkDeviceMemory -> VkDeviceSize -> IO VkResult -- ** vkBindImageMemory-foreign import ccall "vkBindImageMemory" vkBindImageMemory :: +foreign import ccall "vkBindImageMemory" vkBindImageMemory :: VkDevice -> VkImage -> VkDeviceMemory -> VkDeviceSize -> IO VkResult
src/Graphics/Vulkan/Pass.hs view
@@ -155,11 +155,11 @@ -- ** vkDestroyRenderPass-foreign import ccall "vkDestroyRenderPass" vkDestroyRenderPass :: +foreign import ccall "vkDestroyRenderPass" vkDestroyRenderPass :: VkDevice -> VkRenderPass -> Ptr VkAllocationCallbacks -> IO () -- ** vkCreateFramebuffer-foreign import ccall "vkCreateFramebuffer" vkCreateFramebuffer :: +foreign import ccall "vkCreateFramebuffer" vkCreateFramebuffer :: VkDevice -> Ptr VkFramebufferCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkFramebuffer -> IO VkResult@@ -202,7 +202,7 @@ -- ** vkGetRenderAreaGranularity-foreign import ccall "vkGetRenderAreaGranularity" vkGetRenderAreaGranularity :: +foreign import ccall "vkGetRenderAreaGranularity" vkGetRenderAreaGranularity :: VkDevice -> VkRenderPass -> Ptr VkExtent2D -> IO () -- ** VkAttachmentLoadOp@@ -356,7 +356,7 @@ deriving (Eq, Storable) -- ** vkDestroyFramebuffer-foreign import ccall "vkDestroyFramebuffer" vkDestroyFramebuffer :: +foreign import ccall "vkDestroyFramebuffer" vkDestroyFramebuffer :: VkDevice -> VkFramebuffer -> Ptr VkAllocationCallbacks -> IO () @@ -458,7 +458,7 @@ -- ** vkCreateRenderPass-foreign import ccall "vkCreateRenderPass" vkCreateRenderPass :: +foreign import ccall "vkCreateRenderPass" vkCreateRenderPass :: VkDevice -> Ptr VkRenderPassCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkRenderPass -> IO VkResult
src/Graphics/Vulkan/Pipeline.hs view
@@ -414,7 +414,7 @@ deriving (Eq, Storable) -- ** vkCreateGraphicsPipelines-foreign import ccall "vkCreateGraphicsPipelines" vkCreateGraphicsPipelines :: +foreign import ccall "vkCreateGraphicsPipelines" vkCreateGraphicsPipelines :: VkDevice -> VkPipelineCache -> Word32 ->@@ -777,7 +777,7 @@ pattern VK_BLEND_OP_MAX = VkBlendOp 4 -- ** vkDestroyPipeline-foreign import ccall "vkDestroyPipeline" vkDestroyPipeline :: +foreign import ccall "vkDestroyPipeline" vkDestroyPipeline :: VkDevice -> VkPipeline -> Ptr VkAllocationCallbacks -> IO () -- ** VkPipelineShaderStageCreateFlags@@ -1378,7 +1378,7 @@ -- ** vkCreateComputePipelines-foreign import ccall "vkCreateComputePipelines" vkCreateComputePipelines :: +foreign import ccall "vkCreateComputePipelines" vkCreateComputePipelines :: VkDevice -> VkPipelineCache -> Word32 ->
src/Graphics/Vulkan/PipelineCache.hs view
@@ -33,13 +33,13 @@ ) -- ** vkCreatePipelineCache-foreign import ccall "vkCreatePipelineCache" vkCreatePipelineCache :: +foreign import ccall "vkCreatePipelineCache" vkCreatePipelineCache :: VkDevice -> Ptr VkPipelineCacheCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkPipelineCache -> IO VkResult -- ** vkGetPipelineCacheData-foreign import ccall "vkGetPipelineCacheData" vkGetPipelineCacheData :: +foreign import ccall "vkGetPipelineCacheData" vkGetPipelineCacheData :: VkDevice -> VkPipelineCache -> Ptr CSize -> Ptr Void -> IO VkResult newtype VkPipelineCache = VkPipelineCache Word64@@ -71,7 +71,7 @@ -- ** vkMergePipelineCaches-foreign import ccall "vkMergePipelineCaches" vkMergePipelineCaches :: +foreign import ccall "vkMergePipelineCaches" vkMergePipelineCaches :: VkDevice -> VkPipelineCache -> Word32 -> Ptr VkPipelineCache -> IO VkResult @@ -81,6 +81,6 @@ deriving (Eq, Storable) -- ** vkDestroyPipelineCache-foreign import ccall "vkDestroyPipelineCache" vkDestroyPipelineCache :: +foreign import ccall "vkDestroyPipelineCache" vkDestroyPipelineCache :: VkDevice -> VkPipelineCache -> Ptr VkAllocationCallbacks -> IO ()
src/Graphics/Vulkan/PipelineLayout.hs view
@@ -45,7 +45,7 @@ deriving (Eq, Storable) -- ** vkDestroyPipelineLayout-foreign import ccall "vkDestroyPipelineLayout" vkDestroyPipelineLayout :: +foreign import ccall "vkDestroyPipelineLayout" vkDestroyPipelineLayout :: VkDevice -> VkPipelineLayout -> Ptr VkAllocationCallbacks -> IO () @@ -99,7 +99,7 @@ -- ** vkCreatePipelineLayout-foreign import ccall "vkCreatePipelineLayout" vkCreatePipelineLayout :: +foreign import ccall "vkCreatePipelineLayout" vkCreatePipelineLayout :: VkDevice -> Ptr VkPipelineLayoutCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkPipelineLayout -> IO VkResult
src/Graphics/Vulkan/Query.hs view
@@ -52,7 +52,7 @@ ) -- ** vkGetQueryPoolResults-foreign import ccall "vkGetQueryPoolResults" vkGetQueryPoolResults :: +foreign import ccall "vkGetQueryPoolResults" vkGetQueryPoolResults :: VkDevice -> VkQueryPool -> Word32 ->@@ -61,7 +61,7 @@ Ptr Void -> VkDeviceSize -> VkQueryResultFlags -> IO VkResult -- ** vkDestroyQueryPool-foreign import ccall "vkDestroyQueryPool" vkDestroyQueryPool :: +foreign import ccall "vkDestroyQueryPool" vkDestroyQueryPool :: VkDevice -> VkQueryPool -> Ptr VkAllocationCallbacks -> IO () @@ -165,7 +165,7 @@ deriving (Eq, Storable) -- ** vkCreateQueryPool-foreign import ccall "vkCreateQueryPool" vkCreateQueryPool :: +foreign import ccall "vkCreateQueryPool" vkCreateQueryPool :: VkDevice -> Ptr VkQueryPoolCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkQueryPool -> IO VkResult
src/Graphics/Vulkan/Queue.hs view
@@ -32,19 +32,19 @@ type VkQueue = Ptr VkQueue_T -- ** vkDeviceWaitIdle-foreign import ccall "vkDeviceWaitIdle" vkDeviceWaitIdle :: +foreign import ccall "vkDeviceWaitIdle" vkDeviceWaitIdle :: VkDevice -> IO VkResult -- ** vkQueueSubmit-foreign import ccall "vkQueueSubmit" vkQueueSubmit :: +foreign import ccall "vkQueueSubmit" vkQueueSubmit :: VkQueue -> Word32 -> Ptr VkSubmitInfo -> VkFence -> IO VkResult -- ** vkQueueWaitIdle-foreign import ccall "vkQueueWaitIdle" vkQueueWaitIdle :: +foreign import ccall "vkQueueWaitIdle" vkQueueWaitIdle :: VkQueue -> IO VkResult -- ** vkGetDeviceQueue-foreign import ccall "vkGetDeviceQueue" vkGetDeviceQueue :: +foreign import ccall "vkGetDeviceQueue" vkGetDeviceQueue :: VkDevice -> Word32 -> Word32 -> Ptr VkQueue -> IO ()
src/Graphics/Vulkan/QueueSemaphore.hs view
@@ -37,7 +37,7 @@ deriving (Eq, Storable) -- ** vkDestroySemaphore-foreign import ccall "vkDestroySemaphore" vkDestroySemaphore :: +foreign import ccall "vkDestroySemaphore" vkDestroySemaphore :: VkDevice -> VkSemaphore -> Ptr VkAllocationCallbacks -> IO () newtype VkSemaphore = VkSemaphore Word64@@ -63,7 +63,7 @@ -- ** vkCreateSemaphore-foreign import ccall "vkCreateSemaphore" vkCreateSemaphore :: +foreign import ccall "vkCreateSemaphore" vkCreateSemaphore :: VkDevice -> Ptr VkSemaphoreCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkSemaphore -> IO VkResult
src/Graphics/Vulkan/Sampler.hs view
@@ -307,7 +307,7 @@ pattern VK_SAMPLER_MIPMAP_MODE_LINEAR = VkSamplerMipmapMode 1 -- ** vkCreateSampler-foreign import ccall "vkCreateSampler" vkCreateSampler :: +foreign import ccall "vkCreateSampler" vkCreateSampler :: VkDevice -> Ptr VkSamplerCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkSampler -> IO VkResult@@ -364,6 +364,6 @@ -- ** vkDestroySampler-foreign import ccall "vkDestroySampler" vkDestroySampler :: +foreign import ccall "vkDestroySampler" vkDestroySampler :: VkDevice -> VkSampler -> Ptr VkAllocationCallbacks -> IO ()
src/Graphics/Vulkan/Shader.hs view
@@ -74,7 +74,7 @@ -- ** vkDestroyShaderModule-foreign import ccall "vkDestroyShaderModule" vkDestroyShaderModule :: +foreign import ccall "vkDestroyShaderModule" vkDestroyShaderModule :: VkDevice -> VkShaderModule -> Ptr VkAllocationCallbacks -> IO () -- ** VkShaderModuleCreateFlags@@ -139,7 +139,7 @@ deriving (Eq, Storable) -- ** vkCreateShaderModule-foreign import ccall "vkCreateShaderModule" vkCreateShaderModule :: +foreign import ccall "vkCreateShaderModule" vkCreateShaderModule :: VkDevice -> Ptr VkShaderModuleCreateInfo -> Ptr VkAllocationCallbacks -> Ptr VkShaderModule -> IO VkResult
src/Graphics/Vulkan/SparseResourceMemoryManagement.hs view
@@ -162,13 +162,13 @@ -- ** vkGetImageSparseMemoryRequirements-foreign import ccall "vkGetImageSparseMemoryRequirements" vkGetImageSparseMemoryRequirements :: +foreign import ccall "vkGetImageSparseMemoryRequirements" vkGetImageSparseMemoryRequirements :: VkDevice -> VkImage -> Ptr Word32 -> Ptr VkSparseImageMemoryRequirements -> IO () -- ** vkQueueBindSparse-foreign import ccall "vkQueueBindSparse" vkQueueBindSparse :: +foreign import ccall "vkQueueBindSparse" vkQueueBindSparse :: VkQueue -> Word32 -> Ptr VkBindSparseInfo -> VkFence -> IO VkResult @@ -272,7 +272,7 @@ -- ** vkGetPhysicalDeviceSparseImageFormatProperties-foreign import ccall "vkGetPhysicalDeviceSparseImageFormatProperties" vkGetPhysicalDeviceSparseImageFormatProperties :: +foreign import ccall "vkGetPhysicalDeviceSparseImageFormatProperties" vkGetPhysicalDeviceSparseImageFormatProperties :: VkPhysicalDevice -> VkFormat -> VkImageType ->
vulkan.cabal view
@@ -1,5 +1,5 @@ name: vulkan-version: 1.5.1.0+version: 1.6.0.0 synopsis: Bindings to the Vulkan graphics API. description: Please see readme.md homepage: http://github.com/expipiplus1/vulkan#readme@@ -27,12 +27,16 @@ , Graphics.Vulkan.DescriptorSet , Graphics.Vulkan.Device , Graphics.Vulkan.DeviceInitialization+ , Graphics.Vulkan.EXT.DebugReport , Graphics.Vulkan.Event , Graphics.Vulkan.ExtensionDiscovery , Graphics.Vulkan.Fence , Graphics.Vulkan.Image , Graphics.Vulkan.ImageView+ , Graphics.Vulkan.KHR.Display+ , Graphics.Vulkan.KHR.DisplaySwapchain , Graphics.Vulkan.KHR.Surface+ , Graphics.Vulkan.KHR.Swapchain , Graphics.Vulkan.LayerDiscovery , Graphics.Vulkan.Memory , Graphics.Vulkan.MemoryManagement@@ -49,7 +53,7 @@ , Graphics.Vulkan.SparseResourceMemoryManagement , Graphics.Vulkan.Version build-depends: base >= 4.9 && < 5- , vector-sized >= 0.1 && < 0.3+ , vector-sized >= 0.1 && < 0.4 default-language: Haskell2010 source-repository head