platform/upstream/mesa.git
12 months agoanv: prep for gen9 astc workaround
Chia-I Wu [Wed, 18 Oct 2023 15:59:28 +0000 (08:59 -0700)]
anv: prep for gen9 astc workaround

We will reuse astc emu for gen9 astc workaround.  This commit contains
minor cleanups and has no functional change.

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

12 months agoradv: Support SDMA in si_cs_emit_write_event_eop.
Timur Kristóf [Fri, 20 Oct 2023 20:16:16 +0000 (22:16 +0200)]
radv: Support SDMA in si_cs_emit_write_event_eop.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25833>

12 months agoradv: Support SDMA in radv_cp_wait_mem.
Timur Kristóf [Fri, 20 Oct 2023 20:12:43 +0000 (22:12 +0200)]
radv: Support SDMA in radv_cp_wait_mem.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25833>

12 months agoradv: Support SDMA in radv_cs_write_data_head.
Timur Kristóf [Fri, 20 Oct 2023 20:10:50 +0000 (22:10 +0200)]
radv: Support SDMA in radv_cs_write_data_head.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25833>

12 months agonir: Add NVIDIA-specific geometry shader opcodes
Mary Guillemard [Fri, 22 Sep 2023 16:30:51 +0000 (18:30 +0200)]
nir: Add NVIDIA-specific geometry shader opcodes

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>

12 months agonir: Add NVIDIA-specific I/O intrinsics
Faith Ekstrand [Sat, 30 Sep 2023 07:16:51 +0000 (02:16 -0500)]
nir: Add NVIDIA-specific I/O intrinsics

NVIDIA hardware doesn't take a vertex index for per-vertex I/O.
Instead, it takes an offset into the primitive.  This has to be fetched
using a combination of SR_INVOCATION_INFO and the ISBERD instruction.
To keep things simple and allow for maximum CSE, we do the lowering in
NIR and patch the load/store_per_vertex_input/output intrinsic.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>

12 months agonir: Add a range to most I/O intrinsics
Faith Ekstrand [Tue, 26 Sep 2023 20:01:03 +0000 (15:01 -0500)]
nir: Add a range to most I/O intrinsics

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>

12 months agonir: Add an load_barycentric_at_offset_nv intrinsic
Faith Ekstrand [Fri, 15 Sep 2023 22:22:52 +0000 (17:22 -0500)]
nir: Add an load_barycentric_at_offset_nv intrinsic

NVIDIA hardware takes the offset as two 4.12 fixed-point values packed
into a single 32-bit value.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>

12 months agonir: Add NV-specific texture opcodes
Faith Ekstrand [Mon, 10 Apr 2023 22:23:32 +0000 (17:23 -0500)]
nir: Add NV-specific texture opcodes

These are for implementing various texture queries.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>

12 months agonir: Add a load_sysval_nv intrinsic
Faith Ekstrand [Tue, 19 Sep 2023 02:14:35 +0000 (21:14 -0500)]
nir: Add a load_sysval_nv intrinsic

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>

12 months agonir/lower_tex: Add a lower_txd_clamp option
Faith Ekstrand [Mon, 10 Apr 2023 22:23:32 +0000 (17:23 -0500)]
nir/lower_tex: Add a lower_txd_clamp option

Some of us want to lower all TXD with min_lod regardless of whether or
not it's shadow or cube or whatever.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>

12 months agonir: Add convert_alu_types to divergence analysis
Faith Ekstrand [Mon, 10 Apr 2023 22:23:30 +0000 (17:23 -0500)]
nir: Add convert_alu_types to divergence analysis

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>

12 months agonir: Add a nir_ssa_def_all_uses_are_fsat() helper
Faith Ekstrand [Fri, 28 Apr 2023 23:44:55 +0000 (18:44 -0500)]
nir: Add a nir_ssa_def_all_uses_are_fsat() helper

Extracted from nir_lower_to_source_mods, this is useful for back-ends
which don't want to rely on NIR source and destination modifiers.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25000>

12 months agoradv: enable mesh shader gs_fast_launch=2 and multi-row export
Rhys Perry [Fri, 1 Sep 2023 10:27:39 +0000 (11:27 +0100)]
radv: enable mesh shader gs_fast_launch=2 and multi-row export

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoradv: implement mesh shader multi-row export
Rhys Perry [Fri, 1 Sep 2023 16:15:49 +0000 (17:15 +0100)]
radv: implement mesh shader multi-row export

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoac/nir: implement mesh shader multi-row export
Rhys Perry [Thu, 19 Oct 2023 18:27:07 +0000 (19:27 +0100)]
ac/nir: implement mesh shader multi-row export

