Returns true if two memory blocks occupy overlapping pages. ResourceA must be in less memory offset than ResourceB. Algorithm is based on "Vulkan 1.0.39 - A Specification (with all registered Vulkan extensions)" chapter 11.6 "Resource Memory Association", paragraph "Buffer-Image Granularity". */
| 3753 | chapter 11.6 "Resource Memory Association", paragraph "Buffer-Image Granularity". |
| 3754 | */ |
| 3755 | static inline bool VmaBlocksOnSamePage( |
| 3756 | VkDeviceSize resourceAOffset, |
| 3757 | VkDeviceSize resourceASize, |
| 3758 | VkDeviceSize resourceBOffset, |
| 3759 | VkDeviceSize pageSize) |
| 3760 | { |
| 3761 | VMA_ASSERT(resourceAOffset + resourceASize <= resourceBOffset && resourceASize > 0 && pageSize > 0); |
| 3762 | VkDeviceSize resourceAEnd = resourceAOffset + resourceASize - 1; |
| 3763 | VkDeviceSize resourceAEndPage = resourceAEnd & ~(pageSize - 1); |
| 3764 | VkDeviceSize resourceBStart = resourceBOffset; |
| 3765 | VkDeviceSize resourceBStartPage = resourceBStart & ~(pageSize - 1); |
| 3766 | return resourceAEndPage == resourceBStartPage; |
| 3767 | } |
| 3768 | |
| 3769 | /* |
| 3770 | Returns true if given suballocation types could conflict and must respect |
no outgoing calls
no test coverage detected