Commit graph

3001 commits

Author SHA1 Message Date
Bernd Kuhls
248b818407 blake3: add blake3_neon.c only for little endian archs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes build error on big endian archs:

Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: aarch64
Host machine cpu: cortex-a53
Target machine cpu family: aarch64
Target machine cpu: cortex-a53
[...]
../src/util/blake3/blake3_neon.c:6:2: error: #error "This implementation only supports little-endian ARM."
    6 | #error "This implementation only supports little-endian ARM."

as detected by buildroot autobuilders:
https://autobuild.buildroot.net/results/efd/efd07d97df4e0c1ceb07fc26e17898afef5435b9/build-end.log

For reference:
$ grep -i endian output/build/mesa3d-25.3.4/buildroot-build/cross-compilation.conf
endian = 'big'

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39681>
2026-02-04 15:07:42 +00:00
Dhruv Mark Collins
e8fc50ef46 freedreno,u_trace: Fix various UBSAN errors
These are a handful of errors that pop up in UBSAN, a lot of them
depend on compiler-specific behavior such as zero-sized VLAs being
valid, while others plugged some potential bug prone code such as
nullptr derefs.

Signed-off-by: Dhruv Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39662>
2026-02-03 16:14:35 +00:00
Loïc Molinari
c9097e2e13 util/perf: Add support for conditional CPU scope traces
Add a 'cond' argument to the _MESA_TRACE_SCOPE(),
_MESA_TRACE_SCOPE_NAME() and _MESA_TRACE_SCOPE_FLOW() macros, fix up
the MESA_TRACE_SCOPE(), MESA_TRACE_SCOPE_FLOW(), MESA_TRACE_FUNC() and
MESA_TRACE_FUNC_FLOW() macros depending on it and add the new
MESA_TRACE_SCOPE_IF(), MESA_TRACE_SCOPE_FLOW_IF(),
MESA_TRACE_FUNC_IF() and MESA_TRACE_FUNC_FLOW_IF() conditional macros.

The trace macros are now based on the conditional ones. Code gen stays
the same for all the current traces though since compilers optimize
out the condition to always taken. See the compiler explorer link.

Conditional CPU scope traces are meant to allow builds with either
Perfetto, Gpuvis or sysprof tracing enabled to filter traces at
run-time.

Link: https://godbolt.org/z/886PKWEqf
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39407>
2026-02-03 15:41:50 +00:00
Loïc Molinari
a336e9330d util/perf: Reorder ending CPU scope traces to match beginning order
Reorder trace calls in _mesa_trace_scope_end() to match the order in
the _mesa_trace_scope_*begin*() functions: Perfetto, Gpuvis then
Sysprof.

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39407>
2026-02-03 15:41:50 +00:00
Loïc Molinari
b9cdefd406 util/perf: Replace tabs with spaces
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39407>
2026-02-03 15:41:50 +00:00
Alyssa Rosenzweig
bc69e4364f intel: report code size in shader stats
This is missing from ANV's statistics currently.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39633>
2026-02-02 23:30:24 +00:00
Alyssa Rosenzweig
fc53da9c39 intel: simplify shader stats names
This brings what ANV reports closer to what Iris reports, and is mostly dropping
redundancies.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39633>
2026-02-02 23:30:24 +00:00
Alyssa Rosenzweig
3d5170c705 intel: add scheduling mode statistic
This is for parity with what we do in the current GL shader-db path.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39633>
2026-02-02 23:30:24 +00:00
Alyssa Rosenzweig
fcaf6a52a7 util: hide hashes from GL shader stats
Traditionally we don't print these for GL and tooling doesn't know about this.
Just drop them. Note that neither AMD nor Intel uses the common GL print path
yet which is why this hadn't been hit.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39633>
2026-02-02 23:30:24 +00:00
Alyssa Rosenzweig
0718a2e74c util: allow string shader "statistics"
This is useful for Intel reporting scheduling strategy.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39633>
2026-02-02 23:30:24 +00:00
Danylo Piliaiev
4b9536382c util/u_trace: Fix usage of variable-sized strings in non-queued case
When tracepoint is not queued, the memory for it is allocated on stack
and no memory is allocated for variable-sized strings. So we shouldn't
copy or print them in non-queued case.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39128>
2026-01-30 16:41:46 +00:00
Lionel Landwerlin
a05fc97bc9 anv/iris: add drirc to enable sampler state & compute surface state prefetch
I noticed we disable the prefetch only on Gfx12.5. But surely that
recommendation carries on on later platforms.

It seems other drivers just disable it all the time and only have an
option to force the prefetch. So implementing the same thing here.

Blorp path is left untouched.

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/39424>
2026-01-28 13:13:40 +00:00
Duncan Brawley
b8889f5eaa pvr: add basic support for shader statistics framework
Mesa now has a statistics framework. This adds support for emitting
additional statistics about PowerVR shaders for the Rogue architecture.

Add support for emitting the following statistics: Code size, scratch
size, spill count, temp count, loop count, number of inst groups, number
of main inst groups, number of bitwise inst groups and number of control
inst groups.
Add support for new PCO_DEBUG_PRINT option "stats" to emit shader stats.

Signed-off-by: Duncan Brawley <duncan.brawley@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39523>
2026-01-27 16:58:30 +00:00
Caleb Callaway
1038ab7b57 anv/driconf: Disable shader LTO for MHW
MHW has a long-running shader compile step on first
launch that is significantly sped up by disabling
Link Time Optimization in the ANV driver.

Shader compile times with LTO disabled are 50% of
baseline measurements and the benchmark shows no
stastically significant change to performance
(tested on LNL-M OOB)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39544>
2026-01-27 14:57:21 +00:00
Caleb Callaway
a91a636faf driconf: LTO disable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39544>
2026-01-27 14:57:20 +00:00
Samuel Pitoiset
14d3fb5f1b radv: add a workaround for a synchronization bug in Strange Brigade Vulkan
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This game has broken synchronization reported by VVL and it indeed
doesn't wait for idle right before present. Workaround this by
injecting a full barrier (easier than rewriting the dep struct).

This only applies to the Vulkan backend.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14705
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39480>
2026-01-27 09:18:25 +00:00
Samuel Pitoiset
d679236e09 radv: fix applying radv_ssbo_non_uniform=true for Crysis 2/3 remastered
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
DX11 games that use Vulkan interop for RT with a broken and too generic
app/engin name. This is very specific to these two games.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14718
Fixes: 56813236f4 ("radv: use app names instead of exec name for shader based drirc workarounds")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39518>
2026-01-27 06:54:10 +00:00
Alyssa Rosenzweig
005cf69043 util: add BITSET_LINEAR_ZALLOC
convenience method; linear version of BITSET_RZALLOC.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39494>
2026-01-26 20:15:43 +00:00
Alyssa Rosenzweig
598fcf2bf9 util: add linear_memdup
convenience method; linear version of ralloc_memdup.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39494>
2026-01-26 20:15:43 +00:00
Christian Gmeiner
063e201b9d util/blend: Add pipe_blend_overlap_mode enum
Add shared enum for blend overlap modes used by both
VK_EXT_blend_operation_advanced and GL_NV_blend_equation_advanced:
 - UNCORRELATED: Default, no coverage assumptions
 - CONJOINT: Maximal overlap, primitives are correlated
 - DISJOINT: Minimal overlap, primitives don't overlap

This enum is shared between Vulkan's VkBlendOverlapEXT and OpenGL's
GL_BLEND_OVERLAP_NV parameter.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:00 +00:00
Christian Gmeiner
4294e0bbd4 util/blend: Add advanced blend modes
VK_EXT_blend_operation_advanced and GL_NV_blend_equation_advanced
defines additional blend operations beyond what OpenGL KHR_blend_equation_advanced
provides. Add these modes to pipe_advanced_blend_mode.

Also add a default case to gl_nir_lower_blend_equation_advanced.c
to handle unsupported modes gracefully.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:00 +00:00
Christian Gmeiner
1eed6960c5 compiler/mesa/st: Move gl_advanced_blend_mode to util/blend.h
Rename gl_advanced_blend_mode to pipe_advanced_blend_mode and move it
to src/util/blend.h so it can be shared between OpenGL and Vulkan
drivers.

This prepares for implementing VK_EXT_blend_operation_advanced by
providing a common enum for advanced blend modes across APIs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:00 +00:00
Jesse Natalie
53370a4ca9 driconf: Add a driconf entry for 文香白板 (Wenxiang whiteboard)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39465>
2026-01-23 22:02:51 +00:00
Jesse Natalie
bac1ceb83f wgl: Add a driconf option to force pixel formats with GDI support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39465>
2026-01-23 22:02:51 +00:00
Tapani Pälli
f66ff97d58 drirc/anv: implement steps to disable RHWO for Wa_14024015672
Disable RHWO by default for singlesample draws and for MSAA
draws if a drirc key is set (avoid perf hit if not needed).

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/39404>
2026-01-23 11:10:07 +00:00
Mario Kleiner
1d6f85a207 util/driconf: Disable EGL RGB[A]16 unorm configs on panfrost for now
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Currently panfrost has some bug at least on Midgard T-860, which causes
an assertion failure with these 16 bpc displayable framebuffer configs:

".../drivers/panfrost/pan_fb_preload.c:341: pan_preload_get_blend_shaders:
Assertion `b->work_reg_count <= 4' failed."

See discussion in:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38588

Disable these rgb16 configs on panfrost by default for now,
as suggested by Eric Smith.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Suggested-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38588>
2026-01-21 12:29:03 +00:00
Mario Kleiner
f2aaa9ce00 dri,gallium: Add support for RGB[A]16_UNORM display formats.
These are useful for displaying very high color precision images with
more than 10 bpc color depth, and also more precision than what fp16
can do on a standard dynamic range (SDR) display, where fp16 for values
in the unorm 0.0 - 1.0 range is about equivalent to at most ~11 bpc
linear color depth. This is especially useful for and aimed at scientific
applications, e.g., neuroscience and other bio-medical research cases.

At least current generation AMD gpu's released during the last 10 years
and supported by amdgpu-kms + atomic modesetting do allow for scanout of
such 16 bpc framebuffers and of up to 12 bpc output to suitable HDMI or
DisplayPort high precision displays.

We gate the format behind a new driconf option 'allow_rgb16_configs',
which defaults to true, but allows to disable the formats if any issues
should arise.

Most regular applications won't need the high display precision of
these new 16 bpc 64 bpp formats which have higher memory and bandwidth
requirements, and therefore a potential undesired performance impact
for regular apps. Followup per-platform enablement commits will use
the EGL_EXT_config_select_group extension to put these 16 bpc unorm
formats into a lower priority config select group 1, so they don't get
preferably chosen by default by eglChooseConfig(), but must be explicitely
requested by client applications which really need the high color
precision of these 64 bpp formats and are happy to pay the potential
performance impact. Thanks to Adam Jackson for pointing me to the
EGL_EXT_config_select_group extension.

If the format would be put into the default config select group 0, a
simple EGL eglChooseConfig() call would end up choosing these formats,
which is not what such regular apps would want.

Tested to not cause any change on native X11/EGL and X11/GLX, which only
supports at most 30 bpc / 32 bpp formats.

Followup commits will enable these formats for the EGL/Wayland backend,
and on the EGL/DRM backend.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38588>
2026-01-21 12:29:03 +00:00
Mario Kleiner
1fe73481ba util/format: Add util_format_is_unorm16()
Detects 16 bpc unorm formats. Used by following RGB[A]16
UNORM display enablement commits.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38588>
2026-01-21 12:29:03 +00:00
Gurchetan Singh
4baae4c4d4 meson: check for <poll.h>
Otherwise, the following warning is observed with musl
headers, which translates to an error on Android.

external/musl/include/sys/poll.h:1:2: error:
  redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror,-W#warnings]
  warning redirecting incorrect #include <sys/poll.h> to <poll.h>

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39279>
2026-01-20 17:17:57 +00:00
Yogesh Mohan Marimuthu
f050e6ea74 util/log: add MESA_LOG_FILE_AUTO to generate log file
if set, creates a file in /tmp folder with mesa_<process_name>_<pid>_XXXXXX.log
logging all errors, warnings, etc., rather than stderr. The XXXXXX will be replaced
with alpha numeric character so for each run of the app a new log file will be
created guaranteed.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39206>
2026-01-15 09:45:04 +00:00
Aitor Camacho
c3aa8f3572 util: Fix HAVE_BUILD_ID ifdefs
Fixes: a77e09eaeb ("util: Introduce HAVE_BUILD_ID for build id utils")

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39201>
2026-01-15 06:12:05 +00:00
Konstantin Seurer
6d9cd36db6 nir: Add f2f16_ru/rd opcodes
Those are variants of f2f16 that always round up/down. Constant folding
requires nextafter that supports half floats (util_nextafter).

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37883>
2026-01-10 11:33:23 +01:00
Faith Ekstrand
fabc316c3f util: Add a helper to convert color blend factors to alpha
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39171>
2026-01-08 00:01:27 +00:00
Marek Olšák
60e94e2b81 util: remove SHA1, use BLAKE3 in its functions to switch everything to BLAKE3
This is the least invasive way to switch all of Mesa to BLAKE3. It's done
this way for transitional reasons.

SHA1_DIGEST_LENGTH is already equal to BLAKE3_KEY_LEN. This just switches
the SHA1 implementation to BLAKE3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
492a176cbb util: increase SHA1_DIGEST_LENGTH to 32 (BLAKE3_KEY_LEN)
The last 12 bytes are always 0 for now. With this, all SHA1 functions
can be internally implemented as BLAKE3, so that we can switch everything
to BLAKE3 by only changing the implementation of the sha1 utility.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
524a536b7b util: use SHA1_DIGEST_STRING_LENGTH in fossilize_db
preparation for changing SHA1_DIGEST_LENGTH to BLAKE3_KEY_LEN

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
0b7ee3b981 ALL: use #define and a copy helper to check and copy build_id
preparation for changing SHA1_DIGEST_LENGTH to BLAKE3_KEY_LEN

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
1912a00a91 ALL: use SHA1_DIGEST_LENGTH etc. instead of hardcoding the numbers
only build_id is switched to use literal 20 instead of SHA1_DIGEST_LENGTH
because we will increase SHA1_DIGEST_LENGTH to BLAKE3_KEY_LEN

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Mel Henning
5fa1e5707b util/rmq: Remove unused header
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39165>
2026-01-06 19:17:03 +00:00
Mel Henning
4171161227 util/rmq: Fix uninitialized read in preprocess
We were previously always reading table->width elements from the previous
row in this loop, but we write fewer entries than that to the current
row. Fix this by adjusting the element count.

Fixes: 0d07b86073 ("util: Add range_minimum_query")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14593
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39165>
2026-01-06 19:17:03 +00:00
Mel Henning
2219f879f3 util/rmq: Fix test upper bound
Since range_minimum_query takes a half-open interval, we should be
testing with j == width

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39165>
2026-01-06 19:17:03 +00:00
Georg Lehmann
f68b891a81 util: add IEEE 754-2019 min/max number
fmin/fmax are not signed zero correct.

The name is taken from RDNA4's ISA, because the full IEEE name is a bit long.

Cc: mesa-stable

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39137>
2026-01-06 10:55:03 +00:00
Jeff Burnett
320d757578 util: Don't force 64-bit division on 32-bit platforms
When converting between snorm and between unorm values, the following
patch introduced 64-bit division on all platforms.

  util: Add and use functions to calculate min and max int for a size
  Commit hash: 72259a870f

The following unit math
  // local MAX_UINT macro based on UINT32_MAX
  (uint64_t * uint32_t + uint32_t) / uint32_t
changed to
  // macros.h inlined 'uint64_t u_uintN_max()' functions.
  (uint64_t * uint64_t + uint32_t) / uint64_t

This can significantly impact performance on 32-bit platforms.

Address this by type-casting the return values from the inlined
functions to avoid the 64-bit divide on 32-bit platforms.

Signed-off-by: Micah Shennum <micah.shennum@garmin.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39001>
2026-01-05 20:52:24 +00:00
llyyr
688cc83c7d Revert "drirc/anv: force_vk_vendor=-1 for Wuthering Waves"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit dcd9b90aff.

The game falls back to software rendering if any of the enumerated GPUs
have invalid vendorID. This fix causes a regression for systems with an
AMD GPU where the game works perfectly fine, that also happen to have an
Intel iGPU.

The Intel iGPU will be enumerated with vendorID=-1 and this will cause
the game to not use the AMD GPU either. Clearly an issue with the game
but since this workaround is causing more issues than it is solving,
remove the config.

From what I can tell, this fix _did_ work at the time of committing, but
as this is a live service game it gets regularly updated and this buggy
behavior with choosing the device has been introduced recently.

Fixes: dcd9b90aff ("drirc/anv: force_vk_vendor=-1 for Wuthering Waves")
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Taras Pisetskyi <taras.pisetskyi@globallogic.com>
Signed-off-by: llyyr <llyyr.public@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39089>
2026-01-05 09:32:40 +00:00
Vinson Lee
b40850b24a util/blob: Fix const correctness warning in blob_read_string
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fix compiler error:

  ../src/util/blob.c:344:8: error: assigning to 'uint8_t *' from
  'const void *' discards qualifiers
  [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

glibc now provides C23-style type-generic string functions. memchr
returns const void * when passed a const void * argument. Update nul
declaration to const since it's only used to find the null terminator
position and calculate a size.

Fixes: 1c9877327e ("glsl: Add blob.c---a simple interface for serializing data")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39048>
2026-01-03 23:09:11 -08:00
Marek Olšák
d0dd5a5f57 ac,radeonsi: move SX PS downconversion code into ac_formats.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39093>
2026-01-02 16:46:20 +00:00
Samuel Pitoiset
d9e5b9bc64 radv: enable radv_prefer_2d_swizzle_for_3d_storage for TLOU1
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is much faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38084>
2026-01-02 09:54:29 +00:00
Samuel Pitoiset
489550d380 radv: add new drirc radv_prefer_2d_swizzle_for_3d_storage
Because some games perform much better with 2D swizzle for 3D storage.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38084>
2026-01-02 09:54:29 +00:00
Alyssa Rosenzweig
086dd1daa3 hk: hide vertexPipelineStoresAndAtomics
This feature causes piles of vertex shader timeouts in the CTS which makes CTS
testing extremely unreliable on my min-spec M1. Since we only really have it as
a tickbox for Proton, hide it except for Proton - at least for now.

This eliminates our known flakes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39111>
2025-12-31 10:27:04 -05:00
Eric R. Smith
20e17ca864 pan: add actual register usage to the shaderdb stats
Add the actual registers used (including uniforms used) by the shader
to stats. This is calculated by the stats gathering code, because the
scheduler and scoreboard passes run after register allocation and can
sometimes change the results.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38961>
2025-12-22 13:40:03 +00:00