Commit Graph

189622 Commits

Author SHA1 Message Date
Alyssa Rosenzweig
7dcd5f1f02 asahi: don't allocate for USC words
let the driver.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247>
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
06d59d3f5c asahi: rename meta -> bg/eot
meta is for making meta gallium calls, we already have something else
appropriately named meta. bg/eot programs are not meta, they're their own
hardware mechanism. use the appropiate powervr name instead.

nfc

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247>
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
cd3dabe8e0 asahi: clean up bg/eot counts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247>
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
ed2d15d42f asahi: track imports for decode
otherwise we fail with interesting dmabuf tracing

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247>
2024-05-16 13:25:56 -04:00
Alyssa Rosenzweig
ff553d1ac8 asahi/decode: QoL improvements
- plumb through a context so we can handle multiple VMs in a single process
- add image heap dumping helper for bindless images
- try to guess betwen texture & PBE to reduce noise

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29247>
2024-05-16 13:25:56 -04:00
Karol Herbst
564e569072 nir/lower_cl_images: set binding also for samplers
Fixes https://github.com/darktable-org/darktable/issues/16717 on radeonsi.

Fixes: 31ed24cec7 ("nir/lower_images: extract from clover")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29230>
2024-05-16 16:39:42 +00:00
Danylo Piliaiev
97c99aa9b3 tu: Add more info to renderpass tracepoint
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29222>
2024-05-16 15:57:10 +00:00
Danylo Piliaiev
57a3f0f949 util/u_trace: Allow mixing of ArgStruct and Arg
Would allow to define such arguments:

    args=[ArgStruct(type='const struct tu_framebuffer *', var='fb'),
          ArgStruct(type='const struct tu_tiling_config *', var='tiling'),
          Arg(type='uint8_t',  var='maxSamples',  c_format='%u'),
          Arg(type='uint8_t',  var='clearCPP',    c_format='%u'),
          Arg(type='uint8_t',  var='loadCPP',     c_format='%u'),
          Arg(type='uint8_t',  var='storeCPP',    c_format='%u'),],

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29222>
2024-05-16 15:57:10 +00:00
David Rosca
5f4a6b5b00 radeonsi/vcn: Ensure at least one reference for H264 P/B frames
The original fix from

0f3370eede ("raseonsi/vcn: fix a h264 decoding issue")

would in some cases also trigger for I frames with interlaced streams.
Instead of checking used_for_reference_flags, use slice type and
only add one reference for P/B frames if needed.
This change still fixes playback of the sample from the original issue,
avoids the issue with interlaced streams and also fixes the case where
application provides no references at all.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11060
Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29055>
2024-05-16 15:05:09 +00:00
David Rosca
2ef3a34f1a radeonsi/vcn: Allow duplicate buffers in DPB
In case of missing frames (eg. when decoding corrupted streams), there
will be duplicate buffers and all of them needs to be in DPB to keep
the layout correct for decoding.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29055>
2024-05-16 15:05:09 +00:00
David Rosca
47b6ca47d0 radeonsi/vcn: Ensure DPB has as many buffers as references
In case of corrupted streams (or application bugs) the number
of references may not be equal to DPB size. This needs to be fixed by
filling the missing slots with dummy buffers.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29055>
2024-05-16 15:05:08 +00:00
David Rosca
9837dab4bd frontends/va: Store slice types for H264 decode
Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29055>
2024-05-16 15:05:08 +00:00
Patrick Lerda
f8a1d9f787 r600: fix vertex state update clover regression
This change handles the case when "vertex_fetch_shader.cso" is null,
it implements the previous behavior in this specific case. This
situation is happening with clover.

For instance, this issue is triggered with "piglit/bin/cl-custom-buffer-flags":
==6467==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000000c (pc 0x7ff92908fe6e bp 0x7ffe86ae5ad0 sp 0x7ffe86ae5a30 T0)
==6467==The signal is caused by a READ memory access.
==6467==Hint: address points to the zero page.
    #0 0x7ff92908fe6e in evergreen_emit_vertex_buffers ../src/gallium/drivers/r600/evergreen_state.c:2123
    #1 0x7ff92908444b in r600_emit_atom ../src/gallium/drivers/r600/r600_pipe.h:627
    #2 0x7ff92908444b in compute_emit_cs ../src/gallium/drivers/r600/evergreen_compute.c:798
    #3 0x7ff92908444b in evergreen_launch_grid ../src/gallium/drivers/r600/evergreen_compute.c:927
    #4 0x7ff9349f9350 in clover::kernel::launch(clover::command_queue&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&) ../src/gallium/frontends/clover/core/kernel.cpp:105
    #5 0x7ff9349c331d in std::function<void (clover::event&)>::operator()(clover::event&) const /usr/include/c++/11.4.0/bits/std_function.h:590
    #6 0x7ff9349c331d in clover::event::trigger() ../src/gallium/frontends/clover/core/event.cpp:54
    #7 0x7ff9349c82f1 in clover::hard_event::hard_event(clover::command_queue&, unsigned int, clover::ref_vector<clover::event> const&, std::function<void (clover::event&)>) ../src/gallium/frontends/clover/core/event.cpp:138
    #8 0x7ff9348daa47 in create<clover::hard_event, clover::command_queue&, int, clover::ref_vector<clover::event>&, clEnqueueNDRangeKernel(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, _cl_event* const*, _cl_event**)::<lambda(clover::event&)> > ../src/gallium/frontends/clover/util/pointer.hpp:241
    #9 0x7ff9348daa47 in clEnqueueNDRangeKernel ../src/gallium/frontends/clover/api/kernel.cpp:334

Fixes: 659b7eb2 ("r600: better tracking for vertex buffer emission")
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10079
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29163>
2024-05-16 14:41:25 +00:00
Gert Wollny
f398f6ab08 r600/sfn: Set bit size for newly created store intrinsic
Fixes: 1632948a76
  nir: validate src_type of store_output intrinsics, require bit_size >= 16

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29227>
2024-05-16 14:21:19 +00:00
Mike Blumenkrantz
e1b40373ce zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:44 +00:00
Mike Blumenkrantz
ee2fb2f2f3 zink: split slot map between regular varyings and patch
these otherwise were using the same mapping

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:44 +00:00
Mike Blumenkrantz
66eb26c00f zink: move 'reserved' into io assign struct
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:44 +00:00
Mike Blumenkrantz
9ca0c8cbae zink: unify io assignment
this was the same in two places but with extra pre-checks in one

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:43 +00:00
Mike Blumenkrantz
c6af91a968 zink: track masks of io locations used during linking
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:43 +00:00
Mike Blumenkrantz
8f2e56350a zink: pass a struct through io assignment functions
this is more easily extensible

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:43 +00:00
Mike Blumenkrantz
42f2719a88 zink: outdent assign_consumer_var_io()
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:43 +00:00
Mike Blumenkrantz
737de5573f zink: outdent assign_producer_var_io()
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:43 +00:00
Mike Blumenkrantz
613c7c1586 zink: minor tweaks to shader io assignment
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:43 +00:00
Mike Blumenkrantz
18f9f17be5 zink: make unassigned io variables unreachable
this should no longer be possible to hit

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28884>
2024-05-16 12:33:43 +00:00
Eric Engestrom
390ac5ba14 mailmap: add entry to unify Roman Stratiienko's contributions
$ git shortlog -sne --author 'Roman Stratiienko'
  65  Roman Stratiienko <r.stratiienko@gmail.com>
   7  Roman Stratiienko <roman.stratiienko@globallogic.com>
   4  Roman Stratiienko <roman.o.stratiienko@globallogic.com>
   3  Roman Stratiienko <roman.stratiienko@nure.ua>

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29237>
2024-05-16 12:05:27 +00:00
Collabora's Gfx CI Team
75931d6e68 Uprev Piglit to 8a6ce9c6fc5c8039665655bca4904d5601c6dba0
7aa7bc1b01...8a6ce9c6fc

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29050>
2024-05-16 10:15:17 +00:00
Pierre-Eric Pelloux-Prayer
0f25cef8aa radeonsi: add testmemperf mem bandwidth test
This commit adds a simple test to measure bandwidth to/from memory
domains.
It's using the winsys functions, not the driver ones, to be able
to control the domains and flags.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29073>
2024-05-16 09:51:19 +00:00
Pierre-Eric Pelloux-Prayer
cd9f6f9e85 radeonsi: allocate sqtt and spm buffers in GTT
This makes reading from it much, much faster.

