Commit graph

197200 commits

Author SHA1 Message Date
Louis-Francis Ratté-Boulianne
e9e0153248 pan/cs: only flush block instrs if there is a pending if block
It is only needed for pending `if` block as it's the only block
we don't end normally and where instructions are only flushed when
we are certain that no `else` branch is gonna be added.

It also collide with scenarios where we want to add a preamble
before inserting a block.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:20 +00:00
antonino
f98e01f0d2 pan/cs: add support for nop instruction
Signed-off-by: antonino <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:20 +00:00
Konstantin Seurer
0963a0a2b4 radv: Move ac_addrlib to the physical device
There is nothing amdgpu specific here so this does not need to be
abstracted away. max_alignment also is not used in winsys code.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31643>
2024-10-28 20:06:38 +00:00
Maaz Mombasawala
984087ee16 svga: Support older define commands for userspace surfaces
Older HW versions of the svga device will only support older versions of
DefineGBSurface command.
Add support for v3 and v2 of the DefineGBSurface command when making
userspace managed surfaces. The first version of the command is not
supported since it is only used for pre-vgpu10 hardware.

This change was tested with all piglit tests under spec@arb_copy_buffer@*
on VMs with older hw versions, with userspace surfaces turned on.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31744>
2024-10-28 19:46:31 +00:00
Maaz Mombasawala
88804b8265 svga: Introduce userspace managed surfaces
Surfaces are currently managed by the vmwgfx kernel driver, and userspace
interacts with surfaces through DRM_VMW_*_SURFACE ioctls.
We would like to move to userspace managed surfaces to simplify surface
and buffer management across mesa and kernel driver.

This change introduces such surfaces, in which the userspace manages surface
id's and submits the create and destroy commands.

Userspace managed surfaces can be enabled with VMW_SVGA_USERSPACE_SURFACE
environment variable.

This change is tested with all piglit tests under spec@arb_copy_buffer@*
with userspace surfaces turned on.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31744>
2024-10-28 19:46:31 +00:00
Maaz Mombasawala
40e6761262 svga: Ensure an active context exists for a vmw_screen
We would like to move to surfaces that are managed by userspace instead of the
vmwgfx kernel driver. This requires an active context to be present during the
lifetime of a vmw_screen so that the screen can submit the appropriate surface
create and destroy commands.

This patch adds that context to a vmw_screen. An application may submit a
context destroy command before the surfaces have been destroyed by the
vmw_screen so it is refcounted so that an active context is available for the
lifetime of the vmw_screen.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31744>
2024-10-28 19:46:30 +00:00
Sil Vilerino
8ca15cc7a9 d3d12: Improve video encode intra-refresh logging
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31873>
2024-10-28 19:27:21 +00:00
Sil Vilerino
b957feb7bc d3d12: Fix video encode metadata snapshot at frame submission, must include changes done by DPB manager begin_frame method
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31873>
2024-10-28 19:27:21 +00:00
Sil Vilerino
86799a92b6 d3d12: fix incorrect memset in d3d12_video_encoder_references_manager_hevc::get_current_frame_picture_control_data
Fixes: e0d77f925e ("d3d12: fix incorrect memset in d3d12_video_encoder_references_manager_hevc")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31873>
2024-10-28 19:27:21 +00:00
Sil Vilerino
5ede24323b d3d12: Wrap d3d12_video_encode_get_hevc_codec_support around #if VIDEO_CODEC_H265ENC
Fixes: 92d6989fdc ("d3d12: Add support for HEVC 4:4:4 video encode using AYUV format")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12071
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31873>
2024-10-28 19:27:21 +00:00
George Ouzounoudis
2f23f57670 d3d12: Add support for GL_NVX_gpu_memory_info and GL_ATI_meminfo
Both extensions are implemented through pipe_screen's query_memory_info

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31853>
2024-10-28 18:22:20 +00:00
George Ouzounoudis
76c2db3144 d3d12: Keep track of size and number of evictions
This info will be needed by NVX_gpu_memory_info.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31853>
2024-10-28 18:22:20 +00:00
George Ouzounoudis
60cb0ebc25 d3d12: Split memory size info to device and system memory
We need to split memory size counters into two to fill pipe_memory_info correctly.
Device local and system values are needed for this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31853>
2024-10-28 18:22:20 +00:00
Nanley Chery
334b368fc9 anv: Allow more fast clear colors for layouts
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9983
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31743>
2024-10-28 17:43:21 +00:00
Nanley Chery
4e17452387 anv: Load fast clear colors more often
If a render area covers an area that is smaller than an attachment's
extent and is not aligned to the CCS block size, we must load the clear
color so that the pixels outside of that area are decompressed with the
right clear color.

