Commit graph

15682 commits

Author SHA1 Message Date
Georg Lehmann
ec331cc48a nir: replace lower_ldexp with has_ldexp
I can be bothered to fix all the backends that don't set lower_ldexp,
and only two backends have ldexp anyway.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33900>
2026-03-20 08:15:08 +00:00
Iván Briano
fd556e54f6 brw: do not omit RT writes if dual_src_blend is on
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Dual source blending when one of the sources is not written to leaves
those values undefined, but the other should still be valid.
By omitting unwritten outputs, we ended up not writing anything at all
for the case that OUT1 is written to but OUT0 is undefined.

Fixes new CTS tests: dEQP-VK.pipeline.*.blend.dual_source.undefined_output.first*

Cc: mesa-stable
Signed-off-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40357>
2026-03-19 23:38:40 +00:00
Iván Briano
2ce8a9e1be anv: fix anv_is_dual_src_blend_equation
Fixes new tests: dEQP-VK.pipeline.*.blend.dual_source.undefined_output.second*

Cc: mesa-stable
Signed-off-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40357>
2026-03-19 23:38:40 +00:00
Tapani Pälli
8afb28952c intel/dev: update mesa_defs.json from workaround database
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This bring NVL_U workarounds and one update for PTL and WCL.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15067
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40508>
2026-03-19 20:58:37 +00:00
Tapani Pälli
9384fd42f9 intel/dev: add NVL_U, NVL_P platforms to gen_wa_helpers.py
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40508>
2026-03-19 20:58:37 +00:00
Lionel Landwerlin
5d7cf5e762 anv: don't queue pipe control reasons wihout a trace
When there is no trace pointer, there is usually a another tracepoint
being emitted (see STATE_BASE_ADDRESS,
3DSTATE_BINDING_TABLE_POOL_ALLOC emission).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40503>
2026-03-19 18:13:46 +00:00
Ian Romanick
e13565acf4 anv: Use u_foreach_bit
Suggested-by: Lionel
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40230>
2026-03-19 17:30:25 +00:00
Ian Romanick
4cbf2ee3f0 anv: Use different logic to isolate lowest flag in anv_foreach_vk_stage
Silences many ubsan errors like:

src/intel/vulkan/anv_shader_compile.c:609:4: runtime error: shift exponent -1 is negative

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40230>
2026-03-19 17:30:25 +00:00
José Roberto de Souza
2b91888e54 anv: Remove asserts() added in resource_barrier_wait_stage()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In commit 10b5b279a4 ("anv: Fix CmdResetEvent2() with RESOURCE_BARRIER::Wait stage == none")
I haved added assert to catch invalid cases but looks like we have several tests
affected by that problem causing crashes in debug builds.

So here I'm removing those asserts(), will then work on all the fixes and bring
it back.

Acked-by: Ivan Briano <ivan.briano@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40476>
2026-03-18 05:36:38 +00:00
Sagar Ghuge
87f7f0f039 anv/rt: Drop header update using blorp code path
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Updating header using blorp code path involves setting up the render
surface state. Header (CPU) update code path involves
compute_w_to_host_r barrier which involves heavy flushing. Switching to
completely shader based header update avoid all that overhead.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39971>
2026-03-18 03:49:17 +00:00
Sagar Ghuge
37f26e346a anv: Write IR header using shader instead of CS
On integrated platforms, we have issue where L3 cache not being coherent
with CS and it forces us to push data out L3.

To avoid data cache flush, let's write the IR header with BLORP shader.
There is a small shader launch latency but eventually that should not
matter because writing data with CS (MI_STORE) commands is slower than
shader execution when we consider large number of BVH tree getting
built.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39971>
2026-03-18 03:49:17 +00:00
Collabora's Gfx CI Team
178c98655f Uprev ANGLE to 599125448d7ad53b2868a7b5d2e3e8d3bfbc1717
b90b9ee1a4...599125448d

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40061>
2026-03-18 00:19:19 +00:00
Michael Cheng
2eebe7b884 intel/blorp: use dedicated clear ops in clear paths
Select dedicated blorp ops for clear requests instead of reusing generic
depth/color labels.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40414>
2026-03-17 21:10:40 +00:00
Michael Cheng
061ed05c7a intel/blorp: Remove unused blorp_gfx8_hiz_clear_attachments
Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40414>
2026-03-17 21:10:40 +00:00
Michael Cheng
b901ff322a intel/blorp: add explicit clear op enums for stencil and linear paths
Add dedicated BLORP op enums so clear paths can be represented
precisely.

