Commit graph

172735 commits

Author SHA1 Message Date
Konstantin Seurer
00dec03438 radv: Use radv_buffer_map for parsing IBs
We need matching pointers pointers for annotations to work.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:14 +00:00
Konstantin Seurer
a78cbc98cc ac: Improve context roll readability
Add new lines to improve visual separation and color registers:
- red = unchanged
- green = changed

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:14 +00:00
Konstantin Seurer
1d747653d4 radv: Add an IB annotation layer
The layer annotates the command buffers with api
entrypoint names.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:14 +00:00
Konstantin Seurer
8f0ee3a92b radv: Add support for IB annotations
Wires up ac_parse_ib annotation support.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:14 +00:00
Konstantin Seurer
bf15688fa1 ac/parse_ib: Implement annotations
Annotates the IB dump with driver specified strings.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:13 +00:00
Konstantin Seurer
0f436e0fe1 ac/parse_ib: Replace the parameter list with ac_ib_parser
It's more code but it should be more readable. This also makes adding
optional arguments easier.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:13 +00:00
Konstantin Seurer
2e4d365104 ac: Annotate context rolls
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27549>
2024-03-19 16:08:13 +00:00
Timur Kristóf
8f3cc3cb29 radv: Use mapped driver locations for determining I/O strides.
This will allow us to more accurately determine the
input and output strides, because the I/O locations mapped
by RADV don't match the locations in NIR.
As a result, ESO will use less LDS.

It also fixes the per-patch output stride of tess control
shaders, because previously we omitted tess factors from them.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28021>
2024-03-19 15:01:19 +00:00
Timur Kristóf
2f1f55cf32 radv: Extract input and output stride info to new functions.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28021>
2024-03-19 15:01:19 +00:00
Eric Engestrom
c72bb8de75 r300: mark new fails
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/56480445

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28271>
2024-03-19 14:41:45 +00:00
Echo J
8c92ac3ee3 nvk: Add NVK to the Vulkan device name
Other Mesa Vulkan drivers do the same thing (this helps to identify
the driver better especially with the recent official name import)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28262>
2024-03-19 14:12:31 +00:00
Danylo Piliaiev
432d8bd081 freedreno/devices: Do not write to 8E79 on a750, KGSL has it protected
Writing REG_A7XX_RB_UNKNOWN_8E79 causes:
 adreno-gen7-gmu 3d68000.qcom,gmu: CP | Protected mode error | WRITE | addr=0x08e79 | status=0x00608e79

Fixes: ebde7d5e87
("tu/a7xx: Write even more magic regs to fix rendering issues on Android")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27912>
2024-03-19 13:35:12 +00:00
Daniel Schürmann
9bbb9f1104 aco: use small_vec as Block::edge_vec for predecessors and successors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27984>
2024-03-19 13:06:58 +00:00
Daniel Schürmann
3e58a736e4 aco/util: small_vec few additions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27984>
2024-03-19 13:06:58 +00:00
Rhys Perry
5cbd7689be aco/util: add small_vec
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27984>
2024-03-19 13:06:58 +00:00
Daniel Schürmann
4564ca313b aco: reorder code and use namespaces in aco_interface.cpp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27984>
2024-03-19 13:06:58 +00:00
Lucas Stach
c30c1af5db ci/etnaviv: update expectations
Now that the negative lodbias bug is fixed we can expect tests
using this to pass.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28224>
2024-03-19 12:27:38 +00:00
Lucas Stach
4b8981e471 etnaviv: fix fixpoint conversion of negative values
The hand rolled etnaviv conversion functions were able to handle
negative input values when converting to fixpoint. By replacing
them with U_FIXED all negative values are clamped to zero, which
breaks usages where negative inputs are valid, like lodbias.

Fixes: 8bce68edf5 ("etnaviv: switch to U_FIXED(..) macro")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28224>
2024-03-19 12:27:38 +00:00
Iago Toral Quiroga
bf3c1cf568 broadcom/ci: add a test that fails only in CI
This is a known bug in CTS affecting a number of tests in the
renderpass, renderpass2 and dynamic_rendering categories, but
it seems this is the only one triggered by CI. The bug has been
fixed in CTS 1.3.7.3.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
74be42d9a4 broadcom/ci: add new expected test failures
These start executing with dynamic rendering, and despite the name,
they don't actually require shader object. The reason they fail
is a bug in CTS (main).

