Skip to content

Commit 1ffbc21

Browse files
authored
Merge pull request #397 from Devsh-Graphics-Programming/feature-api-operatorlt
Add operator< for SPhysicalDeviceLimits & SPhysicalDeviceFeatures
2 parents a36b69a + 5f9ee4a commit 1ffbc21

File tree

2 files changed

+478
-0
lines changed

2 files changed

+478
-0
lines changed

include/nbl/video/SPhysicalDeviceFeatures.h

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,200 @@ struct SPhysicalDeviceFeatures
10531053

10541054
/* Nabla */
10551055
// No Nabla Specific Features for now
1056+
1057+
inline bool operator<(const SPhysicalDeviceFeatures& _rhs) const
1058+
{
1059+
if (robustBufferAccess && !_rhs.robustBufferAccess) return false;
1060+
if (fullDrawIndexUint32 && !_rhs.fullDrawIndexUint32) return false;
1061+
if (imageCubeArray && !_rhs.imageCubeArray) return false;
1062+
if (independentBlend && !_rhs.independentBlend) return false;
1063+
if (geometryShader && !_rhs.geometryShader) return false;
1064+
if (tessellationShader && !_rhs.tessellationShader) return false;
1065+
if (sampleRateShading && !_rhs.sampleRateShading) return false;
1066+
if (dualSrcBlend && !_rhs.dualSrcBlend) return false;
1067+
if (logicOp && !_rhs.logicOp) return false;
1068+
if (multiDrawIndirect && !_rhs.multiDrawIndirect) return false;
1069+
if (drawIndirectFirstInstance && !_rhs.drawIndirectFirstInstance) return false;
1070+
if (depthClamp && !_rhs.depthClamp) return false;
1071+
if (depthBiasClamp && !_rhs.depthBiasClamp) return false;
1072+
if (fillModeNonSolid && !_rhs.fillModeNonSolid) return false;
1073+
if (depthBounds && !_rhs.depthBounds) return false;
1074+
if (wideLines && !_rhs.wideLines) return false;
1075+
if (largePoints && !_rhs.largePoints) return false;
1076+
if (alphaToOne && !_rhs.alphaToOne) return false;
1077+
if (multiViewport && !_rhs.multiViewport) return false;
1078+
if (samplerAnisotropy && !_rhs.samplerAnisotropy) return false;
1079+
if (occlusionQueryPrecise && !_rhs.occlusionQueryPrecise) return false;
1080+
if (pipelineStatisticsQuery && !_rhs.pipelineStatisticsQuery) return false;
1081+
if (vertexPipelineStoresAndAtomics && !_rhs.vertexPipelineStoresAndAtomics) return false;
1082+
if (fragmentStoresAndAtomics && !_rhs.fragmentStoresAndAtomics) return false;
1083+
if (shaderTessellationAndGeometryPointSize && !_rhs.shaderTessellationAndGeometryPointSize) return false;
1084+
if (shaderImageGatherExtended && !_rhs.shaderImageGatherExtended) return false;
1085+
if (shaderStorageImageExtendedFormats && !_rhs.shaderStorageImageExtendedFormats) return false;
1086+
if (shaderStorageImageMultisample && !_rhs.shaderStorageImageMultisample) return false;
1087+
if (shaderStorageImageReadWithoutFormat && !_rhs.shaderStorageImageReadWithoutFormat) return false;
1088+
if (shaderStorageImageWriteWithoutFormat && !_rhs.shaderStorageImageWriteWithoutFormat) return false;
1089+
if (shaderUniformBufferArrayDynamicIndexing && !_rhs.shaderUniformBufferArrayDynamicIndexing) return false;
1090+
if (shaderSampledImageArrayDynamicIndexing && !_rhs.shaderSampledImageArrayDynamicIndexing) return false;
1091+
if (shaderStorageBufferArrayDynamicIndexing && !_rhs.shaderStorageBufferArrayDynamicIndexing) return false;
1092+
if (shaderStorageImageArrayDynamicIndexing && !_rhs.shaderStorageImageArrayDynamicIndexing) return false;
1093+
if (shaderClipDistance && !_rhs.shaderClipDistance) return false;
1094+
if (shaderCullDistance && !_rhs.shaderCullDistance) return false;
1095+
if (vertexAttributeDouble && !_rhs.vertexAttributeDouble) return false;
1096+
if (shaderInt64 && !_rhs.shaderInt64) return false;
1097+
if (shaderInt16 && !_rhs.shaderInt16) return false;
1098+
if (shaderResourceResidency && !_rhs.shaderResourceResidency) return false;
1099+
if (shaderResourceMinLod && !_rhs.shaderResourceMinLod) return false;
1100+
if (variableMultisampleRate && !_rhs.variableMultisampleRate) return false;
1101+
if (inheritedQueries && !_rhs.inheritedQueries) return false;
1102+
if (storageBuffer16BitAccess && !_rhs.storageBuffer16BitAccess) return false;
1103+
if (uniformAndStorageBuffer16BitAccess && !_rhs.uniformAndStorageBuffer16BitAccess) return false;
1104+
if (storagePushConstant16 && !_rhs.storagePushConstant16) return false;
1105+
if (storageInputOutput16 && !_rhs.storageInputOutput16) return false;
1106+
if (shaderDrawParameters && !_rhs.shaderDrawParameters) return false;
1107+
if (samplerMirrorClampToEdge && !_rhs.samplerMirrorClampToEdge) return false;
1108+
if (drawIndirectCount && !_rhs.drawIndirectCount) return false;
1109+
if (storageBuffer8BitAccess && !_rhs.storageBuffer8BitAccess) return false;
1110+
if (uniformAndStorageBuffer8BitAccess && !_rhs.uniformAndStorageBuffer8BitAccess) return false;
1111+
if (storagePushConstant8 && !_rhs.storagePushConstant8) return false;
1112+
if (shaderBufferInt64Atomics && !_rhs.shaderBufferInt64Atomics) return false;
1113+
if (shaderSharedInt64Atomics && !_rhs.shaderSharedInt64Atomics) return false;
1114+
if (shaderFloat16 && !_rhs.shaderFloat16) return false;
1115+
if (shaderInt8 && !_rhs.shaderInt8) return false;
1116+
if (descriptorIndexing && !_rhs.descriptorIndexing) return false;
1117+
if (shaderInputAttachmentArrayDynamicIndexing && !_rhs.shaderInputAttachmentArrayDynamicIndexing) return false;
1118+
if (shaderUniformTexelBufferArrayDynamicIndexing && !_rhs.shaderUniformTexelBufferArrayDynamicIndexing) return false;
1119+
if (shaderStorageTexelBufferArrayDynamicIndexing && !_rhs.shaderStorageTexelBufferArrayDynamicIndexing) return false;
1120+
if (shaderUniformBufferArrayNonUniformIndexing && !_rhs.shaderUniformBufferArrayNonUniformIndexing) return false;
1121+
if (shaderSampledImageArrayNonUniformIndexing && !_rhs.shaderSampledImageArrayNonUniformIndexing) return false;
1122+
if (shaderStorageBufferArrayNonUniformIndexing && !_rhs.shaderStorageBufferArrayNonUniformIndexing) return false;
1123+
if (shaderStorageImageArrayNonUniformIndexing && !_rhs.shaderStorageImageArrayNonUniformIndexing) return false;
1124+
if (shaderInputAttachmentArrayNonUniformIndexing && !_rhs.shaderInputAttachmentArrayNonUniformIndexing) return false;
1125+
if (shaderUniformTexelBufferArrayNonUniformIndexing && !_rhs.shaderUniformTexelBufferArrayNonUniformIndexing) return false;
1126+
if (shaderStorageTexelBufferArrayNonUniformIndexing && !_rhs.shaderStorageTexelBufferArrayNonUniformIndexing) return false;
1127+
if (descriptorBindingUniformBufferUpdateAfterBind && !_rhs.descriptorBindingUniformBufferUpdateAfterBind) return false;
1128+
if (descriptorBindingSampledImageUpdateAfterBind && !_rhs.descriptorBindingSampledImageUpdateAfterBind) return false;
1129+
if (descriptorBindingStorageImageUpdateAfterBind && !_rhs.descriptorBindingStorageImageUpdateAfterBind) return false;
1130+
if (descriptorBindingStorageBufferUpdateAfterBind && !_rhs.descriptorBindingStorageBufferUpdateAfterBind) return false;
1131+
if (descriptorBindingUniformTexelBufferUpdateAfterBind && !_rhs.descriptorBindingUniformTexelBufferUpdateAfterBind) return false;
1132+
if (descriptorBindingStorageTexelBufferUpdateAfterBind && !_rhs.descriptorBindingStorageTexelBufferUpdateAfterBind) return false;
1133+
if (descriptorBindingUpdateUnusedWhilePending && !_rhs.descriptorBindingUpdateUnusedWhilePending) return false;
1134+
if (descriptorBindingPartiallyBound && !_rhs.descriptorBindingPartiallyBound) return false;
1135+
if (descriptorBindingVariableDescriptorCount && !_rhs.descriptorBindingVariableDescriptorCount) return false;
1136+
if (runtimeDescriptorArray && !_rhs.runtimeDescriptorArray) return false;
1137+
if (samplerFilterMinmax && !_rhs.samplerFilterMinmax) return false;
1138+
if (scalarBlockLayout && !_rhs.scalarBlockLayout) return false;
1139+
if (uniformBufferStandardLayout && !_rhs.uniformBufferStandardLayout) return false;
1140+
if (shaderSubgroupExtendedTypes && !_rhs.shaderSubgroupExtendedTypes) return false;
1141+
if (separateDepthStencilLayouts && !_rhs.separateDepthStencilLayouts) return false;
1142+
if (bufferDeviceAddress && !_rhs.bufferDeviceAddress) return false;
1143+
if (bufferDeviceAddressMultiDevice && !_rhs.bufferDeviceAddressMultiDevice) return false;
1144+
if (vulkanMemoryModel && !_rhs.vulkanMemoryModel) return false;
1145+
if (vulkanMemoryModelDeviceScope && !_rhs.vulkanMemoryModelDeviceScope) return false;
1146+
if (vulkanMemoryModelAvailabilityVisibilityChains && !_rhs.vulkanMemoryModelAvailabilityVisibilityChains) return false;
1147+
if (subgroupBroadcastDynamicId && !_rhs.subgroupBroadcastDynamicId) return false;
1148+
if (shaderDemoteToHelperInvocation && !_rhs.shaderDemoteToHelperInvocation) return false;
1149+
if (shaderTerminateInvocation && !_rhs.shaderTerminateInvocation) return false;
1150+
if (subgroupSizeControl && !_rhs.subgroupSizeControl) return false;
1151+
if (computeFullSubgroups && !_rhs.computeFullSubgroups) return false;
1152+
if (shaderIntegerDotProduct && !_rhs.shaderIntegerDotProduct) return false;
1153+
if (rasterizationOrderColorAttachmentAccess && !_rhs.rasterizationOrderColorAttachmentAccess) return false;
1154+
if (rasterizationOrderDepthAttachmentAccess && !_rhs.rasterizationOrderDepthAttachmentAccess) return false;
1155+
if (rasterizationOrderStencilAttachmentAccess && !_rhs.rasterizationOrderStencilAttachmentAccess) return false;
1156+
if (fragmentShaderSampleInterlock && !_rhs.fragmentShaderSampleInterlock) return false;
1157+
if (fragmentShaderPixelInterlock && !_rhs.fragmentShaderPixelInterlock) return false;
1158+
if (fragmentShaderShadingRateInterlock && !_rhs.fragmentShaderShadingRateInterlock) return false;
1159+
if (indexTypeUint8 && !_rhs.indexTypeUint8) return false;
1160+
if (shaderBufferFloat32Atomics && !_rhs.shaderBufferFloat32Atomics) return false;
1161+
if (shaderBufferFloat32AtomicAdd && !_rhs.shaderBufferFloat32AtomicAdd) return false;
1162+
if (shaderBufferFloat64Atomics && !_rhs.shaderBufferFloat64Atomics) return false;
1163+
if (shaderBufferFloat64AtomicAdd && !_rhs.shaderBufferFloat64AtomicAdd) return false;
1164+
if (shaderSharedFloat32Atomics && !_rhs.shaderSharedFloat32Atomics) return false;
1165+
if (shaderSharedFloat32AtomicAdd && !_rhs.shaderSharedFloat32AtomicAdd) return false;
1166+
if (shaderSharedFloat64Atomics && !_rhs.shaderSharedFloat64Atomics) return false;
1167+
if (shaderSharedFloat64AtomicAdd && !_rhs.shaderSharedFloat64AtomicAdd) return false;
1168+
if (shaderImageFloat32Atomics && !_rhs.shaderImageFloat32Atomics) return false;
1169+
if (shaderImageFloat32AtomicAdd && !_rhs.shaderImageFloat32AtomicAdd) return false;
1170+
if (sparseImageFloat32Atomics && !_rhs.sparseImageFloat32Atomics) return false;
1171+
if (sparseImageFloat32AtomicAdd && !_rhs.sparseImageFloat32AtomicAdd) return false;
1172+
if (shaderBufferFloat16Atomics && !_rhs.shaderBufferFloat16Atomics) return false;
1173+
if (shaderBufferFloat16AtomicAdd && !_rhs.shaderBufferFloat16AtomicAdd) return false;
1174+
if (shaderBufferFloat16AtomicMinMax && !_rhs.shaderBufferFloat16AtomicMinMax) return false;
1175+
if (shaderBufferFloat32AtomicMinMax && !_rhs.shaderBufferFloat32AtomicMinMax) return false;
1176+
if (shaderBufferFloat64AtomicMinMax && !_rhs.shaderBufferFloat64AtomicMinMax) return false;
1177+
if (shaderSharedFloat16Atomics && !_rhs.shaderSharedFloat16Atomics) return false;
1178+
if (shaderSharedFloat16AtomicAdd && !_rhs.shaderSharedFloat16AtomicAdd) return false;
1179+
if (shaderSharedFloat16AtomicMinMax && !_rhs.shaderSharedFloat16AtomicMinMax) return false;
1180+
if (shaderSharedFloat32AtomicMinMax && !_rhs.shaderSharedFloat32AtomicMinMax) return false;
1181+
if (shaderSharedFloat64AtomicMinMax && !_rhs.shaderSharedFloat64AtomicMinMax) return false;
1182+
if (shaderImageFloat32AtomicMinMax && !_rhs.shaderImageFloat32AtomicMinMax) return false;
1183+
if (sparseImageFloat32AtomicMinMax && !_rhs.sparseImageFloat32AtomicMinMax) return false;
1184+
if (shaderImageInt64Atomics && !_rhs.shaderImageInt64Atomics) return false;
1185+
if (sparseImageInt64Atomics && !_rhs.sparseImageInt64Atomics) return false;
1186+
if (accelerationStructure && !_rhs.accelerationStructure) return false;
1187+
if (accelerationStructureCaptureReplay && !_rhs.accelerationStructureCaptureReplay) return false;
1188+
if (accelerationStructureIndirectBuild && !_rhs.accelerationStructureIndirectBuild) return false;
1189+
if (accelerationStructureHostCommands && !_rhs.accelerationStructureHostCommands) return false;
1190+
if (descriptorBindingAccelerationStructureUpdateAfterBind && !_rhs.descriptorBindingAccelerationStructureUpdateAfterBind) return false;
1191+
if (rayQuery && !_rhs.rayQuery) return false;
1192+
if (rayTracingPipeline && !_rhs.rayTracingPipeline) return false;
1193+
if (rayTracingPipelineTraceRaysIndirect && !_rhs.rayTracingPipelineTraceRaysIndirect) return false;
1194+
if (rayTraversalPrimitiveCulling && !_rhs.rayTraversalPrimitiveCulling) return false;
1195+
if (shaderDeviceClock && !_rhs.shaderDeviceClock) return false;
1196+
if (shaderSubgroupUniformControlFlow && !_rhs.shaderSubgroupUniformControlFlow) return false;
1197+
if (workgroupMemoryExplicitLayout && !_rhs.workgroupMemoryExplicitLayout) return false;
1198+
if (workgroupMemoryExplicitLayoutScalarBlockLayout && !_rhs.workgroupMemoryExplicitLayoutScalarBlockLayout) return false;
1199+
if (workgroupMemoryExplicitLayout8BitAccess && !_rhs.workgroupMemoryExplicitLayout8BitAccess) return false;
1200+
if (workgroupMemoryExplicitLayout16BitAccess && !_rhs.workgroupMemoryExplicitLayout16BitAccess) return false;
1201+
if (computeDerivativeGroupQuads && !_rhs.computeDerivativeGroupQuads) return false;
1202+
if (computeDerivativeGroupLinear && !_rhs.computeDerivativeGroupLinear) return false;
1203+
if (cooperativeMatrix && !_rhs.cooperativeMatrix) return false;
1204+
if (cooperativeMatrixRobustBufferAccess && !_rhs.cooperativeMatrixRobustBufferAccess) return false;
1205+
if (rayTracingMotionBlur && !_rhs.rayTracingMotionBlur) return false;
1206+
if (rayTracingMotionBlurPipelineTraceRaysIndirect && !_rhs.rayTracingMotionBlurPipelineTraceRaysIndirect) return false;
1207+
if (coverageReductionMode && !_rhs.coverageReductionMode) return false;
1208+
if (deviceGeneratedCommands && !_rhs.deviceGeneratedCommands) return false;
1209+
if (taskShader && !_rhs.taskShader) return false;
1210+
if (meshShader && !_rhs.meshShader) return false;
1211+
if (representativeFragmentTest && !_rhs.representativeFragmentTest) return false;
1212+
if (mixedAttachmentSamples && !_rhs.mixedAttachmentSamples) return false;
1213+
if (hdrMetadata && !_rhs.hdrMetadata) return false;
1214+
if (displayTiming && !_rhs.displayTiming) return false;
1215+
if (rasterizationOrder && !_rhs.rasterizationOrder) return false;
1216+
if (shaderExplicitVertexParameter && !_rhs.shaderExplicitVertexParameter) return false;
1217+
if (shaderInfoAMD && !_rhs.shaderInfoAMD) return false;
1218+
if (hostQueryReset && !_rhs.hostQueryReset) return false;
1219+
if (pipelineCreationCacheControl && !_rhs.pipelineCreationCacheControl) return false;
1220+
if (colorWriteEnable && !_rhs.colorWriteEnable) return false;
1221+
if (conditionalRendering && !_rhs.conditionalRendering) return false;
1222+
if (inheritedConditionalRendering && !_rhs.inheritedConditionalRendering) return false;
1223+
if (deviceMemoryReport && !_rhs.deviceMemoryReport) return false;
1224+
if (fragmentDensityMap && !_rhs.fragmentDensityMap) return false;
1225+
if (fragmentDensityMapDynamic && !_rhs.fragmentDensityMapDynamic) return false;
1226+
if (fragmentDensityMapNonSubsampledImages && !_rhs.fragmentDensityMapNonSubsampledImages) return false;
1227+
if (fragmentDensityMapDeferred && !_rhs.fragmentDensityMapDeferred) return false;
1228+
if (robustImageAccess && !_rhs.robustImageAccess) return false;
1229+
if (inlineUniformBlock && !_rhs.inlineUniformBlock) return false;
1230+
if (descriptorBindingInlineUniformBlockUpdateAfterBind && !_rhs.descriptorBindingInlineUniformBlockUpdateAfterBind) return false;
1231+
if (rectangularLines && !_rhs.rectangularLines) return false;
1232+
if (bresenhamLines && !_rhs.bresenhamLines) return false;
1233+
if (smoothLines && !_rhs.smoothLines) return false;
1234+
if (stippledRectangularLines && !_rhs.stippledRectangularLines) return false;
1235+
if (stippledBresenhamLines && !_rhs.stippledBresenhamLines) return false;
1236+
if (stippledSmoothLines && !_rhs.stippledSmoothLines) return false;
1237+
if (memoryPriority && !_rhs.memoryPriority) return false;
1238+
if (robustBufferAccess2 && !_rhs.robustBufferAccess2) return false;
1239+
if (robustImageAccess2 && !_rhs.robustImageAccess2) return false;
1240+
if (nullDescriptor && !_rhs.nullDescriptor) return false;
1241+
if (performanceCounterQueryPools && !_rhs.performanceCounterQueryPools) return false;
1242+
if (performanceCounterMultipleQueryPools && !_rhs.performanceCounterMultipleQueryPools) return false;
1243+
if (pipelineExecutableInfo && !_rhs.pipelineExecutableInfo) return false;
1244+
if (maintenance4 && !_rhs.maintenance4) return false;
1245+
if (deviceCoherentMemory && !_rhs.deviceCoherentMemory) return false;
1246+
if (bufferMarkerAMD && !_rhs.bufferMarkerAMD) return false;
1247+
if ((swapchainMode.value & _rhs.swapchainMode.value) != swapchainMode.value) return false;
1248+
return true;
1249+
}
10561250
};
10571251

10581252
} // nbl::video

0 commit comments

Comments
 (0)