Commit graph

216760 commits

Author SHA1 Message Date
Eric Engestrom
f009ee9bfd Revert "renderdoc: Add Haiku platform support"
This reverts commit a1a1ff7e57.

This was the wrong fix; see discussion on
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39130

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39176>
2026-01-07 09:08:46 +00:00
Marek Olšák
60e94e2b81 util: remove SHA1, use BLAKE3 in its functions to switch everything to BLAKE3
This is the least invasive way to switch all of Mesa to BLAKE3. It's done
this way for transitional reasons.

SHA1_DIGEST_LENGTH is already equal to BLAKE3_KEY_LEN. This just switches
the SHA1 implementation to BLAKE3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
492a176cbb util: increase SHA1_DIGEST_LENGTH to 32 (BLAKE3_KEY_LEN)
The last 12 bytes are always 0 for now. With this, all SHA1 functions
can be internally implemented as BLAKE3, so that we can switch everything
to BLAKE3 by only changing the implementation of the sha1 utility.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
524a536b7b util: use SHA1_DIGEST_STRING_LENGTH in fossilize_db
preparation for changing SHA1_DIGEST_LENGTH to BLAKE3_KEY_LEN

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
9e64713500 anv: use SHA1_DIGEST_LENGTH
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
0b7ee3b981 ALL: use #define and a copy helper to check and copy build_id
preparation for changing SHA1_DIGEST_LENGTH to BLAKE3_KEY_LEN

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Marek Olšák
1912a00a91 ALL: use SHA1_DIGEST_LENGTH etc. instead of hardcoding the numbers
only build_id is switched to use literal 20 instead of SHA1_DIGEST_LENGTH
because we will increase SHA1_DIGEST_LENGTH to BLAKE3_KEY_LEN

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39110>
2026-01-07 08:32:33 +00:00
Samuel Pitoiset
9f5dd888b6 radv/sqtt: add a comment about the allocation strategy of the SQTT BO
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39172>
2026-01-07 06:57:29 +00:00
Samuel Pitoiset
ffa343ed05 Revert "radv: allocate the SQTT BO in GTT for faster readback"
This reverts commit da07f1ef3f.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14591
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39172>
2026-01-07 06:57:29 +00:00
Ian Forbes
58303e5d2d svga: Set modifier in surface_get_handle
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Without this hardware cursors will not work on wlroots based compositors.
Only MOD_LINEAR is supported by the device.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39168>
2026-01-06 22:06:44 +00:00
Emma Anholt
1e8a1e9285 nir/algebraic: Apply autopep8.
I needed to reformat the nir_algebraic unit test generation, but we
weren't in pep8 to begin with.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
2026-01-06 21:27:49 +00:00
Konstantin Seurer
e2ac22a068 nir: Allow using nir_eval_const_opcode in C++ code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
2026-01-06 21:27:49 +00:00
Konstantin Seurer
295b67f7bf nir: Allow shaders in tests to be annotated
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
2026-01-06 21:27:49 +00:00
Konstantin Seurer
2ed16ed1a6 nir/print: Print annotations as comments
Also prints them in the same line as the instruction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
2026-01-06 21:27:49 +00:00
Georg Lehmann
17615b412b nir: prevent undefined behavior in idiv/imod/irem constant folding
Prevents SIGFPE when doing constant evaluation in the upcoming
nir_opt_algebraic_pattern_tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
2026-01-06 21:27:49 +00:00
Emma Anholt
feffd0e445 nir: Avoid UB of (int)0xff << 24 evaluating usadd_4x8_vc4.
Caught by UBSan on introduction of nir_opt_algebraic_pattern_test.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
2026-01-06 21:27:49 +00:00
Konstantin Seurer
a8224e3e00 nir/opt_algebraic: Do not emit patterns for 64bit booleans
Avoids assertion failures trying to constant-evaluate the pattern with the
new nir_opt_algebraic_pattern_tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
2026-01-06 21:27:48 +00:00
Konstantin Seurer
211c7db8e3 nir/opt_algebraic: Remove a pattern for 8bit floats
Avoids assertion failures trying to constant-evaluate the pattern with the
new nir_opt_algebraic_pattern_tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
2026-01-06 21:27:48 +00:00
Emma Anholt
afece95101 nir/opt_algebraic: Fix return type of fdot(vec(a, 0.0, ...), b).
The replace pattern was generating a vector when it should have been
scalar.  Fixes validation failures with the new algebraic unit tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
2026-01-06 21:27:47 +00:00
Marek Olšák
13cfd0176c ac/gpu_info: add #define AMD_MEMCHANNEL_INTERLEAVE_BYTES
radeon_info::pipe_interleave_bytes is renamed to r600_pipe_interleave_bytes
where it can be 512 on some chips.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39120>
2026-01-06 20:32:10 +00:00
Marek Olšák
92133bb0ab amd: demystify various optimizations we already have for memory channels
Explain why we do what we do, and use the radeon_info field properly.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39120>
2026-01-06 20:32:10 +00:00
Rob Clark
75166dff1d tu: Extract out descriptor helpers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Turnip has to build/munge descriptors in a bunch of places.  Extract out
helpers so we don't have to duplicate the gen8 vs earlier descriptor
format changes everywhere.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39141>
2026-01-06 20:06:05 +00:00
Rob Clark
c34d5ad6a4 tu: Use more fdl6_buffer_view_init()
Remove some open coded descriptor building to simplify adding gen8
descriptor support.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39141>
2026-01-06 20:06:05 +00:00
Rob Clark
199d5568d5 tu: Plumb CHIP thru descriptor set building
The descriptor format changes in gen8, which is mostly abstracted by
the fdl helpers.  But to utilize that we need to plumb the CHIP thru
12 layers for different ways of vk doing the same thing.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39141>
2026-01-06 20:06:05 +00:00
Rob Clark
6f6880bcac tu: Replace A6XX_TEX_CONST_DWORDS
Fortunately the descriptor size is the same on gen8.  But use the
generic define anyways.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39141>
2026-01-06 20:06:05 +00:00
Rob Clark
34944f85cd freedreno/fdl: Add STRUCTSIZETEXELS arg
Turnip needs this for accel structures.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39141>
2026-01-06 20:06:05 +00:00
Rob Clark
6db51151b5 freedreno/fdl: Fix gen8 buffer descriptors
DEPTH field is actually STRUCTSIZETEXELS.  And for buffers the iova only
needs to be byte aligned, replacing STARTOFFSETTEXELS on a6xx/a7xx.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39141>
2026-01-06 20:06:05 +00:00
Mel Henning
5fa1e5707b util/rmq: Remove unused header
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39165>
2026-01-06 19:17:03 +00:00
Mel Henning
4171161227 util/rmq: Fix uninitialized read in preprocess
We were previously always reading table->width elements from the previous
row in this loop, but we write fewer entries than that to the current
row. Fix this by adjusting the element count.