Note: these are a crash in CI, but in CTS main they are a Fail.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
55a8c20e4d broadcom/ci: skips for tests that don't check for extension support correctly
We want these as skips instead of fails because there are many tests involved
and not all of them fail, so every time we add a new feature and change the
subset of tests we run in CI we start hitting different tests and we have
to keep patching the list, so just move them to skips since we know we don't
support them and we should not be running them.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
92172760e2 v3dv: enable VK_KHR_dynamic_rendering
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
7a2b17235d v3dv: also emit subpass clears with secondary command buffers
With dynamic rendering secondary command buffers can start subpasses
so we need this. Outside dynamic rendering secondary command buffers
won't be calling here since they are restricted to record commands
within a subpass.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
e9b44a3bb5 v3dv: handle render pass continue flag with dynamic passes
If a secondary command buffer recording a dynamic pass has the
VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT flag
then the rendering information for it should come from a
VkCommandBufferInheritanceRenderingInfo struct in the pNext
chain instead of the usual render pass information in the
VkCommandBufferInheritanceInfo struct. We take the information
from the new struct and build a render pass description from it
assuming a setup without a framebuffer (which is optional for
regular render passes too).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
f4ec92084e v3dv: fix resume address patching for secondary command buffers
Because we are cloning these into primaries but the cloning is
superficial the command lists in them still point to the original
jobs and therefore paching new addresses would make the packing
code add the BO of the resume address to the original job. This
has two problems:

1. This is probably not what we want since the patching should only
be affecting the clone.
2. The bo_count of the clone job will not be updated accordingly and
we end up with a mismatch that will blow up when we submit.

The solution used here is a big hack, but works for now: we just
specify the address by its full offset rather than a relative
offset from a BO. We already have to add all the BOS in the resume
job manually which will include this the BO for the branch address
too, so this is fine.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
0bb04c019e v3dv: rename SECONDARY job type to INCOMPLETE
This was used only in secondary CL command buffers so it made
sense but with dynamic rendering we are going to also have
regular CLs also in secondaries (since secondaries can now
record full dynamic rendering passes), so renaming this to
INCOMPLETE makes more sense, since this is really what they
refer to: parts of CLs that are intended to be merged into
other primaries through branching.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
2478939b69 v3dv: implement dynamic rendering resume/suspend
Dynamic rendering allows the client to suspend recording of a
render pass and have it continued in a different command buffer.
When a suspended command buffer is submitted to a queue, the
resuming command buffer must be te next one in submission order.
This means we need to be able to "merge" or "stitch" together
these command buffers at submit time.

To accomplish this, when we suspend a command buffer we emit
a BRANCH instruction to finish it. Then at submit time, when
we know the resuming job, we patch the BRANCH address with the
address of the resuming binning list (bcl). This is very similar
to how we execute secondary command buffers inside a render pass.
Also, only the last resuming job should flush the binning lists
in the bcl since we won't have processed the full binning command
list until we have execute the last linked job in the resume
list.

Since all jobs and command buffers in the suspend/resume chain
must be part of the same dynamic render pass, we only need to
produce and emit the render command list (rcl) once.

Since the way we implement stitching is that we branch from the
suspending job into the resuming one, the first job suspending
will link into all the resuming jobs necessary to complete the
chain, therefore, after the stitching is complete, we only want
to submit the first job in the suspend/resume chain, and thus,
we only produce and emit the rcl for this one job.

Notice as well that suspending only affects the last job
recording a dynamic rendering pass (the one that needs the branch
so we can resume execution with another job in another command
buffer).

Resuming affects all jobs in the dynamic render pass, since
we won't produce RCLs for them (as only the originating job
on the suspend/resume chain will emit the RCL).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
c15e0aac17 v3dv: implement vkCmdBeginRendering and vkCmdEndRendering
With this we are able to run basic dynamic render passes, however,
we are still missing a few things like support for secondary
render passes, suspend/resume, etc that will be adding in follow-up
patches.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
78015a9da3 v3dv: don't assume that pipelines have a render pass
This builds up on the previous patch and rewrites all the pipeline
code that fetched information from the pipeline's render pass (which
will be NULL for dynamic rendering) to instead fetch it through the
new rendering_info field, which will be valid for both regular and
dynamic render passes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:21 +00:00
Iago Toral Quiroga
e22d843fa4 v3dv: add a vk_render_pass_state to pipelines
With dynamic rendering the API formally eliminates render passes,
so the pipeline create info can now have a NULL render pass, in
which case rendering info must be provided via pNext struct
VkPipelineRenderingCreateInfo, or if this is missing too then
defaults to no multiview and no attachments.

Since we don't want to have separate paths all over the place
whenever we need to access render pass / rendering info for the
pipeline, we will always produce a valid vk_render_pass_state
struct with the relevant information even when we have a render
pass, so we can rely on that always being available.

A follow-up patch will rewrite all the places where we assumed
the existence of a render pass in the pipeline to instead fetch
the info it needs from this new field instead.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
10df187540 v3dv: add a helper to setup a framebuffer for dynamic rendering
Since the plan is to leverage our render pass infrastructure, we
also need to setup a framebuffer from the rendering info provided
with dynamic rendering.

We allocate the framebuffer lazily, only once, if a dynamic render
pass is used. To do this, we make it so it can hold the maximum
number of attachments possible with our hardware.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
6684aa09ff v3dv: add helper to build a render pass for dynamic rendering
The idea is to build a regular render pass from the rendering info
provided with dynamic rendering. We will use this when recording
dynamic render passes to leverage our existing implementation
for render passes with dynamic rendering.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
72c3769437 v3dv: add helper to check if we need to use a draw for a depth/stencil clear
We will need this when setting up dynamic render passes too.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
f1e6e58aef v3dv: add a helper to constrain clip window to render area
We will need to do the same when setting up dynamic render passes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
f285f69677 v3dv: refactor checking and adding pending jobs
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
e1b52e3052 v3dv: fix copying v3dv_end_query_info into primaries from secondaries
We had missed copying the count field.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
93f9f2bcbb v3dv: always set view index before drawing
It is allowed for a shader to enable the multiview extension
even if the draw call in which it is used doesn't use multidraw.
This allows the shader to still use gl_ViewIndex, which will
always be 0 in that scenario.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Iago Toral Quiroga
aeee18be1b v3dv: fix subpass clear with draw call for multi-layered framebuffers
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27978>
2024-03-19 12:06:20 +00:00
Mary Guillemard
9fd5ac42c3 panfrost: group up stubbed params in drm-shim
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Brezillon Boris <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28241>
2024-03-19 10:22:34 +00:00
Mary Guillemard
76397f76c9 panfrost: Add support for Panthor in drm-shim
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Brezillon Boris <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28241>
2024-03-19 10:22:34 +00:00
Mary Guillemard
9c92d92ab9 drm-shim: Add io region handling in mmap
This allows to replace mappings of io regions.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Brezillon Boris <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28241>
2024-03-19 10:22:34 +00:00
Samuel Pitoiset
4d4b1820ca radv: add radv_force_pstate_peak_gfx11_dgpu and enable it for Helldivers 2
This seems to definitely improve stability issues (random GPU hangs)
with Helldivers 2 on RDNA3 dGPUs. RDNA3 APUs and other generations
shouldn't be affected.

This is a workaround.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10584
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28260>
2024-03-19 09:06:43 +00:00
Pierre-Eric Pelloux-Prayer
99017891ca winsys/radeon: pass priv instead NULL to radeon_bo_can_reclaim
This fixes a NULL pointer issue.

Fixes: 4a078e693e ("r300,r600,radeon/winsys: always pass the winsys to radeon_bo_reference")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10613
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28240>
2024-03-19 08:46:27 +00:00
Samuel Pitoiset
9b089ca943 radv: fix occlusion queries with MSAA and no attachments
The number of samples should be the rasterization samples and not the
framebuffer samples.

Fixes recent dEQP-VK.query_pool.occlusion_query.no_attachments_*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28198>
2024-03-19 07:19:07 +00:00
Yonggang Luo
d17779430f util: Cleanup strtod.(h|c) by introduce _mesa_get_locale
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28174>
2024-03-19 04:05:08 +00:00
Marek Olšák
4ed3418a43 Unbreak Viewperf by reverting "util: use crc32_z instead of crc32 and bump zlib dep to 1.2.9"
It breaks apps shipping their own copy of zlib, such as Viewperf.
If we use crc32_z, Viewperf is unable to start because it's an undefined
symbol.

This reverts commit 010272b62e.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28233>
2024-03-19 03:08:10 +00:00
Marek Olšák
97084199bb radeonsi/ci: update failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28219>
2024-03-18 22:27:15 -04:00
Marek Olšák
b98bbb851c radeonsi/ci: run GLCTS, ESCTS, and dEQP from the glcts directory
GLCTS contains more recent dEQP, so we can remove the deqp clone.

Changes:
- glcts should use the main branch
- glcts/build contains gl-cts and deqp
- glcts/build_es contains gles-cts
- remove the escts and deqp directories and paths
- it saves about 27 GB of disk space

Updated build instructions:
    https://github.com/marekolsak/marek-build/

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28219>
2024-03-18 22:26:54 -04:00
Kenneth Graunke
8573e9bf47 ra: Add debug functions for printing spill costs and benefits
These have been incredibly useful when debugging regressions and weird
behavior in the Intel backend when trying to spill multiple registers
before retrying allocation.  With them, we can print out not only what
register was chosen, but the benefit and cost.  Seeing lists of chosen
registers where the benefit/cost was not sorted, and poor options were
chosen before better ones, led me to investigate a number of issues.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28257>
2024-03-19 00:40:52 +00:00
Connor Abbott
84e8a295a0 freedreno/afuc: Add section on reassembling firmwares and relocations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26771>
2024-03-18 20:34:08 +00:00