platform/upstream/mesa.git
12 months agobroadcom/vir: implement is_no_op_mov for v71
Alejandro Piñeiro [Wed, 8 Sep 2021 22:28:53 +0000 (00:28 +0200)]
broadcom/vir: implement is_no_op_mov for v71

Did some refactoring/splitting.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/compiler: don't favor/select accum registers for hw not supporting it
Alejandro Piñeiro [Thu, 16 Sep 2021 23:07:06 +0000 (01:07 +0200)]
broadcom/compiler: don't favor/select accum registers for hw not supporting it

Note that what we do is to just return false on the favor/select accum
methods. We could just avoid to call them, but as the select is called
more than once, it is just easier this way.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/compiler: phys index depends on hw version
Alejandro Piñeiro [Mon, 23 Aug 2021 00:18:43 +0000 (02:18 +0200)]
broadcom/compiler: phys index depends on hw version

For 7.1 there are not accumulators. So we replace the macro with a
function call.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/compiler: update node/temp translation for v71
Iago Toral Quiroga [Sat, 28 Jan 2023 23:27:11 +0000 (00:27 +0100)]
broadcom/compiler: update node/temp translation for v71

As the offset applied needs to take into account if we have
accumulators or not.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/qpu: add pack/unpack support for v71
Alejandro Piñeiro [Sat, 7 Aug 2021 00:20:39 +0000 (02:20 +0200)]
broadcom/qpu: add pack/unpack support for v71

Note that we provide new v71 alu pack/unpack methods. As there are a
lot that it is equivalent, initially we tried to use existing methods
as template and add version checks on the existing methods. At some
early point that become just really unreadable, so it become better to
just provide new methods, even if v42 and v71 methods have a really
similar structure.

Note that we have splitted the op tables, and created a two (add/mul)
for v71. As the description struct include versioning info, we could
have just used one table. But, specially with the add table, there are
a lot of differences with v71. So it is slightly tidier this
way. Also, taking into account that we do a linear search on the
tables, this can be even justified by performance.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/qpu: add qpu_writes_rf0_implicitly helper
Alejandro Piñeiro [Wed, 15 Sep 2021 08:56:43 +0000 (10:56 +0200)]
broadcom/qpu: add qpu_writes_rf0_implicitly helper

On v71 rf0 replaces r5 as the register that gets updated implicitly
with uniform loads, and gets the C coefficient with ldvary. This
helper return if rf0 gets implicitly updated.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/commmon: add has_accumulators field on v3d_device_info
Alejandro Piñeiro [Thu, 16 Sep 2021 23:04:31 +0000 (01:04 +0200)]
broadcom/commmon: add has_accumulators field on v3d_device_info

Even if we can just check for the version on the code, checking for
this field makes several places more readable. So for example, on the
register allocate code we doesn't assign an accumulator because we
don't have accumulators on that hw, instead of because hw version is a
given one.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/qpu: defining shift/mask for raddr_c/d
Alejandro Piñeiro [Thu, 12 Aug 2021 00:24:02 +0000 (02:24 +0200)]
broadcom/qpu: defining shift/mask for raddr_c/d

On V3D 7.x it replaces mul_a/b and add_a/b

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/qpu: add raddr on v3d_qpu_input
Alejandro Piñeiro [Thu, 5 Aug 2021 23:33:32 +0000 (01:33 +0200)]
broadcom/qpu: add raddr on v3d_qpu_input

On V3D 7.x mux are not used, and raddr_a/b/c/d are used instead

This is not perfect, as for v71, the raddr_a/b defined at qpu_instr
became superfluous. But the alternative would be to define two
different structs, or even having them defined based on version
ifdefs, so this is a reasonable compromise.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/qpu: define v3d_qpu_input, use on v3d_qpu_alu_instr
Alejandro Piñeiro [Thu, 5 Aug 2021 23:22:31 +0000 (01:22 +0200)]
broadcom/qpu: define v3d_qpu_input, use on v3d_qpu_alu_instr

At this point it just tidy up a little the alu_instr structure.

But also serves to prepare the structure for new changes, as 7.x uses
raddr instead of mux, and it is just easier to add the raddr to the
new input structure.

Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/qpu: add v71 signal map
Alejandro Piñeiro [Tue, 3 Aug 2021 23:11:16 +0000 (01:11 +0200)]
broadcom/qpu: add v71 signal map

Compared with v41, the differences are:
   * 14, 15, 29 and 30 are now about immediate a, b, c, d respectively
   * 23 is now reserved. On v42 this was for rotate signals, that are
     gone on v71.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/compiler: add small_imm a/c/d on v3d_qpu_sig
Alejandro Piñeiro [Wed, 4 Aug 2021 22:50:12 +0000 (00:50 +0200)]
broadcom/compiler: add small_imm a/c/d on v3d_qpu_sig

small_imm_a, small_imm_c and small_imm_d added on top of the already
existing small_imm_b, as V3D 7.1 defines 4 small immediates, tied to
the 4 raddr. Note that this is only the definition, and just a inst
validation rule to check that are not used before v71. Any real use is
still pending.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/compiler: rename small_imm to small_imm_b
Alejandro Piñeiro [Sun, 19 Sep 2021 01:20:18 +0000 (03:20 +0200)]
broadcom/compiler: rename small_imm to small_imm_b

Current small_imm is associated with the "B" read address.

We do this change in advance for v71 support, where we will have 4
different small_imm (a/b/c/d), so we start with a renaming.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/qpu: set V3D 7.x names for some waddr aliasing
Alejandro Piñeiro [Wed, 4 Aug 2021 23:00:47 +0000 (01:00 +0200)]
broadcom/qpu: set V3D 7.x names for some waddr aliasing

V3D 7.x got rid of the accumulator, but still uses the values for
WADDR_R5 and WADDR_R5REP, so let's return a proper name and add some
aliases.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/qpu: add comments on waddr not used on V3D 7.x
Alejandro Piñeiro [Wed, 4 Aug 2021 23:03:11 +0000 (01:03 +0200)]
broadcom/qpu: add comments on waddr not used on V3D 7.x

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/common: add some common v71 helpers
Alejandro Piñeiro [Wed, 17 Nov 2021 13:40:47 +0000 (14:40 +0100)]
broadcom/common: add some common v71 helpers

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/common: retrieve V3D revision number
Iago Toral Quiroga [Tue, 9 Nov 2021 07:50:51 +0000 (08:50 +0100)]
broadcom/common: retrieve V3D revision number

The subrev field from the hub ident3 register is bumped with every
hardware revision doing backwards incompatible changes so we want to
keep track of this.

Instead of modifying the 'ver' field info to acommodate subrev info,
which would require a lot of changes, simply add a new 'rev' field in
devinfo that we can use when we need to make changes based on the
revision number of a hardware release.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/cle: update the packet definitions for new generation v71
Alejandro Piñeiro [Tue, 29 Jun 2021 10:03:24 +0000 (12:03 +0200)]
broadcom/cle: update the packet definitions for new generation v71

Using as reference the spec for 7.1.5. This include totally new
packets, and redefine some that already existed on v42.

Full list:
 * Add Depth Bounds Test Limits
 * Redefine Tile Binning Mode Cfg
 * Redefine Cfg Bits. There are some changes on the fields:
   * Line Rasterization is now 1 bit size
   * Depth Bounds Enable (that takes one of the bits of Line Rasterization)
   * Early-Z/Early-Z updates enable bits (16-17) figure now as reserved.
   * New Z-Clipping mode field
 * Redefine Tile Rendering Mode Cfg (Common). Changes with respect to v42:
   * New log2 tile height/width fields starting at bit 52/55
   * Due those two news, end pad is smaller
   * sub-id has now a size of 3. Bit 4 is reserved.
   * Number of render targets: this field max value is now 7 (not
     reflected on the xml).
   * Maximum BPP is removed on v71 (now bits 40-41 are reserved)
   * Depth Buffer disable: on bit 44
 * Update Store Tile Buffer General
 * Adding Cfg Render Target Part1/2/3 packets: they replace v4X "Tile
   Rendering Mode Cfg (Color)" (real name "Rendering Configuration
   (Render Targets Config)"), "Tile Rendering Mode Cfg (Clear Colors
   Part1)", "Tile Rendering Mode Cfg (Clear Colors Part2)", and "Tile
   Rendering Mode Cfg (Clear Colors Part3)". On those old versions,
   the first packet is used to configure 4 render targets. Now that 8
   are supported, invididual per-render-target are used.
 * Update ZS clear values packet.
 * Add new v71 output formats
 * Define Clear Render Targets (Replaces Clear Tile Buffers from v42)
 * Redefine GL Shader State Record. Changes copared with v42:
   * Fields removed:
     * "Coordinate shader has separate input and output VPM blocks"
       (reserved bit now)
     * "Vertex shader has separate input and output VPM blocks"
       (reserved bit now)
     * "Address of table of default attribute Values." (we needed to
       change the start position for all the following fields)
   * New field:
     * "Never defer FEP depth writes to fragment shader auto Z writes
        on scoreboard conflict"
 * Redefine clipper xy scaling: Now it uses 1/64ths of pixels, instead
   of 1/256ths
 * Update texture shader state.
   * Notice we don't use an address type for these fields in the XML
     description. This is because the addresses are 64-bit aligned
     (even though the PRM doesn't say it) which means the 6 LSB bits
     are implicitly 0, but the fields are encoded before the 6th bit
     of their starting byte, so we can't use the usual trick we do
     with address types where the first 6 bits in the byte are
     implicitly overwritten by other fields and we have to encode this
     manually as a uint field. This would mean that if we had an
     actual BO we would also need to add it manually to the job's
     list, but since we don't have one, we don't have to do anything
     about it.
   * Add new RB_Swap field for texture shader state
   * Document Cb/Cr addresses as uint fields in texture shader state
 * Fixup Blend Config description: we now support 8 RTs.
 * TMU config parameter 2 has new fields
 * Add new clipper Z without guardband packet in v71
 * Add enums for the Z clip modes accepted in v71
 * Fix texture state array stride packing for V3D 7.1.5

Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom/simulator: reset CFG7 for compute dispatch in v71
Iago Toral Quiroga [Tue, 28 Sep 2021 11:16:49 +0000 (13:16 +0200)]
broadcom/simulator: reset CFG7 for compute dispatch in v71

This register is new in 7.x, it doesn't seem that we need to
do anything specific for now, but let's make sure it is reset
every time.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agobroadcom(cle,clif,common,simulator): add 7.1 version on the list of versions to build
Alejandro Piñeiro [Sun, 25 Apr 2021 22:02:21 +0000 (00:02 +0200)]
broadcom(cle,clif,common,simulator): add 7.1 version on the list of versions to build

This adds 7.1 to the list of available V3D_VERSION, and first changes
on the simulator needed to get it working.

Note that we needed to touch all those 4 codebases because it is
needed if we want to use V3D_DEBUG=clif with the simulator, that it is
the easier way to see which packets a vulkan program is using.

About the simulator, this commit only handle the rename of some
registers. Any additional changes needed to get a proper support for
v71 will be handled them on following commits.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

12 months agoblorp: Use the correct miptail start LOD for surfaces
Sagar Ghuge [Thu, 12 Oct 2023 17:53:07 +0000 (10:53 -0700)]
blorp: Use the correct miptail start LOD for surfaces

Use the correct miptail start LOD for the surfaces involved in the
XY_BLOCK_COPY_BLT/XY_FAST_COLOR_BLT instructions.

Thanks to Lionel for pointing out the issue.

Fixes: 46f45d62d1 ("intel/isl: Start using miptails")

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

12 months agorusticl/memory: fix potential use-after-free in clEnqueueSVMFree
LingMan [Fri, 13 Oct 2023 16:51:22 +0000 (18:51 +0200)]
rusticl/memory: fix potential use-after-free in clEnqueueSVMFree

Fixes: bfee3a8563d ("rusticl: add support for fine-grained system SVM")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25719>

12 months agodocs: update etnaviv extensions
Christian Gmeiner [Tue, 11 Jul 2023 10:42:59 +0000 (12:42 +0200)]
docs: update etnaviv extensions

Next round of feature updates.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25700>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

12 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>

13 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>