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
Faith Ekstrand
e0c551599f
nvk: Bring back push sync and dumping
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
13c73e3214
nvk: Also store the push BO map in nvk_queue_state
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
23aaa4e179
nvk: Add an nvk_queue_submit wrapper
...
Instead of having the common queue code call into drm_nouveau code
directly, add a wrapper layer. This gives us a place to put things like
command buffer dumping. Importantly, we move calling
`vk_queue_set_error()` to this layer because it may abort if the
`VK_ABORT_ON_DEVICE_LOST` is set and we may want to dump before that
happens.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
f249555504
nvk: Embed a nv_device_info in nvk_physical_device
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
e523c04006
nvk: Reference descriptor set layouts in the sets themselves
...
We need descriptor set layouts for vkUpdateDescriptorSets() but they
have different lifetimes. This is the entire reason for doing reference
counting at all but we haven't actually set up the descriptor set code
to take references yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
687900de4b
nvk: Implement VK_KHR_push_descriptor
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
87956e98c1
nvk: Fix up whitespace in nvk_descriptor_set.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
f1611979b4
nvk: Use vk_object_zalloc/free for descriptor pools/sets
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
b6ce5af12b
nvk: Re-indent vk_instance.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
ed2898eb2d
nouveau: Drop nouveau_ws_push
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
6315ebf58d
nouveau: Use DRM interfaces directly in MME tests
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
cf7b5de3e1
nvk: Remove remaining references to nouveau_push.h
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
4e58eb39ad
nvk: Implement vkCmdExecuteCommands()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:32:00 +00:00
Faith Ekstrand
40eedabd4a
nvk: Use nvk_cmd_bo for push bufs
...
This allows us to recycle them. It also makes implementing secondary
command buffers tractable.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
4998896ae8
nvk: Allocate upload buffers from the command pool
...
Instead of the growing BO thing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
c1b92bdf71
nvk: Add an nvk_cmd_buffer_ref_bo helper
...
We only need this for internal stuff that isn't tracked any other way.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
567148c172
nvk: Add an nvk_cmd_buffer_push helper
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
87686a2220
nvk: Rework side-band data upload
...
Instead of doing magic alignments, it now takes an explicit alignment
parameter. Also, we now have a version of the helper which does the
memcpy. This should encourage users to avoid reading reading upload
maps in case they're ever write-combine in the future.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
56843707c1
nvk: Constant buffer alignment is actually 64B
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
42fb0646a1
nvk: Fully populate QMDs before uploading
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
9ae0a5fb16
nvk: memcpy root descriptors for compute instead of doing a DMA
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
9bc97bc208
nvk: Return VkResult from nvk_cmd_buffer_upload_alloc
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
903c000055
nvk: Add BO recycling to the command pool
...
Command BOs (nvk_cmd_bo) are automatically mapped recyclable BOs to use
for upload and push buffers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00
Faith Ekstrand
366fa3c7e1
nvk: Use cmd instead of cmd_buffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326 >
2023-08-04 21:31:59 +00:00