Commit graph

201327 commits

Author SHA1 Message Date
Matt Turner
3d24f0ece1 vulkan: Avoid pointer aliasing
Avoids the sanitizer errors:

```
Test case 'dEQP-VK.pipeline.monolithic.spec_constant.graphics.vertex.basic.mixed_packed'..
../src/vulkan/util/vk_util.c:111:38: runtime error: load of misaligned address 0x603002b1c591 for type 'const uint16_t', which requires 2 byte alignment
0x603002b1c591: note: pointer points here
 00 00 00  98 76 98 54 76 98 ba 10  32 54 76 98 ba dc fe ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff
              ^
../src/vulkan/util/vk_util.c:108:38: runtime error: load of misaligned address 0x603002b1c593 for type 'const uint32_t', which requires 4 byte alignment
0x603002b1c593: note: pointer points here
 00  98 76 98 54 76 98 ba 10  32 54 76 98 ba dc fe ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
              ^
../src/vulkan/util/vk_util.c:105:38: runtime error: load of misaligned address 0x603002b1c597 for type 'const uint64_t', which requires 8 byte alignment
0x603002b1c597: note: pointer points here
 54 76 98 ba 10  32 54 76 98 ba dc fe ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  03 11 00
             ^
```

Fixes: 476dc3c050 ("vulkan: add vk_spec_info_to_nir_spirv util method")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32159>
2024-11-16 03:14:31 +00:00
Eric Engestrom
ad4e5538ba ci/crosvm: remove noise inside deqp-runner output
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32156>
2024-11-15 20:24:17 +00:00
Pavel Ondračka
8d3f2d2c23 r300: group KIL for R300/R400
Separate KIL counts to the indirection limit, so try to schedule it
within the TEX block on R300/R400, except for small shaders, where we
already know we are fine.

42 gained shaders on R400 (40 Trine and 2 This war of mine) at the
expense of some increase in register pressure.

shader-db:
total temps in shared programs: 18107 -> 18129 (0.12%)
temps in affected programs: 262 -> 284 (8.40%)
helped: 0
HURT: 22

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32023>
2024-11-15 18:02:55 +00:00
Tomeu Vizoso
6cdfc2d51c teflon: Add files mentioned in the docs for image classification
It is an easy way to check that the installation works and is in a
useful state.

The Python script is based on a example in the TensorFlow repository at:

tensorflow/lite/examples/python/label_image.py

The labels file is distributed by Google along the MobileNetV1 model
that we already have. These files are released under the Apache
license.

Reported-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Tested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31860>
2024-11-15 17:24:19 +00:00
Tomeu Vizoso
3f096c6995 etnaviv/ml: Support addition operations on V8
The proprietary driver on V8 uses a different way of lowering the
addition to a convolution that seems to be faster.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32105>
2024-11-15 16:41:05 +00:00
Tomeu Vizoso
eaecd0ffd6 etnaviv/ml: Adapt to changes in teflon regarding multiple inputs
The Gallium API that Teflon uses now supports a variable number of
inputs per operation.

Adapt to this change without any change in functionality.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32105>
2024-11-15 16:41:05 +00:00
Tomeu Vizoso
986f8c7ff2 teflon: Support multiple graph inputs and outputs
Operations other than tensor addition will also need to be able to
handle multiple inputs, and a variable number of them.

