Commit graph

214496 commits

Author SHA1 Message Date
Natalie Vock
75b89f233f aco/ra: Don't clear fixed operand sources if they were blocked
That would undo the blocking and allow for conflicting assignments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:42 +00:00
Natalie Vock
d4013e7432 aco/ra: Skip blocked regs in get_reg_impl
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:41 +00:00
Natalie Vock
7ed1aea9c5 aco/ra: Also consider blocked registers as not containing temps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:41 +00:00
Natalie Vock
642b1f0dce aco/ra: Add utility to clear PhysRegInterval
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:40 +00:00
Natalie Vock
f0c613765c aco: Add preload_preserved pseudo instruction
These are helper instructions for the spill_preserved pass to insert
reloads for registers that are preserved by the ABI, yet
clobbered by the callee shader.

There is one p_reload_preserved instruction at the end of each block.
This allows us to insert reloads early, to alleviate the high latency of
scratch reloads.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37381>
2025-11-06 12:09:39 +00:00
David Rosca
9dbf49de2c radv/video: Support intra only without dpb
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
For intra only we need to allocate internal dpb.
This was previously implemented for VP9 decode only, using a buffer.
Change it to image so that we don't have to handle it as special
case everywhere.

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:34 +00:00
David Rosca
bd151bf8b2 radv/video: Add NULL checks for picture parameters
Fixes vk_layer_validation_tests PositiveVideoDecode.* and
PositiveVideoDecode*.InlineSessionParams

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:34 +00:00
David Rosca
23a3587aa6 radv/video: Correctly handle no feedback query for encode
Fixes vk_layer_validation_tests PositiveVideoEncodeAV1.*

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:33 +00:00
David Rosca
6a1c6ab95b vulkan/video: Avoid NULL pointers in session parameters
Always copy parameters that are not guarded by a flag, zero init
the structs if not provided by application.

Fixes vk_layer_validation_tests PositiveVideoEncode*.GetEncodedSessionParams

Cc: mesa-stable
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:31 +00:00
David Rosca
67c0b7a529 vulkan/video: Add chroma subsampling to video session
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:31 +00:00
Benjamin Cheng
4d22427079 vulkan/video: NULL check codec-specific chain
It seems applications are allowed to do no-op updates by not passing any
codec-specific extension structures.

Cc: mesa-stable
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:31 +00:00
David Rosca
5d28425a81 ac/parse_ib: Parse VCN_IB_COMMON_OP_RESOLVEINPUTPARAMLAYOUT
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:30 +00:00
David Rosca
ffb0b862dc ac/parse_ib: Fix parsing multiple engine commands in one VCN IB
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38158>
2025-11-06 08:41:30 +00:00
Lionel Landwerlin
51893699a2 brw: stop emitting flush operations for begin/end interlock
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
NIR barrier intrinsics are already added for required flushing.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38242>
2025-11-06 09:33:25 +02:00
Antonio Ospite
7e15340494 nouveau/drm-shim: remove double '/' in include path
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is a purely cosmetic change.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:13 +00:00
Antonio Ospite
222b85328e mesa: replace most occurrences of getenv() with os_get_option()
The standard way to query options in mesa is `os_get_option()` which
abstracts platform-specific mechanisms to get config variables.

However in quite a few places `getenv()` is still used and this may
preclude controlling some options on some systems.

For instance it is not generally possible to use `MESA_DEBUG` on
Android.

So replace most `getenv()` occurrences with  `os_get_option()` to
support configuration options more consistently across different
platforms.

Do the same with `secure_getenv()` replacing it with
`os_get_option_secure()`.

The bulk of the proposed changes are mechanically performed by the
following script:

-----------------------------------------------------------------------
  #!/bin/sh

  set -e

  replace() {

    # Don't replace in some files, for example where `os_get_option` is defined,
    # or in external files
    EXCLUDE_FILES_PATTERN='(src/util/os_misc.c|src/util/u_debug.h|src/gtest/include/gtest/internal/gtest-port.h)'

    # Don't replace some "system" variables
    EXCLUDE_VARS_PATTERN='("XDG|"DISPLAY|"HOME|"TMPDIR|"POSIXLY_CORRECT)'

    git grep "[=!( ]$1(" -- src/ | cut -d ':' -f 1 | sort | uniq | \
      grep -v -E "$EXCLUDE_FILES_PATTERN" | \
      while read -r file;
      do
        # Don't replace usages of XDG_* variables or HOME
        sed -E -e "/$EXCLUDE_VARS_PATTERN/!s/([=!\( ])$1\(/\1$2\(/g" -i "$file";
      done
  }

  # Add const to os_get_option results, to avoid warning about discarded qualifier:
  #   warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  # but also errors in some cases:
  #   error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
  add_const_results() {
    git grep -l -P '(?<!const )char.*os_get_option' | \
      while read -r file;
      do
        sed -e '/^\s*const/! s/\(char.*os_get_option\)/const \1/g' -i "$file"
      done
  }

  replace 'secure_getenv' 'os_get_option_secure'

  replace 'getenv' 'os_get_option'

  add_const_results
-----------------------------------------------------------------------

After this, the `#include "util/os_misc.h"` is also added in files where
`os_get_option()` was not used before.

And since the replacements from the script above generated some new
`-Wdiscarded-qualifiers` warnings, those have been addressed as well,
generally by declaring `os_get_option()` results as `const char *` and
adjusting some function declarations.

Finally some replacements caused new errors like:

