Commit graph

182252 commits

Author SHA1 Message Date
Faith Ekstrand
d41fe63d99 nvk: Add debug flags to the physical device
These should probably go on the instance but everything is tangled up
too badly right now.  This at least moves them to some place where we
have them without a nouveau_ws_device.  It's fine to do this because
debug flags are an environment variable and won't change across a run.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:59 +00:00
Faith Ekstrand
ee29a8d1cd nvk: Upload cbufs based on the cbuf_map
For draw, this requires that we use a macro to read descriptors out of
the descriptor buffer because we may not have that information easily
available on the CPU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
e6cd4b177a nvk: Don't flush descriptors in BeginConditionalRendering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
869f5fc680 nvk: Set MME_DATA_FIFO_CONFIG on device init
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
951d96a1a2 nvk: Rework push_indirect to take an address
The only reason we took a buffer bevore was to support the old kernel
API.  We can simplify the function now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
af3e7ba105 nvk: Stash descriptor set sizes
To save space in the root descriptor table, we put these in the CPU-only
descriptor structure instead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
107a09e7dd nvk: Add a cbuf_bind_map to nvk_shader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
bdec097bb8 nvk/nir: Lower UBO loads to load_ubo when we have a cbuf
This will make it go through the cbuf path in NAK.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
f1c909edd5 nvk/nir: Add cbuf analysis to nvi_nir_lower_descriptors()
This builds a list of the 15 most commonly used UBOs or descriptor
buffers and places them in a new nvk_cbuf_map data structure.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
952e06672f nak/sm50: Add legalization and encoding for OpLdc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
2199eea31b nak/sm50: Fix legalization of OpIAdd
Most of them specified bits 20..40 which is wrong because it's actually
19 bits with the sign bit off in bit 56 for some reason.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
e697280ebf nak/sm50: Fix immediate encodings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
eabd8cd470 nak: Handle negative cbuf offset immediates
This can happen with indirect UBO pulls because we just try go find an
iadd in NIR and one side may be negative.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
7bfb7a2b81 nak: Rework the dependency pass
This breaks the dependency pass in two.  The first pass builds a
dependency graph, including first-wait information for each barrier.
The second applies uses the newly constructed dependencies to place
barriers.  This fixes at least two known bugs:

 1. We were placing redundant write barriers.  In the case where we did
    a load, for example, we would add read barriers for the address and
    write barriers for the result.  In the fairly common case where the
    result is used before someone tries to overwrite the address, we
    don't actually need both barriers because a wait on the result
    implies a wait on the sources.

 2. There were a bunch of WaR cases which weren't being handled
    correctly.  In particular, when a variable-latency instruction read
    a register and then a fixed fixed-latency instruction read it, the
    fixed-latency read would replace the variable latency read.  When we
    then wrote that value with a fixed-latency instruction, we wouldn't
    see the hazard.  This commit fixes it by replacing the single last
    use per reg with a Vec of uses in the case of reads.

This fixes all known 1.1 memory model fails.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Faith Ekstrand
8006f271d4 nak: Add a delay of 2 cycles for barriers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:58 +00:00
Sil Vilerino
0739927080 d3d12: Remove D3D12_SDK_VERSION checks after bumping directx-headers dependency to v611
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26556>
2023-12-14 20:06:53 -05:00
Sil Vilerino
90b49f16f7 d3d12: Bump directx-headers dependency to v611.0 for latest video codecs and features
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26556>
2023-12-14 20:06:52 -05:00
Jesse Natalie
2ea04ef69b vulkan/wsi: Convert bit tests to bool with != 0
Otherwise the bool result could be some value other than 0 or 1.

Fixes: d7938de8 ("vulkan/wsi: don't support present with queues where blit is unsupported")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26706>
2023-12-15 00:39:10 +00:00
Jesse Natalie
19175e474b microsoft: Whitespace change to trigger CI
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26706>
2023-12-15 00:39:10 +00:00
Jordan Petridis
62c797f5f3 Revert "ci: take microsoft farm offline"
Infrastructure issues [1] have been solved, sort of! Let's give
it a go again!

This reverts commit 0957b01a06.

[1]: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/37270

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26706>
2023-12-15 00:39:10 +00:00
GKraats
4fe9a6053a i915G: show correct number of needed ALU instructions at errmess
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26340>
2023-12-14 23:24:32 +00:00
Daniel Stone
752b23547a panfrost/ci: Skip broken image copy tests
Any kind of image copy with a conversion (between channel
size/order/content, or between tiling mode) seems liable to failure.
Since this seems like a general problem, just skip the entire battery of
tests until it can be systematically fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26449>
2023-12-14 22:53:40 +00:00
Daniel Stone
f51d99def6 panfrost/ci: Add environment variable to suppress warnings
Without it, our test log fills up with warnings that crawling index
buffers from the CPU isn't valid. We know that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26449>
2023-12-14 22:53:39 +00:00
Daniel Stone
ac613b9e44 panfrost/ci: Remove Vulkan expectations from G57
panvk doesn't yet support G57.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26449>
2023-12-14 22:53:39 +00:00
Thomas H.P. Andersen
487837c0bf docs: update features.txt for nvk
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26676>
2023-12-14 22:41:37 +00:00
Eric Engestrom
871ea3bb88 radv/ci: add flake
Failed in https://gitlab.freedesktop.org/mesa/mesa/-/jobs/52773139

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26704>
2023-12-14 22:13:45 +00:00
Eric Engestrom
64c2a0489d docs: drop : in title
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26702>
2023-12-14 22:07:08 +00:00
Eric Engestrom
b557362b3a ci: run every test when changing the build
Changing meson options, checks or dependencies can affect drivers, so
they should be tested.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26625>
2023-12-14 20:58:16 +00:00
Eric Engestrom
9041084dd5 ci: fix indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26625>
2023-12-14 20:58:16 +00:00
Eric Engestrom
efa331a589 v3d/ci: add flake
Failed in https://gitlab.freedesktop.org/mesa/mesa/-/jobs/52760914

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26695>
2023-12-14 20:37:52 +00:00
Daniel Schürmann
42e9ba1c70 aco: remove VCCZ and EXECZ register handling
We don't use these registers and since RDNA3 removed the explicit usage,
it is unlikely that we will properly support them in the future.
Removing the registers from the ACO IR prevents accidentally using them
without proper support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26664>
2023-12-14 20:08:28 +00:00
Daniel Stone
8085145db0 ci: Fix trivial typo in ARTIFACTS_BASE_URL
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26690>
2023-12-14 19:24:35 +00:00
Maíra Canal
3b715fb99d v3dv: enable CPU jobs in the simulator
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:14 +00:00
Maíra Canal
f11a458a50 v3d/v3dv: move V3D_CSD definitions to a separate file
Both OpenGL and Vulkan drivers share the same V3D_CSD definitions.

Therefore, move it to a common place instead of duplicating.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
35b4dcb2f2 v3dv: use the copy performance query results user extension
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
8913c134e4 drm-uapi: extend interface for copy performance query CPU job
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
43258ad44b v3dv: use the reset performance query user extension
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
b2db2e3f33 v3dv: don't start iterating performance queries at zero
Currently, the function handle_reset_query_cpu_job() starts to iterate
between the performance queries in the zero-index. This is not correct,
as we should start iterating the performance queries at first, which
is a index indicated by info->first.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
6089982a82 drm-uapi: extend interface for the reset performance query CPU job
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
4a9da29016 v3dv: use the copy timestamp query results user extension
The copy timestamp query user extension allows the creation of a CPU job
that copies the results of a timestamp query to a BO with the possibility
to indicate the timestamp availability with a availability bit.

By using the copy timestamp query user extension, it will be possible to
use the multisync user extension to synchronize this type of job, which
currently possible with the user space implementation without stalling.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
a990defab3 drm-uapi: extend interface for copy timestamp results CPU job
Extend the UAPI to support the copy timestamp results user extension for the
CPU job. This user extension will allow the creation of a CPU job that
copies the results of a timestamp query to a BO with the possibility to
indicate the timestamp availability with a availability bit.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
d1d52ebdc9 v3dv: use the reset timestamp user extension
The reset timestamp user extension allows the creation of a CPU job that
resets a timestamp query by updating its value in the timestamp BO and
resetting the availability syncobj.

Using the reset timestamp user extension, it will be possible to use the
multisync user extension to synchronize this type of job, which is not
currently possible with the user space implementation without stalling.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
7af9b47471 drm-uapi: extend interface for reset timestamp CPU job
Extend the UAPI to support the reset timestamp user extension for the
CPU job. This user extension will allow the creation of a CPU job that
resets a timestamp query by updating the timestamp BO and reseting the
timestamp's availability syncobj.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
17e03ebacd v3dv: use the timestamp query user extension
The timestamp query user extension allows the creation of a CPU job that
calculates the timestamp by updating its values in a BO with the appropriate
offsets and signalling the availability syncobjs.

The CPU job should be serialized so it only executes after all previously
submitted work has completed. This is accomplished by setting job->serialize
to V3DV_BARRIER_ALL before setting the multi-sync extension.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
d48aaa4773 drm-uapi: extend interface for timestamp query CPU job
Extend the UAPI to support the timestamp query user extension for the
CPU job. This user extension will allow the creation of a CPU job that
calculates the query timestamp by updating a timestamp BO with its value
and signaling the availability syncobj.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
2e32644e35 v3dv: occlusion queries aren't handled with a CPU job
A CPU job of type V3DV_JOB_TYPE_CPU_RESET_QUERIES is only created for
performance and timestamp queries. Occlusion queries are handled with a
compute job. Therefore, there is no need to handle occlusion queries in
the CPU job.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Iago Toral Quiroga
2a0d196abf v3dv: switch timestamp queries to using BO memory
Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
e404ccba5b v3dv: use the indirect CSD user extension
The indirect CSD user extension allows the creation of a CSD
job linked to a CPU job. When we submit the CPU job, the CPU job
will run when the indirect CSD dependency is completed, map the
indirect buffer to read the CSD dispatch parameters and reconfigure
the CSD job accordingly.

Using the indirect CSD user extension, allows us to use the multisync
user extension to synchronize this type of job, which is not currently
possible from user-space without stalling.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
b1134775e0 v3dv: create a CPU queue type
We will be introducing a new type of queue, a CPU queue. This queue will
be responsible for handling the CPU jobs, such as timestamp queries and
indirect CSD dispatch.

Therefore, add a CPU queue to the enum v3dv_queue_type and its
respective barrier.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00
Maíra Canal
e162308298 v3dv: check CPU queue availability
Include a check to assure that the kernel driver supports the CPU queue.
Also, indicate that, currently, the simulator doesn't have support for
the CPU queue.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26448>
2023-12-14 16:43:13 +00:00