Commit graph

5330 commits

Author SHA1 Message Date
Valentine Burley
0a6cbb3a97 tu/kgsl: Remove unused variable
The offset variable declaration at the beginning of the function was left over
after the variable was moved inside the if statement.

Fixes: 17c12a9924 ("turnip/kgsl: Support external memory via ION/DMABUF buffers")

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30300>
2024-07-22 14:53:14 +00:00
Valentine Burley
47de27cde1 tu: Implement VK_EXT_device_address_binding_report
This extension should be helpful for debugging.

Passes dEQP-VK.memory.address_binding_report.*

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30021>
2024-07-22 14:23:53 +00:00
Valentine Burley
dd10d2ef2f tu/rmv: Fix missing image bind logging for WSI images
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30021>
2024-07-22 14:23:53 +00:00
David Heidelberg
dc6e6d7a2b freedreno: Enable Adreno 306A
Enable the Adreno 306A that is found on the QM215 SoC (Qualcomm 215).

The GPU marketing name is Adreno 308.

Kernel patch: https://lore.kernel.org/linux-arm-msm/20240528-a306a-v1-1-03a66dacd8c7@gmail.com/

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29401>
2024-07-21 21:31:06 +00:00
Eric Engestrom
8fe147de57 freedreno/ci: document extra variants of failing tests on a618 and a630
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom
734823fe7d freedreno/ci: double job timeout for a306
Based on the predicted remaining time when it gets killed, it need just over 30min.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Valentine Burley
52cf610975 tu: Enable VK_KHR_shader_subgroup_uniform_control_flow
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29277>
2024-07-19 12:54:09 +00:00
Valentine Burley
d43a271175 freedreno/ci: Use the common a6xx-skips on a750
Some tests will have to be skipped on all devices on Turnip.
To avoid duplication use the common a6xx-skips file on a750 as well.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29277>
2024-07-19 12:54:09 +00:00
Valentine Burley
c4da848a1a freedreno,tu,ir3: Move threadsize_base and max_waves to fd_dev_info
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29277>
2024-07-19 12:54:09 +00:00
Rob Clark
b0d22461b9 freedreno: Enable the X1-85
Enable the GPU in the X1 elite/plus laptop SoCs.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30249>
2024-07-18 19:27:03 +00:00
Valentine Burley
b3842f9f41 tu: Don't disable 2 10-bit formats
VK_FORMAT_R10X6_UNORM_PACK16 and VK_FORMAT_R10X6G10X6_UNORM_2PACK16
were previously disabled because they were failing some CTS tests.
Re-enable them now as they are no longer causing crashes.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30157>
2024-07-16 18:51:50 +00:00
Rob Clark
30dbfc87cd freedreno/a6xx: Add more format swizzles
Ass missing R8G8B8X8_SNORM as well as various ABGR and ARGB.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
5de33f3d3e freedreno: Implement stencil blit fallback
Now that there is a util_blitter_clear_depth_stencil() helper, we can
use that to implement stencil blits in the fallback path.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Mark Collins
a4b8d17c29 fd/meson: Only build 'ds' when system has DRM
This would result in compilation errors on non-DRM Turnip builds
that included perfetto support.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30147>
2024-07-15 11:39:20 +00:00
Mark Collins
d77b0f7cb1 tu/kgsl: Fix profiling buffer GPU IOVA
The IOVA being submitted was of the suballocation rather than
the parent buffer.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30147>
2024-07-15 11:39:20 +00:00
Mark Collins
0d6faa21f8 tu/kgsl: Spin unti KGSL reports queue timestamp during profiling
KGSL writes the profiling values asynchronously while we read them
immediately after the IOCTL returns which can result in the struct
not being filled in by the time we read it, this results in AGI not
correctly processing any timestamps from larger submits which take
longer to queue. To fix this, we now busy-wait on until the value
has been written out by KGSL.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30147>
2024-07-15 11:39:20 +00:00
Danylo Piliaiev
7231eef630 tu: Have single Flush/Invalidate memory entrypoints
Make all flush/invalidation logic kernel independent. The only
downside is that aarch32 would have cached non-coherent memory
disabled, but there are probably no users of it.

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

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30131>
2024-07-12 11:48:36 +00:00
Zan Dobersek
5e862a372b freedreno/drm: add mesautil dependency
The libfreedreno_drm library should depend on mesautil to bring in the
zlib compiler and linker flags used by the RD dumping facilities that
were integrated recently.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: bde26a32e1 ("freedreno/drm: Add rd dumper support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30103>
2024-07-10 17:39:23 +00:00
Connor Abbott
4e2a0a5ad0 ir3: Add descriptor prefetching optimization on a7xx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29873>
2024-07-10 11:54:15 +00:00
Connor Abbott
fdfe86aa52 ir3: Expand preamble rematerialization
Add the ability to deduplicate hoisted expressions, which will be
necessary to avoid repeatedly hoisting the same descriptors and blowing
our budget. The offset calculation may have itself been hoisted into the
preamble, so we also have to be able to hoist a bindless_resource_ir3
referencing a load_preamble and connect it to the source of the
corresponding store_preamble.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29873>
2024-07-10 11:54:15 +00:00
Connor Abbott
59940d6577 ir3: Make preamble rematerialization common code
We will need it for prefetching descriptors too. Move it to
ir3_nir_opt_preamble since that seems like the most related place.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29873>
2024-07-10 11:54:15 +00:00
Connor Abbott
45a57fa735 ir3: Plumb through descriptor prefetch intrinsics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29873>
2024-07-10 11:54:15 +00:00
Connor Abbott
b39b82dfbd ir3: Don't consider r63.x as a GPR
We have to be careful here because r63.x is also used to mean "register
not assigned yet," but dummy destinations for prefetches will use r63.x
and we don't want them to count as GPRs when determining whether to
enable early preamble.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29873>
2024-07-10 11:54:15 +00:00
Connor Abbott
fa8758fc81 ir3: Split out bindless tex/samp encoding
It will be used with prefetching, which is an intrinsic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29873>
2024-07-10 11:54:15 +00:00
Connor Abbott
2c462fe9cc ir3: Fix stg/ldg immediate offset on a7xx
Don't multiply by 4 twice. While we're here, fix the in-bounds check on
a6xx, since we need to account for the multiplying by 4. This was done
correctly on a7xx but the commit below didn't correctly port it to a6xx
when adding the multiply on a6xx.

Fixes: 01bac643f6 ("freedreno/ir3: Fix ldg/stg offset")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30046>
2024-07-09 17:22:15 +00:00
Rob Clark
bde26a32e1 freedreno/drm: Add rd dumper support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30083>
2024-07-09 16:44:47 +00:00
Connor Abbott
c77a4e1db7 tu: Add VPC hardware workaround for a750
This fixes hangs in e.g.
dEQP-VK.transform_feedback.primitives_generated_query.concurrent.pgq_secondary_cmd_buffers.64bit.triangle_list_with_adjacency.draw

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30090>
2024-07-09 13:57:33 +00:00
Connor Abbott
fe6471ded2 freedreno: Fix decoding primitive counter events on a7xx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30090>
2024-07-09 13:57:33 +00:00
Connor Abbott
c84d1f5571 tu: Support bufferDeviceAddressCaptureReplay on kgsl
We use the method used by the blob, which sets the USE_CPU_MAP flag,
originally intended for SVM, to allocate from a separate address range
and to control the address by passing a preferred address to mmap().

With this we can capture and replay gfxreconstruct traces on kgsl for
apps that use BDA, and we can replay them on msm with a small hack to
increase the address space size:

echo 274877906944 > /sys/module/msm/parameters/address_space_size

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29251>
2024-07-09 09:01:57 +01:00
Eric Engestrom
801ed4d032 ci: simplify setting .no-auto-retry now that it isn't bundled with unrelated rules:
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30004>
2024-07-07 19:31:44 +00:00
Eric Engestrom
f37af2ab8c ci: split .no-auto-retry out of .scheduled_pipeline-rules
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30004>
2024-07-07 19:31:44 +00:00
Dmitry Baryshkov
b018489245 freedreno/registers: drop display-related register files
Neither freedreno nor turnip make use of the display-related source
files. With the XML files being imported to the kernel, drop them from
Mesa to prevent possible confusion and/or deviation between those files.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27787>
2024-07-06 15:16:48 +00:00
Danylo Piliaiev
17c12a9924 turnip/kgsl: Support external memory via ION/DMABUF buffers
android12-5.10 kernel has ION disabled and the buffers should
be allocated via dma_heap.

Also before that there was ION abi breakage, which is handled here, see:
https://source.android.com/devices/architecture/kernel/ion_abi_changes

ion_4.19.h and ion.h are copied from libion:
https://android.googlesource.com/platform/system/memory/libion

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14928>
2024-07-05 15:33:47 +00:00
Danylo Piliaiev
2fbdc4d462 ir3: Fix decoding of stib.b/ldib.b with offset
The OFFSET_LO in #instruction-cat6-a6xx-ibo-load-store aliased with
opcode of other instructions, resolve this by being less lax in some
instruction definitions.

A proper way to solve this would probably be to reconstruct instructions
hierarchy, but it's a much more complex task.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30018>
2024-07-04 08:40:47 +00:00
Danylo Piliaiev
2c7e07655c ir3/tests: Make possible to add generated disasm tests
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30018>
2024-07-04 08:40:47 +00:00
Danylo Piliaiev
b5f0c44f2a ir3/tests: Make possible to specify raw instr value as uint64
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30018>
2024-07-04 08:40:46 +00:00
Connor Abbott
2988f43420 tu: Support VK_EXT_fragment_density_map on a750
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29938>
2024-07-03 16:36:19 +00:00
Connor Abbott
b0599a7fe2 tu: Fix fdm_apply_load_coords patchpoint size
Fixes: 7429ca3115 ("tu: Use SS6_INDIRECT consts upload path for 3d blits")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29938>
2024-07-03 16:36:19 +00:00
Connor Abbott
bd179e6213 tu: Make cs writeable for GMEM loads when FDM is enabled
This was accidentally dropped.

Fixes: 21334e3b53 ("turnip: Move gmem clears and loads to the first subpass that uses them.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29938>
2024-07-03 16:36:19 +00:00
Connor Abbott
6185134f28 ir3: Fix UBO size with indirect driver params
So far the only user of indirect driver params is FDM so this wasn't
noticed before.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29938>
2024-07-03 16:36:19 +00:00
Connor Abbott
08d5505fa8 tu: Add support for aligned substreams
This is useful when the substream needs to be inside a UBO.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29938>
2024-07-03 16:36:19 +00:00
Zan Dobersek
968163524a tu: add format feature flag checks for VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
In tu_get_image_format_properties(), image usage flags are matched against
sets of required format feature flags for the specified image format.
These mappings are defined in the Vulkan 1.3 spec in section 49.3.3.,
"Format Feature Dependent Usage Flags".

Handling for the VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT flag was missing. When
specified, at least one of color attachment or depth-stencil attachment
format feature flags should be present for the given format.

Fixes 110 new Vulkan CTS tests:
 - dEQP-VK.api.info.unsupported_image_usage.linear.*
 - dEQP-VK.api.info.unsupported_image_usage.optimal.*

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30013>
2024-07-03 15:14:55 +00:00
Zan Dobersek
8a84e77b15 tu: support KHR_8bit_storage
Add basic KHR_8bit_storage support for Adreno 750 devices, for now enabling
the storageBuffer8BitAccess feature. A separate descriptor is provided for
8-bit storage access. The descriptor index is adjusted appropriately for
8-bit SSBO loads and stores.

The 8-bit SSBO loads cannot go through isam since that instruction isn't
able to handle those. The ldib and stib instruction encodings are a bit
peculiar but they match the blob's image buffer access through VK_FORMAT_R8
and the dedicated descriptor. These loads and stores do not work in
vectorized form, so they have to be scalarized. Additionally stores of
8-bit values have to clear up higher bits of those values.

8-bit truncation can leave higher bits as undefined. Zero-extension of
8-bit values has to use masking since the corresponding cov instruction
doesn't function as intended. 8-bit sign extension through cov from a
non-shared to a shared register also doesn't work, so an exception is
applied to avoid it.

Conversion of 8-bit values to and from floating-point values also doesn't
work with a straightforward cov instruction, instead the conversion has
to go through a 16-bit value.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9979
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28254>
2024-07-03 08:31:39 +00:00
Zan Dobersek
c93a629f2c ir3: rework TYPE_S8 as TYPE_U8_32
ir3's TYPE_S8 isn't actually a signed 8-bit type in a half-register, it's
in fact an unsigned 8-bit type in a full register. Only actual uses of
TYPE_S8 are in conversion operations, but those can be trivially replaced
with TYPE_U8, either truncating down to 8 bits or zero-extending or
sign-extending from 8 bits upward.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28254>
2024-07-03 08:31:39 +00:00
Zan Dobersek
bc542b5827 ir3_nir_opt_preamble: handle 8-bit preamble loads and stores
Support 8-bit loads and stores in the preamble alongside 16-bit ones by
employing the correct conversion variants. Promotions to float remain
specific to 16-bit loads and stores.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28254>
2024-07-03 08:31:39 +00:00
Zan Dobersek
a9b781fa54 tu: use either the 16-bit or 32-bit descriptor
Until now, if the 16-bit storage functionality is supported by the
hardware, two separate descriptors were set up, with isam loads and stores
piping through the descriptor of the corresponding size and other storage
access using the 16-bit descriptor.

These changes keep separate descriptors on a650, but leverage post-a650
isam.v functionality that enables use of 16-bit descriptors for 32-bit
loads, removing the need for the separate 32-bit descriptor.

Storage buffer descriptors are set up according to 16-bit storage support
and the indicated isam.v support, using those descriptors for 32-bit isam
loads as well if the latter is present.

Dynamic offset application in tu_CmdBindDescriptorSets is modified to
determine the offset shift value based on the descriptor's format and not
on the descriptor's position in the layout binding.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28254>
2024-07-03 08:31:39 +00:00
Danylo Piliaiev
f77e9d8c4a ir3: Print bindless samp/tex ids for tex prefetch
@tex(r0.z)  src=4, bindless=1, samp=4, tex=3, wrmask=0x7, opc=sam
@tex(r1.y)  src=4, bindless=1, samp=2, tex=1, wrmask=0xf, opc=sam

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29989>
2024-07-02 08:16:02 +00:00
Valentine Burley
c2af4f61a7 tu: Use vk_query_pool
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29441>
2024-07-01 16:23:29 +00:00
Valentine Burley
cc432c358a tu: Use the common versions of vkBegin/EndQuery()
Move all the logic into tu_CmdBegin/EndQueryIndexedEXT. CmdBegin/EndQuery in
the common runtime is a wrapper that calls tu_CmdBegin/EndQueryIndexedEXT with
index 0.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29441>
2024-07-01 16:23:29 +00:00
Valentine Burley
45a3c2d197 tu: Rename tu_query.cc/h to tu_query_pool.cc/h
Match the structure of the common Vulkan runtime and NVK.
Additionally update a comment to reflect the current state.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29441>
2024-07-01 16:23:28 +00:00