Commit graph

193523 commits

Author SHA1 Message Date
Jose Maria Casanova Crespo
f0b3a4fcaf v3dv: limit V3D_TFU_READAHEAD to buffers/images with USAGE_TRANSFER_SRC flag
We avoid adding unconditionally the 64-bytes padding to all usages
of the vulkan memory allocations. The readahead padding is only added
for buffers/images with USAGE_TRANSFER_SRC_BIT usage enabled as this
is enough for having a full vk-cts without reported MMU TFU errors.

vk-cts doesn't exercise the added image memory requirements codepath to
handle this readahead. This is because the required 64-bytes image
alignments for images with flag VK_IMAGE_USAGE_TRANSFER_SRC_BIT.
But the alignment didn't cover when the image is already aligned to
64-bytes at the end of the memory page.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36159>
2025-07-23 10:44:02 +00:00
Jose Maria Casanova Crespo
4e033ffb27 v3d: Add V3D_TFU_READAHEAD padding for allocated resources
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36159>
2025-07-23 10:44:02 +00:00
Jose Maria Casanova Crespo
310aa198f4 v3dv: Move V3D_TFU_READAHEAD_SIZE to src/broadcom/common
We will use it in v3d.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36159>
2025-07-23 10:44:01 +00:00
Rhys Perry
7ed9fdf85b nir/search: check variable requirements even if it's already seen
Even if it's already seen, the variable might have some unchecked
requirements.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12320
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32837>
2025-07-23 09:43:33 +00:00
Rhys Perry
f45026751f nir/cf: have nir_remove_after_cf_node remove phis at the start too
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: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35975>
2025-07-23 09:06:36 +00:00
Christoph Pillmayer
9c104fa026 panvk: Make most end work instrumentation synchronous
Most of it is tracking stuff that is ending synchronously anyways.
For example, in emit_barrier_insert_waits, cs_sync64_wait is sync and
therefore there is no need to defer the timestamp write on any SBs.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36161>
2025-07-23 08:28:23 +00:00
Christoph Pillmayer
8255af9f54 panvk: Make ts in panvk_instr_begin_work synchronous
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36161>
2025-07-23 08:28:23 +00:00
Christoph Pillmayer
737156b4df panvk: Make panvk_utrace_record_ts wait mask configurable
This is so that in subsequent commits the wait mask can be:
- set by the caller
- not provided at all -> synchronous ts write

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36161>
2025-07-23 08:28:22 +00:00
Christoph Pillmayer
7358f0e045 panvk: hide utrace behind more generic interface
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36161>
2025-07-23 08:28:21 +00:00
Erik Faye-Lund
0ed1a10b73 Revert "upanfrost: make 128-bit opt-in with driconf on v4"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is no longer needed, thanks to the previous commit.

This reverts commit 23a32b948b.

Backport-to: 25.1
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36156>
2025-07-23 07:37:23 +00:00
Erik Faye-Lund
0178a4bd9d Revert "lima: make fp16 render-targets opt-in with driconf"
This is no longer needed, due to the previous commit.

This reverts commit 1617778c38.

Backport-to: 25.1
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36156>
2025-07-23 07:37:23 +00:00
Erik Faye-Lund
c7bc454dbd mesa/st: do not check single-sampled for max_samples
According to screen.rst, sample_count of 1 is the same as a sample_count
of 0, neither of which are multi-sampling. We only want to include
formats that support multi-sampling when calculating max samples,
otherwise we can't support the combination of floating-point textures
and multi-sampling on DX9-class GPUs.

...There's one special-case, though; FakeMSAA, which is implemented as
sample_count = 1. In that case, we actually need to check for a single
sample. So let's check for that first, to figure out what the actual
min value is. Ugh, this is hairy.

This brings back GL_EXT_framebuffer_multisample and
GL_EXT_framebuffer_multisample_blit_scaled on R300, and should get
Crocus back to GL 3.x as it was before.

Fixes: f56443ac ("st/mesa: search for smallest supported sample-count")
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36156>
2025-07-23 07:37:23 +00:00
Erik Faye-Lund
7970ac6234 r300/ci: update expected failures
This isn't related to the changes in this MR, but was discovered while
testing it. Let's update these while we're at it.

Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36156>
2025-07-23 07:37:23 +00:00
Bohan Yu
778b8600d5 gallium: Fix LLVMpipe function parameter of Vector type call load mismatch
When using vector parameter type in Rusticl with LLVMpipe backend, the
generated LLVM IR function definition part uses an Array of Vector
(correct type) LLVM type, but the caller generates a Vector of Vector
(invalid type). This mismatch causes three problems:

1. Type check fails in debug build;
2. The dumped LLVM BC cannot be disassembled due to Invalid Type;
3. Potential faulty JIT code.

This bugfix construct an Array of Vector for NIR function call by a new
`lp_build_gather_array` function. Special thanks to Zhichao Guan
<vbcpascal@outlook.com> for the joint effort in this bugfix, and
Jose Fonseca for sggestions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36287>
2025-07-23 07:14:57 +00:00
Georg Lehmann
b572bd9b91 svga: use NIR_PASS(_, ...) for gl_nir_lower_images
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36291>
2025-07-23 06:47:58 +00:00
Georg Lehmann
d02b1893f1 llvmpipe: use NIR_PASS(_, ...) for nir_lower_fragcolor
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36291>
2025-07-23 06:47:58 +00:00
Georg Lehmann
3bc691f116 broadcom/compiler: use NIR_PASS for nir_schedule
This should work now that the pass returns progress and invalidates  metadata.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36291>
2025-07-23 06:47:58 +00:00
Georg Lehmann
e1be7213e4 nir/schedule: return progress and fix metadata
Tracking if we changed the shader is somewhat complicated, so assume
we always do.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36291>
2025-07-23 06:47:58 +00:00
Georg Lehmann
ee0f2ed241 gallivm: use NIR_PASS(_, ...) instead of NIR_PASS_V
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36291>
2025-07-23 06:47:58 +00:00
Georg Lehmann
a43a26ad2b gallium/draw: use NIR_PASS(_, ...) instead of NIR_PASS_V
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36291>
2025-07-23 06:47:58 +00:00
Georg Lehmann
18be5603ed lavapipe: use NIR_PASS(_, ...) instead of NIR_PASS_V
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36291>
2025-07-23 06:47:58 +00:00
Eric Engestrom
544d0c03e2 radv/ci: lower timeouts for vkd3d jobs
No timeout was set, so the project-wide default of 1h was applied.

radv-raven-vkd3d had to be excluded as it caused lava_job_submitter.py
to fail (without any error message).

All the jobs touched here take between 2 and 4 minutes to run total, and
between 40 and 100 sec of test time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36305>
2025-07-23 06:24:30 +00:00
Eric Engestrom
9e692a176f radv/ci: lower timeouts for newly added gfx1201 jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36305>
2025-07-23 06:24:30 +00:00
Timothy Arceri
971af9cf98 util: add workaround for Interstellar Rift
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Without this shaders fail to compile due to use of the texture2D
function.

Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36281>
2025-07-22 23:58:00 +00:00
Gurchetan Singh
5740c65b6a gfxstream: vulkan-mapper: special case Nvidia
Also, VIRTGPU_KUMQUAT_HANDLE_TYPE_MEM_DMABUF is 0x2, not 0x1

Fixes create device failures in end2end tests.

Reviewed-by: Jason Macnak <jmacnak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36295>
2025-07-22 23:44:28 +00:00
Alyssa Rosenzweig
803e61837e agx: reassociate ALU
GL:

   total instrs in shared programs: 2881862 -> 2801415 (-2.79%)
   instrs in affected programs: 2264277 -> 2183830 (-3.55%)

   total alu in shared programs: 2362306 -> 2281986 (-3.40%)
   alu in affected programs: 1882190 -> 1801870 (-4.27%)

   total fscib in shared programs: 2359848 -> 2279314 (-3.41%)
   fscib in affected programs: 1891013 -> 1810479 (-4.26%)

   total ic in shared programs: 661722 -> 661702 (<.01%)
   ic in affected programs: 1304 -> 1284 (-1.53%)

   total gprs in shared programs: 899341 -> 900319 (0.11%)
   gprs in affected programs: 48696 -> 49674 (2.01%)

   total uniforms in shared programs: 2069880 -> 2064570 (-0.26%)
   uniforms in affected programs: 426411 -> 421101 (-1.25%)

   total threads in shared programs: 27802432 -> 27802624 (<.01%)
   threads in affected programs: 5568 -> 5760 (3.45%)

   total preamble in shared programs: 1202295 -> 1222360 (1.67%)
   preamble in affected programs: 452890 -> 472955 (4.43%)

VK:

   Totals:
   MaxWaves: 53077184 -> 53075712 (-0.00%); split: +0.05%, -0.05%
   Instrs: 23845634 -> 23561020 (-1.19%); split: -1.22%, +0.02%
   CodeSize: 170339242 -> 168601666 (-1.02%); split: -1.04%, +0.02%
   Spills: 65594 -> 65784 (+0.29%); split: -1.43%, +1.72%
   Fills: 43190 -> 43178 (-0.03%); split: -2.21%, +2.18%
   Scratch: 404208 -> 403474 (-0.18%); split: -0.27%, +0.08%
   ALU: 18566800 -> 18288141 (-1.50%); split: -1.52%, +0.02%
   FSCIB: 18511881 -> 18230860 (-1.52%); split: -1.54%, +0.02%
   IC: 5260462 -> 5259748 (-0.01%); split: -0.02%, +0.00%
   GPRs: 3831837 -> 3838887 (+0.18%); split: -0.25%, +0.43%
   Uniforms: 10453510 -> 10443173 (-0.10%); split: -0.29%, +0.19%
   Preamble instrs: 10409287 -> 10496713 (+0.84%); split: -0.10%, +0.94%

   Totals from 32343 (59.87% of 54019) affected shaders:
   MaxWaves: 31027072 -> 31025600 (-0.00%); split: +0.08%, -0.08%
   Instrs: 19806186 -> 19521572 (-1.44%); split: -1.46%, +0.03%
   CodeSize: 141121024 -> 139383448 (-1.23%); split: -1.25%, +0.02%
   Spills: 65252 -> 65442 (+0.29%); split: -1.44%, +1.73%
   Fills: 42745 -> 42733 (-0.03%); split: -2.23%, +2.20%
   Scratch: 403096 -> 402362 (-0.18%); split: -0.27%, +0.08%
   ALU: 15544339 -> 15265680 (-1.79%); split: -1.82%, +0.03%
   FSCIB: 15491754 -> 15210733 (-1.81%); split: -1.84%, +0.03%
   IC: 4817376 -> 4816662 (-0.01%); split: -0.02%, +0.01%
   GPRs: 2735551 -> 2742601 (+0.26%); split: -0.35%, +0.61%
   Uniforms: 7717506 -> 7707169 (-0.13%); split: -0.39%, +0.25%
   Preamble instrs: 7713698 -> 7801124 (+1.13%); split: -0.14%, +1.27%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36147>
2025-07-22 23:17:01 +00:00
Alyssa Rosenzweig
7a786a9c7a agx: run more opt passes
preparing for reassoc

GL mostly noise, Vulkan:

Totals from 32853 (60.82% of 54019) affected shaders:
MaxWaves: 31747776 -> 31758272 (+0.03%); split: +0.04%, -0.01%
Instrs: 18017616 -> 18016663 (-0.01%); split: -0.11%, +0.11%
CodeSize: 128159164 -> 128249442 (+0.07%); split: -0.13%, +0.20%
Spills: 63634 -> 62658 (-1.53%); split: -1.83%, +0.30%
Fills: 42547 -> 41669 (-2.06%); split: -2.51%, +0.44%
Scratch: 341914 -> 341748 (-0.05%); split: -0.09%, +0.04%
ALU: 13999432 -> 13998308 (-0.01%); split: -0.13%, +0.12%
FSCIB: 13979325 -> 13978584 (-0.01%); split: -0.13%, +0.12%
IC: 3953418 -> 3957996 (+0.12%); split: -0.03%, +0.14%
GPRs: 2621294 -> 2619432 (-0.07%); split: -0.13%, +0.06%
Uniforms: 7118591 -> 7040633 (-1.10%); split: -1.91%, +0.82%
Preamble instrs: 6800746 -> 6571058 (-3.38%); split: -3.76%, +0.39%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36147>
2025-07-22 23:17:01 +00:00
Alyssa Rosenzweig
ecc51d9b9b agx: make sure denorm flushing really happens
Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36147>
2025-07-22 23:17:01 +00:00
Alyssa Rosenzweig
e0b0f7e73c nir: add ALU reassocation pass
See the comment at the top file :-)

The ideas in this pass are based on LLVM. The implementation itself is from
scratch because have you /tried/ to read that thing?

Because LLVM and therefore prop drivers do these optimizations, this should help
narrow Mesa's performance gap with the blobs.

This probably needs some tuning for best results on other ISAs, but the stats
for AGX speak for themselves, see next commits.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36147>
2025-07-22 23:17:01 +00:00
Alyssa Rosenzweig
22b37c16c8 nir: add nir_alu_src_rewrite_scalar helper
this is a little annoying.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36147>
2025-07-22 23:17:01 +00:00
Alyssa Rosenzweig
59ffaf9222 util: make SWAP safe for MSVC
Jesse acked on irc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36147>
2025-07-22 23:17:00 +00:00
Erico Nunes
92213f647e lima: fix array limit in texture mipmap descriptor
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fix an off-by-one error in the texture mipmap descriptor code.
This fixes a segfault in applications that acutually use all
available mipmap levels.

Fixes: a3f827319f ("lima: add genxml for texture descriptor")

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36300>
2025-07-22 22:55:17 +00:00
X512
e847d9920c NVK: report VK_KHR_unified_image_layouts extenstion support
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36298>
2025-07-22 22:41:09 +00:00
Faith Ekstrand
efa9b872fb nvk: Move KHR_timeline_semaphore to the right spot in the list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36298>
2025-07-22 22:41:09 +00:00
Yiwei Zhang
2553628369 u_gralloc/mapper4: properly expose ChromaSiting types based on api level
ChromaSiting::COSITED_VERTICAL and ChromaSiting::COSITED_BOTH only exist
in api level 35 and above.

Fixes: 64d18f84b0 ("u_gralloc/mapper4: fill u_gralloc_buffer_color_info properly")
Reported-by: Alessandro Astone <ales.astone@gmail.com>
Reviewed-by: Alessandro Astone <ales.astone@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36277>
2025-07-22 22:15:11 +00:00
Danylo Piliaiev
1e6af961ec util/u_trace: Add scripts for perf analysis based on u_trace results
The intent is to provide an easy way to measure the impact of an
optimization, not by measuring the whole workload completion time
but also by measuring certain chunks of the workload like command
buffers, renderpasses, or even separate draws.

A moderate perf win in a rare case may not translate into statistically
signifacant overall result. An optimization also may hurt perf in some
cases and help in other which is also hard to judge from overall perf.

For best results pin cpu/gpu frequencies and disable gpu suspend.
Exclude all unnecessary tracepoints via TU_GPU_TRACEPOINT.

Usage:
   u_trace_gather.py gather_all \
    --loops 1 --launcher "renderdoccmd replay --loops 12" \
    --traces-list /path/to/traces.txt \
    --traces-dir /path/to/dir/with/traces/ \
    --results /path/to/results/ \
    --alias new-shiny-opt

   u_trace_compare.py compare \
    --results /path/to/results/ \
    --loops-merged true \
    --alias-a default \
    --alias-b new-shiny-opt \
    --event-start start_render_pass \
    --event-end end_render_pass \
    --filter "int(params['drawCount']) > 10"

   u_trace_compare.py details \
    --results /path/to/results/ \
    --trace-name test.rdc \
    --alias default \
    --event-start start_render_pass \
    --event-end end_render_pass

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16914>
2025-07-22 21:15:51 +00:00
Jianxun Zhang
8d98bf289d anv: Fix PAT entry in importing (xe2)
If a compressed bo is imported, we should set the corresponding
compressed PAT.

Fixes video corruption in gamescope:
gamescope --force-composition -- vkcube

Close: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13442

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36275>
2025-07-22 20:18:44 +00:00
Jianxun Zhang
c766586957 anv: No compression on host memory allocation (xe2)
The Xe kernel driver doesn't allow vm_bind on compressed bo
if it has user pointer. And we probably shouldn't enable CCS
compression on memory in any case.

This change is necessary to prevent failures once we adjust the
priority of compression PAT entries in a following commit:

Vulkan CTS:
dEQP-VK.api.buffer_marker.compute.external_host_mem.top_of_pipe.
memory_dep.buffer_copy

dEQP-VK.memory.external_memory_host.simple_allocation.
minImportedHostPointerAlignment_x3

