@@ -73,10 +73,11 @@ class IPhysicalDevice : public core::Interface, public core::Unmovable
73
73
//
74
74
struct SLimits
75
75
{
76
- // uint32_t maxImageDimension1D;
77
- // uint32_t maxImageDimension2D;
78
- // uint32_t maxImageDimension3D;
79
- // uint32_t maxImageDimensionCube;
76
+ /* Vulkan Core 1.0 */
77
+ uint32_t maxImageDimension1D;
78
+ uint32_t maxImageDimension2D;
79
+ uint32_t maxImageDimension3D;
80
+ uint32_t maxImageDimensionCube;
80
81
uint32_t maxImageArrayLayers;
81
82
uint32_t maxBufferViewSizeTexels;
82
83
uint32_t maxUBOSize;
@@ -179,14 +180,22 @@ class IPhysicalDevice : public core::Interface, public core::Unmovable
179
180
// VkDeviceSize optimalBufferCopyOffsetAlignment;
180
181
// VkDeviceSize optimalBufferCopyRowPitchAlignment;
181
182
uint64_t nonCoherentAtomSize;
182
-
183
- // --> VkPhysicalDeviceSubgroupProperties
183
+
184
+ /* SubgroupProperties */
184
185
uint32_t subgroupSize;
185
186
core::bitflag<asset::IShader::E_SHADER_STAGE> subgroupOpsShaderStages;
186
187
// VkSubgroupFeatureFlags supportedOperations; -> in SFeatures as booleans instead of flags
187
- // VkBool32 quadOperationsInAllStages;
188
+ bool shaderSubgroupBasic = false ;
189
+ bool shaderSubgroupVote = false ;
190
+ bool shaderSubgroupArithmetic = false ;
191
+ bool shaderSubgroupBallot = false ;
192
+ bool shaderSubgroupShuffle = false ;
193
+ bool shaderSubgroupShuffleRelative = false ;
194
+ bool shaderSubgroupClustered = false ;
195
+ bool shaderSubgroupQuad = false ;
196
+ bool shaderSubgroupQuadAllStages = false ; // quadOperationsInAllStages;
188
197
189
- // --> VkPhysicalDeviceAccelerationStructurePropertiesKHR
198
+ /* AccelerationStructurePropertiesKHR */
190
199
uint64_t maxGeometryCount;
191
200
uint64_t maxInstanceCount;
192
201
uint64_t maxPrimitiveCount;
@@ -195,8 +204,8 @@ class IPhysicalDevice : public core::Interface, public core::Unmovable
195
204
uint32_t maxDescriptorSetAccelerationStructures;
196
205
uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures;
197
206
uint32_t minAccelerationStructureScratchOffsetAlignment;
198
-
199
- // --> VkPhysicalDeviceRayTracingPipelinePropertiesKHR
207
+
208
+ /* RayTracingPipelinePropertiesKHR */
200
209
uint32_t shaderGroupHandleSize;
201
210
uint32_t maxRayRecursionDepth;
202
211
uint32_t maxShaderGroupStride;
@@ -205,10 +214,9 @@ class IPhysicalDevice : public core::Interface, public core::Unmovable
205
214
uint32_t maxRayDispatchInvocationCount;
206
215
uint32_t shaderGroupHandleAlignment;
207
216
uint32_t maxRayHitAttributeSize;
208
-
209
- // --> Nabla:
217
+
218
+ /* Nabla */
210
219
uint32_t maxBufferSize;
211
- uint64_t maxTextureSize; // TODO: Use maxImageDimensions1D/2D/3D/Cube instead for gl and get rid of this
212
220
uint32_t maxOptimallyResidentWorkgroupInvocations = 0u ; // its 1D because multidimensional workgroups are an illusion
213
221
uint32_t maxResidentInvocations = 0u ; // These are maximum number of invocations you could expect to execute simultaneously on this device.
214
222
asset::IGLSLCompiler::E_SPIRV_VERSION spirvVersion;
@@ -260,6 +268,7 @@ class IPhysicalDevice : public core::Interface, public core::Unmovable
260
268
//
261
269
struct SFeatures
262
270
{
271
+ /* Vulkan Core 1.0 */
263
272
bool robustBufferAccess = false ;
264
273
// VkBool32 fullDrawIndexUint32;
265
274
bool imageCubeArray = false ;
@@ -315,51 +324,38 @@ class IPhysicalDevice : public core::Interface, public core::Unmovable
315
324
// VkBool32 sparseResidencyAliased;
316
325
// VkBool32 variableMultisampleRate;
317
326
bool inheritedQueries = false ;
318
-
319
- // --> VkPhysicalDeviceSubgroupProperties: // TODO(Erfan): I think we should move these into SProperties::SLimits since it's part of properties and not features
320
- bool shaderSubgroupBasic = false ;
321
- bool shaderSubgroupVote = false ;
322
- bool shaderSubgroupArithmetic = false ;
323
- bool shaderSubgroupBallot = false ;
324
- bool shaderSubgroupShuffle = false ;
325
- bool shaderSubgroupShuffleRelative = false ;
326
- bool shaderSubgroupClustered = false ;
327
- bool shaderSubgroupQuad = false ;
328
- // Whether `shaderSubgroupQuad` flag refer to all stages where subgroup ops are reported to be supported.
329
- // See SLimit::subgroupOpsShaderStages.
330
- bool shaderSubgroupQuadAllStages = false ;
331
-
332
- // --> VkPhysicalDeviceRayQueryFeaturesKHR
327
+
328
+ /* RayQueryFeaturesKHR */
333
329
bool rayQuery = false ;
334
-
335
- // --> VkPhysicalDeviceAccelerationStructureFeaturesKHR
330
+
331
+ /* AccelerationStructureFeaturesKHR */
336
332
bool accelerationStructure = false ;
337
333
bool accelerationStructureCaptureReplay = false ;
338
334
bool accelerationStructureIndirectBuild = false ;
339
335
bool accelerationStructureHostCommands = false ;
340
336
bool descriptorBindingAccelerationStructureUpdateAfterBind = false ;
341
-
342
- // --> VkPhysicalDeviceRayTracingPipelineFeaturesKHR
337
+
338
+ /* RayTracingPipelineFeaturesKHR */
343
339
bool rayTracingPipeline = false ;
344
340
bool rayTracingPipelineShaderGroupHandleCaptureReplay = false ;
345
341
bool rayTracingPipelineShaderGroupHandleCaptureReplayMixed = false ;
346
342
bool rayTracingPipelineTraceRaysIndirect = false ;
347
343
bool rayTraversalPrimitiveCulling = false ;
348
-
349
- // --> VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT
344
+
345
+ /* FragmentShaderInterlockFeaturesEXT */
350
346
bool fragmentShaderSampleInterlock = false ;
351
347
bool fragmentShaderPixelInterlock = false ;
352
348
bool fragmentShaderShadingRateInterlock = false ;
353
-
354
-
355
- // --> VkPhysicalDeviceBufferDeviceAddressFeaturesKHR
349
+
350
+ /* BufferDeviceAddressFeaturesKHR */
356
351
bool bufferDeviceAddress = false ;
357
352
// VkBool32 bufferDeviceAddressCaptureReplay;
358
353
// VkBool32 bufferDeviceAddressMultiDevice;
359
354
360
- // --> Nabla:
361
- bool dispatchBase = false ;
362
- bool drawIndirectCount = false ;
355
+ bool drawIndirectCount = false ; // TODO(Erfan): Move in 1.2 features
356
+
357
+ /* Nabla */
358
+ bool dispatchBase = false ; // true in Vk, false in GL
363
359
bool allowCommandBufferQueryCopies = false ;
364
360
};
365
361
const SFeatures& getFeatures () const { return m_features; }
0 commit comments