Commit graph

217516 commits

Author SHA1 Message Date
Hyunjun Ko
e73e4e1554 anv/video: Compute AV1 tile positions internally
The pMiColStarts/pMiRowStarts arrays from applications may have
incorrect units. Instead of using them directly, compute the tile
start positions in superblock units internally based on the tile
dimensions.

Cc: mesa-stable
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/39471>
(cherry picked from commit 8e9fec8e40)
2026-02-04 18:39:33 +01:00
Hyunjun Ko
162ef4da2c anv/video: fix a typo in Vulkan AV1 decoding.
Cc: mesa-stable
Fixes: e510efed05d("anv: support in-loop super resolution for AV1 decoding")
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/39471>
(cherry picked from commit 8004f46466)
2026-02-04 18:39:33 +01:00
Rhys Perry
d3a67ee1d9 radv: fix when incomplete rt pipeline libraries are loaded from cache
It might be that the radv_pipeline_cache_lookup_nir_handle() in
radv_ray_tracing_pipeline_cache_search() fails but we will later need the
NIR. If rt_stages[i].shader was non-NULL, then we would not have created
the NIR.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.2
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38263>
(cherry picked from commit 89eefdcadb)
2026-02-04 18:39:33 +01:00
Olivia Lee
dc140f5500 hk: fix hk_passthrough_gs_key size computation
The non-dynamic members of xfb_info are already included in
sizeof(hk_passthrough_gs_key), so adding nir_xfb_info_size counts them
twice. Because of this we were including uninitialized memory in the key
in hk_handle_passthrough_gs, which is undefined behavior.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39574>
(cherry picked from commit d6745b358d)
2026-02-04 18:39:33 +01:00
Tapani Pälli
d89eceaa2c anv: route clear operations on compute to companion
This fixes bunch of cts tests hitting issues when attempting
anv_image_mcs_op with compute.

Fixes: ab9d3528dc ("anv: fix queue check in anv_blorp_execute_on_companion on xe3")
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/39581>
(cherry picked from commit 85978ccd28)
2026-02-04 18:39:33 +01:00
Zan Dobersek
be9d5d6508 tu: allocate transient attachments used for LRZ
When proceeding with rendering, any transient attachment that will be used
as LRZ buffer should also be allocated. With GMEM rendering, these
attachments otherwise remained unloaded and subsequent LRZ clears produced
GPU faults.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 764b3d9161 ("tu: Implement transient attachments and lazily allocated memory")
Fixes: #14604
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39535>
(cherry picked from commit b6a049ea4b)
2026-02-04 18:39:33 +01:00
Mike Blumenkrantz
5dddf74a34 ntv: emit ViewIndex with flat for fragment stage
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39606>
(cherry picked from commit 999aaac12e)
2026-02-04 18:39:33 +01:00
Nick Hamilton
d7a47c1627 pvr: Fix the isp samples per tile calculation
The samples per tile calculation was incorrect for sample count 4 and 8.

Fix:
dEQP-VK.pipeline.monolithic.multisample.std_sample_locations.draw.depth.samples_4.*
dEQP-VK.pipeline.monolithic.multisample.std_sample_locations.draw.stencil.samples_4.*

Backport-to: 26.0

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39580>
(cherry picked from commit 9f9788330e)
2026-02-04 18:39:33 +01:00
Lionel Landwerlin
844a79b474 vulkan/wsi/direct: remove VkDisplay created from GetDrmDisplayEXT on ReleaseDisplayEXT
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39556>
(cherry picked from commit 1112c1461d)
2026-02-04 18:39:33 +01:00
Georg Lehmann
1f5f2cc952 nir/opt_algebraic: use correct syntax to create exact fsat
Fixes: 3b06824e4c ("nir/opt_algebraic: optimize some post peephole select patterns")

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39586>
(cherry picked from commit d8ef28671d)
2026-02-04 18:39:33 +01:00
Tomeu Vizoso
8111b41eb4 dril: don't build a rocket_dri.so
As Rocket has no graphics capability.

