Skip to content

Commit 4f18bc8

Browse files
committed
Dedup some extensions, expose some of them
1 parent a724fa6 commit 4f18bc8

File tree

2 files changed

+152
-130
lines changed

2 files changed

+152
-130
lines changed

include/nbl/video/SPhysicalDeviceLimits.h

Lines changed: 87 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@ struct SPhysicalDeviceLimits
5050
uint32_t maxDescriptorSetStorageImages = 0u;
5151
uint32_t maxDescriptorSetInputAttachments = 0u;
5252

53-
//! [DO NOT EXPOSE ]
54-
//! maxVertexInputAttributes and maxVertexInputBindings: In OpenGL (and ES) the de-jure (legal) minimum is 16, and de-facto (in practice) Vulkan reports begin at 16.
55-
//! maxVertexInputAttributeOffset and maxVertexInputBindingStride: In OpenGL (and ES) the de-jure (legal) minimum is 2047 for both, and de-facto (in practice) Vulkan reports begin at 2047.
56-
//! Asset Conversion:
57-
//! An ICPUMeshBuffer is an IAsset and for reasons of serialization and conversion we've hardcoded the attribute and binding count to 16 (the bitfields, array sizes, etc.)
58-
//! variable attribute count meshes would be a mess.
59-
//! uint32_t maxVertexInputAttributes;
60-
//! uint32_t maxVertexInputBindings;
61-
//! uint32_t maxVertexInputAttributeOffset;
62-
//! uint32_t maxVertexInputBindingStride;
63-
6453
uint32_t maxVertexOutputComponents = 0u;
6554

6655
uint32_t maxTessellationGenerationLevel = 0u;
@@ -166,11 +155,6 @@ struct SPhysicalDeviceLimits
166155
};
167156
E_POINT_CLIPPING_BEHAVIOR pointClippingBehavior = EPCB_USER_CLIP_PLANES_ONLY;
168157

169-
// [TODO LATER] If needed
170-
//uint32_t maxMultiviewViewCount;
171-
//uint32_t maxMultiviewInstanceIndex;
172-
//bool protectedNoFault;
173-
174158
uint32_t maxPerSetDescriptors = 0u;
175159
size_t maxMemoryAllocationSize = 0ull;
176160

@@ -222,20 +206,10 @@ struct SPhysicalDeviceLimits
222206
uint32_t maxDescriptorSetUpdateAfterBindImages = 0u;
223207
uint32_t maxDescriptorSetUpdateAfterBindStorageImages = 0u;
224208
uint32_t maxDescriptorSetUpdateAfterBindInputAttachments = 0u;
225-
226-
// [TODO LATER] Needs API work to expose -> https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkSubpassDescriptionDepthStencilResolve.html
227-
// or VK_KHR_depth_stencil_resolve:
228-
//VkResolveModeFlags supportedDepthResolveModes;
229-
//VkResolveModeFlags supportedStencilResolveModes;
230-
//bool independentResolveNone;
231-
//bool independentResolve;
232209

233210
// or VK_EXT_sampler_filter_minmax:
234211
bool filterMinmaxSingleComponentFormats = false;
235212
bool filterMinmaxImageComponentMapping = false;
236-
237-
// or VK_KHR_timeline_semaphore:
238-
//uint64_t maxTimelineSemaphoreValueDifference; // [DO NOT EXPOSE] we don't expose or want timeline semaphore currently
239213

240214
core::bitflag<asset::IImage::E_SAMPLE_COUNT_FLAGS> framebufferIntegerColorSampleCounts = asset::IImage::E_SAMPLE_COUNT_FLAGS(0u);
241215

@@ -248,14 +222,6 @@ struct SPhysicalDeviceLimits
248222
uint32_t maxComputeWorkgroupSubgroups = 0u;
249223
core::bitflag<asset::IShader::E_SHADER_STAGE> requiredSubgroupSizeStages = core::bitflag<asset::IShader::E_SHADER_STAGE>(0u);
250224

