Commit graph

67133 commits

Author SHA1 Message Date
David Rosca
35eb12e2fd frontends/va: Evict unused surfaces from encode DPB
Application should send the full DPB state in each pic to keep
the references alive. Ideally the surfaces would be evicted immediately,
but unfortunately this breaks some applications. Add evict flag and
only evict surfaces if not present in reference frames array for two
consecutive frames.
DPB buffers are not destroyed upon eviction, but instead they are kept
around and reused next time a new surface is added to DPB.

Fixes: cc14724d73 ("frontends/va: Implement DPB management for H264/5 encode")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31741>
2024-10-24 12:36:37 +00:00
David Rosca
33c6491244 pipe: Fix video enc max DPB size for H264
H264 have 16 as maximum DPB size by spec (A.3.1. f) MaxDpbFrames).
For encode we need one more slot for current recon, so use max size + 1.

Fixes: cc14724d73 ("frontends/va: Implement DPB management for H264/5 encode")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31741>
2024-10-24 12:36:37 +00:00
Daniel Schürmann
87cb42f953 treewide: don't lower to LCSSA before calling nir_divergence_analysis()
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
8d1abd4996 treewide: use nir_src_is_divergent() rather than checking the divergence of the SSA
Without LCSSA, divergence between src and def might differ.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Tapani Pälli
dcb88ea4ab anv/iris: add note about Wa_18039438632 for RT flush after SBA
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31801>
2024-10-24 04:29:56 +00:00
Eric Engestrom
1cb4378479 zink+turnip/ci: update a750 results
These are regressions, but impossible to bisect since everything was
completely broken for ages and no test could run at all.

A commit in the range 834b919f...02269223 fixed it, and we now have
results, so let's update the results so that we can see future
unexpected results!

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31806>
2024-10-23 18:09:28 +00:00
Tapani Pälli
9465d6e3d7 iris: implement VF_STATISTICS emit for Wa_16012775297
Emit dummy VF_STATISTICS state before each VF state.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31759>
2024-10-22 20:19:48 +00:00
José Roberto de Souza
3ed020031c iris: Program async compute registers of STATE_COMPUTE_MODE in compute engine
Iris also makes use of compute engine in paralel with render engine,
so here also programing the async compute registers like it is done
in ANV.
This should improve performance when render and compute engine
are running in parallel.

It was also necessary to copy 2 workarounds that are needed before
programing STATE_COMPUTE_MODE.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30796>
2024-10-22 15:24:32 +00:00
David Rosca
4adb652392 frontends/va: Don't relock mutex in vlVaEndPicture
While this should not cause any real issues, there is no reason
to unlock the mutex just to lock it again couple lines below.

Fixes coverity issue 1559431 Value not atomically updated

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31622>
2024-10-22 14:48:29 +00:00
David Rosca
2cb3c2e8d5 frontends/va: Fix parsing leb128 when using more than 4 bytes
Bit shift would go over 32 bits. Also add assert for maximum
value as allowed by spec.

Fixes coverity issue 1469252 Bad bit shift operation

Fixes: 5edbecb856 ("frontends/va: adding va av1 encoding functions")
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31622>
2024-10-22 14:48:29 +00:00
David Rosca
91222671f1 frontends/va: Fix NULL check in intra refresh params
Return early when p_intra_refresh is NULL.

Fixes coverity issue 1553113 Dereference after null check

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31622>
2024-10-22 14:48:28 +00:00
David Rosca
f9d1a50d8d frontends/va: Fix some small coverity issues
* 1547216 Operands don't affect result
  - PRESET_MODE_HIGH_QUALITY is maximum value
* 1255678 Dereference after null check
  - no need to check against NULL because the data can
    only be NULL when the array is empty (size == 0)
* 1619397 Unsigned compared against 0
  - check >= 0 is always true in vlVaAddRawHeader
*  1468885 Dereference null return value
  - add NULL check for buffers in vlVaRenderPicture

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31622>
2024-10-22 14:48:28 +00:00
Marek Olšák
0bffe8ec05 mesa_interface: rename __DRIimage to struct dri_image
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
ee54fe9f69 mesa_interface: rename __DRIconfig to struct dri_config
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
872b5c70d1 mesa_interface: remove redundant __DRI*Rec types
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
186a3b6dad mesa_interface: replace opaque __DRIdrawable with struct dri_drawable everywhere
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
329e03535b mesa_interface: replace opaque __DRIcontext with struct dri_context everywhere
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
1ce9aa3d65 mesa_interface: replace opaque __DRIscreen with struct dri_screen everywhere
it's always struct dri_screen

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
3b603d1646 mesa_interface: remove unused stuff
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:01 +00:00
Louis-Francis Ratté-Boulianne
7af000a6ec panfrost: initialize all UBO and vertex buffer descriptors
When tracing the command stream with PAN_MESA_DEBUG=trace, all
descriptors are read and decoded. Trying to read an invalid or old
descriptor might cause confusion or (more importantly) a crash.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31768>
2024-10-22 05:01:27 +00:00
Adam Jackson
514ba16d95 rusticl: Enable out-of-order execution
Ought to work, let's find out.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12029
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31672>
2024-10-22 00:03:48 +00:00
Karol Herbst
1798597637 radeonsi: move si_compute::global_buffers to si_context
si_set_global_binding is a context function, but it touches the bound
compute program. As radeonsi also advertizes PIPE_CAP_SHAREABLE_SHADERS
this function is supposed to be safe when the same compute state object is
bound to multiple contexts at once.

In order to fix this data race global_buffers is moved to si_context so it
becomes context private data instead.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31672>
2024-10-22 00:03:48 +00:00
Christian Gmeiner
fad599a619 etnaviv: Enable ARB_framebuffer_no_attachments
There is not much needed to pass the supported tests.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31578>
2024-10-21 23:27:30 +00:00
Eric Engestrom
d117411309 {freedreno,intel}/ci: add missing tracking of merge-skips.txt files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31739>
2024-10-21 10:22:57 +00:00
Eric Engestrom
ee0d782229 {freedreno,intel}/ci: rename "premerge-skips.txt" to "merge-skips.txt" to accurately reflect what they are
This also means the infrastructure added by @gallo in 1dc64d0613
("ci: Use merge-skips files during merge pipelines") can be used and all
the manual adding of these files can be dropped, reducing the likeliness
of bugs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31739>
2024-10-21 10:22:57 +00:00
Pavel Ondračka
9672f9732f r300/ci: add new RV410 flakes
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31753>
2024-10-21 08:22:32 +00:00
Georg Lehmann
10951bb11a aco: fix 64bit extract_i8/extract_i16
The old code only sign extended to 32bit, with a zero hi half.

Fixes: 1f2518ef9f ("aco: implement nir_op_extract/nir_op_insert")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31734>
2024-10-21 07:13:57 +00:00
Georg Lehmann
894c4f0c78 meson: remove selinux option
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31656>
2024-10-21 01:14:35 +00:00
Mary Guillemard
4bc2d221c9 winsys/nouveau: Reformat to stop relying on tabs
Also remove .editorconfig as we don't need it anymore.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31667>
2024-10-19 17:24:46 +02:00
Mary Guillemard
f9e72b7fcb winsys/nouveau: Rework to use u_pipe_screen_lookup_or_create
All the boilerplate can be removed to use u_pipe_screen_lookup_or_create
instead.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31667>
2024-10-19 17:24:46 +02:00
Eric Engestrom
c4e8e3fb2f zink+nvk/ci: document more flakes seen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31740>
2024-10-18 17:57:45 +00:00
Eric Engestrom
3a7881d126 zink+nvk/ci: mark a few tests as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31740>
2024-10-18 17:57:45 +00:00
Mike Blumenkrantz
b4e18fb188 vdpau: fail context create if driver does not support video
not all drivers support this, and forcing them to implement stubs
is not how gallium works

