platform/upstream/mesa.git
10 months ago.pick_status.json: Update to d761871761e5fe7d498b0cc818ed627698ed1225
Eric Engestrom [Wed, 13 Dec 2023 18:34:33 +0000 (18:34 +0000)]
.pick_status.json: Update to d761871761e5fe7d498b0cc818ed627698ed1225

10 months agodocs: add sha256sum for 23.3.1
Eric Engestrom [Wed, 13 Dec 2023 19:15:13 +0000 (19:15 +0000)]
docs: add sha256sum for 23.3.1

10 months agoVERSION: bump for 23.3.1
Eric Engestrom [Wed, 13 Dec 2023 18:58:59 +0000 (18:58 +0000)]
VERSION: bump for 23.3.1

10 months agodocs: add release notes for 23.3.1
Eric Engestrom [Wed, 13 Dec 2023 18:57:25 +0000 (18:57 +0000)]
docs: add release notes for 23.3.1

10 months agoci: do not mount already mounted directories
Juan A. Suarez Romero [Wed, 6 Dec 2023 11:42:37 +0000 (12:42 +0100)]
ci: do not mount already mounted directories

In some cases we are using an initramfs image that pre-mounts some of
the directories, so let's skip them in the next stage.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26552>
(cherry picked from commit d0ae58f4134bededcab45cf80dc9f194fdc1bdf3)

10 months agoci/baremetal: make BM_BOOTCONFIG optional
Juan A. Suarez Romero [Wed, 6 Dec 2023 11:39:49 +0000 (12:39 +0100)]
ci/baremetal: make BM_BOOTCONFIG optional

In some cases we can have the config.txt boot file already available in
the tftp folder.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26552>
(cherry picked from commit f97e065c4f72856eccefcbf7dbe72253a6918294)

10 months agoci: fix kdl commit fetch
Eric Engestrom [Sat, 18 Nov 2023 16:12:17 +0000 (16:12 +0000)]
ci: fix kdl commit fetch

Doing a `clone --depth 1` of the default branch then checking out
a commit that might not be the latest of that branch cannot work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26270>
(cherry picked from commit 5efa4d56e2b7f2440d263ffb794ab3247d70d529)

10 months agodriconfig: add a workaround for Hades (Vulkan backend)
Yiwei Zhang [Sat, 9 Dec 2023 06:02:10 +0000 (06:02 +0000)]
driconfig: add a workaround for Hades (Vulkan backend)

Vulkan backend of Hades can only handle at most 3 swapchain images.

It affects all drivers after below commit:
04d654a5d0b7bb4a072f515f6fbe2a686fc7f7f8

and then only affects specific driver backend which enables
extra_xwayland_image in wsi device options after below commit:
c1a62476acefcc94de9fd8e7f74d6bd9576796a7

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Renato Pereyra <renatopereyra@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26607>
(cherry picked from commit 88c5affacf947ce64361fbe4155d2d9600f6a981)

10 months agospirv: add missing build dependency
Eric Engestrom [Sun, 10 Dec 2023 16:35:53 +0000 (16:35 +0000)]
spirv: add missing build dependency

Fixes: 59a72570b66ad7c4fd95 ("compiler: Move spirv into a module of its own")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10277
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26624>
(cherry picked from commit c51e40dd8b031fb43993e3e6413c035f81ab1afa)

10 months agonir: Handle divergence for decl_reg
Ian Romanick [Thu, 30 Nov 2023 21:30:53 +0000 (13:30 -0800)]
nir: Handle divergence for decl_reg

Once decl_reg is handled, src[0].ssa->divergent will be properly set, so
load_reg and load_reg_indirect do not need special treatment.

shader-db can run to completion on HSW, IVB, and SNB now. No other
testing was done.

v2: Refactor nir_intrinsic_load_reg and nir_intrinsic_load_reg_indirect
handling. Suggested by Daniel Schürmann.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 4fd257d20fe ("nir: Properly handle divergence for load_reg")
Fixes: 6dbb5f1e07b ("intel/fs: rerun divergence analysis prior to convert_from_ssa")
Closes: #10233
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26436>
(cherry picked from commit 7fce0a5598fbfba73e10460b37865fe54b7c5bfc)

10 months agodocs: drop unused manual optimizations override
David Heidelberg [Sun, 10 Dec 2023 16:02:35 +0000 (17:02 +0100)]
docs: drop unused manual optimizations override

Fixes: ed4fd1d90e3f ("util: cleanup cpuinfo.* and it's related files")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26620>
(cherry picked from commit 81be60a2330296eef1186d6508a2a48e5483bc1a)

10 months ago.pick_status.json: Update to a921a69010102c6e35267066dc8a50461cae46fd
Eric Engestrom [Tue, 12 Dec 2023 09:59:52 +0000 (09:59 +0000)]
.pick_status.json: Update to a921a69010102c6e35267066dc8a50461cae46fd

10 months agovenus: fix query feedback copy sanitize off by 1
Juston Li [Fri, 8 Dec 2023 21:51:12 +0000 (13:51 -0800)]
venus: fix query feedback copy sanitize off by 1

Copy sanitization incorrectly included +1 range of the reset.

Eg Reset Query=0 QueryCount=5 is [0,5) exclusive, not [0,5] inclusive.

Fixes: 5b24ab91e43 ("venus: switch to unconditionally deferred query feedback")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26603>
(cherry picked from commit 4f2b4b81d16edec691940f84e9b2b8e2cdb3dfd4)

10 months agofreedreno/a6xx: Fix NV12+UBWC import
Rob Clark [Fri, 8 Dec 2023 19:30:44 +0000 (11:30 -0800)]
freedreno/a6xx: Fix NV12+UBWC import

Treat R8_G8B8_420_UNORM and NV12 the same, because dri2 frontend doesn't
understand or care about the difference from the sampler PoV.

Fixes: 1e820ac12850 ("freedreno: Rework supported-modifiers handling")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26601>
(cherry picked from commit 2132f95de0b0f291b116a67149793eaac2e2b5bf)

10 months agomeson: Update lua wrap to 5.4.6-4
Mark Collins [Tue, 14 Nov 2023 07:43:10 +0000 (07:43 +0000)]
meson: Update lua wrap to 5.4.6-4

This version of the lua wrap fixes installation of the library which
was previously causing liblua SOs to be missing when Mesa was installed
using `meson install`.

Signed-off-by: Mark Collins <pixelyion@protonmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26185>
(cherry picked from commit fa0476fa6e98b3ccdbcbe5d562ab8dbb7cba0c84)

