Skip to content

turnip: Use vk_query_pool and vk_buffer_view with some slight restucturing

Valentine Burley requested to merge Valentine/mesa:tu/more_core into main

What does this MR do and why?

The goal of this MR is to use a bit more of the common Vulkan runtime. Included is switching to vk_query_pool and vk_buffer_view.

With vk_query_pool there's two options: It is possible to use either vk_query_pool_create or vk_query_pool_init to initialize the query pool. vk_query_pool_create handles the memory allocation too and that's what I used here.

I juggled vkBegin/EndQuery around a bit too, explanation for that is in the commit message.

I renamed tu_query.cc/h to tu_query_pool.cc/h to match the structure of the common Vulkan runtime and NVK. I believe it's more logical this way but I'm looking forward to your feedback.

With vk_buffer_view on the other hand I tried to simplify the code a bit and drop the helper function that seemed redundant now. I also split out the buffer view related code to tu_buffer_view.cc/h, once again to better match the common Vulkan runtime, NVK and RADV and that brings me to my question:

I'm not a lawyer and I have no idea how copyright works. I ostentatiously added myself as the copyright holder for now, because I wasn't sure what I should put there. Should I keep it Red Hat and Bas? I didn't know if that still applied since the code changed quite a bit since the initial skeleton. From git blame it looked like most of the logic in the current iteration was written by Google, should it be them on the copyright? It also feels quite pretentious to list myself as I barely touched the code before moving it. Please let me know what the correct procedure is and I'll correct it.

I tried to verify the changes by running dEQP-VK.query_pool.* and dEQP-VK.api.buffer_view.* respectively, but I'll kick off a full run now to make sure I didn't miss anything.

I've observed random crashes on the a660 runners happening even on main, so definitely not related to this MR.

Edited by Valentine Burley

Merge request reports