Faith Ekstrand
60071f94e5
nvk: Use the upload queue for shader uploads
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
aea4c9a913
nvk: Add an upload queue to nvk_device
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
2074e28a0d
nvk: Add an upload queue
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
e6f137e9ed
nvk: Only map heaps that explicitly request maps
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
e162c2e78e
nvk: Use VM_BIND for contiguous heaps instead of copying
...
This gets rid of our (fairly sketchy) heap resizing via stall-and-copy
and replaces it with VM_BIND. We couldn't do this on the old nouveau
API but now that we can assume VM_BIND, it makes everything simpler.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
f0fad6ed17
nvk/queue: Only initialize the necessary engines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
ced7c5193e
nvk/queue: Rework context state init
...
The queue now owns the nv_push and just invokes the per-engine functions
to fill it with context state init data. This also splits out 3D and
compute into separate helpers and pulls M2MF off into its own thing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
b02f83e5c6
nvk: Add an array of queue families to nvk_physical_device
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
86e79cd744
nvk: Move the nouveau_ws_context to nvk_queue
...
Otherwise, different queues aren't actually going to run independently.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
3273eaf52a
nvk/queue: Refactor the push builder a bit
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
88b19ccc3f
nvk/queue: Pull DRM specfc stuff into nvk_queue_drm.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
88445fc12a
nouveau/winsys: Allow only allocating a subset of engines
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Faith Ekstrand
c4ea8ab527
nouveau/winsys: Re-order channel creation
...
Also, rework the fail gotos so they make a little more sense. Since we
were already calling dealloc the first time a subchan fails, we may as
well just always use dealloc. Worst case the ioctl fails.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27205 >
2024-02-01 03:51:08 +00:00
Dave Airlie
1d1a7f9d56
nvk: mem cannot be null in binding buffers/images.
...
Tom on discord pointed out a coverity warning in this area about
mem dereferences. Vulkan API states that mem must be non-NULL,
so remove those paths that are unused.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27255 >
2024-01-31 22:57:57 +00:00
Dave Airlie
4097df29f6
nvk: allow 3d compressed textures
...
Fixes KHR-GL45.packed_pixels.varied_rectangle.compressed_*
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26990 >
2024-01-31 13:32:32 +00:00
Faith Ekstrand
9ddf647eab
nvk: Fix whitespace in nvk_image.c
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26990 >
2024-01-31 13:32:32 +00:00
Faith Ekstrand
e8bec58de0
nil: Set the level offset to 0 in nil_image_for_level
...
The offset_B member of levels[0] should always be 0. In this case,
we're copying the level from the previous image but we've already taken
the offset into account via the offset_B_out parameter. Leaving the
offset non-zero risks it getting added in twice if nil_image_for_level
gets called again. In particular, NVK can hit this with 3D compressed
textures with VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT set.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26990 >
2024-01-31 13:32:32 +00:00
Faith Ekstrand
45a6e1dc89
nak/nir: Stop lowering load_local_invocation_index
...
NAK_SV_COMBINED_TID is not gl_InvocationIndex. It's just gl_InvocationID
with the three components all crammed into one 32-bit value.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27365 >
2024-01-31 01:23:23 +00:00
Faith Ekstrand
ac11cb0f72
nvk: Call lower_compute_system_values after zer_initialize_workgroup_memory
...
Fixes: 184bcfdc1c ("nvk: Implement VK_KHR_zero_initialize_workgroup_memory")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27365 >
2024-01-31 01:23:23 +00:00
Daniel Schürmann
26c8f13ff5
vulkan: enable VK_KHR_shader_expect_assume
...
This implementation ignores the hints.
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27265 >
2024-01-30 19:09:42 +00:00
Daniel Almeida
8ff3a13e4d
nak: sm50: fix some legalization issues
...
Match the sm50 legalization pass with the requirements expressed in
encode_sm50.rs. Make sure the SrcTypes passed in the legalization
pass are correct while we're at it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26987 >
2024-01-30 02:36:57 +00:00
Daniel Almeida
b18472c718
nak/sm50: add support for brev
...
Fixes dEQP-VK.spirv_assembly.type.vec3.u32.bit_reverse_comp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723 >
2024-01-30 01:49:59 +00:00
Daniel Almeida
84a7e94f31
nak/sm50: legalize: display instruction on panic
...
This makes it faster to know what is broken from logs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723 >
2024-01-30 01:49:59 +00:00
Daniel Almeida
c1614913d9
nak: sm50: fadd: ensure src[0] is in a register
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723 >
2024-01-30 01:49:59 +00:00
Daniel Almeida
2ac28dd9a9
nak: sm50: add support for OpOut
...
Geometry shaders are broken otherwise.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723 >
2024-01-30 01:49:59 +00:00
Daniel Almeida
8b40a8715d
nak/sm50: add support for isberd
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26723 >
2024-01-30 01:49:59 +00:00
Faith Ekstrand
55413e33dc
nvk: Disable all cbufs in nvk_queue_init_context_draw_state()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27320 >
2024-01-27 17:54:19 +00:00
Faith Ekstrand
35bd36c1b0
nvk: Whitespace fixes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27320 >
2024-01-27 17:54:19 +00:00
Faith Ekstrand
c4254f374f
nvk: Do a second submit to check for errors in the sync case
...
With NVK_DEBUG=push_sync, we signal and immediately wait on a syncobj
to better detect whitch push failed and then print it. However, the
syncobj wait itself isn't enough to check for errors. We have to try
pushing again. Adding an empty push lets us get errors immediately and
print the actually failing pushbuf to stderr.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27320 >
2024-01-27 17:54:19 +00:00
Thomas H.P. Andersen
614e4269cf
nvk: promote load_store_op_none to KHR
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27297 >
2024-01-27 17:38:58 +00:00
Thomas H.P. Andersen
132b3a79f4
nvk: promote VK_EXT_line_rasterization to KHR
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27297 >
2024-01-27 17:38:58 +00:00
Thomas H.P. Andersen
da910fc2fd
nvk: promote VK_EXT_index_type_uint8 to KHR
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27297 >
2024-01-27 17:38:58 +00:00
Echo J
32babbc416
nvk: Set ICD version to 1.3
...
This should complete the Vulkan 1.3 puzzle
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27319 >
2024-01-27 16:19:10 +00:00
Faith Ekstrand
a0a453e43f
nvk: Advertise Vulkan 1.3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27317 >
2024-01-27 06:30:08 +00:00
Faith Ekstrand
25d40e8e2c
nvk: Stop requiring dedicated allocations
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27317 >
2024-01-27 06:30:08 +00:00
Faith Ekstrand
6260fa47ff
nak: Loop to ensure we get accurate shader clocks
...
Even though CS2R can fetch a whole 64 bits at a time, that doesn't mean
it does so atomically. Instead, we need to loop, alternating high and
low until we fetch the same high value twice.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27303 >
2024-01-26 16:55:50 +00:00
Faith Ekstrand
48ebfeba34
nak: Add a source barrier intrinsic
...
This just inserts a GPU stall until the given source is available. We
need this in order to properly implement shader clock.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27303 >
2024-01-26 16:55:50 +00:00
Faith Ekstrand
d57c79846d
nak: Choose S2R vs CS2R based on sysval index
...
CS2R is only allowed for SV_CLOCK
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27303 >
2024-01-26 16:55:50 +00:00
Faith Ekstrand
99ef70d8aa
nak: Fix TCS output reads
...
The hardware uses the lane index for per-vertex TCS output reads rather
than the vertex index. Fortunately, it's a pretty easy calculation to
go from one to the other.
Fixes: abe9c1fea2 ("nak: Add NIR lowering for attribute I/O")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27284 >
2024-01-26 00:07:40 +00:00
Faith Ekstrand
b2824dd38d
nvk: Set maxInlineUniformTotalSize
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27242 >
2024-01-24 19:26:04 +00:00
Faith Ekstrand
58e916b3b7
nvk: Don't exnore ExternalImageFormatInfo
...
Fixes: 702326d013 ("nvk: Add external memory queries")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27242 >
2024-01-24 19:26:04 +00:00
Karol Herbst
c7ffbd8759
nak: fix clippy::single_match warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234 >
2024-01-24 17:46:29 +00:00
Karol Herbst
cce0a42dcd
nak: fix clippy::clone_on_copy warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234 >
2024-01-24 17:46:29 +00:00
Karol Herbst
e7a059794e
nak: fix clippy::manual_while_let_some warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234 >
2024-01-24 17:46:29 +00:00
Karol Herbst
36cb48d083
nak: fix clippy::unwrap_or_default warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234 >
2024-01-24 17:46:29 +00:00
Karol Herbst
fb53146b44
nak: fix clippy::redundant_closure warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234 >
2024-01-24 17:46:29 +00:00
Karol Herbst
06ff342ee1
nak: fix clippy::needless_return warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234 >
2024-01-24 17:46:29 +00:00
Karol Herbst
4b039abd7b
nak: fix clippy::match_like_matches_macro warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234 >
2024-01-24 17:46:29 +00:00
Karol Herbst
4d414cb61a
nak: fix clippy::while_let_loop warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234 >
2024-01-24 17:46:29 +00:00
Karol Herbst
1effb5262a
nak: fix clippy::needless_borrow warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234 >
2024-01-24 17:46:29 +00:00