Commit graph

1905 commits

Author SHA1 Message Date
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
Karol Herbst
3d4bd73fa3 nak: fix clippy::needless_lifetimes warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
00a6e2ae4d nak: fix clippy::useless_conversion warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
ec7b32d920 nak: fix clippy::mem_replace_with_default warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
cab414669f nak: fix clippy::extra_unused_lifetimes warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Karol Herbst
7c9734b6dc nak/meson: specify rust flags globally and allow some clippy lints
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
2024-01-24 17:46:29 +00:00
Benjamin Lee
94d075d049 nak: handle nop ops from NAK IR on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27178>
2024-01-23 22:26:44 +00:00
Benjamin Lee
fc232a67a4 nak: implement cs2r op on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27178>
2024-01-23 22:26:43 +00:00
Benjamin Lee
48055f6a23 nak: implement kill op on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27178>
2024-01-23 22:26:43 +00:00
Karol Herbst
bd901213dc nak: make it compile with clippy
nobody actually cares about fixing clippy warnings/errors inside NAK, so
drop the flags for now to make it at least compile.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27216>
2024-01-23 16:15:06 +00:00
Karol Herbst
548d919bd3 nak: simplify phi_dsts
clippy complained that nothing was actually looping here. Luckily we can
simplify the code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27216>
2024-01-23 16:15:06 +00:00
Karol Herbst
0a414ecdf5 nak/opt_out: fix comparison in try_combine_outs
clippy complained it was comparing the same thing

Fixes: 5b355ff25a ("nak: Fix opt_out")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27216>
2024-01-23 16:15:06 +00:00
Benjamin Lee
c3fbd0dcb1 nak: use rro when emitting mufu on SM50
Fixes dEQP-VK.glsl.builtin.precision.*, which was previously failing for
trig functions, exp, and pow.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27203>
2024-01-23 15:43:16 +00:00
Benjamin Lee
4a0f5fff87 nak: implement rro op on SM50
This is the "range reduction operator", which is needed to preprocess
srcs for some of the mufu ops on SM50.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27203>
2024-01-23 15:43:16 +00:00
Karol Herbst
f2b7c4ce29 nir: rework and fix rotate lowering
No driver supports urol/uror on all bit sizes. Intel gen11+ only for 16
and 32 bit, Nvidia GV100+ only for 32 bit. Etnaviv can support it on 8,
16 and 32 bit.

Also turn the `lower` into a `has` option as only two drivers actually
support `uror` and `urol` at this momemt.

Fixes crashes with CL integer_rotate on iris and nouveau since we emit
urol for `rotate`.

v2: always lower 64 bit

Fixes: fe0965afa6 ("spirv: Don't use libclc for rotate")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by (Intel and nir): Ian Romanick <ian.d.romanick@intel.com>

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27090>
2024-01-22 10:27:44 +00:00
Daniel Almeida
d1519e6ab7 nak/sm50: add support for suatom
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26957>
2024-01-19 16:45:59 +00:00
Daniel Almeida
9f54d269c2 nak/sm50 add support for suld
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26957>
2024-01-19 16:45:59 +00:00
Faith Ekstrand
458d4150df nak: Legalize OpBMsk
Fixes: bb10f7f5da ("nak: Implement nir_op_bfm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27177>
2024-01-19 16:27:52 +00:00
Benjamin Lee
f05350899a nak: fix iabs on SM50 with an explicit i2i op
Fixes bug where we were not setting the src iabs modifier when lowering
an iabs op to i2i in the encoder.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27105>
2024-01-19 02:48:04 +00:00
Faith Ekstrand
7f332f4087 nak: Enable NIR fuse_ffmaN
This improves vkpeak perf by 40-50% on the Ada GPU in my laptop.  There
are probably more optimal things we can be doing (Intel's pass is pretty
clever) but this is already an improvement.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27157>
2024-01-19 02:34:41 +00:00
Faith Ekstrand
280fe3f592 nvk: Wire up nir_opt_large_constants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Faith Ekstrand
0bc02eee4b nak: Refactor shader upload math
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Faith Ekstrand
148971f232 nvk/draw: Map cbuf slots to shaders, not cbuf_maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Faith Ekstrand
5b1afb0482 nvk: Advertise VK_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Faith Ekstrand
a55b2996ab nak: Add support for SPV_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Hans-Kristian Arntzen
4ab6d7e753 wsi/x11: Add drirc option to ignore SUBOPTIMAL.
Talos Principle and related games on that engine fail to handle
SUBOPTIMAL properly. Adds an option to ignore SUBOPTIMAL and pretend
it's SUCCESS.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27037>
2024-01-18 17:23:32 +00:00
Benjamin Lee
30e09d0e98 nak: implement FLO on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27129>
2024-01-18 05:02:27 +00:00
Faith Ekstrand
184bcfdc1c nvk: Implement VK_KHR_zero_initialize_workgroup_memory
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9609
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
6e214f2157 nvk: Properly configure the min/max shared mem size
We don't really understand what these values are supposed to be but this
is a lot closer to what the blob does and lets more compute tests pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
eaa7980e15 nvk: Add a #define for max shared memory size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
be0f04f5bd nvk: Unref shaders on pipeline free
Fixes: d6a1e29ccd ("nvk: pipeline shader cache")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Faith Ekstrand
4b0448d8f8 nvk: Set framebufferIntegerColorSampleCounts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27130>
2024-01-18 00:10:40 +00:00
Mary Guillemard
531505f8c5 nouveau: mme: Add a dumper
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
cb6d954c67 nouveau: nvidia-headers: Add nv_push_dump tool
Add "nv_push_dump" allowing to dump a human readable version of a
pushbuf blob.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
d9cd3e4c55 nouveau: nvidia-headers: Add compute array parsing to class_parser.py
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
2cc9ad0e5c nouveau: nvidia_header: Add AMPERE_COMPUTE_B in vk_push_print
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
20b3f9521e nouveau: nvidia_header: Add TURING_COMPUTE_A and AMPERE_COMPUTE_A in vk_push_print
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Mary Guillemard
2d8b9b9160 nouveau: nvidia_header: Add AMPERE_A in vk_push_print
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Faith Ekstrand
32f2a0f1e1 nouveau/mme: Stop using isaspec
We had hand-written decoders for the simulators anyway so it really
isn't gaining us much.  It does, however, make the whole build more
complicated.  Better to just drop it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Faith Ekstrand
a69b7f1b19 nouveau/mme/fermi: Stop truncating iadd immediates
It's better to leave it in signed form so that we can assert that it's
an int18 later if we want.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27126>
2024-01-17 21:26:07 +00:00
Benjamin Lee
1593caf610 nak: implement FSWZADD on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27063>
2024-01-16 23:46:19 +00:00
Faith Ekstrand
bb10f7f5da nak: Implement nir_op_bfm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00
Faith Ekstrand
c14f4cc052 nak: Rename OpBrev to OpBRev
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26550>
2024-01-16 23:32:13 +00:00