320 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen
00c60bd69e wsi/wayland: Remove unused present_mode member.
We use chain->base.present_mode instead.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit d5509c147f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:39 -08:00
Hans-Kristian Arntzen
7bce0c8259 wsi/wayland: Handle FIFO -> MAILBOX transitions correctly
When transitioning from FIFO to MAILBOX with swapchain_maintenance1,
we must make sure that the first MAILBOX after FIFO observes the wait
barrier. This was done implicitly in the timestamp path, but not for
the non-commit-timing path.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit 63cbbf2a1c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:38 -08:00
Hans-Kristian Arntzen
5feac905d0 wsi/wayland: Don't fallback to broken legacy throttling with FIFO
When commit-timing was not supported, but FIFO was we would end
up in a situation with throttling on FIFO barrier and legacy fence.
At that point, the entire point of FIFO falls flat.

There are some caveats with this approach, but it's not expected
that compositors will only support FIFO, and not commit-timing long
term.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit 458842c3b5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:38 -08:00
Hans-Kristian Arntzen
17c7e04e8a wsi/wayland: Only use commit timing protocol alongside present time.
Comming timing is meaningless when we cannot receive timing feedback.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
(cherry picked from commit 4dde605924)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:37 -08:00
Dave Airlie
37d72c978f radv/video: set max slice counts to 1 for h264/5 encode
Right now the driver doesn't support multi-slice encodes, so
report the correct value.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Autumn Ashton
Cc: mesa-stable
(cherry picked from commit 699afb88ec)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:36 -08:00
Sil Vilerino
017bc0cc2b vl/vl_winsys: Add missing include for function declaration
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12150
Fixes: 2548471ca1 ("vl/vl_win32_screen_create_from_d3d12_device: Allow winsys to be injected")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
(cherry picked from commit ce1aad4505)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:35 -08:00
Georg Lehmann
17da2666c7 nir/uub: properly limit float support to 32bit
Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
(cherry picked from commit 0b366a7ab2)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:34 -08:00
Job Noorman
0f1abde4cc ir3/isa: fix conflict between stib.b and stsc
stsc was using don't care bits in a position position that is
significant for stib.b.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 11b2c54a9a ("ir3/a7xx: Add STSC definition")
(cherry picked from commit 9052ad449b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:34 -08:00
Tapani Pälli
0d6238b6ab drirc/anv: force_vk_vendor=-1 for Marvel Rivals
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12280
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
(cherry picked from commit 03c9f164e8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:33 -08:00
Karmjit Mahil
d8ba1e4143 util/idalloc: Fix util_idalloc_foreach() build issue
Currently `util_idalloc_foreach()` isn't being used in the codebase
but if used it causes a build error as `num_used` doesn't exist.
Fix that by using `num_set_elements`.

Fixes: 0589dfe4e2 ("util/idalloc: optimize foreach by tracking the greatest non-zero element")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit af346cd77f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:30 -08:00
Dylan Baker
03c9e6c71d .pick_status.json: Update to cfb5687cb3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-12 09:32:28 -08:00
Mi, Yanfeng
757f3fb51b anv:Fix memory grow calculation overflow issue
when old buffer size is large than 2G, 32bit cannot hold
2 times buffer size (>4G).

Fixes: 8d813a90d6 ("anv: fail pool allocation when over the maximal size")

Signed-off-by: Mi, Yanfeng <yanfeng.mi@intel.com>
(cherry picked from commit 0a5a04f509)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 13:41:59 -08:00
Paulo Zanoni
8b0a86d639 brw: don't forget the base when emitting SHADER_OPCODE_MOV_RELOC_IMM
The last argument seems to be used as brw_shader_reloc::delta (from
brw_add_reloc), and we're unconditionally setting it to 0 here, while
the other place where we handle nir_intrinsic_load_reloc_const_intel
seems to be setting the base appropriately.

I found this by inspection while debugging a bug related to this code,
so I'm not aware of any workloads that get improved by this patch.

Related patches:
 - ecbec25e84 ("intel/nir: add reloc delta to load_reloc_const_intel intrinsic")
 - 99047451c9 ("intel/fs: add plumbing for embedded samplers")

Fixes: ecbec25e84 ("intel/nir: add reloc delta to load_reloc_const_intel intrinsic")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
(cherry picked from commit 0dc2a5808e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 13:41:55 -08:00
Hans-Kristian Arntzen
ee0d63011c wsi/x11: Do not use allocation callbacks on a thread.
This is banned by spec.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
(cherry picked from commit 81526187a8)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 13:41:53 -08:00
José Roberto de Souza
7c44f03d7f intel/dev/xe: Fix size of eu_per_dss_mask
Real Xe KMD actually returns a uint64, so here changing from uint32
to uint64.

Fixes: 04bdbeec31 ("intel/dev/xe: Fix access to eu_per_dss_mask")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 2aae000edb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 13:41:48 -08:00
Dylan Baker
046418948d .pick_status.json: Update to b01afd06cd
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-09 13:41:45 -08:00
Rhys Perry
3cffcc3da7 aco: don't CSE p_shader_cycles_hi_lo_hi
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: fae2a85d57 ("aco/gfx12: implement subgroup shader clock")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12243
(cherry picked from commit ab26b99c2c)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:04 -08:00
Georg Lehmann
f750108aa9 aco/gfx12: disable vinterp ddx/ddy optimization
This only seems to work on gfx11 and gfx11.5, and it's only faster on gfx11.5.

We could continue to use vinterp, with constants copied to vgprs, but
whether that's beneficial depends on the shader.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Fixes: bee487df48 ("aco/gfx11.5+: use vinterp for fddx/fddy")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12250
(cherry picked from commit 7425e71ae0)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:03 -08:00
José Roberto de Souza
10f599a8b3 intel/dev/xe: Fix access to eu_per_dss_mask
DRM_XE_TOPO_EU_PER_DSS and DRM_XE_TOPO_SIMD16_EU_PER_DSS can be any
number of bytes long but it was assuming it was always 4 bytes long.
That was not a issue because Xe KMD return 4 bytes even if only needs
1 or 2 bytes but that is a problem with our HW simulator that was
returning 2 bytes.

Fixes: a24d93aa89 ("intel/dev: Query and compute hardware topology for Xe")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit 04bdbeec31)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:02 -08:00
Lionel Landwerlin
9319df3b07 anv: set pipeline flags correct for imported libs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3d49cdb71e ("anv: implement VK_EXT_graphics_pipeline_library")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit 371b7a9b0d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:02 -08:00
Lionel Landwerlin
dc04f5ca28 anv: fix missing bindings valid dynamic state change check
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ddd296cd3 ("anv: implement VK_EXT_vertex_input_dynamic_state")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
(cherry picked from commit 6e396b400a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:01 -08:00
Erik Faye-Lund
a72ba2fc47 panvk: free preload-shaders after compiling
These shaders are created using nir_builder_init_simple_shader(), which
allocates using a NULL ralloc-parent, so ralloc_free should be the right
function to free them with.

Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 9f69f7a66d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:44:00 -08:00
Erik Faye-Lund
f7f217f093 vulkan/meta: plug a couple of memory leaks
We create NIR shaders here, and we need to free them when we're done with
them as well.

These shaders are created using nir_builder_init_simple_shader(), which
allocates using a NULL ralloc-parent, so ralloc_free should be the right
function to free them with.

Fixes: 514c10344e ("vulkan/meta: Add a concept of rect pipelines")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
(cherry picked from commit 43738a9a94)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:43:59 -08:00
Dylan Baker
6e98298124 .pick_status.json: Update to da77188d7d
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
2024-12-06 08:43:54 -08:00
Dylan Baker
4dea7e6bc8 .pick_status.json: Mark dfa4c55a4f as denominated 2024-12-04 14:09:01 -08:00
Samuel Pitoiset
69e950d853 radv: fix skipping on-disk shaders cache when not useful
This was just broken because individual shaders were still stored
on-disk in many situations:
- for shader object, all compute/graphics shaders were stored
- for fast-GPL, graphics shaders were stored
- for pipeline binaries, when the create flag was used
- for rt capture/replay and ray history

This should stop storing unused binaries on-disk and save space.

Found 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/32476>
2024-12-04 14:09:01 -08:00
Karol Herbst
1b79b681df rusticl/program: check if provided binary pointers are null
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
(cherry picked from commit 6fd6de46dc)
2024-12-04 09:54:34 -08:00
Georg Lehmann
dade5eab3f radv: fix reporting mesh/task/rt as supported dgc indirect stages
Fixes: 8300378bf3 ("radv: advertise VK_EXT_device_generated_commands on GFX8+")

Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32457>
(cherry picked from commit b961537a17)
2024-12-04 09:54:34 -08:00
Dylan Baker
dc89d68118 .pick_status.json: Update to d0f4d0b6d0 2024-12-04 09:54:34 -08:00
Dylan Baker
06de469e7c .pick_status.json: Mark 4d35002949 as denominated 2024-12-04 09:54:34 -08:00
Connor Abbott
bd30ab0682 ir3: Fix reload_live_out() in shared RA
We never split live ranges, so we don't need to store the location of
each live value when recording live outs, but the physreg assigned to a
register will still be clobbered when we reload it so we have to record
the original physreg and then make sure to use it when reloading the
live out.

We probably never encountered a case where we needed to reload live outs
in a loop before, but after enabling clustered subgroup reductions
dEQP-VK.subgroups.clustered.compute.subgroupclusteredmin_{i,u}64vec4_requiredsubgroupsize
hits this case and fails in RA validation without this fix.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32468>
2024-12-04 09:54:34 -08:00
Antonino Maniscalco
be48136924 nir,zink,asahi: support passing through gl_PrimitiveID
When this pass is used with Zink, gl_PrimitiveID needs to be passed
through, however this is unnecessary for other divers.

Analogous to previous commit

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32397>
(cherry picked from commit 2b9738ce6d)
2024-12-03 12:47:47 -08:00
Alyssa Rosenzweig
5019b21f0e zink: fix gl_PrimitiveID reads with quads
Zink emulates quads with a GS, which imposes requirements for gl_PrimitiveID.
Handle them here. Previously Zink went out of spec.

Fixes spec@glsl-1.50@execution@primitive-id-no-gs-quads and
spec@glsl-1.50@execution@primitive-id-no-gs-quad-strip.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com>
Fixes: e2220ee55e ("zink: filled quad emulation gs generation function")
Closes: #12214
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32397>
(cherry picked from commit 23601d6632)

Conflicts:
	src/gallium/drivers/zink/ci/zink-anv-adl-fails.txt
	src/gallium/drivers/zink/ci/zink-lvp-fails.txt
	src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt
	src/gallium/drivers/zink/ci/zink-venus-lvp-fails.txt
2024-12-03 12:47:46 -08:00
Dylan Baker
9078a8becf .pick_status.json: Update to cdf822632a 2024-12-03 12:07:18 -08:00
Simon Ser
4c06515892 dri: revert INVALID modifier special-casing
Commit 361f362258 ("dri: Unify createImage and createImageWithModifiers")
has introduced new behavior for drivers which don't support explicit
format modifiers. Before this commit, INVALID was not special-cased
and any call to dri_create_image() with one or more modifiers returned
NULL. After this commit, INVALID gained a special meaning: it indicates
that the implicit modifier is accepted by the caller. This is surprising
and is an API break.

This causes further API breaks: for instance, before this commit a BO
created via gbm_bo_create_with_modifiers() was guaranteed to always
return a non-INVALID modifier in gbm_bo_get_modifier().

This is inconsistent with gbm_dri_surface_create(): that function
treats INVALID as a bad entry in the modifier list, and fails if
it's the only acceptable modifier.

Additionally, drivers don't special-case INVALID and just ignore it
if they see it in a modifier list. This causes more inconsistencies.
For instance, let's say that a library user passes the modifier list
{ INVALID, FOO } to GBM. If a driver supports explicit modifiers and
doesn't support FOO for scanout, it'll return NULL. If a driver
doesn't support explicit modifiers, the current logic would return
a non-NULL BO with an INVALID modifier. This discrepency makes it
harder to reason about the system: half of the API ignores INVALID,
while the other half assumes INVALID indicates an implicit modifier.

To fix these issues, revert to the behavior before the commit, and
require use of the dedicated API without supplying any modifier for
implicit modifiers.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 361f362258 ("dri: Unify createImage and createImageWithModifiers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32396>
(cherry picked from commit 105fcb9cfd)
2024-12-02 14:02:18 -08:00
Dylan Baker
12dc5d182e .pick_status.json: Update to 0c55770b3e 2024-12-02 14:02:14 -08:00
Marek Olšák
df49f29a50 Revert "gbm: mark surface buffers as explicit flushed"
This reverts commit c49a71c03c.

It broke radeonsi.

GBM can't set __DRI_IMAGE_USE_BACKBUFFER if gbm itself doesn't use it as
a back buffer by rendering to it and calling SwapBuffers. If another
library uses it as a back buffer, that library should set
__DRI_IMAGE_USE_BACKBUFFER, not GBM. A different flag could be added
to indicate the behavior that the original commit expected.

Fixes: c49a71c03c - gbm: mark surface buffers as explicit flushed
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11996
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32345>
(cherry picked from commit 1a7c54b840)
2024-12-02 13:45:13 -08:00
Eric Engestrom
95dd4c1992 meson/megadriver: support various lib suffixes
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
(cherry picked from commit ffd02b8ad8)

Conflicts:
	bin/install_megadrivers.py
2024-12-02 13:44:17 -08:00
Chia-I Wu
6865204891 panvk: fix vs image support
Since valhall, panvk_per_arch(nir_lower_descriptors) separates the
driver set and the user sets, and does not need pan_lower_image_index.

Fixes: 5db135f66a ("panvk: Advertize v10 support")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32308>
(cherry picked from commit 2cbb8467c1)

Conflicts:
	src/panfrost/ci/panfrost-g610-fails.txt
2024-12-02 13:41:56 -08:00
Lionel Landwerlin
8b1bd4ed76 anv/iris: leave 4k alignments for clear colors with modifiers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 17f97a69c1 ("iris: Reduce clear color state alignment to 64B")
Fixes: 063715ed45 ("anv: Reduce clear color state alignment to 64B")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12195
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13057
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32422>
(cherry picked from commit 888f63cf1b)
2024-12-02 10:55:00 -08:00
Rhys Perry
30a6487353 nir/tests: fix SSA dominance in opt_if_merge tests
It isn't necessary for these ALU instructions to be used in the next IF.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: c437f2e79c ("nir/tests: Add tests for opt_if_merge")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12211
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32391>
(cherry picked from commit 9f3607de76)
2024-12-02 10:54:59 -08:00
David Rosca
236b71542e radv/video: Always use setup reference slot when valid
Reviewed-by: Benjamin Cheng <ben@bcheng.me>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10977
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32414>
(cherry picked from commit 76e3004fef)
2024-12-02 10:54:59 -08:00
Robert Mader
935fd7e12c freedreno: Support offset query for multi-planar planes
This allows `gbm_bo_get_offset()` to return the correct offset for e.g.
the second plane of a resource with the NV12 format. Crucially this
fixes direct scanout / hardware plane usage in Mutter and possibly other
clients.

While on it also add support for stride, modifier and n_planes queries.
The later two should not change in behavior and just safe a few CPU
cycles. The stride query support in theory fixes queries for multi-plane
formats, however in practice most/all currently used formats such as NV12,
P010 and YUV420 use the same stride for all planes.

Cc: mesa-stable
Acked-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32282>
(cherry picked from commit 379de4cdce)
2024-12-02 10:54:58 -08:00
Erik Faye-Lund
5771727e70 st/mesa: check requirements for MESA_texture_const_bandwidth
This extension depends on EXT_memory_object, and is not usable without
it. So let's disable it, so applications don't try to use it.

Fixes: 5cccd6d689 ("mesa: Implement MESA_texture_const_bandwidth")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
(cherry picked from commit 7b0d401265)
2024-12-02 10:54:57 -08:00
Rob Clark
36b6f3ade4 vdrm+tu+fd: Make cross-device optional
Similar to commit 087e9a96d1 ("venus: make cross-device optional"),
make VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE use optional, because qemu does
not support this.

Fixes: 06e57e3231 ("virtio: Add vdrm native-context helper")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32392>
(cherry picked from commit dfd519ed80)
2024-12-02 10:54:56 -08:00
Scott Moreau
dcb37073e9 dri: Fix hardware cursor for cards without modifier support
After the breaking commit, gbm_bo_create_with_modifiers({LINEAR}) returns
a BO with gbm_bo_get_modifier() = INVALID. This restores the functionality
and fixes most notably, hardware cursors for cards without modifiers.

Fixes #12039.

Fixes: 361f362258 ("dri: Unify createImage and createImageWithModifiers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31725>
(cherry picked from commit 7d1a32fafd)
2024-12-02 10:54:55 -08:00
Konstantin
108ab09453 radv: Do not overwrite VRS rates when doing fast clears
Fixes a whole bunch of VRS tests on navi24.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32318>
(cherry picked from commit 8197d744f5)
2024-12-02 10:54:54 -08:00
Mary Guillemard
bd411c4c5f panvk: Call vk_free on queue array instead of vk_object_free
This is allocated using vk_alloc and isn't a vk_object.
This fixes an invalid free that could manifest as a double free error.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 5b0ff2643f ("panvk: Make the device creation/destruction per-arch")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32368>
(cherry picked from commit e5877cefc4)
2024-12-02 10:54:53 -08:00
Eric Engestrom
7c57de1282 meson/megadriver: simplify setting common megadriver arguments
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
(cherry picked from commit 6586f755b9)
2024-12-02 10:54:47 -08:00
Georg Lehmann
3d96958812 nir/opt_intrinsic: fix sample mask opt with demote
Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Fixes: d3ce8a7f6b ("nir: optimize gl_SampleMaskIn to gl_HelperInvocation for radeonsi when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
(cherry picked from commit 3f26e9ca19)
2024-12-02 10:54:45 -08:00