10 months ago.pick_status.json: Update to 9ab59574ef162393f89c36980a366eeb8ecccb64
Eric Engestrom [Sun, 10 Dec 2023 17:27:26 +0000 (17:27 +0000)]
.pick_status.json: Update to 9ab59574ef162393f89c36980a366eeb8ecccb64

10 months agonvk: fix transform feedback with multiple saved counters.
Dave Airlie [Thu, 7 Dec 2023 03:14:34 +0000 (13:14 +1000)]
nvk: fix transform feedback with multiple saved counters.

The SET_STREAM_OUT_BUFFER_LOAD_WRITE_POINTER registers have an
8 dword stride, but the code is only adding one dword between them
then the MME is calling an illegal method.

This is the simple fix, otherwise I think we'd have to multiply
somehow in the MME which seems pointless.

Fixes KHR-GL45.transform_feedback* on zink on nvk.

Fixes: 5fd7df4aa2c3 ("nvk: Support for vertex shader transform feedback")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26558>
(cherry picked from commit 1b27a6be20732b251648c5ca6f93e6c0a9279f7f)

10 months agovenus: properly initialize ring monitor initial alive status
Yiwei Zhang [Tue, 28 Nov 2023 20:17:29 +0000 (12:17 -0800)]
venus: properly initialize ring monitor initial alive status

This avoids a potential race condition if two threads are competing for
the monitor with the initial states, and the losing one may run into
alive status being false and abort.

Fixes: 4a4b05869a6 ("venus: check and configure new ringMonitoring feature")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reported-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26179>
(cherry picked from commit 8ac7d78bf3512aa7575f9c8595494ea592ab2e58)

10 months agovenus: fix async compute pipeline creation
Yiwei Zhang [Sun, 12 Nov 2023 03:27:10 +0000 (19:27 -0800)]
venus: fix async compute pipeline creation

Fixes: a771efdefed ("venus: Enable VK_EXT_pipeline_creation_cache_control")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26179>
(cherry picked from commit aed4c4d04e76e65ed3ae3159ae12014aa1c8f492)

10 months agoanv: Don't report more memory available than the heap size
Kenneth Graunke [Wed, 6 Dec 2023 16:01:36 +0000 (08:01 -0800)]
anv: Don't report more memory available than the heap size

When calculating the system memory heap size, we report only 3/4 of
the total RAM size (or 1/2 for systems with less than 4GB of RAM).

In the memory budget extension query, we were reporting 90% of the
available system memory.  If most of the memory in the system is free,
this could result in the total heap size being 3/4 of RAM, but the
memory available being 9/10 of RAM.  But if the application tried to
allocate the memory reported as "available", it would exceed the heap
size.  This can confuse some applications.

This patch makes the memory budget query clamp the available RAM to
the heap size, so it will never report more available than the heap
can provide.  Unfortunately, this means that we'll report only 67.5%
of system memory as available (3/4 * 9/10).  We may want to adjust
this estimate in the future.

Cc: mesa-stable
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/26553>
(cherry picked from commit a7b054c974155183cbbc90f3929de37f40200b79)

10 months agoanv: Drop 3/4 of PPGTT size restriction for sys heap size calculation
Kenneth Graunke [Wed, 6 Dec 2023 15:48:11 +0000 (07:48 -0800)]
anv: Drop 3/4 of PPGTT size restriction for sys heap size calculation

This was mainly useful for older Gen7.x GPUs with 32-bit PPGTT, which
are now supported by hasvk rather than anv.  The remaining platforms
which anv supports have 36, 47, or 48-bit PPGTT, which imposes a 3/4
limit of 48GB, 96TB, and 192TB of memory.

The GPUs with 36-bit PPGTT are Elkhart Lake and Jasper Lake, which
appear to be Atom CPUs that have a maximum supported memory
configuration of 32GB or less, so this limit should not matter there.
Nor is a multi-TB limit likely to matter on our other parts.

Drop this check to simplify the heap and memory budget calculations.

Cc: mesa-stable
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/26553>
(cherry picked from commit 029b1d3f262051c9b0fc3ba6c7faca2affa18ddf)

10 months agointel/compiler: infer the number of operands using lsc_op_num_data_values
Rohan Garg [Thu, 30 Nov 2023 19:30:39 +0000 (20:30 +0100)]
intel/compiler: infer the number of operands using lsc_op_num_data_values

nir_emit_global_atomic should utilize lsc_op_num_data_values to
infer the number of operands for global atomic ops, following the same
pattern as nir_emit_surface_atomic

Fixes: 90a2137 ('intel/compiler: Use LSC opcode enum rather than legacy BRW_AOPs')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26432>
(cherry picked from commit db6aaa691d05ef017b803d11cce4e341d1a98882)

10 months agoanv: Fix handling of host_cached_coherent bos in gen9 lp in older kernels
José Roberto de Souza [Mon, 4 Dec 2023 15:41:39 +0000 (07:41 -0800)]
anv: Fix handling of host_cached_coherent bos in gen9 lp in older kernels

Kernel versions without DRM_I915_QUERY_MEMORY_REGIONS support will
take a different code path in i915_gem_create() that lacks the
i915_gem_set_caching() call to make cached bos in gen9 lp 1 way
coherent.

Fixes: fc0acf6d90 ("anv: Move i915 specific gem_set_caching to backend")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26457>
(cherry picked from commit 0eac6298f2eb3030f53ec508af87f0c4488b20cb)

10 months agonir/loop_analyze: skip if basis/limit/comparison is vector
Rhys Perry [Fri, 13 Oct 2023 18:56:24 +0000 (19:56 +0100)]
nir/loop_analyze: skip if basis/limit/comparison is vector

Replacement in try_eval_const_alu() doesn't work because the replacements
are always scalar. The callers also always give a scalar dest.

