Commit graph

16084 commits

Author SHA1 Message Date
Dmitry Osipenko
85cb633871 intel/virtio: Preserve errno properly when handling ioctl
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Avoid changing errno when ioctl succeeds.

Fixes: b06d759a93 ("intel: Add virtio-gpu native context")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15446
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41512>
2026-05-13 11:34:11 +00:00
hwandy
c96e73aa93 Revert "intel/decoder: make libvulkan_intel to depend on stub decoder when buildtyle=release."
This reverts commit 2ee6b4d96e.

The previous change avoids 0.25MB (1%) size change on the driver binary file,
but blocks the runtime enablement for some intel tools which is critical
to our optimization tasks.

It's not a good tradeoff based on the new need of the tool in runtime,
so revert this change.

Test: meson setup builddir -Dallow-fallback-for=libdrm -D build-tests=true -Dbuildtype=release --reconfigure && ninja -C builddir && cd builddir && meson test

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: hwandy <hwandy@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41525>
2026-05-13 10:21:08 +00:00
Alyssa Rosenzweig
db95df3da4 jay/opt_propagate: propagate undefs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
allows deleting piles of moves & pressure.

simd16 results:

   Totals:
   Instrs: 2759547 -> 2753358 (-0.22%); split: -0.29%, +0.06%
   CodeSize: 41141280 -> 41071072 (-0.17%); split: -0.23%, +0.06%

   Totals from 332 (12.54% of 2647) affected shaders:
   Instrs: 648080 -> 641891 (-0.95%); split: -1.23%, +0.28%
   CodeSize: 9782272 -> 9712064 (-0.72%); split: -0.97%, +0.25%

simd32 is a loss because of RA being stupid. again, this is obviously the right
thing to do so we're doing it. stats are just a hint.

   Totals:
   Instrs: 4683556 -> 4689193 (+0.12%); split: -0.25%, +0.37%
   CodeSize: 70072256 -> 70171920 (+0.14%); split: -0.23%, +0.38%
   Number of spill instructions: 50320 -> 50316 (-0.01%)
   Number of fill instructions: 51530 -> 51526 (-0.01%)

   Totals from 351 (13.26% of 2647) affected shaders:
   Instrs: 1349954 -> 1355591 (+0.42%); split: -0.86%, +1.28%
   CodeSize: 20484224 -> 20583888 (+0.49%); split: -0.80%, +1.29%
   Number of spill instructions: 21762 -> 21758 (-0.02%)
   Number of fill instructions: 26328 -> 26324 (-0.02%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:36 +00:00
Alyssa Rosenzweig
21e527ceec jay/opt_propagate: fix NOT propagation
and add a test for it. oops.

Totals:
Instrs: 4700885 -> 4683707 (-0.37%); split: -1.36%, +1.00%
CodeSize: 70551872 -> 70285088 (-0.38%); split: -1.35%, +0.97%
Number of spill instructions: 50325 -> 50320 (-0.01%)
Number of fill instructions: 51541 -> 51530 (-0.02%)

Totals from 1261 (47.64% of 2647) affected shaders:
Instrs: 3932922 -> 3915744 (-0.44%); split: -1.63%, +1.19%
CodeSize: 59196320 -> 58929536 (-0.45%); split: -1.60%, +1.15%
Number of spill instructions: 47901 -> 47896 (-0.01%)
Number of fill instructions: 48420 -> 48409 (-0.02%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:36 +00:00
Alyssa Rosenzweig
5cbf0002c4 jay/register_allocate: tweak roundrobin heuristic
Totals:
Instrs: 4706214 -> 4700132 (-0.13%); split: -1.03%, +0.90%
CodeSize: 70628880 -> 70540336 (-0.13%); split: -1.02%, +0.89%

Totals from 2084 (78.73% of 2647) affected shaders:
Instrs: 4515981 -> 4509899 (-0.13%); split: -1.08%, +0.94%
CodeSize: 67822800 -> 67734256 (-0.13%); split: -1.06%, +0.93%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:35 +00:00
Alyssa Rosenzweig
37e4144693 jay/register_allocate: set num_regs[MEM] properly
this is both a correctness fix (insufficient MEM registers reserved in some
cases) and a performance fix (unnecessary allocations & zeroing in the RA when
we don't spill).

fixes dEQP-VK.dgc.ext.compute.misc.scratch_space

stats are noise but positive i guess.

Totals from 35 (1.32% of 2647) affected shaders:
Instrs: 396770 -> 396690 (-0.02%)
CodeSize: 6040832 -> 6039600 (-0.02%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:35 +00:00
Alyssa Rosenzweig
d67e37a24c jay/lower_scoreboard: use sbid syncs to elide regdist deps
Totals from 1522 (57.50% of 2647) affected shaders:
CodeSize: 65268400 -> 65056176 (-0.33%); split: -0.33%, +0.00%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:35 +00:00
Alyssa Rosenzweig
89e33407e4 jay/lower_scoreboard: use CFG for RegDist scoreboarding
this is now properly global.

Totals from 558 (21.08% of 2647) affected shaders:
CodeSize: 42098496 -> 42078256 (-0.05%); split: -0.05%, +0.00%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:35 +00:00
Alyssa Rosenzweig
c2a423b5b5 jay/lower_scoreboard: rename gpr_range -> key
for clarity since UGPRs are here too.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:34 +00:00
Alyssa Rosenzweig
d549fb9c04 jay/lower_scoreboard: compact inst_exec_pipe
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:34 +00:00
Alyssa Rosenzweig
adaae3baf1 jay/lower_scoreboard: control flow is int pipe
according to IGC output.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:34 +00:00
Alyssa Rosenzweig
039b76d07c jay/lower_scoreboard: factor regdist logic out
no change, just hoisting the loop & reindenting.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:33 +00:00
Alyssa Rosenzweig
a7b8395c15 jay/lower_scoreboard: run RegDist globally
poking around, it seems branches stall the pipelines so we don't need to do any
dataflow analysis, but we do need to fall through for correctness. just keep
going across block boundaries. this isn't optimal yet but it reduces a
pile of A@1's already.

Totals from 1389 (52.47% of 2647) affected shaders:
CodeSize: 56385376 -> 56325776 (-0.11%); split: -0.13%, +0.03%

--

this also fixes issues where the first instruction of a block is a SEND that has
an unmet register dependency, since the old code was fundamentally broken. oops.
lol. fixes
dEQP-VK.compute.pipeline.workgroup_memory_explicit_layout.zero.uint8_t_array_to_uint_array_1
among many others.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:33 +00:00
Alyssa Rosenzweig
52224bb597 jay/lower_scoreboard: refactor
no functional change, just reshuffling code for next commit.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:33 +00:00
Alyssa Rosenzweig
3a7baf2cde jay/lower_scoreboard: fix trivial scheduling
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:32 +00:00
Alyssa Rosenzweig
7ba6e9810a jay: clarify development model
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:32 +00:00
Alyssa Rosenzweig
45d63539a6 jay: have proper UNDEF
matches NIR's broken semantics but allows more opts later. just a rename here.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:32 +00:00
Alyssa Rosenzweig
c2911dd688 jay: fix comment
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:32 +00:00
Alyssa Rosenzweig
3d94ba1d20 jay: make indirect push data blow up more obviously
fail to crash:

dEQP-VK.spirv_assembly.instruction.compute.untyped_pointers.glsl_memory_model.basic_usecase.load.push_constant.int32

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:31 +00:00
Alyssa Rosenzweig
b10c0d95a8 jay: optimize pack_32_2x16_split(#0, x)
Kinda pointless but whatever.

Totals from 10 (0.38% of 2647) affected shaders:
Instrs: 6846 -> 6830 (-0.23%)
CodeSize: 95728 -> 95520 (-0.22%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:31 +00:00
Alyssa Rosenzweig
5ebf0c9161 jay: elide atomic dests
simd16 results. kinda noisy but obviously the right thing to do.

Totals from 45 (1.70% of 2647) affected shaders:
Instrs: 59182 -> 59194 (+0.02%); split: -0.11%, +0.14%
CodeSize: 905200 -> 904752 (-0.05%); split: -0.17%, +0.12%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:31 +00:00
Alyssa Rosenzweig
b3fe01e2c1 jay: fix bfn with 0xffff constant
awkward.

Totals from 128 (4.84% of 2647) affected shaders:
Instrs: 258121 -> 257970 (-0.06%); split: -0.07%, +0.01%
CodeSize: 3662400 -> 3661792 (-0.02%); split: -0.14%, +0.12%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:30 +00:00
Alyssa Rosenzweig
c5cee5d973 jay: add JAY_DEBUG=noacc option
can help when debugging RA.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:30 +00:00
Alyssa Rosenzweig
9dbaaecb74 jay: swap predication/acc pass order
Lets us use more accumulators, I think this is well motivated. Saw this in a
test shader.

Totals from 242 (9.14% of 2647) affected shaders:
Instrs: 1365060 -> 1365035 (-0.00%); split: -0.00%, +0.00%
CodeSize: 20678592 -> 20680096 (+0.01%); split: -0.01%, +0.02%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41510>
2026-05-12 22:46:30 +00:00
Ian Romanick
907cc49c32 brw: Calcuate divergence before brw_from_nir
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We were previously assuming that potentially stale divergence data was
valid. On some paths the register pressure estimator would recalculate
this, but, as is obvious from the results, not always.

v2: Add an assertion in brw_from_nir_emit_impl to ensure we don't end
up in this situation again.

v3: Call nir_divergence_analysis from
brw_nir_lower_deferred_urb_writes. This fixes assertion failures (the
assertion added in v2) in basically every graphics shader. The
altnerative was to call it from brw_compile_vs, brw_compile_gs, and
brw_compile_tes.

shader-db:

All Intel platformms had similar results. (Lunar Lake shown)
total instructions in shared programs: 17050403 -> 17054033 (0.02%)
instructions in affected programs: 296344 -> 299974 (1.22%)
helped: 0 / HURT: 376

total cycles in shared programs: 876063126 -> 875817316 (-0.03%)
cycles in affected programs: 78627328 -> 78381518 (-0.31%)
helped: 91 / HURT: 276

LOST:   1
GAINED: 10

fossil-db:

All Intel platformms had similar results. (Lunar Lake shown)
Totals:
Instrs: 913770429 -> 916075391 (+0.25%); split: -0.00%, +0.26%
CodeSize: 14647414640 -> 14726176320 (+0.54%); split: -0.02%, +0.56%
Cycle count: 102308091527 -> 102290664775 (-0.02%); split: -0.26%, +0.24%
Spill count: 3469632 -> 3469124 (-0.01%); split: -0.08%, +0.07%
Fill count: 5007038 -> 4998674 (-0.17%); split: -0.51%, +0.34%
Max live registers: 192568853 -> 192595355 (+0.01%); split: -0.00%, +0.02%
Max dispatch width: 48713168 -> 48712880 (-0.00%); split: +0.00%, -0.00%
Non SSA regs after NIR: 140252767 -> 140253718 (+0.00%)

Totals from 223099 (11.11% of 2007586) affected shaders:
Instrs: 314077245 -> 316382207 (+0.73%); split: -0.01%, +0.75%
CodeSize: 5335583824 -> 5414345504 (+1.48%); split: -0.06%, +1.54%
Cycle count: 45868025821 -> 45850599069 (-0.04%); split: -0.58%, +0.54%
Spill count: 2062649 -> 2062141 (-0.02%); split: -0.14%, +0.11%
Fill count: 3343019 -> 3334655 (-0.25%); split: -0.76%, +0.51%
Max live registers: 36762498 -> 36789000 (+0.07%); split: -0.02%, +0.09%
Max dispatch width: 5542224 -> 5541936 (-0.01%); split: +0.03%, -0.03%
Non SSA regs after NIR: 43727142 -> 43728093 (+0.00%)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> [v1]
Fixes: 1bff4f93ca ("brw: Basic infrastructure to store convergent values as scalars")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41370>
2026-05-11 21:03:19 +00:00
Caio Oliveira
d08d345686 brw: Remove references to SIMD4x2
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In Gfx9 the enum value was changed to mean SIMD8 double precision, so
drop the old unused enum.  At least on Gfx9 there is an extension bit
to set to use the old SIMD4x2 mode, we can recover if we ever need this
in the future.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41457>
2026-05-11 20:16:02 +00:00
Iván Briano
756343271a anv: add and use a drirc option to enable FullyCovered for vkd3d
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:50 +00:00
Iván Briano
2ad92e3ea4 anv/brw: handle FullyCoveredEXT
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:50 +00:00
Iván Briano
58006eaaa4 anv/brw: add conservative raster on/off to FS_CONFIG
FullyCovered will need to know if conservative rasterization is enabled,
so pass it on to the shader.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:50 +00:00
Iván Briano
fea8830946 intel/brw: add load_frag_shading_rate_intel
Add a new intrinsic to read the raw shading rate provided to the FS
payload, and lower load_frag_shading_rate in NIR using it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:49 +00:00
Iván Briano
5383afadbf intel/brw: add load_msaa_rate_intel intrinsic
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:49 +00:00
Iván Briano
3448f3ce4a intel/brw: add load_coverage_mask_intel intrinsic
We'll need the raw coverage mask provided to the fragment shader in a
future patch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38879>
2026-05-11 18:15:49 +00:00
Lionel Landwerlin
7d3b62e13d anv: only load fp64 software shader when needed
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: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14665
Reviewed-by: Allen Ballway <ballway@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39341>
2026-05-11 08:27:14 +00:00
Lionel Landwerlin
beb0ffc069 anv: sweep the NIR fp64 shader before keeping it on the device
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Allen Ballway <ballway@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39341>
2026-05-11 08:27:14 +00:00
Lionel Landwerlin
19997bc245 blorp: only request fp64 shader on when required
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Allen Ballway <ballway@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39341>
2026-05-11 08:27:14 +00:00
Lionel Landwerlin
91cf85906b blorp: stop requesting the fp64 shader for ELK
Drivers using blorp on ELK platforms don't need the special
color->depth conversion path that needs 64bit floating point math.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Allen Ballway <ballway@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39341>
2026-05-11 08:27:14 +00:00
Valentine Burley
2c4ed4f90d ci: Add missing rule for new trace replay config files
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41443>
2026-05-11 08:02:05 +00:00
Hyunjun Ko
ff3e0ec5f4 anv/video: fix up H.264/H.265 encode session parameters to match advertised caps
Initially, this is to fix an issue when apps set wrong ctb sizes.
In addition to it, we need to align things with advertised caps.
This is inspired by radv.

The relevant discussion is here:
https://github.com/KhronosGroup/Vulkan-Video-Samples/pull/169

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41433>
2026-05-11 07:12:33 +00:00
Caio Oliveira
46cd7b6e28 brw: Move brw_prog_data_init to a different file
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The generator code will be reworked, remove this unrelated
function from there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41458>
2026-05-10 00:07:15 +00:00
Caio Oliveira
2273533504 brw: Fix some indentation in brw_generator.cpp
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Will reduce noise in later changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41459>
2026-05-09 16:40:32 -07:00
Caio Oliveira
b1c3e36fe3 intel/dev: Expose list of known platform names
Acked-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41007>
2026-05-09 22:00:54 +00:00
Michael Cheng
24aa7715cb intel/ds: Label selected draw events with vertex count
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Format draw and draw_indexed Perfetto events with their vertex count.
For draw_indirect and draw_indexed_indirect, include the draw count
when indirect tracing is enabled (MESA_GPU_TRACES=indirects), otherwise
fall back to the static name.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41374>
2026-05-08 19:51:48 +00:00
Michael Cheng
e8b6f61a50 intel/ds: Label compute events with dispatch dimensions in Perfetto
Format compute events as compute(x,y,z) using the end-payload group
dimensions. Trailing dimensions that equal 1 are omitted to keep labels
concise — e.g. compute(128,1,1) becomes compute(128).

For compute_indirect, the dispatch dimensions are not known at command
record time since they live in GPU memory as a VkDispatchIndirectCommand.
The u_trace framework reads them back at trace flush time via the
is_indirect mechanism: the GPU address is recorded alongside the
tracepoint, and u_trace copies the pointed-to struct into indirect_data
once the GPU has finished. The same trailing-1 trimming is applied when
indirect tracing is enabled (MESA_GPU_TRACES=indirects); otherwise the
event falls back to the static "compute_indirect" name.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41374>
2026-05-08 19:51:48 +00:00
Michael Cheng
ecbc6625cf intel/ds: Add end_event_dyn() and CREATE_DUAL_EVENT_CALLBACK_DYN macro
Add a separate end_event_dyn() that takes a std::string by value for
dynamic event names. The [=] lambda capture deep-copies the string into
the closure, avoiding a dangling pointer when the Trace() continuation
runs after the caller's stack frame is gone.

The existing end_event() with const char* remains for string literals
and long-lived pointers (e.g. payload->str), where no copy is needed.

CREATE_DUAL_EVENT_CALLBACK_DYN formats the event name via snprintf and
passes the result as a std::string to end_event_dyn(). Follow-up patches
will use this macro to label events with runtime dimensions.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41374>
2026-05-08 19:51:48 +00:00
Lionel Landwerlin
d2732faac0 anv: enable VK_EXT_swapchain_compression_control when possible
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40429>
2026-05-08 13:24:47 +03:00
Lionel Landwerlin
7094ad91e3 anv: implement missing device image property compression filtering
We want to avoid reporting support for disabling compression with
compressed drm modifier.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c94cd1235f ("anv: implement VK_EXT_image_compression_control")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40429>
2026-05-08 13:24:28 +03:00
Paulo Zanoni
ff5b909511 anv/sparse: bring back our (limited) support for depth/stencil
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The ambiguity of the Vulkan spec was clarified, and we don't need to
support sparse depth/stencil with exactly the same number of samples
as non-sparse.

If you want to pass CTS, you'll need VK-GL-CTS commit 03976477f521
("Don't require more than VK_SAMPLE_COUNT_1_BIT for non-color sparse
resident images").

This is essentially a revert of d5da6980d3 ("anv/sparse: don't
support depth/stencil with sparse") and 7b337e214d ("anv: remove
dead code").

Thanks to Iván Briano for working with Khronos to get clarification on
the spec and for implementing the VK-GL-CTS fix.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37423>
2026-05-07 23:47:52 +00:00
Paulo Zanoni
7eab94d542 intel/nir: fix sparse shadow comparison for BRW
While Jay overwrites sparse_tex->op with the newer opcodes that only
return red and the sparse stuff, BRW keeps using the original opcode
of the cloned instruction, so it can't change def->num_components.

This was not previously detectable since we did not have sparse
enabled for depth/stencil on Anv for a while. A patch to re-enable
that was proposed a while ago (MR !37423), never merged, but then a
recent attempt to try to merge it (by me) detected this regression.
Let's fix the regression first, then we can finally re-enable sparse
depth/stencil support in Anv, hopefully.

Fixes: 7468261d3d ("intel/nir: Make intel_nir_lower_sparse work for either brw or jay")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37423>
2026-05-07 23:47:51 +00:00
Tapani Pälli
c540405ca3 anv: use INTEL_NEEDS_WA_14025112257 define for workaround
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41281>
2026-05-07 16:20:29 +00:00
Tapani Pälli
c381b4fdd4 intel/dev: update mesa_defs.json from workaround database
This removes 18042479026 as we don't utilize BRW_AOP_MOV in compiler
and adds missing xe2 entries for 14025112257.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41281>
2026-05-07 16:20:29 +00:00