Compare commits

...

696 Commits

Author SHA1 Message Date
Eric Engestrom
27f5670eac docs: add sha sum for 24.1.7 2024-08-29 01:18:08 +02:00
Eric Engestrom
c096106587 VERSION: bump for 24.1.7 2024-08-29 00:13:18 +02:00
Eric Engestrom
fdbb05e34c docs: add release notes for 24.1.7 2024-08-29 00:12:34 +02:00
Sviatoslav Peleshko
6d80687b24 anv: Add full subgroups WA for the shaders with barriers in Breaking Limit
When barriers are used in invalid shaders with non-uniform control flow
we might get a hang. Forcing 32-wide group can help by making it more
probable that barrier instruction is executed by at least one channel
in each thread, and thus hang will be avoided. This shouldn't affect
Xe2+, where active-thread-only barriers are used anyway.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11497
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30581>
(cherry picked from commit 7e52b67801)
2024-08-28 22:12:44 +02:00
Sviatoslav Peleshko
eedc72aa87 anv: Release correct BO in anv_cmd_buffer_set_ray_query_buffer
If p_atomic_cmpxchg doesn't set the ray_query_shadow_bos[bucket] to new_bo
allocated by this thread, it returns the bucket BO allocated by the other
thread and we use it. But due to a mistake, we also release that BO, not
the candidate just allocated by this thread and never used again.

Fixes: 5d3e4193 ("anv: enable ray queries")
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30581>
(cherry picked from commit 1904fe1186)
2024-08-28 21:21:28 +02:00
Sviatoslav Peleshko
d9608d4a52 brw,elk: Fix opening flags on dumping shader binaries
Truncation is needed for overwriting correctly in cases when old file is
bigger than the one we want to dump (e.g. when the old one was edited
inplace). Also, creation permissions are way too broad.

Fixes: 4f41c44d ("intel/compiler: Add variable to dump binaries of all compiled shaders")
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30581>
(cherry picked from commit 09122e2be0)
2024-08-28 21:21:26 +02:00
Lionel Landwerlin
54db037efb nir/divergence: add missing load_constant_base_ptr
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30712>
(cherry picked from commit 2158fe2ae2)
2024-08-28 21:21:09 +02:00
Lionel Landwerlin
f5dd531c37 anv: always use workaround_address, not workaround_bo
The workaround BO has some debug information at the beginning. The
workaround address is placed after that.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30844>
(cherry picked from commit d8ec8acede)
2024-08-28 21:19:42 +02:00
Dave Airlie
f6da7d541b llvmpipe: make sure to duplicate the fd handle before giving out
This handle is given to the user to close, so make sure to dup it
first.

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30839>
(cherry picked from commit 4bf257a18f)
2024-08-28 21:16:59 +02:00
Valentine Burley
46695f7cca llvmpipe: Only use udmabuf with libdrm
It's possible to have the linux/udmabuf.h header but not libdrm in some setups, like under Termux.

Fixes: 112063a060 ("llvmpipe: Only use udmabuf if header is found")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30853>
(cherry picked from commit 4cfaf10c10)
2024-08-28 21:15:40 +02:00
Karol Herbst
1a04c98ed6 rusticl/device: limit CL_DEVICE_IMAGE_MAX_BUFFER_SIZE more aggressively
We can't exceed c_int::MAX, because the CTS casts to ints in a few places.

We also need to take into account max pixel size when restricting to
max_mem_alloc as this cap is pixel based, not byte based.

Cc: mesa-stable

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30739>
(cherry picked from commit eef1af8128)
2024-08-28 20:39:19 +02:00
Eric Engestrom
0732c284e1 vc4: Add missing libvc4_neon build dependencies
Duplicates the libvc4 dependencies.

Fixes: ebcb4c2156 ("meson: Enable VC4's NEON assembly support.")
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Co-authored-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30819>
(cherry picked from commit fda6f8638a)
2024-08-28 16:00:27 +02:00
Dave Airlie
1868e7244c radv/video: fix reporting video format props for encode.
When encode isn't enabled, refuse the image usage, also use
the correct error on the decode check.

Fixes: 05cd42417f ("radv/video: enable video encoding behind perftest flag")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30838>
(cherry picked from commit 68cd36d9b4)
2024-08-28 16:00:11 +02:00
David Heidelberg
5c4bbd97b8 etnaviv: build dependency for the etnaviv tests
Resolves failures as:
... -o src/etnaviv/isa/tests/etnaviv_disasm.p/disasm.cpp.o -c ../src/etnaviv/isa/tests/disasm.cpp
In file included from ../src/etnaviv/isa/tests/disasm.cpp:12:
../src/etnaviv/isa/asm.h:15:10: fatal error: etnaviv/isa/enums.h: No such file or directory
   15 | #include "etnaviv/isa/enums.h"
      |          ^~~~~~~~~~~~~~~~~~~~~

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11740
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30829>
(cherry picked from commit 8f8a51ac5c)
2024-08-28 15:59:59 +02:00
David Heidelberg
a092ccedaa etnaviv: rename enums_h appropriately
Needed for the follow-up change.

Cc: mesa-stable
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30829>
(cherry picked from commit 43bff3b9eb)
2024-08-28 15:58:56 +02:00
Lepton Wu
5b90f9565c egl/android: Fix wrong pipe format for RGB_565
We were actually using PIPE_FORMAT_B5G6R5_UNORM for HAL_PIXEL_FORMAT_RGB_565
since Android support was added to Mesa. This restores the original behavior.

