Commit graph

201327 commits

Author SHA1 Message Date
Iago Toral Quiroga
22c1471945 broadcom: add missing opcodes for fmov on mul alu for V3D 7.x
These represent fmov variants for max0 and sat6 unpack modifiers. The variants
for max0 also exist in the add alu, but sat6 is exclusive to the mul alu.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31480>
2024-10-03 09:02:07 +00:00
Iago Toral Quiroga
aac1c074cc nir: make fclamp_pos_mali and fsat_signed_mali opcodes generic
V3D can use these too.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31480>
2024-10-03 09:02:07 +00:00
David Rosca
023277173c frontends/va: Fix AV1 packed header parsing
AV1 has no startcode, so the packed header will not contain any
additional data at the beginning of the buffer that we would need
to skip to get to the OBU header.
Also ignore OBU types that we are not parsing.
Fixes assertions with libva-utils/av1encode.

Fixes: 5edbecb856 ("frontends/va: adding va av1 encoding functions")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31359>
2024-10-03 08:25:19 +00:00
Timothy Arceri
1c58f513c4 glsl: fix gl_{Clip,Cull}Distance error messages
The error message in the linker that checked
gl_MaxCombinedClipAndCullDistances would never be issued because the
compiler was already doing the check. I think the compiler might have
been done this way in the original commit d656736b as the linker
only sets the size when the clip/cull outputs are written so the
piglit test for this wouldn't have been triggered as it does not
write to the outputs.

Here we move the error to the compiler and fix things up so the
correct messages are triggered.

Fixes: d656736bbf ("glsl: Add arb_cull_distance support (v3)")

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31471>
2024-10-03 06:59:47 +00:00
LingMan
c58b8db547 nak/hw_tests: Use f32::to_bits()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31493>
2024-10-02 22:37:51 +00:00
Boris Brezillon
790759dfaf vk/image: Fix the extent adjustment of non-compressed views
When creating a non-compressed view of a compressed image, we need to
divide the extent by the image block size not the view block size.

Fixes: 8ddc527ba4 ("vk/image: Fix the view extent of uncompressed views of compressed images")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31439>
2024-10-02 21:54:53 +00:00
Boris Brezillon
c79470a37c zink: Adjust the surface size of non-compressed views
When creating a surface with a non-compressed format that's backed
by a resource with a compressed format, we need to adjust the surface
size accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31439>
2024-10-02 21:54:53 +00:00
Boris Brezillon
767a7d785b vk/meta: Fix buffer -> image copy using a graphics pipeline
Unlike 3D image views, 2D array image views created by meta_copy only
contain the layers needed for rendering, so we shouldn't consider the
base layer an image offset.

Fixes: 07c6459cd8 ("vk/meta: Add copy/fill/update helpers")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31439>
2024-10-02 21:54:53 +00:00
Faith Ekstrand
7dc6826bc3 nak,nvk: Implement VK_KHR_shader_quad_control
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10687
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31470>
2024-10-02 21:10:32 +00:00
Faith Ekstrand
62a4fe861a nir: Add an option to lower quad vote
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31470>
2024-10-02 21:10:32 +00:00
Faith Ekstrand
64e3e2890d nvk/nvkmd: Stop leaking the primary FD
4db1bd5846 ("nvk/nvkmd: Implement dev and pdev for nouveau")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31470>
2024-10-02 21:10:32 +00:00
Marek Olšák
f546df95a6 nir/opt_vectorize_io: fix skipped output vectorization if inputs were vectorized
Fixes: 2514999c9c - nir: add nir_opt_vectorize_io, vectorizing lowered IO

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31454>
2024-10-02 20:26:23 +00:00
Juan A. Suarez Romero
b7c66f4f89 v3dv/ci: move asan fail to skip
We need to add the asan failures to skip list because otherwise all the
tests run in the same group will be marked as fail too.

Fixes: e120176c58 ("ci: uprev VKCTS to 1.3.9.2")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31477>
2024-10-02 19:56:28 +00:00
Eric Engestrom
842a7b2821 egl: fix dri2_from_names() call
The offset argument is `int *offsets`.

!31406 pointed this out and I checked for other instances of the same bug.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31484>
2024-10-02 18:33:03 +00:00
Erik Faye-Lund
fd0ff1502a panvk: expose already-implemented KHR_maintenance1
Seems this is already implemeted, mostly thanks to common code.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31264>
2024-10-02 17:59:45 +00:00
Erik Faye-Lund
14261cbb18 panvk: drop needless function implementation
The common code implements this one for us already.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31264>
2024-10-02 17:59:45 +00:00
Erik Faye-Lund
322c89e9fa panvk: implement KHR_get_memory_requirements2
The rest is already in place, it seems.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31264>
2024-10-02 17:59:44 +00:00
Lionel Landwerlin
1f2ad64b63 anv: optimize WA 16011107343/22018402687
No need to emit the instruction twice.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31481>
2024-10-02 17:27:55 +00:00
Lionel Landwerlin
4cdb5de163 anv: consolidate pre/post draw workaround in helpers
This avoids sprinkling those all over the code base. Debug breakpoints
are put in there too.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31481>
2024-10-02 17:27:55 +00:00
Lionel Landwerlin
18e2c25dad anv: limit 22018402687 to impacted platforms
ARL is impacted, but LNL is not.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31481>
2024-10-02 17:27:55 +00:00
Boris Brezillon
65d5231381 panvk: Advertise KHR_create_renderpass2 support
This is implemented for us by vk_renderpass.c, so let's enable it and
get rid of the skips caused by a NULL dereference on
->CreateRenderPass2(), even though that's a CTS bug.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31462>
2024-10-02 15:51:34 +00:00
Boris Brezillon
fbe8428af8 panvk/csf: Fix prepare_vp() when viewport->x is negative
The scissor descriptor wants positive min/max bounds.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31462>
2024-10-02 15:51:34 +00:00
Boris Brezillon
2203376865 panvk: Fix bounds checking in upload_shader_desc_info()
Replace the less-than test by a less-or-equal when checking the
dynamic buffer count.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31462>
2024-10-02 15:51:34 +00:00
Boris Brezillon
e489a92c33 panvk: Make sure RUN_IDVS has a valid tiler descriptor
As soon as we call RUN_IDVS, we need a valid tiler descriptor. Let's
kill the needs_tiling optimization until we have a proper way of
knowing when draws can be skipped or when IDVS jobs can be replaced
by plain compute.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31462>
2024-10-02 15:51:34 +00:00
Eric Engestrom
5b25784df7 zink+nvk/ci: document more flakes seen lately
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31483>
2024-10-02 15:03:56 +00:00
Eric Engestrom
6337bde12e zink+nvk/ci: mark spec@egl 1.4@egl-ext_egl_image_storage as fixed
Fixed by a commit in the 27295ca4...d5df263a range

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31483>
2024-10-02 15:03:56 +00:00
Eric Engestrom
50f04a8e99 turnip/ci: mark vkd3d test_planar_video_formats as fixed
Fixed by a commit in the 765d1c47...366f63fd range, likely !31304

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31483>
2024-10-02 15:03:56 +00:00
Erik Faye-Lund
b8bfbbdf66 panvk: check against texfeat_bit
This is the same as the previous commit, but for PanVK instead.

Fixes: 213e895da0 ("panvk: Allow compressed formats")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Erik Faye-Lund
6f1b5f3eea panfrost: do not re-fetch compressed formats
We store this in the device on start-up, no need to do it again.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Erik Faye-Lund
23cad7c695 panfrost: check fmt.bitfeat_bit for compressed-support
Because we map compressed formats to the interchange-formats on V9 and
later, we end up not actually checking for compressed support here, but
instead always checking bit 0, which is reserved in the spec.

So let's instead explicitly check bitfeat_bit here instead, which we
conveniently stored away in the previous commit.

Use 1u instead of 1 for the shifted constant, to avoid undefined
behavior when we're testing bit 31.

Fixes: 0c1fde956b ("panfrost: Add Valhall compressed formats")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Erik Faye-Lund
1637fa3d85 panfrost: store texfeat_bit in panfrost_format
To avoid increasing memory usage, make sure we pack this together with
the hw format.

This will be used in the next commit.