Prevents the next patch from causing the following test failure on gfx9:

dEQP-VK.renderpass.suballocation.load_store_op_none.color_load_op_none_store_op_none

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31743>
2024-10-28 17:43:21 +00:00
Nanley Chery
0e6b132a75 anv: Access more colors in fast_clear_memory_range
Store an array of clear values, one for each view format of the image.
Load the clear value based on the view format.

anv_image_msaa_resolve() may override the source or destination with
ISL_FORMAT_UNSUPPORTED, so make anv_image_get_clear_color_addr() handle
that format.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31743>
2024-10-28 17:43:21 +00:00
Nanley Chery
43bc4f4576 anv: Refactor clear color loading functions
Rename the functions and update the parameters in preparation for the
next patch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31743>
2024-10-28 17:43:21 +00:00
Nanley Chery
0d4f2a2db1 anv: Move code out of loop in anv_CmdClearColorImage
According to the spec, the clear range's aspect will always be the color
aspect.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31743>
2024-10-28 17:43:21 +00:00
Nanley Chery
8f9ed7e932 anv: Prepare dmabufs for clear color arrays
In later commits, we'll rely on the number of view formats used by an
image to determine the size allocated for an array of clear colors in
the aux-state tracking buffer. Having a single view format for dmabufs
with clear color support allows anv to transparently handle this case.

Restrict the number of view formats by explicitly setting the image
format list to incomplete. Secondly, loosen the non-zero clear color
restriction on clear color supporting dmabufs. Those images can support
any clear color even with an incomplete list because we restrict
problematic accesses for the clear color during the negotiation phase.
Lastly, update add_all_surfaces_explicit_layout() to assert that the
sizing of the imported clear color struct meets expectations.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31743>
2024-10-28 17:43:21 +00:00
Nanley Chery
f5f0354447 anv: Add an array of view formats to anv_image
Stores the format list for the image in terms of ISL formats.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31743>
2024-10-28 17:43:20 +00:00
Semenov Herman (Семенов Герман)
1764f70ba8 radv: fix memleaks in radv_init_shader_upload_queue()
Co-authored-by: default avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31608>
2024-10-28 17:11:41 +00:00
Samuel Pitoiset
8300378bf3 radv: advertise VK_EXT_device_generated_commands on GFX8+
GFX6-7 can't really support it and it's not worth the effort anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31383>
2024-10-28 16:27:35 +00:00
Samuel Pitoiset
9f8684359f radv: implement VK_EXT_device_generated_commands
The major differences compared to the NV extensions are:
- support for the sequence index as push constants
- support for draw with count tokens (note that DrawID is zero for
  normal draws)
- support for raytracing
- support for IES (only compute is supported for now)
- improved preprocessing support with the state command buffer param

The NV DGC extensions were only enabled for vkd3d-proton and it will
maintain both paths for a while, so they can be replaced by the EXT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31383>
2024-10-28 16:27:35 +00:00
Semenov Herman (Семенов Герман)
637a4b849a radv: fix memleaks in radv_sqtt_reloc_graphics_shaders()
Co-authored-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31607>
2024-10-28 15:48:05 +01:00
Lucas Stach
6775524c69 etnaviv: set PE_COLOR_FORMAT_OVERWRITE when no color target is active
When no color target is bound PE_COLOR_FORMAT_OVERWRITE must be set to
avoid GPU hangs.

