MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / RangesIntersect

Function RangesIntersect

layers/utils/image_utils.cpp:125–128  ·  view source on GitHub ↗

Returns true if [x, x + x_size) and [y, y + y_size) overlap

Source from the content-addressed store, hash-verified

123
124// Returns true if [x, x + x_size) and [y, y + y_size) overlap
125bool RangesIntersect(int64_t x, uint64_t x_size, int64_t y, uint64_t y_size) {
126 auto intersection = GetRangeIntersection(x, x_size, y, y_size);
127 return intersection.non_empty();
128}
129
130// Implements the vkspec.html#formats-size-compatibility section of the spec
131bool AreFormatsSizeCompatible(VkFormat a, VkFormat b, VkImageAspectFlags aspect_mask) {

Calls 2

GetRangeIntersectionFunction · 0.85
non_emptyMethod · 0.80

Tested by

no test coverage detected