Commit Graph

201327 Commits

Author SHA1 Message Date
Samuel Pitoiset f55d4f2f09 radv: reserve space for push constants in the DGC ACE IB
The upload space will be shared for both IBs when push constants need
to be allocated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29935>
2024-06-28 06:19:56 +00:00
Samuel Pitoiset 8d321421c7 radv: rework emitting push constants with DGC
Using a push constant stages mask to emit them in the DGC ACE IB for
task shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29935>
2024-06-28 06:19:56 +00:00
Samuel Pitoiset f6150edbb3 radv: split allocating and emitting push constants with DGC
This will allow us to emit push constants for task shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29935>
2024-06-28 06:19:56 +00:00
Samuel Pitoiset 1f7bdcfa8d radv: add a helper that determines if DGC uses task shaders
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29935>
2024-06-28 06:19:56 +00:00
Samuel Pitoiset 58327fd3bf radv: pre-compute the base upload offset in radv_prepare_dgc()
It will need to be adjusted if task+mesh shaders need to allocate
push constants.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29935>
2024-06-28 06:19:56 +00:00
Samuel Pitoiset 842f3ea133 radv: improve clarity of DGC offset computations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29935>
2024-06-28 06:19:56 +00:00
Samuel Pitoiset bc52e77397 radv: fix incorrect cache flushes before decompressing DCC on compute
Found by luck.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29940>
2024-06-28 05:54:20 +00:00
Sagar Ghuge edcad250ed intel/compiler: Don't use half float param for sample_b
Looks like some of the tests uses the bias which does not fit into half
float parameter, so it's better to use float param for sample_b.

If we have cube arrays, we anyway combine BIAS and array index properly
so we don't have to worry about the first parameter.

This fixes: GTF-GL46.gtf21.GL3Tests.texture_lod_bias.texture_lod_bias_clamp_m_g_M

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29533>
2024-06-28 03:33:18 +00:00
Sushma Venkatesh Reddy d8c2930da0 drm-uapi: Sync i915_drm.h with a78313bb206e
Sync i915_drm.h with a78313bb206e
commit a78313bb206e0c456a989f380c4cbd8af8af7c76
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Jun 27 17:21:43 2024 +1000

    Merge tag 'drm-intel-gt-next-2024-06-12' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next

Fixes: a9f1151de2 ("intel/hang_replay: use hw image param")

Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29885>
2024-06-28 00:03:39 +00:00
Dylan Baker 35298e84f1 intel/compiler: move predicated_break out of backend loop
This has no impact on the generated shaders, but does have a small
(positive) impact on the amount of time spent in shader compilation.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29126>
2024-06-27 15:20:19 -07:00
Jordan Justen 7b3149c99b intel/brw: Retype some regs to BRW_TYPE_UD for Xe2 indirect accesses
Following https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28957,
some Xe2 code paths started triggering asserts.

In the cases fixed by this patch, it was because of the assert added
to brw_type_larger_of() in cf8ed9925f ("intel/brw: Make a helper for
finding the largest of two types"), and then brw_type_larger_of() is
used in 674e89953f. (For example, the assert was triggering when the
SHL types differed between D and UD.)

Fixes: 674e89953f ("intel/brw: Use new builder helpers that allocate a VGRF destination")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29925>
2024-06-27 21:51:07 +00:00
Karol Herbst 646a0ea576 meson: rename with_gallium_opencl to with_gallium_clover
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29646>
2024-06-27 20:50:32 +00:00
Patrick Lerda 82e9880b04 clover: fix meson opencl-spirv option
As reported by https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
this option is broken. Indeed, when "with_clc" is false the compilation
process failed with the following error:
"ERROR: Unknown variable "idep_mesaclc".

Fixes: 815a6647eb ("meson: do not pull in clc for clover")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29646>
2024-06-27 20:50:32 +00:00
Paulo Zanoni 746f41e705 anv: properly store the engine_class_supported_count values
Function anv_physical_device_try_create() creates the devinfo variable
and then at some point it copies its contents to device->info:

  device->info = devinfo;

Much much later we're calling:

  intel_common_update_device_info(fd, &devinfo);

... which is updating devinfo but not device->info. As a consequence,
we're only creating one queue, as engine_class_supported_count[klass]
is zero for everybody.

Fixes: 5b8b4f7878 ("intel/dev: Add engine_class_supported_count to intel_device_info")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29927>
2024-06-27 20:19:39 +00:00
Lionel Landwerlin cff6df7e11 anv: limit vertex fetch invalidation on indirect read
Only used on Gfx9

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29810>
2024-06-27 19:01:50 +00:00
Ian Romanick 531461d576 intel/brw: Test corner case CSE of ADD3 instructions
When the destination of both instructions is NULL and the conditional
modifier matches, operands_match (by way of instructions_match) will
only test the first two operands. This can result in bad CSE
happening.

This is a very, very narrow edge case.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29848>
2024-06-27 18:34:53 +00:00
Kenneth Graunke 7adccbd48d intel/brw: Support CSE of ADD3
This one is a bit more complex in that we need to handle 3-source
commutative opcodes.  But it's also quite useful:

fossil-db results on Alchemist (A770):

    Instrs: 151659750 -> 150164959 (-0.99%); split: -0.99%, +0.01%
    Cycles: 12822686329 -> 12574996669 (-1.93%); split: -2.05%, +0.12%
    Subgroup size: 7589608 -> 7589592 (-0.00%)
    Send messages: 7375047 -> 7375053 (+0.00%); split: -0.00%, +0.00%
    Loop count: 46313 -> 46315 (+0.00%); split: -0.01%, +0.01%
    Spill count: 110184 -> 54670 (-50.38%); split: -50.79%, +0.41%
    Fill count: 213724 -> 104802 (-50.96%); split: -51.43%, +0.47%
    Scratch Memory Size: 9406464 -> 3375104 (-64.12%); split: -64.35%, +0.23%

Our older Shadow of the Tomb Raider fossil is particularly helped with
over a 90% reduction in scratch access (spills, fills, and scratch
size).  However, benchmarking in the actual game shows no change in
performance.  We're thinking the game's shaders have been updated since
our capture.

Ian noted that there was a bug here where we'd accidentally CSE two ADD3
instructions with null destinations and different src[2] that couldn't
be dead code eliminated due to conditional mods.  However, this is only
a bug in the new cse_defs pass so we don't need to nominate this for
stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29848>
2024-06-27 18:34:53 +00:00
Eric Engestrom e1b1114bc2 v3d/ci: add nightly job for rusticl testing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29851>
2024-06-27 17:49:02 +00:00
Eric Engestrom 959d38099f llvmpipe,rusticl/ci: move rusticl files rule out of llvmpipe
With the next commit, llvmpipe will no longer be the only driver to test rusticl.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29851>
2024-06-27 17:49:02 +00:00
Eric Engestrom 70dfe9c6d1 ci: include rusticl in the arm64 build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29851>
2024-06-27 17:49:02 +00:00
Eric Engestrom b2a025f9a2 llvmpipe/ci: set rusticl variables in deqp-runner instead of passing them down from the job
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29851>
2024-06-27 17:49:02 +00:00
Eric Engestrom 5b3782a5ab llvmpipe/ci: fix indentation of list nested in a dict item
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29851>
2024-06-27 17:49:01 +00:00
Eric Engestrom 3d09f93287 llvmpipe/ci: add comment for later on weird-looking code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29851>
2024-06-27 17:49:01 +00:00
Mike Blumenkrantz 332252966b ci: kill filament trace globally
this one is flaky and pointless

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29937>
2024-06-27 14:36:13 +00:00
Vinson Lee 7c72580d23 panvk: Remove duplicate variable src_idx
Fix defect reported by Coverity Scan.

Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In src_idx = src_idx = binding_layout->desc_idx + i * desc_stride + subdesc_idx,
src_idx is written twice with the same value.

Fixes: 7bea6f8612 ("panvk: Overhaul the Bifrost descriptor set implementation")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29865>
2024-06-27 12:49:30 +00:00
Alexandre Marquet f5b44838a1 panfrost: implement SFBD raw format support on v4
For v4 GPUs, raw formats support is currently advertised as "not finished for SFBD".
This patch implements it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10571
Signed-off-by: Alexandre Marquet <tb@a-marquet.fr>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29062>
2024-06-27 12:21:03 +00:00
Collabora's Gfx CI Team 965627bc48 Uprev Piglit to 647d0725024f72bc49bbc91c686c5f61168a1fe8
https://gitlab.freedesktop.org/mesa/piglit/-/compare/fdf3fc09deb6beecdf212e65a16c645112540b59...647d0725024f72bc49bbc91c686c5f61168a1fe8

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29886>
2024-06-27 11:26:26 +00:00
Boris Brezillon 0e74b6eda9 panvk: Add support for layered rendering
This is needed if we want to use vk_meta_blit.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-27 10:57:39 +00:00
Boris Brezillon 743b41a284 panvk: Use IDVS jobs when we can
This optimizes things by splitting the position and vertex
processing in two, allowing primitives to be discarded before
the varying shader is executed.

This optimization is even more important if we throw
layered rendering into the mix, because layered rendering on
Bifrost is implemented with N IDVS/fragment jobs (N being the
number of layers), with primitives not targetting a given
layer being artificially culled in the vertex shader by
issuing a position outside the render area.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-27 10:57:39 +00:00
Boris Brezillon 8293376f7c pan/blitter: Let pan_preload_fb() callers queue the jobs to the job chain
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-27 10:57:38 +00:00
Boris Brezillon 629b9258df pan/desc: Prepare things for fragment job chaining
Right now we assume the fragment job chain contains only one job, but
with multilayer/multiview rendering, we want to submit fragment jobs
for all layers at once.

Turn pan_emit_fragment_job() into pan_emit_fragment_job_payload() and
delegate the job header packing to the caller.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-27 10:57:38 +00:00
Boris Brezillon c694556657 pan/desc: Extend pan_emit_fbd() to support multilayer rendering
Right now, we always emit a framebuffer descriptor for the first layer
in the RT views. Extend the logic so we can emit one FBD per layer we're
supposed to render to without having to manually modify the RT views.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-27 10:57:38 +00:00
Samuel Pitoiset 037eaa962b radv: add support for executing the DGC ACE IB
It's disabled for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29814>
2024-06-27 10:22:50 +00:00
Samuel Pitoiset 1e0c6fab21 radv: add support for preparing the ACE IB in DGC
This is still missing push constants.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29814>
2024-06-27 10:22:50 +00:00
Samuel Pitoiset 723acbe1e2 radv: add a helper to pad DGC IB
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29814>
2024-06-27 10:22:50 +00:00
Samuel Pitoiset 0a5c6415d1 radv: refactor some DGC helpers in preparation for the ACE IB
These will be re-used for generating the ACE IB.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29814>
2024-06-27 10:22:49 +00:00
Samuel Pitoiset 12cc97a157 radv: prepare for DISPATCH_TASKMESH_DIRECT_ACE emission in the DGC shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29814>
2024-06-27 10:22:49 +00:00
Samuel Pitoiset 8a81a6066d radv: prepare for DISPATCH_TASKMESH_GFX emission in the DGC shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29814>
2024-06-27 10:22:49 +00:00
Samuel Pitoiset bdbe3e5886 radv: add support for computing the DGC ACE IB size
For task shaders, RADV will need to prepare two command buffers in the
DGC prepare shader. The preprocess buffer will be splitted in two
parts, one for GFX and one for ACE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29814>
2024-06-27 10:22:49 +00:00
Samuel Pitoiset 99cd8b6a54 radv: add a helper to execute a DGC IB
It will be used to execute DGC IB for task shaders too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29814>
2024-06-27 10:22:49 +00:00
Konstantin Seurer e6772654ac venus: Disable sparse binding on lavapipe
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Konstantin Seurer 6f28bf41f2 venus: Refactor hiding sparse features and properties
Disabling them after querying allows for driver workarounds.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Konstantin Seurer 6168317b84 lavapipe: Implement shaderResourceResidency
Adds a bit set to llvmpipe_resurce where each bit stores the residency
of a 64KB tile. The sampling code is adjusted to make use of said table
and return a residency code for sparse texture operations.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Konstantin Seurer d747c4a874 lavapipe: Implement sparse buffers and images
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Konstantin Seurer a062544d3d llvmpipe: Use an anonymous file for memory allocations
Preparation for sparse.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Konstantin Seurer fcc0fd2fc1 gallium: Add a memory range parameter to resource_bind_backing
Needed to bind regions of the resource.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Konstantin Seurer 56028a888e lavapipe: Do not allocate 0 sized buffers for descriptor sets
This will crash the new llvmpipe allocation mechanism.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Dave Airlie 3d159c02f6 llvmpipe: Introduce llvmpipe_memory_allocation
Will be useful for adding sparse info to pipe_memory_allocation.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:34 +00:00
Konstantin Seurer eb64ce4386 util: Add a helper for querying sparse tile sizes
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29408>
2024-06-27 09:29:33 +00:00
Tapani Pälli a603cc0633 anv: move some pc was to batch_emit_pipe_control_write
These were only applied in emit_apply_pipe_flushes but in theory could
be required for some other individually shot pipe controls.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29897>
2024-06-27 09:02:03 +00:00