Unlike AMDVLK, this has separate loops for attribute stores and exports,
so that the stores from different rows can overlap.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoac/nir,radv: pass workgroup size to ac_nir_lower_ngg_ms
Rhys Perry [Thu, 19 Oct 2023 18:27:07 +0000 (19:27 +0100)]
ac/nir,radv: pass workgroup size to ac_nir_lower_ngg_ms

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoac/nir: add emit_ms_outputs helper
Rhys Perry [Fri, 1 Sep 2023 16:13:20 +0000 (17:13 +0100)]
ac/nir: add emit_ms_outputs helper

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoradv: implement mesh shader gs_fast_launch=2
Rhys Perry [Fri, 1 Sep 2023 10:25:00 +0000 (11:25 +0100)]
radv: implement mesh shader gs_fast_launch=2

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoac/nir: optimize mesh shader local_invocation_index
Rhys Perry [Thu, 7 Sep 2023 16:01:14 +0000 (17:01 +0100)]
ac/nir: optimize mesh shader local_invocation_index

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoac/nir: implement mesh shader gs_fast_launch=2
Rhys Perry [Fri, 1 Sep 2023 10:24:56 +0000 (11:24 +0100)]
ac/nir: implement mesh shader gs_fast_launch=2

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoac/nir: refactor mesh vertex/primitive export
Rhys Perry [Fri, 1 Sep 2023 10:22:42 +0000 (11:22 +0100)]
ac/nir: refactor mesh vertex/primitive export

To prepare for row export, move them into helpers with index and row
parameters.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoac/nir: remove dead code
Rhys Perry [Fri, 1 Sep 2023 10:29:57 +0000 (11:29 +0100)]
ac/nir: remove dead code

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoac/nir: add row parameter to helpers
Rhys Perry [Fri, 1 Sep 2023 10:18:38 +0000 (11:18 +0100)]
ac/nir: add row parameter to helpers

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agoaco,nir: add export_row_amd intrinsic
Rhys Perry [Fri, 1 Sep 2023 10:16:29 +0000 (11:16 +0100)]
aco,nir: add export_row_amd intrinsic

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agonir: improve ms_cross_invocation_output_access with local_invocation_id
Rhys Perry [Thu, 31 Aug 2023 19:35:25 +0000 (20:35 +0100)]
nir: improve ms_cross_invocation_output_access with local_invocation_id

Since GFX11, RADV doesn't need to lower local_invocation_id.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25040>

12 months agointel/compiler: Don't emit calls to validate() in release build
Caio Oliveira [Sun, 22 Oct 2023 21:36:03 +0000 (14:36 -0700)]
intel/compiler: Don't emit calls to validate() in release build

While the fs_visitor::validate() implementation is empty in release
build, we still emit calls to it since it is defined in a separate
compilation unit than its callers.  To fix this, just expose an inline
empty function in the header for the release mode.

Fossil run time differences in TGL laptop (difference at 95.0% confidence):

```
Rise of The Tomb Rider (Native) [n=7]
        -0.482857 +/- 0.010932
        -1.60608% +/- 0.0363621%

Cyberpunk 2077 (DXVK) [n=7]
        -0.987143 +/- 0.0904516
        -0.82996% +/- 0.076049%

Batman Arkham City (DXVK) [n=7]
        -7.74857 +/- 0.329561
        -1.46298% +/- 0.0622231%
```

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

12 months agoac/gpu_info: fix querying the maximum number of IBs per ring
Samuel Pitoiset [Tue, 24 Oct 2023 14:52:41 +0000 (16:52 +0200)]
ac/gpu_info: fix querying the maximum number of IBs per ring

The kernel uses 32-bit and Mesa was using 8-bit...

Fixes: 96345ae2ed3 ("ac/gpu_info: query the maximum number of IBs per submit from the kernel")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25867>

12 months agoanv: selectively enable FCV optimization for DG2
Rohan Garg [Mon, 23 Oct 2023 10:02:32 +0000 (12:02 +0200)]
anv: selectively enable FCV optimization for DG2

Enabling FCV on MTL breaks a number of games and benchmarks. Let's
disable it for now till we can root cause the issue.

Closes: #9987
Fixes: 26c2c9 ('anv: enable FCV for Gen12.5')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25863>

12 months agoanv: turn off non zero fast clears for CCS_E
Rohan Garg [Wed, 11 Oct 2023 10:30:58 +0000 (12:30 +0200)]
anv: turn off non zero fast clears for CCS_E

