mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-15 09:18:34 +00:00
commit
29b35ea423
2 changed files with 1 additions and 10 deletions
|
@ -470,15 +470,6 @@ void SparseBindingImage::Init(RandomNumberGenerator& rand)
|
||||||
VkMemoryRequirements imageMemReq;
|
VkMemoryRequirements imageMemReq;
|
||||||
vkGetImageMemoryRequirements(g_hDevice, m_Image, &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.
|
// According to Vulkan specification, for sparse resources memReq.alignment is also page size.
|
||||||
const VkDeviceSize pageSize = imageMemReq.alignment;
|
const VkDeviceSize pageSize = imageMemReq.alignment;
|
||||||
const uint32_t pageCount = (uint32_t)ceil_div<VkDeviceSize>(imageMemReq.size, pageSize);
|
const uint32_t pageCount = (uint32_t)ceil_div<VkDeviceSize>(imageMemReq.size, pageSize);
|
||||||
|
|
|
@ -3202,7 +3202,7 @@ static void TestMemoryRequirements()
|
||||||
|
|
||||||
static void TestGetAllocatorInfo()
|
static void TestGetAllocatorInfo()
|
||||||
{
|
{
|
||||||
wprintf(L"Test vnaGetAllocatorInfo\n");
|
wprintf(L"Test vmaGetAllocatorInfo\n");
|
||||||
|
|
||||||
VmaAllocatorInfo allocInfo = {};
|
VmaAllocatorInfo allocInfo = {};
|
||||||
vmaGetAllocatorInfo(g_hAllocator, &allocInfo);
|
vmaGetAllocatorInfo(g_hAllocator, &allocInfo);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue