platform/upstream/mesa.git
10 months agoac,radv,radeonsi: prepare support for multi-instance SPM SQ counters
Samuel Pitoiset [Thu, 14 Sep 2023 14:02:14 +0000 (16:02 +0200)]
ac,radv,radeonsi: prepare support for multi-instance SPM SQ counters

Each SQG modules can configure up to 16 counters.

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

10 months agoac/spm: fix number of instances of GL2C
Samuel Pitoiset [Thu, 14 Sep 2023 15:19:37 +0000 (17:19 +0200)]
ac/spm: fix number of instances of GL2C

It's a global block, so the number of instances is equal.

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

10 months agoradv,radeonsi: make sure to emit GRBM_GFX_INDEX before SQ select registers
Samuel Pitoiset [Thu, 14 Sep 2023 13:49:05 +0000 (15:49 +0200)]
radv,radeonsi: make sure to emit GRBM_GFX_INDEX before SQ select registers

This was missing, but not sure if it was required given that only the
first SE is currently sampled.

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

10 months agoac/spm: select correct segment type for per-SE blocks
Samuel Pitoiset [Thu, 14 Sep 2023 11:43:53 +0000 (13:43 +0200)]
ac/spm: select correct segment type for per-SE blocks

This currently does nothing because only the first instance is used,
but this will be needed for multi-instance.

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

10 months agoac/spm: use block flags to initialize instance mapping
Samuel Pitoiset [Thu, 14 Sep 2023 11:42:25 +0000 (13:42 +0200)]
ac/spm: use block flags to initialize instance mapping

This simplify this a bit, ideally we would also have a per-SA flag
for performance counters.

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

10 months agoradv: reserve more CS space in SQTT/SPM paths
Samuel Pitoiset [Thu, 14 Sep 2023 17:00:05 +0000 (19:00 +0200)]
radv: reserve more CS space in SQTT/SPM paths

This will prevent an assertion when SPM will emit more counters.

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

10 months agocompiler/types: Use a string table for builtin type names
Caio Oliveira [Tue, 12 Sep 2023 20:43:09 +0000 (13:43 -0700)]
compiler/types: Use a string table for builtin type names

This avoids the relocations for each of the builtin type names, allowing
all the builtin data to be loaded in read-only memory.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25191>

10 months agocompiler/types: Change glsl_type::name to be an uintptr_t
Caio Oliveira [Tue, 12 Sep 2023 19:12:33 +0000 (12:12 -0700)]
compiler/types: Change glsl_type::name to be an uintptr_t

This will allow us later to store builtin names in a different way.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25191>

10 months agocompiler/types: Use glsl_get_type_name() to access the type name
Caio Oliveira [Tue, 12 Sep 2023 19:11:18 +0000 (12:11 -0700)]
compiler/types: Use glsl_get_type_name() to access the type name

This will allow us later to store builtin names in a different way.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25191>

10 months agocompiler/types: Use Python to generate code for builtin types
Caio Oliveira [Tue, 12 Sep 2023 17:33:42 +0000 (10:33 -0700)]
compiler/types: Use Python to generate code for builtin types

Will be useful later to generate string tables for the builtin types.

Note we make some extra effort to ensure C++ client code doesn't need to change,
by keeping glsl_type::*_type pointers around.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (Python and Meson changes)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25191>

10 months agor600/sfn: get rid of the method to get the index mode
Gert Wollny [Fri, 15 Sep 2023 19:13:50 +0000 (21:13 +0200)]
r600/sfn: get rid of the method to get the index mode

Since we always split the index load we can query the value directly
without checking whether it was lowered.

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

10 months agor600/sfn: Sepeate resource and sampler in texture instructions
Gert Wollny [Fri, 15 Sep 2023 19:12:30 +0000 (21:12 +0200)]
r600/sfn: Sepeate resource and sampler in texture instructions

Fix the use of resource and sampler and keep separate index registers
for both so that indirect resource and sampler access can be done
independently.

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

10 months agor600/sfn: Add old address to update_indirect_addr
Gert Wollny [Fri, 15 Sep 2023 19:02:10 +0000 (21:02 +0200)]
r600/sfn: Add old address to update_indirect_addr

v2: use UNUSED instead of adding (void)var; (Vitaly Kuzmin)

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

10 months agor600/sfn: rename method resource_base to resource_id
Gert Wollny [Fri, 15 Sep 2023 18:45:58 +0000 (20:45 +0200)]
r600/sfn: rename method resource_base to resource_id

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

10 months agor600/sfn: Make address split pass obligatory
Gert Wollny [Fri, 15 Sep 2023 18:41:56 +0000 (20:41 +0200)]
r600/sfn: Make address split pass obligatory

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

