@@ -14,47 +14,110 @@ pub fn limits_from_hal(limits: Limits) -> VkPhysicalDeviceLimits {
14
14
maxImageDimension2D : limits. max_image_2d_size ,
15
15
maxImageDimension3D : limits. max_image_3d_size ,
16
16
maxImageDimensionCube : limits. max_image_cube_size ,
17
- maxFramebufferWidth : limits. max_framebuffer_extent . width ,
18
- maxFramebufferHeight : limits. max_framebuffer_extent . height ,
17
+ maxImageArrayLayers : limits. max_image_array_layers as _ ,
19
18
maxTexelBufferElements : limits. max_texel_elements as _ ,
20
- maxTessellationPatchSize : limits. max_patch_size as _ ,
19
+ maxUniformBufferRange : limits. max_uniform_buffer_range as _ ,
20
+ maxStorageBufferRange : limits. max_storage_buffer_range as _ ,
21
21
maxPushConstantsSize : limits. max_push_constants_size as _ ,
22
- maxViewports : limits. max_viewports as _ ,
23
- maxViewportDimensions : limits. max_viewport_dimensions ,
22
+ maxMemoryAllocationCount : limits. max_memory_allocation_count as _ ,
23
+ maxSamplerAllocationCount : limits. max_sampler_allocation_count as _ ,
24
+ bufferImageGranularity : limits. buffer_image_granularity ,
25
+ sparseAddressSpaceSize : 0 ,
24
26
maxBoundDescriptorSets : limits. max_bound_descriptor_sets as _ ,
27
+ maxPerStageDescriptorSamplers : limits. max_per_stage_descriptor_samplers as _ ,
25
28
maxPerStageDescriptorUniformBuffers : limits. max_per_stage_descriptor_uniform_buffers as _ ,
29
+ maxPerStageDescriptorStorageBuffers : limits. max_per_stage_descriptor_storage_buffers as _ ,
30
+ maxPerStageDescriptorSampledImages : limits. max_per_stage_descriptor_sampled_images as _ ,
31
+ maxPerStageDescriptorStorageImages : limits. max_per_stage_descriptor_storage_images as _ ,
32
+ maxPerStageDescriptorInputAttachments : limits. max_per_stage_descriptor_input_attachments as _ ,
33
+ maxPerStageResources : limits. max_per_stage_resources as _ ,
34
+ maxDescriptorSetSamplers : limits. max_descriptor_set_samplers as _ ,
26
35
maxDescriptorSetUniformBuffers : limits. max_descriptor_set_uniform_buffers as _ ,
27
- maxFragmentInputComponents : limits. max_fragment_input_components as _ ,
28
- maxFramebufferLayers : limits. max_framebuffer_layers as _ ,
29
- maxMemoryAllocationCount : limits. max_memory_allocation_count as _ ,
30
- maxUniformBufferRange : limits. max_uniform_buffer_range as _ ,
31
- // Warning: spec violation
32
- // "The x/y rectangle of the viewport must lie entirely within the current attachment size."
33
- viewportBoundsRange : [ 0.0 , viewport_size as f32 ] ,
36
+ maxDescriptorSetUniformBuffersDynamic : limits. max_descriptor_set_uniform_buffers_dynamic . max ( 1 ) as _ ,
37
+ maxDescriptorSetStorageBuffers : limits. max_descriptor_set_storage_buffers as _ ,
38
+ maxDescriptorSetStorageBuffersDynamic : limits. max_descriptor_set_storage_buffers_dynamic . max ( 1 ) as _ ,
39
+ maxDescriptorSetSampledImages : limits. max_descriptor_set_sampled_images as _ ,
40
+ maxDescriptorSetStorageImages : limits. max_descriptor_set_storage_images as _ ,
41
+ maxDescriptorSetInputAttachments : limits. max_descriptor_set_input_attachments as _ ,
34
42
maxVertexInputAttributes : limits. max_vertex_input_attributes as _ ,
35
43
maxVertexInputBindings : limits. max_vertex_input_bindings as _ ,
36
44
maxVertexInputAttributeOffset : limits. max_vertex_input_attribute_offset as _ ,
37
45
maxVertexInputBindingStride : limits. max_vertex_input_binding_stride as _ ,
38
46
maxVertexOutputComponents : limits. max_vertex_output_components as _ ,
47
+ maxTessellationGenerationLevel : 0 ,
48
+ maxTessellationPatchSize : limits. max_patch_size as _ ,
49
+ maxTessellationControlPerVertexInputComponents : 0 ,
50
+ maxTessellationControlPerVertexOutputComponents : 0 ,
51
+ maxTessellationControlPerPatchOutputComponents : 0 ,
52
+ maxTessellationControlTotalOutputComponents : 0 ,
53
+ maxTessellationEvaluationInputComponents : 0 ,
54
+ maxTessellationEvaluationOutputComponents : 0 ,
55
+ maxGeometryShaderInvocations : limits. max_geometry_shader_invocations as _ ,
56
+ maxGeometryInputComponents : limits. max_geometry_input_components as _ ,
57
+ maxGeometryOutputComponents : limits. max_geometry_output_components as _ ,
58
+ maxGeometryOutputVertices : limits. max_geometry_output_vertices as _ ,
59
+ maxGeometryTotalOutputComponents : limits. max_geometry_total_output_components as _ ,
60
+ maxFragmentInputComponents : limits. max_fragment_input_components as _ ,
61
+ maxFragmentOutputAttachments : limits. max_fragment_output_attachments as _ ,
62
+ maxFragmentDualSrcAttachments : limits. max_fragment_dual_source_attachments as _ ,
63
+ maxFragmentCombinedOutputResources : limits. max_fragment_combined_output_resources as _ ,
64
+ maxComputeSharedMemorySize : limits. max_compute_shared_memory_size as _ ,
39
65
maxComputeWorkGroupCount : limits. max_compute_work_group_count ,
66
+ maxComputeWorkGroupInvocations : limits. max_compute_work_group_invocations as _ ,
40
67
maxComputeWorkGroupSize : limits. max_compute_work_group_size ,
41
- bufferImageGranularity : limits. buffer_image_granularity ,
68
+ subPixelPrecisionBits : 0 ,
69
+ subTexelPrecisionBits : 0 ,
70
+ mipmapPrecisionBits : 0 ,
71
+ maxDrawIndexedIndexValue : limits. max_draw_indexed_index_value ,
72
+ maxDrawIndirectCount : limits. max_draw_indirect_count ,
73
+ maxSamplerLodBias : limits. max_sampler_lod_bias ,
74
+ maxSamplerAnisotropy : limits. max_sampler_anisotropy ,
75
+ maxViewports : limits. max_viewports as _ ,
76
+ maxViewportDimensions : limits. max_viewport_dimensions ,
77
+ // Warning: spec violation
78
+ // "The x/y rectangle of the viewport must lie entirely within the current attachment size."
79
+ viewportBoundsRange : [ 0.0 , viewport_size as f32 ] ,
80
+ viewportSubPixelBits : 0 ,
81
+ minMemoryMapAlignment : limits. min_memory_map_alignment . max ( 1 ) ,
42
82
minTexelBufferOffsetAlignment : limits. min_texel_buffer_offset_alignment ,
43
83
minUniformBufferOffsetAlignment : limits. min_uniform_buffer_offset_alignment ,
44
84
minStorageBufferOffsetAlignment : limits. min_storage_buffer_offset_alignment ,
85
+ minTexelOffset : 0 ,
86
+ maxTexelOffset : 0 ,
87
+ minTexelGatherOffset : 0 ,
88
+ maxTexelGatherOffset : 0 ,
89
+ minInterpolationOffset : 0.0 ,
90
+ maxInterpolationOffset : 0.0 ,
91
+ subPixelInterpolationOffsetBits : 0 ,
92
+ maxFramebufferWidth : limits. max_framebuffer_extent . width ,
93
+ maxFramebufferHeight : limits. max_framebuffer_extent . height ,
94
+ maxFramebufferLayers : limits. max_framebuffer_layers as _ ,
45
95
framebufferColorSampleCounts : limits. framebuffer_color_sample_counts as _ ,
46
96
framebufferDepthSampleCounts : limits. framebuffer_depth_sample_counts as _ ,
47
97
framebufferStencilSampleCounts : limits. framebuffer_stencil_sample_counts as _ ,
98
+ framebufferNoAttachmentsSampleCounts : 0 , //TODO
48
99
maxColorAttachments : limits. max_color_attachments as _ ,
49
- nonCoherentAtomSize : limits. non_coherent_atom_size as _ ,
50
- maxSamplerAnisotropy : limits. max_sampler_anisotropy ,
100
+ sampledImageColorSampleCounts : 0 ,
101
+ sampledImageIntegerSampleCounts : 0 ,
102
+ sampledImageDepthSampleCounts : 0 ,
103
+ sampledImageStencilSampleCounts : 0 ,
104
+ storageImageSampleCounts : 0 ,
105
+ maxSampleMaskWords : 0 ,
106
+ timestampComputeAndGraphics : 0 ,
107
+ timestampPeriod : 0.0 ,
108
+ maxClipDistances : 0 ,
109
+ maxCullDistances : 0 ,
110
+ maxCombinedClipAndCullDistances : 0 ,
111
+ discreteQueuePriorities : 0 ,
112
+ pointSizeRange : [ 0.0 ; 2 ] ,
113
+ lineWidthRange : [ 0.0 ; 2 ] ,
114
+ pointSizeGranularity : 0.0 ,
115
+ lineWidthGranularity : 0.0 ,
116
+ strictLines : 0 ,
117
+ standardSampleLocations : if limits. standard_sample_locations { VK_TRUE } else { VK_FALSE } ,
51
118
optimalBufferCopyOffsetAlignment : limits. optimal_buffer_copy_offset_alignment ,
52
119
optimalBufferCopyRowPitchAlignment : limits. optimal_buffer_copy_pitch_alignment ,
53
- maxPerStageDescriptorSampledImages : limits. max_per_stage_descriptor_sampled_images as _ ,
54
- maxPerStageDescriptorSamplers : limits. max_per_stage_descriptor_samplers as _ ,
55
- maxDescriptorSetSampledImages : limits. max_descriptor_set_sampled_images as _ ,
56
- maxDescriptorSetSamplers : limits. max_descriptor_set_samplers as _ ,
57
- ..unsafe { mem:: zeroed ( ) } //TODO
120
+ nonCoherentAtomSize : limits. non_coherent_atom_size as _ ,
58
121
}
59
122
}
60
123
@@ -355,7 +418,7 @@ pub fn map_image_usage(usage: VkImageUsageFlags) -> image::Usage {
355
418
image:: Usage :: from_bits_truncate ( usage)
356
419
}
357
420
358
- pub fn map_image_usage_from_hal ( usage : image:: Usage ) -> VkImageUsageFlags {
421
+ pub fn _map_image_usage_from_hal ( usage : image:: Usage ) -> VkImageUsageFlags {
359
422
usage. bits ( )
360
423
}
361
424
0 commit comments