Skip to content

Commit 0a0dd39

Browse files
committed
Fix issues with operator<
1 parent f764c90 commit 0a0dd39

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

include/nbl/video/SPhysicalDeviceLimits.h

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -667,14 +667,14 @@ struct SPhysicalDeviceLimits
667667
if (viewportBoundsRange[1] > _rhs.viewportBoundsRange[1]) return false;
668668
if (viewportSubPixelBits > _rhs.viewportSubPixelBits) return false;
669669
if (minMemoryMapAlignment < _rhs.minMemoryMapAlignment) return false;
670-
if (bufferViewAlignment > _rhs.bufferViewAlignment) return false;
671-
if (minUBOAlignment > _rhs.minUBOAlignment) return false;
672-
if (minSSBOAlignment > _rhs.minSSBOAlignment) return false;
673-
if (minTexelOffset > _rhs.minTexelOffset) return false;
670+
if (bufferViewAlignment < _rhs.bufferViewAlignment) return false;
671+
if (minUBOAlignment < _rhs.minUBOAlignment) return false;
672+
if (minSSBOAlignment < _rhs.minSSBOAlignment) return false;
673+
if (minTexelOffset < _rhs.minTexelOffset) return false;
674674
if (maxTexelOffset > _rhs.maxTexelOffset) return false;
675-
if (minTexelGatherOffset > _rhs.minTexelGatherOffset) return false;
675+
if (minTexelGatherOffset < _rhs.minTexelGatherOffset) return false;
676676
if (maxTexelGatherOffset > _rhs.maxTexelGatherOffset) return false;
677-
if (minInterpolationOffset > _rhs.minInterpolationOffset) return false;
677+
if (minInterpolationOffset < _rhs.minInterpolationOffset) return false;
678678
if (maxInterpolationOffset > _rhs.maxInterpolationOffset) return false;
679679
if (maxFramebufferWidth > _rhs.maxFramebufferWidth) return false;
680680
if (maxFramebufferHeight > _rhs.maxFramebufferHeight) return false;
@@ -702,8 +702,8 @@ struct SPhysicalDeviceLimits
702702
if (lineWidthGranularity < _rhs.lineWidthGranularity) return false;
703703
if (strictLines > _rhs.strictLines) return false;
704704
if (standardSampleLocations > _rhs.standardSampleLocations) return false;
705-
if (optimalBufferCopyOffsetAlignment > _rhs.optimalBufferCopyOffsetAlignment) return false;
706-
if (optimalBufferCopyRowPitchAlignment > _rhs.optimalBufferCopyRowPitchAlignment) return false;
705+
if (optimalBufferCopyOffsetAlignment < _rhs.optimalBufferCopyOffsetAlignment) return false;
706+
if (optimalBufferCopyRowPitchAlignment < _rhs.optimalBufferCopyRowPitchAlignment) return false;
707707
if (nonCoherentAtomSize > _rhs.nonCoherentAtomSize) return false;
708708
if (subgroupSize > _rhs.subgroupSize) return false;
709709
if (!_rhs.subgroupOpsShaderStages.hasFlags(subgroupOpsShaderStages)) return false;
@@ -758,12 +758,15 @@ struct SPhysicalDeviceLimits
758758
if (maxDescriptorSetUpdateAfterBindInputAttachments > _rhs.maxDescriptorSetUpdateAfterBindInputAttachments) return false;
759759
if (filterMinmaxSingleComponentFormats && !_rhs.filterMinmaxSingleComponentFormats) return false;
760760
if (filterMinmaxImageComponentMapping && !_rhs.filterMinmaxImageComponentMapping) return false;
761-
if (minSubgroupSize > _rhs.minSubgroupSize) return false;
761+
762+
// TODO revise how to implement < for min/maxSubgroupSize
763+
if (minSubgroupSize < _rhs.minSubgroupSize) return false;
762764
if (maxSubgroupSize > _rhs.maxSubgroupSize) return false;
765+
763766
if (maxComputeWorkgroupSubgroups > _rhs.maxComputeWorkgroupSubgroups) return false;
764767
if (!_rhs.requiredSubgroupSizeStages.hasFlags(requiredSubgroupSizeStages)) return false;
765-
if (storageTexelBufferOffsetAlignmentBytes > _rhs.storageTexelBufferOffsetAlignmentBytes) return false;
766-
if (uniformTexelBufferOffsetAlignmentBytes > _rhs.uniformTexelBufferOffsetAlignmentBytes) return false;
768+
if (storageTexelBufferOffsetAlignmentBytes < _rhs.storageTexelBufferOffsetAlignmentBytes) return false;
769+
if (uniformTexelBufferOffsetAlignmentBytes < _rhs.uniformTexelBufferOffsetAlignmentBytes) return false;
767770
if (maxBufferSize > _rhs.maxBufferSize) return false;
768771
if (primitiveOverestimationSize > _rhs.primitiveOverestimationSize) return false;
769772
if (maxExtraPrimitiveOverestimationSize > _rhs.maxExtraPrimitiveOverestimationSize) return false;
@@ -815,18 +818,21 @@ struct SPhysicalDeviceLimits
815818
if (maxPerStageDescriptorUpdateAfterBindAccelerationStructures > _rhs.maxPerStageDescriptorUpdateAfterBindAccelerationStructures) return false;
816819
if (maxDescriptorSetAccelerationStructures > _rhs.maxDescriptorSetAccelerationStructures) return false;
817820
if (maxDescriptorSetUpdateAfterBindAccelerationStructures > _rhs.maxDescriptorSetUpdateAfterBindAccelerationStructures) return false;
818-
if (minAccelerationStructureScratchOffsetAlignment > _rhs.minAccelerationStructureScratchOffsetAlignment) return false;
821+
if (minAccelerationStructureScratchOffsetAlignment < _rhs.minAccelerationStructureScratchOffsetAlignment) return false;
819822
if (variableSampleLocations && !_rhs.variableSampleLocations) return false;
820823
if (sampleLocationSubPixelBits > _rhs.sampleLocationSubPixelBits) return false;
821824
if (!_rhs.sampleLocationSampleCounts.hasFlags(sampleLocationSampleCounts)) return false;
822825
if (maxSampleLocationGridSize.width > _rhs.maxSampleLocationGridSize.width) return false;
823826
if (maxSampleLocationGridSize.height > _rhs.maxSampleLocationGridSize.height) return false;
824827
if (sampleLocationCoordinateRange[0] < _rhs.sampleLocationCoordinateRange[0] || sampleLocationCoordinateRange[1] > _rhs.sampleLocationCoordinateRange[1]) return false;
825-
if (minImportedHostPointerAlignment > _rhs.minImportedHostPointerAlignment) return false;
828+
if (minImportedHostPointerAlignment < _rhs.minImportedHostPointerAlignment) return false;
829+
830+
// TODO: Revise min/maxFragmentDensityTexelSize
826831
if (minFragmentDensityTexelSize.width < _rhs.minFragmentDensityTexelSize.width) return false;
827832
if (minFragmentDensityTexelSize.height < _rhs.minFragmentDensityTexelSize.height) return false;
828833
if (maxFragmentDensityTexelSize.width > _rhs.maxFragmentDensityTexelSize.width) return false;
829834
if (maxFragmentDensityTexelSize.height > _rhs.maxFragmentDensityTexelSize.height) return false;
835+
830836
if (fragmentDensityInvocations && !_rhs.fragmentDensityInvocations) return false;
831837
if (subsampledLoads && !_rhs.subsampledLoads) return false;
832838
if (subsampledCoarseReconstructionEarlyAccess && !_rhs.subsampledCoarseReconstructionEarlyAccess) return false;
@@ -839,10 +845,10 @@ struct SPhysicalDeviceLimits
839845
if (shaderGroupHandleSize > _rhs.shaderGroupHandleSize) return false;
840846
if (maxRayRecursionDepth > _rhs.maxRayRecursionDepth) return false;
841847
if (maxShaderGroupStride > _rhs.maxShaderGroupStride) return false;
842-
if (shaderGroupBaseAlignment > _rhs.shaderGroupBaseAlignment) return false;
848+
if (shaderGroupBaseAlignment < _rhs.shaderGroupBaseAlignment) return false;
843849
if (shaderGroupHandleCaptureReplaySize > _rhs.shaderGroupHandleCaptureReplaySize) return false;
844850
if (maxRayDispatchInvocationCount > _rhs.maxRayDispatchInvocationCount) return false;
845-
if (shaderGroupHandleAlignment > _rhs.shaderGroupHandleAlignment) return false;
851+
if (shaderGroupHandleAlignment < _rhs.shaderGroupHandleAlignment) return false;
846852
if (maxRayHitAttributeSize > _rhs.maxRayHitAttributeSize) return false;
847853
if (!_rhs.cooperativeMatrixSupportedStages.hasFlags(cooperativeMatrixSupportedStages)) return false;
848854
if (shaderOutputViewportIndex && !_rhs.shaderOutputViewportIndex) return false;

0 commit comments

Comments
 (0)