Fixes: 07cd0f2306 ("etnaviv: blend: Add support for MRTs")
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/31845>
2024-10-28 13:23:29 +00:00
Samuel Pitoiset
f7652de1f1 Revert "ac/surface: add RADEON_SURF_VIEW_3D_AS_2D_ARRAY for GFX9+"
This reverts commit dc5ef90547.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31869>
2024-10-28 12:47:38 +00:00
Samuel Pitoiset
0ae880c08c Revert "radv: implement 2D views of 3D images using 2D_ARRAY descriptors on GFX9+"
Using view3dAs2dArray changes the tiling and it's slower (-7.5% in
Silent Hill 2 Remake) than using 3D tiling. The previous implementation
was the best one regarding performance (it's also what RadeonSI does).

Sadly it seems that sampler2DViewOf3D can't really be supported without
that but nobody really needs it apparently.

Also view3dAs2array is incompatible for 2D views of sparse 3D images
because sparse 3D images requires 3D tiling.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11997

This reverts commit f5805bcb8e.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31869>
2024-10-28 12:47:38 +00:00
Samuel Pitoiset
742a1097a9 Revert "radv: advertise sampler2DViewOf3D"
This feature has never been exposed in stable releases, so I think it's
fine to disable it.

This reverts commit 493d5910a3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31869>
2024-10-28 12:47:38 +00:00
Samuel Pitoiset
b3a06daa72 radv: simplify determining if dual-source blending is enabled
If blending is disabled or the color write mask is 0, dual-source
blending would be ignored, and this can be simplified a bit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31681>
2024-10-28 12:04:59 +00:00
Daniel Schürmann
10958d04d5 aco: Respect addressible SGPR limit in VS prologs
On Tonga, the effective SGPR limit is 96, including VCC.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31859>
2024-10-28 11:29:06 +00:00
Samuel Pitoiset
dc5efa892f radv: remove useless check about gl_Position as PS inputs for NGGC
gl_Position isn't part of the PS inputs read mask.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31830>
2024-10-28 11:03:47 +00:00
Samuel Pitoiset
8e4d1965bd radv: fix considering NGG culling for depth-only rendering
When the FS is unknown, this can happen with fast-link GPL or unlinked
ESO, rely on the number of VS/TES outputs which should be a good
approximation of the number of PS inputs.

This fixes a (huge?) performance regression from May 2023 because
for depth-only rendering, the FS is NULL and NGG culling wasn't
considered at all.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31830>
2024-10-28 11:03:47 +00:00
Job Noorman
19c560da04 ir3: fix physical edges of predicated branches
The algorithm for adding extra physical edges works by finding edges
that jump over reconvergence points. Since predicated branches don't
introduce reconvergence points, we wouldn't add a physical edge from the
true block to the false block. However, this physical edge is still
needed as control flow does fall though here. This patch fixes this by
manually adding the physical edge so that we don't need to insert a
reconvergence point for it.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 39088571f0 ("ir3: add support for predication")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31733>
2024-10-28 10:37:36 +00:00
Samuel Pitoiset
72871d8330 radv: set missing FMASK surface counters for MSAA MRTs
This has been removed few years ago by mistake but it's important for
performance. This is mostly for addrlib to determine tile_swizzle which
is used to make memory access faster with multiple render targets.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31797>
2024-10-28 08:21:12 +01:00
Samuel Pitoiset
aa19bf3d93 amd/descriptors: set fmask_tile_swizzle for TC-compat CMASK images on GFX8
This is required.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31797>
2024-10-28 08:21:12 +01:00
Vignesh Raman
c3531d5fea ci: rename FORCE_KERNEL_TAG to EXTERNAL_KERNEL_TAG
FORCE_KERNEL_TAG allows testing kernel uprevs without rebuilding
containers by supplying an external kernel directly for booting on
hardware devices. Renaming it to EXTERNAL_KERNEL_TAG clarifies its
purpose, distinguishing it from KERNEL_TAG which rebuilds containers.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31795>
2024-10-28 02:18:27 +00:00
Jose Maria Casanova Crespo
f47c692d99 v3dv/ci: Add missing fails on RPi4/5 for uprev VKCTS to 1.3.10.0
Fixes: 38d7492391 ("ci: uprev VKCTS to 1.3.10.0")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31866>
2024-10-28 01:33:15 +00:00
Valentine Burley
e18733300e anv/ci: Remove additive blending fails on ADL
This was a VKCTS bug on earlier version of the CTS.

These tests have been actually passing since the VKCTS was uprevved to
1.3.9.0, which landed a bit before ADL testing in CI was turned on.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31862>
2024-10-27 21:43:18 +00:00
Valentine Burley
3b5e49a7f8 intel/ci: Fix Alder Lake's configuration
There's currently no GL or GLES testing on the iris gallium driver,
and the VKCTS expectations were erroneously listed under iris-*.txt.

Fix the rules set for anv-adl-full, change the GPU_VERSION to anv-adl
and move the expectations around accordingly.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31862>
2024-10-27 21:43:18 +00:00
David Heidelberg
5b3f7de99f ci/freedreno: Introduce OpenCL testing for Adreno 618, 660, and 750
Implement testing rusticl with piglit.

Piglit OpenCL support enablement already got merged.

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30835>
2024-10-27 14:04:41 +00:00
Dmitry Baryshkov
4f1adb71d6 rusticl: Enable on freedreno
To really use the driver, specify the environment variable:

  export RUSTICL_ENABLE=msm

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30835>
2024-10-27 14:04:41 +00:00
Rob Clark
63a5803433 freedreno/ir3: Do not propagate away a widening move
A narrowing move from const is just emulated CONSTANT_DEMOTION_ENABLE so
we can permit it.  But not the inverse.

Cc: mesa-stable
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30835>
2024-10-27 14:04:41 +00:00
Rob Clark
e89e89caeb freedreno/computerator: Make shader show up in devcore/etc
Previously we were hitting the BO heap which isn't dumped because the
buffer was mappable.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30835>
2024-10-27 14:04:41 +00:00
Rob Clark
f58c1aebff ir3/ra: Better CL/kernel support
With CL we do not know the local wg size at compile time.  Assuming the
worst-case (max) size limits the register footprint, leading to excess
spilling.  OTOH with CL the app queries the supported local size after
compiling the kernel.  So instead pick the largest warp size as the
target.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30835>
2024-10-27 14:04:41 +00:00
Rob Clark
f3211e243f freedreno/a6xx: Support variable wg size
If local wg size isn't known at compile time, we need to move some of
the state emit out of the state object and into IB2 cmdstream.

This still doesn't account for the fact that RA currently must assume
the worst case, meaning limiting cl kernels to a miniumum number of regs
and spilling excessively.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30835>
2024-10-27 14:04:41 +00:00
David Heidelberg
1569219f51 freedreno/ir3: Lower fisnormal op
Avoid crash when running piglit test:
program@execute@builtin@builtin-float-isnormal-1.0.generated

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30835>
2024-10-27 14:04:40 +00:00
Dmitry Baryshkov
e20f02f64a freedreno/ir3: Lower the hadd operations
There do not seem to be instructions for the ihadd/uhadd NIR operations.
Lower them to simpler ops.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30835>
2024-10-27 14:04:40 +00:00
Dmitry Baryshkov
8707c15b5b freedreno/ir3: Treat MESA_SHADER_KERNEL in the same way as compute
In ir3_shader_descriptor_set() tread MESA_SHADER_KERNEL shaders in the
same way, as PIPE_SHADER_COMPUTE shaders, return 0.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30835>
2024-10-27 14:04:40 +00:00
Iván Briano
13db5fad27 brw: fix task/mesh push constant loading
The InlineData passed to the shader is a fixed size unrelated to the
register size. It happens to match pre-Xe2, but by considering it the
same in Xe2, we ended up reading pushed constants from the wrong place
when they didn't fit in the InlineData.

Fixes: 97b17aa0b1 ("brw/nir: rework inline_data_intel to work with compute")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31856>
2024-10-26 18:12:41 +00:00
Jordan Justen
b7560fa048 anv: Build for Xe3
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00