Commit graph

6402 commits

Author SHA1 Message Date
Job Noorman
b101aecb03 ir3: add shader bisect debug tool
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When debugging a problem in a trace, CTS test,... that is caused by a
known compiler feature, the first step is usually to find which shader
causes the problem. This is often non-trivial as the amount of shaders
in a trace can be huge. This commit adds a debugging tool to help with
this.

The idea behind this tool is to assign every shader a deterministic
(pre-compilation) ID that can be used to order shaders. Once we have
this, we can use it to bisect which shader causes the problem. This
obviously only works if the problem can be traced back to a single
shader. In my experience, this is often the case.

This tool reuses the shader cache key as deterministic ID. It is
concatenated with the variant ID to distinguish the different variants
of a shader.

In practice, bisecting the shaders in a test run works like this:
- Gate the problematic compiler feature using ir3_shader_bisect_select;
  E.g., if (ir3_shader_bisect_select(v)) IR3_PASS(...);
- Run test with IR3_SHADER_BISECT_DUMP_IDS_PATH=ids.txt
- Sort ids.txt
- Bisect the shader IDs using IR3_SHADER_BISECT_LO/IR3_SHADER_BISECT_HI.
- Dump the problematic shader using IR3_SHADER_BISECT_DISASM.

A Python script is provided to make all this easier:
- ir3_shader_bisect.py dump-ids -o ids.txt 'test args'
- ir3_shader_bisect.py bisect -i ids.txt 'test args'

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33602>
2025-08-03 09:30:49 +00:00
Job Noorman
0a123ce68b ir3: add pointer from ir3_shader_variant to ir3_shader
Needed in the next commit to get the shader key for a variant.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33602>
2025-08-03 09:30:49 +00:00
Job Noorman
d36594f7f0 ir3/ra: fix file start wraparound
The initial wraparound was calculated in a way I do not fully
understand. However, it could lead to not starting from register 0 when
a wraparound occurs. This, in turn, could lead to some unnecessary gaps.
Fix this by explicitly setting start to 0 when a wraparound occurs.

Totals from 16452 (10.00% of 164575) affected shaders:
Instrs: 16456187 -> 16449330 (-0.04%); split: -0.14%, +0.10%
CodeSize: 32357818 -> 32345432 (-0.04%); split: -0.14%, +0.10%
NOPs: 3411778 -> 3410810 (-0.03%); split: -0.43%, +0.40%
MOVs: 603559 -> 603199 (-0.06%); split: -0.81%, +0.75%
COVs: 262804 -> 262761 (-0.02%); split: -0.13%, +0.11%
Full: 279264 -> 279179 (-0.03%); split: -0.04%, +0.01%
(ss): 422887 -> 422739 (-0.03%); split: -0.81%, +0.77%
(sy): 188298 -> 188513 (+0.11%); split: -0.53%, +0.65%
(ss)-stall: 1685300 -> 1679865 (-0.32%); split: -0.99%, +0.67%
(sy)-stall: 5797450 -> 5788564 (-0.15%); split: -0.74%, +0.58%
STPs: 18359 -> 18341 (-0.10%); split: -0.14%, +0.04%
LDPs: 32825 -> 32833 (+0.02%); split: -0.22%, +0.24%
Preamble Instrs: 3307822 -> 3308388 (+0.02%); split: -0.31%, +0.33%
Early Preamble: 5853 -> 5852 (-0.02%)
Last helper: 4154632 -> 4164580 (+0.24%); split: -0.34%, +0.58%

Cat0: 3760257 -> 3759249 (-0.03%); split: -0.39%, +0.36%
Cat1: 968587 -> 963086 (-0.57%); split: -0.99%, +0.43%
Cat2: 6133128 -> 6133532 (+0.01%); split: -0.03%, +0.03%
Cat6: 183289 -> 183275 (-0.01%); split: -0.05%, +0.05%
Cat7: 684028 -> 683290 (-0.11%); split: -0.35%, +0.25%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36374>
2025-08-03 08:58:29 +00:00
Rob Clark
b833bb2df4 freedreno/registers: Fix DBGC_CFG_DBGBUS_SEL_D definition
Offset is the same, but bitfields change between a6xx and a7xx.  Syncing
the change from https://patchwork.freedesktop.org/series/152200/

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36426>
2025-08-01 19:33:28 +00:00
Rob Clark
a05b6e293c freedreno/crashdec: Add option to export a snapshot
Add support to convert into the "snapshot" format used by internal
tooling.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36426>
2025-08-01 19:33:28 +00:00
Rob Clark
08b9d771e3 freedreno/crashdec: Sanitize index-regs section names
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36426>
2025-08-01 19:33:28 +00:00
Rob Clark
d8840db682 freedreno/decode: Add enum value decoding
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36426>
2025-08-01 19:33:27 +00:00
Job Noorman
c8f9990733 ir3/legalize: prevent infinite loop when inserting (ss)nop
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We need to insert a (ss)nop when an instruction that doesn't support
(ss) needs it. However, when this happens in a block that needs to be
legalized more than once (e.g., because it is in a loop), the (ss)nop
would be inserted every iteration, causing an infinite loop.