251-
// [Future TODO]: we don't expose inline uniform blocks right now
252-
// or VK_EXT_inline_uniform_block:
253-
//uint32_t maxInlineUniformBlockSize;
254-
//uint32_t maxPerStageDescriptorInlineUniformBlocks;
255-
//uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks;
256-
//uint32_t maxDescriptorSetInlineUniformBlocks;
257-
//uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks;
258-
259225
// Only Core 1.3 -> VkPhysicalDeviceVulkan13Properties should be used for this variable
260226
//uint32_t maxInlineUniformTotalSize;
261227

@@ -286,99 +252,48 @@ struct SPhysicalDeviceLimits
286252
/* DiscardRectanglePropertiesEXT *//* provided by VK_EXT_discard_rectangles */
287253
uint32_t maxDiscardRectangles = 0u;
288254

289-
// [TODO] too much effort
290-
// GLHint: Report false for both on GL
291-
/* GraphicsPipelineLibraryPropertiesEXT *//* provided by VK_EXT_graphics_pipeline_library */
292-
//bool graphicsPipelineLibraryFastLinking;
293-
//bool graphicsPipelineLibraryIndependentInterpolationDecoration;
294-
295-
/* InlineUniformBlockPropertiesEXT ---> MOVED TO Vulkan 1.3 Core */
296-
297255
// [TODO] this feature introduces new/more pipeline state with VkPipelineRasterizationLineStateCreateInfoEXT
298256
/* LineRasterizationPropertiesEXT *//* provided by VK_EXT_line_rasterization */
299-
//uint32_t lineSubPixelPrecisionBits; // GLHint: report 0 on OpenGL
300-
301-
// [TODO]
302-
/* DescriptorIndexingPropertiesEXT ---> MOVED TO Vulkan 1.2 Core *//* provided by VK_AMD_shader_core_properties */
303-
304-
// [TODO]
305-
/* SamplerFilterMinmaxPropertiesEXT ---> MOVED TO Vulkan 1.2 Core */
257+
uint32_t lineSubPixelPrecisionBits = 0;
306258

307259
// [TODO] we would have to change the API
308260
/* VertexAttributeDivisorPropertiesEXT *//* provided by VK_EXT_vertex_attribute_divisor */
309-
//uint32_t maxVertexAttribDivisor;
310-
311-
// [TODO]
312-
/* SubgroupSizeControlPropertiesEXT ---> MOVED TO Vulkan 1.3 Core */
313-
314-
// [TODO]
315-
/* TexelBufferAlignmentPropertiesEXT ---> MOVED TO Vulkan 1.3 Core */
316-
317-
// [TODO]
318-
/* Maintenance2PropertiesKHR *//* provided by VK_KHR_maintenance2 *//* MOVED TO Vulkan 1.1 Core */
319-
320-
// [TODO]
321-
/* Maintenance3PropertiesKHR *//* provided by VK_KHR_maintenance3 *//* MOVED TO Vulkan 1.1 Core */
322-
323-
// [TODO]
324-
/* MultiviewPropertiesKHR *//* provided by VK_KHR_multiview *//* MOVED TO Vulkan 1.1 Core */
325-
326-
// [TODO]
327-
/* DepthStencilResolvePropertiesKHR ---> MOVED TO Vulkan 1.2 Core */
328-
329-
// [TODO]
330-
/* DriverPropertiesKHR ---> MOVED TO Vulkan 1.2 Core */
331-
332-
// [TODO]
333-
/* FloatControlsPropertiesKHR *//* VK_KHR_shader_float_controls *//* MOVED TO Vulkan 1.2 Core */
334-
335-
// [TODO]
336-
/* TimelineSemaphorePropertiesKHR *//* VK_KHR_timeline_semaphore *//* MOVED TO Vulkan 1.2 Core */
261+
uint32_t maxVertexAttribDivisor = 0;
337262

