Skip to content

Commit

Permalink
Merge branch 'v2-3'
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Oct 11, 2023
2 parents a8087e5 + e53f570 commit a03c088
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions RenderSystems/Vulkan/src/Vao/OgreVulkanVaoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1000,8 +1000,7 @@ namespace Ogre
// Found one!
size_t defaultPoolSize =
std::min( (VkDeviceSize)mDefaultPoolSize[vboFlag],
memHeaps[memTypes[*itMemTypeIdx].heapIndex].size -
mUsedHeapMemory[heapIdx] );
memHeaps[heapIdx].size - mUsedHeapMemory[heapIdx] );
poolSize = std::max( defaultPoolSize, sizeBytes );
break;
}
Expand All @@ -1027,14 +1026,13 @@ namespace Ogre
{
// We didn't try this memory type. Let's check if we can use it
// TODO: See comment above about memHeaps[heapIdx].size
const size_t heapIdx = memTypes[memTypes[i].heapIndex].heapIndex;
const size_t heapIdx = memTypes[i].heapIndex;
if( mUsedHeapMemory[heapIdx] + poolSize < memHeaps[heapIdx].size )
{
// Found one!
size_t defaultPoolSize =
std::min( (VkDeviceSize)mDefaultPoolSize[vboFlag],
memHeaps[memTypes[heapIdx].heapIndex].size -
mUsedHeapMemory[heapIdx] );
memHeaps[heapIdx].size - mUsedHeapMemory[heapIdx] );
chosenMemoryTypeIdx = static_cast<uint32>( i );
poolSize = std::max( defaultPoolSize, sizeBytes );
break;
Expand Down

0 comments on commit a03c088

Please sign in to comment.