Fixes: 5b829658f7 ("rocket: Initial commit of a driver for Rockchip's NPU")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38532>
(cherry picked from commit a5daecafd3)
2026-02-04 18:39:32 +01:00
Eric Engestrom
1c4642663b .pick_status.json: Mark a66d19b691 as denominated 2026-02-04 18:39:32 +01:00
Eric Engestrom
7c3ff4cecc .pick_status.json: Update to 248b818407 2026-02-04 18:39:32 +01:00
Eric Engestrom
42f03572d1 VERSION: bump for 26.0.0-rc2
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2026-01-28 17:41:52 +01:00
Ella Stanforth
8808ec23fa pvr/csbgen: fix packing multiple addresses
Cc: mesa-stable
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39231>
(cherry picked from commit 7be87ca82a)
2026-01-28 16:18:00 +01:00
Nick Hamilton
28f3e82f2d pco: Fix for atomic operations on an image buffer
Within the driver buffers are treated as 2D as sampling them as 1D
will run into HW restrictions on max size.

The compiler does the same however for atomic image ops the address
is manually calculated and doing this via the 2D path leads to
incorrect offsets.

The fix is to treat buffers as 1D for atomic ops which calculates
the correct offsets for the operations.

Fix deqp:
dEQP-VK.image.atomic_operations.add.buffer.*
dEQP-VK.image.atomic_operations.and.buffer.*
dEQP-VK.image.atomic_operations.compare_exchange.buffer.*
dEQP-VK.image.atomic_operations.dec.buffer.*
dEQP-VK.image.atomic_operations.exchange.buffer.*
dEQP-VK.image.atomic_operations.inc.buffer.*
dEQP-VK.image.atomic_operations.max.buffer.*
dEQP-VK.image.atomic_operations.min.buffer.*
dEQP-VK.image.atomic_operations.or.buffer.*
dEQP-VK.image.atomic_operations.sub.buffer.*
dEQP-VK.image.atomic_operations.xor.buffer.*

Fixes: 6dc5e1e109 ("pco: fully support Vulkan 1.2 image atomics")

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39521>
(cherry picked from commit 079377c767)
2026-01-28 16:18:00 +01:00
Olivia Lee
6f2d97ef41 Revert "panvk: advertise VK_EXT_primitives_generated_query on v10+"
This reverts commit 6eadcaa851.

VK_EXT_primitives_generated_query has a dependency on
VK_EXT_transform_feedback, which we do not implement yet. This is
breaking the android CTS. It will be reenabled once transform feedback
is in.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39547>
(cherry picked from commit 4959f45e99)
2026-01-28 16:17:59 +01:00
Iván Briano
cb8a069e24 brw: fix local_invocation_index with quad derivaties on mesh/task shaders
For mesh/task shaders, the thread payload provides a local invocation
index, but it's always linear so it doesn't give the correct value when
quad derivatives are in use.
The lowering pass where all of this is done correctly for compute
shaders assumes load_local_invocation_index will be lowered in the
backend for mesh/task, calculates the values for the quads correctly but
then avoid replacing the original intrinsic and we remain with the wrong
results.

Add an intel specific intrinsic and always lower the generic one to that
(or whatever else was calculated) to avoid ambiguities and fix the value
for quad derivatives.

Fixes future CTS tests using mesh/task shaders under:
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.*

Fixes: d89bfb1ff7 ("intel/brw: Reorganize lowering of LocalID/Index to handle Mesh/Task")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39276>
(cherry picked from commit 5b48805b42)
2026-01-28 16:17:59 +01:00
Georg Lehmann
8d9349e75b aco: disable DPP for rev integer subs and shifts
It is not documented anywhere, but at least on gfx12 and gfx10.3
DPP is applied to src1 instead of src0.
This might be useful for shifts, but to be safe just disable DPP
completely for now.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14739

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39516>
(cherry picked from commit 140ca3bb50)
2026-01-28 16:17:59 +01:00
Georg Lehmann
6553c4ce40 aco: add a helper function for non supported DPP opcodes
Cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39516>
(cherry picked from commit 8e99bf5380)
2026-01-28 16:17:59 +01:00
Eric Engestrom
e68f96eb1f nir/meson: fix cpp_args of nir_opt_algebraic_pattern_tests
Fixes: 4c30c44b75 ("nir: Generate unit tests for nir_opt_algebraic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39550>
(cherry picked from commit d12e3454e6)
2026-01-28 16:17:59 +01:00
Nanley Chery
c2eca1a1cc anv: Fix the fast clear type for FCV writes
We started allowing non-default clear colors with FCV in commit
cd8e120b97. When rendering to an image with FCV, set the fast-clear
type to ANV_FAST_CLEAR_ANY if the image properties allow such
fast-clears.

Fixes: cd8e120b97 ("anv: Allow more single subresource fast-clears with FCV")
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit ce196c9de5)
2026-01-28 16:17:59 +01:00
Nanley Chery
f3db65d95e anv: Update predicated resolve documentation
* Don't mention gfx7-8 due to the hasvk split.
* Account for the array of clear colors.

Fixes: 0e6b132a75 ("anv: Access more colors in fast_clear_memory_range")
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit e7854d06a5)
2026-01-28 16:17:59 +01:00
Nanley Chery
943fd8152a iris: Use the CLEAR state on Xe2+ for MCS
On Xe2+, HSD 14011946253 and the related documents explain that MCS
still only supports a single clear color.

Fixes: df006bba02 ("iris: Update aux state for color fast clears (xe2)")
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit 6c6b2d8f30)
2026-01-28 16:17:59 +01:00
Nanley Chery
f3adaccb4b iris: Set missing flags on clear color changes
When changing the clear color without a fast clear, use dirty bits to
ensure that surfaces with inline clear colors are updated and that
partial resolves are done as needed.

Remove the flags at the bottom of fast_clear_color() as
blorp_fast_clear() already sets them for us.

Fixes: 64d861b700 ("iris: Skip some fast-clears even on color changes")
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit 3b642f7456)
2026-01-28 16:17:59 +01:00
Nanley Chery
a680c20d40 intel/isl: Fix QPitch of arrayed MCS
From RENDER_SURFACE_STATE::AuxiliarySurfaceQPitch on BDW+,

   This field must be set to an integer multiple of the Surface
   Vertical Alignment

Accomplish this by aligning the height of each MCS layer to main
surface's vertical alignment. Prevents the following test group from
failing on Xe2 when a future commit enables multi-layer fast-clears in
anv:

   dEQP-VK.api.image_clearing.*.
   clear_color_attachment.multiple_layers.
   *_clamp_input_sample_count_*

The main test I used to debug this:

   dEQP-VK.api.image_clearing.core.
   clear_color_attachment.multiple_layers.
   a8b8g8r8_unorm_pack32_64x11_clamp_input_sample_count_2

Backport-to: 25.3
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37660>
(cherry picked from commit eb4a581e44)
2026-01-28 16:17:59 +01:00
Mel Henning
d20d30442c nvk: Disable large pages for now
Reviewed-by: Mary Guillemard <mary@mary.zone>
Fixes: cabfdb4404 ("nvk: Enable compression")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39364>
(cherry picked from commit f3c53cf66b)
2026-01-28 16:17:59 +01:00
Georg Lehmann
7e42c6e949 aco: fix demote in header of single iteration loop
The control is not divergent before a divergent break in a single iteration loop,
but we already pushed the loop mask on the stack.

Fixes: 90faadae72 ("aco/insert_exec_mask: don't disable dead quads on demote in divergent CF")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14733
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39528>
(cherry picked from commit 4b1996b1c7)
2026-01-28 16:17:59 +01:00
Tapani Pälli
41026e14f9 blorp: fix asserts hit with msaa blorp blits on xe3
Tested on PTL, fixes various copy_and_blit tests that utilize compute
after ab9d3528dc that exposed this to them.

Fixes: ab9d3528dc ("anv: fix queue check in anv_blorp_execute_on_companion on xe3")
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/39548>
(cherry picked from commit bb84773c81)
2026-01-28 16:17:59 +01:00
Caterina Shablia
174aa7ed66 panvk: fix sparse image non-opaque binds
I have no idea how this passed CTS.

Fixes: 5326c451 ("panvk/csf: implement sparse image non-opaque binds")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39546>
(cherry picked from commit a3ec5ece8b)
2026-01-28 16:17:59 +01:00
Samuel Pitoiset
362faeb15e radv: add a workaround for a synchronization bug in Strange Brigade Vulkan
This game has broken synchronization reported by VVL and it indeed
doesn't wait for idle right before present. Workaround this by
injecting a full barrier (easier than rewriting the dep struct).

This only applies to the Vulkan backend.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14705
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39480>
(cherry picked from commit 14d3fb5f1b)
2026-01-28 16:17:59 +01:00
Samuel Pitoiset
33fbf9bf61 radv: fix applying radv_ssbo_non_uniform=true for Crysis 2/3 remastered
DX11 games that use Vulkan interop for RT with a broken and too generic
app/engin name. This is very specific to these two games.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14718
Fixes: 56813236f4 ("radv: use app names instead of exec name for shader based drirc workarounds")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39518>
(cherry picked from commit d679236e09)
2026-01-28 16:17:59 +01:00
Rob Clark
cda3f42323 freedreno/a6xx: Better program state size calc
Most of the time we were significantly over-allocating the size of
program stateobjs.  Except when the shader had a very large # of
immediates, in which case we were under-allocating (and crashing).

Fixes: 598928d7e7 ("nir/loop_analyze: determine whether all control flow gets eliminated upon loop unrolling")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14731
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39545>
(cherry picked from commit 670ded35c1)
2026-01-28 16:17:59 +01:00
Konstantin Seurer
3ef0b4b27a vulkan: Avoid NAN in the IR BVH
Build and encoding stages should be able to assume that AABBs don't have
NANs. This commit covers all possible sources of NAN.

Fixes: 091b43b ("radv: Use HPLOC for TLAS builds")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14696
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39508>
(cherry picked from commit 20322687e0)
2026-01-28 16:17:59 +01:00
Konstantin Seurer
1f1da9bc5a vulkan: Handle inactive primitives with LBVH builds
cc: mesa-stable

Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39378>
(cherry picked from commit 0817551f00)
2026-01-28 16:17:59 +01:00
Nanley Chery
0d3857c832 blorp: Fix Tile64 clear redescription assertion
Prevent assert failures in a future commit where Tile64 will be selected
more often.

Fixes: 42ef23ecd1 ("intel/blorp: Don't redescribe some Tile64 clears")
Reviewed-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/38063>
(cherry picked from commit 6fc0e5c0aa)
2026-01-28 16:17:59 +01:00
Nanley Chery
cec72c7a29 intel/isl: Fix miptail selection for compressed textures
When determining if an LOD can fit within a miptail, we must minify in
pixel space and then convert to elements.

Prevents the following test case from failing when Yf is force-enabled:

   dEQP-VK.image.texel_view_compatible.graphic.extended.3d_image.texture_read.astc_8x5_srgb_block.r32g32b32a32_uint

Fixes: 46f45d62d1 ("intel/isl: Start using miptails")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-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/38063>
(cherry picked from commit add742fca6)
2026-01-28 16:17:59 +01:00
Mike Blumenkrantz
e2bf4b9007 ntv: emit demote extension/capability when emitting demote
this is cleaner and more accurate

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39540>
(cherry picked from commit a842e641d9)
2026-01-28 16:17:59 +01:00
Mel Henning
03c90bcd1f nvk: Ignore meta ops in occlusion queries
Fixes: 052bbd65c9 ("nvk: Implement pipeline statistics and occlusion queries")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39510>
(cherry picked from commit e32bfc5efe)
2026-01-28 16:17:59 +01:00
Faith Ekstrand
e8f33e8ffb nvk: Enable ZPASS_PIXEL_COUNT in draw_state_init()
Fixes: 052bbd65c9 ("nvk: Implement pipeline statistics and occlusion queries")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39510>
(cherry picked from commit c081ab864f)
2026-01-28 16:17:59 +01:00
Patrick Lerda
4a1133e769 r600: update cubearray imagesize calculation
The previous method to calculate imageSize().z was
incorrect for a cubearray view.

