platform/upstream/mesa.git
19 months agoradv/rra: Fix setting some offsets
Konstantin Seurer [Tue, 29 Nov 2022 20:40:54 +0000 (21:40 +0100)]
radv/rra: Fix setting some offsets

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

19 months agoradv/rra: Refactor rra_fill_accel_struct_header_common
Konstantin Seurer [Tue, 29 Nov 2022 20:16:58 +0000 (21:16 +0100)]
radv/rra: Refactor rra_fill_accel_struct_header_common

No need to re-do the offset calculation for every field.

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

19 months agoradv/rra: Set the metadata size correctly
Konstantin Seurer [Tue, 29 Nov 2022 18:12:40 +0000 (19:12 +0100)]
radv/rra: Set the metadata size correctly

Fixes: 5749806 ("radv: Add Radeon Raytracing Analyzer trace dumping utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20047>

19 months agoradv/rra: Remove an obsolete comment
Konstantin Seurer [Tue, 29 Nov 2022 18:03:00 +0000 (19:03 +0100)]
radv/rra: Remove an obsolete comment

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

19 months agoradv/rra: Defer destroying accel struct data
Konstantin Seurer [Mon, 28 Nov 2022 21:22:10 +0000 (22:22 +0100)]
radv/rra: Defer destroying accel struct data

This allows us to dump acceleration structures that were destroyed
before present.

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

19 months agoradv/rra: Copy accel structs directly after build
Konstantin Seurer [Mon, 28 Nov 2022 19:11:17 +0000 (20:11 +0100)]
radv/rra: Copy accel structs directly after build

This is the second step of decoupling acceleration structure dumping
from lifetimes. It also simplifies the logic a bit.

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

19 months agoradv/rra: Introduce radv_rra_accel_struct_data
Konstantin Seurer [Mon, 28 Nov 2022 18:31:17 +0000 (19:31 +0100)]
radv/rra: Introduce radv_rra_accel_struct_data

This will be useful for dumping acceleration structures that were
destroyed before submit.

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

19 months agoradv: Add hash_table_foreach to .clang-format
Konstantin Seurer [Mon, 28 Nov 2022 18:30:42 +0000 (19:30 +0100)]
radv: Add hash_table_foreach to .clang-format

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

19 months agomicrosoft/spirv_to_dxil: Properly handle load- and is_helper_invocation
Pedro J. Estébanez [Tue, 22 Nov 2022 11:45:56 +0000 (12:45 +0100)]
microsoft/spirv_to_dxil: Properly handle load- and is_helper_invocation

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

19 months agoclc: fetch clang resource dir at runtime
Karol Herbst [Tue, 22 Nov 2022 10:48:08 +0000 (11:48 +0100)]
clc: fetch clang resource dir at runtime

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19617>

19 months agoclc: generate sources only with with_microsoft_clc
Karol Herbst [Wed, 9 Nov 2022 14:12:19 +0000 (15:12 +0100)]
clc: generate sources only with with_microsoft_clc

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19617>

19 months agonir/nir_opt_offsets: Prevent offsets going above max
Danylo Piliaiev [Thu, 1 Dec 2022 13:01:57 +0000 (14:01 +0100)]
nir/nir_opt_offsets: Prevent offsets going above max

In try_fold_load_store when trying to extract const addition from
non-const offset source, we should take into account that there is
already a constant base offset, which should count towards the limit.

The issue was found in "Monster Hunter: World" running on Turnip.

Fixes: cac6f633b21799bd1ecc35471d73a0bd190ccada
("nir/opt_offsets: Use nir_ssa_scalar to chase offset additions.")

Well, the issue was present before this commit but it made a lot
of changes in surrounding code.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20099>

19 months agoci/amd: re-enable previously OOM tests
David Heidelberg [Mon, 21 Nov 2022 18:32:58 +0000 (19:32 +0100)]
ci/amd: re-enable previously OOM tests

Since we have ZRAM now, we can enable previously failing tests on OOM.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19535>

19 months agoci/kernel: enable ZRAM on all archs
David Heidelberg [Fri, 4 Nov 2022 12:16:40 +0000 (13:16 +0100)]
ci/kernel: enable ZRAM on all archs

Let's enable ZRAM with 2G. Should help prevent peak OOM scenarios.

For more info see: https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19535>

19 months agoaco: Don't use v_lshrrev_b64 for moves on GFX11.
Bas Nieuwenhuizen [Sun, 6 Nov 2022 13:02:54 +0000 (14:02 +0100)]
aco: Don't use v_lshrrev_b64 for moves on GFX11.

Looking at VOPD things, shifts are not very likely to get dual issued
but plain moves are. Looking at RDNA2 v_lshrrev_b64 are half the perf
of v_mov_b32 (but you need twice as many moves), so on GFX11 this likely
reaches the threshold where moves are faster.

Totals from 68400 (50.70% of 134906) affected shaders:

CodeSize: 275489516 -> 275459536 (-0.01%); split: -0.01%, +0.00%
Instrs: 51775474 -> 51991286 (+0.42%)
Latency: 589884847 -> 589066439 (-0.14%); split: -0.15%, +0.01%
InvThroughput: 127154986 -> 126037619 (-0.88%); split: -0.88%, +0.00%
Copies: 3756157 -> 3976193 (+5.86%)
Branches: 1259604 -> 1260072 (+0.04%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19633>

19 months agoaco: Use more detailed wave64 timing for GFX10+.
Bas Nieuwenhuizen [Sun, 6 Nov 2022 23:04:38 +0000 (00:04 +0100)]
aco: Use more detailed wave64 timing for GFX10+.

Also nabbed some dual issue stuff for GFX11 from LLVM.

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

19 months agodocs: update calendar and link releases notes for 22.3.0
Eric Engestrom [Wed, 30 Nov 2022 21:29:55 +0000 (21:29 +0000)]
docs: update calendar and link releases notes for 22.3.0

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

19 months agodocs: add release notes for 22.3.0
Eric Engestrom [Fri, 2 Dec 2022 11:08:29 +0000 (11:08 +0000)]
docs: add release notes for 22.3.0

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

19 months agoRevert "ci: disable Collabora's LAVA lab for maintance"
David Heidelberg [Fri, 2 Dec 2022 11:25:12 +0000 (12:25 +0100)]
Revert "ci: disable Collabora's LAVA lab for maintance"

This reverts commit 3964a77454b616a91c78d7867d0d8cba4ffe6b63.

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

19 months agoac/nir/ngg: merge multi stream gs shader queries
Qiang Yu [Wed, 30 Nov 2022 07:22:29 +0000 (15:22 +0800)]
ac/nir/ngg: merge multi stream gs shader queries

Before this commit each stream will emit a query block, now
we merge them to a single block.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20074>

19 months agoanv: enable VK_KHR_ray_tracing_maintenance1
Lionel Landwerlin [Fri, 25 Nov 2022 11:08:28 +0000 (13:08 +0200)]
anv: enable VK_KHR_ray_tracing_maintenance1

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>

19 months agoanv: implement new queries for VK_KHR_ray_tracing_maintenance1
Lionel Landwerlin [Fri, 25 Nov 2022 15:47:31 +0000 (17:47 +0200)]
anv: implement new queries for VK_KHR_ray_tracing_maintenance1

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>

19 months agoanv: implement vkCmdTraceRaysIndirect2KHR
Lionel Landwerlin [Fri, 25 Nov 2022 11:07:54 +0000 (13:07 +0200)]
anv: implement vkCmdTraceRaysIndirect2KHR

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>

19 months agoanv: refactor ray tracing dispatch
Lionel Landwerlin [Fri, 25 Nov 2022 20:01:10 +0000 (22:01 +0200)]
anv: refactor ray tracing dispatch

Preparing for vkCmdTraceRaysIndirect2KHR

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>

19 months agointel/rt/nir: add support for RayCullMaskKHR
Lionel Landwerlin [Fri, 25 Nov 2022 18:43:42 +0000 (20:43 +0200)]
intel/rt/nir: add support for RayCullMaskKHR

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>

19 months agointel/rt/nir: enable the trampoline shader to load the indirect ray shader bsr
Lionel Landwerlin [Fri, 25 Nov 2022 13:32:27 +0000 (15:32 +0200)]
intel/rt/nir: enable the trampoline shader to load the indirect ray shader bsr

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>

19 months agoanv: correctly predicate ray tracing
Lionel Landwerlin [Fri, 25 Nov 2022 11:05:07 +0000 (13:05 +0200)]
anv: correctly predicate ray tracing

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7479fe6ae093 ("anv: Implement vkCmdTraceRays and vkCmdTraceRaysIndirect")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>

19 months agoanv/genxml: make gen_rt more like other genxml files
Lionel Landwerlin [Fri, 25 Nov 2022 10:29:09 +0000 (12:29 +0200)]
anv/genxml: make gen_rt more like other genxml files

The main goal is to be able to generate genX_bits.h for those
structures so we can get generated field offsets.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20011>

19 months agohasvk: remove coarse pixel checks
Lionel Landwerlin [Wed, 19 Oct 2022 07:20:42 +0000 (10:20 +0300)]
hasvk: remove coarse pixel checks

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Drop more DG2 code
Jason Ekstrand [Sat, 3 Sep 2022 05:13:23 +0000 (00:13 -0500)]
hasvk: Drop more DG2 code

v2: remove unused devinfo (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Rip out local memory support
Jason Ekstrand [Sat, 3 Sep 2022 05:03:48 +0000 (00:03 -0500)]
hasvk: Rip out local memory support

Things could probably be simplified further but this at least gets rid
of most of the dead code and the dead flags and fields.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Rip out scratch surfaces
Jason Ekstrand [Sat, 3 Sep 2022 05:00:51 +0000 (00:00 -0500)]
hasvk: Rip out scratch surfaces

These are a DG2+ thing

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Drop SKL+ features
Jason Ekstrand [Sat, 3 Sep 2022 04:49:47 +0000 (23:49 -0500)]
hasvk: Drop SKL+ features

Most of these have already had all the code removeed.  We just need to
remove the feature bits and queries.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Drop support for atomic_int64 and atomic_float2
Jason Ekstrand [Sat, 3 Sep 2022 04:44:52 +0000 (23:44 -0500)]
hasvk: Drop support for atomic_int64 and atomic_float2

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Drop bindless image support
Jason Ekstrand [Sat, 3 Sep 2022 04:40:48 +0000 (23:40 -0500)]
hasvk: Drop bindless image support

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Drop A64 descriptor set support
Jason Ekstrand [Sat, 3 Sep 2022 04:35:23 +0000 (23:35 -0500)]
hasvk: Drop A64 descriptor set support

It's only used by task/mesh and ray-tracing.  Also drop a couple
remaining ray query things and a task/mesh we left behind.

v2: Fix incorrect use of nir_load_desc_set_address_intel (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Drop remnants of ray queries
Jason Ekstrand [Sat, 3 Sep 2022 04:37:09 +0000 (23:37 -0500)]
hasvk: Drop remnants of ray queries

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Drop CCS_E support
Jason Ekstrand [Sat, 3 Sep 2022 04:12:00 +0000 (23:12 -0500)]
hasvk: Drop CCS_E support

Oh, for the days of Broadwell and earlier where compression was called
fast-clear.  That was a simpler time.  The birds sang in the trees, the
oceans weren't brown from oil spills, and Intel surface compression was
actually comprehendable by humans.  To help the reviewer, keep the
following in mind:

 1. CCS_E is SKL+
 2. Implicit CCS is TGL+
 3. The AUX TT (AKA aux map) is TGL+
 4. HIZ+CCS, stencil CCS, and CCS for storage images are all TGL+
 4. CCS_D surfaces only ever get full resolves and MCS surfaces only
    ever get partial resolves

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Rip out primitive replication
Jason Ekstrand [Sat, 3 Sep 2022 03:50:03 +0000 (22:50 -0500)]
hasvk: Rip out primitive replication

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk: Rip out remaining traces of CPS/FSR
Jason Ekstrand [Sat, 3 Sep 2022 03:46:56 +0000 (22:46 -0500)]
hasvk: Rip out remaining traces of CPS/FSR

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk/gpu_memcpy: Rip out SKL+
Jason Ekstrand [Sat, 3 Sep 2022 03:42:51 +0000 (22:42 -0500)]
hasvk/gpu_memcpy: Rip out SKL+

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk/state: Rip out SKL+
Jason Ekstrand [Sat, 3 Sep 2022 03:41:01 +0000 (22:41 -0500)]
hasvk/state: Rip out SKL+

v2: Fix incorrectly removed l3cr.SLMEnable setting (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk/blorp: Rip out SKL+
Jason Ekstrand [Sat, 3 Sep 2022 03:33:34 +0000 (22:33 -0500)]
hasvk/blorp: Rip out SKL+

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk/pipeline: Rip out SKL+
Jason Ekstrand [Sat, 3 Sep 2022 03:16:05 +0000 (22:16 -0500)]
hasvk/pipeline: Rip out SKL+

v2: Fix incorrect DispatchMode removal (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agohasvk/cmd_buffer: Rip out SKL+ support
Jason Ekstrand [Sat, 3 Sep 2022 03:15:48 +0000 (22:15 -0500)]
hasvk/cmd_buffer: Rip out SKL+ support

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agoisl: don't report I915_FORMAT_MOD_Y_TILED_CCS on Gfx8
Lionel Landwerlin [Fri, 18 Nov 2022 09:08:29 +0000 (11:08 +0200)]
isl: don't report I915_FORMAT_MOD_Y_TILED_CCS on Gfx8

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19852>

19 months agoci: disable Collabora's LAVA lab for maintance
Sergi Blanch Torne [Thu, 1 Dec 2022 14:23:31 +0000 (15:23 +0100)]
ci: disable Collabora's LAVA lab for maintance

This is to inform you of some planned downtime in the LAVA lab as follows:
    Start: 2022-12-02 08:00 GMT
    End: 2022-12-02 12:00 GMT

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20103>

19 months agoac/llvm,radeonsi: lower attribute ring intrinsics in nir
Qiang Yu [Tue, 1 Nov 2022 07:52:53 +0000 (15:52 +0800)]
ac/llvm,radeonsi: lower attribute ring intrinsics in nir

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoac/llvm,radeonsi: lower nir primitive counter add intrinsics
Qiang Yu [Thu, 11 Aug 2022 02:19:47 +0000 (10:19 +0800)]
ac/llvm,radeonsi: lower nir primitive counter add intrinsics

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agonir,ac/llvm: add nir_buffer_atomic_add_amd
Qiang Yu [Thu, 11 Aug 2022 02:17:16 +0000 (10:17 +0800)]
nir,ac/llvm: add nir_buffer_atomic_add_amd

Used by radeonsi for lower nir_atomic_add_gen/xfb_prim_count_amd.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoac/llvm,radeonsi: lower nir_load_streamout_buffer_amd
Qiang Yu [Wed, 10 Aug 2022 15:34:25 +0000 (23:34 +0800)]
ac/llvm,radeonsi: lower nir_load_streamout_buffer_amd

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoac/llvm,radeonsi: lower nir_load_user_clip_plane in abi
Qiang Yu [Wed, 10 Aug 2022 15:28:11 +0000 (23:28 +0800)]
ac/llvm,radeonsi: lower nir_load_user_clip_plane in abi

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoac/llvm: remove lowered abi->intrinsic_load() intrinsics
Qiang Yu [Wed, 10 Aug 2022 14:49:25 +0000 (22:49 +0800)]
ac/llvm: remove lowered abi->intrinsic_load() intrinsics

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoradeonsi: remove si_llvm_load_intrinsic intrinsics lowered
Qiang Yu [Wed, 10 Aug 2022 14:38:37 +0000 (22:38 +0800)]
radeonsi: remove si_llvm_load_intrinsic intrinsics lowered

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoradeonsi: add si_nir_lower_abi pass
Qiang Yu [Wed, 10 Aug 2022 14:26:49 +0000 (22:26 +0800)]
radeonsi: add si_nir_lower_abi pass

This pass is for lower intrinsics to driver spec nir instructions,
so that each compiler backend don't need to implement their own.
Like radv_nir_lower_abi().

Currently only lower intrinsics in si_llvm_load_intrinsic().

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoac/nir: add ac_nir_unpack_arg
Qiang Yu [Wed, 10 Aug 2022 11:18:15 +0000 (19:18 +0800)]
ac/nir: add ac_nir_unpack_arg

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agonir,ac/llvm: add nir_load_smem_buffer_amd
Qiang Yu [Wed, 10 Aug 2022 08:57:37 +0000 (16:57 +0800)]
nir,ac/llvm: add nir_load_smem_buffer_amd

Used by radeonsi to load const buffer.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoac/llvm: nir_load_smem_amd support 32bit base address
Qiang Yu [Wed, 10 Aug 2022 06:48:18 +0000 (14:48 +0800)]
ac/llvm: nir_load_smem_amd support 32bit base address

For radeonsi which use 32bit address in ac_build_load_to_sgpr().

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoradeonsi: separate shader args from llvm
Qiang Yu [Mon, 8 Aug 2022 14:21:26 +0000 (22:21 +0800)]
radeonsi: separate shader args from llvm

Move shader args out of llvm context, so that we can init
it before get nir. This is for creating a nir lower abi pass
which load args directly in nir.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoradeonsi: use native shader info when init streamout args
Qiang Yu [Fri, 5 Aug 2022 08:24:05 +0000 (16:24 +0800)]
radeonsi: use native shader info when init streamout args

We are going to init shader args earlier, there is no such
pipe_stream_output_info when that time.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18010>

19 months agoasahi: Use PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY
Alyssa Rosenzweig [Wed, 30 Nov 2022 17:51:41 +0000 (12:51 -0500)]
asahi: Use PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY

The hardware only supports aligned loads and stores. That applies to vertex
buffer loads as well. As such, we need to ensure that the base address of vertex
buffers, the stride, and the offset are all aligned to the vertex buffer format,
ensuring that the load itself is aligned. Mesa has a CAP for that,
PIPE_CAP_VERTEX_ATTRIB_ELEMENT_ALIGNED_ONLY, which ensures that these conditions
are met and will rewrite a vertex buffer on the CPU in the off chance that
they're not.

This is a bug fix compared to the old code, because it requires that offsets and
base addresses are aligned (not just the strides like before). It's also an
optimization compared to the old code, because it does not require 4 byte
alignment for 8-bit and 16-bit formats. In fact, it doesn't require any
alignment for 8-bit formats. This will avoid needless CPU work for smaller
formats.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>

19 months agoagx: Lower VBOs in NIR
Alyssa Rosenzweig [Fri, 25 Nov 2022 01:40:50 +0000 (20:40 -0500)]
agx: Lower VBOs in NIR

Now we support all the vertex formats! This means we don't hit u_vbuf for format
translation, which helps performance in lots of applications. By doing the
lowering in NIR, the vertex fetch code itself can be optimized by NIR (e.g.
nir_opt_algebraic) which can improve generated code quality.

In my first implementation of this, I had a big switch statement mapping format
enums to interchange formats and post-processing code. This ends up being really
unwieldly, the combinatorics of bit packing + conversion + swizzles is
enormous and for performance we want to support everything (no u_vbuf
fallbacks). To keep the combinatorics in check, we rely on parsing the
util_format_description to separate out the issues of bit packing, conversion,
and swizzling, allowing us to handle bizarro formats like B10G10R10A2_SNORM with
no special casing.

In an effort to support everything in one shot, this handles all the formats
needed for the extensions EXT_vertex_array_bgra, ARB_vertex_type_2_10_10_10_rev,
and ARB_vertex_type_10f_11f_11f_rev.

Passes dEQP-GLES3.functional.vertex_arrays.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>

19 months agoagx: Lower UBOs in NIR
Alyssa Rosenzweig [Fri, 25 Nov 2022 01:40:49 +0000 (20:40 -0500)]
agx: Lower UBOs in NIR

Simpler than lowering in the backend and makes the sysvals obvious in the NIR.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>

19 months agoagx: Implement 8-bit sign extensions
Alyssa Rosenzweig [Fri, 25 Nov 2022 01:40:48 +0000 (20:40 -0500)]
agx: Implement 8-bit sign extensions

Long term, I think having i2i16 and i2i32 available with 8-bit sources should
make lowering the rest of 8-bit away a bit easier. Short term, this avoids
special casing 8-bit in the VBO lowering code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>

19 months agoagx: Allow some 8-bit sources
Alyssa Rosenzweig [Fri, 25 Nov 2022 01:40:47 +0000 (20:40 -0500)]
agx: Allow some 8-bit sources

8-bit sources are useful for int8->float32 conversions, which we can do in a
single hardware instruction.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>

19 months agoagx: Implement formatted loads
Alyssa Rosenzweig [Fri, 25 Nov 2022 01:40:46 +0000 (20:40 -0500)]
agx: Implement formatted loads

These will be generated by the UBO and VBO lowerings. (and eventually by other
lowerings too?)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>

19 months agoagx: Add shift to device_load
Alyssa Rosenzweig [Fri, 25 Nov 2022 01:40:43 +0000 (20:40 -0500)]
agx: Add shift to device_load

We'll use this as an optimization soon. This acts in addition to the format's
shift.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>

19 months agoasahi: Use NIR_PASS_V for agx_nir_lower_tilebuffer
Alyssa Rosenzweig [Wed, 30 Nov 2022 17:55:35 +0000 (12:55 -0500)]
asahi: Use NIR_PASS_V for agx_nir_lower_tilebuffer

This ensures that printing shaders before and after the NIR pass still works
with the standard NIR debug options.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>

19 months agonir: Add intrinsics for lowering UBOs/VBOs on AGX
Alyssa Rosenzweig [Fri, 25 Nov 2022 01:40:42 +0000 (20:40 -0500)]
nir: Add intrinsics for lowering UBOs/VBOs on AGX

We'll use formatted loads and some system values to lower UBOs and VBOs to
global memory in NIR, using the AGX-specific format support and addressing
arithmetic to optimize the emitted code.

Add the intrinsics and teach nir_opt_preamble how to move them so we don't
regress UBO pushing.

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

19 months agointel/nir/rt: switch to workgroup_id_zero_base
Lionel Landwerlin [Thu, 1 Dec 2022 21:06:30 +0000 (23:06 +0200)]
intel/nir/rt: switch to workgroup_id_zero_base

RT don't use a base workgroup id so no reason of using workgroup_id.
Additionally the lowering introduced in b4dd3df227 requires something
provides base_workgroup_id which we don't have for RT as it's not
needed.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b4dd3df227 ("intel/nir: Set has_base_workgroup_id for lower_compute_system_values")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7812
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20115>

19 months agoradeonsi: cleanup si_llvm_build_vs_exports gfx11 code
Qiang Yu [Sun, 9 Oct 2022 02:30:24 +0000 (10:30 +0800)]
radeonsi: cleanup si_llvm_build_vs_exports gfx11 code

It's now completely handled in ac_nir_lower_ngg.c
export_vertex_params_gfx11.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoac/llvm: remove unused llvm cull
Qiang Yu [Sun, 3 Jul 2022 09:32:33 +0000 (17:32 +0800)]
ac/llvm: remove unused llvm cull

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoradeonsi: remove unused ngg llvm code
Qiang Yu [Thu, 16 Jun 2022 10:25:56 +0000 (18:25 +0800)]
radeonsi: remove unused ngg llvm code

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoradeonsi: replace llvm ngg gs with nir lowering
Qiang Yu [Sun, 12 Jun 2022 13:02:26 +0000 (21:02 +0800)]
radeonsi: replace llvm ngg gs with nir lowering

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoradeonsi: replace llvm ngg vs/tes with nir lowering
Qiang Yu [Sun, 12 Jun 2022 12:36:39 +0000 (20:36 +0800)]
radeonsi: replace llvm ngg vs/tes with nir lowering

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoradeonsi: fix NGG VS primitive ID load
Qiang Yu [Sat, 23 Jul 2022 10:30:45 +0000 (18:30 +0800)]
radeonsi: fix NGG VS primitive ID load

When NGG VS need to export primitive ID, it will load it in GS
threads, so need to use gs_prim_id arg. Current nir to llvm
translator check vs_prim_id present to use vs_prim_id first.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoradeonsi: implement two lds base load intrinsics
Qiang Yu [Fri, 22 Jul 2022 12:01:26 +0000 (20:01 +0800)]
radeonsi: implement two lds base load intrinsics

LDS will be accessed starting from esgs_ring which has offset 0.
So ngg_scratch and ngg_emit base address is just the offset from
the esgs_ring base.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoradeonsi: implement export_vertex abi
Qiang Yu [Sat, 11 Jun 2022 07:29:50 +0000 (15:29 +0800)]
radeonsi: implement export_vertex abi

Used by ngg lower.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoradeonsi: implement nir_intrinsic_load_provoking_vtx_in_prim_amd
Qiang Yu [Mon, 26 Sep 2022 06:36:55 +0000 (14:36 +0800)]
radeonsi: implement nir_intrinsic_load_provoking_vtx_in_prim_amd

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoradeonsi: use nir_lower_gs_intrinsics
Qiang Yu [Wed, 8 Jun 2022 03:09:35 +0000 (11:09 +0800)]
radeonsi: use nir_lower_gs_intrinsics

Replace some llvm code.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17109>

19 months agoci/zink: add missing spec@!opengl 1.1@masked-clear flake
David Heidelberg [Thu, 1 Dec 2022 22:16:14 +0000 (23:16 +0100)]
ci/zink: add missing spec@!opengl 1.1@masked-clear flake

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

19 months agowgl: Fix build break when LLVMPIPE and SOFTPIPE are both off
Giancarlo Devich [Thu, 1 Dec 2022 19:57:04 +0000 (11:57 -0800)]
wgl: Fix build break when LLVMPIPE and SOFTPIPE are both off

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

19 months agoci/cross: switch from the debcrossgen to the meson env2mfile
David Heidelberg [Fri, 18 Nov 2022 22:54:31 +0000 (23:54 +0100)]
ci/cross: switch from the debcrossgen to the meson env2mfile

Modern Debian recommends to use `meson env2mfile` rather than `debcrossgen`:
```
WARNING: this tool is deprecated, use "meson env2mfile" instead.
```

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7740

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

19 months agoci/arm_build: follow x86 and install newer Meson
David Heidelberg [Thu, 24 Nov 2022 22:44:47 +0000 (23:44 +0100)]
ci/arm_build: follow x86 and install newer Meson

This allows us utilize meson env2mfile.

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

19 months agoci/meson: bump to 0.63.3
David Heidelberg [Fri, 18 Nov 2022 23:10:34 +0000 (00:10 +0100)]
ci/meson: bump to 0.63.3

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19863>

19 months agoci/x86: Remove meson from apt when we later install it with pip
David Heidelberg [Fri, 18 Nov 2022 23:07:59 +0000 (00:07 +0100)]
ci/x86: Remove meson from apt when we later install it with pip

But install Ninja, which is needed.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19863>

19 months agoci: CI should handle also arrays in meson cross-file
David Heidelberg [Sat, 26 Nov 2022 20:29:38 +0000 (21:29 +0100)]
ci: CI should handle also arrays in meson cross-file

The new meson env2mfile generates everything in the arrays.

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

19 months agomeson: sort drivers alphabetically in any-of checks
Eric Engestrom [Thu, 24 Nov 2022 10:27:57 +0000 (10:27 +0000)]
meson: sort drivers alphabetically in any-of checks

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19977>

19 months agomeson: make long any-of checks easier to read and to update
Eric Engestrom [Wed, 26 Oct 2022 10:26:15 +0000 (11:26 +0100)]
meson: make long any-of checks easier to read and to update

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19977>

19 months agomeson: replace deprecated meson.get_cross_property(...) with meson.get_external_prope...
Eric Engestrom [Mon, 18 Apr 2022 16:27:15 +0000 (17:27 +0100)]
meson: replace deprecated meson.get_cross_property(...) with meson.get_external_property(...)

According to the deprecation note:
> It's a pure subset of meson.get_external_property, and works strangely
> in host == build configurations, since it would be more accurately
> described as get_host_property.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19904>

19 months agoaco: improve do_pack_2x16() with zero constants
Rhys Perry [Mon, 28 Nov 2022 19:18:32 +0000 (19:18 +0000)]
aco: improve do_pack_2x16() with zero constants

We can skip the v_or_b32 or use an instruction smaller than
v_alignbyte_b32.

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

19 months agoaco: use v_minmax/v_maxmin opcodes
Rhys Perry [Wed, 16 Nov 2022 17:42:20 +0000 (17:42 +0000)]
aco: use v_minmax/v_maxmin opcodes

fossil-db (gfx1100):
Totals from 29868 (22.12% of 135032) affected shaders:
MaxWaves: 741336 -> 741344 (+0.00%)
Instrs: 34624902 -> 34539766 (-0.25%); split: -0.25%, +0.00%
CodeSize: 187196804 -> 187192100 (-0.00%); split: -0.01%, +0.01%
VGPRs: 1816860 -> 1816788 (-0.00%); split: -0.01%, +0.01%
Latency: 502597202 -> 502245627 (-0.07%); split: -0.08%, +0.01%
InvThroughput: 84813176 -> 84586122 (-0.27%); split: -0.28%, +0.01%
VClause: 633826 -> 633749 (-0.01%); split: -0.02%, +0.01%
SClause: 1317738 -> 1317047 (-0.05%); split: -0.06%, +0.01%
Copies: 2130610 -> 2130954 (+0.02%); split: -0.03%, +0.05%
Branches: 766093 -> 765969 (-0.02%); split: -0.02%, +0.00%
PreSGPRs: 1630250 -> 1630034 (-0.01%); split: -0.02%, +0.00%
PreVGPRs: 1590777 -> 1590664 (-0.01%); split: -0.01%, +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/19933>

19 months agoaco: change order in combine_minmax()
Rhys Perry [Wed, 16 Nov 2022 18:10:38 +0000 (18:10 +0000)]
aco: change order in combine_minmax()

Prepare for future optimizations.

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

19 months agoaco/gfx11: use v_cvt_i32_i16/v_cvt_u32_u16
Rhys Perry [Wed, 16 Nov 2022 17:08:09 +0000 (17:08 +0000)]
aco/gfx11: use v_cvt_i32_i16/v_cvt_u32_u16

fossil-db (gfx1100):
Totals from 52753 (39.07% of 135032) affected shaders:
CodeSize: 153603860 -> 153163384 (-0.29%)

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

19 months agoir3: Reduce the maximum allowed imm offset for shared var load/store
Danylo Piliaiev [Thu, 1 Dec 2022 13:14:23 +0000 (14:14 +0100)]
ir3: Reduce the maximum allowed imm offset for shared var load/store

STL/LDL have 13 bits to store imm offset. However the most significant
bit in the offset is a sign bit, so the positive offset is limited by
12 bits.

nir_opt_offsets only has the upper limit and doesn't deal with
negative offsets, so shared_max should be changed to `(1 << 12) - 1`.

The issue was found in "Monster Hunter: World".

Fixes: 0b2da9d795610df15346a594384c39a096be338f
("ir3: Limit the maximum imm offset in nir_opt_offset for shared vars")

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

19 months agotu: Don't prefetch descriptors for inline uniforms
Connor Abbott [Thu, 1 Dec 2022 13:45:02 +0000 (14:45 +0100)]
tu: Don't prefetch descriptors for inline uniforms

This could result in hangs if the entire descriptor set was inline
uniforms. Fixes
dEQP-VK.binding_model.descriptorset_random.sets4.dynindexed.ubolimitlow.nosbo.nosampledimg.outimgonly.iublimitlow.nouab.comp.noia.0
after 0a0a04bd made us prefetch descriptors again and uncovered this.

Fixes: 37cde2c6 ("tu: Rewrite inline uniform implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20101>

19 months agofrontends/va: partially updating RefPicList depends on slice type
Jasber Chen [Wed, 23 Nov 2022 02:14:31 +0000 (10:14 +0800)]
frontends/va: partially updating RefPicList depends on slice type

problem casused by one frame with multiple slices and different slices type.
Invalid referenced values came from slice P/I would overwrite previous update.

Signed-off-by: Jasber Chen <yipeng.chen@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19943>

19 months agoRevert "freedreno/a6xx: Remove unneeded MSAA clear fallback"
Chia-I Wu [Wed, 30 Nov 2022 21:32:55 +0000 (13:32 -0800)]
Revert "freedreno/a6xx: Remove unneeded MSAA clear fallback"

This reverts commit ded82cf4bdd9a74eded2a9a95ab14e2c0d907c0a and fixes

$ deqp-gles31 --deqp-gl-config-name=rgba8888d24s8ms4 \
    -n dEQP-GLES31.functional.primitive_bounding_box.depth.*

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

19 months agoradv,driconf: fix static driconf by parsing 00-radv-defaults.conf
Samuel Pitoiset [Wed, 30 Nov 2022 09:12:38 +0000 (10:12 +0100)]
radv,driconf: fix static driconf by parsing 00-radv-defaults.conf

Otherwise when xmlconfig is disabled, drirc workarounds aren't applied
with RADV.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7785
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20077>

19 months agodriconf: add support for multiple input files in the static script
Samuel Pitoiset [Wed, 30 Nov 2022 09:36:40 +0000 (10:36 +0100)]
driconf: add support for multiple input files in the static script

RADV has its own drirc file and this is required to fix the static
driconf path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20077>