10 months agor600: print texture resource index mode separately
Gert Wollny [Mon, 11 Sep 2023 14:25:58 +0000 (16:25 +0200)]
r600: print texture resource index mode separately

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

10 months agointel/common: Add sse2_args for 32-bit build when -Dsse2=false was set
Jordan Justen [Fri, 15 Sep 2023 17:00:51 +0000 (10:00 -0700)]
intel/common: Add sse2_args for 32-bit build when -Dsse2=false was set

Fixes: 543a707b7b8 ("intel/common: Move intel_clflush.h to intel_mem.h/intel_mem.c")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9762
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25249>

10 months agovulkan/android: improve vkQueueSignalReleaseImageANDROID
Yiwei Zhang [Sun, 10 Sep 2023 00:10:44 +0000 (17:10 -0700)]
vulkan/android: improve vkQueueSignalReleaseImageANDROID

There're two issues with the current implementation:
1. Wait semaphores are implicitly required to be SYNC_FD exportable
2. As a queue command that can further record cmds against the wsi
   image, it currently doesn't account for pending cmds in the queue
   beyond the wait semaphores.

This change fixes both by doing a queue submission in the call with a
SYNC_FD external signal semaphore. However, due to Android wsi not
exposing swapchain to icd, we have to cache the signal semaphore in the
queue, otherwise would have to create/destroy in each present.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25185>

10 months agovulkan: remove a dup entry from vk_image_usage_to_ahb_usage
Yiwei Zhang [Sat, 26 Aug 2023 19:54:47 +0000 (12:54 -0700)]
vulkan: remove a dup entry from vk_image_usage_to_ahb_usage

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25185>

10 months agoAndroid.mk: Only link LLVM for radeonsi, not amd_vk
Samuel Holland [Tue, 20 Jun 2023 19:32:07 +0000 (12:32 -0700)]
Android.mk: Only link LLVM for radeonsi, not amd_vk

When building for Android, avoid the LLVM dependency if possible.

Cc: mesa-stable
Acked-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: Idda03f954b4b5326e23a848e541411b60fcef063
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24007>

10 months agoAndroid.mk: Explicitly enable/disable LLVM support
Samuel Holland [Tue, 20 Jun 2023 19:27:12 +0000 (12:27 -0700)]
Android.mk: Explicitly enable/disable LLVM support

The AMD Vulkan driver uses LLVM by default, but it is possible to build
the driver without the LLVM dependency. In this case, we must explicitly
disable LLVM support, or else meson will die after failing to find LLVM.

The Android build system already knows when to link libLLVM, so forward
that information to meson.

Cc: mesa-stable
Acked-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I7489d3811625b390aaaf2e84e666b4a8d98328b0
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24007>

10 months agoAndroid.mk: Allow building only Vulkan drivers
Samuel Holland [Tue, 20 Jun 2023 19:24:33 +0000 (12:24 -0700)]
Android.mk: Allow building only Vulkan drivers

Android bundles ANGLE for implementing OpenGL ES and EGL on top of
Vulkan. When using ANGLE, mesa is only needed for its Vulkan drivers.

Cc: mesa-stable
Acked-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I034a0af52f9216bc5f1322f584bc591c90222327
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24007>

10 months agomeson: use a single dependency call for lua
Dylan Baker [Fri, 15 Sep 2023 17:24:43 +0000 (10:24 -0700)]
meson: use a single dependency call for lua

This is a newer Meson construct that allows passing multiple names for
the same dependency to one call. One advantage of this is that if the
first call (lua54) fails, it won't immediately fall back to a subproject
and will try the others before falling back.

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

10 months agoci/zink: drop redundant `MESA_LOADER_DRIVER_OVERRIDE: zink`
Eric Engestrom [Fri, 15 Sep 2023 16:02:35 +0000 (17:02 +0100)]
ci/zink: drop redundant `MESA_LOADER_DRIVER_OVERRIDE: zink`

This job extends `.zink-anv-test` and `.zink-trace-test`, both of which
extend `.zink-test` which already sets this var.

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

10 months agomesa: some cleanups for texparam extension checks
Tapani Pälli [Wed, 13 Sep 2023 06:30:58 +0000 (09:30 +0300)]
mesa: some cleanups for texparam extension checks

Patch removes some redudant _mesa_is_desktop_gl checks, these
extensions are available only in desktop context.

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

10 months agoRevert "ci: disable lima LAVA lab for maintance"
Erico Nunes [Fri, 15 Sep 2023 09:50:46 +0000 (11:50 +0200)]
Revert "ci: disable lima LAVA lab for maintance"

This reverts commit 079604e41efe001ab560fa68850f54475589f801.

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

10 months agoci/farm-rules: re-add "run every container and build job when a farm gets re-enabled"
Eric Engestrom [Fri, 15 Sep 2023 11:09:43 +0000 (12:09 +0100)]
ci/farm-rules: re-add "run every container and build job when a farm gets re-enabled"

Turns out I was right the first time, I was just missing that this
should only be done in MRs, which @daniels added in 16527f6ffd0129f2f6e1.

Without this, a "farm re-enable" pipeline will run all the jobs for that
farm, but will have none of the container & build jobs to support these
tests.

This reverts commit 1c3097225a4af294720e111eab3f58d590b85c8c.

Fixes: 1c3097225a4af294720e ("ci: don't run everything just because a farm gets re-enabled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25243>

10 months agoci/farm-rules: rename .disable-farm-mr-rules to make it clear it's only about MRs
Eric Engestrom [Fri, 15 Sep 2023 11:03:54 +0000 (12:03 +0100)]
ci/farm-rules: rename .disable-farm-mr-rules to make it clear it's only about MRs

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

10 months agofreedreno/decode: Fix printing chip-id
Rob Clark [Thu, 14 Sep 2023 21:46:26 +0000 (14:46 -0700)]
freedreno/decode: Fix printing chip-id

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25231>

10 months agofreedreno/layout: Handle 565/etc MSAA special case
Rob Clark [Thu, 14 Sep 2023 19:40:23 +0000 (12:40 -0700)]
freedreno/layout: Handle 565/etc MSAA special case

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25231>

10 months agofreedreno: Fix crash with debug msgs enabled
Rob Clark [Thu, 14 Sep 2023 19:34:19 +0000 (12:34 -0700)]
freedreno: Fix crash with debug msgs enabled

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25231>

10 months agozink: use null attachments for null attachments with dynamic render
Mike Blumenkrantz [Wed, 13 Sep 2023 10:55:22 +0000 (06:55 -0400)]
zink: use null attachments for null attachments with dynamic render

using dummy surfaces here is dumb

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

10 months agozink: propagate rp_tc_info_updated across unordered blits
Mike Blumenkrantz [Mon, 11 Sep 2023 15:30:35 +0000 (11:30 -0400)]
zink: propagate rp_tc_info_updated across unordered blits

this otherwise breaks rp optimizing

Fixes: 3a9f7d70383 ("zink: implement unordered u_blitter calls")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25121>

10 months agozink: use much bigger dummy surfaces
Mike Blumenkrantz [Fri, 8 Sep 2023 14:13:19 +0000 (10:13 -0400)]
zink: use much bigger dummy surfaces

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

10 months agotu: handle unused color attachments without crashing
Mike Blumenkrantz [Fri, 15 Sep 2023 13:29:49 +0000 (09:29 -0400)]
tu: handle unused color attachments without crashing

if the format is not set then this attachment must be ignored

Fixes: 97da0a77341 ("tu: Rewrite to use common Vulkan dynamic state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25121>

10 months agolavapipe: EXT_load_store_op_none
Mike Blumenkrantz [Wed, 13 Sep 2023 17:18:56 +0000 (13:18 -0400)]
lavapipe: EXT_load_store_op_none

free real estate

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25213>

10 months agotu: Actually emit patchpoint for viewports with FDM
Connor Abbott [Thu, 14 Sep 2023 14:18:57 +0000 (16:18 +0200)]
tu: Actually emit patchpoint for viewports with FDM

At some point I intended to track whether the pipeline had FDM enabled
and set a dirty flag, but I realized that wasn't necessary. However I
forgot to remove the useless tu_cmd_state::pipeline_has_fdm and the
viewport/scissor emission code was still using it. Fix that.

Fixes: 97da0a77341 ("tu: Rewrite to use common Vulkan dynamic state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25225>

10 months agotu: Fix assert in FDM state emission
Connor Abbott [Thu, 14 Sep 2023 14:24:22 +0000 (16:24 +0200)]
tu: Fix assert in FDM state emission

Making the sub_cs not writeable switches the BO we're emitting to, which
causes an assert failure in tu_cs_end_sub_stream() because it looks like
we have a mismatched start/end. Just make it not writeable later.

Fixes: 97da0a77341 ("tu: Rewrite to use common Vulkan dynamic state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25225>

10 months agotu: Fix tu6_emit_*_fdm size call
Connor Abbott [Thu, 14 Sep 2023 14:23:16 +0000 (16:23 +0200)]
tu: Fix tu6_emit_*_fdm size call

cs is not initialized until the line after this.

Fixes: 95104707f18 ("tu: Basic a7xx support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25225>

10 months agotu: Fix per-view viewport state propagation
Connor Abbott [Wed, 6 Sep 2023 16:57:01 +0000 (18:57 +0200)]
tu: Fix per-view viewport state propagation

We no longer use viewport::per_view_viewport, it's part of the program
state instead, but we forgot to delete it and rewrite all users.

Fixes: 97da0a77341 ("tu: Rewrite to use common Vulkan dynamic state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25225>

10 months agoci: document which image tags need to be bumped when updating {alpine,debian,fedora...
Eric Engestrom [Fri, 4 Aug 2023 17:30:53 +0000 (18:30 +0100)]
ci: document which image tags need to be bumped when updating {alpine,debian,fedora}/x86_64

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

10 months agoci: document which image tags need to be bumped when updating piglit
Eric Engestrom [Thu, 7 Sep 2023 12:51:36 +0000 (13:51 +0100)]
ci: document which image tags need to be bumped when updating piglit

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

10 months agoci: Fix pre-merge pipelines with no code changes
Daniel Stone [Thu, 14 Sep 2023 10:47:40 +0000 (11:47 +0100)]
ci: Fix pre-merge pipelines with no code changes

Make sure we don't end up with manual container jobs in MR pipelines,
because they'll never start. This cleans up the container and build
rules so always 'do the right thing' on MRs (container+build if
required, nothing if not) and user branches (all manual).

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25219>

10 months agointel/fs: Check if the whole ubo load range is in the push const range
Sviatoslav Peleshko [Thu, 7 Sep 2023 10:15:41 +0000 (13:15 +0300)]
intel/fs: Check if the whole ubo load range is in the push const range

Before this, we were checking only the beginning of the ubo range, so
partially overlapping loads were trying to load undefined data.

Fixes: b2da1238 ("i965: Use pushed UBO data in the scalar backend.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9748
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25111>

10 months agopanvk: Add Android ICD loader entry point
Roman Stratiienko [Tue, 12 Sep 2023 21:27:34 +0000 (00:27 +0300)]
panvk: Add Android ICD loader entry point

Enables offscreen rendering on Android.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25194>

10 months agolavapipe: clamp cache uuid size
Mike Blumenkrantz [Thu, 14 Sep 2023 20:29:10 +0000 (16:29 -0400)]
lavapipe: clamp cache uuid size

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25232>

10 months agozink: flag db maps as unsynchronized
Mike Blumenkrantz [Thu, 14 Sep 2023 15:42:35 +0000 (11:42 -0400)]
zink: flag db maps as unsynchronized

these otherwise can be created using the wrong slab

Fixes: 98c411a2a19 ("zink: add PERSISTENT for db buffer maps")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25227>

10 months agoaux/tc: don't use pipe_buffer_create_with_data() for rp-optimized subdata
Mike Blumenkrantz [Thu, 14 Sep 2023 15:41:42 +0000 (11:41 -0400)]
aux/tc: don't use pipe_buffer_create_with_data() for rp-optimized subdata

this function doesn't use the correct tc map flags, which causes
drivers to (potentially) use the wrong slab for transfer allocation
and then crash

Fixes: 51ad269198e ("aux/tc: handle stride mismatch during rp-optimized subdata")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25227>

10 months agoaux/tc: fix rp info handling around tc_sync calls
Mike Blumenkrantz [Thu, 14 Sep 2023 15:40:29 +0000 (11:40 -0400)]
aux/tc: fix rp info handling around tc_sync calls

if a set_framebuffer_state call has occurred but no draws have been
triggered, the rp info must be preserved for the driver to (eventually)
use after the sync

Fixes: 07017aa137b ("util/tc: implement renderpass tracking")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25227>

10 months agocompiler/types: Fix array name dimension flipping for unsized arrays
Caio Oliveira [Fri, 26 May 2023 18:23:19 +0000 (11:23 -0700)]
compiler/types: Fix array name dimension flipping for unsized arrays

Rewrite the code to use linear_asprintf and always flip the
dimensions in place if the element type is an array.  The new
code will now (correctly) flip even in the case of unsized arrays.

The flipping is done by swapping the ranges [a, b) and [b, c), as
shown below, with element type int[...] and an array of length 4.

```
           +--------------- a: first bracket in the name
           |    +---------- b: end of the element name
           |    |  +------- c: end of the array name
           |    |  |
        int[...][4]$

will be transformed into

        int[4][...]$
```

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23278>

10 months agoglsl: Annotate _mesa_glsl_error() with PRINTFLIKE
Caio Oliveira [Wed, 13 Sep 2023 07:41:43 +0000 (00:41 -0700)]
glsl: Annotate _mesa_glsl_error() with PRINTFLIKE

And fix all the errors it found.

Note that for the unsized array error, we will print the
toplevel type -- so that the fact that an inner array is
unsized can be seen.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25200>

10 months agofreedreno: Build drm subdir before perfcntrs, which uses it.
Emma Anholt [Thu, 14 Sep 2023 17:11:20 +0000 (10:11 -0700)]
freedreno: Build drm subdir before perfcntrs, which uses it.

Fixes: f8ac56895509 ("freedreno: Only add drm/computerator when system_has_kms_drm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25229>

10 months agoci: add locked flag to bindgen-cli on x86_64_build.sh
Helen Koike [Thu, 14 Sep 2023 13:40:08 +0000 (10:40 -0300)]
ci: add locked flag to bindgen-cli on x86_64_build.sh

since the dependencies were not locked, they got updated and generating
a new container is throwing errors like the following:

error: failed to compile `bindgen-cli v0.62.0`, intermediate artifacts can be found at `/tmp/cargo-installcP54m7`
Caused by:
  package `memchr v2.6.3` cannot be built because it requires rustc 1.61 or newer, while the currently active rustc version is 1.60.0

rust packages have Cargo.lock file from when they were released, so add
--locked flag to use it.

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

10 months agointel/fs: Merge copy prop dataflow loops
Ian Romanick [Thu, 14 Sep 2023 00:52:29 +0000 (17:52 -0700)]
intel/fs: Merge copy prop dataflow loops

This is kept as a separate commit because the change looks like a lot
more than it it. The order of the two loops is swapped, then the two
loops are merged.

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

10 months agointel/fs: Use rb_tree for copy prop dataflow
Ian Romanick [Wed, 30 Aug 2023 20:20:35 +0000 (13:20 -0700)]
intel/fs: Use rb_tree for copy prop dataflow

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

10 months agointel/fs: Use rb_tree to store ACP entries by destination
Ian Romanick [Mon, 28 Aug 2023 22:46:53 +0000 (15:46 -0700)]
intel/fs: Use rb_tree to store ACP entries by destination

Using a single data structure seems better. There's no appreciable
performance change. On batman_arkham_city_goty.foz, the difference
reported was 0.48%±0.36% (n=20). Several commits in the MR, including
some that should have no effect at all, reported similar changes. I
attribute this primarily changing of loop alignments and similar.

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

10 months agointel/fs: Use rb_tree to store ACP entries by source
Ian Romanick [Sat, 19 Aug 2023 02:11:58 +0000 (19:11 -0700)]
intel/fs: Use rb_tree to store ACP entries by source

On batman_arkham_city_goty.foz, this improves fossil-db time by
-3.83%±0.24% (n=20). This fossil takes the longest time of any in my
database.

v2: Add some comments for cmp_entry_src_entry_src and
cmp_entry_src_nr. Suggested by Ken.

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

10 months agointel/fs: Encapsulate per-block ACP in a structure
Ian Romanick [Sat, 19 Aug 2023 00:37:02 +0000 (17:37 -0700)]
intel/fs: Encapsulate per-block ACP in a structure

This simplifies some later changes.

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

10 months agointel/fs: Make opt_copy_propagation_local file private
Ian Romanick [Sat, 19 Aug 2023 00:31:12 +0000 (17:31 -0700)]
intel/fs: Make opt_copy_propagation_local file private

This annoyed me durning development of this MR. Every time I changed the
parameters to this internal function, I had to modify a public header
file... and trigger a much large rebuild.

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

10 months agointel/fs: Simplify check in can_propagate_from
Ian Romanick [Fri, 18 Aug 2023 23:12:47 +0000 (16:12 -0700)]
intel/fs: Simplify check in can_propagate_from

The larger predicate here already requires that inst->opcode must be
BRW_OPCODE_MOV, so it can't BRW_OPCODE_SEL. With that removed, the
other simplifications are pretty straight forward.

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

10 months agointel/fs: Don't loop in try_constant_propagate
Ian Romanick [Wed, 15 Mar 2023 19:01:35 +0000 (12:01 -0700)]
intel/fs: Don't loop in try_constant_propagate

The caller already loops over the sources. This means that the caller
must loop over the sources in reverse because constant propagation
prefers to propagate into the last sources first.

The shader-db and fossil-db changes (below) are all due to SEL
instructions. Changing the order sources are visited changes whether a
SEL with two immediate sources is

    (+f0.0) sel     g12    IMM_A    IMM_B

or

    (-f0.0) sel     g12    IMM_B    IMM_A

The ordering of the sources affects the order the constant combining
encounters the values, and the determines which value is "combined"
and which value remains an immediate.

This affects the results by luck. If there are two instructions:

    (+f0.0) sel     g12    IMM_A    IMM_B
    (+f0.0) sel     g13    IMM_A    IMM_C

Picking IMM_A is advantageous over picking IMM_B and IMM_C. Since the
selection algorithm in constant combining is greedy, this case
requires the algorithm see the values in just the right order for the
right thing to happen.

v2: Rebase on many, many changes. Move instruction source fixup
reordering out or try_constant_propagate.

v3: Rebase on !7698.

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

10 months agointel/fs: Move src.file checks out of try_constant_propagate and try_copy_propagate
Ian Romanick [Wed, 15 Mar 2023 00:13:37 +0000 (17:13 -0700)]
intel/fs: Move src.file checks out of try_constant_propagate and try_copy_propagate

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

10 months agointel/fs: Make try_constant_propagate and try_copy_propagate file private
Ian Romanick [Wed, 15 Mar 2023 16:27:36 +0000 (09:27 -0700)]
intel/fs: Make try_constant_propagate and try_copy_propagate file private

This annoyed me durning development of this MR. Every time I changed the
parameters to this internal function, I had to modify a public header
file... and trigger a much large rebuild.

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

10 months agointel/fs: Don't try to copy propagate into a source again after progress is made
Ian Romanick [Fri, 18 Aug 2023 16:34:35 +0000 (09:34 -0700)]
intel/fs: Don't try to copy propagate into a source again after progress is made

If the linked list structure used depended on the list head to know when
to terminate, this would be a pretty serious bug. If try_constant_propage
or try_copy_propagate make progress, inst->src[i].nr will change. This
results in the foreach_in_list using a different list header on later
iterations of the loop.

This causes two shaders in shader-db and 9 shaders in fossil-db to
change. Looking at the code changes, these are cases where there was a
copy of a copy that gets propagated. The part that confuses me is the
VGRF numbers involved should **not** hash to the same bucket, so it
should be impossible to find the original source from the intermediate
VGRF.

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

10 months agointel/fs: Don't continue fixed point iteration just because liveout changes
Ian Romanick [Sat, 1 Apr 2023 01:13:57 +0000 (18:13 -0700)]
intel/fs: Don't continue fixed point iteration just because liveout changes

Unless the change in liveout also causes livein to change, updates to
liveout cannot have any global effect. Changes to livein already flag
additional interation.

I had additional changes in this area that didn't pan out. While working
on those change, I was a little confused about this bit of code. It's
unnecessary, so it's better to delete it.

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

10 months agoutil/rb-tree: Inline rb_tree_init
Ian Romanick [Wed, 30 Aug 2023 21:01:00 +0000 (14:01 -0700)]
util/rb-tree: Inline rb_tree_init

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

10 months agoutil/rb-tree: Work around C++'s dislike of offsetof
Ian Romanick [Sat, 19 Aug 2023 01:57:25 +0000 (18:57 -0700)]
util/rb-tree: Work around C++'s dislike of offsetof

This is the same technique used in src/compiler/glsl/list.h.

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

10 months agoglsl/list: Clean up an inappropriate comment
Ian Romanick [Sat, 19 Aug 2023 01:58:53 +0000 (18:58 -0700)]
glsl/list: Clean up an inappropriate comment

:facepalm:

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

10 months agointel/genxml: Auto-import genxml files using genxml_import.py
Jordan Justen [Tue, 15 Aug 2023 22:35:44 +0000 (15:35 -0700)]
intel/genxml: Auto-import genxml files using genxml_import.py

$ src/intel/genxml/genxml_import.py --import

This can be reversed with:

$ src/intel/genxml/genxml_import.py --flatten

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

10 months agointel/genxml: Start Xe2 support
Jordan Justen [Fri, 4 Aug 2023 09:20:17 +0000 (02:20 -0700)]
intel/genxml: Start Xe2 support

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

10 months agointel/decoder: Implement support for importing genxml
Jordan Justen [Thu, 29 Dec 2022 19:32:07 +0000 (11:32 -0800)]
intel/decoder: Implement support for importing genxml

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

10 months agointel/decoder: ralloc_steal() values from spec context for fields and enums
Jordan Justen [Thu, 29 Dec 2022 20:10:47 +0000 (12:10 -0800)]
intel/decoder: ralloc_steal() values from spec context for fields and enums

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

10 months agointel/genxml: Add genxml_import.py script
Jordan Justen [Mon, 26 Dec 2022 11:37:21 +0000 (03:37 -0800)]
intel/genxml: Add genxml_import.py script

This script can:
 * validate that genxml files do not duplicate imported items
 * add imports to genxml files and optimize the file by dropping
   duplicate items
 * reverse the import operation by flattening genxml files

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

10 months agointel/genxml: Add GenXml.flatten_xml() method
Jordan Justen [Tue, 15 Aug 2023 18:46:42 +0000 (11:46 -0700)]
intel/genxml: Add GenXml.flatten_xml() method

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

10 months agointel/genxml: Add GenXml.add_xml_imports method
Jordan Justen [Tue, 15 Aug 2023 18:16:43 +0000 (11:16 -0700)]
intel/genxml: Add GenXml.add_xml_imports method

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

10 months agointel/genxml: Drop assertion to allow for importing
Jordan Justen [Tue, 27 Dec 2022 23:36:58 +0000 (15:36 -0800)]
intel/genxml: Drop assertion to allow for importing

For example, gen11.xml will import the HEVC_ARBITRATION_PRIORITY
struct from gen9.xml.

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

10 months agointel/genxml: Add GenXml.optimize_xml_import()
Jordan Justen [Mon, 26 Dec 2022 11:37:21 +0000 (03:37 -0800)]
intel/genxml: Add GenXml.optimize_xml_import()

This function drops duplicated items from a genxml file when they are
equivalent to the same item imported from another genxml file.

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

10 months agointel/genxml: Add all xml files as pack dependencies
Jordan Justen [Fri, 4 Aug 2023 21:53:35 +0000 (14:53 -0700)]
intel/genxml: Add all xml files as pack dependencies

Since the output can now depend on other imported xml files, we need
to add them all as dependencies to ensure that if any xml file is
changed, then all pack files are rebuilt.

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

10 months agointel/genxml: Add support for excluding items when importing
Jordan Justen [Mon, 26 Dec 2022 10:52:53 +0000 (02:52 -0800)]
intel/genxml: Add support for excluding items when importing

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

10 months agointel/genxml: Support importing from another genxml file
Jordan Justen [Sun, 25 Dec 2022 10:16:24 +0000 (02:16 -0800)]
intel/genxml: Support importing from another genxml file

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

10 months agoglx: Increment dpy->request before issuing an error that had no request
Daniel van Vugt [Tue, 12 Sep 2023 08:01:15 +0000 (16:01 +0800)]
glx: Increment dpy->request before issuing an error that had no request

This ensures the sequence number is unique and recent enough for callers
of `glXQueryDrawable` using `XNextRequest` to selectively trap errors.
The same approach is already used in `glXCreateContextAttribsARB`.

Suggested-by: Sebastian Keller <skeller@gnome.org>
Related-to: https://gitlab.gnome.org/GNOME/mutter/-/issues/3007
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25173>

10 months agoradv: Remove ray tracing shader module identifier skips
Konstantin Seurer [Sun, 10 Sep 2023 19:41:35 +0000 (21:41 +0200)]
radv: Remove ray tracing shader module identifier skips

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25142>

10 months agoradv/rt: Handle stages without nir properly
Konstantin Seurer [Mon, 11 Sep 2023 07:25:37 +0000 (09:25 +0200)]
radv/rt: Handle stages without nir properly

Fixes: e039e3cd768bef6c21255aeef2b11cedf1ab29b9 ('radv/rt: Store NIR shaders separately')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25142>

10 months agoradv: Update navi21 llvm fails
Konstantin Seurer [Sat, 2 Sep 2023 12:25:26 +0000 (14:25 +0200)]
radv: Update navi21 llvm fails

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

10 months agoradv: Don't advertise features requiring PS epilogs with LLVM
Konstantin Seurer [Sat, 2 Sep 2023 11:30:34 +0000 (13:30 +0200)]
radv: Don't advertise features requiring PS epilogs with LLVM

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

10 months agoac/llvm: Use float types for float atomics
Konstantin Seurer [Sat, 2 Sep 2023 12:24:37 +0000 (14:24 +0200)]
ac/llvm: Use float types for float atomics

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

10 months agoac/llvm: Use the correct return type for uadd_carry and usub_borrow
Konstantin Seurer [Sat, 2 Sep 2023 12:22:33 +0000 (14:22 +0200)]
ac/llvm: Use the correct return type for uadd_carry and usub_borrow

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

10 months agoac/llvm: Fix typed loads with 16bit formats
Konstantin Seurer [Fri, 1 Sep 2023 19:37:39 +0000 (21:37 +0200)]
ac/llvm: Fix typed loads with 16bit formats

For some reason, LLVM can't handle those. Emit a 32bit load and type
conversion instead,

Fixes: 22ca8c8 ("ac/llvm: Implement typed buffer load intrinsic.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25010>

10 months agoradv/ci: Improve ray tracing skips
Konstantin Seurer [Tue, 12 Sep 2023 14:30:24 +0000 (16:30 +0200)]
radv/ci: Improve ray tracing skips

I didn't know they were regexes. This also excludes all "1048576" tests.
They build an acceleration structure with 1 primitive 1048576 times
which only warms up the Valve farm and doesn't accomplish anything else.

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

10 months agoradv: Perform multiple sorts in parallel
Konstantin Seurer [Wed, 16 Aug 2023 09:50:18 +0000 (11:50 +0200)]
radv: Perform multiple sorts in parallel

This was the last part that didn't scale with multiple infos. Reducing
the amount of barriers in this case improves DOOM Eternal performance by
50%. (Running with low resolution)

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24720>

10 months agoradv/radix_sort: Vendor the radix sort dispatch code
Konstantin Seurer [Wed, 16 Aug 2023 09:09:25 +0000 (11:09 +0200)]
radv/radix_sort: Vendor the radix sort dispatch code

This needs to be done so we can optimize it for occpuancy when building
multiple acceleration structures in parallel. Changes to the original
code:

- Change // to /* */
- clang-format
- Replace vkCmd calls with calls to the driver entrypoints
- Add a light weight info struct
- Use radv_fill_buffer directly

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24720>

10 months agoradv: Remove dead radix_sort_vk_get_memory_requirements call
Konstantin Seurer [Wed, 16 Aug 2023 08:37:56 +0000 (10:37 +0200)]
radv: Remove dead radix_sort_vk_get_memory_requirements call

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24720>

10 months agoradeonsi/vcn: change max_poc to fixed value for hevc encoder.
Ruijing Dong [Wed, 13 Sep 2023 19:03:17 +0000 (15:03 -0400)]
radeonsi/vcn: change max_poc to fixed value for hevc encoder.

problem: max_poc means the number of bits used in poc lsb
         in slice header, and it should not be related to GOP
 size. When large GOP size used, it could generate
 corrupted video, as the POC could not be correctly
 decoded.

solution: use fixed value of max_poc (16) for now.

Cc: mesa-stable
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25214>

10 months agoac/spm: initialize and set instance mapping for counters
Samuel Pitoiset [Wed, 13 Sep 2023 13:41:28 +0000 (15:41 +0200)]
ac/spm: initialize and set instance mapping for counters

This configures global, per-SE and per-SA counters with different
indexes. This is still unused because only for the first instance is
used by RADV/RadeonSI, but this will be changed.

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

10 months agoac/spm: rework how segment muxsel RAM are filled
Samuel Pitoiset [Wed, 13 Sep 2023 15:03:45 +0000 (17:03 +0200)]
ac/spm: rework how segment muxsel RAM are filled

This is more close to PAL and it will be easier to add GFX11 support
on top of it.

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

10 months agoac/spm: fix checking if the counter instance is valid
Samuel Pitoiset [Wed, 13 Sep 2023 12:49:45 +0000 (14:49 +0200)]
ac/spm: fix checking if the counter instance is valid

This should be compared against the number of global instances, and
there is also an off-by-one error.

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

10 months agoac/perfcounter: compute the number of global instances of TCP,SQ,GL1C and GL2C
Samuel Pitoiset [Wed, 13 Sep 2023 12:34:20 +0000 (14:34 +0200)]
ac/perfcounter: compute the number of global instances of TCP,SQ,GL1C and GL2C

This will be used by SPM.

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

10 months agoac/perfcounter: set the number of instances of GL1C to 4
Samuel Pitoiset [Wed, 13 Sep 2023 12:31:51 +0000 (14:31 +0200)]
ac/perfcounter: set the number of instances of GL1C to 4

According to PAL there is 4 GL1C quadrants. This will also be used
by SPM.

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

10 months agoac/gpu_info: init num_cu_per_sh from the kernel
Samuel Pitoiset [Wed, 13 Sep 2023 12:32:58 +0000 (14:32 +0200)]
ac/gpu_info: init num_cu_per_sh from the kernel

This will be used to configure the number of instances of TCP.

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

10 months agoac/spm: add SPM block definition for GFX10-GFX10.3
Samuel Pitoiset [Wed, 13 Sep 2023 10:46:59 +0000 (12:46 +0200)]
ac/spm: add SPM block definition for GFX10-GFX10.3

Instead of using magic values.

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