And for testing individual operations, we also need to support models
with multiple inputs.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32105>
2024-11-15 16:41:04 +00:00
Boris Brezillon
c0f47b12fc panvk/cs: Poison cmdbuf registers when PANVK_DEBUG=cs is set
Poison all cmdbuf registers to make sure we don't inherit state from
a previously executed cmdbuf.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
c3ff3f2405 panvk/csf: Fix a wait-LS operation in finish_cs()
cs_wait_slots() expects a mask, cs_wait_slot() a slot ID.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b9eed7a0d4 panvk: Cache the fs_required() result
get_fs() (and thus fs_required()) is called enough times during a draw
that it makes sense to cache the value in the graphics state instead of
calling fs_required() repeatedly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
fd497b2278 panvk: Move common gfx bits to a new source file in the common dir
Keeping those distinct makes it hard to maintain (fixes hitting one
version but not the other). Let's make it common code and guard CSF/JM
specific code under #if PAN_ARCH blocks.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
79e5146378 panvk: Sanitize the driver-internal dirty state tracking
Coalesce all the dirty bits into a single bitset, and use dirty bits for
stuff that were already tracked through NULL GPU pointers.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
8b70f66440 panvk: Don't link the VS and FS shaders on v10
When IDVS+malloc is used, there's no linking involved (getting the
VS and FS shaders to agree on the varyings attributes), so we can
purely and simply skip this phase.

If we ever have to support the non-malloc or non-IDVS case, we'll need
to revisit the linking logic anyway, so let's kill the linking on v10
for now.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b07fd26211 panvk: Move is_dirty() to panvk_cmd_draw.h and rename it
We're about to bitset-based driver-internal dirty state tracking, and
we'll need to define new xx_is_dirty() macros, so let's rename the
existing one dyn_gfx_state_dirty() to avoid the confusion, and move it
to panvk_cmd_draw.h, since it's the same for JM and CSF.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b304a0c49b panvk: Move panvk_cmd_compute_state to a common place
panvk_cmd_compute_state is exactly the same in JM and CSF, so let's move
it to a common place.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b67b350b4c panvk: Move the panvk_cmd_graphics_state definition to panvk_cmd_draw.h
Those structs are almost the same on JM and CSF, so let's move them to a
common place and use #ifdef sections for fields that only apply to
CSF or JM.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
f211e5f9c5 panvk: Kill unused fields in panvk_cmd_graphics_state
Some fields are never used, others are set but never checked.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
8a5814b456 panvk: Change the prototype of panvk_select_tiler_hierarchy_mask()
We're going to put the panvk_cmd_graphics_state definition to
panvk_cmd_draw.h, which involves including panvk_cmd_draw.h from
panvk_cmd_buffer.h, which in turn means we can't include
panvk_cmd_buffer.h from panvk_cmd_draw.h.

Kill the circular inclusion by changing the prototype of
panvk_select_tiler_hierarchy_mask() to take a panvk_physical_device
and a panvk_cmd_graphics_state instead of a panvk_cmd_buffer oject.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31911>
2024-11-15 16:00:25 +00:00
Tomeu Vizoso
f6c3544392 etnaviv/ml: Zero all BOs
A few bugs due to uninitialized buffers have cropped up. For now let's
zero them all and see if we want to do something else when we get
concerned about compilation times.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32104>
2024-11-15 15:35:32 +00:00
Karol Herbst
a5149f3fef rusticl/kernel: fix kernel variant selection
Apparently I messed up enough so that the optimized kernel variant was
almost never selected.

This fixes that :)

Fixes: f098620c21 ("rusticl/kernel: add optimized Kernel variant")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32139>
2024-11-15 14:21:36 +00:00
Lars-Ivar Hesselberg Simonsen
0291f62c6a panvk: update expectations for G610
The prior commit fixed various dEQP-VK.*.suballocation.multisample*
tests.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32155>
2024-11-15 13:03:10 +01:00
Lars-Ivar Hesselberg Simonsen
595019526d panvk: Add frag->frag barrier before resolve
As resolve is implemented as a separate renderpass, we'll need to add a
frag->frag barrier before executing it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32155>
2024-11-15 13:03:07 +01:00
Corentin Noël
a7c8677241 virgl: Simply loop over the resources to figure-out if it is already added
There is not that many resources added to a command buffer to justify the resource
id being cached.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32134>
2024-11-15 11:33:52 +00:00
Robert Mader
758941ab0c v3d: Support SAND128 base modifier
The BROADCOM_SAND128 modifier is usually used with an extra parameter
to pass in the stride via a side channel. Quoting from drm_fourcc.h:
> The pitch between the start of each column is set to optimally
> switch between SDRAM banks. This is passed as the number of lines
> of column width in the modifier (we can't use the stride value due
> to various core checks that look at it , so you should set the
> stride to width*cpp).

So apparently this is just a workaround for limitations in some kernel
APIs. DRM modifiers, however, are arguably a bad fit for extra
parameters that aren't known in advance. In the Wayland/KMS ecosystem
many components depend on being able to treat modifiers as opaque, e.g.
for negotiations etc. In practice the current approach requires various
software components to manually use the
`DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT()` macro - using the
`DRM_FORMAT_MOD_BROADCOM_SAND128` modifier directly with formats like
`NV12` results in a rejection in the KMS driver and corrupted output
in Mesa (because we'd bail out early in `v3d_sand8_blit()`).

Fortunately the stride check limitations mentioned above don't seem to
apply to Mesa though. Thus we can just add support for the base modifier
and stride (coming from V4L2), allowing various toolkits, Wayland
compositors and V4L2 decoder implementations to support e.g.
`NV12` + `DRM_FORMAT_MOD_BROADCOM_SAND128` (`NC12` in V4L2) in a generic
way.

Notes:
1. Wayland compositors trying to offload composition to KMS will still
fail when doing a test commit.
2. There is another limitation - in the V4L2 MPLANE API - that
requires userspace to know the correct offset of the second plane. That's
a known API limitation though and only affects V4L2 decoder implementations.

Cc: mesa-stable
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32033>
2024-11-15 11:09:02 +00:00
Jose Maria Casanova Crespo
808ae13042 rpi4/ci: another detected flaky timeline_semaphore test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32154>
2024-11-15 10:48:54 +00:00
John Anthony
eb84f1e61f panvk: Enable storageBuffer16BitAccess
This is a mandatory feature if VK_KHR_16bit_storage is enabled.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32138>
2024-11-15 10:28:08 +00:00
Sam Lantinga
4ed8ef74b4 util: Fixed crash in HEVC encoding on 32-bit systems
This builds on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25059, and extends that change to all 32-bit systems.

This fixes a crash on SteamOS with the following test case:

        unsigned char data[] = {
          0x00, 0x00, 0x00, 0x01, 0x40, 0x01, 0x0c, 0x01, 0xff, 0xff, 0x01, 0x60,
          0x00, 0x00, 0x03, 0x00, 0xb0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00,
          0x99, 0x2c, 0x0c, 0x01, 0x64, 0x7c, 0x00, 0x7c, 0xd2, 0x56, 0x01, 0x40,
          0x00, 0x00, 0x00, 0x01, 0x42, 0x01, 0x01, 0x01, 0x60, 0x00, 0x00, 0x03,
          0x00, 0xb0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x99, 0xa0, 0x02,
          0x80, 0x80, 0x32, 0x16, 0x24, 0xbb, 0x90, 0x84, 0x48, 0x9a, 0x83, 0x03,
          0x03, 0x02, 0x00, 0xb2, 0x3e, 0x00, 0x3e, 0x69, 0x2b, 0x00, 0x5f, 0x08,
          0x04, 0x10, 0x00, 0x00, 0x00, 0x01, 0x44, 0x01, 0xc0, 0x62, 0x0f, 0x02,
          0x24
        };
        vlVaContext context;
        vlVaBuffer buf;

        memset(&context, 0, sizeof(context));
        memset(&buf, 0, sizeof(buf));
        context.packed_header_emulation_bytes = true;
        buf.data = data;
        buf.size = sizeof(data);
        vlVaHandleVAEncPackedHeaderDataBufferTypeHEVC(&context, &buf);

Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31596>
2024-11-15 09:51:39 +00:00
Lars-Ivar Hesselberg Simonsen
4ab14de32f panvk: Set fs.multisampled sysval for v10+
This allows us to observe writes to SampleMask, which would otherwise be
ignored.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32132>
2024-11-15 09:24:06 +00:00
Constantine Shablia
9b7f547fef panvk: adjust maxSamplerAllocationCount limit
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Constantine Shablia
a245b397c6 panvk: elaborate the comment on the maxMemoryAllocationCount limit
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Constantine Shablia
c01449ef5c panvk: enable shaderInt64
We already were lowering int64

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Constantine Shablia
bdb2f0dc2a panvk: move samplerAnisotropy in the order it appears in struct definition
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Samuel Pitoiset
d2960a8430 radv: consider VK_PIPELINE_STAGE_2_NONE like BOTTOM_OF_PIPE
VK_PIPELINE_STAGE_2_NONE from sync2 is similar to BOTTOM_OF_PIPE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32115>
2024-11-15 08:22:23 +00:00
Samuel Pitoiset
c08d2c40ed radv: fix ignoring src stage mask when dst stage mask is BOTTOM_OF_PIPE
Otherwise the driver doesn't synchronize if there are image layout
transitions.

This fixes rendering issues with displayable DCC (usually black squares
in the bottom of screen). This mostly happens when an application
uses a lower resolution than the screen supports and fshack
(wine/proton) which upscales images uses COMPUTE_SHADER->BOTTOM_OF_PIPE
for the barrier after a dispatch.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11547
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11600
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11789
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8705
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9890
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32115>
2024-11-15 08:22:23 +00:00
Francisco Jerez
0ad835a929 intel/fs/xe2: Fix up subdword integer region restriction with strided byte src and packed byte dst.
This fixes a corner case of the LNL sub-dword integer restrictions
that wasn't being detected by has_subdword_integer_region_restriction(),
specifically:

> if(Src.Type==Byte && Dst.Type==Byte && Dst.Stride==1 && W!=2) {
>    // ...
>    if(Src.Stride == 2) && (Src.UniformStride) && (Dst.SubReg%32  ==  Src.SubReg/2 ) { Allowed }
>    // ...
> }

All the other restrictions that require agreement between the SubReg
number of source and destination only affect sources with a stride
greater than a dword, which is why
has_subdword_integer_region_restriction() was returning false except
when "byte_stride(srcs[i]) >= 4" evaluated to true, but as implied by
the pseudocode above, in the particular case of a packed byte
destination, the restriction applies for source strides as narrow as
2B.

The form of the equation that relates the subreg numbers is consistent
with the existing calculations in brw_fs_lower_regioning (see
required_src_byte_offset()), we just need to enable lowering for this
corner case, and change lower_dst_region() to call lower_instruction()
recursively, since some of the cases where we break this restriction
are copy instructions introduced by brw_fs_lower_regioning() itself
trying to lower other instructions with byte destinations.

This fixes some Vulkan CTS test-cases that were hitting these
restrictions with byte data types.

Fixes: 217d412360 ("intel/fs/gfx20+: Implement sub-dword integer regioning restrictions.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30630>
2024-11-15 07:39:33 +00:00
Tapani Pälli
50243892b4 isl: modify existing assert by allowing CCS_E aux usage
Relax this assert based on x/y offsets for GFX_VERx10 >= 200.

This is getting hit when running gfxbench5 on LNL/BMG.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32128>
2024-11-15 05:20:07 +00:00
Iván Briano
d32a26b3e6 anv: remove unused/misleading/wrong parameters from the RT trampoline
Since the shader parameters are passed as inline data, push constants
are no longer used and so, not actually set on dispatch. But the
nr_params = 4 was still making the shader emit the code to load them,
causing page faults on simulation, and would also on HW if we didn't
always have a scratch page set.

The uses_inline_data parameter will be set from brw_compile_cs(), called
shortly after this point, so we don't need it here.

The subgroup_size is misleading, as we don't actually require that size
and the code that checks for it isn't even running for this shader.

Fixes: 97b17aa0b1 ("brw/nir: rework inline_data_intel to work with compute")

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

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32150>
2024-11-14 19:23:42 -08:00
David Heidelberg
1368ee5e1a compiler/rust: drop duplicated bindgen check
The same check is present in meson file in root directory.

Cc: mesa-stable # 24.3
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32101>
2024-11-14 20:12:31 +00:00
Chia-I Wu
97be761f92 vulkan: include host write in expanded dst access flags
From the perspective of the gpu, host read or host write has the same
implication (gpu cache flush) in the dst access flags.  We should
include host write in the dst access flags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32102>
2024-11-14 19:29:00 +00:00
Chia-I Wu
8d31cb8747 panvk: update expectations for G610
The prior commit fixed dEQP-VK.glsl.440.linkage.varying.component.*.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
619463837f panvk: fix a missing cache invalidation
For the host-to-device domain operation, it is possible that
wait_sb_mask is empty but there is a cache invalidaton,

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
a23c0eb61a panvk: improve should_split_render_pass
Fragments are processed in rasterization order within a fragment job.
The fragment subqueue self-wait is nop in most cases.  The only
exception is when there is a feedback loop.

When there is a feedback loop, because we lower subpassLoad to
texelFetch, we have to split the render pass.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
bee7ef4670 panvk: skip tiler subqueue self-wait within a render pass
IDVS jobs within a render pass use the same scoreboard slot.  There is
no need to wait.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
1b2ea10d68 panvk: skip frag subqueue self-wait within a render pass
We don't emit the fragment job until the end of a render pass.  There is
nothing to wait.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
764a294059 panvk: always skip frag->tiler subqueue wait
The fragment subqueue always waits for the tiler subqueue.  There is no
need to emit additional waits for barriers.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
ca7814ccf4 panvk: rework collect_cs_deps
src_stages and dst_stages together define an execution dependency.  Both
of them should be considered at the same time.

Add a low-level helper, add_execution_dependency, to translate pipeline
stages to subqueue wait masks.  The subqueue wait masks only specify
which subqueues should wait for which.  The callers will decide how the
waits are performed exactly.

Update collect_cs_deps to call add_execution_dependency and use the
subqueue wait masks to initialize panvk_cs_deps.

The main difference is that barriers such as

  .srcStageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
  .dstStageMask = VK_PIPELINE_STAGE_2_NONE,

are ignored.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
f1f3b56834 panvk: rework collect_cache_flush_info
src_access defines the availability op and the host-to-device domain op.
dst_access defines the visibility op and the device-to-host domain op.
They should be treated separately.

Add a low-level helper, add_memory_dependency, to translate access flags
to panvk_cache_flush_info.

Update collect_cache_flush_info to use add_memory_dependency.  Also
replace the custom subqueue access flag mappings by
vk_filter_{src,dst}_access_flags2.

The main difference is that barriers such as

  .srcAccessMask = VK_ACCESS_2_MEMORY_WRITE_BIT,
  .dstAccessMask = VK_ACCESS_2_NONE,

or

 .srcAccessMask = VK_ACCESS_2_NONE,
 .dstAccessMask = VK_ACCESS_2_MEMORY_READ_BIT,

are no longer ignored.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
4a598e946c panvk: add get_subqueue_stages
This is a minor refactoring with no functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
764cb8aebb panvk: update CI expectations
The prior commit fixed
dEQP-VK.memory.mapping.suballocation.full.variable.implicit_unmap.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32125>
2024-11-14 18:45:44 +00:00
Chia-I Wu
7a60e1dcd7 panvk: do not leak mapped memory
vkFreeMemory implies vkUnmapMemory.  Without the implied unmap, mapped
memories leak.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32125>
2024-11-14 18:45:44 +00:00