Fix this by checking if the previous instructions is a nop and applying
(ss) there.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 5993723471 ("freedreno/a3xx/compiler: scheduling/legalize fixes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36440>
2025-08-01 19:08:23 +00:00
Alyssa Rosenzweig
bcf1a1c20b treewide: use nir_def_block
Via Coccinelle patch:

    @@
    expression definition;
    @@

    -definition->parent_instr->block
    +nir_def_block(definition)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36489>
2025-08-01 15:34:24 +00:00
Alyssa Rosenzweig
82ae8b1d33 treewide: simplify nir_def_rewrite_uses_after
Most of the time with nir_def_rewrite_uses_after, you want to rewrite after the
replacement. Make that the default thing to be more ergonomic and to drop
parent_instr uses.

We leave nir_def_rewrite_uses_after_instr defined if you really want the old
signature with an arbitrary after point.

Via Coccinelle patch:

    @@
    expression a, b;
    @@

    -nir_def_rewrite_uses_after(a, b, b->parent_instr)
    +nir_def_rewrite_uses_after_def(a, b)

Followed by a bunch of sed.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36489>
2025-08-01 15:34:24 +00:00
Alyssa Rosenzweig
cc6e3b84cb treewide: use nir_def_as_*
Via Coccinelle patch:

    @@
    expression definition;
    @@

    -nir_instr_as_alu(definition->parent_instr)
    +nir_def_as_alu(definition)

    @@
    expression definition;
    @@

    -nir_instr_as_intrinsic(definition->parent_instr)
    +nir_def_as_intrinsic(definition)

    @@
    expression definition;
    @@

    -nir_instr_as_phi(definition->parent_instr)
    +nir_def_as_phi(definition)

    @@
    expression definition;
    @@

    -nir_instr_as_load_const(definition->parent_instr)
    +nir_def_as_load_const(definition)

    @@
    expression definition;
    @@

    -nir_instr_as_deref(definition->parent_instr)
    +nir_def_as_deref(definition)

    @@
    expression definition;
    @@

    -nir_instr_as_tex(definition->parent_instr)
    +nir_def_as_tex(definition)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36489>
2025-08-01 15:34:24 +00:00
Martin Roukala (né Peres)
0090637395 freedreno/ci: document new flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36439>
2025-08-01 09:42:03 +03:00
Job Noorman
50c6f31963 tu: enable fragmentShadingRateWithShaderSampleMask
We disabled it because it didn't play nicely together with
VK_EXT_post_depth_coverage. Since we disabled the latter, we can enable
this one now.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13414
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35788>
2025-07-31 23:23:53 +00:00
Job Noorman
a04e172042 tu: disable VK_EXT_post_depth_coverage
The HW returns the wrong result for gl_SampleMaskIn when
post_depth_coverage is enabled together with FSR. This is especially
problematic since we use gl_SampleMaskIn to lower gl_HelperInvocation.
Disable the extension as a workaround.

We are currently unaware of any apps that use VK_EXT_post_depth_coverage
so disabling it should not be a problem.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35788>
2025-07-31 23:23:53 +00:00
Collabora's Gfx CI Team
f99a60f499 Uprev Piglit to c3a3e29d59e0972650a6d30d20de930c87739c14
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
0980079dcf...c3a3e29d59

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36340>
2025-07-31 21:05:20 +00:00
Antonio Ospite
ddf2aa3a4d build: avoid redefining unreachable() which is standard in C23
In the C23 standard unreachable() is now a predefined function-like
macro in <stddef.h>

See https://android.googlesource.com/platform/bionic/+/HEAD/docs/c23.md#is-now-a-predefined-function_like-macro-in

And this causes build errors when building for C23:

-----------------------------------------------------------------------
In file included from ../src/util/log.h:30,
                 from ../src/util/log.c:30:
../src/util/macros.h:123:9: warning: "unreachable" redefined
  123 | #define unreachable(str)    \
      |         ^~~~~~~~~~~
In file included from ../src/util/macros.h:31:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:456:9: note: this is the location of the previous definition
  456 | #define unreachable() (__builtin_unreachable ())
      |         ^~~~~~~~~~~
-----------------------------------------------------------------------

So don't redefine it with the same name, but use the name UNREACHABLE()
to also signify it's a macro.

Using a different name also makes sense because the behavior of the
macro was extending the one of __builtin_unreachable() anyway, and it
also had a different signature, accepting one argument, compared to the
standard unreachable() with no arguments.

This change improves the chances of building mesa with the C23 standard,
which for instance is the default in recent AOSP versions.

All the instances of the macro, including the definition, were updated
with the following command line:

  git grep -l '[^_]unreachable(' -- "src/**" | sort | uniq | \
  while read file; \
  do \
    sed -e 's/\([^_]\)unreachable(/\1UNREACHABLE(/g' -i "$file"; \
  done && \
  sed -e 's/#undef unreachable/#undef UNREACHABLE/g' -i src/intel/isl/isl_aux_info.c

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36437>
2025-07-31 17:49:42 +00:00
Job Noorman
0abaae5a39 tu: remove consts_ubo upload code
consts_ubo is now treated as any UBO and loaded to the const file via
the preamble.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36470>
2025-07-31 06:03:41 +00:00
Job Noorman
bd58347769 ir3: treat consts_ubo as normal UBO
Lowering UBO ranges to the const file happens via the preamble on
turnip (all gens) and freedreno (a7xx+). The only exception is the
consts_ubo, which is uploaded to the const file via CP.

Make this more consistent, and remove some special-casing code, by
treating consts_ubo as any other UBO.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36470>
2025-07-31 06:03:41 +00:00
Eric Engestrom
a4dc14dedc turnip/ci: drop redundant GPU_VERSION
It's already set by `.a750-mupuf`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36354>
2025-07-30 23:18:05 +00:00
Eric Engestrom
3752723a78 ci-tron: drop unnecessary HWCI_TEST_SCRIPT: deqp-runner.sh re-defines
This is already the default for ci-tron jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36354>
2025-07-30 23:18:01 +00:00
Alyssa Rosenzweig
4f1bafa6d5 nir: drop load_sample_id_no_per_sample
unused now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36429>
2025-07-30 22:13:23 +00:00
Emma Anholt
ceaa8de981 tu: Implement sampleShadingEnable by flagging uses_sample_shading.
This will unblock getting correct helper invocation lowering without
forcing sample shading, by correctly setting NIR's uses_sample_shading
whenever it should be active.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36429>
2025-07-30 22:13:23 +00:00
Emma Anholt
c1392168e5 tu: Rename per_samp to sample_shading to match ir3.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36429>
2025-07-30 22:13:23 +00:00
Emma Anholt
6e0e6b0caf ir3: Rename per_samp to sample_shading.
per_samp ("do sample shading") was confusing compared to has_per_samp
("shader key has some flags per texture sampler to inspect").

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36429>
2025-07-30 22:13:23 +00:00
Job Noorman
326baef472 ir3/a750: don't allocate const space for primitive_param/map
These are lowered to UBOs on a750.

Totals from 6243 (3.79% of 164705) affected shaders:
CodeSize: 7820588 -> 7819720 (-0.01%); split: -0.01%, +0.00%
Preamble Instrs: 799947 -> 799511 (-0.05%); split: -0.06%, +0.00%
Constlen: 400268 -> 375072 (-6.29%)

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36460>
2025-07-30 16:05:15 +00:00
Job Noorman
f95a62897c tu: add constlen shader stat
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36460>
2025-07-30 16:05:15 +00:00
Job Noorman
04a182417e ir3/shared_ra: don't reuse src of different halfness
Avoid reusing the src of an ALU/SFU instruction when its halfness is
different from the dst. A difference in halfness would introduce a (ss)
sync and unnecessarily increase ss-stall.

Totals from 8261 (5.02% of 164705) affected shaders:
Instrs: 10044160 -> 10044390 (+0.00%); split: -0.04%, +0.04%
CodeSize: 19875094 -> 19879238 (+0.02%); split: -0.08%, +0.10%
NOPs: 2249893 -> 2249273 (-0.03%); split: -0.14%, +0.11%
MOVs: 426644 -> 426565 (-0.02%); split: -0.24%, +0.23%
COVs: 134819 -> 134810 (-0.01%); split: -0.06%, +0.05%
(ss): 264012 -> 260680 (-1.26%); split: -1.34%, +0.08%
(sy): 122711 -> 122851 (+0.11%); split: -0.07%, +0.18%
(ss)-stall: 1111161 -> 1100625 (-0.95%); split: -1.07%, +0.12%
(sy)-stall: 3650422 -> 3651422 (+0.03%); split: -0.15%, +0.17%
STPs: 8693 -> 8701 (+0.09%); split: -0.08%, +0.17%
LDPs: 16814 -> 16815 (+0.01%); split: -0.10%, +0.11%
Preamble Instrs: 2346201 -> 2351217 (+0.21%); split: -0.25%, +0.46%
Last helper: 3417842 -> 3417889 (+0.00%); split: -0.07%, +0.08%
Cat0: 2486420 -> 2485758 (-0.03%); split: -0.13%, +0.10%
Cat1: 613403 -> 614417 (+0.17%); split: -0.21%, +0.37%
Cat2: 3742181 -> 3742109 (-0.00%); split: -0.00%, +0.00%
Cat6: 81897 -> 81906 (+0.01%); split: -0.03%, +0.04%
Cat7: 254014 -> 253955 (-0.02%); split: -0.11%, +0.09%

Note that the slight increase in Cat1 is mostly from lowered copies (to
swz) and seems to be RA bad luck.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36376>
2025-07-29 07:23:15 +00:00
Danylo Piliaiev
fd1e8cf03f tu: Fix nullptr dereference in cmd_buffer tracepoint
Fixes: ac2046c5b0 ("tu/perfetto: Add app and engine names to the command buffer tracepoint")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36389>
2025-07-28 08:27:10 +00:00
Job Noorman
294014e196 ir3: use dummy dst for descriptor prefetches
Now that we have we have the concept of "dummy" registers, we can use it
for descriptor prefetches as well. Currently, they are represented as
having no dst, and a fixup pass during legalization adds the actual
needed dummy dst. This can be prevented by representing their dst using
a dummy register from the start.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36365>
2025-07-28 09:02:17 +02:00
Job Noorman
1d45e1431f ir3/postsched/legalize: ignore prefetch sam dummy src
A sam used as descriptor prefetch has a dummy src which is hard-coded
to r48.x. Neither postsched nor legalization are aware this is a dummy
src though, causing false dependencies to be added. This often results
in unnecessary syncs and/or sub-optimal scheduling decisions.

Fix this by adding a "dummy" register flag and teaching postsched and
legalization to ignore registers with that flag set.

Totals from 24681 (15.00% of 164575) affected shaders:
Instrs: 17953856 -> 17953751 (-0.00%); split: -0.00%, +0.00%
CodeSize: 36166530 -> 36163008 (-0.01%); split: -0.09%, +0.08%
NOPs: 3466012 -> 3465943 (-0.00%); split: -0.00%, +0.00%
MOVs: 550649 -> 550613 (-0.01%)
(ss): 460398 -> 460402 (+0.00%)
(ss)-stall: 1780969 -> 1780916 (-0.00%); split: -0.00%, +0.00%
(sy)-stall: 5876641 -> 5876604 (-0.00%); split: -0.00%, +0.00%
Preamble Instrs: 4118242 -> 4087950 (-0.74%); split: -1.13%, +0.39%
Last helper: 7258848 -> 7258837 (-0.00%); split: -0.00%, +0.00%
Cat0: 3795308 -> 3795239 (-0.00%); split: -0.00%, +0.00%
Cat1: 746570 -> 746534 (-0.00%)

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36365>
2025-07-28 09:02:17 +02:00
Job Noorman
fb8d69893c ir3/legalize: add asserts to prevent OOB array access
When invalid registers are passed to `get_ready_slot`, it may cause an
OOB array access. Instead of running into UB when this happens, catch it
early by asserting.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36365>
2025-07-28 09:02:17 +02:00
Marek Olšák
688a639117 nir: add nir_tex_instr::can_speculate
Set to true everywhere except:
- spirv_to_nir used by Vulkan
- bindless handles in GLSL
- some internal shaders and driver-specific code

Acked-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36099>
2025-07-24 18:41:38 +00:00
Job Noorman
493a5679e2 ir3/cp: disable cat3 hw bug workaround on a6xx+
This hw bug seems to be fixed on a6xx and later.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36324>
2025-07-23 19:08:30 +00:00
Eric Engestrom
51bec616d0 freedreno/ci: disable defunct baremetal jobs
That farm no longer exists, so these jobs will never run; let's make
that explicit; otherwise, they still show up in fork pipelines.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36215>
2025-07-21 15:35:25 +00:00
Valentine Burley
2b871958dc freedreno/ci: Streamline using common a6xx-skips
Use the existing DRIVER_NAME mechanism to pick up common skips.
This is less error prone than manually adding the skips.

A redundant freedreno-a618-skips.txt is also dropped, as it's already
included via GPU_VERSION.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36215>
2025-07-21 15:35:25 +00:00
Valentine Burley
89fc986e9f freedreno/ci: Remove a630 jobs
The cheza runners were decommissioned.

Rename the restricted trace results to a618 (same GPU generation) to keep
the history.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36215>
2025-07-21 15:35:25 +00:00
Valentine Burley
86ca8b8603 freedreno/ci: Update a6xx kernel to msm-next
Notably this brings in the VM_BIND uapi.
Custom kernel patches have also been cleaned up, with some unnecessary
hacks dropped.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13547
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36212>
2025-07-21 15:10:23 +00:00
Alyssa Rosenzweig
9bd07b2ac3 tu: use more effective NIR in meta shaders
* use tex builder (what I came for)
* use nir_create_variable_with_location
* drop redundant internal = true's, the shaders are already initialized that way

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36050>
2025-07-21 12:11:42 +00:00
Alyssa Rosenzweig
ecfca8ec6f util: crib SWAP macro from freedreno
we have a bunch of copies across the tree, unify them.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36257>
2025-07-21 11:42:18 +00:00
Collabora's Gfx CI Team
46cbe95ccf Uprev Piglit to 0980079dcfb5adbad873d88e00181268f55cb8ef
a0a27e528f...0980079dcf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35625>
2025-07-18 15:33:14 +00:00
Christian Gmeiner
fdace1c6fa freedreno/rddecompiler: Make use of hash table helpers
There is no need to have an own copy

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36218>
2025-07-18 12:16:36 +00:00
Yiwei Zhang
e733ac9314 turnip: amend AHB buffer support
...via adopting vk_android_get_ahb_buffer_properties.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
bdf9524e1c turnip: adopt vk_android_get_ahb_image_properties
No behavior change.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Danylo Piliaiev
6003a89b89 tu: Use safe-const binning VS when safe-const full VS is used
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise we can have a case where binning VS uses more consts than
full VS (when safe variant is used for full VS), that will result in
a rendering issue because SP_VS_CONST_CONFIG.CONSTLEN is shared between
full and binning VS in PROGRAM_CONFIG state and gets the value from the
full VS.

There are two alternative solutions that can allow binning VS to always
use maximum constlen:
- Move constlen emission to per-XS config. This interferes
  PROGRAM_CONFIG state which uploads consts and does SP_UPDATE_CNTL.
  Consts would need to be uploaded after constlen is defined, while
  SP_UPDATE_CNTL must be done before per-XS state is emitted.
  Also having SP_UPDATE_CNTL in a draw state that is always DIRTY
  isn't great.
  Something didn't work out on A6XX, so this idea was dropped.
- Emit constlen again in VS_BINNING draw state. This seem to work
  but also likely an undefined behaviour since constlen is changed
  after some consts are uploaded.

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36203>
2025-07-17 19:33:42 +00:00
Valentine Burley
34c969f767 freedreno,zink+tu/ci: Document Piglit bug
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Document the Piglit bug exposed in 08b522d21e
("glsl: check against varying limits using NIR shader_info after nir_opt_varyings")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36027>
2025-07-17 09:07:28 +00:00
Valentine Burley
0b677027a8 freedreno/ci: Re-enable a618-gl job
Re-enables the previously disabled GL and EGL jobs on a618, combining
them into a single a618-gl job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36027>
2025-07-17 09:07:28 +00:00
Valentine Burley
2980a5913a turnip/ci: Increase coverage of a618-vk, reduce parallelism
Thanks to the optimizations in the previous commits and further
increasing tests_per_group, we can now run more tests in a618-vk
while also reducing its parallelism.

Dropping `DEQP_FRACTION: 2` and only increasing the `fraction` of
the basic test set to 3 results in broader overall coverage.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36027>
2025-07-17 09:07:26 +00:00
Valentine Burley
7ec9404971 freedreno/ci: Increase concurrency for a618 jobs
The a618 jobs run on two different 8 thread devices, which is the optimal
value for FDO_CI_CONCURRENT on most of their jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36027>
2025-07-17 09:07:25 +00:00
Alyssa Rosenzweig
2308960bed treewide: use nir_mov_scalar
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Via Coccinelle patch:

    @@
    expression builder, scalar;
    @@

    -nir_channel(builder, scalar.def, scalar.comp)
    +nir_mov_scalar(builder, scalar)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36142>
2025-07-16 18:59:16 +00:00
Eric Engestrom
5ebe02db30 ci/piglit: provide default results file name
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36145>
2025-07-16 12:54:06 +00:00