mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-15 09:18:34 +00:00
GpuMemDumpVis.py: Fixed division by zero error when only custom pools are used
This commit is contained in:
parent
c51730a857
commit
84d9328d84
1 changed files with 6 additions and 5 deletions
|
@ -81,16 +81,17 @@ def IsDataEmpty():
|
||||||
def RemoveEmptyType():
|
def RemoveEmptyType():
|
||||||
global data
|
global data
|
||||||
for poolType in list(data.keys()):
|
for poolType in list(data.keys()):
|
||||||
if len(data[poolType]['DedicatedAllocations']) > 0:
|
pool = data[poolType]
|
||||||
|
if len(pool['DedicatedAllocations']) > 0:
|
||||||
continue
|
continue
|
||||||
if len(data[poolType]['Blocks']) > 0:
|
if len(pool['Blocks']) > 0:
|
||||||
continue
|
continue
|
||||||
empty = True
|
empty = True
|
||||||
for customPool in data[poolType]['CustomPools'].values():
|
for customPool in pool['CustomPools'].values():
|
||||||
if len(data[poolType]['Blocks']) > 0:
|
if len(customPool['Blocks']) > 0:
|
||||||
empty = False
|
empty = False
|
||||||
break
|
break
|
||||||
if len(data[poolType]['DedicatedAllocations']) > 0:
|
if len(customPool['DedicatedAllocations']) > 0:
|
||||||
empty = False
|
empty = False
|
||||||
break
|
break
|
||||||
if empty:
|
if empty:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue