Commit Graph

179340 Commits

Author SHA1 Message Date
Nanley Chery
d57611fe25 intel/isl: Add scores for GEN12_RC_CCS and MTL_RC_CCS
Now that these CCS-enabled modifiers have non-zero scores, anv is
enabled to use them.

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

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6701
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Tested-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Nanley Chery
9e402e93d2 anv: Delete implicit CCS code
Stop allocating CCS at the end of some BOs. Anv no longer uses that
memory range.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Nanley Chery
4cdd3178fb anv: Meet CCS alignment reqs with dedicated allocs
At image bind time, we require BOs to meet aux-map alignment
requirements in order to enable CCS on images. This is a heuristic
controlled by anv_bo_allows_aux_map().

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

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

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Nanley Chery
2cbec81041 anv: Loosen anv_bo_allows_aux_map
Instead of requiring that a BO has the has_implicit_ccs flag set, simply
require that the BO is aligned according to aux-map requirements.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Nanley Chery
ee6e2bc4a3 anv: Place images into the aux-map when safe to do so
At image bind time, if an image's addresses can be placed into the
aux-map without causing conflicts with a pre-existing mapping, do so.
The code aux management code in the binding function operates on a
per-plane basis. So, use the per-plane CCS memory range from the image
rather than the CCS memory region for the entire BO.

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

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6304
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Nanley Chery
207db22117 anv: Refactor CCS disabling at image bind time
Split out the discrete and integrated implicit CCS cases. We'll do more
work in the integrated case in a future commit.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Nanley Chery
d31c62f384 anv: Wrap aux surface image binding queries
Add and use anv_image_get_aux_memory_range.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Nanley Chery
cd12eec496 anv: Allocate space for aux-map CCS in image bindings
This makes images a bit larger by reserving space to store the
compression control surface when the device uses an aux-map.

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

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Nanley Chery
5e07255148 anv: Move scope of CCS binding determination
Move the determination of the image binding for CCS to a larger scope,
so that it can be reused for other aux usages in
add_aux_surface_if_supported().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Nanley Chery
b1a14fe923 intel: Return a bool from intel_aux_map_add_mapping
Make intel_aux_map_add_mapping return false if a mapping is attempted
that would conflict with an existing one. If this function doesn't
return false, it will either fail to return or return true.

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

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
2023-10-23 21:37:24 +00:00
Friedrich Vock
16e1163651 radv/rmv: Recognize LPDDR memory
Fixes: 8d0e6c02 ("radv: Add RMV tracing utilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25845>
2023-10-23 18:08:02 +00:00
Friedrich Vock
5e734a7cbf radv/rra: Recognize LPDDR memory
Also move away from using unnamed constants for memory types.

Fixes: aef7ea868f ("ac/gpu_info: handle LPDDR4 and 5 in ac_memory_ops_per_clock")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25845>
2023-10-23 18:08:02 +00:00
Eric Anholt
7a3fb60ac8 docs/ci: Add some links in the CI docs to how to track job flakes
and also figuring out how many boards are available for sharding
management.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25806>
2023-10-23 17:59:55 +00:00
Eric Anholt
553070f993 docs/ci: Drop old instructions for farm disabling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25806>
2023-10-23 17:59:55 +00:00
Corentin Noël
2ef0e6be17 util: Remove MESA_TRACE_BEGIN/END
There are no user of these macros anymore, simplify the cpu_trace header.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>
2023-10-23 17:20:03 +00:00
Corentin Noël
d64765c200 util/perf: Remove the tracing categories
The slow category remains unused in Mesa currently, readd it once we have
a use for it.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>
2023-10-23 17:20:03 +00:00
Corentin Noël
b7a4e78071 util: Avoid the use of MESA_TRACE_BEGIN/END
Switch the last occurrences of it to the MESA_TRACE_SCOPE macro which is
easier to use.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>
2023-10-23 17:20:03 +00:00
Corentin Noël
bf1a68833b venus: Change the only occurrence of VN_TRACE_BEGIN/END to VN_TRACE_SCOPE
This is the only part of venus using this macro, let's replace it with the scope
one.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>
2023-10-23 17:20:03 +00:00
Corentin Noël
c637901392 aux/tc: Use MESA_TRACE_SCOPE instead of _BEGIN/_END
The MESA_TRACE_SCOPE macro is an exact replacement for this.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>
2023-10-23 17:20:03 +00:00
Corentin Noël
57c6e79db5 tu: Use MESA_TRACE_SCOPE instead of _BEGIN/_END
The MESA_TRACE_SCOPE macro is an exact replacement for this.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>
2023-10-23 17:20:03 +00:00
Corentin Noël
f60a9d89c1 freedreno/drm/virtio: Use MESA_TRACE_SCOPE instead of _BEGIN/_END
The MESA_TRACE_SCOPE macro is an exact replacement for this.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25308>
2023-10-23 17:20:03 +00:00
Karol Herbst
e0301659f1 zink: fix zink_destroy_screen for early screen creation fails
Fixes crashes on at least my system with multiple GPUs.

Fixes: 0c2045553f ("zink: use screen destructor for creation fails")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25844>
2023-10-23 16:52:15 +00:00
Christian Gmeiner
90cd5f3799 etnaviv: Skip 'empty' cmd streams
Make use of etna_cmd_stream_mark_end_of_context_init(..) to mark the
end of context init states. If the cmd stream is untouched until
etna_cmd_stream_flush(..) gets called the drm layer will downgrade this
specific cmd stream to a noop.

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

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25849>
2023-10-23 14:56:48 +00:00
Christian Gmeiner
4c8fad4fd8 etnaviv: drm: Be able to mark end of context init
Add etna_cmd_stream_mark_end_of_context_init(..) which stores the current
offset of the cmd stream as offset_end_of_context_init. This information
will be used to downgrade a cmd stream flush to a noop.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25849>
2023-10-23 14:56:48 +00:00
Karmjit Mahil
2c62fdc8a7 pvr: Only setup the bgobj to load if we have a load_op
We only need to setup the background object if we have a load_op,
to perform the loads/clears.

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

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25703>
2023-10-23 08:18:33 +00:00
Eric Engestrom
fc62df19b7 ci/b2c: change artifacts path to match baremetal and LAVA
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25815>
2023-10-22 21:23:01 +00:00
Helen Koike
9f4f52f4f3 ci/ci_run_n_monitor: keep monitoring if a job is still running
When running multiple targets, the script was returning if any of the
targets failed.
But sometimes some of the targets are still running and we want to
monitor it until it finishes, even if some of the targets failed.

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

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25826>
2023-10-22 09:30:56 +00:00
David Heidelberg
59ee87b606 ci/freedreno: disable Adreno 660 Vulkan pre-merge
No need to move it to manual/nightly - we already run full runs there.

Revert when Adreno 660 gets stable again!

Reported-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25839>
2023-10-22 10:49:10 +02:00
Saroj Kumar
db5fc29116 radeonsi: fixes compilaton error when perfetto is disabled
Signed-off-by: Saroj Kumar <saroj.kumar@amd.com>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25827>
2023-10-22 05:43:59 +00:00
David Heidelberg
5d87cd4e51 ci/freedreno: fix copy paste causing a618_gl being run only in manual pipeline
Fixes: 9d442b459a ("ci/freedreno: handle disabling farm properly for each FD/Collabora farm")
Closes: #9992

Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25816>
2023-10-21 15:36:16 +02:00
Maaz Mombasawala
f4e7aefe07 svga: Unify gmr and mob surface pool managers
The svga driver contains several buffer managers with gmr* and mob* prefixes,
but they are of similar functionality. The underlying vmwgfx kernel driver
allocates memory of one type - mobs if supported by the virtual hardware,
and gmrs otherwise - and returns an opaque pointer to userspace, so several
managers are reduntant.

This patch reduces the number of buffer managers by unifying similar managers
and performing refactors where necessary.

Signed-off-by: Maaz Mombasawala <mombasawalam@vmware.com>

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25832>
2023-10-20 22:01:04 +00:00
Maaz Mombasawala
354f0b5b02 svga: Make surfaces shareable at creation.
There is no need to have a separate shareable pool of surfaces, we can make
all surfaces shareable.
This change makes all surfaces shareable when creating them.

Signed-off-by: Maaz Mombasawala <mombasawalam@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25832>
2023-10-20 22:01:04 +00:00
Yiwei Zhang
b0100d23fb ci/venus: mark more flaky tests after recent cts uprev
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25799>
2023-10-20 21:33:22 +00:00
Helen Koike
46fc9decad ci/marge_queue: add missing python-dateutils to requirements.txt
marge_queue.py requires python-dateutils to run, so add it.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25828>
2023-10-20 18:27:44 +00:00
Lucas Stach
f8753a542b mesa: add GL_APPLE_sync support
This extension is a backport of GL_ARB_sync to GLES 1.1 and 2.0
and reuses token IDs and entry point prototypes from that extension,
so adding support is pretty trivial.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25789>
2023-10-20 17:20:11 +00:00
Karol Herbst
c3516861e8 zink: properly alias shared memory
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25763>
2023-10-20 18:49:47 +02:00
Karol Herbst
389b0ce604 zink: wrap shared memory blocks in a struct
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25763>
2023-10-20 18:49:38 +02:00
David Rosca
2c1dff3851 frontends/va: Fix locking in vlVaBeginPicture
The assert in vlVaSetSurfaceContext would very rarely fail because
the mutex was already unlocked when calling this function from
vlVaBeginPicture.

Keep the lock until returning from vlVaBeginPicture, as that's what
other functions are already doing.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25823>
2023-10-20 15:14:41 +00:00
Vlad Schiller
c70687afe7 pvr: Implement VK_EXT_host_query_reset
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25783>
2023-10-20 14:58:12 +00:00
Vlad Schiller
649ebbb0fb pvr: Implement VK_EXT_texel_buffer_alignment
This commit will implement the VK_EXT_texel_buffer_alignment
extension and add the texture_baseaddress_byte_aligned feature.

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25781>
2023-10-20 14:42:05 +00:00
Vlad Schiller
ea59d61294 pvr: Enable VK_KHR_bind_memory2 extension
The two functions 'vkBindBufferMemory2' and 'vkBindImageMemory2' are aleady
implemented, and it seems that the flag does not need to be enabled for the
tests to pass.

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25779>
2023-10-20 14:26:36 +00:00
Vlad Schiller
1f056f229a pvr: Implement VK_KHR_external_semaphore
In order for the tests to pass, this commit also enables
the VK_KHR_external_semaphore_fd extension.

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25784>
2023-10-20 13:58:07 +00:00
Vlad Schiller
89f9724b1a pvr: Implement VK_KHR_external_fence
In order for the tests to pass, this commit also enables
the VK_KHR_external_fence_fd extension.

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25784>
2023-10-20 13:58:06 +00:00
Lionel Landwerlin
6f3dfba803 anv: document the draw indirect optimization ring mode
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361>
2023-10-20 13:07:53 +00:00
Lionel Landwerlin
454870dd5f anv: merge gfx9/11 indirect draw generation shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361>
2023-10-20 13:07:53 +00:00
Lionel Landwerlin
11b4c23d19 anv: add ring buffer mode to generated draw optimization
When the number of draw calls is very large, instead of allocating
large amounts of batch buffer space for the draws, use a ring buffer
and process the draw calls by batches.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8645
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361>
2023-10-20 13:07:53 +00:00
Lionel Landwerlin
718e77eee5 anv: index indirect data buffer with absolute offset
This will help for a follow up change where we will respawn the shader
multiple times in a loop and the base offset will be edited by the
shader itself.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361>
2023-10-20 13:07:53 +00:00
Lionel Landwerlin
db335d9b73 anv: factor out host/gpu internal shaders interfaces
This will prevent host/gpu structure definitions to go out of sync.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361>
2023-10-20 13:07:53 +00:00
Lionel Landwerlin
da1e39faa4 util/glsl2spirv: add ability to pass defines
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361>
2023-10-20 13:07:53 +00:00
Lionel Landwerlin
c700d47c56 anv: move generation batch fields to a sub-struct
Just tyding things a bit since we're about to add more.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361>
2023-10-20 13:07:53 +00:00