Commit graph

217900 commits

Author SHA1 Message Date
Caio Oliveira
cc06e1ebe2 brw: Remove outdated comment about remove_dead_variables
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This now also removes dead variables created by split_array_vars,
and in the future it is reasonable other optimizations inside the
optimization loop to make temp variables dead.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39596>
2026-01-28 22:26:43 +00:00
Caio Oliveira
d404f5934d intel/mda: Use -W for color words diff and -U for regular unified diff
Also add colors to -Y.  Default continue to be the "color words" now
called -W.  As before, MDA_DIFF_COMMAND environment variable can be
used to set a custom diff command.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39595>
2026-01-28 22:11:11 +00:00
Caio Oliveira
05fc275837 intel/mda: Change the matching logic
Previously the matching logic was designed to match names
like this

```
99993681767ac...32132a.anv.mda.tar/CS/NIR8/046-ssa
```

So up until the first slash of a pattern, a prefix match would be used,
followed by fuzzy matching for the remaining pattern.  This don't
work well when there are subdirectories in the name, so when we see

```
before/99993681767ac...32132a.anv.mda.tar/CS/NIR8/046-ssa
before/91132154353bd...090919.anv.mda.tar/CS/NIR8/046-ssa
after/91132154353bd...090919.anv.mda.tar/CS/NIR8/046-ssa
```

the first entry can't be matched by `before/9999/first` since the fuzzy
match will kick in for the 9999 and if the second entry has four 9s
(which it does here) there would be multiple choices.

In practice the flexibility of fuzzy matching is not really needed
since we've been using consistent small prefixes (like CS, NIR8, BRW,
etc).  The exception is the last part (the object versions, i.e.
"pass names"), where sometimes is convenient to reach by a substring.

The new matching logic is to use prefix match by default, except when
matching the "object version", where substring match is used. In the
example a possible set of the patterns to identify each entry can be
`b/99/ssa`, `b/91/ssa` and `a/91/ssa`.

The patch adds a few tests to the `is_match()` to clarify the behavior.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39506>
2026-01-28 21:56:59 +00:00
Utku Iseri
2b925a83c2 zink: remove rework_io and revectorization
farewell, you beautiful beasts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39542>
2026-01-28 21:37:03 +00:00
Utku Iseri
bf80d510c0 zink: switch to using unlower_io_to_vars
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39542>
2026-01-28 21:37:03 +00:00
Utku Iseri
5a043ed64c zink: set flat interpolation for integer FS inputs
Unlowering did not set this correctly with an ovr_multiview2 test.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39542>
2026-01-28 21:37:02 +00:00
Utku Iseri
9759e89789 zink: set mediump is 32 bits
mediump was never being enabled before so it's pretty much untested,
and seems to have some issues that should be investigated.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39542>
2026-01-28 21:37:02 +00:00
Utku Iseri
08e72147ba zink: manually ignore centroid with sample shading
Unlowering doesn't handle this for us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39542>
2026-01-28 21:37:01 +00:00
Utku Iseri
a9271023fa zink: add a variable splitter for component-xfb + unlowering
Shouldn't change anything until unlowering is enabled.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39542>
2026-01-28 21:37:00 +00:00
Caio Oliveira
354dbbe3ae brw: Use the "early break" loop macros when possible
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This macro will stop the loop early if there's no chance to make further
progress.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39504>
2026-01-28 19:52:02 +00:00
Caio Oliveira
da80122257 brw: Include backend NIR passes in mda files
Add a pass tracker struct that can live the whole lifetime
of brw_compile() functions, it will keep track of the debug_archiver
and also store some metadata that allow us to name the passes.

With that, we can also embed the loop tracking in the same struct,
so that is free for any loop to use the "early break" optimization.

