Commit graph

15520 commits

Author SHA1 Message Date
Alyssa Rosenzweig
da4296c27c util,intel: move probably_float to common code
This helper is generally useful when trying to prettyprint a 32-bit value, so
make it available to the rest of the tree.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40021>
2026-02-23 18:23:41 +00:00
José Roberto de Souza
48c685ee39 intel/perf: Add HSW verx10 to intel_perf_query_result_write_mdapi()
HSW is verx10 75 and when we switched from ver to verx10 I forgot to add the case
75.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a097a3d214 ("intel/perf: Change mdapi switch cases from ver to verx")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14902
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40039>
2026-02-23 18:00:52 +00:00
Lionel Landwerlin
4f38b5c888 anv: disable ccs modifier reporting when ccs modifiers are disabled
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reporting the modifiers when we're going to disable it in the back
hits various asserts in anv_image.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2418c91537 ("anv/drirc: disable Xe2 CCS drm modifiers for GTK engine")
Helps: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14853
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39953>
2026-02-23 07:37:29 +00:00
Lionel Landwerlin
4ac47f8dde anv: apply the same ccs disabling for Xe3 than Xe2
The new compression scheme introduced in Xe2 also applies to Xe3, so
we're liable for the same bugs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2418c91537 ("anv/drirc: disable Xe2 CCS drm modifiers for GTK engine")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39953>
2026-02-23 07:37:28 +00:00
Caio Oliveira
922e3c75cf brw: Explicitly set group=0 in generator for SYNC used in workaround
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Instead of using whatever group was set by the previous
instruction.  No behavior change, just normalizes what
we generate.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39843>
2026-02-20 17:11:59 +00:00
Caio Oliveira
4382d51cd0 brw: Make brw_builder::uniform() ignore previous group
The `group()` helper creates the new builder "relative" to the existing
one, so this was resulting in some uniform instructions having
a non-zero channel offset ("group") -- which was surprising and had no
practical effect.

Normalize to always use group = 0.  No change in behavior expected.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39842>
2026-02-20 16:50:41 +00:00
Ian Romanick
da1fd9786b elk/cmod: Don't propagate from CMP to ADD if there is a write between
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If either source of the CMP is modified before an appropriate ADD is
found, the ADD and the CMP will not have the same result.

No shader-db changes on any ELK platform. I suspect the problematic
cases only occur after scheduling has rearranged instructions. This is
likely the reason BRW didn't experience this problem until 09450faf.

Fixes: 020b0055e7 ("i965/fs: Propagate conditional modifiers from compares to adds")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39967>
2026-02-19 21:28:55 +00:00
Ian Romanick
bdbfe8de4d elk/cmod: Don't propagate from CMP to possible Inf + (-Inf)
This is a backport of BRW e26270249b.

shader-db:

All Intel platforms had similar results. (Broadwell shown)
total instructions in shared programs: 18623918 -> 18624594 (<.01%)
instructions in affected programs: 125179 -> 125855 (0.54%)
helped: 0 / HURT: 139

total cycles in shared programs: 957073100 -> 957072484 (<.01%)
cycles in affected programs: 16534168 -> 16533552 (<.01%)
helped: 42 / HURT: 68

Fixes: 020b0055e7 ("i965/fs: Propagate conditional modifiers from compares to adds")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39967>
2026-02-19 21:28:54 +00:00
Ian Romanick
d1614cd6db brw/cmod: Don't propagate from CMP to ADD if there is a write between
If either source of the CMP is modified before an appropriate ADD is
found, the ADD and the CMP will not have the same result.

shader-db:

Lunar Lake
total instructions in shared programs: 17098815 -> 17098818 (<.01%)
instructions in affected programs: 1187 -> 1190 (0.25%)
helped: 0 / HURT: 3

total cycles in shared programs: 876858960 -> 876858968 (<.01%)
cycles in affected programs: 6878 -> 6886 (0.12%)
helped: 0 / HURT: 1

Meteor Lake, DG2, Tiger Lake, Ice Lake, and Skylake had similar results. (Meteor Lake shown)
total instructions in shared programs: 20034973 -> 20034984 (<.01%)
instructions in affected programs: 4599 -> 4610 (0.24%)
helped: 0 / HURT: 11