This is encountered when compiling a Redout shader under ASan.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Fixes: bc170e895f38 ("nir/loop_analyze: Use try_eval_const_alu and induction variable basis info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26225>
(cherry picked from commit 796058841378c4d5e04ff8b5cbe5adef5aae326a)

10 months agod3d12: d3d12_create_fence_win32 - Fix double refcount bump
Sil Vilerino [Wed, 22 Nov 2023 03:06:08 +0000 (22:06 -0500)]
d3d12: d3d12_create_fence_win32 - Fix double refcount bump

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
(cherry picked from commit d0103648410f75c1dae48283759d884e9fbf1190)

10 months agod3d12: Fix screen->winsys leak in d3d12_screen
Sil Vilerino [Fri, 1 Dec 2023 18:15:35 +0000 (13:15 -0500)]
d3d12: Fix screen->winsys leak in d3d12_screen

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
(cherry picked from commit 81c8e89ff8e846839fffc1d103b2080bef5c1b5c)

10 months agod3d12: Fix d3d12_tcs_variant_cache_destroy leak in d3d12_context
Sil Vilerino [Fri, 1 Dec 2023 18:14:55 +0000 (13:14 -0500)]
d3d12: Fix d3d12_tcs_variant_cache_destroy leak in d3d12_context

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
(cherry picked from commit 7bd6a42d1f2d0cf06d0be1a5ded3bd065c513317)

10 months agoradv: set combinedImageSamplerDescriptorCount to 1 for multi-planar formats
Samuel Pitoiset [Mon, 4 Dec 2023 12:57:21 +0000 (13:57 +0100)]
radv: set combinedImageSamplerDescriptorCount to 1 for multi-planar formats

RADV compacts all descriptors for multi-planar images into one
combined image sampler, so it should be 96, and not eg. 192 for a two
planes format.

Fixes new CTS
dEQP-VK.binding_model.descriptor_buffer.ycbcr_sampler.*array.

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

10 months agopanfrost: Don't leak NIR compute shaders
Boris Brezillon [Thu, 30 Nov 2023 10:15:10 +0000 (11:15 +0100)]
panfrost: Don't leak NIR compute shaders

We never steal the NIR program or free it explicitly, and the state
tracker expects drivers to take ownership of the program object. Since
panfrost doesn't need to keep the original NIR shader around for
compute, let's just free it before returning.

Fixes: 40372bd720fe ("panfrost: Implement a disk cache")
Cc: stable
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26424>
(cherry picked from commit 692a4b18047a9549ec993c6bded598c5f0c06de0)

10 months agov3d: drop leftover from "move v3d_tiling to common"
Eric Engestrom [Tue, 5 Dec 2023 18:14:46 +0000 (18:14 +0000)]
v3d: drop leftover from "move v3d_tiling to common"

Fixes: d198e26a1ebc32c43e5b ("broadcom/common: move v3d_tiling to common")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26525>
(cherry picked from commit 3a8da0b8bf91d0fa1dac511f6265a49f41861d78)

10 months agoci: fix rules for formatting checks
Eric Engestrom [Mon, 4 Dec 2023 21:45:33 +0000 (21:45 +0000)]
ci: fix rules for formatting checks

Fixes: 70eff587673ceec181ef ("ci: allow hw jobs even if lint jobs fail for non-Marge pipelines")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26511>
(cherry picked from commit d971e3ba45059ba4e5f5e85d40a471dc66cf5df7)

10 months agozink: initialize drm_fd to -1
José Expósito [Wed, 22 Nov 2023 11:48:47 +0000 (12:48 +0100)]
zink: initialize drm_fd to -1

The `zink_internal_create_screen()` function initializes
`screen->drm_fd` to 0, a valid file descriptor value, via `rzalloc`.

If an error is found during initialization, the `zink_destroy_screen()`
function is invoked in the `fail` label and the `screen->drm_fd` is
closed because its value is 0 and `screen->drm_fd != -1` is checked.

Initialize `screen->drm_fd` to -1 to avoid this issue.

Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10191
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26332>
(cherry picked from commit fff3fc45a0125b408ca8d4dbd48e5633d63ccc5a)

10 months ago.pick_status.json: Update to 5bf68ab70133edd264f832f4a133288b8b45f66d
Eric Engestrom [Fri, 8 Dec 2023 11:07:55 +0000 (11:07 +0000)]
.pick_status.json: Update to 5bf68ab70133edd264f832f4a133288b8b45f66d

10 months agov3d: add B10G10R10[X2/A2]_UNORM to format table.
Mario Kleiner [Mon, 13 Mar 2023 14:57:34 +0000 (15:57 +0100)]
v3d: add B10G10R10[X2/A2]_UNORM to format table.

Enables 10 bpc / color depth 30 bit support under XOrg
with X11/GLX/OpenGL.

Successfully tested with RaspberryPi OS 11,
running X-Server 1.20, and also with Weston,
on a RaspberryPi 400 on top of current Mesa 24.0-devel.

Alejandro Piñeiro also performed a GLES CTS run
with successful result, citing him:
"Full GLES 31 CTS finished with 0 failres. So all ok"

Note that this commit was originally developed and
successfully tested by myself against Mesa 23.1-devel
from February 2023, and therefore should apply and work
cleanly against recent Mesa stable branches. One could
see this commit as a trivial compatibility fix against
X-Server 1.20 / modesetting-ddx 1.20, which is why I'm
also nominating this commit for the current 23.3 stable
branch, and also the 23.2 stable branch, so it may make
it into RaspberryPi OS 12. Thanks for the consideration.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Backport-to: 23.2
Backport-to: 23.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26472>
(cherry picked from commit 1700c6af6f807f801382c6cea5cb7136563e8bad)

10 months agonvk: use `||` instead of `|` between bools
Eric Engestrom [Mon, 4 Dec 2023 18:34:33 +0000 (18:34 +0000)]
nvk: use `||` instead of `|` between bools

We have to split each call into its own variable, because simply
replacing `|` with `||` would short-circuit the right side when the left
side succeeds.

Fixes: dadf9d59e6f9e0c4a7a7 ("nvk: Add support for variable pointers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26509>
(cherry picked from commit 81ec1fa0b5b924902b05531817a8b7b38e449bf1)

10 months agofreedreno/drm: Fix zombie BO import harder
Rob Clark [Mon, 4 Dec 2023 17:06:59 +0000 (09:06 -0800)]
freedreno/drm: Fix zombie BO import harder

Fixes: 6ac133c646dd ("freedreno/drm: Fix race in zombie import")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26506>
(cherry picked from commit f2e3285d8e2b72e7408845afa5402ce48c4e93a8)

10 months agopanfrost: Fix multiplanar YUV texture descriptor emission on v9+
Boris Brezillon [Wed, 29 Nov 2023 17:53:54 +0000 (18:53 +0100)]
panfrost: Fix multiplanar YUV texture descriptor emission on v9+

Multiplanar YUV textures require two surface descriptors, and the
base address calculation should be moved inside the for loop,
otherwise we always take the base address of the first plane.

Fixes: 144f9324a374 ("panfrost: prepare v9+ to support YUV sampling")
Cc: stable
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26425>
(cherry picked from commit 93e9bfcfd512858ccace258f1436bd0485a53b84)

10 months agoanv: Fix MI_ARB_CHECK calls in generated indirect draws optimization
Sviatoslav Peleshko [Wed, 29 Nov 2023 22:42:07 +0000 (00:42 +0200)]
anv: Fix MI_ARB_CHECK calls in generated indirect draws optimization

According to PRMs, to use self-modifying code correctly we have to
disable preparser before jumping to the generated commands, and re-enable
it with a first command in that buffer.

Old implementation did it wrong: for both inplace and inring generation
it disabled preparser before running the generation shader, had it
disabled during generation, and re-enabled it just before jumping to
the generated commands.

This usually didn't cause any trouble, because the generation shader and
generated draws are in different BOs, and the jump distance is greater than
the command FIFO depth. But we allocate them from the same pool,
so there are rare cases where the end of the BO with generation commands,
and the beginning of the BO with generated draws are adjacent. In such
cases, the wrong commands might be fetched.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10162
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/26427>
(cherry picked from commit 5cb20b5edc6e6fcde49490bb6ac832023d001e5b)

10 months ago.pick_status.json: Update to 1700c6af6f807f801382c6cea5cb7136563e8bad
Eric Engestrom [Tue, 5 Dec 2023 14:31:58 +0000 (14:31 +0000)]
.pick_status.json: Update to 1700c6af6f807f801382c6cea5cb7136563e8bad

10 months agomeson: work around meson 0.62 issue
Erik Faye-Lund [Fri, 1 Dec 2023 12:23:10 +0000 (13:23 +0100)]
meson: work around meson 0.62 issue

Ubuntu 22.04 LTS has Meson 0.62, but recent versions of mesa fails to
build there due to an issue with using wayland-protocols from wrapdb,
that wasn't fixed until Meson 0.63. Luckily the problem is easy to
work around, so let's just do that.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10232
Fixes: 5fe5c3e2231 ("meson: add wayland-protocols from meson wrapdb")
Tested-by: Eero Tamminen <eero.t.tamminen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26446>
(cherry picked from commit d8d49ad03415a432392e1f09fc7e1a684bdff3d9)

10 months agoegl/wayland: set the correct modifier for the linear_copy image
Pierre-Eric Pelloux-Prayer [Mon, 27 Nov 2023 16:36:54 +0000 (17:36 +0100)]
egl/wayland: set the correct modifier for the linear_copy image

linear_copy_display_gpu_image is created using DRM_FORMAT_MOD_LINEAR,
so use createImageFromDmaBufs3 to be able to pass the modifier when
importing it on the render GPU.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9282
Reviewed-by: Simon Ser <contact@emersion.fr>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26337>
(cherry picked from commit 5119e0adc3e3d0bbf3fa162b00d952d71d53c6fe)

10 months agoradv: use 32bit va range for sparse descriptor buffers
Felix bridault [Sun, 3 Dec 2023 15:30:02 +0000 (15:30 +0000)]
radv: use 32bit va range for sparse descriptor buffers

Fixes: 5c5735fd681 ("radv: advertise VK_EXT_descriptor_buffer")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26482>
(cherry picked from commit 059391b63114055a5349f8aef9c3f03245a2aa07)

10 months agoamd/ci: radeonsi is gl, not vk
Eric Engestrom [Sun, 3 Dec 2023 10:59:55 +0000 (10:59 +0000)]
amd/ci: radeonsi is gl, not vk

Fixes: cf323446e70d9fa10d7d ("amd/ci: run gl(es) cts & piglit on radeonsi on vangogh")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26478>
(cherry picked from commit 2cdebf51fdb800dea06c9a7d421c42a48e8ffd8e)

10 months ago.pick_status.json: Update to ebaede788e05ea3a22bfd4f054c85053247de9ff
Eric Engestrom [Mon, 4 Dec 2023 21:23:31 +0000 (21:23 +0000)]
.pick_status.json: Update to ebaede788e05ea3a22bfd4f054c85053247de9ff

10 months agobin/gen_release_notes: fix regex raw string
Eric Engestrom [Sat, 2 Dec 2023 11:43:28 +0000 (11:43 +0000)]
bin/gen_release_notes: fix regex raw string

Fixes: ba6336ce3e6fa8f32c55 ("docs: use version-number as toctree-title for relnotes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26468>
(cherry picked from commit 2a6d750a53ecec2882d77fc3250989815830c9bf)

10 months ago.pick_status.json: Mark e0c2244ea9b162788c781398743919956b0d55b7 as denominated
Eric Engestrom [Sun, 3 Dec 2023 08:07:09 +0000 (08:07 +0000)]
.pick_status.json: Mark e0c2244ea9b162788c781398743919956b0d55b7 as denominated

10 months agoradv: fix bogus interaction between DGC and RT with descriptor bindings
Samuel Pitoiset [Thu, 30 Nov 2023 10:06:55 +0000 (11:06 +0100)]
radv: fix bogus interaction between DGC and RT with descriptor bindings

pipeline_is_dirty was never TRUE because it's emitted in the before
helper. This might fix bad interactions between DGC and RT because
they both use compute shaders and descriptor bindings need to be
re-emitted.

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/26417>
(cherry picked from commit ab6cf1592fc5c83a45709e68bceee9eb0e7d7870)

10 months agor600/sfn: Don't try to re-use iterators when the set is made empty
Gert Wollny [Thu, 30 Nov 2023 12:43:11 +0000 (13:43 +0100)]
r600/sfn: Don't try to re-use iterators when the set is made empty

It seems with libc++ the iterators are invalidated when the set
is emptied during iterating over it.

Fixes: 05fab97 (r600/sfn: Don't try to re-use the iterator when uses is updated)

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

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26420>
(cherry picked from commit c13de0509c43f9b9764dc939aa64fe70c6a80870)

10 months agor600/sfn: Fix usage of std::string constructor
Gert Wollny [Thu, 30 Nov 2023 09:53:05 +0000 (10:53 +0100)]
r600/sfn: Fix usage of std::string constructor

Fixes: f718ac62688b (r600/sfn: Add a basic nir shader backend)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26415>
(cherry picked from commit ac4b8aab21ccea79ac2f6f00ba1bc4be1ea1311e)

10 months agoasahi: Use the compat version of qsort_r
Alessandro Astone [Wed, 4 Oct 2023 21:31:26 +0000 (23:31 +0200)]
asahi: Use the compat version of qsort_r

Not all platforms define qsort_r, util_qsort_r takes care of that.

CC: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25553>
(cherry picked from commit 4f48a140ac9dc2d1581faed21ac07914c6744cb5)

11 months agonir/lower_vars_to_scratch: Remove all unused derefs
Konstantin Seurer [Sat, 18 Nov 2023 17:18:47 +0000 (18:18 +0100)]
nir/lower_vars_to_scratch: Remove all unused derefs

If the shader passed to nir_lower_vars_to_scratch contains some unused
derefs to a variable that will be lowered, validation will fail because
the variable is not part of the shader after the pass.

cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26271>
(cherry picked from commit 827b0fa1efd734f76364ac5cd72ae1537062eb71)

11 months agoanv: remove heuristic preferring dedicated allocations
Lionel Landwerlin [Wed, 22 Nov 2023 14:31:10 +0000 (16:31 +0200)]
anv: remove heuristic preferring dedicated allocations

This heuristic doesn't show much difference when you have a beafy
processor but on lower end skus, it increase the number of buffers in
the execbuffer ioctl, adding significant overhead in i915.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4cdd3178fb ("anv: Meet CCS alignment reqs with dedicated allocs")
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26335>
(cherry picked from commit b18006397be4bfaa78a444166ae0e60b2756bf6a)

11 months agoanv: track & unbind image aux-tt binding
Lionel Landwerlin [Wed, 22 Nov 2023 14:27:39 +0000 (16:27 +0200)]
anv: track & unbind image aux-tt binding

This solves a problem when you have a big memory chunk of which some
regions are bound to images. If the image is destroyed, currently the
aux-tt mapping stays and prevent any new image aux-tt mapping within
that region, until the memory is freed.

This maps & unmaps the aux-tt region at respectively bind & destroy
time, so that the memory chunks can be map through aux-tt.

If there is aliasing of memory to 2 different images, then the first
one "wins" the aux mapping and gets compression support. The second
one doesn´t.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ee6e2bc4a3 ("anv: Place images into the aux-map when safe to do so")
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26335>
(cherry picked from commit 7b87e1afbcd880dd25771a42d65585da44faa444)

11 months agoanv: use main image address to determine ccs compatibility
Lionel Landwerlin [Wed, 22 Nov 2023 14:26:38 +0000 (16:26 +0200)]
anv: use main image address to determine ccs compatibility

The BO address is not really a good criteria since we can bind an
image at an offset inside a BO.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ee6e2bc4a3 ("anv: Place images into the aux-map when safe to do so")
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26335>
(cherry picked from commit b09db9d823638ccccb0898736024e69f25c321a0)

11 months agointel/aux_map: introduce ref count of L1 entries
Lionel Landwerlin [Thu, 23 Nov 2023 08:11:05 +0000 (10:11 +0200)]
intel/aux_map: introduce ref count of L1 entries

To implement this feature, we need to do CPU side tracking of all
L3/L2/L1 entries. This does add a little bit of CPU allocations, but
the advantage is that the traversal of the page table tree is faster.
No more need for the linear seach of find_buffer().

With this feature, we can have multiple VkImage bind to the same main
memory address, as long as they share exact same mapping parameters.
The AUX mapping will be removed when the last VkImage is destroyed.

As previously, if the L1 mapping entry parameters don't match, the
mapping fails. Anv handles this nicely by just disabling AUX on the
image.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26335>
(cherry picked from commit 7c6faa1efe8f50263bfc1f71cb1c4a1c2302b5df)

11 months agointel/fs: fix incorrect register flag interaction with dynamic interpolator mode
Lionel Landwerlin [Tue, 21 Nov 2023 08:38:19 +0000 (10:38 +0200)]
intel/fs: fix incorrect register flag interaction with dynamic interpolator mode

Once NIR code is lowered and a few optimization passes have run, there
might be flag register interactions between instructions quite far
away from one another.

In the following case :

   f0 = and r0, r1
   ...
   fs_interpolate r2, r3
   ...
   if f0
      ...
   endif

If we lower fs_inteporlate while using the f0 register, we completely
garble the value meant for the if block.

To fix this, emit the predication for fs_interpolate in brw_fs_nir.cpp
when doing the NIR translation to the backend IR. This will guarantee
that the flag register interactions are visible to the optimization
passes, avoiding the problem above.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 68027bd38e ("intel/fs: implement dynamic interpolation mode for dynamic persample shaders")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9757
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26306>
(cherry picked from commit 83a1657b6c7f117f1226a955b8d2f1e01b22d322)

11 months agovenus: implement vkGet[Device]ImageSparseMemoryRequirements
Juston Li [Fri, 17 Nov 2023 20:59:43 +0000 (12:59 -0800)]
venus: implement vkGet[Device]ImageSparseMemoryRequirements

These were left unimplemented despite sparse support being added back to
venus in a55d26b5 ("venus: add back sparse binding support")

Same as vn_GetPhysicalDeviceSparseImageFormatProperties2, venus sparse
support requires queues that also support transfer so any sparse-only
queues are filtered out. If a device only supports sparse with
sparse-only queues, sparse features are disabled and these functions
return count of 0.

Fixes: a55d26b566f ("venus: add back sparse binding support")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26297>
(cherry picked from commit 746da376e42312034fe4f676eb9d8ee60aaec7e4)

11 months agoaco: don't optimize DPP across more than one block
Georg Lehmann [Fri, 24 Nov 2023 14:45:44 +0000 (15:45 +0100)]
aco: don't optimize DPP across more than one block

Register write tracking doesn't work for inactive lanes, so this was unsafe.

Foz-DB Navi31:
Totals from 8 (0.01% of 78196) affected shaders:
Instrs: 11513 -> 11515 (+0.02%)
CodeSize: 61056 -> 61064 (+0.01%)

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10197
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26373>
(cherry picked from commit 576afa85405a9796c2eb9c88cdfa28b441033009)

11 months ago.pick_status.json: Update to 0e1bee73eb401e3b9c39f4777f775dd3ab9a08e2
Eric Engestrom [Sun, 3 Dec 2023 07:57:13 +0000 (07:57 +0000)]
.pick_status.json: Update to 0e1bee73eb401e3b9c39f4777f775dd3ab9a08e2

11 months agodocs: add sha256sum for 23.3.0
Eric Engestrom [Sat, 2 Dec 2023 11:56:10 +0000 (11:56 +0000)]
docs: add sha256sum for 23.3.0

11 months agodocs: add release notes for 23.3.0
Eric Engestrom [Sat, 2 Dec 2023 11:51:55 +0000 (11:51 +0000)]
docs: add release notes for 23.3.0

11 months agoVERSION: bump for 23.3.0
Eric Engestrom [Wed, 29 Nov 2023 19:30:40 +0000 (19:30 +0000)]
VERSION: bump for 23.3.0

11 months agoac/nir: fix partial mesh shader output writes on GFX11
Rhys Perry [Tue, 3 Oct 2023 14:59:59 +0000 (15:59 +0100)]
ac/nir: fix partial mesh shader output writes on GFX11

Fixes dEQP-VK.mesh_shader.ext.smoke.monolithic.mesh_shader_triangle with
nir_opt_combine_stores disabled.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 240e16fc8e27 ("ac/nir/ngg: Use attribute ring for mesh shader params.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25530>
(cherry picked from commit 2d98236dd525622527df22179756f7b0f1466afa)

11 months agovenus: Do not submit batch manually when no feedback is required
Mary Guillemard [Mon, 27 Nov 2023 09:54:37 +0000 (10:54 +0100)]
venus: Do not submit batch manually when no feedback is required

This fixes hangs with Zink on piglit spec@arb_sparse_buffer tests caused by the double submission.

Fixes: a55d26b566f ("venus: add back sparse binding support")

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26375>
(cherry picked from commit f59665bb62b579c6cc26155a26ce557f9f3357d2)

11 months agod3d12: Fix multidimensional array ordering
Jesse Natalie [Fri, 24 Nov 2023 20:20:44 +0000 (12:20 -0800)]
d3d12: Fix multidimensional array ordering

Apparently my C multimensional array syntax was rusty.

Fixes: a6740ee7 ("d3d12: Fix indexing of local_reference_state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26362>
(cherry picked from commit 1924cdc2898b0a14a8afd13db3a06dab9e1d032e)

11 months agointel/ci: fix .hasvk-manual-rules
Eric Engestrom [Fri, 17 Nov 2023 16:03:05 +0000 (16:03 +0000)]
intel/ci: fix .hasvk-manual-rules

Fixes: 570acf56554a619ca2bf ("ci: Add a manual full and 1/10th hasvk CTS runs.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26259>
(cherry picked from commit cf510e38a51250702ec90bece7a9d397669ae28f)

11 months agointel/perf: fix regex escaping
Eric Engestrom [Fri, 24 Nov 2023 09:48:35 +0000 (09:48 +0000)]
intel/perf: fix regex escaping

`\$` is interpreted before being passed to `re.search()`, but luckily
for us the escape is also invalid and because of that, python 3.12+
warns us about it.

Use a raw string instead, so that the `\` is passed untouched to
`re.search()`.

Fixes: aa04b47c6e43e6cc3561 ("intel/perf: add support for GtSlice/GtSliceXDualsubsliceY variables")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26355>
(cherry picked from commit 19420731123e850e10c68eb3cd672b00561c48d7)

11 months agonir: fix gathering TESS_LEVEL_INNER/OUTER usage with lowered IO
Marek Olšák [Mon, 13 Nov 2023 05:16:24 +0000 (00:16 -0500)]
nir: fix gathering TESS_LEVEL_INNER/OUTER usage with lowered IO

Those varyings shouldn't flag patch_inputs_read/patch_outputs_written.

Fixes: 10be706778bd670 - nir: gather indirect info from lowered IO intrinsics

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26275>
(cherry picked from commit 7a9b73fcb81126faa92397d82b627db64e1b8e0f)

11 months agoradeonsi: check sctx->tess_rings is valid before using it
Pierre-Eric Pelloux-Prayer [Tue, 14 Nov 2023 12:41:47 +0000 (13:41 +0100)]
radeonsi: check sctx->tess_rings is valid before using it

Fixes: c89ca3b47f1 ("radeonsi: change si_emit_derived_tess_state into a state atom")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10015

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26190>
(cherry picked from commit 945288ffaecac106c978d10cd4d8512fa2992c47)

11 months ago.pick_status.json: Update to f843b14c171299e1696ca6d971ccaa496f60c3ab
Eric Engestrom [Tue, 28 Nov 2023 11:22:43 +0000 (11:22 +0000)]
.pick_status.json: Update to f843b14c171299e1696ca6d971ccaa496f60c3ab

11 months agoVERSION: bump for 23.3.0-rc5
Eric Engestrom [Fri, 24 Nov 2023 19:40:33 +0000 (19:40 +0000)]
VERSION: bump for 23.3.0-rc5

11 months agomesa: restore call to _mesa_set_varying_vp_inputs from set_vertex_processing_mode
Pierre-Eric Pelloux-Prayer [Fri, 10 Nov 2023 13:32:50 +0000 (14:32 +0100)]
mesa: restore call to _mesa_set_varying_vp_inputs from set_vertex_processing_mode

Otherwise ctx->VertexProgram._VaryingInputs might not be up to date.

We can't do this in update_program because this breaks vbo_save_playback_vertex_list_gallium:

  const GLbitfield enabled = node->enabled_attribs[mode];
  _mesa_set_varying_vp_inputs(ctx, enabled);              <-- update _VaryingInputs

  if (ctx->NewState)
     _mesa_update_state(ctx);                             <-- calls update_program, reverting the
                                                              change made above

Fixes: c97961a855a ("mesa: fix 38% decrease in display list performance of Viewperf2020/NX8_StudioAA")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9441
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25956>
(cherry picked from commit 64352ae8e4341d57504478cf2e6315041f13d5e0)

11 months agov3d/resource: Support offset query for multi-planar planes
Robert Mader [Sun, 19 Nov 2023 21:14:16 +0000 (22:14 +0100)]
v3d/resource: Support offset query for multi-planar planes

This is required in order to return the correct value for
`gbm_dri_bo_get_offset()` for e.g. the second plane of a NV12 image.

Use the newly introduced `util_resource` helper and, while on it, also
add support for `gbm_bo_get_plane_count()`.

Cc: mesa-stable
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26283>
(cherry picked from commit 2404483706f4396920e94f7abc80368b7d25a965)

11 months agovc4/resource: Support offset query for multi-planar planes
Robert Mader [Sun, 19 Nov 2023 21:12:36 +0000 (22:12 +0100)]
vc4/resource: Support offset query for multi-planar planes

This is required in order to return the correct value for
`gbm_dri_bo_get_offset()` for e.g. the second plane of a NV12 image.

Use the newly introduced `util_resource` helper and, while on it, also
add support for `gbm_bo_get_plane_count()`.

Cc: mesa-stable
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26283>
(cherry picked from commit cb8cdab928ff2302bef00b341914168c78a89a7c)

11 months agoradv: do not set OREO_MODE to fix rare corruption on GFX11
Samuel Pitoiset [Wed, 22 Nov 2023 16:33:39 +0000 (17:33 +0100)]
radv: do not set OREO_MODE to fix rare corruption on GFX11

Ported from RadeonSI 3f108e7615213051466af4ed688e94ce6ddde065.
Seems to be a recommendation from the AMD hw team.

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

11 months agoradv: set radv_invariant_geom=true for War Thunder
Samuel Pitoiset [Wed, 22 Nov 2023 17:40:32 +0000 (18:40 +0100)]
radv: set radv_invariant_geom=true for War Thunder

War Thunder has native Vulkan support.

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

11 months agoradv: disable TC-compatible HTILE on Tonga and Iceland
Samuel Pitoiset [Wed, 15 Nov 2023 10:52:12 +0000 (11:52 +0100)]
radv: disable TC-compatible HTILE on Tonga and Iceland

According to RadeonSI, TC-compat HTILE have issues on Tonga/Iceland
(first GFX8 chips) and a bunch of games seem to have issues.

Let's disable it instead of using a feature that is known broken.

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

11 months agoanv: use the right vertexOffset on CmdDrawMultiIndexed
Iván Briano [Mon, 20 Nov 2023 23:50:00 +0000 (15:50 -0800)]
anv: use the right vertexOffset on CmdDrawMultiIndexed

Fixes: c70ef757e63 ("anv: Use extended parameters on Gen11+")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26327>
(cherry picked from commit 43cb4cb6dde1e8fdbe609c42b47e0f27d8411982)

11 months agoutil/rbsp: Fill bits twice if reading more than 16 bits
David Rosca [Sun, 19 Nov 2023 10:27:29 +0000 (11:27 +0100)]
util/rbsp: Fill bits twice if reading more than 16 bits

vl_rbsp_fillbits may fill less than 32 bits if it removes emulation
prevention bytes, but will fill at least 16 bits. We need to call it
twice when reading more than 16 bits.

This fixes parsing H264 SPS packed header in va frontend when emulation
prevention bytes are at position where 32 bit values are read.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26276>
(cherry picked from commit 73d69ef1e6b013f923ec459c789976570baaf447)

11 months ago.pick_status.json: Update to b07a58157d0b110dbc09a42cffe7046c3200dd3b
Eric Engestrom [Fri, 24 Nov 2023 17:15:13 +0000 (17:15 +0000)]
.pick_status.json: Update to b07a58157d0b110dbc09a42cffe7046c3200dd3b

11 months agotu: Fix re-emitting VS param state after it is re-enabled
Connor Abbott [Fri, 10 Nov 2023 17:03:08 +0000 (18:03 +0100)]
tu: Fix re-emitting VS param state after it is re-enabled

We need to always re-emit it if it was disabled. Fixes vertex/instance
offset in a direct draw after an indirect draw.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26148>
(cherry picked from commit 6be6b4ca711b157d0d92b4942b19eb74e71ed04f)

11 months agoaco/sched: treat p_dual_src_export_gfx11 like export
Georg Lehmann [Tue, 21 Nov 2023 14:24:35 +0000 (15:24 +0100)]
aco/sched: treat p_dual_src_export_gfx11 like export

This prevents the scheduler from moving the dual source export above mrtz
export, which caused hangs.

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

Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26317>
(cherry picked from commit 0a5d3ac8d2b245e8b3f3589d3ade3de7356fe637)

11 months agodrirc: Set limit_trig_input_range option for Valheim
Tapani Pälli [Mon, 20 Nov 2023 18:42:31 +0000 (20:42 +0200)]
drirc: Set limit_trig_input_range option for Valheim

Fixes ocean rendering in Valheim.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10174
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/26295>
(cherry picked from commit aba00ff391b9fe9e63e2a8b6ad807f338ad7a6a6)

11 months agointel/perf: fix querying of configurations
Lionel Landwerlin [Mon, 20 Nov 2023 09:43:24 +0000 (11:43 +0200)]
intel/perf: fix querying of configurations

Using the unsized data field is incorrect. The data is located behind
the entire drm_i915_query_perf_config structure.

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/26285>
(cherry picked from commit f9bab3566bcfbf4d33bcbb9fb8d5e8d416cb5674)

11 months agov3dv: Rework to remove drm authentication for wsi
Erico Nunes [Thu, 16 Nov 2023 16:00:16 +0000 (17:00 +0100)]
v3dv: Rework to remove drm authentication for wsi

For Wayland wsi allocations, v3dv used the wl_drm protocol, which is now
being phased out in favor of dmabuf feedback.
wl_drm is used to figure out the display device (in v3dv assumed to be
vc4) and then to authenticate with the Wayland compositor in order to
allocate scanout-able buffers (in this case, dumb buffers) directly at
the display device.
Recent commit 88c03ddd34 changed the behavior of the wsi code, and
wl_drm is now passing the render device instead, which broke Wayland
wsi.
It turns out that the authentication code is not really needed and since
we would like to remove wl_drm usage and the master device is assumed to
be vc4 anyway, we can just remove some unneeded device-specific wsi code
and get Vulkan Wayland wsi back to work.

Fixes: 88c03ddd345 ("egl/drm: get compatible render-only device fd for kms-only device")

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26200>
(cherry picked from commit 898700ca647b2de0eecff864b6b0a4cbeb935840)

11 months ago.pick_status.json: Update to f39ed0063b4cd3e5a71efad2d43ce31f574c698d
Eric Engestrom [Wed, 22 Nov 2023 08:39:48 +0000 (08:39 +0000)]
.pick_status.json: Update to f39ed0063b4cd3e5a71efad2d43ce31f574c698d

11 months agoutil: Include stdint.h in libdrm.h
Matt Turner [Sat, 18 Nov 2023 00:52:36 +0000 (19:52 -0500)]
util: Include stdint.h in libdrm.h

drmGetDevices2()'s first parameter is a uint32_t.

Fixes: e05abb13455 ("util: Add a simple no-op libdrm shim")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26265>
(cherry picked from commit 5022a26b50ef912835049a32ac3904ea77656e43)

11 months agoegl: ensure a render node is passed to _eglFindDevice()
Simon Ser [Wed, 15 Nov 2023 11:59:40 +0000 (12:59 +0100)]
egl: ensure a render node is passed to _eglFindDevice()

_eglFindDevice() will fail if it's not provided a render node:
the EGLDevice list only contains one entry per render node, plus
the special software device. Passing a primary node for a
display-only device will not work.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10142
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Tested-by: Iago Toral Quiroga <itoral@igalia.com>
Tested-by: Alejandro Piñeiro <apinheiro@igalia.com>
Fixes: 2be404f5571a ("egl: error out if we can't find an EGLDevice in _eglFindDevice()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26205>
(cherry picked from commit 0f978c34410283558afe9de5dab007f63a763c5e)

11 months agoegl: move dri2_setup_device() after dri2_setup_extensions()
Simon Ser [Wed, 15 Nov 2023 11:56:35 +0000 (12:56 +0100)]
egl: move dri2_setup_device() after dri2_setup_extensions()

dri2_setup_device() will depend on the extensions being set up in
the next commit.

None of the code in-between depends on disp->Device AFAIU.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Tested-by: Iago Toral Quiroga <itoral@igalia.com>
Tested-by: Alejandro Piñeiro <apinheiro@igalia.com>
Backport-to: 23.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26205>
(cherry picked from commit 9b70096f5e9ab7be23abc9154c3fb83b710ccd6b)

11 months agoegl: extract EGLDevice setup in dedicated function
Simon Ser [Wed, 15 Nov 2023 11:51:57 +0000 (12:51 +0100)]
egl: extract EGLDevice setup in dedicated function

Extract the logic responsible for populating disp->Device via
_eglFindDevice(). This isn't much for now but will grow in a
following commit.

No functional changes.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Tested-by: Iago Toral Quiroga <itoral@igalia.com>
Tested-by: Alejandro Piñeiro <apinheiro@igalia.com>
Backport-to: 23.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26205>
(cherry picked from commit b4ec0b51ce47d87d21609444dddd50c91968f26d)

11 months agoegl/dri2: increase NUM_ATTRIBS to fit all the attributes
Eric Engestrom [Thu, 16 Nov 2023 17:44:50 +0000 (17:44 +0000)]
egl/dri2: increase NUM_ATTRIBS to fit all the attributes

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

11 months agoradv: enable radv_disable_trunc_coord for vkd3d-proton/DXVK
Rhys Perry [Wed, 18 Oct 2023 14:35:03 +0000 (15:35 +0100)]
radv: enable radv_disable_trunc_coord for vkd3d-proton/DXVK

This fixes diagonal SSAO artifacts in some games.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9253
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6395
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25911>
(cherry picked from commit 9e9eb87dd3a2ffe782ac85998a69623f59306caf)

11 months agoradv: add radv_disable_trunc_coord option
Rhys Perry [Wed, 18 Oct 2023 14:34:45 +0000 (15:34 +0100)]
radv: add radv_disable_trunc_coord option

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25911>
(cherry picked from commit 4d2a3b95730c4781234096778043f987234b6a4c)

11 months agoanv: fix dirty state tracking for 3DSTATE_PUSH_CONSTANT_ALLOC
Lionel Landwerlin [Thu, 9 Nov 2023 12:48:26 +0000 (14:48 +0200)]
anv: fix dirty state tracking for 3DSTATE_PUSH_CONSTANT_ALLOC

ANV_CMD_DIRTY_PIPELINE also includes reprogramming of
3DSTATE_PUSH_CONSTANT_ALLOC_* instructions.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26247>
(cherry picked from commit 9689607f10bb150df0a75d189fc02b522410887f)

11 months agoanv: fix CC_VIEWPORT pointer dirty after blorp/simple-shaders
Lionel Landwerlin [Thu, 9 Nov 2023 11:51:38 +0000 (13:51 +0200)]
anv: fix CC_VIEWPORT pointer dirty after blorp/simple-shaders

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26247>
(cherry picked from commit 1257d08bcb9d7068ec24acbcf281a388e7ff015f)

11 months agopanfrost: Flag the right shader when updating images
Boris Brezillon [Thu, 5 Oct 2023 06:49:46 +0000 (08:49 +0200)]
panfrost: Flag the right shader when updating images

Fixes: fab1fabb4f0b ("panfrost: Dirty track fragment images")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26221>
(cherry picked from commit 8ed471a339543072e0683308ac1ee1a4faad41fb)

11 months agointel/nir/rt: fix reportIntersection() hitT handling
Lionel Landwerlin [Sat, 9 Sep 2023 03:30:52 +0000 (06:30 +0300)]
intel/nir/rt: fix reportIntersection() hitT handling

We're currently updating the hitT value in the traversal result with
the hitT value from reportIntersection(), but this is not correct.

First the hitT value of reportIntersection() should update the
gl_RayTmaxEXT value (maps to brw_nir_rt_mem_ray_defs::t_far).

Second the hitT determined by traversal should only be updated if the
reportIntersection() hitT value has updated the gl_RayTmaxEXT and that
the new gl_RayTmaxEXT is smaller than the determined hitT value from
traversal.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Fixes: 303378e1dd ("intel/rt: Add lowering for combined intersection/any-hit shaders")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25146>
(cherry picked from commit 4eb4197d27aed6f5e71195a971145b2945d78330)

11 months agointel/fs: rerun divergence analysis prior to convert_from_ssa
Lionel Landwerlin [Thu, 16 Nov 2023 19:24:31 +0000 (21:24 +0200)]
intel/fs: rerun divergence analysis prior to convert_from_ssa

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9964
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26235>
(cherry picked from commit 6dbb5f1e07b11be0cc6ac764bf1b51feaa7fa623)

11 months agozink: allow software rendering only if selected
José Expósito [Thu, 16 Nov 2023 11:18:29 +0000 (12:18 +0100)]
zink: allow software rendering only if selected

In environments where 3D acceleration is not available, like in a VM,
the behavior before commit 8cd44b884387 ("egl: add automatic zink
fallback loading between hw and sw drivers") was to fallback to swrast.

This was the output of `eglinfo` in that situation:

    $ eglinfo
    [...]
    Wayland platform:
    EGL driver name: swrast
    OpenGL core profile renderer: llvmpipe (LLVM 17.0.4, 256 bits)

However, after commit 8cd44b884387 ("egl: add automatic zink fallback
loading between hw and sw drivers") Zink support is tested before
falling back to swrast.
Since the system doesn't support 3D acceleration, Zink + software
rendering is used instead of swrast causing issues like the ones
described in #10146.

In this case, `eglinfo` prints:

    $ eglinfo
    [...]
    Wayland platform:
    EGL driver name: zink
    OpenGL core profile renderer: zink Vulkan 1.3(llvmpipe (LLVM 17.0.4,
    256 bits) (MESA_LLVMPIPE))

This patch ensures that Zink + software rendering is used only when the
user opts-in by setting `LIBGL_ALWAYS_SOFTWARE` or `D3D_ALWAYS_SOFTWARE`
and swrast is used otherwise.

After the patch, the output of `eglinfo` is identical to the one before
the regression:

    $ eglinfo
    [...]
    Wayland platform:
    EGL driver name: swrast
    OpenGL core profile renderer: llvmpipe (LLVM 17.0.4, 256 bits)

Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10146
Fixes: 8cd44b884387 ("egl: add automatic zink fallback loading between
hw and sw drivers")

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26220>
(cherry picked from commit 2a71f06f2938678d89d5ed1372cda6a7b55d964d)

11 months agopanfrost: Support parameter queries for main planes
Robert Mader [Tue, 7 Nov 2023 23:18:41 +0000 (00:18 +0100)]
panfrost: Support parameter queries for main planes

In order to return correct offsets, strides and possibly other
parameters. This is relevant for formats like NV12 and P010 where
the second plane, when produced by the V4L2 decoder, uses the
same FD like the first one, but with an offset.

Analogous to 7a7e577d.

Also use the new helper to get the number of planes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10094
Cc: mesa-stable
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26109>
(cherry picked from commit 5f4253e096de76651d3bd2bbd447abb1e9cb624f)