This change was tested on palm and cayman. Here is the test fixed:
spec/arb_texture_view/rendering-layers-image/layers rendering of imagecubearray: fail pass

Fixes: 6c1432f0be ("r600/eg: fix cube map array buffer images.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39063>
(cherry picked from commit 0b8d8f2b17)
2026-01-28 16:17:59 +01:00
Benjamin Cheng
4e1f5fda4a radv/video: Use a more reliable way of computing tile sizes
Some apps (old FFmpeg, contemporary CTS) send down pMi{Col,Row}Starts in
SB units, not MI units. Instead of dependening on those values which
could be unreliable, derive the tile sizes in SB using other parameters.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39492>
(cherry picked from commit c10ebb0fda)
2026-01-28 16:17:59 +01:00
Patrick Lerda
fd0ec1af2b r600: fix rv770 clamp to max_texel_buffer_elements
This change fixes the clamp to max_texel_buffer_elements
issue related to rv770 and older gpus.

Here are the tests fixed on rv770:
spec/arb_texture_buffer_object/texture-buffer-size-clamp/r8ui_texture_buffer_size_via_sampler: fail pass
spec/arb_texture_buffer_object/texture-buffer-size-clamp/rg8ui_texture_buffer_size_via_sampler: fail pass
spec/arb_texture_buffer_object/texture-buffer-size-clamp/rgba8ui_texture_buffer_size_via_sampler: fail pass

Fixes: 1a441ad5cb ("r600: clamp to max_texel_buffer_elements")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39385>
(cherry picked from commit afcead9158)
2026-01-28 16:17:58 +01:00
Patrick Lerda
161f3c2144 r600: make vertex r10g10b10a2_sscaled conformant on palm and beyond
This is a gl4.3 issue very similar to e8fa3b4950.

The mode r10g10b10a2_sscaled processed as vertex on palm at the
hardware level doesn't follow the current standard. Indeed, the .w
component (2-bits) is not calculated as expected. The table below
describes the situation.

This change fixes this issue by adding two gpu instructions at
the vertex fetch shader stage. An equivalent C representation and
a gpu asm dump of the generated sequence are available below.

.w(2-bits)	expected	palm		cypress
0		 0		0		 0
1		 1		1		 1
2		-2		2		-2
3		-1		3		-1

w_out = w_in - (w_in > 1. ? 4. : 0.);

0002 00000024 A0040000  ALU 2 @72
 0072 801F2C0A 600004C0     1 w:     SETGT*4                __.w,  R10.w, 1.0
 0074 839FCC0A 61400010     2 w:     ADD                    R10.w,  R10.w, -PV.w

Note: cypress returns the expected value, and does not need
this correction.

This change was tested on palm, barts and cayman. Here are the tests fixed:
khr-gl4[3-6]/vertex_attrib_binding/basic-input-case6: fail pass
khr-gles31/core/vertex_attrib_binding/basic-input-case6: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38849>
(cherry picked from commit 2ed761021f)
2026-01-28 16:17:58 +01:00
Patrick Lerda
88ae449dbc r600: fix rv770 dot4 operations
Using a PV register which is not PV.x, after a dot4 operation,
does not work on rv770. Anyway, this does work on evergreen
but this is not documented.

This change updates this behavior for all the r600 gpus
which fixes the issue on rv770. It adds max4 which has the
same requirement in the case of max4 being implemented.

Here are some of the affected tests on rv770:
piglit/bin/fp-abs-01 -auto -fbo
glcts --deqp-case=KHR-GL31.buffer_objects.triangles
piglit/bin/shader_runner generated_tests/spec/glsl-1.10/execution/built-in-functions/fs-distance-vec2-vec2.shader_test -auto -fbo

Fixes: 942e6af40b ("r600/sfn: use PS and PV inline registers when possible")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39101>
(cherry picked from commit da1108dcc4)
2026-01-28 16:17:58 +01:00
Patrick Lerda
3231523878 r600: fix cayman msaa shading behavior
The functionality was working properly at glMinSampleShading(0.)
and glMinSampleShading(1.). The issue was with the intermediary
values. This change makes this function compatible with the
evergreen setup.

Note: this was one of the few functionalities which were working
properly on evergreen but not on cayman.

Here are the tests fixed:
spec/arb_sample_shading/samplemask 4 all/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 4/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 6 all/0.250000 partition: fail pass
spec/arb_sample_shading/samplemask 6 all/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 6/0.250000 partition: fail pass
spec/arb_sample_shading/samplemask 6/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 8 all/0.250000 partition: fail pass
spec/arb_sample_shading/samplemask 8 all/0.500000 partition: fail pass
spec/arb_sample_shading/samplemask 8/0.250000 partition: fail pass
spec/arb_sample_shading/samplemask 8/0.500000 partition: fail pass
deqp-gles31/functional/shaders/sample_variables/sample_mask_in/bit_count_per_two_samples/multisample_rbo_4: fail pass
deqp-gles31/functional/shaders/sample_variables/sample_mask_in/bit_count_per_two_samples/multisample_rbo_8: fail pass
deqp-gles31/functional/shaders/sample_variables/sample_mask_in/bit_count_per_two_samples/multisample_texture_4: fail pass
deqp-gles31/functional/shaders/sample_variables/sample_mask_in/bit_count_per_two_samples/multisample_texture_8: fail pass

Fixes: f7796a966d ("radeonsi: add basic code for overrasterization")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38615>
(cherry picked from commit d5d844bfc4)
2026-01-28 16:17:58 +01:00
Georg Lehmann
6303313da0 aco/optimizer: fix parsing salu p_insert as shift
Fixes: 88f7e3fff3 ("aco/optimizer: parse pseudo alu instructions")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39412>
(cherry picked from commit ba73792de0)
2026-01-28 16:17:58 +01:00
Rhys Perry
ca22a66dd9 aco/insert_fp_mode: remove incorrect assertion
This can happen if a loop has no continues, and the later code should work
fine in this situation.

This fixes war_thunder/0013a69e097b2471 on navi21.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 6b9d28ab9b ("aco/insert_fp_mode: insert fp mode in reverse")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39481>
(cherry picked from commit e59a0df302)
2026-01-28 16:17:58 +01:00
Zan Dobersek
cfdaa05349 tu: handle DS_DEPTH_BOUNDS_TEST_BOUNDS state under TU_DYNAMIC_STATE_RB_DEPTH_CNTL
MESA_VK_DYNAMIC_DS_DEPTH_BOUNDS_TEST_BOUNDS state should be emitted as part
of TU_DYNAMIC_STATE_RB_DEPTH_CNTL along with other depth state, and not as
part of dynamic stencil state.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 979cf7bac0 ("tu: Merge depth/stencil draw states")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39323>
(cherry picked from commit 3cb4776ede)
2026-01-28 16:17:58 +01:00
Sushma Venkatesh Reddy
6c6ed2a9e6 brw: Use lookup tables for Gfx12+ 3src type encoding/decoding
The previous Gfx12+ implementation using bit masking is failing for FP8
types, so replacing with explicit lookup tables.
For float types, the encoding now aligns with brw_data_type_float, ensuring
correct behavior for DPAS and other 3-source instructions.

Fixes: d1d4e3d530 ("brw: Add EU assembler support for float8")

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39448>
(cherry picked from commit 0ce4e8ba6f)
2026-01-28 16:17:58 +01:00