total cycles in shared programs: 881033088 -> 881033108 (<.01%)
cycles in affected programs: 57872 -> 57892 (0.03%)
helped: 0 / HURT: 5

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 918873064 -> 918873269 (+0.00%)
CodeSize: 14747338416 -> 14747339360 (+0.00%); split: -0.00%, +0.00%
Cycle count: 104141836677 -> 104141840371 (+0.00%); split: -0.00%, +0.00%

Totals from 205 (0.01% of 2011421) affected shaders:
Instrs: 290415 -> 290620 (+0.07%)
CodeSize: 4280704 -> 4281648 (+0.02%); split: -0.01%, +0.03%
Cycle count: 18166526 -> 18170220 (+0.02%); split: -0.00%, +0.02%

Closes: #14874
Fixes: 020b0055e7 ("i965/fs: Propagate conditional modifiers from compares to adds")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39967>
2026-02-19 21:28:54 +00:00
José Roberto de Souza
39ec9e3448 intel/brw: Add and call brw_lsc_supports_base_offset() in places that checks for support of this feature
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39817>
2026-02-19 16:53:03 +00:00
José Roberto de Souza
91c5744e25 intel/brw: Use computed push constants size in brw_assign_urb_setup()
It was already computed in brw_shader::assign_curb_setup() so we can use it
in brw_assign_urb_setup().

There was a mismatch between assign_curb_setup() and brw_assign_urb_setup() when
push_sizes were not multiple of REG_SIZE, the first one was aligning every
push_sizes before sum it, while brw_assign_urb_setup() was only aligning the sum
of all push_size.

By luck the only places that did not had a push_size aligned to REG_SIZE only
had one push_size, so this was not an issue.

So here also fixing this mismatch and adding an assert to caught any future
mismatch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39817>
2026-02-19 16:53:03 +00:00
Lionel Landwerlin
b857b5f107 anv: enable compute bti prefetch
Apparently this a performance regression on our CI as opposed to what
the HW documentation recommends.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39991>
2026-02-19 15:58:44 +00:00
Alyssa Rosenzweig
5386e93865 brw: use data helper
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: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39939>
2026-02-19 14:47:11 +00:00
Kenneth Graunke
1478329c53 iris: Move ALT mode handling from brw to iris
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We just read this from the NIR and store it in iris_compiled_shader,
there's no reason for the backend compiler to be involved.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:51:00 +00:00
Kenneth Graunke
b985494d6f iris: Create our own enums for system values
These days, our system value concept is just about iris_program
communicating to iris_state which values to upload into a UBO.
Nowhere in that process is the backend compiler involved, so it
doesn't make sense for there to be brw/elk mechanisms.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:51:00 +00:00
Kenneth Graunke
53c5798194 iris: Move passthrough TCS generation out of brw and into iris
iris needs this, but anv does not, and it's just a small wrapper around
common NIR lowering anyway.  This also removes some brw/elk splitting.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:50:59 +00:00
Kenneth Graunke
341687a019 brw: Drop extra validation from TCS passthrough creation
nir_create_passthrough_tcs already validates the result, we don't need
to validate a second time.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:50:59 +00:00
Kenneth Graunke
a8481295d8 brw: Only lower system values for passthrough TCS
This cuts 75 passes that do nothing useful.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39926>
2026-02-19 02:50:58 +00:00
Rohan Garg
dfa9df7cfd anv: refactor add_aux_state_tracking_buffer for conciseness
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: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39562>
2026-02-18 17:40:10 +00:00
Rohan Garg
11f8f333e2 anv: set a private binding when the image is not externally shared
This allows anv to use a suballocator for the clear color address, which
should decrease our memory requirement.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13091
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39562>
2026-02-18 17:40:10 +00:00
Rhys Perry
f44de53586 nir: only set fp_math_ctrl if meaningful
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39809>
2026-02-18 14:04:22 +00:00
Daniel Stone
b8eb0f88d3 vulkan/wsi/wayland: Correctly map 24bpp format types
VK_FORMAT_{R8G8B8,B8G8R8}_{UNORM,SRGB} describe a 3-component, 8bpc,
24bpp, format. This is mapped to that type for Android, and implemented
as such by panvk. radv maps these to 4-component/32bpp formats, but only
support these formats for buffers rather than images. The outlier is
ANV, which relies on the 24->32bpp mapping to happen.

The Wayland WSI was mapping this to the 32bpp R8G8B8A8/B8G8R8A8 formats
instead. This would cause a failure to import the dmabuf into the
compositor on panvk, as it would send a buffer which was too small. (Or,
if it did import: garbage.)

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39552>
2026-02-17 19:25:19 +00:00
Paulo Zanoni
143370f1a7 anv: extract anv_get_color_format_features()
This commit extracts the third and final variant of function
anv_get_image_format_features2(). It is still a 296-line function, but
that is already significantly smaller than the 444-line behemoth that
anv_get_image_format_features2() was at the start of this patch
series.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39840>
2026-02-17 11:49:47 +00:00
Paulo Zanoni
1e0f6feb40 anv: extract 2 subvariants of anv_get_image_format_features2()
Function anv_get_image_format_features2() has 3 clear subvariants that
take paths independent of each other: one for compressed_emulated
formats, another for depth/stencil formats, and a third one for color
formats. Extract the 2 first subvariatns to their own sub-functions.
We'll extract the color variant in the next commit in order to make
the diff easier to review.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39840>
2026-02-17 11:49:47 +00:00
Paulo Zanoni
3946bb6b84 anv: extract anv_color_format_supports_drm_modifier_tiling()
A 76-line chunk of code just to decide if the format is supported,
let's move it to its own function.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39840>
2026-02-17 11:49:47 +00:00
Paulo Zanoni
f160d8db91 anv: unify blit_cts_workaround handling
This makes the code easier to read.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39840>
2026-02-17 11:49:46 +00:00
Paulo Zanoni
5fbaef795a anv: don't pass vk_format to anv_get_image_format_features2()
It's redundant information, as it's already part of struct anv_format.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39840>
2026-02-17 11:49:46 +00:00
Paulo Zanoni
3f3e0a4774 anv: anv_get_image_format_features2() can be static
No callers outside anv_formats.c.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39840>
2026-02-17 11:49:45 +00:00
Kenneth Graunke
add69407c7 brw: Use memset for initializing varying/slot maps
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38121>
2026-02-16 15:15:38 -08:00
Kenneth Graunke
19d9e10f4d brw: Drop VUE header values and position from wm_prog_data->inputs
The FS doesn't read these from the VUE so we don't care about them.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38121>
2026-02-16 15:15:36 -08:00
Kenneth Graunke
5e48094d72 brw: Drop BRW_VARYING_SLOT_PAD and brw_varying_slot enum
In elk, we tried to store our own "driver" enum values after Mesa's
VARYING_SLOT_MAX.  In brw, we eliminated all of these except for an
unnecessary "BRW_VARYING_SLOT_PAD" value.  This was used for empty
slots, so vue_map::slot_to_varying[] could store something.  This
patch replaces BRW_VARYING_SLOT_PAD with -1.

Our "driver" enum values overlapped with VARYING_SLOT_PATCH0, leading
to unnecessary headaches.  Now gl_varying_slot_name_for_stage will do
the right thing for both regular and patch varyings.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38121>
2026-02-16 15:15:35 -08:00
Kenneth Graunke
16ab31f358 brw: Use NUM_TOTAL_VARYING_SLOTS instead of VARYING_SLOT_TESS_MAX
This is a bit larger, but also clearer.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38121>
2026-02-16 15:15:34 -08:00
Kenneth Graunke
3dbeaf18c8 iris: Defeature native two-sided color support
This drops native support for legacy GL's two-sided color feature
in favor of lowering it via nir_lower_two_sided_color().  Instead
of having a whole bunch of state management hassle to set up the
SBE unit to swizzle between the COL and BFC VUE slots, and have it
transparently deliver one or the other to the fragment shader, we
simply deliver both and insert a conditional select there:

   (is-front-facing ? front color : back color)

This also works even for > 16 varyings, where swizzling via the SBE
unit isn't viable.

zink, asahi, freedreno, lima, panfrost, r600, v3d, and vc4 all use
this lowering rather than having native support.  Only four games in
our shader-db even use this feature.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38121>
2026-02-16 15:15:33 -08:00
Kenneth Graunke
e0fc4a7c54 brw: Drop brw_compiler option from brw_no_indirect_mask()
It's unused.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:49 +00:00
Kenneth Graunke
c2df854359 brw: Make a devinfo temporary in lower_mem_access_bitsizes
Less typing.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:49 +00:00
Kenneth Graunke
f873cfd7a0 brw: Pass devinfo to lower_bit_size, not compiler
We only need devinfo.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:48 +00:00
Kenneth Graunke
1df2158f50 brw: Delete use_bindless_sampler_offset flag
No drivers use this.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:48 +00:00
Kenneth Graunke
4bdef9824a anv, brw: Consolidate ex_bso bits to a static devinfo inline
If we have extended bindless surface offset (ExBSO) support, we want to
use it.  Consolidate the anv_physical_device and brw_compiler bits into
a single static inline that take devinfo.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:47 +00:00
Kenneth Graunke
14c64a88c7 anv: Drop an outdated comment about indirect descriptors
The infrastructure was built-up, and this was updated...a while ago.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:46 +00:00
Kenneth Graunke
0a6f6bcd5b anv: Pass devinfo to anv_shader_compute_fragment_rts, not compiler
We don't need anything but devinfo.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:46 +00:00
Kenneth Graunke
06ff3a23dc anv: Make a devinfo local in anv_shader_lower_nir
Shorter to use, and also clearer where something more than devinfo
is used from brw_compiler.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:44 +00:00
Kenneth Graunke
aa939db0c5 iris: Move recompile debugging to work on iris program keys
iris decides to do recompiles or not based on its own program keys,
not the brw or elk keys.  So, it makes sense to handle the "why did
we have to recompile a new variant" debugging based on those keys as
well.  It also unifies the code, eliminating a brw/elk split, so it's
actually less code.

Additionally, this was the only remaining user of the brw code, so we
can delete that, resulting in even larger cleanups.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:42 +00:00
Kenneth Graunke
d013ef4c0f brw: Make use_tcs_multi_patch a static inline taking devinfo
This simplifies some iris wrapping for multiple compilers and also
saves some space in the brw_compiler singleton.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:42 +00:00
Kenneth Graunke
9531c6b89e brw: Make indirect_ubos_use_sampler a static inline bool taking devinfo
Having the named field allowed us to indicate that our code conditions
are referring to the specific decision about how we handle indirect
UBOs, rather than some other arbitrary hardware change.

Still, there's no need to store this in a singleton struct - we can
easily have a static inline bool that does the devinfo check for us.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:42 +00:00
Kenneth Graunke
de03b38daa intel/elk, hasvk: Drop indirect_ubos_use_sampler option and DP code
This is always set to true for elk platforms.  No need for the option.

crocus also assumes that we take the sampler path.  hasvk had support
for both paths (leftover from when the driver still supported Gfx12).

We started using HDC messages for indirect UBO access on Tigerlake
(Gfx12.x) because of cache reworks that made it more viable.  On all
prior platforms, we used the sampler because it has additional L1/L2
caches that the dataport lacks.  Additionally, Ivybridge and nearby
platforms had notoriously slow L3 access in some very common cases.

Note that we do use the dataport for constant-offset UBO access,
since we can combine many reads into larger block loads.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39839>
2026-02-16 21:33:42 +00:00
Marek Olšák
61a96be494 nir/lower_non_uniform_access: add an option not to lower tex & image queries
AMD can do non-uniform queries. The RADV change will be in a separate commit.

NFC for drivers.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39743>
2026-02-16 12:59:36 +00:00
Hyunjun Ko
eedbe136ea anv/video: remove unsupported feautres for encoders
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/39884>
2026-02-16 10:58:40 +00:00
Hyunjun Ko
1185bbe18d anv/video: set Sad Qp Lambda values properly for H265 encoder.
This is taken from media-driver(Intel VA-API)

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/39884>
2026-02-16 10:58:40 +00:00
Hyunjun Ko
1cb4fe5ef5 anv/video: Handle GPB(Generalized P and B frames) properly for H265 enc.
The previous code was copying RefPicList0 to RefPicList1 but not updating
num_ref_idx_l1_active_minus1, leaving it potentially uninitialized or zero.
This caused the hardware to see an inconsistent L1 list state.

Accordingly it sets num_ref_idx_active_override_flag if necessary.

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/39884>
2026-02-16 10:58:40 +00:00
Hyunjun Ko
4d4a5e4a42 anv/video: set Qp passed from apps for h265 encoder
Instead of 26 by default.

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/39884>
2026-02-16 10:58:40 +00:00