It would be better to allocate them in VRAM, and do a copy
before reading them, but for now using GTT will do the trick.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29073>
2024-05-16 09:51:19 +00:00
Pierre-Eric Pelloux-Prayer
afd2cbeb28 radeonsi/sqtt: use si_shader_binary_upload_at to reupload shaders
This allows to support ACO + sqtt.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29073>
2024-05-16 09:51:19 +00:00
Pierre-Eric Pelloux-Prayer
38c6400167 radeonsi: add new si_shader_binary_upload_at method
Same as si_shader_binary_upload, but it uploads to the existing
shader->bo buffer at the specified offset.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29073>
2024-05-16 09:51:18 +00:00
Pierre-Eric Pelloux-Prayer
5794a86f19 radeonsi/sqtt: support sqtt buffer auto-resizing
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29073>
2024-05-16 09:51:18 +00:00
Pierre-Eric Pelloux-Prayer
316fff7d41 radeonsi/sqtt: cleanup si_sqtt_add_code_object a bit
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29073>
2024-05-16 09:51:18 +00:00
Pierre-Eric Pelloux-Prayer
e32dddf7ab radeonsi/sqtt: use ac_sqtt_get_shader_mask for spm counters
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29073>
2024-05-16 09:51:18 +00:00
Konstantin Seurer
99a6511775 gitlab: Reference hang debugging documenttion
It should help the user with setting up UMR, which adds a lot of useful
information to the hang report.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29213>
2024-05-16 09:47:53 +00:00
Yusuf Khan
586bca76dd nvk: remove NVK_MME_COPY_QUERIES
Its not being used by anything, and it gets sent to the GPU, remove
it.

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29030>
2024-05-16 08:14:30 +00:00
Mary Guillemard
12fa8d749a nak: Migrate sph.rs to use SPH headers defintion
We still rely on bitfields for attributes as it map nicely.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29034>
2024-05-16 07:56:30 +00:00
Mary Guillemard
8fda488aec nak: Set SPH version to 4 on SM75+
The hardware doesn't check it but we should avoid possible mismatch.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29034>
2024-05-16 07:56:30 +00:00
Mary Guillemard
170b09790a nouveau: nvidia_header: Add AMPERE_B class generation
We only have SPHv4 definition for Ampere, add parsing of it.

Also make vk_push_print supports it.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29034>
2024-05-16 07:56:30 +00:00
Arthur Huillet
784407f932 nvk: generate Rust bindings from SPH header files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29034>
2024-05-16 07:56:30 +00:00
Arthur Huillet
f7d4e4ba2b nvk: import SPH headers files from open-gpu-doc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29034>
2024-05-16 07:56:30 +00:00
Chia-I Wu
a83c15654c drm-shim: intercept access as well
Since libdrm commit 3bc3cca2 ("xf86drm: use drm device name to identify
drm node type"), drmGetMinorType uses access to get the node type and
causes amdgpu_device_initialize to fail with

  DRM_SHIM: unhandled core DRM ioctl 0x5 (0xc0286405)
  _amdgpu_device_initialize: amdgpu_get_auth (1) failed (-22)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29096>
2024-05-16 07:18:14 +00:00
Karol Herbst
53629b0a2d rusticl: make use of new output_inline_wrapper meson.rust.bindgen feature
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25265>
2024-05-16 06:40:59 +00:00
Karol Herbst
3e3eab12d8 rusticl: bump meson req to 1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25265>
2024-05-16 06:40:59 +00:00
Karol Herbst
86a11248a5 rusticl: bump bindgen req to 0.65
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25265>
2024-05-16 06:40:59 +00:00
Karol Herbst
c46cd101e1 rusticl: move mesa_version_string out of the inline wrapper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25265>
2024-05-16 06:40:59 +00:00
Karol Herbst
d2dfb3350f rusticl: merge rusticl_nir and rusticl_mesa_bindings_inline_wrapper targets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25265>
2024-05-16 06:40:59 +00:00
Yiwei Zhang
2740d92e3d vulkan: drop redundant core props query and copy helpers
The last client, venus, has stopped using those either.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>
2024-05-16 01:58:14 +00:00
Yiwei Zhang
374a14ce4c venus: define VN_SET_VK_PROPS(_EXT) to simplify vk props init
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Reviewed-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>
2024-05-16 01:58:14 +00:00
Oskar Viljasaar
3c152a6e5d venus: Use common physical device properties
This lets us delegate the GPDP2 entrypoint to common code.
This also lets us delete struct vn_physical_device_properties,
as it is redundant with struct vk_properties present in the runtime.

Move the properties present in vn_physical_device_properties to the
local_devices struct used to query the host device properties, so we can
still get and fill those properties.

Replace accesses to struct vn_physical_device with accesses to
struct vk_properties filled in at device initialization time.

v2: rebase and a few fixups (zzyiwei)
- rely solely on vk props for final props sanitizations
- set vk11 props behind vk 1.2 condition
- set default pci props if forwarded
- set extension props based on extension support

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Reviewed-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>
2024-05-16 01:58:14 +00:00
Oskar Viljasaar
f04bc27fe1 vulkan: add a property struct setter function
This takes in a (VkBaseInStructure *), checks for its type, casts it
into the right property struct and then copies its fields over the right
way to `struct vk_properties`.

v2: a few fixups (zzyiwei)
- add missing brackets required by clang
- fix some indents
- optimize to aovid deep-copying VkPhysicalDeviceProperties
- update to use DETECT_OS_ANDROID as suggested
- cast to avoid -Wswitch for Android struct beyond VkStructureType

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>
2024-05-16 01:58:14 +00:00