Merge pull request #468 from IAmNotHanni/master

Small maintenance
This commit is contained in:
Adam Sawicki 2025-03-17 10:00:40 +01:00 committed by GitHub
commit 29b35ea423
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 10 deletions

View file

@ -470,15 +470,6 @@ void SparseBindingImage::Init(RandomNumberGenerator& rand)
VkMemoryRequirements imageMemReq;
vkGetImageMemoryRequirements(g_hDevice, m_Image, &imageMemReq);
// This is just to silence validation layer warning.
// But it doesn't help. Looks like a bug in Vulkan validation layers.
// See: https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/364
uint32_t sparseMemReqCount = 0;
vkGetImageSparseMemoryRequirements(g_hDevice, m_Image, &sparseMemReqCount, nullptr);
TEST(sparseMemReqCount <= 8);
VkSparseImageMemoryRequirements sparseMemReq[8];
vkGetImageSparseMemoryRequirements(g_hDevice, m_Image, &sparseMemReqCount, sparseMemReq);
// According to Vulkan specification, for sparse resources memReq.alignment is also page size.
const VkDeviceSize pageSize = imageMemReq.alignment;
const uint32_t pageCount = (uint32_t)ceil_div<VkDeviceSize>(imageMemReq.size, pageSize);

View file

@ -3202,7 +3202,7 @@ static void TestMemoryRequirements()
static void TestGetAllocatorInfo()
{
wprintf(L"Test vnaGetAllocatorInfo\n");
wprintf(L"Test vmaGetAllocatorInfo\n");
VmaAllocatorInfo allocInfo = {};
vmaGetAllocatorInfo(g_hAllocator, &allocInfo);