cc: mesa-stable

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31736>
2024-10-18 15:54:41 +00:00
Mike Blumenkrantz
fd0b20e8e8 va: fail context create if driver does not support video
not all drivers support this, and forcing them to implement stubs
is not how gallium works

cc: mesa-stable

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31736>
2024-10-18 15:54:41 +00:00
Pierre-Eric Pelloux-Prayer
19fa5561be radeonsi: fix radeon_canonicalize_bo_flags domain handling
ffs(VRAM, GTT) returns the GTT bit as it's the smaller.

Simplify the code by explicitely selecting VRAM when both
domains are active, otherwise assert that only 1 bit is set.

Fixes: 593f72aa21 ("winsys/amdgpu-radeon: rework how we describe heaps")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31683>
2024-10-18 14:04:02 +02:00
Pierre-Eric Pelloux-Prayer
bb08596645 radeonsi/gfx12: fill missing dcc tiling info
Display DCC support has been enabled in 0bb83a4060 but this TODO
was forgotten.
Now that the kernel is fixed, we can set the related fields.

Fixes: 0bb83a4060 ("ac/surface: finish display DCC for gfx12")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31683>
2024-10-18 14:03:46 +02:00
Collabora's Gfx CI Team
19ef6b247e Uprev Piglit to 791e420b2628c1e35eea81b3bafdb1c904a141e8
7ce69da119...791e420b26

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31716>
2024-10-18 10:40:31 +00:00
Lionel Landwerlin
0317c44872 anv: add VK_EXT_host_image_copy support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
2024-10-18 07:43:37 +00:00
Mike Blumenkrantz
085e7e419d zink: rewrite the high-IQ image tiling selection loop
this took me almost an hour to properly rewrite and I still
don't know why I wrote it like this in the first place

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31714>
2024-10-18 06:28:55 +00:00
Faith Ekstrand
d52a9d832e nvk: Put a sample map in the descriptor for MSAA storage images
This tells us exactly where each sample instead of assuming they're laid
out row-major. NIL_SAMPLE_LAYOUT_4X2_D3D is not row-major.

Fixes: 8f1697b12d ("nil: Use D3D sample modes by default")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31727>
2024-10-18 04:56:26 +00:00
Guilherme Gallo
6e0325dc5a ci/zink: Add skips for zink-anv-(adl|tgl)
Some tests are taking too long to finish

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:45 +00:00
Rob Clark
7e4e46a004 freedreno/a6xx: Add missing GRAS_SU_DEPTH_CNTL
And GRAS_SU_STENCIL_CNTL.. Needed on a750.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
a1f2a8ebb9 freedreno/a6xx: Add VPC hardware workaround for a750
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
ecc8d271e1 freedreno/a6xx: Don't open-code INVALID_REG
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
65df706b21 freedreno/a6xx: Fix color_cache_size
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
3a0b022136 freedreno/a6xx: Add support to load driver-params via UBO
In this case, we can't use CP_LOAD_STATE to push the consts inline in
the cmdstream, but instead need to setup a UBO.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
f193c61c6b freedreno: Rework indirect compute param emit
There are more driver params than what is contained in the indirect
buffer.  So switch things around to always allocate a buffer into which
we copy the indirect params.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
97ab362914 freedreno/ir3: Track # of app UBOs
Before the gallium driver can support load_shader_consts_via_preamble it
needs a way to differentiate between # of API level UBOs and the number
of UBOs after the driver inserts ones for driver-params, etc.  This is
because the driver UBOs are emit in a different place from user UBOs.
If we didn't have this distinction, and the app had more UBOs bound than
the shader used, we would otherwise emit some conflicting UBO
descriptors (ie. ones for unused const slots conflicting with the driver
UBO slots).

This also moves the consts_ubo emit into the PROG state.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
94c3c39f21 freedreno/a6xx: Move tess-bo emit
Move this to where the rest of the hs/ds params are emit, because for
a7xx with load_shader_consts_via_preamble we'll need this all to be a
single UBO.  So we won't be able to piecemeal upload consts.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
efb93c9f52 freedreno/a6xx: Fix double SP_MODE_CONTROL emit
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00