This requires that we unify and only have one layer count for the copy
region so we arbitrarily choose extent_el.depth. We could choose layer
count but we already have a VkExtent3D so we may as well use it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Normally, Vulkan doesn't support binding 3D image views for rendering
but we support it in NVK. If we bind it as a 2D array, that requires
setting 2D_ARRAY_COMPATIBLE_BIT to get a 2D array layout.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
There are a couple of bugs here. First, vk_command_pool_finish() may
destroy command buffers which may end up returning BOs to the pool so we
need to wait to call nvk_cmd_pool_destroy_bos() until after that's
happened. Second, we weren't actually adding allocated BOs to the BO
list in nvk_cmd_buffer so they weren't ever getting returned.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Change our assertion from a < to a <=. Also, if the size of the upload
is greater than the amount of space we have left in the old BO, don't
set cmd->upload_bo to point to the new thing. Instead, let the next
upload carry on with the old buffer since it has more room.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
One day, we may want to make this a compute shader like RADV uses but
this gets us up-and-going without more infra and it's probably what we
want for small numbers of queries anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
In the command stream, they always come high bits first which is
backwards from little endian. These helpers follow that same convention
so that MMEs use the same conventions as other registers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Also, while we're here, add a skeliton for vkGetQueryPoolResult(). It
doesn't do anything yet because we haven't implemented any qeury types,
but all the helpers, etc. we need are there.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This enables WSI for NVK. Currently, it always gets the blit path and
renders correctly on X11 and corrupts on Wayland. The problem is that
we don't yet support linear images so wayland gets tiled and is wrong.
The thing that saves us for X11 is the lack of VK_EXT_pci_bus_info.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Vulkan semaphores are spec'd to auto-reset on wait but we currently
assert on signal that the state is RESET. Without this, semaphores used
more than once assert which isn't what we want.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This is a few changes rolled into one:
1. Add a sync flag to force a stall before returning
2. Re-order dw and push_dw_count to put the count first
3. Take an array of extra BOs instead of just one
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>