{-# language CPP #-}
module Vulkan.Core10.Device ( createDevice
, withDevice
, destroyDevice
, DeviceQueueCreateInfo(..)
, DeviceCreateInfo(..)
, Device(..)
, DeviceCreateFlags(..)
, DeviceQueueCreateFlagBits(..)
, DeviceQueueCreateFlags
) where
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Typeable (eqT)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import Foreign.Marshal.Utils (maybePeek)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import Data.ByteString (packCString)
import Data.ByteString (useAsCString)
import Data.Coerce (coerce)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
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.Type.Equality ((:~:)(Refl))
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.C.Types (CFloat)
import Foreign.C.Types (CFloat(..))
import Foreign.C.Types (CFloat(CFloat))
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
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.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.CStruct.Extends (forgetExtensions)
import Vulkan.Dynamic (initDeviceCmds)
import Vulkan.CStruct.Extends (peekSomeCStruct)
import Vulkan.CStruct.Extends (pokeSomeCStruct)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.AllocationCallbacks (AllocationCallbacks)
import Vulkan.CStruct.Extends (Chain)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkDestroyDevice))
import Vulkan.Core10.Enums.DeviceCreateFlags (DeviceCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_device_memory_report (DeviceDeviceMemoryReportCreateInfoEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_device_diagnostics_config (DeviceDiagnosticsConfigCreateInfoNV)
import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_device_group_creation (DeviceGroupDeviceCreateInfo)
import {-# SOURCE #-} Vulkan.Extensions.VK_AMD_memory_overallocation_behavior (DeviceMemoryOverallocationCreateInfoAMD)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_private_data (DevicePrivateDataCreateInfo)
import Vulkan.Core10.Enums.DeviceQueueCreateFlagBits (DeviceQueueCreateFlags)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_global_priority (DeviceQueueGlobalPriorityCreateInfoKHR)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.CStruct.Extends (Extends)
import Vulkan.CStruct.Extends (Extendss)
import Vulkan.CStruct.Extends (Extensible(..))
import Vulkan.Dynamic (InstanceCmds(pVkCreateDevice))
import Vulkan.CStruct.Extends (PeekChain)
import Vulkan.CStruct.Extends (PeekChain(..))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_16bit_storage (PhysicalDevice16BitStorageFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_4444_formats (PhysicalDevice4444FormatsFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_8bit_storage (PhysicalDevice8BitStorageFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_astc_decode_mode (PhysicalDeviceASTCDecodeFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_acceleration_structure (PhysicalDeviceAccelerationStructureFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_device_address_binding_report (PhysicalDeviceAddressBindingReportFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_SEC_amigo_profiling (PhysicalDeviceAmigoProfilingFeaturesSEC)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_attachment_feedback_loop_layout (PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_blend_operation_advanced (PhysicalDeviceBlendOperationAdvancedFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_border_color_swizzle (PhysicalDeviceBorderColorSwizzleFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_buffer_device_address (PhysicalDeviceBufferDeviceAddressFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_buffer_device_address (PhysicalDeviceBufferDeviceAddressFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_AMD_device_coherent_memory (PhysicalDeviceCoherentMemoryFeaturesAMD)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_color_write_enable (PhysicalDeviceColorWriteEnableFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_compute_shader_derivatives (PhysicalDeviceComputeShaderDerivativesFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_conditional_rendering (PhysicalDeviceConditionalRenderingFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_cooperative_matrix (PhysicalDeviceCooperativeMatrixFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_copy_memory_indirect (PhysicalDeviceCopyMemoryIndirectFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_corner_sampled_image (PhysicalDeviceCornerSampledImageFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_coverage_reduction_mode (PhysicalDeviceCoverageReductionModeFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_custom_border_color (PhysicalDeviceCustomBorderColorFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_dedicated_allocation_image_aliasing (PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_depth_clamp_zero_one (PhysicalDeviceDepthClampZeroOneFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_depth_clip_control (PhysicalDeviceDepthClipControlFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_depth_clip_enable (PhysicalDeviceDepthClipEnableFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_EXT_descriptor_indexing (PhysicalDeviceDescriptorIndexingFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_VALVE_descriptor_set_host_mapping (PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_device_generated_commands (PhysicalDeviceDeviceGeneratedCommandsFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_device_memory_report (PhysicalDeviceDeviceMemoryReportFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_device_diagnostics_config (PhysicalDeviceDiagnosticsConfigFeaturesNV)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_KHR_dynamic_rendering (PhysicalDeviceDynamicRenderingFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_scissor_exclusive (PhysicalDeviceExclusiveScissorFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_extended_dynamic_state2 (PhysicalDeviceExtendedDynamicState2FeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_extended_dynamic_state3 (PhysicalDeviceExtendedDynamicState3FeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_extended_dynamic_state (PhysicalDeviceExtendedDynamicStateFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_external_memory_rdma (PhysicalDeviceExternalMemoryRDMAFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_device_fault (PhysicalDeviceFaultFeaturesEXT)
import Vulkan.Core10.DeviceInitialization (PhysicalDeviceFeatures)
import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2 (PhysicalDeviceFeatures2)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_fragment_density_map2 (PhysicalDeviceFragmentDensityMap2FeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_fragment_density_map (PhysicalDeviceFragmentDensityMapFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_QCOM_fragment_density_map_offset (PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_fragment_shader_barycentric (PhysicalDeviceFragmentShaderBarycentricFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_fragment_shader_interlock (PhysicalDeviceFragmentShaderInterlockFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_fragment_shading_rate_enums (PhysicalDeviceFragmentShadingRateEnumsFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_fragment_shading_rate (PhysicalDeviceFragmentShadingRateFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_global_priority (PhysicalDeviceGlobalPriorityQueryFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_graphics_pipeline_library (PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_EXT_host_query_reset (PhysicalDeviceHostQueryResetFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_image_2d_view_of_3d (PhysicalDeviceImage2DViewOf3DFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_image_compression_control (PhysicalDeviceImageCompressionControlFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_image_compression_control_swapchain (PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_QCOM_image_processing (PhysicalDeviceImageProcessingFeaturesQCOM)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_image_robustness (PhysicalDeviceImageRobustnessFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_image_view_min_lod (PhysicalDeviceImageViewMinLodFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_imageless_framebuffer (PhysicalDeviceImagelessFramebufferFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_index_type_uint8 (PhysicalDeviceIndexTypeUint8FeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_inherited_viewport_scissor (PhysicalDeviceInheritedViewportScissorFeaturesNV)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_inline_uniform_block (PhysicalDeviceInlineUniformBlockFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_HUAWEI_invocation_mask (PhysicalDeviceInvocationMaskFeaturesHUAWEI)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_legacy_dithering (PhysicalDeviceLegacyDitheringFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_line_rasterization (PhysicalDeviceLineRasterizationFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_linear_color_attachment (PhysicalDeviceLinearColorAttachmentFeaturesNV)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_KHR_maintenance4 (PhysicalDeviceMaintenance4Features)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_memory_decompression (PhysicalDeviceMemoryDecompressionFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_memory_priority (PhysicalDeviceMemoryPriorityFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_mesh_shader (PhysicalDeviceMeshShaderFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_mesh_shader (PhysicalDeviceMeshShaderFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_multi_draw (PhysicalDeviceMultiDrawFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_multisampled_render_to_single_sampled (PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_multiview (PhysicalDeviceMultiviewFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_mutable_descriptor_type (PhysicalDeviceMutableDescriptorTypeFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_non_seamless_cube_map (PhysicalDeviceNonSeamlessCubeMapFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_opacity_micromap (PhysicalDeviceOpacityMicromapFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_optical_flow (PhysicalDeviceOpticalFlowFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_pageable_device_local_memory (PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_performance_query (PhysicalDevicePerformanceQueryFeaturesKHR)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_pipeline_creation_cache_control (PhysicalDevicePipelineCreationCacheControlFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_pipeline_executable_properties (PhysicalDevicePipelineExecutablePropertiesFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_pipeline_properties (PhysicalDevicePipelinePropertiesFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_pipeline_protected_access (PhysicalDevicePipelineProtectedAccessFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_pipeline_robustness (PhysicalDevicePipelineRobustnessFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_portability_subset (PhysicalDevicePortabilitySubsetFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_present_barrier (PhysicalDevicePresentBarrierFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_present_id (PhysicalDevicePresentIdFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_present_wait (PhysicalDevicePresentWaitFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_primitive_topology_list_restart (PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_primitives_generated_query (PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_private_data (PhysicalDevicePrivateDataFeatures)
import {-# SOURCE #-} Vulkan.Core11.Originally_Based_On_VK_KHR_protected_memory (PhysicalDeviceProtectedMemoryFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_provoking_vertex (PhysicalDeviceProvokingVertexFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_rgba10x6_formats (PhysicalDeviceRGBA10X6FormatsFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_rasterization_order_attachment_access (PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_ray_query (PhysicalDeviceRayQueryFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_ray_tracing_invocation_reorder (PhysicalDeviceRayTracingInvocationReorderFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_ray_tracing_maintenance1 (PhysicalDeviceRayTracingMaintenance1FeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_ray_tracing_motion_blur (PhysicalDeviceRayTracingMotionBlurFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_ray_tracing_pipeline (PhysicalDeviceRayTracingPipelineFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_representative_fragment_test (PhysicalDeviceRepresentativeFragmentTestFeaturesNV)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_robustness2 (PhysicalDeviceRobustness2FeaturesEXT)
import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_sampler_ycbcr_conversion (PhysicalDeviceSamplerYcbcrConversionFeatures)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_EXT_scalar_block_layout (PhysicalDeviceScalarBlockLayoutFeatures)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_separate_depth_stencil_layouts (PhysicalDeviceSeparateDepthStencilLayoutsFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_shader_atomic_float2 (PhysicalDeviceShaderAtomicFloat2FeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_shader_atomic_float (PhysicalDeviceShaderAtomicFloatFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_shader_atomic_int64 (PhysicalDeviceShaderAtomicInt64Features)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_shader_clock (PhysicalDeviceShaderClockFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_ARM_shader_core_builtins (PhysicalDeviceShaderCoreBuiltinsFeaturesARM)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_shader_demote_to_helper_invocation (PhysicalDeviceShaderDemoteToHelperInvocationFeatures)
import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_shader_draw_parameters (PhysicalDeviceShaderDrawParametersFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_AMD_shader_early_and_late_fragment_tests (PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_shader_float16_int8 (PhysicalDeviceShaderFloat16Int8Features)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_shader_image_atomic_int64 (PhysicalDeviceShaderImageAtomicInt64FeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_shader_image_footprint (PhysicalDeviceShaderImageFootprintFeaturesNV)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_KHR_shader_integer_dot_product (PhysicalDeviceShaderIntegerDotProductFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_INTEL_shader_integer_functions2 (PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_shader_module_identifier (PhysicalDeviceShaderModuleIdentifierFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_shader_sm_builtins (PhysicalDeviceShaderSMBuiltinsFeaturesNV)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_shader_subgroup_extended_types (PhysicalDeviceShaderSubgroupExtendedTypesFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_shader_subgroup_uniform_control_flow (PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_KHR_shader_terminate_invocation (PhysicalDeviceShaderTerminateInvocationFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_NV_shading_rate_image (PhysicalDeviceShadingRateImageFeaturesNV)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_subgroup_size_control (PhysicalDeviceSubgroupSizeControlFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_subpass_merge_feedback (PhysicalDeviceSubpassMergeFeedbackFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_HUAWEI_subpass_shading (PhysicalDeviceSubpassShadingFeaturesHUAWEI)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_KHR_synchronization2 (PhysicalDeviceSynchronization2Features)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_texel_buffer_alignment (PhysicalDeviceTexelBufferAlignmentFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_EXT_texture_compression_astc_hdr (PhysicalDeviceTextureCompressionASTCHDRFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_QCOM_tile_properties (PhysicalDeviceTilePropertiesFeaturesQCOM)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_timeline_semaphore (PhysicalDeviceTimelineSemaphoreFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_transform_feedback (PhysicalDeviceTransformFeedbackFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_uniform_buffer_standard_layout (PhysicalDeviceUniformBufferStandardLayoutFeatures)
import {-# SOURCE #-} Vulkan.Core11.Promoted_From_VK_KHR_variable_pointers (PhysicalDeviceVariablePointersFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_vertex_attribute_divisor (PhysicalDeviceVertexAttributeDivisorFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_vertex_input_dynamic_state (PhysicalDeviceVertexInputDynamicStateFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core12 (PhysicalDeviceVulkan11Features)
import {-# SOURCE #-} Vulkan.Core12 (PhysicalDeviceVulkan12Features)
import {-# SOURCE #-} Vulkan.Core13 (PhysicalDeviceVulkan13Features)
import {-# SOURCE #-} Vulkan.Core12.Promoted_From_VK_KHR_vulkan_memory_model (PhysicalDeviceVulkanMemoryModelFeatures)
import {-# SOURCE #-} Vulkan.Extensions.VK_KHR_workgroup_memory_explicit_layout (PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_ycbcr_2plane_444_formats (PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT)
import {-# SOURCE #-} Vulkan.Extensions.VK_EXT_ycbcr_image_arrays (PhysicalDeviceYcbcrImageArraysFeaturesEXT)
import {-# SOURCE #-} Vulkan.Core13.Promoted_From_VK_KHR_zero_initialize_workgroup_memory (PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures)
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.CStruct.Extends (PokeChain)
import Vulkan.CStruct.Extends (PokeChain(..))
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.CStruct.Extends (SomeStruct)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_CREATE_INFO))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Enums.DeviceCreateFlags (DeviceCreateFlags(..))
import Vulkan.Core10.Enums.DeviceQueueCreateFlagBits (DeviceQueueCreateFlagBits(..))
import Vulkan.Core10.Enums.DeviceQueueCreateFlagBits (DeviceQueueCreateFlags)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCreateDevice
:: FunPtr (Ptr PhysicalDevice_T -> Ptr (SomeStruct DeviceCreateInfo) -> Ptr AllocationCallbacks -> Ptr (Ptr Device_T) -> IO Result) -> Ptr PhysicalDevice_T -> Ptr (SomeStruct DeviceCreateInfo) -> Ptr AllocationCallbacks -> Ptr (Ptr Device_T) -> IO Result
createDevice :: forall a io
. (Extendss DeviceCreateInfo a, PokeChain a, MonadIO io)
=>
PhysicalDevice
->
(DeviceCreateInfo a)
->
("allocator" ::: Maybe AllocationCallbacks)
-> io (Device)
createDevice :: forall (a :: [*]) (io :: * -> *).
(Extendss DeviceCreateInfo a, PokeChain a, MonadIO io) =>
PhysicalDevice
-> DeviceCreateInfo a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io Device
createDevice PhysicalDevice
physicalDevice DeviceCreateInfo a
createInfo "allocator" ::: Maybe AllocationCallbacks
allocator = IO Device -> io Device
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Device -> io Device)
-> (ContT Device IO Device -> IO Device)
-> ContT Device IO Device
-> io Device
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Device IO Device -> IO Device
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Device IO Device -> io Device)
-> ContT Device IO Device -> io Device
forall a b. (a -> b) -> a -> b
$ do
let cmds :: InstanceCmds
cmds = case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
$sel:instanceCmds:PhysicalDevice :: PhysicalDevice -> InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds
let vkCreateDevicePtr :: FunPtr
(Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result)
vkCreateDevicePtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result)
pVkCreateDevice InstanceCmds
cmds
IO () -> ContT Device IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Device IO ()) -> IO () -> ContT Device IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result)
vkCreateDevicePtr FunPtr
(Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCreateDevice is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCreateDevice' :: Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result
vkCreateDevice' = FunPtr
(Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result)
-> Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result
mkVkCreateDevice FunPtr
(Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result)
vkCreateDevicePtr
Ptr (DeviceCreateInfo a)
pCreateInfo <- ((Ptr (DeviceCreateInfo a) -> IO Device) -> IO Device)
-> ContT Device IO (Ptr (DeviceCreateInfo a))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (DeviceCreateInfo a) -> IO Device) -> IO Device)
-> ContT Device IO (Ptr (DeviceCreateInfo a)))
-> ((Ptr (DeviceCreateInfo a) -> IO Device) -> IO Device)
-> ContT Device IO (Ptr (DeviceCreateInfo a))
forall a b. (a -> b) -> a -> b
$ DeviceCreateInfo a
-> (Ptr (DeviceCreateInfo a) -> IO Device) -> IO Device
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (DeviceCreateInfo a
createInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT Device IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO Device)
-> IO Device)
-> ContT Device IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO Device)
-> IO Device)
-> ContT Device IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO Device)
-> IO Device)
-> ContT Device IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO Device)
-> IO Device
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
"pDevice" ::: Ptr (Ptr Device_T)
pPDevice <- ((("pDevice" ::: Ptr (Ptr Device_T)) -> IO Device) -> IO Device)
-> ContT Device IO ("pDevice" ::: Ptr (Ptr Device_T))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pDevice" ::: Ptr (Ptr Device_T)) -> IO Device) -> IO Device)
-> ContT Device IO ("pDevice" ::: Ptr (Ptr Device_T)))
-> ((("pDevice" ::: Ptr (Ptr Device_T)) -> IO Device) -> IO Device)
-> ContT Device IO ("pDevice" ::: Ptr (Ptr Device_T))
forall a b. (a -> b) -> a -> b
$ IO ("pDevice" ::: Ptr (Ptr Device_T))
-> (("pDevice" ::: Ptr (Ptr Device_T)) -> IO ())
-> (("pDevice" ::: Ptr (Ptr Device_T)) -> IO Device)
-> IO Device
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @(Ptr Device_T) Int
8) ("pDevice" ::: Ptr (Ptr Device_T)) -> IO ()
forall a. Ptr a -> IO ()
free
Result
r <- IO Result -> ContT Device IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT Device IO Result)
-> IO Result -> ContT Device IO Result
forall a b. (a -> b) -> a -> b
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkCreateDevice" (Ptr PhysicalDevice_T
-> ("pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo))
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ("pDevice" ::: Ptr (Ptr Device_T))
-> IO Result
vkCreateDevice'
(PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice))
(Ptr (DeviceCreateInfo a)
-> "pCreateInfo" ::: Ptr (SomeStruct DeviceCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions Ptr (DeviceCreateInfo a)
pCreateInfo)
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator
("pDevice" ::: Ptr (Ptr Device_T)
pPDevice))
IO () -> ContT Device IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Device IO ()) -> IO () -> ContT Device IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
Ptr Device_T
pDevice <- IO (Ptr Device_T) -> ContT Device IO (Ptr Device_T)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO (Ptr Device_T) -> ContT Device IO (Ptr Device_T))
-> IO (Ptr Device_T) -> ContT Device IO (Ptr Device_T)
forall a b. (a -> b) -> a -> b
$ forall a. Storable a => Ptr a -> IO a
peek @(Ptr Device_T) "pDevice" ::: Ptr (Ptr Device_T)
pPDevice
Device
pDevice' <- IO Device -> ContT Device IO Device
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Device -> ContT Device IO Device)
-> IO Device -> ContT Device IO Device
forall a b. (a -> b) -> a -> b
$ (\Ptr Device_T
h -> Ptr Device_T -> DeviceCmds -> Device
Device Ptr Device_T
h (DeviceCmds -> Device) -> IO DeviceCmds -> IO Device
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> InstanceCmds -> Ptr Device_T -> IO DeviceCmds
initDeviceCmds InstanceCmds
cmds Ptr Device_T
h) Ptr Device_T
pDevice
Device -> ContT Device IO Device
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Device -> ContT Device IO Device)
-> Device -> ContT Device IO Device
forall a b. (a -> b) -> a -> b
$ (Device
pDevice')
withDevice :: forall a io r . (Extendss DeviceCreateInfo a, PokeChain a, MonadIO io) => PhysicalDevice -> DeviceCreateInfo a -> Maybe AllocationCallbacks -> (io Device -> (Device -> io ()) -> r) -> r
withDevice :: forall (a :: [*]) (io :: * -> *) r.
(Extendss DeviceCreateInfo a, PokeChain a, MonadIO io) =>
PhysicalDevice
-> DeviceCreateInfo a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> (io Device -> (Device -> io ()) -> r)
-> r
withDevice PhysicalDevice
physicalDevice DeviceCreateInfo a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator io Device -> (Device -> io ()) -> r
b =
io Device -> (Device -> io ()) -> r
b (PhysicalDevice
-> DeviceCreateInfo a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io Device
forall (a :: [*]) (io :: * -> *).
(Extendss DeviceCreateInfo a, PokeChain a, MonadIO io) =>
PhysicalDevice
-> DeviceCreateInfo a
-> ("allocator" ::: Maybe AllocationCallbacks)
-> io Device
createDevice PhysicalDevice
physicalDevice DeviceCreateInfo a
pCreateInfo "allocator" ::: Maybe AllocationCallbacks
pAllocator)
(\(Device
o0) -> Device -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
forall (io :: * -> *).
MonadIO io =>
Device -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyDevice Device
o0 "allocator" ::: Maybe AllocationCallbacks
pAllocator)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkDestroyDevice
:: FunPtr (Ptr Device_T -> Ptr AllocationCallbacks -> IO ()) -> Ptr Device_T -> Ptr AllocationCallbacks -> IO ()
destroyDevice :: forall io
. (MonadIO io)
=>
Device
->
("allocator" ::: Maybe AllocationCallbacks)
-> io ()
destroyDevice :: forall (io :: * -> *).
MonadIO io =>
Device -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
destroyDevice Device
device "allocator" ::: Maybe AllocationCallbacks
allocator = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkDestroyDevicePtr :: FunPtr
(Ptr Device_T
-> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
vkDestroyDevicePtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
pVkDestroyDevice (case Device
device of Device{DeviceCmds
$sel:deviceCmds:Device :: Device -> DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
vkDestroyDevicePtr FunPtr
(Ptr Device_T
-> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
-> FunPtr
(Ptr Device_T
-> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkDestroyDevice is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkDestroyDevice' :: Ptr Device_T -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()
vkDestroyDevice' = FunPtr
(Ptr Device_T
-> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
-> Ptr Device_T
-> ("pAllocator" ::: Ptr AllocationCallbacks)
-> IO ()
mkVkDestroyDevice FunPtr
(Ptr Device_T
-> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ())
vkDestroyDevicePtr
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator <- case ("allocator" ::: Maybe AllocationCallbacks
allocator) of
"allocator" ::: Maybe AllocationCallbacks
Nothing -> ("pAllocator" ::: Ptr AllocationCallbacks)
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall (f :: * -> *) a. Applicative f => a -> f a
pure "pAllocator" ::: Ptr AllocationCallbacks
forall a. Ptr a
nullPtr
Just AllocationCallbacks
j -> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks))
-> ((("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ())
-> ContT () IO ("pAllocator" ::: Ptr AllocationCallbacks)
forall a b. (a -> b) -> a -> b
$ AllocationCallbacks
-> (("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()) -> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AllocationCallbacks
j)
IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent String
"vkDestroyDevice" (Ptr Device_T -> ("pAllocator" ::: Ptr AllocationCallbacks) -> IO ()
vkDestroyDevice'
(Device -> Ptr Device_T
deviceHandle (Device
device))
"pAllocator" ::: Ptr AllocationCallbacks
pAllocator)
() -> ContT () IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> ContT () IO ()) -> () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ ()
data DeviceQueueCreateInfo (es :: [Type]) = DeviceQueueCreateInfo
{
forall (es :: [*]). DeviceQueueCreateInfo es -> Chain es
next :: Chain es
,
forall (es :: [*]).
DeviceQueueCreateInfo es -> DeviceQueueCreateFlags
flags :: DeviceQueueCreateFlags
,
forall (es :: [*]). DeviceQueueCreateInfo es -> Word32
queueFamilyIndex :: Word32
,
forall (es :: [*]). DeviceQueueCreateInfo es -> Vector Float
queuePriorities :: Vector Float
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceQueueCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (DeviceQueueCreateInfo es)
instance Extensible DeviceQueueCreateInfo where
extensibleTypeName :: String
extensibleTypeName = String
"DeviceQueueCreateInfo"
setNext :: forall (ds :: [*]) (es :: [*]).
DeviceQueueCreateInfo ds -> Chain es -> DeviceQueueCreateInfo es
setNext DeviceQueueCreateInfo{Word32
Vector Float
Chain ds
DeviceQueueCreateFlags
queuePriorities :: Vector Float
queueFamilyIndex :: Word32
flags :: DeviceQueueCreateFlags
next :: Chain ds
$sel:queuePriorities:DeviceQueueCreateInfo :: forall (es :: [*]). DeviceQueueCreateInfo es -> Vector Float
$sel:queueFamilyIndex:DeviceQueueCreateInfo :: forall (es :: [*]). DeviceQueueCreateInfo es -> Word32
$sel:flags:DeviceQueueCreateInfo :: forall (es :: [*]).
DeviceQueueCreateInfo es -> DeviceQueueCreateFlags
$sel:next:DeviceQueueCreateInfo :: forall (es :: [*]). DeviceQueueCreateInfo es -> Chain es
..} Chain es
next' = DeviceQueueCreateInfo :: forall (es :: [*]).
Chain es
-> DeviceQueueCreateFlags
-> Word32
-> Vector Float
-> DeviceQueueCreateInfo es
DeviceQueueCreateInfo{$sel:next:DeviceQueueCreateInfo :: Chain es
next = Chain es
next', Word32
Vector Float
DeviceQueueCreateFlags
queuePriorities :: Vector Float
queueFamilyIndex :: Word32
flags :: DeviceQueueCreateFlags
$sel:queuePriorities:DeviceQueueCreateInfo :: Vector Float
$sel:queueFamilyIndex:DeviceQueueCreateInfo :: Word32
$sel:flags:DeviceQueueCreateInfo :: DeviceQueueCreateFlags
..}
getNext :: forall (es :: [*]). DeviceQueueCreateInfo es -> Chain es
getNext DeviceQueueCreateInfo{Word32
Vector Float
Chain es
DeviceQueueCreateFlags
queuePriorities :: Vector Float
queueFamilyIndex :: Word32
flags :: DeviceQueueCreateFlags
next :: Chain es
$sel:queuePriorities:DeviceQueueCreateInfo :: forall (es :: [*]). DeviceQueueCreateInfo es -> Vector Float
$sel:queueFamilyIndex:DeviceQueueCreateInfo :: forall (es :: [*]). DeviceQueueCreateInfo es -> Word32
$sel:flags:DeviceQueueCreateInfo :: forall (es :: [*]).
DeviceQueueCreateInfo es -> DeviceQueueCreateFlags
$sel:next:DeviceQueueCreateInfo :: forall (es :: [*]). DeviceQueueCreateInfo es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends DeviceQueueCreateInfo e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends DeviceQueueCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends DeviceQueueCreateInfo e => b
f
| Just e :~: DeviceQueueGlobalPriorityCreateInfoKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DeviceQueueGlobalPriorityCreateInfoKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceQueueCreateInfo e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance ( Extendss DeviceQueueCreateInfo es
, PokeChain es ) => ToCStruct (DeviceQueueCreateInfo es) where
withCStruct :: forall b.
DeviceQueueCreateInfo es
-> (Ptr (DeviceQueueCreateInfo es) -> IO b) -> IO b
withCStruct DeviceQueueCreateInfo es
x Ptr (DeviceQueueCreateInfo es) -> IO b
f = Int -> (Ptr (DeviceQueueCreateInfo es) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr (DeviceQueueCreateInfo es) -> IO b) -> IO b)
-> (Ptr (DeviceQueueCreateInfo es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (DeviceQueueCreateInfo es)
p -> Ptr (DeviceQueueCreateInfo es)
-> DeviceQueueCreateInfo es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (DeviceQueueCreateInfo es)
p DeviceQueueCreateInfo es
x (Ptr (DeviceQueueCreateInfo es) -> IO b
f Ptr (DeviceQueueCreateInfo es)
p)
pokeCStruct :: forall b.
Ptr (DeviceQueueCreateInfo es)
-> DeviceQueueCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (DeviceQueueCreateInfo es)
p DeviceQueueCreateInfo{Word32
Vector Float
Chain es
DeviceQueueCreateFlags
queuePriorities :: Vector Float
queueFamilyIndex :: Word32
flags :: DeviceQueueCreateFlags
next :: Chain es
$sel:queuePriorities:DeviceQueueCreateInfo :: forall (es :: [*]). DeviceQueueCreateInfo es -> Vector Float
$sel:queueFamilyIndex:DeviceQueueCreateInfo :: forall (es :: [*]). DeviceQueueCreateInfo es -> Word32
$sel:flags:DeviceQueueCreateInfo :: forall (es :: [*]).
DeviceQueueCreateInfo es -> DeviceQueueCreateFlags
$sel:next:DeviceQueueCreateInfo :: forall (es :: [*]). DeviceQueueCreateInfo es -> Chain es
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO)
Ptr ()
pNext'' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext''
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceQueueCreateFlags -> DeviceQueueCreateFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr DeviceQueueCreateFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceQueueCreateFlags)) (DeviceQueueCreateFlags
flags)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
queueFamilyIndex)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector Float -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Float -> Int) -> Vector Float -> Int
forall a b. (a -> b) -> a -> b
$ (Vector Float
queuePriorities)) :: Word32))
Ptr CFloat
pPQueuePriorities' <- ((Ptr CFloat -> IO b) -> IO b) -> ContT b IO (Ptr CFloat)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CFloat -> IO b) -> IO b) -> ContT b IO (Ptr CFloat))
-> ((Ptr CFloat -> IO b) -> IO b) -> ContT b IO (Ptr CFloat)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @CFloat ((Vector Float -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Float
queuePriorities)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
4)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> Float -> IO ()) -> Vector Float -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i Float
e -> Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr CFloat
pPQueuePriorities' Ptr CFloat -> Int -> Ptr CFloat
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr CFloat) (Float -> CFloat
CFloat (Float
e))) (Vector Float
queuePriorities)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CFloat) -> Ptr CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr (Ptr CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr CFloat))) (Ptr CFloat
pPQueuePriorities')
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr (DeviceQueueCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (DeviceQueueCreateInfo es)
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO)
Ptr ()
pNext' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext'
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance ( Extendss DeviceQueueCreateInfo es
, PeekChain es ) => FromCStruct (DeviceQueueCreateInfo es) where
peekCStruct :: Ptr (DeviceQueueCreateInfo es) -> IO (DeviceQueueCreateInfo es)
peekCStruct Ptr (DeviceQueueCreateInfo es)
p = do
Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
Chain es
next <- Ptr (Chain es) -> IO (Chain es)
forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (Ptr () -> Ptr (Chain es)
forall a b. Ptr a -> Ptr b
castPtr Ptr ()
pNext)
DeviceQueueCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @DeviceQueueCreateFlags ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr DeviceQueueCreateFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceQueueCreateFlags))
Word32
queueFamilyIndex <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
Word32
queueCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32))
Ptr CFloat
pQueuePriorities <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr CFloat) ((Ptr (DeviceQueueCreateInfo es)
p Ptr (DeviceQueueCreateInfo es) -> Int -> Ptr (Ptr CFloat)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr CFloat)))
Vector Float
pQueuePriorities' <- Int -> (Int -> IO Float) -> IO (Vector Float)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
queueCount) (\Int
i -> do
CFloat
pQueuePrioritiesElem <- forall a. Storable a => Ptr a -> IO a
peek @CFloat ((Ptr CFloat
pQueuePriorities Ptr CFloat -> Int -> Ptr CFloat
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr CFloat))
Float -> IO Float
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Float -> IO Float) -> Float -> IO Float
forall a b. (a -> b) -> a -> b
$ forall a b. Coercible a b => a -> b
coerce @CFloat @Float CFloat
pQueuePrioritiesElem)
DeviceQueueCreateInfo es -> IO (DeviceQueueCreateInfo es)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DeviceQueueCreateInfo es -> IO (DeviceQueueCreateInfo es))
-> DeviceQueueCreateInfo es -> IO (DeviceQueueCreateInfo es)
forall a b. (a -> b) -> a -> b
$ Chain es
-> DeviceQueueCreateFlags
-> Word32
-> Vector Float
-> DeviceQueueCreateInfo es
forall (es :: [*]).
Chain es
-> DeviceQueueCreateFlags
-> Word32
-> Vector Float
-> DeviceQueueCreateInfo es
DeviceQueueCreateInfo
Chain es
next DeviceQueueCreateFlags
flags Word32
queueFamilyIndex Vector Float
pQueuePriorities'
instance es ~ '[] => Zero (DeviceQueueCreateInfo es) where
zero :: DeviceQueueCreateInfo es
zero = Chain es
-> DeviceQueueCreateFlags
-> Word32
-> Vector Float
-> DeviceQueueCreateInfo es
forall (es :: [*]).
Chain es
-> DeviceQueueCreateFlags
-> Word32
-> Vector Float
-> DeviceQueueCreateInfo es
DeviceQueueCreateInfo
()
DeviceQueueCreateFlags
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Vector Float
forall a. Monoid a => a
mempty
data DeviceCreateInfo (es :: [Type]) = DeviceCreateInfo
{
forall (es :: [*]). DeviceCreateInfo es -> Chain es
next :: Chain es
,
forall (es :: [*]). DeviceCreateInfo es -> DeviceCreateFlags
flags :: DeviceCreateFlags
,
forall (es :: [*]).
DeviceCreateInfo es -> Vector (SomeStruct DeviceQueueCreateInfo)
queueCreateInfos :: Vector (SomeStruct DeviceQueueCreateInfo)
,
forall (es :: [*]). DeviceCreateInfo es -> Vector ByteString
enabledLayerNames :: Vector ByteString
,
forall (es :: [*]). DeviceCreateInfo es -> Vector ByteString
enabledExtensionNames :: Vector ByteString
,
forall (es :: [*]).
DeviceCreateInfo es -> Maybe PhysicalDeviceFeatures
enabledFeatures :: Maybe PhysicalDeviceFeatures
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (DeviceCreateInfo (es :: [Type]))
#endif
deriving instance Show (Chain es) => Show (DeviceCreateInfo es)
instance Extensible DeviceCreateInfo where
extensibleTypeName :: String
extensibleTypeName = String
"DeviceCreateInfo"
setNext :: forall (ds :: [*]) (es :: [*]).
DeviceCreateInfo ds -> Chain es -> DeviceCreateInfo es
setNext DeviceCreateInfo{Maybe PhysicalDeviceFeatures
Vector ByteString
Vector (SomeStruct DeviceQueueCreateInfo)
Chain ds
DeviceCreateFlags
enabledFeatures :: Maybe PhysicalDeviceFeatures
enabledExtensionNames :: Vector ByteString
enabledLayerNames :: Vector ByteString
queueCreateInfos :: Vector (SomeStruct DeviceQueueCreateInfo)
flags :: DeviceCreateFlags
next :: Chain ds
$sel:enabledFeatures:DeviceCreateInfo :: forall (es :: [*]).
DeviceCreateInfo es -> Maybe PhysicalDeviceFeatures
$sel:enabledExtensionNames:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> Vector ByteString
$sel:enabledLayerNames:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> Vector ByteString
$sel:queueCreateInfos:DeviceCreateInfo :: forall (es :: [*]).
DeviceCreateInfo es -> Vector (SomeStruct DeviceQueueCreateInfo)
$sel:flags:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> DeviceCreateFlags
$sel:next:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> Chain es
..} Chain es
next' = DeviceCreateInfo :: forall (es :: [*]).
Chain es
-> DeviceCreateFlags
-> Vector (SomeStruct DeviceQueueCreateInfo)
-> Vector ByteString
-> Vector ByteString
-> Maybe PhysicalDeviceFeatures
-> DeviceCreateInfo es
DeviceCreateInfo{$sel:next:DeviceCreateInfo :: Chain es
next = Chain es
next', Maybe PhysicalDeviceFeatures
Vector ByteString
Vector (SomeStruct DeviceQueueCreateInfo)
DeviceCreateFlags
enabledFeatures :: Maybe PhysicalDeviceFeatures
enabledExtensionNames :: Vector ByteString
enabledLayerNames :: Vector ByteString
queueCreateInfos :: Vector (SomeStruct DeviceQueueCreateInfo)
flags :: DeviceCreateFlags
$sel:enabledFeatures:DeviceCreateInfo :: Maybe PhysicalDeviceFeatures
$sel:enabledExtensionNames:DeviceCreateInfo :: Vector ByteString
$sel:enabledLayerNames:DeviceCreateInfo :: Vector ByteString
$sel:queueCreateInfos:DeviceCreateInfo :: Vector (SomeStruct DeviceQueueCreateInfo)
$sel:flags:DeviceCreateInfo :: DeviceCreateFlags
..}
getNext :: forall (es :: [*]). DeviceCreateInfo es -> Chain es
getNext DeviceCreateInfo{Maybe PhysicalDeviceFeatures
Vector ByteString
Vector (SomeStruct DeviceQueueCreateInfo)
Chain es
DeviceCreateFlags
enabledFeatures :: Maybe PhysicalDeviceFeatures
enabledExtensionNames :: Vector ByteString
enabledLayerNames :: Vector ByteString
queueCreateInfos :: Vector (SomeStruct DeviceQueueCreateInfo)
flags :: DeviceCreateFlags
next :: Chain es
$sel:enabledFeatures:DeviceCreateInfo :: forall (es :: [*]).
DeviceCreateInfo es -> Maybe PhysicalDeviceFeatures
$sel:enabledExtensionNames:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> Vector ByteString
$sel:enabledLayerNames:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> Vector ByteString
$sel:queueCreateInfos:DeviceCreateInfo :: forall (es :: [*]).
DeviceCreateInfo es -> Vector (SomeStruct DeviceQueueCreateInfo)
$sel:flags:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> DeviceCreateFlags
$sel:next:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> Chain es
..} = Chain es
next
extends :: forall e b proxy. Typeable e => proxy e -> (Extends DeviceCreateInfo e => b) -> Maybe b
extends :: forall e b (proxy :: * -> *).
Typeable e =>
proxy e -> (Extends DeviceCreateInfo e => b) -> Maybe b
extends proxy e
_ Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceRayTracingInvocationReorderFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceRayTracingInvocationReorderFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderCoreBuiltinsFeaturesARM
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderCoreBuiltinsFeaturesARM = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceFaultFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceFaultFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceOpticalFlowFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceOpticalFlowFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceAddressBindingReportFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceAddressBindingReportFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDepthClampZeroOneFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDepthClampZeroOneFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceAmigoProfilingFeaturesSEC
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceAmigoProfilingFeaturesSEC = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceTilePropertiesFeaturesQCOM
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceTilePropertiesFeaturesQCOM = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceImageProcessingFeaturesQCOM
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceImageProcessingFeaturesQCOM = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePipelineRobustnessFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePipelineRobustnessFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceNonSeamlessCubeMapFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceNonSeamlessCubeMapFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePipelinePropertiesFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePipelinePropertiesFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceOpacityMicromapFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceOpacityMicromapFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceSubpassMergeFeedbackFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceSubpassMergeFeedbackFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceImageCompressionControlSwapchainFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceImageCompressionControlFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceImageCompressionControlFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderModuleIdentifierFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderModuleIdentifierFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDescriptorSetHostMappingFeaturesVALVE = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceGraphicsPipelineLibraryFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceLinearColorAttachmentFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceLinearColorAttachmentFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceImageViewMinLodFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceImageViewMinLodFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDynamicRenderingFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDynamicRenderingFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceRGBA10X6FormatsFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceRGBA10X6FormatsFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceRayTracingMotionBlurFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceRayTracingMotionBlurFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceFragmentShaderBarycentricFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceFragmentShaderBarycentricFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderIntegerDotProductFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderIntegerDotProductFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceProvokingVertexFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceProvokingVertexFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceInheritedViewportScissorFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceInheritedViewportScissorFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePipelineProtectedAccessFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePipelineProtectedAccessFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceLegacyDitheringFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceLegacyDitheringFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePrimitivesGeneratedQueryFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceSynchronization2Features
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceSynchronization2Features = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceColorWriteEnableFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceColorWriteEnableFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceExternalMemoryRDMAFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceExternalMemoryRDMAFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceVertexInputDynamicStateFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceVertexInputDynamicStateFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDepthClipControlFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDepthClipControlFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceMutableDescriptorTypeFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceMutableDescriptorTypeFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceImage2DViewOf3DFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceImage2DViewOf3DFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceFragmentShadingRateEnumsFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceFragmentShadingRateEnumsFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderTerminateInvocationFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderTerminateInvocationFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceFragmentShadingRateFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceFragmentShadingRateFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderImageAtomicInt64FeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderImageAtomicInt64FeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceSubpassShadingFeaturesHUAWEI
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceSubpassShadingFeaturesHUAWEI = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevice4444FormatsFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevice4444FormatsFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePortabilitySubsetFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePortabilitySubsetFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceImageRobustnessFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceImageRobustnessFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceRobustness2FeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceRobustness2FeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceZeroInitializeWorkgroupMemoryFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: DeviceDiagnosticsConfigCreateInfoNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DeviceDiagnosticsConfigCreateInfoNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDiagnosticsConfigFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDiagnosticsConfigFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceExtendedDynamicState3FeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceExtendedDynamicState3FeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceExtendedDynamicState2FeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceExtendedDynamicState2FeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceExtendedDynamicStateFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceExtendedDynamicStateFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceBorderColorSwizzleFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceBorderColorSwizzleFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceCustomBorderColorFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceCustomBorderColorFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceCoherentMemoryFeaturesAMD
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceCoherentMemoryFeaturesAMD = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceVulkan13Features
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceVulkan13Features = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceVulkan12Features
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceVulkan12Features = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceVulkan11Features
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceVulkan11Features = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePipelineCreationCacheControlFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePipelineCreationCacheControlFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceLineRasterizationFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceLineRasterizationFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceSubgroupSizeControlFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceSubgroupSizeControlFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceTexelBufferAlignmentFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceTexelBufferAlignmentFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderDemoteToHelperInvocationFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderDemoteToHelperInvocationFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePipelineExecutablePropertiesFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePipelineExecutablePropertiesFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceSeparateDepthStencilLayoutsFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceSeparateDepthStencilLayoutsFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceFragmentShaderInterlockFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceFragmentShaderInterlockFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderSMBuiltinsFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderSMBuiltinsFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceIndexTypeUint8FeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceIndexTypeUint8FeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderClockFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderClockFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceCoverageReductionModeFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceCoverageReductionModeFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePerformanceQueryFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePerformanceQueryFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePresentBarrierFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePresentBarrierFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceYcbcrImageArraysFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceYcbcrImageArraysFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceCooperativeMatrixFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceCooperativeMatrixFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceTextureCompressionASTCHDRFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceTextureCompressionASTCHDRFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceImagelessFramebufferFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceImagelessFramebufferFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceBufferDeviceAddressFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceBufferDeviceAddressFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceBufferDeviceAddressFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceBufferDeviceAddressFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePageableDeviceLocalMemoryFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceMemoryPriorityFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceMemoryPriorityFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDepthClipEnableFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDepthClipEnableFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceUniformBufferStandardLayoutFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceUniformBufferStandardLayoutFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceScalarBlockLayoutFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceScalarBlockLayoutFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceFragmentDensityMap2FeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceFragmentDensityMap2FeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceFragmentDensityMapFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceFragmentDensityMapFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: DeviceMemoryOverallocationCreateInfoAMD
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DeviceMemoryOverallocationCreateInfoAMD = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceRayTracingMaintenance1FeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceRayTracingMaintenance1FeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceRayQueryFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceRayQueryFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceRayTracingPipelineFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceRayTracingPipelineFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceAccelerationStructureFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceAccelerationStructureFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceMeshShaderFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceMeshShaderFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceMeshShaderFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceMeshShaderFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceInvocationMaskFeaturesHUAWEI
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceInvocationMaskFeaturesHUAWEI = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShadingRateImageFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShadingRateImageFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceMemoryDecompressionFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceMemoryDecompressionFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceCopyMemoryIndirectFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceCopyMemoryIndirectFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderImageFootprintFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderImageFootprintFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceComputeShaderDerivativesFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceComputeShaderDerivativesFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceCornerSampledImageFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceCornerSampledImageFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceExclusiveScissorFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceExclusiveScissorFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceRepresentativeFragmentTestFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceRepresentativeFragmentTestFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceTransformFeedbackFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceTransformFeedbackFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceASTCDecodeFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceASTCDecodeFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceVertexAttributeDivisorFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceVertexAttributeDivisorFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderAtomicFloat2FeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderAtomicFloat2FeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderAtomicFloatFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderAtomicFloatFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderAtomicInt64Features
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderAtomicInt64Features = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceVulkanMemoryModelFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceVulkanMemoryModelFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceConditionalRenderingFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceConditionalRenderingFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevice8BitStorageFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevice8BitStorageFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceTimelineSemaphoreFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceTimelineSemaphoreFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDescriptorIndexingFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDescriptorIndexingFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: DeviceDeviceMemoryReportCreateInfoEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DeviceDeviceMemoryReportCreateInfoEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDeviceMemoryReportFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDeviceMemoryReportFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceGlobalPriorityQueryFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceGlobalPriorityQueryFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceHostQueryResetFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceHostQueryResetFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderFloat16Int8Features
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderFloat16Int8Features = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderDrawParametersFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderDrawParametersFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceMaintenance4Features
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceMaintenance4Features = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceInlineUniformBlockFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceInlineUniformBlockFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceMultiDrawFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceMultiDrawFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceBlendOperationAdvancedFeaturesEXT
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceBlendOperationAdvancedFeaturesEXT = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceProtectedMemoryFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceProtectedMemoryFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceSamplerYcbcrConversionFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceSamplerYcbcrConversionFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceShaderSubgroupExtendedTypesFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceShaderSubgroupExtendedTypesFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevice16BitStorageFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevice16BitStorageFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePresentWaitFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePresentWaitFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePresentIdFeaturesKHR
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePresentIdFeaturesKHR = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: DeviceGroupDeviceCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DeviceGroupDeviceCreateInfo = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceMultiviewFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceMultiviewFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceVariablePointersFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceVariablePointersFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceFeatures2 '[]
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @(PhysicalDeviceFeatures2 '[]) = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDevicePrivateDataFeatures
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDevicePrivateDataFeatures = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: DevicePrivateDataCreateInfo
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @DevicePrivateDataCreateInfo = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Just e :~: PhysicalDeviceDeviceGeneratedCommandsFeaturesNV
Refl <- forall {k} (a :: k) (b :: k).
(Typeable a, Typeable b) =>
Maybe (a :~: b)
forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
eqT @e @PhysicalDeviceDeviceGeneratedCommandsFeaturesNV = b -> Maybe b
forall a. a -> Maybe a
Just b
Extends DeviceCreateInfo e => b
f
| Bool
otherwise = Maybe b
forall a. Maybe a
Nothing
instance ( Extendss DeviceCreateInfo es
, PokeChain es ) => ToCStruct (DeviceCreateInfo es) where
withCStruct :: forall b.
DeviceCreateInfo es -> (Ptr (DeviceCreateInfo es) -> IO b) -> IO b
withCStruct DeviceCreateInfo es
x Ptr (DeviceCreateInfo es) -> IO b
f = Int -> (Ptr (DeviceCreateInfo es) -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
72 ((Ptr (DeviceCreateInfo es) -> IO b) -> IO b)
-> (Ptr (DeviceCreateInfo es) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr (DeviceCreateInfo es)
p -> Ptr (DeviceCreateInfo es) -> DeviceCreateInfo es -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr (DeviceCreateInfo es)
p DeviceCreateInfo es
x (Ptr (DeviceCreateInfo es) -> IO b
f Ptr (DeviceCreateInfo es)
p)
pokeCStruct :: forall b.
Ptr (DeviceCreateInfo es) -> DeviceCreateInfo es -> IO b -> IO b
pokeCStruct Ptr (DeviceCreateInfo es)
p DeviceCreateInfo{Maybe PhysicalDeviceFeatures
Vector ByteString
Vector (SomeStruct DeviceQueueCreateInfo)
Chain es
DeviceCreateFlags
enabledFeatures :: Maybe PhysicalDeviceFeatures
enabledExtensionNames :: Vector ByteString
enabledLayerNames :: Vector ByteString
queueCreateInfos :: Vector (SomeStruct DeviceQueueCreateInfo)
flags :: DeviceCreateFlags
next :: Chain es
$sel:enabledFeatures:DeviceCreateInfo :: forall (es :: [*]).
DeviceCreateInfo es -> Maybe PhysicalDeviceFeatures
$sel:enabledExtensionNames:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> Vector ByteString
$sel:enabledLayerNames:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> Vector ByteString
$sel:queueCreateInfos:DeviceCreateInfo :: forall (es :: [*]).
DeviceCreateInfo es -> Vector (SomeStruct DeviceQueueCreateInfo)
$sel:flags:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> DeviceCreateFlags
$sel:next:DeviceCreateInfo :: forall (es :: [*]). DeviceCreateInfo es -> Chain es
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_CREATE_INFO)
Ptr ()
pNext'' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ Chain es -> (Ptr (Chain es) -> IO b) -> IO b
forall (es :: [*]) a.
PokeChain es =>
Chain es -> (Ptr (Chain es) -> IO a) -> IO a
withChain (Chain es
next)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext''
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceCreateFlags -> DeviceCreateFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr DeviceCreateFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceCreateFlags)) (DeviceCreateFlags
flags)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector (SomeStruct DeviceQueueCreateInfo) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct DeviceQueueCreateInfo) -> Int)
-> Vector (SomeStruct DeviceQueueCreateInfo) -> Int
forall a b. (a -> b) -> a -> b
$ (Vector (SomeStruct DeviceQueueCreateInfo)
queueCreateInfos)) :: Word32))
Ptr (DeviceQueueCreateInfo Any)
pPQueueCreateInfos' <- ((Ptr (DeviceQueueCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (DeviceQueueCreateInfo Any))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (DeviceQueueCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (DeviceQueueCreateInfo Any)))
-> ((Ptr (DeviceQueueCreateInfo Any) -> IO b) -> IO b)
-> ContT b IO (Ptr (DeviceQueueCreateInfo Any))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(DeviceQueueCreateInfo _) ((Vector (SomeStruct DeviceQueueCreateInfo) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector (SomeStruct DeviceQueueCreateInfo)
queueCreateInfos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
40)
(Int -> SomeStruct DeviceQueueCreateInfo -> ContT b IO ())
-> Vector (SomeStruct DeviceQueueCreateInfo) -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i SomeStruct DeviceQueueCreateInfo
e -> ((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (SomeStruct DeviceQueueCreateInfo)
-> SomeStruct DeviceQueueCreateInfo -> IO b -> IO b
forall (a :: [*] -> *) b.
(forall (es :: [*]).
(Extendss a es, PokeChain es) =>
ToCStruct (a es)) =>
Ptr (SomeStruct a) -> SomeStruct a -> IO b -> IO b
pokeSomeCStruct (Ptr (DeviceQueueCreateInfo Any)
-> Ptr (SomeStruct DeviceQueueCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions (Ptr (DeviceQueueCreateInfo Any)
pPQueueCreateInfos' Ptr (DeviceQueueCreateInfo Any)
-> Int -> Ptr (DeviceQueueCreateInfo w)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
40 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (DeviceQueueCreateInfo _))) (SomeStruct DeviceQueueCreateInfo
e) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())) (Vector (SomeStruct DeviceQueueCreateInfo)
queueCreateInfos)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (DeviceQueueCreateInfo Any))
-> Ptr (DeviceQueueCreateInfo Any) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es)
-> Int -> Ptr (Ptr (DeviceQueueCreateInfo w))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr (DeviceQueueCreateInfo _)))) (Ptr (DeviceQueueCreateInfo Any)
pPQueueCreateInfos')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector ByteString -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ByteString -> Int) -> Vector ByteString -> Int
forall a b. (a -> b) -> a -> b
$ (Vector ByteString
enabledLayerNames)) :: Word32))
Ptr (Ptr CChar)
pPpEnabledLayerNames' <- ((Ptr (Ptr CChar) -> IO b) -> IO b) -> ContT b IO (Ptr (Ptr CChar))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Ptr CChar) -> IO b) -> IO b)
-> ContT b IO (Ptr (Ptr CChar)))
-> ((Ptr (Ptr CChar) -> IO b) -> IO b)
-> ContT b IO (Ptr (Ptr CChar))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(Ptr CChar) ((Vector ByteString -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ByteString
enabledLayerNames)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
(Int -> ByteString -> ContT b IO ())
-> Vector ByteString -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i ByteString
e -> do
Ptr CChar
ppEnabledLayerNames'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
e)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr (Ptr CChar)
pPpEnabledLayerNames' Ptr (Ptr CChar) -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr CChar)) Ptr CChar
ppEnabledLayerNames'') (Vector ByteString
enabledLayerNames)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (Ptr CChar)) -> Ptr (Ptr CChar) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr (Ptr (Ptr CChar))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr (Ptr CChar)))) (Ptr (Ptr CChar)
pPpEnabledLayerNames')
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32)) ((Int -> Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector ByteString -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ByteString -> Int) -> Vector ByteString -> Int
forall a b. (a -> b) -> a -> b
$ (Vector ByteString
enabledExtensionNames)) :: Word32))
Ptr (Ptr CChar)
pPpEnabledExtensionNames' <- ((Ptr (Ptr CChar) -> IO b) -> IO b) -> ContT b IO (Ptr (Ptr CChar))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Ptr CChar) -> IO b) -> IO b)
-> ContT b IO (Ptr (Ptr CChar)))
-> ((Ptr (Ptr CChar) -> IO b) -> IO b)
-> ContT b IO (Ptr (Ptr CChar))
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @(Ptr CChar) ((Vector ByteString -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ByteString
enabledExtensionNames)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
8)
(Int -> ByteString -> ContT b IO ())
-> Vector ByteString -> ContT b IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\Int
i ByteString
e -> do
Ptr CChar
ppEnabledExtensionNames'' <- ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar))
-> ((Ptr CChar -> IO b) -> IO b) -> ContT b IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ ByteString -> (Ptr CChar -> IO b) -> IO b
forall a. ByteString -> (Ptr CChar -> IO a) -> IO a
useAsCString (ByteString
e)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CChar) -> Ptr CChar -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr (Ptr CChar)
pPpEnabledExtensionNames' Ptr (Ptr CChar) -> Int -> Ptr (Ptr CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr CChar)) Ptr CChar
ppEnabledExtensionNames'') (Vector ByteString
enabledExtensionNames)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr (Ptr CChar)) -> Ptr (Ptr CChar) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr (Ptr (Ptr CChar))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr (Ptr (Ptr CChar)))) (Ptr (Ptr CChar)
pPpEnabledExtensionNames')
Ptr PhysicalDeviceFeatures
pEnabledFeatures'' <- case (Maybe PhysicalDeviceFeatures
enabledFeatures) of
Maybe PhysicalDeviceFeatures
Nothing -> Ptr PhysicalDeviceFeatures
-> ContT b IO (Ptr PhysicalDeviceFeatures)
forall (f :: * -> *) a. Applicative f => a -> f a
pure Ptr PhysicalDeviceFeatures
forall a. Ptr a
nullPtr
Just PhysicalDeviceFeatures
j -> ((Ptr PhysicalDeviceFeatures -> IO b) -> IO b)
-> ContT b IO (Ptr PhysicalDeviceFeatures)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr PhysicalDeviceFeatures -> IO b) -> IO b)
-> ContT b IO (Ptr PhysicalDeviceFeatures))
-> ((Ptr PhysicalDeviceFeatures -> IO b) -> IO b)
-> ContT b IO (Ptr PhysicalDeviceFeatures)
forall a b. (a -> b) -> a -> b
$ PhysicalDeviceFeatures
-> (Ptr PhysicalDeviceFeatures -> IO b) -> IO b
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (PhysicalDeviceFeatures
j)
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr PhysicalDeviceFeatures)
-> Ptr PhysicalDeviceFeatures -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es)
-> Int -> Ptr (Ptr PhysicalDeviceFeatures)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr (Ptr PhysicalDeviceFeatures))) Ptr PhysicalDeviceFeatures
pEnabledFeatures''
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
72
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr (DeviceCreateInfo es) -> IO b -> IO b
pokeZeroCStruct Ptr (DeviceCreateInfo es)
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_DEVICE_CREATE_INFO)
Ptr ()
pNext' <- (Ptr (Chain es) -> Ptr ())
-> ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ())
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Ptr (Chain es) -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr (ContT b IO (Ptr (Chain es)) -> ContT b IO (Ptr ()))
-> (((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr (Chain es)))
-> ((Ptr (Chain es) -> IO b) -> IO b)
-> ContT b IO (Ptr ())
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr (Chain es))
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ()))
-> ((Ptr (Chain es) -> IO b) -> IO b) -> ContT b IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ forall (es :: [*]) a.
PokeChain es =>
(Ptr (Chain es) -> IO a) -> IO a
withZeroChain @es
IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) Ptr ()
pNext'
IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance ( Extendss DeviceCreateInfo es
, PeekChain es ) => FromCStruct (DeviceCreateInfo es) where
peekCStruct :: Ptr (DeviceCreateInfo es) -> IO (DeviceCreateInfo es)
peekCStruct Ptr (DeviceCreateInfo es)
p = do
Ptr ()
pNext <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr ()) ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ())))
Chain es
next <- Ptr (Chain es) -> IO (Chain es)
forall (es :: [*]). PeekChain es => Ptr (Chain es) -> IO (Chain es)
peekChain (Ptr () -> Ptr (Chain es)
forall a b. Ptr a -> Ptr b
castPtr Ptr ()
pNext)
DeviceCreateFlags
flags <- forall a. Storable a => Ptr a -> IO a
peek @DeviceCreateFlags ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr DeviceCreateFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr DeviceCreateFlags))
Word32
queueCreateInfoCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32))
Ptr (DeviceQueueCreateInfo Any)
pQueueCreateInfos <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (DeviceQueueCreateInfo _)) ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es)
-> Int -> Ptr (Ptr (DeviceQueueCreateInfo w))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr (Ptr (DeviceQueueCreateInfo _))))
Vector (SomeStruct DeviceQueueCreateInfo)
pQueueCreateInfos' <- Int
-> (Int -> IO (SomeStruct DeviceQueueCreateInfo))
-> IO (Vector (SomeStruct DeviceQueueCreateInfo))
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
queueCreateInfoCount) (\Int
i -> Ptr (SomeStruct DeviceQueueCreateInfo)
-> IO (SomeStruct DeviceQueueCreateInfo)
forall (a :: [*] -> *).
(Extensible a,
forall (es :: [*]).
(Extendss a es, PeekChain es) =>
FromCStruct (a es)) =>
Ptr (SomeStruct a) -> IO (SomeStruct a)
peekSomeCStruct (Ptr (DeviceQueueCreateInfo Any)
-> Ptr (SomeStruct DeviceQueueCreateInfo)
forall (a :: [*] -> *) (es :: [*]).
Ptr (a es) -> Ptr (SomeStruct a)
forgetExtensions ((Ptr (DeviceQueueCreateInfo Any)
pQueueCreateInfos Ptr (DeviceQueueCreateInfo Any)
-> Int -> Ptr (DeviceQueueCreateInfo Any)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
40 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (DeviceQueueCreateInfo _)))))
Word32
enabledLayerCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Word32))
Ptr (Ptr CChar)
ppEnabledLayerNames <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (Ptr CChar)) ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr (Ptr (Ptr CChar))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr (Ptr (Ptr CChar))))
Vector ByteString
ppEnabledLayerNames' <- Int -> (Int -> IO ByteString) -> IO (Vector ByteString)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
enabledLayerCount) (\Int
i -> Ptr CChar -> IO ByteString
packCString (Ptr CChar -> IO ByteString) -> IO (Ptr CChar) -> IO ByteString
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr CChar) -> IO (Ptr CChar)
forall a. Storable a => Ptr a -> IO a
peek ((Ptr (Ptr CChar)
ppEnabledLayerNames Ptr (Ptr CChar) -> Int -> Ptr (Ptr CChar)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr CChar))))
Word32
enabledExtensionCount <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr Word32))
Ptr (Ptr CChar)
ppEnabledExtensionNames <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr (Ptr CChar)) ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es) -> Int -> Ptr (Ptr (Ptr CChar))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr (Ptr (Ptr CChar))))
Vector ByteString
ppEnabledExtensionNames' <- Int -> (Int -> IO ByteString) -> IO (Vector ByteString)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (Word32 -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
enabledExtensionCount) (\Int
i -> Ptr CChar -> IO ByteString
packCString (Ptr CChar -> IO ByteString) -> IO (Ptr CChar) -> IO ByteString
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Ptr (Ptr CChar) -> IO (Ptr CChar)
forall a. Storable a => Ptr a -> IO a
peek ((Ptr (Ptr CChar)
ppEnabledExtensionNames Ptr (Ptr CChar) -> Int -> Ptr (Ptr CChar)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
8 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr (Ptr CChar))))
Ptr PhysicalDeviceFeatures
pEnabledFeatures <- forall a. Storable a => Ptr a -> IO a
peek @(Ptr PhysicalDeviceFeatures) ((Ptr (DeviceCreateInfo es)
p Ptr (DeviceCreateInfo es)
-> Int -> Ptr (Ptr PhysicalDeviceFeatures)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr (Ptr PhysicalDeviceFeatures)))
Maybe PhysicalDeviceFeatures
pEnabledFeatures' <- (Ptr PhysicalDeviceFeatures -> IO PhysicalDeviceFeatures)
-> Ptr PhysicalDeviceFeatures -> IO (Maybe PhysicalDeviceFeatures)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek (\Ptr PhysicalDeviceFeatures
j -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PhysicalDeviceFeatures (Ptr PhysicalDeviceFeatures
j)) Ptr PhysicalDeviceFeatures
pEnabledFeatures
DeviceCreateInfo es -> IO (DeviceCreateInfo es)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DeviceCreateInfo es -> IO (DeviceCreateInfo es))
-> DeviceCreateInfo es -> IO (DeviceCreateInfo es)
forall a b. (a -> b) -> a -> b
$ Chain es
-> DeviceCreateFlags
-> Vector (SomeStruct DeviceQueueCreateInfo)
-> Vector ByteString
-> Vector ByteString
-> Maybe PhysicalDeviceFeatures
-> DeviceCreateInfo es
forall (es :: [*]).
Chain es
-> DeviceCreateFlags
-> Vector (SomeStruct DeviceQueueCreateInfo)
-> Vector ByteString
-> Vector ByteString
-> Maybe PhysicalDeviceFeatures
-> DeviceCreateInfo es
DeviceCreateInfo
Chain es
next
DeviceCreateFlags
flags
Vector (SomeStruct DeviceQueueCreateInfo)
pQueueCreateInfos'
Vector ByteString
ppEnabledLayerNames'
Vector ByteString
ppEnabledExtensionNames'
Maybe PhysicalDeviceFeatures
pEnabledFeatures'
instance es ~ '[] => Zero (DeviceCreateInfo es) where
zero :: DeviceCreateInfo es
zero = Chain es
-> DeviceCreateFlags
-> Vector (SomeStruct DeviceQueueCreateInfo)
-> Vector ByteString
-> Vector ByteString
-> Maybe PhysicalDeviceFeatures
-> DeviceCreateInfo es
forall (es :: [*]).
Chain es
-> DeviceCreateFlags
-> Vector (SomeStruct DeviceQueueCreateInfo)
-> Vector ByteString
-> Vector ByteString
-> Maybe PhysicalDeviceFeatures
-> DeviceCreateInfo es
DeviceCreateInfo
()
DeviceCreateFlags
forall a. Zero a => a
zero
Vector (SomeStruct DeviceQueueCreateInfo)
forall a. Monoid a => a
mempty
Vector ByteString
forall a. Monoid a => a
mempty
Vector ByteString
forall a. Monoid a => a
mempty
Maybe PhysicalDeviceFeatures
forall a. Maybe a
Nothing