MCPcopy
hub / github.com/KhronosGroup/Vulkan-Docs / Command

Class Command

scripts/vulkan_object.py:198–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197@dataclass
198class Command:
199 """<command>"""
200 name: str # ex) vkCmdDraw
201 alias: (str | None) # Because commands are interfaces into layers/drivers, we need all command alias
202 protect: (str | None) # ex) 'VK_ENABLE_BETA_EXTENSIONS'
203
204 extensions: list[str] # All extensions that enable the struct
205 version: (Version | None) # None if Version 1.0
206
207 returnType: str # ex) void, VkResult, etc
208
209 params: list[Param] # Each parameter of the command
210
211 # Only one will be True, the other is False
212 instance: bool
213 device: bool
214
215 tasks: list[str] # ex) [ action, state, synchronization ]
216 queues: list[str] # ex) [ VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_COMPUTE_BIT ]
217 allowNoQueues: bool # VK_KHR_maintenance9 allows some calls to be done with zero queues
218 successCodes: list[str] # ex) [ VK_SUCCESS, VK_INCOMPLETE ]
219 errorCodes: list[str] # ex) [ VK_ERROR_OUT_OF_HOST_MEMORY ]
220
221 # Shows support if command can be in a primary and/or secondary command buffer
222 primary: bool
223 secondary: bool
224
225 renderPass: CommandScope
226 videoCoding: CommandScope
227
228 implicitExternSyncParams: list[str]
229
230 legacy: (Legacy | None)
231
232 # C prototype string - ex:
233 # VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
234 # const VkInstanceCreateInfo* pCreateInfo,
235 # const VkAllocationCallbacks* pAllocator,
236 # VkInstance* pInstance);
237 cPrototype: str
238
239 # function pointer typedef - ex:
240 # typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)
241 # (const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance);
242 cFunctionPointer: str
243
244 # This dict tells where this command is actually defined in an extension or version.
245 # Example: vkCmdDrawMeshTasksIndirectCountEXT -> {"VK_EXT_mesh_shader": "VK_VERSION_1_2,VK_KHR_draw_indirect_count,VK_AMD_draw_indirect_count"}
246 # vkGetPhysicalDeviceToolProperties -> {"VK_VERSION_1_3": None}
247 definingRequirements: dict[str, str | None] = field(default_factory=dict, init=False)
248
249 def __lt__(self, other):
250 return self.name < other.name
251
252# After VK_KHR_extended_flags we added the information so code generation knew which
253# member has a potential pNext with extended flag values in it

Callers 1

genCmdMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected