platform/upstream/mesa.git
9 months agoci_run_n_monitor: dependency jobs must always be started
Eric Engestrom [Fri, 13 Oct 2023 14:55:42 +0000 (15:55 +0100)]
ci_run_n_monitor: dependency jobs must always be started

Fixes: 6b49b477aca7ba572b06 ("ci/ci_run_n_monitor: simplify enable/cancel logic in monitor_pipeline()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25715>

9 months agozink/ci: remove expected failures that are skipped for RADV
Samuel Pitoiset [Fri, 13 Oct 2023 13:12:10 +0000 (15:12 +0200)]
zink/ci: remove expected failures that are skipped for RADV

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25711>

9 months agomeson: add wayland-protocols from meson wrapdb
Erik Faye-Lund [Thu, 12 Oct 2023 13:17:53 +0000 (15:17 +0200)]
meson: add wayland-protocols from meson wrapdb

Sometimes, users don't have a recent enough version of wayland-protocols
to build Mesa. But these days, Meson's WrapDB has a wrap that's more
than new enough for our needs.

If we add the wrap-file to the subprojects folder, we'll download a more
recent wrap if the installed version is too old (or doesn't exist at
all).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25683>

9 months agor600: drop egcm_load_index_reg
Gert Wollny [Fri, 29 Sep 2023 13:36:13 +0000 (15:36 +0200)]
r600: drop egcm_load_index_reg

This is now handled in SFN.
v2: remove obsolte comments (Vitaliy Kuzmin)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25475>

9 months agor600/sfn: don't remove texture sources by using the enum value
Gert Wollny [Fri, 29 Sep 2023 19:09:58 +0000 (21:09 +0200)]
r600/sfn: don't remove texture sources by using the enum value

We have to query the index first, otherwise we remove the wrong value.

Fixes: 02bb506c54f998cfbc907758282a5748755c67ea
    r600/sfn: Lower tex,txl,txb and txf to backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25475>

9 months agozink/ci: tighten the zink-radv-vangogh timeouts
Martin Roukala (né Peres) [Fri, 13 Oct 2023 11:27:23 +0000 (14:27 +0300)]
zink/ci: tighten the zink-radv-vangogh timeouts

The jobs should never take longer than 30 minutes, so let's enforce it!

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25704>

9 months agoradv/ci: tighten the vkcts-navi21 timeouts
Martin Roukala (né Peres) [Fri, 13 Oct 2023 11:26:37 +0000 (14:26 +0300)]
radv/ci: tighten the vkcts-navi21 timeouts

The jobs should never take longer than 30 minutes, so let's enforce it!

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25704>

9 months agoci/etnaviv: move failure to flake
Erik Faye-Lund [Fri, 13 Oct 2023 07:30:33 +0000 (09:30 +0200)]
ci/etnaviv: move failure to flake

Turns out, this passes sometimes... So let's mark it as a flake
instead.

Fixes: 7368a897528 ("ci/etnaviv: update ci expectation")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25699>

9 months agopvr: Use common physical device properties
Matt Coster [Fri, 11 Aug 2023 10:18:10 +0000 (11:18 +0100)]
pvr: Use common physical device properties

Make use of the common vulkan properties code introduced in [1].

[1]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24575

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25326>

9 months agopvr: Minor refactor of pvr_device.c
Matt Coster [Tue, 15 Aug 2023 09:45:27 +0000 (10:45 +0100)]
pvr: Minor refactor of pvr_device.c

Moving a few functions further up here to prepare for the next commit;
should make the diffs a lot nicer. No (intentional) functional changes.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25326>

9 months agopvr: Don't pass pvr_physical_device when only device info is needed
Matt Coster [Tue, 15 Aug 2023 09:42:12 +0000 (10:42 +0100)]
pvr: Don't pass pvr_physical_device when only device info is needed

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25326>

9 months agoRevert "ci/lima: farm is down, disable for now"
Erico Nunes [Fri, 13 Oct 2023 09:51:34 +0000 (11:51 +0200)]
Revert "ci/lima: farm is down, disable for now"

This reverts commit c7806daf43b47c463e0fc4b9d3896ee321cd17ae.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25702>

9 months agoisaspec : fix isaspec build error in aosp
cheyang [Fri, 13 Oct 2023 03:43:57 +0000 (11:43 +0800)]
isaspec : fix isaspec build error in aosp

in Android 12 build have error "ninja:
'external/mesa/src/compiler/isaspec/README.rst', needed by
'out/target/product/s/obj/MESON_MESA3D_GEN/.timestamp', missing and
no known rule to make it" because commit:
d48d8aefdff44e8a6ece030a782dc9d152bb1d5d  (docs: Move isaspec out of
drivers/freedreno) modify isaspec.rst Location.

Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25697>

9 months agorusticl/kernel: Fix creation from programs not built for every device
Karol Herbst [Thu, 12 Oct 2023 22:06:51 +0000 (00:06 +0200)]
rusticl/kernel: Fix creation from programs not built for every device

OpenCL does not require that a kernel is created for every device. So we
shouldn't assume there is a build for every device.

API validation around launching kernels already takes this possibility
into account.

I did not verify if the commit below is actually the culprit and whether
this bug existed before that, but a fix for older code also would have to
look differently anyway.

Fixes: 323dcbb4b52 ("rusticl: Move NirKernelBuild to ProgramDevBuild")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9968
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25696>

9 months agofreedreno/rddecompiler: Decompile repeated IBs
Danylo Piliaiev [Thu, 12 Oct 2023 09:27:44 +0000 (11:27 +0200)]
freedreno/rddecompiler: Decompile repeated IBs

Otherwise we don't reconstruct the whole cmdstream.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25677>

9 months agofreedreno/rddecompiler: Use fd_dev_gen to pass gpu_id to ir3 disasm
Danylo Piliaiev [Thu, 12 Oct 2023 09:26:00 +0000 (11:26 +0200)]
freedreno/rddecompiler: Use fd_dev_gen to pass gpu_id to ir3 disasm

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25677>

9 months agoinclude/dri_interface.h: restore define mistakenly removed in !25587
Eric Engestrom [Thu, 12 Oct 2023 19:02:36 +0000 (20:02 +0100)]
include/dri_interface.h: restore define mistakenly removed in !25587

This file is a public API used by Xserver; removing something from it
means Xserver can't build anymore, and even if we fix Xserver, old
versions are still around and we want to keep them working to allow for
bisecting issues.

Fixes: 7301914755f5843f1095 ("dri: Remove __driDriverExtensions leftovers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9976
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25692>

9 months agoRevert "intel/fs: limit register flag interaction of FIND_*LIVE_CHANNEL"
Lionel Landwerlin [Thu, 5 Oct 2023 12:18:50 +0000 (15:18 +0300)]
Revert "intel/fs: limit register flag interaction of FIND_*LIVE_CHANNEL"

This reverts commit c9739e8912286a212359f3a5a4f958c6165ce2cc.

We don't have a full understanding of what is going on but reverting
definitely fixes a hang.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c9739e8912 ("intel/fs: limit register flag interaction of FIND_*LIVE_CHANNEL")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9868
Tested-By: Valentin Geyer <trayshar@t-online.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25563>

9 months agointel: Prepare implementation of Wa_18019816803 and Wa_16013994831 for future platforms
José Roberto de Souza [Thu, 12 Oct 2023 14:20:18 +0000 (07:20 -0700)]
intel: Prepare implementation of Wa_18019816803 and Wa_16013994831 for future platforms

Those workarounds are temporary for newer platforms so we can't use
INTEL_NEEDS_WA_*, luckly those already had runtime checks.
INTEL_NEEDS_WA_* was only used because it was accessing instructions
or fields of the instructions that only exists in gfx12 or gfx125.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25685>

9 months agonir/opt_algebraic: Optimize LLVM booleans
Alyssa Rosenzweig [Thu, 5 Oct 2023 21:44:09 +0000 (17:44 -0400)]
nir/opt_algebraic: Optimize LLVM booleans

Helps OpenCL kernels.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25687>

9 months agointel/dev: Add 0x56ba-0x56bd DG2 PCI IDs
Jordan Justen [Thu, 12 Oct 2023 08:30:49 +0000 (01:30 -0700)]
intel/dev: Add 0x56ba-0x56bd DG2 PCI IDs

Cc: mesa-stable
Ref: https://lists.freedesktop.org/archives/intel-gfx/2023-October/337287.html
Ref: BSpec 44477
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25673>

9 months agoanv/batch: Assert that extend_cb is non-NULL if the batch is out of space
Jordan Justen [Wed, 11 Oct 2023 19:56:45 +0000 (12:56 -0700)]
anv/batch: Assert that extend_cb is non-NULL if the batch is out of space

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25672>

9 months agoanv/batch: Check if batch already has an error in anv_queue_submit_simple_batch()
Jordan Justen [Wed, 11 Oct 2023 19:54:27 +0000 (12:54 -0700)]
anv/batch: Check if batch already has an error in anv_queue_submit_simple_batch()

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25672>

9 months agoci/radeonsi: Drop an xfail for vangogh.
Emma Anholt [Thu, 12 Oct 2023 19:17:50 +0000 (12:17 -0700)]
ci/radeonsi: Drop an xfail for vangogh.

It's passed in the last 3 nightly runs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25693>

9 months agoci/zink: Add a TGL flake that's showed up in nightlies recently.
Emma Anholt [Thu, 12 Oct 2023 19:15:47 +0000 (12:15 -0700)]
ci/zink: Add a TGL flake that's showed up in nightlies recently.

I don't know how recently, since the nightlies were timing out for a long
time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25693>

9 months agonir/print: Decode system values in the variable declarations.
Emma Anholt [Tue, 10 Oct 2023 17:47:59 +0000 (10:47 -0700)]
nir/print: Decode system values in the variable declarations.

decl_var system INTERP_MODE_NONE none vec4 #0
decl_var system INTERP_MODE_FLAT none mediump uint #1

turns into:

decl_var system INTERP_MODE_NONE none vec4 #0 (SYSTEM_VALUE_FRAG_COORD)
decl_var system INTERP_MODE_FLAT none mediump uint #1 (SYSTEM_VALUE_SUBGROUP_INVOCATION)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25647>

9 months agozink: shrink vectors during optimization
Mike Blumenkrantz [Wed, 27 Sep 2023 14:12:03 +0000 (10:12 -0400)]
zink: shrink vectors during optimization

this avoids a number of cases where a shader was reading more components
from an input than an output was providing. functionally there was never
any issue as these read components were subsequently rewritten to use
constant data, but the read itself is a spec violation

shrinking can't be done in finalize, however, as that enables the frontend
to optimize vertex states, which seems like a good thing but ends up being
a bad thing since it may or may not be consistent across frontends and I
don't wanna deal with having to reorder i/o locations in unintuitive ways

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25433>

9 months agonir/opt_algebraic: Reduce int64
Alyssa Rosenzweig [Sun, 1 Oct 2023 13:50:41 +0000 (09:50 -0400)]
nir/opt_algebraic: Reduce int64

If we just want the bottom 32-bits we don't need a full 64-bit operation.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25625>

9 months agonir/lower_io: Use load_global_constant for OpenCL
Alyssa Rosenzweig [Tue, 5 Sep 2023 22:09:40 +0000 (18:09 -0400)]
nir/lower_io: Use load_global_constant for OpenCL

Map __constant with a 64-bit address format to load_global_constant instead of
load_global. This notably allows nir_opt_preamble to hoist the load.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25625>

9 months agonir/print: Handle KERNEL
Alyssa Rosenzweig [Tue, 5 Sep 2023 21:43:49 +0000 (17:43 -0400)]
nir/print: Handle KERNEL

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25625>

9 months agonir/legalize_16bit_sampler_srcs: Use instr_pass
Alyssa Rosenzweig [Tue, 5 Sep 2023 21:27:17 +0000 (17:27 -0400)]
nir/legalize_16bit_sampler_srcs: Use instr_pass

Fixes the pass with multiple functions.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25625>

9 months agonir/opt_phi_precision: Work with libraries
Alyssa Rosenzweig [Tue, 5 Sep 2023 21:19:50 +0000 (17:19 -0400)]
nir/opt_phi_precision: Work with libraries

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25625>

9 months agor600/sfn: Handle load_global_constant
Alyssa Rosenzweig [Thu, 12 Oct 2023 14:40:09 +0000 (10:40 -0400)]
r600/sfn: Handle load_global_constant

as an alias of load_global, for CL.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Suggested-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25625>

9 months agoci: Uprev virglrenderer
Corentin Noël [Thu, 5 Oct 2023 12:06:36 +0000 (14:06 +0200)]
ci: Uprev virglrenderer

Include the latest virglrenderer version.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25561>

9 months agoanv: fixup spirv cap for ImageReadWithoutFormat on Gfx12.5
Lionel Landwerlin [Thu, 5 Oct 2023 19:28:26 +0000 (22:28 +0300)]
anv: fixup spirv cap for ImageReadWithoutFormat on Gfx12.5

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2e2491b76c ("anv: enable shaderStorageImageReadWithoutFormat on Gfx12.5+")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25573>

9 months agoci: add a630 trace flakes
Mike Blumenkrantz [Thu, 12 Oct 2023 15:38:03 +0000 (11:38 -0400)]
ci: add a630 trace flakes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25684>

9 months agoanv: Enable transfer queue only on ACM+ platforms
Sagar Ghuge [Wed, 11 Oct 2023 20:59:21 +0000 (13:59 -0700)]
anv: Enable transfer queue only on ACM+ platforms

On older platforms, we have the blitter engine, but it lacks compression
handling and other features we need, unfortunately, so enable the
transfer queue only on ACM+ platforms.

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/25667>

9 months agoradv: skip GDS allocation for NGG streamout on GFX11
Samuel Pitoiset [Tue, 19 Sep 2023 12:33:47 +0000 (14:33 +0200)]
radv: skip GDS allocation for NGG streamout on GFX11

Only GDS OA is needed on GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25284>

9 months agoradv: mark GDS as needed for XFB queries with NGG streamout on GFX11
Samuel Pitoiset [Tue, 19 Sep 2023 12:27:01 +0000 (14:27 +0200)]
radv: mark GDS as needed for XFB queries with NGG streamout on GFX11

This doesn't fix anything because gds_needed should already be TRUE
because it's initialized at pipeline bind time, but this will be needed
for skipping GDS allocation on GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25284>

9 months agoamd/llvm,aco,radv: implement NGG streamout with GDS_STRMOUT registers on GFX11
Samuel Pitoiset [Tue, 19 Sep 2023 12:14:07 +0000 (14:14 +0200)]
amd/llvm,aco,radv: implement NGG streamout with GDS_STRMOUT registers on GFX11

According to RadeonSI, this is required for preemption, user queues,
and we only have to wait for VS after streamout which should be more
performant.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25284>

9 months agoradv: enable radv_disable_aniso_single_level=true for Zink too
Samuel Pitoiset [Tue, 10 Oct 2023 14:17:43 +0000 (16:17 +0200)]
radv: enable radv_disable_aniso_single_level=true for Zink too

This seems the default OpenGL behavior as well as DX.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25642>

9 months agopvr: Don't merge subpasses on framebuffer-global dependancy
Karmjit Mahil [Mon, 9 Oct 2023 09:25:35 +0000 (10:25 +0100)]
pvr: Don't merge subpasses on framebuffer-global dependancy

When we have a framebuffer-local dependency we cannot merge
subpasses.

dEQP tests fixed:
  dEQP-VK.renderpass.suballocation.attachment_allocation
    .input_output.{15,23,35,61,80,93}
  dEQP-VK.renderpass.suballocation.attachment_allocation
    .roll.{13,31,42,47,55,59,61,98}

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25612>

9 months agotu: Use common `vk_subpass_dependency_is_fb_local()`
Karmjit Mahil [Mon, 9 Oct 2023 09:20:21 +0000 (10:20 +0100)]
tu: Use common `vk_subpass_dependency_is_fb_local()`

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25612>

9 months agovulkan: Add `vk_subpass_dependency_is_fb_local()` helper
Karmjit Mahil [Mon, 9 Oct 2023 09:01:05 +0000 (10:01 +0100)]
vulkan: Add `vk_subpass_dependency_is_fb_local()` helper

Some tilers check for framebuffer local dependancy to determine if
they can rearrange or merge some sub-passes without breaking
their dependencies. Adding a helper for that.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25612>

9 months agoradv: disable primitive restart for non-indexed draws on GFX11
Samuel Pitoiset [Wed, 11 Oct 2023 07:56:42 +0000 (09:56 +0200)]
radv: disable primitive restart for non-indexed draws on GFX11

Primitive restart is also applied to non-indexed draws on AMD GPUs. On
GFX11, DISABLE_FOR_AUTO_INDEX can be set but we will need a different
solution for older GPUs.

This fixes all line related flakes in CI (at least).

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25639>

9 months agomesa/st: ignore StencilSampling if stencil not part of the format
Tapani Pälli [Mon, 9 Oct 2023 04:54:55 +0000 (07:54 +0300)]
mesa/st: ignore StencilSampling if stencil not part of the format

This avoids hitting assert in debug builds and incorrect rendering
on release in case GL_DEPTH_STENCIL_TEXTURE_MODE has been set to
GL_STENCIL_INDEX with a texture that does not have stencil.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25610>

9 months agovenus: enable Vulkan 1.3 for Android 13 and above
Yiwei Zhang [Wed, 11 Oct 2023 20:07:03 +0000 (20:07 +0000)]
venus: enable Vulkan 1.3 for Android 13 and above

Now that ndk translation support is ready for both Intel and AMD, we can
advertise Vulkan 1.3 on Android 13.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25666>

9 months agoci/ci_run_n_monitor: limit repetitions on --stress
Helen Koike [Sat, 30 Sep 2023 02:31:30 +0000 (23:31 -0300)]
ci/ci_run_n_monitor: limit repetitions on --stress

--stress options now receives the number of repetitions or -1 to behave
as before.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25473>

9 months agoci/ci_run_n_monitor: allow <user>/<project> in --project
Helen Koike [Sat, 30 Sep 2023 01:41:58 +0000 (22:41 -0300)]
ci/ci_run_n_monitor: allow <user>/<project> in --project

Allow to monitor pipelines in any <user>/<project> on gitlab.fdo.

If developers want to monitor MR pipelines, they can run with
--project mesa/mesa to force it to be picked from mesa username.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25473>

9 months agoci/ci_run_n_monitor: simplify enable/cancel logic in monitor_pipeline()
Helen Koike [Fri, 29 Sep 2023 23:47:00 +0000 (20:47 -0300)]
ci/ci_run_n_monitor: simplify enable/cancel logic in monitor_pipeline()

leave to enable_job() and cancel_job() to do the right thing according
to the job status.

let target canceled jobs to be re-runned.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25473>

9 months agoci/ci_run_n_monitor: merge enable_job with retry_job
Helen Koike [Fri, 29 Sep 2023 23:32:48 +0000 (20:32 -0300)]
ci/ci_run_n_monitor: merge enable_job with retry_job

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25473>

9 months agoci/ci_run_n_monitor: make --target mandatory
Helen Koike [Fri, 29 Sep 2023 21:53:19 +0000 (18:53 -0300)]
ci/ci_run_n_monitor: make --target mandatory

There is no point running without a target, just make it mandatory and
simplify the script.

Use ".*" to run all targets.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25473>

9 months agoci/ci_run_n_monitor: merge print_job_status_change with print_job_status
Helen Koike [Fri, 29 Sep 2023 21:43:24 +0000 (18:43 -0300)]
ci/ci_run_n_monitor: merge print_job_status_change with print_job_status

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25473>

9 months agoci/ci_run_n_monitor: simplify with defaultdict
Helen Koike [Fri, 29 Sep 2023 21:41:19 +0000 (18:41 -0300)]
ci/ci_run_n_monitor: simplify with defaultdict

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25473>

9 months agoci/ci_run_n_monitor: print stress test results per job
Helen Koike [Fri, 29 Sep 2023 13:17:29 +0000 (10:17 -0300)]
ci/ci_run_n_monitor: print stress test results per job

Since we can monitor multiple jobs, print the result of the stress test
per job name.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25473>

9 months agoci/traces: always export piglit EXTRA_ARGS
David Heidelberg [Wed, 11 Oct 2023 20:01:43 +0000 (22:01 +0200)]
ci/traces: always export piglit EXTRA_ARGS

When a job doesn't define them, it won't get passed to piglit otherwise.

Fixes: 5ab60581da92 ("ci/traces: keep images for every job except the performance testing")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25654>

9 months agoanv: simplify push descriptors
Lionel Landwerlin [Fri, 6 Oct 2023 21:42:11 +0000 (00:42 +0300)]
anv: simplify push descriptors

There can only be one push descriptor amongst all descriptor sets.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25598>

9 months agotu: Count a whole push consts range in constlen for PREAMBLE push consts
Danylo Piliaiev [Tue, 10 Oct 2023 12:09:52 +0000 (14:09 +0200)]
tu: Count a whole push consts range in constlen for PREAMBLE push consts

Either none push consts are loaded via preamble or all of them even if
shader uses a single push const.

Fixes misrenderings with Zink. Zink unconditionally declares push
consts, regardless of whether they are actually used in the shader.

Fixes: a5f0f7d4b162c04878fb9d505d55ebdd05c5c773
("turnip,ir3: Implement A7XX push consts load via preamble")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25638>

9 months agoradv: integrate meta astc compute decoder to radv
Yogesh Mohan Marimuthu [Thu, 7 Sep 2023 15:25:12 +0000 (20:55 +0530)]
radv: integrate meta astc compute decoder to radv

this patch calls the init and finish functions of the vk
runtime astc decoder. initializes emulate_astc flag. sets
up the additional plane to store decoded texture.

v2: fix _tex_dataformat() and _tex_numformat() (Chia-I Wu)
    use correct function for bufferToImage (Chia-I Wu)
v3: add radv_is_layout_emulated() (Chia-I Wu)
    avoid repeated pattern (Chia-I Wu)
v4: not create all pipelines on_demand (Chia-I Wu)
v5: current code does not support astc hdr (Chia-I Wu)
v6: keep luts in staging buffer only (Chia-I Wu)
v7: use 2DArray for both input and output
v8: document todo to use fp16 (Chia-I Wu)
    not required to move meta init anymore (Chia-I Wu)
    move astc_emulation_format to vk_texcompress_astc.h (Chia-I Wu)
v9: remove LAYOUT check (Chia-I Wu)
    check on iview->vk.view_format
    move setting tiled flags for astc (Chia-I Wu)
    remove is format emulated check in radv_is_storage_image* (Chia-I Wu)
    use LAYOUT_ASTC for if check (Chia-I Wu)
    no 1D support (Chia-I Wu)
    calculate start end offset in 2x blk size
v10: remove old wrong code (Chia-I Wu)
v11: use existing defined local format variable (Chia-I Wu)
     dst image layout is always VK_IMAGE_LAYOUT_GENERAL (Chia-I Wu)

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24672>

9 months agovulkan add 3D texture support for compute astc decoder
Yogesh Mohan Marimuthu [Mon, 18 Sep 2023 15:38:00 +0000 (21:08 +0530)]
vulkan add 3D texture support for compute astc decoder

v2: use correct 2D/3D for view type (Chia-I Wu)

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24672>

9 months agovulkan/runtime: add compute astc decoder helper functions
Yogesh Mohan Marimuthu [Thu, 7 Sep 2023 11:33:03 +0000 (17:03 +0530)]
vulkan/runtime: add compute astc decoder helper functions

The astc compute decode and lut creation code is copied
from https://github.com/Themaister/Granite/

Always set DECODE_8BIT idea is copied from
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19886

v2: use astc glsl shader code (Chia-I Wu)
v3: fix 32bit compilation error (Christopher Snowhill)
v4: use pitch to copy in vk_create_fill_image_visible_mem() function
    pass correct layer to decode_astc()
v5: use existing ASTCLutHolder (Chia-I Wu)
v6: use only staging buffer (Chia-I Wu)
    use texel buffer for partition table (Chia-I Wu)
v7: use 2DArray for input and output
v8: check for == mem_property (Chia-I Wu)
    do not use vk_common* functions (Chia-I Wu)
    squash single buffer patch (Chia-I Wu)
    fix for minTexelBufferOffsetAlignment (Chia-I Wu)
    avoid wasting 4 slots (Chia-I Wu)
    remove partition_tbl_mask (Chia-I Wu)
    remove wrong bindings count (Chia-I Wu)
    use binding names from glsl code (Chia-I Wu)
    use ARRAY_SIZE (Chia-I Wu)
    use VkFormat for getting partition table index (Chia-I Wu)
    fix mutex lock (Chia-I Wu)
    image layout should be based on function call (Chia-I Wu)
    VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE is wrong (Chia-I Wu)
    add vk_texcompress_astc tag to helpder functions (Chia-I Wu)
    remove write_desc_set_count (Chia-I Wu)
    use desc_i++ (Chia-I Wu)
    add assert for desc_i count at end (Chia-I Wu)
    remove unused vk_create_map_texel_buffer() function (Chia-I Wu)
    dynamically create the lut offset (Chia-I Wu)
    offset not to pass as push contant (Chia-I Wu)
v9: use correct stoage and sampled flags (Chia-I Wu)
    always pass single_buf_size (Chia-I Wu)
    query drivers for minTexelBufferOffsetAlignment (Chia-I Wu)
    remove blank lines (Chia-I Wu)
    remove unnecessary if check in destroy (Chia-I Wu)
    name label as unlock instead of fail and pass (Chia-I Wu)
    use prog_glslang.found() (Chia-I Wu)
    add offset,extent check to astc shader (Chia-I Wu)
v10: prog_glslang can be undefined in meson.build (Chia-I Wu)
v11: remove with_texcompress_astc and use required in find_program (Chia-I Wu)
v12: offset are aligned to blk size (Chia-I Wu)
v13: texel_blk_start should be under vulkan if check (Chia-I Wu)
     dst image layout is always VK_IMAGE_LAYOUT_GENERAL (Chia-I Wu)

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24672>

9 months agovulkan/formats,zink: move vk_format_from_pipe_format() function
Yogesh Mohan Marimuthu [Mon, 18 Sep 2023 05:13:24 +0000 (10:43 +0530)]
vulkan/formats,zink: move vk_format_from_pipe_format() function

rename zink_pipe_format_to_vk_format() to vk_format_from_pipe_format()
and put it in common code.

v2: reorder vk_format.h (Chia-I Wu)
    rename to vk_format_from_pipe_format (Chia-I Wu)

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24672>

9 months agoutil: move ASTCLutHolder from mesa/main to util
Yogesh Mohan Marimuthu [Sun, 17 Sep 2023 18:00:30 +0000 (23:30 +0530)]
util: move ASTCLutHolder from mesa/main to util

v2: remove extra u_formats.h header addition (Chia-I Wu)
    use stddef.h and not unistd.h (Chia-I Wu)

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24672>

9 months agomesa: make astc_decoder.glsl vk-compatible
Chia-I Wu [Sat, 1 Jul 2023 21:38:01 +0000 (14:38 -0700)]
mesa: make astc_decoder.glsl vk-compatible

glslangValidator -V -S comp astc_decoder.glsl

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24672>

9 months agoac/surface: add astc block size to bpe_to_format() function
Yogesh Mohan Marimuthu [Fri, 11 Aug 2023 08:40:10 +0000 (14:10 +0530)]
ac/surface: add astc block size to bpe_to_format() function

v2: remove old comment (Chia-I Wu)
v3: add comment on matching BC3 and ASTC4x4 (Chia-I Wu)

Acked-by: : Chia-I Wu <olvaffe@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24672>

9 months agoradeonsi/vcn: Add High Quality encoding preset for AV1
David Rosca [Tue, 3 Oct 2023 15:55:54 +0000 (17:55 +0200)]
radeonsi/vcn: Add High Quality encoding preset for AV1

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25564>

9 months agofrontends/va: Add High Quality preset mode
David Rosca [Tue, 3 Oct 2023 15:48:24 +0000 (17:48 +0200)]
frontends/va: Add High Quality preset mode

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25564>

9 months agoir3: Fix values of #wrmask not being compatible with ir3 parser
Danylo Piliaiev [Wed, 11 Oct 2023 14:33:24 +0000 (16:33 +0200)]
ir3: Fix values of #wrmask not being compatible with ir3 parser

IR3 parser expects wrmask values to be in xyzw order.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25661>

9 months agospirv: Don't use libclc for rotate
Christian Gmeiner [Wed, 11 Oct 2023 11:34:40 +0000 (13:34 +0200)]
spirv: Don't use libclc for rotate

We have a nir lowering for drivers that do not support urol.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25660>

9 months agoradv/ci: update list of flakes for STONEY
Samuel Pitoiset [Wed, 11 Oct 2023 10:56:49 +0000 (12:56 +0200)]
radv/ci: update list of flakes for STONEY

These should have been fixed couple of weeks ago.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25656>

9 months agoradv/ci: update list of flakes for VANGOGH
Samuel Pitoiset [Wed, 11 Oct 2023 10:49:47 +0000 (12:49 +0200)]
radv/ci: update list of flakes for VANGOGH

This one is already skipped in radv-skips.txt.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25656>

9 months agoradv/ci: update list of expected failures on RAVEN
Samuel Pitoiset [Wed, 11 Oct 2023 10:46:26 +0000 (12:46 +0200)]
radv/ci: update list of expected failures on RAVEN

These have been fixed a while ago but I think only a subset of CTS
is used on RAVEN.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25656>

9 months agoaco/tests: test that hazards are resolved at the end of shader parts
Rhys Perry [Fri, 22 Sep 2023 18:33:28 +0000 (19:33 +0100)]
aco/tests: test that hazards are resolved at the end of shader parts

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25374>

9 months agoaco: resolve all possible hazards at the end of shader parts
Rhys Perry [Fri, 22 Sep 2023 15:44:27 +0000 (16:44 +0100)]
aco: resolve all possible hazards at the end of shader parts

fossil-db (vega10):
Totals from 1266 (2.01% of 63055) affected shaders:
Instrs: 707116 -> 708382 (+0.18%)
CodeSize: 3512452 -> 3517516 (+0.14%)
Latency: 6661724 -> 6666788 (+0.08%)
InvThroughput: 4393626 -> 4393904 (+0.01%); split: -0.00%, +0.01%

fossil-db (navi10):
Totals from 1305 (2.07% of 63015) affected shaders:
Instrs: 719699 -> 722009 (+0.32%)
CodeSize: 3650836 -> 3660076 (+0.25%)
Latency: 5691633 -> 5693933 (+0.04%)
InvThroughput: 1532010 -> 1532024 (+0.00%); split: -0.00%, +0.00%

fossil-db (navi31):
Totals from 1580 (1.99% of 79332) affected shaders:
Instrs: 1678242 -> 1679879 (+0.10%)
CodeSize: 8463464 -> 8470168 (+0.08%)
Latency: 14273661 -> 14275298 (+0.01%)
InvThroughput: 3668049 -> 3668080 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25374>

9 months agoaco: consider exec_hi in reads_exec()
Rhys Perry [Fri, 22 Sep 2023 18:33:17 +0000 (19:33 +0100)]
aco: consider exec_hi in reads_exec()

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25374>

9 months agoaco: fix s_setreg hazards
Rhys Perry [Fri, 22 Sep 2023 15:45:06 +0000 (16:45 +0100)]
aco: fix s_setreg hazards

s_setreg doesn't have any definitions.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25374>

9 months agoaco: only mitigate VcmpxExecWARHazard when necessary
Rhys Perry [Fri, 22 Sep 2023 15:44:33 +0000 (16:44 +0100)]
aco: only mitigate VcmpxExecWARHazard when necessary

fossil-db (navi10):
Totals from 5059 (8.03% of 63015) affected shaders:
Instrs: 7384947 -> 7351196 (-0.46%)
CodeSize: 39393180 -> 39299196 (-0.24%); split: -0.28%, +0.04%
Latency: 119683018 -> 119585224 (-0.08%); split: -0.08%, +0.00%
InvThroughput: 29647188 -> 29623895 (-0.08%); split: -0.08%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25374>

9 months agoaco: fix LdsDirectVMEMHazard WaW with the wrong waitcnt
Rhys Perry [Fri, 22 Sep 2023 19:01:55 +0000 (20:01 +0100)]
aco: fix LdsDirectVMEMHazard WaW with the wrong waitcnt

Seems we missed this case.

fossil-db (navi31):
Totals from 24 (0.03% of 79332) affected shaders:
Instrs: 3562 -> 3538 (-0.67%)
CodeSize: 18740 -> 18644 (-0.51%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 2cdb3e4b6b6d ("aco: add VMEMtoScalarWriteHazard tests")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25374>

9 months agoanv: enable FCV for Gen12.5
Rohan Garg [Tue, 10 Oct 2023 14:59:17 +0000 (16:59 +0200)]
anv: enable FCV for Gen12.5

Now that we have proper handling of FCV_CCS_E everywhere, we can turn
this on for Gen12.5.

This helps fix a performance regression where enabling fast
clears to non-zero values with CCS_E caused additional partial resolves,
regressing performance on certain games. Performance is helped on the
following games:
  - F1'22: +45%
  - RDR2: +6%

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25589>

9 months agoanv: ensure that FCV_CCS_E fast clears are properly tracked
Rohan Garg [Tue, 10 Oct 2023 14:59:51 +0000 (16:59 +0200)]
anv: ensure that FCV_CCS_E fast clears are properly tracked

Surfaces with FCV_CCS_E aux usage should be marked as fast cleared when
being rendered to, to ensure proper fast clear state tracking. We also
need to ensure that we're not trying to partially resolve surfaces with
level > 0 and layer > 0 since we don't track fast clear states for
those.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25589>

9 months agointel/genxml: fix 3DSTATE_3D_MODE length to align with BSpec
Rohan Garg [Tue, 10 Oct 2023 11:15:50 +0000 (13:15 +0200)]
intel/genxml: fix 3DSTATE_3D_MODE length to align with BSpec

Closes: #8632
Fixes: 569afd37f15 ('intel/genxml: Copy gen12.xml to gen125.xml')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25589>

9 months agoanv: add support for VK_EXT_nested_command_buffer
Lionel Landwerlin [Tue, 3 Oct 2023 16:39:07 +0000 (19:39 +0300)]
anv: add support for VK_EXT_nested_command_buffer

Our implementation of secondary command buffers already jumps into
them and edits the end of the secondary command buffer to jump back
into the primary.

That implementation can work just the same with any levels of
secondary. The only possible issue would happen with a secondary
calling itself, but that's not possible.

We also cannot support simultaneous execution with self-modifying
command buffers. That's actually not a problem at the moment because
we don't have multiple queues of the same family but we choose to
reflect that in the feature bits.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25600>

9 months agoanv: rename primary in container in ExecuteCommands()
Lionel Landwerlin [Mon, 9 Oct 2023 17:22:51 +0000 (20:22 +0300)]
anv: rename primary in container in ExecuteCommands()

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25600>

9 months agovulkan: bump headers/registry to 1.3.267
Lionel Landwerlin [Tue, 3 Oct 2023 16:27:31 +0000 (19:27 +0300)]
vulkan: bump headers/registry to 1.3.267

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25600>

9 months agoRevert "ci/etnaviv: allow failure on failing test"
Lucas Stach [Wed, 11 Oct 2023 09:44:29 +0000 (11:44 +0200)]
Revert "ci/etnaviv: allow failure on failing test"

This reverts commit 2ac2268ce74c, as the issue causing the
test to fail has been resolved.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25646>

9 months agoetnaviv: fix read staging buffer leak
Lucas Stach [Tue, 10 Oct 2023 17:29:37 +0000 (19:29 +0200)]
etnaviv: fix read staging buffer leak

Currently we only free a potentially allocated staging buffer
when the mapping is a write mapping, but staging buffers can
also be allocated for read mappings. Fix the read staging
buffer leaks by always freeing the staging buffer.

Closes #9967

Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25646>

9 months agopvr: Clean up & fix sampler border color support
Matt Coster [Fri, 11 Aug 2023 13:04:59 +0000 (14:04 +0100)]
pvr: Clean up & fix sampler border color support

Take advantage of some vk_sampler goodness and migrate all pvr
tex_formats to map to pipe_formats in pvr_formats.c. This allows us to
get rid of all the nasty manual packing functions.

This cleanup incidentally fixes some bad swizzling that was happening
in the manual handling.

Fixes: 4a2e6284 pvr: Add support for sampler border colors
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25270>

9 months agopvr: Use vk_sampler base
Matt Coster [Fri, 11 Aug 2023 11:07:12 +0000 (12:07 +0100)]
pvr: Use vk_sampler base

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25270>

9 months agopvr: Switch to common pipeline cache implementation
Matt Coster [Tue, 26 Sep 2023 12:48:40 +0000 (13:48 +0100)]
pvr: Switch to common pipeline cache implementation

We don't currently make use of pipeline caching, but the common
implementation handles the boilerplate we had in pvr_pipeline_cache.c
for us.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25422>

9 months agotu: Disable preamble push consts when they are not used
Danylo Piliaiev [Tue, 10 Oct 2023 12:55:26 +0000 (14:55 +0200)]
tu: Disable preamble push consts when they are not used

It's a common case for Zink which has to declare push consts in
pipeline layout, even if they are not actually used in shaders, due
to the compatibility rules.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25641>

9 months agopvr: Fix PPP_SCREEN sizes
Karmjit Mahil [Wed, 4 Oct 2023 14:53:36 +0000 (15:53 +0100)]
pvr: Fix PPP_SCREEN sizes

The `- 1` was accidentally removed.

Fixes: aae23fe68d16 ("pvr: HWRT creation simplifications.")
Reported-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>

9 months agopvr: Fix SPM load shader sample rate
Karmjit Mahil [Tue, 3 Oct 2023 14:28:28 +0000 (15:28 +0100)]
pvr: Fix SPM load shader sample rate

Reported-by: James Glanville <james.glanville@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>

9 months agopvr: Refactor subpass ds and sample count setup
Karmjit Mahil [Sun, 24 Sep 2023 13:14:15 +0000 (14:14 +0100)]
pvr: Refactor subpass ds and sample count setup

Now we first check the sample count from the ds attachment as well
as setting it up.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>

9 months agopvr: Fix subpass sample count on ds attachment only
Karmjit Mahil [Sun, 24 Sep 2023 12:54:49 +0000 (13:54 +0100)]
pvr: Fix subpass sample count on ds attachment only

When no color attachments were used in a subpass, the sample count
was left unchanged to `1` while we should instead have picked it
up from the ds attachment if there was one.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>

9 months agopvr: Order tile buffer EOT emits to be last
Karmjit Mahil [Mon, 2 Oct 2023 15:26:58 +0000 (16:26 +0100)]
pvr: Order tile buffer EOT emits to be last

Tile buffer emits required a load from the tile buffer into the
output regs, so they must be placed at the end of the EOT program
as to not corrupt the output register emits.

This commit orders the emit state to place output register emits
first, and tile buffer emits last.

dEQP test fixed:
  dEQP-VK.renderpass.suballocation.attachment.4.422
  ... and others from the dEQP-VK.renderpass.suballocation.*

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>

9 months agopvr: Fix OOB access of pbe_{cs,reg}_words
Karmjit Mahil [Wed, 27 Sep 2023 18:17:20 +0000 (19:17 +0100)]
pvr: Fix OOB access of pbe_{cs,reg}_words

`hw_render->eot_surface_count` also includes surface which don't
need an emit. Using `i` was leading to OOB access when there were
surfaces that didn't need emits, and in total there were
`> PVR_MAX_COLOR_ATTACHMENTS` surfaces.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>

9 months agopvr: Fix pbe_emit assert
Karmjit Mahil [Wed, 27 Sep 2023 18:30:25 +0000 (19:30 +0100)]
pvr: Fix pbe_emit assert

The `eot_surface_count` also includes surfaces which don't need an
emit. Surfaces with PVR_RESOLVE_TYPE_TRANSFER don't need an emit
since they'll be resolved through a transfer op, but they still count
against the total, thus the assert was incorrect.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>

9 months agopvr: Fix MRT index in PBE state
Karmjit Mahil [Sat, 23 Sep 2023 15:46:30 +0000 (16:46 +0100)]
pvr: Fix MRT index in PBE state

The same MRT index was incorrectly being set for all render
targets, in the PBE state.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>

9 months agonvk: Improve address space and buffer size limits
Faith Ekstrand [Wed, 11 Oct 2023 07:55:11 +0000 (02:55 -0500)]
nvk: Improve address space and buffer size limits

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>

9 months agonvk: Always emit at least one color attachment
Faith Ekstrand [Wed, 11 Oct 2023 02:34:59 +0000 (21:34 -0500)]
nvk: Always emit at least one color attachment

Without this, alpha to coverage doesn't work because the hardware
ignores the output of the first color from the shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>