338-
// [TODO]
339-
/* VK_KHX_multiview *//* replaced by VK_KHR_multiview */
340-
341-
// [TODO]
342-
/* ShaderSMBuiltinsPropertiesNV *//* VK_NV_shader_sm_builtins */
343-
//uint32_t shaderSMCount;
344-
//uint32_t shaderWarpsPerSM;
345-
346-
// [TODO]
347263
/* SubpassShadingPropertiesHUAWEI *//* VK_HUAWEI_subpass_shading */
348-
// uint32_t maxSubpassShadingWorkgroupSizeAspectRatio;
264+
uint32_t maxSubpassShadingWorkgroupSizeAspectRatio = 0;
349265

350-
// TODO
351266
/* ShaderIntegerDotProductProperties *//* VK_KHR_shader_integer_dot_product */
352-
//bool integerDotProduct8BitUnsignedAccelerated;
353-
//bool integerDotProduct8BitSignedAccelerated;
354-
//bool integerDotProduct8BitMixedSignednessAccelerated;
355-
//bool integerDotProduct4x8BitPackedUnsignedAccelerated;
356-
//bool integerDotProduct4x8BitPackedSignedAccelerated;
357-
//bool integerDotProduct4x8BitPackedMixedSignednessAccelerated;
358-
//bool integerDotProduct16BitUnsignedAccelerated;
359-
//bool integerDotProduct16BitSignedAccelerated;
360-
//bool integerDotProduct16BitMixedSignednessAccelerated;
361-
//bool integerDotProduct32BitUnsignedAccelerated;
362-
//bool integerDotProduct32BitSignedAccelerated;
363-
//bool integerDotProduct32BitMixedSignednessAccelerated;
364-
//bool integerDotProduct64BitUnsignedAccelerated;
365-
//bool integerDotProduct64BitSignedAccelerated;
366-
//bool integerDotProduct64BitMixedSignednessAccelerated;
367-
//bool integerDotProductAccumulatingSaturating8BitUnsignedAccelerated;
368-
//bool integerDotProductAccumulatingSaturating8BitSignedAccelerated;
369-
//bool integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated;
370-
//bool integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated;
371-
//bool integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated;
372-
//bool integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated;
373-
//bool integerDotProductAccumulatingSaturating16BitUnsignedAccelerated;
374-
//bool integerDotProductAccumulatingSaturating16BitSignedAccelerated;
375-
//bool integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated;
376-
//bool integerDotProductAccumulatingSaturating32BitUnsignedAccelerated;
377-
//bool integerDotProductAccumulatingSaturating32BitSignedAccelerated;
378-
//bool integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated;
379-
//bool integerDotProductAccumulatingSaturating64BitUnsignedAccelerated;
380-
//bool integerDotProductAccumulatingSaturating64BitSignedAccelerated;
381-
//bool integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated;
267+
bool integerDotProduct8BitUnsignedAccelerated;
268+
bool integerDotProduct8BitSignedAccelerated;
269+
bool integerDotProduct8BitMixedSignednessAccelerated;
270+
bool integerDotProduct4x8BitPackedUnsignedAccelerated;
271+
bool integerDotProduct4x8BitPackedSignedAccelerated;
272+
bool integerDotProduct4x8BitPackedMixedSignednessAccelerated;
273+
bool integerDotProduct16BitUnsignedAccelerated;
274+
bool integerDotProduct16BitSignedAccelerated;
275+
bool integerDotProduct16BitMixedSignednessAccelerated;
276+
bool integerDotProduct32BitUnsignedAccelerated;
277+
bool integerDotProduct32BitSignedAccelerated;
278+
bool integerDotProduct32BitMixedSignednessAccelerated;
279+
bool integerDotProduct64BitUnsignedAccelerated;
280+
bool integerDotProduct64BitSignedAccelerated;
281+
bool integerDotProduct64BitMixedSignednessAccelerated;
282+
bool integerDotProductAccumulatingSaturating8BitUnsignedAccelerated;
283+
bool integerDotProductAccumulatingSaturating8BitSignedAccelerated;
284+
bool integerDotProductAccumulatingSaturating8BitMixedSignednessAccelerated;
285+
bool integerDotProductAccumulatingSaturating4x8BitPackedUnsignedAccelerated;
286+
bool integerDotProductAccumulatingSaturating4x8BitPackedSignedAccelerated;
287+
bool integerDotProductAccumulatingSaturating4x8BitPackedMixedSignednessAccelerated;
288+
bool integerDotProductAccumulatingSaturating16BitUnsignedAccelerated;
289+
bool integerDotProductAccumulatingSaturating16BitSignedAccelerated;
290+
bool integerDotProductAccumulatingSaturating16BitMixedSignednessAccelerated;
291+
bool integerDotProductAccumulatingSaturating32BitUnsignedAccelerated;
292+
bool integerDotProductAccumulatingSaturating32BitSignedAccelerated;
293+
bool integerDotProductAccumulatingSaturating32BitMixedSignednessAccelerated;
294+
bool integerDotProductAccumulatingSaturating64BitUnsignedAccelerated;
295+
bool integerDotProductAccumulatingSaturating64BitSignedAccelerated;
296+
bool integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated;
382297