This helps fix a performance regression on games such as F1 22 and RDR2.
Turning on non zero fast clears causes additional partial resolves for
these games that degrades performance. Let's turn off non zero fast
clears till we can eliminate the partial resolves.

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

12 months agoradeonsi/vcn: disable tmz ctx buffer for VCN_2_2_0
Boyuan Zhang [Mon, 23 Oct 2023 20:22:42 +0000 (16:22 -0400)]
radeonsi/vcn: disable tmz ctx buffer for VCN_2_2_0

VCN_2_2_0 should not use tmz context buffer.

Fixes: ffbbf23e
A minor fix for above commit to use the original comparison logic "<"
instead of "<="

Cc: mesa-stable
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25856>

12 months agov3d/vc4/ci: add new fails/timeout
Juan A. Suarez Romero [Tue, 24 Oct 2023 11:54:37 +0000 (13:54 +0200)]
v3d/vc4/ci: add new fails/timeout

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

12 months agoradv: Add gang follower semaphore functions.
Timur Kristóf [Fri, 20 Oct 2023 17:55:38 +0000 (19:55 +0200)]
radv: Add gang follower semaphore functions.

These functions implement the possibility to have the
gang leader wait for its follower.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25796>

12 months agoradv: Slightly refactor gang semaphore functions.
Timur Kristóf [Fri, 20 Oct 2023 16:48:47 +0000 (18:48 +0200)]
radv: Slightly refactor gang semaphore functions.

This is in preparation for adding some new ones.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25796>

12 months agoradv: Allow gang submit use cases other than task shaders.
Timur Kristóf [Sat, 14 Oct 2023 15:17:07 +0000 (17:17 +0200)]
radv: Allow gang submit use cases other than task shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25796>

12 months agoradv: Simplify gang CS and semaphore initialization.
Timur Kristóf [Mon, 16 Oct 2023 09:42:42 +0000 (11:42 +0200)]
radv: Simplify gang CS and semaphore initialization.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25796>

12 months agoradv: fix missing predicate bit for WRITE_DATA helper
Samuel Pitoiset [Mon, 23 Oct 2023 11:32:41 +0000 (13:32 +0200)]
radv: fix missing predicate bit for WRITE_DATA helper

