Use device local memory property flag instead of heap flag (Fixes #161)
This commit is contained in:
parent
75a6f46c4a
commit
6f1ab815c8
1 changed files with 1 additions and 1 deletions
|
|
@ -347,7 +347,7 @@ public:
|
||||||
VK_CHECK_RESULT(vkCreateImage(device, &image, nullptr, &frameBuf->depth.image));
|
VK_CHECK_RESULT(vkCreateImage(device, &image, nullptr, &frameBuf->depth.image));
|
||||||
vkGetImageMemoryRequirements(device, frameBuf->depth.image, &memReqs);
|
vkGetImageMemoryRequirements(device, frameBuf->depth.image, &memReqs);
|
||||||
memAlloc.allocationSize = memReqs.size;
|
memAlloc.allocationSize = memReqs.size;
|
||||||
memAlloc.memoryTypeIndex = getMemoryType(memReqs.memoryTypeBits, VK_MEMORY_HEAP_DEVICE_LOCAL_BIT);
|
memAlloc.memoryTypeIndex = getMemoryType(memReqs.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
|
||||||
VK_CHECK_RESULT(vkAllocateMemory(device, &memAlloc, nullptr, &frameBuf->depth.mem));
|
VK_CHECK_RESULT(vkAllocateMemory(device, &memAlloc, nullptr, &frameBuf->depth.mem));
|
||||||
VK_CHECK_RESULT(vkBindImageMemory(device, frameBuf->depth.image, frameBuf->depth.mem, 0));
|
VK_CHECK_RESULT(vkBindImageMemory(device, frameBuf->depth.image, frameBuf->depth.mem, 0));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue