Commit graph

2970 commits

Author SHA1 Message Date
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
Vinson Lee
c576d64801 util/u_printf: Fix const correctness in util_printf_next_spec_pos
Fix compiler error:

../src/util/u_printf.c:75:13: error: initializing 'char *' with an
expression of type 'const char *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
   75 |       char *spec_pos = strpbrk(str_found, "cdieEfFgGaAosuxXp%");
      |             ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

glibc now provides C23-style type-generic string functions. strpbrk
returns const char * when passed a const char * argument. Update
spec_pos declaration to match.

Fixes: 6d263ff5a3 ("util: Convert util/u_printf.cpp to util/u_printf.c")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39059>
2025-12-21 22:34:40 -08:00
Eric Engestrom
2202c2d62a util/rust: cleanup derelict allow(dead_code) annotations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:14:46 +01:00
Eric Engestrom
47ebdbab81 meson: add rust_global_args for flags for all the rust compilations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Zan Dobersek
6bff8fd5e8 tu: use application name matching for Yooka-Laylee driconf option
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When running Yooka-Laylee under FEX, the executable name will be the one of
the FEX binary, which the existing driconf option won't match. FEX is able
to override the executable name in newer versions, but overall it's still
more reliable to match the application name provided through Vulkan.

Fixes: 0574bfd5f4 ("tu: add UBO lowering workaround for Yooka-Laylee")
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39012>
2025-12-19 07:50:40 +00:00
Timothy Arceri
6592a18cd7 util/driconf: add workaround for Interstellar Rift
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This game sets the reset isolation bit which causes the GL context
creation to fail as Mesa doesn't support the
GLX_ARB_robustness_application_isolation extension. Here we override
and clear the bit.

According to the spec says:

    "The GLX_ARB_robustness_application_isolation and
    GLX_ARB_robustness_share_group_isolation extensions do not provide
    guarantees for graphics resets caused by applications which did
    not create their contexts with both the LOSE_CONTEXT_ON_RESET_ARB
    reset notification strategy and the
    GLX_CONTEXT_RESET_ISOLATION_BIT_ARB bit."

And the game doesn't set LOSE_CONTEXT_ON_RESET_ARB so technically
we could ignore the reset isolation bit even if Mesa did support
the extension.

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

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38668>
2025-12-17 23:35:25 +00:00
Timothy Arceri
67eeee43e0 driconf: add a way to override GLX_CONTEXT_RESET_ISOLATION_BIT_ARB
This allows us to override and clear the reset isolation bit.
It will be used in the following patch to override missing support
for GLX_CONTEXT_RESET_ISOLATION_BIT_ARB.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38668>
2025-12-17 23:35:24 +00:00
Tapani Pälli
2418c91537 anv/drirc: disable Xe2 CCS drm modifiers for GTK engine
Cc: mesa-stable
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/38373>
2025-12-17 17:34:09 +00:00
Alyssa Rosenzweig
593517a53a util: add BITSET_*_COUNT macros
We currently have BITSET_*_RANGE macros which take a closed interval/range: a
start bit and an end bit. Occassionally that is what you want, but most of the
time callers actually want a start and a length. For example, register
allocators will often do operations at (variable start register, variable start
register + variable size - 1). It's more convenient to just take a start and a
size, while also making the size=0 case well-defined as a no-op set/clear and
false for test.

This patch adds BITSET_*_COUNT macros aliasing to the existing range macros, and
the rest of the series converts many call sites across the tree to use the new
macros.

Of the few call sites not converted, a whole bunch look like off-by-one bugs
which I did not want to "fix" here and risk breaking something else. Probably
worth checking your driver if you have RANGE calls leftover after this series.

Also, aco and dozen both open-coded RANGE helpers that should probably be
switched to the common code but that's neither here nor there.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:10 +00:00
Alyssa Rosenzweig
7d5afb0ee9 util: fix (amusing) find-n-replace fail
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:09 +00:00
Alyssa Rosenzweig
9d704930a1 util/bitset: allow BITSET_*_RANGE(x, 0, -1)
as a no-op. This reduces special cases in callers.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38955>
2025-12-16 17:42:09 +00:00
Faith Ekstrand
f43cff3728 util: Move STACK_ARRAY into util
It's useful for more than just Vulkan.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385>
2025-12-12 10:03:02 +01:00
Zan Dobersek
f8363b8d25 driconf: use vk_dont_care_as_load workaround for Spilled!
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Unity's Vulkan backend used by Spilled! requires the vk_dont_care_as_load
workaround to achieve correct rendering. Observed on Turnip, in GMEM mode.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38863>
2025-12-09 07:48:32 +01:00
Janne Grunau
f912db3f8d util/driconf/asahi: Override GL renderer for web browsers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Several web sites block clients with "Apple" in the WebGL renderer
string if the reported OS is not one of Apple's.
This check seems to implemented via a 3rd party product which is slowly
rolled out over more web sites. Instead of playing whack-a-mole with
web sites in multiple browsers override the OpenGL renderer in mesa for
known browsers.

Backport-to: 25.3
Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38845>
2025-12-08 16:23:54 +00:00
Job Noorman
0574bfd5f4 tu: add UBO lowering workaround for Yooka-Laylee
A vertex shader performs OOB UBO reads causing vertex corruption.
Disable UBO to const lowering to force bounds checking which fixes the
corruption.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38781>
2025-12-05 00:19:46 +00:00
Timothy Arceri
b75cd07265 util/driconf: add Cursemark workaround
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes gpu hang on radeonsi and corrupt rendering on iris.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14392
Cc: mesa-stable

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38777>
2025-12-03 23:58:15 +00:00
Gurchetan Singh
1997987b58 util: fix error about missing include
When building with linux_glibc_x86_64 in AOSP, this is
observed.

src/util/u_debug_stack.h:66:4: error: unknown type name 'uint64_t'
   66 |    uint64_t start_ip;
      |    ^

Adding <stdint.h> fixes it.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38644>
2025-12-02 20:03:02 +00:00
Dorinda Bassey
4ace478545 util/rust: Add handle type detection to descriptor API
This enhances the DescriptorType enum to include the
memory handle type (DMABUF vs SHM) alongside the size,
allowing consumers to differentiate between DMA-BUF and
shared memory file descriptors without redundant code.

Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38677>
2025-12-02 16:24:56 +00:00
Tapani Pälli
b2b5e83894 anv: add vk_wsi_disable_unordered_submits and enable for GTK
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
See radv change 0d9d45db4e for further explanation.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14354
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/38765>
2025-12-02 10:22:02 +02:00
Gurchetan Singh
14cfe14626 util: fix arithmetic on a pointer to void warning
Otherwise, the following error is observed:

src/util/cache_ops_x86_clflushopt.c:40:22:
   error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith]
   40 |    void *end = start + size;
      |                ~~~~~ ^
src/util/cache_ops_x86_clflushopt.c:44:9:
  error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wgnu-pointer-arith]
   44 |       p += cpu_caps->cacheline;
      |       ~ ^

This works with GNU extension enabled, but does lead to warnings
with Clang.

v2: Add to trial_c + trial_cpp checks (Erik)
v3: use c_msvc_compat_args to avoid fixing other instances of this issue (Erik)

