mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-15 01:08:31 +00:00
Fix ineffective error code checks.
This commit is contained in:
parent
05973d8aeb
commit
63480d6a88
1 changed files with 3 additions and 3 deletions
|
@ -16404,7 +16404,7 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage(
|
||||||
pImageCreateInfo,
|
pImageCreateInfo,
|
||||||
allocator->GetAllocationCallbacks(),
|
allocator->GetAllocationCallbacks(),
|
||||||
pImage);
|
pImage);
|
||||||
if(res >= 0)
|
if(res == VK_SUCCESS)
|
||||||
{
|
{
|
||||||
VmaSuballocationType suballocType = pImageCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL ?
|
VmaSuballocationType suballocType = pImageCreateInfo->tiling == VK_IMAGE_TILING_OPTIMAL ?
|
||||||
VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL :
|
VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL :
|
||||||
|
@ -16429,14 +16429,14 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCreateImage(
|
||||||
1, // allocationCount
|
1, // allocationCount
|
||||||
pAllocation);
|
pAllocation);
|
||||||
|
|
||||||
if(res >= 0)
|
if(res == VK_SUCCESS)
|
||||||
{
|
{
|
||||||
// 3. Bind image with memory.
|
// 3. Bind image with memory.
|
||||||
if((pAllocationCreateInfo->flags & VMA_ALLOCATION_CREATE_DONT_BIND_BIT) == 0)
|
if((pAllocationCreateInfo->flags & VMA_ALLOCATION_CREATE_DONT_BIND_BIT) == 0)
|
||||||
{
|
{
|
||||||
res = allocator->BindImageMemory(*pAllocation, 0, *pImage, VMA_NULL);
|
res = allocator->BindImageMemory(*pAllocation, 0, *pImage, VMA_NULL);
|
||||||
}
|
}
|
||||||
if(res >= 0)
|
if(res == VK_SUCCESS)
|
||||||
{
|
{
|
||||||
// All steps succeeded.
|
// All steps succeeded.
|
||||||
#if VMA_STATS_STRING_ENABLED
|
#if VMA_STATS_STRING_ENABLED
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue