Commit graph

212540 commits

Author SHA1 Message Date
Roland Scheidegger
0064baeaa5 llvmpipe: add bitcasts around fptrunc/fpext operations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We are using different llvm type depending on the cpu supporting f16c
instructions or not.
The reasoning behind this was that we really couldn't do anything with f16
values and had to cast them to some int type anyway, plus IIRC originally
this actually predates llvm even supporting a half type in the first place
(or if it did, at the very least it was not able to do anything useful with
it).
There are now bugs with lavapipe when the cpu doesn't support f16c, since while
we don't expose f16 capabilities in this case, we can still hit f16 conversion
functions for the likes of unpack2x16float and quantizeToF16, and we're just
straight calling fpext/fptrunc functions, not touching our own code for half
conversion (I believe our own code might still be faster as llvm de-vectorizes
it if it's not supported by the cpu, but don't quote me on that - could depend
on llvm version, and also for trunc the rounding is actually different since
our own functions implement rounding according to d3d10 requirements (mostly
used for f16 render targets)).
This only seems to be a problem for vulkan, not GL, since glsl has its own
lowering pass if the half float packing instructions aren't supported by the
driver.
Ideally we'd fix this by just always using llvm half type for f16, however
still not all llvm backends can handle it.
So instead do some hacky bitcasts around the fpext/fptrunc calls with f16,
which works on x86 even when not supporting f16c. Other llvm backends not
really supporting halfs will still crash there as before (albeit it should
be a "cleaner" crash as the IR is now correct...), but at least keeps them
running for more ordinary things such as f16 texture sampling / render
targets (which they wouldn't if we'd use llvm half type everywhere).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13807
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13865
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37344>
2025-09-20 01:32:46 +00:00
Marek Olšák
bbab69d343 radv: fix load_smem alignment
radv_cmd_buffer_upload_alloc_aligned is used with alignment=0, which
guarantees that the alignment is at least 4.