anv_kmd_backend.c:308: xe_vm_bind_op: Assertion
`errno_ != EINVAL' failed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36275>
2025-07-22 20:18:44 +00:00
Mike Blumenkrantz
6570184201 zink: remove extra gfx prog unref during separable replacement
programs start with one reference per contained shader. the only other
places they can be referenced are:
* batch refs
* merged separable programs during compile

this unref did not match any of those cases and caused early deletion

caselist:
dEQP-GLES31.functional.atomic_counter.inc.8_counters_5_calls_10_threads
dEQP-GLES31.functional.texture.filtering.cube_array.combinations.linear_mipmap_linear_linear_mirror_repeat
dEQP-GLES31.functional.texture.specification.texsubimage3d_pbo.rgb32i_cube_array
dEQP-GLES31.functional.texture.specification.texsubimage3d_pbo.rgb8_image_height_cube_array
dEQP-GLES31.functional.texture.specification.texsubimage3d_depth.depth24_stencil8_cube_array
dEQP-GLES31.functional.sample_shading.min_sample_shading.multisample_texture_samples_2_color
dEQP-GLES31.functional.vertex_attribute_binding.usage.mixed_usage.mixed_attribs_instanced_binding

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36294>
2025-07-22 20:00:11 +00:00
Mike Blumenkrantz
f83b36f956 zink: account for generated tcs when pruning programs
this otherwise doesn't remove programs from the ctx cache before deletion

caselist:
KHR-GL46.shader_image_size.advanced-ms-tes-float
KHR-GL46.es_31_compatibility.shader_image_load_store.basic-allTargets-atomicVS
KHR-GL46.es_31_compatibility.shader_storage_buffer_object.basic-std140Layout-case4-vs

OR:
KHR-GL46.shader_atomic_counters.basic-usage-tes
KHR-GL46.es_31_compatibility.shader_storage_buffer_object.basic-stdLayout-case1-vs

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36294>
2025-07-22 20:00:11 +00:00
Boyuan Zhang
2525fe07c2 radeonsi/vcn: adjust subsample size alignment
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The total subsample size has to be equal to the aligned bitstream size.
Remove the previous subsample size alignment and make it always equal
to aligned bitstream size.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36230>
2025-07-22 18:26:27 +00:00
Aaron Ruby
13e6fa4ba8 gfxstream: Remove duplicate/unnecessary frees in destroyDevice
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36273>
2025-07-22 18:12:35 +00:00
Ian Romanick
477c0cbbf9 nir/print: Don't segfault checking has_debug_info
For example, divergence analysis can call nir_print_instr with an
instruction that doesn't have a block set. When that happens,
print_state::shader will be NULL.

I stumbled on this while testing !36147.

v2: Use nir_instr::has_debug_info instead. Suggested by Konstantin.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Fixes: ce0f30b230 ("nir: Add variable debug info to instructions")
Fixes: 3aeab4ce40 ("nir/print: Do not print debug information when gathering it")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36267>
2025-07-22 17:41:38 +00:00
David Rosca
989dad7c3c radv/ci: Add dEQP-VK.video.formats.* fails for navi10 and vega10
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36288>
2025-07-22 16:19:54 +00:00
David Rosca
ad11e826b7 radv/video: Don't allow DRM format modifier tiling on GFX < 9
Fixes: 566ea76d8e ("radv/video: Support DRM format modifier tiling")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36288>
2025-07-22 16:19:54 +00:00
Lucas Fryzek
b781ae57a5 lp: Don't allocate sampler functions if count is 0
This prevents memory being allocated with a size
of 0 as the sampler count will be 0.

Fixes: #13539
Co-authored-by: Stéphane Cerveau <scerveau@igalia.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36165>
2025-07-22 16:00:25 +00:00
Valentine Burley
a8c86cf73b zink/ci: Fix enabling VVL for RADV jobs
The validation settings file must be named
$GPU_VERSION-validation-settings.txt for deqp-runner.sh to use it.

Enable Vulkan Validation Layers for the two RADV jobs that commit 5fd0b634d4
("zink: add VVL for RADV jobs") attempted to enable, as well as the new
Cezanne job.

Also add filters for VUIDs that error due to unrecognized extensions when
the VVL version in CI is too old.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35717>
2025-07-22 15:02:29 +00:00
Valentine Burley
9e76475753 zink/ci: Only enable VVL for deqp on RADV
Don't try to enable Vulkan Validation Layers for piglit.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35717>
2025-07-22 15:02:29 +00:00
Konstantin Seurer
e5af8152eb radv/rra/gfx12: Add validation
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35166>
2025-07-22 14:40:33 +00:00
Konstantin Seurer
a61f78b8f4 radv/rra/gfx12: Handle box nodes without children
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35166>
2025-07-22 14:40:33 +00:00