Fixes: 273e54391a ("egl/android: Remove hard-coded color-channel data")

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Lepton Wu <lepton@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30827>
(cherry picked from commit 72506ac8c7)
2024-08-28 15:57:00 +02:00
Karol Herbst
ac7d35cd81 vtn: ignore volatile on functions for now
Not sure if we have to do something about it here, but maybe at some point
we do?

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30739>
(cherry picked from commit e9d908206b)
2024-08-28 15:56:58 +02:00
Faith Ekstrand
7f1f092b23 nvk: Disable conditional rendering around CopyQueryPoolResults
Fixes: 57c38a5669 ("nvk: Implement CopyQueryPoolResults with a compute shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30826>
(cherry picked from commit cdef36c422)
2024-08-28 15:56:49 +02:00
Nanley Chery
2eb470cdc5 intel/isl: Fix packing of SINT formats
Prevents the next patch from failing many multisampled, signed integer
rendering tests. For example:

 dEQP-VK.renderpass2.suballocation.multisample_resolve.r8_sint.samples_4

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30646>
(cherry picked from commit dfcd93d12f)
2024-08-28 15:34:43 +02:00
Lionel Landwerlin
c71baa2255 anv: optimize CLIP::MaximumVPIndex setting
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11746
Fixes: 982106e676 ("anv: only set 3DSTATE_CLIP::MaximumVPIndex once")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30762>
(cherry picked from commit a88898a28f)
2024-08-28 15:30:56 +02:00
Connor Abbott
e2bb53fd0d tu: Treat partially-bound depth/stencil attachments as passthrough
Make sure to preserve the depth or stencil components of D24S8 using the
fixed codepath just added. While we're here, fix the detection of
whether an attachment is bound.

Fixes: cb0f414b ("tu: Add support for suspending and resuming renderpasses")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26154>
(cherry picked from commit 812c8f6abe)
2024-08-27 22:02:49 +02:00
Connor Abbott
ea408a1e25 tu: Fix passthrough D24S8 attachments
We need to make sure that we don't trash a passthrough depth/stencil
aspect if we need to store the whole attachment by loading it
beforehand.

Fixes: cb0f414b ("tu: Add support for suspending and resuming renderpasses")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26154>
(cherry picked from commit 5377219ca0)
2024-08-27 22:01:47 +02:00
Timothy Arceri
277754c174 nir/glsl: set deref cast mode during function inlining
See code comment for details.

Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11535
Fixes: c6c150b4cd ("glsl_to_nir: support conversion of opaque function params")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30338>
(cherry picked from commit d681cf96fb)
2024-08-27 21:54:18 +02:00
Timothy Arceri
a24dec8e41 glsl: make use of new tex src deref intrinsic
The bindless spec has no language requiring functions params to be
defined as bindless so we need to be able to look at the values being
passed to functions to decide if they are bindless or not. This
intrinsic allows us to wait until function inlining is complete to make
this assessment.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11535
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30315>
(cherry picked from commit a629d829dc)
2024-08-27 21:54:15 +02:00
Timothy Arceri
2476299324 nir: add nir_tex_src_{sampler,texture}_deref_intrinsic
To be used as a placeholder until after function inlining so we can
replace function params with bindless handles if needed.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30315>
(cherry picked from commit 017770ff14)
2024-08-27 21:53:50 +02:00
Timothy Arceri
1894456bf1 nir: create validate_tex_src_texture_deref() helper
Will be used in a following patch.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30315>
(cherry picked from commit ef13ff00d1)
2024-08-27 21:52:52 +02:00
Eric Engestrom
18e7213185 .pick_status.json: Mark 8aa52ac666 as denominated 2024-08-27 21:46:49 +02:00
Mary Guillemard
aa05b43160 panvk: Fix NULL deref on model name when device isn't supported
Instead of reproting an VK_ERROR_INCOMPATIBLE_DRIVER we were crashing as
device->model was init after this error check.

Tested on G57 but should work the same on all unsupported arch.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f7f9b3d170 ("panvk: Move to vk_properties")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30686>
(cherry picked from commit c95ef9e323)
2024-08-27 21:45:34 +02:00
Rhys Perry
5de64b8082 aco: preserve bitsets after a lane mask is written
fossil-db (navi31):
Totals from 4840 (6.10% of 79395) affected shaders:
Instrs: 13733449 -> 13761177 (+0.20%); split: -0.00%, +0.21%
CodeSize: 71997868 -> 72102520 (+0.15%); split: -0.00%, +0.15%
Latency: 128385177 -> 128408780 (+0.02%); split: -0.00%, +0.02%
InvThroughput: 21105847 -> 21109475 (+0.02%); split: -0.00%, +0.02%
VALU: 7741209 -> 7741210 (+0.00%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
(cherry picked from commit 11262a01ce)
2024-08-27 21:44:53 +02:00
Rhys Perry
945ef630d7 aco: check SALU writing lanemask later for VALUMaskWriteHazard
This should be done after reads are checked and
sgpr_read_by_valu_as_lanemask_then_wr_by_salu is reset. The old version
also skipped checking the reads if the write check passed.

fossil-db (navi31):
Totals from 193 (0.24% of 79395) affected shaders:
Instrs: 3212435 -> 3212735 (+0.01%)
CodeSize: 16462868 -> 16463848 (+0.01%); split: -0.00%, +0.01%
Latency: 19492377 -> 19492462 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 4419705 -> 4419718 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
(cherry picked from commit 61e73c2323)
2024-08-27 21:44:47 +02:00
Rhys Perry
a42e144c32 aco: don't consider sa_sdst=0 before SALU write to fix VALUMaskWriteHazard
LLVM does but that's probably a bug.

fossil-db (navi31):
Totals from 311 (0.39% of 79395) affected shaders:
Instrs: 380453 -> 381075 (+0.16%)
CodeSize: 1961012 -> 1964744 (+0.19%)
Latency: 4799095 -> 4800313 (+0.03%)
InvThroughput: 958358 -> 958904 (+0.06%)
VALU: 242322 -> 242633 (+0.13%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
(cherry picked from commit b1ba7d1b99)
2024-08-27 21:44:42 +02:00
Rhys Perry
6beff74e00 aco: also consider VALU reads for VALUMaskWriteHazard
fossil-db (navi31):
Totals from 9776 (12.31% of 79395) affected shaders:
Instrs: 19348258 -> 19383680 (+0.18%); split: -0.00%, +0.19%
CodeSize: 101223460 -> 101366964 (+0.14%); split: -0.01%, +0.15%
Latency: 172853115 -> 172866070 (+0.01%); split: -0.01%, +0.01%
InvThroughput: 27590468 -> 27592390 (+0.01%); split: -0.00%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11550
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11436
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11337
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11738
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11741
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
(cherry picked from commit 8f5ee70d85)
2024-08-27 21:44:36 +02:00
Rhys Perry
04446691c3 aco: ignore exec and literals when mitigating VALUMaskWriteHazard
LLVM ignores exec and literals don't seem to work in some cases.

fossil-db (navi31):
Totals from 2676 (3.37% of 79395) affected shaders:
Instrs: 10638979 -> 10646019 (+0.07%); split: -0.00%, +0.07%
CodeSize: 55929640 -> 55959416 (+0.05%); split: -0.00%, +0.06%
Latency: 107707408 -> 107712893 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 18119843 -> 18120442 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
(cherry picked from commit ee648326d9)
2024-08-27 21:44:29 +02:00
Eric Engestrom
7a32379548 .pick_status.json: Update to 25ba90fd88 2024-08-27 21:43:55 +02:00
David Rosca
1a66ff9f6e frontends/va: Fix leaks with multiple coded buffer segments
The buffers can be reused, so we must only allocate added segments
and free unused segments.

Fixes: be4287c3aa ("pipe: Extend get_feedback with additional metadata")
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30779>
(cherry picked from commit 1ebff2220d)
2024-08-22 22:12:05 +02:00
Ian Romanick
260d1a5d8a anv: Larger memory pools for huge shaders
At least one ray tracing shader in cp2077 is over 4MB on Xe2. There
isn't a memory pool large enough for the allocation, so the driver
crashes instead. This commit adds 8MB and 16MB pools.

I intend this as a stop gap fix. I would prefer to figure out why this
shader is so much larger than on previous platforms. The shader in
question has 3824 spills and 8625 fills. That is not good. I suspect
dealing with that will also solve the problem, but that will require a
bit more time.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11739
Suggested-by: Lionel Landwerlin
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30751>
(cherry picked from commit 09cf9fe8ab)
2024-08-22 22:12:05 +02:00
Ian Romanick
eb16726d69 anv: Protect against OOB access to anv_state_pool::buckets
Suggested-by: Paulo Zanoni
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30751>
(cherry picked from commit 0921dfa044)
2024-08-22 22:12:05 +02:00
Mike Blumenkrantz
700530de6c tc: set resolve on renderpass info if blit terminates the renderpass
this avoids a scenario where invalidate happens after a non-winsys blit
for a renderpass and the driver skips storing framebuffer contents
because the invalidate flag is set

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30750>
(cherry picked from commit 2fa52bf6e5)
2024-08-22 22:12:05 +02:00
Mike Blumenkrantz
3b198df895 zink: don't skip cbuf store ops if resolve is set
inlined resolve ops are still somehow slower than explicit ones,
so the data has to be written out for the resolve

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30750>
(cherry picked from commit 38f4501a5c)
2024-08-22 22:12:05 +02:00
Konstantin
d6308d4281 radv: Handle repeated instructions when splitting disassembly
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30734>
(cherry picked from commit 19d633af0b)
2024-08-22 22:12:05 +02:00
Konstantin
6273cd64f3 radv: Handle instruction encodings > 8 bytes when splitting disassembly
Choosing the wrong instruction length prevents
radv_dump_annotated_shader from matching waves.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30734>
(cherry picked from commit 1cf507b806)
2024-08-22 22:12:05 +02:00
Nanley Chery
f262c8498a iris: Invalidate state cache for some depth fast clears
We need to invalidate the state cache when updating the value in the
indirect clear color so that existing surface states can pick up the new
value.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30520>
(cherry picked from commit 55dbc58bf4)
2024-08-22 22:12:05 +02:00
Mike Blumenkrantz
33cb5bfa25 st/pbo: reject vs/fs pbo ops if rowstride < width
this pbo shader works by iterating over the framebuffer size
and storing a value to an offset for each source pixel. if the
number of pixels being written out does not correspond to fragcoord
to the extent that certain source pixels are not written at all, however,
then this method should not be used in order to avoid giving broken results

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30689>
(cherry picked from commit c2dcecffc5)
2024-08-22 22:12:05 +02:00
Mike Blumenkrantz
bd69d51ba0 zink: bail on choose_pdev immediately if no devices are available
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30746>
(cherry picked from commit a442f67d2f)
2024-08-22 22:12:05 +02:00
Eric Engestrom
982484f311 .pick_status.json: Mark a33ef21106 as denominated 2024-08-22 22:12:04 +02:00
Tapani Pälli
b554741256 gbm: depend on libdrm indepedent of dri2 setting
Suggested-by: @stefan11111
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10585
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30716>
(cherry picked from commit 35a6824e88)
2024-08-22 22:12:04 +02:00
Samuel Pitoiset
5caa8843e9 aco: fix bogus assert in RT prolog on GFX11+
in_scratch_offset isn't defined on GFX11+ and only useful on < GFX9.

Fixes: bd525f4282 ("aco: Fix 1D->2D dispatch conversion on <gfx9")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30717>
(cherry picked from commit aad503ecfa)
2024-08-22 22:12:04 +02:00
Lionel Landwerlin
5d6bdec378 anv: only set 3DSTATE_CLIP::MaximumVPIndex once
Currently we can end up merging 2 prepacked 3DSTATE_CLIP instructions
where 2 different places in the driver fill the MaximumVPIndex.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30684>
(cherry picked from commit 982106e676)
2024-08-22 22:12:04 +02:00
Lionel Landwerlin
a1e961c784 anv: fix extended buffer flags usages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: bcc0ec8e6c ("anv: enable KHR_maintenance5")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30714>
(cherry picked from commit 9eff285a46)
2024-08-22 22:12:04 +02:00
Mike Blumenkrantz
de7299e8f0 glx/dri2: strdup driver name
this is freed by the caller

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
(cherry picked from commit 046728f47a)
2024-08-22 22:12:04 +02:00
Lionel Landwerlin
8dc3a44000 vulkan/runtime: fix GetBufferMemoryRequirements2 for maintenance4
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2649ee0724 ("vulkan/runtime: implement vkGetBufferMemoryRequirements2()")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30714>
(cherry picked from commit eacb8f85a2)
2024-08-22 22:12:04 +02:00
GKraats
c128c4a4a7 i915g: fix count of buffers at i915_drm_batchbuffer_validate_buffers
This commit contains the fix with num_of_buffers at validation-call
at i915_drm_batchbuffer_validate_buffers.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769>
(cherry picked from commit 0311159bed)
2024-08-22 22:12:04 +02:00
GKraats
81ee5d405e i915g: Screen corruption with ENOBUFS caused by fence register shortage
This commit solves the shortage-problem at the blit-functions by
checking the number of fence-registers after updating the batch.
If too many registers are used,
the batch-entries and relocs for the current blit function are
removed by setting batch->ptr and reloc_count to value before
the blit call and calling drm_intel_gem_bo_clear_relocs.
This truncated batch is flushed,
and the batch is updated again for the current blit function.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769>
(cherry picked from commit ed2123158d)
2024-08-22 22:12:04 +02:00
Faith Ekstrand
e4dc3c1d37 nouveau/mme: Fix add64 of immediates on Fermi
Fixes: 162269f049 ("nouveau/mme: Add Fermi builder")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
(cherry picked from commit 381be88473)
2024-08-22 22:12:04 +02:00
Friedrich Vock
ef256daa19 aco: Fix 1D->2D dispatch conversion on <gfx9
out_args->scratch_offset and in_wg_id_x will alias on <gfx9.
To avoid the conversion code reading a garbage WG ID, move the
scratch/ring offset writing to the very end.

Fixes: 1e354172 ("radv,aco: Convert 1D ray launches to 2D")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30707>
(cherry picked from commit bd525f4282)
2024-08-22 22:12:04 +02:00
Eric Engestrom
f0d0487cd6 .pick_status.json: Mark 77f783462a as denominated 2024-08-22 20:02:57 +02:00
Eric Engestrom
7fe26b099e .pick_status.json: Update to d7f7aede15 2024-08-22 20:02:44 +02:00
Faith Ekstrand
da2a245249 vulkan: Add null descriptor bits to vk_pipeline_robustness_state
Fixes: c9eac89da8 ("nvk: Advertise VK_EXT_robustness2")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30663>
(cherry picked from commit 6ae401aa86)
2024-08-22 19:55:56 +02:00
Matt Turner
5c87e824fc nir: Skip opt_if_merge when next_if has block ending in a jump
Similar to commit 6cef804067 ("nir/opt_if: fix opt_if_merge when
destination branch has a jump"), we shouldn't combine if statements when
the second if-then-else has a block that ends in a jump.

This fixes a case where opt_if_merge combines

    if (cond) {
        [then-block-1]
    } else {
        [else-block-1]
    }

    if (cond) {
        [then-block-2]
    } else {
        [else-block-2]
    }

where `then-block-2` or `else-block-2` ends in a jump. The phi nodes
following the control flow will be incorrectly updated to have an input
from a block that is not a predecessor.

Fixes: 4d3f6cb973 ("nir: merge some basic consecutive ifs")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30629>
(cherry picked from commit d2e6be94ae)
2024-08-22 19:55:56 +02:00
Rhys Perry
6a1c3de8d5 aco: only remove branch jumping over SMEM/barrier if it's never taken
SMEM might be an invalid access, and barriers are probably expensive.

fossil-db (navi21):
Totals from 126 (0.16% of 79395) affected shaders:
Instrs: 2764965 -> 2765377 (+0.01%)
CodeSize: 15155348 -> 15156788 (+0.01%)
Latency: 17604293 -> 17604296 (+0.00%)
Branches: 105211 -> 105623 (+0.39%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30321>
(cherry picked from commit c29d9f1184)
2024-08-22 19:55:56 +02:00
Rhys Perry
a2542ac59d aco: split selection_control_remove into rarely_taken and never_taken
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30321>
(cherry picked from commit b934255510)
2024-08-22 19:55:56 +02:00
Connor Abbott
6ac7583045 ir3, tu: Use a UBO for VS primitive params on a750+
Before we were using direct CP_LOAD_STATE, which is broken with multiple
back-to-back draws. This caused regressions in some DX11 traces when
enabling early preamble. We still need to use indirect CP_LOAD_STATE for
VS params, which are sometimes written by the CP, however for everything
else we should use the new UBO path instead.

Fixes: 76e417ca59 ("turnip,ir3/a750: Implement consts loading via preamble")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30675>
(cherry picked from commit 850f2aab03)
2024-08-22 19:47:59 +02:00
Connor Abbott
d47670cb07 tu: Fix off-by-one in UBO CP_LOAD_STATE size
It's one header dword and 5 payload dwords. This was papered over by us
not actually using the UBO path for one of the loads, but that's changed
in the next commit.

Fixes: 76e417ca59 ("turnip,ir3/a750: Implement consts loading via preamble")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30675>
(cherry picked from commit 4f2b5442a6)
2024-08-22 19:47:58 +02:00
Job Noorman
03e65d8ce7 ir3: fix clearing merge sets after shared RA
After spilling during regular RA, merge sets need to be fixed up. To
find all merge sets, fixup_merge_sets used ra_foreach_dst. However,
after shared RA has run, shared dsts wouldn't have the IR3_REG_SSA flag
set anymore leaving their merge sets lingering. This patch fixes this by
using foreach_dst instead.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
(cherry picked from commit 28d2a27030)
2024-08-22 19:47:57 +02:00
Job Noorman
699660f9bd ir3: update merge set affinity in shared RA
The preferred register for merge sets was not updated after allocating
one. This caused a new merge set to be allocated for every register it
contains. This patch fixes this by reusing the update function from the
standard RA.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
(cherry picked from commit 9013e11d8c)
2024-08-22 19:47:56 +02:00
Pavel Ondračka
449e5ef5e5 r300: fix RGB10_A2 CONSTANT_COLOR blending
Just reverse the color order the same way we do for RGBA8.

Fixes: 910bac63df
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30656>
(cherry picked from commit a1a06f386e)
2024-08-22 19:47:41 +02:00
Karol Herbst
8864716e36 rusticl/mem: do not check against image base alignment for 1Dbuffer images
The CL cap in question is only valid for 2D images created from buffer.

Fixes: 20c90fed5a ("rusticl: added")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30655>
(cherry picked from commit 5d0c870c00)
2024-08-22 19:47:39 +02:00
Eric Engestrom
0946ac54a6 .pick_status.json: Update to 7b92e11e16 2024-08-22 16:38:36 +02:00
Rhys Perry
78a4ef28bc aco: form hard clauses in VS prologs
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
(cherry picked from commit 46b8ba8154)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30617>
2024-08-15 14:14:26 +02:00
Eric Engestrom
1670d6b7fc docs: add sha256sum for 24.1.6 2024-08-14 20:44:54 +02:00
Eric Engestrom
44c296835d VERSION: bump for 24.1.6 2024-08-14 19:31:33 +02:00
Eric Engestrom
3f03c3e96d docs: add release notes for 24.1.6 2024-08-14 19:31:08 +02:00
WANG Xuerui
24d0e7eefe meson: Additionally probe -mtls-dialect=desc for TLSDESC support
Previously only `-mtls-dialect=gnu2` was probed, which was appropriate
for arm, x86 and x86_64, but not for newer architectures such as
aarch64, loongarch64 and riscv64 which all use `-mtls-dialect=desc`
instead. Because the driver option is not consistent across
architectures (and probably will not), try both variants and choose the
first one working.

While at it, rename "gnu2_*" variables to "tlsdesc_*" respectively, for
clarity.

Cc: mesa-stable
Reviewed-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Yukari Chiba <i@0x7f.cc>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: WANG Xuerui <git@xen0n.name>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30599>
(cherry picked from commit cc2dbb8ea5)
2024-08-14 18:53:12 +02:00
Hans-Kristian Arntzen
5a16eefb6a wsi/x11: Bump maximum number of outstanding COMPLETE events.
Fixes a "regression" where comically large FPS tests regressed.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 19dba854 ("wsi/x11: Rewrite implementation to always use threads.")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30638>
(cherry picked from commit 5a97916fdc)
2024-08-14 18:53:12 +02:00
Matt Turner
d2da512f21 util: Force emission of stack frame in stack unit test
The `capture_not_overwritten` unit test captures and compares two
backtraces -- one from inside a call to `func_c` and one outside -- and
confirms that they are not identical. That is, that `func_c` is in the
backtrace.

On 32-bit x86, without `-fno-omit-frame-pointer`, the function will not
emit a stack frame. As a result, the unit test fails.

The fix is to compile `func_c` with the flag `-fno-omit-frame-pointer`
to prevent the compiler from optimizing out the stack frame which is
otherwise unneeded.

Bug: https://bugs.gentoo.org/823774
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091
Fixes: d0d14f3f64 ("util: Add unit test for stack backtrace caputure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30622>
(cherry picked from commit 05dc4eb536)
2024-08-14 18:53:12 +02:00
Matt Turner
5f2c486ccb util: Add ATTRIBUTE_OPTIMIZE(flags)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30622>
(cherry picked from commit b3430a7bb8)
2024-08-14 18:53:12 +02:00
Mike Blumenkrantz
fdfe33d69d zink: fix partial update handling
* the damage region was not being used correctly (this is a normal rect)
* use_damage was never unset at frame boundary
* original renderArea was never re-set

Fixes: 3d38c9597f ("zink: hook up KHR_partial_update")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30625>
(cherry picked from commit a7f64c6203)
2024-08-14 18:45:54 +02:00
Lionel Landwerlin
2521bf243c brw/rt: fix ray_object_(direction|origin) for closest-hit shaders
When closest hit shader is called, the BVH object level
brw_nir_rt_load_mem_ray origin/direction is 0. What we should be using
is the ray origin/direction and apply the transform of the current
instance.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ba7d459a3 ("intel/rt: Implement the new ray-tracing system values")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30578>
(cherry picked from commit aaff191356)
2024-08-14 18:45:52 +02:00
Karol Herbst
2fcae878de rusticl/memory: fix sampler argument size check
Not entirely sure why this hasn't caused any problems...

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
(cherry picked from commit 0cfcd2ff83)
2024-08-14 18:45:51 +02:00
Pavel Ondračka
34b1102390 r300: bias presubtract fix
We need to double check that the source is indeed constant before
looking at the constant type.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Fixes: 0508db9155
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29893>
(cherry picked from commit 1cad339409)
2024-08-14 18:45:50 +02:00
Karol Herbst
6fca3cd058 util/u_printf: do not double print format string with unused arugments
the CL CTS added a new test being printf("\n", "foo"), but we ended up
printing the new line twice. If we can't find a specifier anymore, ignore
the argument as after the loop processing all arguments we'll print the
remaining format string anyway.

Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30574>
(cherry picked from commit 4080269845)
2024-08-14 18:45:47 +02:00
Valentine Burley
4af40c1d25 tu: Always report that we can present on kgsl
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8637
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9240
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9365
Fixes: 3e7f6c9aeb ("tu: implement wsi hook to decide if we can present directly on device")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29627>
(cherry picked from commit 367191ff63)
2024-08-14 18:45:44 +02:00
Valentine Burley
ccde34b72f vulkan/wsi: Refactor can_present_on_device
Make wsi_device_matches_drm_fd() a default helper that PCI based GPUs plug in to
wsi_dev->can_present_on_device. This is needed for devices without libdrm, where
wsi_device_matches_drm_fd was still being called causing an "undefined reference"
build error.

Suggested-by: Rob Clark <robdclark@chromium.org>
Fixes: baa38c144f ("vulkan/wsi: Use VK_EXT_pci_bus_info for DRM fd matching")
Reviewed-by: Mark Collins <mark@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29627>
(cherry picked from commit 47289ebc8d)
2024-08-14 18:45:42 +02:00
Mike Blumenkrantz
5168d629fa egl/wayland: bail on zink init in non-sw mode if extension check fails
cc: mesa-stable

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30479>
(cherry picked from commit d120992e1a)
2024-08-14 18:42:10 +02:00
Eric Engestrom
86c2d6bacd .pick_status.json: Mark 34753cefd8 as denominated 2024-08-14 18:42:05 +02:00
Georg Lehmann
ac1ff01822 aco/gfx10+: set lateKill for sgprs used by wave64 VALU writing a mask
RDNA2 ISA doc, 6.2.4. Wave64 Destination Restrictions:
The first pass of a wave64 VALU instruction may not overwrite a scalar value
used by the second half.

Foz-DB Navi31:
Totals from 5221 (6.58% of 79395) affected shaders:
Instrs: 9751484 -> 9752179 (+0.01%); split: -0.01%, +0.01%
CodeSize: 50624072 -> 50626088 (+0.00%); split: -0.00%, +0.01%
Latency: 85646450 -> 85647419 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 15039160 -> 15039277 (+0.00%); split: -0.00%, +0.00%
VClause: 200275 -> 200204 (-0.04%)
SClause: 248645 -> 248607 (-0.02%); split: -0.03%, +0.01%
Copies: 640802 -> 641413 (+0.10%); split: -0.01%, +0.11%
PreSGPRs: 236297 -> 236735 (+0.19%)
VALU: 5666449 -> 5666440 (-0.00%)
SALU: 967482 -> 968111 (+0.07%); split: -0.01%, +0.07%

Cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30368>
(cherry picked from commit 510f5e55be)
2024-08-14 18:41:54 +02:00
Timothy Arceri
946f5692f4 glsl: always copy bindless sampler packing constructors to a temp
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11648
Fixes: 3cdcc5f02f ("glsl: implement ARB_bindless_texture conversions")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30586>
(cherry picked from commit 3da4b5eaa5)
2024-08-14 18:41:54 +02:00
David Heidelberg
5c903880f9 llvmpipe: Silence "possibly uninitialized value" warning for ssbo_limit (cont)
Fixes: ce611935df ("llvmpipe: Silence "possibly uninitialized value" warning for ssbo_limit.")

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30482>
(cherry picked from commit 9c8e75e256)
2024-08-14 18:41:54 +02:00
Faith Ekstrand
23383aa41d zink: Align descriptor buffers to descriptorBufferOffsetAlignment
Instead of aligning offsets, we just align the size every time we query
it.  This simplifies our offset and size calculations later since we can
always just add up descriptor buffer sizes and know that we'll be okay.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fixes: 7ab5c5d36d ("zink: use EXT_descriptor_buffer with ZINK_DESCRIPTORS=db")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
(cherry picked from commit 0f8f407e57)
2024-08-14 18:41:53 +02:00
Faith Ekstrand
4a0304c5ab nvk: Support STORAGE_READ_WITHOUT_FORMAT on buffers
Fixes: fc19173014 ("nvk: Rework format features queries")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
(cherry picked from commit 8244b87822)
2024-08-14 18:41:53 +02:00
Faith Ekstrand
fee952305c nvk: Require color or depth/stencil attachment support for input attachments
Fixes: 20d8d1e239 ("nvk: Add a more competent GetPhysicalDeviceImageFormatProperties")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
(cherry picked from commit 08f6066e87)
2024-08-14 18:41:53 +02:00
Georg Lehmann
ff7759cdfe nir/lower_int64: replace uadd_sat with ior for find_lsb64 and ufind_msb64
Using ior here is equivalent to using uadd_sat, but works for every driver
and shouldn't hurt anywhere.

I forgot to fix this up when fixing up some vvl errors with zink.

Fixes crashes with the integer_ctz CL CTS tests in zink.

Fixes: 39ec184db6 ("zink: lower 64 bit find_lsb, ufind_msb and bit_count")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30535>
(cherry picked from commit 48acf9d358)
2024-08-14 18:34:33 +02:00
Mike Blumenkrantz
f3f0b87bf8 dri: fix kms_swrast screen fail
this should match all the other screen init functions

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30524>
(cherry picked from commit d6ac254c01)
2024-08-14 18:34:31 +02:00
Mike Blumenkrantz
262e3b3b6f egl: fix zink init
* close(fd) requires also resetting the fd=-1 or else boom
* checking just driver_name is broken because loader_get_driver_for_fd()
  uses MESA_LOADER_DRIVER_OVERRIDE, so there's no way to differentiate
  an inferred load

Fixes: b907eb4750 ("egl: don't bind zink under dri2/3")

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30556>
(cherry picked from commit 1a579552af)
2024-08-14 18:34:14 +02:00
Tapani Pälli
07c99c55e1 anv: fix a cmd_buffer reference in simple shader
In utrace timestamp copy case cmd_buffer is NULL.

Fixes: dbbcd5c32c ("anv: factor out generation kernel dispatch into helper")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30475>
(cherry picked from commit ff8953f666)
2024-08-14 18:29:37 +02:00
Karol Herbst
a891ed8dcf rusticl/queue: add clSetCommandQueueProperty
The CL CTS started to call this API, luckily we don't have to actually
implement it, because we don't intent to support CL 1.0 only devices in
the first place (probably).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30575>
(cherry picked from commit cd2dc4f70c)
2024-08-14 18:28:45 +02:00
Lionel Landwerlin
34467ad0be anv/blorp: force CC_VIEWPORT reallocation when programming 3DSTATE_VIEWPORT_STATE_POINTERS_CC
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11647
Fixes: fe1baa6481 ("anv: reduce blorp dynamic state emissions")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30532>
(cherry picked from commit 10533e7b4c)
2024-08-14 18:26:23 +02:00
Eric R. Smith
a7b1512878 panfrost: use RGB1 component ordering for R5G6B5 pixel formats
For some purposes (e.g. advanced blending) we need a non-zero alpha
value returned from reads. This is only guaranteed on Bifrost if
we explicitly request RGB1 component ordering. The default is to use
RGBA component ordering, which for R5G6B5 causes 0 to be read for
alpha.

A complication is that the Mali fixed function hardware requires
four components (which implies RGBA rather than RGB1). If fixed
function blending is in use, we modify the pixel format back to
RGBA when building the blend descriptor.

Cc: mesa-stable
Reviewed-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/29606>
(cherry picked from commit 004e0eb3ab)
2024-08-14 18:26:22 +02:00
Sil Vilerino
79283b3d7e Revert "d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported"
This reverts commit d6bb4ddc63.
Fixes: d6bb4ddc63 ("d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported")

PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE is necessary for some scenarios like the example below
described in https://github.com/microsoft/WSL/issues/11838

gst-launch-1.0 -v videotestsrc num-buffers=250 !
    video/x-raw,width=1920,height=1200 !
    vaapipostproc !
    vaapih264enc !
    filesink location=~/wsl_test.h264

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30548>
(cherry picked from commit a0f1a708c4)
2024-08-14 18:26:18 +02:00
Karol Herbst
0f15e9ec10 rusticl/image: properly sync mappings content for 1Dbuffer images
This fixes clFillImage 1Dbuffer use_pitches CL CTS tests.

Fixes: 7b22bc617b ("rusticl/memory: complete rework on how mapping is implemented")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30528>
(cherry picked from commit 012323a1d1)
2024-08-14 18:26:17 +02:00
Karol Herbst
2fef79767f rusticl/image: take pitches into account when allocating memory for maps
This is more correct than the previous code and the CL CTS relies on edge
case behavior here, e.g. for 1Dbuffer images.

I think part of that is not actually required by the spec, but whatever.

Fixes: 7b22bc617b ("rusticl/memory: complete rework on how mapping is implemented")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30528>
(cherry picked from commit 2484331e82)
2024-08-14 18:24:53 +02:00
Karol Herbst
d3db644f0d rusticl/memory: Fix memory unmaps after rework
An application could map and unmap a host ptr allocation multiple times,
but because how the refcounting works, we might never ended up syncing the
written data to the mapped region.

This moves the refcounting out of the event processing.

Fixes: 7b22bc617b ("rusticl/memory: complete rework on how mapping is implemented")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30528>
(cherry picked from commit 1fa288b224)
2024-08-14 18:24:33 +02:00
Eric Engestrom
442b1b53c2 ci: pass MESA_SPIRV_LOG_LEVEL from job to the test
Fixes: 4b8735cd4e ("ci: raise the log level threshold of spirv logs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30546>
(cherry picked from commit b6d8459e3a)
2024-08-14 18:20:18 +02:00
Lionel Landwerlin
b913fae162 anv: add missing MEDIA_STATE_FLUSH for internal shaders
Replicating what we do in genX_cmd_compute.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7ca5c84804 ("anv: add support for simple internal compute shaders")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30539>
(cherry picked from commit 4f093b2e2b)
2024-08-14 18:20:16 +02:00
Rhys Perry
6af37e6bde docs: update ACO_DEBUG documentation for scheduler options
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 48461c0d9e ("aco: enable VOPD scheduler")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30519>
(cherry picked from commit e45035c83a)
2024-08-14 18:20:15 +02:00
Timothy Arceri
39fd67b1aa glsl: fix glsl to nir support for lower precision builtins
When we switch to the full nir based glsl linker in an upcomming merge
request this is required for existing tests from 8fcf8e7fd4 to
continue to pass, this is because they never exercised glsl to nir so
the missing support went unnoticed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11456
Fixes: 8fcf8e7fd4 ("glsl: lower builtins to mediump that ignore precision of certain parameters ")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30395>
(cherry picked from commit 140ca7e5d7)
2024-08-14 18:20:13 +02:00
Iván Briano
c8ce254e4c intel/rt: fix terminateOnFirstHit handling
If TraceRay() is called with the TerminateOnFirstHit flag, we need to
terminate the ray on the first confirmed intersection. This is handled
by the lowering of accept_ray_intersection and it's working fine for the
case of multiple instances of the intersection shader being called.

But if the shader calls reportIntersection() more than once, we were
handling them all and accepting the closest one regardless of the flag.

Check for the flag on every confirmed intersection and, if set, accept
it right there. The subsequent lowering will take care of terminating
handling the ray termination if necessary.

Fixes new test dEQP-VK.ray_tracing_pipeline.amber.flags-accept-first

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30418>
(cherry picked from commit f8553f56ac)
2024-08-14 18:18:32 +02:00
Lionel Landwerlin
71125139f1 anv: reuse object string for RMV token
The current code is not handling the potential NULL pointer in
VkDebugUtilsObjectNameInfoEXT::pObjectName

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e1b9a6e4f3 ("anv: initial RMV support")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30516>
(cherry picked from commit c6bf1f02c4)
2024-08-14 18:18:29 +02:00
Lionel Landwerlin
576e9ff953 vulkan/runtime: allow null/empty debug names
VkDebugUtilsObjectNameInfoEXT::pObjectName can be NULL [1] :

   "Applications may change the name associated with an object simply
    by calling vkSetDebugUtilsObjectNameEXT again with a new string. If
    pObjectName is either NULL or an empty string, then any previously
    set name is removed."

The current code will segfault.

[1] : https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap50.html#VkDebugUtilsObjectNameInfoEXT

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3b361b234a ("vulkan: Implement VK_EXT_debug_utils")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30516>
(cherry picked from commit ae9a249dfe)
2024-08-14 18:18:28 +02:00
Mike Blumenkrantz
9a1327f2ec pipe-loader: fix driconf memory management
this had a number of issues:
* pipe_loader_get_driinfo_xml() frees driver_driconf immediately,
  except the driOptionCache struct string pointers are all just copied
  in merge_driconf instead of having the strings copied, which means any
  subsequent access of driver_driconf strings is invalid access
* pipe_loader_drm_get_driconf_by_name() is a disaster that only happened
  to work because the dlopen here is the same lib that gets opened elsewhere
  by mesa and not closed. if the lib here is actually closed, then all
  the statically allocated strings become invalid, which means they need to
  be manually copied

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
(cherry picked from commit 0c220741e6)
2024-08-14 18:18:19 +02:00
Marek Olšák
53005aead9 radeonsi: fix buffer coherency issues on gfx6-8,12 due to missing PFP->ME sync
This fixes random GPU hangs on gfx12 due to incoherent indirect buffer data,
causing random indirect vertex and instance counts, which timeouts if
the random numbers are large.

Fixes: a8abbbb172 - radeonsi: remove r600_pipe_common.h

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
(cherry picked from commit 83b88c54ba)
2024-08-14 18:18:16 +02:00
Karol Herbst
5499c943cd rusticl/kernel: properly respect device thread limits per dimension
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30504>
(cherry picked from commit b3e925a21b)
2024-08-14 18:10:37 +02:00
Karol Herbst
a0291c4041 zink: lower 8/16 bit alu ops vk spirv doesn't allow
Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30504>
(cherry picked from commit b2225b9437)
2024-08-14 18:10:35 +02:00
Karol Herbst
6eecba324a zink: lower 64 bit find_lsb, ufind_msb and bit_count
Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30504>
(cherry picked from commit 39ec184db6)
2024-08-14 18:10:34 +02:00
Echo J
a5d8f4f975 util: Fix the integer addition in os_time_get_absolute_timeout()
This should fix glClientWaitSync() timing out too early with a INT64_MAX
timeout on radeonsi

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11615
Fixes: 7316cc92f3 ("gallium/os: add conversion and wait functions for absolute timeouts")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30476>
(cherry picked from commit e14d1f5bc0)
2024-08-14 18:10:32 +02:00
Mike Blumenkrantz
ca46312b87 kopper: check swapchain size after possible loader image resize
previously the size was checked at the top of the function, but this
ignored cases where the loader might end up resizing the drawable,
resulting in an attempted 0x0 swapchain creation based on stale
geometry

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30487>
(cherry picked from commit a6d97b0afe)
2024-08-14 18:10:30 +02:00
Karmjit Mahil
f3195e77dc tu: Set TU_ACCESS_CCHE_READ for transfer ops with read access
Transfer ops also use CCHE since they use the same path as
texture access.

This addresses the flakiness seen in
KHR-GL46.shader_storage_buffer_object.advanced-usage-sync-cs
CCHE wasn't being invalidated between the compute op and transfer
op which would sometimes lead to old/invalid data to be copied
in the transfer op.

Fixes: fb1c3f7f5d ("tu: Implement CCHE invalidation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11458
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30490>
(cherry picked from commit cf9588bae6)
2024-08-14 18:10:28 +02:00
Karol Herbst
05f1c0b9ea mesa: check for enabled extensions for *UID enums
Applications might use them without checking if the extension is supported
and would run into a NULL pointer deref calling the callbacks.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
(cherry picked from commit 740cae64a1)
2024-08-14 17:59:19 +02:00
Eric Engestrom
c86eba672a .pick_status.json: Mark 93f9afa1e0 as denominated 2024-08-14 17:59:16 +02:00
Mike Blumenkrantz
9043fb5d8e dri: link with libloader
this has always called loader_bind_extensions, so it should have been
linking with the loader

cc: mesa-stable

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reported-by: Yurii Kolesnykov <root@yurikoles.com>
Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30449>
(cherry picked from commit 827812912d)
2024-08-14 17:59:15 +02:00
Eric Engestrom
5f30a8d6a6 .pick_status.json: Mark 89863a050b as denominated 2024-08-14 17:59:14 +02:00
Hans-Kristian Arntzen
568a691eba wsi/common: Do not update present mode with MESA_VK_WSI_PRESENT_MODE.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Fixes: ad71d584cf ("wsi/common: Add function to modify present mode.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30434>
(cherry picked from commit 369e3cc20a)
2024-08-14 17:59:00 +02:00
Lionel Landwerlin
807b8b7249 anv: fix check on pipeline mode to track buffer writes
We want to check the current mode of the pipeline, not the queue type
(since graphics can toggle between 3D & gpgpu modes).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 455a13fb7f ("anv: limit ANV_PIPE_RENDER_TARGET_BUFFER_WRITES to blorp operations using 3D")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11607
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30469>
(cherry picked from commit fafa0d5abb)
2024-08-14 17:58:57 +02:00
Timothy Arceri
327e37aad5 nir: set disallow_undef_to_nan for legacy ARB asm programs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11389
Fixes: 861d274453 ("nir: replace undef only used by ALU opcodes with 0 or NaN")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30419>
(cherry picked from commit 298633e365)
2024-08-14 17:58:55 +02:00
Rob Clark
6ffe16a5c4 freedreno/drm/virtio: Fix issues with 16k (or larger) page sizes
Signed-off-by: Rob Clark <robdclark@chromium.org>
Fixes: e6b2785811 ("freedreno/drm/virtio: Use userspace IOVA allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30431>
(cherry picked from commit 87c889cd8a)
2024-08-14 17:58:54 +02:00
Rob Clark
54a1b52e37 tu: Fix issues with 16k (or larger) page sizes
The iova allocations need to be CPU page aligned.  (The GPU itself
always supports 4k mappings regardless of the smallest CPU page size,
but GEM buffer allocations must be an integer number of CPU pages.)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Fixes: 63904240f2 ("tu: Re-enable bufferDeviceAddressCaptureReplay")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30431>
(cherry picked from commit 7fe3529715)
2024-08-14 17:58:51 +02:00
Karol Herbst
f2a0f842e2 nouveau: handle realloc failure inside cli_kref_set
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11477
Fixes: 821f4c8d99 ("nouveau: import libdrm_nouveau")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30374>
(cherry picked from commit 801078cbf8)
2024-08-14 17:52:25 +02:00
Konstantin Seurer
fdb48555da aco: print s_delay_alu INSTSKIP>3 correctly
INSTSKIP has 3 bits.

Fixes: 94958e6 ("aco: improve printing of s_delay_alu")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30401>
(cherry picked from commit f8bf9f07b6)
2024-08-14 17:52:23 +02:00
Karol Herbst
b63aeb37ab Revert "rusticl/queue: gracefully stop the worker thread"
Apparently this code caused issues and the fix was only papering over the
issue, which I now I can't trigger anyway.

This reverts commit 9d458b7fc1.

Fixes: 9d458b7fc1 ("rusticl/queue: gracefully stop the worker thread")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30067>
(cherry picked from commit 47377b550f)
2024-08-14 17:48:43 +02:00
Eric Engestrom
732f91128a .pick_status.json: Update to cc2dbb8ea5 2024-08-14 17:48:33 +02:00
Marek Olšák
dd3862c1b6 nir/opt_algebraic: use fmulz for fpow lowering to fix incorrect rendering
The original implementation in all radeon drivers had this behavior.

Fixes: 9bc1fb4c07 - ac/llvm,radeonsi: lower nir_fpow for aco and llvm
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11464

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30069>
2024-08-14 17:19:22 +02:00
David Rosca
c1a46271bc radeonsi/vcn: Add decode DPB buffers as CS dependency
This is needed to ensure correct synchronization in kernel eg. when it
moves the buffers between VRAM and GTT.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
(cherry picked from commit 0c024bbe64)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30537>
2024-08-14 11:13:23 +02:00
Eric Engestrom
41fcf9bfea .pick_status.json: Update to c90e2bccf7 2024-08-14 11:13:23 +02:00
Eric Engestrom
09ebf2dbf7 docs: add sha256sum for 24.1.5 2024-07-31 17:43:02 +02:00
Eric Engestrom
5040c01c00 VERSION: bump for 24.1.5 2024-07-31 17:26:38 +02:00
Eric Engestrom
c17785d9da docs: add release notes for 24.1.5 2024-07-31 17:26:36 +02:00
Georg Lehmann
59dd6bdc3f spirv: ignore more function param decorations
These caused log spam during vk-cts.

Fixes: 9b55dcca54 ("spirv: initial parsing of function parameter decorations")

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30391>
(cherry picked from commit a7c8eab63d)
2024-07-31 17:26:30 +02:00
Georg Lehmann
9185eaf12d aco/optimizer: update temp_rc when converting to uniform bool alu
Cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30399>
(cherry picked from commit 6da7bd842c)
2024-07-31 17:26:30 +02:00
Karol Herbst
b2c4eb582e rusticl/spirv: protect against 0 length in slice::from_raw_parts
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11584
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30410>
(cherry picked from commit dc2755a4f8)
2024-07-31 17:26:30 +02:00
Karol Herbst
68feb29646 rusticl/api: protect against 0 length in slice::from_raw_parts
Fixes: 84d16045d0 ("rusticl/api: add param to query which contains application provided values")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30410>
(cherry picked from commit 81f75e2a2d)
2024-07-31 17:26:30 +02:00
Karol Herbst
fb663417c7 rusticl/program: protect against 0 length in slice::from_raw_parts
Fixes: e028baa177 ("rusticl/program: implement clCreateProgramWithBinary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30410>
(cherry picked from commit ad6fb3406b)
2024-07-31 17:26:30 +02:00
Karol Herbst
85c000fbd2 rusticl: fix clippy lint having bounds defined in multiple places
Fixes: 734352ddfb ("rusticl/program: some boilerplate code for SPIR-V support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30410>
(cherry picked from commit 7a8b1dc6e5)
2024-07-31 17:26:30 +02:00
Karol Herbst
ffe6483ec6 spirv: handle function parameters passed by value
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
(cherry picked from commit bad67ee77c)
2024-07-31 17:26:30 +02:00
Karol Herbst
88a0af007c spirv: initial parsing of function parameter decorations
It doesn't do anything substantial yet, but it ignores enough so internal
shaders won't generate warnings.

I've also added ByVal parsing, because I need this one to actually fix a
correctness issue in a later patch.

Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
(cherry picked from commit 9b55dcca54)
2024-07-31 17:26:30 +02:00
Karol Herbst
f3f8ce0fd4 spirv: generate info for FunctionParameterAttribute
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
(cherry picked from commit 90db6c729d)

[Eric: manually added the function prototype to spirv_info.h since that
was not auto-generated yet in 24.1]
2024-07-31 17:26:30 +02:00
Jesse Natalie
ac5987ec5a microsoft/clc: Split struct copies before vars_to_ssa in pre-inline optimizations
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
(cherry picked from commit f05b7225a3)
2024-07-31 17:26:29 +02:00
Eric Engestrom
60b6119ea8 .pick_status.json: Update to 235ce3df9b 2024-07-31 17:26:29 +02:00
José Roberto de Souza
8af39e7e86 anv: Propagate protected information to blorp_batch_isl_copy_usage()
This fixes protected tests that uses vkCmdCopyBuffer().

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30369>
(cherry picked from commit 5fdacb56ed)
2024-07-31 17:26:29 +02:00
José Roberto de Souza
1aeb707571 isl: Fix Xe2 protected mask
BSpec 71045 and 57023 still points that protected/encrypted bit is still
bit 0, bit 1 should not be set or undesired MOCS index could be set.

Fixes: 7be8bc2c97 ("isl: Add mocs for xe2")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30369>
(cherry picked from commit 79f95a3711)
2024-07-31 17:26:29 +02:00
Lionel Landwerlin
05c0015d65 anv: propagate protected information for blorp operations
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29982>
(cherry picked from commit d5b0526507)
2024-07-31 17:26:29 +02:00
Lionel Landwerlin
c28b4470c5 anv: properly flag image/imageviews for ISL protection
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29982>
(cherry picked from commit 8d9cc6aa23)
2024-07-31 17:26:29 +02:00
Lionel Landwerlin
8d4ee91743 isl: account for protection in base usage checks
Only Cc stable because it's needed for the next patches.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29982>
(cherry picked from commit 4eab285d4a)
2024-07-31 17:26:29 +02:00
Eric Engestrom
f3bc003507 ci/baremetal: fix logic for retrying boot when it failed
Contrary to what the original commit said, this is actually still used
(see .gitlab-ci/bare-metal/poe-powered.sh:205), and the boot retry logic
has been broken ever since, exacerbating the rpi farm boot problems.

Fixes: 97b2afa16a ("ci/bare-metal: Drop the 2 vs 1 exit code from poe_run.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30340>
(cherry picked from commit 2bc82b7147)
2024-07-31 17:26:29 +02:00
GKraats
5b1a063901 i915g: fix max_lod at mipmap-sampling
At update_map at i915_state_sampler.c max_lod is no longer set to 1
for npots. This almost totally disabled mipmapping.
Max_lod should still be set to 1, but only if it is still 0,
because no mipmap-levels are present.
According to existing comment at update_map this is needed, to
avoid problems at sampling,
if MIN_FILTER and MAX_FILTER differ.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28638>
(cherry picked from commit ad02bfe41d)
2024-07-31 17:26:29 +02:00
GKraats
120e257e44 i915g: fix mipmap-layout for npots
Remove at i945_texture_layout_2d() call of  util_next_power_of_two(),
which oversized the npot-blocks for every level to get power of 2
for width and height. Hardware doesnot expect these oversized
npot-blocks, causing mangled mipmapping.
This also is done at i915_texture_layout_2d(), which is
used by older gen3-gpus.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28638>
(cherry picked from commit bb95d744ca)
2024-07-31 17:26:29 +02:00
GKraats
e3aa996d9d i915g: fix generation of large mipmaps
Generation of mipmaps was failing for large heights.
If height > 1365 LEVEL 1 couldnot be generated because of
the max texture size limit (2048). This is solved by using an
offset at the texture-buffer at overflow situations.
The height of the offset must be multiple of 8.
This solves the problem mentioned at MR !27561 (closed).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10410

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28638>
(cherry picked from commit a1a301488b)
2024-07-31 17:26:29 +02:00
Dave Airlie
664041f204 gallivm/sample: fix sampling indirect from vertex shaders
When doing indirect sampling, we just fetch one value per lane,
but type.length == 1 caused num_quads to be 0 which caused things
to crash.

Fixes dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.uniform.vertex.sampler2d

Cc: mesa-stable
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30358>
(cherry picked from commit 3e01422a16)
2024-07-31 17:26:29 +02:00
Yiwei Zhang
d4c3867cc2 venus: fix a race condition between gem close and gem handle tracking
After using sparse array to manager virtgpu bo, we set gem_handle to 0
to indicate that the bo is invalid. However, the gem handle gets closed
before that and can be reused by another newly created bo, leading to
the tracked gem handle being unexpectedly zero'ed out.

Fixes: 88f481dd74 ("venus: make sure gem_handle and vn_renderer_bo are 1:1")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30362>
(cherry picked from commit f788c87d02)
2024-07-31 17:26:29 +02:00
Matt Turner
eff81bc9e5 intel/elk: Use REG_CLASS_COUNT
Fixes: d44462c08d ("intel/elk: Fork Gfx8- compiler by copying existing code")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30314>
(cherry picked from commit a3714b55f4)
2024-07-31 17:26:29 +02:00
Matt Turner
e4bceffb5f intel/brw: Use REG_CLASS_COUNT
Fixes: 5d87f41a54 ("intel/fs/ra: Define REG_CLASS_COUNT constant specifying the number of register classes.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30314>
(cherry picked from commit 5e24c21625)
2024-07-31 17:26:29 +02:00
X512
7ebc7983d4 egl/haiku: fix synchronization problems, add missing header
`st_context_invalidate_state` call is required when changing buffer attachments.

Including header with BBitmap class definition is required to properly
call C++ destructor.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30372>
(cherry picked from commit 828c3cf002)
2024-07-31 17:26:29 +02:00
X512
86c5feed5c egl/haiku: fix double free of BBitmap
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30364>
(cherry picked from commit 2e70757dc0)
2024-07-31 17:26:29 +02:00
Karol Herbst
1ac0f451d9 clc: force linking of spirvs with mismatching pointer types in signatures
With LLVM-17 and opaque pointers, sometimes the compiled spirvs lose all
their information in regards to what specific pointer type a function
parameter has.

To workaround this, we can tell the spirv linker to insert casts to handle
those cases.

See https://github.com/KhronosGroup/SPIRV-Tools/pull/5534

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30029>
(cherry picked from commit f283c38f9c)
2024-07-31 17:26:29 +02:00
Matt Turner
45476b1c45 intel/clc: Free disk_cache
Fixes: c15bf88f01 ("intel: Add a little OpenCL C compiler binary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30313>
(cherry picked from commit aae82061af)
2024-07-31 17:26:29 +02:00
Matt Turner
2a62cfc73f intel/clc: Free parsed_spirv_data
This declaration shadowed a variable by the same type and name in an
outer scope. That variable is passed to clc_free_parsed_spirv().

Fixes: 4fd7495c69 ("intel/clc: add ability to output NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30313>
(cherry picked from commit 1574372de4)
2024-07-31 17:26:29 +02:00
Alessandro Astone
ec61b755a4 egl/gbm: Walk device list to initialize DRM platform
We cannot always use /dev/dri/card0.
As a matter of fact, on systems with SimpleDRM enabled /dev/dri/card0
will be created by it and removed once a GPU driver has loaded.

In any case we shouldn't hard-code the device number and instead walk
the device list to find the first suitable device.

This issue is trivially reproducible with `eglinfo -B -p gbm` on
Ubuntu 24.04 or Fedora 40

Fixes: 32f4cf3808 ("egl/gbm: Fix EGL_DEFAULT_DISPLAY")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30325>
(cherry picked from commit 7949471716)
2024-07-31 17:26:29 +02:00
Dylan Baker
d54be8ef21 crocus: check for depth+stencil before creating resource
This avoid leaking memory if we return early.

Fixes: 5f7df5df0d ("crocus: disable depth and d+s formats with memory objects")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30305>
(cherry picked from commit 4ef0cbaf05)
2024-07-31 17:26:28 +02:00
Dylan Baker
3931961070 crocus: properly free resources on BO allocation failure
Iris already has the same fix applied.

Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30305>
(cherry picked from commit 34145725ce)
2024-07-31 17:26:28 +02:00
Dylan Baker
4734c85292 tgsi_to_nir: free disk cache value if the size is wrong
Fixes: 4db880d805 ("ttn: Implement disk cache")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30308>
(cherry picked from commit 11bc95934f)
2024-07-31 17:26:28 +02:00
Faith Ekstrand
bf3abbe43f nak/spill_values: Don't assume no trivial phis
Thanks to LCSSA, we can absolutely have phis with only one source and we
need to handle those in spilling.  Fortunately, there's nothing really
special about that case.  I was just prematurely optimizing.

Fixes: bcad2add47 ("nak: Add a spilling pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
(cherry picked from commit 8bf3213a54)
2024-07-31 17:26:28 +02:00
Eric Engestrom
711ccec070 .pick_status.json: Update to ad90bf0500 2024-07-31 17:26:28 +02:00
Paulo Zanoni
73e201d7c3 anv/trtt: fix the process of picking device->trtt.queue
We want to use actual sparse-capable queues as the default
trtt->queue, not copy queues that may have a companion_rcs_batch.
Before this patch, if we expose more than one queue *and* the
application creates a copy queue first, we'll end up setting
trtt->queue as the copy queue, which will GPU hang when we submit the
TR-TT batches as they don't support the pipe_control commands we
issue.

The trtt->queue queue is used for binding/unbinding buffers in code
paths where there's no specific queue coming from user space, such as
when we're creating or destroying a sparse resource.

This is not a problem yet on i915.ko since we are exposing
only a single queue, and it is not a problem for xe.ko since TR-TT is
not the default there. This is also not a problem in applications
that create the render or compute queue first. We plan to expose more
queues when using TR-TT, so this would become a problem without this
patch.

None of VK-GL-CTS seems to exercise that, and none of the Steam games
I tested exercise that as well. I was able to reproduce this issue
using our internal tracing tool.

v2: New implementation that doesn't break when we only have a compute
    queue (Lionel).

Fixes: 04bfe828db ("anv/sparse: allow sparse resouces to use TR-TT as its backend")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
(cherry picked from commit 3ab8ff99fa)
2024-07-31 17:26:28 +02:00
Karol Herbst
539628118f nak: allow clippy::not_unsafe_ptr_arg_deref lints
Clippy errors on this, so just allow it here.

Fixes: b9c0e3c1ab ("nak: Add helpers for filling QMDs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30323>
(cherry picked from commit 526a572233)
2024-07-31 17:26:28 +02:00
Vlad Schiller
4d9e30e21b pvr: Handle VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO
This commit silences a debug message, which can get quite spammy.

Fixes: a2e0701 ("pvr: Enable KHR_image_format_list")
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30222>
(cherry picked from commit 848c7c9560)
2024-07-31 17:26:28 +02:00
Vlad Schiller
afe2f7d50c pvr: Handle VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
This commit silences a debug message, which can get quite spammy.

Fixes: 8991e64 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30222>
(cherry picked from commit eda77bf79d)
2024-07-31 17:26:28 +02:00
Eric Engestrom
5a6e55e1bb meson: xcb & xcb-randr are needed by the loader whenever x11 is built
Specifically, `src/loader/loader_dri_helper.c` needs them.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11536
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30292>
(cherry picked from commit aed5a974e9)
2024-07-31 17:26:28 +02:00
Faith Ekstrand
43d3468267 nvk: Reject sparse images on Maxwell A and earlier
Even though we don't advertise the sparseResidency feature, a bunch of
CTS tests just call GetPhysicalDeviceImageFormatProperties2() with
SPARSE_RESIDENCY_BIT and see if that fails.

Fixes: d2177f4764 ("nvk: Don't advertise sparse residency on Maxwell A")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30303>
(cherry picked from commit 68d6cdfbc5)
2024-07-31 17:26:28 +02:00
Francisco Jerez
a3aed210bd iris: Pin pixel hashing table BO from iris_batch submission instead of from iris_state.
This fixes sporadic rendering corruption reported on MTL with ChromeOS
in cases where multiple processes including Chrome were utilizing the
GPU concurrently, and one of the processes happened to submit a
BLORP-only batch buffer right after a switch from a different context.

In such a scenario we would fail to add the BO that holds the pixel
hashing tables to the execbuf IOCTL for the BLORP batch, because it
was being pinned from iris_restore_render_saved_bos() which isn't
called for BLORP operations, potentially causing it to use garbage as
pixel pipe hashing tables, which led to corruption of the BLORP
rendering.

Technically this could have affected DG2 as well, but it has only been
reported on MTL so far.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30274>
(cherry picked from commit 49b433d5e7)
2024-07-31 17:26:28 +02:00
Dylan Baker
9649e80818 mesa: fix memory leak when using shader cache
Fixes: 656ccf4ef8 ("mesa: shader dump/read support for ARB programs")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30302>
(cherry picked from commit 7513a0bf3a)
2024-07-31 17:26:28 +02:00
Dylan Baker
29a9bcc7e7 compilers/clc: Add missing break statements.
fixes: c0cf7f578a

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30301>
(cherry picked from commit e5b53d9408)
2024-07-31 17:26:28 +02:00
Eric Engestrom
059dbd273b venus: initialize bitset in CreateDescriptorPool()
Fixes: de5879447b ("Track bitset when create descriptor pool")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30286>
(cherry picked from commit 5c5df9376f)
2024-07-31 17:26:28 +02:00
Eric Engestrom
61a5c3426a nak: fix meson typo
Fixes: 95bff5ca5b ("nak: Add minimum bindgen requirement")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30288>
(cherry picked from commit 324ccd7430)
2024-07-31 17:26:28 +02:00
M Henning
1123a7a85d nak: Add minimum bindgen requirement
This is copied from rusticl. We need bindgen 0.65 so we have
size_t-is-usize by default.

Fixes: 94436580 ("nak: Only convert the written portion of the buffer in NirInstrPrinter")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11371
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30178>
(cherry picked from commit 95bff5ca5b)
2024-07-31 17:26:28 +02:00
Eric Engestrom
3ca9bbbf1d [24.1 only] ci: bump cbindgen-cli to 0.65 to match actual requirements 2024-07-31 17:26:22 +02:00
Eric Engestrom
de7f900118 .pick_status.json: Update to 0bdc2f180f 2024-07-23 22:28:57 +02:00
Faith Ekstrand
f759e3b01a nvk: Don't advertise sparse residency on Maxwell A
Fixes: 48803ac53d ("nvk: enable sparse residency features")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
(cherry picked from commit d2177f4764)
2024-07-23 22:28:08 +02:00
Faith Ekstrand
6773865b7c nvk: Fix indirect cbuf binds pre-Turing
nvk_cmd_buffer_push_indirect() takes bytes, not dwords.

Fixes: ee29a8d1cd ("nvk: Upload cbufs based on the cbuf_map")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
(cherry picked from commit a888e83c3a)
2024-07-23 22:28:08 +02:00
Sushma Venkatesh Reddy
019bf048de intel/clflush: Utilize clflushopt in intel_invalidate_range
On MTL ChromeOS boards, during AI based video conference, we were
observing a lot of overhead from invalidations. Upon debug, it was found
that we were using clflush in this function and that isn't efficient.

With this change, while executing compute workloads like zoo models, we
are getting ~25% performance improvements in a best case scenario.

Rework:
 * Jordan: Call intel_clflushopt_range() rather than
   __builtin_ia32_clflushopt() because intel_mem.c is not compiled
   with -mclflushopt.

Backport-to: 24.1 24.2
Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30238>
(cherry picked from commit 2f6919e6c2)
2024-07-23 22:28:08 +02:00
Jessica Clarke
7829531a6b meson: egl: Build egl_dri2 driver even for plain DRI
Despite its name, egl_dri2 works under plain DRI without DRI2, and the
old autotools build system built it when $enable_dri = yes, with no
check for DRI2. This fixes the build for GNU/Hurd, which supports DRI,
but doesn't have DRM and thus no DRI2 support.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/587>
(cherry picked from commit 149e8bff52)
2024-07-23 22:28:08 +02:00
Jessica Clarke
09dfdcd476 Revert "meson: fix with_dri2 definition for GNU Hurd"
This reverts commit ad862c36e5.

This change does not work, because libdrm is required if with_dri2 is
true. Moreover, we don't want all of DRI2 on Hurd, we just want the
egl_dri2 driver, as done by autotools. So first revert this to stop
trying to build all of DRI2.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/587>
(cherry picked from commit ec55a6c329)
2024-07-23 22:28:08 +02:00
Jessica Clarke
7444de6b13 Revert "meson: Do not require libdrm for DRI2 on hurd"
This reverts commit 2fd85105c6.

Despite its name, egl_dri2 works under plain DRI without DRI2, and the
old autotools build system built it when $enable_dri = yes, with no
check for DRI2. A future commit will adapt meson.build to follow that
approach rather than this hackier one.

Note that the case removed in the second hunk is already dead code,
since system_has_kms_drm is false on GNU/Hurd, and could have been
dropped as part of 66d2ae0386 ("meson: forcefully disable libdrm when
host doesn't have it").

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/587>
(cherry picked from commit 8461776a09)
2024-07-23 22:28:08 +02:00
Francisco Jerez
6cb0abc3c0 iris/gfx12.5: Pass non-empty push constant data to PS stage for TBIMR workaround.
Note that this bug leading to GPU hangs hasn't been reproduced on GL
so far, workaround is mainly included for completeness.

Fixes: 57decad976 ("intel/xehp: Enable TBIMR by default.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
(cherry picked from commit 49144ebcf9)
2024-07-23 22:28:08 +02:00
Francisco Jerez
7edf084965 anv/gfx12.5: Pass non-empty push constant data to PS stage for TBIMR workaround.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10728
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11399
Fixes: 57decad976 ("intel/xehp: Enable TBIMR by default.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
(cherry picked from commit ff3c3792b4)
2024-07-23 22:28:08 +02:00
Francisco Jerez
0bf34a5b62 intel/dev: Add devinfo flag for TBIMR push constant workaround.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
(cherry picked from commit bb2513918a)
2024-07-23 22:28:07 +02:00
Francisco Jerez
7802cd2b99 intel/brw: Implement null push constant workaround.
This implements an undocumented workaround for a hardware bug that
affects draw calls with a pixel shader that has 0 push constant cycles
when TBIMR is enabled, which has been seen to lead to a hang with
Fallout 3 and Metal Gear Rising Revengeance.  This hardware bug has
been reported as HSDES#22020184996 which is still pending a resolution
by the hardware team.  However since this workaround found empirically
has been confirmed to fix the issue reliably and it's relatively
harmless it seems worth checking in already even though no final W/A
number is available nor has the W/A json file been updated.

To avoid the issue we simply pad the push constant payload to be at
least 1 register.  This is enabled via a brw_wm_prog_key since the
driver needs to be in agreement with the compiler on whether the dummy
push constant cycle is present, and it can be avoided in cases where
the driver knows that TBIMR will be disabled (e.g. for BLORP).

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10728
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11399
Fixes: 57decad976 ("intel/xehp: Enable TBIMR by default.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
(cherry picked from commit b98eebbcb2)
2024-07-23 22:28:07 +02:00
Deborah Brouwer
816c835c84 ci/lava: Detect a6xx gpu recovery failures
Sporadically a6xx gpu will fail to recover causing the lava job
a660_vk_full to loop on error messages for three hours before timing
out.

A few sporadic error messages may still be recoverable, but when multiple
errors occur over a short period, successful recovery is unlikely. Parse
the logs to look for repeated error messages within a short time period.
If found, cancel the lava job and rerun it.

Also add unit tests for this behaviour.

cc: mesa-stable

Reported-by: Valentine Burley <valentine.burley@gmail.com>
Acked-by: Daniel Stone <daniel.stone@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30032>
(cherry picked from commit 72c182f873)
2024-07-23 22:28:07 +02:00
Lionel Landwerlin
70d69aa346 brw: fix uniform rebuild of sources
If you have something like this :

con 32    %66 = @load_reg (%62) (base=0, legacy_fabs=0, legacy_fneg=0)
con 32    %27 = @resource_intel (%22 (0xdeaddead), %66, %67, %17 (0x0)) (desc_set=2, binding=96, resource_intel=0, resource_block_intel=-1)

Just copying the brw_reg in ssa_values[] is not enough for the
load_reg intrinsic. We need to call get_nir_src() to force some logic
to create the register correct.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b8209d69ff ("intel/fs: Add support for new-style registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30050>
(cherry picked from commit 67b778445a)
2024-07-23 22:28:07 +02:00
Emma Anholt
74784f7088 dri: Fix a pasteo in dri2_from_names()
Fixes: 433ca3127a ("st/dri: replace format conversion functions with single mapping table")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
(cherry picked from commit 6227d83910)
2024-07-23 22:28:07 +02:00
Eric Engestrom
81504649ac .pick_status.json: Update to 0cc23b6524 2024-07-23 22:28:07 +02:00
David Rosca
d49e93038e Revert "frontends/va: Fix AV1 slice_data_offset with multiple slice data buffers"
This commit is fixing an issue where all AV1 slice data offsets always point
into the first slice data buffer, even when multiple slice data buffers
are submitted. However, after b0d6e58d88 ("Reapply "radeonsi/vcn: AV1 skip the redundant bs resize"")
only the first slice data buffer will be sent to decoder and the incorrect
behavior is required, so this commit also needs to be reverted.

This reverts commit 6746d4df6e.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30255>
2024-07-23 22:28:07 +02:00
Iván Briano
6fbfec0460 anv: get scratch surface from the correct pool
Fixes: 3ccf80f9b1 ("anv: prepare 2 variants of all shader instructions")

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30097>
(cherry picked from commit ece7abb599)
2024-07-23 22:28:07 +02:00
Karol Herbst
ca8410e4f6 rusticl/mesa: set take_ownership to true in set_constant_buffer_stream
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11485
Fixes: 8da8c6c2d8 ("rusticl: use stream uploader for cb0 if prefered")
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
(cherry picked from commit 38e15037f4)
2024-07-23 22:28:07 +02:00
Karol Herbst
d9eed288f6 rusticl/mesa: handle failures with u_upload_data
It can fail to allocate in which case we should return an error instead of
continuing.

Fixes: 8da8c6c2d8 ("rusticl: use stream uploader for cb0 if prefered")
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
(cherry picked from commit 17b66799b6)
2024-07-23 22:28:07 +02:00
Karol Herbst
82b08a3f04 rusticl/event: return execution errors when doing a blocking enqueue
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
(cherry picked from commit 8a77488c9c)
2024-07-23 22:28:07 +02:00
Karol Herbst
555bc9b964 rusticl/queue: properly implement in-order queue error checking
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
(cherry picked from commit f4bf6f26a9)
2024-07-23 22:28:07 +02:00
Karol Herbst
7cdb8cba1b rusticl/event: properly implement CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
The current approach doesn't take into account when a dependency failed
executing, so we'd miss out of resource errors and the likes.

Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
(cherry picked from commit 3684912e3f)
2024-07-23 22:28:07 +02:00
Karol Herbst
776e826fed rusticl/queue: properly check all dependencies for an error status
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
(cherry picked from commit 8a5ef4411b)
2024-07-23 22:28:07 +02:00
Karol Herbst
e7338b9a3b rusticl/queue: do not overwrite event error states
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
(cherry picked from commit 25dedee67d)
2024-07-23 22:28:07 +02:00
Karol Herbst
550c965c7b rusticl/event: make set_status handle error status properly
Event::set_status only called the cbs for the passed in status, but we
need it to call all cbs up to the passed in status. This simplifies error
handling.

Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
(cherry picked from commit d2d3f8e446)
2024-07-23 22:28:06 +02:00
Samuel Pitoiset
c5d762f934 radv: do not expose ImageFloat32AtomicMinMax on GFX11_5
These opcodes aren't supported on GFX11-11.5.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30225>
(cherry picked from commit 1c5779250b)
2024-07-18 08:19:42 +02:00
Eric Engestrom
d87fc95d14 .pick_status.json: Mark 4e9c16b035 as denominated 2024-07-18 08:19:38 +02:00
Eric Engestrom
062542192b .pick_status.json: Update to 534f0019d7 2024-07-18 08:19:23 +02:00
Eric Engestrom
a0d0674444 docs: add sha256sum for 24.1.4 2024-07-17 17:08:15 +02:00
Eric Engestrom
62a4558a5d VERSION: bump for 24.1.4 2024-07-17 16:55:24 +02:00
Eric Engestrom
5196ba5436 docs: add release notes for 24.1.4 2024-07-17 16:54:45 +02:00
Faith Ekstrand
07fd6b68f6 nvk: Drop the sparse alignment back down to 4096
nouveau uses the OS page size which is almost always 4096.  The next
patch will make this properly queried but this version is back-portable.

Fixes: 58181b7bbc ("nvk: Bump the sparse alignment requirement on buffers to 64K")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30138>
(cherry picked from commit 68c06558be)
2024-07-17 12:18:22 +02:00
Paulo Zanoni
748cfeddbe iris: fix iris_xe_wait_exec_queue_idle() on release builds
We need to call iris_wait_syncobj() on both release and debug builds,
so take it out of the assert() call. Only assert the result.

With this patch, gnome-session finally works for me. Also steam.

Fixes: 665d30b544 ("iris: Wait for drm_xe_exec_queue to be idle before destroying it")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30195>
(cherry picked from commit 22fe73a86a)
2024-07-17 12:17:22 +02:00
Mike Blumenkrantz
5903c215ab egl/x11/sw: fix partial image uploads
* swrast allocates images aligned to 64x64 tiles, which results in images
  that are larger than the window. PutImage requests must be clamped on
  the y-axis to avoid uploading/damaging out-of-bounds regions
* winsys coords are y-inverted

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29910>
(cherry picked from commit 6088a0bf51)
2024-07-17 12:17:20 +02:00
Paulo Zanoni
1f0c856044 anv: reimplement the anv_fake_nonlocal_memory workaround
Commit 94989b45a5 ("anv,driconf: Add fake non device local memory WA
for Total War: Warhammer 3") implemented a workaround to make
Warhammer 3 work on ADL, but the game still doesn't work on LNL, which
uses xe.ko, and MTL, which uses i915.ko: it still fails at launch
claiming it couldn't allocate memory.

So in this implementation, instead of clearing DEVICE_LOCAL_BIT we
just duplicate our memory types, one having the bit and one not
having.

v2:
 - Check for VK_MAX_MEMORY_TYPES (José)
 - Invert the order of the memory types (José)
 - Fix white space issue (José)
v3:
 - Comment our non-spec-compliance (José)
 - Remove useless lines (José)

Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8721
Fixes: 94989b45a5 ("anv,driconf: Add fake non device local memory WA for Total War: Warhammer 3")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30162>
(cherry picked from commit 241585667f)
2024-07-17 12:17:18 +02:00
Mary Guillemard
584836e745 pan/kmod: Avoid deadlock on VA allocation failure on panthor
Fixes: 97f6a62f7e ("pan/kmod: Add a backend for panthor")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30150>
(cherry picked from commit 668bde4421)
2024-07-17 12:17:17 +02:00
Dave Airlie
f9bae0e80e radv/video: advertise mutable/extended for dst video images.
This allows zink video to create planar image views if needed.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30203>
(cherry picked from commit 814a2da2f4)
2024-07-17 12:17:16 +02:00
Doug Brown
e27739c918 xa: add missing stride setup in renderer_draw_yuv
This fixes a problem observed in VMware VMs where Xv playback results in
a black screen instead of the actual video.

Signed-off-by: Doug Brown <doug@schmorgal.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11490
Fixes: 7672545223 ("gallium: move vertex stride to CSO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30116>
(cherry picked from commit 60488d6213)
2024-07-17 12:17:15 +02:00
Marek Olšák
0ccd24cda6 radeonsi: lock a mutex when updating scratch_va for compute shaders
Fixes: 3b0bfd254f - radeonsi/gfx11: make flat_scratch changes for compute

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30071>
(cherry picked from commit 2afd233145)
2024-07-17 12:17:13 +02:00
Marek Olšák
cd63b1d1f2 ac: add radeon_info::has_scratch_base_registers
Fixes: 3b0bfd254f - radeonsi/gfx11: make flat_scratch changes for compute

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30071>
(cherry picked from commit a5b4ae67ae)
2024-07-17 12:14:48 +02:00
Marek Olšák
94e41cd24c radeonsi: don't update compute scratch if the compute shader doesn't use it
We need to save the last COMPUTE_TMPRING_SIZE value in si_context because
it's no longer computed when compute scratch isn't used.

Fixes: 3b0bfd254f - radeonsi/gfx11: make flat_scratch changes for compute

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30071>
(cherry picked from commit bc4382348d)
2024-07-17 11:58:15 +02:00
Marek Olšák
78639a95cc radeonsi: replace si_shader::scratch_bo with scratch_va, don't set it on gfx11+
This removes the unnecessary buffer reference and improves this fragile
code.

Fixes: 3b0bfd254f - radeonsi/gfx11: make flat_scratch changes for compute
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11463

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30071>
(cherry picked from commit c353394a21)
2024-07-17 11:56:28 +02:00
Mike Blumenkrantz
a7f3bcf161 mesa/st: load state params for feedback draws with allow_st_finalize_nir_twice
as proposed by Amol Surati, this should ensure that the params are always updated

Fixes: 5eb0136a3c ("mesa/st: when creating draw shader variants, use the base nir and skip driver opts")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30126>
(cherry picked from commit e42a25aea1)
2024-07-17 11:49:09 +02:00
Dave Airlie
76d0096f6a anv/video: use correct offset for MPR row store scratch buffer.
While playing with zink video, I found this was using the wrong
offset.

Fixes: 98c58a16ef ("anv: add initial video decode support for h264.")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30143>
(cherry picked from commit d94a40fe08)
2024-07-17 11:49:08 +02:00
Eric Engestrom
a1520aeacb .pick_status.json: Update to 2d260314f1 2024-07-17 11:48:56 +02:00
Marek Olšák
dca9d85941 ac/surface: finish display DCC for gfx11.5
Fixes: 6835257246 - amd/common: update DCC for gfx11.5

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30114>
(cherry picked from commit 46071c90c7)
2024-07-14 11:02:39 +02:00
Faith Ekstrand
c8e8664235 zink/kopper: Set VK_COMPOSITE_ALPHA_OPAQUE_BIT when PresentOpaque is set
This is required for EGL_EXT_present_opaque to work correctly.

Fixes: 8ade5588e3 ("zink: add kopper api")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11007
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30133>
(cherry picked from commit 1f906f8715)
2024-07-14 11:02:39 +02:00
Mike Blumenkrantz
fbd4b2be5b zink: modify some buffer mapping behavior for buffer replacement srcs
if the src for a replace_buffer call is mapped after replacement:
* avoid clearing access flags
* update valid range

the pointer access here is always safe because the only case in which
this scenario can occur is if tc is forced to sync immediately after
creating a replaceent buffer, and the replacement buffer's lifetime
will always be exceeded by the lifetime of the real buffer

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30107>
(cherry picked from commit 70b40fd2a0)
2024-07-14 11:02:39 +02:00
Mike Blumenkrantz
fe4312235f zink: track the "real" buffer range from replacement buffers
when tc replaces a buffer in subdata, it may subsequently perform subdata calls
on the replacement if it is forced to sync during map, e.g.,
* bind_vbo(dst)
* draw
* subdata(src)
  * buffer replacement
  * map
  * tc sync
  * replace_buffer(dst, src)
  * memcpy <- broken
* draw

in this scenario, src may not have data at the time of replacement,
but it will get data soon after, and this buffer range is the real one

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30107>
(cherry picked from commit 76da22bfc2)
2024-07-14 11:02:39 +02:00
Mike Blumenkrantz
722a7f589d zink: propagate valid buffer range to real buffer when mapping staging
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30107>
(cherry picked from commit fa210726b6)
2024-07-14 11:02:39 +02:00
Kenneth Graunke
92e59d71cd intel/nir: Don't needlessly split u2f16 for nir_type_uint32
Commit f695a9fed2 moved the 64-bit float <-> 16-bit float conversion
splitting into a core NIR pass, so the code remaining here is only
needed for 64-bit integer types.

Presumably in an attempt to remove the float handling, it replaced
simple bit_size == 64 checks with this expression:

   (full_type & (nir_type_int64 | nir_type_uint64))

I believe that the intended expression was:

   (full_type == nir_type_int64 || full_type == nir_type_uint64)

Unfortunately, the former is incorrect.  Any integer or unsigned
NIR type would trigger the former expression.  For example:

   nir_type_uint32 & (nir_type_int64 | nir_type_uint64) => nir_type_uint

This meant that we were splitting e.g. u2f16 on 32-bit unsigned types
into u2f32 and f2f16, when we can easily natively handle that case.

To fix this, we go back to simple bit_size == 64 checks.  This pass is
already run after nir_lower_fp16_casts which will split the float case,
so we will never see it here.

fossil-db on Alchemist shows a -1.14% reduction in affected shaders for
google-meet-clvk shaders.  In another ChromeOS workload, it improves
performance by around 8% on Meteorlake.

Thanks to Sushma Venkatesh Reddy for finding this performance issue!

Fixes: f695a9fed2 ("intel/compiler: use nir_lower_fp16_casts")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30091>
(cherry picked from commit 837c441acb)
2024-07-14 11:02:39 +02:00
Aleksi Sapon
e94ab1c0a4 lavapipe: build "Windows" check should use the host machine, not the platforms option.
`with_platform_windows` depends on the `platforms` option,
and is an inaccurate proxy check for `host_machine.system() == 'windows'`.
The ICD path and shared library name are dependent on the host system,
not whether or not Lavapipe is built with `WIN32` platform support.
In fact Lavapipe can be built with no platforms (`-Dplatforms=`)
if you only need headless (then this check would be incorrect)

fixes: e030ab5163

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29900>
(cherry picked from commit 94379377c4)
2024-07-14 11:02:39 +02:00
Karol Herbst
01366d8729 rusticl/memory: complete rework on how mapping is implemented
Previously we tried to map GPU resources directly wherever we could,
however this was always causing random issues and was overall not very
robust.

Now we just allocate a staging buffer on the host to copy into, with some
short-cut for host_ptr allocations.

Fixes the following tests across various drivers:

1Dbuffer tests (radeonsi, zink)
buffers map_read_* (zink)
multiple_device_context context_* (zink)
thread_dimensions quick_* (zink)
math_brute_force (zink)

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30082>
(cherry picked from commit 7b22bc617b)

[Eric: also drop `can_map_directly` and `has_user_shadow_buffer` as
they're now dead code, which was breaking the build]
2024-07-14 11:00:40 +02:00
Karol Herbst
e51ac614c5 rusticl/ptr: add a few APIs to TrackedPointers
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30082>
(cherry picked from commit 00180933ad)
2024-07-13 11:22:31 +02:00
Karol Herbst
5b215136fc rusticl/context: move SVM pointer tracking into own type
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30082>
(cherry picked from commit d28ab687bb)
2024-07-13 11:22:31 +02:00
Karol Herbst
0e729d15b7 rusticl/buffer: harden bound checks against overflows
Fixes: 20c90fed5a ("rusticl: added")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30082>
(cherry picked from commit 41bb73baf6)
2024-07-13 11:22:31 +02:00
Samuel Pitoiset
869c3bb602 radv: disable VK_EXT_sampler_filter_minmax on TAHITI and VERDE
Ported from RadeonSI.

This also explains all the flakes on Tahiti, see
9329f2c15b for reference.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30074>
(cherry picked from commit 2d29b8b01e)
2024-07-13 11:22:31 +02:00
Eric Engestrom
5ff21dbe58 .pick_status.json: Update to a04dc1a451 2024-07-13 11:22:22 +02:00
Tim Huang
f7ba7f4736 amd/vpelib: support VPE IP v6.1.3
Use VPE_IP_LEVEL_1_0 for VPE IP version 6.1.3.

Signed-off-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 076cbf605e)

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30112>
2024-07-11 13:56:05 -05:00
Tim Huang
9465f77d3b amd: add GFX v11.5.2 support
This is to enable GFX v11.5.2 support.

Signed-off-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit e322b2b683)

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30112>
2024-07-11 13:56:05 -05:00
David Rosca
b0d6e58d88 Reapply "radeonsi/vcn: AV1 skip the redundant bs resize"
The workaround is needed until there is a ffmpeg release with the fix.

This reverts commit 88dfe04b08.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11197
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11221
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29400>
2024-07-11 15:30:01 +00:00
Connor Abbott
41f8ac9de7 ir3: Fix stg/ldg immediate offset on a7xx
Don't multiply by 4 twice. While we're here, fix the in-bounds check on
a6xx, since we need to account for the multiplying by 4. This was done
correctly on a7xx but the commit below didn't correctly port it to a6xx
when adding the multiply on a6xx.

Fixes: 01bac643f6 ("freedreno/ir3: Fix ldg/stg offset")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30046>
(cherry picked from commit 2c462fe9cc)
2024-07-10 09:39:14 +02:00
Pierre-Eric Pelloux-Prayer
cecc809ab4 radeonsi: fix crash in si_update_tess_io_layout_state for gfx8 and earlier
si_set_patch_vertices was only called if tcs.current was non-NULL but
this condition is not enough for GFX9+ since vs is used as ls.

Add a check in si_update_tess_io_layout_state instead, and set
sctx->do_update_shaders for case where the ls_current is not yet
available.
This fix crashes on GFX6.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29876>
(cherry picked from commit a7a1e3d329)
2024-07-10 09:39:12 +02:00
Pierre-Eric Pelloux-Prayer
15a02d9814 winsys/radeon: fill lds properties
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29876>
(cherry picked from commit e8fc4546ff)
2024-07-10 09:39:12 +02:00
Pierre-Eric Pelloux-Prayer
3340392efa Revert "ac, radeonsi: remove has_syncobj, has_fence_to_handle"
This reverts commit 02fe3c32cd.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11352
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29876>
(cherry picked from commit 2021813450)
2024-07-10 09:39:11 +02:00
Pierre-Eric Pelloux-Prayer
7d35a5d502 radeonsi: fix buffer_size in si_compute_shorten_ubyte_buffer
buffer_size is not the full buffer size, but the part of the
buffer that is accessed by the compute shader.

This fixes the assert hit in si_set_shader_buffer.

Fixes: 1a99f50c7f ("radeonsi: use a compute shader to convert unsupported indices format")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29876>
(cherry picked from commit 84a563cf6f)
2024-07-10 09:35:24 +02:00
msizanoen
30291aa73a egl/wayland: Fix direct scanout with EGL_EXT_present_opaque
We select the feedback tranche according to the image format but not the
actual format that we will use for presentation. This breaks direct
scanout in cases where the application selected a visual with an alpha
channel but using EGL_EXT_present_opaque which previously worked as
expected.

Fix this by selecting the feedback tranche according to the actual
presentation format.

Fixes: 9ea9a963aa ("egl/wayland: Fix EGL_EXT_present_opaque")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28153>
(cherry picked from commit e5e108706c)
2024-07-10 09:33:19 +02:00
Faith Ekstrand
ef890cd2f5 nvk: Align sparse-bound images to the sparse binding size
Instead of trusting in nil::Image::align_B, force it to the sparse
binding size because we know we're going to try and sparse bind it.
Otherwise, small sparse images could fail to bind at the bind step.

Fixes: 7321d151a9 ("nvk: Add support for sparse images")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
(cherry picked from commit 04bdbb71de)
2024-07-10 09:33:18 +02:00
Faith Ekstrand
93a431f91b nvk: Bump the sparse alignment requirement on buffers to 64K
Otherwise, if they live in VRAM, binding might fail.

Fixes: 03f0f01904 ("nvk: Add support for sparse buffers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
(cherry picked from commit 58181b7bbc)
2024-07-10 09:33:16 +02:00
Tatsuyuki Ishi
2077d14ba2 vk_cmd_queue_gen: Exclude CmdDispatchGraphAMDX
With the weak symbols changes and -Dvulkan-beta this fails to link.

Co-authored-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Fixes: 2953c93cca ("vulkan Add enqueue entrypoint for CmdDispatchGraphAMDX")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30057>
(cherry picked from commit 24aab6bfaf)
2024-07-10 09:33:14 +02:00
Patrick Lerda
0dadf0b12e st/pbo_compute: fix async->nir memory leak
This is an issue happening on radeonsi after the commit
6f8e6fb99c "mesa/st: use compute pbo download for readpixels".
This commit enables a new code path which has this memory leak.

For instance, this issue is triggered on radeonsi with
"piglit/bin/glsl-fs-raytrace-bug27060 -auto -fbo":
Too many leaks! Only the first 5000 leaks encountered will be reported.
Indirect leak of 327424 byte(s) in 5582 object(s) allocated from:
    #0 0x7fe27fa4d7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7fe2717fd4df in ralloc_size ../src/util/ralloc.c:118
    #2 0x7fe272dbbae4 in calc_dom_children ../src/compiler/nir/nir_dominance.c:138
    #3 0x7fe272dbbae4 in nir_calc_dominance_impl ../src/compiler/nir/nir_dominance.c:192
    #4 0x7fe272b7f4a2 in nir_metadata_require ../src/compiler/nir/nir_metadata.c:40
    #5 0x7fe272ba0d50 in nir_opt_cse_impl ../src/compiler/nir/nir_opt_cse.c:43
    #6 0x7fe272ba0d50 in nir_opt_cse ../src/compiler/nir/nir_opt_cse.c:67
    #7 0x7fe272686f83 in gl_nir_opts ../src/compiler/glsl/gl_nir_linker.c:92
    #8 0x7fe271a31e69 in create_conversion_shader ../src/mesa/state_tracker/st_pbo_compute.c:701
    #9 0x7fe271a353fa in create_conversion_shader_async ../src/mesa/state_tracker/st_pbo_compute.c:810
    #10 0x7fe271806ea8 in util_queue_thread_func ../src/util/u_queue.c:309
    #11 0x7fe27186379a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #12 0x7fe27ea9a7c3  (/lib64/libc.so.6+0x867c3)
...
SUMMARY: AddressSanitizer: 1384704 byte(s) leaked in 17291 allocation(s).

Fixes: 5dab7673e1 ("mesa/st: add specialized pbo download shaders")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30068>
(cherry picked from commit f3c9ea9b8d)
2024-07-10 09:32:35 +02:00
Erico Nunes
d147d06218 lima: fix surface reload flags assignment
These flags are set at the end of the job based on its buffer usage and
then checked by following jobs.
If an application toggles stencil and depth tests alternatigly in
a sequence of jobs while also relying on previous contents to render,
with the current assignment the reload flags for depth or stencil may
be cleared incorrectly and a depth/stencil buffer may not be properly
reloaded.

Cc: mesa-stable
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30065>
(cherry picked from commit aa4d0836fe)
2024-07-10 09:32:33 +02:00
Eric Engestrom
2754f7519f .pick_status.json: Update to ae3e0ae26a 2024-07-10 09:32:25 +02:00
Sviatoslav Peleshko
cd11538349 mesa: Fix PopAttrib not restoring states that changed on deeper stack level
Currently on each pop we reset the PopAttribState to the value from the
last push. But if we assume a sequence "push(X), push(Y), changeX(),
pop(), pop()": the first pop will remove X from PopAttribState, so the
second pop will not even try to restore X, leaving a wrong value forever.
Fix this by "bubbling up" the changed states that were not restored by pop.

Fixes: 68030bbf ("mesa: only pop states in glPopAttrib that have been changed since glPushAttrib")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11417
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30038>
(cherry picked from commit b0b1907fa5)
2024-07-07 11:12:38 +02:00
Faith Ekstrand
b3507e5290 nvk: Silently fail to enumerate if not on nouveau
The NVIDIA proprietary driver exposes a DRM device these days and this
can trip up NVK as it advertises an NVIDIA device id.  We fail to
enumerate but the check for nouveau happens too late and we throw a
warning.  This means tha if NVK is even installed side-by-side with the
proprietary driver, we spam warnings on every device enumeration.  It's
better to fail silently.

Fixes: 83786bf1c9 ("nvk: add vulkan skeleton")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11441
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30035>
(cherry picked from commit 73ec9f0183)
2024-07-07 11:12:37 +02:00
Konstantin Seurer
42e3099db9 radv: Fix smooth lines with dynamic polygon mode and topology
Non-line modes need to disable the smoothing paths. (overrasterization,
shader code)

Fixes: 85cbdba ("radv: add support for smooth lines")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9393
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26833>
(cherry picked from commit d571e19966)
2024-07-07 11:10:03 +02:00
Karol Herbst
ea640f35a9 rusticl/program: update binary format
This adds a magic number and the device name to the binary in order to
verify we indeed have a binary we can parse and matches the device.

Also save the binary header explicitly in little-endian order, so that we
at least make sure that's always the same.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29946>
(cherry picked from commit f08f770f16)
2024-07-07 11:02:01 +02:00
Karol Herbst
42ba26edd4 rusticl/program: use blob.h to parse binaries
It checks for alignment and overruns, and is a lot safer than whatever was
done before here.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29946>
(cherry picked from commit eda15ddafa)
2024-07-07 11:02:00 +02:00
Karol Herbst
a97051d21c rusticl/program: make binary API not crash on errors
Also properly return per device errors as required by the spec.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29946>
(cherry picked from commit 81bb379c94)
2024-07-07 11:01:59 +02:00
Karol Herbst
1eb34c4d47 rusticl/program: move binary parsing into its own function
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29946>
(cherry picked from commit 34ecf560df)
2024-07-07 11:01:58 +02:00
MastaG
839267d582 gallivm: Call StringMapIterator from llvm:: scope
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11392
Fixes: b035d9cab5 ("gallivm: use getHostCPUFeatures on x86/llvm-4.0+.")
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30009>
(cherry picked from commit d17338d403)
2024-07-07 11:01:57 +02:00
Connor Abbott
a03fe1cacf tu: Fix fdm_apply_load_coords patchpoint size
Fixes: 7429ca3115 ("tu: Use SS6_INDIRECT consts upload path for 3d blits")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29938>
(cherry picked from commit b0599a7fe2)
2024-07-07 11:01:55 +02:00
Connor Abbott
e6fde6ba2d tu: Make cs writeable for GMEM loads when FDM is enabled
This was accidentally dropped.

Fixes: 21334e3b53 ("turnip: Move gmem clears and loads to the first subpass that uses them.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29938>
(cherry picked from commit bd179e6213)
2024-07-07 11:01:54 +02:00
Mike Blumenkrantz
1387060c6a st/pbo_compute: special case stencil extraction from Z24S8
this otherwise tries to use the depth component and a UNORM format,
which returns all zeroes

cc: mesa-stable

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29841>
(cherry picked from commit ef0a156670)
2024-07-07 11:01:52 +02:00
Mike Blumenkrantz
a58b50b5df st/pbo: fix MESA_COMPUTE_PBO=spec crash on shutdown
the nir here has already been freed by the driver

Fixes: b8c82b50f7 ("mesa/st: add MESA_COMPUTE_PBO env var")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29998>
(cherry picked from commit 753d253df7)
2024-07-07 11:01:51 +02:00
Eric Engestrom
ddf1e19462 .pick_status.json: Update to d9e41e8a8c 2024-07-07 11:01:40 +02:00
Eric Engestrom
f88ac75a45 [24.1 only] ci: disable rustfmt 2024-07-03 17:53:35 +02:00
Eric Engestrom
8361a3dfb9 docs: add sha256sum for 24.1.3 2024-07-03 17:17:45 +02:00
Eric Engestrom
0c49f54c76 VERSION: bump for 24.1.3 2024-07-03 16:51:12 +02:00
Eric Engestrom
1ad0543d57 docs: add release notes for 24.1.3 2024-07-03 16:50:58 +02:00
Eric Engestrom
9671623cc7 .pick_status.json: Mark 5ca85d75c0 as denominated 2024-07-02 18:01:49 +02:00
Dylan Baker
7ea0c538e3 anv/grl: add some validation that we're not going to overflow
Coverity has spotted a place where we could in theory overflow. In
reality it wont happen as the potential overflow is a bitfield with a
maximum of two values. Add an `assume()` statement to help out the
compiler and document our assumption.

fixes: dc1aedef2b

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29825>
(cherry picked from commit dc604f340a)
2024-07-02 18:01:49 +02:00
Michel Dänzer
0f423474b8 dri: Go back to hard-coded list of RGBA formats
Catching these programmatically without false positives / negatives is
surprisingly tricky, go back to the known-working list for now.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11398
Fixes: ad0edea53a ("st/dri: Check format properties from format helpers")
Fixes: 5ca85d75c0 ("dri: Fix BGR format exclusion")

v2:
* Also put back lima fails removed by 9eeaa4618f ("egl/gbm: Enable
  RGBA configs"), as those tests are now failing again.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29979>
(cherry picked from commit cbd19e09d1)
2024-07-02 18:01:49 +02:00
Eric Engestrom
a57fb7e1ad .pick_status.json: Mark 7033623acd as denominated 2024-07-02 18:01:49 +02:00
Eric Engestrom
2d6c65b8df .pick_status.json: Mark 41698eee96 as denominated 2024-07-02 18:01:49 +02:00
Lionel Landwerlin
1cc9cb3c31 anv: workaround flaky xfb query results on Gfx11
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29836>
(cherry picked from commit 884397b587)
2024-07-02 18:01:49 +02:00
Eric Engestrom
cc5f7708da .pick_status.json: Update to 076cbf605e 2024-07-02 18:01:49 +02:00
Luc Ma
0ee495cd1f meson: Build pipe-loader when build-tests is true
Gallium/tests/trivial requires dynamic pipe loader at runtime, that is,
$prefix/$libdir/gallium-pipe/pipe_*.so must get built and installed.
so let's build it if build-tests is enabled.

v2:
- Fix error of meson when both of clover and tests are enabled (dbaker)

Signed-off-by: Luc Ma <luc@sietium.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27180>
(cherry picked from commit 6b5a12611b)
2024-07-02 18:01:49 +02:00
Lionel Landwerlin
0207a145d5 anv: emit the right shader instruction for protected mode
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29778>
(cherry picked from commit b8f8926026)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29985>
2024-07-02 18:01:49 +02:00
Lionel Landwerlin
5b1e09ed90 anv: allocate compute scratch using the right scratch pool
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29778>
(cherry picked from commit 57e74d7b56)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29985>
2024-07-02 18:01:49 +02:00
Lionel Landwerlin
7b216f9cb7 anv: prepare 2 variants of all shader instructions
One variant uses a protected scratch surface the other not.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29778>
(cherry picked from commit 3ccf80f9b1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29985>
2024-07-02 18:01:49 +02:00
Lionel Landwerlin
51386907f1 anv: add a protected scratch pool
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29778>
(cherry picked from commit 08a4e0a2e3)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29985>
2024-07-02 18:01:49 +02:00
Eric Engestrom
276355a030 .pick_status.json: Update to 6b5a12611b 2024-07-02 18:01:49 +02:00
Alyssa Rosenzweig
298b19e70f nir: fix miscompiles with rules with INT32_MIN
812b3415 added rules for upcasts with comparisons with a variety of
types. The float & unsigned rules should be ok, but the signed integer rules are
unsound as currently implemented. This can cause end-to-end miscompiles.

I originally hit this issue while debugging a large real world OpenCL kernel. I
found the bug symptoms changed when disabling loop unrolling, which tipped me
off to a compiler bug. I've reduced it to a minimal test case. Imagine my
surprise when I find out the NIR my backend ingested was already constant folded
to be wrong.

In the minimal test case, during optimization we have NIR:

        32     %6 = ....
        64     %9 = i2i64 %6
        64    %44 = load_const (0x0000000000000001)
        1     %45 = ilt %9, %44 (0x1)

This is a simple check (int64_t)%6 < 1.

nir_opt_algebraic turns this into:

        32     %6 = ...
        64     %9 = i2i64 %6
        64    %44 = load_const (0x0000000000000001)
        64    %55 = load_const (0x0000000080000000 = 2147483648)
        1     %56 = ilt %55 (0x80000000), %44 (0x1)
        64    %57 = load_const (0x000000007fffffff = 2147483647)
        1     %58 = ilt %57 (0x7fffffff), %44 (0x1)
        32    %59 = i2i32 %44 (0x1)
        1     %60 = ilt %6, %59
        1     %61 = ior %58, %60
        1     %62 = iand %56, %61

This pile of math constant-folds to an unconditional "false"!  The problem is
%56. At first glance, INT32_MIN < 1 is true so %56 should be true. Indeed, it
should. But here's the kicker: both constants are 64-bit here, so the ilt
operation is a 64-bit comparison -- that left-hand side is INT32_MIN
zero-extended to 64-bit for the signed comparison at 64-bit. So in fact, it
evaluates to false, causing the whole expression to go false.  If we're going to
do a 64-bit comparison for %56, then we need to sign-extend the bound.  So we'll
just adjust the Python and be on our way, right?

Unfortunately the issue is deeper. According to the comment in the generated
nir_opt_algebraic.c file, the guilty algebraic rule is:

   ('ilt', ('i2i64', 'a@32'), '#b') =>
   ('iand', ('ilt', -2147483648, 'b'), ('ior', ('ilt', 2147483647, 'b'), ('ilt', 'a', ('i2i32', 'b'))))

From a Python perspective? That rule is correct. -2147483648 < 1 is a true
statement. Adjusting the Python rule is not the appropriate solution here, since
the issue is more fundamental and might affect other rules.  The real problem is
the translation of that Python replacement tree into C, incorrectly
zero-extending -2147483648 into 0x0000000080000000 instead of sign-extending to
0xffffffff80000000.

Crawling down the rabbit hole of the generated algebraic file, we see the
constant encoded as:

   { .constant = {
      { nir_search_value_constant, 64 },
      nir_type_int, { -0x80000000 /* -2147483648 */ },
   } },

NIR correctly translates the negative constant to a C level negate operation of
its absolute value. This maps to the correct sign-extension...

...for all constants except for INT_MIN. Because that constant lacks a ULL
suffix, it is a 32-bit integer. And for this integer (only), negating it hits
signed integer overflow (UB!) and then we end up with an effective
zero-extension when going to 64-bit.

This patch fixes the end-to-end miscompile.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Closes: #11402
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29952>
(cherry picked from commit 270446ee21)
2024-07-02 18:01:49 +02:00
Neha Bhende
3d565a5868 svga: Retrieve stride info from hwtnl->cmd.vdecl for swtnl draws
This fixes spec@!opengl 1.0@gl-1.0-polygon-line-aa
spec@!opengl 1.1@clipflat and multiple piglit tests
failures on VGPU9 device

Fixes: 76725452 ("gallium: move vertex stride to CSO")

Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29947>
(cherry picked from commit 8b8f347e4b)
2024-07-02 18:01:49 +02:00
José Expósito
a405ba5afe llvmpipe: Init eglQueryDmaBufModifiersEXT num_modifiers
Initialize the number of modifiers when `max` is 0 as documented [1]:

  If <max_formats> is 0, no formats are returned, but the total number
  of formats is returned in <num_formats>, and no error is generated.

[1] https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Reported-by: Michal Odehnal <modehnal@redhat.com>
Tested-by: Michal Odehnal <modehnal@redhat.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29941>
(cherry picked from commit 1ef3b38ff8)
2024-07-02 18:01:49 +02:00
Samuel Pitoiset
fdf3106d43 radv: fix incorrect cache flushes before decompressing DCC on compute
Found by luck.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29940>
(cherry picked from commit bc52e77397)

[Eric: add back WRITE_BIT, to set both]
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29940#note_2476173
2024-07-02 17:57:14 +02:00
Patrick Lerda
cb8eb3324d clover: fix meson opencl-spirv option
As reported by https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
this option is broken. Indeed, when "with_clc" is false the compilation
process failed with the following error:
"ERROR: Unknown variable "idep_mesaclc".

Fixes: 815a6647eb ("meson: do not pull in clc for clover")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29646>
(cherry picked from commit 82e9880b04)
2024-07-01 01:37:25 +02:00
Eric Engestrom
4e8e1b6bb6 .pick_status.json: Update to 68215332a8 2024-07-01 01:37:19 +02:00
Iago Toral Quiroga
f58569a7c3 broadcom/compiler: fix per-quad spilling
This is not safe when we have conditional spills since we could be
spilling disabled lanes with undefined values that could overwrite
valid data for those lanes from a previous spill of the same temp
that was unconditional (or that condionally enabled those same
lanes).

Fixes some Piglit OpenCL tests as well as the following OpenCL tests:
integer_divideAssign
integer_moduloAssign
integer_mad_sat
integer_ops integer_divideAssign
integer_ops integer_mad_sat
integer_ops integer_moduloAssign
integer_ops quick_char_math
integer_ops quick_short_math
math_brute_force half_powr
math_brute_force pow
math_brute_force pown
math_brute_force powr
math_brute_force rootn

Fixes: 597560e27c ('broadcom/compiler: always enable per-quad on spill operations')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29909>
(cherry picked from commit d1f8351f3c)
2024-06-27 13:21:12 +02:00
Iago Toral Quiroga
1bf3d6c8e6 broadcom/compiler: don't spill in between multop and umul24
The multop instruction implicitly writes rtop which is not preserved
acrosss thread switches. We can spill the sources of the multop
(since these would happen before multop) and the destination of
umul24 (since that would happen after umul24).

Fixes some OpenCL tests when V3D_DEBUG=opt_compile_time is used to
choose a different compile configuration.

cc: mesa-stable

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29909>
(cherry picked from commit 38b7f411a1)
2024-06-27 13:21:11 +02:00
Eric Engestrom
e1ff3ff373 .pick_status.json: Update to 037eaa962b 2024-06-27 13:21:08 +02:00
Samuel Pitoiset
bd826b5c5d radv/amdgpu: fix chaining CS with external IBs on compute queue
In a scenario where two non-concurrent cmdbufs are submitted to the
compute queue and with the second one using DGCC, the driver would have
chained the CS of the first cmdbuf to the new IB created right after
the DGC IB is executed.

Found while working on DGC task shader with vkd3d-proton.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29913>
(cherry picked from commit fec9b56f17)
2024-06-27 13:20:48 +02:00
Karol Herbst
bc75532540 nir/schedule: add write dep also for shared_atomic
Otherwise it might change the order between a load_shared and a
shared_atomic on the same location.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29918>
(cherry picked from commit 3482ea599b)
2024-06-26 22:08:55 +02:00
Connor Abbott
7da5835003 ir3: Make sure constlen includes stc/ldc.k/ldg.k instructions
nir_opt_preamble sometimes adds useless expressions, in which case we
may have stc instructions and no corresponding use of the constant.
Things can go sideways when these aren't included in the constlen, so
far only observed when earlypreamble is enabled.

Fixes: ccc64b7e00 ("ir3: Plumb through store_uniform_ir3 intrinsic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29903>
(cherry picked from commit c42f6597f9)
2024-06-26 22:08:46 +02:00
Pierre-Eric Pelloux-Prayer
a7e26d7c84 ac/surface: reject modifiers with retile_dcc and bpe != 32
radv has a comment in radv_meta_dcc_retile.c:
   * BPE is always 4 at the moment and the rest is derived from the tilemode.
radeonsi has in si_retile_dcc:
   /* We have only 1 variant per bpp for now, so expect 32 bpp. */
   assert(tex->surface.bpe == 4);

This fixes ext_image_dma_buf_import-modifiers for radeonsi.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29612>
(cherry picked from commit abd048124a)
2024-06-26 22:08:45 +02:00
Erik Faye-Lund
a142c1cfc0 docs: fix bootstrap-extension
We shouldn't use this extension at all if we're not using the HTML
builder. This should hopefully fix this issue a bit more fundamentally.

This caused issues when using the spelling extension, something I do
locally from time to time.

Fixes: f72033bb70 ("docs: add bootstrap extension")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29888>
(cherry picked from commit f4e7204e73)
2024-06-26 22:08:44 +02:00
Eric Engestrom
85393322a2 .pick_status.json: Update to dd85b50d18 2024-06-26 22:08:41 +02:00
Daniel Schürmann
bf8ad2d8b9 aco/spill: Unconditionally add 2 SGPRs to live-in demand
Due to undefined Operands, it might not be enough to check the
predecessors' register demand.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29804>
(cherry picked from commit 4c2f231cc0)
2024-06-26 22:06:36 +02:00
Rhys Perry
63f161ff96 aco: skip continue_or_break LCSSA phis when not needed
Fixes:
//exec is empty here
loop {
   %1:s[16-17] = ...
   if () {
      break
   }
   %2:s[16-17] = ...
   continue_or_break
}
%3 = phi %1, undef
//because of the undef, %2 can use s[16-17] and overwrite the address
load(%3:s[16-17])

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: bbe4652430 ("aco: create lcssa phis for continue_or_break loops when necessary")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11333
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29838>
(cherry picked from commit e3ffc244f5)
2024-06-26 22:06:36 +02:00
Qiang Yu
7c9f396544 nir: fix clip cull distance lowering metadata preserve
indirect store lowering will use if/else which changes
the control flow of the shader.

Fixes: 110887de2b ("nir: Add a new pass to lower array dereferences on vectors")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29894>
(cherry picked from commit 93f790b04a)
2024-06-26 22:06:36 +02:00
Qiang Yu
11d6ddf559 nir: fix lower array to vec metadata preserve
indirect store lowering will change control flow,
so we should not preserve control flow metadate
when it's present.

Fixes: 35b8f6f40b ("nir: Add a new pass to lower array dereferences on vectors")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29894>
(cherry picked from commit 09b4ba27a3)
2024-06-26 22:06:36 +02:00
Michel Dänzer
00449b8615 egl/dri: Use packed pipe_format
This is consistent with __DRI_IMAGE_FORMAT_ARGB8888 and the rest of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709 .

This makes no difference with little endian, it does with big endian
though.

Fixes: dcbf61f5df ("egl/dri: Use pipe_format instead of DRI_IMAGE_FORMAT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29781>
(cherry picked from commit 2dec0cbe01)
2024-06-26 12:48:49 +02:00
Erik Faye-Lund
827b60286c docs: use os.pardir
I'm not really sure if this ever matters in real-life, but os.pardir
exists and we should probably use it instead of hard-coding it to '..'.

Fixes: 67485efd65 ("docs: prepare for hawkmoth")
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11494>
(cherry picked from commit 09c1f3b9fd)
2024-06-26 12:48:48 +02:00
Karol Herbst
708e358fe5 rusticl/queue: gracefully stop the worker thread
Ohterwise we might get caught up in memory corruptions I still have no
explanation for.

Fixes spontanous crashes with radeonsi and the OpenCL CTS.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29880>
(cherry picked from commit 9d458b7fc1)
2024-06-26 12:48:46 +02:00
Paulo Zanoni
10fd6a556a anv/sparse: fix TR-TT page table bo size and flags
Since commit 18d8c3ca33 we were allocating a little more than what
we were actually using (2621440 bytes instead of 2097152, aka 0x280000
instead of 0x200000), and we were not properly marking the BO as
internal. No applications should be misbehaving because of this.

Fixes: 18d8c3ca33 ("anv: Add missing ANV_BO_ALLOC_INTERNAL")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
(cherry picked from commit 2f65acfbb8)
2024-06-26 12:48:45 +02:00
Tapani Pälli
ba17678ea7 isl: fix condition for enabling sampler route to lsc
This will disable cases with 2D array views (which could be views to 3D
texture) but enables on regular 2D surfaces which seems to work fine.

Fixes: 70382f7f06 ("intel/isl/xe2: Enable route of Sampler LD message to LSC")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29760>
(cherry picked from commit 4a0a716b6a)
2024-06-26 12:48:43 +02:00
Bas Nieuwenhuizen
46ae863f9e util/disk_cache: Fix cache marker refresh.
Refresh if older than a day, not less than a day old.

Fixes: 3f119a1fd8 ("util/disk_cache: Add marker on cache usage")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29728>
(cherry picked from commit 9b775d26c4)
2024-06-26 12:48:42 +02:00
Karol Herbst
10d38dd727 rusticl: add bsymbolic to linker flags
This will prevent the dynamic loader to pick the wrong function once we
rename things to the proper API names.

In any case, this should have been done all along anyway.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29855>
(cherry picked from commit be090abf2e)
2024-06-26 12:48:41 +02:00
Rhys Perry
8a6c8086ea vtn: ensure TCS control barriers have a large enough memory scope
A workgroup or larger scope is necessary for writes to be visible to other
invocations.

Fixes incorrect snow rendering in Indika.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11299
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29735>
(cherry picked from commit 21f8410191)
2024-06-26 12:48:40 +02:00
Julian Orth
dc0192e713 egl/wayland: ignore unsupported driver configs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29904>
(cherry picked from commit 77759f7683)
2024-06-26 12:37:04 +02:00
Eric Engestrom
40a435a13a .pick_status.json: Update to c4a38c6583 2024-06-26 12:36:55 +02:00
Karol Herbst
865c926a36 rusticl: add new CL_INVALID_BUFFER_SIZE condition for clCreateBuffer
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29776>
(cherry picked from commit 1ff86021a7)
2024-06-21 17:55:35 +02:00
Karol Herbst
a063c0503e rusticl/memory: fix clFillImage for buffer images
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29776>
(cherry picked from commit 4df8567394)
2024-06-21 17:55:33 +02:00
Karol Herbst
6489f1c1c4 rusticl/memory: assume minimum image_height of 1
But still report 0 for the slice_pitch when queried.

Fixes clCopyImage 1Dbuffer

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29776>
(cherry picked from commit 45fc5c032e)
2024-06-21 17:55:32 +02:00
Karol Herbst
ce2f8fa7b2 util/u_printf: properly handle %%
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29776>
(cherry picked from commit d51a14aab8)
2024-06-21 17:53:58 +02:00
Paulo Zanoni
6e61244d0f anv/xe: fix declaration of memory flags for integrated non-LLC platforms
Makes Cyberpunk, Hitman and Total War Warhammer 3 run on LNL.

Fixes: c9e41f25a1 ("anv: Add heaps for Xe KMD in platforms without LLC")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29775>
(cherry picked from commit 87787c4a87)
2024-06-21 17:53:57 +02:00
José Roberto de Souza
9dcd13d541 anv: Fix assert in xe_gem_create()
In this assert we want to enforce that if a cached buffer is created
it is a cached+coherent as Xe KMD don't support cached+incoherent.

Did not caught this issue because it only reproduces in platforms with
GPU outside of LLC.

Fixes: 9d8d5cf8c9 ("anv: Remove block promoting non CPU mapped bos to coherent")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29826>
(cherry picked from commit 73ce3143a8)
2024-06-21 17:53:56 +02:00
Dylan Baker
7cdf6f9d62 clc: remove check for null pointer that cannot be true in llvm_mod_to_spirv
Snce the *args parameter was added it's assumed to be non-null. If it is
null then the function is going off to UB land. As such, a later check
added for args being NULL is useless, and confuses coverity.

fixes: 3a752256f5

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29664>
(cherry picked from commit e67a8dc59a)
2024-06-21 17:53:55 +02:00
Jesse Natalie
4d5347a52c wgl: Fix flag check for GDI compat
Fixes: c432fbe5 ("wgl: Add no-gdi-single-buffered and gdi-double-buffered PFDs")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29819>
(cherry picked from commit df49d9da10)
2024-06-21 17:53:44 +02:00
Jesse Natalie
2613580caf wgl: Delete pixelformat support query
This whole thing was just a mess and never really worked the way it was
supposed to. All drivers can support GDI interop and double-buffering
independently at this point, so just remove it.

Fixes: c432fbe5 ("wgl: Add no-gdi-single-buffered and gdi-double-buffered PFDs")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29819>
(cherry picked from commit a02b759f41)
2024-06-21 17:53:43 +02:00
Lionel Landwerlin
32e0363cd6 anv: fix vkCmdWaitEvents2 handling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29716>
(cherry picked from commit 00982e1af6)
2024-06-21 17:50:15 +02:00
Erik Faye-Lund
aa87b78866 Revert "docs: use html_static_path for static files"
No, html_static_path doesn't do the same thing as html_extra_path; it
puts things inside the _static folder, which we don't want here. Let's
revert the change.

This reverts commit e037761a2f.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29805>
(cherry picked from commit 47e422adfa)
2024-06-21 17:50:14 +02:00
Mike Blumenkrantz
180ca5812d zink: null check pipe loader config before use
Fixes: e3ea55fef2 ("zink: don't print error messages when failing an implicit driver load")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11220
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29806>
(cherry picked from commit 453ceceec2)
2024-06-21 17:50:06 +02:00
Mike Blumenkrantz
f2b2e3893d dri: rename 'implicit' param from earlier series
I accidentally merged the wrong version of this, and this was supposed
to be the correct and more informative name

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29066>
(cherry picked from commit 2efa1ae0d5)
2024-06-21 17:50:04 +02:00
Erik Faye-Lund
c2a8d04b58 nir: fix utf-8 encoding-issue
This UTF-8 encoding issue seems to cause issues with the doxygen
docs-integration.

Fixes: 2111551485 ("Convert a few files to UTF-8")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29801>
(cherry picked from commit a1c220fd93)
2024-06-21 17:47:20 +02:00
Pierre-Eric Pelloux-Prayer
53d1306fe5 ac/llvm: implement WA in nir to llvm
LLVM implements multiple workarounds for gfx11.
The problem is that they're not applied for shaders built in
parts.

LLVM will be modified to be more conservative and apply the
workaround in more places but in the meantime, add a simpler
implementation in the NIR to LLVM backend: insert a wait at
the end of each shader part.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10785
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29304>
(cherry picked from commit 14974fd097)
2024-06-21 17:46:02 +02:00
Rhys Perry
bf86fa1b7d aco/insert_exec_mask: ensure top mask is not a temporary at loop exits
This is problematic when the successor of the loop exit is an invert
block. It assumes that the top mask is Operand(bld.lm) and doesn't change
it when entering the else branch.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11348
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29767>
(cherry picked from commit 71afacff39)
2024-06-21 17:45:17 +02:00
Konstantin Seurer
de8982ba71 lavapipe: Always call finish_fence after lvp_execute_cmd_buffer
Makes sure that sample_functions is not modified while shaders are
running.

Fixes: 7ebf7f4 ("llvmpipe: Compile sample functioins on demand")
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29699>
(cherry picked from commit ce85f3a431)
2024-06-21 17:45:17 +02:00
Konstantin Seurer
790aa9a2a5 llvmpipe: Only evict cache entries if a fence is available
Makes sure that no chaders are running when accessing sample_functions.

Fixes: 7ebf7f4 ("llvmpipe: Compile sample functioins on demand")
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29699>
(cherry picked from commit 255f4bb290)
2024-06-21 17:45:16 +02:00
Konstantin Seurer
320f0197d1 llvmpipe: Stop using a sample_functions pointer as cache key
sample_functions can be reallocated between get_sample_function and llvmpipe_clear_sample_functions_cache.

Fixes: 7ebf7f4 ("llvmpipe: Compile sample functioins on demand")
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29699>
(cherry picked from commit 5941bee017)
2024-06-21 17:45:15 +02:00
Konstantin Seurer
cba9b1d0a3 llvmpipe: Lock shader access to sample_functions
sample_functions can be re-allocated.

Fixes: 7ebf7f4 ("llvmpipe: Compile sample functioins on demand")
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29699>
(cherry picked from commit 9e4a44d172)
2024-06-21 17:45:15 +02:00
Mary Guillemard
edb1d3ea03 panvk: Report correct min value for discreteQueuePriorities
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: ac34183ec3 ("panvk: Move the VkPhysicalDevice logic to panvk_physical_device.{c,h}")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29800>
(cherry picked from commit 3129d71fef)
2024-06-21 17:45:14 +02:00
José Roberto de Souza
20cbc1ee3f anv: Remove block promoting non CPU mapped bos to coherent
The intention of this block was to set one of the flags that is used
to select a PAT index but this was doing more than that.
It was promoting WB+0 way coherency BOs to WC+1 way coherency possibly
causing regression in platforms without LLC.

anv_device_get_pat_entry() return WC/writecombining if no flags is
set so we don't need this block after all.

Reported-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Fixes: a65e982b44 ("anv: Split ANV_BO_ALLOC_HOST_CACHED_COHERENT into two actual flags")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29769>
(cherry picked from commit 9d8d5cf8c9)
2024-06-21 17:45:13 +02:00
Eric Engestrom
fda0731cf3 .pick_status.json: Update to 1ff86021a7 2024-06-21 17:11:49 +02:00
Faith Ekstrand
2afbeefc47 nir/format_convert: Smash NaN to 0 in pack_r9g9b9e5()
I have no idea why I flipped the order of these to checks vs. the C
code when I wrote the NIR helper.  We need to deal with NaN first or
else the fmin will smash NaN to MAX_RGB9E5 and it won't get handled as
NaN.

Fixes: 9981709d8f ("nir/format_convert: Add a function to pack RGB9_E5 formats")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28793>
(cherry picked from commit 86aad90e2a)

[Eric]
swap `color` and `clamped`, see https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28793#note_2459681
2024-06-19 20:05:45 +02:00
Eric Engestrom
78a1fdbb97 ci: fix section_end in debian-build-testing
Fixes: d428cc1116 ("ci/debian-build-testing: drop extra nesting section")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29170>
(cherry picked from commit 34844deb3e)
2024-06-19 20:05:45 +02:00
Eric Engestrom
d7d1146b61 ci/debian-build-testing: drop extra nesting section
`.gitlab-ci/meson/build.sh` already prints sections, having an extra one
here just means that nothing is visible by default.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29113>
(cherry picked from commit d428cc1116)
2024-06-19 18:57:11 +02:00
Eric Engestrom
83e7175481 ci/shader-db: drop extra nesting section
`.gitlab-ci/run-shader-db.sh` already prints sections, having an extra one
here just means that nothing is visible by default.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29113>
(cherry picked from commit dc7e80ce85)
2024-06-19 18:57:11 +02:00
Eric Engestrom
3b5adf60eb docs: add sha256sum for 24.1.2 2024-06-19 18:28:40 +02:00
Eric Engestrom
414057c05c VERSION: bump for 24.1.2 2024-06-19 18:12:20 +02:00
Eric Engestrom
71225c85c1 docs: add release notes for 24.1.2 2024-06-19 18:11:13 +02:00
Mary Guillemard
87620550cc panvk: Check for maxBufferSize in panvk_CreateBuffer
This fix failure on "dEQP-VK.api.buffer.basic.size_max_uint64".

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 822478ec20 ("panvk: Move the VkBuffer logic to its own source file")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29783>
(cherry picked from commit c0f8465fa8)
2024-06-19 14:25:14 +02:00
Mary Guillemard
07b1eddc74 panvk: Add missing null check in DestroyCommandPool
Fix a crash when a null handle is passed.
(dEQP-VK.api.null_handle.destroy_command_pool)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: afbac1af77 ("panvk: Move the VkCommandPool logic to panvk_cmd_pool.{c,h}")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29783>
(cherry picked from commit 716e0e1568)
2024-06-19 14:25:14 +02:00
Dave Airlie
31b58ca0eb radv/video: fix layered decode h264/5 tests.
CTS tests both layered and separate DPB, but radv wasn't handling
layered properly when used with the tier 2 dpb handling.

This adjusts the addresses to use the layer index for tier2.

Fixes dEQP-VK.video.decode.*layered*

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29758>
(cherry picked from commit b888946f7a)
2024-06-19 14:25:14 +02:00
Rhys Perry
5cd0d392e7 aco: insert s_nop before discard early exit sendmsg(dealloc_vgpr)
Forgot about this one.

fossil-db (gfx1100):
Totals from 3920 (2.94% of 133461) affected shaders:
Instrs: 6632088 -> 6636008 (+0.06%)
CodeSize: 34165376 -> 34181056 (+0.05%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 37fbfa655a ("aco: insert s_nop before VGPR deallocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29770>
(cherry picked from commit 9fe3af1e2a)
2024-06-19 13:49:38 +02:00
Caio Oliveira
0397d8aac7 intel/brw: Fix typo in DPAS emission code
The enums were mixed up.  Code was working because they were being
used only for their numerical values.

Fixes: e666872c75 ("intel/compiler: Initial bits for DPAS instruction")
Acked-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29762>
(cherry picked from commit f982d2bb79)
2024-06-19 13:49:37 +02:00
Eric Engestrom
9dd7e3fe49 .pick_status.json: Update to 887f0e0af6 2024-06-19 13:49:34 +02:00
Timur Kristóf
f993cd33b8 ac/nir/tess: Fix per-patch output LDS mapping.
VARYING_SLOT_PATCH0 is greater than 64 so it is wrong to use it
with BITFIELD64_BIT. Check for VARYING_SLOT_TESS_LEVEL_* properly
when mapping output locations in LDS.

Fixes: c61eb54806
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29696>
(cherry picked from commit 0f0ebd8512)
2024-06-18 19:23:35 +02:00
Zan Dobersek
744049ca83 tu: fix ZPASS_DONE interference between occlusion queries and autotuner
On newer devices where ZPASS_DONE events have sample count writing
abilities the firmware expects these events to come in begin-end pairs,
essentially corresponding to a typical occlusion query usage. Since this
event is also used in the autotuner we have to avoid event pairs to be
emitted in an interleaved fashion.

Additional renderpass state now tracks whether a given renderpass contains
an occlusion query. If so, autotuner will emit miscellaneous ZPASS_DONE
events in order to form its own begin-end pairs before and after the
renderpass commands.

Occlusion query behavior inside a renderpass doesn't change. But when used
outside of a renderpass, possible autotuner usage requires to again emit
ZPASS_DONE events that end up forming begin-end pairs of these events both
at the start and the end of the query.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 4e6a1f8852 ("tu/autotune: Use `CP_EVENT_WRITE7::ZPASS_DONE` on A7XX")
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29403>
(cherry picked from commit 5653c52151)
2024-06-18 19:23:35 +02:00
Job Noorman
1a23ca0dfa ir3: only add live-in phis for top-level intervals while spilling
When both an interval and some of its children would be live-in, we used
to add phis for all of them. This could lead to cases where the pressure
after spilling was higher than before.

This happens, for example, when both a split and its parent are live-in.
Before spilling, the split wouldn't add to the pressure because its
parent had already been inserted. After spilling, since we created a phi
for the split, the link with its parent would be lost and it would add
to the pressure.

Fix this by only adding phis for top-level intervals and adding splits
after them.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 6bc7cd6108)
2024-06-18 19:23:35 +02:00
Job Noorman
0c8177d28e ir3: refactor ir3_spill.c to use the ir3_cursor/ir3_builder API
There were a few places that used an instruction pointer to decide where
new instructions should be created. NULL was used to add them at the end
of the block. While fixing a spilling bug, a new option was needed to
add instructions at the beginning of the block. This will be much easier
to implement using cursors.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 18cd803cef)
2024-06-18 19:23:34 +02:00
Job Noorman
6f0d595bb5 ir3: add ir3_cursor/ir3_builder helpers
Whenever instructions need to be created at specific locations, ir3
often passes around an instruction pointer. When set, new instructions
are added before or after it (depending on the context). When NULL, new
instructions are added at the end of the block. This whole scheme is
confusing.

This patch adds ir3_cursor and ir3_builder structs and the associated
helper functions. The API mirrors the one from nir_cursor/nir_builder.

This patch does not refactor existing code to use the new API. This will
happen in future patches.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 1972db36c6)
2024-06-18 19:23:34 +02:00
Job Noorman
4e9a52ffc7 ir3: restore interval_offset after liveness recalculation in shared RA
This value is usually set by ir3_merge_regs. Since we don't need to call
this again after shared RA, we have to copy it manually to the new
liveness struct.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit dc04fd8e62)
2024-06-18 19:23:34 +02:00
Job Noorman
903f291c9d ir3: move liveness recalculation inside ir3_ra_shared
Similar to how ir3_spill does it. This will make it easier to optimize
this in the future. E.g., we only need to recalculate liveness when any
instruction were added.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 3f3c190649)
2024-06-18 19:23:34 +02:00
Job Noorman
23d79f9e1f ir3: index instructions before fixing up merge sets after spilling
ir3_force_merge (through merge_merge_sets) expects instructions to be
indexed. However, the instructions created during spilling would not be
automatically indexed at this point.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 7a5b198a44)
2024-06-18 19:23:33 +02:00
Job Noorman
ec7a8d6444 ir3: make indexing instructions optional in ir3_merge_regs
While fixing up merge sets after spilling, we need to index before
calling ir3_merge_regs so it would be a waste to index again.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 018d0ab805)
2024-06-18 19:23:33 +02:00
Job Noorman
778206e137 ir3: expose instruction indexing helper for merge sets
We will need it to fix up merge sets after spilling.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 17b155fede)
2024-06-18 19:23:33 +02:00
Job Noorman
de328394d3 ir3: don't remove collects early while spilling
It might happen that a collect that cannot be coalesced with one of its
sources while spilling can be coalesced with it afterwards. In this
case, we might be able to remove it in remove_src_early during spilling
but not afterwards (because it may have a child interval). If this
happens, we could end up with a register pressure that is higher after
spilling than before. Prevent this by never removing collects early
while spilling.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 1bc3b819e6)
2024-06-18 19:23:32 +02:00
Job Noorman
893b770825 ir3: don't remove intervals for non-killed tex prefetch sources
Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit eaec57ab6b)
2024-06-18 19:23:32 +02:00
Job Noorman
aa53306c97 ir3: correctly set wrmask for reload.macro
We used to set it MASK(elems) which would break when not all elements
are contiguous (which could happen for tex instructions after dce).

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 70e10babea)
2024-06-18 19:23:32 +02:00
Job Noorman
7de1e8e3e8 ir3: set offset on splits created while spilling
Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 37c929ce5d)
2024-06-18 19:23:31 +02:00
Job Noorman
91236e8eb8 ir3: fix handling of early clobbers in calc_min_limit_pressure
Early clobbers should always add to the register pressure since they
cannot overlap with sources. handle_instr in ir3_spill.c handles this
properly but calc_min_limit_pressure did not.

Fixes: 2ff5826f09 ("ir3/ra: Add IR3_REG_EARLY_CLOBBER")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit af6f82b954)
2024-06-18 19:23:31 +02:00
Job Noorman
777126f943 ir3: fix crash in try_evict_regs with src reg
try_evict_regs might end up calling check_dst_overlap which only works
for dst regs. Make sure this doesn't happen for src regs.

Fixes: 34803d15ab ("ir3/ra: Add proper support for multiple destinations")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29497>
(cherry picked from commit 023c7351f2)
2024-06-18 19:23:31 +02:00
Iago Toral Quiroga
14a1d82a00 broadcom/compiler: initialize payload_conflict for all initial nodes
Fixes: cb83f25b39 ('broadcom/compiler: don't assign payload registers to spilling setup temps')
cc: mesa-stable

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29759>
(cherry picked from commit 02f33b7d92)
2024-06-18 19:23:30 +02:00
Mike Blumenkrantz
890101987d mesa/st: fix zombie shader handling for non-current programs
for drivers that don't support PIPE_CAP_SHAREABLE_SHADERS,
the zombie shader mechanism is used, storing shaders to delete after
the next flush

the zombie mechanism also calls bind_*_state(pipe, NULL) during deletion,
however, which breaks drivers in the following scenario:

* create_all_shaders(pipe_A)
* bind_vs(pipe_A, vs_A)
* bind_fs(pipe_A, fs_A)
* draw(pipe_A)
* makeCurrent(pipe_B)
* delete_vs(pipe_B, vs_B)
  * vs_B must only be deleted on pipe_A
  * zombie_shader_add(pipe_A, vs_B)
* makeCurrent(pipe_A)
  * free_zombie_shaders(pipe_A)
    * bind_vs(pipe_A, NULL)
    * delete_vs(pipe_A, vs_B)
* draw(pipe_A)
* boom

the problem being that bind_vs(pipe_A, NULL) was called when deleting
vs_B, but it was actually vs_A which was bound

to solve this, just flag the shader state for updating and let st figure it out

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11122

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29680>
(cherry picked from commit 95828d8901)
2024-06-18 19:23:30 +02:00
Erik Faye-Lund
dc7d0d6a58 panvk: move macro-definition to header
This define is used in panvk_physical_device.c as well, so it needs to
be visible there.

Fixes: ac34183ec3 ("panvk: Move the VkPhysicalDevice logic to panvk_physical_device.{c,h}")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29751>
(cherry picked from commit 9336190868)
2024-06-18 19:23:30 +02:00
Amol Surati
06778bffbd nine: avoid using post-compacted indices with state expecting pre-compacted ones
The commit 973e6f3b implemented compaction of the stream-number space. The
functions `update_vertex_elements(_sw)` began using the post-compacted
stream-numbers/indices when maintaining the `stream_usage_mask` and
when reading from the arrays `vtxstride` and `stream_freq`.

But, the `stream_instancedata_mask`, with which the `stream_usage_mask`
is compared/bitwise-anded, maintains bits for the pre-compacted indices.
Additionally, the information within the arrays is stored using the
pre-compacted indices.

The functions have a disagreement, regarding the type (pre- vs post-
compacted) of indices, with the rest of the relevant source. This change
removes the disagreement by having them use pre-compacted indices when
maintaining the `stream_usage_mask` and when reading from the arrays.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11283
Fixes: 973e6f3b ("gallium: remove start_slot parameter from pipe_context::set_vertex_buffers")
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29704>
(cherry picked from commit 4bf330471b)
2024-06-18 19:23:30 +02:00
Samuel Pitoiset
dd0e80963d radv: always save/restore all shader objects for internal operations
If the application binds graphics shaders and that RADV performs an
internal operation with a compute pipeline, no shader objects would be
restored because binding the internal compute pipeline resets the ESO
state.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29678>
(cherry picked from commit 07eb970d67)
2024-06-18 19:23:29 +02:00
Eric Engestrom
b08d40642b .pick_status.json: Mark a9fff07c2e as denominated 2024-06-18 19:23:29 +02:00
Valentine Burley
2e350cbd48 tu: Remove declaration of unused update_stencil_mask function
The update_stencil_mask function was removed when moving to the common
Vulkan dynamic state handling.

Fixes: 97da0a7734 ("tu: Rewrite to use common Vulkan dynamic state")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29658>
(cherry picked from commit d9af1633a9)
2024-06-18 19:23:29 +02:00
Valentine Burley
b2985b208b tu: Handle the new sync2 flags
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8277
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29658>
(cherry picked from commit 5e9cb32c10)
2024-06-18 19:23:29 +02:00
Faith Ekstrand
5d4b886820 nouveau: Fix a race in nouveau_ws_bo_destroy()
It's possible if nouveau_ws_bo_destroy() races with
nouveau_ws_bo_from_dma_buf() for the BO to be found in the cache and
referenced between dropping the final reference and actually invoking
GEM_CLOSE.  This would result in us having a closed BO somewhere in our
cache.

Fixes: c370260a8f ("nouveau/winsys: Add dma-buf import support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29737>
(cherry picked from commit faaf33556e)
2024-06-18 19:23:28 +02:00
Dave Airlie
7792a2a80b nouveau/nvc0: increase overallocation on shader bo to 2K
I've been seeing a bunch of read page faults at the end of the
shader allocation, nvk uses a full page at the end to overallocate
so align with that and see if it goes away.

ahulliet and skeggsb both said 2k was used.

Cc: mesa-stable
Reviewed-by: Arthur Huillet <ahuillet@nvidia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29722>
(cherry picked from commit f7434d7576)
2024-06-18 19:23:28 +02:00
Lionel Landwerlin
036560d3c4 intel/fs: fix lower_simd_width for MOV_INDIRECT
MOV_INDIRECT picks one lane from the src[0] and moves it to all lanes
in the destination. Even if we split the instruction, src[0] should
remain identical.

Noticed this while trying to use this instruction in SIMD32. All
current use cases are limited to SIMD8 shaders (or SIMD16 on Xe2). Or
maybe in SIMD32 but with a uniform src[0]. That's we think we've never
seen the issue so far.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28036>
(cherry picked from commit 13dc2a28ce)
2024-06-18 19:23:28 +02:00
Mike Blumenkrantz
6a66cf6689 lavapipe: fix mesh+task binding with shader objects
if mesh and task shaders are bound separately, and if they have different
workgroup sizes, the setting of workgroup size will be broken if
set during shader bind

this must be deferred to draw time to pull the correct values

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29733>
(cherry picked from commit 2bb35bf489)
2024-06-18 19:23:28 +02:00
Eric Engestrom
0b2a8bae46 .pick_status.json: Update to 10d21d4100 2024-06-18 19:23:27 +02:00
Marek Olšák
fea04c2127 Revert "radeonsi: fix initialization of occlusion query buffers for disabled RBs"
This reverts commit dab4295cd5.

The commit causes hangs on Navi21 with 3 SEs.

Fixes: dab4295cd5 - radeonsi: fix initialization of occlusion query buffers for disabled RBs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29705>
(cherry picked from commit 4e455c198f)
2024-06-18 19:23:27 +02:00
Eric Engestrom
19ca7cc469 glx: fix build -D glx-direct=false
Fixes: 014bbae4bf ("glx: pass implicit load param through allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29732>
(cherry picked from commit ba55fa3163)
2024-06-18 19:23:27 +02:00
Samuel Pitoiset
2a68f0bb39 radv: fix incorrect buffer_list advance for multi-planar descriptors
If we have an array of multi-planar descriptors, buffer_list was
incorrectly incremented and this could have overwritten some BO entries.

In practice, this situation should be very rare because most of the
applications enable the global BO list.

Cc: mesa-stable
Closes: #10559
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28816>
(cherry picked from commit 730ba8322f)
2024-06-18 19:23:27 +02:00
Qiang Yu
9c16c6283c radeonsi: add missing nir_intrinsic_bindless_image_descriptor_amd
Otherwise we get shader compilation error when imageSize().

Fixes: d4fdeaa820 ("radeonsi: replace llvm resource code with nir lower")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29690>
(cherry picked from commit 4a18809a56)
2024-06-18 19:23:26 +02:00
Qiang Yu
59ebedc1e9 glsl: respect GL_EXT_shader_image_load_formatted when image is embedded in a struct
Fix compilation failure when image is embedded in struct when
GL_EXT_shader_image_load_formatted is enabled:

  struct GpuPointShadow {
      image2D RayTracedShadowMapImage;
  };

  layout(std140, binding = 2) uniform ShadowsUBO {
      GpuPointShadow PointShadows[1];
  } shadowsUBO;

Compile log:
  error: image not qualified with `writeonly' must have a format layout qualifier

Fixes: 082d180a22 ("mesa, glsl: add support for EXT_shader_image_load_formatted")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29693>
(cherry picked from commit b1d0ecd00d)
2024-06-18 19:23:26 +02:00
Faith Ekstrand
d1bc625bd1 nak/legalize: Fold immediate sources before instructions
This way, if we insert a copy to move the immediate to a GPR, the
immediate we place in the copy is also folded.

Fixes: 85462f7455 ("nak: Legalize immediates with source modifiers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29591>
(cherry picked from commit 37b55ee34f)
2024-06-18 19:23:26 +02:00
Faith Ekstrand
8e7ed15153 nak: Only copy-prop neg into iadd2/3 if no carry is written
Fixes: 1b3382b861 ("nak: Add modifier propagation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29591>
(cherry picked from commit a08f8c8804)
2024-06-18 19:23:26 +02:00
Faith Ekstrand
acee7868bd nak: BMov is always variable-latency
The barrier half is HW scoreboarded by the GPR isn't.  When moving from
a GPR to a barrier, we still need a token for WaR hazards.

Fixes: 7cd9680554 ("nak: Add back OpBMov with better semantics")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29591>
(cherry picked from commit 0a089b1b13)
2024-06-18 19:23:25 +02:00
Faith Ekstrand
8cf67a4467 nak: Only convert the written portion of the buffer in NirInstrPrinter
Fixes: 02774be708 ("nak/sm50: add a memstream abstraction")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29591>
(cherry picked from commit 944365802f)
2024-06-18 19:23:25 +02:00
Boris Brezillon
dcee59713f panvk: Fix Cube/2DArray/3D img -> buf copies
Not that I really care about fixing copies now that vk_meta_copy is on
its way, but it fixes OOB accesses causing new crashes after the
panvk_mempool changes.

Fixes: f73ae1a6b5 ("panvk: Implement vkCmdCopyImageToBuffer()")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29670>
(cherry picked from commit c184059005)
2024-06-18 19:23:25 +02:00
Boris Brezillon
447eaf8841 pan/bi: Fix dynamic indexing of push constants
Base offset of the push constant access shouldn't be taken into
account when selecting the push constant words to load. We should
instead assume the first word in the range is the base of the
dynamic indexing, which also simplifies the code.

Fixes: d53e848936 ("pan/bi: Lower load_push_constant with dynamic indexing")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29670>
(cherry picked from commit 368d30befc)
2024-06-18 19:23:25 +02:00
David Rosca
aeacf82e73 radv/video: Add missing VCN 3.0.2 to decoder init switch
Fixes video decode on Steam Deck.

Fixes: d599391ac9 ("radv/video: use vcn ip version in more places.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29688>
(cherry picked from commit b754ad8f15)
2024-06-18 19:23:24 +02:00
Iván Briano
43ce8bec1d vulkan/runtime: pColorAttachmentInputIndices is allowed to be NULL
The Vulkan spec says:
"If pColorAttachmentInputIndices is NULL, it is equivalent to setting
each element to its index within the array."

Fix updated dEQP-VK.dynamic_rendering.primary_cmd_buff.local_read.*.

v2: Fix it correctly (Samuel)

Fixes: 03490ec019 ("vulkan/runtime: rework VK_KHR_dynamic_rendering_local_read state tracking")

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29703>
(cherry picked from commit 51f410f621)
2024-06-18 19:23:24 +02:00
Sviatoslav Peleshko
c22b115caa intel/elk: Actually retype integer sources of sampler message payload
According to PRMs:
"All parameters are of type IEEE_Float, except those in the The ld*,
resinfo, and the offu, offv of the gather4_po[_c] instruction message
types, which are of type signed integer."

Currently, we load parameters with the correct types, but use them as send
sources with the default float type, which may confuse passes downstream.
Fix this by actually storing the retyped sources.

Cc: mesa-stable
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29581>
(cherry picked from commit 5ca51156e2)
2024-06-18 19:23:24 +02:00
Sviatoslav Peleshko
2ac76f13f9 intel/brw: Actually retype integer sources of sampler message payload
According to PRMs:
"All parameters are of type IEEE_Float, except those in the The ld*,
resinfo, and the offu, offv of the gather4_po[_c] instruction message
types, which are of type signed integer."

Currently, we load parameters with the correct types, but use them as send
sources with the default float type, which may confuse passes downstream.
Fix this by actually storing the retyped sources.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11118
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29581>
(cherry picked from commit 2358c997f3)
2024-06-18 19:23:24 +02:00
Daniel Schürmann
8a2842291d aco/assembler: fix MTBUF opcode encoding on GFX11
We have accidentally set the tfe bit for some opcodes.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29692>
(cherry picked from commit 14f4906e53)
2024-06-18 19:23:23 +02:00
Lionel Landwerlin
65ba289754 anv: ensure completion of surface state copies before secondaries
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29671>
(cherry picked from commit 99f92dd6d3)
2024-06-18 19:23:23 +02:00
Lionel Landwerlin
aa35e92e85 anv: limit aux invalidations to primary command buffers
This AUX-TT is only updated on the CPU since ee6e2bc4a3 ("anv: Place
images into the aux-map when safe to do so"). So the only really
important invalidation that needs to happens is on the beginning of a
primary command buffer.

We are required to idle the pipes prior invalidation the AUX-TT. This
might not be happening when the invalidation is put at the beginning
of the secondary command buffers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29671>
(cherry picked from commit 1851629407)
2024-06-18 19:23:23 +02:00
Dave Airlie
f27b87b940 draw/texture: handle mip_offset[0] being != 0 for layered textures.
When llvmpipe adds on a layer it uses mip_offset[0] for it, so it
should still be respected even for multisample.

Fixes KHR-GL45.texture_view.view_sampling

Fixes: 839045bcc8 ("gallivm/lp: merge sample info into normal info")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29685>
(cherry picked from commit fd9f114d5a)
2024-06-18 19:23:22 +02:00
David Heidelberg
741faa6955 rusticl: add -cl-std only when it's not defined
This fixes piglit "Invalid CL Version Declaration" test.

Fixes: fc30fe2c11 ("rusticl/kernel: add missing preprocessor definitions")

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29638>
(cherry picked from commit f467a89523)
2024-06-18 19:23:22 +02:00
Patrick Lerda
62a5050ce7 radeonsi: fix assert triggered on gfx6 after the tessellation update
This change updates the affected calls to the proper function
which is radeon_set_config_reg().

For instance, this issue is triggered with
"piglit/bin/textureSize tes isampler2DMSArray -auto -fbo":
vertex-program-two-side: ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:4981: void si_emit_spi_ge_ring_state(si_context*, unsigned int): Assertion `(0x008988) >= CIK_UCONFIG_REG_OFFSET && (0x008988) < CIK_UCONFIG_REG_END' failed.

Fixes: bd71d62b8f ("radeonsi: program tessellation rings right before draws")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29645>
(cherry picked from commit 301a3bacce)
2024-06-18 19:23:22 +02:00
Rhys Perry
9d647a15c9 aco: remove some missing label resets
In the case of:
   c = xor(a, b)
   d = not(c)
   xor(d, e)
it will be optimized to:
   d = xnor(a, b)
   xor(d, e)
because "d" would still had a label with "instr=not(c)", it would then be
further optimized to:
   d = xnor(a, b)
   xnor(c, e)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11309
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29650>
(cherry picked from commit 7a4f121c5d)
2024-06-18 19:23:22 +02:00
Lucas Fryzek
92a43a3f47 llvmpipe: query winsys support for dmabuf mapping
Fixes #11257 by ensuring winsys mapping functions is only called
if its supported by the winsys, which should prevent llvmpipe from
crashing with kmswast.

If the winsys is kms_swrast then this method will be null, but on
drisw it will be available.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
(cherry picked from commit db38a4913e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29721>
2024-06-18 19:23:21 +02:00
David Rosca
7bda959181 radeonsi: Fix si_compute_clear_render_target with 422 subsampled formats
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11290
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29642>
2024-06-18 19:23:21 +02:00
Georg Lehmann
0b1955e492 radeonsi: set COMPUTE_STATIC_THREAD_MGMT_SE2-3 correctly on gfx10-11
Fixes: 3f1cb470f0 ("radeonsi: Only enable SEs that the device reports")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29674>
2024-06-18 19:23:21 +02:00
Eric Engestrom
c0cc1484f7 .pick_status.json: Update to 7dcba7e873 2024-06-18 19:23:20 +02:00
Samuel Pitoiset
d1f15f3cbd radv: don't assume that TC_ACTION_ENA invalidates L1 cache on gfx9
Ported from RadeonSI 279315fd73 ("radeonsi: don't assume that
TC_ACTION_ENA invalidates L1 cache on gfx9")

Thanks to Rhys for noticing this by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29644>
(cherry picked from commit a80a1c9838)
2024-06-11 12:34:09 +02:00
Friedrich Vock
83889472e6 aco/spill: Don't spill phis with all-undef operands
Fixes some crashes when limiting RT stages to 128 VGPRs.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29593>
(cherry picked from commit ec8512ce85)
2024-06-11 12:34:08 +02:00
Eric Engestrom
c9e5c6f67b .pick_status.json: Mark f017beb29c as denominated 2024-06-11 12:33:32 +02:00
Eric Engestrom
8840fac91d egl: fix teardown when using xcb
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29459>
(cherry picked from commit 54dd83e736)
2024-06-11 12:30:12 +02:00
Erik Faye-Lund
fcd9f66631 mesa/main: do not allow RGBA_INTEGER et al in gles3
GLES3 doesn't allow all the format/type combinations that
ARB_texture_rgb10_a2ui does, so let's tighten the error-checking here a
bit.

Fixes: b5a370dc25 ("mesa/main: do not allow ARB_texture_rgb10_a2ui enums before gles3")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
(cherry picked from commit 227c6627cb)
2024-06-11 12:29:58 +02:00
Erik Faye-Lund
f217429f30 mesa/main: remove stale prototype
This function was removed a long time ago.

Fixes: 8e581747d2 ("mesa/formats: make format testing a gtest")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
(cherry picked from commit c0285f29ff)
2024-06-11 12:25:38 +02:00
Karol Herbst
34a7a9f99f rusticl/memory: copies might overlap for host ptrs
We can't really gurantee there is no overlap, because applications might
pass in arbitrary host pointers.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29604>
(cherry picked from commit 5d013da038)
2024-06-11 12:25:36 +02:00
Karol Herbst
cc10f7ae64 rusticl/spirv: do not pass a NULL pointer to slice::from_raw_parts
Fixes: e8de580998 ("rusticl/kernel: basic implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29604>
(cherry picked from commit e522c91d5c)
2024-06-11 12:25:33 +02:00
Eric Engestrom
d831d3f386 .pick_status.json: Update to a80a1c9838 2024-06-11 12:25:10 +02:00
Eric Engestrom
8104791bb7 v3d/drm-shim: emulate a rpi4 instead of a rpi3
7278 is the chip on the rpi3, while the rpi4 that made it to market has
the 2711 chip.

When this was introduced (82bf1979), the rpi4 was probably still in
flux, which is why the rpi3 chip was put there (and v3d doesn't care
about that, but v3dv does).

cc: mesa-stable

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29584>
(cherry picked from commit 46247b3827)
2024-06-08 02:07:34 +02:00
Rhys Perry
c957210159 aco/gfx6: set glc for buffer_store_byte/short
For the same reason we set it for image stores. GFX6 has a caching bug
which requires this.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29243>
(cherry picked from commit 185fa04baa)
2024-06-08 02:07:33 +02:00
Samuel Pitoiset
8fe207e751 radv: fix creating unlinked shaders with ESO when nextStage is 0
When nextStage is 0, the driver needs to assume that a stage might be
used with any valid next stages.

Fixes new dEQP-VK.shader_object.binding.*_no_next_stage.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29567>
(cherry picked from commit d4ccae739b)
2024-06-08 02:06:51 +02:00
Eric Engestrom
6faf208ce8 .pick_status.json: Update to 41dd1c52b1 2024-06-08 02:06:48 +02:00
Sviatoslav Peleshko
4d71c125be anv,driconf: Add fake non device local memory WA for Total War: Warhammer 3
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8721
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29127>
(cherry picked from commit 94989b45a5)
2024-06-07 13:53:51 +02:00
Friedrich Vock
3e9b217347 radv/rt: Fix memory leak when compiling libraries
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29579>
(cherry picked from commit f1742d36f3)
2024-06-07 13:53:50 +02:00
Rhys Perry
4a5f2a1c15 aco: don't combine vgpr into writelane src0
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29466>
(cherry picked from commit 0dee5fdd3c)
2024-06-07 13:53:46 +02:00
Eric Engestrom
23a197a534 radv/ci: fix manual rules
It was set to "always run" for amd common files changes when I obviously
meant for it to be manual and messed up my copy/paste when I wrote that.

Fixes: ebaede788e ("amd/ci: limit radv jobs to radv + aco files changes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29550>
(cherry picked from commit 47bd1cff4b)
2024-06-07 13:53:44 +02:00
Eric Engestrom
7f29100852 .pick_status.json: Update to cc82f7f8ac 2024-06-07 13:53:41 +02:00
Lionel Landwerlin
b85c103765 anv: fix pipeline flag fields
Using the wrong type truncate the top bits of the pipeline flags.
Currently we don't have any bit in the top bits so not fixing any bug,
but in the future new extension could add some.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 688bb37552 ("anv: deal with new pipeline flags")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29553>
(cherry picked from commit 816b21cd87)
2024-06-06 09:40:16 +02:00
Eric Engestrom
1ed2e4648b v3dv: add missing bounds check in VK_EXT_4444_formats
Fixes: fbe4d7ccf4 ("v3dv: implement VK_EXT_4444_formats")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29481>
(cherry picked from commit 8f483caffb)
2024-06-06 09:40:15 +02:00
Konstantin Seurer
c2e6ad0736 ac/llvm: Enable helper invocations for vote_all/any
cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25293>
(cherry picked from commit b100d3f731)
2024-06-06 09:40:11 +02:00
Konstantin Seurer
e73e2f26f7 ac/llvm: Fix DENORM_FLUSH_TO_ZERO with exact instructions
cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25293>
(cherry picked from commit 2b38d4922e)
2024-06-06 09:40:10 +02:00
Dave Airlie
9060121050 nvk: Only enable WSI modifiers if the extension is supported.
The extension relies on the kernel being new, so don't tell
wsi about it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11270
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11166
Fixes: e6f77defec ("nvk/wsi: Advertise modifier support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29563>
(cherry picked from commit 726838620e)
2024-06-06 09:39:49 +02:00
Danylo Piliaiev
af0a1b2e23 freedreno: Make fd_pps_driver.h usable without including other FD sources
fd_pps_driver.h is included in src/tool/pps/pps_driver.cc which isn't
built with freedreno sources but linked with freedreno pps.

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11183

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29325>
(cherry picked from commit 745b0fc79f)
2024-06-06 09:39:28 +02:00
Eric Engestrom
3f01e9982d .pick_status.json: Update to 50e5067be7 2024-06-06 09:39:25 +02:00
Eric Engestrom
54ea73c9d1 docs: add sha256sum for 24.1.1 2024-06-05 21:13:20 +02:00
Eric Engestrom
6c377358a5 VERSION: bump for 24.1.1 2024-06-05 21:01:42 +02:00
Eric Engestrom
8a3dadb08a docs: add release notes for 24.1.1 2024-06-05 21:01:33 +02:00
Samuel Pitoiset
6eb9c86d23 radv: fix VRS subpass attachments with mipmaps
On GFX10.3, the driver should use the VRS image view provided by the
rendering state because it sets the base level correctly. On GFX11+,
using the image view dimension is enough.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29531>
(cherry picked from commit 964f2b8140)
2024-06-05 16:05:07 +02:00
Faith Ekstrand
3b86c96d22 spirv: Handle constant cooperative matrices in OpCompositeExtract
Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29509>
(cherry picked from commit 8fa46b31a8)
2024-06-05 16:05:06 +02:00
Faith Ekstrand
87d89f480b nir: Handle cmat types in lower_variable_initializers
Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29509>
(cherry picked from commit 7e6cd395c7)
2024-06-05 16:05:05 +02:00
Lionel Landwerlin
55a105966d anv: fix Gfx9 fast clears on srgb formats
Only MCS surfaces are affected because SRGB format are not listed as
supporting CCS compression.

Fixes CTS test :
  dEQP-VK.api.image_clearing.core.clear_color_attachment.single_layer.*_srgb_*sample_count_*
  dEQP-VK.api.image_clearing.dedicated_allocation.clear_color_attachment.single_layer.*srgb*

This is similar to what we did in Iris in f8961ea0 ("iris: Disable
sRGB fast-clears for non-0/1 values").

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10003
Fixes: 4cfb4f7d12 ("anv: support fast color clears on vkCmdClearAttachments")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29518>
(cherry picked from commit d9567b5ee4)
2024-06-05 16:05:03 +02:00
bbhtt
e0405c9670 nvk: Clean up unused header from libdrm_nouveau
This was added in 6e0089307e without a
dependency on libdrm_nouveau. If libdrm is not compiled with nouveau
enabled, the build errors here.

This is currently unused and since
821f4c8d99 removed dependency on
libdrm_nouveau, this should be gone too.

Fixes: 821f4c8d99 ("nouveau: import libdrm_nouveau")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29517>
(cherry picked from commit 4f5503fa2d)
2024-06-05 16:04:26 +02:00
Eric Engestrom
451e723c3e .pick_status.json: Update to 6889a0a5dd 2024-06-05 16:00:13 +02:00
Karol Herbst
2b70963ef4 iris: fix PIPE_RESOURCE_PARAM_STRIDE for buffers
Iris calls iris_resource_get_param with PIPE_RESOURCE_PARAM_STRIDE
internally now when exporting memory objects. OpenCL's gl_sharing allows
to export buffers as well, which do not have strides.

This fixes the assert being hit there for buffers.

Fixes: 831703157e ("iris: Use resource_get_param in resource_get_handle")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29501>
(cherry picked from commit bc149e0303)
2024-06-04 14:40:28 +02:00
Lionel Landwerlin
d5d9dade4b brw: use a single virtual opcode to read ARF registers
In 2c65d90bc8 I forgot to add the new SHADER_OPCODE_READ_MASK_REG
opcode to the list of barrier instruction in the scheduler. Let's just
use a single opcode for all ARF registers that need special
scoreboarding and put the register as source (nicer for the debug
output).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2c65d90bc8 ("intel/brw: ensure find_live_channel don't access arch register without sync")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29446>
(cherry picked from commit d8b78924c5)
2024-06-04 14:40:26 +02:00
Ian Romanick
bb08cee929 nir/search: Fix is_16_bits for vectors
Require that all elements of a vector be representable as either
int16_t or uint16_t.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Fixes: 7ef45e661f ("intel/fs: Add constant propagation for ADD3")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29148>
(cherry picked from commit 6e53be2a0a)
2024-06-04 11:50:09 +02:00
Karol Herbst
a1ba39a9eb rusticl/event: fix deadlock when calling clGetEventProfilingInfo inside callbacks
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11243
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29483>
(cherry picked from commit 6f713a764f)
2024-06-04 11:50:07 +02:00
Eric Engestrom
f5a085109c .pick_status.json: Update to 0311ac50ad 2024-06-04 11:49:59 +02:00
Juan A. Suarez Romero
6c28c84871 ci: define SNMP base interface on runner
In order to turn on/off through SNMP DuT under PoE switch, the SNMP key
in some vendors don't directly use the interface number, but a number
shifted a base number.

Define this base number as BM_POE_BASE environment in the runner.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29306>
(cherry picked from commit 90f8be9bda)
2024-05-31 18:06:37 +02:00
Jose Maria Casanova Crespo
68702b795a v3d: really fix CLE MMU errors on 7.1HW Rpi5
Macro values that define values for different HW generations should
use the V3DV_X helper instead of being defined under a V3D_VERSION #if
condition.

Without this change, the original V3D_CLE_READAHEAD and
V3D_CLE_BUFFER_MIN_SIZE definitions used were only working for 4.2 HW.
For the 7.1 HW (RPi5) the 4.2 definitions were applied.

The CLE MMU errors were hidden as they were reported at dmesg as
"MMU error from client PTB (1) at 0x1884200, pte invalid" instead of
client CLE. So fixes all v3d dmesg warnings for PTB MMU errors on RPi5.

With this change we really don't need different functions per HW generation,
so we rename back file v3dx_cl.c to v3d_cl.c. As before, we can use
only the packets definitions for 4.2 HW as they use the same opcode as 7.1 HW.

Fixes: 11dce2ac81 ("v3d: fix CLE MMU errors avoiding using last bytes of CL BOs.")
Fixes: e2c624e74e ("v3d: Increase alignment to 16k on CL BO on RPi5")

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29496>
(cherry picked from commit f32a258503)
2024-05-31 13:29:48 +02:00
Jose Maria Casanova Crespo
3f3553dfb9 v3dv: really fix CLE MMU errors on 7.1HW Rpi5
Macro values that define values for different HW generations should
use the V3DV_X helper instead of being defined under a V3D_VERSION #if
condition.

Without this change, the original V3D_CLE_READAHEAD and
V3D_CLE_BUFFER_MIN_SIZE definitions used were only working for 4.2 HW.
For the 7.1 HW (RPi5) the 4.2 definitions were applied.

The CLE MMU errors were hidden as they were reported at dmesg as
"MMU error from client PTB (1) at 0x1884200, pte invalid" instead of
client CLE. So fixes all v3dv dmesg warnings for PTB MMU errors on RPi5.

With this change we really don't need different functions per HW generation,
so we rename back file v3dvx_cl.c to v3dv_cl.c. As before, we can use
only the packets definitions for 4.2 HW as they use the same opcode as 7.1 HW.

It fixes also an indentation error introduced with 26c8a5cd72.

Fixes: bb77ac983e ("v3dv: Increase alignment to 16k on CL BO on RPi5")
Fixes: 26c8a5cd72 ("v3dv: fix CLE MMU errors avoiding using last bytes of CL BOs.")

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29496>
(cherry picked from commit 07d3d55783)
2024-05-31 13:29:47 +02:00
Lionel Landwerlin
ee3ed15b51 intel: fix HW generated local-id with indirect compute walker
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 5e7f4ff97f ("intel: Add driver support for hardware generated local invocation IDs")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29473>
(cherry picked from commit a1ea0956b4)
2024-05-31 13:29:46 +02:00
Eric Engestrom
15598aa49b .pick_status.json: Update to f32a258503 2024-05-31 13:29:44 +02:00
Eric Engestrom
be0ea0c01f panfrost/ci: add missing genxml trigger path
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29487>
(cherry picked from commit fbb306df15)
2024-05-31 13:29:32 +02:00
Eric Engestrom
34aa074b2d panfrost: mark tests as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29487>
(cherry picked from commit 3ec480825e)
2024-05-31 13:29:32 +02:00
Eric R. Smith
91db0990f0 panfrost: change default rounding mode for samplers
The SamplerDescriptor structure has a field which describes how
floating point coordinates should be converted to fixed point.
Setting this to "true" (which causes round to nearest even) fixes
a failing CTS test.

The CTS test in question is:
dEQP-GLES31.functional.texture.border_clamp.range_clamp.linear_float_color

The OpenGL spec is somewhat vague about how rounding is to be
performed, so it appears both settings should be legal; this may
indicate a problem with the CTS. Nevertheless "round to nearest even"
is probably a better default and since it fixes the failing test we
may as well use it.

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29464>
(cherry picked from commit d91d2c275e)
2024-05-31 13:27:57 +02:00
Karol Herbst
869a117030 rusticl: link against libgalliumvl_stub
Fixes compiling rusticl with certain configurations

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680>
(cherry picked from commit 691a22f015)
2024-05-31 13:27:56 +02:00
Karol Herbst
da37f699a9 meson: centralize galliumvl_stub handling
This way frontends can simply link against the stub, but get the full
version if it's actually required (e.g. for radeonsi).

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680>
(cherry picked from commit b6f281bcb5)
2024-05-31 13:27:55 +02:00
Karol Herbst
93ffbd4d69 gallium/vl: remove stubs which are defined in mesa_util
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680>
(cherry picked from commit 6c9c48a3ae)
2024-05-31 13:27:51 +02:00
Karol Herbst
75a8d20ae6 gallium/vl: stub vl_video_buffer_create_as_resource
It's used by radeonsi

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680>
(cherry picked from commit 95871d48aa)
2024-05-31 13:27:50 +02:00
Lionel Landwerlin
d8246f604d anv: fix timestamp copies from secondary buffers
We increased the size of the timestamps but only copied 64bit values
from the secondaries.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 521c216efc ("anv: use COMPUTE_WALKER post sync field to track compute work")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29438>
(cherry picked from commit 1d4e56d22a)
2024-05-31 13:27:49 +02:00
Lionel Landwerlin
985fff6c40 anv: fix utrace compute walker timestamp captures
The output of the POSTSYNC_DATA has to be 32-byte aligned.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 521c216efc ("anv: use COMPUTE_WALKER post sync field to track compute work")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29438>
(cherry picked from commit 1511b25b0f)
2024-05-31 13:27:48 +02:00
Kevin Chuang
fbdf6424a7 anv: Properly fetch partial results in vkGetQueryPoolResults
Currently for an "unavailable" query, if VK_QUERY_RESULT_PARTIAL_BIT is
set, anv will return (slot.end - slot.begin). This can cause underflow
because slot.end might still be at the initial value of 0.

This commit fixes the issue by returning 0 in that situation.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29447>
(cherry picked from commit f8ccf70c99)
2024-05-31 13:27:48 +02:00
Eric Engestrom
cf9e82b281 freedreno/a6xx: fix kernel -> compute handling
9b2780dcaf folds the kernel path into the compute path, and then adds
a `compute -> compute` conversion that was very likely meant to be
`kernel -> compute`, so fix that.

Fixes: 9b2780dcaf ("freedreno/a6xx: Re-work fd6_emit_shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29458>
(cherry picked from commit b8f1e95cbe)
2024-05-31 13:27:47 +02:00
Samuel Pitoiset
b29453c0c5 radv: fix flushing DB meta cache on GFX11.5
Only GFX11 is affected by this hw bug.
Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29424>
(cherry picked from commit 07a826ba93)
2024-05-31 13:27:37 +02:00
Iván Briano
9ad3c9db3b anv: check cmd_buffer is on a transfer queue more properly
The queueFlags of the associated queue may have more flags than just the
type of queue it is, based on what that queue supports, like sparse or
protected content. Check that the queue is a blitter engine instead.

Fixes a bunch of dEQP-VK.api.copy_and_blit.core.*_transfer on MTL with
ANV_SPARSE=0

Fixes: 17b8b2cffd ("anv: Add support for a transfer queue on Alchemist")

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29336>
(cherry picked from commit 8d098ecfea)
2024-05-31 13:27:35 +02:00
Mike Blumenkrantz
7550d3bff8 zink: add atomic image ops to the ms deleting pass
this otherwise results in nir validation errors

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11209

Fixes: 90cf8d14d6 ("zink: add a pass to strip out multisample storage image ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29383>
(cherry picked from commit bc29d2c9fc)
2024-05-31 13:27:32 +02:00
Yusuf Khan
874fc52dd6 zink/query: begin time elapsed queries even if we arent in a rp
If we arent in a renderpass, but still wanna start the time elapsed
query(eg. to figure out how long some random operation will take) then
this seems to fix that case.

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29411>
(cherry picked from commit 42ee8d80d9)
2024-05-31 13:27:18 +02:00
Eric Engestrom
c0349c0e02 .pick_status.json: Mark 410ca6a3e9 as denominated 2024-05-31 12:47:27 +02:00
Eric R. Smith
9b3418e1c7 panfrost: fix some omissions in valhall flow control
The code for checking flow control did not realize that
`LD_TEX` and `LD_TEX_IMM` were memory accesses, and hence was
not inserting waits where these were necessary. This showed up
as flakes in KHR-GLES31.core.shader_image_load_store.basic-glsl-misc-fs

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29363>
(cherry picked from commit 272dcaff01)
2024-05-31 12:46:52 +02:00
Tapani Pälli
a5bcd3a2c3 anv/android: enable emulated astc for applications
This layer was blocking Android emulated ASTC support as it did not
take "emu_astc_ldr" in to account.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Mi, Yanfeng <yanfeng.mi@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29415>
(cherry picked from commit 6836118cd2)
2024-05-31 12:46:49 +02:00
Konstantin Seurer
b3d9f853cd llvmpipe: Use a second LLVMContext for compiling sample functions
LLVMContextr is not thread safe. There are many code paths that use
llvmpipe_context::context and adding locking to all of them is
difficult and adds unnecessary overhead. This approach restricts locking
to lp_sampler_matrix, which makes covering all uses of the LLVMContext
easy and only adds overhead when running lavapipe.

Fixes: 7ebf7f4 ("llvmpipe: Compile sample functioins on demand")
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29397>
(cherry picked from commit c31038ef98)
2024-05-31 12:46:47 +02:00
Karol Herbst
7981b12585 nouveau: import nvif/ioctl.h file from libdrm_nouveau
Technically this is UAPI and should be moved into the UAPI headers, but
for now let's unbreak users this way.

Fixes: 821f4c8d99 ("nouveau: import libdrm_nouveau")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29420>
(cherry picked from commit 7c07f1cdfb)
2024-05-31 12:46:42 +02:00
Rhys Perry
efaaeac604 radv: malloc graphics pipeline stages
This uses a lot of stack, which is apparently a problem for musl libc.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29379>
(cherry picked from commit c9f5152ddd)
2024-05-31 12:46:36 +02:00
David Rosca
c5cd47dea5 frontends/va: Fix leak when destroying VAEncCodedBufferType
Fixes: be4287c3aa ("pipe: Extend get_feedback with additional metadata")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29217>
(cherry picked from commit cc03f2ea5a)
2024-05-31 12:46:33 +02:00
Eric R. Smith
882e411e1a glsl: test both inputs when sorting varyings for xfb
In the sort functions used to sort varyings in gl_nir_link_varyings,
we were only checking the first input for whether or not it is xfb.
Check both inputs, and also provide a definite order for the xfb vs.
non-xfb varyings (the xfb come last, as the initial sort established).

This fixes a problem encountered on panfrost, where qsort could
mix xfb and non-xfb varyings which started out separate.

Note that the sort is still not stable. We probably should make it
stable, but that is a more extensive change that's handled in a later
commit.

Cc: mesa-stable
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29178>
(cherry picked from commit 5102a922e7)
2024-05-31 12:46:31 +02:00
Natanael Copa
eb34c21747 nir/opt_varyings: reduce stack usage
Avoid put a huge struct on stack to fix a stack overflow on musl libc.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10988
Fixes: c66967b5cb (nir: add nir_opt_varyings, new pass optimizing and compacting varyings)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29375>
(cherry picked from commit 0274518615)
2024-05-31 12:46:29 +02:00
Eric R. Smith
11fa599bcd get_color_read_type: make sure format/type combo is legal for gles
The GLES spec limits the valid combinations of format and type that
may be returned by queries and/or used by ReadPixel. The list of valid
combinations appears in table 8.2 of the GLES 3.2 spec. Our code for
reporting the type and format of the current framebuffer, however,
does not verify that the combination is legal for GLES. For example,
RGBA and UNSIGNED_SHORT_1_5_5_5_REV is not a valid GLES combination,
but it's what we were returning for a panthor 16 bit frame buffer.

We can fix this either by changing the format or type that we return
(internally we can handle any format/type combination). We advertise the
read_format_bgra extension, so we could return GL_BGRA for the format.
However, very few applications (including notably the Khronos CTS for GLES)
cope well with BGRA. So instead we change the type to a non-_REV one
so that the combination appears in the GLES spec table of legal values.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29144>
(cherry picked from commit 4d298673da)
2024-05-31 12:46:28 +02:00
Samuel Pitoiset
40e1c62b96 radv: fix setting a custom pitch for CB on GFX10_3+
The gfx_level check was missing the version...

Found by inspection.

Fixes: 3f7ddaf281 ("radv: implement setting a custom pitch to any multiple of 256B on gfx10.3+"
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29331>
(cherry picked from commit 2867a07922)
2024-05-31 12:39:09 +02:00
Dave Airlie
e217c0f238 Revert "zink: use a slab allocator for zink_kopper_present_info"
This reverts commit 738fbddca8.

This was missing locking which caused problems

Closes: 11161
Fixes: 738fbddca8 ("zink: use a slab allocator for zink_kopper_present_info")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29338>
(cherry picked from commit 2abdc84606)
2024-05-31 12:34:43 +02:00
Amit Pundir
9e63dfe52d android: Fix zink build failure
Otherwise we run into following build error on Android:

    ld.lld: error: undefined symbol: galliumvk_driver_extensions

Fixes: cfa955ed78 ("glx/egl: fix LIBGL_KOPPER_DISABLE")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29475>
(cherry picked from commit 38dfbae116)
2024-05-31 08:52:48 +02:00
Jose Maria Casanova Crespo
749a2f92bb v3dv: Emit stencil draw clear if needed for GFXH-1461
Fixes: 1e81bb05ae (v3dv: implement workaround for GFXH-1461)
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29427>
(cherry picked from commit 4835dc0e7f)
2024-05-31 08:52:34 +02:00
Iago Toral Quiroga
a2716f97d8 v3dv: fix incorrect index buffer size
When programming the size, we should take into account the
offset from the start of the index buffer address.

cc: mesa-stable

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29425>
(cherry picked from commit 70aa470bdb)
2024-05-31 08:52:33 +02:00
Valentine Burley
4319c1c6e8 wsi: Guard DRM-dependent function implementations with HAVE_LIBDRM
Adress an implicit function declaration error by ensuring that DRM-dependent
functions are only compiled when HAVE_LIBDRM is set.

Fixes: 59813ae468 ("wsi: Add common infrastructure for explicit sync")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29267>
(cherry picked from commit d93d989e5d)
2024-05-31 08:52:25 +02:00
Lionel Landwerlin
7261464189 intel/brw: ensure find_live_channel don't access arch register without sync
Another architecture register that requires some care before reading.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 49ee3ae9e8 ("intel/compiler: Lower FIND_[LAST_]LIVE_CHANNEL in IR on Gfx8+")
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29319>
(cherry picked from commit 2c65d90bc8)
2024-05-31 08:52:19 +02:00
Iago Toral Quiroga
1d9ae05492 broadcom/compiler: apply payload conflict to spill setup before RA
We can emit spill setup before RA if we use scratch. In that case
we have the same situation as during spilling, with the caveat that
we have already emitted the instructions so we need to find them
(they should be the only instructions ones before the instructions
accessing payload registers) and flag them as such.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29343>
(cherry picked from commit 865e682ad7)
2024-05-31 08:34:27 +02:00
Iago Toral Quiroga
946ce7a6e6 broadcom/compiler: don't assign payload registers to spilling setup temps
We read our payload registers first in the shader so we generally don't have
to care about temps being allocated to them and stomping their value before
we can read them. Hoewer, spilling setup instructions are an exception since
these will be inserted first when there is any spilling in the program.
To fix this, we flag RA nodes involved with these instructions so we can
then try to avoid assiging these registers to them.

Fixes CTS failures with V3D_DEBUG=opt_compile_time, particularly:
dEQP-VK.binding_model.buffer_device_address.set0.depth2.basessbo.convertcheckuv2.nostore.single.std140.comp_offset_nonzero

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29343>
(cherry picked from commit cb83f25b39)
2024-05-31 08:34:25 +02:00
Iago Toral Quiroga
304d3c4566 broadcom/compiler: make add_node return the node index
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29343>
(cherry picked from commit 901c485997)
2024-05-31 08:34:24 +02:00
David Heidelberg
2e90216b44 ci/nouveau: move disabled jobs back from include into main gitlab-ci.yml
Fixes: 9442571664 ("ci: separate hiden jobs to -inc.yml files")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26758>
(cherry picked from commit 6bc660a542)
2024-05-31 08:34:19 +02:00
Lionel Landwerlin
43025002b9 anv: fix shader identifier handling
When compilation is required, we should return
VK_PIPELINE_COMPILE_REQUIRED. The spec prevents the application from
passing a module or SPIR-V code so we have nothing to compile if the
cache lookup fails :

VUID-VkPipelineShaderStageCreateInfo-stage-06844:
   If a shader module identifier is specified for this stage, a
   VkShaderModuleCreateInfo structure must not be present in the pNext
   chain

VUID-VkPipelineShaderStageCreateInfo-stage-06848:
   If a shader module identifier is specified for this stage, module
   must be VK_NULL_HANDLE

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11208
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29340>
(cherry picked from commit 5f2288095b)
2024-05-31 08:34:16 +02:00
Jose Maria Casanova Crespo
60b604009b v3dv: V3D_CL_MAX_INSTR_SIZE bytes in last CL instruction not needed
As we are marking the last V3D_CLE_READAHEAD bytes as unusable we don't
need to reserve V3D_CL_MAX_INSTR_SIZE bytes for the CLE packet.

This reverts c2601f0690 ("v3dv: ensure at least V3D_CL_MAX_INSTR_SIZE
bytes in last CL instruction")

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29023>
(cherry picked from commit 7afebc15ce)
2024-05-31 08:33:53 +02:00
Jose Maria Casanova Crespo
66404b7f58 v3dv: Increase alignment to 16k on CL BO on RPi5
We increase the alignment to 16k for BOs allocated for the CL on RPi5 HW.
So we have the same ratio of usable space because of HW readahead as
than on RPi4, as readahead has been increased from 256 to 1024 bytes on
RPi5.

We have also concluded that when the kernel is running with 16k pages
that is the default on Raspberry Pi 5 HW, BO allocations are aligned to
16k so this increase has no cost and we would be using memory more
efficiently.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29023>
(cherry picked from commit bb77ac983e)
2024-05-31 08:33:52 +02:00
Jose Maria Casanova Crespo
47f917584b v3d: Increase alignment to 16k on CL BO on RPi5
We increase the alignment to 16k for BOs allocated for the CL on RPi5 HW.
So we have the same ratio of usable space because of HW readahead as
than on RPi4, as readahead has been increased from 256 to 1024 bytes on
RPi5.

We have also concluded that when the kernel is running with 16k pages
that is the default on Raspberry Pi 5 HW, BO allocations are aligned to
16k so this increase has no cost and we would be using memory more
efficiently.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29023>
(cherry picked from commit e2c624e74e)
2024-05-31 08:33:49 +02:00
Jose Maria Casanova Crespo
4f056182bd v3dv: fix CLE MMU errors avoiding using last bytes of CL BOs.
The last V3D_CLE_READAHEAD bytes of the CLE buffer are unusable because
using them would prefetch the next readahead bytes of the CL that would
be outside the allocated BO. To guarantee that we can chain a BO to the
current CL we always reserve space for the BRANCH or
RETURN_FROM_SUB_LIST packets.

Not taking this into account has been generating kernel dmesg errors like
"MMU error from client CLE".

As V3D_CLE_READAHEAD is different from RPi4 (256 bytes) to RPi5 (1024 bytes).
So we needed to rename v3dv_cl.c to v3dvX_cl.c to have different objects per
V3D_VERSION.

Extra assertions have been included to validate that we don't write
packets over the usable size of the CL silently.

v2: - Do not declare unusable the space needed for the BRANCH packet,
      but take it into account for all space reservations.
v3: - Squash here ("v3dv: Secondary CL needs also to handle CLE readahead")
    - Remove spureous parenthesis (Iago Toral)
    - Refactor to avoid checking for needs_return_from_sub_list inside
      cl_alloc_bo adding unusable_space as new parameter.
v4: - Improved logic for chaining BOs moving it to cl_alloc_bo using
      a new enum v3dv_cl_chain_type to identify the different kinds
      of BO chaining. Now we increase the size of the BO just before
      submitting the BRACH/RETURN_FROM_SUB_LIST packages.
v5: - Assert on BO size updates that we are within the BO size.
      (Iago Toral)
v6: - Remove changes at cmd_buffer_end_render_pass_secondary as we
      assumed that cl->bo was already allocated when ending the
      secondary CL, but it can be NULL. And this was already handle
      by current code.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29023>
(cherry picked from commit 26c8a5cd72)
2024-05-31 08:33:48 +02:00
Jose Maria Casanova Crespo
76874a441f v3d: fix CLE MMU errors avoiding using last bytes of CL BOs.
The last V3D_CLE_READAHEAD bytes of the CLE buffer are unusable because
using them would prefetch the next readahead bytes of the CL that would
be outside the allocated BO. To guarantee that we can chain a BO to the
current CL we always reserve space for the BRANCH packet.

Not taking this into account has been generating kernel dmesg errors like
"MMU error from client CLE".

As V3D_CLE_READAHEAD is different from RPi4 (256 bytes) to RPi5 (1024 bytes).
So we needed to rename v3d_cl.c to v3dX_cl.c to have different objects per
V3D_VERSION.

Extra assertions have been included to validate that we don't write
packets over the usable size of the CL silently.

v2: - Remove spurious blank line (Iago Toral)
    - Do not declare unusable the space needed for the BRANCH packet,
      and take it into account for all reservations.
v3: - Handle BRANCH packet reserve only when CLE BO allocation is done.
v4: - Assert on BO size updates that we are within the BO size.
      (Iago Toral)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29023>
(cherry picked from commit 11dce2ac81)
2024-05-31 08:33:46 +02:00
Renato Pereyra
9d34ce91cb anv: Attempt to compile all pipelines even after errors
Per the Vulkan Spec section 10.1, the implementation is supposed to
attempt to create all pipelines even if creation of any one pipeline
in a create call fails. If more than one error occur, any one error
is valid as a return value.

Signed-off-by: Renato Pereyra <renatopereyra@chromium.org>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29315>
(cherry picked from commit 51d6162c80)
2024-05-31 08:33:45 +02:00
Lionel Landwerlin
6206f4cfba .pick_status.json: Update to ce43d7eb7f 2024-05-31 08:33:32 +02:00
Timur Kristóf
83fc0888b5 radv: Fix TCS -> TES I/O linking typo of VARYING_SLOT vs. BIT.
In these bitwise expressions, VARYING_BIT_* should be used,
but the code mistakenly used VARYING_SLOT_* which is wrong.

Fixes: 0e481a4adc
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29327>
(cherry picked from commit 3963e4b53a)
2024-05-22 21:23:13 +02:00
Friedrich Vock
fd3f9a152c radeonsi: Use max_se instead of num_se where appropriate
Scratch allocation needs to happen using max_se, otherwise there can be
hangs.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29202>
(cherry picked from commit 18c736bcfc)
2024-05-22 21:23:13 +02:00
Friedrich Vock
f361b3486a radv: Use max_se instead of num_se where appropriate
Scratch allocation needs to happen using max_se, otherwise there can be
hangs.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29202>
(cherry picked from commit db564a40b3)
2024-05-22 21:23:13 +02:00
Eric Engestrom
e844211d95 docs: add sha256sum for 24.1.0 2024-05-22 20:30:50 +02:00
Eric Engestrom
e1e4254491 VERSION: bump for 24.1.0 2024-05-22 20:07:58 +02:00
Eric Engestrom
02535969d9 docs: add release notes for 24.1.0 2024-05-22 20:05:42 +02:00
Lionel Landwerlin
eb553df193 anv: use weak_ref mode for global pipeline caches
So that as soon as pipelines are freed, they're removed from the
cache.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11185
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Tested-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29283>
(cherry picked from commit 3584fc6482)
2024-05-22 20:05:05 +02:00
Eric Engestrom
7529fd7a4b .pick_status.json: Update to 3584fc6482 2024-05-22 20:05:05 +02:00
Samuel Pitoiset
76005d3762 radv: only set ALPHA_IS_ON_MSB if the image has DCC on GFX6-9
This is technically incorrect to only check meta_offset which might be
non-zero for CMASK/FMASK but this applies to DCC only.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29308>
(cherry picked from commit 68c4d26691)
2024-05-22 10:38:01 +02:00
Rhys Perry
f3e53f801c aco: create lcssa phis for continue_or_break loops when necessary
These might not exist because adding would decrease the quality of
divergence analysis. They are necessary for continue_or_break though, so
add them later, where they won't affect divergence analysis.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10623
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29121>
(cherry picked from commit bbe4652430)
2024-05-22 10:37:58 +02:00
David Heidelberg
45393f8e9f subprojects: uprev perfetto to v45.0
Cc: mesa-stable

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29311>
(cherry picked from commit 4a6d7e79ad)
2024-05-22 10:35:33 +02:00
Samuel Pitoiset
3761ceab10 radv: set image view descriptors as buffer for non-graphics GPU
Ported from RadeonSI, for CDNA.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29286>
(cherry picked from commit 72485fe592)
2024-05-22 10:35:32 +02:00
Eric Engestrom
f0088c606e .pick_status.json: Update to 2487a87552 2024-05-22 10:35:26 +02:00
Samuel Pitoiset
35c87d0ee9 radv: mark some formats as unsupported on GFX8/CARRIZO
Ported from RadeonSI, untested.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29288>
(cherry picked from commit 97962f2a34)
2024-05-21 18:02:29 +02:00
Eric R. Smith
3198caaab7 panfrost: add a barrier when launching xfb jobs in CSF
When we start writing to an XFB buffer we need to synchronize with
any batches reading from it (because the data they need is about
to be overwritten). Do this by introducing a barrier in csf_launch_xfb.

This patch fixes a valhall failure in
KHR-GLES31.core.vertex_attrib_binding.advanced-iterations

Cc: mesa-stable
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29092>
(cherry picked from commit eefe34127f)
2024-05-21 17:59:59 +02:00
Rob Clark
4757d2ccd9 freedreno/ir3: Fix ldg/stg offset
Basically a revert (but not a clean one) of commit 60686d4146
("ir3/a6xx: fix ldg/stg of ulong2 and ulong4 data").  The offset
is a byte offset, not a dword offset.

Backport note: Prior to commit 513fa1873c ("ir3/a7xx: Fix
load_global_ir3 with immediate offset") you could instead just revert
the original commit.

Fixes: 60686d4146 ir3/a6xx: ("fix ldg/stg of ulong2 and ulong4 data")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11169
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29228>
(cherry picked from commit 01bac643f6)
2024-05-21 17:59:55 +02:00
Samuel Pitoiset
9501a4375e radv: allow 3d views with VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT
VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT allows to create 2d views
of a 3d image but nothing in the spec disallows to also create 3d views
when this flag is set.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29269>
(cherry picked from commit 16952a179b)
2024-05-21 17:59:54 +02:00
Valentine Burley
838500cb5e drm-shim: Stub syncobj reset ioctl
Fixes DRM_SHIM: unhandled core DRM ioctl 0xC4 (0xc01064c4).

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28504>
(cherry picked from commit 471ac97a4a)
2024-05-21 17:59:50 +02:00
Rob Clark
8efa17cf76 egl/android: Fix sRGB visuals
The switch to filtering visuals by pipe_format overlooked the
corresponding _SRGB formats.

Fixes: 273e54391a ("egl/android: Remove hard-coded color-channel data")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11182
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29292>
(cherry picked from commit 924c5ad2ac)
2024-05-21 17:59:48 +02:00
Eric Engestrom
d7c6acac89 .pick_status.json: Update to 471ac97a4a 2024-05-21 17:59:31 +02:00
David Heidelberg
e3edb6c3ec winsys/i915: depends on intel_wa.h
Prevent compilation failure due to not-yet generated intel_wa header.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11174
Cc: mesa-stable

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29252>
(cherry picked from commit 08659a0baa)
2024-05-20 11:17:43 +02:00
Mike Blumenkrantz
753b6920c7 nir/linking: fix nir_assign_io_var_locations for scalarized dual blend
this would previously assign all scalar variables to the highest
driver location

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28753>
(cherry picked from commit ffe54ca293)
2024-05-20 11:17:41 +02:00
Mike Blumenkrantz
d4c791ec63 nir/lower_aaline: fix for scalarized outputs
this otherwise was broken

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28753>
(cherry picked from commit e28061c502)
2024-05-20 11:17:40 +02:00
Faith Ekstrand
b47ea93f86 nvk/meta: Save and restore set_dynamic_buffer_start
Fixes: e0d907f56f ("nvk: Rework descriptor set binding")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
(cherry picked from commit 681acde6d3)
2024-05-20 11:17:38 +02:00
Adrian Perez de Castro
7b96875784 Revert "egl/wayland: Remove EGL_WL_create_wayland_buffer_from_image"
The EGL_WL_create_wayland_buffer_from_image is still used in WPE WebKit.
There is work in progress to continue adoption of DMA-BUF usage inside
WebKit which will eventually render the extension unneeded; but in the
meantime an update to a version of Mesa without the extension would
render applications using WPE WebKit unusable.

This reverts commit a3418105b9.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29266>
(cherry picked from commit 2934e1fad5)
2024-05-20 10:54:33 +02:00
Mike Blumenkrantz
3c79cc4371 egl/dri2: fix error returns on dri2_initialize_x11_dri3 fail
this is a failure path, so return failure

Fixes: 62f65f4bfd ("egl/dri2: if zink is preferred from dri3 skip dri2 paths.")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29171>
(cherry picked from commit c6b29a4788)
2024-05-20 10:54:31 +02:00
Karol Herbst
a18dbb4a5d nir/lower_cl_images: set binding also for samplers
Fixes https://github.com/darktable-org/darktable/issues/16717 on radeonsi.

Fixes: 31ed24cec7 ("nir/lower_images: extract from clover")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29230>
(cherry picked from commit 564e569072)
2024-05-20 10:54:29 +02:00
David Rosca
faac5b2d31 radeonsi/vcn: Ensure at least one reference for H264 P/B frames
The original fix from

0f3370eede ("raseonsi/vcn: fix a h264 decoding issue")

would in some cases also trigger for I frames with interlaced streams.
Instead of checking used_for_reference_flags, use slice type and
only add one reference for P/B frames if needed.
This change still fixes playback of the sample from the original issue,
avoids the issue with interlaced streams and also fixes the case where
application provides no references at all.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11060
Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29055>
(cherry picked from commit 5f4a6b5b00)
2024-05-20 10:54:28 +02:00
David Rosca
285aed315f radeonsi/vcn: Allow duplicate buffers in DPB
In case of missing frames (eg. when decoding corrupted streams), there
will be duplicate buffers and all of them needs to be in DPB to keep
the layout correct for decoding.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29055>
(cherry picked from commit 2ef3a34f1a)
2024-05-20 10:54:27 +02:00
David Rosca
7adccd14fa radeonsi/vcn: Ensure DPB has as many buffers as references
In case of corrupted streams (or application bugs) the number
of references may not be equal to DPB size. This needs to be fixed by
filling the missing slots with dummy buffers.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29055>
(cherry picked from commit 47b6ca47d0)
2024-05-20 10:54:27 +02:00
David Rosca
36b162f629 frontends/va: Store slice types for H264 decode
Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29055>
(cherry picked from commit 9837dab4bd)
2024-05-20 10:54:26 +02:00
Patrick Lerda
b2bce19cd4 r600: fix vertex state update clover regression
This change handles the case when "vertex_fetch_shader.cso" is null,
it implements the previous behavior in this specific case. This
situation is happening with clover.

For instance, this issue is triggered with "piglit/bin/cl-custom-buffer-flags":
==6467==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000000c (pc 0x7ff92908fe6e bp 0x7ffe86ae5ad0 sp 0x7ffe86ae5a30 T0)
==6467==The signal is caused by a READ memory access.
==6467==Hint: address points to the zero page.
    #0 0x7ff92908fe6e in evergreen_emit_vertex_buffers ../src/gallium/drivers/r600/evergreen_state.c:2123
    #1 0x7ff92908444b in r600_emit_atom ../src/gallium/drivers/r600/r600_pipe.h:627
    #2 0x7ff92908444b in compute_emit_cs ../src/gallium/drivers/r600/evergreen_compute.c:798
    #3 0x7ff92908444b in evergreen_launch_grid ../src/gallium/drivers/r600/evergreen_compute.c:927
    #4 0x7ff9349f9350 in clover::kernel::launch(clover::command_queue&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&) ../src/gallium/frontends/clover/core/kernel.cpp:105
    #5 0x7ff9349c331d in std::function<void (clover::event&)>::operator()(clover::event&) const /usr/include/c++/11.4.0/bits/std_function.h:590
    #6 0x7ff9349c331d in clover::event::trigger() ../src/gallium/frontends/clover/core/event.cpp:54
    #7 0x7ff9349c82f1 in clover::hard_event::hard_event(clover::command_queue&, unsigned int, clover::ref_vector<clover::event> const&, std::function<void (clover::event&)>) ../src/gallium/frontends/clover/core/event.cpp:138
    #8 0x7ff9348daa47 in create<clover::hard_event, clover::command_queue&, int, clover::ref_vector<clover::event>&, clEnqueueNDRangeKernel(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, _cl_event* const*, _cl_event**)::<lambda(clover::event&)> > ../src/gallium/frontends/clover/util/pointer.hpp:241
    #9 0x7ff9348daa47 in clEnqueueNDRangeKernel ../src/gallium/frontends/clover/api/kernel.cpp:334

Fixes: 659b7eb2 ("r600: better tracking for vertex buffer emission")
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10079
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29163>
(cherry picked from commit f8a1d9f787)
2024-05-20 10:54:25 +02:00
David Rosca
b72c5aee1b radeonsi: Update buffer for other planes in si_alloc_resource
The buffer is shared with all planes, so it needs to be updated
in all other planes. This is already done in si_texture_create_object
when creating the buffer, but it was missing when reallocating
in si_texture_invalidate_storage.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11155
Cc: mesa-stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29216>
(cherry picked from commit c522848d5a)
2024-05-20 10:54:24 +02:00
Karol Herbst
e0789e1f06 rusticl/mesa/context: flush context before destruction
Drivers might still be busy doing things and not properly clean things up.

Fixes a rare crash on applicatione exits with some drivers.

Fixes: 50e981a050 ("rusticl/mesa: add fencing support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29223>
(cherry picked from commit f1662e9bc9)
2024-05-20 10:51:50 +02:00
Rohan Garg
02aa4bb803 Revert "iris: slow clear higher miplevels on single sampled 8bpp resources that have TILE64"
Miptails are now disabled on Tile64 resources, so we can drop this
restriction.

Ref: e3a5ade9 ('intel/isl: Disable miptails to align LODs for CCS WA')

This reverts commit 8670fd6ac4.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28984>
(cherry picked from commit ec06911b3d)
2024-05-20 10:47:17 +02:00
Lionel Landwerlin
3d4e09973c nir/divergence: add missing load_printf_buffer_address
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25814>
(cherry picked from commit 8d336f069e)
2024-05-20 10:46:22 +02:00
Lionel Landwerlin
a0d2b531e0 anv: fix push constant subgroup_id location
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7c76125db2 ("anv: use 2 different buffers for surfaces/samplers in descriptor sets")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25814>
(cherry picked from commit 3716bd704f)
2024-05-20 10:46:20 +02:00
Eric Engestrom
c00fd82705 .pick_status.json: Update to b2282e3a57 2024-05-20 10:46:12 +02:00
Eric Engestrom
d0602e2dab VERSION: bump for 24.1.0-rc4 2024-05-15 18:49:23 +02:00
Sergi Blanch Torne
d9857b2745 ci: identify and label S3 buckets
As for the S3 bucket where the kernel image is stored has been identified and
labeled, the other buckets in use can also be identified and labeled.

cc: mesa-stable

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Co-developed-by: Guilherme Gallo <guilherme.gallo@collabora.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28979>
(cherry picked from commit 72b3c2e4ba)
2024-05-15 15:37:05 +02:00
Sergi Blanch Torne
30a8e6b2f6 ci: kernel stored in a different s3 bucket
Due to the expiration time in `mesa-lava` (1m), the kernel used in mesa is now
using `mesa-rootfs` (1y). Due to this change, a fresh kernel image has been
prepared and mesa has also a few changes to adapt to this redirection.

cc: mesa-stable

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Co-developed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28979>
(cherry picked from commit cc6bd04dd7)
2024-05-15 15:37:05 +02:00
Guilherme Gallo
86e3e447a8 ci: Use id_tokens for JWT auth
Fixes: #9180

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28916>
(cherry picked from commit 7101aecc53)
2024-05-15 15:37:05 +02:00
Guilherme Gallo
b36299c5a9 ci: Add S3 id_token for all jobs
id_tokens will replace $CI_JOB_TOKEN predefined variable in GitLab 18.0
See:
https://docs.gitlab.com/ee/update/deprecations.html#default-cicd-job-token-ci_job_token-scope-changed

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28916>
(cherry picked from commit 2639c91052)
2024-05-15 15:37:05 +02:00
Paulo Zanoni
6f912e9829 isl: add ISL_TILING_64_XE2 to isl_tiling_to_name()
Fixes: c69650a95e ("isl,blorp,anv: introduce ISL_TILING_64_XE2 for Xe2+ platforms")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27306>
(cherry picked from commit 66b6671d3c)
2024-05-15 15:18:24 +02:00
Yiwei Zhang
23ba879b88 turnip: virtio: fix racy gem close for re-imported dma-buf
Similar to the prior fix for msm. On the dmabuf import path, tu_bo_init
can be outside of the vma lock, but left inside for code simplicity.

Fixes: f17c5297d7 ("tu: Add virtgpu support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29093>
(cherry picked from commit 43bb989070)
2024-05-15 15:18:24 +02:00
Yiwei Zhang
bf9cd27575 turnip: virtio: fix iova leak upon found already imported dmabuf
There's a success path on found dmabuf while the iova won't be cleaned
up. This change defers iova alloc till lookup miss and also to prepare
for later racy dmabuf re-import fix.

Also documented a potential leak on error path due to unable to tell
whether a gem handle should be closed or not without refcounting.

Fixes: f17c5297d7 ("tu: Add virtgpu support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29093>
(cherry picked from commit 6ca192f586)
2024-05-15 15:18:24 +02:00
Yiwei Zhang
8013c8fe3e turnip: virtio: fix error path in virtio_bo_init
Fixes: f17c5297d7 ("tu: Add virtgpu support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29093>
(cherry picked from commit 585a87ae53)
2024-05-15 15:18:24 +02:00
David Rosca
3e455f9d3a frontends/va: Only increment slice offset after first slice parameters
Fixes slice offset if app submits exactly one data buffer followed by
parameter buffers.

Fixes: 6746d4df6e ("frontends/va: Fix AV1 slice_data_offset with multiple slice data buffers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11133
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11138
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29124>
(cherry picked from commit b33bb4077d)
2024-05-15 15:18:24 +02:00
Karol Herbst
cbb030e829 event: break long dependency chains on drop
This prevents stack overflows on drop without making it expensive to read
from dependencies (e.g. my attempt to use Weak instead).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29190>
(cherry picked from commit 48c752d3e0)
2024-05-15 15:18:24 +02:00
Eric Engestrom
7f095e142b .pick_status.json: Mark a45f199086 as denominated 2024-05-15 15:18:23 +02:00
Eric Engestrom
d999eda0eb .pick_status.json: Update to aa9244c8f6 2024-05-15 15:15:35 +02:00
Robert Mader
2351b02736 egl/x11: Allow all RGB visuals to match 32-bit RGBA EGLConfigs
Drop the limitation to 24 or 30 bit configs. It was an abritrary
compromise to usually give apps what they wanted, but now we are about
to get a clean solution for alpha-blending on X11.

Based on a patch by Freya Gentz <zegentzy@protonmail.com>, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2376

Signed-off-by: Robert Mader <robert.mader@posteo.de>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9989>
(cherry picked from commit 8a02ca1b2e)
2024-05-15 15:15:35 +02:00
Robert Mader
680ed1609f egl: Implement EGL_MESA_x11_native_visual_id
EGL 1.5 specification requires to not match on EGL_NATIVE_VISUAL_ID.

EGL_MESA_x11_native_visual_id extension allows us to remove this
restriction for X11, where we need to match EGL_NATIVE_VISUAL_ID to find
visuals which allow blending.

The reasoning is that on X11, compositors use the visual as "magic bit"
to decide whether to alpha-blend surface contents.
Unlike on most (all?) other windowing systems, requesting an alpha channel
for the config alone does not already imply blending on the compositor
level.

Thus, in order to allow clients to explicitly request configs with
"magic bit" and, similar to GLX, to order configs in a way so clients
not requesting alpha-blending do not get it by accident, do match
visual ids.

Note that one consequence of this is that more configs get
reported to clients.

Based on a patch by Freya Gentz <zegentzy@protonmail.com>, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2376

Signed-off-by: Robert Mader <robert.mader@posteo.de>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9989>
(cherry picked from commit 9bdab38424)
2024-05-15 15:15:35 +02:00
David Heidelberg
f2d36e3d6e egl/x11: Move RGBA visuals in the second config selection group
This ensures that alpha-blended windows are at the bottom of the visuals
list, so they don't get picked up accidentally.

Based on: "egl-X11: Put RGBA visuals in the second config selection group"

Suggested-by: Freya Gentz <zegentzy@protonmail.com>  # original concept
Co-authored-by: Robert Mader <robert.mader@posteo.de>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9989>
(cherry picked from commit 3736c9997c)
2024-05-15 15:15:35 +02:00
Robert Mader
981703aac9 egl: Implement EGL_EXT_config_select_group
It allows us to influence the order of EGL configs for arbitrary
reasons, which will be used in the following commit.

Based on a patch by Freya Gentz <zegentzy@protonmail.com>, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2376

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Robert Mader <robert.mader@posteo.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9989>
(cherry picked from commit 0d90415625)
2024-05-15 15:15:35 +02:00
David Heidelberg
e46605c109 ci/deqp: correct EGL_EXT_config_select_group detection
It's now a display extension, not an client one.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29145>
(cherry picked from commit 9f42a34625)
2024-05-15 15:15:35 +02:00
Faith Ekstrand
90ad5fc6e2 zink: Set workarounds.can_do_invalid_linear_modifier for NVK
This fixes most of the egl_image_dma_buf* piglit tests.  The remaining
fails are YCbCr tests which are likely unrelated to core dma-buf
import/export.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 8bc694223e)
2024-05-15 15:15:35 +02:00
Faith Ekstrand
9e27390d68 nvk/wsi: Advertise modifier support
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit e6f77defec)
2024-05-15 15:15:35 +02:00
Faith Ekstrand
dc1dd72de5 nvk: Advertise VK_EXT_image_drm_format_modifier
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9636
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9480
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit cd428e01d7)
2024-05-15 15:15:35 +02:00
Faith Ekstrand
1f2b11a564 nvk: Advertise VK_EXT_queue_family_foreign
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit d8e200c0d9)
2024-05-15 15:15:35 +02:00
Mohamed Ahmed
b182fe0a60 nvk: enable rendering to DRM_FORMAT_MOD_LINEAR images
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit bca2f13dd8)
2024-05-15 15:15:35 +02:00
Faith Ekstrand
bbdfab5c8c nvk: Implement DRM format modifier queries
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 224d9a514a)
2024-05-15 15:15:35 +02:00
Faith Ekstrand
623c7df22c nvk: Set tile mode and PTE kind on dedicated dma-buf BOs
This is our compromise to make NVK and nouveau GL play nice when it
comes to modifiers.  The old GL driver depends heavily on the PTE kind
and tile mode, even for images with modifiers.  While it correctly
encodes the PTE kind and tile mode in the modifiers it advertises, it
may ignore the modifier and just trust what's set on the BO when it
imports a dma-buf image.  This is partly because it doesn't support
VM_BIND and partly because of preexisting bugs in the modifiers
implementation.  In either case, we can't fix it retroactively.

To work around this, NVK also sets the PTE kind and tile mode on the BO
when it's a dedicated allocation created for a DRM format modifiers
image.  If DRM format modifiers are used without dedicated allocations,
things may still break but that's getting into vanishingly unlikely
scenarios.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 4ad79bfef4)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
96fdc7faba nvk: Support image creation with modifiers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit f1fdffa1b2)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
f887e1fdf6 nouveau/winsys: Add back nouveau_ws_bo_new_tiled()
This reverts commit ce1cccea98.  In this
new version, we also add a query for whether or not tiled BOs are
supported by nouveau.ko.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 3bb531d245)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
727e86c06d drm-uapi: Sync nouveau_drm.h
Taken from drm-misc-next-fixes:

    commit 959314c438caf1b62d787f02d54a193efda38880
    Author: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>
    Date:   Thu May 9 23:43:52 2024 +0300

        drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 03c4a46fe5)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
8307d829e0 nvk: Allow VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 8cce121da4)
2024-05-15 15:15:34 +02:00
Mohamed Ahmed
11ff1834a6 nil: Support creating images with DRM modifiers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 6063f96c61)
2024-05-15 15:15:34 +02:00
Mohamed Ahmed
73f3805da3 nil: Add some helpers for DRM format modifiers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit e1bd4127f3)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
797b25e43d nil: Default to NV_MMU_PTE_KIND_GENERIC_MEMORY on Turing+
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit b7773f96f9)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
b7f177ceae nvk: Set color/Z compression based on nil_image::compressed
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 603389f7a3)
2024-05-15 15:15:34 +02:00
Mohamed Ahmed
395cd831b3 nil: Add a nil_image::compressed bit
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 873a044cb3)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
bed6fba7c8 nil: Use the right PTE kind for Z32 pre-Turing
This got lost in the Rust rewrite.

Fixes: 426553d61d ("nil: Re-implement nil_image in Rust")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 73c87dbc0c)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
1adce876ce nvk: Allow GART for dma-bufs
We also allow dma-bufs to be imported into arbitrary heaps because we
relly don't know where they'll come from.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 71d1fa129a)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
f49045e281 nouveau/winsys: Make BO_LOCAL and BO_GART separate flags
It's sometimes useful to specify both to allow migration.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 6cd58de4eb)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
dac5e319b0 nouveau/winsys: Take a reference to BOs found in the cache
Fixes: c370260a8f ("nouveau/winsys: Add dma-buf import support")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 19b143b7bc)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
ce203e13f7 nvk: Improve the GetMemoryFdKHR error
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit d63f015d0b)
2024-05-15 15:15:34 +02:00
Friedrich Vock
f8d7ef05b3 aco/spill: Insert p_start_linear_vgpr right after p_logical_end
If p_start_linear_vgpr allocates a VGPR that is already blocked, RA
will try moving the blocking VGPR somewhere else. If
p_start_linear_vgpr is inserted right before the branch, that move will
be inserted after exec has been overwritten, which might cause the move
to be skipped for some threads.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28041>
(cherry picked from commit 590ea76104)
2024-05-15 15:15:34 +02:00
Friedrich Vock
5f5ebee70b aco/tests: Insert p_logical_start/end in reduce_temp tests
Linear VGPR insertion will depend on a p_logical_end existing in the
blocks the VGPR is inserted in.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28041>
(cherry picked from commit 84c1870b65)
2024-05-15 15:15:34 +02:00
Marek Olšák
1145007a43 util: shift the mask in BITSET_TEST_RANGE_INSIDE_WORD to be relative to b
so that users don't have to shift it at every use. It was supposed to be
like this from the beginning.

Fixes: fb994f44d9 - util: make BITSET_TEST_RANGE_INSIDE_WORD take a value to compare with

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29187>
(cherry picked from commit 5502ecd771)
2024-05-15 15:15:34 +02:00
Dave Airlie
4d53dba4fa radv/video/encode: fix quality params on v2 hw.
This should have the extra dword as well.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29098>
(cherry picked from commit 2f02af39b3)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
175c92890d vulkan/wsi: Bind memory planes, not YCbCr planes.
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Fixes: f5433e4d6c ("vulkan/wsi: Add modifiers support to wsi_create_native_image")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10176
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24795>
(cherry picked from commit 28342a581f)
2024-05-15 15:15:34 +02:00
Faith Ekstrand
4bf6af791a nvk/upload_queue: Only upload one line of data
This only doesn't blow up beause we set multi_line_enable = FALSE.

Fixes: 2074e28a0d ("nvk: Add an upload queue")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29183>
(cherry picked from commit 9b098209b9)
2024-05-15 15:15:34 +02:00
David Heidelberg
87e5487d88 freedreno/ci: move the disabled jobs from include to the main file
Accidentally moved.

Fixes: 9442571664 ("ci: separate hiden jobs to -inc.yml files")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29155>
(cherry picked from commit d9a0373a65)
2024-05-15 15:15:34 +02:00
Yiwei Zhang
66b5cea130 turnip: msm: fix racy gem close for re-imported dma-buf
For dma-buf, if the import and finish occur back-2-back for the same
dma-buf, zombie vma cleanup will unexpectedly close the re-imported
dma-buf gem handle. This change fixes it by trying to resurrect from
zombie vmas on the dma-buf import path.

Fixes: 63904240f2 ("tu: Re-enable bufferDeviceAddressCaptureReplay")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29173>
(cherry picked from commit a1392394ba)
2024-05-15 15:15:34 +02:00
Yiwei Zhang
aaa8b36237 turnip: msm: clean up iova on error path
Fixes: e23c4fbd9b ("tu: Switch to userspace iova allocations if kernel supports it")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29173>
(cherry picked from commit 3909803849)
2024-05-15 15:15:34 +02:00
Patrick Lerda
426a615644 clover: fix memory leak related to optimize
Indeed, the object returned by LLVMCreatePassBuilderOptions()
was not freed.

For instance, this issue is triggered with "piglit/bin/cl-api-build-program":
Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f6b15abdf57 in operator new(unsigned long) (/usr/lib64/libasan.so.6+0xb2f57)
    #1 0x7f6afff6529e in LLVMCreatePassBuilderOptions llvm-18.1.5/lib/Passes/PassBuilderBindings.cpp:83
    #2 0x7f6b1186ee41 in optimize ../src/gallium/frontends/clover/llvm/invocation.cpp:521
    #3 0x7f6b1186ee41 in clover::llvm::link_program(std::vector<clover::binary, std::allocator<clover::binary> > const&, clover::device const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) ../src/gallium/frontends/clover/llvm/invocation.cpp:554
    #4 0x7f6b1150ce67 in link_program ../src/gallium/frontends/clover/core/compiler.hpp:78
    #5 0x7f6b1150ce67 in clover::program::link(clover::ref_vector<clover::device> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, clover::ref_vector<clover::program> const&) ../src/gallium/frontends/clover/core/program.cpp:78
    #6 0x7f6b11401a2b in clBuildProgram ../src/gallium/frontends/clover/api/program.cpp:283

Fixes: 2d4fe5f229 ("clover/llvm: move to modern pass manager.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29164>
(cherry picked from commit df39994d51)
2024-05-15 15:15:34 +02:00
Romain Naour
d7b877598f glxext: don't try zink if not enabled in mesa
Commit 7d9ea77b45 ("glx: add automatic zink fallback loading between hw and sw drivers")
added an automatic zink fallback even when the zink gallium is not
enabled at build time.

It leads to unexpected error log while loading drisw driver and
zink is not installed on the rootfs:

  MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so

Fixes: 7d9ea77b45 ("glx: add automatic zink fallback loading between hw and sw drivers")

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Reviewed-by: Antoine Coutant <antoine.coutant@smile.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478>
(cherry picked from commit 02ab51a61e)
2024-05-15 15:15:34 +02:00
Antoine Coutant
bdb59a3941 drisw: fix build without dri3
commit 1887368df4 ("glx/sw: check for modifier support in the kopper path")
added dri3_priv.h header and dri3_check_multibuffer() function in drisw that
can be build without dri3.

Commit 4477139ec2 added a guard around dri3_check_multibuffer()
function but not around dri3_priv.h header.

Add HAVE_DRI3 guard around dri3_priv.h header.

Fixes: 1887368df4 ("glx/sw: check for modifier support in the kopper path")

v2: Remove the guard around dri3_check_multibuffer() function.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Antoine Coutant <antoine.coutant@smile.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478>
(cherry picked from commit 3163b65ba7)
2024-05-15 15:15:34 +02:00
Mike Blumenkrantz
b937e65919 zink: clean up semaphore arrays on batch state destroy
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29152>
(cherry picked from commit 604573cf0a)
2024-05-15 15:15:34 +02:00
Eric Engestrom
946a776387 .pick_status.json: Update to d516721cd0 2024-05-15 15:15:34 +02:00
Eric Engestrom
07e97982df util/format: add missing null check in util_format_is_srgb()
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11137
Fixes: ff6cf60cb8 ("gallium/util: add util_format_is_srgb() helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29160>
(cherry picked from commit 8c22112a7d)
2024-05-15 15:15:34 +02:00
Eric Engestrom
b050d6abcc .pick_status.json: Update to 5502ecd771 2024-05-15 15:15:34 +02:00
Konstantin Seurer
ba0640296e radv: Zero initialize capture replay group handles
radv_serialized_shader_arena_block is not tightly packed and using an
initializer list leaves the gaps uninitialized.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28961>
(cherry picked from commit 406dda70e7)
2024-05-15 15:15:33 +02:00
Konstantin Seurer
07000d32d7 radv: Remove arenas from capture_replay_arena_vas
Avoids an use after free when looking up an arena.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28961>
(cherry picked from commit df82221bb3)
2024-05-15 15:15:33 +02:00
Konstantin Seurer
7e033ebcd5 radv: Fix radv_shader_arena_block list corruption
Remove it from the previous list befor adding it to a new one.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28961>
(cherry picked from commit e050abc961)
2024-05-15 15:15:33 +02:00
Tatsuyuki Ishi
42765877a9 radv: Remove radv_queue::device again
It was mistakenly revived.

Fixes: 0fb19b8331 ("radv: add radv_queue.h")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29151>
(cherry picked from commit e21ea25de9)
2024-05-15 15:15:33 +02:00
Bas Nieuwenhuizen
725ad01c71 radv: Use zerovram for Enshrouded.
Two users now reporting that zerovram fixes hangs.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10500
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29149>
(cherry picked from commit 79cb884275)
2024-05-15 15:15:33 +02:00
Faith Ekstrand
1b82d45d05 nvk/meta: Restore set_sizes[0]
Fixes: af3e7ba105 ("nvk: Stash descriptor set sizes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29147>
(cherry picked from commit c834644c4e)
2024-05-15 15:15:33 +02:00
Faith Ekstrand
61ab6dd15f nvk: Re-emit sample locations when rasterization samples changes
We need them for the case where explicit sample locations are not
enabled.  While we're at it, fix the case where rasterization_samples=0.
This can happen when rasterizer discard is enabled.  This fixes MSAA
resolves with NVK+Zink.  In particular, it fixes MSAA for the Unigine
Heaven and Valley benchmark.

This also fixes all of the spec@arb_texture_float@multisample-formats
piglit tests.

Fixes: 41d094c2cc ("nvk: Support dynamic state for enabling sample locations")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10786
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29147>
(cherry picked from commit a160c2a14e)
2024-05-15 15:15:33 +02:00
Mike Blumenkrantz
1b9927bc48 frontends/dri: always init opencl_func_mutex in InitScreen hooks
this otherwise leads to a mismatch where some types of screen may have
the mutex initialized while others don't, in which case dri_release_screen()
will attempt to destroy an uninitialized mutex

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29021>
(cherry picked from commit bc15c95c7a)
2024-05-15 15:15:33 +02:00
Mike Blumenkrantz
b397496ee8 frontends/dri: only release pipe when screen init fails
the caller (driCreateNewScreen3) will always call dri_destroy_screen()
when these functions return failure, so releasing the screen
is always wrong

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29021>
(cherry picked from commit a1225e81c9)
2024-05-15 15:15:33 +02:00
Mike Blumenkrantz
35590d038f freedreno/replay: use inttypes format string for 64bit
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29142>
(cherry picked from commit ae8fbe220a)
2024-05-15 15:15:33 +02:00
Eric Engestrom
329a7a6b78 .pick_status.json: Update to 406dda70e7 2024-05-15 15:15:33 +02:00
Lionel Landwerlin
8c0d63bce2 brw: add more condition for reducing sampler simdness
Running
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupColor test
with Zink on Anv we run into an assert :

assert(inst->mlen <= MAX_SAMPLER_MESSAGE_SIZE * reg_unit(devinfo));

Turns out we've not covered all the cases in the SIMD lowering.

It's a bit of a shame to have both files reproduce the same logic.
Will try to think of a better way to extract the layout of the a send
message but that'll be a much bigger rework.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29118>
(cherry picked from commit d1c01e256d)
2024-05-15 15:15:33 +02:00
Rhys Perry
ee40beb60d aco/waitcnt: fix DS/VMEM ordered writes when mixed
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28981>
(cherry picked from commit 5b1b09ad42)
2024-05-15 15:15:33 +02:00
Mike Blumenkrantz
d2fbe79d37 u_blitter: stop leaking saved blitter states on no-op blits
drivers expect blitter to clean up after itself

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29122>
(cherry picked from commit cd004defd4)
2024-05-15 15:15:33 +02:00
Mike Blumenkrantz
fe050bd235 zink: add a batch ref for committed sparse resources
this ensures that the sparse commit will complete before the resource
is destroyed

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29123>
(cherry picked from commit 67a356742f)
2024-05-15 15:15:33 +02:00
Alexandre Marquet
57a534364f pan/mdg: quirk to disable auto32
For some reason, flat shading on T604 does not work when using auto32 varyings
type.

This commit introduces a quirk for T60x, and some plumbing in pan_nir, allowing to
explicitely use appropriate types, rather than always using .u32 for flat shading.

Backport-to: 24.1
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10632
Signed-off-by: Alexandre Marquet <tb@a-marquet.fr>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28146>
(cherry picked from commit ee9809c889)
2024-05-15 15:15:33 +02:00
Georg Lehmann
de656a6afa zink: use bitcasts instead of pack/unpack double opcodes
The pack/unpack double opcodes may flush denorms, and the nir ops are pure
bitcasts.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29125>
(cherry picked from commit 925fff229f)
2024-05-15 15:15:33 +02:00
Karol Herbst
f91463e830 rusticl/icd: remove CLObject
I have no idea why I've added it in the first place, but it's causing dead
code warnings to appear with newer rustc versions, so remove it.

Fixes: 7f77f91929 ("rusticl/icd: split Arc part out of CLObject into new trait")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29120>
(cherry picked from commit 146ac5169d)
2024-05-15 15:15:33 +02:00
Mike Blumenkrantz
daac0812be egl/x11: disable dri3 with LIBGL_KOPPER_DRI2=1 as expected
cc: mesa-stable

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29106>
(cherry picked from commit 568807cf88)
2024-05-15 15:15:33 +02:00
Lionel Landwerlin
53c1539b0b anv: fix ycbcr plane indexing with indirect descriptors
We need to add the plane index to compute the address from which to
load the descriptor (anv_sampled_image_descriptor in this case).

This was likely broken before we added direct descriptor support so
that gets a stable backport.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11125
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29111>
(cherry picked from commit 665cad6408)
2024-05-14 14:16:02 +02:00
Tapani Pälli
4cb807647e anv: skip gfx push constants alloc optimization on gfx9/11
Always reallocate in cmd_buffer_flush_gfx_push_constants like was done
before the the optimization got introduced.

Fixes: 62d96a6546 ("anv: add dirty tracking for push constant data")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11064
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28999>
(cherry picked from commit c225f89d34)
2024-05-14 14:16:02 +02:00
Rob Clark
8ec4314f5e tu: Fix a6xx lineWidthGranularity
Fixes dEQP-VK.info.device_properties.

Fixes: 48da361eb7 ("tu: wideLines support for a7xx.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29088>
(cherry picked from commit a3e5c15664)
2024-05-14 14:16:02 +02:00
José Expósito
25aa178802 meson: Update proc_macro2 meson.build patch
Update the proc-macro2/meson.build to include the changes from v1.0.81.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11071
Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28923>
(cherry picked from commit 18c5315731)
2024-05-14 14:16:02 +02:00
Eric Engestrom
0d6f86f7ca .pick_status.json: Update to 18c5315731 2024-05-14 14:16:02 +02:00
Eric Engestrom
71f25dc28c VERSION: bump for 24.1.0-rc3 2024-05-08 15:28:54 +02:00
Karol Herbst
abce42ced6 rusticl: use stream uploader for cb0 if prefered
Using the same buffer without a barrier actually can lead to data races as
drivers might not properly synchronize the content. Using the stream
uploader is a neat fix which prevents us from having to use a barrier but
still keep high throughput when launching kernels back-to-back.

Fixes: 5ff33f9905 ("rusticl: use real buffer for cb0 for drivers prefering")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27666>
(cherry picked from commit 8da8c6c2d8)
2024-05-08 14:37:58 +02:00
Eric Engestrom
50971e459e .pick_status.json: Update to b8e79d2769 2024-05-08 14:37:55 +02:00
David Rosca
8b6095c17e Revert "radeonsi/vcn: AV1 skip the redundant bs resize"
Currently ffmpeg has a bug in VAAPI AV1 decode that in some cases
it submits the same slice data buffer as many times as there is tiles.
However, in other cases it behaves correctly and all slice data buffers
contain different parts of bitstream to decode which this change breaks.

Now that the va frontend is passing correct offsets, this fixes decoding
AV1-TEST-VECTORS/av1-1-b8-22-svc-L1T2 with ffmpeg.

This reverts commit e6701f7231.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28960>
(cherry picked from commit 88dfe04b08)
2024-05-07 18:20:25 +02:00
David Rosca
e8f360c32c frontends/va: Fix AV1 slice_data_offset with multiple slice data buffers
The slice parameter data offset refers to offset in the submitted data buffer.
When multiple slice data buffers are submitted, the offsets of all slices needs
to be adjusted to be based from the start of the first data buffer.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28960>
(cherry picked from commit 6746d4df6e)
2024-05-07 18:20:25 +02:00
Connor Abbott
f24ce4cd7c docs/android: Fix example meson cross file again
I copied it over wrong, it should be cpu_family that's changed to
aarch64 to avoid "error: undefined symbol: blake3_hash_many_neon".

Fixes: 57abef5af1 ("docs/android: Fix example meson cross file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29081>
(cherry picked from commit 4cefb5ece8)
2024-05-07 18:20:25 +02:00
Constantine Shablia
063edd4df1 panfrost: report correct MAX_VARYINGS
Fixes packing-varying piglit failures

Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29017>
(cherry picked from commit 81f42d82ed)
2024-05-07 18:20:25 +02:00
Boris Brezillon
965f8b10d5 pan/kmod: Make default allocator thread-safe
Allocations targeting a pan_kmod_dev can happen concurrently, so we
need the pan_kmod_dev allocator to be thread-safe.

ralloc() is not thread-safe, and we don't really need a hierarchical
allocator in this context anyway, so let's just switch to calloc/free
instead.

Fixes: d95ec56f8c ("panfrost: Abstract kernel driver operations")
Reported-by: Eric Smith <eric.smith@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Eric Smith <eric.smith@collabora.com>
Reviewed-by: Eric Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28926>
(cherry picked from commit 4c74d14730)
2024-05-07 18:20:25 +02:00
Boris Brezillon
1f917b8814 pan/kmod: Fix a syncobj leak in the panthor backend
Make sure we release the syncobj attached to the BO if the object is
sharable.

Fixes: 97f6a62f7e ("pan/kmod: Add a backend for panthor")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Constantine Shablia <constantine.shablya@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28926>
(cherry picked from commit 068d111884)
2024-05-07 18:20:25 +02:00
Boris Brezillon
ddf6f67b07 panfrost: Add the BO containing fragment program descriptor to the batch
On pre-Valhall HW, the fragment shader metadata was part of the RSD
(renderer state descriptor), which was emitted at draw time, but
Valhall introduces a shader program descriptor containing only the
shader information, and this one is emitted at shader preparation
time.

If we don't add the FS state BO to batch, we might end up with a batch
being executed after the shader object has been destroyed, leading to
page faults when the GPU tries to access the shader program descriptor.

We make the panfrost_batch_add_bo() unconditional since it gracefully
handles the NULL case (which will happen on v7-).

Fixes: 087b63cb07 ("panfrost: Allow uploading fragment SPDs")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28926>
(cherry picked from commit 2cc317763c)
2024-05-07 18:20:25 +02:00
Tapani Pälli
2f97ea3a95 iris: change stream uploader default size to 2MB
Patch bumps up the size to the 2MB alignment, this fixes rendering
issues with Star Wars KOTOR when VBO's are not used (which is the
default setting).

Fixes: 0b6693a3a1 ("iris: Align fresh BO allocations to 2MB in size")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10863
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28974>
(cherry picked from commit cbe2630f19)
2024-05-07 18:20:24 +02:00
Mykhailo Skorokhodov
e568bbf410 ci/lima: expect fail of window_8888_colorspace_srgb on wayland
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29052>
(cherry picked from commit 1cc4812398)
2024-05-07 18:20:24 +02:00
Mykhailo Skorokhodov
f45a1d102d egl/wayland: Fix sRGB format look up for config
That check should help with situations when
the dri2_wl_visual_idx_from_pipe_format function
can't recognize pipe_format as before.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10829
Fixes: 6a084e2b("egl/wayland: Use pipe_format to look up configs")
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29052>
(cherry picked from commit 066fc39f45)
2024-05-07 15:56:28 +02:00
Eric Engestrom
1255b12f3f .pick_status.json: Update to 9666756f60 2024-05-07 15:56:18 +02:00
Karol Herbst
927bbf50e1 nir: fix nir_shader_get_function_for_name for functions without names.
It's legal in SPIRV for functions to not have names, we have to take this
into account when calling into strcmp here.

Fixes: 2aa9eb497d ("nir: Add a helper for finding a function by name")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29063>
(cherry picked from commit 569c2fcf95)
2024-05-06 19:40:43 +02:00
Mike Blumenkrantz
0930b6927d zink: clean up accidental debug print
Fixes: 19e8df39b6 ("zink: slightly better swapinterval failure handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29065>
(cherry picked from commit 13bd413860)
2024-05-06 19:40:43 +02:00
Patrick Lerda
c0d4d3e576 clover: fix pipe_box update regression
Indeed, clover was processing the pipe_box elements with a hardcoded
order. The update of the pipe_box object broke clover.

Fixes: 651191801a ("gallium: increase the size of pipe_box y, height fields to allow bigger textures")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29060>
(cherry picked from commit f848921148)
2024-05-06 19:40:42 +02:00
Karol Herbst
02e295cb5c nouveau: fix potential double-free in nouveau_drm_screen_create
Fixes: 821f4c8d99 ("nouveau: import libdrm_nouveau")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29000>
(cherry picked from commit d163498dbe)
2024-05-06 19:40:42 +02:00
Lionel Landwerlin
27cf49205c anv: fix leak of custom border colors
Inside a HAVE_VALGRIND section.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4dad2a4a6f ("anv: enable shader border color capture/replay")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29057>
(cherry picked from commit ae6d20815a)
2024-05-06 19:40:41 +02:00
Lionel Landwerlin
ec0e288fa7 anv: fixup alloc failure handling in reserved_array_pool
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 806281f61f ("anv: add a new reserved pool for capture/release")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29057>
(cherry picked from commit e260b16b11)
2024-05-06 19:40:40 +02:00
Christian Gmeiner
9eb0a4292f clc: Always use spir for 32 bit
Fixes unknown target triple
'unknown-unknown-unknown-spirv-unknown-unknown' problem with llvm 17 on
a 32 bit system.

Fixes: 22fa315ee0 ("clc: use spirv triple starting with llvm-17")

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29049>
(cherry picked from commit db7bfe85ae)
2024-05-06 19:40:39 +02:00
Eric Engestrom
e0c70876dd .pick_status.json: Update to 569c2fcf95 2024-05-06 19:40:33 +02:00
Georg Lehmann
b897d0bac1 radv, radeonsi: don't use D16 for f2f16_rtz
D16 rounds towards zero for fp32 -> fp16, but for fixed point it rounds to
nearest even in fp16. MIMG without D16 also rounds to nearest even, but in fp32.
This means D16 and f2f16_rtz(tex@32) can produce different results.

Sadly this also means we can never use d16 if fp16 rounding isn't undefined.

Cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28730>
(cherry picked from commit 3a35522c8a)
2024-05-05 15:47:07 +02:00
Ian Romanick
e0899ef81a intel/elk: Fix optimize_extract_to_float for i2f of unsigned extract
Fixes fs-uint-to-float-of-extract-int8.shader_test and
fs-uint-to-float-of-extract-int16.shader_test added by piglit!883.

v2: Expand the comment explaining the potential problem. Suggested by
Caio.

Fixes: e6022281f2 ("intel/elk: Rename files to use elk prefix")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27891>
(cherry picked from commit 0fa17962d6)
2024-05-05 15:47:07 +02:00
Ian Romanick
55ad51ff40 intel/brw: Fix optimize_extract_to_float for i2f of unsigned extract
Fixes fs-uint-to-float-of-extract-int8.shader_test and
fs-uint-to-float-of-extract-int16.shader_test added by piglit!883.

No shader-db or fossil-db changes on any Intel platform.

v2: Expand the comment explaining the potential problem. Suggested by
Caio.

Fixes: 29ce110be6 ("i965/fs: Remove extract virtual opcodes.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27891>
(cherry picked from commit bf5d82654a)
2024-05-05 15:47:02 +02:00
Gert Wollny
80d8da9d7d mesa/st: don't use base shader serialization when uniforms are not packed
When loading the base shader serialization there is a discrepancy
between the state parameters that may already have been optimized,
because after storing the serialization the shader went through
st_finalize_nir, and _mesa_optimize_state_parameters was run, so
that original state parameters may have been optimized and replaced
by new parameters.

After get_nir_shader is called, the original state parameters are
re-added - in addition to the optimized parameters. This lead to
an bug with the uniform offsets when lowering uniforms to UBOs.

Therefore, as a hotfix for drivers that don't support packed
uniforms, ignore the base serialization and use the
serialization obtained after st_finalize_nir was run. With that
the problem can be avoided.

Fixes: 5eb0136a3c
    mesa/st: when creating draw shader variants,
    use the base nir and skip driver opts

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10881

v2: reorder conditional evaluation for better readability (zmike)
v3: revert c72bb8de7 ("r300: mark new fails") (Pavel Ondračka)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28994>
(cherry picked from commit 7de8a01087)
2024-05-05 15:47:01 +02:00
Gert Wollny
80af43b9be zink/kopper: Wait for last QueuePresentKHR to finish before acquiring for readback
When a job is submitted to the flush_queue the resource dt_idx is reset,
and if a readback is requested then we have to make sure that the
corresponding kopper_preset has finished before we can acquire the image
for readback, so wait for the according fence in this case.

This fixes the validation error UNASSIGNED-Threading-MultipleThreads-Write
    triggered by piglit "read-front" lavapipe.

    Fixes: 8ade5588e3
        zink: add kopper api

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28127>
(cherry picked from commit 811ed62865)
2024-05-05 15:47:00 +02:00
Sviatoslav Peleshko
00b2aaf260 anv: Fix descriptor sampler offsets assignment
This seems to be a simple copy-paste mistake. It makes sense to or-assign
surface offsets because we clear the actual offset part with a mask first,
but sampler offsets should be just assigned instead.

Fixes: 7c76125d ("anv: use 2 different buffers for surfaces/samplers in descriptor sets")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10790
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29019>
(cherry picked from commit 39c4de7e42)
2024-05-05 15:47:00 +02:00
Rohan Garg
60bb6425a7 anv: allocate space for generated indirect draw id's using the temporary allocation helper
Generated Indirect Draw's need a small temporary allocate to store draw
id's. Use the new temporary allocation helper to allocate that space.

Fixes: 82d772fa9b ("anv: create new helper for small allocations")
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28989>
(cherry picked from commit e50234de86)
2024-05-05 15:46:59 +02:00
Yusuf Khan
7252bb2d96 nouveau: Fix crash when destination or source screen fences are null
Fixes: dEQP-EGL.functional.sharing.gles2.multithread.random_egl_sync.*,
one of them, its quite finiky, one may say random

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28618>
(cherry picked from commit 482d9fcbf3)
2024-05-05 15:46:58 +02:00
Iván Briano
726c28f92f anv: fix casting to graphics_pipeline_base
The macro takes the type of the pipeline to check for, but the cast to
base checks for a full graphics pipeline, so if used on a library one it
fails.

Cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29011>
(cherry picked from commit 6223388c73)
2024-05-05 15:46:58 +02:00
Eric Engestrom
db1835d8ca .pick_status.json: Update to 603982ea80 2024-05-05 15:46:46 +02:00
Eric Engestrom
f3ff3d86ef VERSION: bump for 24.1.0-rc2 2024-05-01 15:02:04 +02:00
Eric Engestrom
4e0125bdaa meson: move tsan-blacklist.txt to build-support with the other build support files
Fixes: 0d46e0e88b ("meson: Add blacklist when compiling with tsan")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28996>
(cherry picked from commit 47f6e24ad5)
2024-05-01 13:21:56 +02:00
Eric Engestrom
b52d5496d8 meson: simplify -gsplit-dwarf compiler argument check
Fixes: 44b080af07 ("meson: implement split-debug")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28898>
(cherry picked from commit 11b060f41a)
2024-05-01 13:21:55 +02:00
Eric Engestrom
281ac5e61b .pick_status.json: Update to 47f6e24ad5 2024-05-01 13:21:50 +02:00
Iago Toral Quiroga
0874a9f6fb v3dv: fix VK_KHR_vertex_attribute_divisor
When this was promoted to EXT it expanded its properties struct to add a new
supportsNonZeroFirstInstance field.

Fixes: d38ff02c03 ("v3dv: mark some promoted extensions as supported")
Fixes: dEQP-VK.api.info.vulkan1p2_limits_validation.khr_vertex_attribute_divisor

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28964>
(cherry picked from commit e8f96dd0b0)
2024-04-30 14:22:41 +02:00
Patrick Lerda
7d91b15bc2 gallium/auxiliary/vl: fix typo which negatively impacts the src_stride initialization
Note: As a matter of fact, this change by itself makes vdpau on r600 works again.
Indeed, r600 sets the stride value with vertex_buffer_index as the r600 index;
vertex_buffer_index was set to zero at the vl_compositor/init_buffers() stage on
the three elements. As a consequence of this typo the stride value was overwritten
to zero. This was breaking vdpau.

Fixes: 76725452 ("gallium: move vertex stride to CSO")
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10468
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10267
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28966>
(cherry picked from commit fe8fdc58db)
2024-04-30 14:22:39 +02:00
Mike Blumenkrantz
14868a48f7 kopper: don't set drawable buffer age
this is broken

Fixes: 2a8c6cf7ac ("kopper: set drawable buffer age")

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28904>
(cherry picked from commit ad39355e83)
2024-04-30 14:22:38 +02:00
Mike Blumenkrantz
5b00c6e704 zink: slightly better swapinterval failure handling
retain the old mode and print an error

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28904>
(cherry picked from commit 19e8df39b6)
2024-04-30 14:22:36 +02:00
Mike Blumenkrantz
56a8bde81d kopper: fix bufferage/swapinterval handling for non-window swapchains
if swapchain creation fails (e.g., insane cts swapchain configs), the
swapchain gets demoted to a non-window image that is still accessed by
the frontend. this image should not ever hit corresponding zink entrypoints
for swapchain-only images, which requires a flag to test swapchain-edness

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28904>
(cherry picked from commit a50c17802a)
2024-04-30 14:22:35 +02:00
JCWasmx86
235d807e93 meson: Fix invalid kwarg name
Introduced in !28576

Fixes:  44b080af ("meson: implement split-debug")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28924>
(cherry picked from commit 7352f948be)
2024-04-30 14:22:34 +02:00
Eric Engestrom
0eea740999 .pick_status.json: Update to 86281ef15f 2024-04-30 14:22:32 +02:00
David Rosca
69ca6360f7 radeonsi/vcn: Only enable VBAQ with rate control mode
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10020
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28945>
(cherry picked from commit bc72126cb4)
2024-04-29 16:32:39 +02:00
David Rosca
526eeb0b86 radeonsi/vcn: Fix 10bit HEVC VPS general_profile_compatibility_flags
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28945>
(cherry picked from commit b144f50190)
2024-04-29 16:32:38 +02:00
David Rosca
9fff8df5c3 radeonsi/vcn: Allocate session buffer in VRAM
It's never mapped so there's no reason for PIPE_USAGE_STAGING.
Improves encoding performance on dGPUs.

Tested with 7900XTX (before 1900fps => after 2100fps):

  ffmpeg -hide_banner -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 \
  -f lavfi -i testsrc=size=640x640,format=nv12 -vf hwupload -c:v av1_vaapi \
  -f null -

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28945>
(cherry picked from commit cc0df497f0)
2024-04-29 16:32:38 +02:00
Samuel Pitoiset
f3c64c2ff6 radv: remove bogus VkShaderCreateInfoEXT::flags being 0 assert for compute
This was a leftover. Flags can be different than 0, like for required
subgroup size and it should already be correctly supported.

Fixes recent dEQP-VK.shader_object.performance.dispatch_base.

Fixes: 37d7c2172b ("radv: add support for creating/destroying shader objects")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28946>
(cherry picked from commit 0b51868193)
2024-04-29 16:32:37 +02:00
Konstantin Seurer
3e37814956 nir/print: Do not access invalid indices of load_uniform
load_uniform does not have io_semantics and component.

Fixes: a83fd26 ("nir/print: stop trying to match i/o vars using base/driver_location")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28962>
(cherry picked from commit ea863c0c1c)
2024-04-29 16:32:37 +02:00
Yiwei Zhang
d994133c8b venus: fix to destroy all pipeline handles on early error paths
For early error returns, all pipeline handles have to be destroyed.
Otherwise the caller will treat those valid handles as successfully
created pipeline objects.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28944>
(cherry picked from commit 4ec84adbed)
2024-04-29 16:32:36 +02:00
Michel Dänzer
d051c7f304 wsi/wayland: Dispatch event queue in wsi_wl_swapchain_queue_present
With explicit sync, only if it wasn't done earlier for FIFO.

Prevents potentially unbounded memory usage for (wl_buffer.release
events in) the queue, since we don't dispatch the queue anywhere else
with explicit sync.

v2:
* Use wl_display_dispatch_queue_pending instead of
  wl_display_dispatch_queue_timeout. (Sebastian Wick)
* Call it from wsi_wl_swapchain_queue_present instead of
  wsi_wl_swapchain_acquire_next_image_explicit. (Joshua Ashton)

Fixes: 5f7a5a27ef ("wsi: Implement linux-drm-syncobj-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28874>
(cherry picked from commit c3be21f177)
2024-04-29 16:32:35 +02:00
Matt Turner
7ad091b02c intel: Build float64 shader only for Vulkan
It's only used by anv and it requires glslang, which isn't otherwise
required for building iris.

Fixes: b52e25d3a8 ("anv: rewrite internal shaders using OpenCL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28943>
(cherry picked from commit 2a417e3fc1)
2024-04-29 16:32:35 +02:00
Connor Abbott
c4e621471f ir3/ra: Don't demote movmsk instructions to non-shared
It only supports shared register destinations.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
(cherry picked from commit dbeeec2570)
2024-04-29 16:32:34 +02:00
Connor Abbott
f7a8e1a126 ir3: Add scan_clusters.macro to is_subgroup_cond_mov_macro()
Fixes: 60413e1 ("ir3: optimize subgroup operations using brcst.active")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
(cherry picked from commit 3c71667dda)
2024-04-29 16:32:34 +02:00
Connor Abbott
6b138e0e75 ir3: Add scan_clusters_macro to ir3_valid_flags()
Fixes: 60413e1 ("ir3: optimize subgroup operations using brcst.active")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
(cherry picked from commit 031b612449)
2024-04-29 16:32:33 +02:00
Erik Faye-Lund
cf443b52c7 panvk: avoid dereferencing a null-pointer
If we're passed a memory-info, but no memory-prop, we'd end up
dereferencing a null-pointer here. Let's use a fallback struct instead,
similar to what RADV does.

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
CID: 1496060
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28856>
(cherry picked from commit 3b3df7b8a9)
2024-04-29 16:32:33 +02:00
Erik Faye-Lund
06995f634f panfrost: correct first-tracking for signature
If we unconditionally assign false to first *before* we use it, it's
never true when used. Instead, let's assign it *both* at the end *and*
when continuing.

Fixes: 4da88060d0 ("panfrost: Skip blit shader labelling if the buffer has no space")
CID: 1476270
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28856>
(cherry picked from commit 9058d5ff62)
2024-04-29 16:32:32 +02:00
Erik Faye-Lund
afb24c6612 panfrost: do not deref potentially null pointer
We need to check for failure to import *before* we dereference here.

Fixes: f94889d079 ("panfrost: Make pan_texture.{c,h} panfrost_bo agnostic")
CID: 1587376
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28856>
(cherry picked from commit 8deaf37047)
2024-04-29 16:32:31 +02:00
Boris Brezillon
926715dcb8 panfrost: do not write outside num_wg_sysval
This array has 3 components, because it's meant to hold the X, Y and Z
components of the work-group size sysval. However, mir_pick_ubo assumes
vec4 for the push-uniforms, which ends up promoting this to 4
components.

So let's make sure we don't write that last component. It's not going to
do anything good.

In practice, this leads to the viewport descriptor being smashed, which
doesn't actually do any real-world harm, because this only happens in
compute batches where that descriptor is unused. However, writing
outside of arrays is undefined behavior, so we should fix it regardless.

Fixes: 5006167061 ("panfrost: Hook-up indirect dispatch support")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28856>
(cherry picked from commit 186f7fa915)
2024-04-29 16:32:30 +02:00
David Rosca
dd48005fc6 radv/video: Report maxBitrate in encode capabilities
Some cards can do higher bitrate, but 1000 Mbit/s should be high enough
for any practical use. It's also the value that AMF reports as max bitrate.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28736>
(cherry picked from commit 1f07f5a79b)
2024-04-29 16:30:26 +02:00
David Rosca
cb75aa3dfe radv/video: Check encode profiles and bit depth in capabilities query
Fixes: 967e4e09de ("radv/video: add h265 encode support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28736>
(cherry picked from commit c210bb7952)
2024-04-29 16:30:25 +02:00
David Rosca
c8a6c7ff02 radv/video: Set correct bit depth and format for 10bit input
Fixes: 967e4e09de ("radv/video: add h265 encode support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11011
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28736>
(cherry picked from commit 2d0282f576)
2024-04-29 16:30:24 +02:00
Konstantin Seurer
3315d83248 radv: Handle all dependencies of CmdWaitEvents2
The spec describes pDependencyInfos as an array with eventCount elements.

cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10579
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28896>
(cherry picked from commit d6c9b1d03f)
2024-04-29 16:30:21 +02:00
Ryan Neph
2bf927dcce venus: reclaim signal semaphore feedback resources for wasteful clients
Pending feedback resources (cmds, buffers, slots) for timeline semaphores are
generally reclaimed for re-use during subsequent semaphore waits/queries or any
queue submission containing at least one "wait" semaphore.

They are never reclaimed in the unexpected case when all submissions only
contain "signal" timeline semaphores, which consume such resources but
are never subsequently queried or waited upon.

This strange behavior is observed in several Valve games (Portal 2,
L4D2, CS2), which all run natively on linux with their own internal
distributions of DXVK v2.0 (at time of this MR submission). A Cursory
analysis of recent DXVK history indicates that it may be gone by v2.1.

The consequence is rapid guest memory leak and host Vk resource leak,
resulting in a crash within 1-2 minutes.

Fix that leak by running the reclaimation procedure for submissions with
_any_ accompanying semaphores.

Fixes: d63432012d ("venus: refactor semaphore feedback")
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28915>
(cherry picked from commit ee7e0168a1)
2024-04-29 16:30:20 +02:00
Yiwei Zhang
065b7b4d37 venus: avoid client allocators for ring internals
There're many cases in which the ring submissions must succeed. We don't
worry about real oom since things would fail earlier. For simulated oom
from random intentional allocs, there isn't robust way to fail those
must succeeds. e.g. the commands that don't have return codes or valid
error return struct defaults. So real oom propagation is still at best
effort.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28914>
(cherry picked from commit 3e16d25d1a)
2024-04-29 16:30:19 +02:00
Lionel Landwerlin
1f04269566 intel/brw: fixup wm_prog_data_barycentric_modes()
Always select sample barycentric when persample dispatch is unknown at
compile time and let the payload adjustments feed the expected value
based on dispatch.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27803>
(cherry picked from commit 1bbe2d9833)
2024-04-29 16:30:18 +02:00
Mike Blumenkrantz
9eb7ff49a4 zink: fully wait on all program fences during ctx destroy
optimized pipeline compile jobs may still be ongoing during ctx
destroy, and these must complete too or else crashes will occur

fixes shutdown crash with dEQP-EGL.functional.sharing.gles2.multithread.simple.images.texture_source.teximage2d_render

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28900>
(cherry picked from commit bd1a3921d1)
2024-04-29 16:30:17 +02:00
Mike Blumenkrantz
ab4db3b681 zink: prune zink_shader::programs under lock
it's possible for a shader to be precompiling its separate shader variants
during destruction, which requires that the programs set be iterated
under lock in order to prune every new variant as it is created without
crashing

fixes crashes in spec@arb_separate_shader_objects@400 combinations.*

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28900>
(cherry picked from commit f18a1d3a31)
2024-04-29 16:30:17 +02:00
Iván Briano
0e3116b978 anv: check requirements for VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE
Somehow I missed this one in 164c0951a0

If the format the image is being created with doesn't have the FSR
format feature, report it as unsupported.

Also fixes future CTS tests: dEQP-VK.api.info.unsupported_image_usage.*

Cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28913>
(cherry picked from commit 8ebf07eccd)
2024-04-29 16:30:16 +02:00
Eric Engestrom
89c7f85d5d ci: pass MESA_VK_ABORT_ON_DEVICE_LOSS through to the DUT
Fixes: 9bbbe90f06 ("ci: enable MESA_VK_ABORT_ON_DEVICE_LOSS globally")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28940>
(cherry picked from commit 497672ac74)
2024-04-29 16:30:15 +02:00
Tomeu Vizoso
d80f150bbf etnaviv/nn: Make parallel jobs disabled by default
It doesn't work for all models, with the same happening to the
proprietary driver. There may be some hardware limitation on at least
the HW that is currently supported in Mesa.

So match what the proprietary driver is doing and disable by default.

Fixes: d6473ce28e ("etnaviv: Use NN cores to accelerate convolutions")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28918>
(cherry picked from commit 1277f58d8a)
2024-04-29 16:30:13 +02:00
Rohan Garg
7d8190bc7e anv: formatting fix when printing pipe controls
Fixes: abc4111 ('anv: pass steam output as argument for anv_dump_pipe_bits')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28931>
(cherry picked from commit b406759479)
2024-04-29 16:30:13 +02:00
Mike Blumenkrantz
9ff7c70589 zink: reconstruct features pnext after determining extension support
for extensions that require features/properties to enable support, this
avoids adding the feature struct to the device createinfo

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11067

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28925>
(cherry picked from commit 2c180c47f7)
2024-04-29 16:30:12 +02:00
Daniel Schürmann
0cbf577433 aco/ra: fix kill flags after renaming fixed Operands
Suggested-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28876>
(cherry picked from commit be1e68b4ee)
2024-04-29 16:30:12 +02:00
Eric Engestrom
4f205bc37e .pick_status.json: Update to 8248cc0bf4 2024-04-29 16:30:08 +02:00
Mike Blumenkrantz
30f5352649 glthread: check for invalid primitive modes in DrawElementsBaseVertex
fixes KHR-GLESEXT.draw_elements_base_vertex_tests.invalid_mode_argument

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28903>
(cherry picked from commit 4660ee1dea)
2024-04-25 16:50:35 +02:00
Constantine Shablia
15466d7d79 pan/bi: fix 1D array tex coord lowering
We were erroneously specifying Y for 1D arrays

Cc: mesa-stable
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-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/28899>
(cherry picked from commit 3139f8f623)
2024-04-25 16:50:28 +02:00
Mary Guillemard
01f45e49d4 nak: Pass has_mod to all form of src2 requiring it
This was missing from the original changes and was causing HFMA2 to
misbehave with an immediate value.

Also fix inverted value passed around for cbuf and ureg forms.

Fixes: bad23ddb48 ("nak: Add F16 and F16v2 sources")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28828>
(cherry picked from commit 40422927dc)
2024-04-25 16:50:28 +02:00
Lionel Landwerlin
e08d22ae86 anv: disable dual source blending state if not used in shader
Fixing some simulation issues on Gfx9/11 with zink on anv running dual
source blending piglit tests like :

   ./bin/arb_blend_func_extended-dual-src-blending-discard-without-src1 -auto -fbo

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28901>
(cherry picked from commit 68dfe17abc)
2024-04-25 16:50:27 +02:00
Kenneth Graunke
cc5da81e31 isl: Set MOCS to uncached for Gfx12.0 blitter sources/destinations
We were accidentally leaving XY_BLOCK_COPY_BLT's Source and Destination
MOCS fields set to 0 (Error: Reserved for Non-Use) on Gfx12.0 systems.
This was causing assert fails in debug builds, since we try to ensure
that we don't do that.  In theory, MOCS 0 is supposed to be equivalent
to MOCS 2 (all the caching), but...we probably ought to use MOCS 3
(uncached).  Every Gfx12.5+ platform requires it, so although there
isn't a note about Gfx12.0 needing that, it's possible that it does.
We're currently only using the blitter for DRI PRIME blits on Gfx12.0,
anyway, and I think we're flushing all the caches regardless.

This bug was somewhat obscure to hit:
- You need a hybrid graphics system with Gfx12.0 and some other GPU
- You have to be using "reverse PRIME", i.e. rendering on the integrated
  GPU and displaying on the discrete one.  This is not the common case.
- You have to be using a debug build.

No observable performance delta in GfxBench5 Car Chase (an arbitrary
program) when rendering on Alderlake GT1 and displaying on an Arc A770.

Fixes: 194afe8416 ("anv/iris/blorp: use the right MOCS values for each engine")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28894>
(cherry picked from commit e6fb3ba037)
2024-04-25 16:50:27 +02:00
Samuel Pitoiset
99627c617c radv: fix image format properties with fragment shading rate usage
This was missing and this caused test failures for formats different
than VK_FORMAT_R8_UINT which is the only one supported for FSR.

Fixes recent
dEQP-VK.api.info.unsupported_image_usage.*.fragment_shading_rate_attachment.*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28893>
(cherry picked from commit e8d94536d2)
2024-04-25 16:50:26 +02:00
Eric Engestrom
6927823307 .pick_status.json: Update to 84632dce93 2024-04-25 16:50:22 +02:00
Eric Engestrom
1d8901f345 ci: fix container rules on release branches and tags
Fixes: 2487e18d4e ("ci: bare-metal: poe: Create strutured logs")
Fixes: 7c0b19a607 ("ci: run python-test automatically only in merge pipelines")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28911>
(cherry picked from commit 0666a715c7)
2024-04-25 16:48:54 +02:00
Eric Engestrom
418e19a6ff .pick_status.json: Update to 4660ee1dea 2024-04-25 16:16:21 +02:00
Eric Engestrom
b0de5e98f0 VERSION: bump for 24.1.0-rc1 2024-04-24 22:28:09 +02:00
615 changed files with 73251 additions and 3414 deletions

View File

@@ -33,7 +33,7 @@ workflow:
# merge pipeline
- if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/${KERNEL_REPO}/${KERNEL_TAG}
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${KERNEL_TAG}
MESA_CI_PERFORMANCE_ENABLED: 1
VALVE_INFRA_VANGOGH_JOB_PRIORITY: "" # Empty tags are ignored by gitlab
# post-merge pipeline
@@ -41,24 +41,24 @@ workflow:
# nightly pipeline
- if: &is-scheduled-pipeline $CI_PIPELINE_SOURCE == "schedule"
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/${KERNEL_REPO}/${KERNEL_TAG}
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${KERNEL_TAG}
JOB_PRIORITY: 50
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
# pipeline for direct pushes that bypassed the CI
- if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $GITLAB_USER_LOGIN != "marge-bot"
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/${KERNEL_REPO}/${KERNEL_TAG}
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${KERNEL_TAG}
JOB_PRIORITY: 40
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
# pre-merge or fork pipeline
- if: $FORCE_KERNEL_TAG != null
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/${KERNEL_REPO}/${FORCE_KERNEL_TAG}
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${FORCE_KERNEL_TAG}
JOB_PRIORITY: 50
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
- if: $FORCE_KERNEL_TAG == null
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/${KERNEL_REPO}/${KERNEL_TAG}
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${KERNEL_TAG}
JOB_PRIORITY: 50
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
@@ -72,14 +72,24 @@ variables:
bash download-git-cache.sh
rm download-git-cache.sh
set +o xtrace
CI_JOB_JWT_FILE: /minio_jwt
S3_JWT_FILE: /s3_jwt
S3_HOST: s3.freedesktop.org
# This bucket is used to fetch the kernel image
S3_KERNEL_BUCKET: mesa-rootfs
# Bucket for git cache
S3_GITCACHE_BUCKET: git-cache
# Bucket for the pipeline artifacts pushed to S3
S3_ARTIFACTS_BUCKET: artifacts
# Buckets for traces
S3_TRACIE_RESULTS_BUCKET: mesa-tracie-results
S3_TRACIE_PUBLIC_BUCKET: mesa-tracie-public
S3_TRACIE_PRIVATE_BUCKET: mesa-tracie-private
# per-pipeline artifact storage on MinIO
PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
PIPELINE_ARTIFACTS_BASE: ${S3_HOST}/${S3_ARTIFACTS_BUCKET}/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
# per-job artifact storage on MinIO
JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
# reference images stored for traces
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${S3_HOST}/mesa-tracie-results/$FDO_UPSTREAM_REPO"
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE: "${S3_HOST}/${S3_TRACIE_RESULTS_BUCKET}/$FDO_UPSTREAM_REPO"
# For individual CI farm status see .ci-farms folder
# Disable farm with `git mv .ci-farms{,-disabled}/$farm_name`
# Re-enable farm with `git mv .ci-farms{-disabled,}/$farm_name`
@@ -93,13 +103,16 @@ variables:
MESA_SPIRV_LOG_LEVEL: error
default:
id_tokens:
S3_JWT:
aud: https://s3.freedesktop.org
before_script:
- >
export SCRIPTS_DIR=$(mktemp -d) &&
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh" &&
. ${SCRIPTS_DIR}/setup-test-env.sh &&
echo -n "${CI_JOB_JWT}" > "${CI_JOB_JWT_FILE}" &&
unset CI_JOB_JWT # Unsetting vulnerable env variables
echo -n "${S3_JWT}" > "${S3_JWT_FILE}" &&
unset CI_JOB_JWT S3_JWT # Unsetting vulnerable env variables
after_script:
# Work around https://gitlab.com/gitlab-org/gitlab/-/issues/20338
@@ -108,9 +121,9 @@ default:
- >
set +x
test -e "${CI_JOB_JWT_FILE}" &&
export CI_JOB_JWT="$(<${CI_JOB_JWT_FILE})" &&
rm "${CI_JOB_JWT_FILE}"
test -e "${S3_JWT_FILE}" &&
export S3_JWT="$(<${S3_JWT_FILE})" &&
rm "${S3_JWT_FILE}"
# Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
@@ -263,8 +276,7 @@ make git archive:
# compress the current folder
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
- ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
- ci-fairy s3cp --token-file "${S3_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
# Sanity checks of MR settings and commit logs
sanity:

View File

@@ -10,7 +10,7 @@ if [ -z "$BM_POE_ADDRESS" ]; then
exit 1
fi
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((48 + BM_POE_INTERFACE))"
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((${BM_POE_BASE:-0} + BM_POE_INTERFACE))"
SNMP_OFF="i 2"
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF"

View File

@@ -10,7 +10,7 @@ if [ -z "$BM_POE_ADDRESS" ]; then
exit 1
fi
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((48 + BM_POE_INTERFACE))"
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.$((${BM_POE_BASE:-0} + BM_POE_INTERFACE))"
SNMP_ON="i 1"
SNMP_OFF="i 2"

View File

@@ -64,7 +64,7 @@ class PoERun:
if not boot_detected:
self.print_error(
"Something wrong; couldn't detect the boot start up sequence")
return 1
return 2
self.logger.create_job_phase("test")
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):

View File

@@ -13,7 +13,7 @@ date +'%F %T'
# Make JWT token available as file in the bare-metal storage to enable access
# to MinIO
cp "${CI_JOB_JWT_FILE}" "${rootfs_dst}${CI_JOB_JWT_FILE}"
cp "${S3_JWT_FILE}" "${rootfs_dst}${S3_JWT_FILE}"
date +'%F %T'

View File

@@ -190,7 +190,7 @@ debian-build-testing:
.gitlab-ci/run-shellcheck.sh
section_switch yamllint "yamllint"
.gitlab-ci/run-yamllint.sh
section_switch meson "meson"
section_end yamllint
.gitlab-ci/meson/build.sh
.gitlab-ci/prepare-artifacts.sh
timeout: 15m
@@ -207,7 +207,6 @@ shader-db:
before_script:
- !reference [.download_s3, before_script]
script: |
section_switch shader-db "shader-db"
.gitlab-ci/run-shader-db.sh
artifacts:
paths:

View File

@@ -10,7 +10,7 @@ VARS=(
CI_COMMIT_REF_NAME
CI_COMMIT_TITLE
CI_JOB_ID
CI_JOB_JWT_FILE
S3_JWT_FILE
CI_JOB_STARTED_AT
CI_JOB_NAME
CI_JOB_URL
@@ -84,7 +84,9 @@ VARS=(
MESA_IMAGE_PATH
MESA_IMAGE_TAG
MESA_LOADER_DRIVER_OVERRIDE
MESA_SPIRV_LOG_LEVEL
MESA_TEMPLATES_COMMIT
MESA_VK_ABORT_ON_DEVICE_LOSS
MESA_VK_IGNORE_CONFORMANCE_WARNING
S3_HOST
S3_RESULTS_UPLOAD

View File

@@ -217,7 +217,7 @@ cleanup
# upload artifacts
if [ -n "$S3_RESULTS_UPLOAD" ]; then
tar --zstd -cf results.tar.zst results/;
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst;
ci-fairy s3cp --token-file "${S3_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst;
fi
# We still need to echo the hwci: mesa message, as some scripts rely on it, such

View File

@@ -70,6 +70,8 @@ gles_cts_commits_to_backport=(
# shellcheck disable=SC2034
gles_cts_patch_files=(
# Correct detection mechanism for EGL_EXT_config_select_group extension
build-deqp-egl_Correct-EGL_EXT_config_select_group-extension-query.patch
)
if [ "${DEQP_TARGET}" = 'android' ]; then

View File

@@ -85,7 +85,7 @@ python3 -m pip install --break-system-packages -r .gitlab-ci/lava/requirements.t
# install bindgen
RUSTFLAGS='-L native=/usr/local/lib' cargo install \
bindgen-cli --version 0.62.0 \
bindgen-cli --version 0.65.1 \
--locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local

View File

@@ -372,7 +372,7 @@ kernel+rootfs_arm32:
- .container+build-rules
variables:
FDO_DISTRIBUTION_TAG: "${MESA_IMAGE_TAG}--${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_TEMPLATES_COMMIT}"
ARTIFACTS_PREFIX: "https://${S3_HOST}/mesa-lava"
ARTIFACTS_PREFIX: "https://${S3_HOST}/${S3_KERNEL_BUCKET}"
ARTIFACTS_SUFFIX: "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_TAG}--${MESA_TEMPLATES_COMMIT}"
MESA_ARTIFACTS_TAG: *debian-arm64_build
MESA_ROOTFS_TAG: *kernel-rootfs

View File

@@ -14,7 +14,7 @@ export LLVM_VERSION="${LLVM_VERSION:=15}"
check_minio()
{
S3_PATH="${S3_HOST}/mesa-lava/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
S3_PATH="${S3_HOST}/${S3_KERNEL_BUCKET}/$1/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
if curl -L --retry 4 -f --retry-delay 60 -s -X HEAD \
"https://${S3_PATH}/done"; then
echo "Remote files are up-to-date, skip rebuilding them."
@@ -365,8 +365,8 @@ popd
. .gitlab-ci/container/container_post_build.sh
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/"${ROOTFSTAR}" \
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/"${ROOTFSTAR}" \
https://${S3_PATH}/"${ROOTFSTAR}"
touch /lava-files/done
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/done https://${S3_PATH}/done
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/done https://${S3_PATH}/done

View File

@@ -0,0 +1,45 @@
From cab41ed387c66a5e7f3454c547fc9ea53587ec1e Mon Sep 17 00:00:00 2001
From: David Heidelberg <david.heidelberg@collabora.com>
Date: Thu, 9 May 2024 14:08:59 -0700
Subject: [PATCH] Correct EGL_EXT_config_select_group extension query
EGL_EXT_config_select_group is a display extension,
not a client extension.
Affects:
dEQP-EGL.functional.choose_config.simple.selection_and_sort.*
Ref: https://github.com/KhronosGroup/EGL-Registry/pull/199
Fixes: 88ba9ac270db ("Implement support for the EGL_EXT_config_select_group extension")
Change-Id: I38956511bdcb8e99d585ea9b99aeab53da0457e2
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
---
framework/egl/egluConfigInfo.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/framework/egl/egluConfigInfo.cpp b/framework/egl/egluConfigInfo.cpp
index 88c30fd65..10936055a 100644
--- a/framework/egl/egluConfigInfo.cpp
+++ b/framework/egl/egluConfigInfo.cpp
@@ -129,7 +129,6 @@ void queryCoreConfigInfo (const Library& egl, EGLDisplay display, EGLConfig conf
void queryExtConfigInfo (const eglw::Library& egl, eglw::EGLDisplay display, eglw::EGLConfig config, ConfigInfo* dst)
{
const std::vector<std::string> extensions = getDisplayExtensions(egl, display);
- const std::vector<std::string> clientExtensions = getClientExtensions(egl);
if (de::contains(extensions.begin(), extensions.end(), "EGL_EXT_yuv_surface"))
{
@@ -159,7 +158,7 @@ void queryExtConfigInfo (const eglw::Library& egl, eglw::EGLDisplay display, egl
else
dst->colorComponentType = EGL_COLOR_COMPONENT_TYPE_FIXED_EXT;
- if (de::contains(clientExtensions.begin(), clientExtensions.end(), "EGL_EXT_config_select_group"))
+ if (hasExtension(egl, display, "EGL_EXT_config_select_group"))
{
egl.getConfigAttrib(display, config, EGL_CONFIG_SELECT_GROUP_EXT, (EGLint*)&dst->groupId);
--
2.43.0

View File

@@ -18,7 +18,7 @@ TMP_DIR=$(mktemp -d)
echo "$(date +"%F %T") Downloading archived master..."
if ! /usr/bin/wget \
-O "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" \
"https://${S3_HOST}/git-cache/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz";
"https://${S3_HOST}/${S3_GITCACHE_BUCKET}/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz";
then
echo "Repository cache not available"
exit

View File

@@ -16,7 +16,7 @@ variables:
DEBIAN_BASE_TAG: "20240412-pycparser"
DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
DEBIAN_BUILD_TAG: "20240408-cbindgen"
DEBIAN_BUILD_TAG: "20240723-241cbindgen"
DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base"
@@ -25,14 +25,14 @@ variables:
DEBIAN_X86_64_TEST_ANDROID_IMAGE_PATH: "debian/x86_64_test-android"
DEBIAN_X86_64_TEST_ANDROID_TAG: "20240423-deqp"
DEBIAN_X86_64_TEST_GL_TAG: "20240423-deqp"
DEBIAN_X86_64_TEST_GL_TAG: "20240514-egltrans241"
DEBIAN_X86_64_TEST_VK_TAG: "20240423-deqp"
KERNEL_ROOTFS_TAG: "20240423-deqp"
KERNEL_ROOTFS_TAG: "20240507-kernel241"
ALPINE_X86_64_BUILD_TAG: "20240412-pycparser"
ALPINE_X86_64_LAVA_SSH_TAG: "20240401-wlproto"
FEDORA_X86_64_BUILD_TAG: "20240412-pycparser"
KERNEL_TAG: "v6.6.21-mesa-19fc"
KERNEL_TAG: "v6.6.21-mesa-f8ea"
KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "3cc12a2a"

View File

@@ -11,7 +11,7 @@ variables:
# proxy used to cache data locally
FDO_HTTP_CACHE_URI: "http://caching-proxy/cache/?uri="
# base system generated by the container build job, shared between many pipelines
BASE_SYSTEM_HOST_PREFIX: "${S3_HOST}/mesa-lava"
BASE_SYSTEM_HOST_PREFIX: "${S3_HOST}/${S3_KERNEL_BUCKET}"
BASE_SYSTEM_MAINLINE_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${FDO_UPSTREAM_REPO}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
BASE_SYSTEM_FORK_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
# per-job build artifacts

View File

@@ -30,7 +30,7 @@ artifacts/ci-common/generate-env.sh | tee results/job-rootfs-overlay/set-job-env
section_end variables
tar zcf job-rootfs-overlay.tar.gz -C results/job-rootfs-overlay/ .
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" job-rootfs-overlay.tar.gz "https://${JOB_ROOTFS_OVERLAY_PATH}"
ci-fairy s3cp --token-file "${S3_JWT_FILE}" job-rootfs-overlay.tar.gz "https://${JOB_ROOTFS_OVERLAY_PATH}"
ARTIFACT_URL="${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME:?}.tar.zst"
@@ -50,7 +50,7 @@ PYTHONPATH=artifacts/ artifacts/lava/lava_job_submitter.py \
--ci-project-dir "${CI_PROJECT_DIR}" \
--device-type "${DEVICE_TYPE}" \
--dtb-filename "${DTB}" \
--jwt-file "${CI_JOB_JWT_FILE}" \
--jwt-file "${S3_JWT_FILE}" \
--kernel-image-name "${KERNEL_IMAGE_NAME}" \
--kernel-image-type "${KERNEL_IMAGE_TYPE}" \
--boot-method "${BOOT_METHOD}" \

View File

@@ -23,3 +23,10 @@ KNOWN_ISSUE_R8152_PATTERNS: tuple[str, ...] = (
# This is considered noise, since LAVA produces this log after receiving a package of feedback
# messages.
LOG_DEBUG_FEEDBACK_NOISE = "Listened to connection for namespace 'dut' done"
A6XX_GPU_RECOVERY_WATCH_PERIOD_MIN = 3
A6XX_GPU_RECOVERY_FAILURE_MAX_COUNT = 30
A6XX_GPU_RECOVERY_FAILURE_MESSAGE = (
"cx gdsc didn't collapse",
"Timeout waiting for GMU OOB",
)

View File

@@ -193,7 +193,7 @@ class LAVAJobDefinition:
"set +x # HIDE_START",
f'echo -n "{jwt_file.read()}" > "{self.job_submitter.jwt_file}"',
"set -x # HIDE_END",
f'echo "export CI_JOB_JWT_FILE={self.job_submitter.jwt_file}" >> /set-job-env-vars.sh',
f'echo "export S3_JWT_FILE={self.job_submitter.jwt_file}" >> /set-job-env-vars.sh',
]
else:
download_steps += [

View File

@@ -1,8 +1,9 @@
from __future__ import annotations
import re
from datetime import datetime, timedelta
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any, Sequence
from typing import TYPE_CHECKING, Any, Optional, Sequence
if TYPE_CHECKING:
from lava.utils import LogFollower
@@ -13,6 +14,9 @@ from lava.utils.constants import (
KNOWN_ISSUE_R8152_MAX_CONSECUTIVE_COUNTER,
LOG_DEBUG_FEEDBACK_NOISE,
KNOWN_ISSUE_R8152_PATTERNS,
A6XX_GPU_RECOVERY_WATCH_PERIOD_MIN,
A6XX_GPU_RECOVERY_FAILURE_MESSAGE,
A6XX_GPU_RECOVERY_FAILURE_MAX_COUNT,
)
from lava.utils.log_section import LogSectionType
@@ -29,6 +33,8 @@ class LAVALogHints:
log_follower: LogFollower
r8152_issue_consecutive_counter: int = field(default=0, init=False)
reboot_counter: int = field(default=0, init=False)
a6xx_gpu_recovery_fail_counter: int = field(default=0, init=False)
a6xx_gpu_first_fail_time: Optional[datetime] = field(default=None, init=False)
def raise_known_issue(self, message) -> None:
raise MesaCIKnownIssueException(
@@ -44,6 +50,7 @@ class LAVALogHints:
continue
self.detect_r8152_issue(line)
self.detect_forced_reboot(line)
self.detect_a6xx_gpu_recovery_failure(line)
def detect_r8152_issue(self, line):
if self.log_follower.phase in (
@@ -77,3 +84,23 @@ class LAVALogHints:
self.raise_known_issue(
"Forced reboot detected during test phase, failing the job..."
)
# If the a6xx gpu repeatedly fails to recover over a short period of time,
# then successful recovery is unlikely so cancel the job preemptively.
def detect_a6xx_gpu_recovery_failure(self, line: dict[str, Any]) -> None:
if search_known_issue_patterns(A6XX_GPU_RECOVERY_FAILURE_MESSAGE, line["msg"]):
time_of_failure = datetime.fromisoformat(line["dt"])
self.a6xx_gpu_recovery_fail_counter += 1
if self.a6xx_gpu_first_fail_time is None:
self.a6xx_gpu_first_fail_time = time_of_failure
if self.a6xx_gpu_recovery_fail_counter == A6XX_GPU_RECOVERY_FAILURE_MAX_COUNT:
time_since_first_fail = time_of_failure - self.a6xx_gpu_first_fail_time
if time_since_first_fail <= timedelta(minutes=A6XX_GPU_RECOVERY_WATCH_PERIOD_MIN):
self.raise_known_issue(
"Repeated GPU recovery failure detected: cancelling the job"
)
else:
self.a6xx_gpu_first_fail_time = None
self.a6xx_gpu_recovery_fail_counter = 0

View File

@@ -8,7 +8,7 @@ set -ex
export PAGER=cat # FIXME: export everywhere
INSTALL=$(realpath -s "$PWD"/install)
S3_ARGS="--token-file ${CI_JOB_JWT_FILE}"
S3_ARGS="--token-file ${S3_JWT_FILE}"
RESULTS=$(realpath -s "$PWD"/results)
mkdir -p "$RESULTS"

View File

@@ -60,7 +60,7 @@ if [ -n "$S3_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage
S3_ARTIFACT_NAME="$S3_ARTIFACT_NAME.tar.zst"
zstd artifacts/install.tar -o ${S3_ARTIFACT_NAME}
ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ${S3_ARTIFACT_NAME} https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}
ci-fairy s3cp --token-file "${S3_JWT_FILE}" ${S3_ARTIFACT_NAME} https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}
fi
section_end prepare-artifacts

View File

@@ -33,7 +33,7 @@
tags:
- placeholder-job
rustfmt:
.rustfmt:
extends:
- .formatting-check
- .lint-rustfmt-rules
@@ -61,6 +61,8 @@ python-test:
- !reference [.never-post-merge-rules, rules]
- if: $CI_PIPELINE_SOURCE == "schedule"
when: on_success
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot"
when: on_success
- if: $GITLAB_USER_LOGIN == "marge-bot"
changes: &bin_ci_files
- .gitlab-ci.yml
@@ -156,7 +158,7 @@ python-test:
exclude:
- results/*.shader_cache
variables:
PIGLIT_REPLAY_EXTRA_ARGS: --db-path ${CI_PROJECT_DIR}/replayer-db/ --minio_bucket=mesa-tracie-public --jwt-file=${CI_JOB_JWT_FILE}
PIGLIT_REPLAY_EXTRA_ARGS: --db-path ${CI_PROJECT_DIR}/replayer-db/ --minio_bucket=${S3_TRACIE_PUBLIC_BUCKET} --jwt-file=${S3_JWT_FILE}
# until we overcome Infrastructure issues, give traces extra 5 min before timeout
DEVICE_HANGING_TIMEOUT_SEC: 600
script:

View File

@@ -16,7 +16,13 @@ from lava.utils import (
fix_lava_gitlab_section_log,
hide_sensitive_data,
)
from lava.utils.constants import KNOWN_ISSUE_R8152_MAX_CONSECUTIVE_COUNTER
from lava.utils.constants import (
KNOWN_ISSUE_R8152_MAX_CONSECUTIVE_COUNTER,
A6XX_GPU_RECOVERY_WATCH_PERIOD_MIN,
A6XX_GPU_RECOVERY_FAILURE_MESSAGE,
A6XX_GPU_RECOVERY_FAILURE_MAX_COUNT,
)
from lava.utils.lava_log_hints import LAVALogHints
from ..lava.helpers import (
create_lava_yaml_msg,
@@ -390,3 +396,44 @@ def test_detect_failure(messages, expectation):
lf = LogFollower(starting_section=boot_section)
with expectation:
lf.feed(messages)
def test_detect_a6xx_gpu_recovery_failure(frozen_time):
log_follower = LogFollower()
lava_log_hints = LAVALogHints(log_follower=log_follower)
failure_message = {
"dt": datetime.now().isoformat(),
"msg": A6XX_GPU_RECOVERY_FAILURE_MESSAGE[0],
"lvl": "feedback",
}
with pytest.raises(MesaCIKnownIssueException):
for _ in range(A6XX_GPU_RECOVERY_FAILURE_MAX_COUNT):
lava_log_hints.detect_a6xx_gpu_recovery_failure(failure_message)
# Simulate the passage of time within the watch period
frozen_time.tick(1)
failure_message["dt"] = datetime.now().isoformat()
def test_detect_a6xx_gpu_recovery_success(frozen_time):
log_follower = LogFollower()
lava_log_hints = LAVALogHints(log_follower=log_follower)
failure_message = {
"dt": datetime.now().isoformat(),
"msg": A6XX_GPU_RECOVERY_FAILURE_MESSAGE[0],
"lvl": "feedback",
}
# Simulate sending a tolerable number of failure messages
for _ in range(A6XX_GPU_RECOVERY_FAILURE_MAX_COUNT - 1):
lava_log_hints.detect_a6xx_gpu_recovery_failure(failure_message)
frozen_time.tick(1)
failure_message["dt"] = datetime.now().isoformat()
# Simulate the passage of time outside of the watch period
frozen_time.tick(60 * A6XX_GPU_RECOVERY_WATCH_PERIOD_MIN + 1)
failure_message = {
"dt": datetime.now().isoformat(),
"msg": A6XX_GPU_RECOVERY_FAILURE_MESSAGE[1],
"lvl": "feedback",
}
with does_not_raise():
lava_log_hints.detect_a6xx_gpu_recovery_failure(failure_message)
assert lava_log_hints.a6xx_gpu_first_fail_time is None, "a6xx_gpu_first_fail_time is not None"
assert lava_log_hints.a6xx_gpu_recovery_fail_counter == 0, "a6xx_gpu_recovery_fail_counter is not 0"

57482
.pick_status.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
24.1.0-devel
24.1.7

View File

@@ -0,0 +1,80 @@
Name
MESA_x11_native_visual_id
Name Strings
EGL_MESA_x11_native_visual_id
Contact
Eric Engestrom <eric@engestrom.ch>
Status
Complete, shipping.
Version
Version 2, May 10, 2024
Number
EGL Extension #TBD
Extension Type
EGL display extension
Dependencies
None. This extension is written against the
wording of the EGL 1.5 specification.
Overview
This extension allows EGL_NATIVE_VISUAL_ID to be used in
eglChooseConfig() for a display of type EGL_PLATFORM_X11_EXT.
IP Status
Open-source; freely implementable.
New Types
None
New Procedures and Functions
None
New Tokens
None
In section 3.4.1.1 "Selection of EGLConfigs" of the EGL 1.5
Specification, replace:
If EGL_MAX_PBUFFER_WIDTH, EGL_MAX_PBUFFER_HEIGHT,
EGL_MAX_PBUFFER_PIXELS, or EGL_NATIVE_VISUAL_ID are specified in
attrib list, then they are ignored [...]
with:
If EGL_MAX_PBUFFER_WIDTH, EGL_MAX_PBUFFER_HEIGHT,
or EGL_MAX_PBUFFER_PIXELS are specified in attrib list, then they
are ignored [...]. EGL_NATIVE_VISUAL_ID is ignored except on
a display of type EGL_PLATFORM_X11_EXT when EGL_ALPHA_SIZE is
greater than zero.
Issues
None.
Revision History
Version 1, March 27, 2024 (Eric Engestrom)
Initial draft
Version 2, May 10, 2024 (David Heidelberg)
add EGL_ALPHA_SIZE condition
add Extension type and set it to display extension

View File

@@ -96,7 +96,7 @@ class BootstrapHTML5TranslatorMixin:
self.body.append(tag)
def setup_translators(app):
if app.builder.default_translator_class is None:
if app.builder.format != "html":
return
if not app.registry.translators.items():
@@ -111,10 +111,6 @@ def setup_translators(app):
app.set_translator(app.builder.name, translator, override=True)
else:
for name, klass in app.registry.translators.items():
if app.builder.format != "html":
# Skip translators that are not HTML
continue
translator = types.new_class(
"BootstrapHTML5Translator",
(

View File

@@ -34,8 +34,8 @@ Then, create your Meson cross file to use it, something like this
[host_machine]
system = 'android'
cpu_family = 'arm'
cpu = 'aarch64'
cpu_family = 'aarch64'
cpu = 'armv8'
endian = 'little'
Now, use that cross file for your Android build directory (as in this

View File

@@ -111,8 +111,10 @@ html_copy_source = False
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = [
'_static/',
html_static_path = []
html_extra_path = [
'_extra/',
'release-maintainers-keys.asc',
'features.txt',
'libGL.txt',
@@ -120,8 +122,6 @@ html_static_path = [
'README.VCE',
]
html_extra_path = []
html_redirects = [
('webmaster', 'https://www.mesa3d.org/website/'),
('developers', 'https://www.mesa3d.org/developers/'),
@@ -218,7 +218,7 @@ graphviz_output_format = 'svg'
# -- Options for hawkmoth -------------------------------------------------
hawkmoth_root = os.path.abspath('..')
hawkmoth_root = os.path.abspath(os.pardir)
hawkmoth_clang = [
'-Idocs/header-stubs/',
'-Iinclude/',

View File

@@ -1443,7 +1443,11 @@ RADV driver environment variables
``noopt``
disable various optimizations
``nosched``
disable instructions scheduling
disable pre-RA, ILP and VOPD instruction scheduling
``nosched-ilp``
disable ILP instruction scheduling
``nosched-vopd``
disable VOPD instruction scheduling
``perfinfo``
print information used to calculate some pipeline statistics
``liveinfo``

View File

@@ -590,7 +590,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_EXT_headless_surface DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn)
VK_EXT_image_2d_view_of_3d DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_EXT_image_compression_control DONE (radv)
VK_EXT_image_drm_format_modifier DONE (anv, hasvk, radv/gfx9+, tu, v3dv, vn)
VK_EXT_image_drm_format_modifier DONE (anv, hasvk, nvk, radv/gfx9+, tu, v3dv, vn)
VK_EXT_image_sliced_view_of_3d DONE (anv, nvk, radv/gfx10+)
VK_EXT_image_view_min_lod DONE (anv, hasvk, nvk, radv, tu, vn)
VK_EXT_index_type_uint8 DONE (anv, hasvk, nvk, lvp, panvk, pvr, radv/gfx8+, tu, v3dv, vn)
@@ -612,7 +612,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_EXT_primitive_topology_list_restart DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_primitives_generated_query DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_EXT_provoking_vertex DONE (anv, hasvk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_queue_family_foreign DONE (anv, hasvk, lvp, radv, tu, vn)
VK_EXT_queue_family_foreign DONE (anv, hasvk, nvk, lvp, radv, tu, vn)
VK_EXT_rasterization_order_attachment_access DONE (lvp, tu, vn)
VK_EXT_robustness2 DONE (anv, hasvk, lvp, nvk, radv, tu, vn)
VK_EXT_sample_locations DONE (anv, hasvk, nvk, radv/gfx9-, tu/a650+)
@@ -860,7 +860,7 @@ Rusticl OpenCL 1.2 -- all DONE:
Separate compilation and linking of programs DONE
Extend cl_mem_flags DONE
clEnqueueFillBuffer, clEnqueueFillImage DONE
Add CL_MAP_WRITE_INVALIDATE_REGION to cl_map_flags in progress (flag is ignored)
Add CL_MAP_WRITE_INVALIDATE_REGION to cl_map_flags DONE
New image types DONE
clCreateImage DONE
clEnqueueMigrateMemObjects DONE

View File

@@ -3,6 +3,14 @@ Release Notes
The release notes summarize what's new or changed in each Mesa release.
- :doc:`24.1.7 release notes <relnotes/24.1.7>`
- :doc:`24.1.6 release notes <relnotes/24.1.6>`
- :doc:`24.1.5 release notes <relnotes/24.1.5>`
- :doc:`24.1.4 release notes <relnotes/24.1.4>`
- :doc:`24.1.3 release notes <relnotes/24.1.3>`
- :doc:`24.1.2 release notes <relnotes/24.1.2>`
- :doc:`24.1.1 release notes <relnotes/24.1.1>`
- :doc:`24.1.0 release notes <relnotes/24.1.0>`
- :doc:`24.0.5 release notes <relnotes/24.0.5>`
- :doc:`24.0.4 release notes <relnotes/24.0.4>`
- :doc:`24.0.3 release notes <relnotes/24.0.3>`
@@ -416,6 +424,14 @@ The release notes summarize what's new or changed in each Mesa release.
:maxdepth: 1
:hidden:
24.1.7 <relnotes/24.1.7>
24.1.6 <relnotes/24.1.6>
24.1.5 <relnotes/24.1.5>
24.1.4 <relnotes/24.1.4>
24.1.3 <relnotes/24.1.3>
24.1.2 <relnotes/24.1.2>
24.1.1 <relnotes/24.1.1>
24.1.0 <relnotes/24.1.0>
24.0.5 <relnotes/24.0.5>
24.0.4 <relnotes/24.0.4>
24.0.3 <relnotes/24.0.3>

6245
docs/relnotes/24.1.0.rst Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More