Commit graph

2050 commits

Author SHA1 Message Date
Faith Ekstrand
cda4ca53b8 nvk: Drop nvk_device::pdev
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28105>
2024-03-11 17:46:15 +00:00
Faith Ekstrand
4b38ba5d70 nvk: Replace more dev->pdev with nvk_device_physical()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28105>
2024-03-11 17:46:15 +00:00
Faith Ekstrand
9ddaa4ea10 nvk: Add and use more cmd_buffer_*_cls helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28105>
2024-03-11 17:46:15 +00:00
Faith Ekstrand
f55bb91159 nvk: Drop a bunch of dev->pdev and just use pdev
In all these cases, we already have a pdev temporary, we're just not
using it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28105>
2024-03-11 17:46:15 +00:00
Faith Ekstrand
cc74a819e4 nvk: Disable the Out Of Range Address exception
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Faith Ekstrand
0ed7bce8e5 nvk: Always wait for the FALCON in set_priv_reg
The previous version had an optimization where, instead of actually
waiting on the FALCON to return, it would just do a bunch of nops in
some cases.  This seems broken at least on Turing+ and results in
registers not ending up with the right values.  It only really shows up
when you set two registers back-to-back in which case the second
SET_PRIV_REG may mess up the first.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Faith Ekstrand
df90d80d9d nvk: Document the register name for the helper load workaround
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Faith Ekstrand
cbcef73668 nil: Fix a typo in a comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27927>
2024-03-10 17:30:48 +00:00
Echo J
f8f9bceb17 nak: Rip out a few dead_code statements
This is a far less radical solution (but I still removed a decent
amount of them)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27991>
2024-03-10 16:28:14 +00:00
Mohamed Ahmed
3b05ebaa62 nvk: advertise shader resource residency
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
410de4bf69 nak: wire up sparse image loads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
b17f139281 nak: Wire up sparse residency for texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
140cf8d616 nak/nir: Add sparse support to shrink_image_load()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
671c6334bf nak: Plumb is_sparse through from NIR for texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
75390a7aeb nak: wire up shader resource residency intrinsics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
09e2917ee8 nak: Rename resident to fault
The predicate returns true if the requisite pixels are NOT resident.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
48803ac53d nvk: enable sparse residency features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
db45b29f5f nvk/queue: Add support for non-opaque sparse binds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
80b417d557 nvk: Refactor opaque image binds
This adds a helper for iterating over the various planes separate from
the actual bind operation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
97de81af13 nvk/queue: Add a push_bind helper
This automatically combines consecutive bind ranges so we potentially
pass a smaller set of binds to the kernel.  It also does the assert that
everything is in-bounds.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
bd6940a68d nvk: add sparse queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed
23f2cfe8fb nil: Add support for sparse resident images
These have to use one of the Vulkan specified sparse image block sizes
for the tiling and have concept of a mip tail start LOD which we need to
calculate as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
3700e58692 nvk: Use "real" 3D image views
Now that we have NAK and codegen isn't messing about with 3D images
behind our back, 3D storage images "just work".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand
e5a2a9b60e nil: Add a concept of sliced 3D image views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
c809e85832 nil: Add a concept of width to tile sizes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
f406206fee nil: Rework tiling calculations
Instead of calling choose_tiling once per LOD, we now call it once at
the top and then simply clamp at every LOD like the hardware does.  This
means all heuristic decisions get made up-front and the mip level walk
simply emulates the hardware.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
1a2f23439b nvk: Use row_stride_B instead of width for render and copies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
301e707db5 nil: Expose tiling_extent_B()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
7a314170f7 nil: Add helpers for conversion from pixel values to tiles
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
132516d702 nil: Add helper function to get tile size in pixels
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed
ad62f87045 nil: change image_level_size() to take tiling in account
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand
d20b547e8e nvk: Report official GPU names from NVIDIA when we have them
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28024>
2024-03-06 22:28:22 +00:00
Faith Ekstrand
1069b216ac nouveau: Import g_nv_name_released.h from NVIDIA OGK
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28024>
2024-03-06 22:28:22 +00:00
Faith Ekstrand
33bf7ca710 nvk: Return os_page_size for minMemoryMapAlignment
Fixes: 8017ac0e79 ("nvk: add some limits/features from binary driver.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28019>
2024-03-06 19:21:20 +00:00
Dave Airlie
ac391536eb nvk: only unmap heap bos that were mapped
Otherwise we munmap(0, size) and remove the cts binary maps

Also add an assert, though NULL is legal for munmap in theory,
nothing should be using it in practice on Linux.

Fixes: e6f137e9ed ("nvk: Only map heaps that explicitly request maps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28006>
2024-03-06 15:20:25 +10:00
Faith Ekstrand
2feb3c6e30 nak: Support F2I for 8-bit integers on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Faith Ekstrand
11de561395 nak/sm50: Use OpBfe instead of OpBRev for nir_op_find_lsb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Faith Ekstrand
3d13d190e6 nak/sm50: Fix encoding of immediates in OpFFma
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Faith Ekstrand
21de61b1ac nak: Fix printing of OpIsberd
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Mike Blumenkrantz
9a53e3b1fd nvk: bump NVK_PUSH_MAX_SYNCS to 256
technically this needs to be MUCH higher since there's no limitation
on the number of semaphore waits that can be submitted, but this is
enough to handle zink usage

fixes KHR-GL46.sparse_buffer_tests.BufferStorageTest

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27992>
2024-03-05 22:34:58 +00:00
Yonggang Luo
db103c56ab treewide: Remove vulkan/runtime vulkan/util prefix in include path
This is for unify the include style of shared vulkan headers

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27526>
2024-03-05 19:05:00 +00:00
Luca Bacci
fe520ecfbf meson,windows: Use relative paths in Vulkan ICD manifest files
See https://github.com/msys2/MINGW-packages/issues/16065

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27468>
2024-03-01 20:09:59 +00:00
Dave Airlie
d5b6f8a414 nvk: free leaked cmd_buffer descriptors state.
This wasn't been freed, free it in reset and destroy paths.

Spotted with valgrind

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27870>
2024-02-29 22:51:56 +00:00
Faith Ekstrand
3ea1d4787d nil: Enable A8_UNORM for storage buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27889>
2024-02-29 18:55:22 +00:00
Faith Ekstrand
4c73e52933 nvk: Advertise VK_KHR_pipeline_library
This is required by VK_EXT_graphics_pipeline_library

Fixes: fb564040a7 ("nvk: Advertise VK_KHR_graphics_pipeline_library")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27860>
2024-02-29 02:49:42 +00:00
Faith Ekstrand
e32c36df07 nvk: Don't print the NVK_I_WANT_A_BROKEN_VULKAN_DRIVER warning in release builds
The environment variable is still there and it still works but this
means that release builds will simply silently fail to enumerate rather
than throwing confusing warnings at users.

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Faith Ekstrand
b5dab7c965 nvk: Drop the non-conformant warning on Turing-Ada
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Faith Ekstrand
4ce4560a45 nvk: Advertise a CTS version of 1.3.7.3
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Faith Ekstrand
41722c6137 nak: Add support for imad on Volta+ and enable it in simple cases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27159>
2024-02-27 21:51:30 -06:00
Faith Ekstrand
a747cd1bd5 nak: Move NAK_FS_OUT_COLOR next to the enum
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27159>
2024-02-27 21:51:30 -06:00