383298
/* AccelerationStructurePropertiesKHR *//* provided by VK_KHR_acceleration_structure */
384299
uint64_t maxGeometryCount = 0ull;
@@ -430,6 +345,41 @@ struct SPhysicalDeviceLimits
430345
/* CooperativeMatrixPropertiesNV *//* VK_NV_cooperative_matrix */
431346
core::bitflag<asset::IShader::E_SHADER_STAGE> cooperativeMatrixSupportedStages = asset::IShader::E_SHADER_STAGE(0u);
432347

348+
// [TODO LATER] not in header (previous comment: too much effort)
349+
// GLHint: Report false for both on GL
350+
/* GraphicsPipelineLibraryPropertiesEXT *//* provided by VK_EXT_graphics_pipeline_library */
351+
//bool graphicsPipelineLibraryFastLinking;
352+
//bool graphicsPipelineLibraryIndependentInterpolationDecoration;
353+
354+
// [TODO LATER] to expose but contingent on the TODO to implement one day
355+
/* PushDescriptorPropertiesKHR *//* provided by VK_KHR_push_descriptor */
356+
//uint32_t maxPushDescriptors;
357+
358+
// [TODO LATER] no such struct?
359+
/* Maintenance2PropertiesKHR *//* provided by VK_KHR_maintenance2 *//* MOVED TO Vulkan 1.1 Core */
360+
361+
// [TODO LATER] If needed
362+
/* MultiviewPropertiesKHR *//* provided by VK_KHR_multiview *//* MOVED TO Vulkan 1.1 Core */
363+
//uint32_t maxMultiviewViewCount;
364+
//uint32_t maxMultiviewInstanceIndex;
365+
//bool protectedNoFault;
366+
367+
// [TODO LATER] Needs API work to expose -> https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkSubpassDescriptionDepthStencilResolve.html
368+
// or VK_KHR_depth_stencil_resolve:
369+
//VkResolveModeFlags supportedDepthResolveModes;
370+
//VkResolveModeFlags supportedStencilResolveModes;
371+
//bool independentResolveNone;
372+
//bool independentResolve;
373+
374+
// [TODO LATER]: we don't expose inline uniform blocks right now
375+
/* InlineUniformBlockPropertiesEXT ---> MOVED TO Vulkan 1.3 Core */
376+
// or VK_EXT_inline_uniform_block:
377+
//uint32_t maxInlineUniformBlockSize;
378+
//uint32_t maxPerStageDescriptorInlineUniformBlocks;
379+
//uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks;
380+
//uint32_t maxDescriptorSetInlineUniformBlocks;
381+
//uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks;
382+
433383
// [DO NOT EXPOSE] We will never expose this vendor specific meta-data (no new feature) to the user, but might use the extension to provide some cross platform meta-info in the Nabla section
434384
/* ShaderCoreProperties2AMD *//* provided by VK_AMD_shader_core_properties2 */
435385
//VkShaderCorePropertiesFlagsAMD shaderCoreFeatures;
@@ -476,6 +426,9 @@ struct SPhysicalDeviceLimits
476426
//int64_t renderMajor;
477427
//int64_t renderMinor;
478428

