Commit graph

210014 commits

Author SHA1 Message Date
Yonggang Luo
5b51dc3bf2 renderdoc: Upgrade to v1.5
This is for avoid invalid use `defined(WIN32)`

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36654>
2025-08-08 19:38:54 +00:00
Yonggang Luo
070bf8986c util: Upgrade xxhash.h to v0.8.3
Download with:
curl https://raw.githubusercontent.com/Cyan4973/xxHash/refs/tags/v0.8.3/xxhash.h -o src/util/xxhash.h

This is for avoid invalid use `defined(WIN32)`

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36654>
2025-08-08 19:38:54 +00:00
Yonggang Luo
2a6ac3a79c util: Add namespace over float16_t in half_float.h
As float16_t may comes from arm_neon.h:
arm_neon.h:74:16: error: conflicting declaration 'typedef __fp16 float16_t'
   74 | typedef __fp16 float16_t;

Also it is std::float16_t from <stdfloat> as part of C++23

So place it under namespace mesa to avoid conflict when upgrading xxhash.h to v0.8.3

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36654>
2025-08-08 19:38:54 +00:00
Roland Scheidegger
37ee226869 llvmpipe: Fix wrong pixel shader invocation count with discard
We did not count invocations when a shader discarded fragments.
Can just move this to before running the shader so the exec mask
still includes them.

Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36678>
2025-08-08 18:14:51 +00:00
Yiwei Zhang
5b1104476f vulkan/wsi/headless: drop redundant chain struct members
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Janne Grunau <j@jannau.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36658>
2025-08-08 16:34:26 +00:00
Yiwei Zhang
24cb071d47 vulkan/wsi/headless: allow explicit modifiers
When wsi device has modifier support, simply allow all driver supported
modifiers for the requested format.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12534
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13636
Reviewed-by: Janne Grunau <j@jannau.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36658>
2025-08-08 16:34:26 +00:00
Yiwei Zhang
7b59d09299 venus: drop vn_trace_init
No longer needed.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36655>
2025-08-08 16:02:31 +00:00
Yiwei Zhang
e74516dbc7 util/perf: amend missing atrace_init
When perfetto isn't enabled, atrace can still be used freely on Android.
All trace micros have accounted for that, but the init is missed.

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36655>
2025-08-08 16:02:30 +00:00
Rob Clark
8c59aacc10 freedreno/layout: Don't align explicit layouts to page size
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This could cause importing buffers, in particular multiplanar YUV, since
when the offset of the plane is added, the aligned size could be beyond
the end of the buffer.

Fixes: 27b0f64b3e ("freedreno/a6xx: Use handle for explicit layout")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36656>
2025-08-08 14:45:31 +00:00
Lionel Landwerlin
4838b85d6c anv: move 3DSTATE_TE::TessellationDistributionMode to dynamic path
Again another field that depends on shaders bound.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:07:01 +00:00
Lionel Landwerlin
ca0a509b6b anv: move 3DSTATE_VFG emission to dynamic path
A bunch of fields are fixed and other depends on what stages are
bound.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:07:01 +00:00
Lionel Landwerlin
5a8e295a97 anv: move 3DSTATE_CLIP emission to dynamic path
This instruction has a bunch of fixed fields and the rest depends on
the shader stages enabled. With the pipeline object going away, we
can't keep this on the pipeline.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:07:00 +00:00
Lionel Landwerlin
c8305dfe0e anv: move SBE emission to dynamic path
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:07:00 +00:00
Lionel Landwerlin
33abaf2d0e anv: simplify SBE emission
Using 3DSTATE_SBE_SWIZ for providing the implicit PrimitiveID value
(when not written by the previous stage) seems to be the legacy way of
doing things on Gfx7 and prior.