Fixes: 555881e574 ("util/cache_ops: Add some cache flush helpers")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38752>
2025-12-02 00:12:44 +00:00
Timothy Arceri
d10036362f util/driconf: Add linux version of Penumbra fixes
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38563>
2025-11-28 08:49:55 +00:00
Emma Anholt
959520e227 tu: Add a loop count to VK_pipeline_executable_properties.
This will improve the report-fossil summaries I'm looking at for loop
unrolling, by showing me that loop count changed.  With a followup change
for my report-fossil to bring over behavior from GL report.py where we
ignore other counters when loop count changes (yeah, you expected to
increase instruction counts, it's fine), we go from:

    Totals:
    Instrs: 73000 -> 73242 (+0.33%)
    CodeSize: 142250 -> 142506 (+0.18%)
    NOPs: 13896 -> 13964 (+0.49%)
    MOVs: 2440 -> 2438 (-0.08%)
    Full: 1489 -> 1490 (+0.07%)
    (ss): 1742 -> 1754 (+0.69%)
    (ss)-stall: 7226 -> 7354 (+1.77%)
    Number of hardware loops: 79 -> 78 (-1.27%)
    [...]

    Totals from 1 (0.60% of 168) affected shaders:
    Instrs: 184 -> 426 (+131.52%)
    CodeSize: 288 -> 544 (+88.89%)
    NOPs: 80 -> 148 (+85.00%)
    MOVs: 9 -> 7 (-22.22%)
    Full: 11 -> 12 (+9.09%)
    (ss): 14 -> 26 (+85.71%)
    (ss)-stall: 58 -> 186 (+220.69%)
    Number of hardware loops: 2 -> 1 (-50.00%)
    [...]

     PERCENTAGE DELTAS                              Shaders   Instrs   CodeSize    NOPs      MOVs      Full [...]
     app_name               168       +0.33%    +0.18%    +0.49%    -0.08%    +0.07%    +0.69%    +1.77%    [...]
     -------------------------------------------------------------------------------------------------------[...]
     All affected           1        +131.52%  +88.89%   +85.00%   -22.22%    +9.09%   +85.71%   +220.69%   [...]
     -------------------------------------------------------------------------------------------------------[...]
     Total                  168       +0.33%    +0.18%    +0.49%    -0.08%    +0.07%    +0.69%    +1.77%    [...]

to:

    Totals:
    Number of hardware loops: 79 -> 78 (-1.27%)

    Totals from 1 (0.60% of 168) affected shaders:
    Number of hardware loops: 2 -> 1 (-50.00%)

     PERCENTAGE DELTAS      Shaders Number of hardware loops
     app_name               168              -1.27%
     ---------------------------------------------------------
     All affected           1                -50.00%
     ---------------------------------------------------------
     Total                  168              -1.27%

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38667>
2025-11-28 05:42:50 +00:00
Yonggang Luo
9d3d15f871 util,wgl: Replace usage of putenv with os_unset_option,os_set_option
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:34 +00:00
Yonggang Luo
0a32d5e6fd treewide: Use regexp to replace usage of setenv with os_set_option.
setenv\((.*), 1\);
=>
os_set_option($1, true);

setenv\((.*), 0\);
=>
os_set_option($1, false);

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:34 +00:00
Yonggang Luo
1825715623 treewide: Use regexp to replace usage of unsetenv with os_unset_option.
unsetenv\((.*)\);
=>
os_unset_option($1);

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:33 +00:00
Yonggang Luo
d277dfdd76 treewide: Replace the usage of setenv manually and #include "util/os_misc.h" when needed
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:33 +00:00
Yonggang Luo
5ab8148f23 util: Update os_get_option* comments to match os_set_option
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:32 +00:00
Yonggang Luo
2771eb39fd util: Add function os_unset_option/os_set_option for latter use
It's will be used to replace SetEnvironmentVariableA,putenv on windows
and putenv,setenv on non-windows

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:32 +00:00
Yonggang Luo
123a66fc43 util,asahi,vulkan,panfrost: Replace the remaining usage of getenv with os_get_option
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38640>
2025-11-27 18:22:32 +00:00
Samuel Pitoiset
f14e0d9f09 radv: add radv_hide_rebar_on_dgpu and enable for Red Dead Redemption 2
RDR2 VRAM memory management when resizable BAR is enabled seems
incorrect because it keeps allocating VRAM without freeing anything.

This introduces a drirc option to emulate a fake carveout of 256MiB to
workaround this game bug. This also adjust memory budgets by
distributing it between visible and invisible because AMDGPU reports
the same value for both when REBAR is enabled.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12091
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38627>
2025-11-26 10:12:45 +00:00
Tapani Pälli
21f646d196 drirc: set intel_disable_threaded_context for Amnesia The Bunker
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14084
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/38567>
2025-11-25 05:40:10 +00:00
Tapani Pälli
4daabf76b4 drirc/iris: add drirc to disable threaded context
Cc: mesa-stable
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/38567>
2025-11-25 05:40:10 +00:00