There are other brw_nir_* passes that are called in the pre-processing
phase.  These are not currently included in the mda yet.  Will be
handled when we hook debug_archiver or similar to the runtime/driver.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39504>
2026-01-28 19:52:02 +00:00
Emma Anholt
9dc3410512 tu: Add support for VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 color attachments
Supported on A7XX+.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39592>
2026-01-28 19:24:28 +00:00
Georg Lehmann
f472bbf017 nir/algebraic: remove manual opcode validation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The properly terminated regex automatically detects this case now.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39586>
2026-01-28 18:46:23 +00:00
Georg Lehmann
a5f55be021 nir/algebraic: terminate opcode regex
Instead of silently dropping the unmatched rest.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39586>
2026-01-28 18:46:23 +00:00
Georg Lehmann
d8ef28671d nir/opt_algebraic: use correct syntax to create exact fsat
Fixes: 3b06824e4c ("nir/opt_algebraic: optimize some post peephole select patterns")

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39586>
2026-01-28 18:46:22 +00:00
Mel Henning
99bc2d9775 nvk: Merge tese/tesc state in the MME
Recent versions of vulkan have relaxed the requirements for the way
applications specify tess parameters with shader objects. Track the
state separately for tess eval and tess control so we can merge the
states in the MME.

See either:
 * 60a4ad187c
 * https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/7694

Fixes dEQP-VK.shader_object.tessellation.hlsl.* on VK CTS 1.4.5

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:39 +00:00
Mel Henning
ad6a5a88d1 nak: Handle unspecified tess spacing
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:39 +00:00
Mel Henning
f9831e356b nak: Split out TesselationCommonShaderInfo
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:39 +00:00
Mel Henning
6ad2b84cba nvk: Use some additional drf macros
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:39 +00:00
Mel Henning
d75de33158 nvk: Move tess flags between other fields
This keeps the whole state in the lower 8 bits.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:39 +00:00
Mel Henning
3723855646 nvk: Remove prims from tess state
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:39 +00:00
Mel Henning
cfa81a7460 nvk: Compute tess prims in the MME macro
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:39 +00:00
Mel Henning
96d9a2b421 nvk: Add CCW, POINT_MODE flags for set_tess_params
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:38 +00:00
Mel Henning
384cc81464 nvk: Use macros for nvk_mme_set_tess_params tests
By rewriting all of the manual integers with macros we make this a
little easier to read and refactor.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:38 +00:00
Mel Henning
0826d58109 nvk: Add a NVK_MME_VAL_MASK macro
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39571>
2026-01-28 18:17:38 +00:00
Caio Oliveira
b91c576ae7 intel/mda: add difflog command
Compares versions of two objects one by one.  Useful to compare two
shader compilations and find the first pass that changed.

This could already be done by using something like
`diff <(mda log ...) <(mda log ...)` but it is useful enough to become
a builtin.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39420>
2026-01-28 18:00:45 +00:00
Eric Engestrom
dd3f853f6f docs: update calendar for 26.0.0-rc2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39591>
2026-01-28 17:55:54 +00:00
Faith Ekstrand
797198e7a6 nak: Use .xx swizzles for f2f.32.16
This is a no-op from a codegen PoV since both SrcSwizzle::Xx and
SrcSwizzle::None will result in .high not being set.  However, it allows
other parts of the compiler to more easily reason about the fact that it
only reads the bottom 16 bits.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39572>
2026-01-28 17:15:33 +00:00
Faith Ekstrand
15d6637282 nak: Make OpF2F take a F16v2 source
Instead of depending on a global "high" bit that affects both source and
destination, this models f2f.32.16 as an F16v2 op which ignores one of
the two components.  This makes encoding the op a tiny bit more complex
(though that's easy enough to shove in a helper) in exchange for letting
copy-prop propagate OpPrmt and swizzles into it.

Shader-db stats:

    Totals:
    CodeSize: 24304240 -> 24298928 (-0.02%)
    Static cycle count: 274812403 -> 274809320 (-0.00%)

    Totals from 39 (0.57% of 6891) affected shaders:
    CodeSize: 266672 -> 261360 (-1.99%)
    Static cycle count: 138321 -> 135238 (-2.23%)

    PERCENTAGE DELTAS                            Shaders  CodeSize Static cycle count
    google-meet-clvk/BgBlur                      49        -0.49%        -0.44%
    google-meet-clvk/Relight                     81        -0.55%        -0.18%
    q2rtx/q2rtx-rt-pipeline                      42        -0.31%        -0.10%

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39572>
2026-01-28 17:15:33 +00:00
Rhys Perry
0b0e124a73 aco: use lv1.resize() pattern
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39537>
2026-01-28 16:46:30 +00:00
Rhys Perry
5f5032bb6a aco: use lv1/lv2 instead of v1/v2.as_linear()
This is just a search+replace then clang-format.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39537>
2026-01-28 16:46:30 +00:00
Rhys Perry
c98204c963 aco: add lv1/lv2 as alias for v1/v2.as_linear()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39537>
2026-01-28 16:46:29 +00:00
Tomeu Vizoso
a5daecafd3 dril: don't build a rocket_dri.so
As Rocket has no graphics capability.

Fixes: 5b829658f7 ("rocket: Initial commit of a driver for Rockchip's NPU")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38532>
2026-01-28 16:06:42 +00:00
Samuel Pitoiset
50a3699552 radv: advertise VK_KHR_internally_synchronized_queues
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39489>
2026-01-28 15:32:58 +00:00
Samuel Pitoiset
d8ef386f98 vulkan: add support for VK_KHR_internally_synchronized_queues
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39489>
2026-01-28 15:32:57 +00:00
Aitor Camacho
8a4a369795 kk: Move nir_opt_shrink_stores after nir_opt_remove_phis for correct shrink
Signed-off-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39522>
2026-01-28 15:12:39 +00:00
Icenowy Zheng
bed1576b14 pvr: preliminary EXT_image_drm_format_modifier support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Adds a trivial EXT_image_drm_format_modifier support that only handles
LINEAR modifier.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Acked-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38991>
2026-01-28 14:49:24 +00:00
Mike Blumenkrantz
cf68dc570b ntv: stop tracking ubo variables
this is broken for the case where conflicting variables exist but aren't
accessed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39582>
2026-01-28 14:24:18 +00:00
Mike Blumenkrantz
36d9f5a4bf ntv: add a simple pass to convert vulkan descriptor access to direct derefs
this should yield more transparent passthrough

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39582>
2026-01-28 14:24:18 +00:00
Ella Stanforth
aad9a26de3 pvr: enable sampler ycbcr conversion
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Tested-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:28 +00:00
Ella Stanforth
5eeac21181 pvr: add ycbcr formats
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:28 +00:00
Ella Stanforth
0a01f7aeeb pvr: workaround hardware clamping for YCBCR_IDENTITY conversion
The TPU clamps to 0..1 so we have to workaround in software on any hardware
that does not have XR clamp support.

Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:28 +00:00
Ella Stanforth
3204e8b1a2 pvr: implement chroma swap
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:28 +00:00
Ella Stanforth
3495831d72 pvr: setup csc tables
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:28 +00:00
Ella Stanforth
c856d34056 pvr: handle plane addresses for ycbcr images.
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:27 +00:00
Ella Stanforth
f8e3e893b9 pvr: handle ycbcr swizzle
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:27 +00:00
Ella Stanforth
4baf6d3043 pvr: handle packing texstate for ycbcr images
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:26 +00:00
Ella Stanforth
fa6704a523 pvr: add multiplanar format support
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:26 +00:00
Ella Stanforth
7be87ca82a pvr/csbgen: fix packing multiple addresses
Cc: mesa-stable
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:26 +00:00
Simon Perretta
60c1a0cf86 pvr: add initial yuv tex/smp state words
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
2026-01-28 13:41:26 +00:00