This is enum-only groundwork; behavior and trace output are wired in
follow-up commits.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40414>
2026-03-17 21:10:40 +00:00
Lionel Landwerlin
173a4c6170 vulkan/runtime: break view mask from renderpass information
The runtime builds a final pipeline state with pointers to structures
coming from the associated pipelines libraries.

So far it has considered that the viewMask was part of a structure
together with the rest of the renderpass information. This information
can be specified in pre-raster, fragment & color-output state groups
and it was assumed would be consistent for all 3. And the runtime
currently takes the pointer to the structure from the last pipeline
library (color output).

Some coming spec/cts will clarify that the viewMask only needs to be
specified for pre-raster & fragment groups, making the value in the
color-output group untrustworthy.

This change creates a new state structure to hold the viewMask on its
own so it is only gather on pre-raster & fragment groups.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> (radv)
Reviewed-by: Aitor Camacho <aitor@lunarg.com> (kosmickrisp)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com> (turnip)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> (v3dv)
Reviewed-by: Frank Binns <frank.binns@imgtec.com> (powervr)
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> (panvk)
Royaled-yes-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> (lavapipe)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39940>
2026-03-17 20:13:35 +00:00
Caio Oliveira
dcba49d7ef intel/compiler: Handle shuffle_*_intel intrinsics in bit size lowering
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40376>
2026-03-17 17:21:52 +00:00
José Roberto de Souza
10b5b279a4 anv: Fix CmdResetEvent2() with RESOURCE_BARRIER::Wait stage == none
CmdResetEvent2() was calling anv_add_pending_pipe_bits() with no dst_stages
stages causing RESOURCE_BARRIER::Wait stage == none, what causes a GPU hang in
NVL-P simulator.

So here setting dst_stages to VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT and adding
an assert in resource_barrier_wait_stage() to catch hw_stage == 0.

This fixes crucible func.event.cmd_buffer.q0 in simulator.

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/40445>
2026-03-17 16:42:55 +00:00
Lionel Landwerlin
516f854dbb anv: enable compression control on Android VP17
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>
Noticed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40367>
2026-03-16 15:36:15 +00:00
Tapani Pälli
c8ee998b13 anv: dirty descriptors in set_dirty_for_bind_map if sha changed
Always dirty descriptors independent of surface_count or sampler_count
if surface_sha or sampler_sha changed.

Fixes: 4fa1eddb ("anv: optimize binding table flushing")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15086
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40433>
2026-03-16 14:25:40 +00:00
Samuel Pitoiset
d6fe5ee8a6 vulkan: do not pass vk_instance for debug report messages
RADV wants to abstract the compiler from any instance/device/pdev
objects.

The previous NULL check for instance seems to be useless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40379>
2026-03-16 11:55:45 +00:00
Stéphane Cerveau
73faef7bd3 anv/ci: add vulkan fluster job on adl
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40326>
2026-03-13 17:38:23 +00:00
Lionel Landwerlin
88f395ad57 anv: reduce optimalBufferCopy(Offset|RowPitch)Alignment
Those values trace back to 2015, pre Vulkan 1.0 release. I have no
idea why it was set to this, except maybe the HALIGN_128 of
RENDER_SURFACE_STATE.

Anyway, discussing this with Nanley, we don't think 128bytes is more
optimal than 64bytes. Nanley suggested the lowest value could be
16bytes for the fixed functions inside the GPU (sampler, dataport),
but a cacheline probably makes more sense for the memory interface.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40363>
2026-03-13 16:11:32 +00:00
Georg Lehmann
0b51ed736d glsl: reset fp_math_ctrl when changing it per alu
I missed that the fp_math_ctrl is otherwise only reset at the next assignment.
What a strange IR.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:09 +00:00
Kenneth Graunke
9f77991751 brw: Simplify mark_last_urb_write_with_eot()
Just tag the last instruction, drop useless dead code elimination.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40328>
2026-03-12 21:40:37 +00:00
Kenneth Graunke
4bfa7a602c brw: Don't emit HALT_TARGET for VS/TCS/TES/GS
This isn't needed and will allow simplifications in the next patch.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40328>
2026-03-12 21:40:37 +00:00
Kenneth Graunke
2b6c6f8130 brw: Lower TCS single patch invocation ID calculations in NIR
This is a bit less code and also drops one more TCS-specific thing
from the "run" function.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40328>
2026-03-12 21:40:37 +00:00
Kenneth Graunke
66fbfe7bf3 brw: Fix single patch thread dispatch masks in NIR
Arguably a little more code but it brings us a bit closer to not
needing separate per-stage "run" functions.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40328>
2026-03-12 21:40:37 +00:00
Kenneth Graunke
4a9aa3ecc4 brw: Combine brw_assign_*_urb_setup() into one function
They all do exactly the same thing, except that GS multiplies by an
extra factor, and TCS has urb_read_length == 0 so it skips one line.

No need for four copies.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40328>
2026-03-12 21:40:37 +00:00
Kenneth Graunke
7d463a45f7 brw: Simplify GS load_invocation_id handling
Just return the register instead of having multiple functions stash the
register in an array of registers.  Way too much hoopla here.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40328>
2026-03-12 21:40:37 +00:00
Kenneth Graunke
9933882182 brw: Purge source_depth_to_render_target
This was used for Gfx4-5.  Since then, we're just passing around a
boolean that nobody wants.  Even if someone did, a better plan is to
just check nir->info directly.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40328>
2026-03-12 21:40:37 +00:00
irql-notlessorequal
bdf13a7185 hasvk: Stop advertising blockTexelViewCompatibleMultipleLayers
This isn't supported until Gfx9.

Fixes: 0988c68eeb ("hasvk: Advertise VK_KHR_maintenance6")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15042
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40335>
2026-03-12 18:59:44 +00:00
irql-notlessorequal
2e876d66c4 Revert "hasvk: Remove no longer valid assert"
This reverts commit da9e9329ec.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40335>
2026-03-12 18:59:44 +00:00
Caio Oliveira
848888d828 anv: Add vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV
Per spec: "If the cooperativeMatrixFlexibleDimensions feature is not
supported, the implementation must advertise zero properties."

Fixes: 3debca7dc6 ("anv: Enable cooperativeMatrixPerElementOperations")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15035
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40350>
2026-03-12 17:56:32 +00:00
Tapani Pälli
a9ea5825b6 anv: update btp address after CmdExecuteCommands
We need to update state.btp address with the last executed secondary
command buffer btp address so that optimization will work correctly.

Fixes: 8a5ac96a67 ("anv: predicate BTP emissions")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15041
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40361>
2026-03-12 11:17:45 +00:00
Samuel Pitoiset
6f12150291 ci: uprev vkd3d
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40319>
2026-03-12 08:14:51 +00:00
Paulo Zanoni
b97a1e6870 anv: avoid VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS warnings
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When running "./deqp-vk -n dEQP-VK.memory.binding.maintenance6*", we
get tons of:

    MESA-INTEL: debug: anv_bind_image_memory: ignored VkStructureType
    VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS(1000545002)

The function does not ignore VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS: it
looks for it before the main pNext loop. The pNext loop we have there
calls vk_debug_ignored_stype(), which complains about the fact that
we, allegedly, ignore VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS. Move the
code where we find bind_status to the loop so it doesn't complain
anymore.

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/40351>
2026-03-11 23:14:57 +00:00
Lionel Landwerlin
e20f5a0a7a anv: use companion RCS for hiz ops on compute queue
Fixes new CTS tests.