429+
// [DO NOT EXPOSE] we don't expose or want timeline semaphore currently
430+
/* TimelineSemaphorePropertiesKHR *//* VK_KHR_timeline_semaphore *//* MOVED TO Vulkan 1.2 Core */
431+
479432
// [DO NOT EXPOSE] we will never expose provoking vertex control, we will always set the provoking vertex to the LAST (vulkan default) convention also because of never exposing Xform Feedback, we'll never expose this as well
480433
/* ProvokingVertexPropertiesEXT *//* provided by VK_EXT_provoking_vertex */
481434
//bool provokingVertexModePerPipeline;
@@ -486,6 +439,9 @@ struct SPhysicalDeviceLimits
486439
//size_t robustStorageBufferAccessSizeAlignment;
487440
//size_t robustUniformBufferAccessSizeAlignment;
488441

442+
// [DO NOT EXPOSE] replaced by VK_KHR_multiview
443+
/* VK_KHX_multiview */
444+
489445
// [DO NOT EXPOSE] Coverage 0%, no structs defined anywhere in vulkan headers
490446
/* VK_KHR_fragment_shader_barycentric */
491447

@@ -570,6 +526,9 @@ struct SPhysicalDeviceLimits
570526
//uint32_t meshOutputPerVertexGranularity;
571527
//uint32_t meshOutputPerPrimitiveGranularity;
572528

529+
// [DO NOT EXPOSE] MOVED TO Vulkan 1.1 Core
530+
/* Maintenance3PropertiesKHR *//* provided by VK_KHR_maintenance3 */
531+
573532
// [DO NOT EXPOSE] useless because of VK_KHR_ray_tracing_pipeline
574533
/* VK_NV_ray_tracing */
575534

@@ -583,10 +542,16 @@ struct SPhysicalDeviceLimits
583542
/* FragmentDensityMapOffsetPropertiesQCOM *//* VK_QCOM_fragment_density_map_offset */
584543
//VkExtent2D fragmentDensityOffsetGranularity;
585544

586-
// [TODO LATER] to expose but contingent on the TODO to implement one day
587-
/* PushDescriptorPropertiesKHR *//* provided by VK_KHR_push_descriptor */
588-
//uint32_t maxPushDescriptors;
589-
545+
//! [DO NOT EXPOSE]
546+
//! maxVertexInputAttributes and maxVertexInputBindings: In OpenGL (and ES) the de-jure (legal) minimum is 16, and de-facto (in practice) Vulkan reports begin at 16.
547+
//! maxVertexInputAttributeOffset and maxVertexInputBindingStride: In OpenGL (and ES) the de-jure (legal) minimum is 2047 for both, and de-facto (in practice) Vulkan reports begin at 2047.
548+
//! Asset Conversion:
549+
//! An ICPUMeshBuffer is an IAsset and for reasons of serialization and conversion we've hardcoded the attribute and binding count to 16 (the bitfields, array sizes, etc.)
550+
//! variable attribute count meshes would be a mess.
551+
//! uint32_t maxVertexInputAttributes;
552+
//! uint32_t maxVertexInputBindings;
553+
//! uint32_t maxVertexInputAttributeOffset;
554+
//! uint32_t maxVertexInputBindingStride;
590555

591556
/* Always enabled, reported as limits */
592557
bool shaderOutputViewportIndex = false; // ALIAS: VK_EXT_shader_viewport_index_layer

0 commit comments

Comments
 (0)