Fixes: 0c1fde956b ("panfrost: Add Valhall compressed formats")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Erik Faye-Lund
8072c901e1 panfrost: unify compressed formats
This reduces some duplication, and we're going to start needing the
texfeat format on valhall anyway...

Fixes: 0c1fde956b ("panfrost: Add Valhall compressed formats")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Vignesh Raman
d4fa181f7b ci/image-tags: add DEBIAN_PYUTILS_TAG
Enforce maximum image tag length for DEBIAN_PYUTILS_TAG
and sort the tags in order.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31475>
2024-10-02 13:29:33 +00:00
Mark Collins
30dc71b060 tu: Improve 2D buffer-to-image copies for A7XX
A7XX supports buffer-to-images copies with a lower alignment requirement
for the pitch and start VA, this makes it unnecessary to loop over every
row and copy them individually for any previously unaligned images. The
new alignment requirements match Vulkan requirements and should cover
all cases that aren't handled by 3D copies.

This can result in a significant performance improvement, up to 10x or
more in some cases.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31401>
2024-10-02 12:56:40 +00:00
Mark Collins
73e7ba8f14 freedreno/registers: Document TPL1_2D_SRC_CNTL register
This A7XX register is used for defining properties of the source buffer
for the 2D copies.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31401>
2024-10-02 12:56:40 +00:00
David Heidelberg
61f3294786 pvr: unify code into one condition
gcc 13.2 incorrectly evaluate that first_use is unitialized value.
This should avoid the bug and make code clearner.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31476>
2024-10-02 12:16:19 +00:00
Samuel Pitoiset
7702520239 radv: stop passing image create flags to radv_image_view_init()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31463>
2024-10-02 09:28:51 +00:00
Samuel Pitoiset
e7cf039657 radv: remove redundant assertions about image views
The vulkan/runtime already has assertions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31463>
2024-10-02 09:28:51 +00:00
Samuel Pitoiset
4308bf4cdf radv: stop passing redundant parameters to radv_image_view_make_descriptor()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31463>
2024-10-02 09:28:51 +00:00
Samuel Pitoiset
6bd9c4dad1 radv: use base mip level from vk_image_view
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31463>
2024-10-02 09:28:51 +00:00
Samuel Pitoiset
e76a26579a radv/amdgpu: add assertions to check the IB size
This can be triggered with DGC if the maximum number of sequences count
is too high. Luckily, vkd3d-proton doesn't do that, but it should be
fixed for EXT DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31464>
2024-10-02 08:44:47 +00:00
Samuel Pitoiset
d1f3a92671 radv/amdgpu: do not use a constant value for the IB size in dwords
Better to avoid magic number.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31464>
2024-10-02 08:44:47 +00:00
Eric Engestrom
816ae4ee67 ci/build: don't wait on the windows build anymore
Windows runners don't have more than one build right now, so there is
no need to wait on the "first one" to be done.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31473>
2024-10-02 07:48:44 +00:00
Job Noorman
f73d2eedfd tu: advertise shaderInt64
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
38604485be ir3: add support for 64b reductions
The existing scan/reduce macros (OPC_SCAN_MACRO/OPC_SCAN_CLUSTERS_MACRO)
hard code the reduction operations in ir3. Adding support for 64b
operations will blow up these already complicated macros. Implement a
simple scan loop in NIR for the few (hopefully rare) cases where the
generic passes cannot lower the reduction to 32b.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
52c456c641 tu: lower 64b push constants before lowering IO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
8a17eb5377 ir3: make ir3_mem_access_size_align publically available
We want to reuse it from tu_shader.cc.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
aa9b8316ae ir3: lower 64b SSBO accesses
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
c515d4bd81 ir3: run 64b phi lowering together with other 64b lowerings
nir_lower_64bit_phis was run in ir3_optimize_loop where it would fight
with nir_opt_if, causing shader compilation hangs. There's no point in
running this pass in the optimization loop as 64b phis should be lowered
together with the other 64b operations and then never appear again.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10355
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
ad12886775 ir3: lower 64b intrinsics after generic 64b lowering
ir3_nir_lower_64b_intrinsics will blindly set the def bit size to 32 for
unknown intrinsics. Give the generic passes a chance to lower them
first.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00