Skip to content

Commit

Permalink
Fix missing vkQueue* command props table (#2189)
Browse files Browse the repository at this point in the history
  • Loading branch information
krOoze authored Aug 25, 2023
1 parent cca09d3 commit 08b500c
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions scripts/validitygenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1358,23 +1358,20 @@ def makeCommandPropertiesTableHeader(self):
return header

def makeCommandPropertiesTableEntry(self, cmd, name):
cmdbufferlevel, renderpass, videocoding, queues, tasks = None, None, None, None, None

if 'vkCmd' in name:
# Must be called in primary/secondary command buffers appropriately
cmdbufferlevel = cmd.get('cmdbufferlevel')
cmdbufferlevel = (' + \n').join(cmdbufferlevel.title().split(','))
entry = '|' + cmdbufferlevel

# Must be called inside/outside a render pass appropriately
renderpass = cmd.get('renderpass')
renderpass = renderpass.capitalize()
entry += '|' + renderpass

# Must be called inside/outside a video coding scope appropriately
if self.videocodingRequired():
videocoding = self.getVideocoding(cmd)
videocoding = videocoding.capitalize()
entry += '|' + videocoding
videocoding = self.getVideocoding(cmd).capitalize()

#
# This test for vkCmdFillBuffer is a hack, since we have no path
Expand All @@ -1387,34 +1384,31 @@ def makeCommandPropertiesTableEntry(self, cmd, name):
queues = [ 'graphics', 'compute' ]
else:
queues = self.getQueueList(cmd)

queues = (' + \n').join([queue.title() for queue in queues])

entry += '|' + queues

# Print the task type
tasks = cmd.get('tasks')
tasks = (' + \n').join(tasks.title().split(','))
entry += '|' + tasks

return entry
elif 'vkQueue' in name:
# For queue commands there are no command buffer level, render
# pass, or video coding scope specific restrictions, but the
# queue types are considered
entry = '|-|-|'
# pass, or video coding scope specific restrictions,
# or command type, but the queue types are considered
cmdbufferlevel = '-'
renderpass = '-'
if self.videocodingRequired():
entry += '-|'
videocoding = '-'

queues = self.getQueueList(cmd)
if queues is None:
queues = 'Any'
else:
queues = (' + \n').join([queue.upper() for queue in queues])

return entry + queues
tasks = '-'

return None
table_items = (cmdbufferlevel, renderpass, videocoding, queues, tasks)
entry = '|'.join(filter(None, table_items))

return ('|' + entry) if entry else None


def findRequiredEnums(self, enums):
Expand Down

0 comments on commit 08b500c

Please sign in to comment.