Commit graph

15202 commits

Author SHA1 Message Date
Caio Oliveira
68190499df brw: Move ADD related validation
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:40 +00:00
Caio Oliveira
6ae92d3372 brw: Move AVG related validation
Couldn't find in the docs a reference for the types needing to match,
and simulator + MTL seem fine with mixing UD and UW, so not adding
a replacement for the removed assertions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:38 +00:00
Caio Oliveira
6d8d733d4d brw: Move MUL related validation
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38877>
2025-12-16 01:34:34 +00:00
Kenneth Graunke
26523bedec brw: Call nir_opt_offsets for mesh shaders
Most stages call this as part of brw_nir_postprocess_opts() but mesh
lowers to URB intrinsics after that since it needs bit-sizes lowered.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:46 +00:00
Kenneth Graunke
d831f38d11 brw: Delete all the old backend mesh/task URB handling code
This has all been replaced by NIR lowering to URB intrinsics.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:46 +00:00
Kenneth Graunke
d0dc45955d brw: Lower task shader payload access in NIR
We keep this separate from the other lowering infrastructure because
there's no semantic IO involved here, just byte offsets.  Also, it needs
to run after nir_lower_mem_access_bit_sizes, which means it needs to be
run from brw_postprocess_opts.  But we can't do the mesh URB lowering
there because that doesn't have the MUE map.

It's not that much code as a separate pass, though.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:46 +00:00
Kenneth Graunke
bd0c173595 brw: Lower mesh shader outputs in NIR
With all the infrastructure in place, this is largely a matter of
calling the lowering passes with the appropriate data from the MUE map.

MUE initialization is now done with semantic IO instead of raw offsets.

This drops another case of non-standard NIR IO usage (and no_validate).

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:44 +00:00
Kenneth Graunke
6e5cc63a3a brw: Extend URB lowering infrastructure to handle mesh shader outputs
Mesh shaders introduce per-primitive outputs, and also our MUE layout
has per-vertex data starting at an offset.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:43 +00:00
Lionel Landwerlin
60db7f20c9 brw: move MUE initialization out of the SIMD loop
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:42 +00:00
Lionel Landwerlin
d3053fb3d2 brw: Implement URB handle intrinsics for task/mesh stages
(Split by Ken from a larger patch originally written by Lionel.)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:40 +00:00
Kenneth Graunke
d18423b116 brw: Make lower_{inputs,outputs}_to_urb_intrinsics non-static
I want to reuse these in brw_compile_mesh.cpp.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:40 +00:00
Kenneth Graunke
788c49ecc6 brw: Extend load_urb/store_urb to handle 32-bit non-vec4-aligned access
(Based on the original implementation by Lionel Landwerlin, but adapted
to my respun URB lowering framework.)

The mesh shader URB payload requires reading and writing fields at
arbitrary DWord offsets.  For example, the Primitive Indices array
starts at DWord 1, and it can be a vec1[], vec2[], or vec3[] array,
leading to very unaligned and sometimes double-parked elements.

Still, most fields are still conveniently vec4-aligned.

To handle this, we add a new cb_data::vec4_access flag.  If set, access
remains in vec4 units, with vec4 alignment.  We use this for non-mesh
stages.  When unset, offset is in 32-bit units, allowing unaligned
DWord access.

This is trivial to support on Xe2, where the LSC URB messages support
arbitrary byte-aligned addressing.  On older platforms, we have to
convert this to vec4 aligned offsets plus a component offset (either
returning a subset of the channels loaded, or using component masking
to store a subset of a vec4/vec8).

Thankfully, since the OWord URB messages support accessing a vec8 at
a time, this means we can do any vec4 access in one message, even if
it's double-parked.  We use mod-analysis to see if we can statically
determine the sub-vec4 component offset required (we often can).  If
not, we use the ability to have dynamic writemasks to sort it out.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:38 +00:00
Kenneth Graunke
2b700f6bfd brw: Delete attr_desc struct
Unused since commit 18bbcf9a63.

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/38918>
2025-12-16 00:58:37 +00:00
Kenneth Graunke
8177695403 brw: Add missed access to store_urb_lsc_intel intrinsics
I forgot to copy this over in the LSC case.  This meant we were missing
reorderability which meant that we were missing out on CSE.

fossil-db results on Battlemage:

   Instrs: 231471427 -> 231363032 (-0.05%)
   Send messages: 12077759 -> 12019628 (-0.48%)
   Cycle count: 34058451430.0 -> 34057005552.0 (-0.00%); split: -0.01%, +0.00%
   Spill count: 520387 -> 520135 (-0.05%)
   Fill count: 470812 -> 470722 (-0.02%)
   Max live registers: 72111834 -> 71873886 (-0.33%)

   Totals from 2898 (0.37% of 788851) affected shaders:
   Instrs: 1223836 -> 1115441 (-8.86%)
   Send messages: 148633 -> 90502 (-39.11%)
   Cycle count: 17732554.0 -> 16286676.0 (-8.15%); split: -10.65%, +2.49%
   Spill count: 252 -> 0 (-inf%)
   Fill count: 90 -> 0 (-inf%)
   Max live registers: 491684 -> 253736 (-48.39%)
   Non SSA regs after NIR: 255397 -> 255402 (+0.00%)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:36 +00:00
Kenneth Graunke
87c63b4725 brw: Rename brw_nir_lower_vue_inputs to brw_nir_lower_gs_inputs
The other stages don't use this anymore.  Geometry should stop too,
but that's for a future MR.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:34 +00:00
Kenneth Graunke
d525d2456a brw: Calculate tessellation URB offsets when lowering to URB intrinsics
This now lowers IO intrinsics to URB intrinsics in a single step,
rather than modifying IO intrinsics to have non-standard meanings
temporarily.  We are able to drop one "no_validate" flag.

For example, remap_patch_urb_offsets had added (vertex * stride) to
(offset) for per-vertex IO intrinsics, but left them as per-vertex
intrinsics.  Now we just have an urb_offset() function to calculate
that when doing the lowering.

This also provides a central location for calculating URB offsets,
which we should be able to extend for other uses (per-view lowering,
mesh per-primitive lowering) in future patches.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38918>
2025-12-16 00:58:34 +00:00
Kenneth Graunke
b02a01c636 intel: Replace signed char with int8_t
Let's use modern stdint types.

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/38918>
2025-12-16 00:58:32 +00:00
Lionel Landwerlin
94d2ec975d anv: disable crast on SKL
SKL is failing the following tests (maybe more) :

dEQP-VK.rasterization.conservative.overestimate.samples_1.triangles.degenerate.0_00
dEQP-VK.rasterization.conservative.overestimate.samples_16.triangles.degenerate.max
dEQP-VK.rasterization.conservative.overestimate.samples_2.triangles.degenerate.max
dEQP-VK.rasterization.conservative.overestimate.samples_2.triangles.degenerate.min
dEQP-VK.rasterization.conservative.overestimate.samples_4.triangles.degenerate.0_00
dEQP-VK.rasterization.conservative.overestimate.samples_8.triangles.degenerate.max
dEQP-VK.rasterization.conservative.overestimate.samples_8.triangles.degenerate.min

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38951>
2025-12-15 20:15:03 +00:00
José Roberto de Souza
518705a4fe intel/brw: Split to a function the code that calculate sampler channels that should be written
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This block of code will be re-used in a future patch, also it reduces a bit the
size and complexity of lower_sampler_logical_send().
No changes in behavior intended here.

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/38792>
2025-12-15 06:57:15 -08:00
Lionel Landwerlin
e241e30986 anv: add a no-resource-barrier debug flag
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>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:42 +00:00
Lionel Landwerlin
5f58ac7b11 anv: implement WA_18039014283
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:42 +00:00
Lionel Landwerlin
15174b185b anv: instrument resource barriers instruction in u_trace
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:42 +00:00
Lionel Landwerlin
3520abf8a3 anv: use RESOURCE_BARRIER for event waiting when possible
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:41 +00:00
Lionel Landwerlin
5f9ece0b83 anv: implement Wa_18037648410
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:41 +00:00
Rohan Garg
24e9afb0b7 anv: implement resource barrier emissions
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:40 +00:00
Lionel Landwerlin
e5fc567f49 anv: introduce an new virtual pipecontrol flag for BTI change
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:40 +00:00
Lionel Landwerlin
682f907228 intel: rename DCFlushEnable to ForceDeviceCoherency
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:39 +00:00
Rohan Garg
e55a7bc83a anv: program STATE_COMPUTE_MODE to flush the L1 cache
This is required for upcoming resource barrier work to implement HDC
flush's.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:39 +00:00
Lionel Landwerlin
47bc9da064 anv: use anv_add_pending_pipe_bits for event reset
Nicer tracking with INTEL_DEBUG=pc

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:39 +00:00
Lionel Landwerlin
8834ef8bcd anv: use flushing PIPE_CONTROL for event signaling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:38 +00:00
Lionel Landwerlin
a06b0213c8 anv: switch events to use 0/!0 values for unsignaled/signaled
RESOURCE_BARRIER cannot write a particular value, just a HW generated
ID.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:38 +00:00
Lionel Landwerlin
5b0c2339d5 anv: use the blitter/video barrier helper for event signalling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:37 +00:00
Lionel Landwerlin
5dd6f0d0ef anv: store event creation flags
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:37 +00:00
Lionel Landwerlin
72ee520b36 anv: remove unused event field
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:36 +00:00
Lionel Landwerlin
23be634934 anv: disable deferred bits on Gfx20+
Gfx20+ doesn't do PIPELINE_SELECT, the assumption is that we can now
do any PIPE_CONTROL we want regardless of the pipeline mode.

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/38707>
2025-12-15 08:25:36 +00:00
Lionel Landwerlin
be5f5f659f anv: consider CS coherent with L3 on Xe2+
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:35 +00:00
Lionel Landwerlin
503355c7f8 anv: update pipeline barriers for Xe2+
We experimentally found that some fixed functions have apparently be
hooked up to the L3. So we can drop a some flushing.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:34 +00:00
Lionel Landwerlin
15524de710 anv: remove pb-stalls from various locations
Now that we track the stages, it's not required to add those bits
anymore.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:34 +00:00
Lionel Landwerlin
86dceded22 anv: move cs/pb-stall detection to flushing function
Now that we have the stages accumulated, we can delay this at flushing
time.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:33 +00:00
Lionel Landwerlin
f2c571fabf anv: add tracking of involved stages in pipe flushes
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:32 +00:00
Lionel Landwerlin
4e8a25cf6f anv: remove use of emit_apply_pipe_flushes() in various helpers
For a bunch of workarounds and special cases we want PIPE_CONTROL not
RESOURCE_BARRIER. We want emit_apply_pipe_flushes() to be mostly for
application barriers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:31 +00:00
Lionel Landwerlin
d37a888a9b anv: remove unused gpu_memcpy function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38707>
2025-12-15 08:25:31 +00:00
Caio Oliveira
375e9d1094 intel/mda: Handle better processing a lot of archives
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Keep only the metadata when initially parsing the files.  Then re-load
the relevant archives again when necessary.

The old code was just keeping everything in memory, which was slow when
looking at a directory containing archives resulted from processing
a large fossil file.

Extra care is taken with `search` commands to ensure we don't keep
unnecessary contents around.  At some point we could reorganize so
find_all is not used here, but for now this should be fine.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38228>
2025-12-13 01:21:08 +00:00
Caio Oliveira
5474e9bfdc intel/mda: Use function to read content of objects
Preparation for a later patch that will make the content be loaded
on-demand.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38228>
2025-12-13 01:21:08 +00:00
Nanley Chery
d2f336c108 intel/isl: Only assert surface addresses on gfx9+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Restrict the surface address assertions to platforms with soft-pin. We
technically could check for (gfx8+ && !CHV), but we choose to use the
simpler condition instead.

Fixes: 8e96b516ca ("intel/isl: Assert alignments of surface addresses")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11331
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38905>
2025-12-12 18:06:16 +00:00
Hyunjun Ko
c50474ac6f anv/video: clean up VP9 picture state setup
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: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38904>
2025-12-12 13:37:44 +00:00
Hyunjun Ko
2fe09217a1 anv/video: fix VP9 chroma subsampling format detection
Fixes: 314de7af ("anv: Initial support for VP9 decoding")
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38904>
2025-12-12 13:37:44 +00:00
Kenneth Graunke
bdacab49c7 brw: Use LSC extended descriptor offsets for Xe2 URB messages
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
URB messages on Xe2 are LSC messages with FLAT addressing.  We can
specify a S19 immediate offset in the extended message descriptor,
which should be more than adequate to hold any offsets we need.

We wrote the original URB code before implementing that, and never
doubled back to take advantage of it.  But doing so can drop ADDs
near every URB access.

fossil-db results on Battlemage:

   Totals:
   Instrs: 232239759 -> 231432254 (-0.35%)
   Cycle count: 34044435848.0 -> 34055507100.0 (+0.03%); split: -0.00%, +0.04%
   Spill count: 520370 -> 520362 (-0.00%); split: -0.00%, +0.00%
   Fill count: 470790 -> 470803 (+0.00%); split: -0.00%, +0.00%
   Max live registers: 72111853 -> 72111369 (-0.00%); split: -0.00%, +0.00%

   Totals from 227920 (28.89% of 788851) affected shaders:
   Instrs: 59841897 -> 59034392 (-1.35%)
   Cycle count: 683385208.0 -> 694456460.0 (+1.62%); split: -0.14%, +1.76%
   Spill count: 17278 -> 17270 (-0.05%); split: -0.10%, +0.06%
   Fill count: 17481 -> 17494 (+0.07%); split: -0.03%, +0.10%
   Max live registers: 23052652 -> 23052168 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38899>
2025-12-12 00:12:03 +00:00
Kenneth Graunke
9482d392a1 brw: Fix outdated comments about urb->offset units
I recently converted urb->offset to be in bytes on Xe2, but neglected to
update these comments that still said OWord.

Fixes: 9ffae42975 ("brw: Store brw_urb_inst::offset in bytes on Xe2")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38899>
2025-12-12 00:12:03 +00:00
Lionel Landwerlin
fecb9e0952 anv: switch shader heap placement to beginning of heap by default
It seems placing the shader at the end has a negative performance
impact.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8ba197c9ef ("anv: Switch shaders to dedicated VMA allocator")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38900>
2025-12-11 23:20:06 +00:00