-----------------------------------------------------------------------
../src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:127:31: error: no matching function for call to 'strtok'
  127 |          for (n = 0, option = strtok(env_llc_options, " "); option; n++, option = strtok(NULL, " ")) {
      |                               ^~~~~~
/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/string.h:124:17: note: candidate function not viable: 1st argument ('const char *') would lose const qualifier
  124 | char* _Nullable strtok(char* _Nullable __s, const char* _Nonnull __delimiter);
      |                 ^      ~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

Those have been addressed too, copying the const string returned by
`os_get_option()` so that it could be modified.

In particular, the error above has been fixed  by copying the `const
char *env_llc_options` variable in
`src/gallium/auxiliary/gallivm/lp_bld_misc.cpp` to a `char *` which can
be tokenized using `strtok()`.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:13 +00:00
Yonggang Luo
2eee9b79e8 util,vulkan,llvmpipe: Use os_get_option_dup instead getenv
Use os_get_option_dup in
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
src/util/tests/process_test.c
because the string is going to be modified.

Use os_get_option_dup in device_select_layer.c are because the string is being assigned to a
struct member (protection for the future), and also because the consecutive usages (protection for the present).

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:13 +00:00
Yonggang Luo
a8e8422170 d3d12/dozen: Use os_get_option_dup for passing to ID3D12SDKConfiguration_SetSDKVersion
consecutive calling to getenv or os_get_option is invalid usage, so convert to use os_get_option_dup instead

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:12 +00:00
Yonggang Luo
eeb54aa92d util: Add function os_get_option_dup and os_get_option_secure_dup for latter use
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:12 +00:00
Yonggang Luo
de36fed555 util: Add new function os_get_option_internal to improve os_get_option*
This is for take care of GetEnvironmentVariableA/getenv/secure_getenv/os_get_android_option
consistently across windows/posix/android

And also secure_getenv should not directly used in mesa, remove it from u_debug.h

os_get_option_secure is using getenv for windows before, that also pull the drawback of getenv, so convert it also
using GetEnvironmentVariableA on windows instead.

This is done the same as commit bed69133cd for os_get_option_secure

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:12 +00:00
Yonggang Luo
95faaa4553 treewide: Use os_get_option_secure instead secure_getenv
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:11 +00:00
Timothy Arceri
34db720660 mesa: skip redundant uniform update optimisation if unsafe
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If multiple contexts are updating uniform values we can't assume
a uniform update can skip flushing.

Fixes: b32e20e630 ("mesa: skip redundant uniform updates for glUniformHandle")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14129

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38101>
2025-11-06 01:45:11 +00:00
Juston Li
cf5c294df4 anv/android: query and use explicit layout for ahb resolve
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When available, query and use explicit layout info otherwise fallback to
implicit layout with tiling query.

This fixes aligned layouts of multi-planar formats that were getting
misaligned when adding surfaces with implicit layouts.

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38039>
2025-11-05 22:51:44 +00:00
Juston Li
c36f0e73ba anv/android: align AHardwareBuffer naming to ahb
/s/ahw/ahb/ to match common vulkan

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38039>
2025-11-05 22:51:44 +00:00
Lionel Landwerlin
1f1022d161 anv: avoid unnecessary stalling on secondaries
When EXT_descriptor_buffer is not enabled, we can assume we're in
legacy descriptor mode and not do any switching for secondaries.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38256>
2025-11-05 22:27:06 +00:00
Lionel Landwerlin
9c494dbd42 anv: don't use IndirectStatePointersDisable at the end of secondaries
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38256>
2025-11-05 22:27:06 +00:00
Lionel Landwerlin
cff047280a anv: avoid invalid timestamp generation due to skipped commands
We skip the stall emission for STATE_BASE_ADDRESS since this one can
be skipped on Gfx12.5+ and instead add a new sba tracepoint that has
valid timestamps.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0147908a89 ("anv: predicate emission of STATE_BASE_ADDRESS")
Reviewed-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38256>
2025-11-05 22:27:06 +00:00
Aitor Camacho
bea21177f2 kk: Ignore depth clear value if load op is not clear
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is required otherwise Metal validation will report an error.

Acked-By: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38233>
2025-11-05 21:41:57 +00:00
Lionel Landwerlin
9c5b0c28ee anv: enable accelerationStructureCaptureReplay
This should work just like any other buffer capture/replay.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38255>
2025-11-05 21:03:45 +00:00
Emma Anholt
bb532a7a39 v3dv: Fix assertion failure for not-found primary_fd during enumeration.
Found when I had v3dv built in my aarch64 turnip setup.

Fixes: 451a0bd490 ("v3dv: use v3d primary node for VK_EXT_physical_device_drm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38147>
2025-11-05 20:06:47 +00:00
Yiwei Zhang
a3c8740c2e llvmpipe: add missing util/os_file.h header
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14248
Fixes: 125b93595e ("llvmpipe: support sparse resource with LLVMPIPE_MEMORY_FD_TYPE_OPAQUE")
Tested-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38267>
2025-11-05 19:45:51 +00:00
Emma Anholt
4c603b7e5f pps: Remove the cpu.cfg file.
It doesn't look like it would be useful for anything related to Mesa
performance debugging.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:03 +00:00
Emma Anholt
80cdb1641f docs/perfetto: Put V3D at the same level of heading as other drivers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:03 +00:00
Emma Anholt
09793f02bc docs/perfetto: Be more clear about the role of MESA_GPU_TRACES=perfetto
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:02 +00:00
Emma Anholt
ed40f0e22a docs/perfetto: Explain using tracebox, and put commands in the list.
This binary that perfetto builds automatically launches traced and
traced_probes, doesn't need tmux installed, doesn't need you to know tmux
ui, and doesn't need the tmux helper script hacked to not call the wrong
arch's ninja if you cross compiled.

Also, it's silly to send people into an explanation and links to docs,
when we have the instructions they actually want below.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:02 +00:00
Emma Anholt
5ca03e1137 docs/perfetto: Give a hint on how to cross compile the tools.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:01 +00:00
Emma Anholt
09e496d6c0 docs/perfetto: Be helpful and opinionated about config selection.
system.cfg should be your go-to, regardless of driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:19:01 +00:00
Emma Anholt
2d739be159 docs/perfetto: Add row for panvk support.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37826>
2025-11-05 19:18:59 +00:00
Alyssa Rosenzweig
a72ebeac6d asahi: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38245>
2025-11-05 18:44:23 +00:00
Alyssa Rosenzweig
9c2a2deee6 treewide: use BITSET_BYTES, BITSET_RZALLOC
Via Coccinelle patches:

    @@
    expression bits;
    typedef BITSET_WORD;
    @@

    -BITSET_WORDS(bits) * sizeof(BITSET_WORD)
    +BITSET_BYTES(bits)

    @@
    expression memctx, bits;
    typedef BITSET_WORD;
    @@

    -rzalloc_array(memctx, BITSET_WORD, BITSET_WORDS(bits))
    +BITSET_RZALLOC(memctx, bits)

     @@
     expression memctx, bits;
     @@

     -rzalloc_size(memctx, BITSET_BYTES(bits))
     +BITSET_RZALLOC(memctx, bits)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38245>
2025-11-05 18:44:23 +00:00
Alyssa Rosenzweig
ab4cff4f5c util: add BITSET_RZALLOC
to complement BITSET_CALLOC for when you want a memctx in there.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38245>
2025-11-05 18:44:23 +00:00
Alyssa Rosenzweig
18eacdda3e util: add BITSET_BYTES helper
this comes up a lot.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38245>
2025-11-05 18:44:23 +00:00
Yiwei Zhang
53482178ef glcpp/meson: fix libglcpp generated header dependency
Explicitly declare glcpp-parse.h as a file dependency to ensure
glcpp_parse custom target completes before compiling glcpp-lex.c.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38254>
2025-11-05 18:13:47 +00:00
Valentine Burley
f9bfb3265d freedreno/ci: Move a660-gl-cl job back to pre-merge
The sm8350-hdk devices have been fixed in the lab with help from
Qualcomm.

Also adjust the parallelism of the job, as we're still within the time
limit with just 2 devices instead of 3.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38239>
2025-11-05 17:44:51 +00:00
Valentine Burley
74d3bd58d9 turnip/ci: Increase coverage of a660-vk job
Use 5 devices instead of 3, skip redundant tests, increase
tests_per_group value, and decrease the fraction used.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38239>
2025-11-05 17:44:51 +00:00
Lionel Landwerlin
ff57c31696 brw: avoid invalid URB messages
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Some new CTS tests have geometry shader looking like this :

   void main()
   {
      gl_Position = gl_in[0].gl_Position;
      EmitVertex();
      EndPrimitive();
      // <-- some storage buffer write
   }

The generate shader has :
   - a message to write the position
   - a message to write to the storage buffer
   - a final message to end the thread

This generates an empty EOT URB messages which is apparently not legal
(simulation complains, HW hangs) :

send(8)         nullUD          g126UD          nullUD          0x04088007                0x00000000
                urb MsgDesc: offset 0 SIMD8 write masked  mlen 2 ex_mlen 0 rlen 0 { align1 1Q A@1 EOT };

Instead emit a write with actual data and the mask set at 0 to discard
the effect :

mov(8)          g127<1>UD       0x00000000UD                    { align1 WE_all 1Q };
mov(8)          g125<1>UD       0x00000000UD                    { align1 1Q };
send(8)         nullUD          g126UD          g125UD          0x04088007                0x00000040
                urb MsgDesc: offset 0 SIMD8 write masked  mlen 2 ex_mlen 1 rlen 0 { align1 1Q A@1 EOT };

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38243>
2025-11-05 17:18:09 +00:00
Ian Romanick
34fe598b39 brw: Correctly generate conditional modifier for BFN
Fixes: 4193895145 ("brw/cmod: Enable limited cmod propagation for BFN")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38251>
2025-11-05 16:52:56 +00:00
Christoph Pillmayer
904ba2878f pan: Make W_entry loop aware
This commit changes SSA based spilling of values in loops.

As described in the paper by Hack, W_entry should consider which values
are used inside of the loop since we would really like to avoid spilling
those because we need to do so every loop iteration.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38181>
2025-11-05 16:15:11 +00:00
Christoph Pillmayer
bb7b0b6b1b pan: Add spill cost metric
Our SSA spilling logic should avoid inserting spill code inside loops.
Add a metric that reflects this goal.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38181>
2025-11-05 16:15:11 +00:00
Christoph Pillmayer
47f4b00cb2 pan: Pull out normal block logic from compute_w_entry
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38181>
2025-11-05 16:15:10 +00:00