Similar to a previous change : 5bf3546cc6 ("anv: Use companion cmd
buffer for CCS and MCS image barriers")

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40332>
2026-03-11 21:34:42 +00:00
Nanley Chery
eb8883f3ef intel/blorp: Redescribe surfaces for copies
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When copying data between two surfaces, independently increase the size
of each surface's format (bits-per-pixel) as alignment constraints
allow. Adjust the other surface parameters and blorp_copy() parameters
accordingly.

This fixes copies between the 16bpp YCRCB formats and 32bpp formats:
dEQP-VK.ycbcr.single_plane_copy.linear.linear.r8g8b8a8_to_g8b8g8r8_422
This new test failure was reported by Iván Briano.

More generally, this increases the efficiency of our copies. As shown in
the configuration pages of the PRMs, our sampler is able to fetch texels
at a fixed rate of texels / clock regardless of the texel size
(presumably our rendering hardware has similar behavior). By using the
largest texel size possible, we can transfer more bits / clock.

Improves the performance of a number of traces in the performance CI for
BMG:

* TotalWarWarhammer3 +2.24%
* Payday3 	     +1.87%
* BaldursGate3 	     +1.34%
* Control 	     +1.25%
* TotalWarPharaoh    +1.22%

Four additional traces are helped between +0.44% and +0.96%.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:19 +00:00
Nanley Chery
73796c7245 intel/blorp: Add blorp_surf_convert_to_single_level_tile()
Convert a Tile64/Yf/Ys surface to a single level or a single miptail.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:19 +00:00
Nanley Chery
9351dbfb25 intel/blorp: Use stencil hardware less for CPB copies
Don't use it without ISL_AUX_USAGE_STC_CCS. With a future patch, this
will allow blorp_copy() calls to increase the size of the surface format
for CPB.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:19 +00:00
Nanley Chery
20bf27f2a8 intel/blorp: Make blorp_copy() format queries aux-dependent
blorp_copy() will soon start changing the format in a way which drivers
cannot rely on to do things like manage the texture cache (see iris).

Narrow down the scope of blorp_copy_get_formats() and
blorp_copy_get_color_format() such that the returned value can only be
trusted if compression would be enabled on each image.

By doing this (and adapting iris to reflect this), we'll get the
required flushes on the platforms which need
WaSamplerCacheFlushBetweenRedescribedSurfaceReads:

* On the platforms which need the workaround for all formats,
  blorp_copy() will stick with the queried format on compressed
  surfaces.
* On the platforms which need the workaround when switching from ASTC
  and non-ASTC formats, blorp_copy() may actually change the queried
  format on compressed surfaces. This is not a problem, because
  surfaces which may be read with ASTC formats are not compressible.

Prevents gfx9 from failing tests under:
* KHR-GL46.copy_image.functional_src_target_texture_2d_array_src_format_r3_g3_b2*
* KHR-GL46.copy_image.functional_src_target_texture_2d_array_src_format_rgb5*
* KHR-GL46.copy_image.functional_src_target_texture_2d_array_src_format_rgba2*
* KHR-GL46.copy_image.functional_src_target_texture_2d_array_src_format_rgba4*

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:18 +00:00
Nanley Chery
7fffd67803 anv: Add WaSamplerCacheFlushBetweenRedescribedSurfaceReads
With upcoming blorp_copy() changes, this avoids the following failures
with zink on gfx9:
* dEQP-GLES3.functional.texture.specification.basic_teximage3d.r8_2d_array
* dEQP-GLES3.functional.texture.specification.basic_teximage3d.r8_snorm_2d_array
* dEQP-GLES3.functional.texture.specification.basic_teximage3d.r8i_2d_array
* dEQP-GLES3.functional.texture.specification.basic_teximage3d.r8ui_2d_array

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:18 +00:00
Nanley Chery
465c186fc5 anv: Prepare for format width changes in blorp_copy()
blorp_copy() will soon gain the ability to increase the format bpb.
Prepare anv by replicating the clear color pixel on gfx12.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:18 +00:00
Nanley Chery
d993e0dc47 intel/blorp: Add blorp_surf::has_replicated_pixel
This allows blorp_copy() to widen a surface format width in some cases.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:17 +00:00
Nanley Chery
a77f79f21e intel/blorp: Lower bit-casting code in blorp_copy()
We're going to add code between calling
blorp_surf_convert_to_uncompressed() and bit-casting determination.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:17 +00:00
Nanley Chery
e0859f5ca1 intel/isl: Use a fixed alignment for single slices
We're going to start changing the surface format during blorp_copy().
Changing the surface format could lead to incorrect image alignment
parameters, so return a fixed halign and valign for images with a single
subresource. That's all that will be needed for the upcoming
blorp_copy() changes.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:17 +00:00
Nanley Chery
b16b9b5591 intel/isl: Relax some alignments in get_image_surf()
Aux-tt alignment only applies to the beginning of the resource. Drop it
if we're pointing to an image that is not in the first tile of the
image. Likewise for the alignment we add for sequential multi-engine
access.

We allow sparse on 1D images. When getting an image from such a surface,
the alignment likely won't be aligned to 64KB. So, in this case, remove
the flag to avoid the alignment expectation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:16 +00:00
Nanley Chery
8d82d06cbc intel/isl: Generalize and move some Yf/Ys miptail limits
Increase the scope of Yf/Ys miptail workarounds to drop the dependency
on format type (compressed or uncompressed) and make this information
more publically accessible. If I recall correctly, the affected tests
only performed blorp_copy() uploads and downloads and never accessed
images with compressed formats. So, we likely should be increasing the
scope.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:16 +00:00
Nanley Chery
9cbf14690f intel/isl: Increase 3D miptail workaround scope
Fixes the following test case on ICL:

$ INTEL_DEBUG=noccs ./deqp-vk -n
  dEQP-VK.api.image_clearing.core.clear_color_image.3d.optimal.
  single_layer.r32g32b32a32_uint

Fixes: 78e24605db ("intel/isl: Reduce scope of Yf-disabling workaround")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39974>
2026-03-11 00:36:15 +00:00