mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
vulkan/cmd_queue: expose cmd sizes
now that cmds are more precisely allocated, it's necessary for drivers to have some way to determine what the allocation size is Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23322>
This commit is contained in:
parent
5759ab668e
commit
fd45ab843f
1 changed files with 16 additions and 0 deletions
|
|
@ -97,6 +97,7 @@ enum vk_cmd_type {
|
|||
};
|
||||
|
||||
extern const char *vk_cmd_queue_type_names[];
|
||||
extern size_t vk_cmd_queue_type_sizes[];
|
||||
|
||||
% for c in commands:
|
||||
% if len(c.params) <= 1: # Avoid "error C2016: C requires that a struct or union have at least one member"
|
||||
|
|
@ -228,6 +229,21 @@ const char *vk_cmd_queue_type_names[] = {
|
|||
% endfor
|
||||
};
|
||||
|
||||
size_t vk_cmd_queue_type_sizes[] = {
|
||||
% for c in commands:
|
||||
% if c.guard is not None:
|
||||
#ifdef ${c.guard}
|
||||
% endif
|
||||
% if len(c.params) > 1:
|
||||
sizeof(struct ${to_struct_name(c.name)}) +
|
||||
% endif
|
||||
sizeof(struct vk_cmd_queue_entry_base),
|
||||
% if c.guard is not None:
|
||||
#endif // ${c.guard}
|
||||
% endif
|
||||
% endfor
|
||||
};
|
||||
|
||||
% for c in commands:
|
||||
% if c.guard is not None:
|
||||
#ifdef ${c.guard}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue