Commit graph

168772 commits

Author SHA1 Message Date
Tapani Pälli
07f8db02ff iris: cleanup, use intel_needs_workaround instead of is_dg2
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26666>
2023-12-15 06:13:41 +00:00
Tapani Pälli
2f25679b3f anv: cleanup, use intel_needs_workaround instead of is_dg2
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26666>
2023-12-15 06:13:41 +00:00
Tapani Pälli
012b6fbe63 drirc: setup anv_assume_full_subgroups=16 for UnrealEngine5.1
We set max subgroup size as 16 for 'UnrealEngine5.1', this improves a
customer benchmark by 50% on A750.

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/26385>
2023-12-15 05:28:51 +00:00
Tapani Pälli
7ff8f79a88 anv/hasvk/drirc: change anv_assume_full_subgroups to have subgroup size
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/26385>
2023-12-15 05:28:51 +00:00
Faith Ekstrand
1cf1b9d741 nir: Scalarize bounds checked loads and stores
Fixes: 39da1deb49 ("nir/lower_io: Add a bounds-checked 64-bit global address format")
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26526>
2023-12-15 03:53:54 +00:00
Caio Oliveira
81e3b28f78 compiler: Remove C++ static member pointers to builtin types
When we moved the bulk of glsl_type to C, these globals were
kept to avoid changes to compiler/glsl code in the MR.  Now that
landed, change the code to use the actual bultins directly.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26658>
2023-12-15 03:09:19 +00:00
Caio Oliveira
bfc953add7 intel/compiler: Use C helpers to access builtin types
Remove usage of C++ static members as they are going to be removed.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26658>
2023-12-15 03:09:19 +00:00
Caio Oliveira
90e364edb0 compiler/types: Add a few more helpers to get builtin types
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26658>
2023-12-15 03:09:19 +00:00
Faith Ekstrand
22b99f15b9 nvk: Use ENUM_PACKED for enums instead of PACKED
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:59 +00:00
Faith Ekstrand
45f320e97f nvk: Enable cbufs
Just in case this breaks and blows up the universe, we'll add a NO_CBUFS
debug flag as a back-door.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
2023-12-15 02:17:59 +00:00
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
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
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
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
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
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
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
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
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
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
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
Maíra Canal
d2a6383c64 v3dv: allow set_multisync() to accept more wait syncobjs
Currently, set_multisync() doesn't allow using external syncobjs as
in_syncs objects in the multisync extension. Add the possibility to use
external syncobjs as in_syncs. This will ease the synchronization of CPU
jobs, as they sometimes depend on external syncobjs, such as
query availability syncobjs.

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
f01d702d4a v3dv: allow different in/out sync queues
Allow in syncs and out syncs to be configured based on different queues.

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