Fixes: 0d07b86073 ("util: Add range_minimum_query")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14593
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39165>
2026-01-06 19:17:03 +00:00
Mel Henning
2219f879f3 util/rmq: Fix test upper bound
Since range_minimum_query takes a half-open interval, we should be
testing with j == width

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39165>
2026-01-06 19:17:03 +00:00
Jesse Natalie
99cc0d4fdd d3d12: Don't use D3D12 B8G8R8X8 format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39179>
2026-01-06 19:00:16 +00:00
Icenowy Zheng
0837ea14b8 pvr: advertise X11-related WSI instance extensions
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39014>
2026-01-06 18:45:44 +00:00
Icenowy Zheng
cb6312c629 pvr: advertise VK_EXT_headless_surface
Since commit e8c81652c9 ("vulkan/wsi/headless: do not destroy images
that are never created"), the CTS failure that prevents headless surface
from being advertised is already solved.

Re-advertise VK_EXT_headless_surface for pvr driver.

Running `dEQP-VK.wsi.headless.*` with VK CTS 1.4.5.0 results in no
failure on BXM-4-64 .

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39038>
2026-01-06 18:29:07 +00:00
Icenowy Zheng
ca89407fa3 pvr: prevent a NULL dereference for pass-less pipeline creation w/o info
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's allowed in the specification that a graphics pipeline being created
with either a render pass or a VkPipelineRenderingCreateInfo , in this
case the multiview mask should be set to 0. However, currently the code
in pvr_early_init_shader_data() tries to access RenderingCreateInfo w/o
checking for NULL, which leads to potential crash.

Set multiview to disabled if no RenderingCreateInfo is available.

This fixes crash of Vulkan CTS 1.4.4.0 / 1.4.5.0 test case
dEQP-VK.pipeline.monolithic.misc.no_rendering .

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39050>
2026-01-07 01:45:41 +08:00
Aaron Ruby
22a19b306e gfxsteam: Support QNX-native swapchain in host codegen
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39177>
2026-01-06 16:39:49 +00:00
Gurchetan Singh
65c2dc5a63 gallium/tessellator: fix -Wmissing-prototype issues
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise, issues like:

tessellator/tessellator.cpp:385:1:
note: declare 'static' if the function is not intended to be used
      outside of this translation unit
  385 | FXP floatToFixed(const float& input)
      | ^
      | static

are observed.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>

v3: add declaration for GetMSB since it's unused but desirable to keep

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39162>
2026-01-06 15:29:15 +00:00
José Roberto de Souza
f52af98dd8 iris: Add support to DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION
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/38425>
2026-01-06 06:40:13 -08:00
José Roberto de Souza
f91de58818 anv: Add support to DRM_XE_GEM_CREATE_FLAG_NO_COMPRESSION
When this flag is set, it gives a hint to KMD to skip some operations around
compressed buffers, like copying the auxiliary buffer to smem during eviction.

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/38425>
2026-01-06 06:39:32 -08:00
José Roberto de Souza
6df105d3ff drm-uapi: Sync xe_drm.h
Sync with:
commit 59260fe5821ad108d0fda8a4a4fe0448e9821f27
Merge: 9ec3c8ee16a0 0b075f82935e
    Author: Dave Airlie <airlied@redhat.com>

        Merge tag 'drm-xe-next-2025-12-30' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next

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/38425>
2026-01-06 06:38:54 -08:00
Nick Hamilton
eccdfb397e pvr: Fix missing sample mask test instructions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The sample mask test instructions were only being added if the sample
mask was an input or no other discard test was being done.

In the failing test cases, instructions to handle alpha to one and/or
alpha to coverage were being added and the program marked as having
a discard test. This would lead to the instructions for the sample
mask test to not be added.

The fix is to specifically check for whether the instructions for sample mask
have been added instead of check for any discard test.

Fix deqp:

dEQP-VK.pipeline.monolithic.extended_dynamic_state.after_pipelines.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.after_pipelines.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_draw.large_static_rasterization_samples_off
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_draw.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_draw.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_good_static.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_good_static.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.between_pipelines.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.between_pipelines.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.cmd_buffer_start.large_static_rasterization_samples_off
dEQP-VK.pipeline.monolithic.extended_dynamic_state.cmd_buffer_start.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.cmd_buffer_start.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.three_draws_dynamic.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.three_draws_dynamic.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.two_draws_dynamic.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.two_draws_dynamic.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.two_draws_static.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.two_draws_static.single_sample_sample_mask_disable

Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Tested-by: Icenowy Zheng <uwu@icenowy.me>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39040>
2026-01-06 12:37:20 +00:00
Icenowy Zheng
c294b061ad pvr: advertise VK_KHR_incremental_present
The implementation of this extension is part of the common Mesa WSI
code, and it's used by Zink without checking for the presence.

Advertise it for PowerVR open source driver.

With Headless WSI advertised, Tests in Vulkan CTS that is
incremental_present related can pass.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39037>
2026-01-06 12:07:29 +00:00
Samuel Pitoiset
4fce09268a ac/perfcounter: rename ac_pc_block::num_global_instances to num_instances
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: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39155>
2026-01-06 11:43:21 +00:00
Samuel Pitoiset
59dc20262c ac/perfcounter: rename ac_pc_block::num_instances to num_scoped_instances
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39155>
2026-01-06 11:43:21 +00:00
Samuel Pitoiset
3658d9588f ac/perfcounter: add num_{16,32}bit_spm_counters to GPU blocks
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39155>
2026-01-06 11:43:21 +00:00
Samuel Pitoiset
9a1b925400 ac/spm: use GPU block distribution mode to determine instances
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39155>
2026-01-06 11:43:20 +00:00
Samuel Pitoiset
ac0423eb3f ac/spm: use GPU block distribution mode to determine broadcasting
SPM is only implemented for GFX10+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39155>
2026-01-06 11:43:19 +00:00
Frank Binns
2a35d624b2 pvr: check image usage features against image features
Fixes deqp failures in:
  dEQP-VK.api.info.unsupported_image_usage.*

Backport-to: 25.3
Signed-off-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/37686>
2026-01-06 11:24:29 +00:00
Frank Binns
b273a5c10c nvk: remove duplicate header include
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37686>
2026-01-06 11:24:29 +00:00
Georg Lehmann
9c6d294111 nir/opcodes: use util_max_num/util_min_num for fmin/fmax constant folding.
Hopefully, this is easier to read.

The SPIR-V behavior has also since been clarified to require associativity.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39137>
2026-01-06 10:55:03 +00:00
Georg Lehmann
026d4cd200 nir/opcodes: fix fsat signed zero correctness
fsat(-0.0) must return +0.0.

Cc: mesa-stable

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39137>
2026-01-06 10:55:03 +00:00