mirror of
https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
synced 2025-05-16 17:58:41 +00:00
scripts: Sync base_generator.py
This commit is contained in:
parent
524f8910d0
commit
fce11d52fe
1 changed files with 13 additions and 3 deletions
|
@ -298,6 +298,13 @@ class BaseGenerator(OutputGenerator):
|
|||
# Turn handle parents into pointers to classess
|
||||
for handle in [x for x in self.vk.handles.values() if x.parent is not None]:
|
||||
handle.parent = self.vk.handles[handle.parent]
|
||||
# search up parent chain to see if instance or device
|
||||
for handle in [x for x in self.vk.handles.values()]:
|
||||
next_parent = handle.parent
|
||||
while (not handle.instance and not handle.device):
|
||||
handle.instance = next_parent.name == 'VkInstance'
|
||||
handle.device = next_parent.name == 'VkDevice'
|
||||
next_parent = next_parent.parent
|
||||
|
||||
maxSyncSupport.queues = Queues.ALL
|
||||
maxSyncSupport.stages = self.vk.bitmasks['VkPipelineStageFlagBits2'].flags
|
||||
|
@ -572,9 +579,12 @@ class BaseGenerator(OutputGenerator):
|
|||
if alias is not None:
|
||||
return
|
||||
type = typeElem.get('objtypeenum')
|
||||
parent = typeElem.get('parent') # will resolve later
|
||||
instance = parent == 'VkInstance'
|
||||
device = not instance
|
||||
|
||||
# will resolve these later, the VulkanObjectType doesn't list things in dependent order
|
||||
parent = typeElem.get('parent')
|
||||
instance = typeName == 'VkInstance'
|
||||
device = typeName == 'VkDevice'
|
||||
|
||||
dispatchable = typeElem.find('type').text == 'VK_DEFINE_HANDLE'
|
||||
|
||||
self.vk.handles[typeName] = Handle(typeName, type, protect, parent, instance, device, dispatchable)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue