Faith Ekstrand
8e722497cd
nvk: Tell WSI we don't support legacy scanout
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:01 +00:00
Faith Ekstrand
a3416aab1f
nvk: Advertise VK_KHR_separate_depth_stencil_layout
...
We entirely ignore image layouts on NVIDIA so this is trivial.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:01 +00:00
Faith Ekstrand
426de27b6f
nvk: Flush the current pushbuf before allocating a new one
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:01 +00:00
Faith Ekstrand
495c1202d3
nvk: Advertise VK_KHR_imageless_framebuffer
...
Handled entirely in common code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:01 +00:00
Faith Ekstrand
ec4675bcfc
nvk: Enable VK_KHR_create_renderpass2
...
Handled entirely in common code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:01 +00:00
Faith Ekstrand
b8021cc635
nvk: Stop leaking command pool BOs
...
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 >
2023-08-04 21:32:01 +00:00
Faith Ekstrand
156d7dd012
nvk: Don't crash if we fail to allocate a push BO
...
Currently, we continue just fine until nvk_EndCommandBuffer calls
nvk_cmd_buffer_flush_push() and it crashes tring to look at
cmd->push_bo.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
23409aea73
nvk: Events
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
62e8faf56c
nvk: Use poll for BO waits
...
The nouveau ioctl doesn't support timeouts but poll() does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
dd1b27fcb4
nvk: Use mme_load_addr64()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
696a1fe776
nouveau/parser: Handle 6F methods
...
These are the methods below 0x100 which exist on all subchannels.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
9a0d6cf442
nvk: Use a normal DMA for CmdUpdateBuffer
...
Sure, inline data is neat and all, but our upload buffers are better set
up for handling large quantities of data.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
e16b1f37a7
nvk: Handle large command buffer uploads better
...
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 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
c86d0e635d
nvk: Implement vkCmdCopyQueryPoolResults()
...
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 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
8f1b9c35fc
nvk: Use mme_tu104_read_fifoed()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
8fba9f81b4
nouveau/mme: Add a helper for MME_DMA_READ_FIFOED
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
92970b1515
nouveau/mme: Add a couple helpers for working 64-bit addresses
...
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 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
54fd3604ef
nouveau/mme: Add support for freeing registers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
d83fb1d29c
nouveau/mme: Assert on OOB registers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
c88e10dc2f
nouveau/mme: Allow ZERO as the destinatio nof mme_load_to
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
052bbd65c9
nvk: Implement pipeline statistics and occlusion queries
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
26db771abe
nvk: Implement timestamp queries
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
253d1c4469
nvk: Add a query pool object
...
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 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
bc992fc6cc
nouveau/parser: Parse all fields in each method
...
When converting to mako, the break got moved to the wrong spot and we
were only parsing the first method. Now we parse them all.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
6f01802be5
nvk/wsi: Use the common present implementation
...
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 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
d9bb29d3f8
nvk/wsi: Style fixes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
279d81c083
nvk: Reset semaphore syncs on wait
...
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 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
5b9ea2863b
nvk: Style fixes in nvk_physical_device.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Karol Herbst
32830a2d07
nvk: support exporting buffers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
e2d0be7d08
nvk: Rework whitespace in nvk_device_memory.c
...
Trying to keep things consistent...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
c9a4fd19cf
nvk: Allocate shaders from a heap
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
c227cfdaec
nvk: Add a shader heap to nvk_device
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
b110445bb8
nvk: Return a VkResult from nvk_shader_upload()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
52331a3406
nvk: Add a heap data structure
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
16bdefa530
nvk: Rework nvk_queue_submit_simple()
...
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 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
f25d239675
util/vma: Allow initializing zero-size heaps
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
275691e94c
nvk: WFI in pipeline barriers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
32f2317223
nvk: Use meta for doing blits with the 3D hardware
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
2a319d0fe9
nvk/meta: Save/restore descriptor set 0
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
1ed8fe749d
nvk: Support load_layer_id
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
cda469428d
vulkan/meta: Implement vkCmdBlitImage()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
98867ad976
vulkan/meta: Fixes for clear
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
edef53c337
vulkan/meta: Add a create_sampler helper
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
c13c6d04d7
vulkan/meta: Add a helper for image view types
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
ecf5c5c46d
vulkan/meta: Add key types
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
07530902b2
nvk: Properly implement robustBufferAccess
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
acf067d635
nvk: Add lowering for load_global_constant_bounded
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
9f57d958c3
nvk: drop nvk_nir.h
...
Instead, move the definition of nvk_nir_lower_descriptors to
nvk_shader.h.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Thomas H.P. Andersen
f098d26e91
nvk: use common pipeline layout code
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Thomas H.P. Andersen
04e7c38fd6
nvk: use common descriptor set layout code
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00