| 305 | return deref + '*'.join(var.length.split(',')) |
| 306 | |
| 307 | def get_fixed_array_length(fixed_length, var, parent): |
| 308 | lengthIsMember = False |
| 309 | for local in [x for x in (parent.params if isinstance(parent, Command) else parent.members)]: |
| 310 | if local.name == var.length: |
| 311 | lengthIsMember = True |
| 312 | break |
| 313 | |
| 314 | # Special case due to the length being non-constant non-local |
| 315 | if parent.name == 'VkPhysicalDeviceMemoryBudgetPropertiesEXT' and var.name in ['heapBudget', 'heapUsage']: |
| 316 | return f'std::min(ApiDumpInstance::current().getMemoryHeapCount(), {fixed_length})' |
| 317 | |
| 318 | if lengthIsMember: |
| 319 | object_access = 'object.' if isinstance(parent, Struct) else '' |
| 320 | return f'std::min({object_access}{var.length}, {fixed_length})' |
| 321 | else: |
| 322 | return fixed_length |
| 323 | |
| 324 | class ApiDumpGenerator(BaseGenerator): |
| 325 | def __init__(self): |