From 40d8d86fe52d09af17f7b28e5eec7b649c9f6ec0 Mon Sep 17 00:00:00 2001 From: Alexander Bondarenko Date: Tue, 30 Mar 2021 13:39:03 +0300 Subject: [PATCH 01/11] Add capital-F handling in float constants Fixes #272 --- generate-new/src/Spec/APIConstant.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-new/src/Spec/APIConstant.hs b/generate-new/src/Spec/APIConstant.hs index 6af742f31..715de9bab 100644 --- a/generate-new/src/Spec/APIConstant.hs +++ b/generate-new/src/Spec/APIConstant.hs @@ -69,7 +69,7 @@ int64 :: HasErr r => RE Char (Sem r Int64) int64 = readSpec <$> digits <* "LL" float :: HasErr r => RE Char (Sem r Float) -float = readSpec <$> (fmap concat . sequenceA $ [digits, ".", digits]) <* "f" +float = readSpec <$> (fmap concat . sequenceA $ [digits, ".", digits]) <* ("F" <|> "f") digits :: RE Char String digits = many (psym isDigit) <|> ((<>) <$> "0x" <*> many (psym isHexDigit)) From 62785315a028ca40bc56fb705361eaf5cea19cfe Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 15:20:56 +0800 Subject: [PATCH 02/11] Small tweaks to make compatible with 174 --- generate-new/Vulkan-Docs | 2 +- generate-new/src/Bespoke.hs | 8 ++++++-- generate-new/src/Bespoke/MarshalParams.hs | 4 ++++ generate-new/src/Data/Text/Extra.hs | 2 +- generate-new/src/Spec/Parse.hs | 1 + 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/generate-new/Vulkan-Docs b/generate-new/Vulkan-Docs index 815e07c85..3fefdc503 160000 --- a/generate-new/Vulkan-Docs +++ b/generate-new/Vulkan-Docs @@ -1 +1 @@ -Subproject commit 815e07c850d642d996292f5cdec25d41ecdff0d0 +Subproject commit 3fefdc503242ce529330c51a869ed99a069a3010 diff --git a/generate-new/src/Bespoke.hs b/generate-new/src/Bespoke.hs index 0f606469d..2632bb883 100644 --- a/generate-new/src/Bespoke.hs +++ b/generate-new/src/Bespoke.hs @@ -902,8 +902,9 @@ boolConversion = genRe "Bool conversion" $ do wsiTypes :: (HasErr r, HasRenderParams r) => SpecFlavor -> [Sem r RenderElement] wsiTypes = \case - SpecVk -> (snd <$> concat [win32, x11Shared, x11, xcb2, zircon, ggp]) - <> concat [win32', xcb1, waylandShared, wayland, metal, android, directfb] + SpecVk -> + (snd <$> concat [win32, x11Shared, x11, xcb2, zircon, ggp]) <> concat + [win32', xcb1, waylandShared, wayland, metal, android, directfb, screen] SpecXr -> (snd <$> concat [win32Xr, x11Shared, xcb2Xr, egl, gl, d3d]) <> concat [win32Xr', xcb1, waylandShared, d3d', jni, timespec] @@ -1055,6 +1056,9 @@ android = [voidData "AHardwareBuffer", voidData "ANativeWindow"] directfb :: HasRenderParams r => [Sem r RenderElement] directfb = [voidData "IDirectFB", voidData "IDirectFBSurface"] +screen :: HasRenderParams r => [Sem r RenderElement] +screen = [voidData "_screen_window", voidData "screen_context"] + ---------------------------------------------------------------- -- OpenXR platform stuff ---------------------------------------------------------------- diff --git a/generate-new/src/Bespoke/MarshalParams.hs b/generate-new/src/Bespoke/MarshalParams.hs index cf1e0eeab..c4aba384b 100644 --- a/generate-new/src/Bespoke/MarshalParams.hs +++ b/generate-new/src/Bespoke/MarshalParams.hs @@ -114,6 +114,7 @@ isIntegral = isFloating :: CType -> Bool isFloating = (`elem` [Float, Double]) +-- | Foreign handles isDefaultableForeignType :: CType -> Bool isDefaultableForeignType t = ( t @@ -121,6 +122,7 @@ isDefaultableForeignType t = , TypeName "DWORD" , TypeName "LPCWSTR" , Ptr CType.Const (TypeName "SECURITY_ATTRIBUTES") + , TypeName "zx_handle_t" ] ) || case t of @@ -149,6 +151,8 @@ isPassAsPointerType' = \case , "IDirectFBSurface" , "IUnknown" , "jobject" + , "_screen_window" + , "_screen_context" -- TODO: remove these , "VkInstanceCreateInfo" , "VkAllocationCallbacks" diff --git a/generate-new/src/Data/Text/Extra.hs b/generate-new/src/Data/Text/Extra.hs index 0f58e5db6..c4b99e995 100644 --- a/generate-new/src/Data/Text/Extra.hs +++ b/generate-new/src/Data/Text/Extra.hs @@ -31,7 +31,7 @@ lowerCaseFirst :: Text -> Text lowerCaseFirst = onFirst Data.Char.toLower upperCaseFirst :: Text -> Text -upperCaseFirst = onFirst Data.Char.toUpper +upperCaseFirst = onFirst Data.Char.toUpper . T.dropWhile (not . isAlpha) onFirst :: (Char -> Char) -> Text -> Text onFirst f = \case diff --git a/generate-new/src/Spec/Parse.hs b/generate-new/src/Spec/Parse.hs index d377903af..9b41c4889 100644 --- a/generate-new/src/Spec/Parse.hs +++ b/generate-new/src/Spec/Parse.hs @@ -1029,6 +1029,7 @@ isForbidden n = , "VK_DEFINE_HANDLE" , "VK_DEFINE_NON_DISPATCHABLE_HANDLE" , "VK_MAKE_VERSION" + , "VK_USE_64_BIT_PTR_DEFINES" ] xrForbidden = [ "openxr_platform_defines" From d6d7c286f08a6b9976d20afe31fa4d0459c63ba7 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 15:23:09 +0800 Subject: [PATCH 03/11] regenerate --- src/Vulkan/CStruct/Extends.hs | 9 + src/Vulkan/Core10/AllocationCallbacks.hs | 1 + src/Vulkan/Core10/CommandBufferBuilding.hs | 153 ++++- src/Vulkan/Core10/Device.hs | 6 + src/Vulkan/Core10/Enums/AccessFlagBits.hs | 3 +- src/Vulkan/Core10/Enums/StructureType.hs | 36 ++ src/Vulkan/Core10/FundamentalTypes.hs | 10 +- src/Vulkan/Core10/Handles.hs | 9 + src/Vulkan/Core10/Image.hs | 17 + src/Vulkan/Core10/ImageView.hs | 25 +- src/Vulkan/Core10/Memory.hs | 38 +- src/Vulkan/Core10/OtherTypes.hs | 2 +- src/Vulkan/Core10/Pipeline.hs | 8 +- .../Enums/ExternalMemoryHandleTypeFlagBits.hs | 12 +- .../ExternalSemaphoreHandleTypeFlagBits.hs | 60 +- .../Promoted_From_VK_KHR_16bit_storage.hs | 12 +- ...omoted_From_VK_KHR_dedicated_allocation.hs | 18 + .../Promoted_From_VK_KHR_device_group.hs | 12 +- src/Vulkan/Core12.hs | 24 +- src/Vulkan/Core12/Enums/SemaphoreType.hs | 6 +- .../Promoted_From_VK_KHR_8bit_storage.hs | 11 +- ...Promoted_From_VK_KHR_create_renderpass2.hs | 37 ++ ...romoted_From_VK_KHR_draw_indirect_count.hs | 38 +- src/Vulkan/Dynamic.hs | 30 +- src/Vulkan/Extensions.hs | 6 + src/Vulkan/Extensions/Dependencies.hs | 23 +- src/Vulkan/Extensions/Handles.hs | 3 +- .../VK_EXT_calibrated_timestamps.hs | 19 + .../VK_EXT_calibrated_timestamps.hs-boot | 10 + src/Vulkan/Extensions/VK_EXT_debug_utils.hs | 11 +- .../Extensions/VK_EXT_debug_utils.hs-boot | 4 +- .../VK_EXT_shader_image_atomic_int64.hs | 2 +- .../VK_EXT_shader_image_atomic_int64.hs-boot | 2 +- .../Extensions/VK_EXT_transform_feedback.hs | 31 +- .../Extensions/VK_FUCHSIA_external_memory.hs | 511 ++++++++++++++++ .../VK_FUCHSIA_external_memory.hs-boot | 149 +++++ .../VK_FUCHSIA_external_semaphore.hs | 578 ++++++++++++++++++ .../VK_FUCHSIA_external_semaphore.hs-boot | 138 +++++ .../VK_FUCHSIA_imagepipe_surface.hs-boot | 8 +- .../VK_KHR_acceleration_structure.hs | 5 +- .../VK_KHR_pipeline_executable_properties.hs | 6 - .../Extensions/VK_KHR_ray_tracing_pipeline.hs | 24 +- .../Extensions/VK_KHR_synchronization2.hs | 22 +- .../VK_KHR_synchronization2.hs-boot | 2 - .../Extensions/VK_KHR_timeline_semaphore.hs | 6 +- .../VK_NV_device_generated_commands.hs | 19 +- src/Vulkan/Extensions/VK_NV_mesh_shader.hs | 57 +- src/Vulkan/Extensions/VK_NV_ray_tracing.hs | 12 +- .../Extensions/VK_QNX_screen_surface.hs | 423 +++++++++++++ .../Extensions/VK_QNX_screen_surface.hs-boot | 111 ++++ src/Vulkan/SPIRVRequirements.hs | 138 ++--- src/Vulkan/Version.hs | 4 +- 52 files changed, 2619 insertions(+), 282 deletions(-) create mode 100644 src/Vulkan/Extensions/VK_FUCHSIA_external_memory.hs create mode 100644 src/Vulkan/Extensions/VK_FUCHSIA_external_memory.hs-boot create mode 100644 src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs create mode 100644 src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs-boot create mode 100644 src/Vulkan/Extensions/VK_QNX_screen_surface.hs create mode 100644 src/Vulkan/Extensions/VK_QNX_screen_surface.hs-boot diff --git a/src/Vulkan/CStruct/Extends.hs b/src/Vulkan/CStruct/Extends.hs index feb5cdc10..1f8cadca3 100644 --- a/src/Vulkan/CStruct/Extends.hs +++ b/src/Vulkan/CStruct/Extends.hs @@ -283,8 +283,10 @@ import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_fd (ImportMemoryF import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_external_memory_host (ImportMemoryHostPointerInfoEXT) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_win32 (ImportMemoryWin32HandleInfoKHR) import {-# SOURCE #-} Vulkan.Extensions.VK_NV_external_memory_win32 (ImportMemoryWin32HandleInfoNV) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_memory (ImportMemoryZirconHandleInfoFUCHSIA) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_semaphore_fd (ImportSemaphoreFdInfoKHR) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_semaphore_win32 (ImportSemaphoreWin32HandleInfoKHR) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_semaphore (ImportSemaphoreZirconHandleInfoFUCHSIA) import {-# SOURCE #-} Vulkan.Extensions.VK_NV_device_generated_commands (IndirectCommandsLayoutCreateInfoNV) import {-# SOURCE #-} Vulkan.Extensions.VK_NV_device_generated_commands (IndirectCommandsLayoutTokenNV) import {-# SOURCE #-} Vulkan.Extensions.VK_NV_device_generated_commands (IndirectCommandsStreamNV) @@ -304,6 +306,7 @@ import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_fd (MemoryFdPrope import {-# SOURCE #-} Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer (MemoryGetAndroidHardwareBufferInfoANDROID) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_fd (MemoryGetFdInfoKHR) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_win32 (MemoryGetWin32HandleInfoKHR) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_memory (MemoryGetZirconHandleInfoFUCHSIA) import {-# SOURCE #-} Vulkan.Core10.DeviceInitialization (MemoryHeap) import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_external_memory_host (MemoryHostPointerPropertiesEXT) import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address (MemoryOpaqueCaptureAddressAllocateInfo) @@ -312,6 +315,7 @@ import {-# SOURCE #-} Vulkan.Core10.MemoryManagement (MemoryRequirements) import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2 (MemoryRequirements2) import {-# SOURCE #-} Vulkan.Core10.DeviceInitialization (MemoryType) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_win32 (MemoryWin32HandlePropertiesKHR) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_memory (MemoryZirconHandlePropertiesFUCHSIA) import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_metal_surface (MetalSurfaceCreateInfoEXT) import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_sample_locations (MultisamplePropertiesEXT) import {-# SOURCE #-} Vulkan.Extensions.VK_VALVE_mutable_descriptor_type (MutableDescriptorTypeCreateInfoVALVE) @@ -560,9 +564,11 @@ import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_EXT_sampler_filter_minmax ( import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion (SamplerYcbcrConversionCreateInfo) import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion (SamplerYcbcrConversionImageFormatProperties) import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion (SamplerYcbcrConversionInfo) +import {-# SOURCE #-} Vulkan.Extensions.VK_QNX_screen_surface (ScreenSurfaceCreateInfoQNX) import {-# SOURCE #-} Vulkan.Core10.QueueSemaphore (SemaphoreCreateInfo) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_semaphore_fd (SemaphoreGetFdInfoKHR) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_semaphore_win32 (SemaphoreGetWin32HandleInfoKHR) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_semaphore (SemaphoreGetZirconHandleInfoFUCHSIA) import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore (SemaphoreSignalInfo) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_synchronization2 (SemaphoreSubmitInfoKHR) import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore (SemaphoreTypeCreateInfo) @@ -902,6 +908,7 @@ type family Extends (a :: [Type] -> Type) (b :: Type) :: Constraint where Extends MemoryAllocateInfo ExportMemoryAllocateInfo = () Extends MemoryAllocateInfo ImportMemoryWin32HandleInfoKHR = () Extends MemoryAllocateInfo ExportMemoryWin32HandleInfoKHR = () + Extends MemoryAllocateInfo ImportMemoryZirconHandleInfoFUCHSIA = () Extends MemoryAllocateInfo ImportMemoryFdInfoKHR = () Extends MemoryAllocateInfo MemoryAllocateFlagsInfo = () Extends MemoryAllocateInfo MemoryDedicatedAllocateInfo = () @@ -1249,6 +1256,7 @@ peekChainHead ty p c = case ty of STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO -> go @ExportMemoryAllocateInfo STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR -> go @ImportMemoryWin32HandleInfoKHR STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR -> go @ExportMemoryWin32HandleInfoKHR + STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA -> go @ImportMemoryZirconHandleInfoFUCHSIA STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR -> go @ImportMemoryFdInfoKHR STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR -> go @Win32KeyedMutexAcquireReleaseInfoKHR STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO -> go @ExportSemaphoreCreateInfo @@ -1571,6 +1579,7 @@ infix 6 ::& {-# complete (::&) :: ExportMemoryAllocateInfo #-} {-# complete (::&) :: ImportMemoryWin32HandleInfoKHR #-} {-# complete (::&) :: ExportMemoryWin32HandleInfoKHR #-} +{-# complete (::&) :: ImportMemoryZirconHandleInfoFUCHSIA #-} {-# complete (::&) :: ImportMemoryFdInfoKHR #-} {-# complete (::&) :: Win32KeyedMutexAcquireReleaseInfoKHR #-} {-# complete (::&) :: ExportSemaphoreCreateInfo #-} diff --git a/src/Vulkan/Core10/AllocationCallbacks.hs b/src/Vulkan/Core10/AllocationCallbacks.hs index 9ebfe0b43..f5f7da606 100644 --- a/src/Vulkan/Core10/AllocationCallbacks.hs +++ b/src/Vulkan/Core10/AllocationCallbacks.hs @@ -93,6 +93,7 @@ import Vulkan.Core10.FuncPointers (PFN_vkReallocationFunction) -- 'Vulkan.Core10.Sampler.createSampler', -- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.createSamplerYcbcrConversion', -- 'Vulkan.Extensions.VK_KHR_sampler_ycbcr_conversion.createSamplerYcbcrConversionKHR', +-- 'Vulkan.Extensions.VK_QNX_screen_surface.createScreenSurfaceQNX', -- 'Vulkan.Core10.QueueSemaphore.createSemaphore', -- 'Vulkan.Core10.Shader.createShaderModule', -- 'Vulkan.Extensions.VK_KHR_display_swapchain.createSharedSwapchainsKHR', diff --git a/src/Vulkan/Core10/CommandBufferBuilding.hs b/src/Vulkan/Core10/CommandBufferBuilding.hs index c0081a04e..684e79f15 100644 --- a/src/Vulkan/Core10/CommandBufferBuilding.hs +++ b/src/Vulkan/Core10/CommandBufferBuilding.hs @@ -689,12 +689,12 @@ foreign import ccall -- bias is applied and the fragment’s depth values are unchanged. -- -- @depthBiasSlopeFactor@ scales the maximum depth slope of the polygon, --- and @depthBiasConstantFactor@ scales an implementation-dependent --- constant that relates to the usable resolution of the depth buffer. The --- resulting values are summed to produce the depth bias value which is --- then clamped to a minimum or maximum value specified by --- @depthBiasClamp@. @depthBiasSlopeFactor@, @depthBiasConstantFactor@, and --- @depthBiasClamp@ /can/ each be positive, negative, or zero. +-- and @depthBiasConstantFactor@ scales the minimum resolvable difference +-- of the depth buffer. The resulting values are summed to produce the +-- depth bias value which is then clamped to a minimum or maximum value +-- specified by @depthBiasClamp@. @depthBiasSlopeFactor@, +-- @depthBiasConstantFactor@, and @depthBiasClamp@ /can/ each be positive, +-- negative, or zero. -- -- The maximum depth slope m of a triangle is -- @@ -708,20 +708,25 @@ foreign import ccall -- \left| { {\partial z_f} \over {\partial y_f} } \right| -- \right).\] -- --- The minimum resolvable difference r is an implementation-dependent --- parameter that depends on the depth buffer representation. It is the --- smallest difference in framebuffer coordinate z values that is --- guaranteed to remain distinct throughout polygon rasterization and in --- the depth buffer. All pairs of fragments generated by the rasterization --- of two polygons with otherwise identical vertices, but @z@f values that --- differ by r, will have distinct depth values. +-- The minimum resolvable difference r is a parameter that depends on the +-- depth buffer representation. It is the smallest difference in +-- framebuffer coordinate z values that is guaranteed to remain distinct +-- throughout polygon rasterization and in the depth buffer. All pairs of +-- fragments generated by the rasterization of two polygons with otherwise +-- identical vertices, but @z@f values that differ by r, will have distinct +-- depth values. -- -- For fixed-point depth buffer representations, r is constant throughout --- the range of the entire depth buffer. For floating-point depth buffers, --- there is no single minimum resolvable difference. In this case, the --- minimum resolvable difference for a given polygon is dependent on the --- maximum exponent, e, in the range of z values spanned by the primitive. --- If n is the number of bits in the floating-point mantissa, the minimum +-- the range of the entire depth buffer. Its value is implementation +-- dependent but /must/ be at most +-- +-- - r = 2 × 2-n +-- +-- for an n-bit buffer. For floating-point depth buffers, there is no +-- single minimum resolvable difference. In this case, the minimum +-- resolvable difference for a given polygon is dependent on the maximum +-- exponent, e, in the range of z values spanned by the primitive. If n is +-- the number of bits in the floating-point mantissa, the minimum -- resolvable difference, r, for the given primitive is defined as -- -- - r = 2e-n @@ -1714,6 +1719,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDraw-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDraw-None-02691# If a 'Vulkan.Core10.Handles.ImageView' -- is accessed using atomic operations as a result of this command, -- then the image view’s @@ -1860,7 +1875,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDraw-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -2101,6 +2116,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDraw-rasterizationSamples-04740# If rasterization is not +-- disabled in the bound graphics pipeline, and neither the @@ nor the +-- @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDraw-commandBuffer-02712# If @commandBuffer@ is a -- protected command buffer, any resource written to by the -- 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline bind @@ -2241,6 +2263,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDrawIndexed-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDrawIndexed-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -2390,7 +2422,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDrawIndexed-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -2634,6 +2666,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDrawIndexed-rasterizationSamples-04740# If rasterization +-- is not disabled in the bound graphics pipeline, and neither the @@ +-- nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDrawIndexed-commandBuffer-02712# If @commandBuffer@ is a -- protected command buffer, any resource written to by the -- 'Vulkan.Core10.Handles.Pipeline' object bound to the pipeline bind @@ -2768,6 +2807,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDrawIndirect-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDrawIndirect-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -2917,7 +2966,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDrawIndirect-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -3161,6 +3210,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDrawIndirect-rasterizationSamples-04740# If rasterization +-- is not disabled in the bound graphics pipeline, and neither the @@ +-- nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDrawIndirect-None-04007# All vertex input bindings -- accessed via vertex input variables declared in the vertex shader -- entry point’s interface /must/ have either valid or @@ -3321,6 +3377,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDrawIndexedIndirect-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDrawIndexedIndirect-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -3472,7 +3538,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDrawIndexedIndirect-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -3716,6 +3782,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDrawIndexedIndirect-rasterizationSamples-04740# If +-- rasterization is not disabled in the bound graphics pipeline, and +-- neither the @@ nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDrawIndexedIndirect-None-04007# All vertex input bindings -- accessed via vertex input variables declared in the vertex shader -- entry point’s interface /must/ have either valid or @@ -3872,6 +3945,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDispatch-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDispatch-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -4020,7 +4103,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDispatch-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -4189,6 +4272,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDispatchIndirect-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDispatchIndirect-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -4338,7 +4431,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDispatchIndirect-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -8652,12 +8745,6 @@ foreign import ccall -- -- == Valid Usage -- --- - #VUID-vkCmdBeginQuery-queryPool-01922# @queryPool@ /must/ have been --- created with a @queryType@ that differs from that of any queries --- that are --- --- within @commandBuffer@ --- -- - #VUID-vkCmdBeginQuery-None-00807# All queries used by the command -- /must/ be unavailable -- @@ -8714,6 +8801,12 @@ foreign import ccall -- current subpass’s view mask /must/ be less than or equal to the -- number of queries in @queryPool@ -- +-- - #VUID-vkCmdBeginQuery-queryPool-01922# @queryPool@ /must/ have been +-- created with a @queryType@ that differs from that of any queries +-- that are +-- +-- within @commandBuffer@ +-- -- - #VUID-vkCmdBeginQuery-queryType-02327# If the @queryType@ used to -- create @queryPool@ was -- 'Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT' diff --git a/src/Vulkan/Core10/Device.hs b/src/Vulkan/Core10/Device.hs index eb8975ae9..00e828996 100644 --- a/src/Vulkan/Core10/Device.hs +++ b/src/Vulkan/Core10/Device.hs @@ -549,6 +549,12 @@ instance es ~ '[] => Zero (DeviceQueueCreateInfo es) where -- @ppEnabledExtensionNames@ /must/ not contain both -- @VK_KHR_buffer_device_address@ and @VK_EXT_buffer_device_address@ -- +-- - #VUID-VkDeviceCreateInfo-pNext-04748# if the @pNext@ chain includes +-- a 'Vulkan.Core12.PhysicalDeviceVulkan12Features' structure and +-- 'Vulkan.Core12.PhysicalDeviceVulkan12Features'::@bufferDeviceAddress@ +-- is VK_TRUE, @ppEnabledExtensionNames@ /must/ not contain +-- @VK_EXT_buffer_device_address@ +-- -- - #VUID-VkDeviceCreateInfo-pNext-02829# If the @pNext@ chain includes -- a 'Vulkan.Core12.PhysicalDeviceVulkan11Features' structure, then it -- /must/ not include a diff --git a/src/Vulkan/Core10/Enums/AccessFlagBits.hs b/src/Vulkan/Core10/Enums/AccessFlagBits.hs index b0206e8eb..0e2be5124 100644 --- a/src/Vulkan/Core10/Enums/AccessFlagBits.hs +++ b/src/Vulkan/Core10/Enums/AccessFlagBits.hs @@ -147,7 +147,8 @@ type AccessFlags = AccessFlagBits -- +-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ -- | 'ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT' | 'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT' | -- +-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ --- | 'ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT' | 'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_DRAW_INDIRECT_BIT' | +-- | 'ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT' | 'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT', | +-- | | 'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_DRAW_INDIRECT_BIT' | -- +-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ -- | 'ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR' | 'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_TASK_SHADER_BIT_NV', | -- | | 'Vulkan.Core10.Enums.PipelineStageFlagBits.PIPELINE_STAGE_MESH_SHADER_BIT_NV', | diff --git a/src/Vulkan/Core10/Enums/StructureType.hs b/src/Vulkan/Core10/Enums/StructureType.hs index 068dd943f..e20531eea 100644 --- a/src/Vulkan/Core10/Enums/StructureType.hs +++ b/src/Vulkan/Core10/Enums/StructureType.hs @@ -49,6 +49,12 @@ module Vulkan.Core10.Enums.StructureType (StructureType( STRUCTURE_TYPE_APPLICA , STRUCTURE_TYPE_MEMORY_BARRIER , STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO , STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO + , STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX + , STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA + , STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA + , STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA + , STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA + , STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA , STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE , STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE , STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT @@ -706,8 +712,10 @@ import GHC.Show (Show(showsPrec)) -- 'Vulkan.Extensions.VK_EXT_external_memory_host.ImportMemoryHostPointerInfoEXT', -- 'Vulkan.Extensions.VK_KHR_external_memory_win32.ImportMemoryWin32HandleInfoKHR', -- 'Vulkan.Extensions.VK_NV_external_memory_win32.ImportMemoryWin32HandleInfoNV', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.ImportMemoryZirconHandleInfoFUCHSIA', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_fd.ImportSemaphoreFdInfoKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_win32.ImportSemaphoreWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_semaphore.ImportSemaphoreZirconHandleInfoFUCHSIA', -- 'Vulkan.Extensions.VK_NV_device_generated_commands.IndirectCommandsLayoutCreateInfoNV', -- 'Vulkan.Extensions.VK_NV_device_generated_commands.IndirectCommandsLayoutTokenNV', -- 'Vulkan.Extensions.VK_INTEL_performance_query.InitializePerformanceApiInfoINTEL', @@ -724,11 +732,13 @@ import GHC.Show (Show(showsPrec)) -- 'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.MemoryGetAndroidHardwareBufferInfoANDROID', -- 'Vulkan.Extensions.VK_KHR_external_memory_fd.MemoryGetFdInfoKHR', -- 'Vulkan.Extensions.VK_KHR_external_memory_win32.MemoryGetWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.MemoryGetZirconHandleInfoFUCHSIA', -- 'Vulkan.Extensions.VK_EXT_external_memory_host.MemoryHostPointerPropertiesEXT', -- 'Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address.MemoryOpaqueCaptureAddressAllocateInfo', -- 'Vulkan.Extensions.VK_EXT_memory_priority.MemoryPriorityAllocateInfoEXT', -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2.MemoryRequirements2', -- 'Vulkan.Extensions.VK_KHR_external_memory_win32.MemoryWin32HandlePropertiesKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.MemoryZirconHandlePropertiesFUCHSIA', -- 'Vulkan.Extensions.VK_EXT_metal_surface.MetalSurfaceCreateInfoEXT', -- 'Vulkan.Extensions.VK_EXT_sample_locations.MultisamplePropertiesEXT', -- 'Vulkan.Extensions.VK_VALVE_mutable_descriptor_type.MutableDescriptorTypeCreateInfoVALVE', @@ -957,9 +967,11 @@ import GHC.Show (Show(showsPrec)) -- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionCreateInfo', -- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionImageFormatProperties', -- 'Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion.SamplerYcbcrConversionInfo', +-- 'Vulkan.Extensions.VK_QNX_screen_surface.ScreenSurfaceCreateInfoQNX', -- 'Vulkan.Core10.QueueSemaphore.SemaphoreCreateInfo', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_fd.SemaphoreGetFdInfoKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_win32.SemaphoreGetWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_semaphore.SemaphoreGetZirconHandleInfoFUCHSIA', -- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreSignalInfo', -- 'Vulkan.Extensions.VK_KHR_synchronization2.SemaphoreSubmitInfoKHR', -- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo', @@ -1104,6 +1116,18 @@ pattern STRUCTURE_TYPE_MEMORY_BARRIER = StructureType pattern STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = StructureType 47 -- No documentation found for Nested "VkStructureType" "VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO" pattern STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = StructureType 48 +-- No documentation found for Nested "VkStructureType" "VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX" +pattern STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX = StructureType 1000378000 +-- No documentation found for Nested "VkStructureType" "VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA" +pattern STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = StructureType 1000365001 +-- No documentation found for Nested "VkStructureType" "VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA" +pattern STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = StructureType 1000365000 +-- No documentation found for Nested "VkStructureType" "VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA" +pattern STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = StructureType 1000364002 +-- No documentation found for Nested "VkStructureType" "VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA" +pattern STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = StructureType 1000364001 +-- No documentation found for Nested "VkStructureType" "VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA" +pattern STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = StructureType 1000364000 -- No documentation found for Nested "VkStructureType" "VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE" pattern STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = StructureType 1000351002 -- No documentation found for Nested "VkStructureType" "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE" @@ -2025,6 +2049,12 @@ pattern STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = StructureType STRUCTURE_TYPE_MEMORY_BARRIER, STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO, STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO, + STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX, + STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA, + STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA, + STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA, + STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA, + STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA, STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE, STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE, STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT, @@ -2519,6 +2549,12 @@ showTableStructureType = , (STRUCTURE_TYPE_MEMORY_BARRIER , "MEMORY_BARRIER") , (STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO , "LOADER_INSTANCE_CREATE_INFO") , (STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO , "LOADER_DEVICE_CREATE_INFO") + , (STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX , "SCREEN_SURFACE_CREATE_INFO_QNX") + , (STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA , "SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA") + , (STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA, "IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA") + , (STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA , "MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA") + , (STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA , "MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA") + , (STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA , "IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA") , (STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE, "MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE") , ( STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE , "PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE" diff --git a/src/Vulkan/Core10/FundamentalTypes.hs b/src/Vulkan/Core10/FundamentalTypes.hs index afd9a9a59..3856532cf 100644 --- a/src/Vulkan/Core10/FundamentalTypes.hs +++ b/src/Vulkan/Core10/FundamentalTypes.hs @@ -569,11 +569,11 @@ type SampleMask = Word32 -- -- Bitmasks are passed to many commands and structures to compactly -- represent options, but 'Flags' is not used directly in the API. Instead, --- a @Vk*Flags@ type which is an alias of 'Flags', and whose name matches --- the corresponding @Vk*FlagBits@ that are valid for that type, is used. +-- a 'Flags' type which is an alias of 'Flags', and whose name matches the +-- corresponding @Vk*FlagBits@ that are valid for that type, is used. -- --- Any @Vk*Flags@ member or parameter used in the API as an input /must/ be --- a valid combination of bit flags. A valid combination is either zero or +-- Any 'Flags' member or parameter used in the API as an input /must/ be a +-- valid combination of bit flags. A valid combination is either zero or -- the bitwise OR of valid bit flags. A bit flag is valid if: -- -- - The bit flag is defined as part of the @Vk*FlagBits@ type, where the @@ -587,7 +587,7 @@ type SampleMask = Word32 -- example, in some cases, certain bit flags or combinations of bit -- flags are mutually exclusive. -- --- Any @Vk*Flags@ member or parameter returned from a query command or +-- Any 'Flags' member or parameter returned from a query command or -- otherwise output from Vulkan to the application /may/ contain bit flags -- undefined in its corresponding @Vk*FlagBits@ type. An application -- /cannot/ rely on the state of these unspecified bits. diff --git a/src/Vulkan/Core10/Handles.hs b/src/Vulkan/Core10/Handles.hs index cfd46b070..ddfb703d7 100644 --- a/src/Vulkan/Core10/Handles.hs +++ b/src/Vulkan/Core10/Handles.hs @@ -87,6 +87,7 @@ data Instance_T -- 'Vulkan.Core10.DeviceInitialization.createInstance', -- 'Vulkan.Extensions.VK_MVK_macos_surface.createMacOSSurfaceMVK', -- 'Vulkan.Extensions.VK_EXT_metal_surface.createMetalSurfaceEXT', +-- 'Vulkan.Extensions.VK_QNX_screen_surface.createScreenSurfaceQNX', -- 'Vulkan.Extensions.VK_GGP_stream_descriptor_surface.createStreamDescriptorSurfaceGGP', -- 'Vulkan.Extensions.VK_NN_vi_surface.createViSurfaceNN', -- 'Vulkan.Extensions.VK_KHR_wayland_surface.createWaylandSurfaceKHR', @@ -172,6 +173,7 @@ data PhysicalDevice_T -- 'Vulkan.Core10.DeviceInitialization.getPhysicalDeviceQueueFamilyProperties', -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceQueueFamilyProperties2', -- 'Vulkan.Extensions.VK_KHR_get_physical_device_properties2.getPhysicalDeviceQueueFamilyProperties2KHR', +-- 'Vulkan.Extensions.VK_QNX_screen_surface.getPhysicalDeviceScreenPresentationSupportQNX', -- 'Vulkan.Core10.SparseResourceMemoryManagement.getPhysicalDeviceSparseImageFormatProperties', -- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceSparseImageFormatProperties2', -- 'Vulkan.Extensions.VK_KHR_get_physical_device_properties2.getPhysicalDeviceSparseImageFormatProperties2KHR', @@ -355,6 +357,8 @@ data Device_T -- 'Vulkan.Extensions.VK_KHR_external_memory_win32.getMemoryWin32HandleKHR', -- 'Vulkan.Extensions.VK_NV_external_memory_win32.getMemoryWin32HandleNV', -- 'Vulkan.Extensions.VK_KHR_external_memory_win32.getMemoryWin32HandlePropertiesKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.getMemoryZirconHandleFUCHSIA', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.getMemoryZirconHandlePropertiesFUCHSIA', -- 'Vulkan.Extensions.VK_GOOGLE_display_timing.getPastPresentationTimingGOOGLE', -- 'Vulkan.Extensions.VK_INTEL_performance_query.getPerformanceParameterINTEL', -- 'Vulkan.Core10.PipelineCache.getPipelineCacheData', @@ -373,6 +377,7 @@ data Device_T -- 'Vulkan.Extensions.VK_KHR_timeline_semaphore.getSemaphoreCounterValueKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_fd.getSemaphoreFdKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_win32.getSemaphoreWin32HandleKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_semaphore.getSemaphoreZirconHandleFUCHSIA', -- 'Vulkan.Extensions.VK_AMD_shader_info.getShaderInfoAMD', -- 'Vulkan.Extensions.VK_EXT_display_control.getSwapchainCounterEXT', -- 'Vulkan.Extensions.VK_KHR_swapchain.getSwapchainImagesKHR', @@ -382,6 +387,7 @@ data Device_T -- 'Vulkan.Extensions.VK_KHR_external_fence_win32.importFenceWin32HandleKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_fd.importSemaphoreFdKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_win32.importSemaphoreWin32HandleKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_semaphore.importSemaphoreZirconHandleFUCHSIA', -- 'Vulkan.Extensions.VK_INTEL_performance_query.initializePerformanceApiINTEL', -- 'Vulkan.Core10.Memory.invalidateMappedMemoryRanges', -- 'Vulkan.Core10.Memory.mapMemory', @@ -630,6 +636,7 @@ instance HasObjectType CommandBuffer where -- 'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.MemoryGetAndroidHardwareBufferInfoANDROID', -- 'Vulkan.Extensions.VK_KHR_external_memory_fd.MemoryGetFdInfoKHR', -- 'Vulkan.Extensions.VK_KHR_external_memory_win32.MemoryGetWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.MemoryGetZirconHandleInfoFUCHSIA', -- 'Vulkan.Core10.SparseResourceMemoryManagement.SparseImageMemoryBind', -- 'Vulkan.Core10.SparseResourceMemoryManagement.SparseMemoryBind', -- 'Vulkan.Extensions.VK_KHR_win32_keyed_mutex.Win32KeyedMutexAcquireReleaseInfoKHR', @@ -999,9 +1006,11 @@ instance Show Fence where -- 'Vulkan.Core10.SparseResourceMemoryManagement.BindSparseInfo', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_fd.ImportSemaphoreFdInfoKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_win32.ImportSemaphoreWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_semaphore.ImportSemaphoreZirconHandleInfoFUCHSIA', -- 'Vulkan.Extensions.VK_KHR_swapchain.PresentInfoKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_fd.SemaphoreGetFdInfoKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_win32.SemaphoreGetWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_semaphore.SemaphoreGetZirconHandleInfoFUCHSIA', -- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreSignalInfo', -- 'Vulkan.Extensions.VK_KHR_synchronization2.SemaphoreSubmitInfoKHR', -- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreWaitInfo', diff --git a/src/Vulkan/Core10/Image.hs b/src/Vulkan/Core10/Image.hs index c893142f0..ed11194e7 100644 --- a/src/Vulkan/Core10/Image.hs +++ b/src/Vulkan/Core10/Image.hs @@ -1302,6 +1302,23 @@ getImageSubresourceLayout device image subresource = liftIO . evalContT $ do -- 'Vulkan.Core10.Enums.SampleCountFlagBits.SAMPLE_COUNT_1_BIT', then -- @arrayLayers@ /must/ be @1@. -- +-- - #VUID-VkImageCreateInfo-pNext-04737# If a +-- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo' +-- structure was included in the @pNext@ chain and +-- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@viewFormatCount@ +-- is not zero then all of the formats in +-- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@pViewFormats@ +-- /must/ be compatible with the @format@ as described in the +-- +-- +-- - #VUID-VkImageCreateInfo-flags-04738# If @flags@ does not contain +-- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT' +-- and the @pNext@ chain include a +-- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo' +-- structure then +-- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@viewFormatCount@ +-- /must/ be @0@ or @1@ +-- -- = Valid Usage (Implicit) -- -- - #VUID-VkImageCreateInfo-sType-sType# @sType@ /must/ be diff --git a/src/Vulkan/Core10/ImageView.hs b/src/Vulkan/Core10/ImageView.hs index 7d5106d03..94bde1128 100644 --- a/src/Vulkan/Core10/ImageView.hs +++ b/src/Vulkan/Core10/ImageView.hs @@ -909,6 +909,12 @@ instance Zero ImageSubresourceRange where -- flag, the @levelCount@ and @layerCount@ members of -- @subresourceRange@ /must/ both be @1@ -- +-- - #VUID-VkImageViewCreateInfo-image-04739# If @image@ was created with +-- the +-- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT' +-- flag and @format@ is a non-compressed format, @viewType@ /must/ not +-- be 'Vulkan.Core10.Enums.ImageViewType.IMAGE_VIEW_TYPE_3D' +-- -- - #VUID-VkImageViewCreateInfo-pNext-01585# If a -- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo' -- structure was included in the @pNext@ chain of the @@ -918,25 +924,6 @@ instance Zero ImageSubresourceRange where -- is not zero then @format@ /must/ be one of the formats in -- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@pViewFormats@ -- --- - #VUID-VkImageViewCreateInfo-pNext-04082# If a --- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo' --- structure was included in the @pNext@ chain of the --- 'Vulkan.Core10.Image.ImageCreateInfo' structure used when creating --- @image@ and --- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@viewFormatCount@ --- is not zero then all of the formats in --- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@pViewFormats@ --- /must/ be compatible with the @format@ as described in the --- --- --- - #VUID-VkImageViewCreateInfo-flags-04083# If @flags@ does not contain --- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT' --- and the @pNext@ chain include a --- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo' --- structure then --- 'Vulkan.Core12.Promoted_From_VK_KHR_image_format_list.ImageFormatListCreateInfo'::@viewFormatCount@ --- /must/ be @0@ or @1@ --- -- - #VUID-VkImageViewCreateInfo-image-01586# If @image@ was created with -- the -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_MUTABLE_FORMAT_BIT' diff --git a/src/Vulkan/Core10/Memory.hs b/src/Vulkan/Core10/Memory.hs index 4527db1e6..a75a003ae 100644 --- a/src/Vulkan/Core10/Memory.hs +++ b/src/Vulkan/Core10/Memory.hs @@ -83,6 +83,7 @@ import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_fd (ImportMemoryF import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_external_memory_host (ImportMemoryHostPointerInfoEXT) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_win32 (ImportMemoryWin32HandleInfoKHR) import {-# SOURCE #-} Vulkan.Extensions.VK_NV_external_memory_win32 (ImportMemoryWin32HandleInfoNV) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_memory (ImportMemoryZirconHandleInfoFUCHSIA) import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_device_group (MemoryAllocateFlagsInfo) import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation (MemoryDedicatedAllocateInfo) import Vulkan.Core10.Enums.MemoryMapFlags (MemoryMapFlags) @@ -795,7 +796,7 @@ getDeviceMemoryCommitment device memory = liftIO . evalContT $ do -- @pNext@ chain includes one of the following structures: -- -- - 'Vulkan.Extensions.VK_KHR_external_memory_win32.ImportMemoryWin32HandleInfoKHR' --- with non-zero @handleType@ value +-- with a non-zero @handleType@ value -- -- - 'Vulkan.Extensions.VK_KHR_external_memory_fd.ImportMemoryFdInfoKHR' -- with a non-zero @handleType@ value @@ -806,6 +807,9 @@ getDeviceMemoryCommitment device memory = liftIO . evalContT $ do -- - 'Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer.ImportAndroidHardwareBufferInfoANDROID' -- with a non-@NULL@ @buffer@ value -- +-- - 'Vulkan.Extensions.VK_FUCHSIA_external_memory.ImportMemoryZirconHandleInfoFUCHSIA' +-- with a non-zero @handleType@ value +-- -- If the parameters define an import operation and the external handle -- type is -- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT', @@ -1109,6 +1113,23 @@ getDeviceMemoryCommitment device memory = liftIO . evalContT $ do -- 'Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address.MemoryOpaqueCaptureAddressAllocateInfo'::@opaqueCaptureAddress@ -- /must/ be zero -- +-- - #VUID-VkMemoryAllocateInfo-None-04749# If the parameters define an +-- import operation and the external handle type is +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA', +-- the value of @memoryTypeIndex@ /must/ be an index identifying a +-- memory type from the @memoryTypeBits@ field of the +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.MemoryZirconHandlePropertiesFUCHSIA' +-- structure populated by a call to +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.getMemoryZirconHandlePropertiesFUCHSIA'. +-- +-- - #VUID-VkMemoryAllocateInfo-allocationSize-04750# If the parameters +-- define an import operation and the external handle type is +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA', +-- the value of @allocationSize@ /must/ be greater than @0@ and /must/ +-- be less than or equal to the size of the VMO as determined by +-- @zx_vmo_get_size@(@handle@) where @handle@ is the VMO handle to the +-- imported external memory. +-- -- == Valid Usage (Implicit) -- -- - #VUID-VkMemoryAllocateInfo-sType-sType# @sType@ /must/ be @@ -1127,6 +1148,7 @@ getDeviceMemoryCommitment device memory = liftIO . evalContT $ do -- 'Vulkan.Extensions.VK_EXT_external_memory_host.ImportMemoryHostPointerInfoEXT', -- 'Vulkan.Extensions.VK_KHR_external_memory_win32.ImportMemoryWin32HandleInfoKHR', -- 'Vulkan.Extensions.VK_NV_external_memory_win32.ImportMemoryWin32HandleInfoNV', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.ImportMemoryZirconHandleInfoFUCHSIA', -- 'Vulkan.Core11.Promoted_From_VK_KHR_device_group.MemoryAllocateFlagsInfo', -- 'Vulkan.Core11.Promoted_From_VK_KHR_dedicated_allocation.MemoryDedicatedAllocateInfo', -- 'Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address.MemoryOpaqueCaptureAddressAllocateInfo', @@ -1170,6 +1192,7 @@ instance Extensible MemoryAllocateInfo where | Just Refl <- eqT @e @MemoryDedicatedAllocateInfo = Just f | Just Refl <- eqT @e @MemoryAllocateFlagsInfo = Just f | Just Refl <- eqT @e @ImportMemoryFdInfoKHR = Just f + | Just Refl <- eqT @e @ImportMemoryZirconHandleInfoFUCHSIA = Just f | Just Refl <- eqT @e @ExportMemoryWin32HandleInfoKHR = Just f | Just Refl <- eqT @e @ImportMemoryWin32HandleInfoKHR = Just f | Just Refl <- eqT @e @ExportMemoryAllocateInfo = Just f @@ -1230,16 +1253,17 @@ instance es ~ '[] => Zero (MemoryAllocateInfo es) where -- 'Vulkan.Core10.APIConstants.WHOLE_SIZE', @offset@ /must/ be within -- the currently mapped range of @memory@ -- --- - #VUID-VkMappedMemoryRange-size-01389# If @size@ is equal to --- 'Vulkan.Core10.APIConstants.WHOLE_SIZE', the end of the current --- mapping of @memory@ /must/ be a multiple of --- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@nonCoherentAtomSize@ --- bytes from the beginning of the memory object --- -- - #VUID-VkMappedMemoryRange-offset-00687# @offset@ /must/ be a -- multiple of -- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@nonCoherentAtomSize@ -- +-- - #VUID-VkMappedMemoryRange-size-01389# If @size@ is equal to +-- 'Vulkan.Core10.APIConstants.WHOLE_SIZE', the end of the current +-- mapping of @memory@ /must/ either be a multiple of +-- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@nonCoherentAtomSize@ +-- bytes from the beginning of the memory object, or be equal to the +-- end of the memory object +-- -- - #VUID-VkMappedMemoryRange-size-01390# If @size@ is not equal to -- 'Vulkan.Core10.APIConstants.WHOLE_SIZE', @size@ /must/ either be a -- multiple of diff --git a/src/Vulkan/Core10/OtherTypes.hs b/src/Vulkan/Core10/OtherTypes.hs index 187060272..1ceed9625 100644 --- a/src/Vulkan/Core10/OtherTypes.hs +++ b/src/Vulkan/Core10/OtherTypes.hs @@ -583,7 +583,7 @@ instance Zero BufferMemoryBarrier where -- @image@ /must/ have been created with -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT' -- or --- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL' +-- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' -- -- - #VUID-VkImageMemoryBarrier-srcQueueFamilyIndex-03939# If -- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ define a diff --git a/src/Vulkan/Core10/Pipeline.hs b/src/Vulkan/Core10/Pipeline.hs index 666d1d5cf..1d6aae56d 100644 --- a/src/Vulkan/Core10/Pipeline.hs +++ b/src/Vulkan/Core10/Pipeline.hs @@ -602,6 +602,11 @@ destroyPipeline device pipeline allocator = liftIO . evalContT $ do -- -- = Description -- +-- Note +-- +-- Despite their names, @minDepth@ /can/ be less than, equal to, or greater +-- than @maxDepth@. +-- -- The framebuffer depth coordinate @z@f /may/ be represented using either -- a fixed-point or floating-point representation. However, a -- floating-point representation /must/ be used if the depth\/stencil @@ -699,8 +704,7 @@ data Viewport = Viewport width :: Float , -- No documentation found for Nested "VkViewport" "height" height :: Float - , -- | @minDepth@ and @maxDepth@ are the depth range for the viewport. It is - -- valid for @minDepth@ to be greater than or equal to @maxDepth@. + , -- | @minDepth@ and @maxDepth@ are the depth range for the viewport. minDepth :: Float , -- No documentation found for Nested "VkViewport" "maxDepth" maxDepth :: Float diff --git a/src/Vulkan/Core11/Enums/ExternalMemoryHandleTypeFlagBits.hs b/src/Vulkan/Core11/Enums/ExternalMemoryHandleTypeFlagBits.hs index 919b970f4..8181ba175 100644 --- a/src/Vulkan/Core11/Enums/ExternalMemoryHandleTypeFlagBits.hs +++ b/src/Vulkan/Core11/Enums/ExternalMemoryHandleTypeFlagBits.hs @@ -8,6 +8,7 @@ module Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits ( ExternalMemoryHan , EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT , EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT , EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT + , EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA , EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT , EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT , EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID @@ -63,6 +64,8 @@ type ExternalMemoryHandleTypeFlags = ExternalMemoryHandleTypeFlagBits -- +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -- | 'EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID' | No restriction | No restriction | -- +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +-- | 'EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA' | No restriction | No restriction | +-- +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -- -- External memory handle types compatibility -- @@ -93,13 +96,16 @@ type ExternalMemoryHandleTypeFlags = ExternalMemoryHandleTypeFlagBits -- 'Vulkan.Extensions.VK_KHR_external_memory_fd.ImportMemoryFdInfoKHR', -- 'Vulkan.Extensions.VK_EXT_external_memory_host.ImportMemoryHostPointerInfoEXT', -- 'Vulkan.Extensions.VK_KHR_external_memory_win32.ImportMemoryWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.ImportMemoryZirconHandleInfoFUCHSIA', -- 'Vulkan.Extensions.VK_KHR_external_memory_fd.MemoryGetFdInfoKHR', -- 'Vulkan.Extensions.VK_KHR_external_memory_win32.MemoryGetWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.MemoryGetZirconHandleInfoFUCHSIA', -- 'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceExternalBufferInfo', -- 'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceExternalImageFormatInfo', -- 'Vulkan.Extensions.VK_KHR_external_memory_fd.getMemoryFdPropertiesKHR', -- 'Vulkan.Extensions.VK_EXT_external_memory_host.getMemoryHostPointerPropertiesEXT', --- 'Vulkan.Extensions.VK_KHR_external_memory_win32.getMemoryWin32HandlePropertiesKHR' +-- 'Vulkan.Extensions.VK_KHR_external_memory_win32.getMemoryWin32HandlePropertiesKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_memory.getMemoryZirconHandlePropertiesFUCHSIA' newtype ExternalMemoryHandleTypeFlagBits = ExternalMemoryHandleTypeFlagBits Flags deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) @@ -147,6 +153,9 @@ pattern EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = Extern -- 12 committed resource. It owns a reference to the memory used by the -- Direct3D resource. pattern EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = ExternalMemoryHandleTypeFlagBits 0x00000040 +-- | 'EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA' is a Zircon handle +-- to a virtual memory object. +pattern EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA = ExternalMemoryHandleTypeFlagBits 0x00000800 -- | 'EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT' -- specifies a host pointer to /host mapped foreign memory/. It does not -- own a reference to the underlying memory resource, and will therefore @@ -185,6 +194,7 @@ showTableExternalMemoryHandleTypeFlagBits = , (EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT , "D3D11_TEXTURE_KMT_BIT") , (EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT , "D3D12_HEAP_BIT") , (EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT , "D3D12_RESOURCE_BIT") + , (EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA , "ZIRCON_VMO_BIT_FUCHSIA") , (EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT , "HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT") , (EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT , "HOST_ALLOCATION_BIT_EXT") , (EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, "ANDROID_HARDWARE_BUFFER_BIT_ANDROID") diff --git a/src/Vulkan/Core11/Enums/ExternalSemaphoreHandleTypeFlagBits.hs b/src/Vulkan/Core11/Enums/ExternalSemaphoreHandleTypeFlagBits.hs index 33985a4a7..a55de33bf 100644 --- a/src/Vulkan/Core11/Enums/ExternalSemaphoreHandleTypeFlagBits.hs +++ b/src/Vulkan/Core11/Enums/ExternalSemaphoreHandleTypeFlagBits.hs @@ -7,6 +7,7 @@ module Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits ( pattern EXTERN , EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT , EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT , EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT + , EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA , .. ) ) where @@ -47,19 +48,21 @@ type ExternalSemaphoreHandleTypeFlags = ExternalSemaphoreHandleTypeFlagBits -- underlying physical device and\/or the same driver version, as defined -- in the following table: -- --- +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ --- | Handle type | 'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceIDProperties'::@driverUUID@ | 'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceIDProperties'::@deviceUUID@ | --- +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ --- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT' | Must match | Must match | --- +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ --- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT' | Must match | Must match | --- +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ --- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT' | Must match | Must match | --- +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ --- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT' | Must match | Must match | --- +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ --- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT' | No restriction | No restriction | --- +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +-- +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +-- | Handle type | 'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceIDProperties'::@driverUUID@ | 'Vulkan.Core11.Promoted_From_VK_KHR_external_memory_capabilities.PhysicalDeviceIDProperties'::@deviceUUID@ | +-- +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +-- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT' | Must match | Must match | +-- +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +-- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT' | Must match | Must match | +-- +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +-- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT' | Must match | Must match | +-- +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +-- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT' | Must match | Must match | +-- +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +-- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT' | No restriction | No restriction | +-- +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ +-- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA' | No restriction | No restriction | +-- +-----------------------------------------------------------+------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ -- -- External semaphore handle types compatibility -- @@ -68,9 +71,11 @@ type ExternalSemaphoreHandleTypeFlags = ExternalSemaphoreHandleTypeFlagBits -- 'ExternalSemaphoreHandleTypeFlags', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_fd.ImportSemaphoreFdInfoKHR', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_win32.ImportSemaphoreWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_semaphore.ImportSemaphoreZirconHandleInfoFUCHSIA', -- 'Vulkan.Core11.Promoted_From_VK_KHR_external_semaphore_capabilities.PhysicalDeviceExternalSemaphoreInfo', -- 'Vulkan.Extensions.VK_KHR_external_semaphore_fd.SemaphoreGetFdInfoKHR', --- 'Vulkan.Extensions.VK_KHR_external_semaphore_win32.SemaphoreGetWin32HandleInfoKHR' +-- 'Vulkan.Extensions.VK_KHR_external_semaphore_win32.SemaphoreGetWin32HandleInfoKHR', +-- 'Vulkan.Extensions.VK_FUCHSIA_external_semaphore.SemaphoreGetZirconHandleInfoFUCHSIA' newtype ExternalSemaphoreHandleTypeFlagBits = ExternalSemaphoreHandleTypeFlagBits Flags deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) @@ -81,14 +86,14 @@ newtype ExternalSemaphoreHandleTypeFlagBits = ExternalSemaphoreHandleTypeFlagBit -- Additionally, it /must/ be transportable over a socket using an -- @SCM_RIGHTS@ control message. It owns a reference to the underlying -- synchronization primitive represented by its Vulkan semaphore object. -pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000001 +pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000001 -- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT' specifies an NT handle -- that has only limited valid usage outside of Vulkan and other compatible -- APIs. It /must/ be compatible with the functions @DuplicateHandle@, -- @CloseHandle@, @CompareObjectHandles@, @GetHandleInformation@, and -- @SetHandleInformation@. It owns a reference to the underlying -- synchronization primitive represented by its Vulkan semaphore object. -pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000002 +pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000002 -- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT' specifies a global -- share handle that has only limited valid usage outside of Vulkan and -- other compatible APIs. It is not compatible with any native APIs. It @@ -96,13 +101,13 @@ pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = ExternalSemaphoreH -- represented its Vulkan semaphore object, and will therefore become -- invalid when all Vulkan semaphore objects associated with it are -- destroyed. -pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000004 +pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000004 -- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT' specifies an NT handle -- returned by @ID3D12Device@::@CreateSharedHandle@ referring to a Direct3D -- 12 fence, or @ID3D11Device5@::'Vulkan.Core10.Fence.createFence' by a -- Direct3D 11 fence. It owns a reference to the underlying synchronization -- primitive associated with the Direct3D fence. -pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000008 +pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000008 -- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT' specifies a POSIX file -- descriptor handle to a Linux Sync File or Android Fence object. It can -- be used with any native API accepting a valid sync file or fence as @@ -110,7 +115,13 @@ pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = ExternalSemaphoreH -- associated with the file descriptor. Implementations which support -- importing this handle type /must/ accept any type of sync or fence FD -- supported by the native system they are running on. -pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000010 +pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = ExternalSemaphoreHandleTypeFlagBits 0x00000010 +-- | 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA' specifies a +-- handle to a Zircon event object. It can be used with any native API that +-- accepts a Zircon event handle. Zircon event handles are created with +-- @ZX_RIGHTS_BASIC@ and @ZX_RIGHTS_SIGNAL@ rights. Vulkan on Fuchsia uses +-- only the ZX_EVENT_SIGNALED bit when signaling or waiting. +pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA = ExternalSemaphoreHandleTypeFlagBits 0x00000080 conNameExternalSemaphoreHandleTypeFlagBits :: String conNameExternalSemaphoreHandleTypeFlagBits = "ExternalSemaphoreHandleTypeFlagBits" @@ -120,11 +131,12 @@ enumPrefixExternalSemaphoreHandleTypeFlagBits = "EXTERNAL_SEMAPHORE_HANDLE_TYPE_ showTableExternalSemaphoreHandleTypeFlagBits :: [(ExternalSemaphoreHandleTypeFlagBits, String)] showTableExternalSemaphoreHandleTypeFlagBits = - [ (EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT , "OPAQUE_FD_BIT") - , (EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT , "OPAQUE_WIN32_BIT") - , (EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, "OPAQUE_WIN32_KMT_BIT") - , (EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT , "D3D12_FENCE_BIT") - , (EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT , "SYNC_FD_BIT") + [ (EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT , "OPAQUE_FD_BIT") + , (EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT , "OPAQUE_WIN32_BIT") + , (EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT , "OPAQUE_WIN32_KMT_BIT") + , (EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT , "D3D12_FENCE_BIT") + , (EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT , "SYNC_FD_BIT") + , (EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA, "ZIRCON_EVENT_BIT_FUCHSIA") ] instance Show ExternalSemaphoreHandleTypeFlagBits where diff --git a/src/Vulkan/Core11/Promoted_From_VK_KHR_16bit_storage.hs b/src/Vulkan/Core11/Promoted_From_VK_KHR_16bit_storage.hs index 89d9888e8..622e0d344 100644 --- a/src/Vulkan/Core11/Promoted_From_VK_KHR_16bit_storage.hs +++ b/src/Vulkan/Core11/Promoted_From_VK_KHR_16bit_storage.hs @@ -47,13 +47,11 @@ data PhysicalDevice16BitStorageFeatures = PhysicalDevice16BitStorageFeatures storageBuffer16BitAccess :: Bool , -- | #extension-features-uniformAndStorageBuffer16BitAccess# -- @uniformAndStorageBuffer16BitAccess@ specifies whether objects in the - -- @Uniform@ storage class with the @Block@ decoration and in the - -- @StorageBuffer@, @ShaderRecordBufferKHR@, or @PhysicalStorageBuffer@ - -- storage class with the same decoration /can/ have 16-bit integer and - -- 16-bit floating-point members. If this feature is not enabled, 16-bit - -- integer or 16-bit floating-point members /must/ not be used in such - -- objects. This also specifies whether shader modules /can/ declare the - -- @UniformAndStorageBuffer16BitAccess@ capability. + -- @Uniform@ storage class with the @Block@ decoration /can/ have 16-bit + -- integer and 16-bit floating-point members. If this feature is not + -- enabled, 16-bit integer or 16-bit floating-point members /must/ not be + -- used in such objects. This also specifies whether shader modules /can/ + -- declare the @UniformAndStorageBuffer16BitAccess@ capability. uniformAndStorageBuffer16BitAccess :: Bool , -- | #extension-features-storagePushConstant16# @storagePushConstant16@ -- specifies whether objects in the @PushConstant@ storage class /can/ have diff --git a/src/Vulkan/Core11/Promoted_From_VK_KHR_dedicated_allocation.hs b/src/Vulkan/Core11/Promoted_From_VK_KHR_dedicated_allocation.hs index b4f341a1d..d689d1d8d 100644 --- a/src/Vulkan/Core11/Promoted_From_VK_KHR_dedicated_allocation.hs +++ b/src/Vulkan/Core11/Promoted_From_VK_KHR_dedicated_allocation.hs @@ -277,6 +277,24 @@ instance Zero MemoryDedicatedRequirements where -- 'Vulkan.Core10.Enums.ImageCreateFlagBits.IMAGE_CREATE_DISJOINT_BIT' -- set in 'Vulkan.Core10.Image.ImageCreateInfo'::@flags@ -- +-- - #VUID-VkMemoryDedicatedAllocateInfo-image-04751# If @image@ is not +-- 'Vulkan.Core10.APIConstants.NULL_HANDLE' and +-- 'Vulkan.Core10.Memory.MemoryAllocateInfo' defines a memory import +-- operation with handle type +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA', +-- the memory being imported /must/ also be a dedicated image +-- allocation and @image@ /must/ be identical to the image associated +-- with the imported memory +-- +-- - #VUID-VkMemoryDedicatedAllocateInfo-buffer-04752# If @buffer@ is not +-- 'Vulkan.Core10.APIConstants.NULL_HANDLE' and +-- 'Vulkan.Core10.Memory.MemoryAllocateInfo' defines a memory import +-- operation with handle type +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA', +-- the memory being imported /must/ also be a dedicated buffer +-- allocation and @buffer@ /must/ be identical to the buffer associated +-- with the imported memory +-- -- == Valid Usage (Implicit) -- -- - #VUID-VkMemoryDedicatedAllocateInfo-sType-sType# @sType@ /must/ be diff --git a/src/Vulkan/Core11/Promoted_From_VK_KHR_device_group.hs b/src/Vulkan/Core11/Promoted_From_VK_KHR_device_group.hs index d710444ce..7a9c4a583 100644 --- a/src/Vulkan/Core11/Promoted_From_VK_KHR_device_group.hs +++ b/src/Vulkan/Core11/Promoted_From_VK_KHR_device_group.hs @@ -265,6 +265,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDispatchBase-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDispatchBase-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -415,7 +425,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDispatchBase-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a diff --git a/src/Vulkan/Core12.hs b/src/Vulkan/Core12.hs index 9b6db562d..94fe654a5 100644 --- a/src/Vulkan/Core12.hs +++ b/src/Vulkan/Core12.hs @@ -139,13 +139,11 @@ data PhysicalDeviceVulkan11Features = PhysicalDeviceVulkan11Features storageBuffer16BitAccess :: Bool , -- | #features-uniformAndStorageBuffer16BitAccess# -- @uniformAndStorageBuffer16BitAccess@ specifies whether objects in the - -- @Uniform@ storage class with the @Block@ decoration and in the - -- @StorageBuffer@, @ShaderRecordBufferKHR@, or @PhysicalStorageBuffer@ - -- storage class with the same decoration /can/ have 16-bit integer and - -- 16-bit floating-point members. If this feature is not enabled, 16-bit - -- integer or 16-bit floating-point members /must/ not be used in such - -- objects. This also specifies whether shader modules /can/ declare the - -- @UniformAndStorageBuffer16BitAccess@ capability. + -- @Uniform@ storage class with the @Block@ decoration /can/ have 16-bit + -- integer and 16-bit floating-point members. If this feature is not + -- enabled, 16-bit integer or 16-bit floating-point members /must/ not be + -- used in such objects. This also specifies whether shader modules /can/ + -- declare the @UniformAndStorageBuffer16BitAccess@ capability. uniformAndStorageBuffer16BitAccess :: Bool , -- | #features-storagePushConstant16# @storagePushConstant16@ specifies -- whether objects in the @PushConstant@ storage class /can/ have 16-bit @@ -529,13 +527,11 @@ instance Zero PhysicalDeviceVulkan11Properties where -- -- - #features-uniformAndStorageBuffer8BitAccess# -- @uniformAndStorageBuffer8BitAccess@ indicates whether objects in the --- @Uniform@ storage class with the @Block@ decoration and in the --- @StorageBuffer@, @ShaderRecordBufferKHR@, or @PhysicalStorageBuffer@ --- storage class with the same decoration /can/ have 8-bit integer --- members. If this feature is not enabled, 8-bit integer members --- /must/ not be used in such objects. This also indicates whether --- shader modules /can/ declare the @UniformAndStorageBuffer8BitAccess@ --- capability. +-- @Uniform@ storage class with the @Block@ decoration /can/ have 8-bit +-- integer members. If this feature is not enabled, 8-bit integer +-- members /must/ not be used in such objects. This also indicates +-- whether shader modules /can/ declare the +-- @UniformAndStorageBuffer8BitAccess@ capability. -- -- - #features-storagePushConstant8# @storagePushConstant8@ indicates -- whether objects in the @PushConstant@ storage class /can/ have 8-bit diff --git a/src/Vulkan/Core12/Enums/SemaphoreType.hs b/src/Vulkan/Core12/Enums/SemaphoreType.hs index f6d8a08a0..9ee4bc0ae 100644 --- a/src/Vulkan/Core12/Enums/SemaphoreType.hs +++ b/src/Vulkan/Core12/Enums/SemaphoreType.hs @@ -27,9 +27,9 @@ newtype SemaphoreType = SemaphoreType Int32 -- or unsignaled. When created, the semaphore is in the unsignaled state. pattern SEMAPHORE_TYPE_BINARY = SemaphoreType 0 -- | 'SEMAPHORE_TYPE_TIMELINE' specifies a /timeline semaphore/ type that has --- a monotonically increasing 64-bit unsigned integer payload indicating --- whether the semaphore is signaled with respect to a particular reference --- value. When created, the semaphore payload has the value given by the +-- a strictly increasing 64-bit unsigned integer payload indicating whether +-- the semaphore is signaled with respect to a particular reference value. +-- When created, the semaphore payload has the value given by the -- @initialValue@ field of -- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'. pattern SEMAPHORE_TYPE_TIMELINE = SemaphoreType 1 diff --git a/src/Vulkan/Core12/Promoted_From_VK_KHR_8bit_storage.hs b/src/Vulkan/Core12/Promoted_From_VK_KHR_8bit_storage.hs index 24cc341e4..aaf15bdb2 100644 --- a/src/Vulkan/Core12/Promoted_From_VK_KHR_8bit_storage.hs +++ b/src/Vulkan/Core12/Promoted_From_VK_KHR_8bit_storage.hs @@ -46,12 +46,11 @@ data PhysicalDevice8BitStorageFeatures = PhysicalDevice8BitStorageFeatures storageBuffer8BitAccess :: Bool , -- | #extension-features-uniformAndStorageBuffer8BitAccess# -- @uniformAndStorageBuffer8BitAccess@ indicates whether objects in the - -- @Uniform@ storage class with the @Block@ decoration and in the - -- @StorageBuffer@, @ShaderRecordBufferKHR@, or @PhysicalStorageBuffer@ - -- storage class with the same decoration /can/ have 8-bit integer members. - -- If this feature is not enabled, 8-bit integer members /must/ not be used - -- in such objects. This also indicates whether shader modules /can/ - -- declare the @UniformAndStorageBuffer8BitAccess@ capability. + -- @Uniform@ storage class with the @Block@ decoration /can/ have 8-bit + -- integer members. If this feature is not enabled, 8-bit integer members + -- /must/ not be used in such objects. This also indicates whether shader + -- modules /can/ declare the @UniformAndStorageBuffer8BitAccess@ + -- capability. uniformAndStorageBuffer8BitAccess :: Bool , -- | #extension-features-storagePushConstant8# @storagePushConstant8@ -- indicates whether objects in the @PushConstant@ storage class /can/ have diff --git a/src/Vulkan/Core12/Promoted_From_VK_KHR_create_renderpass2.hs b/src/Vulkan/Core12/Promoted_From_VK_KHR_create_renderpass2.hs index c2649c012..009a461f2 100644 --- a/src/Vulkan/Core12/Promoted_From_VK_KHR_create_renderpass2.hs +++ b/src/Vulkan/Core12/Promoted_From_VK_KHR_create_renderpass2.hs @@ -968,6 +968,43 @@ instance es ~ '[] => Zero (AttachmentDescription2 es) where -- or -- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL', -- +-- - #VUID-VkAttachmentReference2-attachment-04754# If @attachment@ is +-- not 'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', and the format +-- of the referenced attachment is a color format, @layout@ /must/ not +-- be +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL', +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL', +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL' +-- or +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' +-- +-- - #VUID-VkAttachmentReference2-attachment-04755# If @attachment@ is +-- not 'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', and the format +-- of the referenced attachment is a depth\/stencil format which +-- includes both depth and stencil aspects, and @layout@ is +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL' +-- or +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL', +-- the @pNext@ chain /must/ include a +-- 'Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts.AttachmentReferenceStencilLayout' +-- structure +-- +-- - #VUID-VkAttachmentReference2-attachment-04756# If @attachment@ is +-- not 'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', and the format +-- of the referenced attachment is a depth\/stencil format which +-- includes only the depth aspect, @layout@ /must/ not be +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL' +-- or +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL' +-- +-- - #VUID-VkAttachmentReference2-attachment-04757# If @attachment@ is +-- not 'Vulkan.Core10.APIConstants.ATTACHMENT_UNUSED', and the format +-- of the referenced attachment is a depth\/stencil format which +-- includes only the stencil aspect, @layout@ /must/ not be +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL' +-- or +-- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL' +-- -- == Valid Usage (Implicit) -- -- - #VUID-VkAttachmentReference2-sType-sType# @sType@ /must/ be diff --git a/src/Vulkan/Core12/Promoted_From_VK_KHR_draw_indirect_count.hs b/src/Vulkan/Core12/Promoted_From_VK_KHR_draw_indirect_count.hs index d5ae65b0c..bc360f065 100644 --- a/src/Vulkan/Core12/Promoted_From_VK_KHR_draw_indirect_count.hs +++ b/src/Vulkan/Core12/Promoted_From_VK_KHR_draw_indirect_count.hs @@ -54,6 +54,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDrawIndirectCount-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDrawIndirectCount-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -204,7 +214,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDrawIndirectCount-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -448,6 +458,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDrawIndirectCount-rasterizationSamples-04740# If +-- rasterization is not disabled in the bound graphics pipeline, and +-- neither the @@ nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDrawIndirectCount-None-04007# All vertex input bindings -- accessed via vertex input variables declared in the vertex shader -- entry point’s interface /must/ have either valid or @@ -631,6 +648,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDrawIndexedIndirectCount-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDrawIndexedIndirectCount-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -783,7 +810,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDrawIndexedIndirectCount-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -1030,6 +1057,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDrawIndexedIndirectCount-rasterizationSamples-04740# If +-- rasterization is not disabled in the bound graphics pipeline, and +-- neither the @@ nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDrawIndexedIndirectCount-None-04007# All vertex input -- bindings accessed via vertex input variables declared in the vertex -- shader entry point’s interface /must/ have either valid or diff --git a/src/Vulkan/Dynamic.hs b/src/Vulkan/Dynamic.hs index a8a3093a4..0478d56d0 100644 --- a/src/Vulkan/Dynamic.hs +++ b/src/Vulkan/Dynamic.hs @@ -204,6 +204,7 @@ import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_fence_fd (ImportFenceFdI import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_fence_win32 (ImportFenceWin32HandleInfoKHR) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_semaphore_fd (ImportSemaphoreFdInfoKHR) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_semaphore_win32 (ImportSemaphoreWin32HandleInfoKHR) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_semaphore (ImportSemaphoreZirconHandleInfoFUCHSIA) import {-# SOURCE #-} Vulkan.Core10.Enums.IndexType (IndexType) import {-# SOURCE #-} Vulkan.Extensions.VK_NV_device_generated_commands (IndirectCommandsLayoutCreateInfoNV) import {-# SOURCE #-} Vulkan.Extensions.Handles (IndirectCommandsLayoutNV) @@ -218,12 +219,14 @@ import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_fd (MemoryFdPrope import {-# SOURCE #-} Vulkan.Extensions.VK_ANDROID_external_memory_android_hardware_buffer (MemoryGetAndroidHardwareBufferInfoANDROID) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_fd (MemoryGetFdInfoKHR) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_win32 (MemoryGetWin32HandleInfoKHR) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_memory (MemoryGetZirconHandleInfoFUCHSIA) import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_external_memory_host (MemoryHostPointerPropertiesEXT) import {-# SOURCE #-} Vulkan.Core10.Enums.MemoryMapFlags (MemoryMapFlags) import {-# SOURCE #-} Vulkan.Core10.MemoryManagement (MemoryRequirements) import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_get_memory_requirements2 (MemoryRequirements2) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_get_memory_requirements2 (MemoryRequirements2KHR) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_memory_win32 (MemoryWin32HandlePropertiesKHR) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_memory (MemoryZirconHandlePropertiesFUCHSIA) import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_metal_surface (MetalSurfaceCreateInfoEXT) import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_sample_locations (MultisamplePropertiesEXT) import {-# SOURCE #-} Vulkan.Core10.Enums.ObjectType (ObjectType) @@ -300,10 +303,13 @@ import {-# SOURCE #-} Vulkan.Core10.Handles (Sampler) import {-# SOURCE #-} Vulkan.Core10.Sampler (SamplerCreateInfo) import {-# SOURCE #-} Vulkan.Core11.Handles (SamplerYcbcrConversion) import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion (SamplerYcbcrConversionCreateInfo) +import {-# SOURCE #-} Vulkan.Extensions.VK_QNX_screen_surface (ScreenSurfaceCreateInfoQNX) +import {-# SOURCE #-} Vulkan.Extensions.VK_QNX_screen_surface (Screen_window) import {-# SOURCE #-} Vulkan.Core10.Handles (Semaphore) import {-# SOURCE #-} Vulkan.Core10.QueueSemaphore (SemaphoreCreateInfo) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_semaphore_fd (SemaphoreGetFdInfoKHR) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_external_semaphore_win32 (SemaphoreGetWin32HandleInfoKHR) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_external_semaphore (SemaphoreGetZirconHandleInfoFUCHSIA) import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore (SemaphoreSignalInfo) import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore (SemaphoreWaitInfo) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (ShaderGroupShaderKHR) @@ -352,6 +358,7 @@ import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_xcb_surface (XcbSurfaceCreateInfo import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_xcb_surface (Xcb_connection_t) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_xcb_surface (Xcb_visualid_t) import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_xlib_surface (XlibSurfaceCreateInfoKHR) +import {-# SOURCE #-} Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface (Zx_handle_t) data InstanceCmds = InstanceCmds { instanceCmdsHandle :: Ptr Instance_T , pVkDestroyInstance :: FunPtr (Ptr Instance_T -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) @@ -393,6 +400,8 @@ data InstanceCmds = InstanceCmds , pVkGetPhysicalDeviceDirectFBPresentationSupportEXT :: FunPtr (Ptr PhysicalDevice_T -> ("queueFamilyIndex" ::: Word32) -> ("dfb" ::: Ptr IDirectFB) -> IO Bool32) , pVkCreateImagePipeSurfaceFUCHSIA :: FunPtr (Ptr Instance_T -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pSurface" ::: Ptr SurfaceKHR) -> IO Result) , pVkCreateStreamDescriptorSurfaceGGP :: FunPtr (Ptr Instance_T -> ("pCreateInfo" ::: Ptr StreamDescriptorSurfaceCreateInfoGGP) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pSurface" ::: Ptr SurfaceKHR) -> IO Result) + , pVkCreateScreenSurfaceQNX :: FunPtr (Ptr Instance_T -> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pSurface" ::: Ptr SurfaceKHR) -> IO Result) + , pVkGetPhysicalDeviceScreenPresentationSupportQNX :: FunPtr (Ptr PhysicalDevice_T -> ("queueFamilyIndex" ::: Word32) -> Ptr Screen_window -> IO Bool32) , pVkCreateDebugReportCallbackEXT :: FunPtr (Ptr Instance_T -> ("pCreateInfo" ::: Ptr DebugReportCallbackCreateInfoEXT) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pCallback" ::: Ptr DebugReportCallbackEXT) -> IO Result) , pVkDestroyDebugReportCallbackEXT :: FunPtr (Ptr Instance_T -> DebugReportCallbackEXT -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) , pVkDebugReportMessageEXT :: FunPtr (Ptr Instance_T -> DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> ("object" ::: Word64) -> ("location" ::: CSize) -> ("messageCode" ::: Int32) -> ("pLayerPrefix" ::: Ptr CChar) -> ("pMessage" ::: Ptr CChar) -> IO ()) @@ -453,7 +462,7 @@ instance Zero InstanceCmds where nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr - nullFunPtr nullFunPtr nullFunPtr nullFunPtr + nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr -- | A version of 'getInstanceProcAddr' which can be called -- with a null pointer for the instance. @@ -511,6 +520,8 @@ initInstanceCmds handle = do vkGetPhysicalDeviceDirectFBPresentationSupportEXT <- getInstanceProcAddr' handle (Ptr "vkGetPhysicalDeviceDirectFBPresentationSupportEXT"#) vkCreateImagePipeSurfaceFUCHSIA <- getInstanceProcAddr' handle (Ptr "vkCreateImagePipeSurfaceFUCHSIA"#) vkCreateStreamDescriptorSurfaceGGP <- getInstanceProcAddr' handle (Ptr "vkCreateStreamDescriptorSurfaceGGP"#) + vkCreateScreenSurfaceQNX <- getInstanceProcAddr' handle (Ptr "vkCreateScreenSurfaceQNX"#) + vkGetPhysicalDeviceScreenPresentationSupportQNX <- getInstanceProcAddr' handle (Ptr "vkGetPhysicalDeviceScreenPresentationSupportQNX"#) vkCreateDebugReportCallbackEXT <- getInstanceProcAddr' handle (Ptr "vkCreateDebugReportCallbackEXT"#) vkDestroyDebugReportCallbackEXT <- getInstanceProcAddr' handle (Ptr "vkDestroyDebugReportCallbackEXT"#) vkDebugReportMessageEXT <- getInstanceProcAddr' handle (Ptr "vkDebugReportMessageEXT"#) @@ -595,6 +606,8 @@ initInstanceCmds handle = do (castFunPtr @_ @(Ptr PhysicalDevice_T -> ("queueFamilyIndex" ::: Word32) -> ("dfb" ::: Ptr IDirectFB) -> IO Bool32) vkGetPhysicalDeviceDirectFBPresentationSupportEXT) (castFunPtr @_ @(Ptr Instance_T -> ("pCreateInfo" ::: Ptr ImagePipeSurfaceCreateInfoFUCHSIA) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pSurface" ::: Ptr SurfaceKHR) -> IO Result) vkCreateImagePipeSurfaceFUCHSIA) (castFunPtr @_ @(Ptr Instance_T -> ("pCreateInfo" ::: Ptr StreamDescriptorSurfaceCreateInfoGGP) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pSurface" ::: Ptr SurfaceKHR) -> IO Result) vkCreateStreamDescriptorSurfaceGGP) + (castFunPtr @_ @(Ptr Instance_T -> ("pCreateInfo" ::: Ptr ScreenSurfaceCreateInfoQNX) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pSurface" ::: Ptr SurfaceKHR) -> IO Result) vkCreateScreenSurfaceQNX) + (castFunPtr @_ @(Ptr PhysicalDevice_T -> ("queueFamilyIndex" ::: Word32) -> Ptr Screen_window -> IO Bool32) vkGetPhysicalDeviceScreenPresentationSupportQNX) (castFunPtr @_ @(Ptr Instance_T -> ("pCreateInfo" ::: Ptr DebugReportCallbackCreateInfoEXT) -> ("pAllocator" ::: Ptr AllocationCallbacks) -> ("pCallback" ::: Ptr DebugReportCallbackEXT) -> IO Result) vkCreateDebugReportCallbackEXT) (castFunPtr @_ @(Ptr Instance_T -> DebugReportCallbackEXT -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) vkDestroyDebugReportCallbackEXT) (castFunPtr @_ @(Ptr Instance_T -> DebugReportFlagsEXT -> DebugReportObjectTypeEXT -> ("object" ::: Word64) -> ("location" ::: CSize) -> ("messageCode" ::: Int32) -> ("pLayerPrefix" ::: Ptr CChar) -> ("pMessage" ::: Ptr CChar) -> IO ()) vkDebugReportMessageEXT) @@ -790,10 +803,14 @@ data DeviceCmds = DeviceCmds , pVkGetMemoryWin32HandlePropertiesKHR :: FunPtr (Ptr Device_T -> ExternalMemoryHandleTypeFlagBits -> HANDLE -> ("pMemoryWin32HandleProperties" ::: Ptr MemoryWin32HandlePropertiesKHR) -> IO Result) , pVkGetMemoryFdKHR :: FunPtr (Ptr Device_T -> ("pGetFdInfo" ::: Ptr MemoryGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO Result) , pVkGetMemoryFdPropertiesKHR :: FunPtr (Ptr Device_T -> ExternalMemoryHandleTypeFlagBits -> ("fd" ::: CInt) -> ("pMemoryFdProperties" ::: Ptr MemoryFdPropertiesKHR) -> IO Result) + , pVkGetMemoryZirconHandleFUCHSIA :: FunPtr (Ptr Device_T -> ("pGetZirconHandleInfo" ::: Ptr MemoryGetZirconHandleInfoFUCHSIA) -> ("pZirconHandle" ::: Ptr Zx_handle_t) -> IO Result) + , pVkGetMemoryZirconHandlePropertiesFUCHSIA :: FunPtr (Ptr Device_T -> ExternalMemoryHandleTypeFlagBits -> ("zirconHandle" ::: Zx_handle_t) -> ("pMemoryZirconHandleProperties" ::: Ptr MemoryZirconHandlePropertiesFUCHSIA) -> IO Result) , pVkGetSemaphoreWin32HandleKHR :: FunPtr (Ptr Device_T -> ("pGetWin32HandleInfo" ::: Ptr SemaphoreGetWin32HandleInfoKHR) -> ("pHandle" ::: Ptr HANDLE) -> IO Result) , pVkImportSemaphoreWin32HandleKHR :: FunPtr (Ptr Device_T -> ("pImportSemaphoreWin32HandleInfo" ::: Ptr ImportSemaphoreWin32HandleInfoKHR) -> IO Result) , pVkGetSemaphoreFdKHR :: FunPtr (Ptr Device_T -> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO Result) , pVkImportSemaphoreFdKHR :: FunPtr (Ptr Device_T -> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR) -> IO Result) + , pVkGetSemaphoreZirconHandleFUCHSIA :: FunPtr (Ptr Device_T -> ("pGetZirconHandleInfo" ::: Ptr SemaphoreGetZirconHandleInfoFUCHSIA) -> ("pZirconHandle" ::: Ptr Zx_handle_t) -> IO Result) + , pVkImportSemaphoreZirconHandleFUCHSIA :: FunPtr (Ptr Device_T -> ("pImportSemaphoreZirconHandleInfo" ::: Ptr ImportSemaphoreZirconHandleInfoFUCHSIA) -> IO Result) , pVkGetFenceWin32HandleKHR :: FunPtr (Ptr Device_T -> ("pGetWin32HandleInfo" ::: Ptr FenceGetWin32HandleInfoKHR) -> ("pHandle" ::: Ptr HANDLE) -> IO Result) , pVkImportFenceWin32HandleKHR :: FunPtr (Ptr Device_T -> ("pImportFenceWin32HandleInfo" ::: Ptr ImportFenceWin32HandleInfoKHR) -> IO Result) , pVkGetFenceFdKHR :: FunPtr (Ptr Device_T -> ("pGetFdInfo" ::: Ptr FenceGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO Result) @@ -1012,7 +1029,8 @@ instance Zero DeviceCmds where nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr - nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr + nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr nullFunPtr + nullFunPtr foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) @@ -1181,10 +1199,14 @@ initDeviceCmds instanceCmds handle = do vkGetMemoryWin32HandlePropertiesKHR <- getDeviceProcAddr' handle (Ptr "vkGetMemoryWin32HandlePropertiesKHR"#) vkGetMemoryFdKHR <- getDeviceProcAddr' handle (Ptr "vkGetMemoryFdKHR"#) vkGetMemoryFdPropertiesKHR <- getDeviceProcAddr' handle (Ptr "vkGetMemoryFdPropertiesKHR"#) + vkGetMemoryZirconHandleFUCHSIA <- getDeviceProcAddr' handle (Ptr "vkGetMemoryZirconHandleFUCHSIA"#) + vkGetMemoryZirconHandlePropertiesFUCHSIA <- getDeviceProcAddr' handle (Ptr "vkGetMemoryZirconHandlePropertiesFUCHSIA"#) vkGetSemaphoreWin32HandleKHR <- getDeviceProcAddr' handle (Ptr "vkGetSemaphoreWin32HandleKHR"#) vkImportSemaphoreWin32HandleKHR <- getDeviceProcAddr' handle (Ptr "vkImportSemaphoreWin32HandleKHR"#) vkGetSemaphoreFdKHR <- getDeviceProcAddr' handle (Ptr "vkGetSemaphoreFdKHR"#) vkImportSemaphoreFdKHR <- getDeviceProcAddr' handle (Ptr "vkImportSemaphoreFdKHR"#) + vkGetSemaphoreZirconHandleFUCHSIA <- getDeviceProcAddr' handle (Ptr "vkGetSemaphoreZirconHandleFUCHSIA"#) + vkImportSemaphoreZirconHandleFUCHSIA <- getDeviceProcAddr' handle (Ptr "vkImportSemaphoreZirconHandleFUCHSIA"#) vkGetFenceWin32HandleKHR <- getDeviceProcAddr' handle (Ptr "vkGetFenceWin32HandleKHR"#) vkImportFenceWin32HandleKHR <- getDeviceProcAddr' handle (Ptr "vkImportFenceWin32HandleKHR"#) vkGetFenceFdKHR <- getDeviceProcAddr' handle (Ptr "vkGetFenceFdKHR"#) @@ -1506,10 +1528,14 @@ initDeviceCmds instanceCmds handle = do (castFunPtr @_ @(Ptr Device_T -> ExternalMemoryHandleTypeFlagBits -> HANDLE -> ("pMemoryWin32HandleProperties" ::: Ptr MemoryWin32HandlePropertiesKHR) -> IO Result) vkGetMemoryWin32HandlePropertiesKHR) (castFunPtr @_ @(Ptr Device_T -> ("pGetFdInfo" ::: Ptr MemoryGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO Result) vkGetMemoryFdKHR) (castFunPtr @_ @(Ptr Device_T -> ExternalMemoryHandleTypeFlagBits -> ("fd" ::: CInt) -> ("pMemoryFdProperties" ::: Ptr MemoryFdPropertiesKHR) -> IO Result) vkGetMemoryFdPropertiesKHR) + (castFunPtr @_ @(Ptr Device_T -> ("pGetZirconHandleInfo" ::: Ptr MemoryGetZirconHandleInfoFUCHSIA) -> ("pZirconHandle" ::: Ptr Zx_handle_t) -> IO Result) vkGetMemoryZirconHandleFUCHSIA) + (castFunPtr @_ @(Ptr Device_T -> ExternalMemoryHandleTypeFlagBits -> ("zirconHandle" ::: Zx_handle_t) -> ("pMemoryZirconHandleProperties" ::: Ptr MemoryZirconHandlePropertiesFUCHSIA) -> IO Result) vkGetMemoryZirconHandlePropertiesFUCHSIA) (castFunPtr @_ @(Ptr Device_T -> ("pGetWin32HandleInfo" ::: Ptr SemaphoreGetWin32HandleInfoKHR) -> ("pHandle" ::: Ptr HANDLE) -> IO Result) vkGetSemaphoreWin32HandleKHR) (castFunPtr @_ @(Ptr Device_T -> ("pImportSemaphoreWin32HandleInfo" ::: Ptr ImportSemaphoreWin32HandleInfoKHR) -> IO Result) vkImportSemaphoreWin32HandleKHR) (castFunPtr @_ @(Ptr Device_T -> ("pGetFdInfo" ::: Ptr SemaphoreGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO Result) vkGetSemaphoreFdKHR) (castFunPtr @_ @(Ptr Device_T -> ("pImportSemaphoreFdInfo" ::: Ptr ImportSemaphoreFdInfoKHR) -> IO Result) vkImportSemaphoreFdKHR) + (castFunPtr @_ @(Ptr Device_T -> ("pGetZirconHandleInfo" ::: Ptr SemaphoreGetZirconHandleInfoFUCHSIA) -> ("pZirconHandle" ::: Ptr Zx_handle_t) -> IO Result) vkGetSemaphoreZirconHandleFUCHSIA) + (castFunPtr @_ @(Ptr Device_T -> ("pImportSemaphoreZirconHandleInfo" ::: Ptr ImportSemaphoreZirconHandleInfoFUCHSIA) -> IO Result) vkImportSemaphoreZirconHandleFUCHSIA) (castFunPtr @_ @(Ptr Device_T -> ("pGetWin32HandleInfo" ::: Ptr FenceGetWin32HandleInfoKHR) -> ("pHandle" ::: Ptr HANDLE) -> IO Result) vkGetFenceWin32HandleKHR) (castFunPtr @_ @(Ptr Device_T -> ("pImportFenceWin32HandleInfo" ::: Ptr ImportFenceWin32HandleInfoKHR) -> IO Result) vkImportFenceWin32HandleKHR) (castFunPtr @_ @(Ptr Device_T -> ("pGetFdInfo" ::: Ptr FenceGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO Result) vkGetFenceFdKHR) diff --git a/src/Vulkan/Extensions.hs b/src/Vulkan/Extensions.hs index 94b671329..8d7be8391 100644 --- a/src/Vulkan/Extensions.hs +++ b/src/Vulkan/Extensions.hs @@ -94,6 +94,8 @@ module Vulkan.Extensions ( module Vulkan.Extensions.Dependencies , module Vulkan.Extensions.VK_EXT_validation_flags , module Vulkan.Extensions.VK_EXT_vertex_attribute_divisor , module Vulkan.Extensions.VK_EXT_ycbcr_image_arrays + , module Vulkan.Extensions.VK_FUCHSIA_external_memory + , module Vulkan.Extensions.VK_FUCHSIA_external_semaphore , module Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface , module Vulkan.Extensions.VK_GGP_frame_token , module Vulkan.Extensions.VK_GGP_stream_descriptor_surface @@ -227,6 +229,7 @@ module Vulkan.Extensions ( module Vulkan.Extensions.Dependencies , module Vulkan.Extensions.VK_QCOM_render_pass_store_ops , module Vulkan.Extensions.VK_QCOM_render_pass_transform , module Vulkan.Extensions.VK_QCOM_rotated_copy_commands + , module Vulkan.Extensions.VK_QNX_screen_surface , module Vulkan.Extensions.VK_VALVE_mutable_descriptor_type ) where import Vulkan.Extensions.Dependencies @@ -323,6 +326,8 @@ import Vulkan.Extensions.VK_EXT_validation_features import Vulkan.Extensions.VK_EXT_validation_flags import Vulkan.Extensions.VK_EXT_vertex_attribute_divisor import Vulkan.Extensions.VK_EXT_ycbcr_image_arrays +import Vulkan.Extensions.VK_FUCHSIA_external_memory +import Vulkan.Extensions.VK_FUCHSIA_external_semaphore import Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface import Vulkan.Extensions.VK_GGP_frame_token import Vulkan.Extensions.VK_GGP_stream_descriptor_surface @@ -456,5 +461,6 @@ import Vulkan.Extensions.VK_QCOM_render_pass_shader_resolve import Vulkan.Extensions.VK_QCOM_render_pass_store_ops import Vulkan.Extensions.VK_QCOM_render_pass_transform import Vulkan.Extensions.VK_QCOM_rotated_copy_commands +import Vulkan.Extensions.VK_QNX_screen_surface import Vulkan.Extensions.VK_VALVE_mutable_descriptor_type diff --git a/src/Vulkan/Extensions/Dependencies.hs b/src/Vulkan/Extensions/Dependencies.hs index f71e7453e..e4c6991fc 100644 --- a/src/Vulkan/Extensions/Dependencies.hs +++ b/src/Vulkan/Extensions/Dependencies.hs @@ -59,6 +59,8 @@ import Vulkan.Extensions.VK_EXT_texture_compression_astc_hdr (pattern EXT_TEXTUR import Vulkan.Extensions.VK_EXT_transform_feedback (pattern EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME) import Vulkan.Extensions.VK_EXT_vertex_attribute_divisor (pattern EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME) import Vulkan.Extensions.VK_EXT_ycbcr_image_arrays (pattern EXT_YCBCR_IMAGE_ARRAYS_EXTENSION_NAME) +import Vulkan.Extensions.VK_FUCHSIA_external_memory (pattern FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME) +import Vulkan.Extensions.VK_FUCHSIA_external_semaphore (pattern FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME) import Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface (pattern FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME) import Vulkan.Extensions.VK_GGP_frame_token (pattern GGP_FRAME_TOKEN_EXTENSION_NAME) import Vulkan.Extensions.VK_GGP_stream_descriptor_surface (pattern GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME) @@ -166,6 +168,7 @@ import Vulkan.Extensions.VK_NV_shading_rate_image (pattern NV_SHADING_RATE_IMAGE import Vulkan.Extensions.VK_NV_win32_keyed_mutex (pattern NV_WIN32_KEYED_MUTEX_EXTENSION_NAME) import Vulkan.Extensions.VK_QCOM_render_pass_transform (pattern QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME) import Vulkan.Extensions.VK_QCOM_rotated_copy_commands (pattern QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME) +import Vulkan.Extensions.VK_QNX_screen_surface (pattern QNX_SCREEN_SURFACE_EXTENSION_NAME) import Vulkan.Extensions.VK_VALVE_mutable_descriptor_type (pattern VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME) -- | The set of other extensions required to use this extension extensionDependencies :: ("extensionName" ::: ByteString) -> [ByteString] @@ -455,13 +458,8 @@ extensionDependencies = \case QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME -> [KHR_SWAPCHAIN_EXTENSION_NAME, KHR_SURFACE_EXTENSION_NAME] EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME -> [KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME] NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME -> [KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME] - KHR_SYNCHRONIZATION_2_EXTENSION_NAME -> - [ KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME - , KHR_CREATE_RENDERPASS_2_EXTENSION_NAME - , KHR_MULTIVIEW_EXTENSION_NAME - , KHR_MAINTENANCE2_EXTENSION_NAME - ] - KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME -> [KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME] + KHR_SYNCHRONIZATION_2_EXTENSION_NAME -> [KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME] + KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY_EXTENSION_NAME -> [KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME] NV_FRAGMENT_SHADING_RATE_ENUMS_EXTENSION_NAME -> [ KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME , KHR_CREATE_RENDERPASS_2_EXTENSION_NAME @@ -481,6 +479,17 @@ extensionDependencies = \case EXT_DIRECTFB_SURFACE_EXTENSION_NAME -> [KHR_SURFACE_EXTENSION_NAME] VALVE_MUTABLE_DESCRIPTOR_TYPE_EXTENSION_NAME -> [KHR_MAINTENANCE3_EXTENSION_NAME, KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME] + FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME -> + [ KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME + , KHR_EXTERNAL_MEMORY_EXTENSION_NAME + , KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME + ] + FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME -> + [ KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME + , KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME + , KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME + ] + QNX_SCREEN_SURFACE_EXTENSION_NAME -> [KHR_SURFACE_EXTENSION_NAME] _ -> [] -- | The minimum required API version to use this extension diff --git a/src/Vulkan/Extensions/Handles.hs b/src/Vulkan/Extensions/Handles.hs index 6cf84d602..aa1a2937d 100644 --- a/src/Vulkan/Extensions/Handles.hs +++ b/src/Vulkan/Extensions/Handles.hs @@ -299,6 +299,7 @@ instance Show DisplayModeKHR where -- 'Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface.createImagePipeSurfaceFUCHSIA', -- 'Vulkan.Extensions.VK_MVK_macos_surface.createMacOSSurfaceMVK', -- 'Vulkan.Extensions.VK_EXT_metal_surface.createMetalSurfaceEXT', +-- 'Vulkan.Extensions.VK_QNX_screen_surface.createScreenSurfaceQNX', -- 'Vulkan.Extensions.VK_GGP_stream_descriptor_surface.createStreamDescriptorSurfaceGGP', -- 'Vulkan.Extensions.VK_NN_vi_surface.createViSurfaceNN', -- 'Vulkan.Extensions.VK_KHR_wayland_surface.createWaylandSurfaceKHR', @@ -355,7 +356,7 @@ instance Show SurfaceKHR where -- presentation engine. Use of a presentable image /must/ occur only after -- the image is returned by -- 'Vulkan.Extensions.VK_KHR_swapchain.acquireNextImageKHR', and before it --- is presented by 'Vulkan.Extensions.VK_KHR_swapchain.queuePresentKHR'. +-- is released by 'Vulkan.Extensions.VK_KHR_swapchain.queuePresentKHR'. -- This includes transitioning the image layout and rendering commands. -- -- An application /can/ acquire use of a presentable image with diff --git a/src/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs b/src/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs index 3b3baacb8..6d0601ff6 100644 --- a/src/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs +++ b/src/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs @@ -113,6 +113,12 @@ -- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@timestampPeriod@ -- makes it possible to calculate future device timestamps as follows: -- +-- 6) In what queue are timestamp values in time domain +-- 'TIME_DOMAIN_DEVICE_EXT' captured by 'getCalibratedTimestampsEXT'? +-- +-- __RESOLVED__: An implementation supporting this extension will have all +-- its VkQueue share the same time domain. +-- -- > futureTimestamp = calibratedTimestamp + deltaNanoseconds / timestampPeriod -- -- 6) Can the host and device timestamp values drift apart over longer @@ -147,6 +153,10 @@ -- -- == Version History -- +-- - Revision 2, 2021-03-16 (Lionel Landwerlin) +-- +-- - Specify requirement on device timestamps +-- -- - Revision 1, 2018-10-04 (Daniel Rakos) -- -- - Internal revisions. @@ -459,6 +469,15 @@ instance Zero CalibratedTimestampInfoEXT where -- -- = Description -- +-- Note +-- +-- An implementation supporting @VK_EXT_calibrated_timestamps@ will use the +-- same time domain for all its 'Vulkan.Core10.Handles.Queue' so that +-- timestamp values reported for 'TIME_DOMAIN_DEVICE_EXT' can be matched to +-- any timestamp captured through +-- 'Vulkan.Core10.CommandBufferBuilding.cmdWriteTimestamp' or +-- 'Vulkan.Extensions.VK_KHR_synchronization2.cmdWriteTimestamp2KHR' . +-- -- > struct timespec tv; -- > clock_gettime(CLOCK_MONOTONIC, &tv); -- > return tv.tv_nsec + tv.tv_sec*1000000000ull; diff --git a/src/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs-boot b/src/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs-boot index d1c526e2e..8e82fd5b6 100644 --- a/src/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs-boot +++ b/src/Vulkan/Extensions/VK_EXT_calibrated_timestamps.hs-boot @@ -113,6 +113,12 @@ -- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceLimits'::@timestampPeriod@ -- makes it possible to calculate future device timestamps as follows: -- +-- 6) In what queue are timestamp values in time domain +-- 'TIME_DOMAIN_DEVICE_EXT' captured by 'getCalibratedTimestampsEXT'? +-- +-- __RESOLVED__: An implementation supporting this extension will have all +-- its VkQueue share the same time domain. +-- -- > futureTimestamp = calibratedTimestamp + deltaNanoseconds / timestampPeriod -- -- 6) Can the host and device timestamp values drift apart over longer @@ -147,6 +153,10 @@ -- -- == Version History -- +-- - Revision 2, 2021-03-16 (Lionel Landwerlin) +-- +-- - Specify requirement on device timestamps +-- -- - Revision 1, 2018-10-04 (Daniel Rakos) -- -- - Internal revisions. diff --git a/src/Vulkan/Extensions/VK_EXT_debug_utils.hs b/src/Vulkan/Extensions/VK_EXT_debug_utils.hs index 37327903e..997b04671 100644 --- a/src/Vulkan/Extensions/VK_EXT_debug_utils.hs +++ b/src/Vulkan/Extensions/VK_EXT_debug_utils.hs @@ -235,7 +235,7 @@ -- > PFN_vkCreateDebugUtilsMessengerEXT pfnCreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT)vkGetInstanceProcAddr(instance, "vkCreateDebugUtilsMessengerEXT"); -- > PFN_vkDestroyDebugUtilsMessengerEXT pfnDestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT)vkGetInstanceProcAddr(instance, "vkDestroyDebugUtilsMessengerEXT"); -- > --- > VkDebugUtilsMessengeCreateInfoEXT callback1 = { +-- > VkDebugUtilsMessengerCreateInfoEXT callback1 = { -- > VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT, // sType -- > NULL, // pNext -- > 0, // flags @@ -252,7 +252,7 @@ -- > } -- > -- > callback1.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT; --- > callback1.pfnCallback = myDebugBreak; +-- > callback1.pfnUserCallback = myDebugBreak; -- > callback1.pUserData = NULL; -- > res = pfnCreateDebugUtilsMessengerEXT(instance, &callback1, NULL, &cb2); -- > if (res != VK_SUCCESS) { @@ -2158,14 +2158,17 @@ type FN_vkDebugUtilsMessengerCallbackEXT = DebugUtilsMessageSeverityFlagBitsEXT -- -- = Description -- --- The callback /must/ not call 'destroyDebugUtilsMessengerEXT'. --- -- The callback returns a 'Vulkan.Core10.FundamentalTypes.Bool32', which is -- interpreted in a layer-specified manner. The application /should/ always -- return 'Vulkan.Core10.FundamentalTypes.FALSE'. The -- 'Vulkan.Core10.FundamentalTypes.TRUE' value is reserved for use in layer -- development. -- +-- == Valid Usage +-- +-- - #VUID-PFN_vkDebugUtilsMessengerCallbackEXT-None-04769# The callback +-- /must/ not make calls to any Vulkan commands. +-- -- = See Also -- -- 'DebugUtilsMessengerCreateInfoEXT' diff --git a/src/Vulkan/Extensions/VK_EXT_debug_utils.hs-boot b/src/Vulkan/Extensions/VK_EXT_debug_utils.hs-boot index a6380f96e..aac003d6b 100644 --- a/src/Vulkan/Extensions/VK_EXT_debug_utils.hs-boot +++ b/src/Vulkan/Extensions/VK_EXT_debug_utils.hs-boot @@ -235,7 +235,7 @@ -- > PFN_vkCreateDebugUtilsMessengerEXT pfnCreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT)vkGetInstanceProcAddr(instance, "vkCreateDebugUtilsMessengerEXT"); -- > PFN_vkDestroyDebugUtilsMessengerEXT pfnDestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT)vkGetInstanceProcAddr(instance, "vkDestroyDebugUtilsMessengerEXT"); -- > --- > VkDebugUtilsMessengeCreateInfoEXT callback1 = { +-- > VkDebugUtilsMessengerCreateInfoEXT callback1 = { -- > VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT, // sType -- > NULL, // pNext -- > 0, // flags @@ -252,7 +252,7 @@ -- > } -- > -- > callback1.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT; --- > callback1.pfnCallback = myDebugBreak; +-- > callback1.pfnUserCallback = myDebugBreak; -- > callback1.pUserData = NULL; -- > res = pfnCreateDebugUtilsMessengerEXT(instance, &callback1, NULL, &cb2); -- > if (res != VK_SUCCESS) { diff --git a/src/Vulkan/Extensions/VK_EXT_shader_image_atomic_int64.hs b/src/Vulkan/Extensions/VK_EXT_shader_image_atomic_int64.hs index 6ddfbc989..99b2adefb 100644 --- a/src/Vulkan/Extensions/VK_EXT_shader_image_atomic_int64.hs +++ b/src/Vulkan/Extensions/VK_EXT_shader_image_atomic_int64.hs @@ -51,7 +51,7 @@ -- [__Interactions and External Dependencies__] -- -- - This extension requires the --- +-- -- SPIR-V extension. -- -- - This extension requires the diff --git a/src/Vulkan/Extensions/VK_EXT_shader_image_atomic_int64.hs-boot b/src/Vulkan/Extensions/VK_EXT_shader_image_atomic_int64.hs-boot index ad86ab4e8..ef1b57deb 100644 --- a/src/Vulkan/Extensions/VK_EXT_shader_image_atomic_int64.hs-boot +++ b/src/Vulkan/Extensions/VK_EXT_shader_image_atomic_int64.hs-boot @@ -51,7 +51,7 @@ -- [__Interactions and External Dependencies__] -- -- - This extension requires the --- +-- -- SPIR-V extension. -- -- - This extension requires the diff --git a/src/Vulkan/Extensions/VK_EXT_transform_feedback.hs b/src/Vulkan/Extensions/VK_EXT_transform_feedback.hs index 31c96897a..fd87d004e 100644 --- a/src/Vulkan/Extensions/VK_EXT_transform_feedback.hs +++ b/src/Vulkan/Extensions/VK_EXT_transform_feedback.hs @@ -823,12 +823,6 @@ foreign import ccall -- -- == Valid Usage -- --- - #VUID-vkCmdBeginQueryIndexedEXT-queryPool-01922# @queryPool@ /must/ --- have been created with a @queryType@ that differs from that of any --- queries that are --- --- within @commandBuffer@ --- -- - #VUID-vkCmdBeginQueryIndexedEXT-None-00807# All queries used by the -- command /must/ be unavailable -- @@ -885,6 +879,12 @@ foreign import ccall -- in the current subpass’s view mask /must/ be less than or equal to -- the number of queries in @queryPool@ -- +-- - #VUID-vkCmdBeginQueryIndexedEXT-queryPool-04753# If the @queryPool@ +-- was created with the same @queryType@ as that of another +-- +-- query within @commandBuffer@, then @index@ /must/ not match the +-- index used for the active query +-- -- - #VUID-vkCmdBeginQueryIndexedEXT-queryType-02338# If the @queryType@ -- used to create @queryPool@ was -- 'Vulkan.Core10.Enums.QueryType.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT' @@ -1189,6 +1189,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDrawIndirectByteCountEXT-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDrawIndirectByteCountEXT-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -1341,7 +1351,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDrawIndirectByteCountEXT-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -1588,6 +1598,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDrawIndirectByteCountEXT-rasterizationSamples-04740# If +-- rasterization is not disabled in the bound graphics pipeline, and +-- neither the @@ nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDrawIndirectByteCountEXT-None-04007# All vertex input -- bindings accessed via vertex input variables declared in the vertex -- shader entry point’s interface /must/ have either valid or diff --git a/src/Vulkan/Extensions/VK_FUCHSIA_external_memory.hs b/src/Vulkan/Extensions/VK_FUCHSIA_external_memory.hs new file mode 100644 index 000000000..6da3ed1ea --- /dev/null +++ b/src/Vulkan/Extensions/VK_FUCHSIA_external_memory.hs @@ -0,0 +1,511 @@ +{-# language CPP #-} +-- | = Name +-- +-- VK_FUCHSIA_external_memory - device extension +-- +-- == VK_FUCHSIA_external_memory +-- +-- [__Name String__] +-- @VK_FUCHSIA_external_memory@ +-- +-- [__Extension Type__] +-- Device extension +-- +-- [__Registered Extension Number__] +-- 365 +-- +-- [__Revision__] +-- 1 +-- +-- [__Extension and Version Dependencies__] +-- +-- - Requires Vulkan 1.0 +-- +-- - Requires @VK_KHR_external_memory_capabilities@ +-- +-- - Requires @VK_KHR_external_memory@ +-- +-- [__Contact__] +-- +-- - John Rosasco +-- +-- +-- == Other Extension Metadata +-- +-- [__Last Modified Date__] +-- 2021-03-01 +-- +-- [__IP Status__] +-- No known IP claims. +-- +-- [__Contributors__] +-- +-- - Craig Stout, Google +-- +-- - John Bauman, Google +-- +-- - John Rosasco, Google +-- +-- == Description +-- +-- Vulkan apps may wish to export or import device memory handles to or +-- from other logical devices, instances or APIs. +-- +-- This memory sharing can eliminate copies of memory buffers when +-- different subsystems need to interoperate on them. Sharing memory +-- buffers may also facilitate a better distribution of processing workload +-- for more complex memory manipulation pipelines. +-- +-- == New Commands +-- +-- - 'getMemoryZirconHandleFUCHSIA' +-- +-- - 'getMemoryZirconHandlePropertiesFUCHSIA' +-- +-- == New Structures +-- +-- - 'MemoryGetZirconHandleInfoFUCHSIA' +-- +-- - 'MemoryZirconHandlePropertiesFUCHSIA' +-- +-- - Extending 'Vulkan.Core10.Memory.MemoryAllocateInfo': +-- +-- - 'ImportMemoryZirconHandleInfoFUCHSIA' +-- +-- == New Enum Constants +-- +-- - 'FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME' +-- +-- - 'FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION' +-- +-- - Extending +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits': +-- +-- - 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA' +-- +-- - Extending 'Vulkan.Core10.Enums.StructureType.StructureType': +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA' +-- +-- == Issues +-- +-- See @VK_KHR_external_memory@ issues list for further information. +-- +-- == Version History +-- +-- - Revision 1, 2021-03-01 (John Rosasco) +-- +-- - Initial draft +-- +-- = See Also +-- +-- 'ImportMemoryZirconHandleInfoFUCHSIA', +-- 'MemoryGetZirconHandleInfoFUCHSIA', +-- 'MemoryZirconHandlePropertiesFUCHSIA', 'getMemoryZirconHandleFUCHSIA', +-- 'getMemoryZirconHandlePropertiesFUCHSIA' +-- +-- = Document Notes +-- +-- For more information, see the +-- +-- +-- This page is a generated document. Fixes and changes should be made to +-- the generator scripts, not directly. +module Vulkan.Extensions.VK_FUCHSIA_external_memory ( getMemoryZirconHandleFUCHSIA + , getMemoryZirconHandlePropertiesFUCHSIA + , ImportMemoryZirconHandleInfoFUCHSIA(..) + , MemoryZirconHandlePropertiesFUCHSIA(..) + , MemoryGetZirconHandleInfoFUCHSIA(..) + , FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION + , pattern FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION + , FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME + , pattern FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME + , Zx_handle_t + ) where + +import Vulkan.Internal.Utils (traceAroundEvent) +import Control.Exception.Base (bracket) +import Control.Monad (unless) +import Control.Monad.IO.Class (liftIO) +import Foreign.Marshal.Alloc (allocaBytesAligned) +import Foreign.Marshal.Alloc (callocBytes) +import Foreign.Marshal.Alloc (free) +import GHC.Base (when) +import GHC.IO (throwIO) +import GHC.Ptr (nullFunPtr) +import Foreign.Ptr (nullPtr) +import Foreign.Ptr (plusPtr) +import Control.Monad.Trans.Class (lift) +import Control.Monad.Trans.Cont (evalContT) +import Vulkan.CStruct (FromCStruct) +import Vulkan.CStruct (FromCStruct(..)) +import Vulkan.CStruct (ToCStruct) +import Vulkan.CStruct (ToCStruct(..)) +import Vulkan.Zero (Zero(..)) +import Control.Monad.IO.Class (MonadIO) +import Data.String (IsString) +import Data.Typeable (Typeable) +import Foreign.Storable (Storable) +import Foreign.Storable (Storable(peek)) +import Foreign.Storable (Storable(poke)) +import qualified Foreign.Storable (Storable(..)) +import GHC.Generics (Generic) +import GHC.IO.Exception (IOErrorType(..)) +import GHC.IO.Exception (IOException(..)) +import Foreign.Ptr (FunPtr) +import Foreign.Ptr (Ptr) +import Data.Word (Word32) +import Data.Kind (Type) +import Control.Monad.Trans.Cont (ContT(..)) +import Vulkan.NamedType ((:::)) +import Vulkan.Core10.Handles (Device) +import Vulkan.Core10.Handles (Device(..)) +import Vulkan.Dynamic (DeviceCmds(pVkGetMemoryZirconHandleFUCHSIA)) +import Vulkan.Dynamic (DeviceCmds(pVkGetMemoryZirconHandlePropertiesFUCHSIA)) +import Vulkan.Core10.Handles (DeviceMemory) +import Vulkan.Core10.Handles (Device_T) +import Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits (ExternalMemoryHandleTypeFlagBits) +import Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits (ExternalMemoryHandleTypeFlagBits(..)) +import Vulkan.Core10.Enums.Result (Result) +import Vulkan.Core10.Enums.Result (Result(..)) +import Vulkan.Core10.Enums.StructureType (StructureType) +import Vulkan.Exception (VulkanException(..)) +import Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface (Zx_handle_t) +import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA)) +import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA)) +import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA)) +import Vulkan.Core10.Enums.Result (Result(SUCCESS)) +import Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface (Zx_handle_t) +foreign import ccall +#if !defined(SAFE_FOREIGN_CALLS) + unsafe +#endif + "dynamic" mkVkGetMemoryZirconHandleFUCHSIA + :: FunPtr (Ptr Device_T -> Ptr MemoryGetZirconHandleInfoFUCHSIA -> Ptr Zx_handle_t -> IO Result) -> Ptr Device_T -> Ptr MemoryGetZirconHandleInfoFUCHSIA -> Ptr Zx_handle_t -> IO Result + +-- | vkGetMemoryZirconHandleFUCHSIA - Get a Zircon handle for an external +-- memory object +-- +-- == Return Codes +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.SUCCESS' +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.ERROR_TOO_MANY_OBJECTS' +-- +-- - 'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY' +-- +-- = See Also +-- +-- 'Vulkan.Core10.Handles.Device', 'MemoryGetZirconHandleInfoFUCHSIA' +getMemoryZirconHandleFUCHSIA :: forall io + . (MonadIO io) + => -- | @device@ is the VkDevice. + -- + -- #VUID-vkGetMemoryZirconHandleFUCHSIA-device-parameter# @device@ /must/ + -- be a valid 'Vulkan.Core10.Handles.Device' handle + Device + -> -- | @pGetZirconHandleInfo@ is a pointer to a + -- 'MemoryGetZirconHandleInfoFUCHSIA' structure. + -- + -- #VUID-vkGetMemoryZirconHandleFUCHSIA-pGetZirconHandleInfo-parameter# + -- @pGetZirconHandleInfo@ /must/ be a valid pointer to a valid + -- 'MemoryGetZirconHandleInfoFUCHSIA' structure + MemoryGetZirconHandleInfoFUCHSIA + -> io (("zirconHandle" ::: Zx_handle_t)) +getMemoryZirconHandleFUCHSIA device getZirconHandleInfo = liftIO . evalContT $ do + let vkGetMemoryZirconHandleFUCHSIAPtr = pVkGetMemoryZirconHandleFUCHSIA (deviceCmds (device :: Device)) + lift $ unless (vkGetMemoryZirconHandleFUCHSIAPtr /= nullFunPtr) $ + throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkGetMemoryZirconHandleFUCHSIA is null" Nothing Nothing + let vkGetMemoryZirconHandleFUCHSIA' = mkVkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIAPtr + pGetZirconHandleInfo <- ContT $ withCStruct (getZirconHandleInfo) + pPZirconHandle <- ContT $ bracket (callocBytes @Zx_handle_t 4) free + r <- lift $ traceAroundEvent "vkGetMemoryZirconHandleFUCHSIA" (vkGetMemoryZirconHandleFUCHSIA' (deviceHandle (device)) pGetZirconHandleInfo (pPZirconHandle)) + lift $ when (r < SUCCESS) (throwIO (VulkanException r)) + pZirconHandle <- lift $ peek @Zx_handle_t pPZirconHandle + pure $ (pZirconHandle) + + +foreign import ccall +#if !defined(SAFE_FOREIGN_CALLS) + unsafe +#endif + "dynamic" mkVkGetMemoryZirconHandlePropertiesFUCHSIA + :: FunPtr (Ptr Device_T -> ExternalMemoryHandleTypeFlagBits -> Zx_handle_t -> Ptr MemoryZirconHandlePropertiesFUCHSIA -> IO Result) -> Ptr Device_T -> ExternalMemoryHandleTypeFlagBits -> Zx_handle_t -> Ptr MemoryZirconHandlePropertiesFUCHSIA -> IO Result + +-- | vkGetMemoryZirconHandlePropertiesFUCHSIA - Get a Zircon handle +-- properties for an external memory object +-- +-- == Return Codes +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.SUCCESS' +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.ERROR_INVALID_EXTERNAL_HANDLE' +-- +-- = See Also +-- +-- 'Vulkan.Core10.Handles.Device', +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits', +-- 'MemoryZirconHandlePropertiesFUCHSIA' +getMemoryZirconHandlePropertiesFUCHSIA :: forall io + . (MonadIO io) + => -- | @device@ is the VkDevice. + -- + -- #VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-device-parameter# + -- @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle + Device + -> -- | @handleType@ is the type of @zirconHandle@ + -- + -- #VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-handleType-04773# + -- @handleType@ /must/ be + -- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA'. + -- + -- #VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-handleType-parameter# + -- @handleType@ /must/ be a valid + -- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits' + -- value + ExternalMemoryHandleTypeFlagBits + -> -- | @zirconHandle@ is a @zx_handle_t@ (Zircon) handle to the external + -- resource. + -- + -- #VUID-vkGetMemoryZirconHandlePropertiesFUCHSIA-zirconHandle-04774# + -- @zirconHandle@ must reference a valid VMO. + ("zirconHandle" ::: Zx_handle_t) + -> io (MemoryZirconHandlePropertiesFUCHSIA) +getMemoryZirconHandlePropertiesFUCHSIA device handleType zirconHandle = liftIO . evalContT $ do + let vkGetMemoryZirconHandlePropertiesFUCHSIAPtr = pVkGetMemoryZirconHandlePropertiesFUCHSIA (deviceCmds (device :: Device)) + lift $ unless (vkGetMemoryZirconHandlePropertiesFUCHSIAPtr /= nullFunPtr) $ + throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkGetMemoryZirconHandlePropertiesFUCHSIA is null" Nothing Nothing + let vkGetMemoryZirconHandlePropertiesFUCHSIA' = mkVkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIAPtr + pPMemoryZirconHandleProperties <- ContT (withZeroCStruct @MemoryZirconHandlePropertiesFUCHSIA) + r <- lift $ traceAroundEvent "vkGetMemoryZirconHandlePropertiesFUCHSIA" (vkGetMemoryZirconHandlePropertiesFUCHSIA' (deviceHandle (device)) (handleType) (zirconHandle) (pPMemoryZirconHandleProperties)) + lift $ when (r < SUCCESS) (throwIO (VulkanException r)) + pMemoryZirconHandleProperties <- lift $ peekCStruct @MemoryZirconHandlePropertiesFUCHSIA pPMemoryZirconHandleProperties + pure $ (pMemoryZirconHandleProperties) + + +-- | VkImportMemoryZirconHandleInfoFUCHSIA - Structure specifying import +-- parameters for Zircon handle to external memory +-- +-- == Valid Usage +-- +-- - #VUID-VkImportMemoryZirconHandleInfoFUCHSIA-handleType-04771# +-- @handleType@ /must/ be +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA'. +-- +-- - #VUID-VkImportMemoryZirconHandleInfoFUCHSIA-handle-04772# @handle@ +-- must be a valid VMO handle. +-- +-- == Valid Usage (Implicit) +-- +-- - #VUID-VkImportMemoryZirconHandleInfoFUCHSIA-sType-sType# @sType@ +-- /must/ be +-- 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- - #VUID-VkImportMemoryZirconHandleInfoFUCHSIA-handleType-parameter# If +-- @handleType@ is not @0@, @handleType@ /must/ be a valid +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits' +-- value +-- +-- = See Also +-- +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits', +-- 'Vulkan.Core10.Enums.StructureType.StructureType' +data ImportMemoryZirconHandleInfoFUCHSIA = ImportMemoryZirconHandleInfoFUCHSIA + { -- | @handleType@ is the type of @handle@. + handleType :: ExternalMemoryHandleTypeFlagBits + , -- | @handle@ is a @zx_handle_t@ (Zircon) handle to the external memory. + handle :: Zx_handle_t + } + deriving (Typeable, Eq) +#if defined(GENERIC_INSTANCES) +deriving instance Generic (ImportMemoryZirconHandleInfoFUCHSIA) +#endif +deriving instance Show ImportMemoryZirconHandleInfoFUCHSIA + +instance ToCStruct ImportMemoryZirconHandleInfoFUCHSIA where + withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p) + pokeCStruct p ImportMemoryZirconHandleInfoFUCHSIA{..} f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr ExternalMemoryHandleTypeFlagBits)) (handleType) + poke ((p `plusPtr` 20 :: Ptr Zx_handle_t)) (handle) + f + cStructSize = 24 + cStructAlignment = 8 + pokeZeroCStruct p f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + f + +instance FromCStruct ImportMemoryZirconHandleInfoFUCHSIA where + peekCStruct p = do + handleType <- peek @ExternalMemoryHandleTypeFlagBits ((p `plusPtr` 16 :: Ptr ExternalMemoryHandleTypeFlagBits)) + handle <- peek @Zx_handle_t ((p `plusPtr` 20 :: Ptr Zx_handle_t)) + pure $ ImportMemoryZirconHandleInfoFUCHSIA + handleType handle + +instance Storable ImportMemoryZirconHandleInfoFUCHSIA where + sizeOf ~_ = 24 + alignment ~_ = 8 + peek = peekCStruct + poke ptr poked = pokeCStruct ptr poked (pure ()) + +instance Zero ImportMemoryZirconHandleInfoFUCHSIA where + zero = ImportMemoryZirconHandleInfoFUCHSIA + zero + zero + + +-- | VkMemoryZirconHandlePropertiesFUCHSIA - Structure specifying Zircon +-- handle compatible external memory +-- +-- == Valid Usage (Implicit) +-- +-- = See Also +-- +-- 'Vulkan.Core10.Enums.StructureType.StructureType', +-- 'getMemoryZirconHandlePropertiesFUCHSIA' +data MemoryZirconHandlePropertiesFUCHSIA = MemoryZirconHandlePropertiesFUCHSIA + { -- | @memoryTypeBits@ a bitmask containing one bit set for every memory type + -- which the specified handle can be imported as. + memoryTypeBits :: Word32 } + deriving (Typeable, Eq) +#if defined(GENERIC_INSTANCES) +deriving instance Generic (MemoryZirconHandlePropertiesFUCHSIA) +#endif +deriving instance Show MemoryZirconHandlePropertiesFUCHSIA + +instance ToCStruct MemoryZirconHandlePropertiesFUCHSIA where + withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p) + pokeCStruct p MemoryZirconHandlePropertiesFUCHSIA{..} f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr Word32)) (memoryTypeBits) + f + cStructSize = 24 + cStructAlignment = 8 + pokeZeroCStruct p f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr Word32)) (zero) + f + +instance FromCStruct MemoryZirconHandlePropertiesFUCHSIA where + peekCStruct p = do + memoryTypeBits <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32)) + pure $ MemoryZirconHandlePropertiesFUCHSIA + memoryTypeBits + +instance Storable MemoryZirconHandlePropertiesFUCHSIA where + sizeOf ~_ = 24 + alignment ~_ = 8 + peek = peekCStruct + poke ptr poked = pokeCStruct ptr poked (pure ()) + +instance Zero MemoryZirconHandlePropertiesFUCHSIA where + zero = MemoryZirconHandlePropertiesFUCHSIA + zero + + +-- | VkMemoryGetZirconHandleInfoFUCHSIA - Structure specifying export +-- parameters for Zircon handle to device memory +-- +-- == Valid Usage (Implicit) +-- +-- = See Also +-- +-- 'Vulkan.Core10.Handles.DeviceMemory', +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits', +-- 'Vulkan.Core10.Enums.StructureType.StructureType', +-- 'getMemoryZirconHandleFUCHSIA' +data MemoryGetZirconHandleInfoFUCHSIA = MemoryGetZirconHandleInfoFUCHSIA + { -- | @memory@ the 'Vulkan.Core10.Handles.DeviceMemory' being exported. + -- + -- #VUID-VkMemoryGetZirconHandleInfoFUCHSIA-memory-parameter# @memory@ + -- /must/ be a valid 'Vulkan.Core10.Handles.DeviceMemory' handle + memory :: DeviceMemory + , -- | @handleType@ is the type of the handle pointed to by @pZirconHandle@ as + -- retrieved by the call to 'getMemoryZirconHandleFUCHSIA'. + -- + -- #VUID-VkMemoryGetZirconHandleInfoFUCHSIA-handleType-04775# @handleType@ + -- /must/ be + -- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA'. + -- + -- #VUID-VkMemoryGetZirconHandleInfoFUCHSIA-handleType-04776# @handleType@ + -- /must/ have been included in the @handleTypes@ field of the + -- 'Vulkan.Core11.Promoted_From_VK_KHR_external_memory.ExportMemoryAllocateInfo' + -- structure when the external memory was allocated. + -- + -- #VUID-VkMemoryGetZirconHandleInfoFUCHSIA-handleType-parameter# + -- @handleType@ /must/ be a valid + -- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits' + -- value + handleType :: ExternalMemoryHandleTypeFlagBits + } + deriving (Typeable, Eq) +#if defined(GENERIC_INSTANCES) +deriving instance Generic (MemoryGetZirconHandleInfoFUCHSIA) +#endif +deriving instance Show MemoryGetZirconHandleInfoFUCHSIA + +instance ToCStruct MemoryGetZirconHandleInfoFUCHSIA where + withCStruct x f = allocaBytesAligned 32 8 $ \p -> pokeCStruct p x (f p) + pokeCStruct p MemoryGetZirconHandleInfoFUCHSIA{..} f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr DeviceMemory)) (memory) + poke ((p `plusPtr` 24 :: Ptr ExternalMemoryHandleTypeFlagBits)) (handleType) + f + cStructSize = 32 + cStructAlignment = 8 + pokeZeroCStruct p f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr DeviceMemory)) (zero) + poke ((p `plusPtr` 24 :: Ptr ExternalMemoryHandleTypeFlagBits)) (zero) + f + +instance FromCStruct MemoryGetZirconHandleInfoFUCHSIA where + peekCStruct p = do + memory <- peek @DeviceMemory ((p `plusPtr` 16 :: Ptr DeviceMemory)) + handleType <- peek @ExternalMemoryHandleTypeFlagBits ((p `plusPtr` 24 :: Ptr ExternalMemoryHandleTypeFlagBits)) + pure $ MemoryGetZirconHandleInfoFUCHSIA + memory handleType + +instance Storable MemoryGetZirconHandleInfoFUCHSIA where + sizeOf ~_ = 32 + alignment ~_ = 8 + peek = peekCStruct + poke ptr poked = pokeCStruct ptr poked (pure ()) + +instance Zero MemoryGetZirconHandleInfoFUCHSIA where + zero = MemoryGetZirconHandleInfoFUCHSIA + zero + zero + + +type FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION = 1 + +-- No documentation found for TopLevel "VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION" +pattern FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION :: forall a . Integral a => a +pattern FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION = 1 + + +type FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_FUCHSIA_external_memory" + +-- No documentation found for TopLevel "VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME" +pattern FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a +pattern FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_FUCHSIA_external_memory" + diff --git a/src/Vulkan/Extensions/VK_FUCHSIA_external_memory.hs-boot b/src/Vulkan/Extensions/VK_FUCHSIA_external_memory.hs-boot new file mode 100644 index 000000000..ebf130f31 --- /dev/null +++ b/src/Vulkan/Extensions/VK_FUCHSIA_external_memory.hs-boot @@ -0,0 +1,149 @@ +{-# language CPP #-} +-- | = Name +-- +-- VK_FUCHSIA_external_memory - device extension +-- +-- == VK_FUCHSIA_external_memory +-- +-- [__Name String__] +-- @VK_FUCHSIA_external_memory@ +-- +-- [__Extension Type__] +-- Device extension +-- +-- [__Registered Extension Number__] +-- 365 +-- +-- [__Revision__] +-- 1 +-- +-- [__Extension and Version Dependencies__] +-- +-- - Requires Vulkan 1.0 +-- +-- - Requires @VK_KHR_external_memory_capabilities@ +-- +-- - Requires @VK_KHR_external_memory@ +-- +-- [__Contact__] +-- +-- - John Rosasco +-- +-- +-- == Other Extension Metadata +-- +-- [__Last Modified Date__] +-- 2021-03-01 +-- +-- [__IP Status__] +-- No known IP claims. +-- +-- [__Contributors__] +-- +-- - Craig Stout, Google +-- +-- - John Bauman, Google +-- +-- - John Rosasco, Google +-- +-- == Description +-- +-- Vulkan apps may wish to export or import device memory handles to or +-- from other logical devices, instances or APIs. +-- +-- This memory sharing can eliminate copies of memory buffers when +-- different subsystems need to interoperate on them. Sharing memory +-- buffers may also facilitate a better distribution of processing workload +-- for more complex memory manipulation pipelines. +-- +-- == New Commands +-- +-- - 'getMemoryZirconHandleFUCHSIA' +-- +-- - 'getMemoryZirconHandlePropertiesFUCHSIA' +-- +-- == New Structures +-- +-- - 'MemoryGetZirconHandleInfoFUCHSIA' +-- +-- - 'MemoryZirconHandlePropertiesFUCHSIA' +-- +-- - Extending 'Vulkan.Core10.Memory.MemoryAllocateInfo': +-- +-- - 'ImportMemoryZirconHandleInfoFUCHSIA' +-- +-- == New Enum Constants +-- +-- - 'FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME' +-- +-- - 'FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION' +-- +-- - Extending +-- 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.ExternalMemoryHandleTypeFlagBits': +-- +-- - 'Vulkan.Core11.Enums.ExternalMemoryHandleTypeFlagBits.EXTERNAL_MEMORY_HANDLE_TYPE_ZIRCON_VMO_BIT_FUCHSIA' +-- +-- - Extending 'Vulkan.Core10.Enums.StructureType.StructureType': +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA' +-- +-- == Issues +-- +-- See @VK_KHR_external_memory@ issues list for further information. +-- +-- == Version History +-- +-- - Revision 1, 2021-03-01 (John Rosasco) +-- +-- - Initial draft +-- +-- = See Also +-- +-- 'ImportMemoryZirconHandleInfoFUCHSIA', +-- 'MemoryGetZirconHandleInfoFUCHSIA', +-- 'MemoryZirconHandlePropertiesFUCHSIA', 'getMemoryZirconHandleFUCHSIA', +-- 'getMemoryZirconHandlePropertiesFUCHSIA' +-- +-- = Document Notes +-- +-- For more information, see the +-- +-- +-- This page is a generated document. Fixes and changes should be made to +-- the generator scripts, not directly. +module Vulkan.Extensions.VK_FUCHSIA_external_memory ( ImportMemoryZirconHandleInfoFUCHSIA + , MemoryGetZirconHandleInfoFUCHSIA + , MemoryZirconHandlePropertiesFUCHSIA + ) where + +import Vulkan.CStruct (FromCStruct) +import Vulkan.CStruct (ToCStruct) +import Data.Kind (Type) + +data ImportMemoryZirconHandleInfoFUCHSIA + +instance ToCStruct ImportMemoryZirconHandleInfoFUCHSIA +instance Show ImportMemoryZirconHandleInfoFUCHSIA + +instance FromCStruct ImportMemoryZirconHandleInfoFUCHSIA + + +data MemoryGetZirconHandleInfoFUCHSIA + +instance ToCStruct MemoryGetZirconHandleInfoFUCHSIA +instance Show MemoryGetZirconHandleInfoFUCHSIA + +instance FromCStruct MemoryGetZirconHandleInfoFUCHSIA + + +data MemoryZirconHandlePropertiesFUCHSIA + +instance ToCStruct MemoryZirconHandlePropertiesFUCHSIA +instance Show MemoryZirconHandlePropertiesFUCHSIA + +instance FromCStruct MemoryZirconHandlePropertiesFUCHSIA + diff --git a/src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs b/src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs new file mode 100644 index 000000000..c0ded296d --- /dev/null +++ b/src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs @@ -0,0 +1,578 @@ +{-# language CPP #-} +-- | = Name +-- +-- VK_FUCHSIA_external_semaphore - device extension +-- +-- == VK_FUCHSIA_external_semaphore +-- +-- [__Name String__] +-- @VK_FUCHSIA_external_semaphore@ +-- +-- [__Extension Type__] +-- Device extension +-- +-- [__Registered Extension Number__] +-- 366 +-- +-- [__Revision__] +-- 1 +-- +-- [__Extension and Version Dependencies__] +-- +-- - Requires Vulkan 1.0 +-- +-- - Requires @VK_KHR_external_semaphore_capabilities@ +-- +-- - Requires @VK_KHR_external_semaphore@ +-- +-- [__Contact__] +-- +-- - John Rosasco +-- +-- +-- == Other Extension Metadata +-- +-- [__Last Modified Date__] +-- 2021-03-08 +-- +-- [__IP Status__] +-- No known IP claims. +-- +-- [__Contributors__] +-- +-- - Craig Stout, Google +-- +-- - John Bauman, Google +-- +-- - John Rosasco, Google +-- +-- == Description +-- +-- An application using external memory may wish to synchronize access to +-- that memory using semaphores. This extension enables an application to +-- export semaphore payload to and import semaphore payload from Zircon +-- event handles. +-- +-- == New Commands +-- +-- - 'getSemaphoreZirconHandleFUCHSIA' +-- +-- - 'importSemaphoreZirconHandleFUCHSIA' +-- +-- == New Structures +-- +-- - 'ImportSemaphoreZirconHandleInfoFUCHSIA' +-- +-- - 'SemaphoreGetZirconHandleInfoFUCHSIA' +-- +-- == New Enum Constants +-- +-- - 'FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME' +-- +-- - 'FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION' +-- +-- - Extending +-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits': +-- +-- - 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA' +-- +-- - Extending 'Vulkan.Core10.Enums.StructureType.StructureType': +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- == Issues +-- +-- 1) Does the application need to close the Zircon event handle returned +-- by 'getSemaphoreZirconHandleFUCHSIA'? +-- +-- __RESOLVED__: Yes, unless it is passed back in to a driver instance to +-- import the semaphore. A successful get call transfers ownership of the +-- Zircon event handle to the application, and a successful import +-- transfers it back to the driver. Destroying the original semaphore +-- object will not close the Zircon event handle nor remove its reference +-- to the underlying semaphore resource associated with it. +-- +-- == Version History +-- +-- - Revision 1, 2021-03-08 (John Rosasco) +-- +-- - Initial revision +-- +-- = See Also +-- +-- 'ImportSemaphoreZirconHandleInfoFUCHSIA', +-- 'SemaphoreGetZirconHandleInfoFUCHSIA', +-- 'getSemaphoreZirconHandleFUCHSIA', 'importSemaphoreZirconHandleFUCHSIA' +-- +-- = Document Notes +-- +-- For more information, see the +-- +-- +-- This page is a generated document. Fixes and changes should be made to +-- the generator scripts, not directly. +module Vulkan.Extensions.VK_FUCHSIA_external_semaphore ( getSemaphoreZirconHandleFUCHSIA + , importSemaphoreZirconHandleFUCHSIA + , ImportSemaphoreZirconHandleInfoFUCHSIA(..) + , SemaphoreGetZirconHandleInfoFUCHSIA(..) + , FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION + , pattern FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION + , FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME + , pattern FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME + , Zx_handle_t + ) where + +import Vulkan.Internal.Utils (traceAroundEvent) +import Control.Exception.Base (bracket) +import Control.Monad (unless) +import Control.Monad.IO.Class (liftIO) +import Foreign.Marshal.Alloc (allocaBytesAligned) +import Foreign.Marshal.Alloc (callocBytes) +import Foreign.Marshal.Alloc (free) +import GHC.Base (when) +import GHC.IO (throwIO) +import GHC.Ptr (nullFunPtr) +import Foreign.Ptr (nullPtr) +import Foreign.Ptr (plusPtr) +import Control.Monad.Trans.Class (lift) +import Control.Monad.Trans.Cont (evalContT) +import Vulkan.CStruct (FromCStruct) +import Vulkan.CStruct (FromCStruct(..)) +import Vulkan.CStruct (ToCStruct) +import Vulkan.CStruct (ToCStruct(..)) +import Vulkan.Zero (Zero(..)) +import Control.Monad.IO.Class (MonadIO) +import Data.String (IsString) +import Data.Typeable (Typeable) +import Foreign.Storable (Storable) +import Foreign.Storable (Storable(peek)) +import Foreign.Storable (Storable(poke)) +import qualified Foreign.Storable (Storable(..)) +import GHC.Generics (Generic) +import GHC.IO.Exception (IOErrorType(..)) +import GHC.IO.Exception (IOException(..)) +import Foreign.Ptr (FunPtr) +import Foreign.Ptr (Ptr) +import Data.Kind (Type) +import Control.Monad.Trans.Cont (ContT(..)) +import Vulkan.NamedType ((:::)) +import Vulkan.Core10.Handles (Device) +import Vulkan.Core10.Handles (Device(..)) +import Vulkan.Dynamic (DeviceCmds(pVkGetSemaphoreZirconHandleFUCHSIA)) +import Vulkan.Dynamic (DeviceCmds(pVkImportSemaphoreZirconHandleFUCHSIA)) +import Vulkan.Core10.Handles (Device_T) +import Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits (ExternalSemaphoreHandleTypeFlagBits) +import Vulkan.Core10.Enums.Result (Result) +import Vulkan.Core10.Enums.Result (Result(..)) +import Vulkan.Core10.Handles (Semaphore) +import Vulkan.Core11.Enums.SemaphoreImportFlagBits (SemaphoreImportFlags) +import Vulkan.Core10.Enums.StructureType (StructureType) +import Vulkan.Exception (VulkanException(..)) +import Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface (Zx_handle_t) +import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA)) +import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA)) +import Vulkan.Core10.Enums.Result (Result(SUCCESS)) +import Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface (Zx_handle_t) +foreign import ccall +#if !defined(SAFE_FOREIGN_CALLS) + unsafe +#endif + "dynamic" mkVkGetSemaphoreZirconHandleFUCHSIA + :: FunPtr (Ptr Device_T -> Ptr SemaphoreGetZirconHandleInfoFUCHSIA -> Ptr Zx_handle_t -> IO Result) -> Ptr Device_T -> Ptr SemaphoreGetZirconHandleInfoFUCHSIA -> Ptr Zx_handle_t -> IO Result + +-- | vkGetSemaphoreZirconHandleFUCHSIA - Get a Zircon event handle for a +-- semaphore +-- +-- = Description +-- +-- Each call to 'getSemaphoreZirconHandleFUCHSIA' /must/ create a Zircon +-- event handle and transfer ownership of it to the application. To avoid +-- leaking resources, the application /must/ release ownership of the +-- Zircon event handle when it is no longer needed. +-- +-- Note +-- +-- Ownership can be released in many ways. For example, the application can +-- call zx_handle_close() on the file descriptor, or transfer ownership +-- back to Vulkan by using the file descriptor to import a semaphore +-- payload. +-- +-- Exporting a Zircon event handle from a semaphore /may/ have side effects +-- depending on the transference of the specified handle type, as described +-- in +-- . +-- +-- == Return Codes +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.SUCCESS' +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.ERROR_TOO_MANY_OBJECTS' +-- +-- - 'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY' +-- +-- = See Also +-- +-- 'Vulkan.Core10.Handles.Device', 'SemaphoreGetZirconHandleInfoFUCHSIA' +getSemaphoreZirconHandleFUCHSIA :: forall io + . (MonadIO io) + => -- | @device@ is the logical device that created the semaphore being + -- exported. + -- + -- #VUID-vkGetSemaphoreZirconHandleFUCHSIA-device-parameter# @device@ + -- /must/ be a valid 'Vulkan.Core10.Handles.Device' handle + Device + -> -- | @pGetZirconHandleInfo@ is a pointer to a + -- 'SemaphoreGetZirconHandleInfoFUCHSIA' structure containing parameters of + -- the export operation. + -- + -- #VUID-vkGetSemaphoreZirconHandleFUCHSIA-pGetZirconHandleInfo-parameter# + -- @pGetZirconHandleInfo@ /must/ be a valid pointer to a valid + -- 'SemaphoreGetZirconHandleInfoFUCHSIA' structure + SemaphoreGetZirconHandleInfoFUCHSIA + -> io (("zirconHandle" ::: Zx_handle_t)) +getSemaphoreZirconHandleFUCHSIA device getZirconHandleInfo = liftIO . evalContT $ do + let vkGetSemaphoreZirconHandleFUCHSIAPtr = pVkGetSemaphoreZirconHandleFUCHSIA (deviceCmds (device :: Device)) + lift $ unless (vkGetSemaphoreZirconHandleFUCHSIAPtr /= nullFunPtr) $ + throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkGetSemaphoreZirconHandleFUCHSIA is null" Nothing Nothing + let vkGetSemaphoreZirconHandleFUCHSIA' = mkVkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIAPtr + pGetZirconHandleInfo <- ContT $ withCStruct (getZirconHandleInfo) + pPZirconHandle <- ContT $ bracket (callocBytes @Zx_handle_t 4) free + r <- lift $ traceAroundEvent "vkGetSemaphoreZirconHandleFUCHSIA" (vkGetSemaphoreZirconHandleFUCHSIA' (deviceHandle (device)) pGetZirconHandleInfo (pPZirconHandle)) + lift $ when (r < SUCCESS) (throwIO (VulkanException r)) + pZirconHandle <- lift $ peek @Zx_handle_t pPZirconHandle + pure $ (pZirconHandle) + + +foreign import ccall +#if !defined(SAFE_FOREIGN_CALLS) + unsafe +#endif + "dynamic" mkVkImportSemaphoreZirconHandleFUCHSIA + :: FunPtr (Ptr Device_T -> Ptr ImportSemaphoreZirconHandleInfoFUCHSIA -> IO Result) -> Ptr Device_T -> Ptr ImportSemaphoreZirconHandleInfoFUCHSIA -> IO Result + +-- | vkImportSemaphoreZirconHandleFUCHSIA - Import a semaphore from a Zircon +-- event handle +-- +-- = Description +-- +-- Importing a semaphore payload from a Zircon event handle transfers +-- ownership of the handle from the application to the Vulkan +-- implementation. The application /must/ not perform any operations on the +-- handle after a successful import. +-- +-- Applications /can/ import the same semaphore payload into multiple +-- instances of Vulkan, into the same instance from which it was exported, +-- and multiple times into a given Vulkan instance. +-- +-- == Return Codes +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.SUCCESS' +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY' +-- +-- - 'Vulkan.Core10.Enums.Result.ERROR_INVALID_EXTERNAL_HANDLE' +-- +-- = See Also +-- +-- 'Vulkan.Core10.Handles.Device', 'ImportSemaphoreZirconHandleInfoFUCHSIA' +importSemaphoreZirconHandleFUCHSIA :: forall io + . (MonadIO io) + => -- | @device@ is the logical device that created the semaphore. + -- + -- #VUID-vkImportSemaphoreZirconHandleFUCHSIA-device-parameter# @device@ + -- /must/ be a valid 'Vulkan.Core10.Handles.Device' handle + Device + -> -- | @pImportSemaphoreZirconHandleInfo@ is a pointer to a + -- 'ImportSemaphoreZirconHandleInfoFUCHSIA' structure specifying the + -- semaphore and import parameters. + -- + -- #VUID-vkImportSemaphoreZirconHandleFUCHSIA-pImportSemaphoreZirconHandleInfo-parameter# + -- @pImportSemaphoreZirconHandleInfo@ /must/ be a valid pointer to a valid + -- 'ImportSemaphoreZirconHandleInfoFUCHSIA' structure + ImportSemaphoreZirconHandleInfoFUCHSIA + -> io () +importSemaphoreZirconHandleFUCHSIA device importSemaphoreZirconHandleInfo = liftIO . evalContT $ do + let vkImportSemaphoreZirconHandleFUCHSIAPtr = pVkImportSemaphoreZirconHandleFUCHSIA (deviceCmds (device :: Device)) + lift $ unless (vkImportSemaphoreZirconHandleFUCHSIAPtr /= nullFunPtr) $ + throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkImportSemaphoreZirconHandleFUCHSIA is null" Nothing Nothing + let vkImportSemaphoreZirconHandleFUCHSIA' = mkVkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIAPtr + pImportSemaphoreZirconHandleInfo <- ContT $ withCStruct (importSemaphoreZirconHandleInfo) + r <- lift $ traceAroundEvent "vkImportSemaphoreZirconHandleFUCHSIA" (vkImportSemaphoreZirconHandleFUCHSIA' (deviceHandle (device)) pImportSemaphoreZirconHandleInfo) + lift $ when (r < SUCCESS) (throwIO (VulkanException r)) + + +-- | VkImportSemaphoreZirconHandleInfoFUCHSIA - Structure specifying Zircon +-- event handle to import to a semaphore +-- +-- = Description +-- +-- The handle types supported by @handleType@ are: +-- +-- +-------------------------------------------------------------------------------------------------------------------+------------------+---------------------+ +-- | Handle Type | Transference | Permanence | +-- | | | Supported | +-- +===================================================================================================================+==================+=====================+ +-- | 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA' | Reference | Temporary,Permanent | +-- +-------------------------------------------------------------------------------------------------------------------+------------------+---------------------+ +-- +-- Handle Types Supported by 'ImportSemaphoreZirconHandleInfoFUCHSIA' +-- +-- == Valid Usage +-- +-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-04765# +-- @handleType@ /must/ be a value included in the +-- +-- table. +-- +-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04766# +-- @zirconHandle@ /must/ obey any requirements listed for @handleType@ +-- in +-- . +-- +-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-zirconHandle-04767# +-- @zirconHandle@ /must/ have @ZX_RIGHTS_BASIC@ and @ZX_RIGHTS_SIGNAL@ +-- rights. +-- +-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphoreType-04768# +-- The +-- 'Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore.SemaphoreTypeCreateInfo'::@semaphoreType@ +-- field /must/ not be +-- 'Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_TIMELINE'. +-- +-- == Valid Usage (Implicit) +-- +-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-sType-sType# @sType@ +-- /must/ be +-- 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-pNext-pNext# @pNext@ +-- /must/ be @NULL@ +-- +-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-semaphore-parameter# +-- @semaphore@ /must/ be a valid 'Vulkan.Core10.Handles.Semaphore' +-- handle +-- +-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-flags-parameter# +-- @flags@ /must/ be a valid combination of +-- 'Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlagBits' +-- values +-- +-- - #VUID-VkImportSemaphoreZirconHandleInfoFUCHSIA-handleType-parameter# +-- @handleType@ /must/ be a valid +-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits' +-- value +-- +-- == Host Synchronization +-- +-- - Host access to @semaphore@ /must/ be externally synchronized +-- +-- = See Also +-- +-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits', +-- 'Vulkan.Core10.Handles.Semaphore', +-- 'Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlags', +-- 'Vulkan.Core10.Enums.StructureType.StructureType', +-- 'importSemaphoreZirconHandleFUCHSIA' +data ImportSemaphoreZirconHandleInfoFUCHSIA = ImportSemaphoreZirconHandleInfoFUCHSIA + { -- | @semaphore@ is the semaphore into which the payload will be imported. + semaphore :: Semaphore + , -- | @flags@ is a bitmask of + -- 'Vulkan.Core11.Enums.SemaphoreImportFlagBits.SemaphoreImportFlagBits' + -- specifying additional parameters for the semaphore payload import + -- operation. + flags :: SemaphoreImportFlags + , -- | @handleType@ specifies the type of @zirconHandle@. + handleType :: ExternalSemaphoreHandleTypeFlagBits + , -- | @zirconHandle@ is the external handle to import. + zirconHandle :: Zx_handle_t + } + deriving (Typeable, Eq) +#if defined(GENERIC_INSTANCES) +deriving instance Generic (ImportSemaphoreZirconHandleInfoFUCHSIA) +#endif +deriving instance Show ImportSemaphoreZirconHandleInfoFUCHSIA + +instance ToCStruct ImportSemaphoreZirconHandleInfoFUCHSIA where + withCStruct x f = allocaBytesAligned 40 8 $ \p -> pokeCStruct p x (f p) + pokeCStruct p ImportSemaphoreZirconHandleInfoFUCHSIA{..} f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr Semaphore)) (semaphore) + poke ((p `plusPtr` 24 :: Ptr SemaphoreImportFlags)) (flags) + poke ((p `plusPtr` 28 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) (handleType) + poke ((p `plusPtr` 32 :: Ptr Zx_handle_t)) (zirconHandle) + f + cStructSize = 40 + cStructAlignment = 8 + pokeZeroCStruct p f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr Semaphore)) (zero) + poke ((p `plusPtr` 28 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) (zero) + poke ((p `plusPtr` 32 :: Ptr Zx_handle_t)) (zero) + f + +instance FromCStruct ImportSemaphoreZirconHandleInfoFUCHSIA where + peekCStruct p = do + semaphore <- peek @Semaphore ((p `plusPtr` 16 :: Ptr Semaphore)) + flags <- peek @SemaphoreImportFlags ((p `plusPtr` 24 :: Ptr SemaphoreImportFlags)) + handleType <- peek @ExternalSemaphoreHandleTypeFlagBits ((p `plusPtr` 28 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) + zirconHandle <- peek @Zx_handle_t ((p `plusPtr` 32 :: Ptr Zx_handle_t)) + pure $ ImportSemaphoreZirconHandleInfoFUCHSIA + semaphore flags handleType zirconHandle + +instance Storable ImportSemaphoreZirconHandleInfoFUCHSIA where + sizeOf ~_ = 40 + alignment ~_ = 8 + peek = peekCStruct + poke ptr poked = pokeCStruct ptr poked (pure ()) + +instance Zero ImportSemaphoreZirconHandleInfoFUCHSIA where + zero = ImportSemaphoreZirconHandleInfoFUCHSIA + zero + zero + zero + zero + + +-- | VkSemaphoreGetZirconHandleInfoFUCHSIA - Structure describing a Zircon +-- event handle semaphore export operation +-- +-- = Description +-- +-- The properties of the Zircon event handle returned depend on the value +-- of @handleType@. See +-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits' +-- for a description of the properties of the defined external semaphore +-- handle types. +-- +-- == Valid Usage +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-04758# +-- @handleType@ /must/ have been included in +-- 'Vulkan.Core11.Promoted_From_VK_KHR_external_semaphore.ExportSemaphoreCreateInfo'::@handleTypes@ +-- when @semaphore@’s current payload was created. +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-semaphore-04759# +-- @semaphore@ /must/ not currently have its payload replaced by an +-- imported payload as described below in +-- +-- unless that imported payload’s handle type was included in +-- 'Vulkan.Core11.Promoted_From_VK_KHR_external_semaphore_capabilities.ExternalSemaphoreProperties'::@exportFromImportedHandleTypes@ +-- for @handleType@. +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-04760# If +-- @handleType@ refers to a handle type with copy payload transference +-- semantics, as defined below in +-- , +-- there /must/ be no queue waiting on @semaphore@. +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-04761# If +-- @handleType@ refers to a handle type with copy payload transference +-- semantics, @semaphore@ /must/ be signaled, or have an associated +-- +-- pending execution. +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-04762# +-- @handleType@ /must/ be defined as a Zircon event handle. +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-semaphore-04763# +-- @semaphore@ /must/ have been created with a +-- 'Vulkan.Core12.Enums.SemaphoreType.SemaphoreType' of +-- 'Vulkan.Core12.Enums.SemaphoreType.SEMAPHORE_TYPE_BINARY'. +-- +-- == Valid Usage (Implicit) +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-sType-sType# @sType@ +-- /must/ be +-- 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-pNext-pNext# @pNext@ +-- /must/ be @NULL@ +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-semaphore-parameter# +-- @semaphore@ /must/ be a valid 'Vulkan.Core10.Handles.Semaphore' +-- handle +-- +-- - #VUID-VkSemaphoreGetZirconHandleInfoFUCHSIA-handleType-parameter# +-- @handleType@ /must/ be a valid +-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits' +-- value +-- +-- = See Also +-- +-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits', +-- 'Vulkan.Core10.Handles.Semaphore', +-- 'Vulkan.Core10.Enums.StructureType.StructureType', +-- 'getSemaphoreZirconHandleFUCHSIA' +data SemaphoreGetZirconHandleInfoFUCHSIA = SemaphoreGetZirconHandleInfoFUCHSIA + { -- | @semaphore@ is the semaphore from which state will be exported. + semaphore :: Semaphore + , -- | @handleType@ is the type of handle requested. + handleType :: ExternalSemaphoreHandleTypeFlagBits + } + deriving (Typeable, Eq) +#if defined(GENERIC_INSTANCES) +deriving instance Generic (SemaphoreGetZirconHandleInfoFUCHSIA) +#endif +deriving instance Show SemaphoreGetZirconHandleInfoFUCHSIA + +instance ToCStruct SemaphoreGetZirconHandleInfoFUCHSIA where + withCStruct x f = allocaBytesAligned 32 8 $ \p -> pokeCStruct p x (f p) + pokeCStruct p SemaphoreGetZirconHandleInfoFUCHSIA{..} f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr Semaphore)) (semaphore) + poke ((p `plusPtr` 24 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) (handleType) + f + cStructSize = 32 + cStructAlignment = 8 + pokeZeroCStruct p f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr Semaphore)) (zero) + poke ((p `plusPtr` 24 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) (zero) + f + +instance FromCStruct SemaphoreGetZirconHandleInfoFUCHSIA where + peekCStruct p = do + semaphore <- peek @Semaphore ((p `plusPtr` 16 :: Ptr Semaphore)) + handleType <- peek @ExternalSemaphoreHandleTypeFlagBits ((p `plusPtr` 24 :: Ptr ExternalSemaphoreHandleTypeFlagBits)) + pure $ SemaphoreGetZirconHandleInfoFUCHSIA + semaphore handleType + +instance Storable SemaphoreGetZirconHandleInfoFUCHSIA where + sizeOf ~_ = 32 + alignment ~_ = 8 + peek = peekCStruct + poke ptr poked = pokeCStruct ptr poked (pure ()) + +instance Zero SemaphoreGetZirconHandleInfoFUCHSIA where + zero = SemaphoreGetZirconHandleInfoFUCHSIA + zero + zero + + +type FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION = 1 + +-- No documentation found for TopLevel "VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION" +pattern FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION :: forall a . Integral a => a +pattern FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION = 1 + + +type FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore" + +-- No documentation found for TopLevel "VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME" +pattern FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a +pattern FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore" + diff --git a/src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs-boot b/src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs-boot new file mode 100644 index 000000000..f3b943158 --- /dev/null +++ b/src/Vulkan/Extensions/VK_FUCHSIA_external_semaphore.hs-boot @@ -0,0 +1,138 @@ +{-# language CPP #-} +-- | = Name +-- +-- VK_FUCHSIA_external_semaphore - device extension +-- +-- == VK_FUCHSIA_external_semaphore +-- +-- [__Name String__] +-- @VK_FUCHSIA_external_semaphore@ +-- +-- [__Extension Type__] +-- Device extension +-- +-- [__Registered Extension Number__] +-- 366 +-- +-- [__Revision__] +-- 1 +-- +-- [__Extension and Version Dependencies__] +-- +-- - Requires Vulkan 1.0 +-- +-- - Requires @VK_KHR_external_semaphore_capabilities@ +-- +-- - Requires @VK_KHR_external_semaphore@ +-- +-- [__Contact__] +-- +-- - John Rosasco +-- +-- +-- == Other Extension Metadata +-- +-- [__Last Modified Date__] +-- 2021-03-08 +-- +-- [__IP Status__] +-- No known IP claims. +-- +-- [__Contributors__] +-- +-- - Craig Stout, Google +-- +-- - John Bauman, Google +-- +-- - John Rosasco, Google +-- +-- == Description +-- +-- An application using external memory may wish to synchronize access to +-- that memory using semaphores. This extension enables an application to +-- export semaphore payload to and import semaphore payload from Zircon +-- event handles. +-- +-- == New Commands +-- +-- - 'getSemaphoreZirconHandleFUCHSIA' +-- +-- - 'importSemaphoreZirconHandleFUCHSIA' +-- +-- == New Structures +-- +-- - 'ImportSemaphoreZirconHandleInfoFUCHSIA' +-- +-- - 'SemaphoreGetZirconHandleInfoFUCHSIA' +-- +-- == New Enum Constants +-- +-- - 'FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME' +-- +-- - 'FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION' +-- +-- - Extending +-- 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.ExternalSemaphoreHandleTypeFlagBits': +-- +-- - 'Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits.EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA' +-- +-- - Extending 'Vulkan.Core10.Enums.StructureType.StructureType': +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA' +-- +-- == Issues +-- +-- 1) Does the application need to close the Zircon event handle returned +-- by 'getSemaphoreZirconHandleFUCHSIA'? +-- +-- __RESOLVED__: Yes, unless it is passed back in to a driver instance to +-- import the semaphore. A successful get call transfers ownership of the +-- Zircon event handle to the application, and a successful import +-- transfers it back to the driver. Destroying the original semaphore +-- object will not close the Zircon event handle nor remove its reference +-- to the underlying semaphore resource associated with it. +-- +-- == Version History +-- +-- - Revision 1, 2021-03-08 (John Rosasco) +-- +-- - Initial revision +-- +-- = See Also +-- +-- 'ImportSemaphoreZirconHandleInfoFUCHSIA', +-- 'SemaphoreGetZirconHandleInfoFUCHSIA', +-- 'getSemaphoreZirconHandleFUCHSIA', 'importSemaphoreZirconHandleFUCHSIA' +-- +-- = Document Notes +-- +-- For more information, see the +-- +-- +-- This page is a generated document. Fixes and changes should be made to +-- the generator scripts, not directly. +module Vulkan.Extensions.VK_FUCHSIA_external_semaphore ( ImportSemaphoreZirconHandleInfoFUCHSIA + , SemaphoreGetZirconHandleInfoFUCHSIA + ) where + +import Vulkan.CStruct (FromCStruct) +import Vulkan.CStruct (ToCStruct) +import Data.Kind (Type) + +data ImportSemaphoreZirconHandleInfoFUCHSIA + +instance ToCStruct ImportSemaphoreZirconHandleInfoFUCHSIA +instance Show ImportSemaphoreZirconHandleInfoFUCHSIA + +instance FromCStruct ImportSemaphoreZirconHandleInfoFUCHSIA + + +data SemaphoreGetZirconHandleInfoFUCHSIA + +instance ToCStruct SemaphoreGetZirconHandleInfoFUCHSIA +instance Show SemaphoreGetZirconHandleInfoFUCHSIA + +instance FromCStruct SemaphoreGetZirconHandleInfoFUCHSIA + diff --git a/src/Vulkan/Extensions/VK_FUCHSIA_imagepipe_surface.hs-boot b/src/Vulkan/Extensions/VK_FUCHSIA_imagepipe_surface.hs-boot index 69b104530..174eb580f 100644 --- a/src/Vulkan/Extensions/VK_FUCHSIA_imagepipe_surface.hs-boot +++ b/src/Vulkan/Extensions/VK_FUCHSIA_imagepipe_surface.hs-boot @@ -91,10 +91,13 @@ -- -- This page is a generated document. Fixes and changes should be made to -- the generator scripts, not directly. -module Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface (ImagePipeSurfaceCreateInfoFUCHSIA) where +module Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface ( ImagePipeSurfaceCreateInfoFUCHSIA + , Zx_handle_t + ) where import Vulkan.CStruct (FromCStruct) import Vulkan.CStruct (ToCStruct) +import Data.Word (Word32) import Data.Kind (Type) data ImagePipeSurfaceCreateInfoFUCHSIA @@ -104,3 +107,6 @@ instance Show ImagePipeSurfaceCreateInfoFUCHSIA instance FromCStruct ImagePipeSurfaceCreateInfoFUCHSIA + +type Zx_handle_t = Word32 + diff --git a/src/Vulkan/Extensions/VK_KHR_acceleration_structure.hs b/src/Vulkan/Extensions/VK_KHR_acceleration_structure.hs index 3be329451..1b5e3fe01 100644 --- a/src/Vulkan/Extensions/VK_KHR_acceleration_structure.hs +++ b/src/Vulkan/Extensions/VK_KHR_acceleration_structure.hs @@ -1705,7 +1705,10 @@ foreign import ccall -- -- - A 64-bit integer of the count of the number of acceleration -- structure handles following. This will be zero for a bottom-level --- acceleration structure. +-- acceleration structure. For top-level acceleration structures this +-- number is implementation-dependent; the number of and ordering of +-- the handles may not match the instance descriptions which were used +-- to build the acceleration structure. -- -- The corresponding handles matching the values returned by -- 'getAccelerationStructureDeviceAddressKHR' or diff --git a/src/Vulkan/Extensions/VK_KHR_pipeline_executable_properties.hs b/src/Vulkan/Extensions/VK_KHR_pipeline_executable_properties.hs index 65563bf64..ab65d3ac3 100644 --- a/src/Vulkan/Extensions/VK_KHR_pipeline_executable_properties.hs +++ b/src/Vulkan/Extensions/VK_KHR_pipeline_executable_properties.hs @@ -415,9 +415,6 @@ foreign import ccall -- - #VUID-vkGetPipelineExecutableStatisticsKHR-pipeline-03274# -- @pipeline@ member of @pExecutableInfo@ /must/ have been created with -- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR' --- set in the @flags@ field of --- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' or --- 'Vulkan.Core10.Pipeline.ComputePipelineCreateInfo' -- -- == Valid Usage (Implicit) -- @@ -525,9 +522,6 @@ foreign import ccall -- - #VUID-vkGetPipelineExecutableInternalRepresentationsKHR-pipeline-03278# -- @pipeline@ member of @pExecutableInfo@ /must/ have been created with -- 'Vulkan.Core10.Enums.PipelineCreateFlagBits.PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR' --- set in the @flags@ field of --- 'Vulkan.Core10.Pipeline.GraphicsPipelineCreateInfo' or --- 'Vulkan.Core10.Pipeline.ComputePipelineCreateInfo' -- -- == Valid Usage (Implicit) -- diff --git a/src/Vulkan/Extensions/VK_KHR_ray_tracing_pipeline.hs b/src/Vulkan/Extensions/VK_KHR_ray_tracing_pipeline.hs index a1819d4d0..c5aec4074 100644 --- a/src/Vulkan/Extensions/VK_KHR_ray_tracing_pipeline.hs +++ b/src/Vulkan/Extensions/VK_KHR_ray_tracing_pipeline.hs @@ -895,6 +895,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdTraceRaysKHR-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdTraceRaysKHR-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -1045,7 +1055,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdTraceRaysKHR-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -1757,6 +1767,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdTraceRaysIndirectKHR-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdTraceRaysIndirectKHR-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -1909,7 +1929,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdTraceRaysIndirectKHR-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a diff --git a/src/Vulkan/Extensions/VK_KHR_synchronization2.hs b/src/Vulkan/Extensions/VK_KHR_synchronization2.hs index db64e29dd..60367c138 100644 --- a/src/Vulkan/Extensions/VK_KHR_synchronization2.hs +++ b/src/Vulkan/Extensions/VK_KHR_synchronization2.hs @@ -23,8 +23,6 @@ -- -- - Requires @VK_KHR_get_physical_device_properties2@ -- --- - Requires @VK_KHR_create_renderpass2@ --- -- [__Contact__] -- -- - Tobias Hector @@ -2316,10 +2314,11 @@ pattern PIPELINE_STAGE_2_TRANSFER_BIT_KHR = PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KH -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- --- - #VUID-VkMemoryBarrier2KHR-srcAccessMask-03921# If @srcAccessMask@ +-- - #VUID-VkMemoryBarrier2KHR-srcAccessMask-04747# If @srcAccessMask@ -- includes 'ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT', -- @srcStageMask@ /must/ include -- 'PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR', +-- 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT', -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- @@ -2544,10 +2543,11 @@ pattern PIPELINE_STAGE_2_TRANSFER_BIT_KHR = PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KH -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- --- - #VUID-VkMemoryBarrier2KHR-dstAccessMask-03921# If @dstAccessMask@ +-- - #VUID-VkMemoryBarrier2KHR-dstAccessMask-04747# If @dstAccessMask@ -- includes 'ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT', -- @dstStageMask@ /must/ include -- 'PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR', +-- 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT', -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- @@ -2937,10 +2937,11 @@ instance Zero MemoryBarrier2KHR where -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- --- - #VUID-VkImageMemoryBarrier2KHR-srcAccessMask-03921# If +-- - #VUID-VkImageMemoryBarrier2KHR-srcAccessMask-04747# If -- @srcAccessMask@ includes -- 'ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT', @srcStageMask@ -- /must/ include 'PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR', +-- 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT', -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- @@ -3183,10 +3184,11 @@ instance Zero MemoryBarrier2KHR where -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- --- - #VUID-VkImageMemoryBarrier2KHR-dstAccessMask-03921# If +-- - #VUID-VkImageMemoryBarrier2KHR-dstAccessMask-04747# If -- @dstAccessMask@ includes -- 'ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT', @dstStageMask@ -- /must/ include 'PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR', +-- 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT', -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- @@ -3421,7 +3423,7 @@ instance Zero MemoryBarrier2KHR where -- @image@ /must/ have been created with -- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_COLOR_ATTACHMENT_BIT' -- or --- 'Vulkan.Core10.Enums.ImageLayout.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL' +-- 'Vulkan.Core10.Enums.ImageUsageFlagBits.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT' -- -- - #VUID-VkImageMemoryBarrier2KHR-srcQueueFamilyIndex-03939# If -- @srcQueueFamilyIndex@ and @dstQueueFamilyIndex@ define a @@ -3937,10 +3939,11 @@ instance es ~ '[] => Zero (ImageMemoryBarrier2KHR es) where -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- --- - #VUID-VkBufferMemoryBarrier2KHR-srcAccessMask-03921# If +-- - #VUID-VkBufferMemoryBarrier2KHR-srcAccessMask-04747# If -- @srcAccessMask@ includes -- 'ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT', @srcStageMask@ -- /must/ include 'PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR', +-- 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT', -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- @@ -4183,10 +4186,11 @@ instance es ~ '[] => Zero (ImageMemoryBarrier2KHR es) where -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- --- - #VUID-VkBufferMemoryBarrier2KHR-dstAccessMask-03921# If +-- - #VUID-VkBufferMemoryBarrier2KHR-dstAccessMask-04747# If -- @dstAccessMask@ includes -- 'ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT', @dstStageMask@ -- /must/ include 'PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR', +-- 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT', -- 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR', or -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' -- diff --git a/src/Vulkan/Extensions/VK_KHR_synchronization2.hs-boot b/src/Vulkan/Extensions/VK_KHR_synchronization2.hs-boot index 144513b83..ddfc0c90d 100644 --- a/src/Vulkan/Extensions/VK_KHR_synchronization2.hs-boot +++ b/src/Vulkan/Extensions/VK_KHR_synchronization2.hs-boot @@ -23,8 +23,6 @@ -- -- - Requires @VK_KHR_get_physical_device_properties2@ -- --- - Requires @VK_KHR_create_renderpass2@ --- -- [__Contact__] -- -- - Tobias Hector diff --git a/src/Vulkan/Extensions/VK_KHR_timeline_semaphore.hs b/src/Vulkan/Extensions/VK_KHR_timeline_semaphore.hs index d4e4e6bf7..aaec8e591 100644 --- a/src/Vulkan/Extensions/VK_KHR_timeline_semaphore.hs +++ b/src/Vulkan/Extensions/VK_KHR_timeline_semaphore.hs @@ -184,9 +184,9 @@ -- -- 2) What type of payload the new synchronization primitive has? -- --- __RESOLVED__: A 64-bit unsigned integer that can only be set to --- monotonically increasing values by signal operations and is not changed --- by wait operations. +-- __RESOLVED__: A 64-bit unsigned integer that can only be set to strictly +-- increasing values by signal operations and is not changed by wait +-- operations. -- -- 3) Does the new synchronization primitive have the same -- signal-before-wait requirement as the existing semaphores do? diff --git a/src/Vulkan/Extensions/VK_NV_device_generated_commands.hs b/src/Vulkan/Extensions/VK_NV_device_generated_commands.hs index bc5e7bdc0..d17417161 100644 --- a/src/Vulkan/Extensions/VK_NV_device_generated_commands.hs +++ b/src/Vulkan/Extensions/VK_NV_device_generated_commands.hs @@ -711,6 +711,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdExecuteGeneratedCommandsNV-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdExecuteGeneratedCommandsNV-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -863,7 +873,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdExecuteGeneratedCommandsNV-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -1110,6 +1120,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdExecuteGeneratedCommandsNV-rasterizationSamples-04740# If +-- rasterization is not disabled in the bound graphics pipeline, and +-- neither the @@ nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdExecuteGeneratedCommandsNV-None-04007# All vertex input -- bindings accessed via vertex input variables declared in the vertex -- shader entry point’s interface /must/ have either valid or diff --git a/src/Vulkan/Extensions/VK_NV_mesh_shader.hs b/src/Vulkan/Extensions/VK_NV_mesh_shader.hs index b672e1317..b65f5153f 100644 --- a/src/Vulkan/Extensions/VK_NV_mesh_shader.hs +++ b/src/Vulkan/Extensions/VK_NV_mesh_shader.hs @@ -339,6 +339,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDrawMeshTasksNV-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDrawMeshTasksNV-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -489,7 +499,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDrawMeshTasksNV-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -733,6 +743,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDrawMeshTasksNV-rasterizationSamples-04740# If +-- rasterization is not disabled in the bound graphics pipeline, and +-- neither the @@ nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDrawMeshTasksNV-taskCount-02119# @taskCount@ /must/ be -- less than or equal to -- 'PhysicalDeviceMeshShaderPropertiesNV'::@maxDrawMeshTasksCount@ @@ -826,6 +843,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDrawMeshTasksIndirectNV-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDrawMeshTasksIndirectNV-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -978,7 +1005,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDrawMeshTasksIndirectNV-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -1225,6 +1252,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDrawMeshTasksIndirectNV-rasterizationSamples-04740# If +-- rasterization is not disabled in the bound graphics pipeline, and +-- neither the @@ nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDrawMeshTasksIndirectNV-buffer-02708# If @buffer@ is -- non-sparse then it /must/ be bound completely and contiguously to a -- single 'Vulkan.Core10.Handles.DeviceMemory' object @@ -1362,6 +1396,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdDrawMeshTasksIndirectCountNV-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdDrawMeshTasksIndirectCountNV-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -1514,7 +1558,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdDrawMeshTasksIndirectCountNV-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a @@ -1761,6 +1805,13 @@ foreign import ccall -- @pAttachments@ member of @pColorBlendState@ /must/ be -- 'Vulkan.Core10.FundamentalTypes.FALSE' -- +-- - #VUID-vkCmdDrawMeshTasksIndirectCountNV-rasterizationSamples-04740# +-- If rasterization is not disabled in the bound graphics pipeline, and +-- neither the @@ nor the @@ extensions are enabled, then +-- 'Vulkan.Core10.Pipeline.PipelineMultisampleStateCreateInfo'::@rasterizationSamples@ +-- /must/ be the same as the current subpass color and\/or +-- depth\/stencil attachments +-- -- - #VUID-vkCmdDrawMeshTasksIndirectCountNV-buffer-02708# If @buffer@ is -- non-sparse then it /must/ be bound completely and contiguously to a -- single 'Vulkan.Core10.Handles.DeviceMemory' object diff --git a/src/Vulkan/Extensions/VK_NV_ray_tracing.hs b/src/Vulkan/Extensions/VK_NV_ray_tracing.hs index ea642c5a1..c3ede39bf 100644 --- a/src/Vulkan/Extensions/VK_NV_ray_tracing.hs +++ b/src/Vulkan/Extensions/VK_NV_ray_tracing.hs @@ -1617,6 +1617,16 @@ foreign import ccall -- /must/ contain -- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' -- +-- - #VUID-vkCmdTraceRaysNV-mipmapMode-04770# If a +-- 'Vulkan.Core10.Handles.Sampler' created with @mipmapMode@ equal to +-- 'Vulkan.Core10.Enums.SamplerMipmapMode.SAMPLER_MIPMAP_MODE_LINEAR' +-- and @compareEnable@ equal to 'Vulkan.Core10.FundamentalTypes.FALSE' +-- is used to sample a 'Vulkan.Core10.Handles.ImageView' as a result of +-- this command, then the image view’s +-- +-- /must/ contain +-- 'Vulkan.Core10.Enums.FormatFeatureFlagBits.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT' +-- -- - #VUID-vkCmdTraceRaysNV-None-02691# If a -- 'Vulkan.Core10.Handles.ImageView' is accessed using atomic -- operations as a result of this command, then the image view’s @@ -1767,7 +1777,7 @@ foreign import ccall -- 'Vulkan.Core10.Handles.BufferView' is accessed using @OpImageWrite@ -- as a result of this command, then the @Type@ of the @Texel@ operand -- of that instruction /must/ have at least as many components as the --- image view’s format. +-- buffer view’s format. -- -- - #VUID-vkCmdTraceRaysNV-SampledType-04470# If a -- 'Vulkan.Core10.Handles.ImageView' with a diff --git a/src/Vulkan/Extensions/VK_QNX_screen_surface.hs b/src/Vulkan/Extensions/VK_QNX_screen_surface.hs new file mode 100644 index 000000000..5fb785ec3 --- /dev/null +++ b/src/Vulkan/Extensions/VK_QNX_screen_surface.hs @@ -0,0 +1,423 @@ +{-# language CPP #-} +-- | = Name +-- +-- VK_QNX_screen_surface - instance extension +-- +-- == VK_QNX_screen_surface +-- +-- [__Name String__] +-- @VK_QNX_screen_surface@ +-- +-- [__Extension Type__] +-- Instance extension +-- +-- [__Registered Extension Number__] +-- 379 +-- +-- [__Revision__] +-- 1 +-- +-- [__Extension and Version Dependencies__] +-- +-- - Requires Vulkan 1.0 +-- +-- - Requires @VK_KHR_surface@ +-- +-- [__Contact__] +-- +-- - Mike Gorchak +-- +-- +-- == Other Extension Metadata +-- +-- [__Last Modified Date__] +-- 2021-01-11 +-- +-- [__IP Status__] +-- No known IP claims. +-- +-- [__Contributors__] +-- +-- - Mike Gorchak, BlackBerry Limited +-- +-- == Description +-- +-- The @VK_QNX_screen_surface@ extension is an instance extension. It +-- provides a mechanism to create a 'Vulkan.Extensions.Handles.SurfaceKHR' +-- object (defined by the @VK_KHR_surface@ extension) that refers to a QNX +-- Screen @window@, as well as a query to determine support for rendering +-- to a QNX Screen compositor. +-- +-- == New Commands +-- +-- - 'createScreenSurfaceQNX' +-- +-- - 'getPhysicalDeviceScreenPresentationSupportQNX' +-- +-- == New Structures +-- +-- - 'ScreenSurfaceCreateInfoQNX' +-- +-- == New Bitmasks +-- +-- - 'ScreenSurfaceCreateFlagsQNX' +-- +-- == New Enum Constants +-- +-- - 'QNX_SCREEN_SURFACE_EXTENSION_NAME' +-- +-- - 'QNX_SCREEN_SURFACE_SPEC_VERSION' +-- +-- - Extending 'Vulkan.Core10.Enums.StructureType.StructureType': +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX' +-- +-- == Version History +-- +-- - Revision 1, 2021-01-11 (Mike Gorchak) +-- +-- - Initial draft. +-- +-- = See Also +-- +-- 'ScreenSurfaceCreateFlagsQNX', 'ScreenSurfaceCreateInfoQNX', +-- 'createScreenSurfaceQNX', +-- 'getPhysicalDeviceScreenPresentationSupportQNX' +-- +-- = Document Notes +-- +-- For more information, see the +-- +-- +-- This page is a generated document. Fixes and changes should be made to +-- the generator scripts, not directly. +module Vulkan.Extensions.VK_QNX_screen_surface ( createScreenSurfaceQNX + , getPhysicalDeviceScreenPresentationSupportQNX + , ScreenSurfaceCreateInfoQNX(..) + , ScreenSurfaceCreateFlagsQNX(..) + , QNX_SCREEN_SURFACE_SPEC_VERSION + , pattern QNX_SCREEN_SURFACE_SPEC_VERSION + , QNX_SCREEN_SURFACE_EXTENSION_NAME + , pattern QNX_SCREEN_SURFACE_EXTENSION_NAME + , Screen_window + , Screen_context + , SurfaceKHR(..) + ) where + +import Vulkan.Internal.Utils (enumReadPrec) +import Vulkan.Internal.Utils (enumShowsPrec) +import Vulkan.Internal.Utils (traceAroundEvent) +import Control.Exception.Base (bracket) +import Control.Monad (unless) +import Control.Monad.IO.Class (liftIO) +import Foreign.Marshal.Alloc (allocaBytesAligned) +import Foreign.Marshal.Alloc (callocBytes) +import Foreign.Marshal.Alloc (free) +import GHC.Base (when) +import GHC.IO (throwIO) +import GHC.Ptr (nullFunPtr) +import Foreign.Ptr (nullPtr) +import Foreign.Ptr (plusPtr) +import GHC.Show (showString) +import Numeric (showHex) +import Control.Monad.Trans.Class (lift) +import Control.Monad.Trans.Cont (evalContT) +import Vulkan.CStruct (FromCStruct) +import Vulkan.CStruct (FromCStruct(..)) +import Vulkan.CStruct (ToCStruct) +import Vulkan.CStruct (ToCStruct(..)) +import Vulkan.Zero (Zero) +import Vulkan.Zero (Zero(..)) +import Control.Monad.IO.Class (MonadIO) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Data.String (IsString) +import Data.Typeable (Typeable) +import Foreign.Storable (Storable) +import Foreign.Storable (Storable(peek)) +import Foreign.Storable (Storable(poke)) +import qualified Foreign.Storable (Storable(..)) +import GHC.Generics (Generic) +import GHC.IO.Exception (IOErrorType(..)) +import GHC.IO.Exception (IOException(..)) +import Foreign.Ptr (FunPtr) +import Foreign.Ptr (Ptr) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import Data.Word (Word32) +import Data.Kind (Type) +import Control.Monad.Trans.Cont (ContT(..)) +import Vulkan.Core10.FundamentalTypes (bool32ToBool) +import Vulkan.NamedType ((:::)) +import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks) +import Vulkan.Core10.FundamentalTypes (Bool32) +import Vulkan.Core10.FundamentalTypes (Bool32(..)) +import Vulkan.Core10.FundamentalTypes (Flags) +import Vulkan.Core10.Handles (Instance) +import Vulkan.Core10.Handles (Instance(..)) +import Vulkan.Dynamic (InstanceCmds(pVkCreateScreenSurfaceQNX)) +import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceScreenPresentationSupportQNX)) +import Vulkan.Core10.Handles (Instance_T) +import Vulkan.Core10.Handles (PhysicalDevice) +import Vulkan.Core10.Handles (PhysicalDevice(..)) +import Vulkan.Core10.Handles (PhysicalDevice_T) +import Vulkan.Core10.Enums.Result (Result) +import Vulkan.Core10.Enums.Result (Result(..)) +import Vulkan.Core10.Enums.StructureType (StructureType) +import Vulkan.Extensions.Handles (SurfaceKHR) +import Vulkan.Extensions.Handles (SurfaceKHR(..)) +import Vulkan.Exception (VulkanException(..)) +import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX)) +import Vulkan.Core10.Enums.Result (Result(SUCCESS)) +import Vulkan.Extensions.Handles (SurfaceKHR(..)) +foreign import ccall +#if !defined(SAFE_FOREIGN_CALLS) + unsafe +#endif + "dynamic" mkVkCreateScreenSurfaceQNX + :: FunPtr (Ptr Instance_T -> Ptr ScreenSurfaceCreateInfoQNX -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result) -> Ptr Instance_T -> Ptr ScreenSurfaceCreateInfoQNX -> Ptr AllocationCallbacks -> Ptr SurfaceKHR -> IO Result + +-- | vkCreateScreenSurfaceQNX - Create a +-- 'Vulkan.Extensions.Handles.SurfaceKHR' object for a QNX Screen window +-- +-- == Valid Usage (Implicit) +-- +-- - #VUID-vkCreateScreenSurfaceQNX-instance-parameter# @instance@ /must/ +-- be a valid 'Vulkan.Core10.Handles.Instance' handle +-- +-- - #VUID-vkCreateScreenSurfaceQNX-pCreateInfo-parameter# @pCreateInfo@ +-- /must/ be a valid pointer to a valid 'ScreenSurfaceCreateInfoQNX' +-- structure +-- +-- - #VUID-vkCreateScreenSurfaceQNX-pAllocator-parameter# If @pAllocator@ +-- is not @NULL@, @pAllocator@ /must/ be a valid pointer to a valid +-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks' structure +-- +-- - #VUID-vkCreateScreenSurfaceQNX-pSurface-parameter# @pSurface@ /must/ +-- be a valid pointer to a 'Vulkan.Extensions.Handles.SurfaceKHR' +-- handle +-- +-- == Return Codes +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.SUCCESS' +-- +-- [] +-- +-- - 'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY' +-- +-- - 'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY' +-- +-- = See Also +-- +-- 'Vulkan.Core10.AllocationCallbacks.AllocationCallbacks', +-- 'Vulkan.Core10.Handles.Instance', 'ScreenSurfaceCreateInfoQNX', +-- 'Vulkan.Extensions.Handles.SurfaceKHR' +createScreenSurfaceQNX :: forall io + . (MonadIO io) + => -- | @instance@ is the instance to associate the surface with. + Instance + -> -- | @pCreateInfo@ is a pointer to a 'ScreenSurfaceCreateInfoQNX' structure + -- containing parameters affecting the creation of the surface object. + ScreenSurfaceCreateInfoQNX + -> -- | @pAllocator@ is the allocator used for host memory allocated for the + -- surface object when there is no more specific allocator available (see + -- ). + ("allocator" ::: Maybe AllocationCallbacks) + -> io (SurfaceKHR) +createScreenSurfaceQNX instance' createInfo allocator = liftIO . evalContT $ do + let vkCreateScreenSurfaceQNXPtr = pVkCreateScreenSurfaceQNX (instanceCmds (instance' :: Instance)) + lift $ unless (vkCreateScreenSurfaceQNXPtr /= nullFunPtr) $ + throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkCreateScreenSurfaceQNX is null" Nothing Nothing + let vkCreateScreenSurfaceQNX' = mkVkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNXPtr + pCreateInfo <- ContT $ withCStruct (createInfo) + pAllocator <- case (allocator) of + Nothing -> pure nullPtr + Just j -> ContT $ withCStruct (j) + pPSurface <- ContT $ bracket (callocBytes @SurfaceKHR 8) free + r <- lift $ traceAroundEvent "vkCreateScreenSurfaceQNX" (vkCreateScreenSurfaceQNX' (instanceHandle (instance')) pCreateInfo pAllocator (pPSurface)) + lift $ when (r < SUCCESS) (throwIO (VulkanException r)) + pSurface <- lift $ peek @SurfaceKHR pPSurface + pure $ (pSurface) + + +foreign import ccall +#if !defined(SAFE_FOREIGN_CALLS) + unsafe +#endif + "dynamic" mkVkGetPhysicalDeviceScreenPresentationSupportQNX + :: FunPtr (Ptr PhysicalDevice_T -> Word32 -> Ptr Screen_window -> IO Bool32) -> Ptr PhysicalDevice_T -> Word32 -> Ptr Screen_window -> IO Bool32 + +-- | vkGetPhysicalDeviceScreenPresentationSupportQNX - Query physical device +-- for presentation to QNX Screen +-- +-- = Description +-- +-- This platform-specific function /can/ be called prior to creating a +-- surface. +-- +-- == Valid Usage (Implicit) +-- +-- = See Also +-- +-- 'Vulkan.Core10.Handles.PhysicalDevice' +getPhysicalDeviceScreenPresentationSupportQNX :: forall io + . (MonadIO io) + => -- | @physicalDevice@ is the physical device. + -- + -- #VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-physicalDevice-parameter# + -- @physicalDevice@ /must/ be a valid + -- 'Vulkan.Core10.Handles.PhysicalDevice' handle + PhysicalDevice + -> -- | @queueFamilyIndex@ is the queue family index. + -- + -- #VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-queueFamilyIndex-04743# + -- @queueFamilyIndex@ /must/ be less than @pQueueFamilyPropertyCount@ + -- returned by + -- 'Vulkan.Core10.DeviceInitialization.getPhysicalDeviceQueueFamilyProperties' + -- for the given @physicalDevice@ + ("queueFamilyIndex" ::: Word32) + -> -- | @window@ is the QNX Screen @window@ object. + -- + -- #VUID-vkGetPhysicalDeviceScreenPresentationSupportQNX-window-parameter# + -- @window@ /must/ be a valid pointer to a 'Screen_window' value + (Ptr Screen_window) + -> io (Bool) +getPhysicalDeviceScreenPresentationSupportQNX physicalDevice queueFamilyIndex window = liftIO $ do + let vkGetPhysicalDeviceScreenPresentationSupportQNXPtr = pVkGetPhysicalDeviceScreenPresentationSupportQNX (instanceCmds (physicalDevice :: PhysicalDevice)) + unless (vkGetPhysicalDeviceScreenPresentationSupportQNXPtr /= nullFunPtr) $ + throwIO $ IOError Nothing InvalidArgument "" "The function pointer for vkGetPhysicalDeviceScreenPresentationSupportQNX is null" Nothing Nothing + let vkGetPhysicalDeviceScreenPresentationSupportQNX' = mkVkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNXPtr + r <- traceAroundEvent "vkGetPhysicalDeviceScreenPresentationSupportQNX" (vkGetPhysicalDeviceScreenPresentationSupportQNX' (physicalDeviceHandle (physicalDevice)) (queueFamilyIndex) (window)) + pure $ ((bool32ToBool r)) + + +-- | VkScreenSurfaceCreateInfoQNX - Structure specifying parameters of a +-- newly created QNX Screen surface object +-- +-- == Valid Usage (Implicit) +-- +-- = See Also +-- +-- 'ScreenSurfaceCreateFlagsQNX', +-- 'Vulkan.Core10.Enums.StructureType.StructureType', +-- 'createScreenSurfaceQNX' +data ScreenSurfaceCreateInfoQNX = ScreenSurfaceCreateInfoQNX + { -- | @flags@ is reserved for future use. + -- + -- #VUID-VkScreenSurfaceCreateInfoQNX-flags-zerobitmask# @flags@ /must/ be + -- @0@ + flags :: ScreenSurfaceCreateFlagsQNX + , -- | @context@ and @window@ are QNX Screen @context@ and @window@ to + -- associate the surface with. + -- + -- #VUID-VkScreenSurfaceCreateInfoQNX-context-04741# @context@ /must/ point + -- to a valid QNX Screen @struct@ _screen_context + context :: Ptr Screen_context + , -- | #VUID-VkScreenSurfaceCreateInfoQNX-window-04742# @window@ /must/ point + -- to a valid QNX Screen @struct@ _screen_window + window :: Ptr Screen_window + } + deriving (Typeable, Eq) +#if defined(GENERIC_INSTANCES) +deriving instance Generic (ScreenSurfaceCreateInfoQNX) +#endif +deriving instance Show ScreenSurfaceCreateInfoQNX + +instance ToCStruct ScreenSurfaceCreateInfoQNX where + withCStruct x f = allocaBytesAligned 40 8 $ \p -> pokeCStruct p x (f p) + pokeCStruct p ScreenSurfaceCreateInfoQNX{..} f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 16 :: Ptr ScreenSurfaceCreateFlagsQNX)) (flags) + poke ((p `plusPtr` 24 :: Ptr (Ptr Screen_context))) (context) + poke ((p `plusPtr` 32 :: Ptr (Ptr Screen_window))) (window) + f + cStructSize = 40 + cStructAlignment = 8 + pokeZeroCStruct p f = do + poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX) + poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) + poke ((p `plusPtr` 24 :: Ptr (Ptr Screen_context))) (zero) + poke ((p `plusPtr` 32 :: Ptr (Ptr Screen_window))) (zero) + f + +instance FromCStruct ScreenSurfaceCreateInfoQNX where + peekCStruct p = do + flags <- peek @ScreenSurfaceCreateFlagsQNX ((p `plusPtr` 16 :: Ptr ScreenSurfaceCreateFlagsQNX)) + context <- peek @(Ptr Screen_context) ((p `plusPtr` 24 :: Ptr (Ptr Screen_context))) + window <- peek @(Ptr Screen_window) ((p `plusPtr` 32 :: Ptr (Ptr Screen_window))) + pure $ ScreenSurfaceCreateInfoQNX + flags context window + +instance Storable ScreenSurfaceCreateInfoQNX where + sizeOf ~_ = 40 + alignment ~_ = 8 + peek = peekCStruct + poke ptr poked = pokeCStruct ptr poked (pure ()) + +instance Zero ScreenSurfaceCreateInfoQNX where + zero = ScreenSurfaceCreateInfoQNX + zero + zero + zero + + +-- | VkScreenSurfaceCreateFlagsQNX - Reserved for future use +-- +-- = Description +-- +-- 'ScreenSurfaceCreateFlagsQNX' is a bitmask type for setting a mask, but +-- is currently reserved for future use. +-- +-- = See Also +-- +-- 'ScreenSurfaceCreateInfoQNX' +newtype ScreenSurfaceCreateFlagsQNX = ScreenSurfaceCreateFlagsQNX Flags + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + + + +conNameScreenSurfaceCreateFlagsQNX :: String +conNameScreenSurfaceCreateFlagsQNX = "ScreenSurfaceCreateFlagsQNX" + +enumPrefixScreenSurfaceCreateFlagsQNX :: String +enumPrefixScreenSurfaceCreateFlagsQNX = "" + +showTableScreenSurfaceCreateFlagsQNX :: [(ScreenSurfaceCreateFlagsQNX, String)] +showTableScreenSurfaceCreateFlagsQNX = [] + +instance Show ScreenSurfaceCreateFlagsQNX where + showsPrec = enumShowsPrec enumPrefixScreenSurfaceCreateFlagsQNX + showTableScreenSurfaceCreateFlagsQNX + conNameScreenSurfaceCreateFlagsQNX + (\(ScreenSurfaceCreateFlagsQNX x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read ScreenSurfaceCreateFlagsQNX where + readPrec = enumReadPrec enumPrefixScreenSurfaceCreateFlagsQNX + showTableScreenSurfaceCreateFlagsQNX + conNameScreenSurfaceCreateFlagsQNX + ScreenSurfaceCreateFlagsQNX + + +type QNX_SCREEN_SURFACE_SPEC_VERSION = 1 + +-- No documentation found for TopLevel "VK_QNX_SCREEN_SURFACE_SPEC_VERSION" +pattern QNX_SCREEN_SURFACE_SPEC_VERSION :: forall a . Integral a => a +pattern QNX_SCREEN_SURFACE_SPEC_VERSION = 1 + + +type QNX_SCREEN_SURFACE_EXTENSION_NAME = "VK_QNX_screen_surface" + +-- No documentation found for TopLevel "VK_QNX_SCREEN_SURFACE_EXTENSION_NAME" +pattern QNX_SCREEN_SURFACE_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a +pattern QNX_SCREEN_SURFACE_EXTENSION_NAME = "VK_QNX_screen_surface" + + +data Screen_window + + +data Screen_context + diff --git a/src/Vulkan/Extensions/VK_QNX_screen_surface.hs-boot b/src/Vulkan/Extensions/VK_QNX_screen_surface.hs-boot new file mode 100644 index 000000000..678b7c8dc --- /dev/null +++ b/src/Vulkan/Extensions/VK_QNX_screen_surface.hs-boot @@ -0,0 +1,111 @@ +{-# language CPP #-} +-- | = Name +-- +-- VK_QNX_screen_surface - instance extension +-- +-- == VK_QNX_screen_surface +-- +-- [__Name String__] +-- @VK_QNX_screen_surface@ +-- +-- [__Extension Type__] +-- Instance extension +-- +-- [__Registered Extension Number__] +-- 379 +-- +-- [__Revision__] +-- 1 +-- +-- [__Extension and Version Dependencies__] +-- +-- - Requires Vulkan 1.0 +-- +-- - Requires @VK_KHR_surface@ +-- +-- [__Contact__] +-- +-- - Mike Gorchak +-- +-- +-- == Other Extension Metadata +-- +-- [__Last Modified Date__] +-- 2021-01-11 +-- +-- [__IP Status__] +-- No known IP claims. +-- +-- [__Contributors__] +-- +-- - Mike Gorchak, BlackBerry Limited +-- +-- == Description +-- +-- The @VK_QNX_screen_surface@ extension is an instance extension. It +-- provides a mechanism to create a 'Vulkan.Extensions.Handles.SurfaceKHR' +-- object (defined by the @VK_KHR_surface@ extension) that refers to a QNX +-- Screen @window@, as well as a query to determine support for rendering +-- to a QNX Screen compositor. +-- +-- == New Commands +-- +-- - 'createScreenSurfaceQNX' +-- +-- - 'getPhysicalDeviceScreenPresentationSupportQNX' +-- +-- == New Structures +-- +-- - 'ScreenSurfaceCreateInfoQNX' +-- +-- == New Bitmasks +-- +-- - 'ScreenSurfaceCreateFlagsQNX' +-- +-- == New Enum Constants +-- +-- - 'QNX_SCREEN_SURFACE_EXTENSION_NAME' +-- +-- - 'QNX_SCREEN_SURFACE_SPEC_VERSION' +-- +-- - Extending 'Vulkan.Core10.Enums.StructureType.StructureType': +-- +-- - 'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX' +-- +-- == Version History +-- +-- - Revision 1, 2021-01-11 (Mike Gorchak) +-- +-- - Initial draft. +-- +-- = See Also +-- +-- 'ScreenSurfaceCreateFlagsQNX', 'ScreenSurfaceCreateInfoQNX', +-- 'createScreenSurfaceQNX', +-- 'getPhysicalDeviceScreenPresentationSupportQNX' +-- +-- = Document Notes +-- +-- For more information, see the +-- +-- +-- This page is a generated document. Fixes and changes should be made to +-- the generator scripts, not directly. +module Vulkan.Extensions.VK_QNX_screen_surface ( ScreenSurfaceCreateInfoQNX + , Screen_window + ) where + +import Vulkan.CStruct (FromCStruct) +import Vulkan.CStruct (ToCStruct) +import Data.Kind (Type) + +data ScreenSurfaceCreateInfoQNX + +instance ToCStruct ScreenSurfaceCreateInfoQNX +instance Show ScreenSurfaceCreateInfoQNX + +instance FromCStruct ScreenSurfaceCreateInfoQNX + + +data Screen_window + diff --git a/src/Vulkan/SPIRVRequirements.hs b/src/Vulkan/SPIRVRequirements.hs index 76c9a4d2c..61596c49f 100644 --- a/src/Vulkan/SPIRVRequirements.hs +++ b/src/Vulkan/SPIRVRequirements.hs @@ -14,6 +14,8 @@ import Data.Bits (Bits) import Data.ByteString (ByteString) import Vulkan.Core10.Handles (Instance) import Vulkan.Core10.Handles (PhysicalDevice) +import Vulkan.Core11.Promoted_From_VK_KHR_16bit_storage (PhysicalDevice16BitStorageFeatures) +import Vulkan.Core11.Promoted_From_VK_KHR_16bit_storage (PhysicalDevice16BitStorageFeatures(..)) import Vulkan.Extensions.VK_EXT_buffer_device_address (PhysicalDeviceBufferDeviceAddressFeaturesEXT) import Vulkan.Extensions.VK_EXT_buffer_device_address (PhysicalDeviceBufferDeviceAddressFeaturesEXT(..)) import Vulkan.Extensions.VK_NV_compute_shader_derivatives (PhysicalDeviceComputeShaderDerivativesFeaturesNV) @@ -30,6 +32,8 @@ import Vulkan.Extensions.VK_EXT_fragment_shader_interlock (PhysicalDeviceFragmen import Vulkan.Extensions.VK_EXT_fragment_shader_interlock (PhysicalDeviceFragmentShaderInterlockFeaturesEXT(..)) import Vulkan.Extensions.VK_KHR_fragment_shading_rate (PhysicalDeviceFragmentShadingRateFeaturesKHR) import Vulkan.Extensions.VK_KHR_fragment_shading_rate (PhysicalDeviceFragmentShadingRateFeaturesKHR(..)) +import Vulkan.Core11.Promoted_From_VK_KHR_multiview (PhysicalDeviceMultiviewFeatures) +import Vulkan.Core11.Promoted_From_VK_KHR_multiview (PhysicalDeviceMultiviewFeatures(..)) import Vulkan.Extensions.VK_KHR_ray_query (PhysicalDeviceRayQueryFeaturesKHR) import Vulkan.Extensions.VK_KHR_ray_query (PhysicalDeviceRayQueryFeaturesKHR(..)) import Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (PhysicalDeviceRayTracingPipelineFeaturesKHR) @@ -38,6 +42,8 @@ import Vulkan.Extensions.VK_EXT_shader_atomic_float (PhysicalDeviceShaderAtomicF import Vulkan.Extensions.VK_EXT_shader_atomic_float (PhysicalDeviceShaderAtomicFloatFeaturesEXT(..)) import Vulkan.Extensions.VK_EXT_shader_demote_to_helper_invocation (PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT) import Vulkan.Extensions.VK_EXT_shader_demote_to_helper_invocation (PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT(..)) +import Vulkan.Core11.Promoted_From_VK_KHR_shader_draw_parameters (PhysicalDeviceShaderDrawParametersFeatures) +import Vulkan.Core11.Promoted_From_VK_KHR_shader_draw_parameters (PhysicalDeviceShaderDrawParametersFeatures(..)) import Vulkan.Extensions.VK_EXT_shader_image_atomic_int64 (PhysicalDeviceShaderImageAtomicInt64FeaturesEXT) import Vulkan.Extensions.VK_EXT_shader_image_atomic_int64 (PhysicalDeviceShaderImageAtomicInt64FeaturesEXT(..)) import Vulkan.Extensions.VK_NV_shader_image_footprint (PhysicalDeviceShaderImageFootprintFeaturesNV) @@ -50,6 +56,8 @@ import Vulkan.Extensions.VK_NV_shading_rate_image (PhysicalDeviceShadingRateImag import Vulkan.Extensions.VK_NV_shading_rate_image (PhysicalDeviceShadingRateImageFeaturesNV(..)) import Vulkan.Extensions.VK_EXT_transform_feedback (PhysicalDeviceTransformFeedbackFeaturesEXT) import Vulkan.Extensions.VK_EXT_transform_feedback (PhysicalDeviceTransformFeedbackFeaturesEXT(..)) +import Vulkan.Core11.Promoted_From_VK_KHR_variable_pointers (PhysicalDeviceVariablePointersFeatures) +import Vulkan.Core11.Promoted_From_VK_KHR_variable_pointers (PhysicalDeviceVariablePointersFeatures(..)) import Vulkan.Core12 (PhysicalDeviceVulkan11Features) import Vulkan.Core12 (PhysicalDeviceVulkan11Features(..)) import Vulkan.Core12 (PhysicalDeviceVulkan11Properties) @@ -616,6 +624,17 @@ spirvExtensionRequirements = \case , deviceExtensionMinVersion = 0 } ] + "SPV_EXT_shader_atomic_float_add" -> (,) + [ RequireInstanceExtension { instanceExtensionLayerName = Nothing + , instanceExtensionName = KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME + , instanceExtensionMinVersion = 0 + } + ] + [ RequireDeviceExtension { deviceExtensionLayerName = Nothing + , deviceExtensionName = EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME + , deviceExtensionMinVersion = 0 + } + ] _ -> ([], []) spirvCapabilityRequirements :: ByteString -> ([InstanceRequirement], [DeviceRequirement]) @@ -881,73 +900,38 @@ spirvCapabilityRequirements = \case } ] "DrawParameters" -> (,) - [RequireInstanceVersion $ MAKE_VERSION 1 1 0] + [RequireInstanceVersion $ MAKE_VERSION 1 2 0] [ RequireDeviceFeature { featureName = "shaderDrawParameters" , checkFeature = shaderDrawParameters :: PhysicalDeviceVulkan11Features -> Bool , enableFeature = \f -> f { shaderDrawParameters = True } :: PhysicalDeviceVulkan11Features } - , RequireDeviceVersion $ MAKE_VERSION 1 1 0 + , RequireDeviceVersion $ MAKE_VERSION 1 2 0 ] "MultiView" -> (,) - [ RequireInstanceVersion $ MAKE_VERSION 1 1 0 - , RequireInstanceExtension { instanceExtensionLayerName = Nothing - , instanceExtensionName = KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME - , instanceExtensionMinVersion = 0 - } - ] + [RequireInstanceVersion $ MAKE_VERSION 1 2 0] [ RequireDeviceFeature { featureName = "multiview" , checkFeature = multiview :: PhysicalDeviceVulkan11Features -> Bool , enableFeature = \f -> f { multiview = True } :: PhysicalDeviceVulkan11Features } - , RequireDeviceVersion $ MAKE_VERSION 1 1 0 - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_MULTIVIEW_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } + , RequireDeviceVersion $ MAKE_VERSION 1 2 0 ] "DeviceGroup" -> (,) [RequireInstanceVersion $ MAKE_VERSION 1 1 0] [RequireDeviceVersion $ MAKE_VERSION 1 1 0] "VariablePointersStorageBuffer" -> (,) - [ RequireInstanceVersion $ MAKE_VERSION 1 1 0 - , RequireInstanceExtension { instanceExtensionLayerName = Nothing - , instanceExtensionName = KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME - , instanceExtensionMinVersion = 0 - } - ] + [RequireInstanceVersion $ MAKE_VERSION 1 2 0] [ RequireDeviceFeature { featureName = "variablePointersStorageBuffer" , checkFeature = variablePointersStorageBuffer :: PhysicalDeviceVulkan11Features -> Bool , enableFeature = \f -> f { variablePointersStorageBuffer = True } :: PhysicalDeviceVulkan11Features } - , RequireDeviceVersion $ MAKE_VERSION 1 1 0 - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_VARIABLE_POINTERS_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } + , RequireDeviceVersion $ MAKE_VERSION 1 2 0 ] "VariablePointers" -> (,) - [ RequireInstanceVersion $ MAKE_VERSION 1 1 0 - , RequireInstanceExtension { instanceExtensionLayerName = Nothing - , instanceExtensionName = KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME - , instanceExtensionMinVersion = 0 - } - ] + [RequireInstanceVersion $ MAKE_VERSION 1 2 0] [ RequireDeviceFeature { featureName = "variablePointers" , checkFeature = variablePointers :: PhysicalDeviceVulkan11Features -> Bool , enableFeature = \f -> f { variablePointers = True } :: PhysicalDeviceVulkan11Features } - , RequireDeviceVersion $ MAKE_VERSION 1 1 0 - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_VARIABLE_POINTERS_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } + , RequireDeviceVersion $ MAKE_VERSION 1 2 0 ] "ShaderClockKHR" -> (,) [ RequireInstanceExtension { instanceExtensionLayerName = Nothing @@ -1074,90 +1058,38 @@ spirvCapabilityRequirements = \case } ] "StorageBuffer16BitAccess" -> (,) - [ RequireInstanceVersion $ MAKE_VERSION 1 1 0 - , RequireInstanceExtension { instanceExtensionLayerName = Nothing - , instanceExtensionName = KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME - , instanceExtensionMinVersion = 0 - } - ] + [RequireInstanceVersion $ MAKE_VERSION 1 2 0] [ RequireDeviceFeature { featureName = "storageBuffer16BitAccess" , checkFeature = storageBuffer16BitAccess :: PhysicalDeviceVulkan11Features -> Bool , enableFeature = \f -> f { storageBuffer16BitAccess = True } :: PhysicalDeviceVulkan11Features } - , RequireDeviceVersion $ MAKE_VERSION 1 1 0 - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_16BIT_STORAGE_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } + , RequireDeviceVersion $ MAKE_VERSION 1 2 0 ] "UniformAndStorageBuffer16BitAccess" -> (,) - [ RequireInstanceVersion $ MAKE_VERSION 1 1 0 - , RequireInstanceExtension { instanceExtensionLayerName = Nothing - , instanceExtensionName = KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME - , instanceExtensionMinVersion = 0 - } - ] + [RequireInstanceVersion $ MAKE_VERSION 1 2 0] [ RequireDeviceFeature { featureName = "uniformAndStorageBuffer16BitAccess" , checkFeature = uniformAndStorageBuffer16BitAccess :: PhysicalDeviceVulkan11Features -> Bool , enableFeature = \f -> f { uniformAndStorageBuffer16BitAccess = True } :: PhysicalDeviceVulkan11Features } - , RequireDeviceVersion $ MAKE_VERSION 1 1 0 - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_16BIT_STORAGE_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } + , RequireDeviceVersion $ MAKE_VERSION 1 2 0 ] "StoragePushConstant16" -> (,) - [ RequireInstanceVersion $ MAKE_VERSION 1 1 0 - , RequireInstanceExtension { instanceExtensionLayerName = Nothing - , instanceExtensionName = KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME - , instanceExtensionMinVersion = 0 - } - ] + [RequireInstanceVersion $ MAKE_VERSION 1 2 0] [ RequireDeviceFeature { featureName = "storagePushConstant16" , checkFeature = storagePushConstant16 :: PhysicalDeviceVulkan11Features -> Bool , enableFeature = \f -> f { storagePushConstant16 = True } :: PhysicalDeviceVulkan11Features } - , RequireDeviceVersion $ MAKE_VERSION 1 1 0 - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_16BIT_STORAGE_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } + , RequireDeviceVersion $ MAKE_VERSION 1 2 0 ] "StorageInputOutput16" -> (,) - [ RequireInstanceVersion $ MAKE_VERSION 1 1 0 - , RequireInstanceExtension { instanceExtensionLayerName = Nothing - , instanceExtensionName = KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME - , instanceExtensionMinVersion = 0 - } - ] + [RequireInstanceVersion $ MAKE_VERSION 1 2 0] [ RequireDeviceFeature { featureName = "storageInputOutput16" , checkFeature = storageInputOutput16 :: PhysicalDeviceVulkan11Features -> Bool , enableFeature = \f -> f { storageInputOutput16 = True } :: PhysicalDeviceVulkan11Features } - , RequireDeviceVersion $ MAKE_VERSION 1 1 0 - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_16BIT_STORAGE_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } - , RequireDeviceExtension { deviceExtensionLayerName = Nothing - , deviceExtensionName = KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME - , deviceExtensionMinVersion = 0 - } + , RequireDeviceVersion $ MAKE_VERSION 1 2 0 ] "GroupNonUniform" -> (,) [RequireInstanceVersion $ MAKE_VERSION 1 1 0] diff --git a/src/Vulkan/Version.hs b/src/Vulkan/Version.hs index ec051ba18..6a1f4183f 100644 --- a/src/Vulkan/Version.hs +++ b/src/Vulkan/Version.hs @@ -15,11 +15,11 @@ import Data.Bits (shiftR) import Data.Word (Word32) pattern HEADER_VERSION :: Word32 -pattern HEADER_VERSION = 170 +pattern HEADER_VERSION = 174 pattern HEADER_VERSION_COMPLETE :: Word32 -pattern HEADER_VERSION_COMPLETE = MAKE_VERSION 1 2 170 +pattern HEADER_VERSION_COMPLETE = MAKE_VERSION 1 2 174 pattern MAKE_VERSION :: Word32 -> Word32 -> Word32 -> Word32 From b80997bff61bd0c19b16dfbf00871d7e54f3232c Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 16:35:41 +0800 Subject: [PATCH 04/11] Add support for 64 bit bitmasks in vulkan Fixes https://github.com/expipiplus1/vulkan/issues/266 --- generate-new/src/Bespoke.hs | 1 + generate-new/src/Bespoke/MarshalParams.hs | 6 +-- generate-new/src/Bespoke/RenderParams.hs | 2 + generate-new/src/Render/Element.hs | 4 +- generate-new/src/Render/Element/Write.hs | 4 +- generate-new/src/Render/Enum.hs | 23 +++++---- generate-new/src/Render/Names.hs | 6 +-- generate-new/src/Spec/Parse.hs | 61 ++++++++++++++++++----- generate-new/src/Spec/Types.hs | 5 +- generate-new/vma/VMA/RenderParams.hs | 1 + generate-new/xr/XR/RenderParams.hs | 3 +- 11 files changed, 82 insertions(+), 34 deletions(-) diff --git a/generate-new/src/Bespoke.hs b/generate-new/src/Bespoke.hs index 2632bb883..f9ce1d77f 100644 --- a/generate-new/src/Bespoke.hs +++ b/generate-new/src/Bespoke.hs @@ -863,6 +863,7 @@ bespokeElements = \case $ shared <> [ baseType "VkSampleMask" ''Word32 , baseType "VkFlags" ''Word32 + , baseType "VkFlags64" ''Word64 , baseType "VkDeviceSize" ''Word64 , baseType "VkDeviceAddress" ''Word64 ] diff --git a/generate-new/src/Bespoke/MarshalParams.hs b/generate-new/src/Bespoke/MarshalParams.hs index c4aba384b..8c135589b 100644 --- a/generate-new/src/Bespoke/MarshalParams.hs +++ b/generate-new/src/Bespoke/MarshalParams.hs @@ -27,9 +27,9 @@ marshalParams spec@Spec {..} = do bitmaskNames :: HashSet CName bitmaskNames = fromList [ n - | Enum {..} <- toList specEnums - , ABitmask flags <- pure eType - , n <- [eName, flags] + | Enum {..} <- toList specEnums + , ABitmask flags _ <- pure eType + , n <- [eName, flags] ] isBitmask = (`member` bitmaskNames) isBitmaskType = \case diff --git a/generate-new/src/Bespoke/RenderParams.hs b/generate-new/src/Bespoke/RenderParams.hs index da2c9f523..7495808e0 100644 --- a/generate-new/src/Bespoke/RenderParams.hs +++ b/generate-new/src/Bespoke/RenderParams.hs @@ -32,6 +32,7 @@ import Render.Stmts.Poke ( CmdsDoc(..) ) import Render.Type.Preserve import Spec.Parse +-- This is in `src` rather than `vk` as it's also used by the xr and vma generators renderParams :: V.Vector Handle -> RenderParams renderParams handles = r where @@ -64,6 +65,7 @@ renderParams handles = r , lowerPrefix = "vk" , upperPrefix = "VK" , flagsTypeName = "VkFlags" + , flags64TypeName = "VkFlags64" , alwaysQualifiedNames = mempty , extraNewtypes = mempty , mkIdiomaticType = diff --git a/generate-new/src/Render/Element.hs b/generate-new/src/Render/Element.hs index 2333c3736..987cc0ebc 100644 --- a/generate-new/src/Render/Element.hs +++ b/generate-new/src/Render/Element.hs @@ -251,7 +251,9 @@ data RenderParams = RenderParams , upperPrefix :: Text -- ^ "VK" or "XR" or "VMA" , flagsTypeName :: CName - -- ^ "VkFlags" or "XrFlags64" + -- ^ 32 bit flag type + , flags64TypeName :: CName + -- ^ 64 bit flag type , alwaysQualifiedNames :: Vector Name , extraNewtypes :: Vector Name , mkIdiomaticType :: Type -> Maybe IdiomaticType diff --git a/generate-new/src/Render/Element/Write.hs b/generate-new/src/Render/Element/Write.hs index 2e6586901..c3d5ed20c 100644 --- a/generate-new/src/Render/Element/Write.hs +++ b/generate-new/src/Render/Element/Write.hs @@ -430,8 +430,8 @@ specTypeInfo Spec {..} = do [ (mkConName eExportedName evName, mkTyName eExportedName) | Enum {..} <- V.toList specEnums , let eExportedName = case eType of - AnEnum -> eName - ABitmask flags -> flags + AnEnum -> eName + ABitmask flags _ -> flags , EnumValue {..} <- V.toList eValues ] pure $ TypeInfo (`Map.lookup` tyMap) diff --git a/generate-new/src/Render/Enum.hs b/generate-new/src/Render/Enum.hs index 7df577516..e20298b2a 100644 --- a/generate-new/src/Render/Enum.hs +++ b/generate-new/src/Render/Enum.hs @@ -37,8 +37,10 @@ renderEnum e@Enum {..} = do tellCanFormat innerTy <- case eType of - AnEnum -> pure $ ConT ''Int32 - ABitmask _ -> cToHsType DoNotPreserve (TypeName flagsTypeName) + AnEnum -> pure $ ConT ''Int32 + ABitmask _ Bitmask32 -> cToHsType DoNotPreserve (TypeName flagsTypeName) + ABitmask _ Bitmask64 -> + cToHsType DoNotPreserve (TypeName flags64TypeName) let n = mkTyName eName conName = mkConName eName eName @@ -46,7 +48,7 @@ renderEnum e@Enum {..} = do -- Haddocks, this means when viewing the page there, the user will also -- have the flags visible case eType of - ABitmask flags | flags /= eName -> do + ABitmask flags _ | flags /= eName -> do let flagsName = mkTyName flags let syn :: HasRenderElem r => Sem r () syn = do @@ -64,15 +66,15 @@ renderEnum e@Enum {..} = do tellDoc $ "data" <+> pretty n tDoc <- renderType innerTy let complete = case eType of - AnEnum -> completePragma n (mkPatternName . evName <$> eValues) - ABitmask _ -> Nothing + AnEnum -> completePragma n (mkPatternName . evName <$> eValues) + ABitmask _ _ -> Nothing tellImport (TyConName "Zero") derivedClasses <- do tellImport ''Storable let always = ["Eq", "Ord", "Storable", "Zero"] special <- case eType of - AnEnum -> pure [] - ABitmask _ -> do + AnEnum -> pure [] + ABitmask _ _ -> do tellImport ''Bits tellImport ''FiniteBits pure ["Bits", "FiniteBits"] @@ -124,8 +126,9 @@ renderEnumValue eName conName enumType EnumValue {..} = do RenderParams {..} <- input let n = mkPatternName evName v = case enumType of - AnEnum -> showsPrec 9 evValue "" - ABitmask _ -> printf "0x%08x" evValue + AnEnum -> showsPrec 9 evValue "" + ABitmask _ Bitmask32 -> printf "0x%08x" evValue + ABitmask _ Bitmask64 -> printf "0x%016x" evValue pure ( \getDoc -> vsep [ getDoc (Nested eName evName) @@ -204,7 +207,7 @@ renderShowInstance prefixString showTableName conNameName Enum {..} = do AnEnum -> do tellImport 'showsPrec pure ("(showsPrec 11)" :: Text) - ABitmask _ -> do + ABitmask _ _ -> do tellImport 'showString tellImport 'showHex pure "(\\x -> showString \"0x\" . showHex x)" diff --git a/generate-new/src/Render/Names.hs b/generate-new/src/Render/Names.hs index b44053ce0..e4ca812ff 100644 --- a/generate-new/src/Render/Names.hs +++ b/generate-new/src/Render/Names.hs @@ -58,7 +58,7 @@ specRenderedNames Spec {..} = do rnEnums = Set.fromList [ mkTyName n | Enum {..} <- toList specEnums - , n <- eName : [ flags | ABitmask flags <- pure eType ] + , n <- eName : [ flags | ABitmask flags _ <- pure eType ] ] (dispHandles, nonDispHandles) = partition ((== Dispatchable) . hDispatchable) $ toList specHandles @@ -72,8 +72,8 @@ specRenderedNames Spec {..} = do , TypeAlias == aType ] <> [ (mkTyName flags, mkTyName eName) - | Enum {..} <- toList specEnums - , ABitmask flags <- pure eType + | Enum {..} <- toList specEnums + , ABitmask flags _ <- pure eType , flags /= eName ] ) diff --git a/generate-new/src/Spec/Parse.hs b/generate-new/src/Spec/Parse.hs index 9b41c4889..0e6ce8e05 100644 --- a/generate-new/src/Spec/Parse.hs +++ b/generate-new/src/Spec/Parse.hs @@ -133,7 +133,12 @@ parseSpec bs = do $ bespokeSizes (specFlavor @t) <> [ (eName, (4, 4)) | Enum {..} <- V.toList specEnums ] <> [ (n, (4, 4)) - | Enum { eType = ABitmask n } <- V.toList specEnums + | Enum { eType = ABitmask n Bitmask32 } <- V.toList + specEnums + ] + <> [ (n, (8, 8)) + | Enum { eType = ABitmask n Bitmask64 } <- V.toList + specEnums ] <> [ (atName, (8, 8)) | Atom {..} <- V.toList specAtoms ] <> [ (hName, (8, 8)) | Handle {..} <- V.toList specHandles ] @@ -661,27 +666,44 @@ parseEmptyBitmasks es = fromList <$> traverseV | Element n <- es , "type" == name n , not (isAlias n) - , Nothing <- pure $ getAttr "requires" n + , Nothing <- pure $ getAttr "requires" n <|> getAttr "bitvalues" n , Just "bitmask" <- pure $ getAttr "category" n ] where parseEmptyBitmask :: Node -> P Enum' parseEmptyBitmask n = do eName <- nameElem "bitmask" n - pure Enum { eValues = mempty, eType = ABitmask eName, .. } + -- TODO: Are these always 32bit? + pure Enum { eValues = mempty, eType = ABitmask eName Bitmask32, .. } parseEnums :: [Content] -> [Content] -> P (Vector Enum') parseEnums types es = do flagNameMap <- Map.fromList <$> sequence - [ liftA2 (,) (decodeName bits) (nameElem "bitmask" n) + [ do + f <- decodeName bits + b <- nameElem "bitmask" n + typeElem <- traverse decode (elemText "type" n) + w <- case typeElem of + Nothing -> throw ("No type found for bitmask: " <> show bits) + Just "VkFlags" -> pure Bitmask32 + Just "VkFlags64" -> pure Bitmask64 + Just "XrFlags32" -> pure Bitmask32 + Just "XrFlags64" -> pure Bitmask64 + Just _ -> throw ("Unexpected type for bitmask: " <> show bits) + pure (f, (b, w)) | Element n <- types , "type" == name n , not (isAlias n) - , Just bits <- pure $ getAttr "requires" n + , Just bits <- pure $ getAttr "requires" n <|> getAttr "bitvalues" n , Just "bitmask" <- pure $ getAttr "category" n ] fromList <$> traverseV - (uncurry (parseEnum (`Map.lookup` flagNameMap) False)) + (uncurry + (parseEnum (fmap snd . (`Map.lookup` flagNameMap)) + (fmap fst . (`Map.lookup` flagNameMap)) + False + ) + ) [ (isBitmask, n) | Element n <- es , name n == "enums" @@ -692,16 +714,25 @@ parseEnums types es = do ] where - parseEnum :: (CName -> Maybe CName) -> Bool -> Bool -> Node -> P Enum' - parseEnum getFlagsName evIsExtension isBitmask n = do + parseEnum + :: (CName -> Maybe BitmaskWidth) + -> (CName -> Maybe CName) + -> Bool + -> Bool + -> Node + -> P Enum' + parseEnum getBitmaskWidth getFlagsName evIsExtension isBitmask n = do eName <- nameAttr "enum" n eValues <- fromList <$> traverseV (context (unCName eName) . parseValue) [ e | Element e <- contents n, name e == "enum", not (isAlias e) ] - let eType = if isBitmask - then -- If we can't find the flags name, use the bits name - ABitmask (fromMaybe eName (getFlagsName eName)) - else AnEnum + eType <- if isBitmask + -- If we can't find the flags name, use the bits name + then do + width <- note ("No width found for bitmask: " <> unCName eName) + (getBitmaskWidth eName) + pure $ ABitmask (fromMaybe eName (getFlagsName eName)) width + else pure AnEnum pure Enum { .. } where parseValue :: Node -> P EnumValue @@ -950,7 +981,11 @@ allTypeNames es = do ] requiresTypeNames <- traverseV nameText - [ n | Element n <- es, name n == "type", hasAttr "requires" n ] + [ n + | Element n <- es + , name n == "type" + , hasAttr "requires" n || hasAttr "bitvalues" n + ] fromList <$> traverseV ( fromEither . first fromList diff --git a/generate-new/src/Spec/Types.hs b/generate-new/src/Spec/Types.hs index 228190c5f..ba2c8386c 100644 --- a/generate-new/src/Spec/Types.hs +++ b/generate-new/src/Spec/Types.hs @@ -260,10 +260,13 @@ data EnumValue = EnumValue data EnumType = AnEnum - | ABitmask CName + | ABitmask CName BitmaskWidth -- ^ Stores the name of the "Flags" type deriving (Show, Eq) +data BitmaskWidth = Bitmask32 | Bitmask64 + deriving (Show, Eq) + -- -- SPIR-V stuff -- diff --git a/generate-new/vma/VMA/RenderParams.hs b/generate-new/vma/VMA/RenderParams.hs index 1a1032bba..f56c40e76 100644 --- a/generate-new/vma/VMA/RenderParams.hs +++ b/generate-new/vma/VMA/RenderParams.hs @@ -56,6 +56,7 @@ renderParams handles = r , lowerPrefix = "vma" , upperPrefix = "VMA" , flagsTypeName = "VkFlags" + , flags64TypeName = "VkFlags64" , alwaysQualifiedNames = mempty , extraNewtypes = mempty , mkIdiomaticType = let dropVulkanModule = transformBi diff --git a/generate-new/xr/XR/RenderParams.hs b/generate-new/xr/XR/RenderParams.hs index b14371707..7a35d4a45 100644 --- a/generate-new/xr/XR/RenderParams.hs +++ b/generate-new/xr/XR/RenderParams.hs @@ -71,7 +71,8 @@ renderParams handles = r , camelPrefix = "Xr" , lowerPrefix = "xr" , upperPrefix = "XR" - , flagsTypeName = "XrFlags64" + , flagsTypeName = "XrFlags32" -- doesn't exist + , flags64TypeName = "XrFlags64" , alwaysQualifiedNames = vulkanHaskellNames vulkanParams , extraNewtypes = vulkanNewtypes vulkanParams , mkIdiomaticType = From 9dda6fcc9b16116f7e743bdf2079a769ae8eb94f Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 17:36:11 +0800 Subject: [PATCH 05/11] Fix vma generation bug for 64 bit flags --- generate-new/vma/Main.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/generate-new/vma/Main.hs b/generate-new/vma/Main.hs index 4d421403c..ea1eced41 100644 --- a/generate-new/vma/Main.hs +++ b/generate-new/vma/Main.hs @@ -219,12 +219,13 @@ unitEnums state ds = do evValue <- exprValue expr' pure EnumValue { .. } - let eName = CName (T.pack n) - isMaxEnum EnumValue {..} = "_MAX_ENUM" `T.isSuffixOf` unCName evName - eValues = V.filter (not . isMaxEnum) allValues - eType = if "FlagBits" `List.isSuffixOf` n - then ABitmask (CName $ T.dropEnd 8 (T.pack n) <> "Flags") - else AnEnum + let + eName = CName (T.pack n) + isMaxEnum EnumValue {..} = "_MAX_ENUM" `T.isSuffixOf` unCName evName + eValues = V.filter (not . isMaxEnum) allValues + eType = if "FlagBits" `List.isSuffixOf` n + then ABitmask (CName $ T.dropEnd 8 (T.pack n) <> "Flags") Bitmask32 + else AnEnum pure (nodeInfo, Enum { .. }) -- TODO: This may be a little fragile From ca6d73387a71c6a909c2ec3cd4dbe529c7262456 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 17:36:41 +0800 Subject: [PATCH 06/11] regenerate --- src/Vulkan/Core10/FundamentalTypes.hs | 5 + .../Extensions/VK_KHR_synchronization2.hs | 371 ++++++++---------- .../VK_KHR_synchronization2.hs-boot | 5 +- 3 files changed, 165 insertions(+), 216 deletions(-) diff --git a/src/Vulkan/Core10/FundamentalTypes.hs b/src/Vulkan/Core10/FundamentalTypes.hs index 3856532cf..49d51d21c 100644 --- a/src/Vulkan/Core10/FundamentalTypes.hs +++ b/src/Vulkan/Core10/FundamentalTypes.hs @@ -13,6 +13,7 @@ module Vulkan.Core10.FundamentalTypes ( boolToBool32 ) , SampleMask , Flags + , Flags64 , DeviceSize , DeviceAddress , StructureType(..) @@ -608,6 +609,10 @@ type SampleMask = Word32 type Flags = Word32 +-- No documentation found for TopLevel "VkFlags64" +type Flags64 = Word64 + + -- | VkDeviceSize - Vulkan device memory size and offsets -- -- = See Also diff --git a/src/Vulkan/Extensions/VK_KHR_synchronization2.hs b/src/Vulkan/Extensions/VK_KHR_synchronization2.hs index 60367c138..62aad2112 100644 --- a/src/Vulkan/Extensions/VK_KHR_synchronization2.hs +++ b/src/Vulkan/Extensions/VK_KHR_synchronization2.hs @@ -444,8 +444,7 @@ module Vulkan.Extensions.VK_KHR_synchronization2 ( cmdSetEvent2KHR , QueueFamilyCheckpointProperties2NV(..) , CheckpointData2NV(..) , PhysicalDeviceSynchronization2FeaturesKHR(..) - , AccessFlags2KHR(..) - , PipelineStageFlags2KHR(..) + , AccessFlags2KHR , AccessFlagBits2KHR( ACCESS_2_NONE_KHR , ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR , ACCESS_2_INDEX_READ_BIT_KHR @@ -480,6 +479,7 @@ module Vulkan.Extensions.VK_KHR_synchronization2 ( cmdSetEvent2KHR , ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT , .. ) + , PipelineStageFlags2KHR , PipelineStageFlagBits2KHR( PIPELINE_STAGE_2_NONE_KHR , PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR , PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR @@ -524,6 +524,7 @@ module Vulkan.Extensions.VK_KHR_synchronization2 ( cmdSetEvent2KHR , pattern KHR_SYNCHRONIZATION_2_SPEC_VERSION , KHR_SYNCHRONIZATION_2_EXTENSION_NAME , pattern KHR_SYNCHRONIZATION_2_EXTENSION_NAME + , Flags64 ) where import Vulkan.Internal.Utils (enumReadPrec) @@ -609,6 +610,7 @@ import Vulkan.CStruct.Extends (Extensible(..)) import Vulkan.Core10.Handles (Fence) import Vulkan.Core10.Handles (Fence(..)) import Vulkan.Core10.FundamentalTypes (Flags) +import Vulkan.Core10.FundamentalTypes (Flags64) import Vulkan.Core10.Handles (Image) import Vulkan.Core10.Enums.ImageLayout (ImageLayout) import Vulkan.Core10.ImageView (ImageSubresourceRange) @@ -642,6 +644,7 @@ import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_QUEUE_FAM import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR)) import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_SUBMIT_INFO_2_KHR)) import Vulkan.Core10.Enums.Result (Result(SUCCESS)) +import Vulkan.Core10.FundamentalTypes (Flags64) foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe @@ -2623,16 +2626,16 @@ deriving instance Generic (MemoryBarrier2KHR) deriving instance Show MemoryBarrier2KHR instance ToCStruct MemoryBarrier2KHR where - withCStruct x f = allocaBytesAligned 32 8 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 48 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p MemoryBarrier2KHR{..} f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr PipelineStageFlags2KHR)) (srcStageMask) - poke ((p `plusPtr` 20 :: Ptr AccessFlags2KHR)) (srcAccessMask) - poke ((p `plusPtr` 24 :: Ptr PipelineStageFlags2KHR)) (dstStageMask) - poke ((p `plusPtr` 28 :: Ptr AccessFlags2KHR)) (dstAccessMask) + poke ((p `plusPtr` 24 :: Ptr AccessFlags2KHR)) (srcAccessMask) + poke ((p `plusPtr` 32 :: Ptr PipelineStageFlags2KHR)) (dstStageMask) + poke ((p `plusPtr` 40 :: Ptr AccessFlags2KHR)) (dstAccessMask) f - cStructSize = 32 + cStructSize = 48 cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_MEMORY_BARRIER_2_KHR) @@ -2642,14 +2645,14 @@ instance ToCStruct MemoryBarrier2KHR where instance FromCStruct MemoryBarrier2KHR where peekCStruct p = do srcStageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 16 :: Ptr PipelineStageFlags2KHR)) - srcAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 20 :: Ptr AccessFlags2KHR)) - dstStageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 24 :: Ptr PipelineStageFlags2KHR)) - dstAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 28 :: Ptr AccessFlags2KHR)) + srcAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 24 :: Ptr AccessFlags2KHR)) + dstStageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 32 :: Ptr PipelineStageFlags2KHR)) + dstAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 40 :: Ptr AccessFlags2KHR)) pure $ MemoryBarrier2KHR srcStageMask srcAccessMask dstStageMask dstAccessMask instance Storable MemoryBarrier2KHR where - sizeOf ~_ = 32 + sizeOf ~_ = 48 alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) @@ -3627,34 +3630,34 @@ instance Extensible ImageMemoryBarrier2KHR where | otherwise = Nothing instance (Extendss ImageMemoryBarrier2KHR es, PokeChain es) => ToCStruct (ImageMemoryBarrier2KHR es) where - withCStruct x f = allocaBytesAligned 80 8 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 96 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p ImageMemoryBarrier2KHR{..} f = evalContT $ do lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR) pNext'' <- fmap castPtr . ContT $ withChain (next) lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'' lift $ poke ((p `plusPtr` 16 :: Ptr PipelineStageFlags2KHR)) (srcStageMask) - lift $ poke ((p `plusPtr` 20 :: Ptr AccessFlags2KHR)) (srcAccessMask) - lift $ poke ((p `plusPtr` 24 :: Ptr PipelineStageFlags2KHR)) (dstStageMask) - lift $ poke ((p `plusPtr` 28 :: Ptr AccessFlags2KHR)) (dstAccessMask) - lift $ poke ((p `plusPtr` 32 :: Ptr ImageLayout)) (oldLayout) - lift $ poke ((p `plusPtr` 36 :: Ptr ImageLayout)) (newLayout) - lift $ poke ((p `plusPtr` 40 :: Ptr Word32)) (srcQueueFamilyIndex) - lift $ poke ((p `plusPtr` 44 :: Ptr Word32)) (dstQueueFamilyIndex) - lift $ poke ((p `plusPtr` 48 :: Ptr Image)) (image) - lift $ poke ((p `plusPtr` 56 :: Ptr ImageSubresourceRange)) (subresourceRange) + lift $ poke ((p `plusPtr` 24 :: Ptr AccessFlags2KHR)) (srcAccessMask) + lift $ poke ((p `plusPtr` 32 :: Ptr PipelineStageFlags2KHR)) (dstStageMask) + lift $ poke ((p `plusPtr` 40 :: Ptr AccessFlags2KHR)) (dstAccessMask) + lift $ poke ((p `plusPtr` 48 :: Ptr ImageLayout)) (oldLayout) + lift $ poke ((p `plusPtr` 52 :: Ptr ImageLayout)) (newLayout) + lift $ poke ((p `plusPtr` 56 :: Ptr Word32)) (srcQueueFamilyIndex) + lift $ poke ((p `plusPtr` 60 :: Ptr Word32)) (dstQueueFamilyIndex) + lift $ poke ((p `plusPtr` 64 :: Ptr Image)) (image) + lift $ poke ((p `plusPtr` 72 :: Ptr ImageSubresourceRange)) (subresourceRange) lift $ f - cStructSize = 80 + cStructSize = 96 cStructAlignment = 8 pokeZeroCStruct p f = evalContT $ do lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2_KHR) pNext' <- fmap castPtr . ContT $ withZeroChain @es lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext' - lift $ poke ((p `plusPtr` 32 :: Ptr ImageLayout)) (zero) - lift $ poke ((p `plusPtr` 36 :: Ptr ImageLayout)) (zero) - lift $ poke ((p `plusPtr` 40 :: Ptr Word32)) (zero) - lift $ poke ((p `plusPtr` 44 :: Ptr Word32)) (zero) - lift $ poke ((p `plusPtr` 48 :: Ptr Image)) (zero) - lift $ poke ((p `plusPtr` 56 :: Ptr ImageSubresourceRange)) (zero) + lift $ poke ((p `plusPtr` 48 :: Ptr ImageLayout)) (zero) + lift $ poke ((p `plusPtr` 52 :: Ptr ImageLayout)) (zero) + lift $ poke ((p `plusPtr` 56 :: Ptr Word32)) (zero) + lift $ poke ((p `plusPtr` 60 :: Ptr Word32)) (zero) + lift $ poke ((p `plusPtr` 64 :: Ptr Image)) (zero) + lift $ poke ((p `plusPtr` 72 :: Ptr ImageSubresourceRange)) (zero) lift $ f instance (Extendss ImageMemoryBarrier2KHR es, PeekChain es) => FromCStruct (ImageMemoryBarrier2KHR es) where @@ -3662,15 +3665,15 @@ instance (Extendss ImageMemoryBarrier2KHR es, PeekChain es) => FromCStruct (Imag pNext <- peek @(Ptr ()) ((p `plusPtr` 8 :: Ptr (Ptr ()))) next <- peekChain (castPtr pNext) srcStageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 16 :: Ptr PipelineStageFlags2KHR)) - srcAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 20 :: Ptr AccessFlags2KHR)) - dstStageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 24 :: Ptr PipelineStageFlags2KHR)) - dstAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 28 :: Ptr AccessFlags2KHR)) - oldLayout <- peek @ImageLayout ((p `plusPtr` 32 :: Ptr ImageLayout)) - newLayout <- peek @ImageLayout ((p `plusPtr` 36 :: Ptr ImageLayout)) - srcQueueFamilyIndex <- peek @Word32 ((p `plusPtr` 40 :: Ptr Word32)) - dstQueueFamilyIndex <- peek @Word32 ((p `plusPtr` 44 :: Ptr Word32)) - image <- peek @Image ((p `plusPtr` 48 :: Ptr Image)) - subresourceRange <- peekCStruct @ImageSubresourceRange ((p `plusPtr` 56 :: Ptr ImageSubresourceRange)) + srcAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 24 :: Ptr AccessFlags2KHR)) + dstStageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 32 :: Ptr PipelineStageFlags2KHR)) + dstAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 40 :: Ptr AccessFlags2KHR)) + oldLayout <- peek @ImageLayout ((p `plusPtr` 48 :: Ptr ImageLayout)) + newLayout <- peek @ImageLayout ((p `plusPtr` 52 :: Ptr ImageLayout)) + srcQueueFamilyIndex <- peek @Word32 ((p `plusPtr` 56 :: Ptr Word32)) + dstQueueFamilyIndex <- peek @Word32 ((p `plusPtr` 60 :: Ptr Word32)) + image <- peek @Image ((p `plusPtr` 64 :: Ptr Image)) + subresourceRange <- peekCStruct @ImageSubresourceRange ((p `plusPtr` 72 :: Ptr ImageSubresourceRange)) pure $ ImageMemoryBarrier2KHR next srcStageMask srcAccessMask dstStageMask dstAccessMask oldLayout newLayout srcQueueFamilyIndex dstQueueFamilyIndex image subresourceRange @@ -4359,48 +4362,48 @@ deriving instance Generic (BufferMemoryBarrier2KHR) deriving instance Show BufferMemoryBarrier2KHR instance ToCStruct BufferMemoryBarrier2KHR where - withCStruct x f = allocaBytesAligned 64 8 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 80 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p BufferMemoryBarrier2KHR{..} f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr PipelineStageFlags2KHR)) (srcStageMask) - poke ((p `plusPtr` 20 :: Ptr AccessFlags2KHR)) (srcAccessMask) - poke ((p `plusPtr` 24 :: Ptr PipelineStageFlags2KHR)) (dstStageMask) - poke ((p `plusPtr` 28 :: Ptr AccessFlags2KHR)) (dstAccessMask) - poke ((p `plusPtr` 32 :: Ptr Word32)) (srcQueueFamilyIndex) - poke ((p `plusPtr` 36 :: Ptr Word32)) (dstQueueFamilyIndex) - poke ((p `plusPtr` 40 :: Ptr Buffer)) (buffer) - poke ((p `plusPtr` 48 :: Ptr DeviceSize)) (offset) - poke ((p `plusPtr` 56 :: Ptr DeviceSize)) (size) + poke ((p `plusPtr` 24 :: Ptr AccessFlags2KHR)) (srcAccessMask) + poke ((p `plusPtr` 32 :: Ptr PipelineStageFlags2KHR)) (dstStageMask) + poke ((p `plusPtr` 40 :: Ptr AccessFlags2KHR)) (dstAccessMask) + poke ((p `plusPtr` 48 :: Ptr Word32)) (srcQueueFamilyIndex) + poke ((p `plusPtr` 52 :: Ptr Word32)) (dstQueueFamilyIndex) + poke ((p `plusPtr` 56 :: Ptr Buffer)) (buffer) + poke ((p `plusPtr` 64 :: Ptr DeviceSize)) (offset) + poke ((p `plusPtr` 72 :: Ptr DeviceSize)) (size) f - cStructSize = 64 + cStructSize = 80 cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER_2_KHR) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) - poke ((p `plusPtr` 32 :: Ptr Word32)) (zero) - poke ((p `plusPtr` 36 :: Ptr Word32)) (zero) - poke ((p `plusPtr` 40 :: Ptr Buffer)) (zero) - poke ((p `plusPtr` 48 :: Ptr DeviceSize)) (zero) - poke ((p `plusPtr` 56 :: Ptr DeviceSize)) (zero) + poke ((p `plusPtr` 48 :: Ptr Word32)) (zero) + poke ((p `plusPtr` 52 :: Ptr Word32)) (zero) + poke ((p `plusPtr` 56 :: Ptr Buffer)) (zero) + poke ((p `plusPtr` 64 :: Ptr DeviceSize)) (zero) + poke ((p `plusPtr` 72 :: Ptr DeviceSize)) (zero) f instance FromCStruct BufferMemoryBarrier2KHR where peekCStruct p = do srcStageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 16 :: Ptr PipelineStageFlags2KHR)) - srcAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 20 :: Ptr AccessFlags2KHR)) - dstStageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 24 :: Ptr PipelineStageFlags2KHR)) - dstAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 28 :: Ptr AccessFlags2KHR)) - srcQueueFamilyIndex <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32)) - dstQueueFamilyIndex <- peek @Word32 ((p `plusPtr` 36 :: Ptr Word32)) - buffer <- peek @Buffer ((p `plusPtr` 40 :: Ptr Buffer)) - offset <- peek @DeviceSize ((p `plusPtr` 48 :: Ptr DeviceSize)) - size <- peek @DeviceSize ((p `plusPtr` 56 :: Ptr DeviceSize)) + srcAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 24 :: Ptr AccessFlags2KHR)) + dstStageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 32 :: Ptr PipelineStageFlags2KHR)) + dstAccessMask <- peek @AccessFlags2KHR ((p `plusPtr` 40 :: Ptr AccessFlags2KHR)) + srcQueueFamilyIndex <- peek @Word32 ((p `plusPtr` 48 :: Ptr Word32)) + dstQueueFamilyIndex <- peek @Word32 ((p `plusPtr` 52 :: Ptr Word32)) + buffer <- peek @Buffer ((p `plusPtr` 56 :: Ptr Buffer)) + offset <- peek @DeviceSize ((p `plusPtr` 64 :: Ptr DeviceSize)) + size <- peek @DeviceSize ((p `plusPtr` 72 :: Ptr DeviceSize)) pure $ BufferMemoryBarrier2KHR srcStageMask srcAccessMask dstStageMask dstAccessMask srcQueueFamilyIndex dstQueueFamilyIndex buffer offset size instance Storable BufferMemoryBarrier2KHR where - sizeOf ~_ = 64 + sizeOf ~_ = 80 alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) @@ -4497,16 +4500,16 @@ instance ToCStruct DependencyInfoKHR where lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) lift $ poke ((p `plusPtr` 16 :: Ptr DependencyFlags)) (dependencyFlags) lift $ poke ((p `plusPtr` 20 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (memoryBarriers)) :: Word32)) - pPMemoryBarriers' <- ContT $ allocaBytesAligned @MemoryBarrier2KHR ((Data.Vector.length (memoryBarriers)) * 32) 8 - lift $ Data.Vector.imapM_ (\i e -> poke (pPMemoryBarriers' `plusPtr` (32 * (i)) :: Ptr MemoryBarrier2KHR) (e)) (memoryBarriers) + pPMemoryBarriers' <- ContT $ allocaBytesAligned @MemoryBarrier2KHR ((Data.Vector.length (memoryBarriers)) * 48) 8 + lift $ Data.Vector.imapM_ (\i e -> poke (pPMemoryBarriers' `plusPtr` (48 * (i)) :: Ptr MemoryBarrier2KHR) (e)) (memoryBarriers) lift $ poke ((p `plusPtr` 24 :: Ptr (Ptr MemoryBarrier2KHR))) (pPMemoryBarriers') lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (bufferMemoryBarriers)) :: Word32)) - pPBufferMemoryBarriers' <- ContT $ allocaBytesAligned @BufferMemoryBarrier2KHR ((Data.Vector.length (bufferMemoryBarriers)) * 64) 8 - lift $ Data.Vector.imapM_ (\i e -> poke (pPBufferMemoryBarriers' `plusPtr` (64 * (i)) :: Ptr BufferMemoryBarrier2KHR) (e)) (bufferMemoryBarriers) + pPBufferMemoryBarriers' <- ContT $ allocaBytesAligned @BufferMemoryBarrier2KHR ((Data.Vector.length (bufferMemoryBarriers)) * 80) 8 + lift $ Data.Vector.imapM_ (\i e -> poke (pPBufferMemoryBarriers' `plusPtr` (80 * (i)) :: Ptr BufferMemoryBarrier2KHR) (e)) (bufferMemoryBarriers) lift $ poke ((p `plusPtr` 40 :: Ptr (Ptr BufferMemoryBarrier2KHR))) (pPBufferMemoryBarriers') lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (imageMemoryBarriers)) :: Word32)) - pPImageMemoryBarriers' <- ContT $ allocaBytesAligned @(ImageMemoryBarrier2KHR _) ((Data.Vector.length (imageMemoryBarriers)) * 80) 8 - Data.Vector.imapM_ (\i e -> ContT $ pokeSomeCStruct (forgetExtensions (pPImageMemoryBarriers' `plusPtr` (80 * (i)) :: Ptr (ImageMemoryBarrier2KHR _))) (e) . ($ ())) (imageMemoryBarriers) + pPImageMemoryBarriers' <- ContT $ allocaBytesAligned @(ImageMemoryBarrier2KHR _) ((Data.Vector.length (imageMemoryBarriers)) * 96) 8 + Data.Vector.imapM_ (\i e -> ContT $ pokeSomeCStruct (forgetExtensions (pPImageMemoryBarriers' `plusPtr` (96 * (i)) :: Ptr (ImageMemoryBarrier2KHR _))) (e) . ($ ())) (imageMemoryBarriers) lift $ poke ((p `plusPtr` 56 :: Ptr (Ptr (ImageMemoryBarrier2KHR _)))) (pPImageMemoryBarriers') lift $ f cStructSize = 64 @@ -4521,13 +4524,13 @@ instance FromCStruct DependencyInfoKHR where dependencyFlags <- peek @DependencyFlags ((p `plusPtr` 16 :: Ptr DependencyFlags)) memoryBarrierCount <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32)) pMemoryBarriers <- peek @(Ptr MemoryBarrier2KHR) ((p `plusPtr` 24 :: Ptr (Ptr MemoryBarrier2KHR))) - pMemoryBarriers' <- generateM (fromIntegral memoryBarrierCount) (\i -> peekCStruct @MemoryBarrier2KHR ((pMemoryBarriers `advancePtrBytes` (32 * (i)) :: Ptr MemoryBarrier2KHR))) + pMemoryBarriers' <- generateM (fromIntegral memoryBarrierCount) (\i -> peekCStruct @MemoryBarrier2KHR ((pMemoryBarriers `advancePtrBytes` (48 * (i)) :: Ptr MemoryBarrier2KHR))) bufferMemoryBarrierCount <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32)) pBufferMemoryBarriers <- peek @(Ptr BufferMemoryBarrier2KHR) ((p `plusPtr` 40 :: Ptr (Ptr BufferMemoryBarrier2KHR))) - pBufferMemoryBarriers' <- generateM (fromIntegral bufferMemoryBarrierCount) (\i -> peekCStruct @BufferMemoryBarrier2KHR ((pBufferMemoryBarriers `advancePtrBytes` (64 * (i)) :: Ptr BufferMemoryBarrier2KHR))) + pBufferMemoryBarriers' <- generateM (fromIntegral bufferMemoryBarrierCount) (\i -> peekCStruct @BufferMemoryBarrier2KHR ((pBufferMemoryBarriers `advancePtrBytes` (80 * (i)) :: Ptr BufferMemoryBarrier2KHR))) imageMemoryBarrierCount <- peek @Word32 ((p `plusPtr` 48 :: Ptr Word32)) pImageMemoryBarriers <- peek @(Ptr (ImageMemoryBarrier2KHR _)) ((p `plusPtr` 56 :: Ptr (Ptr (ImageMemoryBarrier2KHR _)))) - pImageMemoryBarriers' <- generateM (fromIntegral imageMemoryBarrierCount) (\i -> peekSomeCStruct (forgetExtensions ((pImageMemoryBarriers `advancePtrBytes` (80 * (i)) :: Ptr (ImageMemoryBarrier2KHR _))))) + pImageMemoryBarriers' <- generateM (fromIntegral imageMemoryBarrierCount) (\i -> peekSomeCStruct (forgetExtensions ((pImageMemoryBarriers `advancePtrBytes` (96 * (i)) :: Ptr (ImageMemoryBarrier2KHR _))))) pure $ DependencyInfoKHR dependencyFlags pMemoryBarriers' pBufferMemoryBarriers' pImageMemoryBarriers' @@ -4637,23 +4640,23 @@ deriving instance Generic (SemaphoreSubmitInfoKHR) deriving instance Show SemaphoreSubmitInfoKHR instance ToCStruct SemaphoreSubmitInfoKHR where - withCStruct x f = allocaBytesAligned 40 8 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 48 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p SemaphoreSubmitInfoKHR{..} f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr Semaphore)) (semaphore) poke ((p `plusPtr` 24 :: Ptr Word64)) (value) poke ((p `plusPtr` 32 :: Ptr PipelineStageFlags2KHR)) (stageMask) - poke ((p `plusPtr` 36 :: Ptr Word32)) (deviceIndex) + poke ((p `plusPtr` 40 :: Ptr Word32)) (deviceIndex) f - cStructSize = 40 + cStructSize = 48 cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr Semaphore)) (zero) poke ((p `plusPtr` 24 :: Ptr Word64)) (zero) - poke ((p `plusPtr` 36 :: Ptr Word32)) (zero) + poke ((p `plusPtr` 40 :: Ptr Word32)) (zero) f instance FromCStruct SemaphoreSubmitInfoKHR where @@ -4661,12 +4664,12 @@ instance FromCStruct SemaphoreSubmitInfoKHR where semaphore <- peek @Semaphore ((p `plusPtr` 16 :: Ptr Semaphore)) value <- peek @Word64 ((p `plusPtr` 24 :: Ptr Word64)) stageMask <- peek @PipelineStageFlags2KHR ((p `plusPtr` 32 :: Ptr PipelineStageFlags2KHR)) - deviceIndex <- peek @Word32 ((p `plusPtr` 36 :: Ptr Word32)) + deviceIndex <- peek @Word32 ((p `plusPtr` 40 :: Ptr Word32)) pure $ SemaphoreSubmitInfoKHR semaphore value stageMask deviceIndex instance Storable SemaphoreSubmitInfoKHR where - sizeOf ~_ = 40 + sizeOf ~_ = 48 alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) @@ -4886,16 +4889,16 @@ instance (Extendss SubmitInfo2KHR es, PokeChain es) => ToCStruct (SubmitInfo2KHR lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext'' lift $ poke ((p `plusPtr` 16 :: Ptr SubmitFlagsKHR)) (flags) lift $ poke ((p `plusPtr` 20 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (waitSemaphoreInfos)) :: Word32)) - pPWaitSemaphoreInfos' <- ContT $ allocaBytesAligned @SemaphoreSubmitInfoKHR ((Data.Vector.length (waitSemaphoreInfos)) * 40) 8 - lift $ Data.Vector.imapM_ (\i e -> poke (pPWaitSemaphoreInfos' `plusPtr` (40 * (i)) :: Ptr SemaphoreSubmitInfoKHR) (e)) (waitSemaphoreInfos) + pPWaitSemaphoreInfos' <- ContT $ allocaBytesAligned @SemaphoreSubmitInfoKHR ((Data.Vector.length (waitSemaphoreInfos)) * 48) 8 + lift $ Data.Vector.imapM_ (\i e -> poke (pPWaitSemaphoreInfos' `plusPtr` (48 * (i)) :: Ptr SemaphoreSubmitInfoKHR) (e)) (waitSemaphoreInfos) lift $ poke ((p `plusPtr` 24 :: Ptr (Ptr SemaphoreSubmitInfoKHR))) (pPWaitSemaphoreInfos') lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (commandBufferInfos)) :: Word32)) pPCommandBufferInfos' <- ContT $ allocaBytesAligned @CommandBufferSubmitInfoKHR ((Data.Vector.length (commandBufferInfos)) * 32) 8 lift $ Data.Vector.imapM_ (\i e -> poke (pPCommandBufferInfos' `plusPtr` (32 * (i)) :: Ptr CommandBufferSubmitInfoKHR) (e)) (commandBufferInfos) lift $ poke ((p `plusPtr` 40 :: Ptr (Ptr CommandBufferSubmitInfoKHR))) (pPCommandBufferInfos') lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (signalSemaphoreInfos)) :: Word32)) - pPSignalSemaphoreInfos' <- ContT $ allocaBytesAligned @SemaphoreSubmitInfoKHR ((Data.Vector.length (signalSemaphoreInfos)) * 40) 8 - lift $ Data.Vector.imapM_ (\i e -> poke (pPSignalSemaphoreInfos' `plusPtr` (40 * (i)) :: Ptr SemaphoreSubmitInfoKHR) (e)) (signalSemaphoreInfos) + pPSignalSemaphoreInfos' <- ContT $ allocaBytesAligned @SemaphoreSubmitInfoKHR ((Data.Vector.length (signalSemaphoreInfos)) * 48) 8 + lift $ Data.Vector.imapM_ (\i e -> poke (pPSignalSemaphoreInfos' `plusPtr` (48 * (i)) :: Ptr SemaphoreSubmitInfoKHR) (e)) (signalSemaphoreInfos) lift $ poke ((p `plusPtr` 56 :: Ptr (Ptr SemaphoreSubmitInfoKHR))) (pPSignalSemaphoreInfos') lift $ f cStructSize = 64 @@ -4913,13 +4916,13 @@ instance (Extendss SubmitInfo2KHR es, PeekChain es) => FromCStruct (SubmitInfo2K flags <- peek @SubmitFlagsKHR ((p `plusPtr` 16 :: Ptr SubmitFlagsKHR)) waitSemaphoreInfoCount <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32)) pWaitSemaphoreInfos <- peek @(Ptr SemaphoreSubmitInfoKHR) ((p `plusPtr` 24 :: Ptr (Ptr SemaphoreSubmitInfoKHR))) - pWaitSemaphoreInfos' <- generateM (fromIntegral waitSemaphoreInfoCount) (\i -> peekCStruct @SemaphoreSubmitInfoKHR ((pWaitSemaphoreInfos `advancePtrBytes` (40 * (i)) :: Ptr SemaphoreSubmitInfoKHR))) + pWaitSemaphoreInfos' <- generateM (fromIntegral waitSemaphoreInfoCount) (\i -> peekCStruct @SemaphoreSubmitInfoKHR ((pWaitSemaphoreInfos `advancePtrBytes` (48 * (i)) :: Ptr SemaphoreSubmitInfoKHR))) commandBufferInfoCount <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32)) pCommandBufferInfos <- peek @(Ptr CommandBufferSubmitInfoKHR) ((p `plusPtr` 40 :: Ptr (Ptr CommandBufferSubmitInfoKHR))) pCommandBufferInfos' <- generateM (fromIntegral commandBufferInfoCount) (\i -> peekCStruct @CommandBufferSubmitInfoKHR ((pCommandBufferInfos `advancePtrBytes` (32 * (i)) :: Ptr CommandBufferSubmitInfoKHR))) signalSemaphoreInfoCount <- peek @Word32 ((p `plusPtr` 48 :: Ptr Word32)) pSignalSemaphoreInfos <- peek @(Ptr SemaphoreSubmitInfoKHR) ((p `plusPtr` 56 :: Ptr (Ptr SemaphoreSubmitInfoKHR))) - pSignalSemaphoreInfos' <- generateM (fromIntegral signalSemaphoreInfoCount) (\i -> peekCStruct @SemaphoreSubmitInfoKHR ((pSignalSemaphoreInfos `advancePtrBytes` (40 * (i)) :: Ptr SemaphoreSubmitInfoKHR))) + pSignalSemaphoreInfos' <- generateM (fromIntegral signalSemaphoreInfoCount) (\i -> peekCStruct @SemaphoreSubmitInfoKHR ((pSignalSemaphoreInfos `advancePtrBytes` (48 * (i)) :: Ptr SemaphoreSubmitInfoKHR))) pure $ SubmitInfo2KHR next flags pWaitSemaphoreInfos' pCommandBufferInfos' pSignalSemaphoreInfos' @@ -5120,71 +5123,7 @@ instance Zero PhysicalDeviceSynchronization2FeaturesKHR where zero --- | VkAccessFlags2KHR - 64-bit mask of access flags --- --- = See Also --- --- 'BufferMemoryBarrier2KHR', 'ImageMemoryBarrier2KHR', 'MemoryBarrier2KHR' -newtype AccessFlags2KHR = AccessFlags2KHR Flags - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameAccessFlags2KHR :: String -conNameAccessFlags2KHR = "AccessFlags2KHR" - -enumPrefixAccessFlags2KHR :: String -enumPrefixAccessFlags2KHR = "" - -showTableAccessFlags2KHR :: [(AccessFlags2KHR, String)] -showTableAccessFlags2KHR = [] - -instance Show AccessFlags2KHR where - showsPrec = enumShowsPrec enumPrefixAccessFlags2KHR - showTableAccessFlags2KHR - conNameAccessFlags2KHR - (\(AccessFlags2KHR x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read AccessFlags2KHR where - readPrec = enumReadPrec enumPrefixAccessFlags2KHR showTableAccessFlags2KHR conNameAccessFlags2KHR AccessFlags2KHR - - --- | VkPipelineStageFlags2KHR - 64-bit mask of pipeline stage flags --- --- = See Also --- --- 'BufferMemoryBarrier2KHR', 'CheckpointData2NV', --- 'ImageMemoryBarrier2KHR', 'MemoryBarrier2KHR', --- 'QueueFamilyCheckpointProperties2NV', 'SemaphoreSubmitInfoKHR', --- 'cmdResetEvent2KHR', 'cmdWriteBufferMarker2AMD', 'cmdWriteTimestamp2KHR' -newtype PipelineStageFlags2KHR = PipelineStageFlags2KHR Flags - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNamePipelineStageFlags2KHR :: String -conNamePipelineStageFlags2KHR = "PipelineStageFlags2KHR" - -enumPrefixPipelineStageFlags2KHR :: String -enumPrefixPipelineStageFlags2KHR = "" - -showTablePipelineStageFlags2KHR :: [(PipelineStageFlags2KHR, String)] -showTablePipelineStageFlags2KHR = [] - -instance Show PipelineStageFlags2KHR where - showsPrec = enumShowsPrec enumPrefixPipelineStageFlags2KHR - showTablePipelineStageFlags2KHR - conNamePipelineStageFlags2KHR - (\(PipelineStageFlags2KHR x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read PipelineStageFlags2KHR where - readPrec = enumReadPrec enumPrefixPipelineStageFlags2KHR - showTablePipelineStageFlags2KHR - conNamePipelineStageFlags2KHR - PipelineStageFlags2KHR - +type AccessFlags2KHR = AccessFlagBits2KHR -- | VkAccessFlagBits2KHR - Access flags for VkAccessFlags2KHR -- @@ -5207,30 +5146,30 @@ instance Read PipelineStageFlags2KHR where -- = See Also -- -- No cross-references are available -newtype AccessFlagBits2KHR = AccessFlagBits2KHR Flags +newtype AccessFlagBits2KHR = AccessFlagBits2KHR Flags64 deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) -- | 'ACCESS_2_NONE_KHR' specifies no accesses. -pattern ACCESS_2_NONE_KHR = AccessFlagBits2KHR 0x00000000 +pattern ACCESS_2_NONE_KHR = AccessFlagBits2KHR 0x0000000000000000 -- | 'ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR' specifies read access to -- indirect buffers in the 'PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR' -- pipeline stage. -pattern ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = AccessFlagBits2KHR 0x00000001 +pattern ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000000001 -- | 'ACCESS_2_INDEX_READ_BIT_KHR' specifies read access to an index buffer -- in the 'PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR' pipeline stage. -pattern ACCESS_2_INDEX_READ_BIT_KHR = AccessFlagBits2KHR 0x00000002 +pattern ACCESS_2_INDEX_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000000002 -- | 'ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR' specifies read access to a -- vertex buffer in the 'PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR' -- pipeline stage. -pattern ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = AccessFlagBits2KHR 0x00000004 +pattern ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000000004 -- | 'ACCESS_2_UNIFORM_READ_BIT_KHR' specifies read access to a -- -- in any shader pipeline stage. -pattern ACCESS_2_UNIFORM_READ_BIT_KHR = AccessFlagBits2KHR 0x00000008 +pattern ACCESS_2_UNIFORM_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000000008 -- | 'ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR' specifies read access to an -- -- in the 'PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR' pipeline stage. -pattern ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = AccessFlagBits2KHR 0x00000010 +pattern ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000000010 -- | 'ACCESS_2_SHADER_READ_BIT_KHR' is equivalent to the logical OR of: -- -- - VK_ACCESS_2_UNIFORM_READ_BIT_KHR @@ -5238,64 +5177,64 @@ pattern ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = AccessFlagBits2KHR 0x0 -- - VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR -- -- - VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR -pattern ACCESS_2_SHADER_READ_BIT_KHR = AccessFlagBits2KHR 0x00000020 +pattern ACCESS_2_SHADER_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000000020 -- | 'ACCESS_2_SHADER_WRITE_BIT_KHR' is equivalent to -- 'ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR'. -pattern ACCESS_2_SHADER_WRITE_BIT_KHR = AccessFlagBits2KHR 0x00000040 +pattern ACCESS_2_SHADER_WRITE_BIT_KHR = AccessFlagBits2KHR 0x0000000000000040 -- | 'ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR' specifies read access to a -- -- (excluding -- ) -- in the 'PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR' pipeline -- stage. -pattern ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = AccessFlagBits2KHR 0x00000080 +pattern ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000000080 -- | 'ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR' specifies write access to a -- -- in the 'PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR' pipeline -- stage. -pattern ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = AccessFlagBits2KHR 0x00000100 +pattern ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = AccessFlagBits2KHR 0x0000000000000100 -- | 'ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR' specifies read access -- to a -- -- in the 'PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR' or -- 'PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR' pipeline stages. -pattern ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = AccessFlagBits2KHR 0x00000200 +pattern ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000000200 -- | 'ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR' specifies write access -- to a -- -- in the 'PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR' or -- 'PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR' pipeline stages. -pattern ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = AccessFlagBits2KHR 0x00000400 +pattern ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = AccessFlagBits2KHR 0x0000000000000400 -- | 'ACCESS_2_TRANSFER_READ_BIT_KHR' specifies read access to an image or -- buffer in the 'PIPELINE_STAGE_2_COPY_BIT_KHR', -- 'PIPELINE_STAGE_2_BLIT_BIT_KHR', or 'PIPELINE_STAGE_2_RESOLVE_BIT_KHR' -- pipeline stages. -pattern ACCESS_2_TRANSFER_READ_BIT_KHR = AccessFlagBits2KHR 0x00000800 +pattern ACCESS_2_TRANSFER_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000000800 -- | 'ACCESS_2_TRANSFER_WRITE_BIT_KHR' specifies write access to an image or -- buffer in the 'PIPELINE_STAGE_2_COPY_BIT_KHR', -- 'PIPELINE_STAGE_2_BLIT_BIT_KHR', 'PIPELINE_STAGE_2_CLEAR_BIT_KHR', or -- 'PIPELINE_STAGE_2_RESOLVE_BIT_KHR' pipeline stages. -pattern ACCESS_2_TRANSFER_WRITE_BIT_KHR = AccessFlagBits2KHR 0x00001000 +pattern ACCESS_2_TRANSFER_WRITE_BIT_KHR = AccessFlagBits2KHR 0x0000000000001000 -- | 'ACCESS_2_HOST_READ_BIT_KHR' specifies read access to memory in the -- 'PIPELINE_STAGE_2_HOST_BIT_KHR' pipeline stage. -pattern ACCESS_2_HOST_READ_BIT_KHR = AccessFlagBits2KHR 0x00002000 +pattern ACCESS_2_HOST_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000002000 -- | 'ACCESS_2_HOST_WRITE_BIT_KHR' specifies write access to memory in the -- 'PIPELINE_STAGE_2_HOST_BIT_KHR' pipeline stage. -pattern ACCESS_2_HOST_WRITE_BIT_KHR = AccessFlagBits2KHR 0x00004000 +pattern ACCESS_2_HOST_WRITE_BIT_KHR = AccessFlagBits2KHR 0x0000000000004000 -- | 'ACCESS_2_MEMORY_READ_BIT_KHR' specifies all read accesses. It is always -- valid in any access mask, and is treated as equivalent to setting all -- @READ@ access flags that are valid where it is used. -pattern ACCESS_2_MEMORY_READ_BIT_KHR = AccessFlagBits2KHR 0x00008000 +pattern ACCESS_2_MEMORY_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000008000 -- | 'ACCESS_2_MEMORY_WRITE_BIT_KHR' specifies all write accesses. It is -- always valid in any access mask, and is treated as equivalent to setting -- all @WRITE@ access flags that are valid where it is used. -pattern ACCESS_2_MEMORY_WRITE_BIT_KHR = AccessFlagBits2KHR 0x00010000 +pattern ACCESS_2_MEMORY_WRITE_BIT_KHR = AccessFlagBits2KHR 0x0000000000010000 -- | 'ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR' specifies read access to a -- -- or -- -- in any shader pipeline stage. -pattern ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = AccessFlagBits2KHR 0x100000000 +pattern ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000100000000 -- | 'ACCESS_2_SHADER_STORAGE_READ_BIT_KHR' specifies read access to a -- , -- , @@ -5303,7 +5242,7 @@ pattern ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = AccessFlagBits2KHR 0x1 -- or -- -- in any shader pipeline stage. -pattern ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = AccessFlagBits2KHR 0x200000000 +pattern ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000200000000 -- | 'ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR' specifies write access to a -- , -- , @@ -5311,7 +5250,7 @@ pattern ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = AccessFlagBits2KHR 0x2 -- or -- -- in any shader pipeline stage. -pattern ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = AccessFlagBits2KHR 0x400000000 +pattern ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = AccessFlagBits2KHR 0x0000000400000000 -- | 'ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT' specifies read -- access to -- , @@ -5319,48 +5258,48 @@ pattern ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = AccessFlagBits2KHR 0x4 -- , -- in the 'PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR' pipeline -- stage. -pattern ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = AccessFlagBits2KHR 0x00080000 +pattern ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = AccessFlagBits2KHR 0x0000000000080000 -- | 'ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT' specifies read access to a -- -- in the 'PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT' pipeline -- stage. -pattern ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = AccessFlagBits2KHR 0x01000000 +pattern ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = AccessFlagBits2KHR 0x0000000001000000 -- | 'ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR' specifies write access -- to an acceleration structure in the -- 'PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR' pipeline stage. -pattern ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = AccessFlagBits2KHR 0x00400000 +pattern ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = AccessFlagBits2KHR 0x0000000000400000 -- | 'ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR' specifies read access to -- an acceleration structure in the -- 'PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR' or -- 'PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR' pipeline stages. -pattern ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = AccessFlagBits2KHR 0x00200000 +pattern ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000200000 -- No documentation found for Nested "VkAccessFlagBits2KHR" "VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR" -pattern ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = AccessFlagBits2KHR 0x00800000 +pattern ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = AccessFlagBits2KHR 0x0000000000800000 -- | 'ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV' specifies writes to the -- target command buffer in the -- 'PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV' pipeline stage. -pattern ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = AccessFlagBits2KHR 0x00040000 +pattern ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = AccessFlagBits2KHR 0x0000000000040000 -- | 'ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV' specifies reads from -- 'Vulkan.Core10.Handles.Buffer' inputs to -- 'Vulkan.Extensions.VK_NV_device_generated_commands.cmdPreprocessGeneratedCommandsNV' -- in the 'PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV' pipeline stage. -pattern ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = AccessFlagBits2KHR 0x00020000 +pattern ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = AccessFlagBits2KHR 0x0000000000020000 -- | 'ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT' specifies read access to a -- predicate in the 'PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT' -- pipeline stage. -pattern ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = AccessFlagBits2KHR 0x00100000 +pattern ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = AccessFlagBits2KHR 0x0000000000100000 -- | 'ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT' specifies write -- access to a transform feedback counter buffer in the -- 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT' pipeline stage. -pattern ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = AccessFlagBits2KHR 0x08000000 +pattern ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = AccessFlagBits2KHR 0x0000000008000000 -- | 'ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT' specifies read access -- to a transform feedback counter buffer in the -- 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT' pipeline stage. -pattern ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = AccessFlagBits2KHR 0x04000000 +pattern ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = AccessFlagBits2KHR 0x0000000004000000 -- | 'ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT' specifies write access to a -- transform feedback buffer in the -- 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT' pipeline stage. -pattern ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = AccessFlagBits2KHR 0x02000000 +pattern ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = AccessFlagBits2KHR 0x0000000002000000 conNameAccessFlagBits2KHR :: String conNameAccessFlagBits2KHR = "AccessFlagBits2KHR" @@ -5416,6 +5355,8 @@ instance Read AccessFlagBits2KHR where enumReadPrec enumPrefixAccessFlagBits2KHR showTableAccessFlagBits2KHR conNameAccessFlagBits2KHR AccessFlagBits2KHR +type PipelineStageFlags2KHR = PipelineStageFlagBits2KHR + -- | VkPipelineStageFlagBits2KHR - Pipeline stage flags for -- VkPipelineStageFlags2KHR -- @@ -5438,65 +5379,65 @@ instance Read AccessFlagBits2KHR where -- = See Also -- -- No cross-references are available -newtype PipelineStageFlagBits2KHR = PipelineStageFlagBits2KHR Flags +newtype PipelineStageFlagBits2KHR = PipelineStageFlagBits2KHR Flags64 deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) -- | 'PIPELINE_STAGE_2_NONE_KHR' specifies no stages of execution. -pattern PIPELINE_STAGE_2_NONE_KHR = PipelineStageFlagBits2KHR 0x00000000 +pattern PIPELINE_STAGE_2_NONE_KHR = PipelineStageFlagBits2KHR 0x0000000000000000 -- | 'PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR' is equivalent to -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' with 'AccessFlags2KHR' set to -- @0@ when specified in the second synchronization scope, but equivalent -- to 'PIPELINE_STAGE_2_NONE_KHR' in the first scope. -pattern PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = PipelineStageFlagBits2KHR 0x00000001 +pattern PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000001 -- | 'PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR' specifies the stage of the -- pipeline where indirect command parameters are consumed. This stage also -- includes reading commands written by -- 'Vulkan.Extensions.VK_NV_device_generated_commands.cmdPreprocessGeneratedCommandsNV'. -pattern PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = PipelineStageFlagBits2KHR 0x00000002 +pattern PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000002 -- | 'PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR' is equivalent to the logical OR -- of: -- -- - 'PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR' -- -- - 'PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR' -pattern PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = PipelineStageFlagBits2KHR 0x00000004 +pattern PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000004 -- | 'PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR' specifies the vertex shader -- stage. -pattern PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x00000008 +pattern PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000008 -- | 'PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR' specifies the -- tessellation control shader stage. -pattern PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x00000010 +pattern PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000010 -- | 'PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR' specifies the -- tessellation evaluation shader stage. -pattern PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x00000020 +pattern PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000020 -- | 'PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR' specifies the geometry shader -- stage. -pattern PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x00000040 +pattern PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000040 -- | 'PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR' specifies the fragment shader -- stage. -pattern PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x00000080 +pattern PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000080 -- | 'PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR' specifies the stage of -- the pipeline where early fragment tests (depth and stencil tests before -- fragment shading) are performed. This stage also includes -- -- for framebuffer attachments with a depth\/stencil format. -pattern PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = PipelineStageFlagBits2KHR 0x00000100 +pattern PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000100 -- | 'PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR' specifies the stage of -- the pipeline where late fragment tests (depth and stencil tests after -- fragment shading) are performed. This stage also includes -- -- for framebuffer attachments with a depth\/stencil format. -pattern PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = PipelineStageFlagBits2KHR 0x00000200 +pattern PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000200 -- | 'PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR' specifies the stage -- of the pipeline after blending where the final color values are output -- from the pipeline. This stage also includes -- -- and multisample resolve operations for framebuffer attachments with a -- color or depth\/stencil format. -pattern PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = PipelineStageFlagBits2KHR 0x00000400 +pattern PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000400 -- | 'PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR' specifies the compute shader -- stage. -pattern PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x00000800 +pattern PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000000800 -- | 'PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR' is equivalent to specifying all -- of: -- @@ -5507,16 +5448,16 @@ pattern PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = PipelineStageF -- - 'PIPELINE_STAGE_2_RESOLVE_BIT_KHR' -- -- - 'PIPELINE_STAGE_2_CLEAR_BIT_KHR' -pattern PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = PipelineStageFlagBits2KHR 0x00001000 +pattern PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000001000 -- | 'PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR' is equivalent to -- 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' with 'AccessFlags2KHR' set to -- @0@ when specified in the first synchronization scope, but equivalent to -- 'PIPELINE_STAGE_2_NONE_KHR' in the second scope. -pattern PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = PipelineStageFlagBits2KHR 0x00002000 +pattern PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000002000 -- | 'PIPELINE_STAGE_2_HOST_BIT_KHR' specifies a pseudo-stage indicating -- execution on the host of reads\/writes of device memory. This stage is -- not invoked by any commands recorded in a command buffer. -pattern PIPELINE_STAGE_2_HOST_BIT_KHR = PipelineStageFlagBits2KHR 0x00004000 +pattern PIPELINE_STAGE_2_HOST_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000004000 -- | 'PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR' specifies the execution of all -- graphics pipeline stages, and is equivalent to the logical OR of: -- @@ -5551,31 +5492,31 @@ pattern PIPELINE_STAGE_2_HOST_BIT_KHR = PipelineStageF -- - 'PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV' -- -- - 'PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT' -pattern PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = PipelineStageFlagBits2KHR 0x00008000 +pattern PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000008000 -- | 'PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR' specifies all operations -- performed by all commands supported on the queue it is used with. -pattern PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = PipelineStageFlagBits2KHR 0x00010000 +pattern PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000010000 -- | 'PIPELINE_STAGE_2_COPY_BIT_KHR' specifies the execution of all -- , -- including 'Vulkan.Core10.CommandBufferBuilding.cmdCopyQueryPoolResults'. -pattern PIPELINE_STAGE_2_COPY_BIT_KHR = PipelineStageFlagBits2KHR 0x100000000 +pattern PIPELINE_STAGE_2_COPY_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000100000000 -- | 'PIPELINE_STAGE_2_RESOLVE_BIT_KHR' specifies the execution of -- 'Vulkan.Core10.CommandBufferBuilding.cmdResolveImage'. -pattern PIPELINE_STAGE_2_RESOLVE_BIT_KHR = PipelineStageFlagBits2KHR 0x200000000 +pattern PIPELINE_STAGE_2_RESOLVE_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000200000000 -- | 'PIPELINE_STAGE_2_BLIT_BIT_KHR' specifies the execution of -- 'Vulkan.Core10.CommandBufferBuilding.cmdBlitImage'. -pattern PIPELINE_STAGE_2_BLIT_BIT_KHR = PipelineStageFlagBits2KHR 0x400000000 +pattern PIPELINE_STAGE_2_BLIT_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000400000000 -- | 'PIPELINE_STAGE_2_CLEAR_BIT_KHR' specifies the execution of -- , -- with the exception of -- 'Vulkan.Core10.CommandBufferBuilding.cmdClearAttachments'. -pattern PIPELINE_STAGE_2_CLEAR_BIT_KHR = PipelineStageFlagBits2KHR 0x800000000 +pattern PIPELINE_STAGE_2_CLEAR_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000800000000 -- | 'PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR' specifies the stage of the -- pipeline where index buffers are consumed. -pattern PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = PipelineStageFlagBits2KHR 0x1000000000 +pattern PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = PipelineStageFlagBits2KHR 0x0000001000000000 -- | 'PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR' specifies the stage of -- the pipeline where vertex buffers are consumed. -pattern PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = PipelineStageFlagBits2KHR 0x2000000000 +pattern PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = PipelineStageFlagBits2KHR 0x0000002000000000 -- | 'PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR' is equivalent to -- specifying all supported stages from: -- @@ -5590,22 +5531,22 @@ pattern PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = PipelineStageF -- - 'PIPELINE_STAGE_2_TASK_SHADER_BIT_NV' -- -- - 'PIPELINE_STAGE_2_MESH_SHADER_BIT_NV' -pattern PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = PipelineStageFlagBits2KHR 0x4000000000 +pattern PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = PipelineStageFlagBits2KHR 0x0000004000000000 -- | 'PIPELINE_STAGE_2_MESH_SHADER_BIT_NV' specifies the mesh shader stage. -pattern PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = PipelineStageFlagBits2KHR 0x00100000 +pattern PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = PipelineStageFlagBits2KHR 0x0000000000100000 -- | 'PIPELINE_STAGE_2_TASK_SHADER_BIT_NV' specifies the task shader stage. -pattern PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = PipelineStageFlagBits2KHR 0x00080000 +pattern PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = PipelineStageFlagBits2KHR 0x0000000000080000 -- | 'PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT' specifies the stage -- of the pipeline where the fragment density map is read to -- . -pattern PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = PipelineStageFlagBits2KHR 0x00800000 +pattern PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = PipelineStageFlagBits2KHR 0x0000000000800000 -- | 'PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR' specifies the execution of -- the ray tracing shader stages. -pattern PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x00200000 +pattern PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000200000 -- | 'PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR' specifies the -- execution of -- . -pattern PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = PipelineStageFlagBits2KHR 0x02000000 +pattern PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000002000000 -- | 'PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR' specifies -- the stage of the pipeline where the -- @@ -5613,19 +5554,19 @@ pattern PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = PipelineStageF -- -- is read to determine the fragment shading rate for portions of a -- rasterized primitive. -pattern PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = PipelineStageFlagBits2KHR 0x00400000 +pattern PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = PipelineStageFlagBits2KHR 0x0000000000400000 -- | 'PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV' specifies the stage of the -- pipeline where device-side generation of commands via -- 'Vulkan.Extensions.VK_NV_device_generated_commands.cmdPreprocessGeneratedCommandsNV' -- is handled. -pattern PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = PipelineStageFlagBits2KHR 0x00020000 +pattern PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = PipelineStageFlagBits2KHR 0x0000000000020000 -- | 'PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT' specifies the stage of -- the pipeline where the predicate of conditional rendering is consumed. -pattern PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = PipelineStageFlagBits2KHR 0x00040000 +pattern PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = PipelineStageFlagBits2KHR 0x0000000000040000 -- | 'PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT' specifies the stage of the -- pipeline where vertex attribute output values are written to the -- transform feedback buffers. -pattern PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = PipelineStageFlagBits2KHR 0x01000000 +pattern PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = PipelineStageFlagBits2KHR 0x0000000001000000 conNamePipelineStageFlagBits2KHR :: String conNamePipelineStageFlagBits2KHR = "PipelineStageFlagBits2KHR" diff --git a/src/Vulkan/Extensions/VK_KHR_synchronization2.hs-boot b/src/Vulkan/Extensions/VK_KHR_synchronization2.hs-boot index ddfc0c90d..0e8e5f2a9 100644 --- a/src/Vulkan/Extensions/VK_KHR_synchronization2.hs-boot +++ b/src/Vulkan/Extensions/VK_KHR_synchronization2.hs-boot @@ -429,6 +429,7 @@ module Vulkan.Extensions.VK_KHR_synchronization2 ( BufferMemoryBarrier2KHR , SemaphoreSubmitInfoKHR , SubmitInfo2KHR , PipelineStageFlags2KHR + , PipelineStageFlagBits2KHR ) where import Vulkan.CStruct (FromCStruct) @@ -520,5 +521,7 @@ instance Show (Chain es) => Show (SubmitInfo2KHR es) instance (Extendss SubmitInfo2KHR es, PeekChain es) => FromCStruct (SubmitInfo2KHR es) -data PipelineStageFlags2KHR +type PipelineStageFlags2KHR = PipelineStageFlagBits2KHR + +data PipelineStageFlagBits2KHR From d8591e02e014874cae32e1ae617e62659f8e2294 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 17:39:35 +0800 Subject: [PATCH 07/11] regenerate openxr --- openxr/src/OpenXR/Core10/Device.hs | 10 +- openxr/src/OpenXR/Core10/DisplayTiming.hs | 11 +- openxr/src/OpenXR/Core10/Enums.hs | 36 ++-- .../Core10/Enums/CompositionLayerFlagBits.hs | 60 ++++++ .../Core10/Enums/CompositionLayerFlags.hs | 60 ------ .../Enums/InputSourceLocalizedNameFlagBits.hs | 60 ++++++ .../Enums/InputSourceLocalizedNameFlags.hs | 50 ----- .../Core10/Enums/InstanceCreateFlagBits.hs | 47 ++++ .../Core10/Enums/InstanceCreateFlags.hs | 53 ----- .../OpenXR/Core10/Enums/ReferenceSpaceType.hs | 26 ++- .../Core10/Enums/SessionCreateFlagBits.hs | 47 ++++ .../OpenXR/Core10/Enums/SessionCreateFlags.hs | 51 ----- .../Core10/Enums/SpaceLocationFlagBits.hs | 64 ++++++ .../OpenXR/Core10/Enums/SpaceLocationFlags.hs | 52 ----- .../Core10/Enums/SpaceVelocityFlagBits.hs | 54 +++++ .../OpenXR/Core10/Enums/SpaceVelocityFlags.hs | 52 ----- .../Core10/Enums/SwapchainCreateFlagBits.hs | 56 +++++ .../Core10/Enums/SwapchainCreateFlags.hs | 56 ----- .../Core10/Enums/SwapchainUsageFlagBits.hs | 80 +++++++ .../Core10/Enums/SwapchainUsageFlags.hs | 51 ----- .../OpenXR/Core10/Enums/ViewStateFlagBits.hs | 62 ++++++ .../src/OpenXR/Core10/Enums/ViewStateFlags.hs | 48 ----- openxr/src/OpenXR/Core10/FundamentalTypes.hs | 14 +- openxr/src/OpenXR/Core10/Image.hs | 79 +++---- openxr/src/OpenXR/Core10/Input.hs | 8 +- openxr/src/OpenXR/Core10/Instance.hs | 6 +- openxr/src/OpenXR/Core10/OtherTypes.hs | 20 +- openxr/src/OpenXR/Core10/Space.hs | 107 +++++----- .../src/OpenXR/Extensions/XR_EXTX_overlay.hs | 138 ++++++------ .../OpenXR/Extensions/XR_EXT_debug_utils.hs | 200 ++++++++++-------- .../Extensions/XR_EXT_debug_utils.hs-boot | 10 +- .../OpenXR/Extensions/XR_EXT_hand_tracking.hs | 116 +++++----- .../XR_KHR_composition_layer_cube.hs | 6 +- .../XR_KHR_composition_layer_cylinder.hs | 6 +- .../XR_KHR_composition_layer_equirect.hs | 6 +- .../XR_KHR_composition_layer_equirect2.hs | 6 +- .../Extensions/XR_KHR_vulkan_enable2.hs | 90 ++++---- ...ND_swapchain_usage_input_attachment_bit.hs | 75 +------ .../Extensions/XR_MSFT_hand_tracking_mesh.hs | 18 +- 39 files changed, 1024 insertions(+), 967 deletions(-) create mode 100644 openxr/src/OpenXR/Core10/Enums/CompositionLayerFlagBits.hs delete mode 100644 openxr/src/OpenXR/Core10/Enums/CompositionLayerFlags.hs create mode 100644 openxr/src/OpenXR/Core10/Enums/InputSourceLocalizedNameFlagBits.hs delete mode 100644 openxr/src/OpenXR/Core10/Enums/InputSourceLocalizedNameFlags.hs create mode 100644 openxr/src/OpenXR/Core10/Enums/InstanceCreateFlagBits.hs delete mode 100644 openxr/src/OpenXR/Core10/Enums/InstanceCreateFlags.hs create mode 100644 openxr/src/OpenXR/Core10/Enums/SessionCreateFlagBits.hs delete mode 100644 openxr/src/OpenXR/Core10/Enums/SessionCreateFlags.hs create mode 100644 openxr/src/OpenXR/Core10/Enums/SpaceLocationFlagBits.hs delete mode 100644 openxr/src/OpenXR/Core10/Enums/SpaceLocationFlags.hs create mode 100644 openxr/src/OpenXR/Core10/Enums/SpaceVelocityFlagBits.hs delete mode 100644 openxr/src/OpenXR/Core10/Enums/SpaceVelocityFlags.hs create mode 100644 openxr/src/OpenXR/Core10/Enums/SwapchainCreateFlagBits.hs delete mode 100644 openxr/src/OpenXR/Core10/Enums/SwapchainCreateFlags.hs create mode 100644 openxr/src/OpenXR/Core10/Enums/SwapchainUsageFlagBits.hs delete mode 100644 openxr/src/OpenXR/Core10/Enums/SwapchainUsageFlags.hs create mode 100644 openxr/src/OpenXR/Core10/Enums/ViewStateFlagBits.hs delete mode 100644 openxr/src/OpenXR/Core10/Enums/ViewStateFlags.hs diff --git a/openxr/src/OpenXR/Core10/Device.hs b/openxr/src/OpenXR/Core10/Device.hs index 2550bac0a..17b87bc8f 100644 --- a/openxr/src/OpenXR/Core10/Device.hs +++ b/openxr/src/OpenXR/Core10/Device.hs @@ -104,7 +104,7 @@ import OpenXR.Core10.Enums.Result (Result(..)) import OpenXR.Core10.Handles (Session) import OpenXR.Core10.Handles (Session(..)) import OpenXR.Core10.Handles (Session(Session)) -import OpenXR.Core10.Enums.SessionCreateFlags (SessionCreateFlags) +import OpenXR.Core10.Enums.SessionCreateFlagBits (SessionCreateFlags) import {-# SOURCE #-} OpenXR.Extensions.XR_EXTX_overlay (SessionCreateInfoOverlayEXTX) import OpenXR.Core10.Handles (Session_T) import OpenXR.CStruct.Extends (SomeStruct) @@ -319,7 +319,7 @@ foreign import ccall -- -- 'OpenXR.Core10.Instance.ExtensionProperties', -- 'OpenXR.Core10.Handles.Instance', 'OpenXR.Core10.Handles.Session', --- 'OpenXR.Core10.Enums.SessionCreateFlags.SessionCreateFlags', +-- 'OpenXR.Core10.Enums.SessionCreateFlagBits.SessionCreateFlags', -- 'SessionCreateInfo', 'OpenXR.Core10.Session.beginSession', -- 'destroySession', 'OpenXR.Core10.Session.endSession' createSession :: forall a io @@ -876,7 +876,7 @@ instance Zero SystemTrackingProperties where -- -- = See Also -- --- 'OpenXR.Core10.Enums.SessionCreateFlags.SessionCreateFlags', +-- 'OpenXR.Core10.Enums.SessionCreateFlagBits.SessionCreateFlags', -- 'OpenXR.Core10.Enums.StructureType.StructureType', -- , -- 'createSession' @@ -909,8 +909,8 @@ data SessionCreateInfo (es :: [Type]) = SessionCreateInfo -- 'OpenXR.Extensions.XR_EXTX_overlay.SessionCreateInfoOverlayEXTX' next :: Chain es , -- | @createFlags@ identifies - -- 'OpenXR.Core10.Enums.SessionCreateFlags.SessionCreateFlags' that apply - -- to the creation. + -- 'OpenXR.Core10.Enums.SessionCreateFlagBits.SessionCreateFlags' that + -- apply to the creation. -- -- #VUID-XrSessionCreateInfo-createFlags-zerobitmask# @createFlags@ /must/ -- be @0@ diff --git a/openxr/src/OpenXR/Core10/DisplayTiming.hs b/openxr/src/OpenXR/Core10/DisplayTiming.hs index cb0f71943..33f7e4f3c 100644 --- a/openxr/src/OpenXR/Core10/DisplayTiming.hs +++ b/openxr/src/OpenXR/Core10/DisplayTiming.hs @@ -95,7 +95,7 @@ import OpenXR.Core10.Handles (Space_T) import OpenXR.Core10.Enums.StructureType (StructureType) import OpenXR.Core10.FundamentalTypes (Time) import OpenXR.Core10.Enums.ViewConfigurationType (ViewConfigurationType) -import OpenXR.Core10.Enums.ViewStateFlags (ViewStateFlags) +import OpenXR.Core10.Enums.ViewStateFlagBits (ViewStateFlags) import OpenXR.Core10.Enums.Result (Result(SUCCESS)) import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_FRAME_BEGIN_INFO)) import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_FRAME_END_INFO)) @@ -806,16 +806,15 @@ instance Zero ViewLocateInfo where -- = See Also -- -- 'OpenXR.Core10.Enums.StructureType.StructureType', 'View', --- 'OpenXR.Core10.Enums.ViewStateFlags.ViewStateFlags', 'locateViews' +-- 'OpenXR.Core10.Enums.ViewStateFlagBits.ViewStateFlags', 'locateViews' data ViewState = ViewState { -- | @viewStateFlags@ is a bitmask of - -- - -- indicating state for all views. + -- 'OpenXR.Core10.Enums.ViewStateFlagBits.ViewStateFlagBits' indicating + -- state for all views. -- -- #VUID-XrViewState-viewStateFlags-parameter# @viewStateFlags@ /must/ be -- @0@ or a valid combination of - -- - -- values + -- 'OpenXR.Core10.Enums.ViewStateFlagBits.ViewStateFlagBits' values viewStateFlags :: ViewStateFlags } deriving (Typeable, Eq) #if defined(GENERIC_INSTANCES) diff --git a/openxr/src/OpenXR/Core10/Enums.hs b/openxr/src/OpenXR/Core10/Enums.hs index 173768960..658b33801 100644 --- a/openxr/src/OpenXR/Core10/Enums.hs +++ b/openxr/src/OpenXR/Core10/Enums.hs @@ -1,42 +1,42 @@ {-# language CPP #-} -- No documentation found for Chapter "Enums" module OpenXR.Core10.Enums ( module OpenXR.Core10.Enums.ActionType - , module OpenXR.Core10.Enums.CompositionLayerFlags + , module OpenXR.Core10.Enums.CompositionLayerFlagBits , module OpenXR.Core10.Enums.EnvironmentBlendMode , module OpenXR.Core10.Enums.EyeVisibility , module OpenXR.Core10.Enums.FormFactor - , module OpenXR.Core10.Enums.InputSourceLocalizedNameFlags - , module OpenXR.Core10.Enums.InstanceCreateFlags + , module OpenXR.Core10.Enums.InputSourceLocalizedNameFlagBits + , module OpenXR.Core10.Enums.InstanceCreateFlagBits , module OpenXR.Core10.Enums.ObjectType , module OpenXR.Core10.Enums.ReferenceSpaceType , module OpenXR.Core10.Enums.Result - , module OpenXR.Core10.Enums.SessionCreateFlags + , module OpenXR.Core10.Enums.SessionCreateFlagBits , module OpenXR.Core10.Enums.SessionState - , module OpenXR.Core10.Enums.SpaceLocationFlags - , module OpenXR.Core10.Enums.SpaceVelocityFlags + , module OpenXR.Core10.Enums.SpaceLocationFlagBits + , module OpenXR.Core10.Enums.SpaceVelocityFlagBits , module OpenXR.Core10.Enums.StructureType - , module OpenXR.Core10.Enums.SwapchainCreateFlags - , module OpenXR.Core10.Enums.SwapchainUsageFlags + , module OpenXR.Core10.Enums.SwapchainCreateFlagBits + , module OpenXR.Core10.Enums.SwapchainUsageFlagBits , module OpenXR.Core10.Enums.ViewConfigurationType - , module OpenXR.Core10.Enums.ViewStateFlags + , module OpenXR.Core10.Enums.ViewStateFlagBits ) where import OpenXR.Core10.Enums.ActionType -import OpenXR.Core10.Enums.CompositionLayerFlags +import OpenXR.Core10.Enums.CompositionLayerFlagBits import OpenXR.Core10.Enums.EnvironmentBlendMode import OpenXR.Core10.Enums.EyeVisibility import OpenXR.Core10.Enums.FormFactor -import OpenXR.Core10.Enums.InputSourceLocalizedNameFlags -import OpenXR.Core10.Enums.InstanceCreateFlags +import OpenXR.Core10.Enums.InputSourceLocalizedNameFlagBits +import OpenXR.Core10.Enums.InstanceCreateFlagBits import OpenXR.Core10.Enums.ObjectType import OpenXR.Core10.Enums.ReferenceSpaceType import OpenXR.Core10.Enums.Result -import OpenXR.Core10.Enums.SessionCreateFlags +import OpenXR.Core10.Enums.SessionCreateFlagBits import OpenXR.Core10.Enums.SessionState -import OpenXR.Core10.Enums.SpaceLocationFlags -import OpenXR.Core10.Enums.SpaceVelocityFlags +import OpenXR.Core10.Enums.SpaceLocationFlagBits +import OpenXR.Core10.Enums.SpaceVelocityFlagBits import OpenXR.Core10.Enums.StructureType -import OpenXR.Core10.Enums.SwapchainCreateFlags -import OpenXR.Core10.Enums.SwapchainUsageFlags +import OpenXR.Core10.Enums.SwapchainCreateFlagBits +import OpenXR.Core10.Enums.SwapchainUsageFlagBits import OpenXR.Core10.Enums.ViewConfigurationType -import OpenXR.Core10.Enums.ViewStateFlags +import OpenXR.Core10.Enums.ViewStateFlagBits diff --git a/openxr/src/OpenXR/Core10/Enums/CompositionLayerFlagBits.hs b/openxr/src/OpenXR/Core10/Enums/CompositionLayerFlagBits.hs new file mode 100644 index 000000000..85d8f450c --- /dev/null +++ b/openxr/src/OpenXR/Core10/Enums/CompositionLayerFlagBits.hs @@ -0,0 +1,60 @@ +{-# language CPP #-} +-- No documentation found for Chapter "CompositionLayerFlagBits" +module OpenXR.Core10.Enums.CompositionLayerFlagBits ( CompositionLayerFlags + , CompositionLayerFlagBits( COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT + , COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT + , COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT + , .. + ) + ) where + +import OpenXR.Internal.Utils (enumReadPrec) +import OpenXR.Internal.Utils (enumShowsPrec) +import GHC.Show (showString) +import Numeric (showHex) +import OpenXR.Zero (Zero) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Foreign.Storable (Storable) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import OpenXR.Core10.FundamentalTypes (Flags64) +type CompositionLayerFlags = CompositionLayerFlagBits + +-- No documentation found for TopLevel "XrCompositionLayerFlagBits" +newtype CompositionLayerFlagBits = CompositionLayerFlagBits Flags64 + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + +-- No documentation found for Nested "XrCompositionLayerFlagBits" "XR_COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT" +pattern COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT = CompositionLayerFlagBits 0x0000000000000001 +-- No documentation found for Nested "XrCompositionLayerFlagBits" "XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT" +pattern COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT = CompositionLayerFlagBits 0x0000000000000002 +-- No documentation found for Nested "XrCompositionLayerFlagBits" "XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT" +pattern COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT = CompositionLayerFlagBits 0x0000000000000004 + +conNameCompositionLayerFlagBits :: String +conNameCompositionLayerFlagBits = "CompositionLayerFlagBits" + +enumPrefixCompositionLayerFlagBits :: String +enumPrefixCompositionLayerFlagBits = "COMPOSITION_LAYER_" + +showTableCompositionLayerFlagBits :: [(CompositionLayerFlagBits, String)] +showTableCompositionLayerFlagBits = + [ (COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT, "CORRECT_CHROMATIC_ABERRATION_BIT") + , (COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT , "BLEND_TEXTURE_SOURCE_ALPHA_BIT") + , (COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT , "UNPREMULTIPLIED_ALPHA_BIT") + ] + +instance Show CompositionLayerFlagBits where + showsPrec = enumShowsPrec enumPrefixCompositionLayerFlagBits + showTableCompositionLayerFlagBits + conNameCompositionLayerFlagBits + (\(CompositionLayerFlagBits x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read CompositionLayerFlagBits where + readPrec = enumReadPrec enumPrefixCompositionLayerFlagBits + showTableCompositionLayerFlagBits + conNameCompositionLayerFlagBits + CompositionLayerFlagBits + diff --git a/openxr/src/OpenXR/Core10/Enums/CompositionLayerFlags.hs b/openxr/src/OpenXR/Core10/Enums/CompositionLayerFlags.hs deleted file mode 100644 index ec6b61409..000000000 --- a/openxr/src/OpenXR/Core10/Enums/CompositionLayerFlags.hs +++ /dev/null @@ -1,60 +0,0 @@ -{-# language CPP #-} --- No documentation found for Chapter "CompositionLayerFlags" -module OpenXR.Core10.Enums.CompositionLayerFlags (CompositionLayerFlags(..)) where - -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- | XrCompositionLayerFlags - Composition layer flags --- --- = Description --- --- 'CompositionLayerFlags' specify options for individual composition --- layers. --- --- == Flag Descriptions --- --- = See Also --- --- 'OpenXR.Core10.OtherTypes.CompositionLayerBaseHeader', --- 'OpenXR.Extensions.XR_KHR_composition_layer_cube.CompositionLayerCubeKHR', --- 'OpenXR.Extensions.XR_KHR_composition_layer_cylinder.CompositionLayerCylinderKHR', --- 'OpenXR.Extensions.XR_KHR_composition_layer_equirect2.CompositionLayerEquirect2KHR', --- 'OpenXR.Extensions.XR_KHR_composition_layer_equirect.CompositionLayerEquirectKHR', --- 'OpenXR.Core10.OtherTypes.CompositionLayerProjection', --- 'OpenXR.Core10.OtherTypes.CompositionLayerQuad' -newtype CompositionLayerFlags = CompositionLayerFlags Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameCompositionLayerFlags :: String -conNameCompositionLayerFlags = "CompositionLayerFlags" - -enumPrefixCompositionLayerFlags :: String -enumPrefixCompositionLayerFlags = "" - -showTableCompositionLayerFlags :: [(CompositionLayerFlags, String)] -showTableCompositionLayerFlags = [] - -instance Show CompositionLayerFlags where - showsPrec = enumShowsPrec enumPrefixCompositionLayerFlags - showTableCompositionLayerFlags - conNameCompositionLayerFlags - (\(CompositionLayerFlags x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read CompositionLayerFlags where - readPrec = enumReadPrec enumPrefixCompositionLayerFlags - showTableCompositionLayerFlags - conNameCompositionLayerFlags - CompositionLayerFlags - diff --git a/openxr/src/OpenXR/Core10/Enums/InputSourceLocalizedNameFlagBits.hs b/openxr/src/OpenXR/Core10/Enums/InputSourceLocalizedNameFlagBits.hs new file mode 100644 index 000000000..11ffbed60 --- /dev/null +++ b/openxr/src/OpenXR/Core10/Enums/InputSourceLocalizedNameFlagBits.hs @@ -0,0 +1,60 @@ +{-# language CPP #-} +-- No documentation found for Chapter "InputSourceLocalizedNameFlagBits" +module OpenXR.Core10.Enums.InputSourceLocalizedNameFlagBits ( InputSourceLocalizedNameFlags + , InputSourceLocalizedNameFlagBits( INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT + , INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT + , INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT + , .. + ) + ) where + +import OpenXR.Internal.Utils (enumReadPrec) +import OpenXR.Internal.Utils (enumShowsPrec) +import GHC.Show (showString) +import Numeric (showHex) +import OpenXR.Zero (Zero) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Foreign.Storable (Storable) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import OpenXR.Core10.FundamentalTypes (Flags64) +type InputSourceLocalizedNameFlags = InputSourceLocalizedNameFlagBits + +-- No documentation found for TopLevel "XrInputSourceLocalizedNameFlagBits" +newtype InputSourceLocalizedNameFlagBits = InputSourceLocalizedNameFlagBits Flags64 + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + +-- No documentation found for Nested "XrInputSourceLocalizedNameFlagBits" "XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT" +pattern INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT = InputSourceLocalizedNameFlagBits 0x0000000000000001 +-- No documentation found for Nested "XrInputSourceLocalizedNameFlagBits" "XR_INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT" +pattern INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT = InputSourceLocalizedNameFlagBits 0x0000000000000002 +-- No documentation found for Nested "XrInputSourceLocalizedNameFlagBits" "XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT" +pattern INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT = InputSourceLocalizedNameFlagBits 0x0000000000000004 + +conNameInputSourceLocalizedNameFlagBits :: String +conNameInputSourceLocalizedNameFlagBits = "InputSourceLocalizedNameFlagBits" + +enumPrefixInputSourceLocalizedNameFlagBits :: String +enumPrefixInputSourceLocalizedNameFlagBits = "INPUT_SOURCE_LOCALIZED_NAME_" + +showTableInputSourceLocalizedNameFlagBits :: [(InputSourceLocalizedNameFlagBits, String)] +showTableInputSourceLocalizedNameFlagBits = + [ (INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT , "USER_PATH_BIT") + , (INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT, "INTERACTION_PROFILE_BIT") + , (INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT , "COMPONENT_BIT") + ] + +instance Show InputSourceLocalizedNameFlagBits where + showsPrec = enumShowsPrec enumPrefixInputSourceLocalizedNameFlagBits + showTableInputSourceLocalizedNameFlagBits + conNameInputSourceLocalizedNameFlagBits + (\(InputSourceLocalizedNameFlagBits x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read InputSourceLocalizedNameFlagBits where + readPrec = enumReadPrec enumPrefixInputSourceLocalizedNameFlagBits + showTableInputSourceLocalizedNameFlagBits + conNameInputSourceLocalizedNameFlagBits + InputSourceLocalizedNameFlagBits + diff --git a/openxr/src/OpenXR/Core10/Enums/InputSourceLocalizedNameFlags.hs b/openxr/src/OpenXR/Core10/Enums/InputSourceLocalizedNameFlags.hs deleted file mode 100644 index 5d70a20d5..000000000 --- a/openxr/src/OpenXR/Core10/Enums/InputSourceLocalizedNameFlags.hs +++ /dev/null @@ -1,50 +0,0 @@ -{-# language CPP #-} --- No documentation found for Chapter "InputSourceLocalizedNameFlags" -module OpenXR.Core10.Enums.InputSourceLocalizedNameFlags (InputSourceLocalizedNameFlags(..)) where - -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- | XrInputSourceLocalizedNameFlags - Input source localized name flags --- --- == Flag Descriptions --- --- = See Also --- --- 'OpenXR.Core10.Input.InputSourceLocalizedNameGetInfo', --- 'OpenXR.Core10.Input.getInputSourceLocalizedName' -newtype InputSourceLocalizedNameFlags = InputSourceLocalizedNameFlags Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameInputSourceLocalizedNameFlags :: String -conNameInputSourceLocalizedNameFlags = "InputSourceLocalizedNameFlags" - -enumPrefixInputSourceLocalizedNameFlags :: String -enumPrefixInputSourceLocalizedNameFlags = "" - -showTableInputSourceLocalizedNameFlags :: [(InputSourceLocalizedNameFlags, String)] -showTableInputSourceLocalizedNameFlags = [] - -instance Show InputSourceLocalizedNameFlags where - showsPrec = enumShowsPrec enumPrefixInputSourceLocalizedNameFlags - showTableInputSourceLocalizedNameFlags - conNameInputSourceLocalizedNameFlags - (\(InputSourceLocalizedNameFlags x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read InputSourceLocalizedNameFlags where - readPrec = enumReadPrec enumPrefixInputSourceLocalizedNameFlags - showTableInputSourceLocalizedNameFlags - conNameInputSourceLocalizedNameFlags - InputSourceLocalizedNameFlags - diff --git a/openxr/src/OpenXR/Core10/Enums/InstanceCreateFlagBits.hs b/openxr/src/OpenXR/Core10/Enums/InstanceCreateFlagBits.hs new file mode 100644 index 000000000..8bc652061 --- /dev/null +++ b/openxr/src/OpenXR/Core10/Enums/InstanceCreateFlagBits.hs @@ -0,0 +1,47 @@ +{-# language CPP #-} +-- No documentation found for Chapter "InstanceCreateFlagBits" +module OpenXR.Core10.Enums.InstanceCreateFlagBits ( InstanceCreateFlags + , InstanceCreateFlagBits(..) + ) where + +import OpenXR.Internal.Utils (enumReadPrec) +import OpenXR.Internal.Utils (enumShowsPrec) +import GHC.Show (showString) +import Numeric (showHex) +import OpenXR.Zero (Zero) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Foreign.Storable (Storable) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import OpenXR.Core10.FundamentalTypes (Flags64) +type InstanceCreateFlags = InstanceCreateFlagBits + +-- No documentation found for TopLevel "XrInstanceCreateFlagBits" +newtype InstanceCreateFlagBits = InstanceCreateFlagBits Flags64 + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + + + +conNameInstanceCreateFlagBits :: String +conNameInstanceCreateFlagBits = "InstanceCreateFlagBits" + +enumPrefixInstanceCreateFlagBits :: String +enumPrefixInstanceCreateFlagBits = "" + +showTableInstanceCreateFlagBits :: [(InstanceCreateFlagBits, String)] +showTableInstanceCreateFlagBits = [] + +instance Show InstanceCreateFlagBits where + showsPrec = enumShowsPrec enumPrefixInstanceCreateFlagBits + showTableInstanceCreateFlagBits + conNameInstanceCreateFlagBits + (\(InstanceCreateFlagBits x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read InstanceCreateFlagBits where + readPrec = enumReadPrec enumPrefixInstanceCreateFlagBits + showTableInstanceCreateFlagBits + conNameInstanceCreateFlagBits + InstanceCreateFlagBits + diff --git a/openxr/src/OpenXR/Core10/Enums/InstanceCreateFlags.hs b/openxr/src/OpenXR/Core10/Enums/InstanceCreateFlags.hs deleted file mode 100644 index 72f7d10b3..000000000 --- a/openxr/src/OpenXR/Core10/Enums/InstanceCreateFlags.hs +++ /dev/null @@ -1,53 +0,0 @@ -{-# language CPP #-} --- No documentation found for Chapter "InstanceCreateFlags" -module OpenXR.Core10.Enums.InstanceCreateFlags (InstanceCreateFlags(..)) where - -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- | XrInstanceCreateFlags - Instance Creation Flags --- --- = Description --- --- There are currently no instance creation flags. This is reserved for --- future use. --- --- = See Also --- --- 'OpenXR.Core10.Instance.InstanceCreateInfo', --- 'OpenXR.Core10.Instance.createInstance' -newtype InstanceCreateFlags = InstanceCreateFlags Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameInstanceCreateFlags :: String -conNameInstanceCreateFlags = "InstanceCreateFlags" - -enumPrefixInstanceCreateFlags :: String -enumPrefixInstanceCreateFlags = "" - -showTableInstanceCreateFlags :: [(InstanceCreateFlags, String)] -showTableInstanceCreateFlags = [] - -instance Show InstanceCreateFlags where - showsPrec = enumShowsPrec enumPrefixInstanceCreateFlags - showTableInstanceCreateFlags - conNameInstanceCreateFlags - (\(InstanceCreateFlags x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read InstanceCreateFlags where - readPrec = enumReadPrec enumPrefixInstanceCreateFlags - showTableInstanceCreateFlags - conNameInstanceCreateFlags - InstanceCreateFlags - diff --git a/openxr/src/OpenXR/Core10/Enums/ReferenceSpaceType.hs b/openxr/src/OpenXR/Core10/Enums/ReferenceSpaceType.hs index e1d663877..f79bd7665 100644 --- a/openxr/src/OpenXR/Core10/Enums/ReferenceSpaceType.hs +++ b/openxr/src/OpenXR/Core10/Enums/ReferenceSpaceType.hs @@ -86,11 +86,14 @@ pattern REFERENCE_SPACE_TYPE_VIEW = ReferenceSpaceType 1 -- inertial dead reckoning, or a last-known position, so long as it is -- still reasonable for the application to use that pose. While a runtime -- is providing position data, it /must/ continue to set --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ and --- @XR_VIEW_STATE_POSITION_VALID_BIT@ but it /can/ clear --- @XR_SPACE_LOCATION_POSITION_TRACKED_BIT@ and --- @XR_VIEW_STATE_POSITION_TRACKED_BIT@ to indicate that the position is --- inferred or last-known in this way. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- and +-- 'OpenXR.Core10.Enums.ViewStateFlagBits.VIEW_STATE_POSITION_VALID_BIT' +-- but it /can/ clear +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_TRACKED_BIT' +-- and +-- 'OpenXR.Core10.Enums.ViewStateFlagBits.VIEW_STATE_POSITION_TRACKED_BIT' +-- to indicate that the position is inferred or last-known in this way. -- -- When tracking is recovered, runtimes /should/ snap the pose of other -- spaces back into position relative to the @LOCAL@ space’s original @@ -131,11 +134,14 @@ pattern REFERENCE_SPACE_TYPE_LOCAL = ReferenceSpaceType 2 -- inertial dead reckoning, or a last-known position, so long as it is -- still reasonable for the application to use that pose. While a runtime -- is providing position data, it /must/ continue to set --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ and --- @XR_VIEW_STATE_POSITION_VALID_BIT@ but it /can/ clear --- @XR_SPACE_LOCATION_POSITION_TRACKED_BIT@ and --- @XR_VIEW_STATE_POSITION_TRACKED_BIT@ to indicate that the position is --- inferred or last-known in this way. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- and +-- 'OpenXR.Core10.Enums.ViewStateFlagBits.VIEW_STATE_POSITION_VALID_BIT' +-- but it /can/ clear +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_TRACKED_BIT' +-- and +-- 'OpenXR.Core10.Enums.ViewStateFlagBits.VIEW_STATE_POSITION_TRACKED_BIT' +-- to indicate that the position is inferred or last-known in this way. -- -- When tracking is recovered, runtimes /should/ snap the pose of other -- spaces back into position relative to the @STAGE@ space’s original diff --git a/openxr/src/OpenXR/Core10/Enums/SessionCreateFlagBits.hs b/openxr/src/OpenXR/Core10/Enums/SessionCreateFlagBits.hs new file mode 100644 index 000000000..a2d42f8b4 --- /dev/null +++ b/openxr/src/OpenXR/Core10/Enums/SessionCreateFlagBits.hs @@ -0,0 +1,47 @@ +{-# language CPP #-} +-- No documentation found for Chapter "SessionCreateFlagBits" +module OpenXR.Core10.Enums.SessionCreateFlagBits ( SessionCreateFlags + , SessionCreateFlagBits(..) + ) where + +import OpenXR.Internal.Utils (enumReadPrec) +import OpenXR.Internal.Utils (enumShowsPrec) +import GHC.Show (showString) +import Numeric (showHex) +import OpenXR.Zero (Zero) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Foreign.Storable (Storable) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import OpenXR.Core10.FundamentalTypes (Flags64) +type SessionCreateFlags = SessionCreateFlagBits + +-- No documentation found for TopLevel "XrSessionCreateFlagBits" +newtype SessionCreateFlagBits = SessionCreateFlagBits Flags64 + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + + + +conNameSessionCreateFlagBits :: String +conNameSessionCreateFlagBits = "SessionCreateFlagBits" + +enumPrefixSessionCreateFlagBits :: String +enumPrefixSessionCreateFlagBits = "" + +showTableSessionCreateFlagBits :: [(SessionCreateFlagBits, String)] +showTableSessionCreateFlagBits = [] + +instance Show SessionCreateFlagBits where + showsPrec = enumShowsPrec enumPrefixSessionCreateFlagBits + showTableSessionCreateFlagBits + conNameSessionCreateFlagBits + (\(SessionCreateFlagBits x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read SessionCreateFlagBits where + readPrec = enumReadPrec enumPrefixSessionCreateFlagBits + showTableSessionCreateFlagBits + conNameSessionCreateFlagBits + SessionCreateFlagBits + diff --git a/openxr/src/OpenXR/Core10/Enums/SessionCreateFlags.hs b/openxr/src/OpenXR/Core10/Enums/SessionCreateFlags.hs deleted file mode 100644 index caa902c57..000000000 --- a/openxr/src/OpenXR/Core10/Enums/SessionCreateFlags.hs +++ /dev/null @@ -1,51 +0,0 @@ -{-# language CPP #-} --- No documentation found for Chapter "SessionCreateFlags" -module OpenXR.Core10.Enums.SessionCreateFlags (SessionCreateFlags(..)) where - -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- | XrSessionCreateFlags - Session Creation Flags --- --- = Description --- --- There are currently no session creation flags. This is reserved for --- future use. --- --- = See Also --- --- 'OpenXR.Core10.Device.SessionCreateInfo', --- 'OpenXR.Core10.Device.createSession' -newtype SessionCreateFlags = SessionCreateFlags Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameSessionCreateFlags :: String -conNameSessionCreateFlags = "SessionCreateFlags" - -enumPrefixSessionCreateFlags :: String -enumPrefixSessionCreateFlags = "" - -showTableSessionCreateFlags :: [(SessionCreateFlags, String)] -showTableSessionCreateFlags = [] - -instance Show SessionCreateFlags where - showsPrec = enumShowsPrec enumPrefixSessionCreateFlags - showTableSessionCreateFlags - conNameSessionCreateFlags - (\(SessionCreateFlags x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read SessionCreateFlags where - readPrec = - enumReadPrec enumPrefixSessionCreateFlags showTableSessionCreateFlags conNameSessionCreateFlags SessionCreateFlags - diff --git a/openxr/src/OpenXR/Core10/Enums/SpaceLocationFlagBits.hs b/openxr/src/OpenXR/Core10/Enums/SpaceLocationFlagBits.hs new file mode 100644 index 000000000..ebd307454 --- /dev/null +++ b/openxr/src/OpenXR/Core10/Enums/SpaceLocationFlagBits.hs @@ -0,0 +1,64 @@ +{-# language CPP #-} +-- No documentation found for Chapter "SpaceLocationFlagBits" +module OpenXR.Core10.Enums.SpaceLocationFlagBits ( SpaceLocationFlags + , SpaceLocationFlagBits( SPACE_LOCATION_ORIENTATION_VALID_BIT + , SPACE_LOCATION_POSITION_VALID_BIT + , SPACE_LOCATION_ORIENTATION_TRACKED_BIT + , SPACE_LOCATION_POSITION_TRACKED_BIT + , .. + ) + ) where + +import OpenXR.Internal.Utils (enumReadPrec) +import OpenXR.Internal.Utils (enumShowsPrec) +import GHC.Show (showString) +import Numeric (showHex) +import OpenXR.Zero (Zero) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Foreign.Storable (Storable) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import OpenXR.Core10.FundamentalTypes (Flags64) +type SpaceLocationFlags = SpaceLocationFlagBits + +-- No documentation found for TopLevel "XrSpaceLocationFlagBits" +newtype SpaceLocationFlagBits = SpaceLocationFlagBits Flags64 + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + +-- No documentation found for Nested "XrSpaceLocationFlagBits" "XR_SPACE_LOCATION_ORIENTATION_VALID_BIT" +pattern SPACE_LOCATION_ORIENTATION_VALID_BIT = SpaceLocationFlagBits 0x0000000000000001 +-- No documentation found for Nested "XrSpaceLocationFlagBits" "XR_SPACE_LOCATION_POSITION_VALID_BIT" +pattern SPACE_LOCATION_POSITION_VALID_BIT = SpaceLocationFlagBits 0x0000000000000002 +-- No documentation found for Nested "XrSpaceLocationFlagBits" "XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT" +pattern SPACE_LOCATION_ORIENTATION_TRACKED_BIT = SpaceLocationFlagBits 0x0000000000000004 +-- No documentation found for Nested "XrSpaceLocationFlagBits" "XR_SPACE_LOCATION_POSITION_TRACKED_BIT" +pattern SPACE_LOCATION_POSITION_TRACKED_BIT = SpaceLocationFlagBits 0x0000000000000008 + +conNameSpaceLocationFlagBits :: String +conNameSpaceLocationFlagBits = "SpaceLocationFlagBits" + +enumPrefixSpaceLocationFlagBits :: String +enumPrefixSpaceLocationFlagBits = "SPACE_LOCATION_" + +showTableSpaceLocationFlagBits :: [(SpaceLocationFlagBits, String)] +showTableSpaceLocationFlagBits = + [ (SPACE_LOCATION_ORIENTATION_VALID_BIT , "ORIENTATION_VALID_BIT") + , (SPACE_LOCATION_POSITION_VALID_BIT , "POSITION_VALID_BIT") + , (SPACE_LOCATION_ORIENTATION_TRACKED_BIT, "ORIENTATION_TRACKED_BIT") + , (SPACE_LOCATION_POSITION_TRACKED_BIT , "POSITION_TRACKED_BIT") + ] + +instance Show SpaceLocationFlagBits where + showsPrec = enumShowsPrec enumPrefixSpaceLocationFlagBits + showTableSpaceLocationFlagBits + conNameSpaceLocationFlagBits + (\(SpaceLocationFlagBits x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read SpaceLocationFlagBits where + readPrec = enumReadPrec enumPrefixSpaceLocationFlagBits + showTableSpaceLocationFlagBits + conNameSpaceLocationFlagBits + SpaceLocationFlagBits + diff --git a/openxr/src/OpenXR/Core10/Enums/SpaceLocationFlags.hs b/openxr/src/OpenXR/Core10/Enums/SpaceLocationFlags.hs deleted file mode 100644 index 3047898ad..000000000 --- a/openxr/src/OpenXR/Core10/Enums/SpaceLocationFlags.hs +++ /dev/null @@ -1,52 +0,0 @@ -{-# language CPP #-} --- No documentation found for Chapter "SpaceLocationFlags" -module OpenXR.Core10.Enums.SpaceLocationFlags (SpaceLocationFlags(..)) where - -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- | XrSpaceLocationFlags - Space location flags --- --- = Description --- --- where the flags have the following meaning: --- --- == Flag Descriptions --- --- = See Also --- --- 'OpenXR.Extensions.XR_EXT_hand_tracking.HandJointLocationEXT', --- 'OpenXR.Core10.Space.SpaceLocation' -newtype SpaceLocationFlags = SpaceLocationFlags Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameSpaceLocationFlags :: String -conNameSpaceLocationFlags = "SpaceLocationFlags" - -enumPrefixSpaceLocationFlags :: String -enumPrefixSpaceLocationFlags = "" - -showTableSpaceLocationFlags :: [(SpaceLocationFlags, String)] -showTableSpaceLocationFlags = [] - -instance Show SpaceLocationFlags where - showsPrec = enumShowsPrec enumPrefixSpaceLocationFlags - showTableSpaceLocationFlags - conNameSpaceLocationFlags - (\(SpaceLocationFlags x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read SpaceLocationFlags where - readPrec = - enumReadPrec enumPrefixSpaceLocationFlags showTableSpaceLocationFlags conNameSpaceLocationFlags SpaceLocationFlags - diff --git a/openxr/src/OpenXR/Core10/Enums/SpaceVelocityFlagBits.hs b/openxr/src/OpenXR/Core10/Enums/SpaceVelocityFlagBits.hs new file mode 100644 index 000000000..11b3cd8c3 --- /dev/null +++ b/openxr/src/OpenXR/Core10/Enums/SpaceVelocityFlagBits.hs @@ -0,0 +1,54 @@ +{-# language CPP #-} +-- No documentation found for Chapter "SpaceVelocityFlagBits" +module OpenXR.Core10.Enums.SpaceVelocityFlagBits ( SpaceVelocityFlags + , SpaceVelocityFlagBits( SPACE_VELOCITY_LINEAR_VALID_BIT + , SPACE_VELOCITY_ANGULAR_VALID_BIT + , .. + ) + ) where + +import OpenXR.Internal.Utils (enumReadPrec) +import OpenXR.Internal.Utils (enumShowsPrec) +import GHC.Show (showString) +import Numeric (showHex) +import OpenXR.Zero (Zero) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Foreign.Storable (Storable) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import OpenXR.Core10.FundamentalTypes (Flags64) +type SpaceVelocityFlags = SpaceVelocityFlagBits + +-- No documentation found for TopLevel "XrSpaceVelocityFlagBits" +newtype SpaceVelocityFlagBits = SpaceVelocityFlagBits Flags64 + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + +-- No documentation found for Nested "XrSpaceVelocityFlagBits" "XR_SPACE_VELOCITY_LINEAR_VALID_BIT" +pattern SPACE_VELOCITY_LINEAR_VALID_BIT = SpaceVelocityFlagBits 0x0000000000000001 +-- No documentation found for Nested "XrSpaceVelocityFlagBits" "XR_SPACE_VELOCITY_ANGULAR_VALID_BIT" +pattern SPACE_VELOCITY_ANGULAR_VALID_BIT = SpaceVelocityFlagBits 0x0000000000000002 + +conNameSpaceVelocityFlagBits :: String +conNameSpaceVelocityFlagBits = "SpaceVelocityFlagBits" + +enumPrefixSpaceVelocityFlagBits :: String +enumPrefixSpaceVelocityFlagBits = "SPACE_VELOCITY_" + +showTableSpaceVelocityFlagBits :: [(SpaceVelocityFlagBits, String)] +showTableSpaceVelocityFlagBits = + [(SPACE_VELOCITY_LINEAR_VALID_BIT, "LINEAR_VALID_BIT"), (SPACE_VELOCITY_ANGULAR_VALID_BIT, "ANGULAR_VALID_BIT")] + +instance Show SpaceVelocityFlagBits where + showsPrec = enumShowsPrec enumPrefixSpaceVelocityFlagBits + showTableSpaceVelocityFlagBits + conNameSpaceVelocityFlagBits + (\(SpaceVelocityFlagBits x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read SpaceVelocityFlagBits where + readPrec = enumReadPrec enumPrefixSpaceVelocityFlagBits + showTableSpaceVelocityFlagBits + conNameSpaceVelocityFlagBits + SpaceVelocityFlagBits + diff --git a/openxr/src/OpenXR/Core10/Enums/SpaceVelocityFlags.hs b/openxr/src/OpenXR/Core10/Enums/SpaceVelocityFlags.hs deleted file mode 100644 index 8a0721224..000000000 --- a/openxr/src/OpenXR/Core10/Enums/SpaceVelocityFlags.hs +++ /dev/null @@ -1,52 +0,0 @@ -{-# language CPP #-} --- No documentation found for Chapter "SpaceVelocityFlags" -module OpenXR.Core10.Enums.SpaceVelocityFlags (SpaceVelocityFlags(..)) where - -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- | XrSpaceVelocityFlags - Space velocity flags --- --- = Description --- --- where the flags have the following meaning: --- --- == Flag Descriptions --- --- = See Also --- --- 'OpenXR.Extensions.XR_EXT_hand_tracking.HandJointVelocityEXT', --- 'OpenXR.Core10.Space.SpaceVelocity' -newtype SpaceVelocityFlags = SpaceVelocityFlags Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameSpaceVelocityFlags :: String -conNameSpaceVelocityFlags = "SpaceVelocityFlags" - -enumPrefixSpaceVelocityFlags :: String -enumPrefixSpaceVelocityFlags = "" - -showTableSpaceVelocityFlags :: [(SpaceVelocityFlags, String)] -showTableSpaceVelocityFlags = [] - -instance Show SpaceVelocityFlags where - showsPrec = enumShowsPrec enumPrefixSpaceVelocityFlags - showTableSpaceVelocityFlags - conNameSpaceVelocityFlags - (\(SpaceVelocityFlags x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read SpaceVelocityFlags where - readPrec = - enumReadPrec enumPrefixSpaceVelocityFlags showTableSpaceVelocityFlags conNameSpaceVelocityFlags SpaceVelocityFlags - diff --git a/openxr/src/OpenXR/Core10/Enums/SwapchainCreateFlagBits.hs b/openxr/src/OpenXR/Core10/Enums/SwapchainCreateFlagBits.hs new file mode 100644 index 000000000..5283b8fd7 --- /dev/null +++ b/openxr/src/OpenXR/Core10/Enums/SwapchainCreateFlagBits.hs @@ -0,0 +1,56 @@ +{-# language CPP #-} +-- No documentation found for Chapter "SwapchainCreateFlagBits" +module OpenXR.Core10.Enums.SwapchainCreateFlagBits ( SwapchainCreateFlags + , SwapchainCreateFlagBits( SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT + , SWAPCHAIN_CREATE_STATIC_IMAGE_BIT + , .. + ) + ) where + +import OpenXR.Internal.Utils (enumReadPrec) +import OpenXR.Internal.Utils (enumShowsPrec) +import GHC.Show (showString) +import Numeric (showHex) +import OpenXR.Zero (Zero) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Foreign.Storable (Storable) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import OpenXR.Core10.FundamentalTypes (Flags64) +type SwapchainCreateFlags = SwapchainCreateFlagBits + +-- No documentation found for TopLevel "XrSwapchainCreateFlagBits" +newtype SwapchainCreateFlagBits = SwapchainCreateFlagBits Flags64 + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + +-- No documentation found for Nested "XrSwapchainCreateFlagBits" "XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT" +pattern SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT = SwapchainCreateFlagBits 0x0000000000000001 +-- No documentation found for Nested "XrSwapchainCreateFlagBits" "XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT" +pattern SWAPCHAIN_CREATE_STATIC_IMAGE_BIT = SwapchainCreateFlagBits 0x0000000000000002 + +conNameSwapchainCreateFlagBits :: String +conNameSwapchainCreateFlagBits = "SwapchainCreateFlagBits" + +enumPrefixSwapchainCreateFlagBits :: String +enumPrefixSwapchainCreateFlagBits = "SWAPCHAIN_CREATE_" + +showTableSwapchainCreateFlagBits :: [(SwapchainCreateFlagBits, String)] +showTableSwapchainCreateFlagBits = + [ (SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT, "PROTECTED_CONTENT_BIT") + , (SWAPCHAIN_CREATE_STATIC_IMAGE_BIT , "STATIC_IMAGE_BIT") + ] + +instance Show SwapchainCreateFlagBits where + showsPrec = enumShowsPrec enumPrefixSwapchainCreateFlagBits + showTableSwapchainCreateFlagBits + conNameSwapchainCreateFlagBits + (\(SwapchainCreateFlagBits x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read SwapchainCreateFlagBits where + readPrec = enumReadPrec enumPrefixSwapchainCreateFlagBits + showTableSwapchainCreateFlagBits + conNameSwapchainCreateFlagBits + SwapchainCreateFlagBits + diff --git a/openxr/src/OpenXR/Core10/Enums/SwapchainCreateFlags.hs b/openxr/src/OpenXR/Core10/Enums/SwapchainCreateFlags.hs deleted file mode 100644 index 396167c35..000000000 --- a/openxr/src/OpenXR/Core10/Enums/SwapchainCreateFlags.hs +++ /dev/null @@ -1,56 +0,0 @@ -{-# language CPP #-} --- No documentation found for Chapter "SwapchainCreateFlags" -module OpenXR.Core10.Enums.SwapchainCreateFlags (SwapchainCreateFlags(..)) where - -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- | XrSwapchainCreateFlags - Swapchain creation flags --- --- == Flag Descriptions --- --- A runtime /may/ implement any of these, but is not required to. A --- runtime /must/ return --- 'OpenXR.Core10.Enums.Result.ERROR_FEATURE_UNSUPPORTED' from --- 'OpenXR.Core10.Image.createSwapchain' if an 'SwapchainCreateFlags' bit --- is requested but not implemented. --- --- = See Also --- --- 'OpenXR.Core10.Image.SwapchainCreateInfo', --- 'OpenXR.Core10.Image.createSwapchain' -newtype SwapchainCreateFlags = SwapchainCreateFlags Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameSwapchainCreateFlags :: String -conNameSwapchainCreateFlags = "SwapchainCreateFlags" - -enumPrefixSwapchainCreateFlags :: String -enumPrefixSwapchainCreateFlags = "" - -showTableSwapchainCreateFlags :: [(SwapchainCreateFlags, String)] -showTableSwapchainCreateFlags = [] - -instance Show SwapchainCreateFlags where - showsPrec = enumShowsPrec enumPrefixSwapchainCreateFlags - showTableSwapchainCreateFlags - conNameSwapchainCreateFlags - (\(SwapchainCreateFlags x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read SwapchainCreateFlags where - readPrec = enumReadPrec enumPrefixSwapchainCreateFlags - showTableSwapchainCreateFlags - conNameSwapchainCreateFlags - SwapchainCreateFlags - diff --git a/openxr/src/OpenXR/Core10/Enums/SwapchainUsageFlagBits.hs b/openxr/src/OpenXR/Core10/Enums/SwapchainUsageFlagBits.hs new file mode 100644 index 000000000..6bc7a3f85 --- /dev/null +++ b/openxr/src/OpenXR/Core10/Enums/SwapchainUsageFlagBits.hs @@ -0,0 +1,80 @@ +{-# language CPP #-} +-- No documentation found for Chapter "SwapchainUsageFlagBits" +module OpenXR.Core10.Enums.SwapchainUsageFlagBits ( SwapchainUsageFlags + , SwapchainUsageFlagBits( SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT + , SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT + , SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT + , SWAPCHAIN_USAGE_TRANSFER_SRC_BIT + , SWAPCHAIN_USAGE_TRANSFER_DST_BIT + , SWAPCHAIN_USAGE_SAMPLED_BIT + , SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT + , SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND + , .. + ) + ) where + +import OpenXR.Internal.Utils (enumReadPrec) +import OpenXR.Internal.Utils (enumShowsPrec) +import GHC.Show (showString) +import Numeric (showHex) +import OpenXR.Zero (Zero) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Foreign.Storable (Storable) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import OpenXR.Core10.FundamentalTypes (Flags64) +type SwapchainUsageFlags = SwapchainUsageFlagBits + +-- No documentation found for TopLevel "XrSwapchainUsageFlagBits" +newtype SwapchainUsageFlagBits = SwapchainUsageFlagBits Flags64 + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + +-- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT" +pattern SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT = SwapchainUsageFlagBits 0x0000000000000001 +-- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" +pattern SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = SwapchainUsageFlagBits 0x0000000000000002 +-- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT" +pattern SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT = SwapchainUsageFlagBits 0x0000000000000004 +-- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT" +pattern SWAPCHAIN_USAGE_TRANSFER_SRC_BIT = SwapchainUsageFlagBits 0x0000000000000008 +-- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT" +pattern SWAPCHAIN_USAGE_TRANSFER_DST_BIT = SwapchainUsageFlagBits 0x0000000000000010 +-- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_SAMPLED_BIT" +pattern SWAPCHAIN_USAGE_SAMPLED_BIT = SwapchainUsageFlagBits 0x0000000000000020 +-- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT" +pattern SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT = SwapchainUsageFlagBits 0x0000000000000040 +-- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND" +pattern SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND = SwapchainUsageFlagBits 0x0000000000000080 + +conNameSwapchainUsageFlagBits :: String +conNameSwapchainUsageFlagBits = "SwapchainUsageFlagBits" + +enumPrefixSwapchainUsageFlagBits :: String +enumPrefixSwapchainUsageFlagBits = "SWAPCHAIN_USAGE_" + +showTableSwapchainUsageFlagBits :: [(SwapchainUsageFlagBits, String)] +showTableSwapchainUsageFlagBits = + [ (SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT , "COLOR_ATTACHMENT_BIT") + , (SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, "DEPTH_STENCIL_ATTACHMENT_BIT") + , (SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT , "UNORDERED_ACCESS_BIT") + , (SWAPCHAIN_USAGE_TRANSFER_SRC_BIT , "TRANSFER_SRC_BIT") + , (SWAPCHAIN_USAGE_TRANSFER_DST_BIT , "TRANSFER_DST_BIT") + , (SWAPCHAIN_USAGE_SAMPLED_BIT , "SAMPLED_BIT") + , (SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT , "MUTABLE_FORMAT_BIT") + , (SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND , "INPUT_ATTACHMENT_BIT_MND") + ] + +instance Show SwapchainUsageFlagBits where + showsPrec = enumShowsPrec enumPrefixSwapchainUsageFlagBits + showTableSwapchainUsageFlagBits + conNameSwapchainUsageFlagBits + (\(SwapchainUsageFlagBits x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read SwapchainUsageFlagBits where + readPrec = enumReadPrec enumPrefixSwapchainUsageFlagBits + showTableSwapchainUsageFlagBits + conNameSwapchainUsageFlagBits + SwapchainUsageFlagBits + diff --git a/openxr/src/OpenXR/Core10/Enums/SwapchainUsageFlags.hs b/openxr/src/OpenXR/Core10/Enums/SwapchainUsageFlags.hs deleted file mode 100644 index f64089b7a..000000000 --- a/openxr/src/OpenXR/Core10/Enums/SwapchainUsageFlags.hs +++ /dev/null @@ -1,51 +0,0 @@ -{-# language CPP #-} --- No documentation found for Chapter "SwapchainUsageFlags" -module OpenXR.Core10.Enums.SwapchainUsageFlags (SwapchainUsageFlags(..)) where - -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- | XrSwapchainUsageFlags - Swapchain usage flags --- --- == Flag Descriptions --- --- = See Also --- --- 'OpenXR.Core10.Image.SwapchainCreateInfo', --- 'OpenXR.Core10.Image.createSwapchain', --- 'OpenXR.Core10.Image.enumerateSwapchainFormats' -newtype SwapchainUsageFlags = SwapchainUsageFlags Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameSwapchainUsageFlags :: String -conNameSwapchainUsageFlags = "SwapchainUsageFlags" - -enumPrefixSwapchainUsageFlags :: String -enumPrefixSwapchainUsageFlags = "" - -showTableSwapchainUsageFlags :: [(SwapchainUsageFlags, String)] -showTableSwapchainUsageFlags = [] - -instance Show SwapchainUsageFlags where - showsPrec = enumShowsPrec enumPrefixSwapchainUsageFlags - showTableSwapchainUsageFlags - conNameSwapchainUsageFlags - (\(SwapchainUsageFlags x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read SwapchainUsageFlags where - readPrec = enumReadPrec enumPrefixSwapchainUsageFlags - showTableSwapchainUsageFlags - conNameSwapchainUsageFlags - SwapchainUsageFlags - diff --git a/openxr/src/OpenXR/Core10/Enums/ViewStateFlagBits.hs b/openxr/src/OpenXR/Core10/Enums/ViewStateFlagBits.hs new file mode 100644 index 000000000..5be8b6898 --- /dev/null +++ b/openxr/src/OpenXR/Core10/Enums/ViewStateFlagBits.hs @@ -0,0 +1,62 @@ +{-# language CPP #-} +-- No documentation found for Chapter "ViewStateFlagBits" +module OpenXR.Core10.Enums.ViewStateFlagBits ( ViewStateFlags + , ViewStateFlagBits( VIEW_STATE_ORIENTATION_VALID_BIT + , VIEW_STATE_POSITION_VALID_BIT + , VIEW_STATE_ORIENTATION_TRACKED_BIT + , VIEW_STATE_POSITION_TRACKED_BIT + , .. + ) + ) where + +import OpenXR.Internal.Utils (enumReadPrec) +import OpenXR.Internal.Utils (enumShowsPrec) +import GHC.Show (showString) +import Numeric (showHex) +import OpenXR.Zero (Zero) +import Data.Bits (Bits) +import Data.Bits (FiniteBits) +import Foreign.Storable (Storable) +import GHC.Read (Read(readPrec)) +import GHC.Show (Show(showsPrec)) +import OpenXR.Core10.FundamentalTypes (Flags64) +type ViewStateFlags = ViewStateFlagBits + +-- No documentation found for TopLevel "XrViewStateFlagBits" +newtype ViewStateFlagBits = ViewStateFlagBits Flags64 + deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) + +-- No documentation found for Nested "XrViewStateFlagBits" "XR_VIEW_STATE_ORIENTATION_VALID_BIT" +pattern VIEW_STATE_ORIENTATION_VALID_BIT = ViewStateFlagBits 0x0000000000000001 +-- No documentation found for Nested "XrViewStateFlagBits" "XR_VIEW_STATE_POSITION_VALID_BIT" +pattern VIEW_STATE_POSITION_VALID_BIT = ViewStateFlagBits 0x0000000000000002 +-- No documentation found for Nested "XrViewStateFlagBits" "XR_VIEW_STATE_ORIENTATION_TRACKED_BIT" +pattern VIEW_STATE_ORIENTATION_TRACKED_BIT = ViewStateFlagBits 0x0000000000000004 +-- No documentation found for Nested "XrViewStateFlagBits" "XR_VIEW_STATE_POSITION_TRACKED_BIT" +pattern VIEW_STATE_POSITION_TRACKED_BIT = ViewStateFlagBits 0x0000000000000008 + +conNameViewStateFlagBits :: String +conNameViewStateFlagBits = "ViewStateFlagBits" + +enumPrefixViewStateFlagBits :: String +enumPrefixViewStateFlagBits = "VIEW_STATE_" + +showTableViewStateFlagBits :: [(ViewStateFlagBits, String)] +showTableViewStateFlagBits = + [ (VIEW_STATE_ORIENTATION_VALID_BIT , "ORIENTATION_VALID_BIT") + , (VIEW_STATE_POSITION_VALID_BIT , "POSITION_VALID_BIT") + , (VIEW_STATE_ORIENTATION_TRACKED_BIT, "ORIENTATION_TRACKED_BIT") + , (VIEW_STATE_POSITION_TRACKED_BIT , "POSITION_TRACKED_BIT") + ] + +instance Show ViewStateFlagBits where + showsPrec = enumShowsPrec enumPrefixViewStateFlagBits + showTableViewStateFlagBits + conNameViewStateFlagBits + (\(ViewStateFlagBits x) -> x) + (\x -> showString "0x" . showHex x) + +instance Read ViewStateFlagBits where + readPrec = + enumReadPrec enumPrefixViewStateFlagBits showTableViewStateFlagBits conNameViewStateFlagBits ViewStateFlagBits + diff --git a/openxr/src/OpenXR/Core10/Enums/ViewStateFlags.hs b/openxr/src/OpenXR/Core10/Enums/ViewStateFlags.hs deleted file mode 100644 index efe899c0b..000000000 --- a/openxr/src/OpenXR/Core10/Enums/ViewStateFlags.hs +++ /dev/null @@ -1,48 +0,0 @@ -{-# language CPP #-} --- No documentation found for Chapter "ViewStateFlags" -module OpenXR.Core10.Enums.ViewStateFlags (ViewStateFlags(..)) where - -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- | XrViewStateFlags - View state flags --- --- == Flag Descriptions --- --- = See Also --- --- 'OpenXR.Core10.DisplayTiming.View', --- 'OpenXR.Core10.DisplayTiming.ViewState', --- 'OpenXR.Core10.DisplayTiming.locateViews' -newtype ViewStateFlags = ViewStateFlags Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - - -conNameViewStateFlags :: String -conNameViewStateFlags = "ViewStateFlags" - -enumPrefixViewStateFlags :: String -enumPrefixViewStateFlags = "" - -showTableViewStateFlags :: [(ViewStateFlags, String)] -showTableViewStateFlags = [] - -instance Show ViewStateFlags where - showsPrec = enumShowsPrec enumPrefixViewStateFlags - showTableViewStateFlags - conNameViewStateFlags - (\(ViewStateFlags x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read ViewStateFlags where - readPrec = enumReadPrec enumPrefixViewStateFlags showTableViewStateFlags conNameViewStateFlags ViewStateFlags - diff --git a/openxr/src/OpenXR/Core10/FundamentalTypes.hs b/openxr/src/OpenXR/Core10/FundamentalTypes.hs index 42bf7db13..8ce0c7e4a 100644 --- a/openxr/src/OpenXR/Core10/FundamentalTypes.hs +++ b/openxr/src/OpenXR/Core10/FundamentalTypes.hs @@ -475,13 +475,13 @@ instance Read Bool32 where -- -- = See Also -- --- 'OpenXR.Core10.Enums.CompositionLayerFlags.CompositionLayerFlags', --- 'OpenXR.Core10.Enums.InstanceCreateFlags.InstanceCreateFlags', --- 'OpenXR.Core10.Enums.SessionCreateFlags.SessionCreateFlags', --- 'OpenXR.Core10.Enums.SpaceLocationFlags.SpaceLocationFlags', --- 'OpenXR.Core10.Enums.SwapchainCreateFlags.SwapchainCreateFlags', --- 'OpenXR.Core10.Enums.SwapchainUsageFlags.SwapchainUsageFlags', --- 'OpenXR.Core10.Enums.ViewStateFlags.ViewStateFlags' +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlags', +-- 'OpenXR.Core10.Enums.InstanceCreateFlagBits.InstanceCreateFlags', +-- 'OpenXR.Core10.Enums.SessionCreateFlagBits.SessionCreateFlags', +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SpaceLocationFlags', +-- 'OpenXR.Core10.Enums.SwapchainCreateFlagBits.SwapchainCreateFlags', +-- 'OpenXR.Core10.Enums.SwapchainUsageFlagBits.SwapchainUsageFlags', +-- 'OpenXR.Core10.Enums.ViewStateFlagBits.ViewStateFlags' type Flags64 = Word64 diff --git a/openxr/src/OpenXR/Core10/Image.hs b/openxr/src/OpenXR/Core10/Image.hs index 6a595b586..5c7fef71e 100644 --- a/openxr/src/OpenXR/Core10/Image.hs +++ b/openxr/src/OpenXR/Core10/Image.hs @@ -97,13 +97,13 @@ import OpenXR.Core10.Enums.StructureType (StructureType) import OpenXR.Core10.Handles (Swapchain) import OpenXR.Core10.Handles (Swapchain(..)) import OpenXR.Core10.Handles (Swapchain(Swapchain)) -import OpenXR.Core10.Enums.SwapchainCreateFlags (SwapchainCreateFlags) +import OpenXR.Core10.Enums.SwapchainCreateFlagBits (SwapchainCreateFlags) import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_D3D11_enable (SwapchainImageD3D11KHR) import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_D3D12_enable (SwapchainImageD3D12KHR) import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_opengl_es_enable (SwapchainImageOpenGLESKHR) import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_opengl_enable (SwapchainImageOpenGLKHR) import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_vulkan_enable (SwapchainImageVulkanKHR) -import OpenXR.Core10.Enums.SwapchainUsageFlags (SwapchainUsageFlags) +import OpenXR.Core10.Enums.SwapchainUsageFlagBits (SwapchainUsageFlags) import OpenXR.Core10.Handles (Swapchain_T) import OpenXR.Core10.Enums.Result (Result(SUCCESS)) import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_SWAPCHAIN_CREATE_INFO)) @@ -508,12 +508,13 @@ foreign import ccall -- 'OpenXR.Core10.Enums.Result.ERROR_CALL_ORDER_INVALID' if @index@ has -- already been acquired and not yet released with 'releaseSwapchainImage'. -- If the @swapchain@ was created with the --- @XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT@ set in --- 'SwapchainCreateInfo'::@createFlags@, this function /must/ not have been --- previously called for this swapchain. The runtime /must/ return --- 'OpenXR.Core10.Enums.Result.ERROR_CALL_ORDER_INVALID' if a @swapchain@ --- created with the @XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT@ set in --- 'SwapchainCreateInfo'::@createFlags@ and this function has been +-- 'OpenXR.Core10.Enums.SwapchainCreateFlagBits.SWAPCHAIN_CREATE_STATIC_IMAGE_BIT' +-- set in 'SwapchainCreateInfo'::@createFlags@, this function /must/ not +-- have been previously called for this swapchain. The runtime /must/ +-- return 'OpenXR.Core10.Enums.Result.ERROR_CALL_ORDER_INVALID' if a +-- @swapchain@ created with the +-- 'OpenXR.Core10.Enums.SwapchainCreateFlagBits.SWAPCHAIN_CREATE_STATIC_IMAGE_BIT' +-- set in 'SwapchainCreateInfo'::@createFlags@ and this function has been -- successfully called previously for this swapchain. -- -- == Valid Usage (Implicit) @@ -717,9 +718,9 @@ foreign import ccall -- = Description -- -- If the @swapchain@ was created with the --- @XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT@ set in --- 'SwapchainCreateInfo'::@createFlags@ structure, this function /must/ not --- have been previously called for this swapchain. +-- 'OpenXR.Core10.Enums.SwapchainCreateFlagBits.SWAPCHAIN_CREATE_STATIC_IMAGE_BIT' +-- set in 'SwapchainCreateInfo'::@createFlags@ structure, this function +-- /must/ not have been previously called for this swapchain. -- -- The runtime /must/ return -- 'OpenXR.Core10.Enums.Result.ERROR_CALL_ORDER_INVALID' if no image has @@ -789,10 +790,10 @@ releaseSwapchainImage swapchain releaseInfo = liftIO . evalContT $ do -- -- = See Also -- --- 'OpenXR.Core10.Enums.SessionCreateFlags.SessionCreateFlags', +-- 'OpenXR.Core10.Enums.SessionCreateFlagBits.SessionCreateFlags', -- 'OpenXR.Core10.Enums.StructureType.StructureType', --- 'OpenXR.Core10.Enums.SwapchainCreateFlags.SwapchainCreateFlags', --- 'OpenXR.Core10.Enums.SwapchainUsageFlags.SwapchainUsageFlags', +-- 'OpenXR.Core10.Enums.SwapchainCreateFlagBits.SwapchainCreateFlags', +-- 'OpenXR.Core10.Enums.SwapchainUsageFlagBits.SwapchainUsageFlags', -- 'OpenXR.Core10.Device.createSession', 'createSwapchain', -- 'OpenXR.Extensions.XR_KHR_android_surface_swapchain.createSwapchainAndroidSurfaceKHR', -- 'enumerateSwapchainFormats' @@ -807,16 +808,16 @@ data SwapchainCreateInfo (es :: [Type]) = SwapchainCreateInfo -- 'OpenXR.Extensions.XR_MSFT_secondary_view_configuration.SecondaryViewConfigurationSwapchainCreateInfoMSFT' next :: Chain es , -- | @createFlags@ is a bitmask of - -- + -- 'OpenXR.Core10.Enums.SwapchainCreateFlagBits.SwapchainCreateFlagBits' -- describing additional properties of the swapchain. -- -- #VUID-XrSwapchainCreateInfo-createFlags-parameter# @createFlags@ /must/ -- be @0@ or a valid combination of - -- + -- 'OpenXR.Core10.Enums.SwapchainCreateFlagBits.SwapchainCreateFlagBits' -- values createFlags :: SwapchainCreateFlags , -- | @usageFlags@ is a bitmask of - -- 'OpenXR.Extensions.XR_MND_swapchain_usage_input_attachment_bit.SwapchainUsageFlagBits' + -- 'OpenXR.Core10.Enums.SwapchainUsageFlagBits.SwapchainUsageFlagBits' -- describing the intended usage of the swapchain’s images. The usage flags -- define how the corresponding graphics API objects are created. A -- mismatch /may/ result in swapchain images that do not support the @@ -824,7 +825,7 @@ data SwapchainCreateInfo (es :: [Type]) = SwapchainCreateInfo -- -- #VUID-XrSwapchainCreateInfo-usageFlags-parameter# @usageFlags@ /must/ be -- @0@ or a valid combination of - -- 'OpenXR.Extensions.XR_MND_swapchain_usage_input_attachment_bit.SwapchainUsageFlagBits' + -- 'OpenXR.Core10.Enums.SwapchainUsageFlagBits.SwapchainUsageFlagBits' -- values usageFlags :: SwapchainUsageFlags , -- | @format@ is a graphics API-specific texture format identifier. For @@ -871,34 +872,34 @@ instance Extensible SwapchainCreateInfo where | otherwise = Nothing instance (Extendss SwapchainCreateInfo es, PokeChain es) => ToCStruct (SwapchainCreateInfo es) where - withCStruct x f = allocaBytesAligned 56 8 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 64 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p SwapchainCreateInfo{..} f = evalContT $ do lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_SWAPCHAIN_CREATE_INFO) next'' <- fmap castPtr . ContT $ withChain (next) lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) next'' lift $ poke ((p `plusPtr` 16 :: Ptr SwapchainCreateFlags)) (createFlags) - lift $ poke ((p `plusPtr` 20 :: Ptr SwapchainUsageFlags)) (usageFlags) - lift $ poke ((p `plusPtr` 24 :: Ptr Int64)) (format) - lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) (sampleCount) - lift $ poke ((p `plusPtr` 36 :: Ptr Word32)) (width) - lift $ poke ((p `plusPtr` 40 :: Ptr Word32)) (height) - lift $ poke ((p `plusPtr` 44 :: Ptr Word32)) (faceCount) - lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) (arraySize) - lift $ poke ((p `plusPtr` 52 :: Ptr Word32)) (mipCount) + lift $ poke ((p `plusPtr` 24 :: Ptr SwapchainUsageFlags)) (usageFlags) + lift $ poke ((p `plusPtr` 32 :: Ptr Int64)) (format) + lift $ poke ((p `plusPtr` 40 :: Ptr Word32)) (sampleCount) + lift $ poke ((p `plusPtr` 44 :: Ptr Word32)) (width) + lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) (height) + lift $ poke ((p `plusPtr` 52 :: Ptr Word32)) (faceCount) + lift $ poke ((p `plusPtr` 56 :: Ptr Word32)) (arraySize) + lift $ poke ((p `plusPtr` 60 :: Ptr Word32)) (mipCount) lift $ f - cStructSize = 56 + cStructSize = 64 cStructAlignment = 8 pokeZeroCStruct p f = evalContT $ do lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_SWAPCHAIN_CREATE_INFO) pNext' <- fmap castPtr . ContT $ withZeroChain @es lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext' - lift $ poke ((p `plusPtr` 24 :: Ptr Int64)) (zero) - lift $ poke ((p `plusPtr` 32 :: Ptr Word32)) (zero) - lift $ poke ((p `plusPtr` 36 :: Ptr Word32)) (zero) + lift $ poke ((p `plusPtr` 32 :: Ptr Int64)) (zero) lift $ poke ((p `plusPtr` 40 :: Ptr Word32)) (zero) lift $ poke ((p `plusPtr` 44 :: Ptr Word32)) (zero) lift $ poke ((p `plusPtr` 48 :: Ptr Word32)) (zero) lift $ poke ((p `plusPtr` 52 :: Ptr Word32)) (zero) + lift $ poke ((p `plusPtr` 56 :: Ptr Word32)) (zero) + lift $ poke ((p `plusPtr` 60 :: Ptr Word32)) (zero) lift $ f instance (Extendss SwapchainCreateInfo es, PeekChain es) => FromCStruct (SwapchainCreateInfo es) where @@ -906,14 +907,14 @@ instance (Extendss SwapchainCreateInfo es, PeekChain es) => FromCStruct (Swapcha next <- peek @(Ptr ()) ((p `plusPtr` 8 :: Ptr (Ptr ()))) next' <- peekChain (castPtr next) createFlags <- peek @SwapchainCreateFlags ((p `plusPtr` 16 :: Ptr SwapchainCreateFlags)) - usageFlags <- peek @SwapchainUsageFlags ((p `plusPtr` 20 :: Ptr SwapchainUsageFlags)) - format <- peek @Int64 ((p `plusPtr` 24 :: Ptr Int64)) - sampleCount <- peek @Word32 ((p `plusPtr` 32 :: Ptr Word32)) - width <- peek @Word32 ((p `plusPtr` 36 :: Ptr Word32)) - height <- peek @Word32 ((p `plusPtr` 40 :: Ptr Word32)) - faceCount <- peek @Word32 ((p `plusPtr` 44 :: Ptr Word32)) - arraySize <- peek @Word32 ((p `plusPtr` 48 :: Ptr Word32)) - mipCount <- peek @Word32 ((p `plusPtr` 52 :: Ptr Word32)) + usageFlags <- peek @SwapchainUsageFlags ((p `plusPtr` 24 :: Ptr SwapchainUsageFlags)) + format <- peek @Int64 ((p `plusPtr` 32 :: Ptr Int64)) + sampleCount <- peek @Word32 ((p `plusPtr` 40 :: Ptr Word32)) + width <- peek @Word32 ((p `plusPtr` 44 :: Ptr Word32)) + height <- peek @Word32 ((p `plusPtr` 48 :: Ptr Word32)) + faceCount <- peek @Word32 ((p `plusPtr` 52 :: Ptr Word32)) + arraySize <- peek @Word32 ((p `plusPtr` 56 :: Ptr Word32)) + mipCount <- peek @Word32 ((p `plusPtr` 60 :: Ptr Word32)) pure $ SwapchainCreateInfo next' createFlags usageFlags format sampleCount width height faceCount arraySize mipCount diff --git a/openxr/src/OpenXR/Core10/Input.hs b/openxr/src/OpenXR/Core10/Input.hs index 37042d130..ac900c7a6 100644 --- a/openxr/src/OpenXR/Core10/Input.hs +++ b/openxr/src/OpenXR/Core10/Input.hs @@ -106,7 +106,7 @@ import OpenXR.CStruct.Extends (Chain) import OpenXR.CStruct.Extends (Extends) import OpenXR.CStruct.Extends (Extendss) import OpenXR.CStruct.Extends (Extensible(..)) -import OpenXR.Core10.Enums.InputSourceLocalizedNameFlags (InputSourceLocalizedNameFlags) +import OpenXR.Core10.Enums.InputSourceLocalizedNameFlagBits (InputSourceLocalizedNameFlags) import OpenXR.Core10.Handles (Instance) import OpenXR.Core10.Handles (Instance(..)) import OpenXR.Dynamic (InstanceCmds(pXrAttachSessionActionSets)) @@ -2360,7 +2360,7 @@ instance Zero BoundSourcesForActionEnumerateInfo where -- -- = See Also -- --- 'OpenXR.Core10.Enums.InputSourceLocalizedNameFlags.InputSourceLocalizedNameFlags', +-- 'OpenXR.Core10.Enums.InputSourceLocalizedNameFlagBits.InputSourceLocalizedNameFlags', -- , -- 'OpenXR.Core10.Enums.StructureType.StructureType', -- 'enumerateBoundSourcesForAction', 'getInputSourceLocalizedName' @@ -2368,11 +2368,11 @@ data InputSourceLocalizedNameGetInfo = InputSourceLocalizedNameGetInfo { -- No documentation found for Nested "XrInputSourceLocalizedNameGetInfo" "sourcePath" sourcePath :: Path , -- | @whichComponents@ is any set of flags from - -- . + -- 'OpenXR.Core10.Enums.InputSourceLocalizedNameFlagBits.InputSourceLocalizedNameFlagBits'. -- -- #VUID-XrInputSourceLocalizedNameGetInfo-whichComponents-parameter# -- @whichComponents@ /must/ be a valid combination of - -- + -- 'OpenXR.Core10.Enums.InputSourceLocalizedNameFlagBits.InputSourceLocalizedNameFlagBits' -- values -- -- #VUID-XrInputSourceLocalizedNameGetInfo-whichComponents-requiredbitmask# diff --git a/openxr/src/OpenXR/Core10/Instance.hs b/openxr/src/OpenXR/Core10/Instance.hs index e7f1a813c..d56c5d3fe 100644 --- a/openxr/src/OpenXR/Core10/Instance.hs +++ b/openxr/src/OpenXR/Core10/Instance.hs @@ -91,7 +91,7 @@ import OpenXR.Dynamic (InstanceCmds(pXrGetInstanceProperties)) import OpenXR.Dynamic (InstanceCmds(pXrPollEvent)) import OpenXR.Dynamic (InstanceCmds(pXrResultToString)) import OpenXR.Dynamic (InstanceCmds(pXrStructureTypeToString)) -import OpenXR.Core10.Enums.InstanceCreateFlags (InstanceCreateFlags) +import OpenXR.Core10.Enums.InstanceCreateFlagBits (InstanceCreateFlags) import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_android_create_instance (InstanceCreateInfoAndroidKHR) import OpenXR.Core10.Handles (Instance_T) import OpenXR.Core10.APIConstants (MAX_API_LAYER_DESCRIPTION_SIZE) @@ -1229,14 +1229,14 @@ instance Zero ApplicationInfo where -- = See Also -- -- 'ApplicationInfo', --- 'OpenXR.Core10.Enums.InstanceCreateFlags.InstanceCreateFlags', +-- 'OpenXR.Core10.Enums.InstanceCreateFlagBits.InstanceCreateFlags', -- 'OpenXR.Core10.Enums.StructureType.StructureType', 'createInstance' data InstanceCreateInfo (es :: [Type]) = InstanceCreateInfo { -- | @next@ is @NULL@ or a pointer to the next structure in a structure -- chain. No such structures are defined in core OpenXR. next :: Chain es , -- | @createFlags@ is a bitmask of - -- 'OpenXR.Core10.Enums.InstanceCreateFlags.InstanceCreateFlags' that + -- 'OpenXR.Core10.Enums.InstanceCreateFlagBits.InstanceCreateFlags' that -- identifies options that apply to the creation. createFlags :: InstanceCreateFlags , -- | @applicationInfo@ is an instance of 'ApplicationInfo'. This information diff --git a/openxr/src/OpenXR/Core10/OtherTypes.hs b/openxr/src/OpenXR/Core10/OtherTypes.hs index cc54dcbdd..080a3fcb4 100644 --- a/openxr/src/OpenXR/Core10/OtherTypes.hs +++ b/openxr/src/OpenXR/Core10/OtherTypes.hs @@ -73,7 +73,7 @@ import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_composition_layer_cylinder (Compo import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_composition_layer_depth (CompositionLayerDepthInfoKHR) import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_composition_layer_equirect2 (CompositionLayerEquirect2KHR) import {-# SOURCE #-} OpenXR.Extensions.XR_KHR_composition_layer_equirect (CompositionLayerEquirectKHR) -import OpenXR.Core10.Enums.CompositionLayerFlags (CompositionLayerFlags) +import OpenXR.Core10.Enums.CompositionLayerFlagBits (CompositionLayerFlags) import OpenXR.Core10.FundamentalTypes (Duration) import {-# SOURCE #-} OpenXR.Extensions.XR_FB_display_refresh_rate (EventDataDisplayRefreshRateChangedFB) import {-# SOURCE #-} OpenXR.Extensions.XR_EXTX_overlay (EventDataMainSessionVisibilityChangedEXTX) @@ -438,7 +438,7 @@ instance Zero SwapchainSubImage where -- -- = See Also -- --- 'OpenXR.Core10.Enums.CompositionLayerFlags.CompositionLayerFlags', +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlags', -- 'OpenXR.Core10.DisplayTiming.FrameEndInfo', -- 'OpenXR.Extensions.XR_MSFT_secondary_view_configuration.SecondaryViewConfigurationLayerInfoMSFT', -- 'OpenXR.Core10.Handles.Space', @@ -467,12 +467,12 @@ data CompositionLayerBaseHeader (es :: [Type]) = CompositionLayerBaseHeader -- 'OpenXR.Extensions.XR_KHR_composition_layer_color_scale_bias.CompositionLayerColorScaleBiasKHR' next :: Chain es , -- | @layerFlags@ is a bitmask of - -- + -- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- describing flags to apply to the layer. -- -- #VUID-XrCompositionLayerBaseHeader-layerFlags-parameter# @layerFlags@ -- /must/ be @0@ or a valid combination of - -- + -- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- values layerFlags :: CompositionLayerFlags , -- | @space@ is the 'OpenXR.Core10.Handles.Space' in which the layer will be @@ -687,7 +687,7 @@ instance es ~ '[] => Zero (CompositionLayerProjectionView es) where -- -- - #VUID-XrCompositionLayerProjection-layerFlags-parameter# -- @layerFlags@ /must/ be @0@ or a valid combination of --- +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- values -- -- - #VUID-XrCompositionLayerProjection-space-parameter# @space@ /must/ @@ -703,12 +703,12 @@ instance es ~ '[] => Zero (CompositionLayerProjectionView es) where -- = See Also -- -- 'CompositionLayerBaseHeader', --- 'OpenXR.Core10.Enums.CompositionLayerFlags.CompositionLayerFlags', +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlags', -- 'CompositionLayerProjectionView', 'OpenXR.Core10.Handles.Space', -- 'OpenXR.Core10.Enums.StructureType.StructureType', 'SwapchainSubImage' data CompositionLayerProjection = CompositionLayerProjection { -- | @layerFlags@ is a bitmask of - -- + -- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- describing flags to apply to the layer. layerFlags :: CompositionLayerFlags , -- | @space@ is the 'OpenXR.Core10.Handles.Space' in which the @pose@ of each @@ -791,19 +791,19 @@ instance Zero CompositionLayerProjection where -- = See Also -- -- 'CompositionLayerBaseHeader', --- 'OpenXR.Core10.Enums.CompositionLayerFlags.CompositionLayerFlags', +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlags', -- 'OpenXR.Core10.FundamentalTypes.Extent2Df', -- 'OpenXR.Core10.Enums.EyeVisibility.EyeVisibility', -- 'OpenXR.Core10.Space.Posef', 'OpenXR.Core10.Handles.Space', -- 'OpenXR.Core10.Enums.StructureType.StructureType', 'SwapchainSubImage' data CompositionLayerQuad = CompositionLayerQuad { -- | @layerFlags@ is a bitmask of - -- + -- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- describing flags to apply to the layer. -- -- #VUID-XrCompositionLayerQuad-layerFlags-parameter# @layerFlags@ /must/ -- be @0@ or a valid combination of - -- + -- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- values layerFlags :: CompositionLayerFlags , -- | @space@ is the 'OpenXR.Core10.Handles.Space' in which the @pose@ of the diff --git a/openxr/src/OpenXR/Core10/Space.hs b/openxr/src/OpenXR/Core10/Space.hs index be564638d..f3a43833e 100644 --- a/openxr/src/OpenXR/Core10/Space.hs +++ b/openxr/src/OpenXR/Core10/Space.hs @@ -92,8 +92,8 @@ import OpenXR.CStruct.Extends (SomeStruct) import OpenXR.Core10.Handles (Space) import OpenXR.Core10.Handles (Space(..)) import OpenXR.Core10.Handles (Space(Space)) -import OpenXR.Core10.Enums.SpaceLocationFlags (SpaceLocationFlags) -import OpenXR.Core10.Enums.SpaceVelocityFlags (SpaceVelocityFlags) +import OpenXR.Core10.Enums.SpaceLocationFlagBits (SpaceLocationFlags) +import OpenXR.Core10.Enums.SpaceVelocityFlagBits (SpaceVelocityFlags) import OpenXR.Core10.Handles (Space_T) import OpenXR.Core10.Enums.StructureType (StructureType) import OpenXR.Core10.FundamentalTypes (Time) @@ -492,7 +492,8 @@ foreign import ccall -- The minimum valid range of values for @time@ are described in -- . -- For values of @time@ outside this range, 'locateSpace' /may/ return a --- location with no position and @XR_SPACE_LOCATION_POSITION_VALID_BIT@ +-- location with no position and +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' -- unset. -- -- Some devices improve their understanding of the world as the device is @@ -506,43 +507,49 @@ foreign import ccall -- neck model updates, inertial dead reckoning, or a last-known position, -- so long as it is still reasonable for the application to use that pose. -- While a runtime is providing position data, it /must/ continue to set --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ but it /can/ clear --- @XR_SPACE_LOCATION_POSITION_TRACKED_BIT@ to indicate that the position --- is inferred or last-known in this way. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- but it /can/ clear +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_TRACKED_BIT' +-- to indicate that the position is inferred or last-known in this way. -- -- If the runtime has not yet observed even a last-known pose for how to -- locate @space@ in @baseSpace@ (e.g. one space is an action space bound -- to a motion controller that has not yet been detected, or the two spaces -- are in disconnected fragments of the runtime’s tracked volume), the -- runtime /should/ return a location with no position and --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ unset. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- unset. -- -- The runtime /must/ return a location with both --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ and --- @XR_SPACE_LOCATION_POSITION_TRACKED_BIT@ set when locating @space@ and --- @baseSpace@ if both spaces were created relative to the same entity --- (e.g. two action spaces for the same action), even if the entity is --- currently untracked. The location in this case is the difference in the --- two spaces\' application-specified transforms relative to that common --- entity. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- and +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_TRACKED_BIT' +-- set when locating @space@ and @baseSpace@ if both spaces were created +-- relative to the same entity (e.g. two action spaces for the same +-- action), even if the entity is currently untracked. The location in this +-- case is the difference in the two spaces\' application-specified +-- transforms relative to that common entity. -- -- The runtime /should/ return a location with --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ set and --- @XR_SPACE_LOCATION_POSITION_TRACKED_BIT@ unset for spaces tracking two --- static entities in the world when their relative pose is known to the --- runtime. This enables applications to make use of the runtime’s latest --- knowledge of the world, even during tracking loss. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- set and +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_TRACKED_BIT' +-- unset for spaces tracking two static entities in the world when their +-- relative pose is known to the runtime. This enables applications to make +-- use of the runtime’s latest knowledge of the world, even during tracking +-- loss. -- -- If an 'SpaceVelocity' structure is chained to the @next@ pointer of -- 'SpaceLocation' and the velocity is observed or can be calculated by the -- runtime, the runtime /must/ fill in the linear velocity of the origin of -- space within the reference frame of @baseSpace@ and set the --- @XR_SPACE_VELOCITY_LINEAR_VALID_BIT@. Similarly, if an 'SpaceVelocity' --- structure is chained to the @next@ pointer of 'SpaceLocation' and the --- angular velocity is observed or can be calculated by the runtime, the --- runtime /must/ fill in the angular velocity of the origin of space --- within the reference frame of @baseSpace@ and set the --- @XR_SPACE_VELOCITY_ANGULAR_VALID_BIT@. +-- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SPACE_VELOCITY_LINEAR_VALID_BIT'. +-- Similarly, if an 'SpaceVelocity' structure is chained to the @next@ +-- pointer of 'SpaceLocation' and the angular velocity is observed or can +-- be calculated by the runtime, the runtime /must/ fill in the angular +-- velocity of the origin of space within the reference frame of +-- @baseSpace@ and set the +-- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SPACE_VELOCITY_ANGULAR_VALID_BIT'. -- -- The following example code shows how an application can get both the -- location and velocity of a space within a base space using the @@ -597,7 +604,7 @@ foreign import ccall -- = See Also -- -- 'OpenXR.Core10.Handles.Space', 'SpaceLocation', --- , +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SpaceLocationFlagBits', -- locateSpace :: forall a io . (Extendss SpaceLocation a, PokeChain a, PeekChain a, MonadIO io) @@ -1045,7 +1052,7 @@ instance Zero ActionSpaceCreateInfo where -- = See Also -- -- 'Posef', 'OpenXR.Core10.Handles.Space', --- 'OpenXR.Core10.Enums.SpaceLocationFlags.SpaceLocationFlags', +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SpaceLocationFlags', -- 'SpaceVelocity', 'OpenXR.Core10.Enums.StructureType.StructureType', -- 'locateSpace' data SpaceLocation (es :: [Type]) = SpaceLocation @@ -1060,15 +1067,14 @@ data SpaceLocation (es :: [Type]) = SpaceLocation -- 'SpaceVelocity' next :: Chain es , -- | @locationFlags@ is a bitfield, with bit masks defined in - -- , - -- to indicate which members contain valid data. If none of the bits are - -- set, no other fields in this structure /should/ be considered to be - -- valid or meaningful. + -- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SpaceLocationFlagBits', to + -- indicate which members contain valid data. If none of the bits are set, + -- no other fields in this structure /should/ be considered to be valid or + -- meaningful. -- -- #VUID-XrSpaceLocation-locationFlags-parameter# @locationFlags@ /must/ be -- @0@ or a valid combination of - -- - -- values + -- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SpaceLocationFlagBits' values locationFlags :: SpaceLocationFlags , -- | @pose@ is an 'Posef' defining the position and orientation of the origin -- of 'locateSpace'::@space@ within the reference frame of @@ -1092,21 +1098,21 @@ instance Extensible SpaceLocation where | otherwise = Nothing instance (Extendss SpaceLocation es, PokeChain es) => ToCStruct (SpaceLocation es) where - withCStruct x f = allocaBytesAligned 48 8 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 56 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p SpaceLocation{..} f = evalContT $ do lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_SPACE_LOCATION) next'' <- fmap castPtr . ContT $ withChain (next) lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) next'' lift $ poke ((p `plusPtr` 16 :: Ptr SpaceLocationFlags)) (locationFlags) - lift $ poke ((p `plusPtr` 20 :: Ptr Posef)) (pose) + lift $ poke ((p `plusPtr` 24 :: Ptr Posef)) (pose) lift $ f - cStructSize = 48 + cStructSize = 56 cStructAlignment = 8 pokeZeroCStruct p f = evalContT $ do lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_SPACE_LOCATION) pNext' <- fmap castPtr . ContT $ withZeroChain @es lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) pNext' - lift $ poke ((p `plusPtr` 20 :: Ptr Posef)) (zero) + lift $ poke ((p `plusPtr` 24 :: Ptr Posef)) (zero) lift $ f instance (Extendss SpaceLocation es, PeekChain es) => FromCStruct (SpaceLocation es) where @@ -1114,7 +1120,7 @@ instance (Extendss SpaceLocation es, PeekChain es) => FromCStruct (SpaceLocation next <- peek @(Ptr ()) ((p `plusPtr` 8 :: Ptr (Ptr ()))) next' <- peekChain (castPtr next) locationFlags <- peek @SpaceLocationFlags ((p `plusPtr` 16 :: Ptr SpaceLocationFlags)) - pose <- peekCStruct @Posef ((p `plusPtr` 20 :: Ptr Posef)) + pose <- peekCStruct @Posef ((p `plusPtr` 24 :: Ptr Posef)) pure $ SpaceLocation next' locationFlags pose @@ -1132,20 +1138,19 @@ instance es ~ '[] => Zero (SpaceLocation es) where -- = See Also -- -- 'OpenXR.Core10.Handles.Space', 'SpaceLocation', --- 'OpenXR.Core10.Enums.SpaceVelocityFlags.SpaceVelocityFlags', +-- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SpaceVelocityFlags', -- 'OpenXR.Core10.Enums.StructureType.StructureType', 'Vector3f', -- 'locateSpace' data SpaceVelocity = SpaceVelocity { -- | @velocityFlags@ is a bitfield, with bit masks defined in - -- , - -- to indicate which members contain valid data. If none of the bits are - -- set, no other fields in this structure /should/ be considered to be - -- valid or meaningful. + -- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SpaceVelocityFlagBits', to + -- indicate which members contain valid data. If none of the bits are set, + -- no other fields in this structure /should/ be considered to be valid or + -- meaningful. -- -- #VUID-XrSpaceVelocity-velocityFlags-parameter# @velocityFlags@ /must/ be -- @0@ or a valid combination of - -- - -- values + -- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SpaceVelocityFlagBits' values velocityFlags :: SpaceVelocityFlags , -- | @linearVelocity@ is the relative linear velocity of the origin of -- 'locateSpace'::@space@ with respect to and expressed in the reference @@ -1172,23 +1177,23 @@ instance ToCStruct SpaceVelocity where poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_SPACE_VELOCITY) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr SpaceVelocityFlags)) (velocityFlags) - poke ((p `plusPtr` 20 :: Ptr Vector3f)) (linearVelocity) - poke ((p `plusPtr` 32 :: Ptr Vector3f)) (angularVelocity) + poke ((p `plusPtr` 24 :: Ptr Vector3f)) (linearVelocity) + poke ((p `plusPtr` 36 :: Ptr Vector3f)) (angularVelocity) f cStructSize = 48 cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_SPACE_VELOCITY) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) - poke ((p `plusPtr` 20 :: Ptr Vector3f)) (zero) - poke ((p `plusPtr` 32 :: Ptr Vector3f)) (zero) + poke ((p `plusPtr` 24 :: Ptr Vector3f)) (zero) + poke ((p `plusPtr` 36 :: Ptr Vector3f)) (zero) f instance FromCStruct SpaceVelocity where peekCStruct p = do velocityFlags <- peek @SpaceVelocityFlags ((p `plusPtr` 16 :: Ptr SpaceVelocityFlags)) - linearVelocity <- peekCStruct @Vector3f ((p `plusPtr` 20 :: Ptr Vector3f)) - angularVelocity <- peekCStruct @Vector3f ((p `plusPtr` 32 :: Ptr Vector3f)) + linearVelocity <- peekCStruct @Vector3f ((p `plusPtr` 24 :: Ptr Vector3f)) + angularVelocity <- peekCStruct @Vector3f ((p `plusPtr` 36 :: Ptr Vector3f)) pure $ SpaceVelocity velocityFlags linearVelocity angularVelocity diff --git a/openxr/src/OpenXR/Extensions/XR_EXTX_overlay.hs b/openxr/src/OpenXR/Extensions/XR_EXTX_overlay.hs index dce62a5d8..fa9219f89 100644 --- a/openxr/src/OpenXR/Extensions/XR_EXTX_overlay.hs +++ b/openxr/src/OpenXR/Extensions/XR_EXTX_overlay.hs @@ -35,8 +35,14 @@ -- the generator scripts, not directly. module OpenXR.Extensions.XR_EXTX_overlay ( SessionCreateInfoOverlayEXTX(..) , EventDataMainSessionVisibilityChangedEXTX(..) - , OverlayMainSessionFlagsEXTX(..) - , OverlaySessionCreateFlagsEXTX(..) + , OverlayMainSessionFlagsEXTX + , OverlayMainSessionFlagBitsEXTX( OVERLAY_MAIN_SESSION_ENABLED_COMPOSITION_LAYER_INFO_DEPTH_BIT_EXTX + , .. + ) + , OverlaySessionCreateFlagsEXTX + , OverlaySessionCreateFlagBitsEXTX( OVERLAY_SESSION_CREATE_RELAXED_DISPLAY_TIME_BIT_EXTX + , .. + ) , EXTX_overlay_SPEC_VERSION , pattern EXTX_overlay_SPEC_VERSION , EXTX_OVERLAY_EXTENSION_NAME @@ -97,8 +103,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_SESSION_CREATE_INFO -- -- - #VUID-XrSessionCreateInfoOverlayEXTX-createFlags-parameter# -- @createFlags@ /must/ be a valid combination of --- --- values +-- 'OverlaySessionCreateFlagBitsEXTX' values -- -- - #VUID-XrSessionCreateInfoOverlayEXTX-createFlags-requiredbitmask# -- @createFlags@ /must/ not be @0@ @@ -108,8 +113,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_SESSION_CREATE_INFO -- 'OverlaySessionCreateFlagsEXTX', -- 'OpenXR.Core10.Enums.StructureType.StructureType' data SessionCreateInfoOverlayEXTX = SessionCreateInfoOverlayEXTX - { -- | @createFlags@ is @0@ or one or more - -- + { -- | @createFlags@ is @0@ or one or more 'OverlaySessionCreateFlagBitsEXTX' -- which indicate various characteristics desired for the overlay session. createFlags :: OverlaySessionCreateFlagsEXTX , -- | @sessionLayersPlacement@ is a value indicating the desired placement of @@ -123,31 +127,31 @@ deriving instance Generic (SessionCreateInfoOverlayEXTX) deriving instance Show SessionCreateInfoOverlayEXTX instance ToCStruct SessionCreateInfoOverlayEXTX where - withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 32 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p SessionCreateInfoOverlayEXTX{..} f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr OverlaySessionCreateFlagsEXTX)) (createFlags) - poke ((p `plusPtr` 20 :: Ptr Word32)) (sessionLayersPlacement) + poke ((p `plusPtr` 24 :: Ptr Word32)) (sessionLayersPlacement) f - cStructSize = 24 + cStructSize = 32 cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr OverlaySessionCreateFlagsEXTX)) (zero) - poke ((p `plusPtr` 20 :: Ptr Word32)) (zero) + poke ((p `plusPtr` 24 :: Ptr Word32)) (zero) f instance FromCStruct SessionCreateInfoOverlayEXTX where peekCStruct p = do createFlags <- peek @OverlaySessionCreateFlagsEXTX ((p `plusPtr` 16 :: Ptr OverlaySessionCreateFlagsEXTX)) - sessionLayersPlacement <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32)) + sessionLayersPlacement <- peek @Word32 ((p `plusPtr` 24 :: Ptr Word32)) pure $ SessionCreateInfoOverlayEXTX createFlags sessionLayersPlacement instance Storable SessionCreateInfoOverlayEXTX where - sizeOf ~_ = 24 + sizeOf ~_ = 32 alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) @@ -171,8 +175,7 @@ instance Zero SessionCreateInfoOverlayEXTX where -- standard behavior. This structure contains additional information on the -- main session including @flags@ which indicate additional state -- information of the main session. Currently, the only flag value supplied --- is --- @XR_OVERLAY_MAIN_SESSION_ENABLED_COMPOSITION_LAYER_INFO_DEPTH_BIT_EXTX@ +-- is 'OVERLAY_MAIN_SESSION_ENABLED_COMPOSITION_LAYER_INFO_DEPTH_BIT_EXTX' -- which indicates if the main session has enabled the -- -- extension. @@ -190,9 +193,8 @@ instance Zero SessionCreateInfoOverlayEXTX where -- -- which indicates if @session@ is now visible or is not. -- --- - @flags@ is 0 or one or more --- --- which indicates various state information for the main session. +-- - @flags@ is 0 or one or more 'OverlayMainSessionFlagBitsEXTX' which +-- indicates various state information for the main session. -- -- == Valid Usage (Implicit) -- @@ -210,8 +212,7 @@ instance Zero SessionCreateInfoOverlayEXTX where -- -- - #VUID-XrEventDataMainSessionVisibilityChangedEXTX-flags-parameter# -- @flags@ /must/ be a valid combination of --- --- values +-- 'OverlayMainSessionFlagBitsEXTX' values -- -- - #VUID-XrEventDataMainSessionVisibilityChangedEXTX-flags-requiredbitmask# -- @flags@ /must/ not be @0@ @@ -237,31 +238,31 @@ instance IsEventData EventDataMainSessionVisibilityChangedEXTX where toEventDataBaseHeader EventDataMainSessionVisibilityChangedEXTX{} = EventDataBaseHeader{type' = TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX} instance ToCStruct EventDataMainSessionVisibilityChangedEXTX where - withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 32 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p EventDataMainSessionVisibilityChangedEXTX{..} f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (visible)) - poke ((p `plusPtr` 20 :: Ptr OverlayMainSessionFlagsEXTX)) (flags) + poke ((p `plusPtr` 24 :: Ptr OverlayMainSessionFlagsEXTX)) (flags) f - cStructSize = 24 + cStructSize = 32 cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_EVENT_DATA_MAIN_SESSION_VISIBILITY_CHANGED_EXTX) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (zero)) - poke ((p `plusPtr` 20 :: Ptr OverlayMainSessionFlagsEXTX)) (zero) + poke ((p `plusPtr` 24 :: Ptr OverlayMainSessionFlagsEXTX)) (zero) f instance FromCStruct EventDataMainSessionVisibilityChangedEXTX where peekCStruct p = do visible <- peek @Bool32 ((p `plusPtr` 16 :: Ptr Bool32)) - flags <- peek @OverlayMainSessionFlagsEXTX ((p `plusPtr` 20 :: Ptr OverlayMainSessionFlagsEXTX)) + flags <- peek @OverlayMainSessionFlagsEXTX ((p `plusPtr` 24 :: Ptr OverlayMainSessionFlagsEXTX)) pure $ EventDataMainSessionVisibilityChangedEXTX (bool32ToBool visible) flags instance Storable EventDataMainSessionVisibilityChangedEXTX where - sizeOf ~_ = 24 + sizeOf ~_ = 32 alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) @@ -272,70 +273,77 @@ instance Zero EventDataMainSessionVisibilityChangedEXTX where zero --- | XrOverlayMainSessionFlagsEXTX - XrOverlayMainSessionFlagsEXTX +type OverlayMainSessionFlagsEXTX = OverlayMainSessionFlagBitsEXTX + +-- | XrOverlayMainSessionFlagBitsEXTX - XrOverlayMainSessionFlagBitsEXTX -- -- = See Also -- --- 'EventDataMainSessionVisibilityChangedEXTX' -newtype OverlayMainSessionFlagsEXTX = OverlayMainSessionFlagsEXTX Flags64 +-- No cross-references are available +newtype OverlayMainSessionFlagBitsEXTX = OverlayMainSessionFlagBitsEXTX Flags64 deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) +-- No documentation found for Nested "XrOverlayMainSessionFlagBitsEXTX" "XR_OVERLAY_MAIN_SESSION_ENABLED_COMPOSITION_LAYER_INFO_DEPTH_BIT_EXTX" +pattern OVERLAY_MAIN_SESSION_ENABLED_COMPOSITION_LAYER_INFO_DEPTH_BIT_EXTX = + OverlayMainSessionFlagBitsEXTX 0x0000000000000001 +conNameOverlayMainSessionFlagBitsEXTX :: String +conNameOverlayMainSessionFlagBitsEXTX = "OverlayMainSessionFlagBitsEXTX" -conNameOverlayMainSessionFlagsEXTX :: String -conNameOverlayMainSessionFlagsEXTX = "OverlayMainSessionFlagsEXTX" - -enumPrefixOverlayMainSessionFlagsEXTX :: String -enumPrefixOverlayMainSessionFlagsEXTX = "" +enumPrefixOverlayMainSessionFlagBitsEXTX :: String +enumPrefixOverlayMainSessionFlagBitsEXTX = "OVERLAY_MAIN_SESSION_ENABLED_COMPOSITION_LAYER_INFO_DEPTH_BIT_EXTX" -showTableOverlayMainSessionFlagsEXTX :: [(OverlayMainSessionFlagsEXTX, String)] -showTableOverlayMainSessionFlagsEXTX = [] +showTableOverlayMainSessionFlagBitsEXTX :: [(OverlayMainSessionFlagBitsEXTX, String)] +showTableOverlayMainSessionFlagBitsEXTX = [(OVERLAY_MAIN_SESSION_ENABLED_COMPOSITION_LAYER_INFO_DEPTH_BIT_EXTX, "")] -instance Show OverlayMainSessionFlagsEXTX where - showsPrec = enumShowsPrec enumPrefixOverlayMainSessionFlagsEXTX - showTableOverlayMainSessionFlagsEXTX - conNameOverlayMainSessionFlagsEXTX - (\(OverlayMainSessionFlagsEXTX x) -> x) +instance Show OverlayMainSessionFlagBitsEXTX where + showsPrec = enumShowsPrec enumPrefixOverlayMainSessionFlagBitsEXTX + showTableOverlayMainSessionFlagBitsEXTX + conNameOverlayMainSessionFlagBitsEXTX + (\(OverlayMainSessionFlagBitsEXTX x) -> x) (\x -> showString "0x" . showHex x) -instance Read OverlayMainSessionFlagsEXTX where - readPrec = enumReadPrec enumPrefixOverlayMainSessionFlagsEXTX - showTableOverlayMainSessionFlagsEXTX - conNameOverlayMainSessionFlagsEXTX - OverlayMainSessionFlagsEXTX +instance Read OverlayMainSessionFlagBitsEXTX where + readPrec = enumReadPrec enumPrefixOverlayMainSessionFlagBitsEXTX + showTableOverlayMainSessionFlagBitsEXTX + conNameOverlayMainSessionFlagBitsEXTX + OverlayMainSessionFlagBitsEXTX + +type OverlaySessionCreateFlagsEXTX = OverlaySessionCreateFlagBitsEXTX --- | XrOverlaySessionCreateFlagsEXTX - XrOverlaySessionCreateFlagsEXTX +-- | XrOverlaySessionCreateFlagBitsEXTX - XrOverlaySessionCreateFlagBitsEXTX -- -- = See Also -- --- 'SessionCreateInfoOverlayEXTX' -newtype OverlaySessionCreateFlagsEXTX = OverlaySessionCreateFlagsEXTX Flags64 +-- No cross-references are available +newtype OverlaySessionCreateFlagBitsEXTX = OverlaySessionCreateFlagBitsEXTX Flags64 deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) +-- No documentation found for Nested "XrOverlaySessionCreateFlagBitsEXTX" "XR_OVERLAY_SESSION_CREATE_RELAXED_DISPLAY_TIME_BIT_EXTX" +pattern OVERLAY_SESSION_CREATE_RELAXED_DISPLAY_TIME_BIT_EXTX = OverlaySessionCreateFlagBitsEXTX 0x0000000000000001 +conNameOverlaySessionCreateFlagBitsEXTX :: String +conNameOverlaySessionCreateFlagBitsEXTX = "OverlaySessionCreateFlagBitsEXTX" -conNameOverlaySessionCreateFlagsEXTX :: String -conNameOverlaySessionCreateFlagsEXTX = "OverlaySessionCreateFlagsEXTX" - -enumPrefixOverlaySessionCreateFlagsEXTX :: String -enumPrefixOverlaySessionCreateFlagsEXTX = "" +enumPrefixOverlaySessionCreateFlagBitsEXTX :: String +enumPrefixOverlaySessionCreateFlagBitsEXTX = "OVERLAY_SESSION_CREATE_RELAXED_DISPLAY_TIME_BIT_EXTX" -showTableOverlaySessionCreateFlagsEXTX :: [(OverlaySessionCreateFlagsEXTX, String)] -showTableOverlaySessionCreateFlagsEXTX = [] +showTableOverlaySessionCreateFlagBitsEXTX :: [(OverlaySessionCreateFlagBitsEXTX, String)] +showTableOverlaySessionCreateFlagBitsEXTX = [(OVERLAY_SESSION_CREATE_RELAXED_DISPLAY_TIME_BIT_EXTX, "")] -instance Show OverlaySessionCreateFlagsEXTX where - showsPrec = enumShowsPrec enumPrefixOverlaySessionCreateFlagsEXTX - showTableOverlaySessionCreateFlagsEXTX - conNameOverlaySessionCreateFlagsEXTX - (\(OverlaySessionCreateFlagsEXTX x) -> x) +instance Show OverlaySessionCreateFlagBitsEXTX where + showsPrec = enumShowsPrec enumPrefixOverlaySessionCreateFlagBitsEXTX + showTableOverlaySessionCreateFlagBitsEXTX + conNameOverlaySessionCreateFlagBitsEXTX + (\(OverlaySessionCreateFlagBitsEXTX x) -> x) (\x -> showString "0x" . showHex x) -instance Read OverlaySessionCreateFlagsEXTX where - readPrec = enumReadPrec enumPrefixOverlaySessionCreateFlagsEXTX - showTableOverlaySessionCreateFlagsEXTX - conNameOverlaySessionCreateFlagsEXTX - OverlaySessionCreateFlagsEXTX +instance Read OverlaySessionCreateFlagBitsEXTX where + readPrec = enumReadPrec enumPrefixOverlaySessionCreateFlagBitsEXTX + showTableOverlaySessionCreateFlagBitsEXTX + conNameOverlaySessionCreateFlagBitsEXTX + OverlaySessionCreateFlagBitsEXTX type EXTX_overlay_SPEC_VERSION = 4 diff --git a/openxr/src/OpenXR/Extensions/XR_EXT_debug_utils.hs b/openxr/src/OpenXR/Extensions/XR_EXT_debug_utils.hs index 798917746..7f145614d 100644 --- a/openxr/src/OpenXR/Extensions/XR_EXT_debug_utils.hs +++ b/openxr/src/OpenXR/Extensions/XR_EXT_debug_utils.hs @@ -50,8 +50,20 @@ module OpenXR.Extensions.XR_EXT_debug_utils ( setDebugUtilsObjectNameEXT , DebugUtilsLabelEXT(..) , DebugUtilsMessengerCallbackDataEXT(..) , DebugUtilsMessengerCreateInfoEXT(..) - , DebugUtilsMessageSeverityFlagsEXT(..) - , DebugUtilsMessageTypeFlagsEXT(..) + , DebugUtilsMessageSeverityFlagsEXT + , DebugUtilsMessageSeverityFlagBitsEXT( DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT + , DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT + , DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT + , DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT + , .. + ) + , DebugUtilsMessageTypeFlagsEXT + , DebugUtilsMessageTypeFlagBitsEXT( DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT + , DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT + , DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT + , DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT + , .. + ) , PFN_xrDebugUtilsMessengerCallbackEXT , FN_xrDebugUtilsMessengerCallbackEXT , EXT_debug_utils_SPEC_VERSION @@ -421,16 +433,14 @@ foreign import ccall -- -- - #VUID-xrSubmitDebugUtilsMessageEXT-messageSeverity-parameter# -- @messageSeverity@ /must/ be a valid combination of --- --- values +-- 'DebugUtilsMessageSeverityFlagBitsEXT' values -- -- - #VUID-xrSubmitDebugUtilsMessageEXT-messageSeverity-requiredbitmask# -- @messageSeverity@ /must/ not be @0@ -- -- - #VUID-xrSubmitDebugUtilsMessageEXT-messageTypes-parameter# -- @messageTypes@ /must/ be a valid combination of --- --- values +-- 'DebugUtilsMessageTypeFlagBitsEXT' values -- -- - #VUID-xrSubmitDebugUtilsMessageEXT-messageTypes-requiredbitmask# -- @messageTypes@ /must/ not be @0@ @@ -477,8 +487,8 @@ submitDebugUtilsMessageEXT :: forall io -- 'DebugUtilsMessageSeverityFlagsEXT' severity of this event\/message. DebugUtilsMessageSeverityFlagsEXT -> -- | @messageTypes@ is an 'DebugUtilsMessageTypeFlagsEXT' bitmask of - -- - -- specifying which types of event to identify this message with. + -- 'DebugUtilsMessageTypeFlagBitsEXT' specifying which types of event to + -- identify this message with. ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> -- | @callbackData@ contains all the callback related data in the -- 'DebugUtilsMessengerCallbackDataEXT' structure. @@ -1030,16 +1040,14 @@ instance Zero DebugUtilsMessengerCallbackDataEXT where -- -- - #VUID-XrDebugUtilsMessengerCreateInfoEXT-messageSeverities-parameter# -- @messageSeverities@ /must/ be a valid combination of --- --- values +-- 'DebugUtilsMessageSeverityFlagBitsEXT' values -- -- - #VUID-XrDebugUtilsMessengerCreateInfoEXT-messageSeverities-requiredbitmask# -- @messageSeverities@ /must/ not be @0@ -- -- - #VUID-XrDebugUtilsMessengerCreateInfoEXT-messageTypes-parameter# -- @messageTypes@ /must/ be a valid combination of --- --- values +-- 'DebugUtilsMessageTypeFlagBitsEXT' values -- -- - #VUID-XrDebugUtilsMessengerCreateInfoEXT-messageTypes-requiredbitmask# -- @messageTypes@ /must/ not be @0@ @@ -1056,17 +1064,17 @@ instance Zero DebugUtilsMessengerCallbackDataEXT where -- event occurs is as follows: -- -- - The runtime will perform a bitwise AND of the event’s --- --- with the 'DebugUtilsMessengerCreateInfoEXT'::@messageSeverities@ --- provided during creation of the +-- 'DebugUtilsMessageSeverityFlagBitsEXT' with the +-- 'DebugUtilsMessengerCreateInfoEXT'::@messageSeverities@ provided +-- during creation of the -- 'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT' object. -- -- - If this results in @0@, the message is skipped. -- -- - The runtime will perform bitwise AND of the event’s --- --- with the 'DebugUtilsMessengerCreateInfoEXT'::@messageTypes@ provided --- during the creation of the +-- 'DebugUtilsMessageTypeFlagBitsEXT' with the +-- 'DebugUtilsMessengerCreateInfoEXT'::@messageTypes@ provided during +-- the creation of the -- 'OpenXR.Extensions.Handles.DebugUtilsMessengerEXT' object. -- -- - If this results in @0@, the message is skipped. @@ -1086,12 +1094,10 @@ instance Zero DebugUtilsMessengerCallbackDataEXT where -- 'createDebugUtilsMessengerEXT' data DebugUtilsMessengerCreateInfoEXT = DebugUtilsMessengerCreateInfoEXT { -- | @messageSeverities@ is a bitmask of - -- - -- specifying which severity of event(s) that will cause this callback to - -- be called. + -- 'DebugUtilsMessageSeverityFlagBitsEXT' specifying which severity of + -- event(s) that will cause this callback to be called. messageSeverities :: DebugUtilsMessageSeverityFlagsEXT - , -- | @messageTypes@ is a combination of - -- + , -- | @messageTypes@ is a combination of 'DebugUtilsMessageTypeFlagBitsEXT' -- specifying which type of event(s) will cause this callback to be called. messageTypes :: DebugUtilsMessageTypeFlagsEXT , -- | @userCallback@ is the application defined callback function to call. @@ -1106,36 +1112,36 @@ deriving instance Generic (DebugUtilsMessengerCreateInfoEXT) deriving instance Show DebugUtilsMessengerCreateInfoEXT instance ToCStruct DebugUtilsMessengerCreateInfoEXT where - withCStruct x f = allocaBytesAligned 40 8 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 48 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p DebugUtilsMessengerCreateInfoEXT{..} f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr DebugUtilsMessageSeverityFlagsEXT)) (messageSeverities) - poke ((p `plusPtr` 20 :: Ptr DebugUtilsMessageTypeFlagsEXT)) (messageTypes) - poke ((p `plusPtr` 24 :: Ptr PFN_xrDebugUtilsMessengerCallbackEXT)) (userCallback) - poke ((p `plusPtr` 32 :: Ptr (Ptr ()))) (userData) + poke ((p `plusPtr` 24 :: Ptr DebugUtilsMessageTypeFlagsEXT)) (messageTypes) + poke ((p `plusPtr` 32 :: Ptr PFN_xrDebugUtilsMessengerCallbackEXT)) (userCallback) + poke ((p `plusPtr` 40 :: Ptr (Ptr ()))) (userData) f - cStructSize = 40 + cStructSize = 48 cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr StructureType)) (TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT) poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr) poke ((p `plusPtr` 16 :: Ptr DebugUtilsMessageSeverityFlagsEXT)) (zero) - poke ((p `plusPtr` 20 :: Ptr DebugUtilsMessageTypeFlagsEXT)) (zero) - poke ((p `plusPtr` 24 :: Ptr PFN_xrDebugUtilsMessengerCallbackEXT)) (zero) + poke ((p `plusPtr` 24 :: Ptr DebugUtilsMessageTypeFlagsEXT)) (zero) + poke ((p `plusPtr` 32 :: Ptr PFN_xrDebugUtilsMessengerCallbackEXT)) (zero) f instance FromCStruct DebugUtilsMessengerCreateInfoEXT where peekCStruct p = do messageSeverities <- peek @DebugUtilsMessageSeverityFlagsEXT ((p `plusPtr` 16 :: Ptr DebugUtilsMessageSeverityFlagsEXT)) - messageTypes <- peek @DebugUtilsMessageTypeFlagsEXT ((p `plusPtr` 20 :: Ptr DebugUtilsMessageTypeFlagsEXT)) - userCallback <- peek @PFN_xrDebugUtilsMessengerCallbackEXT ((p `plusPtr` 24 :: Ptr PFN_xrDebugUtilsMessengerCallbackEXT)) - userData <- peek @(Ptr ()) ((p `plusPtr` 32 :: Ptr (Ptr ()))) + messageTypes <- peek @DebugUtilsMessageTypeFlagsEXT ((p `plusPtr` 24 :: Ptr DebugUtilsMessageTypeFlagsEXT)) + userCallback <- peek @PFN_xrDebugUtilsMessengerCallbackEXT ((p `plusPtr` 32 :: Ptr PFN_xrDebugUtilsMessengerCallbackEXT)) + userData <- peek @(Ptr ()) ((p `plusPtr` 40 :: Ptr (Ptr ()))) pure $ DebugUtilsMessengerCreateInfoEXT messageSeverities messageTypes userCallback userData instance Storable DebugUtilsMessengerCreateInfoEXT where - sizeOf ~_ = 40 + sizeOf ~_ = 48 alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) @@ -1148,71 +1154,99 @@ instance Zero DebugUtilsMessengerCreateInfoEXT where zero --- | XrDebugUtilsMessageSeverityFlagsEXT - --- XrDebugUtilsMessageSeverityFlagsEXT +type DebugUtilsMessageSeverityFlagsEXT = DebugUtilsMessageSeverityFlagBitsEXT + +-- | XrDebugUtilsMessageSeverityFlagBitsEXT - +-- XrDebugUtilsMessageSeverityFlagBitsEXT -- -- = See Also -- --- 'DebugUtilsMessengerCreateInfoEXT', 'submitDebugUtilsMessageEXT' -newtype DebugUtilsMessageSeverityFlagsEXT = DebugUtilsMessageSeverityFlagsEXT Flags64 +-- No cross-references are available +newtype DebugUtilsMessageSeverityFlagBitsEXT = DebugUtilsMessageSeverityFlagBitsEXT Flags64 deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - -conNameDebugUtilsMessageSeverityFlagsEXT :: String -conNameDebugUtilsMessageSeverityFlagsEXT = "DebugUtilsMessageSeverityFlagsEXT" - -enumPrefixDebugUtilsMessageSeverityFlagsEXT :: String -enumPrefixDebugUtilsMessageSeverityFlagsEXT = "" - -showTableDebugUtilsMessageSeverityFlagsEXT :: [(DebugUtilsMessageSeverityFlagsEXT, String)] -showTableDebugUtilsMessageSeverityFlagsEXT = [] - -instance Show DebugUtilsMessageSeverityFlagsEXT where - showsPrec = enumShowsPrec enumPrefixDebugUtilsMessageSeverityFlagsEXT - showTableDebugUtilsMessageSeverityFlagsEXT - conNameDebugUtilsMessageSeverityFlagsEXT - (\(DebugUtilsMessageSeverityFlagsEXT x) -> x) +-- No documentation found for Nested "XrDebugUtilsMessageSeverityFlagBitsEXT" "XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT" +pattern DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = DebugUtilsMessageSeverityFlagBitsEXT 0x0000000000000001 +-- No documentation found for Nested "XrDebugUtilsMessageSeverityFlagBitsEXT" "XR_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT" +pattern DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = DebugUtilsMessageSeverityFlagBitsEXT 0x0000000000000010 +-- No documentation found for Nested "XrDebugUtilsMessageSeverityFlagBitsEXT" "XR_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT" +pattern DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = DebugUtilsMessageSeverityFlagBitsEXT 0x0000000000000100 +-- No documentation found for Nested "XrDebugUtilsMessageSeverityFlagBitsEXT" "XR_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT" +pattern DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = DebugUtilsMessageSeverityFlagBitsEXT 0x0000000000001000 + +conNameDebugUtilsMessageSeverityFlagBitsEXT :: String +conNameDebugUtilsMessageSeverityFlagBitsEXT = "DebugUtilsMessageSeverityFlagBitsEXT" + +enumPrefixDebugUtilsMessageSeverityFlagBitsEXT :: String +enumPrefixDebugUtilsMessageSeverityFlagBitsEXT = "DEBUG_UTILS_MESSAGE_SEVERITY_" + +showTableDebugUtilsMessageSeverityFlagBitsEXT :: [(DebugUtilsMessageSeverityFlagBitsEXT, String)] +showTableDebugUtilsMessageSeverityFlagBitsEXT = + [ (DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT, "VERBOSE_BIT_EXT") + , (DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT , "INFO_BIT_EXT") + , (DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT, "WARNING_BIT_EXT") + , (DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT , "ERROR_BIT_EXT") + ] + +instance Show DebugUtilsMessageSeverityFlagBitsEXT where + showsPrec = enumShowsPrec enumPrefixDebugUtilsMessageSeverityFlagBitsEXT + showTableDebugUtilsMessageSeverityFlagBitsEXT + conNameDebugUtilsMessageSeverityFlagBitsEXT + (\(DebugUtilsMessageSeverityFlagBitsEXT x) -> x) (\x -> showString "0x" . showHex x) -instance Read DebugUtilsMessageSeverityFlagsEXT where - readPrec = enumReadPrec enumPrefixDebugUtilsMessageSeverityFlagsEXT - showTableDebugUtilsMessageSeverityFlagsEXT - conNameDebugUtilsMessageSeverityFlagsEXT - DebugUtilsMessageSeverityFlagsEXT +instance Read DebugUtilsMessageSeverityFlagBitsEXT where + readPrec = enumReadPrec enumPrefixDebugUtilsMessageSeverityFlagBitsEXT + showTableDebugUtilsMessageSeverityFlagBitsEXT + conNameDebugUtilsMessageSeverityFlagBitsEXT + DebugUtilsMessageSeverityFlagBitsEXT + +type DebugUtilsMessageTypeFlagsEXT = DebugUtilsMessageTypeFlagBitsEXT --- | XrDebugUtilsMessageTypeFlagsEXT - XrDebugUtilsMessageTypeFlagsEXT +-- | XrDebugUtilsMessageTypeFlagBitsEXT - XrDebugUtilsMessageTypeFlagBitsEXT -- -- = See Also -- --- 'DebugUtilsMessengerCreateInfoEXT', 'submitDebugUtilsMessageEXT' -newtype DebugUtilsMessageTypeFlagsEXT = DebugUtilsMessageTypeFlagsEXT Flags64 +-- No cross-references are available +newtype DebugUtilsMessageTypeFlagBitsEXT = DebugUtilsMessageTypeFlagBitsEXT Flags64 deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - - -conNameDebugUtilsMessageTypeFlagsEXT :: String -conNameDebugUtilsMessageTypeFlagsEXT = "DebugUtilsMessageTypeFlagsEXT" - -enumPrefixDebugUtilsMessageTypeFlagsEXT :: String -enumPrefixDebugUtilsMessageTypeFlagsEXT = "" - -showTableDebugUtilsMessageTypeFlagsEXT :: [(DebugUtilsMessageTypeFlagsEXT, String)] -showTableDebugUtilsMessageTypeFlagsEXT = [] - -instance Show DebugUtilsMessageTypeFlagsEXT where - showsPrec = enumShowsPrec enumPrefixDebugUtilsMessageTypeFlagsEXT - showTableDebugUtilsMessageTypeFlagsEXT - conNameDebugUtilsMessageTypeFlagsEXT - (\(DebugUtilsMessageTypeFlagsEXT x) -> x) +-- No documentation found for Nested "XrDebugUtilsMessageTypeFlagBitsEXT" "XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT" +pattern DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = DebugUtilsMessageTypeFlagBitsEXT 0x0000000000000001 +-- No documentation found for Nested "XrDebugUtilsMessageTypeFlagBitsEXT" "XR_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT" +pattern DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = DebugUtilsMessageTypeFlagBitsEXT 0x0000000000000002 +-- No documentation found for Nested "XrDebugUtilsMessageTypeFlagBitsEXT" "XR_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT" +pattern DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = DebugUtilsMessageTypeFlagBitsEXT 0x0000000000000004 +-- No documentation found for Nested "XrDebugUtilsMessageTypeFlagBitsEXT" "XR_DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT" +pattern DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT = DebugUtilsMessageTypeFlagBitsEXT 0x0000000000000008 + +conNameDebugUtilsMessageTypeFlagBitsEXT :: String +conNameDebugUtilsMessageTypeFlagBitsEXT = "DebugUtilsMessageTypeFlagBitsEXT" + +enumPrefixDebugUtilsMessageTypeFlagBitsEXT :: String +enumPrefixDebugUtilsMessageTypeFlagBitsEXT = "DEBUG_UTILS_MESSAGE_TYPE_" + +showTableDebugUtilsMessageTypeFlagBitsEXT :: [(DebugUtilsMessageTypeFlagBitsEXT, String)] +showTableDebugUtilsMessageTypeFlagBitsEXT = + [ (DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT , "GENERAL_BIT_EXT") + , (DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT , "VALIDATION_BIT_EXT") + , (DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT, "PERFORMANCE_BIT_EXT") + , (DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT, "CONFORMANCE_BIT_EXT") + ] + +instance Show DebugUtilsMessageTypeFlagBitsEXT where + showsPrec = enumShowsPrec enumPrefixDebugUtilsMessageTypeFlagBitsEXT + showTableDebugUtilsMessageTypeFlagBitsEXT + conNameDebugUtilsMessageTypeFlagBitsEXT + (\(DebugUtilsMessageTypeFlagBitsEXT x) -> x) (\x -> showString "0x" . showHex x) -instance Read DebugUtilsMessageTypeFlagsEXT where - readPrec = enumReadPrec enumPrefixDebugUtilsMessageTypeFlagsEXT - showTableDebugUtilsMessageTypeFlagsEXT - conNameDebugUtilsMessageTypeFlagsEXT - DebugUtilsMessageTypeFlagsEXT +instance Read DebugUtilsMessageTypeFlagBitsEXT where + readPrec = enumReadPrec enumPrefixDebugUtilsMessageTypeFlagBitsEXT + showTableDebugUtilsMessageTypeFlagBitsEXT + conNameDebugUtilsMessageTypeFlagBitsEXT + DebugUtilsMessageTypeFlagBitsEXT type FN_xrDebugUtilsMessengerCallbackEXT = DebugUtilsMessageSeverityFlagsEXT -> ("messageTypes" ::: DebugUtilsMessageTypeFlagsEXT) -> Ptr DebugUtilsMessengerCallbackDataEXT -> ("userData" ::: Ptr ()) -> IO Bool32 diff --git a/openxr/src/OpenXR/Extensions/XR_EXT_debug_utils.hs-boot b/openxr/src/OpenXR/Extensions/XR_EXT_debug_utils.hs-boot index e3046a433..b76552062 100644 --- a/openxr/src/OpenXR/Extensions/XR_EXT_debug_utils.hs-boot +++ b/openxr/src/OpenXR/Extensions/XR_EXT_debug_utils.hs-boot @@ -43,7 +43,9 @@ module OpenXR.Extensions.XR_EXT_debug_utils ( DebugUtilsLabelEXT , DebugUtilsMessengerCreateInfoEXT , DebugUtilsObjectNameInfoEXT , DebugUtilsMessageSeverityFlagsEXT + , DebugUtilsMessageSeverityFlagBitsEXT , DebugUtilsMessageTypeFlagsEXT + , DebugUtilsMessageTypeFlagBitsEXT ) where import OpenXR.CStruct (FromCStruct) @@ -82,8 +84,12 @@ instance Show DebugUtilsObjectNameInfoEXT instance FromCStruct DebugUtilsObjectNameInfoEXT -data DebugUtilsMessageSeverityFlagsEXT +type DebugUtilsMessageSeverityFlagsEXT = DebugUtilsMessageSeverityFlagBitsEXT +data DebugUtilsMessageSeverityFlagBitsEXT -data DebugUtilsMessageTypeFlagsEXT + +type DebugUtilsMessageTypeFlagsEXT = DebugUtilsMessageTypeFlagBitsEXT + +data DebugUtilsMessageTypeFlagBitsEXT diff --git a/openxr/src/OpenXR/Extensions/XR_EXT_hand_tracking.hs b/openxr/src/OpenXR/Extensions/XR_EXT_hand_tracking.hs index 2d1350f89..7807ac226 100644 --- a/openxr/src/OpenXR/Extensions/XR_EXT_hand_tracking.hs +++ b/openxr/src/OpenXR/Extensions/XR_EXT_hand_tracking.hs @@ -168,8 +168,8 @@ import OpenXR.Core10.Handles (Session) import OpenXR.Core10.Handles (Session(..)) import OpenXR.Core10.Handles (Session_T) import OpenXR.CStruct.Extends (SomeStruct) -import OpenXR.Core10.Enums.SpaceLocationFlags (SpaceLocationFlags) -import OpenXR.Core10.Enums.SpaceVelocityFlags (SpaceVelocityFlags) +import OpenXR.Core10.Enums.SpaceLocationFlagBits (SpaceLocationFlags) +import OpenXR.Core10.Enums.SpaceVelocityFlagBits (SpaceVelocityFlags) import OpenXR.Core10.Handles (Space_T) import OpenXR.Core10.Enums.StructureType (StructureType) import OpenXR.Core10.FundamentalTypes (Time) @@ -643,12 +643,12 @@ instance Zero HandJointsLocateInfoEXT where -- = Description -- -- If the returned @locationFlags@ has --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ set, the returned radius /must/ --- be a positive value. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- set, the returned radius /must/ be a positive value. -- -- If the returned @locationFlags@ has --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ unset, the returned radius value --- is undefined and should be avoided. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- unset, the returned radius value is undefined and should be avoided. -- -- == Valid Usage (Implicit) -- @@ -657,7 +657,7 @@ instance Zero HandJointsLocateInfoEXT where -- -- - #VUID-XrHandJointLocationEXT-locationFlags-parameter# -- @locationFlags@ /must/ be a valid combination of --- +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SpaceLocationFlagBits' -- values -- -- - #VUID-XrHandJointLocationEXT-locationFlags-requiredbitmask# @@ -666,13 +666,13 @@ instance Zero HandJointsLocateInfoEXT where -- = See Also -- -- 'HandJointLocationsEXT', 'OpenXR.Core10.Space.Posef', --- 'OpenXR.Core10.Enums.SpaceLocationFlags.SpaceLocationFlags' +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SpaceLocationFlags' data HandJointLocationEXT = HandJointLocationEXT { -- | @locationFlags@ is a bitfield, with bit masks defined in - -- , - -- to indicate which members contain valid data. If none of the bits are - -- set, no other fields in this structure /should/ be considered to be - -- valid or meaningful. + -- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SpaceLocationFlagBits', to + -- indicate which members contain valid data. If none of the bits are set, + -- no other fields in this structure /should/ be considered to be valid or + -- meaningful. locationFlags :: SpaceLocationFlags , -- | @pose@ is an 'OpenXR.Core10.Space.Posef' defining the position and -- orientation of the origin of a hand joint within the reference frame of @@ -689,31 +689,31 @@ deriving instance Generic (HandJointLocationEXT) deriving instance Show HandJointLocationEXT instance ToCStruct HandJointLocationEXT where - withCStruct x f = allocaBytesAligned 36 4 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 40 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p HandJointLocationEXT{..} f = do poke ((p `plusPtr` 0 :: Ptr SpaceLocationFlags)) (locationFlags) - poke ((p `plusPtr` 4 :: Ptr Posef)) (pose) - poke ((p `plusPtr` 32 :: Ptr CFloat)) (CFloat (radius)) + poke ((p `plusPtr` 8 :: Ptr Posef)) (pose) + poke ((p `plusPtr` 36 :: Ptr CFloat)) (CFloat (radius)) f - cStructSize = 36 - cStructAlignment = 4 + cStructSize = 40 + cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr SpaceLocationFlags)) (zero) - poke ((p `plusPtr` 4 :: Ptr Posef)) (zero) - poke ((p `plusPtr` 32 :: Ptr CFloat)) (CFloat (zero)) + poke ((p `plusPtr` 8 :: Ptr Posef)) (zero) + poke ((p `plusPtr` 36 :: Ptr CFloat)) (CFloat (zero)) f instance FromCStruct HandJointLocationEXT where peekCStruct p = do locationFlags <- peek @SpaceLocationFlags ((p `plusPtr` 0 :: Ptr SpaceLocationFlags)) - pose <- peekCStruct @Posef ((p `plusPtr` 4 :: Ptr Posef)) - radius <- peek @CFloat ((p `plusPtr` 32 :: Ptr CFloat)) + pose <- peekCStruct @Posef ((p `plusPtr` 8 :: Ptr Posef)) + radius <- peek @CFloat ((p `plusPtr` 36 :: Ptr CFloat)) pure $ HandJointLocationEXT locationFlags pose (coerce @CFloat @Float radius) instance Storable HandJointLocationEXT where - sizeOf ~_ = 36 - alignment ~_ = 4 + sizeOf ~_ = 40 + alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) @@ -733,7 +733,7 @@ instance Zero HandJointLocationEXT where -- -- - #VUID-XrHandJointVelocityEXT-velocityFlags-parameter# -- @velocityFlags@ /must/ be a valid combination of --- +-- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SpaceVelocityFlagBits' -- values -- -- - #VUID-XrHandJointVelocityEXT-velocityFlags-requiredbitmask# @@ -742,14 +742,14 @@ instance Zero HandJointLocationEXT where -- = See Also -- -- 'HandJointVelocitiesEXT', --- 'OpenXR.Core10.Enums.SpaceVelocityFlags.SpaceVelocityFlags', +-- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SpaceVelocityFlags', -- 'OpenXR.Core10.Space.Vector3f' data HandJointVelocityEXT = HandJointVelocityEXT { -- | @velocityFlags@ is a bitfield, with bit masks defined in - -- , - -- to indicate which members contain valid data. If none of the bits are - -- set, no other fields in this structure /should/ be considered to be - -- valid or meaningful. + -- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SpaceVelocityFlagBits', to + -- indicate which members contain valid data. If none of the bits are set, + -- no other fields in this structure /should/ be considered to be valid or + -- meaningful. velocityFlags :: SpaceVelocityFlags , -- | @linearVelocity@ is the relative linear velocity of the hand joint with -- respect to and expressed in the reference frame of the corresponding @@ -772,31 +772,31 @@ deriving instance Generic (HandJointVelocityEXT) deriving instance Show HandJointVelocityEXT instance ToCStruct HandJointVelocityEXT where - withCStruct x f = allocaBytesAligned 28 4 $ \p -> pokeCStruct p x (f p) + withCStruct x f = allocaBytesAligned 32 8 $ \p -> pokeCStruct p x (f p) pokeCStruct p HandJointVelocityEXT{..} f = do poke ((p `plusPtr` 0 :: Ptr SpaceVelocityFlags)) (velocityFlags) - poke ((p `plusPtr` 4 :: Ptr Vector3f)) (linearVelocity) - poke ((p `plusPtr` 16 :: Ptr Vector3f)) (angularVelocity) + poke ((p `plusPtr` 8 :: Ptr Vector3f)) (linearVelocity) + poke ((p `plusPtr` 20 :: Ptr Vector3f)) (angularVelocity) f - cStructSize = 28 - cStructAlignment = 4 + cStructSize = 32 + cStructAlignment = 8 pokeZeroCStruct p f = do poke ((p `plusPtr` 0 :: Ptr SpaceVelocityFlags)) (zero) - poke ((p `plusPtr` 4 :: Ptr Vector3f)) (zero) - poke ((p `plusPtr` 16 :: Ptr Vector3f)) (zero) + poke ((p `plusPtr` 8 :: Ptr Vector3f)) (zero) + poke ((p `plusPtr` 20 :: Ptr Vector3f)) (zero) f instance FromCStruct HandJointVelocityEXT where peekCStruct p = do velocityFlags <- peek @SpaceVelocityFlags ((p `plusPtr` 0 :: Ptr SpaceVelocityFlags)) - linearVelocity <- peekCStruct @Vector3f ((p `plusPtr` 4 :: Ptr Vector3f)) - angularVelocity <- peekCStruct @Vector3f ((p `plusPtr` 16 :: Ptr Vector3f)) + linearVelocity <- peekCStruct @Vector3f ((p `plusPtr` 8 :: Ptr Vector3f)) + angularVelocity <- peekCStruct @Vector3f ((p `plusPtr` 20 :: Ptr Vector3f)) pure $ HandJointVelocityEXT velocityFlags linearVelocity angularVelocity instance Storable HandJointVelocityEXT where - sizeOf ~_ = 28 - alignment ~_ = 4 + sizeOf ~_ = 32 + alignment ~_ = 8 peek = peekCStruct poke ptr poked = pokeCStruct ptr poked (pure ()) @@ -833,17 +833,24 @@ instance Zero HandJointVelocityEXT where -- may be indexed by the 'HandJointEXT' enum. -- -- If the returned @isActive@ is true, the runtime /must/ return all joint --- locations with both @XR_SPACE_LOCATION_POSITION_VALID_BIT@ and --- @XR_SPACE_LOCATION_ORIENTATION_VALID_BIT@ set. Although, in this case, --- some joint space locations /may/ be untracked (i.e. --- @XR_SPACE_LOCATION_POSITION_TRACKED_BIT@ or --- @XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT@ is unset). +-- locations with both +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- and +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_ORIENTATION_VALID_BIT' +-- set. Although, in this case, some joint space locations /may/ be +-- untracked (i.e. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_TRACKED_BIT' +-- or +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_ORIENTATION_TRACKED_BIT' +-- is unset). -- -- If the returned @isActive@ is false, it indicates the hand tracker did -- not detect the hand input or the application lost input focus. In this -- case, the runtime /must/ return all @jointLocations@ with neither --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ nor --- @XR_SPACE_LOCATION_ORIENTATION_VALID_BIT@ set. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- nor +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_ORIENTATION_VALID_BIT' +-- set. -- -- == Valid Usage (Implicit) -- @@ -967,21 +974,26 @@ instance es ~ '[] => Zero (HandJointLocationsEXT es) where -- If the returned 'HandJointLocationsEXT'::@isActive@ is false, it -- indicates the hand tracker did not detect a hand input or the -- application lost input focus. In this case, the runtime /must/ return --- all @jointVelocities@ with neither @XR_SPACE_VELOCITY_LINEAR_VALID_BIT@ --- nor @XR_SPACE_VELOCITY_ANGULAR_VALID_BIT@ set. +-- all @jointVelocities@ with neither +-- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SPACE_VELOCITY_LINEAR_VALID_BIT' +-- nor +-- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SPACE_VELOCITY_ANGULAR_VALID_BIT' +-- set. -- -- If an 'HandJointVelocitiesEXT' structure is chained to -- 'HandJointLocationsEXT'::@next@, the returned -- 'HandJointLocationsEXT'::@isActive@ is true, and the velocity is -- observed or can be calculated by the runtime, the runtime /must/ fill in -- the linear velocity of each hand joint within the reference frame of --- @baseSpace@ and set the @XR_SPACE_VELOCITY_LINEAR_VALID_BIT@. Similarly, --- if an 'HandJointVelocitiesEXT' structure is chained to +-- @baseSpace@ and set the +-- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SPACE_VELOCITY_LINEAR_VALID_BIT'. +-- Similarly, if an 'HandJointVelocitiesEXT' structure is chained to -- 'HandJointLocationsEXT'::@next@, the returned -- 'HandJointLocationsEXT'::@isActive@ is true, and the /angular velocity/ -- is observed or can be calculated by the runtime, the runtime /must/ fill -- in the angular velocity of each joint within the reference frame of --- @baseSpace@ and set the @XR_SPACE_VELOCITY_ANGULAR_VALID_BIT@. +-- @baseSpace@ and set the +-- 'OpenXR.Core10.Enums.SpaceVelocityFlagBits.SPACE_VELOCITY_ANGULAR_VALID_BIT'. -- -- == Valid Usage (Implicit) -- diff --git a/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_cube.hs b/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_cube.hs index 4ccd3a22e..e63add670 100644 --- a/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_cube.hs +++ b/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_cube.hs @@ -58,7 +58,7 @@ import Foreign.Ptr (Ptr) import Data.Word (Word32) import Data.Kind (Type) import OpenXR.Core10.OtherTypes (CompositionLayerBaseHeader(..)) -import OpenXR.Core10.Enums.CompositionLayerFlags (CompositionLayerFlags) +import OpenXR.Core10.Enums.CompositionLayerFlagBits (CompositionLayerFlags) import OpenXR.Core10.Enums.EyeVisibility (EyeVisibility) import OpenXR.Core10.OtherTypes (IsCompositionLayer(..)) import OpenXR.Core10.Space (Quaternionf) @@ -92,7 +92,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_COMPOSITION_LAYER_C -- -- - #VUID-XrCompositionLayerCubeKHR-layerFlags-parameter# @layerFlags@ -- /must/ be @0@ or a valid combination of --- +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- values -- -- - #VUID-XrCompositionLayerCubeKHR-space-parameter# @space@ /must/ be a @@ -112,7 +112,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_COMPOSITION_LAYER_C -- = See Also -- -- 'OpenXR.Core10.OtherTypes.CompositionLayerBaseHeader', --- 'OpenXR.Core10.Enums.CompositionLayerFlags.CompositionLayerFlags', +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlags', -- 'OpenXR.Core10.Enums.EyeVisibility.EyeVisibility', -- 'OpenXR.Core10.DisplayTiming.FrameEndInfo', -- 'OpenXR.Core10.Space.Quaternionf', 'OpenXR.Core10.Handles.Space', diff --git a/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_cylinder.hs b/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_cylinder.hs index a671afd96..229967673 100644 --- a/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_cylinder.hs +++ b/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_cylinder.hs @@ -61,7 +61,7 @@ import GHC.Generics (Generic) import Foreign.Ptr (Ptr) import Data.Kind (Type) import OpenXR.Core10.OtherTypes (CompositionLayerBaseHeader(..)) -import OpenXR.Core10.Enums.CompositionLayerFlags (CompositionLayerFlags) +import OpenXR.Core10.Enums.CompositionLayerFlagBits (CompositionLayerFlags) import OpenXR.Core10.Enums.EyeVisibility (EyeVisibility) import OpenXR.Core10.OtherTypes (IsCompositionLayer(..)) import OpenXR.Core10.Space (Posef) @@ -97,7 +97,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_COMPOSITION_LAYER_C -- -- - #VUID-XrCompositionLayerCylinderKHR-layerFlags-parameter# -- @layerFlags@ /must/ be @0@ or a valid combination of --- +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- values -- -- - #VUID-XrCompositionLayerCylinderKHR-space-parameter# @space@ /must/ @@ -114,7 +114,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_COMPOSITION_LAYER_C -- = See Also -- -- 'OpenXR.Core10.OtherTypes.CompositionLayerBaseHeader', --- 'OpenXR.Core10.Enums.CompositionLayerFlags.CompositionLayerFlags', +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlags', -- 'OpenXR.Core10.Enums.EyeVisibility.EyeVisibility', -- 'OpenXR.Core10.DisplayTiming.FrameEndInfo', 'OpenXR.Core10.Space.Posef', -- 'OpenXR.Core10.Handles.Space', diff --git a/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_equirect.hs b/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_equirect.hs index f072e8026..dbb83b552 100644 --- a/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_equirect.hs +++ b/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_equirect.hs @@ -61,7 +61,7 @@ import GHC.Generics (Generic) import Foreign.Ptr (Ptr) import Data.Kind (Type) import OpenXR.Core10.OtherTypes (CompositionLayerBaseHeader(..)) -import OpenXR.Core10.Enums.CompositionLayerFlags (CompositionLayerFlags) +import OpenXR.Core10.Enums.CompositionLayerFlagBits (CompositionLayerFlags) import OpenXR.Core10.Enums.EyeVisibility (EyeVisibility) import OpenXR.Core10.OtherTypes (IsCompositionLayer(..)) import OpenXR.Core10.Space (Posef) @@ -98,7 +98,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_COMPOSITION_LAYER_E -- -- - #VUID-XrCompositionLayerEquirectKHR-layerFlags-parameter# -- @layerFlags@ /must/ be @0@ or a valid combination of --- +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- values -- -- - #VUID-XrCompositionLayerEquirectKHR-space-parameter# @space@ /must/ @@ -115,7 +115,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_COMPOSITION_LAYER_E -- = See Also -- -- 'OpenXR.Core10.OtherTypes.CompositionLayerBaseHeader', --- 'OpenXR.Core10.Enums.CompositionLayerFlags.CompositionLayerFlags', +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlags', -- 'OpenXR.Core10.Enums.EyeVisibility.EyeVisibility', -- 'OpenXR.Core10.DisplayTiming.FrameEndInfo', 'OpenXR.Core10.Space.Posef', -- 'OpenXR.Core10.Handles.Space', diff --git a/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_equirect2.hs b/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_equirect2.hs index e1e64a729..798f5c621 100644 --- a/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_equirect2.hs +++ b/openxr/src/OpenXR/Extensions/XR_KHR_composition_layer_equirect2.hs @@ -61,7 +61,7 @@ import GHC.Generics (Generic) import Foreign.Ptr (Ptr) import Data.Kind (Type) import OpenXR.Core10.OtherTypes (CompositionLayerBaseHeader(..)) -import OpenXR.Core10.Enums.CompositionLayerFlags (CompositionLayerFlags) +import OpenXR.Core10.Enums.CompositionLayerFlagBits (CompositionLayerFlags) import OpenXR.Core10.Enums.EyeVisibility (EyeVisibility) import OpenXR.Core10.OtherTypes (IsCompositionLayer(..)) import OpenXR.Core10.Space (Posef) @@ -97,7 +97,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_COMPOSITION_LAYER_E -- -- - #VUID-XrCompositionLayerEquirect2KHR-layerFlags-parameter# -- @layerFlags@ /must/ be @0@ or a valid combination of --- +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlagBits' -- values -- -- - #VUID-XrCompositionLayerEquirect2KHR-space-parameter# @space@ /must/ @@ -114,7 +114,7 @@ import OpenXR.Core10.Enums.StructureType (StructureType(TYPE_COMPOSITION_LAYER_E -- = See Also -- -- 'OpenXR.Core10.OtherTypes.CompositionLayerBaseHeader', --- 'OpenXR.Core10.Enums.CompositionLayerFlags.CompositionLayerFlags', +-- 'OpenXR.Core10.Enums.CompositionLayerFlagBits.CompositionLayerFlags', -- 'OpenXR.Core10.Enums.EyeVisibility.EyeVisibility', -- 'OpenXR.Core10.DisplayTiming.FrameEndInfo', 'OpenXR.Core10.Space.Posef', -- 'OpenXR.Core10.Handles.Space', diff --git a/openxr/src/OpenXR/Extensions/XR_KHR_vulkan_enable2.hs b/openxr/src/OpenXR/Extensions/XR_KHR_vulkan_enable2.hs index bd8b53032..a7a026e13 100644 --- a/openxr/src/OpenXR/Extensions/XR_KHR_vulkan_enable2.hs +++ b/openxr/src/OpenXR/Extensions/XR_KHR_vulkan_enable2.hs @@ -46,8 +46,10 @@ module OpenXR.Extensions.XR_KHR_vulkan_enable2 ( createVulkanInstanceKHR , VulkanInstanceCreateInfoKHR(..) , VulkanDeviceCreateInfoKHR(..) , VulkanGraphicsDeviceGetInfoKHR(..) - , VulkanInstanceCreateFlagsKHR(..) - , VulkanDeviceCreateFlagsKHR(..) + , VulkanInstanceCreateFlagsKHR + , VulkanInstanceCreateFlagBitsKHR(..) + , VulkanDeviceCreateFlagsKHR + , VulkanDeviceCreateFlagBitsKHR(..) , GraphicsBindingVulkan2KHR , SwapchainImageVulkan2KHR , GraphicsRequirementsVulkan2KHR @@ -742,70 +744,66 @@ instance Zero VulkanGraphicsDeviceGetInfoKHR where zero --- | XrVulkanInstanceCreateFlagsKHR - Vulkan Instance Create Info Flags --- --- = See Also --- --- 'VulkanInstanceCreateInfoKHR' -newtype VulkanInstanceCreateFlagsKHR = VulkanInstanceCreateFlagsKHR Flags64 +type VulkanInstanceCreateFlagsKHR = VulkanInstanceCreateFlagBitsKHR + +-- No documentation found for TopLevel "XrVulkanInstanceCreateFlagBitsKHR" +newtype VulkanInstanceCreateFlagBitsKHR = VulkanInstanceCreateFlagBitsKHR Flags64 deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) -conNameVulkanInstanceCreateFlagsKHR :: String -conNameVulkanInstanceCreateFlagsKHR = "VulkanInstanceCreateFlagsKHR" +conNameVulkanInstanceCreateFlagBitsKHR :: String +conNameVulkanInstanceCreateFlagBitsKHR = "VulkanInstanceCreateFlagBitsKHR" -enumPrefixVulkanInstanceCreateFlagsKHR :: String -enumPrefixVulkanInstanceCreateFlagsKHR = "" +enumPrefixVulkanInstanceCreateFlagBitsKHR :: String +enumPrefixVulkanInstanceCreateFlagBitsKHR = "" -showTableVulkanInstanceCreateFlagsKHR :: [(VulkanInstanceCreateFlagsKHR, String)] -showTableVulkanInstanceCreateFlagsKHR = [] +showTableVulkanInstanceCreateFlagBitsKHR :: [(VulkanInstanceCreateFlagBitsKHR, String)] +showTableVulkanInstanceCreateFlagBitsKHR = [] -instance Show VulkanInstanceCreateFlagsKHR where - showsPrec = enumShowsPrec enumPrefixVulkanInstanceCreateFlagsKHR - showTableVulkanInstanceCreateFlagsKHR - conNameVulkanInstanceCreateFlagsKHR - (\(VulkanInstanceCreateFlagsKHR x) -> x) +instance Show VulkanInstanceCreateFlagBitsKHR where + showsPrec = enumShowsPrec enumPrefixVulkanInstanceCreateFlagBitsKHR + showTableVulkanInstanceCreateFlagBitsKHR + conNameVulkanInstanceCreateFlagBitsKHR + (\(VulkanInstanceCreateFlagBitsKHR x) -> x) (\x -> showString "0x" . showHex x) -instance Read VulkanInstanceCreateFlagsKHR where - readPrec = enumReadPrec enumPrefixVulkanInstanceCreateFlagsKHR - showTableVulkanInstanceCreateFlagsKHR - conNameVulkanInstanceCreateFlagsKHR - VulkanInstanceCreateFlagsKHR +instance Read VulkanInstanceCreateFlagBitsKHR where + readPrec = enumReadPrec enumPrefixVulkanInstanceCreateFlagBitsKHR + showTableVulkanInstanceCreateFlagBitsKHR + conNameVulkanInstanceCreateFlagBitsKHR + VulkanInstanceCreateFlagBitsKHR --- | XrVulkanDeviceCreateFlagsKHR - Vulkan Device Create Info Flags --- --- = See Also --- --- 'VulkanDeviceCreateInfoKHR' -newtype VulkanDeviceCreateFlagsKHR = VulkanDeviceCreateFlagsKHR Flags64 +type VulkanDeviceCreateFlagsKHR = VulkanDeviceCreateFlagBitsKHR + +-- No documentation found for TopLevel "XrVulkanDeviceCreateFlagBitsKHR" +newtype VulkanDeviceCreateFlagBitsKHR = VulkanDeviceCreateFlagBitsKHR Flags64 deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) -conNameVulkanDeviceCreateFlagsKHR :: String -conNameVulkanDeviceCreateFlagsKHR = "VulkanDeviceCreateFlagsKHR" +conNameVulkanDeviceCreateFlagBitsKHR :: String +conNameVulkanDeviceCreateFlagBitsKHR = "VulkanDeviceCreateFlagBitsKHR" -enumPrefixVulkanDeviceCreateFlagsKHR :: String -enumPrefixVulkanDeviceCreateFlagsKHR = "" +enumPrefixVulkanDeviceCreateFlagBitsKHR :: String +enumPrefixVulkanDeviceCreateFlagBitsKHR = "" -showTableVulkanDeviceCreateFlagsKHR :: [(VulkanDeviceCreateFlagsKHR, String)] -showTableVulkanDeviceCreateFlagsKHR = [] +showTableVulkanDeviceCreateFlagBitsKHR :: [(VulkanDeviceCreateFlagBitsKHR, String)] +showTableVulkanDeviceCreateFlagBitsKHR = [] -instance Show VulkanDeviceCreateFlagsKHR where - showsPrec = enumShowsPrec enumPrefixVulkanDeviceCreateFlagsKHR - showTableVulkanDeviceCreateFlagsKHR - conNameVulkanDeviceCreateFlagsKHR - (\(VulkanDeviceCreateFlagsKHR x) -> x) +instance Show VulkanDeviceCreateFlagBitsKHR where + showsPrec = enumShowsPrec enumPrefixVulkanDeviceCreateFlagBitsKHR + showTableVulkanDeviceCreateFlagBitsKHR + conNameVulkanDeviceCreateFlagBitsKHR + (\(VulkanDeviceCreateFlagBitsKHR x) -> x) (\x -> showString "0x" . showHex x) -instance Read VulkanDeviceCreateFlagsKHR where - readPrec = enumReadPrec enumPrefixVulkanDeviceCreateFlagsKHR - showTableVulkanDeviceCreateFlagsKHR - conNameVulkanDeviceCreateFlagsKHR - VulkanDeviceCreateFlagsKHR +instance Read VulkanDeviceCreateFlagBitsKHR where + readPrec = enumReadPrec enumPrefixVulkanDeviceCreateFlagBitsKHR + showTableVulkanDeviceCreateFlagBitsKHR + conNameVulkanDeviceCreateFlagBitsKHR + VulkanDeviceCreateFlagBitsKHR -- | XrGraphicsBindingVulkan2KHR - The graphics binding structure to be diff --git a/openxr/src/OpenXR/Extensions/XR_MND_swapchain_usage_input_attachment_bit.hs b/openxr/src/OpenXR/Extensions/XR_MND_swapchain_usage_input_attachment_bit.hs index 48ec30b69..d882caa55 100644 --- a/openxr/src/OpenXR/Extensions/XR_MND_swapchain_usage_input_attachment_bit.hs +++ b/openxr/src/OpenXR/Extensions/XR_MND_swapchain_usage_input_attachment_bit.hs @@ -32,86 +32,13 @@ -- -- This page is a generated document. Fixes and changes should be made to -- the generator scripts, not directly. -module OpenXR.Extensions.XR_MND_swapchain_usage_input_attachment_bit ( SwapchainUsageFlagBits( SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT - , SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT - , SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT - , SWAPCHAIN_USAGE_TRANSFER_SRC_BIT - , SWAPCHAIN_USAGE_TRANSFER_DST_BIT - , SWAPCHAIN_USAGE_SAMPLED_BIT - , SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT - , SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND - , .. - ) - , MND_swapchain_usage_input_attachment_bit_SPEC_VERSION +module OpenXR.Extensions.XR_MND_swapchain_usage_input_attachment_bit ( MND_swapchain_usage_input_attachment_bit_SPEC_VERSION , pattern MND_swapchain_usage_input_attachment_bit_SPEC_VERSION , MND_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_EXTENSION_NAME , pattern MND_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_EXTENSION_NAME ) where -import OpenXR.Internal.Utils (enumReadPrec) -import OpenXR.Internal.Utils (enumShowsPrec) -import GHC.Show (showString) -import Numeric (showHex) -import OpenXR.Zero (Zero) -import Data.Bits (Bits) -import Data.Bits (FiniteBits) import Data.String (IsString) -import Foreign.Storable (Storable) -import GHC.Read (Read(readPrec)) -import GHC.Show (Show(showsPrec)) -import OpenXR.Core10.FundamentalTypes (Flags64) --- No documentation found for TopLevel "XrSwapchainUsageFlagBits" -newtype SwapchainUsageFlagBits = SwapchainUsageFlagBits Flags64 - deriving newtype (Eq, Ord, Storable, Zero, Bits, FiniteBits) - --- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT" -pattern SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT = SwapchainUsageFlagBits 0x00000001 --- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT" -pattern SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = SwapchainUsageFlagBits 0x00000002 --- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT" -pattern SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT = SwapchainUsageFlagBits 0x00000004 --- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT" -pattern SWAPCHAIN_USAGE_TRANSFER_SRC_BIT = SwapchainUsageFlagBits 0x00000008 --- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT" -pattern SWAPCHAIN_USAGE_TRANSFER_DST_BIT = SwapchainUsageFlagBits 0x00000010 --- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_SAMPLED_BIT" -pattern SWAPCHAIN_USAGE_SAMPLED_BIT = SwapchainUsageFlagBits 0x00000020 --- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT" -pattern SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT = SwapchainUsageFlagBits 0x00000040 --- No documentation found for Nested "XrSwapchainUsageFlagBits" "XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND" -pattern SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND = SwapchainUsageFlagBits 0x00000080 - -conNameSwapchainUsageFlagBits :: String -conNameSwapchainUsageFlagBits = "SwapchainUsageFlagBits" - -enumPrefixSwapchainUsageFlagBits :: String -enumPrefixSwapchainUsageFlagBits = "SWAPCHAIN_USAGE_" - -showTableSwapchainUsageFlagBits :: [(SwapchainUsageFlagBits, String)] -showTableSwapchainUsageFlagBits = - [ (SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT , "COLOR_ATTACHMENT_BIT") - , (SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, "DEPTH_STENCIL_ATTACHMENT_BIT") - , (SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT , "UNORDERED_ACCESS_BIT") - , (SWAPCHAIN_USAGE_TRANSFER_SRC_BIT , "TRANSFER_SRC_BIT") - , (SWAPCHAIN_USAGE_TRANSFER_DST_BIT , "TRANSFER_DST_BIT") - , (SWAPCHAIN_USAGE_SAMPLED_BIT , "SAMPLED_BIT") - , (SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT , "MUTABLE_FORMAT_BIT") - , (SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND , "INPUT_ATTACHMENT_BIT_MND") - ] - -instance Show SwapchainUsageFlagBits where - showsPrec = enumShowsPrec enumPrefixSwapchainUsageFlagBits - showTableSwapchainUsageFlagBits - conNameSwapchainUsageFlagBits - (\(SwapchainUsageFlagBits x) -> x) - (\x -> showString "0x" . showHex x) - -instance Read SwapchainUsageFlagBits where - readPrec = enumReadPrec enumPrefixSwapchainUsageFlagBits - showTableSwapchainUsageFlagBits - conNameSwapchainUsageFlagBits - SwapchainUsageFlagBits - type MND_swapchain_usage_input_attachment_bit_SPEC_VERSION = 2 diff --git a/openxr/src/OpenXR/Extensions/XR_MSFT_hand_tracking_mesh.hs b/openxr/src/OpenXR/Extensions/XR_MSFT_hand_tracking_mesh.hs index b8ae37799..2f2641453 100644 --- a/openxr/src/OpenXR/Extensions/XR_MSFT_hand_tracking_mesh.hs +++ b/openxr/src/OpenXR/Extensions/XR_MSFT_hand_tracking_mesh.hs @@ -158,17 +158,21 @@ foreign import ccall -- hand mesh space may be not locatable when the hand is outside of the -- tracking range, or if focus is removed from the application. In these -- cases, the runtime /must/ not set the --- @XR_SPACE_LOCATION_POSITION_VALID_BIT@ and --- @XR_SPACE_LOCATION_ORIENTATION_VALID_BIT@ bits on calls to --- 'OpenXR.Core10.Space.locateSpace' with the hand mesh space, and the --- application /should/ avoid using the returned poses or query for hand --- mesh data. +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- and +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_ORIENTATION_VALID_BIT' +-- bits on calls to 'OpenXR.Core10.Space.locateSpace' with the hand mesh +-- space, and the application /should/ avoid using the returned poses or +-- query for hand mesh data. -- -- If the underlying 'OpenXR.Extensions.Handles.HandTrackerEXT' is -- destroyed, the runtime /must/ continue to support -- 'OpenXR.Core10.Space.locateSpace' using the hand mesh space, and it --- /must/ return space location with @XR_SPACE_LOCATION_POSITION_VALID_BIT@ --- and @XR_SPACE_LOCATION_ORIENTATION_VALID_BIT@ unset. +-- /must/ return space location with +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_POSITION_VALID_BIT' +-- and +-- 'OpenXR.Core10.Enums.SpaceLocationFlagBits.SPACE_LOCATION_ORIENTATION_VALID_BIT' +-- unset. -- -- The application /may/ create a mesh space for the reference hand by -- setting @handPoseType@ to 'HAND_POSE_TYPE_REFERENCE_OPEN_PALM_MSFT'. From fffe23528bcbe90f87e916d355425de9f9485a3c Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 17:42:05 +0800 Subject: [PATCH 08/11] bump and regenerate vma --- VulkanMemoryAllocator/VulkanMemoryAllocator | 2 +- VulkanMemoryAllocator/changelog.md | 1 + .../src/VulkanMemoryAllocator.hs | 31 ------------------- 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/VulkanMemoryAllocator/VulkanMemoryAllocator b/VulkanMemoryAllocator/VulkanMemoryAllocator index 2882236f6..d1851f0de 160000 --- a/VulkanMemoryAllocator/VulkanMemoryAllocator +++ b/VulkanMemoryAllocator/VulkanMemoryAllocator @@ -1 +1 @@ -Subproject commit 2882236f6ab66b4b559027800769e4cc5c3ee9fa +Subproject commit d1851f0ded5e7d5555be3c839a47f057d6952131 diff --git a/VulkanMemoryAllocator/changelog.md b/VulkanMemoryAllocator/changelog.md index 992eae05b..32ca0d675 100644 --- a/VulkanMemoryAllocator/changelog.md +++ b/VulkanMemoryAllocator/changelog.md @@ -1,6 +1,7 @@ # Change Log ## WIP +- Bump VMA, deprecates resizeAllocation ## [0.4] - 2021-02-18 - Bump VMA, support for VK_EXT_memory_priority diff --git a/VulkanMemoryAllocator/src/VulkanMemoryAllocator.hs b/VulkanMemoryAllocator/src/VulkanMemoryAllocator.hs index 730bfa774..a5a404408 100644 --- a/VulkanMemoryAllocator/src/VulkanMemoryAllocator.hs +++ b/VulkanMemoryAllocator/src/VulkanMemoryAllocator.hs @@ -33,7 +33,6 @@ module VulkanMemoryAllocator ( createAllocator , withMemoryForImage , freeMemory , freeMemoryPages - , resizeAllocation , getAllocationInfo , touchAllocation , setAllocationUserData @@ -1193,36 +1192,6 @@ freeMemoryPages allocator allocations = liftIO . evalContT $ do pure $ () -foreign import ccall -#if !defined(SAFE_FOREIGN_CALLS) - unsafe -#endif - "vmaResizeAllocation" ffiVmaResizeAllocation - :: Allocator -> Allocation -> DeviceSize -> IO Result - --- | Deprecated. --- --- /Deprecated/ --- --- In version 2.2.0 it used to try to change allocation\'s size without --- moving or reallocating it. In current version it returns @VK_SUCCESS@ --- only if @newSize@ equals current allocation\'s size. Otherwise returns --- @VK_ERROR_OUT_OF_POOL_MEMORY@, indicating that allocation\'s size could --- not be changed. -resizeAllocation :: forall io - . (MonadIO io) - => -- No documentation found for Nested "vmaResizeAllocation" "allocator" - Allocator - -> -- No documentation found for Nested "vmaResizeAllocation" "allocation" - Allocation - -> -- No documentation found for Nested "vmaResizeAllocation" "newSize" - ("newSize" ::: DeviceSize) - -> io () -resizeAllocation allocator allocation newSize = liftIO $ do - r <- traceAroundEvent "vmaResizeAllocation" ((ffiVmaResizeAllocation) (allocator) (allocation) (newSize)) - when (r < SUCCESS) (throwIO (VulkanException r)) - - foreign import ccall #if !defined(SAFE_FOREIGN_CALLS) unsafe From baf9fb6beb37174391c793e574cf9b25ff720ca0 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 17:42:23 +0800 Subject: [PATCH 09/11] remove allow-newer from cabal.project --- cabal.project | 2 -- 1 file changed, 2 deletions(-) diff --git a/cabal.project b/cabal.project index 3dcc27c0c..cfd5440fd 100644 --- a/cabal.project +++ b/cabal.project @@ -5,5 +5,3 @@ packages: ./utils ./examples ./generate-new/ - -allow-newer: strict Cabal From 5fb22b050f537ebb049127008923d845e008a0a9 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 17:42:30 +0800 Subject: [PATCH 10/11] bump changelog --- changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.md b/changelog.md index d22554b93..c3101761b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,8 @@ # Change Log ## WIP +- Bump API version to v1.2.174 +- Fix https://github.com/expipiplus1/vulkan/issues/266 ## [3.10] - 2021-02-18 - Bump API version to v1.2.170 From adb27d3ac6e08fa1d275e252113b6005ccc42171 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 31 Mar 2021 17:48:53 +0800 Subject: [PATCH 11/11] version bumps and regenerate cabal files --- .../VulkanMemoryAllocator.cabal | 2 +- VulkanMemoryAllocator/changelog.md | 2 ++ VulkanMemoryAllocator/package.yaml | 2 +- changelog.md | 2 ++ openxr/openxr.cabal | 18 +++++++++--------- package.yaml | 2 +- vulkan.cabal | 5 ++++- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/VulkanMemoryAllocator/VulkanMemoryAllocator.cabal b/VulkanMemoryAllocator/VulkanMemoryAllocator.cabal index f497533de..9a7cfb3df 100644 --- a/VulkanMemoryAllocator/VulkanMemoryAllocator.cabal +++ b/VulkanMemoryAllocator/VulkanMemoryAllocator.cabal @@ -5,7 +5,7 @@ cabal-version: 2.2 -- see: https://github.com/sol/hpack name: VulkanMemoryAllocator -version: 0.4 +version: 0.5 synopsis: Bindings to the VulkanMemoryAllocator library category: Graphics homepage: https://github.com/expipiplus1/vulkan#readme diff --git a/VulkanMemoryAllocator/changelog.md b/VulkanMemoryAllocator/changelog.md index 32ca0d675..cda95322a 100644 --- a/VulkanMemoryAllocator/changelog.md +++ b/VulkanMemoryAllocator/changelog.md @@ -1,6 +1,8 @@ # Change Log ## WIP + +## [0.5] - 2021-03-31 - Bump VMA, deprecates resizeAllocation ## [0.4] - 2021-02-18 diff --git a/VulkanMemoryAllocator/package.yaml b/VulkanMemoryAllocator/package.yaml index 733a3fc3f..88aafcc3b 100644 --- a/VulkanMemoryAllocator/package.yaml +++ b/VulkanMemoryAllocator/package.yaml @@ -1,5 +1,5 @@ name: VulkanMemoryAllocator -version: "0.4" +version: "0.5" synopsis: Bindings to the VulkanMemoryAllocator library category: Graphics maintainer: Joe Hermaszewski diff --git a/changelog.md b/changelog.md index c3101761b..6e09e8559 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,8 @@ # Change Log ## WIP + +## [3.10.1] - 2021-03-31 - Bump API version to v1.2.174 - Fix https://github.com/expipiplus1/vulkan/issues/266 diff --git a/openxr/openxr.cabal b/openxr/openxr.cabal index ffd4fc4bc..74d020060 100644 --- a/openxr/openxr.cabal +++ b/openxr/openxr.cabal @@ -51,24 +51,24 @@ library OpenXR.Core10.DisplayTiming OpenXR.Core10.Enums OpenXR.Core10.Enums.ActionType - OpenXR.Core10.Enums.CompositionLayerFlags + OpenXR.Core10.Enums.CompositionLayerFlagBits OpenXR.Core10.Enums.EnvironmentBlendMode OpenXR.Core10.Enums.EyeVisibility OpenXR.Core10.Enums.FormFactor - OpenXR.Core10.Enums.InputSourceLocalizedNameFlags - OpenXR.Core10.Enums.InstanceCreateFlags + OpenXR.Core10.Enums.InputSourceLocalizedNameFlagBits + OpenXR.Core10.Enums.InstanceCreateFlagBits OpenXR.Core10.Enums.ObjectType OpenXR.Core10.Enums.ReferenceSpaceType OpenXR.Core10.Enums.Result - OpenXR.Core10.Enums.SessionCreateFlags + OpenXR.Core10.Enums.SessionCreateFlagBits OpenXR.Core10.Enums.SessionState - OpenXR.Core10.Enums.SpaceLocationFlags - OpenXR.Core10.Enums.SpaceVelocityFlags + OpenXR.Core10.Enums.SpaceLocationFlagBits + OpenXR.Core10.Enums.SpaceVelocityFlagBits OpenXR.Core10.Enums.StructureType - OpenXR.Core10.Enums.SwapchainCreateFlags - OpenXR.Core10.Enums.SwapchainUsageFlags + OpenXR.Core10.Enums.SwapchainCreateFlagBits + OpenXR.Core10.Enums.SwapchainUsageFlagBits OpenXR.Core10.Enums.ViewConfigurationType - OpenXR.Core10.Enums.ViewStateFlags + OpenXR.Core10.Enums.ViewStateFlagBits OpenXR.Core10.FuncPointers OpenXR.Core10.FundamentalTypes OpenXR.Core10.Handles diff --git a/package.yaml b/package.yaml index 9857170f8..af16321b1 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: vulkan -version: "3.10" +version: "3.10.1" synopsis: Bindings to the Vulkan graphics API. category: Graphics maintainer: Joe Hermaszewski diff --git a/vulkan.cabal b/vulkan.cabal index 80145cbc1..34a56ff0c 100644 --- a/vulkan.cabal +++ b/vulkan.cabal @@ -5,7 +5,7 @@ cabal-version: 2.2 -- see: https://github.com/sol/hpack name: vulkan -version: 3.10 +version: 3.10.1 synopsis: Bindings to the Vulkan graphics API. category: Graphics homepage: https://github.com/expipiplus1/vulkan#readme @@ -346,6 +346,8 @@ library Vulkan.Extensions.VK_EXT_validation_flags Vulkan.Extensions.VK_EXT_vertex_attribute_divisor Vulkan.Extensions.VK_EXT_ycbcr_image_arrays + Vulkan.Extensions.VK_FUCHSIA_external_memory + Vulkan.Extensions.VK_FUCHSIA_external_semaphore Vulkan.Extensions.VK_FUCHSIA_imagepipe_surface Vulkan.Extensions.VK_GGP_frame_token Vulkan.Extensions.VK_GGP_stream_descriptor_surface @@ -479,6 +481,7 @@ library Vulkan.Extensions.VK_QCOM_render_pass_store_ops Vulkan.Extensions.VK_QCOM_render_pass_transform Vulkan.Extensions.VK_QCOM_rotated_copy_commands + Vulkan.Extensions.VK_QNX_screen_surface Vulkan.Extensions.VK_VALVE_mutable_descriptor_type Vulkan.NamedType Vulkan.SPIRVRequirements