venus: refactor vn_cmd_add_query_feedback and miscs
authorYiwei Zhang <zzyiwei@chromium.org>
Thu, 6 Jul 2023 19:34:39 +0000 (12:34 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Jul 2023 22:36:48 +0000 (22:36 +0000)
commita74b6061423ccc5772bde61c58dc16827ea17423
treea9650a04facb6ea3cdf004cdc09e023ff0aaa7f2
parent5889995fbdfa9364fdc3f14b261aca7812b25c5c
venus: refactor vn_cmd_add_query_feedback and miscs

There's no functional changes:
1. remove unused function arg and use snake case
2. do early return for direct recording (avoid dup feedback checks)
3. use vk_alloc instead of vk_zalloc if applicable
4. move local struct closer to usage, and use assignment
5. convert secondary cmd in_render_pass condition check to assert
6. avoid redundant list_del upon freeing up

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24009>
src/virtio/vulkan/vn_command_buffer.c