Fixes: 12a753f8d2c ("radv: Use new WRITE_DATA helper in more places.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25850>

12 months agoRevert "radv: fix finding shaders by PC"
Samuel Pitoiset [Mon, 23 Oct 2023 13:43:17 +0000 (15:43 +0200)]
Revert "radv: fix finding shaders by PC"

Shaders are no longer allocated contiguously in memory and the next
pointer is now the shader.

This fixes using the trap handler on GFX8.

This reverts commit 2dcd12f38be629086148dfc9ff0da90aa1fc9698.

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

12 months agoradv: Expose VK_KHR_cooperative_matrix.
Bas Nieuwenhuizen [Sat, 15 Jul 2023 23:34:29 +0000 (01:34 +0200)]
radv: Expose VK_KHR_cooperative_matrix.

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

12 months agoradv: Add cooperative matrix lowering.
Bas Nieuwenhuizen [Sat, 15 Jul 2023 23:01:55 +0000 (01:01 +0200)]
radv: Add cooperative matrix lowering.

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

12 months agoradv: Don't transparently use wave32 with cooperative matrices.
Bas Nieuwenhuizen [Sun, 23 Jul 2023 20:14:04 +0000 (22:14 +0200)]
radv: Don't transparently use wave32 with cooperative matrices.

The instruction has different regsizes for wave32 vs. wave64.

To ensure cases with cooperative matrix load/store without any
actual wmma instructions get handled correctly, also require
full subgroups if subgroup invocation/id are used. Not sure
those could be transparently changed anyway.

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

12 months agoaco: Make RA understand WMMA instructions.
Bas Nieuwenhuizen [Sat, 15 Jul 2023 17:43:08 +0000 (19:43 +0200)]
aco: Make RA understand WMMA instructions.

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

12 months agoaco: Add WMMA instructions.
Bas Nieuwenhuizen [Sat, 15 Jul 2023 17:49:49 +0000 (19:49 +0200)]
aco: Add WMMA instructions.

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

12 months agonir: Add AMD cooperative matrix intrinsics.
Bas Nieuwenhuizen [Sat, 15 Jul 2023 17:24:07 +0000 (19:24 +0200)]
nir: Add AMD cooperative matrix intrinsics.

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

12 months agoci/ci_run_n_monitor: print job duration time
Helen Koike [Tue, 3 Oct 2023 14:28:26 +0000 (11:28 -0300)]
ci/ci_run_n_monitor: print job duration time

If the job is running, it prints the elapsed time so far, if it finished
already, it prints the time it took.

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

12 months agoci/marge_queue: add pretty_dutation()
Helen Koike [Fri, 20 Oct 2023 22:29:13 +0000 (19:29 -0300)]
ci/marge_queue: add pretty_dutation()

Add pretty_duration() function that prints time in format 6m23s and use
it for marge_queue.

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

12 months agoac/gpu_info: query the maximum number of IBs per submit from the kernel
Samuel Pitoiset [Thu, 19 Oct 2023 08:11:12 +0000 (10:11 +0200)]
ac/gpu_info: query the maximum number of IBs per submit from the kernel

When the query fails (unsupported by the current kernel), we fallback
to some rough estimate.

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

12 months agoanv: cleanup includes
Rohan Garg [Tue, 17 Oct 2023 15:11:13 +0000 (17:11 +0200)]
anv: cleanup includes

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25766>

12 months agoRevert "radv: pre-init surface info"
Rhys Perry [Mon, 23 Oct 2023 09:42:19 +0000 (10:42 +0100)]
Revert "radv: pre-init surface info"

This reverts commit e15a4e6e1a773f83e621ad95689d264d04963a73.

The change wasn't thread safe.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9955
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10021
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25830>

12 months agoradv: initialize video decoder for GFX11.5
Samuel Pitoiset [Wed, 20 Sep 2023 10:54:18 +0000 (12:54 +0200)]
radv: initialize video decoder for GFX11.5

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

12 months agoradv: set ENABLE_PING_PONG_BIN_ORDER for GFX11.5
Samuel Pitoiset [Wed, 20 Sep 2023 10:50:14 +0000 (12:50 +0200)]
radv: set ENABLE_PING_PONG_BIN_ORDER for GFX11.5

Ported from RadeonSI.

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

12 months agoradeonsi: add radeonsi to GL_RENDERER string
Yogesh Mohan Marimuthu [Mon, 11 Sep 2023 10:40:22 +0000 (16:10 +0530)]
radeonsi: add radeonsi to GL_RENDERER string

adding driver name to GL_RENDERER string will help to quickly
identify the driver being used.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25148>

12 months agoradeonsi: In gfx6_init_gfx_preamble_state() use gfx_level only from sctx
Yogesh Mohan Marimuthu [Mon, 11 Sep 2023 10:06:08 +0000 (15:36 +0530)]
radeonsi: In gfx6_init_gfx_preamble_state() use gfx_level only from sctx

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25148>

12 months agoradeonsi: correct old comment in si_emit_framebuffer_state()
Yogesh Mohan Marimuthu [Mon, 11 Sep 2023 10:00:42 +0000 (15:30 +0530)]
radeonsi: correct old comment in si_emit_framebuffer_state()

si_init_cs_preamble_state() function does not exist anymore and
PA_SC_WINDOW_SCISSOR_TL is set to 0,0. Update the comments with
this information.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25148>

12 months agodocs: remove document for unused variable dfsm from AMD_DEBUG
Yogesh Mohan Marimuthu [Tue, 18 Oct 2022 18:11:25 +0000 (23:41 +0530)]
docs: remove document for unused variable dfsm from AMD_DEBUG

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25148>

12 months agoradeonsi: add more documentation for dpbb debug env variable
Yogesh Mohan Marimuthu [Tue, 18 Oct 2022 17:45:00 +0000 (23:15 +0530)]
radeonsi: add more documentation for dpbb debug env variable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25148>

12 months agozink: check for sampler view existence during zink_rebind_all_images()
Mike Blumenkrantz [Fri, 20 Oct 2023 14:20:19 +0000 (10:20 -0400)]
zink: check for sampler view existence during zink_rebind_all_images()

views with mutable formats do not get created immediately, which means
access of them must be checked first

cc: mesa-stable

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

12 months agozink: only increment image_rebind_counter on image export if binds exist
Mike Blumenkrantz [Fri, 20 Oct 2023 14:18:49 +0000 (10:18 -0400)]
zink: only increment image_rebind_counter on image export if binds exist

rebinding all images on all contexts is only relevant for images which
have bindings, otherwise it's just pointless churn

fixes #10016

cc: mesa-stable

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

12 months agoamd/radeonsi: add missing stuff for gfx11.5
Lang Yu [Sat, 21 Oct 2023 01:58:50 +0000 (09:58 +0800)]
amd/radeonsi: add missing stuff for gfx11.5

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25836>

12 months agoamd/common: add missing stuff for gfx11.5
Lang Yu [Sat, 21 Oct 2023 01:57:13 +0000 (09:57 +0800)]
amd/common: add missing stuff for gfx11.5

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25836>

12 months agoglsl: Retire dround lowering.
Eric Anholt [Wed, 18 Oct 2023 06:30:22 +0000 (08:30 +0200)]
glsl: Retire dround lowering.

We have competent lowering in NIR already available.

Drivers exposing CAP_DOUBLES but not SHADER_CAP_DROUND:
- d3d12 (NIR lowers ~0 if the underlying impl doesn't do floats)
- svga (Now sets the NIR lowering options)
- softpipe (Doesn't do GL4 so you can't use doubles anyway)
- llvmpipe (Lowers dround_even in NIR and passees the rest through
            successfully)
- zink (NIR lowers ~0 if the underlying impl doesn't do floats,
        otherwise passes things through successfully, except needed
        dround_even lowering to avoid lavapipe regression with
        native doubles)
- r600 (sets NIR rounding lowering flags, and lowers all fsign)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25777>

12 months agonir: Add nir_lower_dsign as 64-bit fsign lowering.
Eric Anholt [Wed, 18 Oct 2023 07:49:32 +0000 (09:49 +0200)]
nir: Add nir_lower_dsign as 64-bit fsign lowering.

Right now some drivers are doing dsign lowering in GLSL and haven't had to
have a NIR path due to there not being a corresponding vulkan driver.  We
want this in NIR now so that we can retire that batch of GLSL lowering
code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25777>

12 months agollvmpipe: Set nir_lower_dround_even.
Eric Anholt [Wed, 18 Oct 2023 07:47:16 +0000 (09:47 +0200)]
llvmpipe: Set nir_lower_dround_even.

Avoids a regression when disabling GLSL-level lowering of the dround class
of ops, while passing through doubles to llvm for the other rounding ops.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25777>

12 months agoglsl: Remove int64 div/mod lowering.
Eric Anholt [Wed, 18 Oct 2023 06:18:46 +0000 (08:18 +0200)]
glsl: Remove int64 div/mod lowering.

Most drivers that can expose GL4 were claiming the cap anyway (llvmpipe,
softpipe, zink, iris, nvc0, radeonsi, r600, freedreno, d3d12), and just
doing lowering in NIR if nessary.

crocus was only claiming the cap for gen8, but the backend compiler
enables NIR lowering regardless.

svga is the only other GL4 driver that didn't set it, and we can just set
the NIR lowering flag.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25777>

12 months agoanv: Switch Xe KMD vm bind to sync
José Roberto de Souza [Fri, 29 Sep 2023 21:09:19 +0000 (14:09 -0700)]
anv: Switch Xe KMD vm bind to sync

It was never actually async as it was doing a DRM_IOCTL_SYNCOBJ_WAIT
right after DRM_IOCTL_XE_VM_BIND but it was required to allow the
partial binds required by sparse.
But it is now fixed and we can switch back to sync vm bind.

In future we will switch back to async vm bind to improve performance
but this time it will be properly implemented.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25300>

12 months agointel: Sync xe_drm.h
José Roberto de Souza [Tue, 19 Sep 2023 15:52:18 +0000 (08:52 -0700)]
intel: Sync xe_drm.h

Sync xe_drm.h with commit xxxxx ("drm/xe/uapi: Fix naming of XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY").

One not so straght forward change is that sync VM binds now don't
require a syncobj anymore, the uAPI will return as soon the VM bind
operations are done.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25300>

12 months agospirv: Let spirv2nir find out the shader to use
Caio Oliveira [Thu, 28 Sep 2023 09:02:55 +0000 (02:02 -0700)]
spirv: Let spirv2nir find out the shader to use

Previous behavior was to default to "main"/fs, this wasn't nice
when the SPIR-V module had a single shader that didn't match that spec.

New behavior is to look at the available shaders:

- if there's only one, use just use it
- if multiple, narrow down using --stage and --entry as criteria
- if still multiple after narrowing down, print the list and fail

Note you can use just one --stage or --entry if that already narrows
down to a single match.  Note that in SPIR-V it is valid to have a
shader module with two shaders sharing the same entry-point name but
different stages.  Because of that in rare cases both --stage and
--entry will be needed.

This patch should remove the need of using --stage and --entry for most
of the uses of spirv2nir.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25461>

12 months agospirv: List entry-points in spirv2nir when unsure what to use
Caio Oliveira [Thu, 28 Sep 2023 17:39:52 +0000 (10:39 -0700)]
spirv: List entry-points in spirv2nir when unsure what to use

When there's ambiguity about what shader to use, list the shaders.
Conveniently print in the command line argument for, so can be copied
pasted.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25461>

12 months agospirv: Change spirv2nir to use the shorter shader name abbreviations
Caio Oliveira [Thu, 28 Sep 2023 17:20:05 +0000 (10:20 -0700)]
spirv: Change spirv2nir to use the shorter shader name abbreviations

This are the abbreviations we use elsewhere in Mesa.  For convenience we
make them case insensitive.  Old names still work for compatibility.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25461>

12 months agospirv: Expose stage enum conversion in vtn_private.h
Caio Oliveira [Thu, 28 Sep 2023 07:05:08 +0000 (00:05 -0700)]
spirv: Expose stage enum conversion in vtn_private.h

Refactor it to not fail, just return MESA_SHADER_NONE.  Caller
takes care of handling error.  Exposed so can be used by spirv2nir
program.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25461>

12 months agoradv: fix signed integer overflow
Rhys Perry [Wed, 27 Sep 2023 15:04:16 +0000 (16:04 +0100)]
radv: fix signed integer overflow

Fixes UBSan error:
src/amd/vulkan/radv_shader_info.c:78:41: runtime error: left shift of 15 by 28 places cannot be represented in type 'int'

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

12 months agoac/nir: fix out-of-bounds access in ac_nir_export_position
Rhys Perry [Wed, 27 Sep 2023 12:00:21 +0000 (13:00 +0100)]
ac/nir: fix out-of-bounds access in ac_nir_export_position

These accesses (and similar) in ac_nir_exprot_position were out-of-bounds:
if (!outputs[VARYING_SLOT_PSIZ][0])
   outputs_written &= ~VARYING_BIT_PSIZ;

I don't think this caused any real issue, but this silences ASan:
==40091==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f8ffa6b1cb8 at pc 0x7f900da99068 bp 0x7f8ffb8871d0 sp 0x7f8ffb8871c8

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

12 months agoradv: skip zero-sized memcpy
Rhys Perry [Wed, 27 Sep 2023 11:51:15 +0000 (12:51 +0100)]
radv: skip zero-sized memcpy

Fixes UBSan:
src/amd/vulkan/radv_pipeline.c:1181:4: runtime error: null pointer passed as argument 2, which is declared to never be null
src/amd/vulkan/radv_shader.c:2243:4: runtime error: null pointer passed as argument 2, which is declared to never be null

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

12 months agointel/isl: Add scores for GEN12_RC_CCS and MTL_RC_CCS
Nanley Chery [Fri, 25 Aug 2023 22:09:39 +0000 (18:09 -0400)]
intel/isl: Add scores for GEN12_RC_CCS and MTL_RC_CCS

Now that these CCS-enabled modifiers have non-zero scores, anv is
enabled to use them.

We found this to improve the performance of Borderlands 3 by 18.73%.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6701
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Tested-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>

12 months agoanv: Delete implicit CCS code
Nanley Chery [Mon, 28 Aug 2023 22:46:38 +0000 (18:46 -0400)]
anv: Delete implicit CCS code

Stop allocating CCS at the end of some BOs. Anv no longer uses that
memory range.

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

12 months agoanv: Meet CCS alignment reqs with dedicated allocs
Nanley Chery [Fri, 25 Aug 2023 20:10:29 +0000 (16:10 -0400)]
anv: Meet CCS alignment reqs with dedicated allocs

At image bind time, we require BOs to meet aux-map alignment
requirements in order to enable CCS on images. This is a heuristic
controlled by anv_bo_allows_aux_map().

To improve the chances of getting a properly aligned BO, we make use of
the dedicated allocation extension. Firstly, we report to applications a
preference for dedicated memory if an image would like to use the aux
map. Secondly, we align the VMA for dedicated allocations to meet
aux-map requirements.

To make enabling modifiers much easier on integrated gfx12, report
dedicated allocations as a requirement for modifiers which specify CCS.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>

12 months agoanv: Loosen anv_bo_allows_aux_map
Nanley Chery [Mon, 23 Oct 2023 14:32:57 +0000 (10:32 -0400)]
anv: Loosen anv_bo_allows_aux_map

Instead of requiring that a BO has the has_implicit_ccs flag set, simply
require that the BO is aligned according to aux-map requirements.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>

12 months agoanv: Place images into the aux-map when safe to do so
Nanley Chery [Fri, 25 Aug 2023 21:03:59 +0000 (17:03 -0400)]
anv: Place images into the aux-map when safe to do so

At image bind time, if an image's addresses can be placed into the
aux-map without causing conflicts with a pre-existing mapping, do so.
The code aux management code in the binding function operates on a
per-plane basis. So, use the per-plane CCS memory range from the image
rather than the CCS memory region for the entire BO.

Another way to avoid aux-map conflicts is to rely solely on having a
dedicated allocation for an image. Unfortunately, not all workloads
change their behavior when drivers report a preference for dedicated
allocations. In particular, 3DMark Wild Life Extreme does not make more
dedicated allocations and such a solution was measured to perform ~16%
worse than this solution. With this solution, I did not measure a loss
of CCS on that benchmark.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6304
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>

12 months agoanv: Refactor CCS disabling at image bind time
Nanley Chery [Fri, 25 Aug 2023 20:10:29 +0000 (16:10 -0400)]
anv: Refactor CCS disabling at image bind time

Split out the discrete and integrated implicit CCS cases. We'll do more
work in the integrated case in a future commit.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>

12 months agoanv: Wrap aux surface image binding queries
Nanley Chery [Fri, 25 Aug 2023 22:22:45 +0000 (18:22 -0400)]
anv: Wrap aux surface image binding queries

Add and use anv_image_get_aux_memory_range.

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

12 months agoanv: Allocate space for aux-map CCS in image bindings
Nanley Chery [Fri, 25 Aug 2023 19:24:27 +0000 (15:24 -0400)]
anv: Allocate space for aux-map CCS in image bindings

This makes images a bit larger by reserving space to store the
compression control surface when the device uses an aux-map.

This space is not used currently because anv still maps main surface
addresses to space at the end of the anv_bo.

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

12 months agoanv: Move scope of CCS binding determination
Nanley Chery [Fri, 25 Aug 2023 19:50:33 +0000 (15:50 -0400)]
anv: Move scope of CCS binding determination

Move the determination of the image binding for CCS to a larger scope,
so that it can be reused for other aux usages in
add_aux_surface_if_supported().

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

12 months agointel: Return a bool from intel_aux_map_add_mapping
Nanley Chery [Tue, 10 Oct 2023 19:14:28 +0000 (15:14 -0400)]
intel: Return a bool from intel_aux_map_add_mapping

Make intel_aux_map_add_mapping return false if a mapping is attempted
that would conflict with an existing one. If this function doesn't
return false, it will either fail to return or return true.

The Vulkan driver will make use of this feature to opportunistically
enable CCS if a BO's VMA range has not been already mapped.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>

12 months agoradv/rmv: Recognize LPDDR memory
Friedrich Vock [Sun, 22 Oct 2023 18:24:04 +0000 (20:24 +0200)]
radv/rmv: Recognize LPDDR memory

Fixes: 8d0e6c02 ("radv: Add RMV tracing utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25845>

12 months agoradv/rra: Recognize LPDDR memory
Friedrich Vock [Sun, 22 Oct 2023 18:21:19 +0000 (20:21 +0200)]
radv/rra: Recognize LPDDR memory

Also move away from using unnamed constants for memory types.

Fixes: aef7ea868fe ("ac/gpu_info: handle LPDDR4 and 5 in ac_memory_ops_per_clock")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25845>

12 months agodocs/ci: Add some links in the CI docs to how to track job flakes
Eric Anholt [Thu, 19 Oct 2023 08:21:04 +0000 (10:21 +0200)]
docs/ci: Add some links in the CI docs to how to track job flakes

and also figuring out how many boards are available for sharding
management.

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

12 months agodocs/ci: Drop old instructions for farm disabling
Eric Anholt [Thu, 19 Oct 2023 08:12:16 +0000 (10:12 +0200)]
docs/ci: Drop old instructions for farm disabling

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

12 months agoutil: Remove MESA_TRACE_BEGIN/END
Corentin Noël [Wed, 20 Sep 2023 15:50:20 +0000 (17:50 +0200)]
util: Remove MESA_TRACE_BEGIN/END

There are no user of these macros anymore, simplify the cpu_trace header.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>

12 months agoutil/perf: Remove the tracing categories
Corentin Noël [Wed, 20 Sep 2023 15:41:05 +0000 (17:41 +0200)]
util/perf: Remove the tracing categories

The slow category remains unused in Mesa currently, readd it once we have
a use for it.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>

12 months agoutil: Avoid the use of MESA_TRACE_BEGIN/END
Corentin Noël [Wed, 20 Sep 2023 15:25:09 +0000 (17:25 +0200)]
util: Avoid the use of MESA_TRACE_BEGIN/END

Switch the last occurrences of it to the MESA_TRACE_SCOPE macro which is
easier to use.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>

12 months agovenus: Change the only occurrence of VN_TRACE_BEGIN/END to VN_TRACE_SCOPE
Corentin Noël [Mon, 23 Oct 2023 07:59:35 +0000 (09:59 +0200)]
venus: Change the only occurrence of VN_TRACE_BEGIN/END to VN_TRACE_SCOPE

This is the only part of venus using this macro, let's replace it with the scope
one.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>

12 months agoaux/tc: Use MESA_TRACE_SCOPE instead of _BEGIN/_END
Corentin Noël [Wed, 20 Sep 2023 14:50:30 +0000 (16:50 +0200)]
aux/tc: Use MESA_TRACE_SCOPE instead of _BEGIN/_END

The MESA_TRACE_SCOPE macro is an exact replacement for this.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>

12 months agotu: Use MESA_TRACE_SCOPE instead of _BEGIN/_END
Corentin Noël [Wed, 20 Sep 2023 14:38:43 +0000 (16:38 +0200)]
tu: Use MESA_TRACE_SCOPE instead of _BEGIN/_END

The MESA_TRACE_SCOPE macro is an exact replacement for this.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>

12 months agofreedreno/drm/virtio: Use MESA_TRACE_SCOPE instead of _BEGIN/_END
Corentin Noël [Wed, 20 Sep 2023 14:36:14 +0000 (16:36 +0200)]
freedreno/drm/virtio: Use MESA_TRACE_SCOPE instead of _BEGIN/_END

The MESA_TRACE_SCOPE macro is an exact replacement for this.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>

12 months agozink: fix zink_destroy_screen for early screen creation fails
Karol Herbst [Sun, 22 Oct 2023 14:11:36 +0000 (16:11 +0200)]
zink: fix zink_destroy_screen for early screen creation fails

Fixes crashes on at least my system with multiple GPUs.

Fixes: 0c2045553fe ("zink: use screen destructor for creation fails")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25844>

12 months agoetnaviv: Skip 'empty' cmd streams
Christian Gmeiner [Mon, 23 Oct 2023 07:53:39 +0000 (09:53 +0200)]
etnaviv: Skip 'empty' cmd streams

Make use of etna_cmd_stream_mark_end_of_context_init(..) to mark the
end of context init states. If the cmd stream is untouched until
etna_cmd_stream_flush(..) gets called the drm layer will downgrade this
specific cmd stream to a noop.

This safes us from calling into the kernel with an 'empty' cmd stream.

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

12 months agoetnaviv: drm: Be able to mark end of context init
Christian Gmeiner [Mon, 23 Oct 2023 07:51:19 +0000 (09:51 +0200)]
etnaviv: drm: Be able to mark end of context init

Add etna_cmd_stream_mark_end_of_context_init(..) which stores the current
offset of the cmd stream as offset_end_of_context_init. This information
will be used to downgrade a cmd stream flush to a noop.

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

12 months agopvr: Only setup the bgobj to load if we have a load_op
Karmjit Mahil [Tue, 3 Oct 2023 13:15:43 +0000 (14:15 +0100)]
pvr: Only setup the bgobj to load if we have a load_op

We only need to setup the background object if we have a load_op,
to perform the loads/clears.

This fixes segfaults for cases where we don't have a load_op.

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

12 months agoci/b2c: change artifacts path to match baremetal and LAVA
Eric Engestrom [Thu, 19 Oct 2023 13:12:00 +0000 (15:12 +0200)]
ci/b2c: change artifacts path to match baremetal and LAVA

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

12 months agoci/ci_run_n_monitor: keep monitoring if a job is still running
Helen Koike [Fri, 20 Oct 2023 11:52:12 +0000 (08:52 -0300)]
ci/ci_run_n_monitor: keep monitoring if a job is still running

When running multiple targets, the script was returning if any of the
targets failed.
But sometimes some of the targets are still running and we want to
monitor it until it finishes, even if some of the targets failed.

So check if any targeted jobs are in pending or running before deciding
to finish.

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