On Gfx8+ we got this new
3DSTATE_SBE::PrimitiveIDOverrideAttributeSelect to get the HW to write
the value wherever we want.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:59 +00:00
Lionel Landwerlin
7b8a6af222 anv: move 3DSTATE_SF dynamic emission path
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:59 +00:00
Lionel Landwerlin
20721419e5 anv: move primitive_replication emission to dynamic path
The pipeline object going away, we won't have a place to keep this. We
can make the diff/emission efficient enough that it won't matter much.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:58 +00:00
Lionel Landwerlin
6d863fda2d anv/brw: move sample_shading_enable to wm_prog_data
The vulkan runtime doesn´t store this parameter in the dynamic state
(since it's not a dynamic state). Just capture it at compile time and
leave on the wm_prog_data.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:58 +00:00
Lionel Landwerlin
f2696b441d anv/brw: store min_sample_shading on wm_prog_data
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:57 +00:00
Julia Zhang
3fa212c4f5 virgl: Small fix of converting format
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Convert pipe format to virgl format since virglrenderer will convert it
back from virgl format to pip format when create pipe_resource.

According to the call stack, only if vflags include flag:
PIPE_RESOURCE_FLAG_MAP_PERSISTENT or PIPE_RESOURCE_FLAG_MAP_COHERENT
will make it call into virgl_drm_winsys_resource_create_blob() so here
remove redundant if condition in virgl_drm_winsys_resource_create_blob().

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36672>
2025-08-08 13:47:03 +00:00
Rob Clark
a8b27a125b drm/drm-shim: Add a702
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36644>
2025-08-08 13:04:35 +00:00
Rob Clark
69f9a805ae freedreno/drm-shim: Fix nr_rings/priorities
Since drm/sched conversion, the kernel will report at least 3.  And
rusticl seems to depend on this.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36644>
2025-08-08 13:04:35 +00:00
Lionel Landwerlin
652ef8f0c5 anv: fix source hash utrace prints
Right now we're just printing 0 values

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8966088cc5 ("anv: store gfx/compute bound shaders on command buffer state")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36663>
2025-08-08 12:10:21 +00:00
Samuel Pitoiset
a520f75229 radv: move tracked registers to radv_cmd_stream
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36314>
2025-08-08 11:49:24 +00:00
Samuel Pitoiset
e2def79e2a radv: move context_roll_without_scissor_emitted to radv_cmd_stream
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36314>
2025-08-08 11:49:24 +00:00
Samuel Pitoiset
cc85f33b57 radv: move buffered registers for GFX12 to radv_cmd_stream
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36314>
2025-08-08 11:49:23 +00:00
Samuel Pitoiset
3ccb48ec46 radv: switch to radv_cmd_stream everywhere
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36314>
2025-08-08 11:49:23 +00:00
Samuel Pitoiset
5982e8f331 radv: introduce radv_cmd_stream
radeon_cmdbuf is too low level for stuff like tracked registers and
buffered registers on GFX11+.

This commit introduces radv_cmd_stream which is defined like:

struct radv_cmd_stream {
   struct radeon_cmdbuf *b;
   // TODO: add tracked regs
   // TODO: add buffered regs
};

It will be much easier/cleaner to implement tracked/buffered registers
with this new structure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36314>
2025-08-08 11:49:23 +00:00
Samuel Pitoiset
8078acc205 radv: tidy up radv_device_init_perf_counters()
radeon_winsys_cs is just a relic at this point.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36314>
2025-08-08 11:49:22 +00:00
Hyunjun Ko
b133855c40 anv/video: add VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_KHR for minimum ctb sizes
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36211>
2025-08-08 11:26:15 +00:00
Hyunjun Ko
0453eb0c4b anv/video: create Motion Vector buffers for encoding too
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36211>
2025-08-08 11:26:15 +00:00
Hyunjun Ko
090d7e6582 anv/video: don't set the MVDL1Zero for encoding
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36211>
2025-08-08 11:26:15 +00:00
Hyunjun Ko
68e862fe51 anv/video: set short term ref list1 even if P frames provided
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36211>
2025-08-08 11:26:15 +00:00
Hyunjun Ko
c55366682c anv/genxml: the type of POC delta changes correctly
It should be between -16 and 16

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36211>
2025-08-08 11:26:14 +00:00
Hyunjun Ko
5f6aa3d297 anv/video: fix to set some attributes for HCP_PIC_STATE.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36211>
2025-08-08 11:26:14 +00:00
Hyunjun Ko
609ef617c9 vulkan/video: align with spec correctly for h265 slice header.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36211>
2025-08-08 11:26:13 +00:00
Emma Anholt
99f09f8047 Revert "tu: Use nir_opt_reassociate."
This reverts commit 3735ac6165.  It
regressed rendering on a few D3D11 traces we have, and I won't have time
to debug before going camping for a few days.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36657>
2025-08-08 11:10:16 +00:00
Karol Herbst
9d8c95f8d3 zink: fix data race in descriptor_util_pool_key_get
Two threads could end up creating a pool_key for the same hash and end up
overwriting the earlier one.

Fixes flaky image kernel_read_write CL CTS tests.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36652>
2025-08-08 10:26:52 +00:00
Karol Herbst
fe09dfbcf3 vulkan: use p_atomic_read on vk_descriptor_set_layout::ref_cnt
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36652>
2025-08-08 10:26:52 +00:00
Alyssa Rosenzweig
5b6ad73ac7 hk: reduce storage desc
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
9aad6f005d hk: drop unused
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
ba00c87fdf hk: fix pathological RAM use for tess emulation
These * 32's got added when debugging this I guess and I never took them out.
Ouchie. Reduces memory footprint of tess by 32x. Geez.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
7eb7db3613 hk: clarify command pool types
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
e9bf1c59ed hk: fix todo
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
1ef97241d7 asahi: reduce ppp alignment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:58 +00:00
Alyssa Rosenzweig
7297a699f7 asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36633>
2025-08-08 10:10:57 +00:00
David Rosca
9491ea761f radv/video: Use more common defines
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36645>
2025-08-08 09:22:54 +00:00
David Rosca
d1165984e9 ac/vcn_dec: Add RDECODE_IT_SCALING_TABLE_SIZE
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36645>
2025-08-08 09:22:54 +00:00
David Rosca
532eb40404 radv/video: Remove unused enum
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36645>
2025-08-08 09:22:54 +00:00
David Rosca
c904796350 radv/video: Simplify vp9 q params
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36645>
2025-08-08 09:22:53 +00:00
David Rosca
27dec41c81 radv/video: Don't init vp9 probs table in message buffer
This is needed in context buffer, but message buffer only uses the
segmentation data.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36645>
2025-08-08 09:22:53 +00:00