Commit graph

175946 commits

Author SHA1 Message Date
Dave Airlie
5610fad23e nvk: fix copy lower address extraction
this was missing an 0xf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
d4d210c588 nvk: sort extensions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
130e9381a8 nvk: fix initialization override
this is already set a few lines up

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
3974f88de7 nvk: drop dead assignment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
683102a3bd nvk: drop dead assignment
p_format is not used again after this assignment

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
f4fc6511ac nouveau/headers: Add generated headers to dependencies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
fd70fcd62b nvk: CmdPushDescriptorSetWithTemplateKHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
1944af3260 nvk: Add a helper for pushing descriptors
This reduces the boilerplate a bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
15be43acc1 nvk: KHR_descriptor_update_template
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
e1b0e6220f nvk: advertise KHR_sampler_mirror_clamp_to_edge
Test run totals:
  Passed:        3162/13944 (22.7%)
  Failed:        0/13944 (0.0%)
  Not supported: 10782/13944 (77.3%)
  Warnings:      0/13944 (0.0%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
de85746f90 nvk: advertise EXT_private_data
Test run totals:
  Passed:        69/112 (61.6%)
  Failed:        0/112 (0.0%)
  Not supported: 43/112 (38.4%)
  Warnings:      0/112 (0.0%)
  Waived:        0/112 (0.0%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
86283a4fc4 nvk: advertise KHR_image_format_list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Thomas H.P. Andersen
e23f6819e0 nvk: advertise KHR_shader_non_semantic_info
Test run totals:
  Passed:        8/8 (100.0%)
  Failed:        0/8 (0.0%)
  Not supported: 0/8 (0.0%)
  Warnings:      0/8 (0.0%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
c0f42ddee4 nvk: Advertise VK_KHR_storage_buffer_storage_class
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
574b92ded6 nvk: Move more states to dynamic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
350e851b47 nvk: Advertise VK_EXT_extended_dynamic_state3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
07f6947981 nvk: Implement VK_EXT_border_color_swizzle
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
39958c9e9d vulkan: Add a helper for swizzling color values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
55483d8c7c nvk: Advertise custom border color features
We were advertising the extension string but not filling out the
features struct.  Now we should be properly advertising it "for real".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
611889bc2a nil: Fix include guards in nil_image.h
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
640783513b nvk: Use 2D array views for 3D storage images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
1fd3e5ff1d nvk: Advertise VK_KHR_maintenance1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
2c57a941cd nvk: Support 2D views of 3D images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
7559d2e93c nil: Add a helper for getting 2D views of 3D images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
343933d77a nvk: Support copies between 3D and 2D images
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>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
681224260f nvk: Bind 3D images as 3D for clears
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>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
c3f5211137 nvk: Implement VK_EXT_pci_bus_info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
Faith Ekstrand
9b20394b89 nouveau: Add PCI information to nv_device_info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:01 +00:00
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