Commit graph

2019 commits

Author SHA1 Message Date
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
Faith Ekstrand
1881d97c27 nak: Implement nir_op_iadd3 on SM70+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27159>
2024-02-27 21:51:29 -06:00
Daniel Almeida
efc4ac0d27 nak/sm50: sprinkle OpAnnotate in optimization passes
Not only do we want to know where an Op originated from, but also how it got
transformed along the way if possible. Preferably all the way to the final
machine code emitted.

This commit inserts OpAnnotates in some of the optimization passes when
map_instr() or Instr::new_boxed is used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27158>
2024-02-28 01:12:03 +00:00
Daniel Almeida
feb2d3e1da nak/sm50: support annotations through OpAnnotate
Add a new op to annotate the IR. This will help debugging and is only
in effect when NAK_DEBUG=annotate is set.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27158>
2024-02-28 01:12:03 +00:00
Daniel Almeida
a69bd9a70a nak/sm50: add an annotate debug flag
Add a flag so that users can enable debug annotations when printing the IR.
This does nothing for now. A follow-up commit will actually implement
annotations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27158>
2024-02-28 01:12:03 +00:00
Daniel Almeida
02774be708 nak/sm50: add a memstream abstraction
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27158>
2024-02-28 01:12:03 +00:00
Faith Ekstrand
b8c3d18fba nvk: Advertise VK_EXT_shader_object
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9648
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
fb564040a7 nvk: Advertise VK_KHR_graphics_pipeline_library
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9635
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
813b253939 nvk: Switch to shader objects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
4001658c18 nvk: Use vk_render_pass_state::attachments for write masks
This pulls everything into nvk_cmd_draw.c where it's a bit easier to
manage.  When the time comes for switching to EXT_shader_object, this
will let us handle VK_EXT_dynamic_rendering_unused_attachments via the
common vk_pipeline code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
839629634f nvk: Move nir_lower_patch_vertices to nvk_lower_nir()
As long as it happens after we merge tess info between the two stages
(it does) then there's no need to have it in the pipeline code.  It's
just an optimization anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
bd76444257 nvk: Pass an array of descriptor sets to nvk_lower_nir
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
a4f519d72d nvk: Move populate_fs_key to nvk_shader.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
045741ac30 nvk/shader: Refactor some helpers
This puts them in the form we need for vk_shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
Faith Ekstrand
626f38e25e nvk: Populate vk_descriptor_set_layout::blake3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024>
2024-02-27 22:17:09 +00:00
M Henning
af2cea8f84 nak: Remove assert on nir->info.outputs_written
nir->info.outputs_written isn't used for fragment shaders except as an
early out a few lines above this, so we don't rely on this property.

My best guess is that this was intended to check if the information
from nir_gather_info is stale, but dead variables fail the assert
even if the info is up to date.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27595>
2024-02-27 21:58:08 +00:00
Faith Ekstrand
8ab337047c nvk: Advertise VK_KHR_maintenance5
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9616
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:08 +00:00
Faith Ekstrand
509fdf4fe4 nvk: Use VkPipelineCreateFlags2 flag names
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:08 +00:00
Faith Ekstrand
8ed3aa7b1a nvk/copy: Handle VK_REMAINING_ARRAY_LAYERS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:08 +00:00
Faith Ekstrand
a120022b02 nvk: Handle missing gl_PointSize in the last geometry stage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:07 +00:00
Faith Ekstrand
4287d04e98 nak: Add writes_point_size to nak_shader_info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:07 +00:00
Faith Ekstrand
828b3c18fb nil: Add PIPE_FORMAT_R5G5B5A1_UNORM
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27795>
2024-02-26 16:25:07 +00:00
Alyssa Rosenzweig
a97966b840 vulkan: add vk_index_type_to_restart helper
from nvk

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27764>
2024-02-26 14:13:07 +00:00
Faith Ekstrand
4499871e34 nvk: Advertise VK+KHR_incremental_present
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27785>
2024-02-25 14:44:20 -06:00
Faith Ekstrand
b3fd66c889 nvk: Only expose VK_KHR_present_id/wait when we have WSI
Also update docs/features.txt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27785>
2024-02-25 14:44:20 -06:00
Faith Ekstrand
a9214460ee nvk: Expose a host-visible VRAM type when we have REBAR
We use host maps of VRAM all over the driver on Maxwell+ so we know they
work.  This exposes it to applications for use for data upload.  To
avoid thrashing, we only expose this on systems with properly a
configured PCI controllwer with resizable BAR support.

We already choose whether or not to set the MMAP bit when creating the
BO based on memory type properties so we just need to add the type.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
2024-02-23 16:27:21 -06:00
Faith Ekstrand
f5cb1eed26 nvk: Upload shaders on the CPU when we have ReBAR
Without without resizable BAR, we're limited as to how much VRAM we can
map and we sometimes run out of maps for games with large numbers of
shaders.  We keep using the DMA engine fallback in that case.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
2024-02-23 16:25:49 -06:00
Faith Ekstrand
9ed7f8c54e nvk/heap: Upload shaders on the CPU when we have a map
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
2024-02-23 16:25:49 -06:00
Faith Ekstrand
d4623da9a3 nouveau/winsys: Getch the BAR size from the kernel
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
2024-02-23 16:25:49 -06:00
Faith Ekstrand
85849ed9cb nvk: implement EXT_memory_budget
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:13 +00:00
Faith Ekstrand
db2162efa6 nvk: Add an available query to nvk_memory_heap
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:13 +00:00
Faith Ekstrand
bbb458be8d nvk: Use 3/4 of total system memory for the VRAM heap
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
2024-02-23 21:27:13 +00:00