Fixes: 9e16ed7a13 - ac/nir: switch nir_load_smem_amd uses to ac_nir_load_smem wrapper

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37345>
2025-09-19 21:08:25 -04:00
Mike Blumenkrantz
d98cf09feb zink: fix u_blitting when clears are pending
previously this only checked to see if dst was bound, but that is not
the only condition in which clears may be flushed, and triggering a clear
flush while blitting will not set image layouts, which means that a renderpass
could be illegally triggered on an UNDEFINED image (even though it wouldn't be used)

instead, do a much more thorough check to determine whether clears can actually be
stored with the expectation that they will otherwise be flushed

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37467>
2025-09-19 23:53:02 +00:00
Mike Blumenkrantz
f9dd9bc30d mesa: don't assert when finding a renderbuffer miplevel fails
this can also be caused by winsys and api being out of sync, e.g.,
if the window resize is lagging behind the framebuffer resize

in this case, just use level 0 and assume things will be okay

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37467>
2025-09-19 23:53:02 +00:00
Mike Blumenkrantz
62912e6719 zink: add ZINK_DEBUG=nogeneral to disable unified image layouts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37467>
2025-09-19 23:53:02 +00:00
Simon Perretta
67c4b762a5 vulkan: setup max_subgroup_size for drivers without varying/max/min size support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Ensures max_subgroup_size is set to the subgroupSize physical device
property on drivers that don't support VK_EXT_shader_object,
VK_EXT_subgroup_size_control, or Vulkan 1.3.

Fixes: d807f5a351 ("vulkan: set nir subgroup size shader info")
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37477>
2025-09-19 20:51:15 +00:00
Karmjit Mahil
2c676a38ea freedreno/registers: Fix typo
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37489>
2025-09-19 20:19:41 +00:00
Marek Vasut
8237a65e94 etnaviv: hwdb: update gc_feature_database from ST
Updates the existing gc_feature_database.h file with changes from
https://github.com/STMicroelectronics/gcnano-binaries/blob/gcnano-6.4.21-binaries/gcnano-driver-stm32mp/hal/kernel/inc/gc_feature_database.h

git commit: 7c181cacf89f918039e64934fdc33fe817a052cd

Removed fields:
- NN_HIGH_PERF_DECODER

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37486>
2025-09-19 19:22:41 +00:00
Eric Engestrom
6b2d003aa9 zink+nvk/ci: fix test expectations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
I accidentally added a second line instead of changing the existing line.

Fixes: 2fe2ab2bd0 ("zink+nvk/ci: update test expectations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37485>
2025-09-19 19:06:18 +00:00
Pohsiang (John) Hsu
04192362e5 mediafoundation: return adjusted LTR frame (need to remove one for short term)
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37479>
2025-09-19 18:51:55 +00:00
Sil Vilerino
c3ca12af11 mediafoundation: Fix leak mft_context_queue_priority_manager::m_lock
Fixes: 4b203d361e ("mediafoundation: Implement d3d12_context_queue_priority_manager and related ICodecAPI")

Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37479>
2025-09-19 18:51:55 +00:00
Sil Vilerino
6e48a7885a d3d12: Fix leak d3d12_context::priority_manager_lock
Fixes: 11db73820f ("d3d12: Implement d3d12_context_queue_priority_manager")

Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37479>
2025-09-19 18:51:55 +00:00
Sil Vilerino
a69ff1a21a d3d12: Check slice support for PIPE_VIDEO_CAP_ENC_INTRA_REFRESH support
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37479>
2025-09-19 18:51:55 +00:00
Sil Vilerino
0186ff9af5 mediafoundation: Check driver caps for intra-refresh CodecAPI advertisement
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37479>
2025-09-19 18:51:55 +00:00
Pohsiang (John) Hsu
bb42497ee4 mediafoundation: update doc to remove gallium-vdpau from build setup
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37479>
2025-09-19 18:51:54 +00:00
Eric Engestrom
28e4d1961e ci/build-rust: strip rust libs and binaries
Stripping the libs saves 39 MiB and stripping the binaries saves 29 MiB
per toolchain installed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37414>
2025-09-19 17:28:42 +00:00
Eric Engestrom
be825ee11f ci: use MSRV for build-for-tests jobs and recent version in build-only jobs and CI components
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37414>
2025-09-19 17:28:42 +00:00
Eric Engestrom
a8f49aa5f2 ci/rust: install components with the initial install command
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37414>
2025-09-19 17:28:41 +00:00
Eric Engestrom
3edcbecec8 ci/alpine: install and manage rust version ourselves
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37414>
2025-09-19 17:28:41 +00:00
Eric Engestrom
397abe0fb6 ci/fedora: manage rust version ourselves
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37414>
2025-09-19 17:28:40 +00:00
Karol Herbst
40677b297d ci: document what version to specify in RUST_VERSION
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37414>
2025-09-19 17:28:40 +00:00
Caterina Shablia
529a6eda8f docs/features: add sparse{Binding,ResidencyBuffer} on panvk/v10+
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35287>
2025-09-19 17:00:10 +00:00
Caterina Shablia
2c8b285883 panvk: report support for sparse{Binding,ResidencyBuffer}
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35287>
2025-09-19 17:00:10 +00:00
Caterina Shablia
3b05d6a7b7 panvk: add bind queue
Bind queue is a queue of sparse resource memory bind operations.
It binds memory to sparse resources. It doesn't map to any
particular kernel object. The queue is equipped with an internal
syncobj to implement PANVK_DEBUG=sync.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35287>
2025-09-19 17:00:10 +00:00
Caterina Shablia
86068ad1ee panvk: implement sparse resources
Sparse resources (buffers and images) own their address ranges, so
when creating a sparse resource we allocate an address range large
enough to fit the resource. The address range has to start and end
at page boundaries, as that's the memory mapping granularity.

At destruction time, we unmap all memory mapped within the range,
as Vulkan doesn't require the user to unmap memory themselves and
we don't want to retain references to BOs for longer than
necessary. Finally, we free the address range that was previously
owned by the resource.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35287>
2025-09-19 17:00:10 +00:00
Caterina Shablia
d5edfb86ab panvk: add PANVK_DEBUG=force_blackhole
This flag is intended to be used by sparse resource creation. When
set, sparse resources will always start off mapped to blackhole,
regardless of whether they were created with SPARSE_RESIDENCY flag
set or not.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35287>
2025-09-19 17:00:10 +00:00
Caterina Shablia
7f263dd2fb panvk: add blackhole bo
We want to be able to survive accesses to, from Vulkan's
perspective, unmapped regions of sparse resources. For that we
allocate a single page -sized bo, which we'll use to implement
sparse unmapping by mapping the address range to this bo.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35287>
2025-09-19 17:00:10 +00:00
Mike Blumenkrantz
4b30df4462 tu: don't deref end info in tu_CmdEndRendering2EXT
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this can be null

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37476>
2025-09-19 10:13:58 -04:00
Erico Nunes
f6b791db30 kmsro: enable with zink
Since the kmsro option was removed, it is now just built together with a
list of gallium OpenGL drivers that require it.
On a Vulkan-only build with zink for OpenGL, kmsro is still required for
some wsi paths for those platforms, but it is no longer possible to
explicitly enable it without a gallium OpenGL driver to pull it.
This enables kmsro when zink is enabled to allow the Vulkan-only use
case in those platforms.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37459>
2025-09-19 13:31:31 +00:00
Timur Kristóf
da184ddbe4 spirv: Always mark FS layer and viewport index inpus as flat
The spec requires these to be decorated as FLAT,
but some apps forgot to set that,
eg. old DXVK before d12a8e09a855

Let's unconditionally decorate these FS inputs as FLAT
in spirv_to_nir, we can do that for free and prevent those
apps from crashing RADV.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33205>
2025-09-19 14:59:12 +02:00
Martin Roukala (né Peres)
e4668b8427 turnip/ci: switch vkcts testing to the KWS farm
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This commit keeps vkcts as a nightly job, but this puts us in shooting
distance to what we've been working for for the past 2.5 years!

We will flip the switch to making this job part of the merge pipeline
after a week of stress testing to make sure reliability issues,
especially around USB, don't come back to haunt my days and nights.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37367>
2025-09-19 11:41:54 +00:00
Martin Roukala (né Peres)
decd34f619 zink/ci: document more flakes in the a750 job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37367>
2025-09-19 11:41:54 +00:00
Martin Roukala (né Peres)
e5509237bf turnip/ci: document more flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37367>
2025-09-19 11:41:54 +00:00
Juan A. Suarez Romero
6637366559 broadcom/ci: unlock CI-Tron jobs for arm32
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37474>
2025-09-19 11:23:53 +00:00
Georg Lehmann
14dfc05f83 radv: use rt wave size in fragment shaders with ray queries
Usually wave64 performs better for fragment shaders,
because LDS sharing for interpolation is better.

But the rt traversal loop divergence is likely high enough to make
wave32 better on GFX10.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37360>
2025-09-19 11:06:06 +00:00
Georg Lehmann
4a080a8904 radv: allow application required fragment shader subgroup size
If the application really thinks it needs pswave32, let it use it.
Fragment shaders also have no concept of full subgroups, so the existing
code that chooses the subgroup size will work already.

For pre raster stages, we cannot allow this because of potential mismatches
in merged stages.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37360>
2025-09-19 11:06:06 +00:00
Boris Brezillon
4a84acff8a panfrost: Support debugging JM context priorities with env vars
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Allow users to set an environment variable to influence JM context slot
priorities.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37075>
2025-09-19 10:05:46 +00:00
Boris Brezillon
e9aedfe508 panfrost: Support JM context creation and destruction
A Panfrost JM context can be created by leveraging the new Panfrost 1.5
KM IOCTLs and translating Mesa pipe resource priority levels into
Panfrost-specific ones.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37075>
2025-09-19 10:05:44 +00:00
Boris Brezillon
f04dbf0bc0 pan/kmod: query and cache available context priorities from KMD
Priority values will be used later one when creating job contexts.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37075>
2025-09-19 10:05:44 +00:00
Boris Brezillon
db2e1a4f23 drm-uapi: Sync panfrost_drm.h
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37075>
2025-09-19 10:05:43 +00:00
Gert Wollny
04f6e24e65 r600/sfn: clear PIPE_MAP_UNSYNCRONIZED for partial DS texture writes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When writing to a depth texture the driver is first doing a decompress
blit to a stageing resource. On one hand this blit can be skipped, if
PIPE_MAP_DISCARD_WHOLE_RESOURCE is set, OTOH we need to clear the
PIPE_MAP_UNSYNCHRONIZED flag if a partial write is done, because we have to
wait until the blit is finished.

v2: Update the patch with a more targeted approach.

Fixes: 25b97a3a96 ("mesa/st: mark internal texture map calls as UNSYNCHRONIZED")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13916

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37457>
2025-09-19 07:42:54 +00:00
Tapani Pälli
59a4f53b95 iris: setup bits for ARB_texture_filter_minmax with gfx9+
Tested with: KHR-GL46.texture_filter_minmax_tests.*

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/37451>
2025-09-19 05:29:35 +00:00
Mike Blumenkrantz
f9f682059b zink: disable single-aspected blits for now
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
need spec support

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37470>
2025-09-18 21:33:11 -04:00
Mike Blumenkrantz
224f0f769b zink: stop creating GPL inputs for mesh
this is unnecessary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37470>
2025-09-18 21:33:11 -04:00
Mike Blumenkrantz
ad3a445f96 zink: various cleanups for mesh+multiview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37470>
2025-09-18 21:33:11 -04:00
Mike Blumenkrantz
52c902d8cc zink: set OutputPoints for mesh point output
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37470>
2025-09-18 21:33:11 -04:00
Mike Blumenkrantz
94179ae7ef zink: fix descriptor array indexing for mesh pipeline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37470>
2025-09-18 20:43:33 -04:00
Timothy Arceri
870ce22754 nir: fix uniform cloning helper again
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
UBOs in different stages can have the same instance name for
different UBOs so here we make sure to also check that types match
before deciding we have a match.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13254
Fixes: b47b8d16d9 ("nir: expose reusable linking helpers for cloning uniform loads")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37428>
2025-09-18 22:28:54 +00:00
Gert Wollny
b9a1bcd3a1 r600/sfn: replace hand coded comparison opts with opt_algebraic
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
With that we can easily add a restriction to  the not + flt -> fge
optimization to handle NaNs like it was done before.

Fixes: 51d8ca2dff ("r600/sfn: optimize comparison results")

v2: use SPDX license identifier (austriancoder)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37450>
2025-09-18 21:04:06 +00:00
Eric Engestrom
bbb76517ee meson: only require glslang >= 12.2 when anv/radv/turnip are built
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37444>
2025-09-18 19:07:10 +00:00