Compare commits

..

4109 Commits

Author SHA1 Message Date
Eric Engestrom
c3afa2a74f VERSION: bump for 25.0.3 2025-04-02 18:35:11 +02:00
Eric Engestrom
8eab11c9ad docs: add release notes for 25.0.3 2025-04-02 18:35:11 +02:00
David Rosca
b592736211 radv: Add radv_format_description to remap 10/12bit formats to 16bit
Remapping was missing for format description which made these formats
effectively unsupported as zero format features were reported.

Fixes: 0098f8ef35 ("radv: Remap 10 and 12 bit formats to 16 bit formats")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34274>
(cherry picked from commit 597f13b244)
2025-04-02 14:27:04 +02:00
Samuel Pitoiset
93a4a2ec1b Revert "radeonsi/gfx11: program SAMPLE_MASK_TRACKER_WATERMARK optimally for APUs"
This reverts commit 6ce3a95852.

This likely also causes random GPU hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34306>
(cherry picked from commit 5784a36fd1)
2025-04-02 14:24:58 +02:00
Samuel Pitoiset
ccc86bd62e Revert "radv: program SAMPLE_MASK_TRACKER_WATERMARK optimally for GFX11 APUs"
This reverts commit 96e9c3fe77.

This actually causes random GPU hangs like on Phoenix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12461
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12426
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12692
Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34306>
(cherry picked from commit 64e6e043b3)
2025-04-02 14:24:08 +02:00
Ian Romanick
27ecb47a5a brw/nir: Lower fsign again after last call to brw_nir_optimize
No shader-db or fossil-db changes on any Intel platform.

Fixes: 13332c23 ("intel/brw: Unconditionally run optimizations after nir_opt_uniform_subgroup")
Closes: #12888
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34251>
(cherry picked from commit e210b79ce3)
2025-04-02 14:22:09 +02:00
Samuel Pitoiset
abb47924db ac/surface: fix selecting preferred alignments for HiZ/HiS on GFX12
VK_MESA_image_alignment_control is used by vkd3d-proton to set
optimal alignments for images. Though, the preferred alignment was
only applied to the surface (or the stencil aspect) but not to the HiZ
surface due to the NULL check.

This caused rendering issues because swizzle modes didn't match.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12831
Fixes: 079f55d405 ("radv: advertise VK_MESA_image_alignment_control on GFX12")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34322>
(cherry picked from commit fac44c0ca0)
2025-04-02 14:18:29 +02:00
Dave Airlie
f94216bb8c nak: add reads after setting writes
Otherwise we schedule this sort of thing wrong,
 r0    = iadd3 r0 c[0x0][0x0] rZ
 r0    = shf.l.w.i32 r0 rZ 0x2
 r0 p0 = iadd3 r0 c[0x1][0x0] rZ

since raw latencies are more important than waw, but we go do a
waw for the first two instructions instead of a raw which is correct.

Fixes: 2d4e445099 ("nak/calc_instr_deps: Rewrite calc_delays() again")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33573>
(cherry picked from commit 7a55a9afcc)
2025-04-02 14:18:26 +02:00
Eric Engestrom
d020c25bd4 .pick_status.json: Update to 0d2ebca39f 2025-04-02 13:56:30 +02:00
Erik Faye-Lund
2344060c22 mesa/main: fix regression in extension-checking
This condition accidentally got inverted when cleaning up code, whoops.

Fixes: 3251f321b8 ("mesa: some cleanups for texparam extension checks")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34248>
(cherry picked from commit eb82d65a20)
2025-04-02 11:04:13 +02:00
Erik Faye-Lund
e4f5908a57 panvk: check for texture-compression support
We currently just assume that textureCompressionETC2 and
textureCompressionASTC_LDR are always supported. And while that's true
for all the G52s, G610s abd G310s we've seen out in the wild, it's not
guaranteed to be true. An SoC vendor might disable support for one of
these formats.

So let's check properly, just for good measure.

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34206>
(cherry picked from commit e4786cf971)
2025-04-02 11:04:13 +02:00
Taras Pisetskyi
d34e17a9ce anv,driconf: Add sampler coordinate precision workaround for EVE Online
Signed-off-by: Taras Pisetskyi <taras.pisetskyi@globallogic.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12920

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34316>
(cherry picked from commit 04962975fd)
2025-04-02 11:04:13 +02:00
Erik Faye-Lund
29cf4608db panfrost: avoid accidental aliasing
We already have a variable call "alignment" here, and aliasing it
breaks things. Whoops, let's rename the variable to page_size to
avoid this.

Fixes: 22985caf3f ("panfrost: sanity-check alignment")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34156>
(cherry picked from commit 1471279203)
2025-04-02 11:04:13 +02:00
Robert Mader
82304cad79 gallivm: Re-add check for passmgr before disposing it
In can be NULL, but on LLVM >= 15 lp_passmgr_dispose() is
a no-op.

Fixes: 47cd0eee26 (gallivm: create a pass manager wrapper.)

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34312>
(cherry picked from commit c0ec35bb42)
2025-04-02 11:04:13 +02:00
Rebecca Mckeever
42b6bd48b7 panvk: Remove lower_tg4_broadcom_swizzle from panvk_preprocess_nir()
We are already applying the .bagr swizzle in bifrost_preprocess_nir(), so
remove lower_tg4_broadcom_swizzle from nir_lower_tex_options in
panvk_preprocess_nir to avoid applying the swizzle twice.

Fixes: 4050697a8f ("panvk: So more nir_lower_tex before descriptor lowering")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34033>
(cherry picked from commit f450807b68)
2025-04-02 11:04:13 +02:00
Jordan Justen
98530340ca intel/dev: Add BMG 0xe211 PCI ID
Backport-to: 25.0
Ref: bspec 68090
Ref: https://patchwork.freedesktop.org/series/146769/
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34249>
(cherry picked from commit d3ec467031)
2025-04-02 11:04:13 +02:00
Dave Airlie
cd8715440a gallivm: check for avx512vbmi and tell LLVM the correct answer.
There are some CPUs out there which don't have vbmi and do have
other avx512 and mesa crashes on those with illegal instructions.

This was reported to Red Hat support.

Cc: mesa-stable
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34282>
(cherry picked from commit 5d6d167a7c)
2025-04-02 11:04:13 +02:00
Pierre-Eric Pelloux-Prayer
c8f9b803fa radeonsi: use composed swizzle in cdna_emu_make_image_descriptor
Otherwise the state swizzle is ignored.

Fixes: 139bc6b813 ("radeonsi: use common build buffer descriptor helpers")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34241>
(cherry picked from commit 7e2c3be454)
2025-04-02 11:04:13 +02:00
Pierre-Eric Pelloux-Prayer
ae02c9a2d5 ac/nir: fix nir_metadata value of ac_nir_lower_image_opcodes
This pass can insert new blocks so 'nir_metadata_control_flow' is not
preserved.

Fixes: eaf98b1422 ("ac/nir: implement image opcode emulation for CDNA, enable it in radeonsi")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34241>
(cherry picked from commit 785df1b980)
2025-04-02 11:04:13 +02:00
Samuel Pitoiset
ffa6fd4bee radv: do not trigger FCE or FMASK decompress on compute queue
A pipeline barrier which contains an image layout transition like
COLOR_ATTACHMENT_OPTIMAL -> TRANSFER_DST_OPTIMAL on compute queue
would just hang. Such a barrier is useless in practice but it's legal.

Prevent GPU hangs by skipping FCE or FMASK_DECOMPRESS when it's not
on the graphics queue.

Fixes dEQP-VK.synchronization2.layout_transition.compute_transition*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34231>
(cherry picked from commit 086f529bbe)
2025-04-02 11:04:13 +02:00
Trigger Huang
1c85e781ce radeonsi: Fix perfcounter start event in si_pc_emit_start
The original typo caused performance counters to send STOP events
instead of START, leading to incorrect profiling data.

Fixes: 1a1138817c ("radeonsi: add a new PM4 helper radeon_event_write")

Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34236>
(cherry picked from commit f03b385d4b)
2025-04-02 11:04:13 +02:00
Faith Ekstrand
7d3212729b nvk: Disable 32k images on Pascal A
While we're here, add a comment about why we have this restriction in
the first place since NVK and the proprietary driver are different here.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34281>
(cherry picked from commit 59b01dc764)
2025-04-02 11:04:13 +02:00
Faith Ekstrand
9dd82a2e74 nvk: Use max_image_dimension for maxFramebufferWidth/Height
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34281>
(cherry picked from commit 65d06d91ca)
2025-04-02 11:04:13 +02:00
Faith Ekstrand
79f960cb1d vulkan/wsi: Signal buffer memory object when blitting
When we're using the PRIME path and using vkCmdCopyImageToBuffer to copy
to a linear image, the buffer memory is what's shared with the window
system.  For legacy drivers that depend on memory signaling via
wsi_memory_signal_submit_info, we need to tell the driver to signal the
buffer memory, not the image memory or else the window system may wait
on a driver-internal buffer and not wait for the copy to complete.

Cc: mesa-stable
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
(cherry picked from commit cf23ffcbae)
2025-04-02 11:04:13 +02:00
Natalie Vock
9fb56e2780 vulkan/bvh: Move first PLOC task_count fetch inside PHASE
Otherwise, the memory fetch is not protected by the global sync and
memory barriers and there is a chance to read a stale (or just wrong)
task count.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34178>
(cherry picked from commit 8b0271050a)
2025-04-02 11:04:13 +02:00
Natalie Vock
0c3b74d562 radv/rt: Flush CP writes from the common BVH framework with INV_L2 on GFX12
a1b05991 ("radv/rt: Flush L2 after writing internal node offset on GFX12")
did this for radv-internal CP writes - we also need to do this for PLOC
sync data initialization which is done in the common framework.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34178>
(cherry picked from commit c1e1d86bd1)
2025-04-02 11:04:13 +02:00
David Rosca
e790a1caa0 frontends/va: Don't ignore rotation and mirror for conversions to RGB
Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
(cherry picked from commit 51292976fe)
2025-04-02 11:04:12 +02:00
David Rosca
b6f9ccf0e8 gallium/vl: Fix mirror with rotation for compute shaders
The mirror needs to be reversed because the rotation is applied
before the mirroring.

VAAPI docs:
  Mirroring of an image can be performed either along the
  horizontal or vertical axis. It is assumed that the rotation
  operation is always performed before the mirroring operation.

Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
(cherry picked from commit 962c33cbca)
2025-04-02 11:04:12 +02:00
David Rosca
d56be9adbd gallium/vl: Fix rotation with scaling for compute shaders
Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
(cherry picked from commit c8a2f0b248)
2025-04-02 11:04:12 +02:00
Robert Mader
09da8e124f llvmpipe: Free dummy_dmabuf on shutdown
In order to stop ASAN from complaining.

Fixes: d21aa86b54 ("llvmpipe: Implement EGL_ANDROID_native_fence_sync")
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34258>
(cherry picked from commit 2034c901cc)
2025-04-02 11:04:12 +02:00
David Rosca
e09a2e808f radeonsi/vce: Support old VCE firmware
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12866
Fixes: 104f9c6654 ("radeonsi/vce: Remove support for FW 50 and older")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34152>
(cherry picked from commit a2b4617c00)
2025-04-02 11:04:12 +02:00
Connor Abbott
e9b6cf708b tu: Fix reported FDM fragment size with multiview
We were never setting has_multiview. It's not actually necessary anyway,
since we can just do the optimization we were trying to do whenever
num_views is 1 instead.

This doesn't affect the actual fragment size, which was already correct,
only gl_FragSizeEXT.

Fixes: 6f2be52487 ("tu, ir3: Handle FDM shader builtins")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33991>
(cherry picked from commit 8864ee7b0f)
2025-04-02 11:04:12 +02:00
Connor Abbott
0df2cf3ae4 tu: Fix size of frag_size_ir3 and frag_offset_ir3 driver params
They are an array, so we have to reserve extra space for extra views.
This bug was being masked by the bug fixed in the next commit.

Fixes: 76e417ca59 ("turnip,ir3/a750: Implement consts loading via preamble")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33991>
(cherry picked from commit 122f2c422a)
2025-04-02 11:04:12 +02:00
Connor Abbott
40babe1efb tu: Fix GMEM offset for multisample layered separate stencil
Fixes a bug uncovered by CTS when enabling GMEM with layered rendering.

Fixes: def56b531c ("tu: Support GMEM with layered rendering and multiview")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34082>
(cherry picked from commit 6cadc1baea)
2025-04-02 11:04:12 +02:00
Faith Ekstrand
f2fa2ea466 nvk: Use the right sample mask for 8x/4pass on Maxwell A
Fixes: 48898c47bf ("nvk: Rework setup of sample masks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
(cherry picked from commit cbf87e82e8)
2025-04-02 11:04:12 +02:00
Faith Ekstrand
3e475be117 nouveau/mme/fermi: Don't allow STATE and EMIT on the same op
Fixes: 162269f049 ("nouveau/mme: Add Fermi builder")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
(cherry picked from commit 3354c24169)
2025-04-02 11:04:12 +02:00
Faith Ekstrand
c0de23e92e nvk: Fix a Volta check
Fixes: e162c2e78e ("nvk: Use VM_BIND for contiguous heaps instead of copying")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
(cherry picked from commit 79294fb95a)
2025-04-02 11:04:12 +02:00
Faith Ekstrand
c84a792c96 nvk: Free owned_gart_mem correctly
Fixes: fbe171638e ("nvk: add gart forced cmd pool side buffer.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34127>
(cherry picked from commit 90b2137ac5)
2025-04-02 11:04:12 +02:00
Robert Mader
558a7d92d5 llvmpipe: Take offset into account when importing dmabufs
Which is necessary for many common YCbCr formats.

Fixes: d74ea2c117 (llvmpipe: Implement dmabuf handling)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34240>
(cherry picked from commit 05e7ac6551)
2025-04-02 11:04:12 +02:00
Faith Ekstrand
4aad059de8 nak: Fix a SM check for OpPCnt
This doens't really fix anything as we don't have any nir_loops on
Volta+ but the code was wrong so we should fix it.

Fixes: 9bbc692064 ("nak/nir: Rework CRS handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
(cherry picked from commit af9d65e8b8)
2025-04-02 11:04:12 +02:00
Faith Ekstrand
829c728e89 nak: Always copy sources when handling vec/pack/mov ops
It's possible that the source is uniform but the destination is not.  In
this case, we need to insert a copy or else we might accidentally
propagate a uniform into some place we don't expect it.

This fixes a bunch of fp64 KHR-Single-GL46.subgroups.arithmetic.* tests.

Fixes: d09d3f5246 ("nak/from_nir: Emit uniform instructions when !divergent")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
(cherry picked from commit 1d1d79bbaa)
2025-04-02 11:04:12 +02:00
Faith Ekstrand
1fa4455b6e nak: Insert the annotation in the right spot in assign_regs
Fixes: efc4ac0d27 ("nak/sm50: sprinkle OpAnnotate in optimization passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
(cherry picked from commit 98677294b9)
2025-04-02 11:04:12 +02:00
irql-notlessorequal
ed75778536 hasvk: Fix non-functioning version override.
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27717 accidentally removed the instance check for the drirc option "hasvk_report_vk_1_3_version", rendering it useless.

Re-add the check and expose Vulkan 1.3 if the user asks.

Fixes: 2d575034f2 ("hasvk: switch to use runtime physical device properties infrastructure")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34232>
(cherry picked from commit c0c562cf6e)
2025-04-02 11:04:12 +02:00
Lionel Landwerlin
ba58320a6a anv: limit implict write with drirc
9f32e1a489 meant to amend 1e80a426c2.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9f32e1a489 ("anv/drirc: Add option to control implicit sync on external BOs")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12629
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33587>
(cherry picked from commit a88c9ea192)
2025-04-02 11:04:12 +02:00
Lionel Landwerlin
5ecc1fb189 brw: always write the VUE header
In 35df3925ca ("brw: ensure VUE header writes in HS/DS/GS stages") I
misread the PRMs and thought that the VF would initialize the header.

What actually happens is that the VF does not write valid values in
there and the PRMs explicitly say that the VS shader should overwrite
whatever is in there.

We could avoid writing the header in some cases when no HW is going to
read back the header. For example with rendering disables through
3DSTATE_STREAMOUT::RenderingDisable. But those cases are dynamic and
the compiler is not able to tell. So just always write the header.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 35df3925ca ("brw: ensure VUE header writes in HS/DS/GS stages")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12880
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34211>
(cherry picked from commit 4db4bd1d04)
2025-04-02 11:04:11 +02:00
Paulo Zanoni
9acee7d46b drirc/anv: DiggingGame.exe needs force_vk_vendor=-1
Otherwise, it fails with a message:

  "Assertion failed: IsValidIndex(Index)
   [File:D:\\build\\++UE5\\Sync\\Engine\\Source\\Runtime\\Core\\Public\\Containers\\UnrealString.h]
   [Line: 218] \nString index out of bounds: Index 0 from a string with
   a length of 0"

Thanks to the ProtonDB community for having figured this out and
documented it for us.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12695
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34103>
(cherry picked from commit e72ad49622)
2025-04-02 11:04:11 +02:00
Samuel Pitoiset
88c7326a61 radv/meta: fix color<->depth/stencil image copies
The color format needs to be compatible with depth or stencil. Also
the depth/stencil format was incorrect when it's the source.

Fixes dEQP-VK.api.ds_color_copy.*
and VKD3D_TEST_FILTER=test_copy_texture.

Fixes: d4ff011b12 ("radv: advertise VK_KHR_maintenance8")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34142>
(cherry picked from commit 2c3b9312cc)
2025-04-02 11:04:11 +02:00
Hyunjun Ko
167bcee3b7 vulkan/video: Do byte-alignment when building a h264 slice header
Fixes: ff8de6190 ("vulkan/video: adds a bitstream writer of h264 slice header")
Closes: mesa/mesa#12835

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34094>
(cherry picked from commit c22a635938)
2025-04-02 11:04:11 +02:00
Samuel Pitoiset
6ad9455f43 radv: fix compresed depth/stencil copies on transfer queue
HTILE is always pipe aligned.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
(cherry picked from commit 114fbdc534)
2025-04-02 11:04:11 +02:00
Samuel Pitoiset
7f32247d95 radv: fix bpe for the stencil aspect of depth/stencil copies on transfer queue
Using the bpe of depth+stencil when copying the stencil aspect only
doesn't work.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34143>
(cherry picked from commit 7b15e85b95)
2025-04-02 11:04:11 +02:00
Rhys Perry
b3991dd8fc aco/ra: fix free register counting when moving variables
info.bounds might be smaller than the bounds available for the moved
variables.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 626aa7b648 ("aco: workaround GFX9 hardware bug for D16 image instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34158>
(cherry picked from commit 80fef30531)
2025-04-02 11:04:11 +02:00
Lionel Landwerlin
fad1d950f9 anv: disable replication when we don't have both VS/FS stages
Enabling this with shaders compiled separately through pipeline
libraries fails because we currently only enable it for VS and the
associated FS stage ends up with a non compatible VUE map.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34173>
(cherry picked from commit 25a695552a)
2025-04-02 11:04:11 +02:00
Lionel Landwerlin
c89250cd9f anv: fix end of pipe timestamp query writes
Currently trying to use PIPE_CONTROL on blitter/video engines.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12833
Acked-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34095>
(cherry picked from commit 6b6a4cb1e2)
2025-04-02 11:04:11 +02:00
Samuel Pitoiset
7e55a04643 radv: fix creating pipeline binary from the traversal shader
rt_stage_info is NULL.

Fixes: 8802612458 ("radv: advertise VK_KHR_pipeline_binary")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34141>
(cherry picked from commit 29b3d9f0f4)
2025-04-02 11:04:11 +02:00
Job Noorman
cabc8c606f ir3/legalize: take wrmask into account for delay updates
When updating delays, we'd update all dst regs based on reg_elems.
However, when wrmask has gaps, this would update delays for regs that
aren't actually written. Fix this by skipping regs for which the
corresponding wrmask bit is zero.

Note that this wasn't just a performance issue but could result in
illegal code because the delay is reset to zero for tex/sfu
instructions. For example, the following (post-legalization) code was
observed in the wild:

(rpt1)add.f r1.w, (r)r2.w, (r)c3.z
sam.base0 (f32)(w)r2.x, r3.y, s#0, t#1
rcp r2.x, r2.x

Here, the add would result in a required delay for r2.x which would then
be cleared by the sam (even though it doesn't write to it), resulting in
insufficient delay before the rcp.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 61b2bd861f ("ir3: Rewrite nop insertion")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34107>
(cherry picked from commit 84dbd34332)
2025-04-02 11:04:11 +02:00
Timothy Arceri
de5de2ec60 nir: fix uniform cloning helper
glsl allows for ubos to have the same name but different bindings.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Fixes: b47b8d16d9 ("nir: expose reusable linking helpers for cloning uniform loads")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12852
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34138>
(cherry picked from commit 2b2132d2ac)
2025-04-02 11:04:11 +02:00
Timothy Arceri
20e09c3081 mesa: fix potential race condition in with Programs
The call looks up a Program and creates it if it doesn't
already exist. However we weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
(cherry picked from commit 786b8b2d34)
2025-04-02 11:04:11 +02:00
Timothy Arceri
04df661b13 mesa: fix potential race condition in with ATIShaders
The call looks up an ATIShader and creates it if it doesn't
already exist. However we weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
(cherry picked from commit 4c1e4d7b49)
2025-04-02 11:04:11 +02:00
Timothy Arceri
f150c50170 mesa: fix potential race condition in with RenderBuffers
The calls look up a renderbuffer and create it if it doesn't
already exist. However they weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
(cherry picked from commit 0e61d31e9d)
2025-04-02 11:04:11 +02:00
Timothy Arceri
835a355369 mesa: fix potential race conditions in with FrameBuffers
The calls look up a framebuffer and create it if it doesn't
already exist. However they weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
(cherry picked from commit c4ee84f3b6)
2025-04-02 11:04:11 +02:00
Timothy Arceri
4a158b971c mesa: fix reuse of deleted sampler object
Deleting a sampler object will only cause it to be unbound from the
current context. To avoid reusing something that it still bound in
another context we need to check the DeletePending flag first.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c9130 ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
(cherry picked from commit 9bb696588d)
2025-04-02 11:04:11 +02:00
Timothy Arceri
d44e9736d1 mesa: fix potential race condition in with TexObjects
The calls look up a texture object and create it if it doesn't
already exist. However they weren't locking the hash between looking
up the name and adding it to the hash so it could be possible
another thread also generated the same name.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c9130 ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
(cherry picked from commit 95e87f6a6a)
2025-04-02 11:04:11 +02:00
Timothy Arceri
0c5a31f597 mesa: fix reuse of deleted texture object
Deleting a texture object will only cause it to be unbound from the
current context. To avoid reusing something that it still bound in
another context we need to check the DeletePending flag first.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12710
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12722
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12830
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
(cherry picked from commit 9b85142e40)
2025-04-02 11:04:10 +02:00
Timothy Arceri
ce22e438e6 mesa: fix reuse of deleted buffer object
Deleting a buffer object will only cause it to be unbound from the
current context. To avoid reusing something that it still bound in
another context we need to check the DeletePending flag first.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12810
Fixes: 842c91300f ("mesa: enable GL name reuse by default for all drivers except virgl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34091>
(cherry picked from commit 0f0834275d)
2025-04-02 11:04:10 +02:00
Caio Oliveira
756b10a89a brw: Fix decoding of 3-src destination stride in EU validation
Fixes: f1036da345 ("intel/brw: Add vstride/width/hstride to brw_hw_decoded_inst")
Reviewed-by: Ian Romanick <ian.d.romanick@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/33664>
(cherry picked from commit 676b874ca9)
2025-04-02 11:04:10 +02:00
Yiwei Zhang
66b5ae35ec panvk: fix memory requirement query for aliased disjoint image
The spec allows to create aliased disjoint image for a specific plane of
a multi-planar image, and the format can be R8. When querying memory
requirement of such image, VkImagePlaneMemoryRequirementsInfo is not
required to be chained although it has the disjoint bit.

This change fixes to look for aspect info from plane memory info only
when that's chained. The implementation can be passive here as the spec
VU has sufficient guarantees for the validity around. See below VU for
details:
- VUID-VkImageMemoryRequirementsInfo2-image-01589
- VUID-VkImageMemoryRequirementsInfo2-image-01590
- VUID-VkImageMemoryRequirementsInfo2-image-02279
- VUID-VkImageMemoryRequirementsInfo2-image-02280

Meanwhile, the existing disjoint check for size info is kept as is for
the special handling of VK_FORMAT_D32_SFLOAT_S8_UINT.

Test: dEQP-VK.ycbcr.plane_view.memory_alias.* pass with venus-on-panvk

Fixes: 412c286331 ("panvk: Enable multiplane images and image views")
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34134>
(cherry picked from commit 5dcb9f918d)
2025-04-02 11:04:10 +02:00
Yiwei Zhang
0a6dcd915e panvk/csf: rework cache flush reduction
Per Vulkan spec 7.9. Host Write Ordering Guarantees, queue submission
commands automatically perform a domain operation from host to device
for all writes performed before the command executes. That is to say,
host updates to the mappings can occur after the end of the command
recording and must be flushed implicitly at submission boundary.

Before this change, necessary cache flushes could be missed once the
app starts reusing pre-recorded command buffers. e.g. a simple buffer
copy cmd while the app only updates the source buffer mapping in
different submissions. This changes backs out most of the current
version of cache flush reduction while still assigning LATEST_FLUSH_ID
to at least the final batch itself. This aligns with panfrost_batch
submit behavior on the gallium side.

Test: dEQP-VK.synchronization*.timeline_semaphore.* pass w/o flakiness
      via venus-on-panvk

Fixes: 28e4d22497 ("panvk/csf: Pass a non-zero flush-id to benefit from cache flush reduction")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34093>
(cherry picked from commit 98a5acf352)
2025-04-02 11:04:10 +02:00
Yiwei Zhang
c432dfe79c venus: fix maint4 multi-planar memory requirements
Fixes: ce1bbd241e ("venus: extend image cache to vkGetDeviceImageMemoryRequirements")
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
(cherry picked from commit adcb967c5c)
2025-04-02 11:04:10 +02:00
Yiwei Zhang
54d829491d venus: fix ahb usage caching
Test: dEQP-VK.api.external.memory.android_hardware_buffer.*

Fixes: fde5cebec5 ("venus: fix image format cache miss with AHB usage query")
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
(cherry picked from commit ea6dc035d8)
2025-04-02 11:04:10 +02:00
Yiwei Zhang
f8f43523e0 venus: fix unexpected ring alive status expire upon owner thread switch
If the last owner thread has just unset the alive status and released
the watchdog, the new owner thread could have acquired to abort
unexpectedly if the ownership transfer occurs right before the next
owner's warn order. So we must set watchdog alive for new owner so that
it can properly check ring alive status in the next warn order.

Cc: mesa-stable
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
(cherry picked from commit 8b2703fe08)
2025-04-02 11:04:10 +02:00
Yiwei Zhang
59c3485022 docs: demote VK_KHR_shader_relaxed_extended_instruction
It's not part of core 1.3.

Fixes: 8b272c8d8c ("docs: update feature matrix for VK_KHR_shader_relaxed_extended_instruction")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34104>
(cherry picked from commit d2a7c1c452)
2025-04-02 11:04:10 +02:00
Eric R. Smith
2684f37146 panfrost: consider xfb shader when calculating thread local storage size
Register spilling can cause us to require thread local storage (tls).
However, we were not adjusting the tls stack size space to account for
the tls needed for the extra xfb shader when transform feedback is
needed. We noticed this when testing register allocation in the
OpenGL CTS (for testing we had forced spilling where none happened
before).

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33935>
(cherry picked from commit 2ee3bef252)
2025-04-02 11:04:10 +02:00
Tomeu Vizoso
c0bc957c5d kopper: Explicitly choose zink
If we pass zink=false to pipe_loader_drm_probe_fd, it could happen that
a Gallium driver that had been already discarded because of not
supporting the graphics CAP will be chosen.

To avoid that, explicitly ask pipe_loader_drm_probe_fd to choose the
zink Gallium driver.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
(cherry picked from commit 854bc2ee05)
2025-04-02 11:04:10 +02:00
Lucas Stach
b075d80fce kmsro: look for graphics capable screen as renderonly device
Exposing a rendernode from a supported driver is not a sufficient
matching criteria to qualify as the render part of a renderonly
device, as the rendernode might only expose compute or 2D accel
capabilities.

Look for a screen that actually supports gallium graphics operations
to qualify as a renderonly screen.

v2 (Tomeu): Have pipe-loader return a list of FDs for kmsro to choose
            based on capabilities.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
(cherry picked from commit 7e76c67632)
2025-04-02 11:04:10 +02:00
Tomeu Vizoso
e300382920 egl/surfaceless: Only choose drivers that expose the graphics capability
This is to prevent applications to try to render to devices that have no
3D hardware (eg. NPUs).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
(cherry picked from commit cfad6fb037)
2025-04-02 11:04:10 +02:00
Jordan Justen
5db78fe09e intel/dev: Add BMG PCI IDs (0xe210, 0xe215, 0xe216)
Backport-to: 24.3
Backport-to: 25.0
Ref: https://patchwork.freedesktop.org/patch/msgid/20250128162015.3288675-1-shekhar.chauhan@intel.com
Ref: bspec 68090
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/33335>
(cherry picked from commit 0e648a238e)
2025-04-02 11:04:10 +02:00
Eric Engestrom
b9e649b31b .pick_status.json: Update to b60d816d6e 2025-04-02 11:04:10 +02:00
Daniel Schürmann
e159e0000c aco: don't assume that demote doesn't cause an empty exec mask
Totals from 188 (0.24% of 79377) affected shaders: (Navi31)
Instrs: 209239 -> 209473 (+0.11%); split: -0.01%, +0.12%
CodeSize: 1101124 -> 1101744 (+0.06%); split: -0.02%, +0.07%
Latency: 1672182 -> 1672748 (+0.03%); split: -0.11%, +0.14%
InvThroughput: 237276 -> 237546 (+0.11%); split: -0.00%, +0.12%
SClause: 5694 -> 5690 (-0.07%); split: -0.28%, +0.21%
Copies: 21685 -> 21682 (-0.01%); split: -0.12%, +0.10%
Branches: 5740 -> 5863 (+2.14%)
PreSGPRs: 7004 -> 7034 (+0.43%)
VALU: 123595 -> 123641 (+0.04%); split: -0.00%, +0.04%
SALU: 28418 -> 28411 (-0.02%); split: -0.09%, +0.06%

Fixes: f35e229fae ('aco: skip code if exec is empty')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33619>
(cherry picked from commit 69dcd5be3a)
2025-04-02 11:04:10 +02:00
Eric Engestrom
69d6923cdb [25.0 only] update ci expectations
These changes happened with no mesa code change, only infrastructure
changes, which is really weird, but to be able to move on, let's simply
document the "new normal".
2025-04-02 11:04:10 +02:00
Daniel Stone
0c6e647769 ci: Re-enable trace jobs with updated Piglit
mesa/piglit!996 fixed up Piglit to allow us to do trace downloads again,
so we can now bring these jobs back. The fdno trace jobs hosted at
Google are still disabled whilst we try to fix their nginx.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34245>
(cherry picked from commit f6f085f50a)
2025-03-29 20:45:02 +01:00
Eric Engestrom
caf97cb688 .pick_status.json: Update to e3433489f8 2025-03-29 20:45:02 +01:00
Eric Engestrom
a423142482 pick-ui: fix parsing of multiple backport-to: lines
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34117>
(cherry picked from commit e7b2eda39d)
2025-03-29 20:45:02 +01:00
Eric Engestrom
6b31b441f9 ci: run shader-db & zink-lvp on kvm runners
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
(cherry picked from commit 6cd7b65ac0)
2025-03-29 20:45:02 +01:00
Valentine Burley
58e28017cf ci: Add missing kvm runner tags
A recent change now requires the kvm runner tag to be explicitly listed
for jobs that need to run on runners with KVM capability.
This ensures the jobs are scheduled on compatible runners.

Cc: mesa-stable

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
(cherry picked from commit a36379d973)
2025-03-29 20:45:02 +01:00
Eric Engestrom
666e00cfb8 ci: replace broken s3cp command with a simple curl call
The current `s3cp` implementation does not work anymore after the
migration, and instead of fixing it and propagating the fix down to us,
it's simpler to directly use `curl`.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
(cherry picked from commit 7178425ccf)
2025-03-29 20:45:02 +01:00
Eric Engestrom
2ed27e069e ci: always abort if the curl download fails
Reported-by: @Valentine
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
(cherry picked from commit d425847793)
2025-03-29 20:45:02 +01:00
Eric Engestrom
bcaae89905 ci/piglit: drop usage of s3cp for a simple download
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34120>
(cherry picked from commit 213550d2e0)
2025-03-29 20:45:01 +01:00
Eric Engestrom
43d5f3ca29 .pick_status.json: Update to 85983e060c 2025-03-29 20:45:01 +01:00
Eric Engestrom
a801a4aab6 docs: add sha sum for 25.0.2 2025-03-20 15:00:31 +01:00
Eric Engestrom
06631a8876 VERSION: bump for 25.0.2 2025-03-20 14:32:27 +01:00
Eric Engestrom
0c1ea399a2 docs: add release notes for 25.0.2 2025-03-20 14:32:27 +01:00
Aaron Ruby
63ec8e94fc gfxstream: Downgrade log severity when enabling params in LinuxVirtGpu
Reviewed-By: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33944>
(cherry picked from commit 9447de5dc4)
2025-03-20 14:26:05 +01:00
Bas Nieuwenhuizen
9d85e7eda9 radv: Move support check out of winsys.
To get the right error code. Mostly shouldn't be winsys dependent
anyway, outside of the idea that if we explicitly emulate a device
we should just assume th euser knows what they're doing.

Fixes: c942d957b0 ("radv: fail to initialize when the AMD GPU generation is unsupported")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12792
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33964>
(cherry picked from commit 61feea6954)
2025-03-15 09:49:05 +01:00
Ganesh Belgur Ramachandra
63e1e2c926 amd: use 128B compression for scanout images when drm.minor <63
Fixes: 8328e575 ("ac/surface/gfx12: enable DCC 256B compressed blocks and reorder modifiers")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33702>
(cherry picked from commit ba80a11b69)
2025-03-15 09:49:05 +01:00
Mike Blumenkrantz
43cab94575 zink: fix refcounting of zink_surface objects
this was previously a no-op because the pointers were identical,
leading to an extra unref in check_framebuffer_surface_mutable()

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34077>
(cherry picked from commit f5c66e2d4a)
2025-03-15 09:49:05 +01:00
Karol Herbst
54ee9cb342 nir/serialize: fix decoding of is_return and is_uniform
Fixes: 3321a56d1d ("nir: Serialize all parameter attributes")
Fixes: 26cbb6b933 ("nir: Add parameter divergence info")

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34052>
(cherry picked from commit 3a9954c117)
2025-03-15 09:49:05 +01:00
Georg Lehmann
d00144c8f0 aco/ra: disallow vcc definitions for pseudo scalar trans instrs
Foz-DB GFX1201:
Totals from 30 (0.04% of 79600) affected shaders:
Instrs: 58843 -> 58820 (-0.04%); split: -0.10%, +0.06%
CodeSize: 302228 -> 301944 (-0.09%); split: -0.13%, +0.04%
Latency: 204566 -> 204432 (-0.07%); split: -0.09%, +0.02%
InvThroughput: 136918 -> 136919 (+0.00%); split: -0.00%, +0.00%
SClause: 1241 -> 1249 (+0.64%); split: -0.56%, +1.21%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34006>
(cherry picked from commit d1dca26941)
2025-03-15 09:49:05 +01:00
Samuel Pitoiset
0c0f4de8ad radv: emit a dummy PS state for noop FS on GFX12
It seems the hardware requires a dummy PS state with a noop FS,
otherwise it might just hang. This used to work just fine on older
gens.

Note that RadeonSI refuses to draw if VS or PS is missing and AMDVLK
seems to also always emit this state. So, this might be a bug that AMD
didn't encounter at all.

This fixes a GPU hang during loading with Ghostwire: Tokyo.

Backport-to: 25.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34070>
(cherry picked from commit 1e4cfd9dfa)
2025-03-15 09:49:05 +01:00
Lucas Stach
e576d84f03 etnaviv: fix ETNA_MESA_DEBUG=no_early_z
This feature bit has inverted polarity from most other feature bits:
if the bit is present the driver should not use early Z. So the bit
must be set when the debug option to disable early Z is enabled.

Fixes: d600b45ccc ("etnaviv: Switch to etna_core APIs")
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/34064>
(cherry picked from commit 4608eef0a0)
2025-03-15 09:49:04 +01:00
Patrick Lerda
4d4568cb88 r600: update the software fp64 support
This change began by fixing an old regression related to the dceil
functionality. This issue affected palm. Now, this change adjusts
the software fp64 support to make it fully operational.

This change was tested on palm and barts. This change fixes 561
"piglit run all" tests. The khr_gl tests are fixed as well (243 tests).
Here is a summary:
spec/arb_gpu_shader_fp64/execution/built-in-functions/*
spec/arb_gpu_shader_fp64/execution/fs-isnan-dvec: fail pass
spec/arb_gpu_shader_fp64/execution/gs-isnan-dvec: fail pass
spec/arb_gpu_shader_fp64/execution/vs-isnan-dvec: fail pass
spec/glsl-4.00/execution/built-in-functions/*
spec/glsl-4.10/execution/conversion/*
khr-gl4[3-5]/compute_shader/fp64-case1: fail pass
khr-gl4[0-5]/gpu_shader_fp64/builtin/*

Fixes: aed6a39c10 ("glsl: Retire dround lowering.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33708>
(cherry picked from commit 186fb5e73a)
2025-03-15 09:49:04 +01:00
Lionel Landwerlin
56b954a37a brw: ensure VUE header writes in HS/DS/GS stages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12820
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34041>
(cherry picked from commit 35df3925ca)
2025-03-15 09:49:04 +01:00
Lionel Landwerlin
267502f9f3 brw: fix spilling for Xe2+
The problem occurs with a series of instructions build the subgroup
invocation value :

mov(8)          g23<1>UW        0x76543210V
add(8)          g23.8<1>UW      g23<8,8,1>UW    0x0008UW
add(16)         g23.16<1>UW     g23<16,16,1>UW  0x0010UW

Our register spilling code operates on physical registers (64B on
Xe2+) and using the brw_inst::is_partial_write() helper only considers
32B registers. So the spiller doesn't see that the add(16) instruction
is doing a partial write and ends up discarding the previous value.

You can reproduce the issue by running a test like :

INTEL_DEBUG=spill_fs ./deqp-vk -n dEQP-VK.compute.pipeline.cooperative_matrix.khr_a.subgroupscope.constant.uint8_uint8.buffer.rowmajor.linear

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: aa494cbacf ("brw: align spilling offsets to physical register sizes")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33642>
(cherry picked from commit c60180ba63)
2025-03-15 09:49:04 +01:00
Matt Turner
c3f4bb2a7d glsl: Add missing break
Reported by clang's `-Wimplicit-fallthrough`.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34014>
(cherry picked from commit 8d6deb4073)
2025-03-15 09:49:04 +01:00
Seán de Búrca
9bcdf5b859 rusticl/mem: don't create svm_pointers slice from null raw pointer
std::slice::from_raw_parts requires that the slice pointer be non-null,
even when the slice contains zero elements. Failing this invariant is
undefined behavior.

v2: reordered commits to allow cherry-picking bugfixes

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33989>
(cherry picked from commit 5e365f1674)
2025-03-15 09:49:04 +01:00
Lucas Stach
3d600b2c0e etnaviv: rs: fix slow/fast clear transitions
When a slow/fast/slow clear sequence is executed on a surface, the second
slow clear will not regenerate the clear command if the clear value of the
fast clear is the same as the one used for the second slow clear, as the
current stored surface clear value is the same as the new clear value.
The command generated on the first slow clear however may have used a
different clear value, which is now submitted unchanged to the hardware on
the second slow clear.

Fix this by only generating the clear command if there is no valid one
already. If we already have a valid clear command simply update the fill
value in that command with the new clear value. This has some marginal
overhead, but has been chosen over the alternative of adding more state by
remembering the last slow clear value.

Cc: mesa-stable
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/34029>
(cherry picked from commit fb0f9e6352)
2025-03-15 09:49:04 +01:00
Patrick Lerda
249613cd92 r600: fix cayman main non-deterministic behavior problem
Cayman has a non-deterministic behavior issue which is
visible with the test below (arb_shader_image_size).
The tests fail randomly at the "fragment" test category.
Anyway, if the "compute" category is removed, the same
tests are working flawlessly.

The "compute" part of the driver was interfering with the
graphic pipeline. The culprit is the packet PKT3_DEALLOC_STATE
which puts the gpu in an incorrect state to perform some
graphic operations.

This change fixes this problem by issuing a PKT3_CLEAR_STATE
packet just after the PKT3_SURFACE_SYNC packet. As explained
by d51dbe048a PKT3_DEALLOC_STATE is mandatory on cayman to
avoid a gpu hang at the PKT3_SURFACE_SYNC stage.

This correction makes tests like
"spec@glsl-4.30@execution@built-in-functions@cs-.*" to pass
in an utterly deterministic way without random failures.
This change removes around 500 random failures for a
"piglit run all".

For instance, this issue is triggered on cayman with
"piglit/bin/arb_shader_image_size-builtin -auto -fbo".

Fixes: d51dbe048a ("r600g/compute: Emit DEALLOC_STATE on cayman after dispatching a compute shader.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33973>
(cherry picked from commit 085cfc98cc)
2025-03-15 09:49:04 +01:00
David Rosca
94a92219d7 gallium/vl: Return YUV plane order for single plane formats
The order only matters for multi plane formats, but we still need to
return valid value for single plane formats.

Fixes crash reported here: https://github.com/mpv-player/mpv/issues/15992

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33938>
(cherry picked from commit 6f35d3768d)
2025-03-15 09:49:04 +01:00
Samuel Pitoiset
ca58bc9d8f aco: do not apply OMOD/CLAMP for pseudo scalar trans instrs
This optimization seems broken because eg. v_s_log_f32 uses SGPRs
for both the source and destination but applying OMOD seems to require
VGPRs.

This fixes a GPU hang when launching Enshrouded on GFX1201.

No fossils db changes on GFX1201.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34027>
(cherry picked from commit f46830912e)
2025-03-15 09:49:04 +01:00
Eric Engestrom
46d1ff0765 meson: announce that clover is deprecated (slated for removal)
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19385;
the timeline is not 100% decided yet, but let's warn users already.

Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34021>
(cherry picked from commit a0b457aca6)
2025-03-15 09:49:04 +01:00
Faith Ekstrand
83a18330f3 egl/kopper: Update the EGLSurface size after kopperSwapBuffers()
Otherwise, the size of the EGLSurface and the drawable may get out of
sync if kopper needs to re-create the swapchain at a different size.
This can cause problems with things like eglSetDamageRegionKHR() where
the core EGL code clamps them to the size in the EGLSurface.

With Wayland, it's up to the client to choose a size and resize by
creating a new EGLSurface with a different size.  Only on X11 can we
get a resize side-band like this.

Normally, without kopper, this goes the other direction where the X11
EGL code will detect a surface size change in dri2_x11_query_surface()
and it invalidates the drawable if they've changed, forcing
re-allocation.  Kopper, however, works more like the DRI2 path where we
just get handed buffers at some size decided by X11 and have to deal
with them.  In the DRI2 path, the size is unconditionally updated by
dri2_x11_get_buffers().  This is roughly equivalent, updating the size
right after every call to kopperSwapBuffers().

Fixes: 8ade5588e3 ("zink: add kopper api")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12797
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34015>
(cherry picked from commit ad90dbabe4)
2025-03-15 09:49:04 +01:00
Faith Ekstrand
18fc1a4aff egl/x11: Re-order an if statement
Switch on kopper first so it's easier to do other, common things on the
kopper path.

Fixes: 8ade5588e3 ("zink: add kopper api")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34015>
(cherry picked from commit dc8714c568)
2025-03-15 09:49:04 +01:00
Dave Airlie
9fb0403e27 radv/video: don't try and send events on UVD devices.
This should fix some hangs on polaris when decode is forced on.

Fixes: 95a980b61f ("radv/video: add event support for VCN4")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34013>
(cherry picked from commit 2e3b23539e)
2025-03-15 09:49:04 +01:00
John Anthony
8620d4a494 panvk: Avoid division by zero for vkCmdCopyQueryPoolResults
Stride can be zero if there are less than two queries to copy.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 7755c41b3e ("panvk/csf: Rework the occlusion query logic to avoid draw flushes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34020>
(cherry picked from commit 8a47ae456c)
2025-03-15 09:49:04 +01:00
Lionel Landwerlin
2d96b368cd anv: fix non page aligned descriptor bindings on <Gfx12.0
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ab7641b8dc ("anv: implement descriptor buffer binding")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33911>
(cherry picked from commit de2a65ade6)
2025-03-15 09:49:04 +01:00
Georg Lehmann
0be9c89310 aco/gfx11.5: remove vinterp ddx/ddy path
While the idea to take advantage of the higher throughput wasn't bad,
the hardware wasn't design with this in mind and doesn't behave like expected
with constant sources.

Fixes: bee487df48 ("aco/gfx11.5+: use vinterp for fddx/fddy")
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33969>
(cherry picked from commit 3b5e537b09)
2025-03-15 09:49:03 +01:00
Samuel Pitoiset
22ba337921 radv: update conformance version
A lot of people (including me) misinterpreted the conformanceVersion
field for so long. The Vulkan spec wasn't very clear either but it's
going to be clarified soon.

VkConformanceVersion is actually unrelated to the official CTS
conformance process in Khronos. It just reports the latest CTS version
that the driver can pass, not more.

For GFX8+, RADV should be passing CTS 1.4.0.0 on all GPUs because we
validated this CTS version recently for Vulkan 1.4.

For GFX6-7, which only suppports Vulkan 1.3, RADV should also be
passing CTS 1.4.0.0, because newer versions of the CTS can be used
to validate a driver against an older version of the spec, so
it's perfectly fine to report a higher CTS version than the Vulkan version.

Newer CTS versions likely can't pass 100% due to a DGC bug that I still
need to fix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12799
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34018>
(cherry picked from commit e519e0b9e6)
2025-03-15 09:49:03 +01:00
Samuel Pitoiset
e5f0fd5626 radv/amdgpu: fix device deduplication
To correctly deduplicate device inside the winsys, it should use the
fd or amdgpu_device_handle. Using the allocated ac_drm_device as key
is obviously broken.

Not deduplicating devices breaks memory budget and a bunch of games
were broken.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12686
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12775
Fixes: a565f2994f ("amd: move all uses of libdrm_amdgpu to ac_linux_drm")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34005>
(cherry picked from commit c627097841)
2025-03-15 09:49:03 +01:00
Sviatoslav Peleshko
22991d17a3 drirc: Apply assume_full_subgroups_with_shared_memory to Resident Evil 2
The game uses a compute shader for occlusion culling. This shader lacks
proper groupshared memory sync, and needs 32-wide subgroup to work
correctly.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7595
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23408>
(cherry picked from commit bd45b738b7)
2025-03-15 09:49:03 +01:00
Sviatoslav Peleshko
090dbbc995 anv: Add full subgroups workaround for the shaders that use shared memory
This workaround is similar to anv_assume_full_subgroups, but it applies
to the shaders that use shared memory. If they rely on the implicit
synchronization, and we choose a smaller group size than the
(broken) shader expects, it will produce incorrect results.

Cc: mesa-stable
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23408>
(cherry picked from commit 369aec5704)
2025-03-15 09:49:03 +01:00
Faith Ekstrand
3be28b42e2 vtn: Support cooperative matrices in OpConstantNull
Cooperative matrix initializers are a single scalar value that gets
broadcasted to the entire matrix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12679
Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33747>
(cherry picked from commit 7c47a3d0f7)
2025-03-15 09:49:03 +01:00
Maíra Canal
c420a3495b v3dv: don't overwrite the primary fd if it's already set
If a valid primary file descriptor is already set (e.g. from vc4),
don't overwrite it with -1.

This prevents losing a valid primary fd and resolves issues arising
when vc4 is the first node returned by `drmGetDevices2()` and v3d is
the second.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12777
Fixes: 188f1c6cbe ("v3dv: rewrite device identification")
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/33958>
(cherry picked from commit 7775c79035)
2025-03-15 09:49:03 +01:00
Samuel Pitoiset
2d9d444aa7 radv: fix a GPU hang with inherited rendering and HiZ/HiS on GFX1201
With secondary command buffers, inherited rendering can be used but
it's basically impossible to know if the depth/stencil attachment
enabled HiZ/HiS. But it's required to disable WALK_ALIGN8 to avoid
GPU hangs.

This assumes that HiZ/HiS is enabled for inherited rendering as long
as a depth/stencil attachment is used. It's not the most optimal
approach but it's not supposed to hurt either.

This fixes a GPU hang with
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.contents_secondary_cmdbuffers
and friends.

GFX1200 isn't affected because it doesn't support HiZ/HiS.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33986>
(cherry picked from commit d1a2ba57f9)
2025-03-15 09:49:03 +01:00
Erik Faye-Lund
7627192919 panvk: correct VkPhysicalDeviceProperties::deviceName
We currently report a deviceName as e.g. "Mali-G610 (Panfrost)", but
panfrost has nothing to di with the physical device, and the suffix
doesn't belong there at all.

So let's remove that suffix from PanVK. This results in output like this
from vulkaninfo:

---8<---
VkPhysicalDeviceProperties:
---------------------------
        apiVersion        = 1.1.305 (4198705)
        driverVersion     = 25.0.99 (104857699)
        vendorID          = 0x13b5
        deviceID          = 0xa8670000
        deviceType        = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
        deviceName        = Mali-G610
        pipelineCacheUUID = <snip>
---8<---

We already sort of namedrop Panfrost in the driver properties:

---8<---
VkPhysicalDeviceDriverPropertiesKHR:
------------------------------------
        driverID        = DRIVER_ID_MESA_PANVK
        driverName      = panvk
        driverInfo      = Mesa 25.1.0-devel (git-136dd9f985)
        conformanceVersion:
                major    = 1
                minor    = 4
                subminor = 1
                patch    = 2
---8<---

While this might techically speaking be a regression, PanVK has been
marked as experimental until Mesa 25.0. But to reduce the risk of people
starting to depend on this behavior, let's also backport this change to
the 25.0 release.

The patch looks a bit funny, because we add the " (Panfrost)"-suffix in
common code, and this moves it to the Gallium driver. But effectively,
this means PanVK is the only driver that sees a change of behavior.

Backport-to: 25.0
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33972>
(cherry picked from commit c34c7b1f3b)
2025-03-15 09:49:03 +01:00
Pierre-Eric Pelloux-Prayer
6f0eb911f7 st/mesa: fix nir_load_per_vertex_input parameter
num_components should be 1 as we're loading an offset value.

Fixes: ec68f0492b ("st/mesa: switch GL_SELECT shader to IO intrinsics")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12774
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33982>
(cherry picked from commit 770b5bc757)
2025-03-15 09:49:03 +01:00
Faith Ekstrand
9557d9b93b nil: Relax alignment requirements for linear images
Compositors sometime try to import BOs with lower alignments than 128B.
This seems particularly common in the case of cursor images but it can
also happen on other BOs allocated by the old nouveau GL driver.  As
long as we avoid rendering to them (which NVK will do), the
texture/image hardware is fine as long as they're at least 32B-aligned.
Panicing in this case isn't very nice to compositors.

Backport-to: 25.0
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
(cherry picked from commit 3c11da8aea)
2025-03-15 09:49:03 +01:00
Faith Ekstrand
fb1d8599b4 nvk: Allow rendering to linear images with unaligned strides
We can do this by just enabling the fall-back path whenever we detect
something that's not nicely aligned.

Backport-to: 25.0
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33990>
(cherry picked from commit e36f9d6909)
2025-03-15 09:49:03 +01:00
Ivan A. Melnikov
1784e9d142 gallium/radeon: Make sure radeonsi PCI IDs are also included
When importing libdrm_radeon code [1][2] it was somehow missed
that what libdrm has in one r600_pci_ids.h, Mesa has split
into r600_pci_ids.h and radeonsi_pci_ids.h. So, devices
with ids from radeonsi_pci_ids.h were not considered valid for
radeon_surface_manager_new.

This commit changes that, thus fixing radeonsi for these
devices.

[1] commit 1299f5c50a
[2] commit 3aa7497cc0

Fixes: 1299f5c50a
Signed-off-by: Ivan A. Melnikov <iv@altlinux.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33940>
(cherry picked from commit 4ad5b8f5bb)
2025-03-15 09:49:03 +01:00
Job Noorman
e4674b3d33 ir3: keep inputs at start block when creating empty preamble
It is expected that inputs and prefetches are always in the first block.
However, ir3_create_empty_preamble would create blocks before the first
one, leaving inputs after the preamble. This causes issues with
(probably among others) spilling/RA where precolored inputs could
illegally reuse the spill base register.

Fixes RA validation failures on a7xx for
dEQP-VK.ray_query.multiple_ray_queries.vertex_shader

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: f3026b3d3e ("ir3: add some preamble helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33977>
(cherry picked from commit c58ba21ba8)
2025-03-15 09:49:03 +01:00
Natalie Vock
9bcbdbfcf2 radv/rt: Flush L2 after writing internal node offset on GFX12
Otherwise the encoder can read a stale value and make internal nodes
point into leaf space (if 0 is read).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33985>
(cherry picked from commit a1b0599105)
2025-03-15 09:49:03 +01:00
Natalie Vock
5603cefd94 radv/rt: Guard leaf encoding by leaf node count
For empty BVHs we shouldn't emit any leaf nodes, but there is one
invocation to encode the root node. Guard leaf node encoding so that
invocation doesn't try writing any leaves.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33985>
(cherry picked from commit cdadda2d51)
2025-03-15 09:49:03 +01:00
Ashley Smith
00f882c07a panfrost: Reset syncobj after use to avoid kernel warnings
We get a kernel message "You are adding an unorder point to timeline!"
on many CTS runs. This stems from us SIGNALing the queue syncobj then
WAITing but not reseting it. It is assumed by the time we get to
panvk_queue_submit_init_signals() that the value is 0, however it is 1
due to the previous calls.

Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 5544d39f ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33943>
(cherry picked from commit 14101ff948)
2025-03-15 09:49:02 +01:00
David Rosca
2ad0974e1e frontends/vdpau: Fix creating deinterlace filter for interleaved buffers
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12755
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927>
(cherry picked from commit e56b906df9)
2025-03-15 09:49:02 +01:00
David Rosca
94ff2a8ddd Revert "frontends/vdpau: Alloc interlaced surface for interlaced pics"
This is not needed now when deinterlace can handle non-interlaced
buffers. Also this forces the buffer as interlaced which doesn't work
on radeonsi anymore.

This reverts commit 0ee4506c3a.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927>
(cherry picked from commit 6b91f13d5d)
2025-03-15 09:49:02 +01:00
David Rosca
3ad2c24988 gallium/vl: Fix video buffer supported format check
It needs to check all plane formats.

Fixes: c3ceec6cd8 ("vdpau: Refactor query for video surface formats.")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33927>
(cherry picked from commit 244cfac143)
2025-03-15 09:49:02 +01:00
Samuel Pitoiset
a4e6a8fb96 ac,radv: add a workaround for a hw bug with primitive restart on GFX10-GFX10.3
At least, NAVI10, NAVI21 and NAVI24 are affected by this what looks
like a hardware bug when primitive restart is changed and no context
registers are written between draws. It seems the hardware doesn't
consider primitive restart at all in this situation.

Adding SQ_NON_EVENT(0) as suggested by Marek seems to fix it reliably
without introducing any overhead. It's basically a NOP packet that adds
a small delay.

Fixes new VKCTS coverage dEQP-VK.transform_feedback.primitive_restart.*.
Also fixes this old vkd3d-proton issue.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7258
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33929>
(cherry picked from commit 0bc9d59c2e)
2025-03-15 09:49:02 +01:00
Yiwei Zhang
c9112e3050 venus: fix to ignore dstSet for push descriptor
Per push descriptor spec:

Each element of pDescriptorWrites is interpreted as in
VkWriteDescriptorSet, except the dstSet member is ignored.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33948>
(cherry picked from commit c7bc90eaec)
2025-03-15 09:49:02 +01:00
Eric Engestrom
45e99616f3 .pick_status.json: Mark 551770ccf8 as denominated 2025-03-15 09:49:02 +01:00
Timothy Arceri
4fdb2e99a8 util/u_idalloc: fix util_idalloc_sparse_alloc_range()
If the allocation didn't fit within the segment the loop incorrectly
freed ids of a range of different segments due to the loop redeclaring
i.

Fixes: d4085aaf56 ("util: add util_idalloc_sparse, solving the excessive virtual memory usage")

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33934>
(cherry picked from commit 25e008c639)
2025-03-15 09:49:02 +01:00
Alyssa Rosenzweig
4da0e7ffaf nir/lower_helper_writes: fix stores after discard
We need to use nir_is_helper_invocation instead of
nir_load_helper_invocation, to correctly predicate stores after demote.

Identified in a Piglit on AGX a year ago but I forgot to upstream this.

Fixes: 586da7b329 ("nir: Add nir_lower_helper_writes pass")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
(cherry picked from commit bc6b527b52)
2025-03-15 09:49:02 +01:00
Alyssa Rosenzweig
cd9dae9931 pan/mdg: call nir_lower_is_helper_invocation
needed to avoid regression from the next patch.

backported because the next patch is too

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33939>
(cherry picked from commit e90ccf91a3)
2025-03-15 09:49:02 +01:00
Mel Henning
f2a8804927 nvk: Don't zero imported memory
This fixes eg.
dEQP-VK.drm_format_modifiers.export_import_fmt_features2.a8b8g8r8_uint_pack32
with NVK_DEBUG=zero_memory

Fixes: 0399999dec ("nvk: Support dma-buf import")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33947>
(cherry picked from commit cab80223fd)
2025-03-15 09:49:02 +01:00
Faith Ekstrand
6187b8e4c0 zink: Check queue families when binding image resources
We check for iamge layouts and feedback loops when we bind image
resources but not queue families.  If the resource isn't on the graphics
queue, we need to add it to need_barriers so we can transition it back
to our queue.

Fixes: d4f8ad27f2 ("zink: handle implicit sync for dmabufs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33952>
(cherry picked from commit 18d206d67c)
2025-03-15 09:49:02 +01:00
Faith Ekstrand
5c0fd3e20d zink: Set needs_barrier after transitioning to QUEUE_FAMILY_FOREIGN
Otherwise, we'll transition to QUEUE_FAMILY_FOREIGN and then forget that
we left it on the foreign queue and never transition back the next time
we use the resource.  This was kind-of okay with Wayland compositors
because they always re-import the BO so it's always fresh and they pick
up on the queue transfer the first time.  X11, on the other hand, does
not re-import BOs so they get stuck in this weird QUEUE_FAMILY_FOREIGN
limbo until something happens to randomly trigger a layout transition
check and then we find it and do the transition.  We should mark them as
needing a barrier the moment we transition to QUEUE_FAMILY_FOREIGN.

Fixes: d4f8ad27f2 ("zink: handle implicit sync for dmabufs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33952>
(cherry picked from commit 396ece1ad8)
2025-03-15 09:49:02 +01:00
Yiwei Zhang
a67d8b0a6b lavapipe: fix accel struct device query copy
This change:
1. use vulkan flags instead of pipe query flags
2. set the avail bit when requested

Fixes: a26f96ed3d ("lavapipe: Handle accel struct queries in handle_copy_query_pool_results")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33951>
(cherry picked from commit e538a38017)
2025-03-15 09:49:02 +01:00
Yiwei Zhang
26b33e2e4d lavapipe: set availability bit for accel struct host queries
Fixes: 897ccbd180 ("lavapipe: Implement VK_KHR_acceleration_structure")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33951>
(cherry picked from commit bc190cab2d)
2025-03-15 09:49:02 +01:00
Rebecca Mckeever
ff107b6123 panvk: Add STORAGE_IMAGE_BIT feature for formats supporting sampled images
All formats that support sampled images should also be suitable for
storage images.

Fixes: d970fe2e ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33459>
(cherry picked from commit 27037efcfd)
2025-03-15 09:49:02 +01:00
Erik Faye-Lund
f6ccb29a68 docs/features: add missing panvk feature
I forgot to document this feature when I added it, whoops!

Fixes: ac05c2a2b8 ("panvk: expose subgroup operations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33918>
(cherry picked from commit 1a1412e66e)
2025-03-15 09:49:02 +01:00
Georg Lehmann
3abbecb10d radv: enable invariant geom for DOOM(2016)
Moving alu reordered some fmuls and since we prefer the closest fmul for ffma,
this causes precision to mismatch between depth write and depth test.

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

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33933>
(cherry picked from commit 7b1f1a107e)
2025-03-15 09:49:01 +01:00
Marek Olšák
de3dd2afdf Revert "ac/nir: clamp vertex color outputs in the right place"
This reverts commit b3fc49686e.

It was a rebase failure.

Fixes: b3fc49686e

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33482>
(cherry picked from commit 177c9b173e)
2025-03-15 09:49:01 +01:00
Yiwei Zhang
49b2aad9eb venus: fix a memory corruption in query records recycle
The free list must be re-initialized. Found the bug while running:
dEQP-VK.ray_tracing_pipeline.acceleration_structures.device_compability_khr.gpu_built.top
where it invokes VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT to purge
the cmd pool resources, and the next alloc still gets cache hit with the
"empty" list.

Fixes: e2c4bafccc ("venus: free query batches for VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33908>
(cherry picked from commit 6868212774)
2025-03-15 09:49:01 +01:00
José Roberto de Souza
9a34afca0f intel/common: Retry GEM_CONTEXT_CREATE when PXP have not finished initialization
If PXP initialization is not completed and application requested a
protected context the GEM_CONTEXT_CREATE will wait up to 250ms for
PXP to finish initialization but if that do not happens it will
return a error and set errno to EIO.
This patch add the missing retry handling.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30723>
(cherry picked from commit 008ac818ba)
2025-03-15 09:49:01 +01:00
Karol Herbst
aff18d4898 rusticl/program: fix building kernels
We ended up with duplicates, but also rebuilt the same kernel over and
over again for multi dev builds.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
(cherry picked from commit ce60f47e96)
2025-03-15 09:49:01 +01:00
Karol Herbst
b5ec24f356 rusticl/program: rework build_nirs so it only touches devices we care about
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
(cherry picked from commit 57a7e86aa9)
2025-03-15 09:49:01 +01:00
Karol Herbst
4d5d4ead44 rusticl/program: loop over all devices inside Program::build
We want to build the kernels once and atm we are doing it several times
for each device.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
(cherry picked from commit 241279ac2c)
2025-03-15 09:49:01 +01:00
Karol Herbst
9247e110cd rusticl/program: pass options by reference
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
(cherry picked from commit e434ce1559)
2025-03-15 09:49:01 +01:00
Karol Herbst
88f749d049 rusticl/program: implement CL_INVALID_PROGRAM_EXECUTABLE check in clGetProgramInfo
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33892>
(cherry picked from commit b2f3933c8d)
2025-03-15 09:49:01 +01:00
Rob Clark
68520f2279 freedreno: Wait for imported syncobj fences to be available
Waiting on a fence created from an imported syncobj needs wait for the
fence_fd to become available

Fixes piglit tests added in https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/992

Fixes the following issue for freedreno: #12650

Cc: mesa-stable
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33724>
(cherry picked from commit ee787b64ed)
2025-03-15 09:49:01 +01:00
Rob Clark
19b840362d tc: Add missing tc_set_driver_thread()
Cc: mesa-stable
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33724>
(cherry picked from commit fac2c4af1b)
2025-03-15 09:49:01 +01:00
Job Noorman
a476298ae5 ir3: fix false dependencies of rpt instructions
When merging multiple instructions into one rpt instruction, the false
deps of the rpt instruction should be the union of the false deps of its
parts.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 4c4366179b ("ir3: add post-RA pass to merge repeat groups into rptN instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32454>
(cherry picked from commit 0f6ec14925)
2025-03-15 09:49:01 +01:00
Rhys Perry
6999073da9 aco: insert dependency waits in certain situations
This seems to fix some artifacts, but we're not sure why, so it might not
be a correct or optimal solution.

fossil-db (navi31):
Totals from 28424 (35.81% of 79377) affected shaders:
Instrs: 30112910 -> 30348977 (+0.78%); split: -0.00%, +0.78%
CodeSize: 159542980 -> 160485336 (+0.59%); split: -0.00%, +0.59%
Latency: 221438396 -> 221500856 (+0.03%); split: -0.00%, +0.03%
InvThroughput: 38154231 -> 38159984 (+0.02%); split: -0.00%, +0.02%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33853>
(cherry picked from commit 0ec174afd5)
2025-03-15 09:49:01 +01:00
Faith Ekstrand
58d30fed2f zink: Use pipe_box helpers for damage calculations
The old code got the accumulation a bit wrong.  For one thing, it always
accumulates with whatever was there instead of resetting to empty each
time.  For another, it sets with with y and height with x when it writes
back to the resource.  This is also all too complicated because it
converts between pipe_box, u_rect, and VkRect2D on every iteration.

Instead, there are helpers in util/box.h which will do most of this work
for us and they're correct.  Let's just use them to get rid of the bugs
and make everything simpler and more obvious at the same time.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12194
Fixes: 3d38c9597f ("zink: hook up KHR_partial_update")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33855>
(cherry picked from commit 11939a70df)
2025-03-15 09:49:00 +01:00
Faith Ekstrand
a8a5e94ddf util/box: Add a intersect_2d helper
Fixes: 3d38c9597f ("zink: hook up KHR_partial_update")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33855>
(cherry picked from commit 8cf921a742)
2025-03-15 09:49:00 +01:00
Mary Guillemard
6b92f95f6e pan/bi: Ensure we select b0 with halfswizzle in va_lower_constants
In case of constant lowering with halfswizzle sources, we were selecting
h01 causing an invalid instruction error to be yield later.

This can only be hit by conversion instructions and shouldn't be seen in
the wild (as this should be eliminated before entering the backend).

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 7d07fb9a67 ("pan/va: Handle 8-bit lane when lowering constants")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
(cherry picked from commit 2f1ce296d0)
2025-03-15 09:49:00 +01:00
Mary Guillemard
54fb1e47d5 pan/bi: Fix out of range access in bi_instr_replicates
For replicates, we were checking equivalence between two sources on some
instructions but some of them only had one source causing an out of
bound access and check against unrelated data.

Instead we now always return true for those instructions.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f7d44a46cd ("pan/bi: Optimize replication")
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33867>
(cherry picked from commit 8948b74955)
2025-03-15 09:49:00 +01:00
Eric Engestrom
2b381ba435 .pick_status.json: Update to 61feea6954 2025-03-15 09:48:51 +01:00
Eric Engestrom
d09833d705 .pick_status.json: Mark 534436f863 as denominated 2025-03-05 22:49:42 +01:00
Eric Engestrom
a7da6ebcdd .pick_status.json: Mark 61b0955308 as denominated 2025-03-05 22:49:42 +01:00
Eric Engestrom
d2e943ad17 docs: add sha sum for 25.0.1 2025-03-05 22:25:44 +01:00
Eric Engestrom
c185b4a7b0 VERSION: bump for 25.0.1 2025-03-05 22:05:32 +01:00
Eric Engestrom
0634473336 docs: add release notes for 25.0.1 2025-03-05 22:05:32 +01:00
Guilherme Gallo
7e12252613 ci/lava: Add U-Boot action timeout for rockchip DUTs
Add a specific timeout for the U-Boot action in LAVA job definitions for
rockchip devices. This ensures sufficient time for U-Boot to download
the kernel and set up early network, preventing potential job failures
due to timeout constraints.

This behavior started to happen since LAVA 2025.02 version.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
(cherry picked from commit 1dbebd2619)
2025-03-05 21:26:48 +01:00
Guilherme Gallo
989f2d8b34 ci/lava: Propagate errors in SSH tests
The `lava_ssh_test_case` wrapper was missing the `set -e` shell option,
which made LAVA system interpret the job was succeeding, because the
`container` namespace was exiting normally, even though the `dut`
namespace was failing.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
(cherry picked from commit 1169f704d3)
2025-03-05 21:26:48 +01:00
Guilherme Gallo
9347962591 ci/lava: Drop the repeating quotes on lava-test-case
LAVA was recently patched [1] with a fix on how parameters are parsed in
`lava-test-case`, so we don't need to repeat quotes to send the
arguments properly to it.

[1] 18c9cf7976

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33839>
(cherry picked from commit 02a86b3284)
2025-03-05 21:26:48 +01:00
Faith Ekstrand
a591864851 egl/wayland: Pass the original wl_surface to kopper
The Vulkan WSI code creates its own proxies so there's no benefit to
passing the proxy in.  It only screws things up.

Fixes: 8ade5588e3 ("zink: add kopper api")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33860>
(cherry picked from commit 99b5970eb2)
2025-03-05 21:26:48 +01:00
Faith Ekstrand
4e0f86e99f egl/dri2: Rework get_wl_surface_proxy()
Instead, just make it a helper for getting the wl_surface from the
wl_egl_window.  We'll want this in the next commit.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33860>
(cherry picked from commit fddff0d1b8)
2025-03-05 21:26:48 +01:00
Mike Blumenkrantz
0feebb60ad mesa: avoid creating incomplete surfaces when multiview goes out of range
some drivers can't handle this, and it can't be used anyway, so don't bother

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
(cherry picked from commit 3f7b0c3951)
2025-03-05 21:26:48 +01:00
Mike Blumenkrantz
3a2e0fb0f7 gallium: fix pipe_framebuffer_state::view_mask
this is the mask of the number of views, not the actual views being
selected

llvmpipe previously had this wrong, though I don't understand how
vkcts didn't cover it

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
(cherry picked from commit 2b37f23314)
2025-03-05 21:26:48 +01:00
Mike Blumenkrantz
30455e071c llvmpipe: pass layer count to rast clear
this otherwise passes the fb layer, which is not quite right when
using multiview with view indexing

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33632>
(cherry picked from commit 5ef60aef63)
2025-03-05 21:26:47 +01:00
David Rosca
33a7918337 radeonsi/vcn: Set all pic params for H264 encode references
Fixes encoding B-frames with I-frame as L1 reference.

Cc: mesa-stable
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33845>
(cherry picked from commit d92781508b)
2025-03-05 12:08:20 +01:00
Eric Engestrom
0d325602f1 .pick_status.json: Update to 45e771f4fb 2025-03-05 12:06:20 +01:00
Yiwei Zhang
c9a177aca2 venus: relax the requirement for sync2
The current requirement for sync is only to support WSI, and it is not
necessarily needed at all per the comment added. Will drop it later.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33829>
(cherry picked from commit c35b52638c)
2025-03-04 20:43:43 +01:00
Eric Engestrom
4bc19462b9 .pick_status.json: Mark 5461ed5808 as denominated 2025-03-04 20:41:40 +01:00
David Rosca
63f2fa10cc frontends/va: Set AV1 max_width/height to surface size
Ideally this would be passed in pic params as the values are
in sequence header, but using the surface size also works.
Also add sanity checks for frame size.

Fixes decoding av1-1-b8-22-svc-L2T1 and av1-1-b8-22-svc-L2T2.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33737>
(cherry picked from commit d0414ef7fb)
2025-03-04 20:37:43 +01:00
Patrick Lerda
4ec5c2fb59 r600: fix emit_image_size() range base compatibility
This change fixes a regression introduced with 8b5d41cacb.
Indeed, lookup_resid was not updated.

This change was tested on palm and cayman. Here are the tests fixed:
khr-gl4[3-5]/shader_image_size/advanced-nonms-cs-float: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-cs-int: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-cs-uint: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-fs-float: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-fs-int: fail pass
khr-gl4[3-5]/shader_image_size/advanced-nonms-fs-uint: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-cs-float: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-cs-int: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-cs-uint: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-fs-float: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-fs-int: fail pass
khr-gl4[3-5]/shader_image_size/basic-nonms-fs-uint: fail pass

Fixes: 8b5d41cacb ("r600/sfn: Use range_base for atomics and images")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33352>
(cherry picked from commit fd874bdd0c)
2025-03-04 20:26:19 +01:00
Lars-Ivar Hesselberg Simonsen
28d34f30e6 panvk: Use RUN_COMPUTE over RUN_COMPUTE_INDIRECT
RUN_COMPUTE_INDIRECT has been found to cause intermittent hangs, so
this change replaces it with RUN_COMPUTE and a set TASK_AXIS_X.

While this task axis might be suboptimal, the performance cost is
somewhat offset by RUN_COMPUTE not being an emulated command.

Fixes: 2ffc05d8d2 ("panvk: Add support for CmdDispatchIndirect")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33841>
(cherry picked from commit fe31e7843d)
2025-03-04 20:26:18 +01:00
Lars-Ivar Hesselberg Simonsen
af767e1e3e panfrost: Use RUN_COMPUTE over RUN_COMPUTE_INDIRECT
RUN_COMPUTE_INDIRECT has been found to cause intermittent hangs, so
this change replaces it with RUN_COMPUTE and a set TASK_AXIS_X.

While this task axis might be suboptimal, the performance cost is
somewhat offset by RUN_COMPUTE not being an emulated command.

Fixes: 447075eeee ("panfrost: Add support for the CSF job frontend")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33841>
(cherry picked from commit 6bf9ad2610)
2025-03-04 20:26:15 +01:00
Tapani Pälli
915075bf66 iris: remove dead code that cannot get hit anymore
As of recent changes, MESA_SHADER_GEOMETRY is handled by the if ladder.

CID: 1643918
Fixes: c33ebf09f5 ("iris: fix handling of GL_*_VERTEX_CONVENTION")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33842>
(cherry picked from commit d0b8d7d46c)
2025-03-04 20:24:44 +01:00
Patrick Lerda
56d066e062 r600: fix the indirect draw 8-bits path
This change fixes the indirect draw 8-bits path which does
a conversion to 16-bits. This change is implemented to process
the parameters the same way as the other indirect draw paths.

This change was tested on palm and cayman. Here are the tests fixed:
deqp-gles31/functional/draw_indirect/draw_elements_indirect/indices/index_byte: fail pass
deqp-gles31/functional/draw_indirect/random/35: fail pass
deqp-gles31/functional/draw_indirect/random/45: fail pass
khr-gl40/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl41/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl42/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl43/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl44/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass
khr-gl45/draw_indirect/basic-indicesdatatype-unsigned_byte: fail pass

Fixes: d80701df8a ("r600g: Implement GL_ARB_draw_indirect for EG/CM")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32802>
(cherry picked from commit 9aea08e1db)
2025-03-04 20:24:40 +01:00
Faith Ekstrand
3f7abae2fc zink: Don't present to Wayland surfaces asynchronously
Wayland EGL has a driver invariant which requires that any `wl_surface`
(or wp_linux_drm_syncobj_surface_v1) calls happen inside the client's
call to eglSwapBuffers().  Submitting surface messages after
eglSwapBuffers() returns causes serialization issues with the Wayland
surface protocol and can lead to the compositor booting the app.

Fixes: 8ade5588e3 ("zink: add kopper api")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12736
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33859>
(cherry picked from commit b92117d9bb)
2025-03-04 20:24:39 +01:00
Marek Olšák
d8b47159b7 mesa: allocate GLmatrix aligned to 16 bytes
The declaration has:

typedef struct {
   alignas(16) GLfloat m[16];   /**< 16 matrix elements (16-byte aligned) */
   alignas(16) GLfloat inv[16]; /**< 16-element inverse (16-byte aligned) */
...
} GLmatrix;

We should honor that.

Fixes: 3175b63a0d - mesa: don't allocate matrices with malloc
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10237

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33856>
(cherry picked from commit 7655826243)
2025-03-04 20:24:08 +01:00
Caio Oliveira
390317a99e brw: Fix size in assembler when compacting
Calculation was wrongly walking uncompacted instructions, even if we had
some compacted in the middle, generating invalid size.  Since we are
here just drop the instruction count, since in practice the caller will
have to walk the instruction stream anyway.

Fixes: 6267585778 ("intel/brw: Also return the size of the assembled shader")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33532>
(cherry picked from commit dd1ca1588d)
2025-03-04 20:24:05 +01:00
Samuel Pitoiset
5200d13a0f radv: fix re-emitting fragment output state when resetting gfx pipeline state
When switching from pipeline to shader objects.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33840>
(cherry picked from commit 7f6e28db26)
2025-03-04 20:24:03 +01:00
Gert Wollny
9842f90fcc r600/sfn: gather info and set lowering 64 bit after nir_lower_io
After nir_lower_io we need to gather the info about 64 bit usage
to be up-to-date when deciding whether the remaining 64 bit IO ops
be lowered.

Before 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
the info was eventually updated to include the use of 64 bit values
also if only some IO was using this so that SFN was handling the code
correctly. As it seems with above patch this is not always the case
anymore, and we have to take care of it.

Fixes: 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32774>
(cherry picked from commit 6da19eafd5)
2025-03-04 20:24:03 +01:00
Mary Guillemard
41f982ddac pan/bi: Disallow FAU special page 3 and WARP_ID on message instructions
This is a constraint that apply on Valhall and later, instructions
should not use FAU special page 3 or WARP_ID if running
on the message unit.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: fd1906afea ("pan/va: Add FAU validation")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33843>
(cherry picked from commit ef0c7382c7)
2025-03-04 20:24:02 +01:00
Eric Engestrom
43b9f114cb .pick_status.json: Update to fbc55afbdf 2025-03-04 20:23:55 +01:00
Konstantin Seurer
08ae198bda llvmpipe: Skip draw_mesh if the ms did not write gl_Position
There is nothing to be done and the code will hit "assert(pos != -1);"
otherwise.

cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12684
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33812>
(cherry picked from commit 4348253db5)
2025-03-03 17:25:25 +01:00
Patrick Lerda
ebca2fafa8 r600: fix evergreen_emit_vertex_buffers() related cl regression
For instance, this issue is triggered with "piglit/bin/cl-custom-buffer-flags":
Segmentation fault

Fixes: 81889f4d5c ("r600: ensure that the last vertex is always processed on evergreen")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33351>
(cherry picked from commit ee1cb894d6)
2025-03-03 17:25:24 +01:00
Emmanuel Gil Peyrot
4607eb7eae panvk: Initialize out array with the correct length
This avoids reading past the buffer’s end in the client afterward, because the
drmFormatModifierCount hasn’t been changed from what the client passed, if it
wasn’t zero at first.

GTK triggers that bug by setting it to the length of the static array (see this
bug[0] though), but other Vulkan programs might have the same issue if they
don’t first query the count before allocating the array.

This has been tested on a Radxa ROCK 5B board running a Mali-G610 GPU.

[0] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8222

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 252ddaf51b ("panvk: fix VkDrmFormatModifierPropertiesListEXT query")
Fixes: https://gitlab.freedesktop.org/mstoeckl/waypipe/-/issues/127
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33657>
(cherry picked from commit b4a82110ce)
2025-03-03 17:25:23 +01:00
Hyunjun Ko
0ea91330c3 anv: Do not support the tiling of DRM modifier if DECODE_DST
Fixes: 04709e4f ("anv: fix video profile lists");

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33784>
(cherry picked from commit f7ff9b240d)
2025-03-03 17:25:22 +01:00
Mike Blumenkrantz
eff71795d0 zink: clamp UBO sizes instead of asserting
this is a nice idea, but there are apps/games that do not respect
hardware capabilities and yolo-bind fixed size buffers

fixes Ballionaire (2667120) launch on non-desktop drivers

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33819>
(cherry picked from commit b04eaa8589)
2025-03-03 17:25:18 +01:00
Job Noorman
6090162961 ir3/ra: prevent reusing parent interval of reloaded sources
We would set the `src` flag on the interval of reloaded sources.
However, the interval might be merged with its parent when inserted and
the parent wouldn't have this flag set. This caused the parent interval
to potentially be reused to reload later sources. Fix this by setting
the `src` flag on the top-level interval after insertion.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33810>
(cherry picked from commit 2d540b8074)
2025-03-03 17:25:17 +01:00
Kevin Chuang
f912436dc9 anv/bvh: Fix copy shader handling sparse buffer
Fixes: 692b5fa9f2 ("anv: Add shader to copy acceleration structures")

This commit fixes the future test "sparse_binding_structures" for
"header_bottom_address" for ray tracing pipeline.

Even on 48-bit ray tracing (Xe1/2), the software-defined part
instance_leaf_part1.bvh_ptr has to be in canonical form for copy.comp
to deference a bvh, which means we have to preserve the upper 16bits.
This is especially relevant in cases where the acceleration structure buffer
is located high, such as sparse buffer.

Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33745>
(cherry picked from commit 87ff7b061f)
2025-03-03 17:25:16 +01:00
Kevin Chuang
614dd4999c anv/bvh: Fix encoder handling sparse buffer
Fixes: 2fe57947e3 ("anv: Implement encode shader to fit in ANV BVH")

This commit resolves the failures in the future tests
"sparse_binding_structures" for rayquery. Sparse buffers' heaps are
located high, and since it's in canonical form, the higher 16bits are
all set to 1. However, the existing encoder did not expect any non-zero
values at the higher 16bits. As a result, the instance flags got
corrupted, causing most triangle tests to fail.

Thanks for Paulo providing insights about sparse buffer properties.

Co-developed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33745>
(cherry picked from commit b9a980ea73)
2025-03-03 17:25:14 +01:00
Eric Engestrom
7b51aa8e3f .pick_status.json: Update to 4348253db5 2025-03-03 17:25:08 +01:00
Benjamin Lee
6248bc98c2 panfrost/va: remove swizzle mod from LDEXP
This instruction does not support swizzles. This information is not used
for anything, but will be if we use the instruction tables for
bi_lower_swizzle.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 316486dd9f ("pan/va: Add initial ISA.xml for Valhall")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
(cherry picked from commit 2a70665df7)
2025-02-28 22:17:35 +01:00
Benjamin Lee
f3ee6ed43c panfrost: fix condition in bi_nir_is_replicated
The original implementation of this returned false when the src was
replicated, and true when it was not.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 21bdee7bcc ("pan/bi: Switch to lower_bool_to_bitsize")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
(cherry picked from commit 810351ad03)
2025-02-28 22:17:35 +01:00
Benjamin Lee
91c473e49a panfrost: fix large int32->float16 conversions
On vulkan, truncating to S/U16 before converting is not valid, because
out-of-range conversions are specified to be correctly rounded. IEEE 754
requires that out-of-range values round to ±inf with RTNE and ±F16_MAX
with RTZ.

On gl, truncating is valid for U16->F16, because out-of-range int->float
conversions are undefined behavior. For S16->F16, it is not valid
because S16_MAX < F16_MAX, so some in-range values will be truncated as
well.

Instead, just handle S/U16->F16 as S/U16->F32->F16.

Fixes dEQP-VK.spirv_assembly.instruction.compute.convertstof.int32_to_float16_*
when shaderFloat16 is enabled in panvk.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: be74b84e6f ("pan/bi: Fill in some more conversions")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33637>
(cherry picked from commit a33cd3def2)
2025-02-28 22:17:35 +01:00
Eric Engestrom
919e3443e8 .pick_status.json: Mark b85c94fc89 as denominated 2025-02-28 22:17:35 +01:00
Daniel Schürmann
553ab18656 aco/assembler: Fix short jumps over chained branches
If we insert

   <code>
   s_branch 1
   s_branch Target

at the end of some block, and later hide an additional chained branch
after the existing one, then we have to update the 's_branch 1' to
also jump over the newly added branch.

Fixes: cab5639a09 ('aco/assembler: chain branches instead of emitting long jumps')
Closes: #12673
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33762>
(cherry picked from commit 6659db285a)
2025-02-28 22:17:35 +01:00
Lionel Landwerlin
4a08708ca2 vulkan/runtime: ensure robustness state is fully initialized
This is part of the hashing key :

==25753== Uninitialised byte(s) found during client check request
==25753==    at 0x93D29AE: blob_write_bytes (blob.c:164)
==25753==    by 0x93A62C6: vk_pipeline_precomp_shader_serialize (vk_pipeline.c:722)
==25753==    by 0x93AC55E: vk_pipeline_cache_add_object (vk_pipeline_cache.c:433)
==25753==    by 0x93A691B: vk_pipeline_precompile_shader (vk_pipeline.c:875)
==25753==    by 0x93A8FB9: vk_create_graphics_pipeline (vk_pipeline.c:1715)
==25753==    by 0x93A9799: vk_common_CreateGraphicsPipelines (vk_pipeline.c:1860)
==25753==  Address 0xf1adf82 is 82 bytes inside a block of size 152 alloc'd
==25753==    at 0x64FA858: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==25753==    by 0x99AAC38: vk_default_alloc (vk_alloc.c:26)
==25753==    by 0x93A403B: vk_alloc (vk_alloc.h:48)
==25753==    by 0x93A406B: vk_zalloc (vk_alloc.h:56)
==25753==    by 0x93A60A0: vk_pipeline_precomp_shader_create (vk_pipeline.c:680)
==25753==    by 0x93A689D: vk_pipeline_precompile_shader (vk_pipeline.c:866)
==25753==    by 0x93A8FB9: vk_create_graphics_pipeline (vk_pipeline.c:1715)
==25753==    by 0x93A9799: vk_common_CreateGraphicsPipelines (vk_pipeline.c:1860)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9308e8d90d ("vulkan: Add generic graphics and compute VkPipeline implementations")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33792>
(cherry picked from commit 4dba1ad93f)
2025-02-28 22:17:35 +01:00
Faith Ekstrand
c795725649 nvk: Only support compute shader derivatives on Turing+
Fixes: e0e7d8d910 ("nvk: Advertise VK_NV/KHR_compute_shader_derivatives")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
(cherry picked from commit 8de37b142e)
2025-02-28 22:17:35 +01:00
Faith Ekstrand
eff601577a nvk: Only support deviceGeneratedCommandsMultiDrawIndirectCount on Turing+
Indirect draws on Maxwell involve patching pushbufs together and doing
that isn't possible with device generated commands.

Fixes: 83b220f833 ("nvk: Advertise VK_EXT_device_generated_commands")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
(cherry picked from commit bd04fdcb2b)
2025-02-28 22:17:35 +01:00
Faith Ekstrand
29ae40e1aa nvk: Handle pre-Turing dispatch indirect commands
The QMD layout is a bit different.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
(cherry picked from commit 7e12ba8709)
2025-02-28 22:17:35 +01:00
Faith Ekstrand
95d0ecd6e5 nak/qmd: Add a nak_get_qmd_cbuf_desc_layout() helper
Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33771>
(cherry picked from commit c540e5e2cc)
2025-02-28 22:17:35 +01:00
Paulo Zanoni
bac3b56d51 brw: extend the NOP+WHILE workaround
It turns out that we need to add a NOP not only in between two
consecutive WHILE instructions, but also after every control flow
instruction that immediately precedes a WHILE.

v2: Rebase after the renames.

Fixes: 5ca883505e ("brw: add a NOP in between WHILE instructions on LNL")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33021>
(cherry picked from commit fd10764cff)
2025-02-28 22:17:35 +01:00
Karol Herbst
62747d6bdd intel/brw, lp: enable lower_pack_64_4x16
The compiler won't be able to emit pack_64_4x16, so we should prevent
nir_opt_algebraic to optimize to it. This fixes an infinite optimization
loop inside brw_nir_optimize:

nir_copy_prop
    16x4     %77 = @load_global (%80)
    32    %61995 = pack_32_2x16_split %77.x, %77.y
    32    %61998 = pack_32_2x16_split %77.z, %77.w
    64    %61999 = pack_64_2x32_split %61995, %61998
    64       %76 = iadd %100, %79
                   @store_global (%61999, %76)

nir_opt_algebraic
    16x4     %77 = @load_global (%80)
    32    %61995 = pack_32_2x16_split %77.x, %77.y
    32    %61998 = pack_32_2x16_split %77.z, %77.w
    16x4  %62000 = vec4 %77.x, %77.y, %77.z, %77.w
    64    %62001 = pack_64_4x16 %62000
    64       %76 = iadd %100, %79
                   @store_global (%62001, %76)

nir_lower_pack
    16x4     %77 = @load_global (%80)
    16x4  %62000 = vec4 %77.x, %77.y, %77.z, %77.w
    16    %62002 = mov %62000.y
    16    %62003 = mov %62000.x
    32    %62004 = pack_32_2x16_split %62003, %62002
    16    %62005 = mov %62000.w
    16    %62006 = mov %62000.z
    32    %62007 = pack_32_2x16_split %62006, %62005
    64    %62008 = pack_64_2x32_split %62004, %62007
    64       %76 = iadd %100, %79
                   @store_global (%62008, %76)

// brw_nir_optimize loops here

nir_copy_prop
    16x4     %77 = @load_global (%80)
    32    %62004 = pack_32_2x16_split %77.x, %77.y
    32    %62007 = pack_32_2x16_split %77.z, %77.w
    64    %62008 = pack_64_2x32_split %62004, %62007
    64       %76 = iadd %100, %79
                   @store_global (%62008, %76)

llvmpipe has a similar issue inside lp_build_opt_nir

Fixes: b1bc691b0f ("nir/algebraic: add and improve pack/unpack patterns")
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33347>
(cherry picked from commit dad5ee1039)
2025-02-28 22:17:35 +01:00
Yiwei Zhang
3370a327d7 venus: fix image format cache miss with AHB usage query
should skip updating cache key instead of marking as a miss

Fixes: e48645250c ("venus: image format properties cache")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33757>
(cherry picked from commit fde5cebec5)
2025-02-28 22:17:35 +01:00
Mike Blumenkrantz
ce3806b8ee zink: always fully unwrap contexts
threaded_context_unwrap_sync() can be called safely on non-threaded
contexts

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33742>
(cherry picked from commit f9fe08740a)
2025-02-28 22:17:35 +01:00
Yogesh Mohan Marimuthu
13b2f1e72d winsys/amdgpu: same_queue variable should be set if there is only one queue
Fixes: 45fa34284f ("winsys/amdgpu: don't add fence dependency of other queues for userq")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33661>
(cherry picked from commit 659a41293b)
2025-02-28 22:17:35 +01:00
Tapani Pälli
f8e7fecd7e iris: wait for imported fences to be available in iris_fence_await
This ensures shared fence is available before we submit (and fail)
a batch with it, this fixes following issue on iris driver:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/12650

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33662>
(cherry picked from commit 41a7b58214)
2025-02-28 22:17:35 +01:00
Lionel Landwerlin
3630721dc8 anv: fix missing 3DSTATE_PS:Kernel0MaximumPolysperThread programming
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 815d2e3e8b ("anv: move 3DSTATE_PS to partial packing")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33712>
(cherry picked from commit 91f36ba5b6)
2025-02-28 22:17:35 +01:00
Benjamin Lee
16dfadd3e0 panfrost: remove NIR_PASS_V usage for noperspective lowering
The rest of the NIR_PASS_V usage in panfrost was dropped in
34beb93635, but this one was added in an
MR that was merged after.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 081438ad39 ("panfrost: add nir pass to lower noperspective varyings")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-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/33728>
(cherry picked from commit 3b5d5c072a)
2025-02-28 22:17:35 +01:00
Dylan Baker
db51d8f8ac iris: fix handling of GL_*_VERTEX_CONVENTION
By actually setting the state packets according to the program data.
Also ensure that we correctly flag that the program may be dirty when
the geometry shader state changes

Fixes piglit tests: `spec@!opengl 3.2@gl-3.2-adj-prims * pv-first`

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33658>
(cherry picked from commit c33ebf09f5)
2025-02-28 22:17:35 +01:00
Dylan Baker
11faa02ec4 iris: Correctly set NOS for geometry shader state changes
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33658>
(cherry picked from commit 0477ee660f)
2025-02-28 22:17:34 +01:00
Hans-Kristian Arntzen
1b6da4ed52 radv: Always set 0 dispatch offset for indirect CS.
Fixes severe glitching in Avowed.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33732>
(cherry picked from commit 13a3f9a972)
2025-02-28 22:17:34 +01:00
Samuel Pitoiset
20bb982788 radv: fix missing SQTT barriers for fbfetch color/depth decompressions
SQTT layout transitions need to be inside SQTT barrier. Otherwise, this
throws an assertion in RADV and might also crash when the capture is
opened with RGP.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12664
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33719>
(cherry picked from commit 67c150bf9e)
2025-02-28 22:17:34 +01:00
Peyton Lee
539f0d88be radeonsi/vpe: check reduction ratio
Check the reduction ratio is within the hardware capablity.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33528>
(cherry picked from commit e85a6b6a63)
2025-02-28 22:17:34 +01:00
Faith Ekstrand
1f2143eea6 nvk: Do not set INVALIDATE_SKED_CACHES pre-MaxwellB
The other two uses of this are behind guards but we forgot this one.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
(cherry picked from commit 58218c7349)
2025-02-27 18:37:33 +01:00
Faith Ekstrand
7013ebec5d nvk: Don't bind a fragment shading rate image pre-Turing
Fixes: 75bcb656d9 ("nvk: Add support for binding fragment shading rate images")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33716>
(cherry picked from commit c145147871)
2025-02-27 18:37:32 +01:00
Natalie Vock
ea47f98811 radv/rt: Don't allocate the traversal shader in a capture/replay range
We never write the traversal shader address out to shader group handles,
so this is not necessary. On the flipside, it can cause conflicts if the
traversal shader is allocated in a range occupied by a replayed shader.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33711>
(cherry picked from commit 14b902c825)
2025-02-27 18:37:32 +01:00
Georg Lehmann
cb09b3f624 aco/insert_exec: fix continue_or_break on gfx6-7
s_cmp_lg_u64 is gfx8+

Fixes: 115ff5f95b ("aco/insert_exec_mask: don't restore exec in continue_or_break blocks")

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33715>
(cherry picked from commit c249556bf4)
2025-02-27 18:37:31 +01:00
Rhys Perry
36e1923284 ac/nir: fix tess factor optimization when workgroup barriers are reduced
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: b49eab68a8 ("ac/nir: use s_sendmsg(HS_TESSFACTOR) to optimize writing tess factors for gfx11")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12632
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33645>
(cherry picked from commit 2a3dce1b59)
2025-02-27 18:37:30 +01:00
Daniel Schürmann
f9c3499918 aco/ssa_elimination: insert parallelcopies for p_phi immediately before branch
Totals from 2499 (3.15% of 79377) affected shaders: (Navi31)
Instrs: 6011729 -> 6011761 (+0.00%); split: -0.00%, +0.00%
CodeSize: 31573216 -> 31574236 (+0.00%); split: -0.00%, +0.00%
Latency: 83364734 -> 83365781 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 13545643 -> 13545783 (+0.00%); split: -0.00%, +0.00%

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
(cherry picked from commit 302678df91)
2025-02-27 18:37:30 +01:00
Daniel Schürmann
4118fef567 aco/insert_exec_mask: don't restore exec in continue_or_break blocks
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
(cherry picked from commit 115ff5f95b)
2025-02-27 18:37:29 +01:00
Daniel Schürmann
1bb39be75e aco/insert_exec_mask: Don't immediately set exec to zero in break/continue blocks
Instead, only indicate that exec should be zero and do
so in the successive helper block. This allows to insert
the parallelcopies from logical phis directly before the
branch in break and continue blocks.

Totals from 56 (0.07% of 79377) affected shaders: (Navi31)
Latency: 2472367 -> 2472422 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 253053 -> 253055 (+0.00%); split: -0.00%, +0.00%

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33527>
(cherry picked from commit 7f7c1d463a)
2025-02-27 18:37:28 +01:00
Karol Herbst
33a7ae1f0a rusticl/platform: advertise all extensions supported by all devices
There is a spec issue about this to clarify this behavior, but the current
wording can be interpreted that the platform always lists all extensions
supported by all drivers.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33667>
(cherry picked from commit 0fd70ee9de)
2025-02-27 18:37:27 +01:00
Dave Airlie
1ce4feb1c0 vulkan/wsi/x11: don't use update_region for damage if not created
If we don't have a region in the X no MIT-SHM case don't go using
the damage call set region.

Fixes: bbdf7e45b1 ("wsi/x11: Hook up KHR_incremental_present")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33592>
(cherry picked from commit c49423ca2c)
2025-02-27 18:37:26 +01:00
Eric Engestrom
a2fd6237cb .pick_status.json: Update to 55c476efed 2025-02-27 18:37:25 +01:00
Mike Blumenkrantz
7b2a0da25f zink: wait on tc fence before checking for fd semaphore
this forces sync with pending flushes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33652>
(cherry picked from commit f7002369fa)
2025-02-21 17:07:29 +01:00
Daniel Schürmann
c4d64f9f83 aco/scheduler: always respect min_waves on GFX10+
It could theoretically happen that for large workgroups,
the scheduler used more registers than allowed.

No fossil changes.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33644>
(cherry picked from commit 676b39d31f)
2025-02-21 17:07:28 +01:00
Erik Faye-Lund
33f1bbed67 mesa/main: wire up glapi bits for EXT_multi_draw_indirect
Turns out we were missing the glapi bits, making it impossible to use get
the function pointers for this extension. Whoops?!

[daniels: Squashed in a618 SkQP fails, presumably caused by these not
          being skipped anymore.]

Fixes: 9f5af68995 ("mesa/main: expose `EXT_multi_draw_indirect`")
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com>
Tested-by: Chris Healy <healych@amazon.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33546>
(cherry picked from commit fde6aeb886)
2025-02-21 17:07:26 +01:00
Faith Ekstrand
275a14e3c8 zink: Use persistent semaphores for PIPE_FD_TYPE_SYNCOBJ
These are persistant objects that you can use to signal and wait over.
We need to import without VK_SEMAPHORE_IMPORT_TEMPORARY_BIT and we can't
throw away the Vulkan semaphore after each submit.

Fixes: 32597e116d ("zink: implement GL semaphores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33549>
(cherry picked from commit 651864151f)
2025-02-21 17:06:57 +01:00
Faith Ekstrand
3055ca6ff6 zink: Use the correct array size for signal_values[]
When the size of the signals[] array was changed to 3, the
signal_values[] array was not updated accordingly.  If we have a
signal_semaphore and are presenting at the same time, this can lead to
an array overflow and the driver will read some random stack value as
the signal value.  This is causing chromium to lock up when running
WebGL.

Fixes: 7f56fd9655 ("zink: it's kopperin' time")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33549>
(cherry picked from commit 1ffa782227)
2025-02-21 17:06:48 +01:00
Karol Herbst
ce12f4c6f8 rusticl/mem: set num_samples and num_mip_levels to 0 when importing from GL
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33653>
(cherry picked from commit e0b62d7e2e)
2025-02-21 17:06:47 +01:00
Faith Ekstrand
ff0f49e0ba nak: Only use suld.constant on Ampere+
Turing doesn't support it so we'll use suld.weak instead.  While we're
here, get rid of an accidental copy+paste condition.

Fixes: ffdc0d8e98 ("nak: Use suld.constant when ACCESS_CAN_REORDER is set")
Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33649>
(cherry picked from commit 13f7ea7b3d)
2025-02-21 17:06:39 +01:00
Roland Scheidegger
43851b6850 llvmpipe: Fix alpha-to-coverage without dithering
Implementing alpha-to-coverage dithering broke the non-dithering case.
(Discovered by accident, not really a big deal since it's almost always
enabled and can only be disabled by using a Nvidia GL extension, and
can't be disabled with Vulkan.)

Fixes: ad4635d6ef
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33586>
(cherry picked from commit 61911b6a4b)
2025-02-21 17:06:22 +01:00
Juan A. Suarez Romero
651b27cffa broadcom/simulator: use string copy instead of memcpy
Using memcpy with the max size generates a global-buffer-overflow, as
the performance counter strings are smaller than the max size.

Instead, use a string copy function to get a copy.

This was detected with address sanitizer enabled and running vulkaninfo.

Fixes: 3e8b2fe053 ("broadcom/simulator: Add DRM_IOCTL_V3D_GET_COUNTER to simulator")
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33627>
(cherry picked from commit 2d91798561)
2025-02-21 17:05:49 +01:00
Juan A. Suarez Romero
85fb4b4d9b v3dv: duplicate key for texel_buffer cache
We can't use the local variable key to insert in the hashtable, as the
key needs to be persistent for future searches.

This makes a copy of the key in the pipeline, which is kept persistent
in the hashtable.

This fixes a stack-buffer-overflow.

Backport-to: 25.0
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33630>
(cherry picked from commit eb8017ca68)
2025-02-21 17:04:56 +01:00
Pierre-Eric Pelloux-Prayer
ace414493d mesa/st: call _mesa_glthread_finish before _mesa_make_current
_mesa_make_current will use st_flush(ctx) to execute pending
commands before switching to the new context.

Since we can't have multiple threads using a pipe_context at
the same time, we must finish glthread to avoid having the
unmarshalling thread executing at the same time.

It's fixing random crashes where a thread would do:
  st_destroy_context ->
      _mesa_make_current ->
          st_glFlush(save_ctx) ->
            tc_execute_batch
While there's a glthread unmarshalling thread that's still
adding commands to TC.

Fixes: 08d97aadd1 ("st/mesa: fix texture deletion context mix-up issues (v2)")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33552>
(cherry picked from commit f062c83f3a)
2025-02-21 17:04:55 +01:00
Pierre-Eric Pelloux-Prayer
d2c5c71775 tc: add missing TC_SENTINEL for TC_END_BATCH
Fixes: c2983d93da ("gallium/u_threaded: use TC_END_BATCH to terminate the loop")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33552>
(cherry picked from commit a893a87625)
2025-02-21 17:04:53 +01:00
Samuel Pitoiset
5b8b81618e radv/video: fix adding the query pool BO to the cmdbuf list
Video queries work differently but the BO still need to be added to the
cmdbuf list.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33620>
(cherry picked from commit 5ba10cc57f)
2025-02-21 17:04:51 +01:00
Iago Toral Quiroga
5e76850ce3 pan/va: fix FAU validation
Validation was checking that if an instruction was accessing FAU RAM,
only one 64-bit slot was accessed, and if it was accessing a FAU special
value, only one was accessed, however it was not checking if both  RAM
and special were used, which is only allowed in messaging instructions
except ATEST and BLEND.

Fixes Piglit:
spec/ati_fragment_shader/ati_fragment_shader-render-ops/mov c0.r

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Fixes: fd1906afea ("pan/va: Add FAU validation")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33608>
(cherry picked from commit e504825813)
2025-02-21 17:04:49 +01:00
Lorenzo Rossi
7b38cf8b5e nvk: Fix MSAA sparse residency lowering crash
Previously deqp tests with *.multisampled_image_sparse_residency.* would
crash with "Unknown image intrinsic" because
nir_intrinsic_bindless_image_sparse_load was not handled in the lowring
code.

This commits handles MSAA sparse residency lowering as with other cases.

Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com>
Fixes: 7604697ec6 ("nvk: Implement shaderStorageImageMultisample")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33625>
(cherry picked from commit bce9e851c6)
2025-02-21 17:04:46 +01:00
James Hogan
b34120348d mesa: Handle getting GL_MAX_VIEWS_OVR
Add support for GL_OVR_multiview's GL_MAX_VIEWS_OVR which can be
accessed with glGetIntegerv().

MaxViews is accessed via the hash table set up by get_hash_params.py as
a constant (MAX_VIEWS_OVR) using GL_MAX_VIEWS_OVR.

v2: Add this patch (thanks to Mike's guidance)
v3: Drop unnecessary enum size element in OVR_multiview.XML
v4: Switch to CONST(MAX_VIEWS_OVR) instead of gl_constants::MaxViews
    (Marek's suggestion)

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
(cherry picked from commit be106bd6c6)
2025-02-21 17:04:45 +01:00
James Hogan
d24eac8915 mesa: OVR_multiview framebuffer attachment parameters
Implement the OVR_multiview framebuffer attachment parameters in
get_framebuffer_attachment_parameter():
- GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: This reads the
  attachment's NumViews.
- GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: This reads the
  attachment's Zoffset, but only if NumViews is non-zero.

This allows apitrace (PR 937[1]) to show the correct layers for
multiview framebuffer attachment surfaces, as well as to show this
information in the framebuffer attachments state.

[1]: https://github.com/apitrace/apitrace/pull/937

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
(cherry picked from commit a282a130fb)
2025-02-21 17:04:44 +01:00
James Hogan
280d2fee72 mesa: Check views don't exceed GL_MAX_ARRAY_TEXTURE_LAYERS
The OVR_multiview spec specifies the INVALID_VALUE error to be generated
by FramebufferTextureMultiviewOVR if:
"- <texture> is a two-dimensional array texture and <baseViewIndex> +
   <numViews> is larger than the value of MAX_ARRAY_TEXTURE_LAYERS."

Implement this in check_multiview_texture_target(), similar to the test
in check_layer().

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
(cherry picked from commit 60509e187f)
2025-02-21 17:04:43 +01:00
James Hogan
b0a3bb0d6d mesa: Handle GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR
The OVR_multiview spec adds the following condition for framebuffer
completeness:
  "The number of views is the same for all populated attachments.
  { FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR }"

So add a condition to _mesa_test_framebuffer_completeness to check that
all attachments have identical NumViews. This avoids an infinite
recursion between zink_clear() and zink_clear_depth_stencil() in the
event of an incomplete FBO.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
(cherry picked from commit 7819d322c4)
2025-02-21 17:04:42 +01:00
James Hogan
97eb3f5cc2 mesa: Consider NumViews to reuse FBO attachments
NumViews needs considering along with the other attachment data when
reusing a multiview framebuffer texture attachment (i.e. shared depth
and stencil texture).

The depth and stencil attachments should match in all respects including
NumViews before reusing the existing one, and NumViews should also be
copied when reusing.

This avoids an infinite recursion between zink_clear() and
zink_clear_depth_stencil() in the case of reuse of a multiview
depth/stencil attachment.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32992>
(cherry picked from commit 65f18c4787)
2025-02-21 17:04:41 +01:00
Eric Engestrom
5c84fff059 .pick_status.json: Update to b331713f20 2025-02-21 17:04:38 +01:00
Eric Engestrom
64552db2f8 docs: add sha sum for 25.0.0 2025-02-19 17:20:22 +01:00
Eric Engestrom
4fa244fddf VERSION: bump for 25.0.0 2025-02-19 15:57:11 +01:00
Eric Engestrom
45be2424ec docs: add release notes for 25.0.0 2025-02-19 15:57:10 +01:00
Pierre-Eric Pelloux-Prayer
e4831adc20 radeonsi: disable dcc when external shader stores are used
See comment.

Fixes: 666a6eb871 ("radeonsi/gfx12: disable display dcc for front buffer rendering")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12552
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33469>
(cherry picked from commit 6b20b06584)
2025-02-19 14:18:30 +01:00
Samuel Pitoiset
ef610a0d25 radv: fix adding the BO for unaligned SDMA copies to the cmdbuf list
It shouldn't be only added at creation time.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33600>
(cherry picked from commit efa23ef664)
2025-02-19 14:18:30 +01:00
Faith Ekstrand
52e3f30992 nvk: Use suld.constant for EDB uniform texel buffers
In 2183bc73a6 ("nvk: Use suld for EDB uniform texel buffers"), we
started using suld instead of tld for EDB uniform texel buffers because
we needed it for correctness.  However, it's slow as mud.  Using
suld.constant seems to fix the performance regression.  I don't know if
it's quite tld performance, but it's close.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33612>
(cherry picked from commit eb27cbf25a)
2025-02-19 14:18:30 +01:00
Faith Ekstrand
f18483d265 nak: Use suld.constant when ACCESS_CAN_REORDER is set
This is way faster than suld.sys, which is what we're using today.  So
far I haven't seen it matter for anything but texel buffers but it
likely helps some app somewhere.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33612>
(cherry picked from commit ffdc0d8e98)
2025-02-19 14:18:30 +01:00
Faith Ekstrand
b90c99c3dc nvk: Align UBO/SSBO addresses down rather than up
This should never happen as the client should always give us aligned
addresses.  However, in the off chance that it does, aligning down is
probably safer than aligning up as it won't cause the top end of the
range increase and potentially fault.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
(cherry picked from commit 5762586c6d)
2025-02-19 14:18:30 +01:00
Faith Ekstrand
1a911f3d75 nvk: Use suld for EDB uniform texel buffers
The tricks we play for texel buffers with VK_EXT_descriptor_buffer don't
work with tld with very large buffers.  suld, on the other hand, doesn't
seem to have these limitations.

Fixes: 3b94c5c22a ("nvk: Lower descriptors for VK_EXT_descriptor_buffer buffer views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
(cherry picked from commit 2183bc73a6)
2025-02-19 14:18:30 +01:00
Faith Ekstrand
1d6206a82c nak: Handle sparse texops with unused color destinations
Fixes: b17f139281 ("nak: Wire up sparse residency for texture ops")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
(cherry picked from commit 1c7a4c4f38)
2025-02-19 14:18:30 +01:00
Faith Ekstrand
6482efdaba nvk: Allow sparse loads on EDB buffers
Fixes: 3b94c5c22a ("nvk: Lower descriptors for VK_EXT_descriptor_buffer buffer views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
(cherry picked from commit 0ec760af66)
2025-02-19 14:18:30 +01:00
Faith Ekstrand
b948e3f3a6 nvk: Handle shader==NULL in nvk_cmd_upload_qmd()
We can theoretically hit this if CmdProcessGeneratedCommandsEXT is
called with a state command buffer that doesn't have compute shader set
if execute commands bind a shader.  We do, however, need to still call
nvk_cmd_upload_qmd() because it also uploads push constants and we need
those regardless of whether or not there's a shader bound.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
(cherry picked from commit ca06a57702)
2025-02-19 14:18:30 +01:00
Faith Ekstrand
3445cf4f96 nvk: Pull shaders from the state command buffer in nvk_cmd_process_cmds()
Found by the VKD3D test suite.

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33610>
(cherry picked from commit 39ae06e153)
2025-02-19 14:18:30 +01:00
Eric Engestrom
8154790767 .pick_status.json: Update to 6b20b06584 2025-02-19 14:18:27 +01:00
Samuel Pitoiset
a026515817 radv: add initial DCC support on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33255>
(cherry picked from commit 9af11bf306)
2025-02-19 13:16:03 +01:00
Samuel Pitoiset
ceaf6b2231 ac/gpu_info: add gfx12_supports_dcc_write_compress_disable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33255>
(cherry picked from commit 827cef7f7f)
2025-02-19 13:16:03 +01:00
Samuel Pitoiset
9b60c38646 ac,radv,radeonsi: add new GFX12_DCC_WRITE_COMPRESS_DISABLE tiling flag
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33301>
(cherry picked from commit 9993f3dd6a)
2025-02-19 13:16:03 +01:00
Georg Lehmann
f5bace5bf6 nir: fix frsq range analysis
Foz-DB Navi21:
Totals from 98 (0.12% of 79377) affected shaders:
Instrs: 157311 -> 157675 (+0.23%); split: -0.03%, +0.26%
CodeSize: 844296 -> 846648 (+0.28%); split: -0.00%, +0.28%
Latency: 1275467 -> 1276259 (+0.06%); split: -0.00%, +0.06%
InvThroughput: 266980 -> 267098 (+0.04%); split: -0.03%, +0.07%
Copies: 11094 -> 11093 (-0.01%)
PreVGPRs: 5945 -> 5977 (+0.54%)
VALU: 110585 -> 110953 (+0.33%); split: -0.04%, +0.38%
SALU: 18481 -> 18476 (-0.03%)

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
(cherry picked from commit 81b4629636)
2025-02-18 22:46:11 +01:00
Georg Lehmann
5c65587861 nir: fix range analysis for frcp
Foz-DB Navi21:
Totals from 448 (0.56% of 79377) affected shaders:
Instrs: 669306 -> 669318 (+0.00%); split: -0.00%, +0.00%
CodeSize: 3736580 -> 3738840 (+0.06%); split: -0.00%, +0.06%
Latency: 5860916 -> 5860961 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 1344094 -> 1344135 (+0.00%); split: -0.00%, +0.00%
VClause: 13878 -> 13879 (+0.01%)
Copies: 58538 -> 58532 (-0.01%)
VALU: 479807 -> 479820 (+0.00%); split: -0.00%, +0.00%

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33557>
(cherry picked from commit 25300ac18a)
2025-02-18 22:46:09 +01:00
Paulo Zanoni
d8ffce96d2 brw: increase brw_reg::subnr size to 6 bits
Since Xe2, the registers are bigger and even the instruction
structures got updated to have 6 bits.

The way I detected this issue was when I tried to use
src/intel/executor to add the following instruction:

    add(8)          g6.8<1>UD      g4<8,8,1>UD    0x00000008UD    { align1 WE_all 1Q I@1 };

Executor would read this and end up emitting an add with dst being
g6<1>UD instead of what we wanted. It turns out that inside
brw_gram.y, at dstoperand and dstoperandex we do:

    $$.subnr = $$.subnr * brw_type_size_bytes($4);

which would overflow subnr back to 0.

The overflow doesn't seem to be a problem with code we emit directly
(unlike the code we parse, like above) due to the fact that we seem to
treat Xe2 registers as smaller all the way until we call phys_nr() and
phys_subnr() during code generation. The phys_subnr() function can
generate a value that would overflow reg.subnr, but this value is
never written back to reg.subnr, it's just returned as an unsigned
int.

Fixes: e9f63df2f2 ("intel/dev: Enable LNL PCI IDs without INTEL_FORCE_PROBE")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33539>
(cherry picked from commit 927d7b322b)
2025-02-18 22:46:08 +01:00
Tapani Pälli
3194cae6d0 anv: apply cache flushes on pipeline select with gfx20
This fixes rendering artifacts seen with Hogwarts Legacy and Black
Myth Wukong. Assumption is that we can get rid of these flushes once
RESOURCE_BARRIER work lands but until then we need them.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12540
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12489
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/33397>
(cherry picked from commit 765f3b78d5)
2025-02-18 22:46:07 +01:00
David Rosca
19e2eed688 radv/video: Move IB header from begin/end to encode_video
For decode this is also done in decode_video.

This breaks if app doesn't call vkCmdEncodeVideoKHR before end, eg:

  vkCmdBeginVideoCodingKHR
  vkCmdControlVideoCodingKHR
  vkCmdEndVideoCodingKHR

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33582>
(cherry picked from commit ebd8893710)
2025-02-18 22:46:05 +01:00
David Rosca
70bb670e9f radv/video: Fix setting balanced preset for HEVC encode with SAO enabled
FW disables SAO in speed preset, so we need to switch to balanced.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12615
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33582>
(cherry picked from commit 77ff18aa3b)
2025-02-18 22:46:03 +01:00
Samuel Pitoiset
27b7056835 radv: fix adding the VRS image BO to the cmdbuf list on GFX11
This might cause random faults.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33584>
(cherry picked from commit e0070bc68b)
2025-02-18 22:46:02 +01:00
Tapani Pälli
961a3fc760 anv: tighten condition for changing barrier layouts
Assertion (or attempting the layout change) is causing crash when
launching Steel Rats. Tighten the condition for change so that it should
affect only when runtime has made changes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12602
Fixes: eed788213b ("anv: ensure consistent layout transitions in render passes")
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/33523>
(cherry picked from commit d8381415a6)
2025-02-18 22:46:01 +01:00
Faith Ekstrand
0cef98b71a nvk: Implement descriptorBufferPushDescriptors
The only thing we really need to do here is to make sure we don't try
to use the EDB path for push descriptors since those aren't really
descriptor buffers.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33589>
(cherry picked from commit 86e217e7df)
2025-02-18 22:45:55 +01:00
Eric Engestrom
b6ffd0cd80 .pick_status.json: Update to 56aac9fdec 2025-02-18 22:44:11 +01:00
Danylo Piliaiev
dc633a3560 tu: Handle mismatched mutability when resolving from GMEM
Apparently fast path cannot handle mismatched mutability and we
should use CP_BLIT which has SP_PS_2D_SRC_INFO.MUTABLEEN to signal
src mutability. Previously it was partially handled by
tu_attachment_store_mismatched_swap.

Fixes: a104a7ca1a
("tu: Handle non-identity GMEM swaps when resolving")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33514>
(cherry picked from commit 97f851e7c5)
2025-02-17 20:13:17 +01:00
Danylo Piliaiev
05f1528235 tu: Get correct src view when storing gmem attachment
Fixes: a104a7ca1a
("tu: Handle non-identity GMEM swaps when resolving")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33514>
(cherry picked from commit bdf0f61d4a)
2025-02-17 20:13:17 +01:00
Faith Ekstrand
eae4213ccb nvk: Respect VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT
This is part of VK_EXT_mutable_descriptor_type but we never did anything
with it.  Since we use local memory for descriptor sets, copying from
them means reading VRAM through a WC map and it's pretty expensive.
Using malloc() for HOST_ONLY should be a nice perf boost for things
which give us the hint.

This massively improves the performance Dragon Age: The Veilguard,
taking it from 7 FPS to 25 FPS on an RTX 4060.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12622
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33571>
(cherry picked from commit 607686f6bf)
2025-02-17 20:13:17 +01:00
Faith Ekstrand
a21604ce78 nvk: Rename nvk_descriptor_set::mapped_ptr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33571>
(cherry picked from commit b8508726f0)
2025-02-17 20:13:17 +01:00
Yiwei Zhang
8ef1017e36 venus: fix maintenance5 props init and create flags2
More are found missed from prior maint5 support. This change has
properly initialized the maint5 props as well as fixing its new
VkPipelineCreateFlags2CreateInfo integrations.

Verified with dEQP-VK.*maintenance5*

Fixes: be6fece6e1 ("venus: enable VK_KHR_maintenance5")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33566>
(cherry picked from commit 8741be3365)
2025-02-17 20:13:17 +01:00
Eric Engestrom
af2b8d745f .pick_status.json: Update to 2361ed27f3 2025-02-17 20:13:08 +01:00
Konstantin Seurer
81fe589ccb gallivm: Remove loop limiting
This is not conformant and it can cause hard to debug issues or hide
existing bugs. Getting rid of this limit will allow lavapipe to use the
common bvh building framework since the ploc build shader has a loop
that waits to start the next phase.

cc: mesa-stable

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426>
(cherry picked from commit ac0f643d4b)
2025-02-15 20:10:09 +01:00
Roland Scheidegger
e1f713bf63 llvmpipe: Fix overflow issues calculating loop iterations for aniso
iceil can return bogus (negative) values in case there's an overflow
(or a NaN). This would then take forever to run due to a couple billion
loop iterations.
Use unsigned minimum instead which will clamp iterations to max aniso
(not sure if that makes more sense than clamping negative values to 0,
probably doesn't really matter).

Fixes: 350a0fe632 ("llvmpipe: Use a simpler and faster AF implementation")

Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33537>
(cherry picked from commit 24076eb3f9)
2025-02-15 20:10:08 +01:00
Lorenzo Rossi
3106363a95 nvk: fix preprocess buffer alignment
Previously DGC alignment requirements declared by
getGeneratedCommandsMemoryRequirementsExt were not also reported by
getDeviceBufferMemoryRequirements for preprocess buffers.

This fixes 1554 dEQP-VK failures related to device-generated commands
that previously failed with "DGC alignment requirement larger than
preprocess buffer alignment requirement".

Fixes: 976f22a5da ("nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT")
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33555>
(cherry picked from commit cc30e35306)
2025-02-15 20:06:24 +01:00
Eric Engestrom
85f4342382 .pick_status.json: Update to 06d8afff64 2025-02-15 20:05:34 +01:00
Samuel Pitoiset
7e54da043a radv/meta: disable conditional rendering for fill/update buffer operations
These commands shouldn't be affected by conditional rendering, similar
to the copy buffer operation.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33511>
(cherry picked from commit 5684c1687c)
2025-02-15 00:11:30 +01:00
Simon Ser
b0a094edfa gbm: fix get_back_bo() failure with gbm_surface and implicit modifiers
Before 361f362258 ("dri: Unify createImage and
createImageWithModifiers"), gbm_surface_create_with_modifiers() would
fail with ENOSYS on drivers missing explicit modifiers support. After
that commit, it succeeds and fails later when it tries to allocate a
new back buffer.

Restore the previous behavior.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 105fcb9cfd ("dri: revert INVALID modifier special-casing")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12283
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32726>
(cherry picked from commit 5a19323d0e)
2025-02-15 00:03:01 +01:00
Erik Faye-Lund
e074dcbbbb panvk: report passing the VK CTS
This will be needed in order to check off passing the VK CTS properly.

Please note, this does *not* mean that we are formally conformant, only
that we have passed the VK CTS at least once. Those are not the same
thing.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33254>
(cherry picked from commit 2653a3988f)
2025-02-15 00:02:59 +01:00
Eric R. Smith
3a9d9099d4 panfrost: fix backward propagation of values in loops
bi_opt_mod_prop_backward tries to propagate values backwards, but
stops checking for uses when it reaches the SSA definition. For
ordinary blocks that's fine, but for loops the definition can come
after a PHI that uses the value. This causes incorrect code to be
generated in shaderdb test `shaders/skia/2134.shader_test`. Fix this
by special casing PHI instructions, in a manner similar to done in
asahi/compiler/agx_optimizer.c.

This bug has been present a long time, so we want it back-ported to
stable.

Cc: mesa-stable
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33483>
(cherry picked from commit 18a14c4522)
2025-02-15 00:02:58 +01:00
Yiwei Zhang
5f2343889d venus: fix to handle pipeline flags2 from maint5
Fixes: be6fece6e1 ("venus: enable VK_KHR_maintenance5")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33520>
(cherry picked from commit a7fccbbf85)
2025-02-15 00:02:56 +01:00
Lionel Landwerlin
e2232c0be4 anv: ensure Wa_16012775297 interacts correctly with Wa_18020335297
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: dddd765553 ("anv: implement VF_STATISTICS emit for Wa_16012775297")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
(cherry picked from commit 6b99bf76ca)
2025-02-15 00:02:54 +01:00
Lionel Landwerlin
399de9dd00 anv: disable VF statistics for memcpy
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32418>
(cherry picked from commit 462d8e3fab)
2025-02-15 00:02:53 +01:00
Eric R. Smith
b0891768d5 panfrost: fix YUV center information for 422
It turns out that the change from CENTER_Y to CENTER_X for
422 YUV didn't actually happen until generation 14 of the
hardware, not generation 10 as some documents claimed. This
fixes the failing piglit tests ext_image_dma_buf_import-sample_yuv
associated with 422 formats (which apparently we aren't running on CI).

Fixes: 23aa784c
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33516>
(cherry picked from commit c7fed8b053)
2025-02-15 00:02:52 +01:00
Eric Engestrom
df3ad61978 .pick_status.json: Update to a9b6a54a8c 2025-02-15 00:02:27 +01:00
Eric Engestrom
90e72c54d8 ci/yaml-toml-shell-py-test: run on direct push pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33412>
(cherry picked from commit 7b018945e8)
2025-02-12 19:52:38 +01:00
Eric Engestrom
b01077c27a ci/yaml-toml-shell-py-test: don't run on post-merge pipelines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33412>
(cherry picked from commit c8ad134d46)
2025-02-12 19:52:32 +01:00
Eric Engestrom
58540dd004 ci: debian-testing-ubsan is used by tests
Fixes: 37ee035e42 ("ci/build: add ubsan build jobs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33509>
(cherry picked from commit e41438275e)
2025-02-12 19:52:27 +01:00
Eric Engestrom
7445240551 .pick_status.json: Update to e41438275e 2025-02-12 19:52:21 +01:00
Eric Engestrom
3a8abfa39b VERSION: bump for 25.0.0-rc3 2025-02-12 17:04:29 +01:00
Eric Engestrom
7b1e97928c .pick_status.json: Mark 13e987669c as denominated 2025-02-12 12:59:42 +01:00
Mel Henning
017ea57804 driconf: force_vk_vendor on Deep Rock Galactic+NVK
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33502>
(cherry picked from commit f887ae2f3c)
2025-02-12 12:05:39 +01:00
Eric Engestrom
7e549546d4 ci: run containers builds on staging branches
Fixes: 7152f343d6 ("ci: only trigger the CI for release managers when pushing to staging branch")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33468>
(cherry picked from commit b08f9a2dbd)
2025-02-12 12:05:32 +01:00
Mike Blumenkrantz
a917c1f0bf zink: never try to oom flush during unsync texture upload
this is very broken

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33484>
(cherry picked from commit 52dfe1e955)
2025-02-12 12:05:31 +01:00
Mike Blumenkrantz
7bd126c0e6 zink: only enable unsynchronized_texture_subdata with HIC
this is otherwise useless

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33484>
(cherry picked from commit 2304078261)
2025-02-12 12:05:31 +01:00
David Rosca
0c862e61e2 radeonsi/uvd: Set correct chroma format for H264 decode
Fixes decoding monochrome (chroma_format_idc = 0).

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
(cherry picked from commit 441252e9e1)
2025-02-12 12:05:30 +01:00
David Rosca
7ee94ef063 radeonsi/vcn: Set correct chroma format for H264 decode
Fixes decoding monochrome (chroma_format_idc = 0).

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
(cherry picked from commit 110d406302)
2025-02-12 12:05:29 +01:00
David Rosca
326ea58650 frontends/vdpau: Set H264 chroma_format_idc
We don't get the actual value from VDPAU, so hardcode to 4:2:0.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
(cherry picked from commit c28702c35a)
2025-02-12 12:05:28 +01:00
Lionel Landwerlin
cef16493a8 anv,driconf: Add sampler coordinate precision workaround for Dynasty Warriors
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12584
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33488>
(cherry picked from commit 4864c0a5fc)
2025-02-12 12:05:27 +01:00
Boris Brezillon
35063c7764 panvk: Initialize device virtual address space after the VM creation
Make sure we're not lacking a lock/heap destroy when we fail to
create the VM.

Fixes: 53fb1d99ca ("panvk: Transition to explicit VA assignment on v10+")
Reported-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Signed-off-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/33471>
(cherry picked from commit 4ae12cc6ff)
2025-02-12 12:05:26 +01:00
Boris Brezillon
015835fc59 panvk/csf: Don't free the resources twice when init_render_desc_ringbuf() fails
init_queue() calls cleanup_queue() if anything fails in the middle, which
means finish_render_desc_ringbuf() will be automatically called if
init_render_desc_ringbuf() failed. Get rid of the the error path and
return directly instead. The one exception we have is the dev_addr
allocation, which needs to be explicitly freed if an error occurs between
util_vma_heap_alloc() and pan_kmod_vm_bind().

Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-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/33471>
(cherry picked from commit 5f3c6a0f27)
2025-02-12 12:05:25 +01:00
Faith Ekstrand
6d3863b41b nvk: Fix scissor bounds
This code is old, copied from the old nouveau GL driver.  As of Pascal,
we have have 32k images so we need 32k scissors as well.  Use the
max_image_dimension() helper instead of hard-coding it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33478>
(cherry picked from commit 6f64962f27)
2025-02-12 12:05:23 +01:00
Eric Engestrom
6285eefd88 .pick_status.json: Update to 30a3d567c8 2025-02-12 12:05:20 +01:00
Patrick Lerda
9fd4deead3 r600: fix r600_init_shader_caps() has_atomics issue
Indeed, has_atomics is not yet initialized at the time of the
call of r600_init_shader_caps(). This change fixes this issue.

For instance, this issue is triggered with
"piglit/bin/clearbuffer-depth-cs-probe -auto -fbo":
clearbuffer-depth-cs-probe: ../src/gallium/drivers/r600/evergreen_state.c:5039: evergreen_emit_atomic_buffer_setup: Assertion `resource' failed.
Aborted

Fixes: 7cd606f01b ("r600: add r600_init_screen_caps")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33438>
(cherry picked from commit bb44052ee9)
2025-02-11 18:07:31 +01:00
David Rosca
b86196935f radeonsi/video: Avoid stream handle duplicates in PID namespace
Add current time when generating the stream handle initial value.

When running inside PID namespace there can be multiple processes
in the system that will share the same PID and with current code
this could result in the same stream handle being used at the same
time from different processes.

This can easily happen with Flatpak when running two instances of the
same application - both processes will have the same PID and we
will use the same stream handles.

For older UVDs kernel will reject the CS if we use duplicated handles.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12575
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33374>
(cherry picked from commit fdf747af3a)
2025-02-11 18:05:33 +01:00
Ian Romanick
2ea6b340ac brw/copy: Fix handling of offset in extract_imm
The offset is measured in bytes. Some of the code here acted as though
it were measured in src.type units. Also modify the assertion to check
that all extracted bits come from data in the immediate value.

Fixes: 580e1c592d ("intel/brw: Introduce a new SSA-based copy propagation pass")
Fixes: da395e6985 ("intel/brw: Fix extract_imm for subregion reads of 64-bit immediates")

Yes, I missed this error *twice* in code review.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33049>
(cherry picked from commit ac4b93571c)
2025-02-11 18:05:27 +01:00
Yiwei Zhang
415338d3e1 venus: use dedicated allocation for ANB image memory import
On most platforms, deidcated allocation is preferred for the dma-buf
import done by Venus. In special cases, this is required but missed so
far.

Cc: mesa-stable

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33434>
(cherry picked from commit d92f9c3d51)
2025-02-11 18:05:27 +01:00
Yiwei Zhang
f66772f1b1 venus: enable VK_EXT_external_memory_acquire_unmodified if needed
When used internally, we have to conditionally enable it behind the app.

Fixes: 969cb02de7 ("venus: chain VkExternalMemoryAcquireUnmodifiedEXT for wsi ownership transfers")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33419>
(cherry picked from commit 1d668233ba)
2025-02-11 18:05:26 +01:00
Iago Toral Quiroga
93d004ab64 v3dv: fix crash on 32-bit builds
Command buffer private object destroy callbacks receive a 64-integer so their
signature should respect that to avoid alignment issues when passing pointers.
This is the same we were already doing for color pipelines, but now for D/S
pipelines too.

Fixes crash on 32-bit build with:
dEQP-VK.synchronization2.op.single_queue.fence.write_clear_attachments_read_copy_image_to_buffer.image_128x128_d16_unorm

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33463>
(cherry picked from commit daa48cbaef)
2025-02-11 18:05:24 +01:00
Eric Engestrom
33065515bc .pick_status.json: Update to 18f0807408 2025-02-11 18:05:18 +01:00
Qiang Yu
88cd974aae radeonsi: fix GravityMark corruption when use aco
aco may use smem load for ssbo when possible.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12518
Cc: mesa-stable
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33440>
(cherry picked from commit ee9edd4625)
2025-02-10 11:50:51 +01:00
Qiang Yu
a9f218a966 radeonsi: fix has_non_uniform_tex_access info
Fixes: f859436b55 ("radeonsi: add has_non_uniform_tex_access shader info")
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33440>
(cherry picked from commit c805ea6792)
2025-02-10 11:50:50 +01:00
Mel Henning
92e02eebea nak/opt_copy_prop: Force alu src for IAdd2X/IAdd3X
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
(cherry picked from commit 48edb9cec2)
2025-02-10 11:50:48 +01:00
Mel Henning
ea52e480cb nak/opt_copy_prop: Add force_alu_src_type
This is just a code cleanup - it shouldn't change any shaders.

Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
(cherry picked from commit 2fa557d29d)
2025-02-10 11:50:47 +01:00
Mel Henning
2583fde8bc nak/opt_copy_prop: Fix IAdd3 overflow check
Cc: mesa-stable
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
(cherry picked from commit a5b267980a)
2025-02-10 11:50:46 +01:00
Rebecca Mckeever
6378d22e68 panvk: Fix assertion in is_disjoint()
We were not correctly following VUID-VkImageCreateInfo-format-01577:

If format is not a multi-planar format, and flags does not
include VK_IMAGE_CREATE_ALIAS_BIT, flags must not contain
VK_IMAGE_CREATE_DISJOINT_BIT.

Fixes: 412c2863 ("panvk: Enable multiplane images and image views")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
(cherry picked from commit 2ddd021bae)
2025-02-10 11:50:45 +01:00
Rebecca Mckeever
c3afddf561 panvk: Allow a 32-bit binding value in desc id key and use 64-bit keys
Since the binding value can be any 32-bit number, we cannot assume that
it is <= 27 bits. We need 64-bit keys to accommodate a 32-bit binding.

This will also provide more bits to store the subdesc id, which will be
needed for multiplane texture and sampler descriptors.

Fixes: 7bea6f86 ("panvk: Overhaul the Bifrost descriptor set implementation")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
(cherry picked from commit 9c4b530c49)
2025-02-10 11:50:44 +01:00
Pavel Ondračka
90c4d44969 i915: rework shader compile failures reporting
Report compile errors from create_fs_state instead of finalize_nir.
The current way is broken, since nir_to_tgsi is called in finalize_nir,
however it can't handle lowered IO.

Fixes: dae57e184a
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12373
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33341>
(cherry picked from commit 4d4a3a6d6b)
2025-02-10 11:37:28 +01:00
Marek Olšák
ef741dad68 gallium,st/mesa: allow reporting compile failures from create_vs/fs/.._state
This adds a proper interface for reporting shader compile failures.
They are propagated to the GLSL linker.

Reporting errors from finalize_nir will be deprecated.

Fixes: dae57e184a
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33341>
(cherry picked from commit dc1b719e1f)
2025-02-10 11:37:18 +01:00
Martin Roukala (né Peres)
d7e6adfa2c turnip/ci: re-introduce the multiviewport flakes
This is a partial revert of 5f3cad0026, as the commit did not
actually fix the flakes it claimed to do.

Fixes: 5f3cad0026 ("tu: Add missing assignment to shared_viewport")
Suggested-by: @Valentine (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446#note_2770035)
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
(cherry picked from commit f3b1f5ba2c)
2025-02-10 11:37:10 +01:00
Martin Roukala (né Peres)
a112f94c76 ci/b2c: fix the S3 artifact for amd64 manual vk/gl
Fixes: 5b291c7ce6 ("ci: Move r300/nine/nvk builds out of critical path")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33446>
(cherry picked from commit c63041c0ed)
2025-02-10 11:37:05 +01:00
Rebecca Mckeever
8eb769a540 util/hash_table: Add _mesa_hash_table_u64_replace()
This function updates the data of a u64 hash_table entry and is safe to
use inside a hash_table_u64_foreach() loop.

Fixes: 7bea6f86 ("panvk: Overhaul the Bifrost descriptor set implementation")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32563>
(cherry picked from commit 1d0f44739d)
2025-02-10 11:36:56 +01:00
Ian Romanick
20f09fc0d4 crocus: Add missing nir_metadata_preserve in crocus_lower_storage_image_derefs
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Closes: #12589
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
(cherry picked from commit 40948b9715)
2025-02-10 11:36:53 +01:00
Ian Romanick
1c8f1e820f iris: Add missing nir_metadata_preserve in iris_lower_storage_image_derefs
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Fixes: 26a54ae4b2 ("iris: lower storage image derefs")
Closes: #12589
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33450>
(cherry picked from commit f2a01be57e)
2025-02-10 11:36:53 +01:00
Eric R. Smith
eabe6ec941 panfrost: avoid potential divide by 0 calculating timer_resolution
On armhf integer divide by 0 can raise SIGFPE, whereas on aarch64
it just returns 0. This has become an issue because the recently
added panfrost_init_screen_caps always calls pan_gpu_time_to_ns to
calculate caps->timer_resolution, whereas before we only called it
when PIPE_CAP_TIMER_RESOLUTION was queried, and only OpenCL
does that (and not always).

Fixes: 205669e3a9 ("panfrost: add panfrost_init_screen_caps")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33435>
(cherry picked from commit e550a3cab0)
2025-02-10 11:36:51 +01:00
Erik Faye-Lund
4736448bde panvk: correct number of read bytes for dynamic buffers
This function takes the number of bytes, not number of entries. This
should hopefully fix start-up issues on Citra.

While we're at it, fixup the alignment of the line that writes the
bytes.

Fixes: 27beadcbdb ("panvk: Extend the shader logic to support Valhall")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12539
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33429>
(cherry picked from commit 2ae97a4eb6)
2025-02-10 11:36:50 +01:00
David Rosca
19f1546fb3 ac/vcn_dec: Fix AV1 film grain on VCN5
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33376>
(cherry picked from commit 62b0f84981)
2025-02-10 11:36:50 +01:00
Karol Herbst
741763f32c rusticl/mem: do not apply offset with in copy_image_to_buffer
The offset already gets applied when mapping the destination buffer, so we
ended up applying it twice.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33426>
(cherry picked from commit a2a3be3baa)
2025-02-10 11:36:49 +01:00
Samuel Pitoiset
1cf778e011 radv: fix fetching draw vertex data from counter buffers with transform feedback
counterOffset was just ignored and nobody noticed (missing VKCTS
coverage).

VGT_STRMOUT_DRAW_OPAQUE_OFFSET will do the computation in hw for us.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33407>
(cherry picked from commit 8625decbcc)
2025-02-10 11:36:48 +01:00
Benjamin ROBIN
cd1ec4d20e util/disk_cache: Do not try to delete old cache if cache is disabled
Prevent following warning if not running as a normal user:
Failed to create /home for shader cache (Permission denied)---disabling

disk_cache_delete_old_cache() is going to create first the cache directory
using disk_cache_generate_cache_dir(). From mkdir_if_needed(), the stat()
of "/home" is failing with "Permission denied" under some circumstances
when using Firefox.

Fixes: #12168
Fixes: c3bc6991d2 ("util/disk_cache: Delete the old multifile cache if using the default.")

Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32886>
(cherry picked from commit 622f7407d7)
2025-02-10 11:36:46 +01:00
Eric Engestrom
01b75c49a3 ci: only trigger the CI for release managers when pushing to staging branch
The release branch contains only what was on the staging branch first,
so testing it again is a waste of resources.

To do this, we split the rule into specifically "default branch" and
"staging branch", and "release branch" gets dropped by virtue of no
longer being caught by any rule.

Cc: mesa-stable
Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33411>
(cherry picked from commit 7152f343d6)
2025-02-10 11:36:36 +01:00
Eric Engestrom
fc5cbf4bce ci: don't run on tag pipelines
It's too late to run all the tests by then, the release has been made
based on the staging pipelines results

Cc: mesa-stable
Reviewed-by: Martin Roukala <None>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33409>
(cherry picked from commit 31f0a9be3f)
2025-02-10 11:35:39 +01:00
Eric Engestrom
be81537a63 llvmpipe/tests: include math.h for INFINITY
This might be the cause of #12557, but we should do this regardless.

Fixes: d366520e85 ("gallivm: fix rsqrt failures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33424>
(cherry picked from commit e4551ac69e)
2025-02-10 11:35:38 +01:00
Erik Faye-Lund
3d18ce09de pan/ci: add fail from llvm 19 upgrade
This was missed while testing the LLVM 19 upgrade, because the
panfrost-t860-cl:arm64 job doesn't run pre-merge.

Fixes: 101065642d ("ci/debian: Upgrade Debian images to LLVM 19")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33425>
(cherry picked from commit a6e0492da1)
2025-02-10 11:35:32 +01:00
Karmjit Mahil
c081723541 loader/wayland: Fix missing timespec.h include
`loader_wayland_dispatch()` also makes use of `timespec` so we
need `timespec.h`. Otherwise it fails to build due to
`timespec_sub_saturate()` missing.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Fixes: 90effcceab ("wsi/wayland: refactor wayland dispatch")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12580
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33423>
(cherry picked from commit 54928d643e)
2025-02-10 11:35:25 +01:00
Eric Engestrom
495b369693 .pick_status.json: Update to ee9edd4625 2025-02-10 11:35:17 +01:00
Eric Engestrom
78411d5666 gfxstream: mark unused variables as such
It's unclear to me whether this is dead code that should be removed or
dead code that should be used, so I just marked it as unused to remove
a few thousand warnings when compiling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
(cherry picked from commit 93a720f81a)
2025-02-06 10:18:23 +01:00
Eric Engestrom
93dcef8408 gfxstream: use range variable for its intended purpose
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
(cherry picked from commit b2b37cb1de)
2025-02-06 10:18:19 +01:00
Eric Engestrom
79e67633c9 gfxstream: drop dead variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
(cherry picked from commit 96c183c759)
2025-02-06 10:18:14 +01:00
Eric Engestrom
d3e9c337fd gfxstream: fix signedness of shifts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33384>
(cherry picked from commit 74d0a8cdd6)
2025-02-06 10:18:08 +01:00
Samuel Pitoiset
765cdedcd0 radv: fix adding the BO to cmdbuf list when starting conditional rendering
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33403>
(cherry picked from commit 9b827556f5)
2025-02-06 10:15:10 +01:00
Martin Roukala (né Peres)
440f3359a7 zink/ci: use the debian-built-testing for nvk
Fixes: 5b291c7ce6 ("ci: Move r300/nine/nvk builds out of critical path")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33401>
(cherry picked from commit a55613ce8d)
2025-02-06 10:15:08 +01:00
Mike Blumenkrantz
78577b19bc radv: fix error reporting for VkExternalMemoryTypeFlagBitsKHR
wrong type name is confusing

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33323>
(cherry picked from commit ca8a740e3b)
2025-02-06 10:15:03 +01:00
Job Noorman
62dbbe79ec ir3: fix emitting descriptor prefetches at end of preamble
The fix in e7ac1094f6 to emit preamble defs in the correct block would
move the cursor of the builder that is later used to insert descriptor
prefetches, emitting them at the wrong place. Fix this by resetting the
cursor before emitting the prefetches.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: e7ac1094f6 ("ir3: rematerialize preamble defs in block dominated by sources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33399>
(cherry picked from commit 8404e7428b)
2025-02-06 10:15:00 +01:00
Eric Engestrom
7368b3f409 .pick_status.json: Mark 5f54beb307 as denominated 2025-02-06 10:14:45 +01:00
Eric Engestrom
36b67f71d5 docs/android: drop libglapi.so now that it's gone
Fixes: 44bda7c258 ("dri: put shared-glapi into libgallium.*.so")
Reviewed-by: Antonio Ospite <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33388>
(cherry picked from commit 4bbbbb96be)
2025-02-06 10:14:38 +01:00
Eric Engestrom
05d2f1c24a .pick_status.json: Update to fdaf7c7b96 2025-02-06 10:14:19 +01:00
Samuel Pitoiset
c00d4230ba radv: fix caching on-demand meta shaders
This switches to disk_cache instead of our own mechanism which only
stored meta shaders when the logical was destroyed.

Meta shaders are still stored separately from the application shaders
because they are common to all applications on a given GPU/Mesa version.
The default cache is 32MiB which should be large enough.

This fixes massive stuttering in FF7 Rebirth but all apps are
technically affected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33405>
2025-02-06 07:33:37 +00:00
Samuel Pitoiset
f0a4a71b3a vulkan/runtime: allow to use a different disk cache
Instead of using the default one provided by the physical device.
This will be used by RADV to store meta shaders to a separate single
cache file.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33405>
2025-02-06 07:33:37 +00:00
Samuel Pitoiset
30e0d3da66 util/disk_cache: add a new helper to create a disk cache
This will be used by RADV to store the meta shaders to a separate
cache directory.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33405>
2025-02-06 07:33:37 +00:00
Samuel Pitoiset
03c3250e04 radv/meta: stop using string keys also for DGC and query objects
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33405>
2025-02-06 07:33:37 +00:00
Samuel Pitoiset
5443c23983 radv/meta: add missing pipeline lookups
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33405>
2025-02-06 07:33:36 +00:00
Konstantin Seurer
662bcc8717 radv/meta: Stop using strings for meta keys
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33405>
2025-02-06 07:33:36 +00:00
Eric Engestrom
1d051e5cb1 VERSION: bump for 25.0.0-rc2 2025-02-05 18:42:06 +01:00
Jung-uk Kim
b38918d1b4 FreeBSD: Disable support for "-mtls-dialect" for FreeBSD
Clang 19 supports "-mtls-dialect=" but FreeBSD does not support "-mtls-dialect=gnu2".
Skip auto-detection for FreeBSD.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31931>
(cherry picked from commit f9fc7392fa)
2025-02-05 16:09:27 +01:00
Mary Guillemard
32f0add871 panvk: Disallow unknown GPU models early in physical device init
We rely on the panfrost_model details around the codebase, if it's not
known this is a problem.

As a result, we will now disallow anything that isn't known like what
we do on Gallium.

Fixes: c95ef9e323 ("panvk: Fix NULL deref on model name when device isn't supported")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Suggested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
(cherry picked from commit e3b8d1da6d)
2025-02-05 16:08:35 +01:00
Mary Guillemard
687790670f pan/decode: Fix indirect branch calculation for 64-bit
THe enum variant for u64 was actually 32-bit making all 64-bit operation
wrong.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 7d0dc3d30c ("pan/decode: Add a helper to print CS binaries without interpreting them")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
(cherry picked from commit 7bb6ebe938)
2025-02-05 16:08:35 +01:00
Mary Guillemard
56233d338b pan/bi: Use 2D dimension with TEX_FETCH with CUBE on Valhall
TEX_FETCH doesn't have the CUBE dimension, this was working on v9 and
v10 but this fails on Avalon.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: ce52b6d359 ("pan/bi: Rework indices for tex on Valhall")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
(cherry picked from commit 135aeddc9b)
2025-02-05 16:08:34 +01:00
Mary Guillemard
45f57e0047 pan/bi: Fix invalid CLPER encoding
This src1 expect lanes, isn't widen and have a size of 8-bit (5-bit on
Valhall, 4-bit on Avalon)

We also now disallow swizzle lowering on it. (even on Bifrost)

Fixes: 316486dd9f ("pan/va: Add initial ISA.xml for Valhall")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
(cherry picked from commit b00c09b920)
2025-02-05 16:08:34 +01:00
Mary Guillemard
ee5713a418 pan/bi: Remove shift lanes invalid encodings
We were wrongly defining values that select more than one byte.

The swizzle used for H01 was working fine for v9 and v10, but this
generate an invalid encoding on Avalon.

This fixes this by using B00 variant as we are only using 8-bit sources.

Fixes: f45654af59 ("pan/va: Add packing routines")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
(cherry picked from commit 637cb0a993)
2025-02-05 16:08:33 +01:00
Mary Guillemard
f5e6b891fa pan/bi: Properly encode LEA_BUF_IMM
We were hardcoding table 61 and index 0 for IDVS based usage and this
could have been misused.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f45654af59 ("pan/va: Add packing routines")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
(cherry picked from commit fbd5d58e36)
2025-02-05 16:08:33 +01:00
Mary Guillemard
fa03018d28 panfrost: Fix PROGRESS_LOAD destination register
The offset of dest should be 40, not 48.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 486c341769 ("panfrost: Add architecture description XML for v10")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
(cherry picked from commit 38a3cd8c76)
2025-02-05 16:08:32 +01:00
Mary Guillemard
442c29633d panfrost: Fix group priorities in drm-shim
Those were supposed to use BITFIELD_BIT.

Fixes: 2237cff1af ("panfrost: Report default value for GROUP_PRIORITIES_INFO in drm-shim")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33371>
(cherry picked from commit 05c2abcfea)
2025-02-05 16:08:32 +01:00
Erik Faye-Lund
fa31c1f713 pan/ci: add flaky tests to the flake-list
These have been switching between failing and passing recently. Not
really sure what's going on here, but we don't want the CI to flip
randomly between failing and passing, so let's mark them as flakes.

Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33381>
(cherry picked from commit 4d86a1c928)
2025-02-05 16:08:31 +01:00
Erik Faye-Lund
00472fd105 panvk/ci: add back incorrectly removed crash
Turns out, this was only fixed on G610, not on G52.

Fixes: f93a48e4e3 ("panfrost: fix hang by using MALI_PIXEL_KILL_WEAK_EARLY in color preload")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33381>
(cherry picked from commit 6f70425ef5)
2025-02-05 16:08:31 +01:00
Lionel Landwerlin
cb0d551424 brw: fixup scoreboarding for find_live_channels
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
(cherry picked from commit c08b437db7)
2025-02-05 16:08:29 +01:00
Qiang Yu
ebe6878a6a gallium: fix ddebug and noop screen caps init
Fixes: a036231c09 ("gallium: add u_init_pipe_screen_caps")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
(cherry picked from commit 2af8172b62)
2025-02-05 16:08:24 +01:00
Qiang Yu
59865a1b1e lavapipe: fix min_vertex_pipeline_param
Fixes: d91a549b67 ("lavapipe: check all vertex-stages")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33176>
(cherry picked from commit 0f656756ec)
2025-02-05 16:08:23 +01:00
Iago Toral Quiroga
1579ff453e v3dv: fix missing access bit flag when checking for texel buffer reads
VK_ACCESS_2_SHADER_READ_BIT matches all types of reads from shaders,
texel buffers too.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33367>
(cherry picked from commit a6dc8fa426)
2025-02-05 16:08:18 +01:00
Eric Engestrom
6c580e547d .pick_status.json: Mark 39969409f6 as denominated 2025-02-05 16:08:06 +01:00
Martin Roukala (né Peres)
729f1b1112 ci: fix the artifact name
This has probably no incidence on anything else but human-visible names
but let's fix it anyway.

Fixes: ef3091736c ("ci: use CI_PROJECT_NAME for artifacts name")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32927>
(cherry picked from commit 978c0989eb)
2025-02-05 16:05:42 +01:00
Eric Engestrom
52439657be .pick_status.json: Update to e192d7d615 2025-02-05 16:05:35 +01:00
Pavel Ondračka
84f297e9d1 i915/ci: use debian-build-testing instead of debian-testing
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33345>
(cherry picked from commit f7e5daaedd)
2025-02-04 21:10:16 +01:00
Valentine Burley
82b697ed69 amd/ci: Revert to 6.6 kernel on Raven
There's been a high number of GPU resets on Raven that amdgpu couldn't
recover from, leading to jobs timing out.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33317>
(cherry picked from commit 5c44d70684)
2025-02-04 21:10:10 +01:00
Erik Faye-Lund
5b1fc670a7 panvk: fix line-rasterization of bifrost
Vulkan defines the line rasterization to *always* use perpendicular
rather than aligned line ends (unless otherwise specified by
VK_EXT_line_rasterization). So let's remove the code that conditionally
sets the bit, we always want the default value (0) here.

It might seem confusing because we kinda named this field wrong. It's
really about perpendicular vs aligned line ends. That's a cleanup we
might want to deal with later, but deleting the assignment is sufficient
to fix this issue. This is also what we do for v10.

This was probably just copied from the Gallium-driver, where this logic
is more or less correct.

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33373>
(cherry picked from commit 1d64095410)
2025-02-04 20:47:26 +01:00
Karol Herbst
a1d5a8ea97 rusticl/kernel: call nir_lower_variable_initializers earlier
Fixes spirv_new spirv14_nonwriteable_decoration

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33327>
(cherry picked from commit 2f4931353f)
2025-02-04 20:47:26 +01:00
James Hogan
8d50d42514 mesa: Fix FramebufferTextureMultiviewOVR num_views check
The check in check_multiview_texture_target() whether numViews <= 0 (as
required by the OVR_multiview spec) is never triggered since it is only
called by frame_buffer_texture() when numviews > 1, as numviews of 0 is
passed in by non multiview FramebufferTexture functions. Such cases are
incorrectly treated as non-multiview attachments.

Tweak frame_buffer_texture() to take an extra bool argument "multiview"
to distinguish between a multiview call with numviews=0, and a
non-multiview call.

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346>
(cherry picked from commit 7f493b45ae)
2025-02-04 20:47:26 +01:00
James Hogan
def5f68269 mesa: Fix multiview attachment completeness check
Fix the FBO attachment completeness test to ensure that multiview
attachments have all views referring to layers in range of the
underlying texture.

The OVR_multiview spec states:
  Add the following to the list of conditions required for framebuffer
  attachment completeness in section 9.4.1 (Framebuffer Attachment
  Completeness):

  "If <image> is a two-dimensional array and the attachment
  is multiview, all the selected layers, [<baseViewIndex>,
  <baseViewIndex> + <numViews>), are less than the layer count of the
  texture."

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346>
(cherry picked from commit 39491da1b6)
2025-02-04 20:47:26 +01:00
James Hogan
fdb7f38da0 glsl: Expose gl_ViewID_OVR back to GLSL 1.30
OVR_multiview requires OpenGL 3.0, so expose gl_ViewID_OVR builtin back
to GLSL 1.30 on OpenGL.

v2: Minor whitespace fix

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")
Signed-off-by: James Hogan <james@albanarts.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33346>
(cherry picked from commit b774b615d2)
2025-02-04 20:47:26 +01:00
Pavel Ondračka
7d0081b108 ci: fix debian-build-testing BUILDTYPE
Fixes: 5b291c7ce6
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33368>
(cherry picked from commit 60e1bc55bf)
2025-02-04 20:47:26 +01:00
Eric Engestrom
e0039516fc .pick_status.json: Update to e49df902b4 2025-02-04 20:47:26 +01:00
Rebecca Mckeever
76fdc6dada pan/texture: Only use plane_chroma_2p for chroma planes
In a 3-plane uncompressed YUV surface, only the chroma planes should use
MALI_PLANE_TYPE_CHROMA_2P plane_type or set secondary_pointer.

Fixes: 144f9324a3 ("panfrost: prepare v9+ to support YUV sampling")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33104>
(cherry picked from commit 58bd1356cc)
2025-02-04 20:47:26 +01:00
Rebecca Mckeever
d91b19ac13 pan/format: Use HW version to determine siting for YUV 422 formats
On v10, only YUV 420 formats support center_y or center siting.

On previous HW versions, YUV 422 formats support center_y siting but not
center_x or center siting.

Fixes: 83c76cceaf ("panfrost: advertise YUV formats for valhall")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33104>
(cherry picked from commit 23aa784c05)
2025-02-04 20:47:26 +01:00
Mike Blumenkrantz
1ea9e1e364 zink: guard rebar check against fallback heap detection
if there is no heap with device-local and host-visible, then
rebar cannot exist. the previous detection did not account for
the rebar heap using the device-local fallback, which of course
would have the same size as the device-local heap and pass the threshold
check

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33359>
(cherry picked from commit 3064bfc312)
2025-02-04 20:47:26 +01:00
Ernst Persson
26ad2f9149 intel/vulkan: Add bvh build dependency
Fixes: 41baeb3810 ("anv: Implement acceleration structure API")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12558
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33333>
(cherry picked from commit c64871accc)
2025-02-04 20:47:26 +01:00
Karol Herbst
de28085f27 rusticl/queue: check device error status
If the underlying GPU context hit any execution errors (e.g. it times out
or something) we want to report it to the application as well.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32929>
(cherry picked from commit 3129fd8dcf)
2025-02-04 20:47:26 +01:00
Karol Herbst
0b7bee3e09 rusticl/mesa: add PipeContext::device_reset_status
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32929>
(cherry picked from commit 2c52ddd1a6)
2025-02-04 20:47:26 +01:00
Karol Herbst
3aa3ec625d rusticl/mem: set bind flags for gl imports
We have to tell the driver how we want to use the resource.

Fixes: 2645003bdc ("rusticl: Create CL mem objects from GL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33325>
(cherry picked from commit 46454f01d3)
2025-02-04 20:47:26 +01:00
Boris Brezillon
f2f488ced5 pan/decode: Fix the blend_count mask
The blend count field is 4 bits not 3 bits.

Fixes: f2740ac69c ("pan/decode: Add support for decoding CSF")
Signed-off-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/33321>
(cherry picked from commit 438652654b)
2025-02-04 20:47:26 +01:00
Boris Brezillon
6911634820 panvk: Don't clobber registers if the render pass was suspended
Commit 2d3c50d484 ("panvk: Fix barriers in secondary cmdbufs w/o rp's")
started resetting the render flags we were relying on to decide to
clobber registers or not. Introduce a new field to restore that check.

Fixes: 2d3c50d484 ("panvk: Fix barriers in secondary cmdbufs w/o rp's")
Signed-off-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/33321>
(cherry picked from commit 127af6f38a)
2025-02-04 20:47:26 +01:00
Eric Engestrom
85bd87de30 .pick_status.json: Mark 0ee5015da4 as denominated 2025-02-04 20:47:26 +01:00
Mike Blumenkrantz
ab687c3983 zink: also refcount needs_present from frontbuffer flush
Fixes: 4b0f2d1a2b ("zink: refcount needs_present resource")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33324>
(cherry picked from commit 41296aab47)
2025-02-04 20:47:26 +01:00
Lars-Ivar Hesselberg Simonsen
c96c123114 panvk: Set missing shader_modifies_coverage flag
The shader_modifies_coverage-flag is currently not set for PanVK. This
might lead to issues down the line, so ensure it's set correctly.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
(cherry picked from commit 375116a3a0)
2025-02-04 20:47:26 +01:00
Lars-Ivar Hesselberg Simonsen
056775eb40 Revert "panfrost: fix hang by using MALI_PIXEL_KILL_WEAK_EARLY in color preload"
This reverts commit f93a48e4e3.

Backport-to: 25.0
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
(cherry picked from commit 2c855c1f4c)
2025-02-04 20:47:26 +01:00
Lars-Ivar Hesselberg Simonsen
fbf86a1c11 Revert "panfrost: remove is_blit flag"
This reverts commit 6d6a43518a.

Backport-to: 25.0
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
(cherry picked from commit 41cb2e73c2)
2025-02-04 20:47:26 +01:00
Lars-Ivar Hesselberg Simonsen
8379aef572 panfrost: Do not evaluate_per_sample for non-MSAA
Enabling evaluate_per_sample in non-MSAA cases might cause issues and
hangs for subsequent ZS cases.

Therefore, only enable the flag when MSAA is active.

Fixes: 26d339ef8a ("panfrost: Generate Valhall Malloc IDVS jobs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33300>
(cherry picked from commit 46256f3e39)
2025-02-04 20:47:26 +01:00
Hyunjun Ko
cd4ffc319f anv: Fix to set CDEF flter flag correctly for AV1 decoding
and relevant tiny clean-up.

Fixes: 8432b8b282 ("anv: add initial support for AV1 decoding")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33316>
(cherry picked from commit 52d9edbf05)
2025-02-04 20:47:26 +01:00
Pierre-Eric Pelloux-Prayer
efdd9452fe radeonsi: update si_need_gfx_cs_space upper bound
radeon_emit_alt_hiz_logic can add 8 extra dw per draw.

Fixes: cdecbee922 ("radeonsi/gfx12: adjust HiZ/HiS logic")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33288>
(cherry picked from commit b3f2435994)
2025-02-04 20:47:26 +01:00
Mike Blumenkrantz
3be9a52a1a zink: emit SpvCapabilityDemoteToHelperInvocation for IsHelperInvocation
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31228>
(cherry picked from commit b4f3136fea)
2025-02-04 20:47:26 +01:00
Tim Keller
845a60dc35 dril: Check for null config in dril_target.c
fixes: 06d417af

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33336>
(cherry picked from commit 4ecd183c56)
2025-02-04 20:47:26 +01:00
Eric Engestrom
66b260fb4f .pick_status.json: Update to 5b856a741d 2025-02-04 20:47:26 +01:00
Eric Engestrom
f43f541c71 [25.0-only] hk: comment out dead variable
Removing a warning during compilation.
2025-02-04 20:47:26 +01:00
Eric Engestrom
001a665ca3 VERSION: bump for 25.0.0-rc1 2025-01-30 21:17:34 +01:00
Valentine Burley
8f66efd8ea venus/ci: Skip flaky test due to intermittent timeouts
This test has been intermittently timing out for a while now.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
c76ef0898b util/u_debug: Ignore newlines in parse_*_string
We now use `parse_debug_string` to parse debug strings from files, which
may have newlines in them. This change ensures that newline characters
are ignored during parsing, a similar change was made to
`parse_enable_string` for consistency.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
aaf8a8d968 freedreno/docs: Document TU_DEBUG_FILE
Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
a177788f6a tu/lrz: Check for TU_DEBUG(nolrz) late
Currently the `nolrz` TU_DEBUG options are only checked during
device creation and image creation, respectively. This means that if
the options are enabled after the device/image is created, LRZ
will still be used. Similarly, if the options are disabled after the
device/image is created, LRZ will still be disabled.

This change moves the checks to the point where the LRZ is actually
used, allowing for runtime toggling of LRZ.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
18ac78e5b4 tu/util: Support toggling TU_DEBUG options at runtime
This adds a new environment variable, TU_DEBUG_FILE, which can be used to
enable/disable various debug options at runtime via writing to a file. This
is useful for switching between different debug options (such as toggling
between SYSMEM/GMEM) without needing to restart the application.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Mark Collins
9a4bed6f05 util: Add file modification notifier utility
A helper to watch files for changes or deletions using inotify, with
a callback mechanism to notify the user of changes.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32906>
2025-01-30 17:42:06 +00:00
Daniel Stone
5b291c7ce6 ci: Move r300/nine/nvk builds out of critical path
debian-testing is the critical path: the shortest possible job to build
exactly what we need to execute on hardware, and nothing else.

debian-build-testing exists to give us better coverage at the expense of
running longer.

Since the only jobs using r300 and Nine, and the only jobs using NVK,
are in post-merge stages which are manually triggered, move these builds
to debian-build-testing. This makes the critical path to those a little
longer, but we do get to make it shorter for everyone else just running
regular Marge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
eabc365e95 ci: Only build what we use for testing jobs
Don't build every driver everywhere, just what we need right now.

r600 is temporarily excluded from release builds as it has a warning
which becomes an error.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
2dba74ffa3 ci: Only build Perfetto in build-test jobs
We don't actually use these for runtime testing right now. If we wanted
to capture traces, we should probably do that as a nightly-only thing.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
28becbb3dc ci: Capture Ninja log
This will give us a better idea of what's taking time during builds.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
8b1abb2643 ci: Trim down VVL external builds
We're not building the VVL tests, so we don't need to download and build
a ton of stuff which is only needed for building tests.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
83d1553391 ci: Don't build Vulkan for GL dEQP
We don't need these Vulkan bits, so let's try not building them. This
might seem kind of petty, but given that we build dEQP four times for GL
(once for GL, once for GLES, once for EGL/X11, and once for
EGL/Wayland), it does actually make a measurable difference to the time
spent rebuilding dEQP.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
3c5b73fa2c ci: Pass build targets to dEQP CMake
This avoids a whole pile of nonsense that we don't need during the dEQP
build, which is helpful when you build it five times in a row. In
particular, not building the Vulkan validation layers means we don't
waste three minutes building a second copy of SPIRV-Tools which we never
use.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
7c320aa13d ci: Move dEQP message into section
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
3693e52cf6 ci: Fix kernel section nesting
This got broken when the section switches were moved to separate files.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:03 +00:00
Daniel Stone
6d76c4f476 ci: Fix dependency on lint job
The toml-lint job hasn't been around for a little while now, and the
clang-format job got deleted.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33287>
2025-01-30 16:56:02 +00:00
Danylo Piliaiev
e3d477a04f tu/a7xx: Always have depth/stencil in corresponding resolve groups
The division between color and d/s resolve groups appears to be
important. Not doing so causes corruption in some of games
when forcing gmem, e.g. in Arma, War Thunder.

Fixes: 25b73dff5a
("tu/a7xx: use concurrent resolve groups")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33169>
2025-01-30 16:27:00 +00:00
Timur Kristóf
150123349a ac/nir/ngg: Use SALU to calculate which threads store to attribute ring in GS.
This trades 1 VALU (v_cmpx) instruction in GS to 2 SALU,
and removes a VALU->SALU dependency for the branch that stores
attributes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
a9e9ec30a5 radv, radeonsi: Disable early prim export on GFX11+.
We suspect that it has no perf benefits on GFX11+.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
5560763e99 ac/nir/ngg: Move GS lowering to separate file.
Both the VS/TES and GS lowering passes have grown a lot over time,
and therefore the C file has become unwieldy. Mitigate that by
moving the GS lowering out to a separate file.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
ab8ec78c93 ac/nir/ngg: Don't call has_input_primitive in GS lowering.
The entire GS lowering will be moved to another file, which
won't have this function.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
910416e5ba ac/nir/ngg: Remove now unused export_pos0_wait_attr_ring.
The issue is worked around now without needing to handle just
the pos0 separately.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
28fe7e2a0e ac/nir/ngg: Rework GS output code for better attribute ring handling.
Create separate branches for output processing and exports.

Normally, emit attribute ring stores at the end of the shader,
but with the attribute ring wait bug, insert them between the
primitive and position export branches.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
213759d2b6 ac/nir/ngg: Carve out ngg_gs_process_out_vertex.
This is	the part of the	code that processes things related to
a single vertex, mainly loading the outputs from LDS and
performing some adjustments on them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
4f8ee9b045 ac/nir/ngg: Carve out ngg_gs_process_out_primitive.
This is the part of the code that processes things related to
a single primitive, mainly the primitive export argument.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
04b4c5d785 ac/nir/ngg: Rework attribute ring wait workaround in VS/TES.
Normally, emit attribute ring stores at the end of the shader.
When the attribute ring wait bug is present, insert them between
the primitive and position exports.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
dec5c957c3 ac/nir/ngg: Use has_attr_ring and has_attr_ring_wait_bug in mesh shader lowering too.
Instead of hardcoding according to GFX level.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
f7305f776e ac/nir/ngg: Pass radeon_info to mesh shader lowering.
Same idea as the VS/TES and GS lowering:
Make shader compilation decisions based on the features of the
current GPU instead of ad-hoc deciding according to GFX level.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
b8204c8df9 ac/nir/ngg: Remove gfx_level and family from NGG lowering options.
They can be read from radeon_info.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
dc6ae1855a ac/nir/ngg: Use gfx_level from radeon_info.
So we don't have to pass it separately.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:46 +00:00
Timur Kristóf
e1be943f10 ac/nir/ngg: Add and use a has_ngg_passthru_no_msg field to ac_gpu_info.
Instead of using the chip family field.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
a40000b85b ac/nir/ngg: Add and use a has_ngg_fully_culled_bug field to ac_gpu_info.
Better than applying the workaround ad-hoc based on GFX level.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
cad0d26dbf ac/nir/ngg: Add and use a has_attr_ring field to ac_gpu_info.
While theoretically all GFX11+ GPUs have an attribute ring, it is
nicer to have this property instead of deciding ad-hoc based on
the GFX level.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
b163ce51b1 ac/nir/ngg: Add and use a has_attr_ring_wait_bug field to ac_gpu_info.
And apply the attribute ring wait workaround based on the new field.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
e76361d626 ac/nir/ngg: Add radeon_info to NGG lowering options.
The intention is to have all the HW features affecting
shader compilation in one place, instead of ad-hoc decisions
in the code based on the GFX level and chip class.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
28c501f22c ac/nir/ngg: Slightly refactor emitting vertex parameters.
No functional changes, just some code cleanup.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
9860fb3780 ac/nir/ngg: Carve out ac_nir_repack_invocations_in_workgroup.
We're going to want to call it from a different	file too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
d2ff3f9fa0 ac/nir/ngg: Carve out NGG streamout code.
We're going to want to call it from a different	file too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
1d8f46e00c ac/nir/ngg: Carve out ac_nir_create_output_phis.
We're going to want to call it from a different	file too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
4bec453595 ac/nir/ngg: Use ac_nir_ngg_alloc_vertices_and_primitives in mesh shader lowering.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
02dacac869 ac/nir/ngg: Carve out ac_nir_ngg_alloc_vertices_and_primitives.
We're going to want to call it from a different file too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
a3d8e6a60c ac/nir/ngg: Remove unused vs_output struct.
Forgot to remove this when I refactored the code to use
ac_nir_prerast_out instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
23641d4032 ac/nir/ngg: Add a few comments explaining some variables.
These were somewhat confusing, so let's add a few words to
explain what they are exactly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
28f49bf99c ac/nir/ngg: Remove some superfluous variables from culling code.
No functional changes, just code cleanup.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
e9069eec8a aco: Move NGG pos export scheduling determination to drivers.
And don't schedule them on GFX11+ at all.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
7a3d95bbe2 ac/nir/ngg: Mitigate attribute ring wait bug when primitive ID is per-primitive.
There is a possibility that some waves in an NGG workgroup
don't have any input vertices, only primitives. When these
waves store the primitive ID as a per-primitive attribute,
they will need to wait for those stores before the primitive
export, because the other waves can't wait for them.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Timur Kristóf
397d45d055 ac/nir/ngg: Mitigate NGG fully culled bug when GS output is compile-time zero.
This case is unlikely but possible. We forgot to handle it here,
because it was originally handled by the backend compiler.

On GFX10 chips that have issues with 0 vertices and primitives
exported, this will always export at least 1 vertex and primitive.

This could theoretically fix some hangs on Navi 10, although we are not aware of a specific issue caused by this problem.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33218>
2025-01-30 15:26:45 +00:00
Erico Nunes
2b4c28e67c ci/lima: enable again
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33299>
2025-01-30 14:22:09 +00:00
Erico Nunes
18fb397249 ci/lima: update piglit ci expectations
Some regressions during lima lab downtime.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33299>
2025-01-30 14:22:09 +00:00
Tapani Pälli
cb71030387 mesa: enable GL_EXT_conservative_depth extension
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33065>
2025-01-30 10:50:37 +00:00
Valentine Burley
b3e4a113b2 freedreno/ci: Document flakes
Some of these cause pipelines to fail.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33298>
2025-01-30 10:25:05 +00:00
Valentine Burley
06ab1c81d1 amd/ci: Increase amd-raven-skqp parallelism
This job was taking too long and there's more DUTs in available in LAVA.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33298>
2025-01-30 10:25:05 +00:00
Valentine Burley
676d4f83d4 virgl/ci: Skip flaky trace
This flake doesn't render at times and can fail merge pipelines.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33298>
2025-01-30 10:25:05 +00:00
Mike Blumenkrantz
d8b7fbd4ac ci: mark radv-raven-traces-restricted with allow_failure
restricted trace jobs are allowed to fail

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33244>
2025-01-30 09:49:11 +00:00
Samuel Pitoiset
d6f9c19755 radv/amdgpu: add support for AMDGPU_GEM_CREATE_GFX12_DCC
This flags will be used to set PTE.DCC to VRAM allocations
(ie. compression).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33284>
2025-01-30 08:18:22 +00:00
Samuel Pitoiset
5ac72c5f56 ac/descriptors: allow to configure DCC for buffer descriptors
This is not used yet.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33284>
2025-01-30 08:18:22 +00:00
Samuel Pitoiset
fe6494559d ac,radeonsi: add SDMA DCC tiling for GFX12+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33284>
2025-01-30 08:18:22 +00:00
Timothy Arceri
e639cd768d glsl: fix return value for subgroupBallot()
The original code attempted to create a second instance of the intrinsic
with only a different return value which isn't possible since the params
(in this case 0 params) are the same. To fix this were need to create
two differently named intrinsics.

Reviewed-by: Qiang Yu <yuq825@gmail.com>

Fixes: a496d84ac8 ("glsl: add KHR_shader_subgroup_ballot builtin functions")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12510
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33231>
2025-01-30 06:06:32 +00:00
Marc Herbert
9102d1775d docs: move cross c*_args from [properties] to [built-in options]
Fixes the following warnings:

DEPRECATION: c_args in the [properties] section of the machine file
             is deprecated, use the [built-in options] section.
DEPRECATION: c_link_args in the [properties] section ...
DEPRECATION: cpp_args in the [properties] section ...
DEPRECATION: cpp_link_args in the [properties] section ...

These were moved in meson version 0.56.0:

https://mesonbuild.com/Machine-files.html#meson-builtin-options
https://mesonbuild.com/Release-notes-for-0-56-0.html

Mesa requires meson version 0.60 or above since commit 049086cd58

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:29 +00:00
Marc Herbert
75fb91501e docs: show which pkg-config Fedora uses for cross-compilation
Learned the hard way.

Only tested on Fedora but other RPM-based distros are likely to be the
same.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:29 +00:00
Marc Herbert
0051807e7e docs: show how to use ccache when cross-compiling
On my desktop system, this gets compilation of (a subset of) 32bits Mesa
from 2.5 minutes down to 15 seconds - and most of what left is linking.

Also show that absolute paths are not required.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:29 +00:00
Marc Herbert
eaabf0e5f0 docs: cross-compile: add useful "apt" and "dnf" builddep commands
These have been tested only with x86_64->i686 cross-compilation but I
don't see why they couldn't work with other architectures if/when Linux
distributions support them. For at least x86_64->i686 cross-compilation,
these commands save an enormous amount of time.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:29 +00:00
Marc Herbert
56081c0b22 docs: add "apt-get build-dep" and "dnf buildep"
So much easier and faster than installing every dependency one by one.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31945>
2025-01-30 05:13:28 +00:00
Caio Oliveira
f18dee3618 intel/brw: Fallback to SEND from SEND_GATHER if possible
After optimization happen, if the sources are still in one or two
contigous spans for some reason (e.g. some data read from memory
now being written), it is beneficial to just use regular SEND
and avoid having to set the ARF scalar instruction.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
b6b32933ad intel/brw: Use SHADER_OPCODE_SEND_GATHER in Xe3
Add an optimization pass to turn regular SENDs into SEND_GATHERs.
This allows the payload to be "broken" into smaller pieces that
can be further optimized, which _may_ result in

- less register pressure (no need to contiguous space), and
- less instructions (no need to MOV to such space).

For debugging, the INTEL_DEBUG=no-send-gather option skips this
optimization, and reporting how many opportunities were missed.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
26d4d04d63 intel/brw: Add lowering for SHADER_OPCODE_SEND_GATHER
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
650ec7169d intel/brw: Add SHADER_OPCODE_SEND_GATHER
Starting in Xe3, there's a variant of SEND that take the
register numbers from the ARF scalar register, and don't
require them to be contiguous.  The new opcode added here
represents that kind of SEND.

To make the original sources still reachable, we keep them
around during the IR, just ignoring them at generator time.
This allow software scoreboard to properly reason the
dependencies without trying to decode the contents of ARF
scalar register being used.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
2fca22347c intel/brw: Plumb through generator whether SEND is gather variant
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:58 +00:00
Caio Oliveira
00fac79f99 intel/brw: Add scoreboard support for scalar register
Xe3 adds a new pipe that handles *only* MOVs from immediate into the
scalar register.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32410>
2025-01-30 04:43:57 +00:00
Daniel Schürmann
3868102a04 nir/loop_analyze: stack-allocate loop_info_state
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:36 +00:00
Daniel Schürmann
fbaabcfb0a nir/loop_analyze: store nir_loop_induction_variable hash table in loop_info
No need to create a separate array.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:36 +00:00
Daniel Schürmann
f327ece9bf nir/loop_analyze: re-use the same nir_loop_variable struct before and after the increment
The information is redundant.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:36 +00:00
Daniel Schürmann
de30bfd5b8 nir/loop_analyze: ignore terminating induction variable in guess_loop_limit()
The array access might be using a different induction variable.

Totals from 23 (0.03% of 79395) affected shaders: (Navi31)
Instrs: 113742 -> 121017 (+6.40%)
CodeSize: 592152 -> 636228 (+7.44%)
Latency: 439244 -> 426784 (-2.84%)
InvThroughput: 36264 -> 35199 (-2.94%)
SClause: 3048 -> 3426 (+12.40%)
Copies: 10630 -> 10733 (+0.97%)
Branches: 3774 -> 4310 (+14.20%)
PreSGPRs: 1683 -> 1696 (+0.77%)
PreVGPRs: 1230 -> 1232 (+0.16%)
VALU: 51026 -> 55912 (+9.58%)
SALU: 15270 -> 15638 (+2.41%)
SMEM: 4456 -> 5149 (+15.55%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:36 +00:00
Daniel Schürmann
7eb2e96d16 nir/loop_analyze: insert only induction vars into hash map
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
f0fd04327f nir/loop_analyze: replace nir_loop_variable array with hash table
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
642a980c9e nir/loop_analyze: don't initialize nir_loop_variable separately
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
f11edceae3 nir/loop_analyze: directly record induction variables into nir_loop_info
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
e639c4d74f nir/loop_analyze: remove nir_loop_variable::in_loop
This information is redundant.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
7f244ced10 nir/loop_analyze: remove nir_loop_variable::in_if_branch and nir_loop_variable::in_nested_loop
This information is redundant.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
83f395a7ce nir/loop_analyze: only iterate loop header phis in compute_induction_information()
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33131>
2025-01-30 03:48:35 +00:00
Daniel Schürmann
65f95ae74e aco/insert_NOPs: implement VALU -> VALU case for VALUReadSGPRHazard on GFX12
Totals from 36918 (46.50% of 79395) affected shaders: (GFX1200)

Instrs: 34997889 -> 35296429 (+0.85%); split: -0.00%, +0.85%
CodeSize: 186161112 -> 187334364 (+0.63%); split: -0.00%, +0.63%
Latency: 250265551 -> 250330784 (+0.03%); split: -0.00%, +0.03%
InvThroughput: 41185298 -> 41192503 (+0.02%); split: -0.00%, +0.02%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32682>
2025-01-30 03:13:16 +00:00
Daniel Schürmann
6c7355f0e6 aco/insert_NOPs: refactor VALUReadSGPRHazard detection
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32682>
2025-01-30 03:13:16 +00:00
Mike Blumenkrantz
4b0f2d1a2b zink: refcount needs_present resource
it's theoretically possible that this resource could be destroyed
between flush_resource and flush...maybe

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33285>
2025-01-30 01:38:32 +00:00
Mike Blumenkrantz
c1e09c7309 zink: add zink_resource_reference() util function
same as pipe version but using different types

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33285>
2025-01-30 01:38:32 +00:00
Mike Blumenkrantz
2d630952b0 zink: check for bound gfx stages before dereferencing
this avoids a null deref in a pattern like bind TES->unbind TES
with the same descriptor bound

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33285>
2025-01-30 01:38:32 +00:00
Caio Oliveira
fbacf3761f intel: Add meson option -Dintel-elk
Defaults to true.  When set to false Iris and various tools can be
built without ELK support.  In both cases this means supporting
only Gfx9+.  This option must be true to build Crocus or Hasvk.

This allows skipping re-building ELK when developing for newer platforms
with tools/tests enabled.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11575
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33054>
2025-01-30 00:45:59 +00:00
Caio Oliveira
31e5d909e7 intel/tools: Merge libaub into libintel_tools
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33054>
2025-01-30 00:45:59 +00:00
Caio Oliveira
ec2d20a70d intel/tools: Add helpers for decoder_init/disasm
Isolate the BRW/ELK differences in a single place.  The way is done now,
we are not reusing the isa_info between calls.  For the tools here this
is probably fine, if its someday this gets in the way, we can add an
opaque pointer to store the right data.

This intentionally is not used in Iris, since there the driver need more
detailed view into BRW/ELK and we don't want to create an all
encompassing abstraction for that.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33054>
2025-01-30 00:45:59 +00:00
Caio Oliveira
aa2bd16dec intel/tools: Use idep_libintel_common in meson
Since the internal dependency object exists and is already
used in some cases, let's be consistent.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33054>
2025-01-30 00:45:59 +00:00
Francisco Jerez
d455d5d86c anv/xe3+: Enable VRT.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
9c13506dd9 iris/xe3+: Enable VRT.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
dd1712515b anv/xe3+: Set RegistersPerThread for bindless shader dispatch.
v2: Use MOV and wrap in conditional during BTD spawn header setup
    (Lionel).  Remove references to SIMD8 (Tapani).

v3: Update brw_bsr() to specify number of registers per thread, don't
    initialize Registers Per Thread on BTD spawn header (Lionel).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
b25d0f899b anv/xe3+: Set RegistersPerThread during shader state setup based on prog_data.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
7537f8edee intel/blorp/xe3+: Set RegistersPerThread during shader state setup based on prog_data.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
2a12ea3df0 iris/xe3+: Set RegistersPerThread during shader state setup based on prog_data.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
f6a1c51de7 intel/genxml/xe3+: Update definitions for shader state setup.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
fb40b449cd intel/brw: Define ptl_register_blocks() helper.
Since this calculation will be needed in many places to set up the
state of each shader stage.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
70fecb1483 intel/brw: Report number of GRF registers used in brw_stage_prog_data.
This is similar to what we used to do on pre-SNB platforms, the number
of GRF registers used by the shader will be used on Xe3+ to adjust the
trade-off between thread-level parallelism and size of the GRF file.
Plumb the value through prog_data so the driver can set up the
hardware state accordingly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
6513bf65c3 intel/brw/xe3+: Optimize CS/TASK/MESH compile time optimistically assuming SIMD32.
This is similar in principle to the previous commit "intel/brw/xe3+:
brw_compile_fs() implementation for Xe3+." but applied to compute-like
shader stages.  It changes the implementation of brw_compile_cs/task/mesh()
to reduce compile time and take advantage of wider dispatch modes more
aggressively than the original logic, since as of Xe3 SIMD32 builds
succeed without spills in most cases thanks to VRT.

The new "optimistic" SIMD selection logic starts with the SIMD width
that is potentially highest performance and only compiles additional
narrower variants if that fails (typically due to spilling), while the
old "pessimistic" logic did the opposite: It started with the
narrowest SIMD width and compiled additional variants with increasing
register pressure until one of them failed to compile.

In typical non-spilling cases where we formerly compiled SIMD16 and
SIMD32 variants of the same compute shader, this change will halve the
number of backend compilations required to build it.

XXX - Possibly don't do this in cases with variable workgroup size
      until effect on runtime performance can be measured directly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

v2: Don't do this for now in cases with variable workgroup size, still
    compile every possible variant in such cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Sagar Ghuge
7e1362e9c0 intel/brw/xe3+: Don't compile SIMD32 if there is ray queries
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
5b6906076e intel/brw/xe3+: brw_compile_fs() implementation for Xe3+.
This reworks the implementation of brw_compile_fs() to reduce compile
time and take advantage of wider dispatch modes more aggressively than
the original logic.

The new "optimistic" PS compilation logic starts with the SIMD width
that is potentially highest performance and only compiles additional
narrower variants if that fails (typically due to spilling or hardware
restrictions), while the old "pessimistic" logic did the opposite: It
started with the narrowest SIMD width and compiled additional variants
with increasing register pressure until one of them failed to compile.

The main disadvantage of this is that selectively throwing away some
of the compiled variants based on the static analysis of their
performance behavior will no longer be possible, however this is
expected to be less useful on Xe3+ since the GRF space allocated to a
thread can be scaled up or down, which leads to less dramatic
differences in scheduling between SIMD variants.

In typical non-spilling cases where we formerly compiled SIMD16 and
SIMD32 variants of the same fragment shader, this change will halve
the number of backend compilations required to build a shader.  With
multi-polygon PS dispatch enabled (which is disabled by default right
now) this has an even more dramatic effect since the number of
compiler iterations can be reduced down to a fifth in the best case
scenario.

Even though in most cases we will only attempt to return a single
binary from the pixel shader compilation, the hardware allows a pair
of PS kernels to be specified, and we'll still take advantage of this
when the multi-polygon PS kernel has the potential to have worse
performance than the single-polygon shader because only the latter
register-allocates successfully at SIMD32 -- Only in such case
(SIMD2x8 multi-polygon, SIMD32 single-polygon) we'll continue
programming both so the hardware will chose one or the other at
runtime depending on the SIMD fullness and number of polygons it can
buffer at runtime.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
1b2bd1fcb8 intel/brw: Exit early from run_fs() if compilation failed before optimization loop.
This avoids running the optimizer uselessly if compilation of the
current kernel failed due to some hardware (e.g. SIMD-width)
restriction.  This isn't only inefficient but it can break assumptions
throughout the compiler which would lead to crashes on Xe3 when this
arises during translation from NIR.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
afff3eb95e intel/brw: Indent conditional block from brw_compile_fs() not applicable to Xe2+.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
d7d08ec2e2 intel/brw: Indent body of brw_compile_fs() not applicable to xe3+.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
d03eac3133 intel/brw/xe3+: Disable round-robin allocation heuristic on Xe3+.
Xe3+ benefits from packing register allocations tightly in order to
make optimal use of the GRF space.  The round-robin heuristic
previously in use often causes the whole GRF space to be used even if
register pressure is substantially lower, which would severely
decrease thread-level parallelism on Xe3+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
a67ff3e7e3 intel/brw/xe3+: Bump number of SBID tokens for Xe3.
Xe3 supports 32 SBID tokens per thread regardless of the number of
register blocks allocated per thread.  Take advantage of the increased
number of SBIDs in the scoreboard pass to reduce the frequency of
false dependencies on Xe3+.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
8d2331fe4b intel/brw/xe3: Extend regalloc sets to maximum Xe3 GRF size.
Extend our regalloc sets to 256 registers to match the maximum
capacity of the GRF file on Gfx30.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
ca1636d457 intel/brw/xe3: Define XE3_MAX_GRF.
Gfx30 supports up to 256 (512b) GRFs which requires a max GRF define
of 512 in REG_SIZE units.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
67cb23a4b1 intel/common/xe2+: Allow SIMD32 PS for all multisample cases.
These don't seem to be disallowed by recent hardware anymore.  Stop
disabling SIMD32 due to hardware restrictions of multisample
rasterization, since it should have better performance, and on Xe3+
there may be no shader variant available other than SIMD32.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
935f60c13c intel/blorp: Specify a subgroup size requirement of 16 for fast clear or repclear shaders.
Request a fixed subgroup size for pixel shaders that require it due to
the hardware restrictions of fast clears and repeated data clears.
This requires plumbing the "is_fast_clear" boolean across several
callers since blorp_compile_fs_brw() currently has no information
regarding whether the kernel is intended for a fast clear operation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
80b2355b39 intel/brw: Allow specifying a required subgroup size for fragment shaders.
On older hardware the "use_rep_send" compile parameter was being
implicitly used to request the compilation of the SIMD16 variant of
clear pixel shaders that require it due to hardware restrictions.

However starting on Gfx12+ this flag is never set since replicated
data clears are no longer supported, but BLORP still implicitly relies
on the SIMD16 variant being generated even though there's no way for
BLORP to explicitly request it.  This doesn't cause much of a problem
right now since brw_compile_fs() typically generates a SIMD16 kernel
unless the SIMD8 kernel spills or SIMD debugging flags are enabled,
but it won't work reliably on Xe3+ since we'll start using SIMD32 more
aggressively.

In order to avoid these issues use the standard required subgroup_size
parameter from shader_info to signal that the SIMD16 variant of the
shader is needed by the caller.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
a736757275 anv/gfx12.5: Request subgroup size 8 for RT trampoline shader.
The 16-wide variant of the trampoline shader doesn't appear to work
and would be inadvertently enabled by this series on Gfx12.5.  Set the
required subgroup size to avoid changing current behavior.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
8102500b95 intel/brw/xe3+: Mask subgroup shuffle index to be within valid range to avoid VRT hangs.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
d2af77aa6b intel/brw: Use urb_read_length instead of nr_attribute_slots to calculate VS first_non_payload_grf.
Makes sure the number of registers reserved for the payload matches
the size of the URB read, which prevents the VS shared function from
writing past the end of the register file on Xe3 with VRT enabled.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Francisco Jerez
7f59708422 intel/brw: Saturate shifted subgroup index to avoid reading past the end of register file.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32664>
2025-01-29 23:39:32 +00:00
Leonard Göhrs
db2a10150f ci/lava: update lavacli from version 1.5.2 to 2.2.0
The lavacli version 1.5.2 has been released in December 2022.
Use the most recent version 2.2.0, released in October 2023, instead.

Notable changes since 1.5.2:

  - Authentication tokens are now stripped from exceptions when HTTP
    requests fail. (1.6)

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33266>
2025-01-29 22:45:53 +00:00
Valentine Burley
e75e9baff8 anv/ci: Decrease anv-jsl-angle parallelism
One of the DUTs had to be retired in LAVA a while ago, and the pending
times were high on the dashboard. Decrease the parallelism and increase
the fractions to address this.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:15 +00:00
Valentine Burley
098c81d663 amd/ci: Migrate amd-raven-skqp from lenovo-zork to hp-zork
We have more hp-x360-14a-cb0001xx-zork DUTs available in LAVA,
use it to offload the overloaded lenovo-TPad-C13-Yoga-zork.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
892a01f529 freedreno/ci: Migrate a618-piglit-full to kingoftown
Migrate the a618-piglit-full manual job from limozeen to kingoftown,
where we have more DUTs available.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
499d1e3624 freedreno/ci: Don't automatically retry manual jobs
The piglit-full jobs were auto-retrying.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
3a83562fd4 zink/ci: Increase parallelism of zink-tu-a618
This job was taking too long. However, with the other jobs
de-duplicated on a618 and a630, we can increase parallelism,
which also allows us to reduce the fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
af183b03e9 freedreno/ci: Re-enable some traces on a618 and disable a630-traces
These traces are no longer flaky or broken on a618, so we can re-enable
them and fully replace the a630-traces job, which we have to disable
due to the limited number of DUTs.

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

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
e57419d182 freedreno/ci: Decrease a630-gl parallelism
a630-gl takes just over 7 minutes on 4 DUTs, so we can safely reduce
the parallelism to 3 and stay within the time limit.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
c41d6e8ba7 turnip/ci: Disable a630-vk
Coverage is mostly provided by a618-vk, while basic validation is
handled by a630-vk-asan.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:14 +00:00
Valentine Burley
028f37a252 freedreno/ci: Disable a618-gl, a618-egl, and a618-piglit
The a618-gl and  a618-egl jobs are covered by a630-gl, which also
does egl testing, while a630-piglit is a more comprehensive
equivalent of a618-piglit, so we can de-duplicate these jobs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
8a45554efa freedreno/ci: Decrease a660-gl paralellism
Currently there are only 8 sm8350-hdk DUTs in LAVA, but there were
10 pre-merge jobs scheduled for them.
Add a full nightly job to cover the gaps.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
c2e7483378 turnip/ci: Increase a660-vk fraction
This job was taking too long, and we don't have more DUTs available.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
cfd3623a68 zink/ci: Increase zink-anv-adl parallelism
This job was taking too long and we have more DUTs available.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
9ab2e026cb panfrost/ci: Move panfrost-g52-piglit to nightly
The panfrost-g52-piglit-gles2:arm64 job was taking 19 minutes on
average, and the pending durations of the meson-g12b-a311d-khadas-vim3
DUTs in LAVA were reaching 5-6 minutes, so we have to make this job
manual instead of pre-merge.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Valentine Burley
562e9c5302 iris/ci: Decrease iris-glk-deqp paralellism
There are only 4 DUTs available in LAVA, and their pending durations
were reaching 3–4 minutes. To address this, reduce the parallelism
for iris-glk-deqp and adjust the fractions to maintain the 10-minute
time limit.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33082>
2025-01-29 20:34:13 +00:00
Timur Kristóf
8b263555ee radv: Lower array derefs of vectors outside of shader linking.
This fixes depth-only rendering with mesh shaders,
as well as array derefs in unlinked shaders in general.

Lowering array derefs of vectors is necessary for correctness.
Without this, nir_lower_io will incorrectly add the array index
to the IO intrinsic base instead of to the component offset.

This was previously only done during shader linking, which leaves
some problems with unlinked shaders and depth-only rendering.

Whether these calls can be safely removed from shader linking
will be investigated in a future commit.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12516
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33264>
2025-01-29 20:05:25 +00:00
Eric R. Smith
f39194cdd3 panfrost: support MTK 16L32S detiling
This is a preliminary implementation of detiling for
NV12_16L32 tiled format external images. When we
encounter such an image, decode it into a secondary
buffer which will then be used to actually texture from.

In some cases applications may wish to represent the individual
planes of an NV12 image separately, we support that by allowing
detiling of just an R8 (luma) or R8G8 (chroma) plane.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31899>
2025-01-29 19:24:59 +00:00
Eric R. Smith
8c6b4ff686 drm-uapi: update drm_fourcc.h to latest version
Taken from commit 3ab334814 of the drm-misc-next kernel tree

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31899>
2025-01-29 19:24:59 +00:00
Jose Maria Casanova Crespo
3575444b01 Revert "ci: take igalia farm offline"
This reverts commit 09653e51f3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33283>
2025-01-29 18:59:15 +00:00
Erik Faye-Lund
8fb48ad4f7 meson: build panvk by default on arm
PanVK on V10 GPUs has reached production quality, so let's enable
building it by default now.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Daniel Stone <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33262>
2025-01-29 18:08:15 +00:00
Lionel Landwerlin
ff9cf7a222 anv: reduce alignment for small heaps
Signed-off-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/33240>
2025-01-29 17:33:13 +00:00
Antonio Ospite
4c42e06d17 ci/android: stop pushing libglapi.so since it's not available anymore
After commit 44bda7c258 (dri: put shared-glapi into libgallium.*.so,
2024-12-26) the mesa Android build does not have a separate libglapi.so
object anymore in the install dir, so stop pushing it to the Android
device in cuttlefish-runner.sh

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
4ac5d7c0bd ci/android: pass --allow-downgrades when installing cuttlefish host tools
Pass --allow-downgrades when installing cuttlefish host tools just to
cover the case when the script is run locally.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
5a71e39e94 ci/android: pass --max-fails to deqp-runner in cuttlefish-runner.sh
Pass --max-fails to depp-runner in cuttlefish-runner.sh too for
consistency with the deqp-runner.sh script.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
326655c51d ci/android: post-process testlog XML and create a junit.xml
Post-process the XML file created by testlog-to-xml invoked by
deqp-runner to create a junit.xml file, just like deqp-runner.sh does.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
d0b00a63a7 ci/android: fix pulling results from Android device
Add a trailing dot to the remote directoyy in the `adb pull` command to
make sure to recursively pull only the **content** of the directory and
not the directory itself.

This prevents having `results/results/` in the artifacts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
1c96335d01 ci/android: improve handling of expectation files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
1f0bf2c4a4 ci/android: define an INSTALL var for the source of mesa artifacts
Define an INSTALL var for the source of mesa artifacts so that some code
can be copied over from deqp-runner.sh

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:59 +00:00
Antonio Ospite
909f837ecf ci/android: update CUTTLEFISH_BUILD_NUMBER
Update CUTTLEFISH_BUILD_NUMBER to use a cuttlefish image that has the
`mesa_swrast` GPU mode which uses llvmpipe for GL and lavapipe for
Vulkan.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33261>
2025-01-29 16:36:58 +00:00
Samuel Pitoiset
b3cff84e06 docs: add a note about GFX12 (RDNA4) on RADV
This initial support should be good enough but it's missing two
features (cooperative matrix and video decode/encode) compared to
GFX11 (RDNA3) because lack of time.

DCC is still under active development but it might be possible to
finish it during the RC period.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33281>
2025-01-29 16:24:44 +00:00
Danylo Piliaiev
0aaea5d038 tu: Fix stale A7XX_GRAS_LRZ_CNTL2 in 3d blits or !valid lrz case
Fixes GPU faults with
TU_DEBUG_STALE_REGS_RANGE=0x810b,0x810b TU_DEBUG_STALE_REGS_FLAGS=cmdbuf,renderpass

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33274>
2025-01-29 15:57:51 +00:00
Lionel Landwerlin
4434b0799b anv: dirty pipeline & push constants after internal CS shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7ca5c84804 ("anv: add support for simple internal compute shaders")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33280>
2025-01-29 15:25:43 +00:00
Alyssa Rosenzweig
d58ece8d83 nir/serialize: strip function names names
this makes stripped nir smaller.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33273>
2025-01-29 14:37:41 +00:00
Samuel Pitoiset
4425d8556f radv: use stage instead of entrypoint to determine valid gfx stages
Otherwise if the function name is stripped during NIR serialization,
importing libraries would break because entrypoint is NULL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33273>
2025-01-29 14:37:41 +00:00
Lionel Landwerlin
524dab2b10 anv: expose A4B4G4R4_UNORM_PACK16 support with CBCWF is disabled
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12511
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33194>
2025-01-29 13:57:26 +00:00
Lionel Landwerlin
7fab8675a6 anv: add a drirc to disable border colors without format
Disable it by default on Android.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33194>
2025-01-29 13:57:26 +00:00
Lionel Landwerlin
c2c3f19e88 anv: pass physical device to format helpers
So that we can have special behavior based on drirc configuration.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33194>
2025-01-29 13:57:26 +00:00
Lionel Landwerlin
eb0c2d8f33 anv: use flags for format capabilities
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33194>
2025-01-29 13:57:26 +00:00
Valentine Burley
1dce02fa41 anv/ci: Revert to 6.6 kernel on anv-jsl
The 6.11 kernel we were using frequently caused panics and hangs,
particularly in full nightly jobs, making it unreliable.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33279>
2025-01-29 12:39:41 +00:00
Tapani Pälli
66aebfb1eb isl: use workaround framework for Wa_1207137018
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/33236>
2025-01-29 12:10:13 +00:00
Tapani Pälli
405274fda4 intel/dev: update mesa_defs.json from internal database
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/33236>
2025-01-29 12:10:13 +00:00
Caio Oliveira
080c136afb intel/executor: Fix typo when copying result into Lua table
Fixes: e72bf2d02f ("intel: Add executor tool")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33277>
2025-01-29 09:57:23 +00:00
Faith Ekstrand
66076ca7e8 nvk: Handle pCounterBuffers == NULL in Begin/EndTransformFeedback
Fixes: 5fd7df4aa2 ("nvk: Support for vertex shader transform feedback")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33276>
2025-01-29 09:35:18 +00:00
Faith Ekstrand
e00eeb2098 nak: Use ldc.constant for load_global when CAN_REORDER is set
This yields a 15-20x performance improvement in Dragon Age: The
Veilguard running under VKD3D-Proton.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33276>
2025-01-29 09:35:18 +00:00
Faith Ekstrand
f7e524026f nvk: Call nir_opt_access
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33276>
2025-01-29 09:35:18 +00:00
Samuel Pitoiset
66775c89fc radeonsi: fix programming DCC for SDMA on GFX12
Fixes: 3d05d86d88 ("radeonsi/gfx12: add DCC")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33259>
2025-01-29 08:51:57 +00:00
Samuel Pitoiset
e77a409b26 radv/ci: add expected list of failures for GFX1200
Same as NAVI31.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33258>
2025-01-29 08:31:10 +00:00
Iván Briano
9e5a3a356e hasvk: disable logic op for float/srgb formats
Fixes new tests: dEQP-VK.pipeline.*.logic_op_na_formats.*

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33250>
2025-01-29 08:02:21 +00:00
Iván Briano
c3dea47be8 anv: disable logic op for float/srgb formats
Fixes new tests: dEQP-VK.pipeline.*.logic_op_na_formats.*

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33250>
2025-01-29 08:02:21 +00:00
Marek Olšák
d0e1c508c6 ac/fake_hw_db: deobfuscate GPU name strings
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:02 +00:00
Marek Olšák
64d2d10ad8 winsys/amdgpu: disable DCC for gfx12 when using AMD_FORCE_FAMILY
otherwise buffer allocation fails

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:01 +00:00
Marek Olšák
43588be435 radeonsi: remove an incorrectly defined modifier
It's missing the PACKERS field to distinguish between different layouts
and it's a useless swizzle mode anyway.

Fixes: 0833dd7d12 - amd/common: Add support for modifiers.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9344

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:01 +00:00
Marek Olšák
665058237d radeonsi: remove redundant divergence analysis and smem flagging
They are called above this.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:00 +00:00
Marek Olšák
5f84ff1125 radeonsi: dead code removal and move some code out of headers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:20:00 +00:00
Marek Olšák
3483e1f274 radeonsi: remove SI_TRACKED__UNUSED_GAP
we need to move ALPHA_REF so as not to fail static assertions
in the previous commit

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:59 +00:00
Marek Olšák
19907a24ec radeonsi: validate BITSET_TEST_RANGE_INSIDE_WORD assertion at compile time
This will prevent accidental crashes and hangs because of how we define
tracked enums.

The reg_enum parameter must be a compile-time constant.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:59 +00:00
Marek Olšák
e0d715c626 radeonsi: set gl_FragCoord to pixel center to fix GLCTS failures
SPI_BARYC_CNTL is moved to the preamble because it's always 0.

We set frag_coord_is_center for the NIR pass to indicate that sample_pos
should be lowered differently.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:58 +00:00
Marek Olšák
9fdd8225c1 radeonsi/ci: add more gfx11 flakes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:58 +00:00
Marek Olšák
3424cdadf5 radeonsi: fix interpolateAt* with non-GL4 ARB_sample_shading
There is no test for this, but it's been broken.

ARB_sample_shading doesn't set fs.uses_sample_shading in shader_info,
which causes us to enter this path to force per-sample interpolation,
but doing so breaks the shader if the PS prolog is used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:57 +00:00
Marek Olšák
65398d571b radeonsi: ignore pipe_rasterizer_state::force_persample_interp
It just indicates that sample shading is enabled, which we were
checking already. The state is redundant.

Just check shader_info::fs::uses_sample_shading. ARB_sample_shading (GL3.3)
doesn't set fs.uses_sample_shading in shader_info (which is for GL4.0), and
that's why we have this codepath that forces per-sample interpolation.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:57 +00:00
Marek Olšák
1ff790a4f8 radeonsi: implement replacement of sample_mask_in with helper_invocation
This just implements it in the PS prolog and LLVM IR (ACO already
implements it), and enables it for monolithic shaders where it's already
implemented in ac_nir_lower_ps_early.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:57 +00:00
Marek Olšák
71e95b373b radeonsi: remove si_shader_info code that is no longer needed
A lot of this info is now derived from shader variant NIR.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:56 +00:00
Marek Olšák
871c619ad4 radeonsi: don't set BASE in si_nir_lower_ps_color_input
Bases are recomputed later, so these values have no effect here.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:56 +00:00
Marek Olšák
e5ee15a42e radeonsi: gather PS inputs from shader variant NIR
This further reduces dependence on si_shader_info.

union si_ps_input_info is added because we don't need usage_mask in there.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:55 +00:00
Marek Olšák
0eaff1ace8 radeonsi: set SHARED_VGPR_CNT for gfx shaders for ACO
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:55 +00:00
Marek Olšák
cbac2e4c75 radeonsi: set SHARED_VGPR_CNT for compute for ACO
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:54 +00:00
Marek Olšák
a962979baa radeonsi: precompute COMPUTE_PGM_RSRC3
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:54 +00:00
Marek Olšák
d1d6e6695e radeonsi: remove ac_shader_config from si_shader_part
we only need num_sgprs and num_vgprs from it

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:53 +00:00
Marek Olšák
988aca159c radeonsi: verify that SPI_PS_INPUT_ENA from LLVM is equal to ACO
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:53 +00:00
Marek Olšák
c61ee0e8fa radeonsi: minor restructuring of si_llvm_compile_shader
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:52 +00:00
Marek Olšák
1c4c883a3b radeonsi: get SPI_PS_INPUT_ENA from shader variant NIR for ACO
All PS lowering that changes, adds, or removes system values based on
the shader key is done first, which is done in ac_nir_lower_ps_early and
other passes, so now we just need to gather them.

This should improve performance for ACO due to fewer VGPRs needed
for optimized shader variants of PS.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:52 +00:00
Marek Olšák
edeb52ce4a radeonsi: split si_fixup_spi_ps_input_config
Extract prolog code into si_set_spi_ps_input_config_for_separate_prolog.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:51 +00:00
Marek Olšák
e58efc072b radeonsi: move spi_ps_input_config functions up
they will be needed here

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:51 +00:00
Marek Olšák
d3a0da555f radeonsi: lower indirect indexing sooner
We need to do this before we gather shader_info because lowering indirect
indexing can trigger more code elimination.

The opts_not_run parameter is removed because it was only needed for array
temps.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:50 +00:00
Marek Olšák
98e46a7e9b radeonsi: use barycentrics from load_point_coord_maybe_flipped
The pass is called sooner because we want to optimize the point_coord
barycentrics in ac_nir_lower_ps_early.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:50 +00:00
Marek Olšák
9e3033e071 radeonsi: move/rewrite PS color input gathering for shader variants
This removes duplicated gathering from 3 places for shader variants,
and adds it where it should be, which is before late optimizations and
late lowering passes, which is where we want it for the radeonsi linker.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:49 +00:00
Marek Olšák
1a2f6cad57 radeonsi: set uses_vmem_load/sampler in get_nir_shaders
It will be done in a different place later, but for now, we need to get
it out of si_update_shader_binary_info because the function will be
removed and PS input gathering will be moved, which will be quite
complicated, but it's needed for having a linker in radeonsi.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:49 +00:00
Marek Olšák
a9e210184b radeonsi: get LS+HS and ES+GS together in get_nir_shader instead of separately
This is a prerequisite for linking merged shaders.

At the beginning of get_nir_shader (renamed to get_nir_shaders), we get
both shaders that are going to be merged, and then we optimize them together
and pass them to LLVM or ACO-specific code as struct si_linked_shaders.

The code setting uses_instance_id is moved because the previous place
doesn't work with this new organization.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:48 +00:00
Marek Olšák
b6f13a0397 radeonsi: split and restructure get_nir_shader
This splits shader variant compilation into the following stages:
* get_input_nir
* run_pre_link_optimization_passes
(not implemented yet: run linking optimizations here)
(not implemented yet: gather shader_info here)
* run_late_optimization_and_lowering_passes

This order is important when we start adding linking optimizations for
shader variants and start getting shader_info from shader variants instead
of input NIR.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:48 +00:00
Marek Olšák
0dfcf5f2f8 radeonsi: reorder NIR passes in get_nir_shader (part 3)
Put passes that optimize the code first, and passes that lower it later.
This will be needed later.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:47 +00:00
Marek Olšák
9f19ad33fa radeonsi: reorder NIR passes in get_nir_shader (part 2)
This will be needed later.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:47 +00:00
Marek Olšák
ad44d7eba0 radeonsi: reorder NIR passes in get_nir_shader (part 1)
Put passes that optimize the code first, and passes that lower it later.
This will be needed later.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:47 +00:00
Marek Olšák
5c874f5930 radeonsi: cosmetic changes in get_nir_shader
si_init_gs_output_info is moved later and is already memset

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:46 +00:00
Marek Olšák
f05021dd2f radeonsi: simplify how the NIR name of shader variants is modified
we don't need to restore the original name

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:46 +00:00
Marek Olšák
36e3f6d9bf radeonsi: set the "first" parameter of si_nir_opts correctly
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:45 +00:00
Marek Olšák
e23ccb6c46 radeonsi: call si_nir_late_opts unconditionally
We always have progress==true (e.g. due to si_nir_lower_abi), so late_opts
is likely to be always true.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:45 +00:00
Marek Olšák
58c91fb8cf radeonsi: add si_nir_shader_ctx holding parameters from si_get_nir_shader
we'll need to pass this structure around

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:44 +00:00
Marek Olšák
3d1886f6c7 radeonsi: call si_init_gs_output_info in si_get_nir_shader
some code reordering is needed

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:44 +00:00
Marek Olšák
d580313929 radeonsi: add load_polygon_stipple_buffer_amd instead of using si_shader_args
We will lower polygon stipple before we have si_shader_args, so we need
an intrinsic to get the buffer descriptor.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:43 +00:00
Marek Olšák
cd3079a1ea radeonsi: remove si_nir_kill_ps_outputs and use ac_nir_lower_ps_early instead
ac_nir_lower_ps_early does the same thing better.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:42 +00:00
Marek Olšák
c5d8100d10 radeonsi: use load_pixel_coord for polygon stipple lowering
We will get shader_info from NIR after this and before si_init_shader_args,
so we need to use system values.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:42 +00:00
Marek Olšák
f156abd2a7 radeonsi: simplify how broadcast_last_cbuf is implemented for PS epilogs
We don't need to look at the framebuffer state and record how many color
buffers to write. Instead, we can deduce which color buffers are enabled
from spi_shader_col_format, which already does the right thing.

So PS epilogs only need a single bool flag that determines whether all
enabled color buffers should be written.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:41 +00:00
Marek Olšák
28e9fca134 radeonsi: don't set the alpha ref user SGPR if alpha test doesn't use it
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:41 +00:00
Marek Olšák
3dcbf743c4 radeonsi: implement replacing frag_coord with pixel_coord at draw time
This adds an option into the prolog key to replace frag_coord.xy with
pixel_coord when sample shading is disabled, which is most of the time.
This reduces the number of input VGPRs.

It's already implement in ac_nir_lower_ps_early for monolithic shaders
and the PS prolog in ACO, so this just implements it for the PS prolog
in LLVM IR.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:40 +00:00
Marek Olšák
8e8eda4089 radeonsi: fix PS prolog not counting used fragcoord VGPRs correctly
Using the used component count is not enough. We need to consider
the component mask because any component can be disabled. This might
fix tests.

This removes the component counting from ac_get_fs_input_vgpr_cnt
and determines the component mask where it's needed.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:40 +00:00
Marek Olšák
67c772c293 radeonsi: get sample positions from user SGPRs instead of memory
This should be faster.

2 user SGPRs contain 8 sample positions, storing 4 bits per coordinate
and extracting them in the shader.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:39 +00:00
Marek Olšák
b3fc49686e ac/nir: clamp vertex color outputs in the right place
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
2025-01-29 07:19:38 +00:00
Marek Olšák
3b78dcec05 radeonsi: disallow compute queues on Raven/Raven2 due to hangs
Fixes: 58b512ddd6 - radeonsi: execute clears at resource allocation using compute instead of gfx
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12310

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33248>
2025-01-29 06:49:43 +00:00
Marek Olšák
30211d0f4a mesa: enable GL name reuse for virgl
I think we only have to disable it for Qemu.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33156>
2025-01-29 06:22:42 +00:00
Friedrich Vock
50e6e3e4ad nir: Add indirect call optimizations
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
ebbb18aeb6 nir: Free liveness info when invalidating metadata
Liveness info can be huge, since with larger shaders it essentially
grows quadratically (linear increase in number of SSA defs *
linear increase in blocks).

Freeing liveness info early helps somewhat mitigate memory usage here.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
9b1f31a615 nir: Add nir_instr_is_before helper
is_instr_between works similarly but requires special-casing w.r.t
the first instruction in a block for the same effect.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
a8ce60eec1 nir: Apply passes to all functions
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
bb40284f76 nir: Add indirect calls
Used to jump to a function referred to by a runtime pointer.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
4432cf0a58 vtn: Set parameter type in glsl_type_add_to_function_params
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Friedrich Vock
26cbb6b933 nir: Add parameter divergence info
Indirect calls may have non-divergent parameters that need to be
explicitly marked as such.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
2025-01-29 04:38:51 +00:00
Valentine Burley
7df869b7c9 zink/ci: Update checksum for Osmos trace on TGL
The checksum for the Osmos trace on TGL has changed, so update it
to reflect the current state of the trace.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Mike Blumenkrantz <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33256>
2025-01-29 04:16:26 +00:00
Valentine Burley
7d66facfda ci: Skip broken PenumbraOverture trace for zink and freedreno
This trace contains generated GL IDs from the time it was recorded,
making it invalid.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Mike Blumenkrantz <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33256>
2025-01-29 04:16:25 +00:00
Daniel Stone
101065642d ci/debian: Upgrade Debian images to LLVM 19
LLVM 15 is pretty old, and notably not supported by either ANGLE nor
Skia anymore. So let's move up to LLVM 19 using packages provided by
LLVM themselves, apart from PPC and ARMv7 which don't have builds.

The Skia build now requires a bunch of new warning exclusions; hopefully
most of these are no longer needed when we can upgrade Skia shortly.

The ci-deb-repo revision has also been bumped to get us a new version of
xtensor which builds with LLVM 19, and a version of spirv-tools which
also works with LLVM 19.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Closes: mesa/mesa#11538
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
55e9fe9d37 ci: Require LLVM_VERSION to be set explicitly
Stop falling back to 15 in random places; make sure it's set clearly
every time we want to use it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
bb01f3ae6c ci: Define LLVM_VERSION as a container property
The version of LLVM in use is defined by the version of LLVM that's been
installed, which is a property of the container. Shift to declaring it
within the container variables, not in random leaf build jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
f5618315f1 ci/fedora: Install which into build image
We use this for a bunch of stuff, so make sure it's installed. Also make
sure the package list remains strictly in alphabetical order.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
d5797f6ae4 ci: Move build containers above test containers
Nothing big, but it is needed to resolve YAML anchors later.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Daniel Stone
f96abf7f1a ci: Remove obsolete compiler-wrapper
We don't actually need this anymore. We were previously using it to find
ccache, but Meson will do this for us. Now that we pass
-Wl,--fatal-warnings, we don't need to pass -Werror to the link stage
either.

This removes two shell execs, one subshell, and one call to each of grep
and printf, per compile.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:28 +00:00
Eric Engestrom
439408229b ci: make linker warnings fatal
... excluding the warning for emitting a LOAD segment with RWX
permissions for libglapi, an issue which has persisted for some time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
4c3d2af001 ci: Disable Werror on wrapped subprojects
Enabling Werror on our code is good, but it's less good on external
projects. Some of the Rust subprojects are now failing due to warnings
exposed by the newer Rust toolchain in Fedora, which we don't care about.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
87809f6236 pipe_loader: Fix pipe_i915 with the dynamic loader
When building for the dynamic loader used by e.g. Clover, pipe_i915 was
the only target failing to declare a driver descriptor. This becomes an
error with more aggressive linkers.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 87392385b5 ("gallium/drm: Define the DRM entrypoints in drm_helper.h")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
52f6503d57 ci: Let rootfs builds run for 2 hours (!)
We now have to do five builds of dEQP: one each for tools, GL, GLES,
Vulkan (release branch), and Vulkan (main).

dEQP is not a quick build, with even the tools build taking ten minutes,
at least three of which go to just pulling the SPIRV-Tools source.

Building all five takes a cumulative 60 minutes (10 tools, 11 GL, 9
GLES, 15 VK release, 13 VK main). That doesn't give us a load of time to
build everything else we need.

Two hours is obviously a completely unreasonable amount of time to spend
doing builds, especially for jobs which shouldn't really exist. But the
yak shave to allow the container jobs to be able to run on non-b2c
hardware has been a long one, and with no big-bang solution turning up
any time soon, we need to be able to actually do rootfs builds.

So, let's do the worst possible thing and go for a gigantic timeout.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
1736ea4ca8 ci: Give much more time to ASan and UBSan jobs
Sitting here trying to get something else done tonight, I watched the
ASan and UBSan jobs, both on AArch64 and x86_64, regularly blow through
their timeouts.

They should be fixed to do less, but this makes them at least succeed in
the meantime.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
51c530a2c3 ci: Slash ASan and UBSan build coverage
Building and linking drivers, Rust code, and tools, takes an inordinate
amount of time with sanitisers. That could be justified if we used the
results to test, but we don't.

Reduce the coverage to get reasonable runtimes back.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
Daniel Stone
be00764d05 ci: Don't run Meson tests in critical-path jobs
Running the Meson tests doesn't take forever, but it does take a
noticeable amount of time.

For jobs in the critical path - like debian-testing and debian-arm64 -
we need them to complete as soon as possible to produce a build for the
hardware tests to consume. Running the tests here lengthens that time,
and introduces more hazard since the tests have previously been prone to
hitting timeouts, requiring the whole job to be retried before we can
proceed. These jobs also have build-only jobs which are not in the
critical path, and can run the tests just as well.

Running the tests under sanitisers is just too slow to deal with in
pre-merge pipelines.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33137>
2025-01-29 03:23:27 +00:00
David Tobolik
49b20a88db rusticl/style: add util for conversion with err
NEW util/conversion.rs

Adds traits `TryFromWithErr` and `TryIntoWithErr` and their
implementation for types with `TryFrom` and `TryInto` traits

former
```
try_into().map_err(|_| CL_OUT_OF_HOST_MEMORY)
try_from(val).map_err(|_| CL_OUT_OF_HOST_MEMORY)
```
can now be written as
```
try_into_with_err(CL_OUT_OF_HOST_MEMORY)
try_from_with_err(val, CL_OUT_OF_HOST_MEMORY)
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33267>
2025-01-29 02:51:21 +00:00
David Tobolik
98f0f6594a rusticl/style: use Arc::clone instead of .clone()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33267>
2025-01-29 02:51:21 +00:00
Job Noorman
f577118fe1 ir3/a7xx: enable delayed src2 read for all cat3 instructions
cat3 instructions read their 3rd src later than their first two srcs.
Pre-a7xx, this was only supported for mad(sh) but on a7xx, it works for
all cat3 instructions.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33183>
2025-01-29 02:19:50 +00:00
Job Noorman
992a6cc050 ir3/a7xx: update delays slots
The delay slots on a7xx are:
- ALU to ALU: 2
- Non-ALU: 5
- cat3 src2 read: 1

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33183>
2025-01-29 02:19:50 +00:00
Job Noorman
5460be5d33 ir3: make delay slots a compiler property
They changed on a7xx so we want to make it configurable.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33183>
2025-01-29 02:19:50 +00:00
Job Noorman
2c7c62dfd9 ir3: add helper to calculate src read delay
cat3 instructions read their 3rd src later than their first two srcs.
This was implemented in two different places: once for scheduling and
once for legalization. Extract this logic in a new helper and also add
similar logic for gat/swz there (which the scheduling logic failed to
account for).

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33183>
2025-01-29 02:19:50 +00:00
Job Noorman
e7ac1094f6 ir3: rematerialize preamble defs in block dominated by sources
Preamble defs were rematerialized at the end of the preamble. However,
when some of the sources were defined inside control flow, this would
lead to these sources not dominating their use. Fix this by finding the
block that is dominated by all sources and inserting the new instruction
there.

Also make sure we only de-duplicate instructions if the new instruction
is dominated by the existing one.

Fixes a NIR validation error in Devil may cry 5.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fdfe86aa52 ("ir3: Expand preamble rematerialization")
Fixes: 6a744ddebc ("ir3: Initial support for pushing globals with ldg.k")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33270>
2025-01-29 01:45:59 +00:00
Connor Abbott
5f3cad0026 tu: Add missing assignment to shared_viewport
This was accidentally deleted when rewriting to use common Vulkan
dynamic state. This meant we wouldn't correctly fall back when someone
accidentally used FDM together with multiple viewports.

Fixes: 97da0a7734 ("tu: Rewrite to use common Vulkan dynamic state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33241>
2025-01-29 01:17:48 +00:00
Job Noorman
1adf2c9d7c ir3: schedule alias.rt at the end of the preamble
Scheduling an alias.rt right before an alias.tex causes a GPU hang.
Follow the blob and schedule all alias.rt at the end of the preamble to
prevent this from happening.

Fixes a hang in Borderlands 3 on medium or higher graphics settings.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 0aa9678d4d ("ir3: add support for alias.rt")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33238>
2025-01-29 00:46:22 +00:00
Alyssa Rosenzweig
3bfcc4f323 clc,libagx: automatically set lang version
bit less meson cargocult.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33242>
2025-01-28 23:01:32 +00:00
Alyssa Rosenzweig
9f460eadab clc,libagx: drop --in for mesa_clc
just accept the arguments as-is. this matches how gcc/clang actually work
and simplifies the meson.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33242>
2025-01-28 23:01:32 +00:00
Alyssa Rosenzweig
164a161279 meson: project-wide fs = import('fs')
reduces a bit of boilerplate.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33242>
2025-01-28 23:01:32 +00:00
Corentin Noël
61626296f2 virgl/ci: Re-enable virgl-traces
This reverts commit 3a7737ffb5

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33265>
2025-01-28 21:07:09 +00:00
Samuel Pitoiset
18c7eafcdc radv: fix programming mip level for TILED_SUB_WINDOWS on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33252>
2025-01-28 20:32:11 +00:00
Samuel Pitoiset
7c949f1760 radv: fix programming pitches for LINEAR_SUB_WINDOW on GFX12
GFX12 supports up to 64k images.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33252>
2025-01-28 20:32:11 +00:00
Ruijing Dong
1a942f53cc radeonsi/vcn: center mv map buffer changed in vcn5.x
center mv map buffer size changed on vcn5.x, please be aware
that vcn5.0 will not enable 2pass untill vcn5.x.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33215>
2025-01-28 19:50:16 +00:00
Lucas De Marchi
1bd6a2efe1 intel/tools: Fix Xe KMD error dump parser
Xe KMD originally put the exec queue snapshot in the wrong topic,
XE_TOPIC_GUC_CT. Add it to the right one while still keeping a fallback
to the previous place so the new version of the tool is able to parse
both before and after the kernel change.

Based on previous version by José Roberto de Souza <jose.souza@intel.com>
at https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32617

Cc: stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33177>
2025-01-28 19:11:26 +00:00
Pavel Ondračka
220590f41a r300: fix memory leak in contant remaping
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
f00f08c02d r300: remove support for register arrays from nir_to_rc
Backend can't handle it and no app which we can reasonably run uses
this anyway AFAIK.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
89c06ea0f6 r300: get rid of some texture fixups
Textures opcodes can't read from the contant registers, however we can
just handle this fine in the native swizzle pass. Others like saturate
for tex instructions) can't happen anyway since we swithed to nir_to_tgsi
long time ago. However, keep the asserts just to be safe.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
47207dcb0b r300: get rid of the register rename pass
The pass tried to convert shaders to a SSA-like form. However since
we no longer allocate registers in NIR, and we try hard to keep the
SSA-like form during the later passes, this is now superfluous.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
c45f02461c r300: don't allocate fs registers when translating from NIR
So we can get the ssa-like form right away and we don't have to generate
it again with the register rename pass later.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
0e9b90dcf4 r300: use ssa-like form for backend texture lowering
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
ca70270a5e r300: add some more nir cleanup compiler passes
We need this to prevent some regressions in the later commits.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
e832bc1ae5 r300: use ssa-like form for gl_FragCoord transformation
Lots of backend code will be simpler if we have ssa-like (as much as we
can have with vec4), so just don't reuse registers here.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
14fe3e9886 r300: delete backend shadow lowering code
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
d1c7244b6f r300: reswizzle some shadow texture calculations to use w channel
Prevents shader-db regression, since NIR puts just everything to x and the
pair scheduling is not smart enough to fix it later, espetially after
presubtract happens.

Together with the previous patches that move the shadow lovering to NIR
this results in the following shader-db stats:

RV530:
total instructions in shared programs: 129598 -> 128697 (-0.70%)
instructions in affected programs: 19001 -> 18100 (-4.74%)
helped: 124
HURT: 9
total presub in shared programs: 8554 -> 8314 (-2.81%)
presub in affected programs: 1099 -> 859 (-21.84%)
helped: 17
HURT: 50
total temps in shared programs: 17514 -> 17000 (-2.93%)
temps in affected programs: 1368 -> 854 (-37.57%)
helped: 45
HURT: 18
total cycles in shared programs: 191286 -> 190593 (-0.36%)
cycles in affected programs: 32369 -> 31676 (-2.14%)
helped: 110
HURT: 29

RV410:
total instructions in shared programs: 112805 -> 112618 (-0.17%)
instructions in affected programs: 7089 -> 6902 (-2.64%)
helped: 65
HURT: 21
total presub in shared programs: 3244 -> 3314 (2.16%)
presub in affected programs: 228 -> 298 (30.70%)
helped: 7
HURT: 47
total temps in shared programs: 18163 -> 18138 (-0.14%)
temps in affected programs: 710 -> 685 (-3.52%)
helped: 36
HURT: 19
total cycles in shared programs: 169530 -> 169369 (-0.09%)
cycles in affected programs: 11304 -> 11143 (-1.42%)
helped: 63
HURT: 27

The stats are a bit less awesome for Rv410, since it can't run the heavy
Unigine Tropics shaders where this helps the most due to the TEX
indirection limits.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
296da387c0 r300: move shadow lowering to NIR
This means we now do fragment shader-variants at the NIR level and we
therefore need to run nir_to_rc translation later during the shader
variant creation.

This is a temporary instruction count as well as registers count
regression, due to NIR putting everything to x instead of w, this is
fixed in the next commit which also shows some nice shader-db stats
improvements in total.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Pavel Ondračka
ea41ecd130 r300: fix presubtract assert
We only care that the negates of the relevant components are the same.
Specifically the assert would incorectly trigger for code like this
ADD temp[3].x, 1.250000 (0x3a).-x___, -const[0].x___;

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33066>
2025-01-28 17:42:53 +00:00
Georg Lehmann
b23ff87db4 aco/sched_ilp: base latency and issue cycles on aco_statistics
This matters for trans and scalar fpu instructions.

Foz-DB GFX1150:
Totals from 53894 (67.90% of 79377) affected shaders:
Instrs: 38528421 -> 38481337 (-0.12%); split: -0.16%, +0.04%
CodeSize: 200206016 -> 200023916 (-0.09%); split: -0.12%, +0.03%
Latency: 265011734 -> 264303762 (-0.27%); split: -0.28%, +0.02%
InvThroughput: 53804490 -> 53696097 (-0.20%); split: -0.21%, +0.01%
VClause: 736996 -> 736988 (-0.00%); split: -0.00%, +0.00%
SClause: 1118494 -> 1118474 (-0.00%); split: -0.01%, +0.01%
VALU: 21982349 -> 21982358 (+0.00%); split: -0.00%, +0.00%

Foz-DB Navi31:
Totals from 50791 (63.99% of 79377) affected shaders:
Instrs: 37511862 -> 37495712 (-0.04%); split: -0.11%, +0.07%
CodeSize: 197990892 -> 197925104 (-0.03%); split: -0.09%, +0.06%
Latency: 261929261 -> 261273534 (-0.25%); split: -0.27%, +0.01%
InvThroughput: 43978329 -> 43921618 (-0.13%); split: -0.14%, +0.01%
VClause: 727683 -> 727695 (+0.00%); split: -0.00%, +0.00%
SClause: 1092527 -> 1092544 (+0.00%); split: -0.01%, +0.01%
VALU: 22646553 -> 22646566 (+0.00%)

Foz-DB Navi21:
Totals from 43899 (55.30% of 79377) affected shaders:
Instrs: 35649081 -> 35649110 (+0.00%); split: -0.00%, +0.00%
CodeSize: 192336212 -> 192337276 (+0.00%); split: -0.00%, +0.00%
Latency: 270621538 -> 270221431 (-0.15%); split: -0.16%, +0.02%
InvThroughput: 66757841 -> 66715918 (-0.06%); split: -0.07%, +0.01%
VClause: 734884 -> 734867 (-0.00%); split: -0.01%, +0.01%
SClause: 1072956 -> 1072951 (-0.00%); split: -0.01%, +0.01%

Foz-DB Vega10:
Totals from 52687 (83.60% of 63026) affected shaders:
Instrs: 24595280 -> 24595693 (+0.00%); split: -0.01%, +0.01%
CodeSize: 127199836 -> 127200164 (+0.00%); split: -0.01%, +0.01%
Latency: 252281578 -> 252497934 (+0.09%); split: -0.03%, +0.12%
InvThroughput: 136551527 -> 136577609 (+0.02%); split: -0.01%, +0.03%
VClause: 536798 -> 536718 (-0.01%); split: -0.04%, +0.03%
SClause: 819978 -> 819693 (-0.03%); split: -0.04%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33222>
2025-01-28 17:00:45 +00:00
Georg Lehmann
068f9b51de aco/sched_ilp: use more realistic memory latencies
The last commit changes order of instructions more aggressively,
and because the memory load latencies here are wastly underestimated,
it ruins some of the work of pre-RA memory scheduling.
With the new heuristic large latency values work fine, so use them.

Foz-DB GFX1150:
Totals from 71343 (89.88% of 79377) affected shaders:
Instrs: 41627671 -> 41915029 (+0.69%); split: -0.01%, +0.70%
CodeSize: 215901308 -> 217051132 (+0.53%); split: -0.01%, +0.54%
Latency: 288714439 -> 286556159 (-0.75%); split: -0.76%, +0.02%
InvThroughput: 55834139 -> 55645301 (-0.34%); split: -0.35%, +0.01%
VClause: 829066 -> 828984 (-0.01%); split: -0.04%, +0.03%
SClause: 1237366 -> 1237448 (+0.01%); split: -0.02%, +0.02%
VALU: 23643291 -> 23643292 (+0.00%); split: -0.00%, +0.00%

Foz-DB Navi31:
Totals from 70576 (88.91% of 79377) affected shaders:
Instrs: 40928125 -> 41211820 (+0.69%); split: -0.01%, +0.70%
CodeSize: 215770956 -> 216897948 (+0.52%); split: -0.00%, +0.53%
Latency: 288139802 -> 286038405 (-0.73%); split: -0.75%, +0.02%
InvThroughput: 46391629 -> 46300275 (-0.20%); split: -0.20%, +0.01%
VClause: 829987 -> 829997 (+0.00%); split: -0.02%, +0.02%
SClause: 1229345 -> 1229425 (+0.01%); split: -0.02%, +0.02%
VALU: 24515334 -> 24515335 (+0.00%)

Foz-DB Navi21:
Instrs: 45512672 -> 45527322 (+0.03%); split: -0.01%, +0.04%
CodeSize: 244254716 -> 244311472 (+0.02%); split: -0.01%, +0.03%
Latency: 314034443 -> 311473726 (-0.82%); split: -0.83%, +0.01%
InvThroughput: 73373201 -> 73220438 (-0.21%); split: -0.21%, +0.00%
VClause: 914819 -> 914853 (+0.00%); split: -0.02%, +0.02%
SClause: 1283331 -> 1283302 (-0.00%); split: -0.01%, +0.01%

Foz-DB Vega10:
Totals from 41908 (66.49% of 63026) affected shaders:
Instrs: 22770415 -> 22779136 (+0.04%); split: -0.01%, +0.04%
CodeSize: 118195752 -> 118230540 (+0.03%); split: -0.00%, +0.03%
Latency: 242119940 -> 239665380 (-1.01%); split: -1.02%, +0.01%
InvThroughput: 131459884 -> 131182979 (-0.21%); split: -0.21%, +0.00%
VClause: 493311 -> 493215 (-0.02%); split: -0.05%, +0.03%
SClause: 758814 -> 758761 (-0.01%); split: -0.02%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33222>
2025-01-28 17:00:45 +00:00
Georg Lehmann
ce897b336e aco/sched_ilp: rename priority to wait_cycles
And invert.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33222>
2025-01-28 17:00:44 +00:00
Georg Lehmann
819938d2fa aco/sched_ilp: new latency heuristic
The main train of thought is that we should consider latency after
the write was scheduled. This means we rely a lot less on the input
order of instructions for good results.

Foz-DB GFX1150:
Totals from 75606 (95.25% of 79377) affected shaders:
Instrs: 43274326 -> 42129011 (-2.65%); split: -2.65%, +0.01%
CodeSize: 223049932 -> 218465796 (-2.06%); split: -2.06%, +0.00%
Latency: 297614199 -> 292317054 (-1.78%); split: -1.84%, +0.06%
InvThroughput: 57020160 -> 56336213 (-1.20%); split: -1.21%, +0.02%
VClause: 841775 -> 841861 (+0.01%); split: -0.06%, +0.07%
SClause: 1253516 -> 1253798 (+0.02%); split: -0.03%, +0.05%
VALU: 23893837 -> 23893828 (-0.00%); split: -0.00%, +0.00%

Foz-DB Navi31:
Totals from 75606 (95.25% of 79377) affected shaders:
Instrs: 42717592 -> 41531696 (-2.78%); split: -2.78%, +0.00%
CodeSize: 223582476 -> 218866196 (-2.11%); split: -2.11%, +0.00%
Latency: 297736383 -> 292450493 (-1.78%); split: -1.83%, +0.05%
InvThroughput: 47298730 -> 46934084 (-0.77%); split: -0.78%, +0.01%
VClause: 844982 -> 844892 (-0.01%); split: -0.07%, +0.06%
SClause: 1248433 -> 1248693 (+0.02%); split: -0.03%, +0.05%
VALU: 24819703 -> 24819704 (+0.00%); split: -0.00%, +0.00%

Foz-DB Navi21:
Totals from 76224 (96.03% of 79377) affected shaders:
Instrs: 46019515 -> 46015691 (-0.01%); split: -0.03%, +0.03%
CodeSize: 246992544 -> 246977404 (-0.01%); split: -0.03%, +0.02%
Latency: 324647457 -> 318661132 (-1.84%); split: -1.90%, +0.05%
InvThroughput: 74834800 -> 74269723 (-0.76%); split: -0.76%, +0.01%
VClause: 927601 -> 927579 (-0.00%); split: -0.04%, +0.04%
SClause: 1302666 -> 1303178 (+0.04%); split: -0.02%, +0.06%

Foz-DB Vega10:
Totals from 60142 (95.42% of 63026) affected shaders:
Instrs: 25117688 -> 25098175 (-0.08%); split: -0.10%, +0.02%
CodeSize: 129847464 -> 129769456 (-0.06%); split: -0.08%, +0.02%
Latency: 261606546 -> 262407481 (+0.31%); split: -0.12%, +0.43%
InvThroughput: 138422594 -> 138500401 (+0.06%); split: -0.03%, +0.09%
VClause: 555424 -> 555321 (-0.02%); split: -0.11%, +0.09%
SClause: 851219 -> 851620 (+0.05%); split: -0.03%, +0.08%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33222>
2025-01-28 17:00:44 +00:00
Erik Faye-Lund
0f13a42657 gallium/aux: do not assert on map-failures
The texture_map functions can fail, due to for instance address-space
exhaustion during mmap calls. Handling this by asserting turns this
into a fatal error when doing debug builds, which might not be what
users want.

Instead, let's allow this to fail. This is alredy what we do for
util_clear_color_texture and util_clear_render_target.

While we're at it, let's add some breadcrumbs to applications here, by
emitting an error at the same time. We should really consider returning
a proper pipe_error here instead, but that requires changing a lot of
function signatures, as this function are used as an implementation of
p_context::resource_copy_region()... So let's save that for later.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32431>
2025-01-28 16:17:55 +00:00
Valentine Burley
d195e411fa ci: Uprev VKCTS to 1.4.1.1
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
618bd07809 panvk/ci: Skip waived tests
The tests are waived in ARM waiver 4936 (see waivers.xml), so
running them in CI is unnecessary.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
781a32d78e pan/ci: Properly wire up DRIVER_NAME
The DRIVER_NAME variable is used to locate the DRIVER_NAME-skips.txt
file. It was not used for panfrost, so remove the three places where
it was set, assign it to panvk, and add a panvk-skips.txt file.
Additionally, properly track changes to this file.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
f3cf156ac9 ci: Uprev VKCTS to 1.4.1.0
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
df5c54442b anv/ci: Move a test to common anv-skips
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic
is problematic on TGL as well, so move it to the common anv-skips.txt.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Valentine Burley
1a340177ba turnip/ci: Bump the number of tests per group for a630-vk-asan
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Since the CTS uprev did not introduce any new leaks that caused
the entire caselist to get marked as fails, increasing the number
of tests per group is considered safe and improves efficiency.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32817>
2025-01-28 15:01:00 +00:00
Eric Engestrom
dd2629b8b8 radv,lvp: fix url to VkAabbPositionsKHR docs
The current URL redirect to a page that does not contain any information
about this struct, so let's fix that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33159>
2025-01-28 14:28:59 +00:00
Eric Engestrom
fa67ab5525 anv,gfxstream,panvk,zink: update urls to vulkan docs
This is simply following the redirects the same way the browser does.
The new pages were manually verified to still contain the corresponding
information.

For URLs where this was not the case, see the next commits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33159>
2025-01-28 14:28:58 +00:00
Eric Engestrom
ecc128e330 docs: update url to vulkan features & extensions
Fixes the nightly linkcheck.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33159>
2025-01-28 14:28:58 +00:00
Juan A. Suarez Romero
09653e51f3 ci: take igalia farm offline
Electricity issues.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33260>
2025-01-28 14:25:24 +00:00
Samuel Pitoiset
50a0d1fd65 radv: disable VK_KHR_cooperative_matrix on GFX12
I have it mostly but it won't be ready in time for 25.0 and the changes
are probably too large for a backport.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33257>
2025-01-28 13:27:55 +00:00
Samuel Pitoiset
9d528b9966 radv: disable video support on GFX12
VCN 5.0+ isn't yet implemented.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33253>
2025-01-28 12:09:43 +00:00
Karmjit Mahil
b9da3963c7 freedreno/replay: Define __user for msm_kgsl
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12515
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33196>
2025-01-28 11:25:10 +00:00
Erik Faye-Lund
8dae603431 panfrost: in-place map/unmap shouldn't grow
If we're doing in-place map/unmap of a tiled resource, that shouldn't
cause the size of the resource to grow. So let's drop this needless
complexity, and just assert this assumption instead.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
b60ee4251e panfrost: propagate errors from panfrost_batch_create_bo
Without this, we just assert and/or crash because the allocation fails.
This should allow us to survive a bit longer.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
76760ce610 panfrost: propagate allocation scratchpad allocation errors
We don't currently return NULL from panfrost_batch_create_bo, but that
is about to change. So let's prepare the scratchpad-related call-sites
for this.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
29e6c74f02 panfrost: unify emit_tls and emit_fbd
Most of these functions are the same, let's pull that out to a helper to
avoid repeating ourselves.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
f7e16859a9 panfrost: handle allocation errors when afbc-packing
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
Erik Faye-Lund
801933acf9 panfrost: mark helper as static
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32724>
2025-01-28 10:57:06 +00:00
David Rosca
2729b3696c frontends/va: Fix decoding VC1 streams with multiple slices
VC1 has different start code for SLICE which we need to use.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12525
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33221>
2025-01-28 09:38:45 +00:00
Tapani Pälli
e28f24fbf2 mesa/st: take pixelmaps in to account in drawpixels cache
Otherwise we might use cache item with different mapping.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12492
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33191>
2025-01-28 08:50:51 +00:00
Samuel Pitoiset
c172f6ef01 radv: fix disabling logic op for srgb/float formats when blending is enabled
The Vulkan spec says:
    "If logicOpEnable is VK_TRUE, then a logical operation selected by
     logicOp is applied between each color attachment and the
     fragment’s corresponding output value, and blending of all
     attachments is treated as if it were disabled. Any attachments
     using color formats for which logical operations are not supported
     simply pass through the color values unmodified."

When logic op and blending are both enabled, logic op takes precedence
and values should be passed through unmodified. Also RB+ shouldn't
have any effects when blending is disabled.

Fixes new VKCTS coverage dEQP-VK.pipeline.*.logic_op_na_formats.*.

Fixes: 03b037a0e3 ("radv: disable logic op for float/srgb formats")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33235>
2025-01-28 08:19:15 +00:00
Samuel Pitoiset
d857198c87 radv/ci: update descriptor buffer skipped tests
More subsets have been added (eg. sparse).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33237>
2025-01-28 07:49:54 +00:00
Lionel Landwerlin
a2c19471fe intel: fix dependency for internal CL shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: db11165c07 ("intel/cl: switch to SPIRV as shader storage")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33233>
2025-01-28 07:19:58 +00:00
Faith Ekstrand
b708e43504 nvk: Set a command buffer error if pushbuf alloc fails
This case is super unlikely (nearly impossible in practice) but we
should set the command buffer error if it happens.

Cc: stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32936>
2025-01-28 04:25:06 +00:00
Mel Henning
96131df213 nak: Fix a spelling error
I'm guessing this was a bad find/replace

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33247>
2025-01-28 02:59:29 +00:00
Mel Henning
b6b1021303 nak: Return VK_ERROR_UNKNOWN on assertion failure
Previously, unwinding would abort the process when it reached the FFI
boundary. Instead, catch panics and report them to the client. The
default panic handler still runs and prints the assertion failure to
stderr.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33247>
2025-01-28 02:59:29 +00:00
Caio Oliveira
2b6437a3f4 intel/brw: Remove unused enum
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33251>
2025-01-28 02:17:17 +00:00
Caio Oliveira
0e1bb2f70e intel/brw: Use brw prefix instead of namespace in dynamic_msaa_flags()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33227>
2025-01-28 00:48:38 +00:00
Pavel Ondračka
dead324a8f etnaviv: always clamp shadow sampler comparison reference value
There is no support for floating point depth formats in etnaviv,
so the clamping can be enabled unconditionally.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33140>
2025-01-28 00:01:07 +00:00
Pavel Ondračka
ea6ccb8628 nir: add support for clamping in nir_lower_tex_shadow
From OpenGL 4.6 - 8.23.1 Depth Texture Comparison Mode

Let Dt be the depth texture value and St be the stencil index
component. If there is no stencil component, the value of St is
undefined. Let Dref be the reference value, provided by the shader’s
texture lookup function. If the texture’s internal format indicates
a fixed-point depth texture, then Dt and Dref are clamped to the
range [0, 1]; otherwise no clamping is performed.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33140>
2025-01-28 00:01:07 +00:00
Mel Henning
9091bb9fab nvk: Fix an assertion in nvk_slm_area_ensure
I ran into this assert multiple times in Civ 6 (DX12 mode) on proton

Fixes: 6935fe5c68 ("nvk: Rework TLS/SLM and image/sampler table handling")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33147>
2025-01-27 23:02:15 +00:00
Friedrich Vock
767737536e nir,vtn: Add return info to parameters
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33246>
2025-01-27 22:21:19 +00:00
Friedrich Vock
3321a56d1d nir: Serialize all parameter attributes
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33246>
2025-01-27 22:21:19 +00:00
Alyssa Rosenzweig
54879582b4 nir: fix O(N^2) behaviour in nir_remove_dead_variables
..where N = # of functions in the shader. We were accidentally reprocessing the
whole shader for every function impl. Noticed when reading a vtn_bindgen2
profile.

We elect to port the relevant part of the pass to instrctions_pass which fixes
the perf problem while deleting a pile of code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33245>
2025-01-27 21:40:49 +00:00
David Rosca
8357ef588f frontends/va: Unlock driver mutex for SyncSurface/Buffer fence wait
Only keep context mutex locked while waiting for fence.

This fixes issue with multi-threaded use of VAAPI where SyncSurface
and SyncBuffer would block all contexts, even those used in different
threads. The issue exists for all API calls, however in most cases this
is not a big deal as most calls will return fast, but sync is expected
to take up to tens of ms.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:14 +00:00
David Rosca
d5c1d2faa8 frontends/va: Add context mutex
For now only used to protect context->decoder.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:14 +00:00
David Rosca
d2b1192257 gallium/vl: Don't flush in vl_compositor yuv_deint and rgb_to_yuv
Instead let the callers do it, same as other vl_compositor functions.

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:14 +00:00
David Rosca
0f20a3a4f1 frontends/va: Add surface pipe_fence for vl_compositor rendering
Wait on it in SyncSurface. Fixes sync issues when using surfaces from
processing context (shader path) in external APIs (eg. Vulkan interop).

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:14 +00:00
David Rosca
d4a6a22ef4 frontends/va: Remove vlVaBuffer derived_image_buffer
It's not used anymore.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:13 +00:00
David Rosca
faa5512464 frontends/va: Don't flush before resource_get_handle
resource_get_handle will flush if needed.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:13 +00:00
David Rosca
54dbef9377 frontends/va: Implement QuerySurfaceStatus as SyncSurface with 0 timeout
We only support ready and rendering status, so this is equivalent to
SyncSurface with 0 timeout.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33165>
2025-01-27 20:56:13 +00:00
Thomas H.P. Andersen
84b660b922 nvk: follow naming convention for devices
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32765>
2025-01-27 20:32:05 +00:00
Mike Blumenkrantz
4e1b18178b aco: exclude novalidateir from codegen flags
this otherwise bricks caching

cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33239>
2025-01-27 19:15:47 +00:00
Caio Oliveira
a4afb81729 intel/brw: Use brw prefix for some schedule instructions identifiers
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33145>
2025-01-27 18:32:41 +00:00
Mike Blumenkrantz
015eda4a41 zink: deduplicate VkDevice and VkInstance
it's illegal to mix and match objects between different VkDevices even
if the creation params are identical, and this can cause issues on some
drivers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33204>
2025-01-27 17:31:02 +00:00
Mauro Rossi
a1333d60e9 android: remove shared-glapi building rules
Changes required after commit 44bda7c2

Fixes the following building error:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/libglapi_intermediates/libglapi.so
...
'out/target/product/x86_64/obj/MESON_MESA3D/install/usr/local/lib/libglapi.so': No such file or directory

Fixes: 44bda7c2 ("dri: put shared-glapi into libgallium.*.so, remove the remap table to reduce GL dispatch overhead")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33224>
2025-01-27 17:20:17 +00:00
Igor Torrente
d4faef8f0b NVK: Enable RW DMA-BUF export
Venus need mmap DMA-BUF as rw to implement some things internaly.
This patch allows NVK DMA-BUF export to be mmaped as RW.

cc: mesa-stable

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33203>
2025-01-27 16:50:40 +00:00
Samuel Pitoiset
0f5bd032eb ci: update VKCTS main to a9988483c0864d7190e5e6264ccead95423dfd00
RADV is the only driver using VKCTS main.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <None>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33186>
2025-01-27 13:50:01 +00:00
Lionel Landwerlin
74f57d7267 meson: required SPIRV-Tools LLVM workaround on LLVM17+
Otherwise, compiling some of the shaders in src/intel/shaders, we can
hit the following message from our internal CLC glue code :

   "SPIRV-Tools doesn't contain https://github.com/KhronosGroup/SPIRV-Tools/pull/5534"

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: db11165c07 ("intel/cl: switch to SPIRV as shader storage")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33234>
2025-01-27 13:16:27 +00:00
Rhys Perry
cdae225243 nir/divergence: assume all instructions are loop invariant if no continues
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32998>
2025-01-27 12:40:14 +00:00
Georg Lehmann
df1de388a3 aco/sched_ilp: reorder VINTRP
VINTRP(gfx6-gfx10.3) is mostly just VALU, but we treated it like memory
instructions as an afterthought. This had issues as VINTRP was never reordered
with itself, or other memory instructions. Reordering VINTRP in clauses
increases ILP. We don't really need collect_clause_dependencies for VINTRP
either, because they ususally have the same dependencies already. That means
we can still form VINTRP clauses by selecting preferably VINTRP after a
previous one.

Foz-DB Navi21:
Totals from 34184 (43.16% of 79206) affected shaders:
Instrs: 18811270 -> 18812046 (+0.00%); split: -0.01%, +0.02%
CodeSize: 103627276 -> 103630056 (+0.00%); split: -0.01%, +0.01%
Latency: 188379364 -> 187936731 (-0.23%); split: -0.27%, +0.03%
InvThroughput: 42600163 -> 42590608 (-0.02%); split: -0.03%, +0.00%
VClause: 378960 -> 378912 (-0.01%); split: -0.02%, +0.00%
SClause: 727560 -> 720573 (-0.96%); split: -1.08%, +0.12%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Georg Lehmann
45ccd6487f aco/sched_ilp: only remove WaW/WaR for inter clause dependencies
Direct RaW shouldn't be removed, because the clause is split by a wait anyway.

Foz-DB Navi21:
Totals from 52 (0.07% of 79206) affected shaders:
Instrs: 1603523 -> 1603485 (-0.00%); split: -0.00%, +0.00%
CodeSize: 8223048 -> 8222788 (-0.00%)
Latency: 9741674 -> 9738884 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 2322621 -> 2322010 (-0.03%); split: -0.03%, +0.00%
SClause: 31325 -> 31320 (-0.02%); split: -0.02%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Georg Lehmann
4b332afb32 aco/sched_ilp: add dependencies of later clause instrs more aggressively
Foz-DB GFX1150:
Totals from 22246 (28.03% of 79377) affected shaders:
Instrs: 22689053 -> 22684012 (-0.02%); split: -0.06%, +0.03%
CodeSize: 117622416 -> 117603292 (-0.02%); split: -0.04%, +0.03%
Latency: 182725630 -> 182702465 (-0.01%); split: -0.06%, +0.05%
InvThroughput: 37963256 -> 37956961 (-0.02%); split: -0.03%, +0.02%
VClause: 471019 -> 467248 (-0.80%)
SClause: 592620 -> 590034 (-0.44%); split: -0.44%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Georg Lehmann
ea514e9385 aco/sched_ilp: continue open clauses
Foz-DB GFX1150:
Totals from 13789 (17.37% of 79395) affected shaders:
Instrs: 16567395 -> 16570832 (+0.02%); split: -0.03%, +0.05%
CodeSize: 85737492 -> 85751072 (+0.02%); split: -0.02%, +0.04%
Latency: 140988872 -> 140831767 (-0.11%); split: -0.12%, +0.01%
InvThroughput: 29639206 -> 29614890 (-0.08%); split: -0.09%, +0.00%
VClause: 347065 -> 343779 (-0.95%); split: -0.96%, +0.01%
SClause: 424881 -> 418657 (-1.46%); split: -1.48%, +0.02%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Georg Lehmann
997ea2e273 aco: update is_dual_issue_capable for gfx11.5+
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33111>
2025-01-27 11:59:45 +00:00
Rhys Perry
e18e293e6c aco: don't use divergence information for most ALU defs
If one of the sources are divergent but all are SGPRs, then this can
cause issues (for example, imul with two SGPR sources and a VGPR definition).

No fossil-db changes (navi21)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12454
Backport-to: 24.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32997>
2025-01-27 10:48:07 +00:00
Antonio Ospite
cd5c135349 freedreno/meson: sort list of options passed to get_supported_arguments()
Sort the list of compiler options passed to get_supported_arguments(),
this also makes it easier to spot and remove duplicates.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33209>
2025-01-27 09:09:38 +00:00
Antonio Ospite
38c0ed5fc4 freedreno/meson: remove C++ cross-build arguments HACKs
After the fix in commit b016f218fb (ci/android: fix meson C++
cross-compiler argument detection, 2025-01-14) the cross-build meson
hacks should not be necessary anymore for the CI builds to pass.

Remove the hacks making sure that the removed arguments are all in the
regular list of arguments passed through cpp.get_supported_arguments()

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33209>
2025-01-27 09:09:38 +00:00
Samuel Pitoiset
ce3a137892 radv: fix the number of drm modifier planes for DCC on GFX12
It's always 1 plane because DCC isn't allocated from the userspace
driver.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33213>
2025-01-27 08:44:48 +00:00
Samuel Pitoiset
cd31a61fda radv: fix an assertion about DCC and modifier on GFX12
radv_image_has_dcc() should always returns FALSE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33213>
2025-01-27 08:44:48 +00:00
Samuel Pitoiset
48d199f3dc ac/gpu_info: add gfx12_supports_display_dcc
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33212>
2025-01-27 08:08:15 +00:00
Lucas Stach
dea4b46f21 etnaviv: hwdb: fix lookup of GC3000 in i.MX6QP
For whatever reason NXP decided to call the GC3000 in the i.MX6QP a
GC2000+. This being a lie is marked in the IP core by the upper half
of the revision register being all ones. The kernel driver already
fixes the model and revision when it encounters this core, but this
breaks matching in the HWDB, which uses the bogus model/rev from the
core.

Revert the fixup done by the kernel for the lookup in the HWDB.

Fixes: 2192e620bb ("etnaviv: hwdb: Add etna_query_feature_db(..)")
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/33223>
2025-01-26 20:32:04 +00:00
Alyssa Rosenzweig
f0e3fe195f nir/lower_robust_access: do not preserve control flow
we insert if's, which dirties control flow metadata. caught by the new metadata
validation blowing up.

Cc: mesa-stable
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33216>
2025-01-26 13:54:08 -05:00
Mel Henning
4ab5f0240a nir: Update num_blocks in sort_unstructured_blocks
Cc: mesa-stable
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33219>
2025-01-26 12:52:59 -05:00
Mel Henning
6bd1d12137 nak: lower_load_ssbo_descriptor modifies cf
Cc: mesa-stable
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33219>
2025-01-26 12:52:53 -05:00
Mel Henning
78911ae635 nir_validate: Handle unstructured control flow
in validate_ssa_dominance. NAK was hitting an assertion in the
structured iterator because it lowers to unstructured control flow.

Fixes: 0eb5f66660 ("nir/validate: validate ssa dominance by default")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12524
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33219>
2025-01-26 12:52:47 -05:00
Lucas Stach
14ccd5d945 etnaviv: allow more constants in unified uniform mode
In unified uniform mode the constant memory is dynmically partitioned
between VS and FS, which allows to use far more FS constants than
currently supported with the fixed split when VS constant usage is low.
Limit computation taken from the Vivante kernel driver.

Fixes dEQP-GLES2.functional.uniform_api.random.79 on GPUs with
unified uniform support.

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/32983>
2025-01-26 12:59:20 +00:00
Lucas Stach
fdaa216c5d etnaviv: dynamically partition the constant memory in unfied uniform mode
Unified uniform mode allows to dynamically partition the constant memory
by specifying the start of VS and FS constants within the memory area. Use
this to place the FS uniforms directly behind the VS uniforms, potentially
making more space available to FS uniforms.

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/32983>
2025-01-26 12:59:20 +00:00
Marek Olšák
61e289d0ca nir/opt_varyings: handle user barycentrics
This failed an assertion because the barycentric src wasn't an intrinsic.

v2: also do it in backward_inter_shader_code_motion

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
f7e3689fe1 ac/nir: lower sample_pos to load_sample_positions_amd when frag_coord is center
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
0a228dfef2 ac/nir: compute ddx/ddy for barycentric_at_offset at the beginning of shaders
to make it work after terminate (discard).

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
f98613d47c aco: implement replacement of sample_mask_in with helper_invocation in PS prolog
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
a842f198d7 aco: simplify how broadcast_last_cbuf is implemented in PS epilog
So PS epilogs only need a single bool flag that determines whether all
enabled color buffers should be written.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
5c4f737b84 aco: implement replacing frag_coord with pixel_coord in PS prolog
This adds an option to replace frag_coord.xy with pixel_coord when sample
shading is disabled, which is most of the time. This reduces the number of
input VGPRs.

It's already implement in ac_nir_lower_ps_early for monolithic shaders.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
eddd063420 ac/nir: cosmetic stuff for ac_nir_lower_ps
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
247c0593eb ac/nir: eliminate sample_mask_in without MSAA in ac_nir_lower_ps_early
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
e57b52ff6c ac/nir: optimize frag_coord <-> pixel_coord in ac_nir_lower_ps_early
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
33134f9503 ac/nir: optimize barycentric_at_sample(sample_id) in ac_lower_ps_early
Replace it with barycentric_sample.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:26 -05:00
Marek Olšák
43f6b2655e ac/nir: simplify force_*_center_interp options in ac_nir_lower_ps_early
This only indicates whether MSAA is disabled.

Having a separate option for each sysval is better for the PS prolog,
but not for monolithic compilation.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
3bccfa72cc ac/nir: simplify force_*_sample_interp options in ac_nir_lower_ps_early
The only thing we need here is whether sample shading is enabled
and how many samples.

Having a separate option for each sysval is better for the PS prolog,
but not for monolithic compilation.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
d7d4d56f5b ac,aco,radeonsi: replace SampleMaskIn with 1 << SampleID if full sample shading
Since the sample mask is always 1 << sample_id with full sample shading,
just use that instead of loading sample_mask_in. Set it to 0 if it's
a helper invocation. This removes the sample mask input VGPR.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
b1fc34f290 radeonsi: sample shading state fixes
- really update sample shading state when it's changed
- reduce log state bits in the shader key to 2 because we don't support
  16x EQAA
- exit early from si_update_ps_iter_samples if ps_iter_sample has the same
  value since the last call
- set missing wqm for the PS prolog (this might fix tests)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
1026402b7c ac/nir: clamp vertex color outputs in the right place
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
4f63b21df0 ac/nir: drop 16x EQAA support from ac_get_ps_iter_mask
We don't support 16x EQAA anymore.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
51bbe2606d ac/nir: switch passes to use nir_shader_intrinsics_pass
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
d31b3513da ac/nir: handle FRAG_RESULT_COLOR with dual src blending in ac_nir_lower_ps_early
If FRAG_RESULT_COLOR with dual_src_blend_kndex=1 is present,
FRAG_RESULT_COLOR really means FRAG_RESULT_DATA0.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
38d3fc7a6a ac/nir: return progress from ac_nir_lower_ps_late
This changes the creation of barycentric coordinate variables to on-demand.
There is also some reordering of export code to return progress.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
231009be65 ac/nir: return progress from ac_nir_lower_ps_early
This changes the creation of barycentric coordinate variables to on-demand.
Everything else is ready to return progress.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
234b416ffb ac/nir: lower fbfetch_output in ac_nir_lower_ps_early
so that we can gather shader_info after this and all system values that
this adds will be gathered.

shader_info won't be gathered after si_nir_lower_abi, which is why we
have to lower fbfetch_output here.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
1570387aaa ac/nir: lower barycentric_at_offset/sample in ac_nir_lower_ps_early
i.e. before future linking optimizations and shader_info gathering

They are lowered together because one depends on the other.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
b9b1f3a047 ac/nir: lower sample_pos in ac_nir_lower_ps_early
i.e. before future linking optimizations and shader_info gathering

The ac_nir_lower_ps_early call is also added for non-monolithic shaders
because it's required now.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
580304350b ac/nir: optimize front_face in ac_nir_lower_ps_early
i.e. before future linking optimizations and shader_info gathering

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
0939fc6fa8 radv: don't call ac_nir_lower_ps_early
The current version doesn't do anything, and later commits require significant
reordering of NIR passes to make it usable.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Marek Olšák
ec3f397af4 freedreno/ci: skip a dmat3 div test timing out
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33024>
2025-01-25 12:20:25 -05:00
Detlev Casanova
deda1b767e ci/deqp-runner: uprev from 0.20.2 to 0.20.3
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Co-authored-by: Sergi Blanch Torne <sergi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26113>
2025-01-25 08:48:04 +00:00
Detlev Casanova
8f4efda257 ci/fluster: Add radeonsi-raven-vaapi-fluster jobs
The CI job runs each supported decoder on 1 LAVA job:
- vp9
- h.264
- h.265

They each run the gstreamer VAAPI fluster decoder tests on a radeonsi
device on LAVA.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Co-authored-by: Sergi Blanch Torne <sergi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26113>
2025-01-25 08:48:04 +00:00
Detlev Casanova
aa11f3d630 ci/fluster/lava: Add fluster in LAVA rootfs
It will be used in next commits to run fluster vaapi tests on AMD
devices on LAVA.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Co-authored-by: Sergi Blanch Torne <sergi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26113>
2025-01-25 08:48:04 +00:00
Pavel Ondračka
ba860bd914 r300: fix uninitialized use in transform_vertex_ROUND
==26468== Conditional jump or move depends on uninitialised value(s)
==26468==    at 0x577A190: get_readers_normal_read_callback (radeon_dataflow.c:534)
==26468==    by 0x57795E7: rc_for_all_reads_src (radeon_dataflow.c:162)
==26468==    by 0x577A7BB: get_readers_for_single_write (radeon_dataflow.c:709)
==26468==    by 0x5779763: writes_normal (radeon_dataflow.c:212)
==26468==    by 0x5779870: rc_for_all_writes_mask (radeon_dataflow.c:243)
==26468==    by 0x577A93C: rc_get_readers (radeon_dataflow.c:819)
==26468==    by 0x577E35E: transform_vertex_ROUND (radeon_optimize.c:1332)
==26468==    by 0x577E48B: optimize_A0_loads (radeon_optimize.c:1367)
==26468==    by 0x577E53E: rc_optimize (radeon_optimize.c:1393)
==26468==    by 0x577767F: rc_run_compiler_passes (radeon_compiler.c:475)
==26468==    by 0x57777C2: rc_run_compiler (radeon_compiler.c:498)
==26468==    by 0x57747F3: r3xx_compile_vertex_program (r3xx_vertprog.c:820)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10562
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33210>
2025-01-25 07:58:10 +00:00
Lionel Landwerlin
6768eb31e5 intel: rework CL pre-compile
Stolen from asahi_clc :)

We drop the nasty LLVM17+ workaround code (Thanks Alyssa!)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
5adac011b8 meson: rework mesa-clc=system handling
In theory you can build a driver using OpenCL kernels with a
-Dmesa-clc=system. That shouldn't require any LLVM/Clang/etc...

But the checks to find the pre-compiled mesa_clc & vtn_bindgen
binaries are in meson files or conditions only triggered if you build
with LLVM (:

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
db11165c07 intel/cl: switch to SPIRV as shader storage
Effectively making intel-clc not needed.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
b3033dc633 meson: build mesa_clc for Anv/Iris
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
bf8a1e1e71 brw/elk: move internal kernel parsing out of intel_clc
So it can be called internally.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
857236a81d spirv: build vtn_bindgen for Anv/Iris
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
b0a882b3dc libcl_vk: add some vulkan enums/structures for DGC
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
Lionel Landwerlin
d3d771607d libcl: add MIN2/MAX2 macros
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33014>
2025-01-25 03:28:07 +00:00
José Roberto de Souza
73f3de12ef iris: Pick scanout PAT entry for scanout buffers
Scanout PAT was never being picked what could cause render cache to
not be flushed during page flips causing visual corruption on
displays.

Cc: stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33127>
2025-01-25 02:53:44 +00:00
José Roberto de Souza
572eacec9e iris: Make sure a uncached heap is choosen for scanout and shared buffers when LLC is not available
Platforms without LLC were in risky to get a heap that is cached
what could cause scanout glitches.

Cc: stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33127>
2025-01-25 02:53:44 +00:00
Samuel Pitoiset
f8e7c037e3 radv: add a new helper to set image BO metadata
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33193>
2025-01-25 02:10:03 +00:00
Samuel Pitoiset
ee4a1021d1 radv: add support for BO metadata on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33193>
2025-01-25 02:10:02 +00:00
Martin Roukala (né Peres)
8fd0eda0cf freedreno/ci: uprev the a750 kernel to msm-next
This kernel was built using b2c's linux builder without any additional
patches... aside from the usual ones I apply for b2c, so we are almost
to the point where we can run a stable kernel on it!

The next uprev should be made from gfx-ci/linux rather than being
hosted on my server, but I would like to use a released kernel for
that.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33162>
2025-01-24 23:36:56 +00:00
Martin Roukala (né Peres)
41bf984d0e ci/b2c: allow using another initrd that contains firmware
This allows DUTs that require firmware to boot reliably to provide them
without needing to include them in the kernel image.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33162>
2025-01-24 23:36:56 +00:00
Martin Roukala (né Peres)
668cc6dc0c ci/b2c: allow jobs to select a file in the dtb url
This makes it possible to have a single DTB url serving multiple DUTs,
without paying much of a cost for it.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33162>
2025-01-24 23:36:56 +00:00
Saroj Kumar
433004dcff ac/surface: fix missing NULL check in gfx12_select_swizle_mode()
Add null check for surf pointer.
Fixes segfault issue during start of gdm on gfx12.

Signed-off-by: Saroj Kumar <saroj.kumar@amd.com>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33199>
2025-01-24 21:51:50 +00:00
Karmjit Mahil
1f9d96ec78 vulkan: Add inital vram-report-limit layer
This Vulkan layer allows reporting a limited VRAM size to the
application. This layer can be useful for testing applications and
games which query for the memory budget adjusting their behavior
accordingly.

They layer does not set a hard limit on the amount of VRAM thus
applications can still make allocations even though the reported
budget might indicate no memory is left, if the set limit is lower
than of actually available VRAM.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30095>
2025-01-24 19:56:43 +00:00
Karmjit Mahil
ad603d300d util/simple_mtx: Add ASSERTED to parameter used only in an assert
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30095>
2025-01-24 19:56:42 +00:00
Rhys Perry
5cc977bee4 radv: set has_image_bvh_intersect_ray for null winsys
This is needed for fossilize-replay.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 14e3231b56 ("radv: add a flag to indicate ray tracing support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33201>
2025-01-24 18:08:12 +00:00
Sergi Blanch Torne
4818bc90d9 Revert "ci: disable Collabora's farm due to unexpected power cut"
This reverts commit e02539d7b6.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33200>
2025-01-24 17:21:47 +00:00
Antonio Ospite
7c6a4b65c7 docs/android: bump suggested platform-sdk-version to 34
Suggesting at least Android 14 for new development.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
876c4513a5 ci/android: rename variable ANDROID_NDK to ANDROID_NDK_VERSION
Rename the variable ANDROID_NDK to ANDROID_NDK_VERSION and only use it
to specify the version itself.

This makes it consistent with ANDROID_SDK_VERSION and it is also in
preparation for using the same variable to build ANGLE in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
30740e3af9 ci/android: use ANDROID_SDK_VERSION for debian-android job too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
4b2996e749 ci/android: use ANDROID_SDK_VERSION when building deqp components
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
26d6607063 ci/android: update ANDROID_NDK and ANDROID_SDK_VERSION
Update ANDROID_NDK to the latest stable release 27c and bump
ANDROID_SDK_VERSION to API version 34 which matches the Android 14
release we are using for the cuttlefish images.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
David Rosca
6ebc25bc14 frontends/va: Stop using extra context for deinterlacing
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33126>
2025-01-24 13:40:28 +00:00
David Rosca
ea73d1b47c gallium/vl: Add compute shader deinterlace filter
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33126>
2025-01-24 13:40:27 +00:00
David Rosca
604fb68876 radeonsi: Report surface alignment for AV1 encode
This is also useful for AV1 to allow applications to use container crop.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33083>
2025-01-24 13:04:47 +00:00
David Rosca
ad0f197c6c radeonsi/vcn: Fix AV1 coded size for VCN 5.0
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33083>
2025-01-24 13:04:47 +00:00
Job Noorman
b4c95124ab freedreno: add missing entries to ForEachMacros
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32107>
2025-01-24 12:15:31 +00:00
Job Noorman
bbd164e2e3 freedreno: remove unused entries from ForEachMacros
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32107>
2025-01-24 12:15:31 +00:00
Job Noorman
bc6152c1c3 freedreno: move ForEachMacros into freedreno
This change moves freedreno specific ForEachMacros from the top level
.clang-format to the freedreno specific .clang-format.

This is done to avoid triggering CI for all drivers when making changes
to this list.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32107>
2025-01-24 12:15:31 +00:00
Job Noorman
dd74ef36a5 ir3: account for inserted nops in delay calculation
Whenever we insert a (nopN) on the previous instruction to add nops, we
initially add them to the current cycle count. However, existing (nopN)
fields are not accounted for. This means the if a (nopN) gets inserted
and the block is processed again, the cycle count will be too low and we
might insert more nops than necessary.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33178>
2025-01-24 11:39:44 +00:00
Samuel Pitoiset
d41a3bb744 radv: program COMPUTE_DISPATCH_INTERLEAVE on GFX12
To the same value as GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33185>
2025-01-24 11:08:59 +00:00
Samuel Pitoiset
c039caeb53 ac/cmdbuf: program SPI_SHADER_GS_MESHLET_CTRL to 0 in the GFX12 preamble
Otherwise, it's derivative group quads by default.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33185>
2025-01-24 11:08:59 +00:00
Lionel Landwerlin
7ddb49653d anv/brw: rework primitive count writing
Instead the complicated logic we currently have, do this :

We start with this shader :

int main() {
   ...
   if (...) {
      SetMeshOutputsEXT(0, 0);
      return;
   } else {
      SetMeshOutputsEXT(...);
   }
   ...
}

We turn it into this :

int main() {
   uint __temp_prim_count = 0;
   ...
   if (...) {
      __temp_prim_count = 0;
      return;
   } else {
      __temp_prim_count = ...;
   }
   ...

   if (is_first_group_lane()) {
      SetMeshOutputsEXT(..., __temp_prim_count);
   }
}

This works because the SPIRV spec says this :

   "The arguments are taken from the first invocation in each
    workgroup. Any invocation must execute this instruction no more
    than once and under uniform control flow."

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12388
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33038>
2025-01-24 10:19:28 +00:00
Lionel Landwerlin
4cc847cfd4 anv/Wa_18019110168: copy the primitive count writes
That way we don't have to lower the set_vertex_and_primitive_count
intrinsic before applying this WA.

Cc stable for the next patches that are fixing something.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33038>
2025-01-24 10:19:28 +00:00
Lionel Landwerlin
1067d95987 compiler: add VARYING_BIT_PRIMITIVE_COUNT
Cc stable for the next patches that are fixing something.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33038>
2025-01-24 10:19:28 +00:00
Sergi Blanch Torne
e02539d7b6 ci: disable Collabora's farm due to unexpected power cut
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33198>
2025-01-24 11:06:00 +01:00
Timothy Arceri
09f73024a5 glsl: fix num_views linker error
The declaration must be the same across shaders but not all shaders
must make the declaration.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33149>
2025-01-24 01:47:55 +00:00
Timothy Arceri
914697c4ac glsl: fix num_views validation message
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33149>
2025-01-24 01:47:55 +00:00
Caio Oliveira
ee625f44d5 intel/elk: Fix wrong destination to memset
Conversion to use rzalloc_array missed these.

Fixes: c9e667b7ad ("intel/elk: Remove uses of VLAs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12513
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33192>
2025-01-24 01:09:26 +00:00
Valentine Burley
c670bbc093 freedreno/ci: Update expectations again
This started passing in the last 24 hours on a306.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33187>
2025-01-24 00:29:11 +00:00
Rhys Perry
0eb5f66660 nir/validate: validate ssa dominance by default
This no longer modifies dominance metadata, so enable it by default.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
b145045112 nir/validate: preserve dominance during SSA validation
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
b1945fd21a nir/validate: validate metadata
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9572
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
2d94ca93b5 nir/liveness: stop requiring instr indices
nir_live_defs_impl() doesn't actually use them, and every
nir_metadata_require of nir_metadata_live_defs already requires them.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
bfc570ff98 nir/gcm: stop preserving nir_metadata_loop_analysis
This pass changes instr_cost if it makes progress.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
36840db6fe nir/loop_analyze: use a sparse array and stop indexing SSA defs
Indexing SSA defs is unexpected behaviour and interferes with using
nir_loop_analyze_impl for validation.

It probably also breaks nir_metadata_live_defs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
77118fcf72 nir: rerun loop analysis if the parameters change
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
aae1aa4888 d3d12: store only once in d3d12_emit_points
d3d12_lower_point_sprite expects a single store for each output, each
dominating the emit_vertex.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
083a557856 d3d12: fix phi handling in d3d12_lower_primitive_id
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
9c159490c3 microsoft/compiler: repair SSA in dxil_nir_split_tess_ctrl
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
3850f8b167 microsoft/compiler: invalidate loop analysis in dxil_nir_lower_double_math
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
30473fd1e7 v3dv: fix SSA dominance error
Offset should be increased regardless of whether a result is written or
not.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:43 +00:00
Konstantin Seurer
eecaf80554 radv/rmv: Use radv_rmv_log_resource_destroy more
Gets rid of some duplicate code with the added benefit of removing a
memory leak warning when destroying the device because
radv_rmv_log_border_color_palette_destroy did not destroy the resource
ID.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33167>
2025-01-23 23:07:49 +00:00
Connor Abbott
6d406eeefa tu: Support VK_EXT_conservative_rasterization on a7xx
This supports everything the blob does.

The registers exist on later a6xx gens, but they would be way more
inconvenient to use since they're mixed up with binning/not-binning and
compression state, and I'm not sure if it works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Connor Abbott
2798521bda tu: Stop setting binning fields on a7xx
These fields don't actually enable binning, but rather disables the FS.
This seems to happen automatically on a7xx when binning, because the
blob doesn't set them specially during the binning pass.

Move them to rasterization, because RB_RENDER_CNTL will start depending
on rasterization state in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Connor Abbott
ffe8220bbd tu, freedreno: Write PC_DGEN_SU_CONSERVATIVE_RAS_CNTL
Prevent other processes writing this from messing us up.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Konstantin Seurer
6701806cd1 llvmpipe: Avoid a crash when using 5 coords with AF
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32935>
2025-01-23 21:57:04 +00:00
Konstantin Seurer
3f7564d86b llvmpipe: Fix half-pixel sample offset with AF
Simply adding -0.5 will cause a noticeable offset for low sample counts.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32935>
2025-01-23 21:57:03 +00:00
Mike Blumenkrantz
f3b8d7da46 egl: never select swrast for vmwgfx
ForceSoftware will be true in this case from the high-level fallback,
but this isn't really swrast

Fixes: 1de7c86bc1 ("dri: pass through a type enum for creating screen instead of driver_extensions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33123>
2025-01-23 21:14:21 +00:00
Caio Oliveira
563631cdd8 intel/brw: Rely on existing helper for dispatch width of geometry stages
Helper already exists and is used in the functions, just save the value
so can be reused.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33175>
2025-01-23 20:29:31 +00:00
Igor Torrente
fcb4412e9a Zink: Add NVK to the non driver_workarounds.implicit_sync list
This workarround is causing `VK_ERROR_DEVICE_LOST` to NVK when running
glmark2. And as NVK is part of mesa, it doesn't need the hand-holding
from Zink.

cc: mesa-stable

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33142>
2025-01-23 19:12:40 +00:00
José Roberto de Souza
e9f4458c37 anv: Allow WSI blit_src Image to be kept compressed when transitioning to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
When WSI is working in prime/dma-buf mode, it has one additional
VkBuffer or VkImage where the main VkImage is copied to without any
compression or tiling different from linear

The batch buffer to do this copy is created in
wsi_finish_create_blit_context(). It performs a barrier transitioning
the VkImage to VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, performs the
copy, and then transitions it back to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.

However, in this prime/dma-buf mode, no display modifiers are involved,
which causes compression to be disabled when switching to
VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
This change adds an exception to allow the Vkimage to remain compressed
because we can handle the compressed-to-uncompressed copy.

Doing so fixes an issue that was reported with BMG + integrated GPU
and should also improve performance by keeping the VkImage compressed.

Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12354
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33044>
2025-01-23 18:27:31 +00:00
José Roberto de Souza
5a37467cfd anv: Return scanout PAT entry for scanout and external buffers in discrete GPUs
Without this scanout and external buffers will be allocated as WB
what will fail allocation if DRM_XE_GEM_CREATE_FLAG_SCANOUT is set
or it will use WC but it will not be the special PAT entry for scanout.

Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33044>
2025-01-23 18:27:31 +00:00
Job Noorman
41ae187003 ir3: disable alias.rt pre-a750
Even though alias.tex is supported on all of a7xx, alias.rt is only
support from a750.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 0aa9678d4d ("ir3: add support for alias.rt")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33184>
2025-01-23 17:55:22 +00:00
Lionel Landwerlin
9ea04a1a53 anv: don't look at pipelines to figure out CPS values
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33170>
2025-01-23 17:13:54 +00:00
Tapani Pälli
e85646eace anv: set dependency between SF_CLIP and CC_PTR states
Fixes flickering seen in Cyberpunk 2077, Supraland and some
other game workloads.

cc: mesa-stable

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12494
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12504
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12453
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33163>
2025-01-23 16:26:24 +00:00
Karmjit Mahil
5846172f15 tu: Free pre_chain patchpoint data
Fixes a leak in:
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed42
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed60_geometry
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed95_geometry_multiview

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33084>
2025-01-23 15:39:50 +00:00
Lars-Ivar Hesselberg Simonsen
2d3c50d484 panvk: Fix barriers in secondary cmdbufs w/o rp's
When encountering pipeline barriers in secondary command buffers that do
not start their renderpasses, our barrier logic would not detect the
need to flush existing draws, leading to race conditions in case of
subpassLoad.

This change ensures we flush existing draws when required in secondary
command buffers.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33182>
2025-01-23 15:13:17 +00:00
Mike Blumenkrantz
d1c2795876 zink: fix replacing incompatible pipelines
if e.g., multiview framebuffer is enabled, shader objects cannot be used,
requiring the bound shaders to be compiled into a pipeline on-demand

this is not knowable in advance and will always result in a stall

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00
Mike Blumenkrantz
53cb103af2 zink: disable shader objects when viewmask is set
this is not supported by EXT_shader_object

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00
Mike Blumenkrantz
50c7d05568 zink: add radv ci fail
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00
Benjamin Lee
6d6a43518a panfrost: remove is_blit flag
This is no longer used anywhere.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32954>
2025-01-23 13:50:27 +00:00
Benjamin Lee
f93a48e4e3 panfrost: fix hang by using MALI_PIXEL_KILL_WEAK_EARLY in color preload
Setting zs_update_operation = FORCE_EARLY for color preloads triggers
hangs in the dEQP-VK.rasterization.rasterization_order_attachment_access
depth/stencil tests. I didn't determine why this is the case, but the
DDK uses WEAK_EARLY for color preload, and doing the same here fixes the
hang.

WEAK_EARLY requires ATEST, so I removed .is_blit=true from the compiler
inputs.

There aren't any known hangs outside of the one set of vulkan CTS tests,
and in particular no known hangs in the gallium driver. Because the
reason for the hangs is not understood, I also changed the gallium
driver to use WEAK_EARLY, under the assumption that the same conditions
that trigger the hang in vulkan might occur in GL.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: edd98aac3f ("panfrost: Add support for native wallpapering on Bifrost")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32954>
2025-01-23 13:50:27 +00:00
Benjamin Lee
79517d8a65 panfrost: remove incorrect usage of MALI_PIXEL_KILL_STRONG_EARLY
On bifrost, zs_update_operation=STRONG_EARLY, is equivalent to
WEAK_EARLY except that it may test/update without waiting for pixel
dependencies if it can prove that the test will pass.

STRONG_EARLY no longer exists on valhall, and the value 2 is reserved.

Even on bifrost, all of our current uses of STRONG_EARLY are
incorrect. For color preload, the shader skips ATEST, so FORCE_EARLY is
required. In the no-FS case, ATEST is skipped by definition (because
there is no shader), so FORCE_EARLY is required.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 519643bbe0 ("panfrost: Adjust the renderer state definition")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32954>
2025-01-23 13:50:27 +00:00
Samuel Pitoiset
4b741338ac radv: exclude layer when recomputing FS input bases
This is always exported as a sysval.

Closes: mesa/mesa#12501
Fixes: dd00b3f5 ("radv: Implement FS layer ID input as a system value.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33168>
2025-01-23 13:21:03 +00:00
Lionel Landwerlin
2e4dcf72c6 brw: fix CSE with negation
The pass is currently turning this :

mul(16) %17:F, %1:F, 0.5f
mul(16) %19:F, %1:F, -0.5f
(+f0.0) sel(16) %27:UD, %19:UD, %17:UD

into this :

{ 12} mul(16) %17:F, %1:F, 0.5f
{ 14} (+f0.0) sel(16) %27:UD, -%17:F, %17:UD

The type change in the SEL instruction incurs a type conversion that
produces invalid values.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 234c45c929 ("intel/brw: Write a new global CSE pass that works on defs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12477
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33070>
2025-01-23 12:45:34 +00:00
Erik Faye-Lund
40b4c0aa1a panvk/ci: update expected failures
These failures were all caused by CTS bugs affecting Vulkan 1.0. But
since we now expose Vulkan 1.1 on V10, these issues no longer affect us.

Let's update the results to reflect this.

Fixes: 1a81bff6aa ("panvk: expose vk1.1 on v10 hardware")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33180>
2025-01-23 12:09:51 +00:00
Erik Faye-Lund
e34e474f24 panvk: do not expose EXT_subgroup_size_control on bifrost
This exptension requires Vulkan 1.1, which we don't expose there yet.

While we're at it, put panvk into the normal sorted order of the list of
drivers.

Fixes: d46b80249b ("panvk: enable subgroupSizeControl")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33180>
2025-01-23 12:09:51 +00:00
Valentine Burley
2d99b77f2e amd/ci: Run full radeonsi-raven-va job pre-merge
The full job run takes approximately 8 minutes now, as the issues
previously mentioned have been resolved.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33155>
2025-01-23 11:33:25 +00:00
Valentine Burley
0624cd9c51 amd/ci: Add lava-hp-x360-14a-cb0001xx-zork and use it for VA-API testing
Move the existing radeonsi-raven-va job to this new device.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33155>
2025-01-23 11:33:25 +00:00
Valentine Burley
708279df20 panfrost/ci: Revert to 6.6 kernel on G57
On mt8192, the 6.13 kernel fails to reliably initialize the GPU, causing
a fallback to llvmpipe. Return to the 6.6 kernel until this is resolved.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33181>
2025-01-23 10:56:20 +00:00
Corentin Noël
d441292a70 virgl/ci: Remove screen size arguments
We don't need such argument and this way of specifying them is deprecated anyway.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33173>
2025-01-23 10:14:48 +00:00
Vignesh Raman
ef3091736c ci: use CI_PROJECT_NAME for artifacts name
Since mesa is used in drm-ci, the artifacts in drm-ci jobs have
the 'mesa' prefix. This change replaces the hardcoded 'mesa'
prefix in the artifacts name with the CI_PROJECT_NAME variable.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33154>
2025-01-23 07:18:09 +00:00
Job Noorman
0aa9678d4d ir3: add support for alias.rt
a7xx introduced support for aliasing render target components using
alias.rt. This allows components to be bound to uniform (const or
immediate) values in the preamble:

alias.rt.f32.0 rt0.y, c0.x
alias.rt.f32.0 rt1.z, (1.000000)

This aliases the 2nd component of RT0 to c0.x and the 3rd component of
RT1 to the immediate 1.0. All components of all 8 render targets can be
aliased.

This is implemented by replacing const and immediate components of the
RT sources of end with alias.rt instructions in the preamble. If no
preamble exists, an empty one is created.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
90b512c4ef freedreno: add support for aliased render target components
a7xx introduced support for aliasing render target components using
alias.rt. This allows components to be bound to uniform (const or
immediate) values in the preamble:

alias.rt.f32.0 rt0.y, c0.x
alias.rt.f32.0 rt1.z, (1.000000)

This aliases the 2nd component of RT0 to c0.x and the 3rd component of
RT1 to the immediate 1.0. All components of all 8 render targets can be
aliased.

In addition to using alias.rt, the hardware needs to be informed about
which render target components are being aliased using the
SP_PS_ALIASED_COMPONENTS{_CONTROL} registers. This commit implements
those registers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
38f5fd66de freedreno: add chip param to emit_fs_output
We will need this to emit the a7xx-specific aliased components regs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
2716385afa tu: add support for aliased render target components
a7xx introduced support for aliasing render target components using
alias.rt. This allows components to be bound to uniform (const or
immediate) values in the preamble:

alias.rt.f32.0 rt0.y, c0.x
alias.rt.f32.0 rt1.z, (1.000000)

This aliases the 2nd component of RT0 to c0.x and the 3rd component of
RT1 to the immediate 1.0. All components of all 8 render targets can be
aliased.

In addition to using alias.rt, the hardware needs to be informed about
which render target components are being aliased using the
SP_PS_ALIASED_COMPONENTS{_CONTROL} registers. This commit implements
those registers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
3290a3dcf3 tu: add chip param to tu6_emit_fs_outputs
We will need this to emit the a7xx-specific aliased components regs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
040b803e4b ir3: reuse ir3_find_output in ir3_find_output_regid
The search logic was duplicated here. Also added a new helper
ir3_get_output_regid to make the regid calculation reusable.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
39206c1150 ir3: make shader output struct non-anonymous
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
b8b3fe20b2 tu,ir3: inform ir3 of dynamically remapped FS slots
The clear FS shaders will statically use slot numbers from 0 up to the
number of supported render targets. However, the driver will remap those
slots to the actual render targets being cleared.

This means that ir3 should not make any assumptions about the static
slot number in those cases. This is especially important when
implementing alias.rt, which statically encodes the render target.

Add an new ir3_shader_option (fragdata_dynamic_remap) which allows the
driver to indicate to ir3 that it will perform such dynamic remapping.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
2a0a317244 ir3: make find_end a global helper
Rename to ir3_find_end and move to ir3.{h,c}.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
f3026b3d3e ir3: add some preamble helpers
Helpers to check for preamble existence, find shpe, and create an empty
preamble.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
144121b6df ir3/dce: support partial writes from collects
When alias.rt is used to alias certain output components, we might end
up with a situation where some, but not all, of the components of
collects end up being unused. This is currently not supported which
means we end up with useless moves (coming from copy lowering) for
aliased output components.

Fix this by adding support for partial wrmasks for collects in DCE. The
wrmasks are initially zeroed out and then updated based on the wrmask of
their users. Sources of collects for which the corresponding dst ends up
being unused are treated as unused as well. This allows us to remove
the useless output moves by simply updating the wrmask of the end
sources.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
a7a357f91d ir3/legalize: insert (sy) to read consts after ldc.k
Observed when reading consts in the preamble using alias.rt.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
96e08c3859 ir3/legalize: insert (ss) to read consts after stc
Observed when reading consts in the preamble using alias.rt.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
9b6bca52d5 ir3: optimize alias register allocation by reusing GPRs
Allocate alias registers for an alias group while trying to minimize the
number of needed aliases. That is, if the allocated GPRs for the group
are (partially) consecutive, only allocate aliases to fill-in the gaps.
For example:
   sam ..., @{r1.x, r5.z, r1.z}, ...
only needs a single alias:
   alias.tex.b32.0 r1.y, r5.z
   sam ..., r1.x, ...

Also, try to reuse allocations of previous groups. For example, this is
relatively common:
   sam ..., @{r2.z, 0}, @{0}
Reusing the allocation of the first group for the second one gives this:
   alias.tex.b32.0 r2.w, 0
   sam ..., r2.z, r2.w

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
3fb0f54d70 ir3: add support for alias.tex
alias.tex allows us to construct an "alias table" that creates a mapping
between virtual alias registers and concrete GPRs, consts, or
immediates. The following texture instruction will lookup its sources in
this table and use the mapped value instead. This has a few advantages:
- We don't have to allocate consecutive registers (necessary for many
  tex sources) as we can just map them to consecutive alias registers.
- We don't have to allocate GPRs at all for consts and immediates.
- There's no delay penalty when initializing alias registers with consts
  or immediates.

For example, this code:
mov.u32u32 r1.x, r3.z
mov.u32u32 r1.y, c0.x
mov.u32u32 r1.z, 0
(rpt2)nop
sam ..., r1.x, ...

Can be implemented as follows:
alias.tex.b32.2 r40.x, r3.z
alias.tex.b32.0 r40.y, c0.x
alias.tex.b32.0 r40.z, 0
sam ..., r40.x, ...

Note that the alias registers (r40.xyz in this case) do not occupy GPR
space.

(More intelligent allocation strategies are possible; e.g., just mapping
r3.w and r4.x to c0.x and 0. This is implemented by the next commit.)

Support for alias.tex is implemented in two passes in ir3.

In a first pass, sources of tex instructions are replaced by alias
sources (IR3_REG_ALIAS) as follows:
- movs from const/imm: replace with the const/imm;
- collects: replace with the sources of the collect;
- GPR sources: simply mark as alias.

This way, RA won't be forced to allocate consecutive registers for
collects and useless collects/movs can be DCE'd. Note that simply
lowering collects to aliases doesn't work because RA would assume that
killed sources of aliases are dead, while they are in fact live until
the tex instruction that uses them.

The second pass inserts alias.tex instructions in front of the tex
instructions that need them and fixes up the tex instruction's sources.
This pass needs to run post-RA as discussed above. It also needs to run
post-legalization as all the sync flags need to be inserted based on the
registers instructions actually use, not on the alias registers they
have as sources.

This commit uses a very simple allocation strategy for alias registers:
simply allocate consecutive registers starting from r40.x. Note that
this works because the alias table is reset after a tex instruction is
executed so we don't have to worry about aliasing a live register.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
4a9faaae17 ir3: add ir3_compiler::has_alias
Flag to detect support for alias.rt/alias.tex available in a7xx.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
c5c95f8916 ir3: add validation for alias
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:24 +00:00
Job Noorman
84b93cf718 ir3: introduce alias goups
Alias registers allow us to allocate non-consecutive registers and remap
them to consecutive ones using alias.tex. We implement this by adding
the sources of collects directly to the sources of their users. This
way, RA treats them as scalar registers and we can remap them to
consecutive registers afterwards. To keep track of the scalar sources
that should be remapped together, the IR3_REG_FIRST_ALIAS flag is
introduced. Every source of such an "alias group" will have the
IR3_REG_ALIAS set, while the first one will also have
IR3_REG_FIRST_ALIAS set.

This commit also adds a number of helpers to iterate over sources while
keeping track of the original src index (i.e., before they were expanded
to alias goups), and to iterate the sources within an alias group. It
also introduces a new notation (@{regs...}) to clearly show alias groups
when printing instructions.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
4c2fc07a7e ir3: teach backend about alias
Take the properties of alias.{rt,tex} and its registers into account:
- Don't count alias registers for GPR usage;
- Allow all immediates in alias regs;
- Fix properties like is_barrier and (ss) support;
- alias.rt dst is not a GPR, don't use it in legalize/postsched to track
  dependencies;

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
a325573aaf ir3/print: add support for alias
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
fb9de08efd ir3/a7xx: document alias.rt
It works completely differently from alias.tex.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
d9241c6360 ir3/a7xx: handle alias.rt dst
alias.rt writes to a render target, not a GPR. Render targets are
disassembled as rtN.c.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
dab47b55ef ir3/a7xx: implement and document unknown alias field
The UNK field encodes the table size for alias.tex: the first alias.tex
instruction uses it to indicate how many follow (i.e., it is the total
table size minus one).

Also switch from using a src to a cat7 field to store this value which
makes it a bit easier to handle.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
af7c6f8dd5 ir3/a7xx: disasm halfness of alias dst
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
c4d84a8675 ir3/a7xx: properly handle alias scope and type
The alias scope and type bits are intertwined in the encoding:
- bit 47: low scope
- bit 48: type
- bit 49: high scope
- bit 50: type size

Combining the low and high scope bits, the value is used as follows:
- 0: tex
- 1: rt
- 2: mem
- 3: mem

I don't know what the difference between 2 and 3 is. The blob currently
doesn't use mem at all.

The type bit seems to be used to make a distinction between floating
point (f) and integer (b) sources. There doesn't seem to be any
functional difference and it only affects how immediates are displayed.

Note that I haven't exactly mimicked the blob in these cases:
- alias.tex.f16/32: the blob uses b16/32 while printing immediates in
  floating point notation. I think it make more sense to use f16/32.
- alias.rt.b16/32: the blob uses i16/32 here. I think it makes more
  sense to stick to a single notation (b).

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Job Noorman
2f629810aa ir3/parser: fix parsing integer as float
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31222>
2025-01-23 06:26:23 +00:00
Connor Abbott
15642c8ec2 tu: Handle non-identity GMEM swaps for input attachments
I believe nothing currently tests this, but this should be required by
analogy with the previous commit.

Fixes: 247d11d635 ("tu: Allow UBWC with images with swapped formats.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33115>
2025-01-23 05:53:40 +00:00
Connor Abbott
a104a7ca1a tu: Handle non-identity GMEM swaps when resolving
There is a single swap field for each color attachment, regardless of
whether it's in GMEM or not, and this does appear to be used in
GMEM mode when MUTABLEEN is set on the attachment. This means that when
a color attachment has a non-identity swap because it's mutable on a750,
we have to use the same corresponding swap when it's a source in a
GMEM resolve.  When using the fastpath, we have to make sure that the
swaps match because there aren't separate fields for GMEM and sysmem
swap.

This fixes dEQP-VK.image.mutable.2d.*_b8g8r8a8_unorm_draw_copy_resolve
with TU_DEBUG=gmem.

Fixes: 247d11d635 ("tu: Allow UBWC with images with swapped formats.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33115>
2025-01-23 05:53:40 +00:00
Connor Abbott
450755bd40 tu: Use image view format for sysmem resolves
The spec says that we're supposed to do this. This fixes the
newly-introduced tests dEQP-VK.image.mutable.*.*_draw_copy_resolve with
TU_DEBUG=sysmem.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33115>
2025-01-23 05:53:40 +00:00
Connor Abbott
47a85815b0 radv: Delete acceleration structure stubs
These are now provided by common code.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33153>
2025-01-23 05:16:58 +00:00
Connor Abbott
987e499253 anv: Delete acceleration structure stubs
These are now provided by common code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33153>
2025-01-23 05:16:58 +00:00
Connor Abbott
3141033ac2 vk/bvh: Add default stubs for unsupported entrypoints
We don't currently support building acceleration structures on the CPU
or indirect building in the common framework, and drivers using it don't
either, but drivers have to return non-NULL entrypoints for CPU building
functions if they claim to support VK_KHR_acceleration_structure. Add
stub entrypoints here so that drivers don't have to have this
boilerplate.

Fixes dEQP-VK.api.version_check.entry_points on turnip.

Fixes: 671e3a65a6 ("tu: Support VK_KHR_acceleration_structure")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33153>
2025-01-23 05:16:58 +00:00
Eric Engestrom
762cd246ee docs/release-calendar: push back the 24.3.x releases by one week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33171>
2025-01-23 03:09:36 +00:00
Eric Engestrom
835ecc5758 docs: add sha sum for 24.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33171>
2025-01-23 03:09:36 +00:00
Eric Engestrom
e5ca260032 docs: add release notes for 24.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33171>
2025-01-23 03:09:36 +00:00
Eric Engestrom
3d3ac0de25 docs: update calendar for 24.3.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33171>
2025-01-23 03:09:36 +00:00
Danylo Piliaiev
244e408341 ir3: Consider const alloc alignment in free space size calcs
The alignment was considered only for offset, but its users
(at least ir3_nir_opt_preamble) expect the size itself to also
be aligned.

Fixes tests:
  dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_geom
  dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_tessc
  dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_tesse
  gmem-dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.struct_mixed_types.uniform_buffer_block_tesse

Fixes: 922ef8e720
("ir3: Make allocation of consts more generic and order independent")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33161>
2025-01-23 02:31:48 +00:00
Daniel Schürmann
1feb733cd4 Revert "nir: add nir_clear_divergence_info, use it in nir_opt_varyings"
This reverts commit 9d043e138d.

It is no longer needed. nir_convert_from_ssa() is now capable to
ignore divergence information.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33009>
2025-01-23 01:31:24 +00:00
Daniel Schürmann
f3be7ce01b nir/from_ssa: only consider divergence if requested
This pass used to unconditionally use divergence information
which forced the caller to either call divergence_analysis or
ensure that the divergence is properly reset.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33009>
2025-01-23 01:31:23 +00:00
Marek Olšák
e7214b9446 glapi: rename exported symbols so as not to conflict with old libglapi
libwaffle 1.7.0 has a hack that dlopen's libglapi with RTLD_GLOBAL, which
was meant to preload libglapi, but with this MR it overwrites libgallium's
own symbols, which breaks libgallium.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
6e3ee3a072 loader: improve the existing loader-libgallium non-matching version error
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
464dde302c glapi: remove the remap table
it's unused now

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
b22f682a31 glapi: stop using the remap table
The remap table adds an array lookup into 75% of CALL_* macros, which are
used to call GL functions through the dispatch table. Removing the array
lookup reduces overhead of dispatch table calls.

Since libglapi is now required to be from the same build as libgallium,
the remap table is no longer needed.

This change doesn't remove the remapping table. It only disables it.
Compare asm:

Before:
0000000000000000 <_mesa_unmarshal_Uniform1f>:
   0:   f3 0f 1e fa             endbr64
   4:   48 83 ec 08             sub    $0x8,%rsp
   8:   48 8b 05 00 00 00 00    mov    0x0(%rip),%rax        # f <_mesa_unmarshal_Uniform1f+0xf>
   f:   8b 4e 04                mov    0x4(%rsi),%ecx
  12:   31 d2                   xor    %edx,%edx
  14:   f3 0f 10 46 08          movss  0x8(%rsi),%xmm0
  19:   48 63 80 a8 01 00 00    movslq 0x1a8(%rax),%rax
  20:   85 c0                   test   %eax,%eax
  22:   78 08                   js     2c <_mesa_unmarshal_Uniform1f+0x2c>
  24:   48 8b 57 40             mov    0x40(%rdi),%rdx
  28:   48 8b 14 c2             mov    (%rdx,%rax,8),%rdx
  2c:   89 cf                   mov    %ecx,%edi
  2e:   ff d2                   call   *%rdx
  30:   b8 02 00 00 00          mov    $0x2,%eax
  35:   48 83 c4 08             add    $0x8,%rsp
  39:   c3                      ret

After:
0000000000000000 <_mesa_unmarshal_Uniform1f>:
   0:   f3 0f 1e fa             endbr64
   4:   48 89 f8                mov    %rdi,%rax
   7:   48 83 ec 08             sub    $0x8,%rsp
   b:   f3 0f 10 46 08          movss  0x8(%rsi),%xmm0
  10:   8b 7e 04                mov    0x4(%rsi),%edi
  13:   48 8b 40 40             mov    0x40(%rax),%rax
  17:   ff 90 10 10 00 00       call   *0x1010(%rax)
  1d:   b8 02 00 00 00          mov    $0x2,%eax
  22:   48 83 c4 08             add    $0x8,%rsp
  26:   c3                      ret

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Marek Olšák
44bda7c258 dri: put shared-glapi into libgallium.*.so
so that we don't have to maintain a stable ABI for it.

This will allow removal of the remapping table to reduce CALL_* overhead
for GL dispatch tables.

Also we can now clean it up.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Daniel Schürmann
08560b8ff8 aco/lower_branches: stitch linear blocks if there is exactly one successor with one predecessor
Totals from 12906 (16.26% of 79395) affected shaders: (Navi31)

Instrs: 22051521 -> 22049488 (-0.01%); split: -0.01%, +0.00%
CodeSize: 116591240 -> 116583920 (-0.01%)
Latency: 196625178 -> 196538410 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 33943045 -> 33930615 (-0.04%); split: -0.04%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
c90ae5f773 aco: delete aco_jump_threading.cpp
This is now handled by lower_branches().

Totals from 47236 (59.49% of 79395) affected shaders: (Navi31)
Instrs: 29490400 -> 29490507 (+0.00%)
CodeSize: 152316812 -> 152317248 (+0.00%); split: -0.00%, +0.00%
Latency: 229665459 -> 229665106 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 36870605 -> 36870504 (-0.00%); split: -0.00%, +0.00%
Copies: 1966751 -> 2233467 (+13.56%)
SALU: 3122941 -> 3123048 (+0.00%)

Note, that only about 20 shaders are actually affected.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
c677809f25 aco/lower_branches: allow for non-fallthrough loop exits in try_merge_break_with_continue()
Totals from 211 (0.27% of 79395) affected shaders: (Navi31)

Instrs: 276961 -> 276545 (-0.15%)
CodeSize: 1404356 -> 1402248 (-0.15%)
Latency: 1344722 -> 1344887 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 165624 -> 165622 (-0.00%); split: -0.00%, +0.00%
Branches: 6149 -> 5987 (-2.63%)
SALU: 25722 -> 25468 (-0.99%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
12656ea5f5 aco: move try_merge_break_with_continue() to lower_branches()
Totals from 3 (0.00% of 79395) affected shaders: (Navi31)

Instrs: 12888 -> 12882 (-0.05%)
Latency: 83253 -> 83246 (-0.01%)
InvThroughput: 9251 -> 9249 (-0.02%)
Branches: 483 -> 480 (-0.62%)
SALU: 1329 -> 1326 (-0.23%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
13ad3db43f aco/lower_branches: implement try_remove_simple_block() in lower_branches()
This is mostly the same as in jump_threading, but can handle
multiple predecessors.

Totals from 3523 (4.44% of 79395) affected shaders: (Navi31)

Instrs: 10244892 -> 10244753 (-0.00%); split: -0.00%, +0.00%
CodeSize: 54171500 -> 54168540 (-0.01%); split: -0.01%, +0.00%
Latency: 75070425 -> 75059570 (-0.01%); split: -0.02%, +0.00%
InvThroughput: 11606911 -> 11605767 (-0.01%); split: -0.01%, +0.00%
Branches: 331778 -> 331675 (-0.03%); split: -0.05%, +0.02%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
2b5a893e29 aco/lower_branches: do eliminate_useless_exec_writes_in_block() during branch lowering.
Totals from 728 (0.92% of 79395) affected shaders: (Navi31)

Instrs: 452926 -> 452161 (-0.17%)
CodeSize: 2255536 -> 2252504 (-0.13%)
Latency: 1683404 -> 1683470 (+0.00%); split: -0.01%, +0.01%
InvThroughput: 210887 -> 210888 (+0.00%); split: -0.00%, +0.00%
SALU: 77865 -> 77106 (-0.97%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
eecdb45d61 aco: consider s_cbranch_exec* instructions in needs_exec_mask()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
de1e38e214 aco/assembler: Find loop exits using the successor's loop nest depth
Previously, we just used the next block after a loop that
has a back-edge. This assumes that loop-exit blocks can
only be removed when falling through to the next block,
when in fact it can also be a jump to somewhere else,
in future even to some block before the actual loop.

12 (0.02% of 79395) affected shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Daniel Schürmann
29c63de062 aco/jump_threading: don't remove loop preheaders
They might be needed as convergence point in order to
insert code (e.g. for loop alignment, wait states, etc.).

Totals from 1 (0.00% of 79395) affected shaders:

CodeSize: 12672 -> 12716 (+0.35%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32477>
2025-01-23 00:11:06 +00:00
Lucas Stach
4bed508122 etnaviv: track TS flushed status as bool
TS can be valid and flushed at the same time when no compression is
used. This state is beneficial if we needed to flush TS to the base
surface (filling cleared tiles) for any reason, but still use TS
state to accelerate read requests into PE or TX caches.

The current seqno based tracking of the TS flush state has a major
drawback with the following sequence of events:
1. fast clear surface (TS is now valid)
2. flush TS (base surface tiles filled, TS still valid,
   flush seqno == surface seqno)
3. render to surface (surface seqno increased)
4. flush resource

Step 4 will now execute a full TS flush as the flush and surface seqnos
are different after rendering and TS is still valid, wasting memory
bandwidth to fill already filled tiled that are still marked as clear
in the TS state. If the TS has been flushed already, step 4 should be
a no-op.

Switch from the seqno based tracking to tracking the flush state itself,
marking the TS state un-/flushed as needed. With this boolean tracking
of the flush state step4 above will correctly see that the TS has already
been flushed since the last fast clear and skip the tile fill blit.

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/32956>
2025-01-22 23:50:00 +00:00
Erik Faye-Lund
d74f569035 pan/bi: bump iter_count to 2000
Without this, we fail to register-allocate the shader used in the
dEQP-VK.ssbo.phys.layout.random.8bit.scalar.78 VK-CTS test case.

Yeah, this sucks, but failing to compile sucks even more. We need a new
register allocator plan here.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33124>
2025-01-22 23:19:18 +00:00
Samuel Pitoiset
b4085df31c radv: re-emit streamout state for GFX12 when the user SGPR changes
This is more for consistency than a real fix.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33164>
2025-01-22 22:54:23 +00:00
Caterina Shablia
d46b80249b panvk: enable subgroupSizeControl
This is trivial for us, the hardware only ever supports a single
subgroup size.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Erik Faye-Lund
1a81bff6aa panvk: expose vk1.1 on v10 hardware
Subgroup ops were the last bit missing

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Erik Faye-Lund
ac05c2a2b8 panvk: expose subgroup operations
We can't use VK_SHADER_STAGE_ALL here, because we don't support geometry
and tesselation shaders. Additionally, the DDK doesn't support the
vertex stage, so let's not even try that for now; it probably won't
work.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Caterina Shablia
d2838f3ceb pan/bi: handle barriers with SUBGROUP scope
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Caterina Shablia
f77a50e45e pan/bi: add a MEMORY_BARRIER pseudo-instruction
This is purely a scheduling barrier for memory instructions. We
need this to implement subgroup barriers.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:52 +00:00
Caterina Shablia
39bd5cba68 pan/bi: lower the rest of subgroup ops using nir_lower_subgroups
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
d5c5528e06 pan/bi: lower some subgroup intrinsics
Lower vote_any, vote_all, load_subgroup_id, load_subgroup_size and
load_num_workgroups.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
1b59b9edee pan/bi: handle ballot, ballot_relaxed and as_uniform
Implement as_uniform with a simple mov, as the HW doesn't have
uniform registers (registers shared by all threads in the warp)
like some other hardware does.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
a73a0592d6 pan/bi: handle read_invocation
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
47ed7d90af pan/va: fix WMASK packing
WMASK's subgroup argument wasn't being encoded so we'd always
end up with a WMASK.subgroup2.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Caterina Shablia
a96de77f8b pan/bi: fix a typo
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32710>
2025-01-22 21:49:51 +00:00
Lars-Ivar Hesselberg Simonsen
7b949dd8c4 panvk: Use LD_VAR_BUF[_IMM] when possible
If we determine that the amount of varyings will fit within the 8-bit
offset of LD_VAR_BUF[_IMM], instruct the compiler to use it for varyings
and skip setting up Attribute Descriptors.

This should save a bit of memory and overhead in reading varyings.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Lars-Ivar Hesselberg Simonsen
de86641d3f panvk: Limit AD allocation to max var loads in v9+
Introduce a varying load count pass to get the maximum amount of varying
loads from a fragment shader (prior to optimization passes), in order to
only allocate as many Attribute Descriptors as required. This will
generally lead to smaller buffers in SRT0 for fragment shaders.

As the amount of ADs is now dynamic based on the shader, we need to
lower varying loads early for fragment shaders in v9+, as the amount of
ADs will determine the offset for dummy_sampler, required during
nir_lower_descriptors.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Lars-Ivar Hesselberg Simonsen
6d5ae5b3af panvk: Use LD_VAR[_IMM] + ADs for varyings
The current implementation uses LD_VAR_BUF[_IMM] to look up varyings,
which limits the number of varying components to 64 due to an 8-bit
offset value.

As this does not align to maxVertexOutputComponents (128), this change
replaces the use of LD_VAR_BUF[_IMM] with LD_VAR[_IMM] + Attribute
Descriptors, which do not have this limitation.

As allocating Attribute Descriptors is potentially expensive, this can
be further optimized by falling back to LD_VAR_BUF[_IMM] in cases where
we can ensure we do not use more than 64 varying components.

This change currently does not change behavior for gallium/panfrost,
though that should be done as well.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Lars-Ivar Hesselberg Simonsen
7881d19d01 pan/genxml: Fix vertex_packet Attribute on v9+
The fields "Attribute stride" and "Packet stride" are in the wrong
order, and "Packet stride" should not be shr() modified.

This has probably not shown up as an issue before due to the use of
LD_VAR_BUF[_IMM] for varyings, which does not require us to create
Attribute Descriptors with type vertex_packet.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32969>
2025-01-22 20:57:18 +00:00
Valentine Burley
d57beebc8d freedreno/ci: Update expectations
Most of these results changed in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33158>
2025-01-22 20:26:15 +00:00
Mike Blumenkrantz
e1e622dfb0 zink: fix viewport detection when switching last stage shaders
the previous code checked e.g., VS -> GS binding, but it did not
correctly handle VS -> VS in order to toggle viewport state

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33144>
2025-01-22 17:07:53 +00:00
duncan.hopkins
4fa9c7d241 zink: stop zink_set_primitive_emulation_keys producing geometry shaders on platforms that do not support them.
If line smooth, stipple, quad_prims and a collection of other things are needed, zink produces a geometry shader to create them.

This code is disabling that from happening when there is no geometry shader support.
This removes a constant barrage of validation issues when trying to draw basic triangles.
Some of this missing functionality will be added back in later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33059>
2025-01-22 16:41:31 +00:00
Martin Roukala (né Peres)
6a4c99adf1 radeonsi/ci: update the vangogh expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33128>
2025-01-22 16:10:55 +00:00
Martin Roukala (né Peres)
7f2d03b81b zink/ci: update RADV expectations
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33128>
2025-01-22 16:10:55 +00:00
Martin Roukala (né Peres)
78624c41e3 zink/ci: update nvk expectations
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33128>
2025-01-22 16:10:55 +00:00
Marek Olšák
c4a8790fd7 zink/ci: skip KHR-Single-GL46...SizedDeclarationsPrimitive due to random timeout
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33157>
2025-01-22 15:32:25 +00:00
Pierre-Eric Pelloux-Prayer
d27748a76f radeonsi: use ac_drm_device_get_cookie
Instead of the raw ac_drm_device pointer which will be different
for each call to ac_drm_device_initialize.

Fixes: a565f2994f ("amd: move all uses of libdrm_amdgpu to ac_linux_drm")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33081>
2025-01-22 14:55:56 +00:00
Pierre-Eric Pelloux-Prayer
6cee989915 amd: add ac_drm_device_get_cookie
This returns the underlying device pointer but as an opaque
uintptr_t.
This will be required because libdrm_amdgpu will return the
same device when called multiple times from the same process.

radeonsi relies on the pointer value to identify if the device
are the same and adjust the synchronisation logic based on that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33081>
2025-01-22 14:55:56 +00:00
Erik Faye-Lund
ff91457761 pan/compiler: don't pass midgard_instruction by value
This is a large struct, so let's pass it by reference instead of by
value.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32851>
2025-01-22 13:50:44 +00:00
Erik Faye-Lund
80bacbba23 pan/midgard: constify pointers
This makes it easier to reason about what arguments are going to be
modified and what aren't.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32851>
2025-01-22 13:50:44 +00:00
Erik Faye-Lund
430f7e991f pan/midgard: use macros for mir_prev_op / mir_next_op
The benefit of macros here is that they don't care about constness,
which is going to be benefitial once we stricten constness a bit here.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32851>
2025-01-22 13:50:43 +00:00
David Rosca
a3871da932 radeonsi: Fix reporting support for AV1 Profile2
This reported support for Profile2 on all VCNs that support Profile0
and reported no supported formats if Profile2 was not supported.
Instead, we should not advertise the Profile2 at all if not supported.

Fixes: e359b3c525 ("radeonsi/vcn: support 12bit YUV420 AV1 decoding")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33092>
2025-01-22 13:17:50 +00:00
David Rosca
927f963726 gallium/auxiliary: Remove util_compute_blit
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
762a86c937 frontends/va: Implement format conversions in PutImage/GetImage
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
b3e666248b frontends/va: Support rotation and mirror for processing
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
7b2a1812cf frontends/va: Refactor vlVaPostProcCompositor to be usable outside processing
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
b7661be269 frontends/va: Stop using util_compute_blit
The progressive YUV shader used in vl_compositor_yuv_deint_full
does the same thing as util_compute_blit, but it also supports rotation.
Remove vlVaPostProcBlit and instead move the code to vlVaPostProcCompositor.

Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
24d69bdfe9 frontends/va: Disable color conversion for luma-only source formats
Fixes Y8_400 -> RGB conversion.

Cc: mesa-stable
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
375e301837 frontends/va: Simplify format check in PutSurface
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:04 +00:00
David Rosca
3bbdc54a15 gallium/vl: Implement rotation and mirror in cs compositor
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
David Rosca
dd4777736c gallium/vl: Use matrix for scale and crop in cs compositor
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
David Rosca
a1db69a8c3 gallium/vl: Clear remaining planes in YUV conversion
Fixes Y8_400 -> YUV conversion.

Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
David Rosca
7fac4e3c79 gallium/vl: Add vl compositor layer mirror
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
David Rosca
746ba9f2d2 gallium/vl: Fix sampler view components for Y8_400 format
Copy sampler view for last component to remaining components.
Fixes sampling from Y8_400 luma-only format.

Fixes: 8a20e634ce ("gallium/vl: Add plane order for Y8_400 format")
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
2025-01-22 12:49:03 +00:00
Lars-Ivar Hesselberg Simonsen
358dcdabba panvk: Fix valgrind issue in panvk_compile_shaders
Ensure we've read all the relevant NIR state before freeing it for the
current shader.

Also ensure we free the shaders in the same order we compile them.

Fixes: d93f9d6d1a ("panvk: use static noperspective when statically linking VS and FS")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33011>
2025-01-22 12:12:21 +00:00
Lars-Ivar Hesselberg Simonsen
eabf8054b8 panvk: Fix valgrind issue in nir_lower_descriptors
Initialize progress to false as it might not be set by NIR_PASS()

Fixes: 258979d69c ("panvk: Wrap our descriptor lowering passes in NIR_PASS()")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33011>
2025-01-22 12:12:21 +00:00
Erik Faye-Lund
365cd04375 panfrost: do not artificially limit texture-sizes
We're already limiting the maximum texture-size based on the available
system memory, so we shouldn't really need to limit this here. In
addition, the state-tracker also limits the max framebuffer size to
16384, so we don't have to worry about limiting this to the framebuffer
size either.

So I don't think we have a good reason to artificially limit the texture
size here. This allows us to support larger textures than 8192, which is
especially useful to support OpenCL images with RustiCL.

Unfortunately, while the HW supports up to 64k texture sizes, Gallium
currently caps us at 32k. So let's stick with that as the new limit for
now.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32866>
2025-01-22 10:09:24 +00:00
Erik Faye-Lund
3a5c606d20 panfrost: limit maximum texture size
We don't want huge textures to take up large amounts of system memory.

On a system with 1GB of RAM, this would limit us to 256 MB, which is the
same memory usage as a texture of 8192 x 8192 with 4 bytes per
component, which is what we currently limit max texture size to anyway.

The goal here is really to allow using larger textures on systems with
more memory, but that bit comes in a later patch in this series.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32866>
2025-01-22 10:09:24 +00:00
Erik Faye-Lund
c205777cb6 panfrost: reuse tiler hierarchy mask selection from panvk
We're doing a better job at selecting the tiler hierarchy mask in PanVK,
so let's move that to common code and reuse it for the Gallium driver as
well.

The logic to disable the first level for large tile-sizes has been left
at the call-sites, because this is specific to V10 GPUs and later, so it
doesn't apply to the JM code-paths.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32866>
2025-01-22 10:09:24 +00:00
Jose Maria Casanova Crespo
bfd29a55e5 v3d: Apply FBO resources invalidations on job creation
We can handle invalidation of the FBO attachments at job
creation. It solves that we were skipping invalidations in jobs
that had been created by a clear call, as before this change
invalidations were only taken into account the first draw calls
of the job. In these cases where there is a clear after FB
invalidation the resource attachment was tracked as invalidated
for more time than expected. So the stores of the job with the
clear were not being loaded by the next job attaching it because
of the not correct application of the invalidation.

Fixes: 6c46890325 ("v3d: avoid load/store of tile buffer on invalidated framebuffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12456
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33148>
2025-01-22 09:31:32 +00:00
Marek Olšák
09aa19fb64 gallium/u_threaded: sort cases in batch_execute by their occurrence
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:28:43 -05:00
Marek Olšák
f8c730158b gallium/u_threaded: inline all tc_call functions
There are no calls anymore. It's just a loop with a switch now, which should
be implemented as a jump table by the compiler. The only calls are to
the pipe_context functions.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
3692a50398 gallium/u_threaded: replace the function table with a switch and direct calls
gcc should generate a jump table for the switch, so it should be faster than
indirect calls after we inline the calls in the next commit.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
c2983d93da gallium/u_threaded: use TC_END_BATCH to terminate the loop
TC_END_BATCH (TC_NUM_CALLS) is always present as the batch terminator,
so use it

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
1776a12949 gallium/u_threaded: make the execute function table private
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
8f4173cadf gallium/u_threaded: move tc_batch_execute after all call functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33087>
2025-01-22 01:20:31 -05:00
Marek Olšák
bdd85c8393 nir: remove handling IO variables from passes used by st/mesa
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
2c5deaa98b st/mesa: inline st_finalize_nir_before_variants
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
02516ff0f9 nir: remove dead code due to IO being always lowered in st/mesa
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
f29530533c glsl: simplify nir_lower_io_to_temporaries logic
no change in behavior

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
b7c4a1479e glsl: remove dead code due to IO being always lowered
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
000679b9bf st/mesa: remove dead/no-op code due to IO being always lowered
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Marek Olšák
3e32ea3232 st/mesa: assert that all incoming shaders use lowered IO
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146>
2025-01-22 02:15:04 +00:00
Valentine Burley
aa37e2e5cb android/ci: Build ANV for Android
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33132>
2025-01-22 01:15:22 +00:00
Valentine Burley
b53d09a417 android/ci: Allow specifying Vulkan driver in cuttlefish-runner.sh
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33132>
2025-01-22 01:15:22 +00:00
Iván Briano
de244bcdb0 vulkan: calculate remaining layers of 2d view of 3d image correctly
When a 2D_ARRAY view of a 3D image is created, the layer count of the 2D
view should be based on the depth of the 3D image. When
VK_REMAINING_ARRAY_LAYERS is used, we were incorrectly calculating them
from the layer count of the base image.

Fixes future tests: dEQP-VK.renderpass*.remaining_array_layers.*

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33075>
2025-01-22 00:33:16 +00:00
Matt Turner
c9007999f6 elk: Pass number and sizeof separately to calloc
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
82330eca3c elk: Bounds check access to p->store
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
262546eb0b elk: Pass brw_codegen to next_offset
In the next commit we will use this to assert that we are not reading
past the end of `p->store`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
7c6f4a6041 elk: Avoid reading past the end of p->store
On the last iteration of the loop, `offset` will point to the location
just beyond the last instruction in the program. If the program exactly
fills `p->store` then calling `next_offset()` will read out of bounds.

Instead just let the inner while loop call `next_offset()` one
additional time.

Fixes: a35b9cb625 ("i965: Add annotation data structure and support code.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12486
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
88fd100f97 brw: Pass number and sizeof separately to calloc
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:56 +00:00
Matt Turner
21bb7785bb brw: Bounds check access to p->store
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:55 +00:00
Matt Turner
ab037b5daf brw: Pass brw_codegen to next_offset
In the next commit we will use this to assert that we are not reading
past the end of `p->store`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:55 +00:00
Matt Turner
a4f0a96dda brw: Avoid reading past the end of p->store
On the last iteration of the loop, `offset` will point to the location
just beyond the last instruction in the program. If the program exactly
fills `p->store` then calling `next_offset()` will read out of bounds.

Instead just let the inner while loop call `next_offset()` one
additional time.

Fixes: a35b9cb625 ("i965: Add annotation data structure and support code.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12486
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33101>
2025-01-21 22:58:55 +00:00
Rob Clark
27284d14fd tu: Fix raytracing query with vdrm
Need to query the cap _before_ we close the connection.

Fixes: 4a5b234d5e ("tu: Plumb through raytracing fuse")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33139>
2025-01-21 21:51:22 +00:00
Xaver Hugl
9f0567b2ab vulkan/wsi: unset GAMMA_LUT, CTM and DEGAMMA_LUT when doing a modeset
Another drm master may have previously set these to non-zero values, which
can change the image in undesired ways.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Backport-to: 24.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32670>
2025-01-21 21:09:16 +00:00
Georg Lehmann
ee5017a0fa nir/opt_algebaric: convert fadd(a, a) to a * 2.0
On AMD, this is a clear win. 2.0 is a free constant,
the multiplication can be fused into fma, or it can
be done as a free output modifier. Otherwise, fmul
and fadd have the same throughput/latency, with the only
possible downside being potentially power consumption.

For other hardware this might not be as clear,
but we should at least choose one option for NIR because
it allows more CSE.

Foz-DB Navi21:
Totals from 12231 (15.41% of 79395) affected shaders:
MaxWaves: 309068 -> 309032 (-0.01%)
Instrs: 11826395 -> 11790132 (-0.31%); split: -0.31%, +0.00%
CodeSize: 63531496 -> 63512868 (-0.03%); split: -0.03%, +0.00%
VGPRs: 551256 -> 551328 (+0.01%); split: -0.00%, +0.02%
SpillSGPRs: 984 -> 979 (-0.51%)
Latency: 88486492 -> 88394296 (-0.10%); split: -0.11%, +0.01%
InvThroughput: 22360595 -> 22300790 (-0.27%); split: -0.27%, +0.00%
VClause: 226267 -> 226273 (+0.00%); split: -0.01%, +0.01%
SClause: 293820 -> 293783 (-0.01%); split: -0.02%, +0.00%
Copies: 727187 -> 727106 (-0.01%); split: -0.03%, +0.02%
PreSGPRs: 539623 -> 539625 (+0.00%)
PreVGPRs: 440843 -> 440946 (+0.02%); split: -0.00%, +0.03%
VALU: 8324962 -> 8288809 (-0.43%); split: -0.43%, +0.00%
SALU: 1278550 -> 1278538 (-0.00%); split: -0.00%, +0.00%
VMEM: 440600 -> 440599 (-0.00%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32989>
2025-01-21 20:28:04 +00:00
Marek Olšák
43d3451fdb mesa: switch fixed-func vertex program to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053>
2025-01-21 19:38:54 +00:00
Marek Olšák
3290222a1a st/mesa: move VS & TES output stores to the end before unlowering IO
required by vc4 & vc5

Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053>
2025-01-21 19:38:54 +00:00
Marek Olšák
b65973240c nir: add a pass that moves output stores to the end of the shader
required by vc4 & vc5 to merge the rest of the lowered IO code for st/mesa

Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053>
2025-01-21 19:38:54 +00:00
Rob Clark
15ada70677 freedreno/pps: Fix multiple counter collection runs
The drm device file is closed and re-opened between perfetto traces.  So
we either need to re-create the fd_device, or use fd_device_new_dup() so
we hold on to our own fd.  The former is preferred so that the kernel
can realize when we are no longer reading the perfcntrs.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33073>
2025-01-21 18:23:52 +00:00
Caio Oliveira
fb09dac988 intel/brw: Remove 'fs' prefix from reg alloc code
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33112>
2025-01-21 07:33:49 -08:00
Caio Oliveira
62dd470d0a intel/brw: Rename brw_fs_reg_allocate.cpp to brw_reg_allocate.cpp
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33112>
2025-01-21 07:33:49 -08:00
Pierre-Eric Pelloux-Prayer
40308ef6e5 egl/wayland: validate dri_screen_display_gpu before use
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12370
Fixes: d795b4712c ("egl/wayland: only supply LINEAR modifier when supported")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
2025-01-21 14:33:14 +00:00
Pierre-Eric Pelloux-Prayer
1021d6fe62 dri: deal with ARGB1555
This helps fixing "glx-visuals-... -pixmap" which uses this
format.

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
2025-01-21 14:33:13 +00:00
Pierre-Eric Pelloux-Prayer
910c18df6c dri: use _checked variants of xcb requests
Requests with no reply will report errors by default to the event
loop, which then usually cause the not very useful log like this
to be printed:

X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  149 ()
  Minor opcode of failed request:  2
  Serial number of failed request:  33
  Current serial number in output stream:  34

This commit introduce some helpers to handle the xcb errors in Mesa,
and be able to report errors properly.
For instance the same error will now log:

MESA: error: dri3_alloc_render_buffer:1634 xcb_dri3_pixmap_from_buffer[s] failed
MESA: error: X error: 11

It's not fixing the underlying issue, but at least now tests like
"glx-visuals-stencil -pixmap" and "glx-visuals-depth pixmap" fail
properly.

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
2025-01-21 14:33:13 +00:00
Pierre-Eric Pelloux-Prayer
b307951648 glx: fix glx-create-context-invalid-es-version
* GLES3.x is only valid for x <= 2
* The expected error is GLXBadProfileARB, not BadValue

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
2025-01-21 14:33:13 +00:00
Martin Roukala (né Peres)
e536ed0824 freedreno/ci: use the boot watchdog to ensure the a750 boots
This allows us to drop the reboot condition on SaharaMode which means
that every time the reboot pattern is hit, it is due to a test
execution issue (GPU hang) and not something unrelated to the job.

Additionally, this allows us to try booting up to 5 times which should
help boot reliability.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32572>
2025-01-21 12:46:31 +00:00
Martin Roukala (né Peres)
047d3953ee ci/b2c: allow defining a boot watchdog
This will be helpful for DUTs that do not boot reliably due to firmware
issue as it will allow us to specify a boot retry count that only
counts towards booting linux and not other issues found during test
execution (like hitting a GPU hang).

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32572>
2025-01-21 12:46:31 +00:00
Martin Roukala (né Peres)
82557f9141 ci/b2c: use the runner description rather than ID
Gitlab's runner ID is an integer while CI-Tron's is a string. Let's use
the runner description in the job description since this is what
CI-Tron expects.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32572>
2025-01-21 12:46:31 +00:00
Marek Olšák
de790c3c5f Revert "ac/llvm: enable wqm for ac_build_quad_swizzle from ac_build_fs_interp_mov"
This reverts commit 9d4d9e6150.

It breaks on Navi31:
  * KHR-GL46.shaders.uniform_block.instance_array_basic_type.shared.bvec3,Fail
  * KHR-GL46.shaders.uniform_block.instance_array_basic_type.std140.bvec3,Fail
  * KHR-GL46.shaders.uniform_block.random.all_per_block_buffers.13,Fail
  * KHR-GL46.shaders.uniform_block.random.all_per_block_buffers.3,Fail
  * KHR-GL46.shaders.uniform_block.single_basic_array.shared.bvec3,Fail
  * KHR-GL46.shaders.uniform_block.single_basic_array.std140.bvec3,Fail
  * KHR-GLES3.shaders.uniform_block.instance_array_basic_type.shared.bvec3,Fail
  * KHR-GLES3.shaders.uniform_block.instance_array_basic_type.std140.bvec3,Fail
  * KHR-GLES3.shaders.uniform_block.random.all_per_block_buffers.13,Fail
  * KHR-GLES3.shaders.uniform_block.random.all_per_block_buffers.3,Fail
  * KHR-GLES3.shaders.uniform_block.single_basic_array.shared.bvec3,Fail
  * KHR-GLES3.shaders.uniform_block.single_basic_array.std140.bvec3,Fail
  * dEQP-GLES3.functional.ubo.instance_array_basic_type.shared.bvec3_both,Fail
  * dEQP-GLES3.functional.ubo.instance_array_basic_type.std140.bvec3_both,Fail
  * dEQP-GLES3.functional.ubo.random.vector_types.24,Fail
  * dEQP-GLES3.functional.ubo.single_basic_array.shared.bvec3_both,Fail
  * dEQP-GLES3.functional.ubo.single_basic_array.std140.bvec3_both,Fail

Fixes: 9d4d9e6150
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33118>
2025-01-21 11:58:37 +00:00
Samuel Pitoiset
f4cd2d1c3f radv: use global atomics for generated/written primitives query on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
0901f8fc25 radv: emit the shader buffer query VA on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
2f86338ba3 radv: allocate memory for the shader query buffer on GFX12
The allocation is done on-demand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
15a69991fe radv: lower emulated queries with global atomics on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
a2069b1b26 radv: declare a new user SGPR for emulating queries on GFX12
GDS is gone on GFX12 and generated/written primitives queries need to
be emulated using global atomics. This new user SGPR will be used to
pass the 32-bit VA of the shader query buffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33041>
2025-01-21 08:42:32 +00:00
Samuel Pitoiset
b942e285c3 radv: fix transform feedback on GFX12
The original implementation based on RadeonSI was broken for
pause/resume and for indirect draws with a counter buffer basically.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33017>
2025-01-21 08:05:20 +00:00
Samuel Pitoiset
1f253700bc radv: do not overallocate the number of exports for streamout on GFX12
This shouldn't be needed because GE_GS_OREDERD_ID is always reset to 0
when streamout is started. Thus it's technically impossible that the
ordered ID is more than 12-bit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33017>
2025-01-21 08:05:19 +00:00
Samuel Pitoiset
d4ff011b12 radv: advertise VK_KHR_maintenance8
There is nothing to do for
VK_PIPELINE_CACHE_CREATE_INTERNALLY_SYNCHRONIZED_MERGE_BIT_KHR because
the vulkan/runtime code already locks the dstCache unconditionally.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33091>
2025-01-21 07:28:14 +00:00
Samuel Pitoiset
40131ddadc radv: adjust the source aspect for color to depth/stencil image copies
The opposite is already supported. Note that only one aspect (depth or
stencil) is supported when it's a copy<->depth/stencil copy, and
multiplanar images aren't supported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33091>
2025-01-21 07:28:14 +00:00
Samuel Pitoiset
3be1e9ee4d radv: add support for VkMemoryBarrierAccessFlags3KHR
There is no flags yet.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33091>
2025-01-21 07:28:14 +00:00
Patrick Lerda
e802793dd5 r600: fix r600_init_screen_caps() has_streamout issue
Indeed, has_streamout is not yet properly initialized at the time
of the call of r600_init_screen_caps(). This change fixes this
issue.

Here is the issue visible on palm at the glxinfo level; the right column is affected:
    Preferred profile: core (0x1)	      |	    Preferred profile: compat (0x2)
    Max core profile version: 4.5	      |	    Max core profile version: 0.0
    Max compat profile version: 4.5	      |	    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1		    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1	      |	    Max GLES[23] profile version: 2.0

Fixes: 7cd606f01b ("r600: add r600_init_screen_caps")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33106>
2025-01-21 01:46:26 +00:00
Samuel Pitoiset
efab1885b7 ac/sqtt: update programming SQTT on GFX12
This is pure guess but I think GFX12 now uses 48-bits VAs for
configuring the SQTT buffer. This isn't yet enough to generate a
capture because it's missing some info I don't know, but it's a start.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33068>
2025-01-20 23:50:10 +00:00
Samuel Pitoiset
05bfa317a0 radv: remove duplicate definition of SQTT_BUFFER_ALIGN_SHIFT
It's already defined in ac_sqtt.h.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33068>
2025-01-20 23:50:10 +00:00
Karol Herbst
e9d4030fb7 trace: add get_compute_state_info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33119>
2025-01-20 23:15:31 +00:00
Karol Herbst
f77fea3ba8 trace: copy pipe_caps
Otherwise they are all 0 and frontends might be misbehaving a lot.

Fixes: a036231c09 ("gallium: add u_init_pipe_screen_caps")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33119>
2025-01-20 23:15:31 +00:00
Mike Blumenkrantz
48d0a0322f glsl: plumb num_views down to shader_info::view_mask
this is needed for drivers to more effectively compile multiview-enabled
shaders

Reviewed-by: Timothy Arceri <tarceri@itqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33016>
2025-01-20 22:43:23 +00:00
Danylo Piliaiev
732101d609 tu: Do not disable LRZ for whole RP if it is disabled in RP
It's not rare when only last few draws in a big renderpass disable
LRZ, we shouldn't bail out in such case.

If LRZ is disabled in dir tracking bit during binning - LRZ would
be disabled for the whole IB in the tiling step, so we should avoid
disabling via dir tracking bit and track the state inside the driver.
This doesn't work with secondary command buffers (and renderpass
resume/suspend), in such cases we have to disable LRZ via dir tracking
bit, if LRZ is not valid.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
d6684aedf4 tu: Track at which draw call LRZ is disabled
Aside from displaying in a tracepoint, it would be useful in order
to decide whether to disable LRZ for the whole renderpass.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
33083d580a freedreno,tu: Unify LRZ layout calculations
Now with nolrzfc the memory for fast-clear will be allocated but
fast-clear itself will not be used.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
5a4b28e77c tu: Handle 8x MSAA for LRZ
Fixes: be9f2e5189
("tu/a7xx: support 8x MSAA")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
1eee114756 tu: Fix LRZ for arrayed depth
It just didn't work at all.

CC: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
a521253a3f freedreno/regs: Set correct shr for GRAS_LRZ_BUFFER_PITCH.ARRAY_PITCH
CC: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Danylo Piliaiev
7dee7956f2 tu: Do not re-calculate static blend LRZ state
If blend LRZ state was already calculated from static info,
re-calculating it with dynamic state would bring stale values
and therefor result in a wrong calculations.

This resulted in LRZ being disabled when it should have not in
native VK titles.

CC: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32868>
2025-01-20 22:07:24 +00:00
Job Noorman
20cb4eeba6 ir3/ra: allocate shared collects dst over its srcs when possible
Currently, when allocating the dst of shared collects, the registers of
its srcs would only be reused if they are killed. This results in a lot
of needless moves due to suboptimal register allocation.

This commit addresses this generically: allow unavailable registers to
be used for a new dst iff it shares a merge set with, and has the same
offset as, the currently live value.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32021>
2025-01-20 21:35:39 +00:00
Job Noorman
6c776793ba ir3/ra: fix non-trivial collect detection
Detecting non-trivial collects after the fact, i.e., once they are
created by a register assignment of their dst, does not work as this may
cause two different intervals to share a physreg. For example:

_meta:collect sssa_361:150(r50.x) (wrmask=0xf),
              sssa_19:12(r50.x), sssa_103:13(r50.y),
              sssa_355:102(r51.z), sssa_356:103(r51.w)

This is a non-trivial collect with a partial overlap with one of its
child intervals. After moving its dst to a new interval, it will have
the same physreg as the existing interval for sssa_19, causing all sorts
of trouble for RA.

Prevent this by detecting that a future collect may become non-trivial
at the moment one of its sources gets a register assignment that does
not correspond with it merge set's preferred reg and allocating a new
interval for this component.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: b36a7ce0f1 ("ir3/ra: prevent moving source intervals for shared collects")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32021>
2025-01-20 21:35:39 +00:00
Aleksi Sapon
43ff387aa6 llvmpipe: disable anisotropic filtering for non-2D textures
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33103>
2025-01-20 21:01:36 +00:00
Samuel Pitoiset
fd8ed50812 zink/ci: add lists for RADV/GFX1200
Copied from NAVI31.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33125>
2025-01-20 20:40:54 +00:00
Samuel Pitoiset
de9d8a23d2 radv: add a helper to report if cooperative matrix is enabled
To avoid duplicating checks.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33120>
2025-01-20 13:58:13 +00:00
Yogesh Mohan Marimuthu
bfa6b9b655 winsys/amdgpu: ensure strict order in updating mqd wptr and doorbell
Need to use mfence to strictly order mqd wptr update and ringing doorbell
in cpu. If the compiler or cpu re-orders it, commands will be missed.

Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32700>
2025-01-20 09:28:10 +00:00
Yogesh Mohan Marimuthu
57f28ad47f winsys/amdgpu: use next_wptr as cache for userq
The userq packets are added using _pkt_begin(), _pkt_add(), _pkt_end()
functions. As of now _pkt_being() and _pkt_add() is called once. It
is not advisible to update wptr value in mqd multiple times. Hence use
next_wptr as cache in the macros and update mqd mptr before job submission
only once.

Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32700>
2025-01-20 09:28:10 +00:00
Yogesh Mohan Marimuthu
acbfcb4d36 winsys/amdgpu: ring doorbell before calling userq_signal ioctl
The signal ioctl should only be called after guaranteeing that the hardware
started working on the submissions and that is only after doorbell is ringed.

Otherwise it can in theory happen that the application creates the fence and
is then interrupted before ringing the doorbell. That can result in a GPU
reset because the fence times out.

Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32700>
2025-01-20 09:28:10 +00:00
Ivan Avdeev
14e3231b56 radv: add a flag to indicate ray tracing support
Determine whether the device has hardware raytracing support early, and
then use this result where needed, instead of checking for `gfx_level`
every time.

This is a prerequisite for CYAN_SKILLFISH chip enablement. This chip is
still GFX10, not GFX10_3, but has hardware support for accelerated
`image_bvh{,64}_intersect_ray` instructions. Just checking for `gfx_level`
is insufficient for it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33109>
2025-01-20 08:27:11 +00:00
Connor Abbott
cc7be2b2b3 ir3: Use nir_split_struct_vars for temporaries
This should let us lower the RT query stack to registers instead of
scratch by getting rid of the rest of the members of the ray query
struct. This gives a 24% decrease in total time for 3DMark InVitro.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
f3f0c5048d tu, ir3: Implement a750 RT workaround
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
967ea4bbbb tu: Expose VK_KHR_ray_tracing_maintenance1
All of the features were already implemented in the initial bringup.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
36e46b4ada tu: Support VK_KHR_ray_query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
671e3a65a6 tu: Support VK_KHR_acceleration_structure
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
78b5999c1e tu: Display when raytracing is disabled in device string
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
46cd7faed3 tu: Move fd_dev_info() before name generation
Remove the redundant error that will never be hit in practice (because
if fd_dev_name() succeeds then so will fd_dev_info()) and move it up so
that we can use the info when generating the name.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
4a5b234d5e tu: Plumb through raytracing fuse
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
9249a189ca tu/kgsl: Bump uapi header
From commit 809ee24fe560.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
18550fb41b freedreno: Introduce ray tracing features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
cdb1857a4d tu: Create meta device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
c103d5a05e tu: Add common define for maxTexelBufferElements
I will want to use this HW property elsewhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
80649e148d tu: Implement unaligned dispatches
These will be used for BVH building.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
1bee1a9301 tu/a7xx: Emit HLSQ_CS_LAST_LOCAL_SIZE dynamically
We'll need this to implement unaligned dispatches.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
92f043465d tu: Stop emitting HLSQ_CS_KERNEL_GROUP_*
It's already emitted by CP_EXEC_CS and CP_EXEC_CS_INDIRECT, we were just
setting it to a wrong value before it was overwritten.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
1edeeb3d13 freedreno/a7xx: Document partial workgroup register
This lets us implement "unaligned" dispatches without inserting shader
code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
b8cb00c64a freedreno: Add new a7xx CP_REG_RMW and CP_REG_TO_SCRATCH fields
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
a1235ddba8 freedreno: CP_SCRATCH_WRITE exists on a7xx too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
24a1d54502 tu: Implement buffer_write_cp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
7073a8d458 tu: Implement cmd_fill_buffer_addr internal function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
2d45836c95 ir3: Plumb through ray_intersection intrinsic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
91f19bcbe0 ir3: Plumb through two-dimensional UAV loads
There is native support for D3D-style untyped UAVs, which are an unsized
array of "records."

This will be needed for acceleration structures, because normal SSBO
descriptors aren't large enough to cover all the 128-byte instance
descriptors for the maximum number of instances (2**24).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
b6ae20f2d6 ir3: Support assembling/disassembling ray_intersection and resbase
These instructions are used for ray tracing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:23 +00:00
Connor Abbott
3a5cb40c1f ir3: Allow collect sources to be undef
Undef collect sources will never have a move materialized for them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:22 +00:00
Connor Abbott
c2c48db6a4 vk/bvh: Fix clang build error with turnip
Make sure that struct vk_bvh_geometry_data is defined before
vk_fill_geometry_data(), to fix this error:

In file included from ../src/freedreno/vulkan/tu_acceleration_structure.cc:29:
../src/vulkan/runtime/vk_acceleration_structure.h:138:1: error: 'vk_fill_geometry_data' has C-linkage specified, but returns incomplete type 'struct vk_bvh_geometry_data' which could be incompatible with C [-Werror,-Wreturn-type-c-linkage]

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447>
2025-01-20 01:22:22 +00:00
Caio Oliveira
793cba0e6f intel/brw: Apply conventions to lower_src_modifiers helper
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33110>
2025-01-19 08:24:09 -08:00
Timothy Arceri
7d41cfa1a9 glsl: enable layout qualifier if OVR_multiview enabled
OVR_multiview requires 1.30 but makes use of layout qualifier

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33074>
2025-01-19 01:10:54 +00:00
Caio Oliveira
d7d210fed4 intel/brw: Move shuffle_from_32bit_read implementation to brw_builder
Make it a member function for convenience -- since another
member function uses it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33108>
2025-01-18 20:48:57 +00:00
Caio Oliveira
b3001e4946 intel/brw: Move a few builder helpers to brw_builder.h/cpp
Add brw prefix when necessary.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33108>
2025-01-18 20:48:57 +00:00
Lionel Landwerlin
10a4dc529f blorp: disable PS shaders with depth/stencil HiZ ops
Found on simulation, complaining about SIMD32 shaders enabled when
using MSAA 16x.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30753>
2025-01-18 17:52:19 +00:00
Caio Oliveira
1043187ec6 intel/brw: Stop using namespace for brw_builder
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33076>
2025-01-18 16:12:56 +00:00
Caio Oliveira
5ac82efd35 intel/brw: Rename fs_builder to brw_builder
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33076>
2025-01-18 16:12:55 +00:00
Caio Oliveira
f2d4c9db92 intel/brw: Rename brw_fs_builder.h to brw_builder.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33076>
2025-01-18 16:12:54 +00:00
Caio Oliveira
f0fe0026c0 intel/brw: Remove extra wrapping around fs_visitor in tests
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33100>
2025-01-18 07:41:35 -08:00
Konstantin Seurer
70767b9cd4 docs: Add documentation for NIR unit testing
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
01ec2f59a4 nir/print: Do not print trailing spaces after preds/succs
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
6ddd791d6b nir: Add a test runner
The test runner can automatically update reference shaders when the
result changes.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
eb3ab68e5e nir/tests: Add reference shaders
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
8838a0c595 nir/tests: Add a helper for comparing a shader against a string
This allows unit tests to compare against a reference nir shader instead
of implementing checks for interesting instructions/CF nodes.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
6d1d15183f nir/tests: Improve shader creation
Sets some fields so they are not printed and allows specifying a stage.
This decreases the size of reference shaders.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Konstantin Seurer
305be9cf5e nir/print: Print less unused shader info
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32644>
2025-01-18 11:02:25 +00:00
Caio Oliveira
94fa449318 intel/brw: Add missing cases to flags_written()
These virtual opcodes will write the whole flag set, either directly
(via brw_fill_flag()) or indirectly by using LOAD_LIVE_CHANNELS.

Issue was found when analysing a hang that would disappear
if the lowering of those opcodes was pulled all the way up
right before brw_opt_cmod_propagation (which uses the
flags_written).

Fixes: 019770f026 ("intel/brw: Add SHADER_OPCODE_VOTE_*")
Fixes: 2bd7592b0b ("intel/brw: Add SHADER_OPCODE_BALLOT")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12347
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12479
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33085>
2025-01-18 05:30:23 +00:00
Samuel Pitoiset
0a4584a684 radv: bump maxViewportDimensions to 32K on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33064>
2025-01-17 21:10:23 +00:00
Mike Blumenkrantz
3d7d303dc5 zink: enable maintenance8
this avoids validation errors from 3d<->2d blits

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33102>
2025-01-17 20:46:43 +00:00
Mike Blumenkrantz
0d29ddb328 lavapipe: maintenance8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33098>
2025-01-17 19:41:45 +00:00
Mike Blumenkrantz
c285a2a354 lavapipe: support zs<->color copies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33098>
2025-01-17 19:41:45 +00:00
Mike Blumenkrantz
00d478d96d lavapipe: abort on unsupported depth copy ops
better than silently failing

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33098>
2025-01-17 19:41:45 +00:00
Mike Blumenkrantz
7e8c13ea64 lavapipe: fix 3D->2D blitting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33098>
2025-01-17 19:41:45 +00:00
Samuel Pitoiset
2ba91d1deb radv: promote VK_EXT_depth_clamp_zero_one to KHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33090>
2025-01-17 19:02:02 +00:00
Lionel Landwerlin
f96e95fcc9 anv: remove print lowering
This is handled by the back compiler.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:46 +00:00
Lionel Landwerlin
e1074f5bd4 anv: update debug printf example code
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Lionel Landwerlin
2603dbd796 nir: make lower-level printf helper respect buffer size
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Lionel Landwerlin
58a3ef4160 anv: handle printf buffer size relocations
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Lionel Landwerlin
d63b5fc8c5 brw: handle load_printf_buffer_size intrinsic
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
c1e685bfe9 util,vulkan,asahi,hk: hash format strings
flag day change to use the new infra. as-is this is a bit pointless, but it
unblocks the new bindgen work.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
43e79b26de nir/lower_printf: drop static buffer addr lowering
no longer used, replaced by the new pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
c4bd2e691b agx: defer printf address lowering
this will be needed with vtn_bindgen2

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
07ad850787 nir: add nir_lower_printf_buffer pass
this is a helper for lowering the printf buffer intrinsics to constants for
backend convenience.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
7bc9bbcc6e nir/lower_printf: support dynamic buffer size
this is required for vtn_bindgen2 where we don't know the buffer size until
the driver-specific code paths, but we need to lower printf (to hash format
strings) in common code. so defer the buffer size decision to an intrinsic.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
6db9218ec3 nir/lower_printf: add option to hash format strings
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
dd66287e63 util/u_printf: allow printing from singleton
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
007f60c8b8 util/u_printf: add singleton implementation
Currently, nir_lower_printf depends on a per-nir_shader table, writing out
indices into the printf buffer. This works for real OpenCL implementations
(rusticl, microsoft) which can associate the printf buffer with a particular
kernel, I guess. (Actually it's not clear to me that it works well there either
but that's not my problem.)

This mechanism is unsuitable for internal driver shaders, where printfs with
unique format strings can come from many different nir_shaders. There are two
current solutions in tree to this for driver CL:

* Honeykrisp: Only use one single nir_shader (libagx). This prevents us from
  using printf in common CL and requires extra driver tracking. It won't work
  with my upcoming vtn_bindgen rework, which is why I'm addressing this now.

* Anv: Offset format-string indices by a dynamic "base identifier" using relocs
  or a push constant, then pool format strings into a table from nir_shader's
  across the device. The problem here is that these indices now depend on the
  order that nir_shaders are seen (which causes a mess for caching if relocs are
  used, or requires extra push constants and extra bookkeping if relocs aren't
  used). And the driver tracking required to do this pooling correctly is even
  more complicated than what Honeykrisp does. I do not want every driver in-tree
  needing to go down this path, and it wouldn't work with my upcoming
  vtn_bindgen.

This MR introduces an alternate approach: rather than writing indices into the
table, we instead hash the format string itself and write the hash. That doesn't
depend on what nir_shader we came from, so we can freely mix & match and get
consistent hashes. That greatly alleviates driver tracking burden. To make that
possible, we need a global hash table mapping hashed format identifiers to the
format strings themselves.

That approach still requires a step to "register" format strings into the table.
That step would not be required if we wrote the actual strings themselves into
the table, but that was ruled out for performance/code size reasons. However, we
do not want drivers to need to explicitly register all the strings they use,
because once we have OpenCL in common code via vtn_bindgen2, drivers won't know
all the strings they use. Fortunately, there's a neat solution for that too.

By making this global table a singleton (with internal locking), vtn_bindgen2
can automatically register format strings via a static constructor. In
conjunction with the infrastructure added here, that eliminates all driver
bookkeeping required for format-strings.

The code itself is inspired by the glsl type singleton. Is it pretty? Not
really, but it gets the job done well.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
48dbfba17a util: add u_printf_hash helper
for hash-based printf. this just shells out to XXH - convenience wrapper.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
e1368f0a30 nir,util: move printf serializing into util
there's nothing NIR specific here and these routines will be useful otherwise.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
47e16cab5e nir/lower_printf: drop default max buffer size
no uses and it doesn't make sense.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
621ff262bc nir/lower_printf: drop null check
we derefernce options above.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Alyssa Rosenzweig
e7a1d704d0 intel: set max_buffer_size to nir_lower_printf
instead of relying on an implicit value which doesn't make much sense.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33067>
2025-01-17 18:09:45 +00:00
Gurchetan Singh
61d66a6ea7 gfxstream: fix some integration bugs
- Fix end2end test target (AOSP-only)
- Fix decoder to use host vk_util.h, not guest
- typo fixes

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33077>
2025-01-17 17:26:45 +00:00
Samuel Pitoiset
78f5dfca86 vulkan: Update XML and headers to 1.4.305
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33089>
2025-01-17 16:42:27 +00:00
Mike Blumenkrantz
667745857d lavapipe: handle VK_REMAINING_ARRAY_LAYERS with HIC
this otherwise goes oob and crashes

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33071>
2025-01-17 15:35:09 +00:00
Lu Yao
7679102b45 zink: fix decomposed_attrs val error when zink_vs_key->size is 4
decomposed_attrs and decomposed_attrs_without_w should get from vs->u32
when zink_vs_key->size is 4.

Fixes: 19fbdb9064 ("zink: move shader keys to be persistent on pipeline state")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33079>
2025-01-17 14:51:49 +00:00
Karol Herbst
0b6446efe2 rusticl/mem: use get_res_for_access instead of get_res_of_dev
Fixes multi-device cl_mem support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:39 +00:00
Karol Herbst
2c2c06b93e rusticl/mem: add Allocation::is_user_alloc_for_dev
get_res_of_dev will entirely be reworked, but there is one user only
wanting to know if the allocation is a user_ptr one.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:39 +00:00
Karol Herbst
de8b2f108e rusticl/mem: rework last user of get_parent() and remove it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:39 +00:00
Karol Herbst
944f47f103 rusticl/mem: reimplement has_same_parent and rename it to backing_memory_eq
We actually want to know if the backing memory is the same, it's also
easier to implement than checking on the parent memory object.

This will also allow for more flexibility if more memory types are
supported, e.g. proper SVM allocations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:39 +00:00
Karol Herbst
787d3b0ffc rusticl/mem: add Allocation type
This will handle the raw memory operations in the future, mostly focused
on guaranteeing consistency across devices.

It also handles sub allocation because it is the better place of tracking
this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:38 +00:00
Karol Herbst
e118fb6492 rusticl/mem: simplify is_svm implementation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:38 +00:00
Karol Herbst
e74ad38204 rusticl/device: add unsynchronized mapping functions to helper context
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32581>
2025-01-17 14:09:38 +00:00
Zan Dobersek
0cf29bf0ce freedreno/a7xx: fix fd_lrzfc_layout
Various vkd3d-proton tests run via Turnip exposed an issue with the
a7xx-specific instantiation of the fd_lrzfc_layout struct used to allocate
memory for LRZ fast-clear operations.

The correct layout is quite bigger in size, and the duplicated FC buffers
are positioned at the beginning and the end of it. Smaller part of the area
in the middle is used for metadata, but it already seems to be used more
extensively than how we currently understand it.

Fixes in vkd3d-proton on tu/a750:
  test_clear_depth_stencil_view
  test_copy_texture
  test_early_depth_stencil_tests

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33080>
2025-01-17 13:32:38 +00:00
Caleb Callaway
aae9a2c399 docs: clarify ASPM performance tips
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33052>
2025-01-17 13:21:38 +00:00
Valentine Burley
de6f654b60 pan/ci: Document some flakes
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33086>
2025-01-17 12:50:20 +00:00
Erik Faye-Lund
90d5366b2a pan/ci: drop empty trailing variables-list
This job is somehow failing to expand $RUNNER_TAG, and it seems to have
happened around the time that the last entry from the variables list was
removed.

Let's remove this, it's no longer needed anyway. And it seems to fix the
problem, so yay.

Fixes: 61d9c47944 ("ci/lava: Use CI_JOB_TIMEOUT instead of separate variable")
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33086>
2025-01-17 12:50:20 +00:00
Vignesh Raman
3f8046fd3e ci: export RESULTS_DIR in crosvm-script.sh
Export the RESULTS_DIR environment variable in crosvm-script.sh
to ensure it points to the correct directory. Without this,
artifacts are not generated because the results directory is
created in the wrong location after the directory changes in the VM.

Also fix https://www.shellcheck.net/wiki/SC2129 shellcheck error.

Suggested-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33023>
2025-01-17 12:08:49 +00:00
Erik Faye-Lund
2f168fe92c docs/features: mark panfrost as supporting GL_OES_texture_view
We've been supporting this for a while, let's make sure it's documented
correctly.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33057>
2025-01-17 12:00:14 +00:00
Erik Faye-Lund
1e8a017de3 docs/features: add a few missing extensions
Here's a few extensions we've forgotten to report in features.txt

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33057>
2025-01-17 12:00:14 +00:00
Samuel Pitoiset
c84b1dda0b ac/nir: fix skipping streamout when no buffers are bound on GFX12
RadeonSI compiles shader variants with streamout disabled but RADV
doesn't do that. The alternative solution is to set the streamout
buffer size to 0 to indicate that streamout isn't bound.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33058>
2025-01-17 11:24:55 +00:00
Samuel Pitoiset
ede0d534ef radv: add GFX12 support to the null winsys
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33063>
2025-01-17 10:51:49 +00:00
Erik Faye-Lund
3f8a524c20 pan/ci: add some occasional flakes
Seen here:
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69214799
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69214804
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69355263
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69431828
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69487494
- https://gitlab.freedesktop.org/mesa/mesa/-/jobs/69487495

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33028>
2025-01-17 10:27:21 +00:00
Pierre-Eric Pelloux-Prayer
3842d10dd7 radeonsi: do not use std::max
Use MAX2 and abs to avoid build failures on some platforms.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12434
Fixes: dc293ffe50 ("radeonsi: fallback to util_blitter_draw_rectangle")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
9d4d9e6150 ac/llvm: enable wqm for ac_build_quad_swizzle from ac_build_fs_interp_mov
Without this, WQM is only used for the lds_param_load like this:

   s_wqm_b64 exec, exec
   lds_param_load v5, attr0.x wait_vdst:15
   s_mov_b64 exec, s[0:1]
   v_mov_b32_dpp v5, v5 quad_perm:[0,0,0,0] row_mask:0xf bank_mask:0xf

With this change we get:
   s_wqm_b64 exec, exec
   lds_param_load v5, attr0.x wait_vdst:15
   s_mov_b64 exec, s[0:1]
   ...
   s_wqm_b64 exec, exec
   v_mov_b32_dpp v5, v5 quad_perm:[0,0,0,0] row_mask:0xf bank_mask:0xf
   s_mov_b64 exec, s[0:1]

This fixes KHR-GL46.shaders.uniform_block.random.nested_structs_instance_arrays.0
and other similar tests with LLVM.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
182d662ccf ac/llvm: add wqm param to ac_build_quad_swizzle
And to ac_build_dpp because it's used from quad_swizzle.

No functional changes but will be used in the next commit.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
b4e94cf421 ttn: init source_blake3 and name from tgsi_shader_info
All TTN shaders have the same name ('TTN') and the same empty blake3.
Having a unique name and blake3 makes it easier to distinguish them
when using NIR_DEBUG=print...

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Pierre-Eric Pelloux-Prayer
59a3f38ff6 radeonsi: clear the debug callback on ctx destroy
The debug callback depends on the context to operate properly,
so we need to clear it on destroy to avoid a use-after-free.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12035
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32959>
2025-01-17 09:55:45 +00:00
Georg Lehmann
71cb394b02 aco: implement some more std::vector functions for small_vec
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33043>
2025-01-17 09:25:48 +00:00
Georg Lehmann
31de188bc2 aco: support less trivial component types in small_vec
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33043>
2025-01-17 09:25:48 +00:00
Georg Lehmann
15cba08db0 aco: guard small_vector move/copy operator against self assignment
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33043>
2025-01-17 09:25:48 +00:00
David Rosca
3c7c059cee radeonsi: Enable implemented VCE/UVD encode features
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
b6b5261f4c radeonsi/uvd_enc: Set input pic swizzle mode on GFX9
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
73657d4246 radeonsi/uvd_enc: Support raw packed headers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
da9de889aa radeonsi/uvd_enc: Support dynamic rate control changes
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
186980de26 radeonsi/uvd_enc: Support min/max QP and max frame size
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
035adff0e2 radeonsi/uvd_enc: Support temporal layer rate control
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
7b1210a026 radeonsi/uvd_enc: Support intra refresh
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
8a2266ab0b radeonsi/uvd_enc: Support slice encoding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
dac4e4bd6a radeonsi/uvd_enc: Support quality presets
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
d4d4a64168 radeonsi/uvd_enc: Support VBAQ
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
89d43c0fd3 radeonsi/uvd_enc: Support Pre-Encode
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
7570311269 radeonsi/uvd_enc: Consider input surface size for padding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
1f5e857d85 radeonsi/uvd_enc: Use app DPB management
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
98f711859d radeonsi/uvd_enc: Rework DPB allocation
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
ccb450b91c radeonsi/uvd: Set decode target swizzle mode on GFX9
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
4cf46ac9d0 radeonsi/uvd: Optimize bitstream buffer resizing
Only resize the buffer once and avoid copy if the buffer is empty.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
f51de3f064 radeonsi/uvd: Stop clearing decode internal buffers
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
9ca1cda2be radeonsi/vce: Cleanup
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
16571a2f6c radeonsi/vce: Set input pic swizzle mode on GFX9
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
901aafb030 radeonsi/vce: Support raw packed headers
Same logic as VCN, but this also needs PPS/SPS encoding.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
f13c5fe53e radeonsi/vce: Support intra refresh
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
f05acb6703 radeonsi/vce: Support min/max QP and max frame size
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
544a180320 radeonsi/vce: Support quality presets
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
683766eebc radeonsi/vce: Support VBAQ
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
880811ad80 radeonsi/vce: Support slice encoding
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
ffd2cbf2a7 radeonsi/vce: Use app DPB management
Same logic as VCN, we use max_num_ref_frames + 1 for initial DPB size
and resize later if needed.

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
b22913cbd5 radeonsi/vce: Move dual pipe context to offset 0 of CPB
Needed to allow dynamically growing CPB.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
4d2a8ddeb8 radeonsi/vce: Set more header params
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1404
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
104f9c6654 radeonsi/vce: Remove support for FW 50 and older
Reviewed-by: Leo Liu <leo.liu@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:05 +00:00
David Rosca
6510c3d75f radeonsi: Add radeon_bitstream and use it in radeon_vcn_enc
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32829>
2025-01-17 08:53:04 +00:00
Qiang Yu
b72fde55ae etnaviv: remove min/max_texture_gather_offset init
u_init_pipe_screen_caps() init them with same value already.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
aaf1174fd3 radeonsi: remove si_screen.max_texel_buffer_elements
It seems to be a cache of the PIPE_CAP before, now we
use pipe_caps access, no need for it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
6c95232069 gallium,mesa: remove uint surffix from pipe_caps
We use explicit type now, no need for these surffix to
indicate the implicit type of the fields.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
e5041ef036 docs,src: replace doc and comments for PIPE_CAP with pipe_caps
Use command:
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_CAP_\([A-Za-z0-9_]*\)/pipe_caps.\L\1/g' {} +
  find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_CAPF_\([A-Za-z0-9_]*\)/pipe_caps.\L\1/g' {} +

With manual adjustment for docs/gallium/screen.rst to merge
pipe_cap and pipe_capf section.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
e7873a3abd gallium: remove get_param and get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
fe1d5d55f1 zink: remove zink_get_param and zink_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
ae12e6b325 virgl: remove virgl_get_param and virgl_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
e0665c7855 vc4: remove vc4_screen_get_param and vc4_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
901ce3fceb v3d: remove v3d_screen_get_param and v3d_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
dcc3d8097b tegra: remove tegra_screen_get_param and tegra_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
1d17d5501d svga: remove svga_get_param and svga_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
6c17eab006 softpipe: remove softpipe_get_param and softpipe_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
10c9129139 radeonsi: remove si_get_param and si_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
22516c4a71 r600: remove r600_get_param and r600_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
f64ac3cabb r300: remove r300_get_param and r300_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
971645b558 panfrost: remove panfrost_get_param and panfrost_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
ced577b32e nouveau/nvc0: remove nvc0_screen_get_param and nvc0_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:47 +00:00
Qiang Yu
43a008bb54 nouveau/nv50: remove nv50_screen_get_param and nv50_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
47f5458849 nouveau/nv30: remove nv30_screen_get_param and nv30_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
d7bd544a18 llvmpipe: remove llvmpipe_get_param and llvmpipe_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
ec30fff0d5 lima: remove lima_screen_get_param and lima_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
9a06c6c321 iris: remove iris_get_param and iris_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
3465d008e1 i915: remove i915_get_param and i915_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
3a7c519361 freedreno: remove fd_screen_get_param and fd_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
efdbd4c84c etnaviv: remove etna_screen_get_param and etna_screen_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
90594a00a9 d3d12: remove d3d12_get_param and d3d12_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
90be460e05 crocus: remove crocus_get_param and crocus_get_shader_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
37ac138273 asahi: remove agx_get_param and agx_get_paramf
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
104c6b28b3 rusticl: use pipe_caps access
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
45123ee4d5 gallium,mesa: replace get_paramf with pipe_caps access
With command:
  find . -path "./.git" -prune -o -type f -exec sed -i ':a;N;$!ba;s/->get_paramf([^,]*,[[:space:]]*PIPE_CAPF_\([^)]*\))/->caps.\L\1/g' {} +

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
ef0b6f8262 egl,gallium,gbm,mesa: replace get_param with pipe_caps access
Use command:
  find . -path "./.git" -prune -o -type f -exec sed -i ':a;N;$!ba;s/->get_param([^,]*,[[:space:]]*PIPE_CAP_\([^)]*\))/->caps.\L\1/g' {} +

And some manual adjustment.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
b2caa48ec9 mesa/st: enable extension use pipe_caps access
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
e5e5af05ea egl,gallium,glx: replace dri_get_screen_param with pipe_caps access
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
aa9fa085fe nine: change cap macros to use pipe_caps access
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
5c0d4a6225 zink: add zink_init_screen_caps
It's one-one map of zink_get_param and zink_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
9c5b1249cd virgl: add virgl_init_screen_caps
It's one-one map of virgl_get_param and virgl_get_param.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
763194db00 vc4: add vc4_init_screen_caps
It's one-one map of vc4_screen_get_param and vc4_screen_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
efe9cc8c82 v3d: add v3d_init_screen_caps
It's one-one map of v3d_screen_get_param and v3d_screen_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
9d7578d0b2 tegra: init screen caps
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
9043f69342 svga: add svga_init_screen_caps
It's one-one map of svga_get_param and svga_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
d9e569e3c9 softpipe: add softpipe_init_screen_caps
It's one-one map of softpipe_get_param and softpipe_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
dab60edff9 radeonsi: add si_init_screen_caps
It's one-one map of si_get_param() and si_get_paramf().

Move has_draw_indirect_multi calculation before
si_init_screen_caps to be used by later.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
7cd606f01b r600: add r600_init_screen_caps
It's one-one map of r600_get_param() and r600_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
850c4281c3 r300: add r300_init_screen_caps
It's one-one map of r300_get_param() and r300_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
205669e3a9 panfrost: add panfrost_init_screen_caps
It's one-one map of panfrost_get_param() and panfrost_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
aa239fd52d nouveau/nvc0: add nvc0_init_screen_caps
It's one-one map of nvc0_screen_get_param() and
nvc0_screen_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
5a3f23f589 nouveau/nv50: add add nv50_init_screen_caps
It's one-one map of nv50_screen_get_param() and
nv50_screen_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
b12fef1933 nouveau/nv30: add nv30_init_screen_caps
It's one-one map of nv30_screen_get_param and nv30_screen_get_paramf.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
6b9252538f llvmpipe: add llvmpipe_init_screen_caps
It's one-one map of llvmpipe_get_param() and llvmpipe_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
cb6eb16ca5 lima: add lima_init_screen_caps
It's one-one map of lima_screen_get_param() and
lima_screen_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
ad8b03e762 iris: add iris_init_screen_caps
It's one-one map of iris_get_param() and iris_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:46 +00:00
Qiang Yu
f1933a38b8 i915: add i915_init_screen_caps
It's one-one map i915_get_param() and i915_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
08f96c0eaf freedreno: add fd_init_screen_caps
It's one-one map of fd_screen_get_param() and
fd_screen_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
68e3be1ea8 etnaviv: add etna_init_screen_caps
It's one-one map of etna_screen_get_param() and
etna_screen_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
06b4fd1682 d3d12: add d3d12_init_screen_caps
It's one-one map of d3d12_get_param() and d3d12_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
2c38fe1769 crocus: add crocus_init_screen_caps
It's one-one map of crocus_get_param() and crocus_get_paramf()

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
01b5ac8337 asahi: add agx_init_screen_caps
It's one-one map of agx_get_param() and agx_get_paramf().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
a036231c09 gallium: add u_init_pipe_screen_caps
This is a one-one map of u_pipe_screen_get_param_defaults.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Qiang Yu
9f208a5308 gallium: add pipe_caps struct definition
one-one map of pipe_cap enum.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955>
2025-01-17 04:39:45 +00:00
Benjamin Lee
b3d1130d5d panvk: disable round_to_nearest_even for NEAREST-filtered samplers
As described in the comment, enabling the round_to_nearest_even results
in the upper 2^-9 of the texel i being sampled at i+1. This appears to
be allowed by the spec, but triggers a CTS bug[1]. Changing this behavior
is not necessary (we could fix the CTS), but is desirable regardless
because of the precision improvement.

[1]: https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/5547

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32985>
2025-01-17 03:59:39 +00:00
Erik Faye-Lund
4e58029dc0 pan/va: fix base-level for nir_texop_lod
The documentation says that if we don't use force_delta, the LOD will be
-infinity for non-active lanes before bias and clamp are applied. This
is not what we want, so let's instead assume all threads are active, and
let helper-invocations do their job to compute correct values.

While this is only needed for the second iteration, let's just leave it
on for both for simplicity.

Fixes: e317136536 ("pan/va: Add support for nir_texop_lod")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33069>
2025-01-17 02:48:06 +00:00
Valentine Burley
a0de5e7d02 ci: Fix trace update script reading GitLab token from default location
Update the trace update script to use get_token_from_default_dir for
reading the GitLab token from the default location (~/.config/gitlab-token),
fixing the script and aligning it with our other tools.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33061>
2025-01-17 02:13:05 +00:00
Samuel Pitoiset
4526f2692e radv: mark AMD CDNA as unsupported
No access to the hw and likely broken.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33031>
2025-01-17 01:30:16 +00:00
Samuel Pitoiset
c942d957b0 radv: fail to initialize when the AMD GPU generation is unsupported
Better to be conservative than allowing something that isn't supposed
to be working.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33031>
2025-01-17 01:30:16 +00:00
Caio Oliveira
0b310ae4d8 intel/brw: Rename fs_generator to brw_generator
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32844>
2025-01-17 00:04:41 +00:00
Caio Oliveira
3659934862 intel/brw: Add brw_generator.h header
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32844>
2025-01-17 00:04:41 +00:00
Caio Oliveira
a5a9f42a39 intel/brw: Rename brw_fs_generator.cpp to brw_generator.cpp
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32844>
2025-01-17 00:04:41 +00:00
Sathishkumar S
2e36d1f3d0 radeonsi/vcn: enable roi decode and rgb targets on JPEG_5_0_1
JPEG_5_0_1 supports region of interest decode and RGB format conversion

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33004>
2025-01-16 23:41:28 +00:00
Sonny Jiang
5b2de9e593 radeonsi/vcn: Add vcn_5_0_1 support
Add support for AMD vcn_5_0_1

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33004>
2025-01-16 23:41:28 +00:00
Valentine Burley
f7be8e228a turnip/ci: Decrease the fraction on a660-vk-full
With the improved GPU recovery thanks to the new kernel, we can now
complete a full, non-fractioned run on the a660 in just over an hour.
To stay within this runtime, the fractions for the gmem-forced runs
have been increased.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: David Heidelberg <None>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32788>
2025-01-16 22:57:52 +00:00
Vignesh Raman
9e7ca3b86a ci: update expectation files
Update expectation files for the test
runs with kernel 6.13-rc4.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: David Heidelberg <None>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32788>
2025-01-16 22:57:52 +00:00
Vignesh Raman
af8ab2bb3e ci: Uprev kernel to 6.13
Move to 6.13-rc4 for all mesa-ci jobs except anv-jsl.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: David Heidelberg <None>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32788>
2025-01-16 22:57:52 +00:00
Vignesh Raman
ac078768c9 ci: Force db410c to host mode
Force db410c to host mode to fix network issue which results in failure
to mount root fs via NFS.
See https://gitlab.freedesktop.org/gfx-ci/linux/-/commit/cb72a629
https://lore.kernel.org/r/20230911161518.650726-1-vignesh.raman@collabora.com

Use apq8016-sbc-usb-host.dtb which allows the USB controllers
to work in host mode.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Reviewed-by: David Heidelberg <None>
Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32788>
2025-01-16 22:57:52 +00:00
Christian Gmeiner
776795f76a v3dv: Add some CPU tracepoints
Add tracepoints for pipeline creations, bo wait and queue submits.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33012>
2025-01-16 22:31:17 +00:00
David Rosca
986f545744 gallium/vl: Fix creating buffers with auxiliary planes
Buffers with compression enabled (eg. DCC) have auxiliary planes that
needs to be all imported, but should not be used to create sampler views
and surfaces.
Only use main planes and ignore the remaining planes.
Also remove vl_video_buffer::num_planes as it's now unused.

Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32893>
2025-01-16 21:11:52 +00:00
Job Noorman
cf87ed60e2 ir3: output early-preamble stat as integer
shaderdb's report.py can only handle integer stats. So instead of
outputting early/late for the preamble stat, output 0/1 for the
early-preamble stat.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 114a47544f ("ir3: Add preamble instr count metric")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33055>
2025-01-16 20:33:45 +00:00
duncan.hopkins
8c743d01c7 zink, kopper: Conitionally add VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT to swap chain imageUsage.
VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT is not supported on MacOS for swap chain images and its use is not always needed.

For MoltenVK report PIPE_CAP_FBFETCH as 0 to back this up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32651>
2025-01-16 20:03:23 +00:00
duncan.hopkins
17e5ea118e zink: Avoid optimalDeviceAccess on MoltenVK when creating depth taregts.
MoltenVK fails to create a depth format target if `optimalDeviceAccess`, `info.have_EXT_host_image_copy` and `VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT` are in used.
The specification seems to claim it is not needed if `hic.identicalMemoryLayout` is set, so for a MoltenVK build unset optimalDeviceAccess.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32651>
2025-01-16 20:03:23 +00:00
duncan.hopkins
e630d4fb70 zink: MoltenVk has conditional VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE support.
MoltenVK support for VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE depends on the Metal API version in use. Which is directly related to the MacOS version.
Even if all the correct extensions or Vk versions are supported.

Detect if the feature is supported, assume it is not on MacOS unless told otherwise, and adjust the pipelines to honor this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32651>
2025-01-16 20:03:22 +00:00
Boris Brezillon
373d9df7ce panvk/csf: Add a knob to force texture cache invalidation on RUN_FRAGMENT
Applications tend to forget to describe subpass dependencies, especially
when it comes to write -> read dependencies on attachments. The
proprietary driver forces "others" invalidation as a workaround, and this
invalidation even became implicit (done as part of the RUN_FRAGMENT) on
v13+.

We will consider adding a dri-conf hook for this option in the future,
but for now, let's just keep it as an opt-in debug flag.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33056>
2025-01-16 18:14:43 +00:00
Boris Brezillon
c72379e506 panvk/csf: Fix add_memory_dependency() for input attachment access
Input attachment reads are lowered to image reads and thus require
a flush of the read-only L1 caches.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33056>
2025-01-16 18:14:43 +00:00
Marek Olšák
ff6e3e9f76 nir: add next_stage param to nir_slot_is_varying & nir_remove_sysval_output
The result of nir_slot_is_varying depends on what the next shader stage is,
and nir_remove_sysval_output uses it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32855>
2025-01-16 16:28:15 +00:00
Pierre-Eric Pelloux-Prayer
1278d5286c radeonsi, radv, virtio: use AMDGPU_GEM_CREATE_VIRTIO_SHARED
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:33 +00:00
Pierre-Eric Pelloux-Prayer
6c0e4a0ece ac/virtio: add virtio-only AMDGPU_GEM_CREATE flag
On the host side virglrenderer creates dmabuf on demand when:
* cpu mapping is requested
* setting up scan out
* sharing buffers between guest processes

On-demand dmabuf creation only works if the ctx that created the
BO still exists and knows about this BO. This assumption works ok for
the first 2 cases, but can break with the last one (and it does cause
issues on Android). eg:
* process A allocates BO and exports it as a guest dmabuf
* process A closes its handle to the BO (-> detach_resource)
* process B imports the guest dmabuf -> this triggers the attach_resource
  function in virglrenderer. If the given resource isn't a
  VIRGL_RESOURCE_FD_DMABUF it'll try to get one... But for this to work,
  process A needs to be used -> this fails because this resource was
  detached from it.

The reason we create dmabuf on demand is to avoid hitting the number of
open file descriptor limit. So to cover the 3rd case, we'll use the
VIRTGPU_BLOB_FLAG_USE_SHAREABLE flag, but try to limit to as few possible
buffers as possible.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:33 +00:00
Pierre-Eric Pelloux-Prayer
6b6340fea1 radv/virtio: disable syncobj timeline support
The virtio-gpu guest kmd reports timelines as supported, so querying
DRM_CAP_SYNCOBJ_TIMELINE as vk_drm_syncobj_get_type() does will return
true.

The native context code on the other hand doesn't support timelines,
and support is disabled in the "ac/virtio: disable timeline_syncobj support"
commit.

Fix the inconsistency by manually disabling timeline support when
info.has_timeline_syncobj is false.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:33 +00:00
Pierre-Eric Pelloux-Prayer
9de728c4d0 radv: enable virtio native context support
No big code changes are needed to support virtio. The main caveat with
radv is about buffer allocations.

Allocating a cpu visible buffer requires the host process (eg qemu) to
create a dmabuf, mmap it, then map the host CPU address into the guest
application CPU address space.

The first issue is about the number of dmabuf created because we
might hit the number of open file limit. The host process limit can
be raised but we would hit the second issue - at least on qemu:
there's a limit on how many sections can be mapped and ultimately
we hit this assert:

   assert(map->sections_nb < TARGET_PAGE_SIZE);

(the third issue is a performance one: these operations have a cost,
and this increases some Vulkan app loading times)

radeonsi is not really affected because it's using pb_slab to
suballocate small buffers from larger ones.
radv on the other hand doesn't, so if an app decides to allocate
lots of cpu visible small buffers, we're likely to fail.

Earlier versions of the amdgpu nctx code had a suballoctor, but it
was removed to simplified the code. It could be restored later; or
radv could be modified to use a suballocator (like anv does AFAICT).

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
612774c4a6 radeonsi: enable virtio native context support
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
2269ea7e2f ac/virtio: disable timeline syncobj support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
dc83195175 ac/virtio: disable userptr and local buffers
They're not supported yet so let's not pretend they are.

In particular use_local_buffers can cause VM_ALWAYS_VALID to be
used, which then prevents the creation of a dmabuf.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
22263616ed amd: amdgpu-virtio implementation
Native context support is implemented by diverting the libdrm_amdgpu functions
into new functions that use virtio-gpu.
VA allocations are done directly in the guest, using newly exposed libdrm_amdgpu
helpers (retrieved through dlopen/dlsym).

Guest <-> Host roundtrips can be expensive so we try to avoid them as much as
possible. When possible we also don't wait for the host reply in case where
it's not needed to get correct result.

Implicit sync works because virtio-gpu commands are submitted in order to the
host (there a single queue per device, shared by all the guest processes).

virtio-gpu also only supports one context per file description (but multiple
file descriptions per process) while amdgpu only allows one fd per process,
but multiple contexts per fd. This causes synchronization problems, because
virtio-gpu drops all sync primitive if they belong to the same fd/context/ring:
ie the amdgpu_ctx can't be expressed in virtio-gpu terms.

For now the solution is to only allocate a single amdgpu_ctx per application.

Contrary to radeonsi/radv, amdgpu_virtio can use libdrm_amdgpu directly: the
ones that don't rely on ioctl() are safe to use here.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Pierre-Eric Pelloux-Prayer
a565f2994f amd: move all uses of libdrm_amdgpu to ac_linux_drm
This is required to implement virtio native-context.

In a virtualized environment, most of the functions provided
by libdrm_amdgpu will be implemented using virtio.
This allows to implement efficient virtualization, by
forwarding the kernel API to the host, instead of the GL/VK calls.

Similarly, the raw 'fd' or 'gem_handle' arguments are replaced
by opaque types. This allows to encapsulate all the needed
state in the handle, and use unmodified API between baremetal
and virtualized contexts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658>
2025-01-16 12:24:32 +00:00
Samuel Pitoiset
874d34cf1b radv: fix emitting SPI_SHADER_GS_OUT_CONFIG_PS with NULL FS on GFX12
This register wasn't emitted at all if the fragment shader was NULL
and this was causing random GPU hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33030>
2025-01-16 10:33:46 +00:00
Samuel Pitoiset
079f55d405 radv: advertise VK_MESA_image_alignment_control on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33033>
2025-01-16 08:49:38 +00:00
Samuel Pitoiset
7e6159d10c ac/surface: honor RADEON_SURF_PREFER_xxx_ALIGNMENT on GFX12
This allows to select a better alignment to not waste memory.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33033>
2025-01-16 08:49:38 +00:00
Lionel Landwerlin
2774fb32e6 brw: fix coarse_z computation on Xe2+
The payload format changed and we forgot to update this path.

Putting a Fixes: commit that is kind of related but probably not the
source of the issue.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12031
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11871
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12042
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12339
Fixes: 4672fcbc76 ("intel/fs: Fix PS thread payload setup for depth_w_coef_reg.")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33029>
2025-01-16 07:19:57 +00:00
Martin Roukala (né Peres)
660412c63d ci/init-stage2: use the common scripts from the build artifact
This unifies the behaviour between the LAVA, baremetal, and CI-Tron
farms by ensuring every job has access and runs the same scripts.

The init-* scripts are however still sourced from outside the build
artifact, hopefully not for too long.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33026>
2025-01-16 04:07:42 +00:00
Marek Olšák
28ac423288 radeonsi: remove unused functions
also fix missing "inline" in amdgpu.bo.h

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
03ad2bc782 radeonsi: make many shader functions static or move them to .c files
- many non-inline functions are only used in 1 .c file: make them static
- some inline functions are only use in 1 .c file: move them there

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
583348e3b6 radeonsi: remove unused variables from si_shader_context (LLVM)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
13edb27ad5 radeonsi: add si_screen::use_aco to shader cache key to fix shader cache failures
Cc: mesa-stable

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
1f5220b03d ac/llvm: remove the low-optimizing compiler option
Not needed with ACO. It was used for big shaders on old APUs that took
forever to compile.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
08a47fa05c ac/llvm: lower vector load_const in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
d160252270 ac: use Z_EXPORT_FORMAT=32_AR for Z + Alpha mrtz exports
This should be faster than 32_ABGR.

Also, stencil exports are changed from UINT16_ABGR to 32_GR,
which should have no effect on performance.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Marek Olšák
0d961b0723 nir: add barycentric coordinates src to load_point_coord_maybe_flipped
Just like other input loads, radeonsi needs to know the barycentric
coordinates for it. This adds the src and determines the optimal barycentric
coordinates in nir_lower_point_smooth, the only producer of the intrinsic.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33046>
2025-01-16 02:58:03 +00:00
Icenowy Zheng
97412fca25 zink: use lazy descriptors for IMG proprietary drivers
When using Zink with VK_EXT_descriptor_buffer enabled on IMG proprietary
drivers, the rendering behavior is incorrect and uniforms are not
updated properly (the gears of es2gears_x11 become all red and
overlaps).

Use lazy descriptors for IMG proprietary driver unless explicitly
overriden for testing purpose.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32343>
2025-01-16 02:27:00 +00:00
Gurchetan Singh
9c1b69a5b5 gfxstream: remove references to Fuchsia Goldfish
Everything will be virtio...

Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33050>
2025-01-16 01:51:39 +00:00
Felix DeGrood
0ff8534008 intel/perf: add new perf consts to support more metrics
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32909>
2025-01-16 00:01:56 +00:00
Christian Gmeiner
10f04dc3df egl/meson: Specify which symbols to export
The goal is to reduce symbol pollution, especially when building
with Perfetto support, which previously led to an excessive number
of exported symbols.

 objdump -T build/src/egl/libEGL_mesa.so.0.0.0 | grep perfetto | wc -l
 - before: 6963
 - after: 0

The new egl.sym version script explicitly exports only relevant egl and
MesaGLInteropEGL symbols, while marking all others as local.

While this change effectively removes all Perfetto-related exported symbols,
some C++ standard library symbols remain as undefined. These are pulled in
by the linker due to dependencies.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33001>
2025-01-15 23:18:36 +00:00
Collabora's Gfx CI Team
3f6f55e891 Uprev Piglit to 631b72944f56e688f56a08d26c8a9f3988801a08
4c0fd15fd9...631b72944f

Reviewed-by: Sergi Blanch Torné <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32642>
2025-01-15 22:24:33 +00:00
Sil Vilerino
8f696d8d97 d3d12: Enable Warnings C4267, C4996, C4146, C4244, C4389, C4838, C4302, C4018 in src/gallium/drivers/d3d12 subtree
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
585ce7e831 d3d12_video_enc.h/cpp Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
98ebb0b2e9 d3d12_video_dec.h/cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
bb5fb4d75d d3d12_video_enc_hevc.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
33b5df7c39 d3d12_video_enc_h264.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
acefedbb35 d3d12_video_enc_av1.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
a4aedaf783 d3d12_video_proc.h/cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
fa6f1e05f0 d3d12_video_dec_hevc.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
68ac1ed1c5 d3d12_video_dec_vp9.cpp: Fix warning C4244: 'argument': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
b5b08d1ac7 d3d12_video_dec_h264: Fix warning C4244 uint64_t to size_t cast
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
b970b32939 d3d12_resource: Fix warning C4244 for x86 builds assign uint64_t to uintptr_t
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
0e478c3566 d3d12_video_encoder_bitstream_builder_h264: Fix warning C4244 for x86 builds assign uint64_t to size_t
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
8bfe3976d9 util: cpu_detect.c Fix warning C5274: behavior change: _Alignas no longer applies to the type '<unnamed-tag>' (only applies to declared data objects)
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
819558903c d3d12_bufmgr.cpp: Fix warning C4244 for x86 builds assign uint64_t to size_t
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
46ed17cf69 d3d12: Add offset limit check to d3d12_resource_from_memobj
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
73cdb980bf d3d12: Fix warning C4018 signed/unsigned mismatch
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
15dd8cd9a8 d3d12: Fix warning C4389: An == or != operation involved signed and unsigned variables. This could result in a loss of data.
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
56484fd010 d3d12: Fix warning C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
978fd1cebe d3d12: Fix warning C4267 conversion from 'size_t' to 'type', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
e061792e25 src/compiler: Fix warning C4389: An == or != operation involved signed and unsigned variables. This could result in a loss of data.
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
8ecb7bc2a2 src/compiler: Fix warning C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
4d653c7df9 util: Fix warning C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
6a724af20d src/gallium/auxiliary/util/u_draw.h: Fix C4244 'argument' : conversion from 'type1' to 'type2', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
b5617058e4 u_math.h: Change power of two assert to fix warning C4146: unary minus operator applied to unsigned type, result still unsigned
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Sil Vilerino
8f8438bd8c u_dynarray.h: Fix warning C4267 conversion from 'size_t' to 'type', possible loss of data
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
2025-01-15 21:40:20 +00:00
Manuel Dun
9ab62e6452 Gfxstream: Initial mingw "compilable" Windows version of mesa/gfxstream
Initial "compilable" version of mesa/gfxstream on Windows. For now it is
achieved through "#if !DETECT_OS_WINDOWS" directives hence it is NOT
functional. The compilation works with mingw only and the compilation is
tested in a windows host. This commit is intended to only pass the
compilation process without errors.

Also created stub code for a future windows implementation.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32795>
2025-01-15 20:57:18 +00:00
Aleksi Sapon
f4eb6fde8f llvmpipe: LLVM v2f32 trunc/floor/ceil/nearbyint generates optimal x86 code since at least version 8
Based on the tests committed here:
f9afee479f

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32964>
2025-01-15 20:20:34 +00:00
Aleksi Sapon
0b2664635f llvmpipe: fix lp_test_arit on Windows
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32964>
2025-01-15 20:20:34 +00:00
Konstantin Seurer
5de7a7c5a6 gallivm: Take helper invocations into account when skipping branches
if %cond {
   %store_reg (%reg, %val)
}

can be skipped if no invocations are active. This did not take helper
invocations into account, meaning the value of %reg could be garbage for
helper invocations.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31802>
2025-01-15 17:55:38 +00:00
Aaron Ruby
e862bb52bd gfxstream: Remove internal vk_util.h and vk_struct_id.h entirely
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
e9663276f4 vulkan/util: Add c99_compat.h inclusion for cpp 'restrict' compatibility
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
f766c64c3a gfxstream: Fix unused variable warnings in ResourceTracker.cpp
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
6923af6cc4 gfxstream: Remove VK_HOST_CONNECTION macro
Only need the encoder, the rest was replaced by the
SetupInstanceForProcess() routine.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Aaron Ruby
1e69e910ca gfxstream: Some cleanup in manual entrypoints
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Aaron Ruby <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33006>
2025-01-15 17:19:13 +00:00
Mike Blumenkrantz
b73d66e0c0 lavapipe: stop using pipeline layouts in some places
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
f6ff8bdf74 lavapipe: unsupport NV_device_generated_commands
this is no longer useful

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
3f90303eeb lavapipe: move workgraph lowering up and delete pipeline param
Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
4d1ed5d66d lavapipe: fix bitmask type for sampler updating
need 32bit to contain all the bits here

cc: mesa-stable

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
e2023474b4 lavapipe: split out bda descriptor function params from struct
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
596efeda33 lavapipe: split out sampler init from create
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
4db07aeb1c vk/sampler: split out sampler init from create
no functional changes

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Mike Blumenkrantz
caf50d6723 lavapipe: stop storing texture handle for samplers
this is never used

Konstantin Seurer <konstantin.seurer@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32931>
2025-01-15 16:12:27 +00:00
Nanley Chery
15e23f3781 anv: Limit slow clear heuristic to ACM and prior
It hasn't been tuned for Xe2.

Fixes: 052d7e1a9c ("anv: Slow clear if fast-clear cost is not mitigated")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33035>
2025-01-15 15:43:19 +00:00
Nanley Chery
caf007ff27 anv: Drop can_fast_clear_with_non_zero_color()
This got dropped during a rebase.

Fixes: 35f02d8f36 ("anv: Inline can_fast_clear_with_non_zero_color")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33035>
2025-01-15 15:43:19 +00:00
Lars-Ivar Hesselberg Simonsen
ee4460acf4 panvk: Fix descriptor decode
The expansion of DUMP_CL is missing parenthesis, making the dumping of
descriptors incorrect.

Fixes: 3b69edf825 ("pan/genxml: Enforce explicit packed types on pan_[un]pack")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33040>
2025-01-15 15:05:05 +00:00
Icenowy Zheng
b6c2ea4d99 zink: emit consts as uint only on IMG proprietary drivers
After the SPIR-V generator is optimized to generate multiple constant
types, the shader compiler of Imagination proprietary drivers can no
longer correctly handle these shaders and will bail out.

Handle this as a driver quirk and revert to the old behavior with only
uint constants when IMG proprietary drivers are detected.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32342>
2025-01-15 14:35:59 +00:00
Boris Brezillon
7755c41b3e panvk/csf: Rework the occlusion query logic to avoid draw flushes
Right now, we have a problem when we flush draws inside a render pass
and we don't have enough information to re-emit the framebuffer/tiler
descriptors.

Turns out the only situations where this happens is when an occlusion
query end happens, but we shouldn't really flush the draws in that case.
What we should do instead is record the OQ in our command buffer, so we
can signal OQ availability when the fragment job is done.

In order to solve that, we add an OQ chain to the command buffer to
track OQs ending inside the render pass. We then walk this chain at
fragment job emission time to signal the syncobjs attached to each
query.

This also simplifies the whole occlusion query synchronization model:
instead of waiting for each syncobj individually, we now wait on
the iterators to make sure all OQs have landed. Thanks to this new
synchronization, we can batch OQ reset/copy operations and make the
command stream a lot shorter when big query ranges are copied/reset.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
ae0534c6cc panvk/csf: Use cs_sr_reg64() instead of cs_reg64() when setting the OQ pointer
We have wrappers distinguishing staging registers from sratch registers,
so let's use cs_sr_reg64() here.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
cc517822e5 panvk/csf: Make all sync operations on the CSG scope
The SYSTEM scope triggers CPU interrupts we don't really need, so let's
use the CSG scope to avoid those. Note that the scope doesn't encode
the visibility aspect, meaning changes to the sync object with a CSG
scope will still be instantly visible to the CPU, it's just that the
CPU needs to poll the value to detect a change, which is basically what
we're doing for syncobjs attached to events/queries, so we're good.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
6a7bcff1be pan/cs: cs_{break,continue} are not for_each macros
Let's prevent clang-format from adding the semi-colon on a new line when
we use cs_{continue,break}();

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
622187974f pan/cs: Allow undefined value if condition=always in cs_branch_label()
We already do that in the other cs_emit(b, BRANCH, I), so let's fix this
path too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Boris Brezillon
e8514fb4c4 pan/cs: Fix the tracepoint register dump loops
The increment was wrong, which ended up generating a lot more stores
than we need.

Fixes: bf05842a8d ("pan/cs: Add an event-based tracing mechanism")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32973>
2025-01-15 14:07:37 +00:00
Erik Faye-Lund
ebf9dae2e9 docs/features: fixup panvk KHR_shader_draw_parameters-support
This was enabled on Bifrost as well.

Fixes: 963e9feb8a ("panvk: enable shaderDrawParameters")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33032>
2025-01-15 14:00:00 +00:00
Karmjit Mahil
49bdd4bdc0 tu: Initialize tu_tiling_config even when tiling isn't possible
Also avoid calculations required for setting up `tu_tiling_config`
if tiling isn't possible.

Fixes valgrind issue in:
dEQP-VK.draw.renderpass.shader_layer.vertex_shader_256

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32968>
2025-01-15 13:29:35 +00:00
Karmjit Mahil
8652516ac4 tu: Fix leaking of some descriptor sets
Descriptor sets which have `size` of `0`, such as a descriptor set
with just dynamic descriptors, weren't being freed in
`vkDestroyDescriptorPool()` since that relies on keeping track of
descriptor sets in the `entries` list. Keep track of them in the
`entries` list.

Fixes a memory leak in:
dEQP-VK.binding_model.descriptor_copy.compute.uniform_buffer_dynamic_5

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32968>
2025-01-15 13:29:35 +00:00
Karmjit Mahil
0dd06c74d6 tu: Fix FDM patchpoint memory leak
We can disable FDM in the renderpass based on
`tu_render_pass_disable_fdm()` however a pipeline could have
been bound before starting the renderpass which had
`...RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT` set, in
which case the shader is compiled with FDM support. We still
need to apply the patchpoints. Previously `patchpoints_ctx` was
created only based on whether FDM was enabled in the renderpass,
which was leading to the patchpoints being allocated with no
context so they were never getting freed. Now setup `patchpoint_ctx`
regardless of FDM being disabled or not.

Fixes memory leaks in some tests from:
dEQP-VK.dynamic_rendering.*_cmd_buff.fragment_density_map.*
e.g.
dEQP-VK.dynamic_rendering.partial_secondary_cmd_buff
  .fragment_density_map.2_views .render.divisible_density_size
  .1_sample.static_subsampled_1_2

Fixes: 05f96dd00f ("tu: Add core FDM patchpoint infrastructure")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32968>
2025-01-15 13:29:35 +00:00
Karmjit Mahil
cfc09517b6 tu: Fix clear_values leak
When no attachments are used in a renderpass we should ignore the
clear values. It seems to be valid applications to still pass clear
values in such a case.

Fixes memory leaks in some tests from:
dEQP-VK.image.texel_view_compatible.graphic.basic.*d_image.texture_read.*
dEQP-VK.image.texel_view_compatible.graphic.extended.*d_image.texture_read.*

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32968>
2025-01-15 13:29:35 +00:00
David Rosca
a1af33775e frontends/va: Set csc matrix in PutSurface
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11889
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32890>
2025-01-15 12:48:53 +00:00
Boris Brezillon
8891c2aeba panfrost: Fix instanced draws when attributes have a non-zero divisor
On Bifrost/Midgard, when an attribute has a non-zero divisors, the
attribute offset is tweaked to take the base_instance into account,
which implies we have to re-emit the attributes if the base instance
value changed.

Let's not bother tracking the last base instance and re-emit
unconditionally in that case, which is still better than what we had
before 3db963a135 ("panfrost: Emit attribs in
panfrost_update_state_3d() on bifrost/midgard") and fixes the regression
introduced by this commit.

Fixes: 3db963a135 ("panfrost: Emit attribs in panfrost_update_state_3d() on bifrost/midgard")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-By: Chris Healy <healych@amazon.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33010>
2025-01-15 12:19:22 +00:00
Icenowy Zheng
1c59793d2d meson: prefer 'python3' to 'python' when finding python3
Although in some cases python 3.x will come without "3" as suffix,
"python3" should still be preferred because sometimes "python" is python
2.x instead.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33025>
2025-01-15 11:24:41 +00:00
Lucas Stach
c3662501a7 etnaviv: only emit used PA_SHADER_ATTRIBUTES states
It's quite wasteful on the command stream space to always emit all of the
PA_SHADER_ATTRIBUTES states, as many shaders use far less varyings than
the absolute max number. Limit the emission to actually used attributes.

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/32991>
2025-01-15 10:52:46 +00:00
Lucas Stach
65076f3ab0 etnaviv: fix flatshading on halti5 GPUs
Halti5 has no interpolation setting which will take into account the
rasterizer flatshade state. Force the interpolation qualifier to flatshade
for the color varyings when API level flatshade is enabled. Only set the
new bit in the shader key on halti5 GPUs to avoid generating unnecessary
shader variants on GPUs where the rasterizer flatshade state is properly
applied to the varyings.

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/32991>
2025-01-15 10:52:46 +00:00
Lucas Stach
41bd7aa9c8 etnaviv: emit varying interpolation state on halti5
Pull the interpolation qualifiers from NIR and translate them to
HALTI5_SHADER_ATTRIBUTES states.

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/32991>
2025-01-15 10:52:46 +00:00
Lucas Stach
89b2229c0d etnaviv: memcpy varying setup from stack
Use memcpy to transfer the varying setup from stack arrays into the
compiled shader state. Resulting code is less verbose and the
compiler is smart enough to optimize away the function call anyway.

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/32991>
2025-01-15 10:52:46 +00:00
Timothy Arceri
6bca0cc3d9 glsl: drop opt_dead_code_local
This does nothing useful anymore as we now convert to nir at compile
time which will handle all this for us.

shader-db radeonsi:

TOTALS FROM AFFECTED SHADERS (63/168079)
  SGPRS: 3248.00 -> 3208.00 (-1.23 %)
  VGPRS: 2224.00 -> 2228.00 (0.18 %)
  Spilled SGPRs: 0.00 -> 0.00 (0.00 %)
  Spilled VGPRs: 0.00 -> 0.00 (0.00 %)
  Private memory VGPRs: 0.00 -> 0.00 (0.00 %)
  Scratch size: 0.00 -> 0.00 (0.00 %) dwords per thread
  Code Size: 138484.00 -> 138068.00 (-0.30 %) bytes
  Max Waves: 877.00 -> 877.00 (0.00 %)
  Outputs: 0.00 -> 0.00 (0.00 %)
  Patch Outputs: 0.00 -> 0.00 (0.00 %)

shader-db Iris (BDW):

total instructions in shared programs: 17805897 -> 17805917 (<.01%)
instructions in affected programs: 1240 -> 1260 (1.61%)
helped: 0
HURT: 8
HURT stats (abs)   min: 1 max: 4 x̄: 2.50 x̃: 2
HURT stats (rel)   min: 0.39% max: 7.14% x̄: 4.26% x̃: 4.06%
95% mean confidence interval for instructions value: 1.61 3.39
95% mean confidence interval for instructions %-change: 2.01% 6.51%
Instructions are HURT.

total cycles in shared programs: 856868505 -> 856876266 (<.01%)
cycles in affected programs: 2879959 -> 2887720 (0.27%)
helped: 79
HURT: 100
helped stats (abs) min: 1 max: 742 x̄: 61.96 x̃: 12
helped stats (rel) min: <.01% max: 41.84% x̄: 1.17% x̃: 0.20%
HURT stats (abs)   min: 1 max: 1231 x̄: 126.56 x̃: 14
HURT stats (rel)   min: <.01% max: 33.98% x̄: 3.32% x̃: 0.30%
95% mean confidence interval for cycles value: 7.37 79.35
95% mean confidence interval for cycles %-change: 0.29% 2.38%
Cycles are HURT.

LOST:   1
GAINED: 4

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33008>
2025-01-15 02:01:09 +00:00
Caio Oliveira
5bd9693578 docs: Update syntax on Performance tips page
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33020>
2025-01-14 15:31:05 -08:00
Caleb Callaway
1b13f59597 docs: Intel GPU performance tips
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33019>
2025-01-14 22:27:21 +00:00
Bo Hu
26ce3b0ba1 remove the mReconstructionMutex in load
During loading of snapshot, there will be a single-threaded
decoder that aquires the same mReconstructionMutex, repeatedly.
Since the mReconstructionMutex is intentionally changed to
be non-recursive, we should not aquire it at the beginning of
load call; otherwise, we will be deadlock the decoder thread.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Bo Hu
2f3c3459a8 update decoder.py to clean up un-used ApiCallInfo
It is normal for vk decoder to consume nothing from the stream,
as it could be either gl or render control commands.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Serdar Kocdemir
36ca17cc29 gfxstream: add VK_DRIVER_FILES to devenv
Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Jason Macnak
bf3cdf286c Update VkDecoderSnapshot locking
Replace tryLock / unlock with regular scoped lock now that the
"extra handles" have been moved out of VkReconstruction and into
the VkSnapshotApiCallInfo.

Switch to regular std::mutex and std::lock_guard.

Annotate mReconstruction with GUARDED_BY to start to get more
thread safety analysis.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Jason Macnak
a07eb2cef0 Pass VkSnapshotApiCallInfo-s through VkDecoderGlobalState
... so that `VkDecoderGlobalState` can append additional information
needed for snapshotting. Specifically, `VkDecoderGlobalState` may create
additional boxed handles that are not visible directly in the API surface.
For example, `vkCreateDevice()` creates boxed handles for the `VkQueue`-s
and `vkCreateDescriptorPool()` creates boxed handles for pre-allocated
`VkDescriptorSets`. These boxed handles are not recoverable from the API
for `vkCreateDevice()` nor `vkCreateDescriptorPool()` directly. This was
previously worked around by just sticking the extra boxed handles in
`VkReconstruction::mExtraHandlesForNextApi` but this is not thread safe.
Instead, let's give `VkDecoderGlobalState` and `VkDecoderSnapshot` exclusive
access to individual `VkSnapshotApiCallInfo` objects.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Jason Macnak
3c03bae20c Simplify ApiInfo
Removes the additional saving of opcode and packet len as this is
all available from within the packet itself.

Removes the "trace" position from `VulkanMemReadingStream` as these
seemed to only be used for getting the packet start and packet size
but these are already available.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Bo Hu
e6fd2e1613 gfxstream-guest: update offset to correct value
In CoherentMemory::subAllocate function, we should
also update offset to the correct values.

Test: boot with skiavk enabled and the textures
should not be corrupted

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
sergiuferentz
82317d6d24 Use try_unbox in VkDescriptorBufferInfo
* We are currently crashing the emulator when binding to
  DescriptorBindings that have been deleted. This will WARN without
  crashing.
* A side effect of this is that it will enable a wider interaction with
  VulkanBatchUpdateDescriptorSet feature as it will not immediately
  crash if it interacts with something that was removed.
* https://registry.khronos.org/vulkan/specs/latest/man/html/vkUpdateDescriptorSetWithTemplate.html

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Serdar Kocdemir
9603450ea4 The BumpPool of VkStream is not freeAll'ed
Original change from: kyoungwon.kim@bytedance.com at aosp/3310239
Moving the change into gfxstream and codegen.

The issue was found by pengzejie@bytedance.com.

Note that vkReadStream's BumpPool is effectively `freeAll`'ed by
`clearPool` calls. The same call for vkStream is not being called
while alloc is called here and there.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Serdar Kocdemir
456654f6ad Wrap queue related functions on codegen
For multiple queue emulation, we need to change how queue related
functions are working on the host side and do custom unboxing
before submitting the commands to the underlying driver.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Serdar Kocdemir
b8f38956a1 Change C style cast on extension structs
As per go/cstyle#Casting for readability analysis.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33018>
2025-01-14 19:33:13 +00:00
Danylo Piliaiev
2875332df5 tu: Allocate consts for driver params as early as possible
Indirect draw calls upload VS params themselves, if indirect draw call
has zero instances GPU seem to still try to upload consts, however
with zer instances it doesn't apply draw state. Without the draw state
the the HLSQ_VS_CNTL values is stale, so less constants may be specified
than draw call expects. It is found that if CP_DRAW_INDIRECT_MULTI_1_DST_OFF
is less than 0x3f - GPU is happy even if the constlen is less than that.

As a workaround we allocate driver params first and ensure that VS
constlen always has the minimum size which is enough to upload driver
params.

Fixes one of the GPU hangs in "Disney Epic Mickey: Rebrushed" on a750.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Danylo Piliaiev
3e5d4d50c5 ir3: Use generic const alloc for everything and call it once
With all consts going through generic allocations it's now possible
to call ir3_setup_const_state once, and have lowerings that dynamically
lower things to consts just to update the max consts being used.

The only exception for now are immediates, since they eat up the space
that was left and allocated much later.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Danylo Piliaiev
cf73f89ba0 tu,ir3: Make push consts be able to start from higher than c0.x offsets
Will be needed in the follow up commit.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Danylo Piliaiev
9be269ef25 ir3: Use generic consts alloc for driver params
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Danylo Piliaiev
922ef8e720 ir3: Make allocation of consts more generic and order independent
The order of allocation was backed into ir3_setup_const_state and
some other parts of ir3, which is rather brittle.

And don't assume offsets for consts in other part of code, their order
and offset calculation is not guaranteed.

This also potentially fixes indirect UBO effect on constlen size.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32140>
2025-01-14 19:01:50 +00:00
Samuel Pitoiset
fc56823cf0 radv: change the BASE_HI field for VGT_TF_MEMORY_BASE_HI on GFX12
It's similar but less confusing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33015>
2025-01-14 17:13:23 +00:00
Alyssa Rosenzweig
401b400de3 nir,asahi,hk: add barrier argument to MESA_DISPATCH_PRECOMP
In the current API, precomp implicitly assumes full barriers both before & after
every dispatch. That's not good for performance. However, dropping the barriers
and requiring user to explicitly call barrier functions before/after would have
bad ergonomics.

So, we add a new parameter to the standard MESA_DISPATCH_PRECOMP signature
representing the barriers required around the dispatch. As usual, the actual
type & semantic is left to drivers to define what makes sense for their
hardware. We just reserve the place for it. (I think most drivers will want
bitflags here, but I don't think the actual flags are worth. If a driver wanted
to use a struct here, that would work too.)

Since the asahi stack doesn't do anything clever with barriers yet, we
mechnically add an AGX_BARRIER_ALL barrier to all precomp users in-tree. We can
optimize that later, this just gets the flag-day change in with no functional
change.

For JM panfrost, this will provide a convenient place to stash both their "job
barrier" bit and their "suppress prefetch" bit (which is really a sort of
barrier / cache flush, if you think about it).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32980>
2025-01-14 16:39:57 +00:00
Alyssa Rosenzweig
4955a68a03 libagx: add agx_barrier enum
trivial for now, but eventually this will describe interesting things :-)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32980>
2025-01-14 16:39:56 +00:00
Antonio Ospite
b016f218fb ci/android: fix meson C++ cross-compiler argument detection
When cross-building for Android meson fails to find supported compiler
arguments for the  C++ cross-compiler, e.g.:

```
Compiler for C++ supports arguments -Wno-array-bounds: NO (cached)
Compiler for C++ supports arguments -Wno-overflow: NO
Compiler for C++ supports arguments -Wno-c++11-narrowing: NO (cached)
Compiler for C++ supports arguments -Wno-vla-cxx-extension: NO (cached)

```

This is due to an **unrelated** and more generic compilation failure
when testing for the supported arguments, e.g.:

```
Command line: `/tmp/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang++ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -static-libstdc++ /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpv6_hke9l/testfile.cpp -o /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpv6_hke9l/output.obj -c -Wno-error=c99-designator -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=self-assign -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wvla-cxx-extension -Wno-vla-cxx-extension` -> 1
stderr:
clang++: error: argument unused during compilation: '-static-libstdc++' [-Werror,-Wunused-command-line-argument]
-----------
Compiler for C++ supports arguments -Wno-vla-cxx-extension: NO
```

The issue is caused by how the cross compiler is set up by
.gitlab-ci/container/create-android-cross-file.sh

Allow the cross compiler to still start even when the
`-Werror,-Wunused-command-line-argument` error occurs in order to be
able to actually detect other arguments:

```
Command line: `/tmp/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang++ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables --start-no-unused-arguments -static-libstdc++ --end-no-unused-arguments /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpm6eolxed/testfile.cpp -o /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpm6eolxed/output.obj -c -Wno-error=c99-designator -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=self-assign -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wvla-cxx-extension -Wno-vla-cxx-extension` -> 0
Compiler for C++ supports arguments -Wno-vla-cxx-extension: YES
```

This makes argument detection work again, e.g:

```
Compiler for C++ supports arguments -Wno-array-bounds: YES (cached)
Compiler for C++ supports arguments -Wno-overflow: YES
Compiler for C++ supports arguments -Wno-c++11-narrowing: YES (cached)
Compiler for C++ supports arguments -Wno-vla-cxx-extension: YES (cached)
```

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12441
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33013>
2025-01-14 16:00:12 +00:00
Vinson Lee
25f5f1b9b4 hk: Fix build error with static_assert
../src/asahi/vulkan/hk_cmd_draw.c: In function ‘hk_draw’:
../src/asahi/vulkan/hk_cmd_draw.c:3471:32: error: expression in static assertion is not constant
 3471 |             static_assert(size > sizeof(VkDrawIndirectCommand),
      |                           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 5bc89aa991 ("hk,libagx: handle adjacency without a GS")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12351
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32988>
2025-01-14 15:20:17 +00:00
Matthew Brost
2a053b2e60 anv/xe: Bind queue per anv_queue
The Xe uAPI is designed to use bind queues such that binds without input
dependencies (sync objects) do not block on binds with input
dependencies.

For example:

- Bind A (sparse) is submitted with a list of input dependencies.
- Bind B (immediate) is subsequently submitted without a list of input
  dependencies.

If Bind A and Bind B share a single bind queue, Bind B will not be
scheduled until Bind A completes. Using individual bind queues decouples
Bind A and Bind B, allowing Bind B to make immediate progress.

This change creates a separate bind queue for each ANV queue, enabling
support for sparse bindings that may have input dependencies.

v2:
 - Bail on bind queue creation failure (Linoel)
 - Only create bind queue if VK_QUEUE_SPARSE_BINDING_BIT is set (Jose)
v3:
 - Add comment around submit->queue usage (Jose)

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32873>
2025-01-14 14:39:53 +00:00
Timur Kristóf
50035f0316 ac/nir: Move all ac_nir_* files to a new folder.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:30 +01:00
Timur Kristóf
fe9eda9969 ac: Stop including ac_nir.h from ac_shader_util.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:28 +01:00
Timur Kristóf
cc43bd151b ac: Move AC_HS_MSG_VOTE_LDS_BYTES to ac_shader_util.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:27 +01:00
Timur Kristóf
736f61fa80 ac/nir: Move ac_nir_lower_ngg_mesh to separate file.
Along with it, move some functions to the prerast utils file.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:25 +01:00
Timur Kristóf
c1eb006695 ac/nir: Rename ac_nir_lower_ngg_ms to ac_nir_lower_ngg_mesh.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:23 +01:00
Timur Kristóf
955315f831 ac/nir: Move pre-rasterization related utilities in separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:21 +01:00
Timur Kristóf
a986f9b90d ac/nir: Move ac_nir_lower_sin_cos to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:19 +01:00
Timur Kristóf
19bca6d425 ac/nir: Move ac_nir_lower_mem_access_bit_sizes to separate file.
Also ac_nir_flag_smem_for_loads along with it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:17 +01:00
Timur Kristóf
85eab189ee ac/nir: Move ac_nir_opt_pack_half to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:15 +01:00
Timur Kristóf
e79c77b1ef ac/nir: Move ac_nir_gs_shader_query declaration to ac_nir_helpers.h
This is a helper function, so drivers don't need to call it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:13 +01:00
Timur Kristóf
88c951bd46 ac/nir: Move ac_nir_lower_legacy_gs to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:11 +01:00
Timur Kristóf
6dd3f53204 ac/nir: Move ac_nir_lower_legacy_vs to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:10 +01:00
Timur Kristóf
d0e71ac9cd ac/nir: Move ac_nir_lower_intrinsics_to_args to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:08 +01:00
Timur Kristóf
a0b226bafb ac/nir: Expose ac_nir_unpack_value in ac_nir_helpers.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:06 +01:00
Timur Kristóf
1181348e80 ac/nir: Move ac_nir_create_gs_copy_shader to separate file.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:04 +01:00
Timur Kristóf
1191408d4b ac: Move ac_nir_config struct to ac_nir.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:03 +01:00
Timur Kristóf
4cad0bc438 ac/nir: Rename emit_streamout to ac_nir_emit_legacy_streamout
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:46:01 +01:00
Timur Kristóf
015e5080e9 ac: Stop including nir.h in ac_shader_util.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:36 +01:00
Timur Kristóf
305fdfddb5 ac/nir: Move ac_set_nir_options to ac_nir.c
And rename it to ac_nir_set_options to match other functions.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:34 +01:00
Timur Kristóf
855de0483f ac/nir: Move ac_nir callback functions to ac_nir.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:32 +01:00
Timur Kristóf
cc0166462e ac/nir: Move ac_nir_get_mem_access_flags to ac_nir.c
And change its name to indicate that it is NIR specific.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:30 +01:00
Timur Kristóf
ad5c0b7103 ac/nir: Move ac_nir_lower_bit_size_callback to ac_nir.c
ac_shader_util should not concern itself with NIR stuff.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:28 +01:00
Marek Olšák
7e21b48a2e ac/nir: split ac_nir_lower_ps into 2 passes
It's split into ac_nir_lower_ps_early ac_nir_lower_ps_late.

ac_nir_lower_ps_early doesn't generate any AMD specific intrinsics except
some system values and is mainly an optimization pass with some lowering.
The new change here is that it also eliminates output components not needed
by spi_shader_col_format.

ac_nir_lower_ps_late lowers output stores to exports and does the bc_optimize
thing.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:25 +01:00
Marek Olšák
62c184c491 ac/nir: remove broadcast_last_cbuf because it can be deduced from NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32966>
2025-01-14 13:45:22 +01:00
Christopher Michael
084754a5e5 v3d: Add support for PIPE_QUERY_TIMESTAMP_DISJOINT
When supporting PIPE_QUERY_TIMESTAMP, we use os_time_get_nano so the
disjoint timer frequency should be nanoseconds.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:08 +00:00
Christopher Michael
5982a69f90 v3d: Add support for time elapsed queries
Add support for getting time elapsed values via glBeginQuery/glEndQuery.
When recording query start & end time, we ensure that all pending jobs have
been completed by using v3d cpu_queue & the multisync extension.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:08 +00:00
Christopher Michael
9a35894d61 v3d: Add support for timestamp queries
Add support for getting timestamp values via
glGet(GL_TIMESTAMP) and glQueryCounter(GL_TIMESTAMP). For the case of
glQueryCounter, we make use of v3d cpu jobs via
DRM_IOCTL_V3D_SUBMIT_CPU and DRM_V3D_EXT_ID_CPU_TIMESTAMP_QUERY.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:08 +00:00
Christopher Michael
8e1b27138c v3d: Add check to see if v3d supports multisync
Add support to check if v3d supports the multisync
extension. This will be used in future patches to enable support for
PIPE_CAP_QUERY_TIMESTAMP & PIPE_CAP_QUERY_TIME_ELAPSED.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:07 +00:00
Christopher Michael
5e728db32a v3d: Add check to see if v3d supports cpu_queue
Add support to check if v3d supports cpu_queue. This
will be used in future patches to enable support for
PIPE_CAP_QUERY_TIMESTAMP & PIPE_CAP_QUERY_TIME_ELAPSED.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32547>
2025-01-14 09:56:07 +00:00
Samuel Pitoiset
94da1edbe4 radv: rename attr_ring to ge_rings
This is better naming.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32994>
2025-01-14 00:59:38 -08:00
Samuel Pitoiset
ab96333490 radv: fix configuring the attribute ring size on GFX12
The attribute ring size per SE is different than GFX11 and it was
already computed correctly in common code but RADV was using the old
GFX11 style.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32994>
2025-01-14 00:59:37 -08:00
Chia-I Wu
776199ea77 panvk/csf: add a comment on query synchronization
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
655b7c464a panvk/csf: no need to flush caches after query copy
The spec says

  vkCmdCopyQueryPoolResults is considered to be a transfer operation,
  and its writes to buffer memory must be synchronized using
  VK_PIPELINE_STAGE_TRANSFER_BIT and VK_ACCESS_TRANSFER_WRITE_BIT before
  using the results.

While STORE_MULTIPLE is not exactly VK_PIPELINE_STAGE_TRANSFER_BIT /
VK_ACCESS_TRANSFER_WRITE_BIT, we can still rely on user barriers to do
the right thing (e.g., flush caches for host access).

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
8948ca1024 panvk/csf: no need to sb wait on query copy
When VK_QUERY_RESULT_WAIT_BIT is set, we rely on sync wait.  When
VK_QUERY_RESULT_WAIT_BIT is not set, no wait is needed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
d04437845f panvk/csf: no need to sb wait on query end
We can guarantee ordering with this sequence of async cmds

  RUN_FRAGMENT ->
  (signal and wait SB_ITER) ->
  FLUSH_CACHE2 ->
  (signal and wait DEFERRED_FLUSH) ->
  SYNC_SET32

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
50a3b4765e panvk/csf: no need to sb wait on query begin
The spec says

  VUID-vkCmdBeginQueryIndexedEXT-None-00807
  All queries used by the command must be unavailable

and panvk_cmd_reset_occlusion_queries is synchronous.

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
12ce26a1d1 panvk: no need to zero results on query reset
The spec says

  Resetting a query via vkCmdResetQueryPool or vkResetQueryPool sets the
  status to unavailable and makes the numerical results undefined.

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
0b3e10d6fd panvk: no need to check query count on query create
The spec says

  VUID-VkQueryPoolCreateInfo-queryCount-02763
  queryCount must be greater than 0

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Chia-I Wu
04e899f125 panvk: no need to zero availability on query create
The spec says

  After query pool creation, each query is in an uninitialized state and
  must be reset before it is used.

Signed-off-by: Chia-I Wu <olvaffe@gmail.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/32697>
2025-01-14 05:43:46 +00:00
Nanley Chery
cd8e120b97 anv: Allow more single subresource fast-clears with FCV
Format re-interpretation is no longer a problem with texture views. The
clear color address now points to a clear color that is in the expected
format.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374>
2025-01-14 03:43:55 +00:00
Nanley Chery
35f02d8f36 anv: Inline can_fast_clear_with_non_zero_color
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374>
2025-01-14 03:43:55 +00:00
Nanley Chery
5549cb921d Revert "anv: turn off non zero fast clears for CCS_E"
This reverts commit 25a232238f.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11110
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11325
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374>
2025-01-14 03:43:55 +00:00
Nanley Chery
3e62401df3 anv: Drop bpc check for non-zero fast clears
Use the matching clear color address for an image view format to support
any clear color.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31374>
2025-01-14 03:43:55 +00:00
Nanley Chery
83cd73385a anv: Use L3 Fabric flush in fast-clear post-amble on TGL
Replace the Tile Cache flush with an L3 Fabric flush. According to HSD
1604687438, this should be faster.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600>
2025-01-14 03:14:00 +00:00
Nanley Chery
cec086a074 anv: Reduce fast-clear post-amble synchronization
On gfx12+, the pre-amble and post-amble flushes contain the stalls
necessary to ensure the prior operation is complete. Remove the extra
uses of ANV_PIPE_END_OF_PIPE_SYNC_BIT in post-amble flushes. Also do
this for the pre-amble flushes, but this doesn't have any impact. The
flush application function will implicitly add the bit.

For A750, this improves the TWWH3 trace in the performance CI by 0.52%
(n=2).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600>
2025-01-14 03:14:00 +00:00
Nanley Chery
e9a85dd3ac iris: Use L3 Fabric flush in fast-clear post-amble on TGL
Replace the Tile Cache flush with an L3 Fabric flush. According to HSD
1604687438, this should be faster.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600>
2025-01-14 03:14:00 +00:00
Nanley Chery
2e7f344508 iris: Reduce fast-clear post-amble flushes
On gfx12+, the post-amble flushes contain the stalls necessary to ensure
the prior operation is complete. Remove the extra uses
iris_emit_end_of_pipe_sync().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31600>
2025-01-14 03:14:00 +00:00
Caio Oliveira
634daf2827 intel/brw: Rename brw_fs_validate to brw_validate
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32843>
2025-01-13 23:56:22 +00:00
Caio Oliveira
d37cbfad66 util/ra: Don't store a pointer to a ra_regs per ra_reg
Each reg may store a list of conflict regs.  This was handled by
util_dynarray, however each of those hold an extra pointer for
the ra_regs (which serves as mem_ctx for that).  Since the usage
here is very simple, we just handle the array growth manually.
The initial size remains the same as before.

The mem_ctx of each ra_reg was being used to identify the case
in which the list wasn't used.  Change to use a bool in the
ra_regs struct instead.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
2025-01-13 23:10:51 +00:00
Caio Oliveira
298740d7a1 util/ra: Bump the initial size of adjacency lists
For Intel, looking at a few fossils, the majority of nodes
have more than 32 entries in the list.  I'd expect other backends
to have similar numbers.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
2025-01-13 23:10:51 +00:00
Caio Oliveira
9cccb89dbc util/ra: Don't store a pointer to graph per ra_node
Each node stores a list of adjacent nodes.  This was handled by
util_dynarray, however each of those hold an extra pointer for
the ra_graph (which serves as mem_ctx for that).  Since the usage
here is very simple, we just handle the array growth manually.

For now keep using the same initial size as was being used by dynarray.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
2025-01-13 23:10:51 +00:00
Caio Oliveira
3753c9ed1b util/ra: Move less used data out of ra_node
Create a parallel array to hold them.  In particular, the `spill_cost` is
used at a completely different moment than the main node data.

Reduces the `struct ra_node` size to 40 bytes.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25744>
2025-01-13 23:10:51 +00:00
Nanley Chery
052d7e1a9c anv: Slow clear if fast-clear cost is not mitigated
Fast-clears require expensive flushes beforehand and afterwards. The
cost of flushes are decreased in a series of back-to-back fast-clears as
no extra fast-clear flushes are required in between them. If the ratio
of a command buffer's recorded back-to-back fast clears over independent
fast-clears falls below 1/2, prevent that command buffer from recording
any further fast-clears.

Averaging two runs of our Factorio trace on an A750 shows a +14.37%
improvement in FPS.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32984>
2025-01-13 20:42:31 +00:00
Brian Paul
24107f2f67 svga: fix printing 64-bit value for 32-bit build
Closes: #12449, #12451
Fixes: b13e2a495e ("svga: add svga_resource_create_with_modifiers() function")
Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.Bhende@broadcom.com>
Reviewed-by: Neha Bhende <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32995>
2025-01-13 18:25:55 +00:00
Zan Dobersek
7c927144b3 freedreno/registers: fix RBBM_PRIMCTR understanding and usage
RBBM_PRIMCTR registers are used for different pipeline statistics that can
be queried, but current usage was wrong in some cases. Comments in the
register file are updated, and the per-statistic register index mapping is
updated accordingly.

Fixes on a750:
  test_query_pipeline_statistics in vkd3d-proton
  arb_query_buffer_object failures in piglit (zink)

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32900>
2025-01-13 15:46:20 +00:00
Sergi Blanch Torne
3fed68b607 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 02f8b22a1a.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32993>
2025-01-13 13:43:53 +00:00
David Rosca
5a5628284a frontends/va: Allow creating DRM PRIME surfaces without surface descriptor
If we don't have surface descriptor, treat this as a hint from
application that it will export the surface later.
This matches Intel driver behavior.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32970>
2025-01-13 10:26:02 +00:00
Samuel Pitoiset
10e424f586 aco: always use ds_bpermute for shuffle/rotate on GFX12
ds_bpermute supports both 32 and 64 lanes now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32974>
2025-01-13 08:33:38 +00:00
Samuel Pitoiset
b3d4d65f5a radv: fix CP DMA clears/copies on GFX12
CP DMA on GFX12 doesn't always use L2.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32971>
2025-01-13 08:07:58 +00:00
Samuel Pitoiset
603541f1a2 ac/gpu_info: add cp_dma_use_L2
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32971>
2025-01-13 08:07:58 +00:00
Sergi Blanch Torne
02f8b22a1a ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2025-01-13 08:00 UTC
* End: 2025-01-13 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32734>
2025-01-13 07:36:17 +00:00
Job Noorman
c1dfe22b7b ir3: emit uniform iadd3 as two adds
The `sad` instruction (used for iadd3) doesn't support the scalar ALU.
This means we might fall back to non-earlypreamble whenever we use it in
the preamble. Prevent this by emitting it as two adds instead.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32943>
2025-01-13 07:06:03 +00:00
Lucas Stach
bed748d5f6 etnaviv: fix polygon offset disable
If a polygon offset is set via glPolygonOffset, but the functionality
isn't enabled via glEnable(GL_POLYGON_OFFSET_FILL) the offset must not
be taken into account when computing the sample depth. As the Vivante
hardware does not have a separate enable state, the offset units and
scale must both be set to 0 to keep the sample depth unchanged.

Fixes dEQP-GLES2.functional.polygon_offset.default_enable

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/32982>
2025-01-12 21:06:33 +00:00
duncan.hopkins
20b806284a glx: Add back in applegl_create_display() so the OpenGL.framework, on MacOS, pointer get setup.
Fixes: 4e8740370a ("glx: rework __glXInitialize")

Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32656>
2025-01-12 16:49:33 +00:00
duncan.hopkins
48ebbe2777 glx: Guard some of the bind_extensions() code with the same conditions as glx_screens frontend_screen member.
Configution like simple MacOS builds do not have `frontend_screen` and fail to build.

Fixes: 34dea2b38e ("glx: unify extension binding")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12317

Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32656>
2025-01-12 16:49:33 +00:00
Karol Herbst
0aa218328d rusticl/kernel: store memory arguments as Weak references
Through the spec it's required that cl_kernel doesn't hold references to
its bound kernel arguments.

There is a CL CTS test verifying this, but because the arguments were not
used in the test kernel, a reference was never taken. This will change
with SVM and BDA as we need to know all bound memory objects even if they
aren't directly used in kernels.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32961>
2025-01-12 15:26:14 +00:00
Rob Clark
114a47544f ir3: Add preamble instr count metric
Turnip already had a pipeline stat to indicate whether we were using
early-preamble or not.  But no way to tell if there was a preamble at
all.  Adding a preamble instruction count tells us whether there is a
preamble, but also how big it is.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32977>
2025-01-11 18:10:17 +00:00
Kenneth Graunke
894393470a brw: Fix Xe2 spilling code to limit to SIMD32 rather than SIMD16
LSC can do native SIMD32 messages on Xe2.

Cuts spill/fills on Lunarlake:
- q2rtx-rt-pipeline: -20.83% / -16.85%
- Borderlands 3 DX12: -18.26% / -2.09%
- Cyberpunk 2077: -2.18% / -0.11%

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32986>
2025-01-11 09:33:09 +00:00
Lionel Landwerlin
8ac7802ac8 brw: move final send lowering up into the IR
Because we do emit the final send message form in code generation, a
lot of emissions look like this :

  add(8)  vgrf0,    u0, 0x100
  mov(1)   a0.1, vgrf0          # emitted by the generator
  send(8)   ...,  a0.1

By moving address register manipulation in the IR, we can get this
down to :

  add(1)  a0.1,   u0, 0x100
  send(8)  ..., a0.1

This reduce register pressure around some send messages by 1 vgrf.

All lost shaders in the below results are fragment SIMD32, due to the
throughput estimator. If turned off, we loose no SIMD32 shaders with
this change.

DG2 results:

  Assassin's Creed Valhalla:
  Totals from 2044 (96.87% of 2110) affected shaders:
  Instrs: 852879 -> 832044 (-2.44%); split: -2.45%, +0.00%
  Subgroup size: 23832 -> 23824 (-0.03%)
  Cycle count: 53345742 -> 52144277 (-2.25%); split: -5.08%, +2.82%
  Spill count: 729 -> 554 (-24.01%); split: -28.40%, +4.39%
  Fill count: 2005 -> 1256 (-37.36%)
  Scratch Memory Size: 25600 -> 19456 (-24.00%); split: -32.00%, +8.00%
  Max live registers: 116765 -> 115058 (-1.46%)
  Max dispatch width: 19152 -> 18872 (-1.46%); split: +0.21%, -1.67%

  Cyberpunk 2077:
  Totals from 1181 (93.43% of 1264) affected shaders:
  Instrs: 667192 -> 663615 (-0.54%); split: -0.55%, +0.01%
  Subgroup size: 13016 -> 13032 (+0.12%)
  Cycle count: 17383539 -> 17986073 (+3.47%); split: -0.93%, +4.39%
  Spill count: 12 -> 8 (-33.33%)
  Fill count: 9 -> 6 (-33.33%)

  Dota2:
  Totals from 173 (11.59% of 1493) affected shaders:
  Cycle count: 274403 -> 280817 (+2.34%); split: -0.01%, +2.34%
  Max live registers: 5787 -> 5779 (-0.14%)
  Max dispatch width: 1344 -> 1152 (-14.29%)

  Hitman3:
  Totals from 5072 (95.39% of 5317) affected shaders:
  Instrs: 2879952 -> 2841804 (-1.32%); split: -1.32%, +0.00%
  Cycle count: 153208505 -> 165860401 (+8.26%); split: -2.22%, +10.48%
  Spill count: 3942 -> 3200 (-18.82%)
  Fill count: 10158 -> 8846 (-12.92%)
  Scratch Memory Size: 257024 -> 223232 (-13.15%)
  Max live registers: 328467 -> 324631 (-1.17%)
  Max dispatch width: 43928 -> 42768 (-2.64%); split: +0.09%, -2.73%

  Fortnite:
  Totals from 360 (4.82% of 7472) affected shaders:
  Instrs: 778068 -> 777925 (-0.02%)
  Subgroup size: 3128 -> 3136 (+0.26%)
  Cycle count: 38684183 -> 38734579 (+0.13%); split: -0.06%, +0.19%
  Max live registers: 50689 -> 50658 (-0.06%)

  Hogwarts Legacy:
  Totals from 1376 (84.00% of 1638) affected shaders:
  Instrs: 758810 -> 749727 (-1.20%); split: -1.23%, +0.03%
  Cycle count: 27778983 -> 28805469 (+3.70%); split: -1.42%, +5.12%
  Spill count: 2475 -> 2299 (-7.11%); split: -7.47%, +0.36%
  Fill count: 2677 -> 2445 (-8.67%); split: -9.90%, +1.23%
  Scratch Memory Size: 99328 -> 89088 (-10.31%)
  Max live registers: 84969 -> 84671 (-0.35%); split: -0.58%, +0.23%
  Max dispatch width: 11848 -> 11920 (+0.61%)

  Metro Exodus:
  Totals from 92 (0.21% of 43072) affected shaders:
  Instrs: 262995 -> 262968 (-0.01%)
  Cycle count: 13818007 -> 13851266 (+0.24%); split: -0.01%, +0.25%
  Max live registers: 11152 -> 11140 (-0.11%)

  Red Dead Redemption 2 :
  Totals from 451 (7.71% of 5847) affected shaders:
  Instrs: 754178 -> 753811 (-0.05%); split: -0.05%, +0.00%
  Cycle count: 3484078523 -> 3484111965 (+0.00%); split: -0.00%, +0.00%
  Max live registers: 42294 -> 42185 (-0.26%)

  Spiderman Remastered:
  Totals from 6820 (98.02% of 6958) affected shaders:
  Instrs: 6921500 -> 6747933 (-2.51%); split: -4.16%, +1.65%
  Cycle count: 234400692460 -> 236846720707 (+1.04%); split: -0.20%, +1.25%
  Spill count: 72971 -> 72622 (-0.48%); split: -8.08%, +7.61%
  Fill count: 212921 -> 198483 (-6.78%); split: -12.37%, +5.58%
  Scratch Memory Size: 3491840 -> 3410944 (-2.32%); split: -12.05%, +9.74%
  Max live registers: 493149 -> 487458 (-1.15%)
  Max dispatch width: 56936 -> 56856 (-0.14%); split: +0.06%, -0.20%

  Strange Brigade:
  Totals from 3769 (91.21% of 4132) affected shaders:
  Instrs: 1354476 -> 1321474 (-2.44%)
  Cycle count: 25351530 -> 25339190 (-0.05%); split: -1.64%, +1.59%
  Max live registers: 199057 -> 193656 (-2.71%)
  Max dispatch width: 30272 -> 30240 (-0.11%)

  Witcher 3:
  Totals from 25 (2.40% of 1041) affected shaders:
  Instrs: 24621 -> 24606 (-0.06%)
  Cycle count: 2218793 -> 2217503 (-0.06%); split: -0.11%, +0.05%
  Max live registers: 1963 -> 1955 (-0.41%)

LNL results:

  Assassin's Creed Valhalla:
  Totals from 1928 (98.02% of 1967) affected shaders:
  Instrs: 856107 -> 835756 (-2.38%); split: -2.48%, +0.11%
  Subgroup size: 41264 -> 41280 (+0.04%)
  Cycle count: 64606590 -> 62371700 (-3.46%); split: -5.57%, +2.11%
  Spill count: 915 -> 669 (-26.89%); split: -32.79%, +5.90%
  Fill count: 2414 -> 1617 (-33.02%); split: -36.62%, +3.60%
  Scratch Memory Size: 62464 -> 44032 (-29.51%); split: -36.07%, +6.56%
  Max live registers: 205483 -> 202192 (-1.60%)

  Cyberpunk 2077:
  Totals from 1177 (96.40% of 1221) affected shaders:
  Instrs: 682237 -> 678931 (-0.48%); split: -0.51%, +0.03%
  Subgroup size: 24912 -> 24944 (+0.13%)
  Cycle count: 24355928 -> 25089292 (+3.01%); split: -0.80%, +3.81%
  Spill count: 8 -> 3 (-62.50%)
  Fill count: 6 -> 3 (-50.00%)
  Max live registers: 126922 -> 125472 (-1.14%)

  Dota2:
  Totals from 428 (32.47% of 1318) affected shaders:
  Instrs: 89355 -> 89740 (+0.43%)
  Cycle count: 1152412 -> 1152706 (+0.03%); split: -0.52%, +0.55%
  Max live registers: 32863 -> 32847 (-0.05%)

  Fortnite:
  Totals from 5354 (81.72% of 6552) affected shaders:
  Instrs: 4135059 -> 4239015 (+2.51%); split: -0.01%, +2.53%
  Cycle count: 132557506 -> 132427302 (-0.10%); split: -0.75%, +0.65%
  Spill count: 7144 -> 7234 (+1.26%); split: -0.46%, +1.72%
  Fill count: 12086 -> 12403 (+2.62%); split: -0.73%, +3.35%
  Scratch Memory Size: 600064 -> 604160 (+0.68%); split: -1.02%, +1.71%

  Hitman3:
  Totals from 4912 (97.09% of 5059) affected shaders:
  Instrs: 2952124 -> 2916824 (-1.20%); split: -1.20%, +0.00%
  Cycle count: 179985656 -> 189175250 (+5.11%); split: -2.44%, +7.55%
  Spill count: 3739 -> 3136 (-16.13%)
  Fill count: 10657 -> 9564 (-10.26%)
  Scratch Memory Size: 373760 -> 318464 (-14.79%)
  Max live registers: 597566 -> 589460 (-1.36%)

  Hogwarts Legacy:
  Totals from 1471 (96.33% of 1527) affected shaders:
  Instrs: 748749 -> 766214 (+2.33%); split: -0.71%, +3.05%
  Cycle count: 33301528 -> 34426308 (+3.38%); split: -1.30%, +4.68%
  Spill count: 3278 -> 3070 (-6.35%); split: -8.30%, +1.95%
  Fill count: 4553 -> 4097 (-10.02%); split: -10.85%, +0.83%
  Scratch Memory Size: 251904 -> 217088 (-13.82%)
  Max live registers: 168911 -> 168106 (-0.48%); split: -0.59%, +0.12%

  Metro Exodus:
  Totals from 18356 (49.81% of 36854) affected shaders:
  Instrs: 7559386 -> 7621591 (+0.82%); split: -0.01%, +0.83%
  Cycle count: 195240612 -> 196455186 (+0.62%); split: -1.22%, +1.84%
  Spill count: 595 -> 546 (-8.24%)
  Fill count: 1604 -> 1408 (-12.22%)
  Max live registers: 2086937 -> 2086933 (-0.00%)

  Red Dead Redemption 2:
  Totals from 4171 (79.31% of 5259) affected shaders:
  Instrs: 2619392 -> 2719587 (+3.83%); split: -0.00%, +3.83%
  Subgroup size: 86416 -> 86432 (+0.02%)
  Cycle count: 8542836160 -> 8531976886 (-0.13%); split: -0.65%, +0.53%
  Fill count: 12949 -> 12970 (+0.16%); split: -0.43%, +0.59%
  Scratch Memory Size: 401408 -> 385024 (-4.08%)

  Spiderman Remastered:
  Totals from 6639 (98.94% of 6710) affected shaders:
  Instrs: 6877980 -> 6800592 (-1.13%); split: -3.11%, +1.98%
  Cycle count: 282183352210 -> 282100051824 (-0.03%); split: -0.62%, +0.59%
  Spill count: 63147 -> 64218 (+1.70%); split: -7.12%, +8.82%
  Fill count: 184931 -> 175591 (-5.05%); split: -10.81%, +5.76%
  Scratch Memory Size: 5318656 -> 5970944 (+12.26%); split: -5.91%, +18.17%
  Max live registers: 918240 -> 906604 (-1.27%)

  Strange Brigade:
  Totals from 3675 (92.24% of 3984) affected shaders:
  Instrs: 1462231 -> 1429345 (-2.25%); split: -2.25%, +0.00%
  Cycle count: 37404050 -> 37345292 (-0.16%); split: -1.25%, +1.09%
  Max live registers: 361849 -> 351265 (-2.92%)

  Witcher 3:
  Totals from 13 (46.43% of 28) affected shaders:
  Instrs: 593 -> 660 (+11.30%)
  Cycle count: 28302 -> 28714 (+1.46%)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
a27d98e933 brw: avoid having the scratch surface handle partially written
Allows it to be visible through the def_analysis.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
aac906c16c brw: add scheduler support for address registers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
0a5bdf1199 brw: add infra to make use of the address register in the IR
This limits the address register to simple cases inside a block.

Validation ensures that the address register is only written once and
read once.

Instruction scheduling makes sure that instructions using the address
register in the generator are not scheduled while there is an usage of
the register in the IR.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
c9fa235c28 brw: split validation iteration into blocks
No functional change.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
9b73a73a6e brw: use phys_nr() more in generation
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Lionel Landwerlin
b110b06447 brw: introduce a new register type for the address register
We want to reuse the brw::nr field as a virtual address register
identifer. So we can't use brw::file=ARF brw::nr=ADDRESS.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28199>
2025-01-11 08:41:42 +00:00
Marek Olšák
842c91300f mesa: enable GL name reuse by default for all drivers except virgl
v2: detect qemu, crossvm

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32715>
2025-01-11 05:54:52 +00:00
Marek Olšák
b15c8fe3f1 mesa: rework enablement of force_gl_names_reuse
force_gl_names_reuse is changed to integer.
 -1 means default (currently disabled), 0 means disabled, 1 means enabled

The names reuse initialization is moved to _mesa_alloc_shared_state ->
_mesa_InitHashTable instead of _mesa_HashEnableNameReuse.

It will be enabled by default.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32715>
2025-01-11 05:54:52 +00:00
Felix DeGrood
06423b1792 vk/overlay-layer: defer log creation to swapchain creation
Moving output file creation to coincide with swapchain creation
ensures only rendering thread will create/destroy log file. This
was causing problems with non-rendering processes stomping log file.

Reviewed-by: Caleb Callaway <caleb.callaway@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32814>
2025-01-10 23:44:24 +00:00
Kenneth Graunke
de1eaa4019 brw: Always use MEMORY_LOAD for load_ubo_uniform_block_intel intrinsics
Rather than emitting FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD to do block
loads that were cacheline aligned, loading entire cachelines at a time,
we now rely on NIR passes to group, CSE, and vectorize things into
appropriately sized blocks.  This means that we'll usually still load
a cacheline, but we may load only 32B if we don't actually need anything
from the full 64B.  Prior to Xe2, this saves us registers, and it ought
to save us some bandwidth as well as the response length can be lowered.

The cacheline-aligning hack was the main reason not to simply call
fs_nir_emit_memory_access(), so now we do that instead, porting yet
one more thing to the common memory opcode framework.

We unfortunately still emit the old FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD
opcode for non-block intrinsics.  We'd have to clean up 16-bit handling
among other things in order to eliminate this, but we should in the
future.

fossil-db results on Alchemist for this and the previous patch together:

   Instrs: 161481888 -> 161297588 (-0.11%); split: -0.12%, +0.01%
   Subgroup size: 8102976 -> 8103000 (+0.00%)
   Send messages: 7895489 -> 7846178 (-0.62%); split: -0.67%, +0.05%
   Cycle count: 16583127302 -> 16703162264 (+0.72%); split: -0.57%, +1.29%
   Spill count: 72316 -> 67212 (-7.06%); split: -7.25%, +0.19%
   Fill count: 134457 -> 125970 (-6.31%); split: -6.83%, +0.52%
   Scratch Memory Size: 4093952 -> 3787776 (-7.48%); split: -7.53%, +0.05%
   Max live registers: 33037765 -> 32947425 (-0.27%); split: -0.28%, +0.00%
   Max dispatch width: 5780288 -> 5778536 (-0.03%); split: +0.17%, -0.20%
   Non SSA regs after NIR: 177862542 -> 178816944 (+0.54%); split: -0.06%, +0.60%

In particular, several titles see incredible reductions in spill/fills:

   Shadow of the Tomb Raider: -65.96% / -65.44%
   Batman: Arkham City GOTY:  -53.49% / -28.57%
   Witcher 3:                 -16.33% / -14.29%
   Total War: Warhammer III:   -9.60% / -10.14%
   Assassins Creed Odyssey:    -6.50% /  -9.92%
   Red Dead Redemption 2:      -6.77% /  -8.88%
   Far Cry: New Dawn:          -7.97% /  -4.53%

Improves performance in many games on Arc A750:

   Cyberpunk 2077: 5.8%
   Witcher 3: 4%
   Shadow of the Tomb Raider: 3.3%
   Assassins Creed: Valhalla: 3%
   Spiderman Remastered: 2.75%

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
21636ff9fa brw: Align and combine constant-offset UBO loads in NIR
The hope here is to replace our backend handling for loading whole
cachelines at a time from UBOs into NIR-based handling, which plays
nicely with the NIR load/store vectorizer.

Rounding down offsets to multiples of 64B allows us to globally CSE
UBO loads across basic blocks.  This is really useful.  However, blindly
rounding down the offset to a multiple of 64B can trigger anti-patterns
where...a single unaligned memory load could have hit all the necessary
data, but rounding it down split it into two loads.

By moving this to NIR, we gain more control of the interplay between
nir_opt_load_store_vectorize and this rebasing and CSE'ing.  The backend
can then simply load between nir_def_{first,last}_component_read() and
trust that our NIR has the loads blockified appropriately.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
36d0485ae4 brw: Allow CSE of MEMORY_MODE_CONSTANT loads
This matches the behavior of FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
7ce66e2b61 brw: Add a new MEMORY_MODE_CONSTANT option
This will translate to HDC Constant Cache loads or LSC UGM loads.

On LSC, MEMORY_MODE_UNTYPED would be fine, but for HDC we need to
distinguish between the regular and constant cache data ports.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
cfbb5ebcdd brw: Skip unread leading/trailing components in convergent block loads
The NIR vectorizer may produce block loads with unread trailing
components.  Upcoming passes may produce unread leading components
as well.  With a bit of finesse, we can skip loading those, and only
bother with the ones we actually need.  This can sometimes save us on
loads and MOVs.

v2: Skip this for SLM reads on pre-LSC platforms (caught by Lionel).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
4f0c852a4e brw: Skip unnecessary work for trivial emit_uniformize of IMMs
If we pass an immediate, just trivially return that immediate.

This preserves the property that if x was an IMM, emit_uniformize(x)
will also be an IMM, without the need for optimizations to eliminate
unnecessary operations.  That way, you can call emit_uniformize() on
a value and still check whether it's constant afterwards.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
a0b1e07976 brw: Make get_nir_src_imm() usable for non-32-bit-sizes.
We return an immediate for 32-bit constant values, but fall back to
calling get_nir_src() for other values, as 64-bit, and even 8-bit
immediates have odd restrictions.  We could probably support 16-bit
here without too many issues, but we leave it be for now.

This makes it usable for case where we'd like to get constants for
32-bit values but where it may be a different bit-size too.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
03f948f5fd brw: Skip fetching unread leading components of UBO loads
We were already skipping unread trailing components, but now we skip
them on both ends.

About -3.5% spills on Shadow of the Tomb Raider on Alchemist (mostly a
wash elsewhere, but it will help additional shaders with later patches).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
c8b2ab041e brw: Add more safeguards against misaligned OWord Block messages
HDC doesn't support block loads/stores with sub-DWord (<4B) aligned
offsets, and shared local memory has to use the Aligned OWord Block
messages which require OWord (16B) alignment.

Make the validator detect this case and say no.  Also make the lowering
code assert that the alignment is valid as a second line of defense.

LSC has no such restrictions.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Kenneth Graunke
2f334e8baf nir: Add a nir_def_first_component_read() helper
Similar to nir_def_last_component_read().  Just a little nicer than
prodding at the bitmask of components read directly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32888>
2025-01-10 22:44:09 +00:00
Hyunjun Ko
638fc5e472 anv: change bool to VkResult
Fixes: 41caf3665c
("anv/image: allocate some memory for mv storage after video images.")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
ec60462a65 anv: fix to set default cdf buf correctly.
v1. Store cdf index values to the state of the commnad buffer.
(Lionel Landwerlin <lionel.g.landwerlin@intel.com>)

Fixes: dEQP-VK.video.decode.av1.sizeup_8_separated_dpb

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
e510efed05 anv: support in-loop super resolution for AV1 decoding
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
788263501d anv: calculate global parmeters correctly for AV1 decoding
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Dave Airlie
8432b8b282 anv: add initial support for AV1 decoding
Co-authored-by: Hyunjun Ko <zzoon@igalia.com>
- Allow intrabc
- Fix to manage refrenece frames using referenceNameSlotIndices
- Fix to set bitmask of motion field projection correctly
- Set destination buffer offset to the BSD_OBJECT
- Support 10-bit decoding.
- Fix small bugs.
- Change to C-style comment.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
0fd0a51df6 anv/video: Fix to return supported video format correctly.
Since 8-bit decoding is not default, we need to check the flag too.

Fixes: a64ae20d0 ("anv: support HEVC 10-bit decoding" )

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Hyunjun Ko
3f3d6c04a3 intel/genxml: define MEMORYADDRESSATTRIBUTES for Gen12.5 with TILEF
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Dave Airlie
68477ae7c0 genxml: add av1 fields
Co-authored-by: Hyunjun Ko <zzoon@igalia.com>
- Remove HuC pipeline params of VD_PIPELINE_FLUSH
- Fix length of AVP_PIPE_MODE_SELECT, AVP_PIC_STATE, AVP_PIPE_BUF_ADDR_STATE

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Dave Airlie
6a28e7a6c7 anv: add default av1 tables from media-driver
Co-authored-by: Hyunjun Ko <zzoon@igalia.com>
- Change to C-style comment.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32775>
2025-01-10 21:45:04 +00:00
Brian Paul
b13e2a495e svga: add svga_resource_create_with_modifiers() function
The dri_create_image() function returns early if the gallium
driver does not implement this function.  Surface creation has
been broken for some time up to this fix.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Neha Bhende <neha.Bhende@broadcom.com>
Reviewed-by: Neha Bhende <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32976>
2025-01-10 21:15:12 +00:00
Caio Oliveira
7fadd864dd intel/elk: Fix typo in assertion
Just assert that the array will fit whatever the MAX is for a given
Gfx version.

Fixes: 172c1ab984 ("intel/elk: Add ELK_MAX_MRF_ALL for static allocating arrays")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32978>
2025-01-10 20:16:59 +00:00
Mike Blumenkrantz
010732b8ef glsl: enable OVR_multiview if OVR_multiview2 is enabled
according to spec

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32946>
2025-01-10 19:10:48 +00:00
Mike Blumenkrantz
3c5eae639d glsl: make gl_ViewID_OVR visible to all shader stages
according to spec

Fixes: 328c29d600 ("mesa,glsl,gallium: add GL_OVR_multiview")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32946>
2025-01-10 19:10:48 +00:00
Mary Guillemard
bacc5f4579 pan/genxml: Switch __gen_unpack to macros
This switch all __gen_unpack functions to macros to keep address space
information when working with OpenCL C.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
3f3bb741fb pan/genxml: Switch [un]pack codegen to macros
Because of OpenCL C, we need a way to retain address space information
contains with the pointers.

As a result this switch all [un]pack functions to macros, resulting in
pointers retaining their respective address space information.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
e15940008f pan/genxml: Switch pan_section_ptr to cast to packed type
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
3b69edf825 pan/genxml: Enforce explicit packed types on pan_[un]pack
Provide a pan_cast_and_[un]pack() to help with the transition.
Those helpers should only be used when the caller is sure the
destination is big enough to emit the descriptor.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
bd80037441 pan/genxml: Move [un]pack internals to use packed structs
We are now strongly typing everything, pan_[un]pack wil enforce this at
the API level next.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32962>
2025-01-10 18:27:27 +00:00
Boris Brezillon
b9caca64f2 pan/genxml: Generate MALI_XXX_PACKED_T macros
Will be useful to easily define packed type variables from the
pan_[un]pack() functions, which we'll need during the pan_pack
revamp.

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/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
39d8b56c4a pan/genxml: Emit struct details before pack function
We are going to use packed structs in [un]pack next so we need those to
be emitted before them.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32962>
2025-01-10 18:27:27 +00:00
Mary Guillemard
95435a788d pan/genxml: Switch unpack to use uint32_t
Makes this match pack.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32962>
2025-01-10 18:27:27 +00:00
Boris Brezillon
ab1cd917ad pan/genxml: Include pan_pack_helpers.h instead of copying it
The generic bits in autogen pack helpers files were extracted in a
common header, so let's include it from the autogenerated file rather
than copying its content there.

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/32962>
2025-01-10 18:27:27 +00:00
Boris Brezillon
39461e5818 pan/genxml: s/PAN_PAN_HELPERS_H/PAN_PACK_HELPERS_H/
Fix a typo in the multi-inclusion guard.

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/32962>
2025-01-10 18:27:27 +00:00
Eric Engestrom
519f4bba6b docs/release-calendar: push the 25.0 branchpoint back by 2 weeks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32975>
2025-01-10 18:19:06 +00:00
Michael Cheng
c3c05ffb5f intel : Expose Shader hashes for utrace and Perfetto
This patch exposes shader hashes (computes and draws) to Perfetto and
utrace. By including these hashes in traces, developers can correlate
compute and draw calls with their assoicated ASM dumps when analyzing
the traces.

To achieve this, intel_tracepoint.py has been reworked to preprocess
tracepoint arguments dynamically. Any argument containing "hash" in its
variable name is now forrmated as hexadecimal before being passed to the
tracepoint definition.

Signed-off-by: Michael <michael.cheng@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32708>
2025-01-10 17:38:16 +00:00
Boris Brezillon
6f8fb6d73d panfrost/ci: Add panvk and panfrost to the debian-x86_32 job
Useful to catch compile-time regressions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32938>
2025-01-10 15:53:36 +00:00
Boris Brezillon
dc1b988273 panvk: Fix panvk_priv_mem_bo() on 32-bit platforms
Masking with an ~7ull promotes the value to 64-bit, leading
to a size mismatch when we cast it to a pointer.

Make sure we're using an uintptr_t type for the mask.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32938>
2025-01-10 15:53:36 +00:00
Boris Brezillon
134f965b88 panvk: Fix an alignment issue on x86
On x86-32, long long are aligned on 4-bytes only, which breaks
the assumption we had about our sysvals struct layouts.

Define an aligned_u64 embedding the alignment attribute to
keep the alignment sane.

While at it, enforce this alignment with an alignment attribute
on the struct itself.

This fixes the build on x86-32, and should do what we expect,
though it's not been tested in practice.

Fixes: ae76a6a045 ("panvk: Pack push constants")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12429
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32938>
2025-01-10 15:53:36 +00:00
Rhys Perry
2b10930b48 aco: use VOP3 v_mov_b16 if necessary
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 24.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32944>
2025-01-10 15:05:00 +00:00
Rhys Perry
46787fc2d0 aco/util: fix bit_reference::operator&=
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 24.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32944>
2025-01-10 15:05:00 +00:00
Erik Faye-Lund
4ff5672730 docs: update panvk status
We enabled fragmentStoresAndAtomics, but forgot to update this file.
Also add drawIndirectFirstInstance, which I missed last time I updated
the new features.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32960>
2025-01-10 11:35:56 +00:00
Lucas Stach
3a0d4c4203 ci/etnaviv: drop failures caused by missing vertex attributes
Now that we fill in a dummy state, instead of allowing the FE to
run with undefined state when no vertex attributes are present
we can drop the failures that were caused by this issue.

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/32947>
2025-01-10 10:57:58 +00:00
Lucas Stach
5ca8feb28b etnaviv: fix rendering without vertex buffers/attributes
The hardware doesn't allow to disable all vertex attribute streams,
so we end up with random FE state when a draw without vertex
attributes is encountered. Plug in a dummy attribute and vertex
buffer to avoid this.

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/32947>
2025-01-10 10:57:58 +00:00
Lucas Stach
bca5ef70a4 etnaviv: split dummy RT backing store from reloc
The dummy BO used as backing store for the dummy render target
can be reused for other usages where we don't care about the
actual content of the buffer. Split it out from the dummy RT
reloc to make this more clear.

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/32947>
2025-01-10 10:57:58 +00:00
David Rosca
c23df7e790 frontends/va: Only report surface alignment when non-zero
Otherwise this means the alignment is 1x1 which is wrong.

Fixes: b24748a93a ("frontends/va: add surface alignment attribute")
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32923>
2025-01-10 10:10:41 +00:00
Lukas Lipp
c0ef005bf4 wsi: Fix wrong function name for lvp wsi metal surface
Fixes: a42c2293ab
Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32878>
2025-01-10 09:27:02 +00:00
David Rosca
42595eb52e radeonsi/vcn: Fix crash when failing to allocate internal buffers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11725
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32901>
2025-01-10 07:43:08 +00:00
Caio Oliveira
c9e667b7ad intel/elk: Remove uses of VLAs
Was causing trouble in some build configurations, we don't really need
them.  Unless there's a good reason, defaults to use ralloc for
consistency with the larger codebase.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
172c1ab984 intel/elk: Add ELK_MAX_MRF_ALL for static allocating arrays
Replace usage of variable length arrays.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
4d43ee0dd6 intel/brw: Remove uses of VLAs
Was causing trouble in some build configurations, we don't really need
them.  Use ralloc for consistency.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
faf4c35b74 intel/compiler: Use linear allocator for ACP trees in copy-prop
Replace usage of variable length array.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
d35b6919a5 util: Add operator new[] to linear context helper declarations
This allow us to allocate arrays with `new (lin_ctx) MyStruct[10]`.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Caio Oliveira
e6a3770433 intel/compiler: Use INFINITY spill cost to represent no_spill
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Antonio Ospite <None>
Reviewed-by: Kenneth Graunke <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32916>
2025-01-10 07:05:35 +00:00
Marek Olšák
8ba718fb7d radeonsi/gfx12: use ACO for streamout because it's faster
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 23:37:55 -05:00
Marek Olšák
239840556f radeonsi/gfx12: use ACO if LLVM is 19 or older
LLVM 19 is missing a SALU hazard fix.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 23:37:55 -05:00
Marek Olšák
b05fa7d575 radeonsi/gfx12: set DIS_PG_SIZE_ADJUST_FOR_STRIP after shader compilation
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 23:37:55 -05:00
Marek Olšák
4cfa4e9dd7 radeonsi/gfx12: enable alt_hiz_logic
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 23:37:55 -05:00
Marek Olšák
1b405a12e0 radeonsi: only set BREAK_PRIMGRP/WAVE_AT_EOI when TES/GS need PrimID sysval after TES
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 23:37:52 -05:00
Marek Olšák
f06a103eea radeonsi: don't set BREAK_PRIMGRP/WAVE_AT_EOI when tessellation is disabled
It's not required and it decreases performance.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32957>
2025-01-09 22:44:44 -05:00
Konstantin Seurer
963f8fff1e meson: Include the loader subdir when building lavapipe
This could be skipped when building only lavapipe with only x11.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32883>
2025-01-10 01:24:11 +00:00
Konstantin Seurer
23a96b1537 lavapipe: Check the pool type in handle_reset_query_pool
Avoids a segmentation fault when resetting acceleration structure
queries.

Fixes: 897ccbd ("lavapipe: Implement VK_KHR_acceleration_structure")
Closes: #12289
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32616>
2025-01-10 00:58:17 +00:00
Konstantin Seurer
fac818bdb3 meson: Require glslangValidator when building lavapipe
The tool is required by the runtime for acceleration structures.
Lavapipe uses some of those runtime helpers and will use more of them in
the future (https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31426),
especially those that have a hard requirement for the tool.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12412
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12437
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32882>
2025-01-10 00:08:30 +00:00
José Roberto de Souza
022671f2c4 iris: Rename BO_ALLOC_COHERENT to BO_ALLOC_CACHED_COHERENT
BO_ALLOC_COHERENT is not a good name as it can mean 2 different memory
types: cached+coherent and uncached+coherent, so
here renaming it to BO_ALLOC_CACHED_COHERENT that is more close to the
usage that we have for it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28774>
2025-01-09 23:40:53 +00:00
José Roberto de Souza
3db38d05d4 iris: Drop BO_ALLOC_COHERENT from iris_utrace_create_ts_buffer()
timestamp is not modified by CPU, it is written by GPU and just read
by CPU.
As all BOs in Iris are CPU coherent, there is no need to keep this
flag.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28774>
2025-01-09 23:40:52 +00:00
Timur Kristóf
dd980d2b28 radv: Only print "testing use only" message on GFX12+.
This message has been confusing users, especially now that
popular toolkits such as Gtk started using a Vulkan renderer.

Printing a message on non-conformant implementations is also
actually not required. So let's remove it.

We haven't fully finished the GFX12 implementation yet,	but on
all other hardware, RADV should	work just fine,	and is definitely
not meant for "testing use only".

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12314
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32930>
2025-01-09 23:16:48 +00:00
Mike Blumenkrantz
fafa71b6ad zink: use internal map flag for qbos
DONTBLOCK is sort of almost good enough except that the api frontend
can also use this and it can't use the full power of Trust Me Buddy™
that qbo maps require

this causes unnecessary ioctl syncs, which annihilates perf in games
that constantly check query results

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31823>
2025-01-09 22:45:27 +00:00
Mike Blumenkrantz
17ca1bfbf7 zink: rework query result checking
this allows a return without checking syncobj, avoiding overhead,
but when a query still isn't completing after multiple checks then
try checking the pool directly

this circumvents the usual qbo mechanism in specific cases (e.g., Everspace)
where an app fires off a million timestamp queries and the overhead of
checking a timeline semaphore kills perf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31823>
2025-01-09 22:45:27 +00:00
Marek Olšák
e640d5a9c3 amd: vectorize SMEM loads aggressively, allow overfetching for ACO
If there is a 4-byte hole between 2 loads, they are vectorized. Example:
    load 4 + hole 4 + load 8 -> load 16
This helps GLSL uniform loads, which are often sparse. See the code for more
info.

RADV could get better code by vectorizing later.

radeonsi+ACO - TOTALS FROM AFFECTED SHADERS (45482/58355)
  Spilled SGPRs: 841 -> 747 (-11.18 %)
  Code Size: 67552396 -> 65291092 (-3.35 %) bytes
  Max Waves: 714439 -> 714520 (0.01 %)

This should have no effect on LLVM because ac_build_buffer_load scalarizes
SMEM, but it's improved for some reason:

radeonsi+LLVM - TOTALS FROM AFFECTED SHADERS (4673/58355)
  Spilled SGPRs: 1450 -> 1282 (-11.59 %)
  Spilled VGPRs: 106 -> 107 (0.94 %)
  Scratch size: 101 -> 102 (0.99 %) dwords per thread
  Code Size: 14994624 -> 14956316 (-0.26 %) bytes
  Max Waves: 66679 -> 66735 (0.08 %)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29399>
2025-01-09 22:01:54 +00:00
Marek Olšák
e0c343888f radeonsi: lower descriptors sooner to allow vectorizing descriptor loads
The comment was wrong.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29399>
2025-01-09 22:01:54 +00:00
Marek Olšák
abd5216ae8 ac,radeonsi: scalarize overfetching loads
There is nothing preventing ACO from generating loads with unused
components. This happens often with GLSL uniforms. Some of those loads
are partially re-vectorized after this.

radeonsi+ACO:

TOTALS FROM AFFECTED SHADERS (19564/58918)
  VGPRs: 732900 -> 728448 (-0.61 %)
  Spilled SGPRs: 429 -> 433 (0.93 %)
  Code Size: 38446004 -> 38485612 (0.10 %) bytes
  Max Waves: 305440 -> 305549 (0.04 %)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29399>
2025-01-09 22:01:54 +00:00
Sagar Ghuge
710624fcc0 anv: Use 3DSTATE_URB_ALLOC_* instructions
Use 3DSTATE_URB_ALLOC_* instruction to program URB for multislice device
config.

In case only one slice is available in the device, SliceN fields will be
ignored by HW.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32736>
2025-01-09 21:26:40 +00:00
Sagar Ghuge
604a384e97 blorp: Use 3DSTATE_URB_ALLOC_* instructions
Use 3DSTATE_URB_ALLOC_* instruction to program URB for multislice device
config.

In case only one slice is available in the device, SliceN fields will be
ignored by HW.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32736>
2025-01-09 21:26:40 +00:00
Sagar Ghuge
190bde3969 iris: Use 3DSTATE_URB_ALLOC_* instructions
Use 3DSTATE_URB_ALLOC_* instruction to program URB for multislice device
config.

In case only one slice is available in the device, SliceN fields will be
ignored by HW.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32736>
2025-01-09 21:26:40 +00:00
Sagar Ghuge
0bca8da981 intel/genxml: Update URB related instructions and structures
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32736>
2025-01-09 21:26:40 +00:00
Marek Olšák
58a88bbdb9 ac/nir/ngg: export positions after streamout to improve performance
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Marek Olšák
fc73749d6c ac/nir/ngg: fold so_vertex_index * so_stride into immediate offset
Instead of using a different voffset VGPR per streamout vertex,
point voffset to the first vertex for all 3 vertices because
the stride and vertex index are constant and can be in the immediate
offset.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Marek Olšák
97e82af162 ac/nir/ngg: vectorize streamout stores for NGG optimally
Walk the whole vertex stride thanks to XFB info sorted by offset, gather
individual components from same or different outputs, and once we have
gathered 4, store them as vec4.

It also removes the memory_modes field from VMEM stores because I don't
think it's needed.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Marek Olšák
4f2e2e10bc ac/nir: vectorize streamout stores for legacy pipeline optimally
Walk the whole vertex stride thanks to XFB info sorted by offset, gather
individual components from same or different outputs, and once we have
gathered 4, store them as vec4.

It also removes the COHERENT flag from VMEM stores because NGG streamout
doesn't use it either and I don't think it's needed.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Marek Olšák
e399f3bed9 ac/nir: sort xfb info to facilitate vectorization of xfb stores
xfb stores are not vectorized properly, leading to generating random soup
of b32, b64, b96, and b128 stores.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32686>
2025-01-09 20:47:16 +00:00
Karol Herbst
c8833703b2 rusticl/mesa: rework image and sampler view creation APIs
The mesa crate should just provide the means of creating those, but the
logic of what to create shouldn't be there.

The passed in arguments also heavily vary, and this way we can be explicit
about what variants needs what inputs.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
26df5938cf rusticl/mem: add functions to create sampler and image views to Image
This allows us to use more contextual information of the image to create
the pipe_sampler_view properly instead of passing all the required
properties via function arguments.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
b759618d55 rusticl/kernel: create the sampler views earlier
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
255a523a0f rusticl/mesa: use PipeSamplerView over the raw type
Also deal with allocation failures while at it.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
80b81ed58e rusticl/mesa: add PipeSamplerView wrapper
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
b94d4f90f2 rusticl/mesa: set take_ownership to true for set_sampler_views
This simplifies sampler view tracking a bit for us. Also, drivers will
automatically free the pipe_sampler_view as well.

It was wrong to call into sampler_view_destroy directly anyway, because
pipe_sampler_view is a refcounted object and pipe_sampler_view_reference
should be used instead.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Karol Herbst
90d83f4c30 rusticl/kernel: fix image_size of 1D buffer images
We can't use the size of the backing resource, but have to rather specify
how much of the buffer resource are used for the 1Dbuffer image.

Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32903>
2025-01-09 19:57:22 +00:00
Mel Henning
b99772e71e nak: Add gpr_limit_from_local_size
I stumbled on this limit - it turns out that large local_sizes apply an
additonal limit on gprs per thread. If we violate this limit, then dmesg
just gives us a rather unhelpful message that the channel is killed:

    nouveau 0000:01:00.0: gsp: rc engn:00000001 chid:64 type:13 scope:1 part:233
    nouveau 0000:01:00.0: fifo:c00000:0008:0040:[hw_tests::test_[14761]] errored - disabling channel

Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32952>
2025-01-09 19:32:52 +00:00
Mel Henning
914c722eb0 nak: Add ShaderModel::hw_reserved_gprs()
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32952>
2025-01-09 19:32:52 +00:00
M Henning
8c48a61a3c nak/hw_runner: Skip copy call for empty buffer
copy requires non-null pointers even for zero-size copies. Skip the
call so it's legal to pass in null buffers of zero size.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32952>
2025-01-09 19:32:52 +00:00
Lionel Landwerlin
58b604abdf intel: fix generation shader on Gfx9
This probably interacts badly with the LLVM17+ opaque pointer
workaround. Hopefully I can move this all over Alyssa's pass.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b52e25d3a8 ("anv: rewrite internal shaders using OpenCL")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12413
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32958>
2025-01-09 18:12:47 +00:00
Lionel Landwerlin
08e82b28e8 anv: use the correct MOCS for depth destinations
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31778>
2025-01-09 17:47:27 +00:00
Juan A. Suarez Romero
45ada1c7fb broadcom/ci: add ubsan jobs for broadcom drivers
Use Undefined Behaviour Sanitizer to detect issues in v3d/v3dv, as well
as in vc4.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
37ee035e42 ci/build: add ubsan build jobs
This adds build jobs to support Undefined Behaviour Sanitizer (UBSan),
both in x86_64 and arm64.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
48603f08fb etnaviv: cast assertion
Cast the value used in static assertion to be an unsigned integer,
instead of default signed integer.

This has been detected by Undefined Behaviour Sanitizer (UBSan).

```
../src/gallium/drivers/etnaviv/etnaviv_state.c:289:62: error: expression in static assertion is not constant
  289 |       static_assert((VIVS_PS_OUTPUT_REG2_SATURATE_RT4 << 24) == VIVS_PS_OUTPUT_REG2_SATURATE_RT7, "VIVS_PS_OUTPUT_REG2_SATURATE_RT7");
```

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
6aafb58432 virgl: fix member access to a NULL pointer struct
This fixes VirglStagingMgr tests that tries to access a struct member of
a structure that is NULL.

This has been detected using Undefined Behaviour Sanitizer.

```
Running main() from ../src/gtest/src/gtest_main.cc
[==========] Running 9 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 7 tests from VirglStagingMgr
[ RUN      ] VirglStagingMgr.non_fitting_allocation_reallocates_resource
stderr:
../src/gallium/drivers/virgl/tests/virgl_staging_mgr_test.cpp:72:22: runtime error: member access within null pointer of type 'struct virgl_hw_res'
```

Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
e54a15f700 v3d: fix format overflow error
Detected when working on adding support for Undefined Behaviour
Sanitizer, this fixes:

```
../src/gallium/drivers/v3d/v3d_screen.c: In function 'v3d_get_compute_param.part.0':
../src/gallium/drivers/v3d/v3d_screen.c:480:17: error: null destination pointer [-Werror=format-overflow=]
  480 |                 sprintf(ret, "v3d");
      |                 ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
0114d293fc radeonsi/vcn: fix maybe uninitialized
Detected when working on adding support for Undefined Behaviour
Sanitizer, this fixes:

```
../src/gallium/drivers/radeonsi/radeon_vcn_dec.c: In function 'get_h264_msg':
../src/gallium/drivers/radeonsi/radeon_vcn_dec.c:239:50: error: 'k' may be used uninitialized [-Werror=maybe-uninitialized]
  239 |                                            && (k == ARRAY_SIZE(dec->h264_valid_poc_num))) {
      |                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/gallium/drivers/radeonsi/radeon_vcn_dec.c:77:19: note: 'k' was declared here
   77 |    unsigned i, j, k;
      |                   ^
cc1: all warnings being treated as errors
```

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Juan A. Suarez Romero
9d6c667151 freedreno: a2xx: fix maybe uninitialized variable
Detected when working on adding support for Undefined Behaviour
Sanitizer, this fixes:

```
../src/gallium/drivers/freedreno/a2xx/ir2_nir.c: In function 'load_const':
../src/gallium/drivers/freedreno/a2xx/ir2_nir.c:154:24: error: 'swiz' may be used uninitialized [-Werror=maybe-uninitialized]
  154 |    unsigned imm_ncomp, swiz, idx, i, j;
      |                        ^~~~
../src/gallium/drivers/freedreno/a2xx/ir2_nir.c:195:30: error: 'imm_ncomp' may be used uninitialized [-Werror=maybe-uninitialized]
  195 |    so->immediates[idx].ncomp = imm_ncomp;
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../src/gallium/drivers/freedreno/a2xx/ir2_nir.c:154:13: note: 'imm_ncomp' was declared here
  154 |    unsigned imm_ncomp, swiz, idx, i, j;
      |             ^~~~~~~~~
cc1: all warnings being treated as errors
```

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30880>
2025-01-09 17:06:07 +00:00
Erik Faye-Lund
dab7b23d3a docs/panfrost: document vulkan support
We have some limited support for Vulkan these days. Let's document that.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32836>
2025-01-09 16:20:55 +00:00
Mike Blumenkrantz
a5c3c452b8 mesa: use default params for clearbuffer functions
this might otherwise pull in user-specified params
from the unpack buffer and access arbitrary data

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32945>
2025-01-09 15:48:10 +00:00
Mike Blumenkrantz
92d6351d02 zink: restrict implicit feedback loop detection using miplevels/layers
this improves perf by like 70-100% in games like Everspace, which draw
to a different miplevel of the same image that the fragment shader samples

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32950>
2025-01-09 15:17:36 +00:00
José Roberto de Souza
1d1d5653ac anv: Check VkResult main batch buffer before start companion batch buffer
It could run the companion batch buffer even if the main batch buffer
failed, that was possible to happen in i915 and Xe KMD.

In case the main context/queue is banned and companion is not it could
still return that submission was properly start what was not.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32850>
2025-01-09 13:47:28 +00:00
José Roberto de Souza
4c6194cae0 anv: Check VkResult of perf query batch buffer
On i915 it could be executing the main batch buffer in
i915_queue_exec_locked() even if the perf query batch buffer failed.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32850>
2025-01-09 13:47:28 +00:00
Valentine Burley
6d2749539b zink/ci: Skip crashing trace in zink-anv-tgl-traces-restricted
Skip the Raven-f10900-v2 trace until the issues are solved.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32921>
2025-01-09 14:05:15 +01:00
Valentine Burley
39cee5351f freedreno/ci: Update a630-traces-restricted checksums
These changed in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32921>
2025-01-09 14:05:15 +01:00
Valentine Burley
4fd4358ba9 ci: Add Valentine to the restricted traces access list
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
372973cd2a zink/ci: Increase zink-anv-tgl parallelism to 4
Thanks to the migrations, we now have enough 1160g7-volteer DUTs
to increase the parallelism of pre-merge zink TGL testing. This
allows us to reduce the fraction of Piglit tests and introduce
fractional GLESCTS testing.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
1f34bc5e42 zink/ci: Migrate the two TGL traces jobs to 1130g7-volteer
Move zink-anv-tgl-traces and zink-anv-tgl-traces-restricted to
the smaller 1130g7-volteer DUT. These jobs are quick and short,
allowing us to use the 1160g7-volteer device for more
performance-sensitive tasks.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
288249811d anv/ci: Increase anv-tgl-angle parallelism to 2
We have enough DUTs available, so increase parallelism to ensure
that we stay within the 10-minute time limit.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
71704ac2c6 virgl/ci: Migrate the two iris jobs to 1130g7-volteer
Both virgl-iris-traces and virgl-iris-traces-performance jobs are
currently disabled for being broken, but we'll want to use the
smaller volteer DUT for them when they are re-enabled.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Valentine Burley
c71a7ffc02 virgl/ci: Disable virgl-iris-traces-performance
This job has never passed a run in a long time. It fails with
the following error when triggered:

head: cannot open '/dev/dri/renderD128' for reading: No such file or directory

Disable it until it's fixed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32864>
2025-01-09 12:24:34 +00:00
Samuel Pitoiset
f09f31d093 ac/nir: fix a comment typo in load_subgroup_id_lowered()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32940>
2025-01-09 08:02:19 +00:00
Samuel Pitoiset
44ba856089 ac/nir: fix lowering subgroup ID for compute shaders on GFX12
This is lowered in backend compilers (LLVM or ACO) because it needs
to access ttmp registers which aren't exposed to NIR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32940>
2025-01-09 08:02:19 +00:00
Samuel Pitoiset
bc1374355b radv: program DB_RENDER_OVERRIDE correctly on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32941>
2025-01-09 07:39:23 +00:00
Vinson Lee
83809f06a7 intel/elk: Fix assert with side effect
Fix defect reported by Coverity Scan.

Side effect in assertion (ASSERT_SIDE_EFFECT)
assert_side_effect: Argument ++eot_count of assert() has a side effect.
The containing function might work differently in a non-debug build.

Fixes: ebd6738260 ("intel/elk/chv: Implement WaClearArfDependenciesBeforeEot")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32884>
2025-01-09 04:07:42 +00:00
Vinson Lee
9b0fc62221 vulkan: Add missing va_end
Fix defect reported by Coverity Scan.

Missing varargs init or cleanup (VARARGS)
missing_va_end: va_end was not called for ap.

Fixes: f8b584d6a5 ("vulkan/runtime,radv: Add shared BVH building framework")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32858>
2025-01-08 19:18:32 -08:00
Aleksi Sapon
60e97e16aa meson: fix finding Python on Windows
On Windows, a venv has no versioned aliased to `python`.
`python3` will never be found from a venv.

Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32934>
2025-01-08 22:47:42 +00:00
David Heidelberg
5774f2c66e drm-uapi: update licenses statement
Replace deprecated GPL-1.0+ with clear GPL-1.0-or-later.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
cc85d0c156 licenses: add missing licenses
Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
fa2fddbf3a c11: use SPDX-License-Identifier header
Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
c22d640fe9 docs: move license(s) to licenses directory
Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
6f08f921bf docs: Clarify project name and include Mesa3D
Mesa3D is commonly used, as evidenced by the use of the Mesa3D.org domain.

Additionally, it is unnecessary to advise against using "MesaGL"
since we do not use it ourselves.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
David Heidelberg
69849bc4d1 docs: remove deprecated component list and licenses
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12180
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32447>
2025-01-08 20:37:51 +00:00
Matt Turner
89da5a9626 intel/decoder: Avoid duplicate symbols when expat is not available
Fixes: 0669210ef4 ("intel/decoder: Add ELK support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12335
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32732>
2025-01-08 18:58:35 +00:00
Eric Engestrom
731138386a docs/release-calendar: fixup sed fail
Fixes: 1a41743764 ("docs/release-calendar: add 25.0 branchpoint and RCs schedule")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32949>
2025-01-08 17:39:58 +00:00
Eric R. Smith
d0a95541fe panvk: re-enable fragmentStoresAndAtomics for v10
This feature actually worked, but accidentally triggered some
CTS failures due do an unrelated sample_mask bug. That bug
is fixed in the previous commits in this series, so re-enable
fragmentStoresAndAtomics.

There are two spurious CI failures created by this change; one is in
a ycbcr test (which we're still working on) and the other is a CTS
bug (it's using a feature we don't advertise).

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32879>
2025-01-08 16:45:21 +00:00
Eric R. Smith
03a1a5009f panfrost: ensure sample_mask is written before color
The ATEST instruction needs sample_mask as an input, but if the
shader writes to color before sample_mask we could emit them
in the wrong order. Fix this in pan_nir_lower_zs_store by
deferring the color write until after the sample_mask write.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32879>
2025-01-08 16:45:21 +00:00
Eric R. Smith
115eb1d5f3 panfrost: Allow ATEST input to be a FAU index
We have an assert requiring that the sample_mask source for
ATEST be a register. However, the sample mask code can
sometimes produce a FAU index, and this actually works
correctly (tested with the vk and gl CTSes).

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32879>
2025-01-08 16:45:21 +00:00
Eric Engestrom
1a41743764 docs/release-calendar: add 25.0 branchpoint and RCs schedule
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32948>
2025-01-08 16:36:46 +00:00
Alyssa Rosenzweig
d9b4867e2a nir/lower_robust_access: fix robustness with atomic swap
this was missed in the original v3d pass, and then the common code port
inherited the bug. (so strictly this fix "should" be backported even farther
back but it won't apply before the Fixes here, and I don't think we do LTS that
far back anyway).

in theory this should fix a corner case with robustness on the gl (but not
vulkan, at least for apple) drivers on broadcom & apple.

Fixes: f0fb8d05e3 ("nir: Add nir_lower_robust_access pass")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32907>
2025-01-08 15:59:05 +00:00
Alyssa Rosenzweig
7a4469681e nir: pass a callback to nir_lower_robust_access
rather than try to enumerate everything a driver might want with an unmanageable
collection of booleans, just do a filter callback + data. this ends up simpler
overall, and will allow Intel to use this pass for just 64-bit images without
needing to add even more booleans.

while we're churning the pass signature, also do a quick port to
nir_shader_intrinsics_pass

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> [NIR and V3D]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32907>
2025-01-08 15:59:05 +00:00
Rhys Perry
8ac4744706 aco/tests: fix skip_lines=True with remaining characters in matches
If the remaining character check fails, we should try a later line if
skip_lines=True. So the check has to be done earlier.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32902>
2025-01-08 15:28:37 +00:00
Lucas Stach
8a55de3338 ci/etnaviv: drop GC2000 flat shading fails
Now that the varying use is properly set for color varyings, tests
related to flatshading are fixed.

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/32922>
2025-01-08 13:55:26 +00:00
Lucas Stach
ef2d7a5066 etnaviv: emit full varying component use
Emit usages for varying components 32-63.

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/32922>
2025-01-08 13:55:26 +00:00
Lucas Stach
ca5a9a3861 etnaviv: fix flatshading
color varyings must be properly annoted, so they don't get interpolated
when the rasterizer is configured for flatshading. For whatever reason
the etnaviv NIR compiler failed to do so from its inception.

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/32922>
2025-01-08 13:55:26 +00:00
Lucas Stach
2483d28d0b etnaviv: clean up component use setting in linker
Use a trivial loop instead of duplicating the code for each
component.

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/32922>
2025-01-08 13:55:26 +00:00
Lucas Stach
cca43e76e1 etnaviv: Update headers from rnndb
Update to rnndb commit 1b944df41e12.

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/32922>
2025-01-08 13:55:26 +00:00
Daniel Schürmann
d2f52e61c2 nir/divergence: change nir_has_divergent_loop() to return true only for divergent breaks
The important information is whether a loop has a uniform number
of iterations.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28627>
2025-01-08 13:33:54 +01:00
Mary Guillemard
42f6bb0456 libcl: Add VkQueryType and VkQueryResultFlagBits definitions
Useful for query pool copy/clear meta shaders.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
9911e313d0 pan/genxml: Move pack_header to an external file
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
27d94a16c7 panforst: Update ForEachMacros
We have various clang-format issues around on some common code macros.

This should fix this in panvk at least

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
2e38a15070 libcl: Respect NDEBUG for assert
In C, NDEBUG allows disabling the assert macro, let's follow this
behaviour.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
ecdccae990 nir,agx: Allow nir_precomp_print_blob to print a static array
This makes it stop leaking shader binary blobs definition and is
required for panfrost clc.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
5f8addfd99 util/bitpack_helpers: Make fixed packs CL safe
We emulate roundf and llroundf for compatibility.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Mary Guillemard
bd872e2aaa util/bitpack_helpers: Use UINT64_MAX instead of ~0ULL
This fixes issues with LLVM on OpenCL C failing to represent 128-bit
integers.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32939>
2025-01-08 11:37:27 +00:00
Boris Brezillon
9ba38350de panvk/jm: Fix depth clipping with small viewport depth range
Same as 7ca01506c9 ("panvk: hack to improve depth clipping with
small viewport depth range") but applied to the JM backend.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32905>
2025-01-08 11:13:18 +00:00
Boris Brezillon
3b6f0ce032 panvk: Don't invalidate the viewport on cull mode updates
vk_rasterization_state_depth_clip_enable() checks the clip and clamp
modes, not the cull mode. RS_DEPTH_CLIP_ENABLE got confused with
RS_CULL_MODE in 7ca01506c9 ("panvk: hack to improve depth clipping
with small viewport depth range").

Fixes: 7ca01506c9 ("panvk: hack to improve depth clipping with small viewport depth range")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32905>
2025-01-08 11:13:18 +00:00
Friedrich Vock
71392fff25 aco: Fix dead instruction/index handling for try_insert_saveexec_out_of_loop
The loop checking if exec is overwritten didn't check for NULL
instructions, and didn't fix up reg write indices after inserting
instructions.

Fixes: fcd94a8c ("aco: move try_optimize_branching_sequence() to postRA optimizations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32746>
2025-01-08 10:48:01 +00:00
Georg Lehmann
67d74a04b9 nir/peephole_select: allow load_vector/scalar_arg_amd
Foz-DB Navi21:
Totals from 1507 (1.90% of 79395) affected shaders:
MaxWaves: 31830 -> 31870 (+0.13%); split: +0.20%, -0.08%
Instrs: 938704 -> 937232 (-0.16%); split: -0.19%, +0.03%
CodeSize: 4970860 -> 4964652 (-0.12%); split: -0.14%, +0.02%
VGPRs: 79536 -> 79512 (-0.03%); split: -0.08%, +0.05%
Latency: 5194524 -> 5218285 (+0.46%); split: -0.38%, +0.84%
InvThroughput: 1200152 -> 1207251 (+0.59%); split: -0.02%, +0.61%
VClause: 20728 -> 20741 (+0.06%); split: -0.11%, +0.17%
SClause: 33612 -> 32871 (-2.20%); split: -2.78%, +0.57%
Copies: 70601 -> 68847 (-2.48%); split: -2.62%, +0.13%
Branches: 20032 -> 17521 (-12.53%)
PreSGPRs: 47828 -> 47801 (-0.06%)
VALU: 637446 -> 638094 (+0.10%); split: -0.02%, +0.13%
SALU: 88627 -> 88462 (-0.19%); split: -1.08%, +0.90%
VMEM: 36664 -> 36659 (-0.01%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32792>
2025-01-08 09:56:39 +00:00
Georg Lehmann
208d8cd715 radv: run peephole_select in optimize_nir_algebraic
Foz-DB Navi21:
Totals from 451 (0.57% of 79395) affected shaders:
MaxWaves: 8680 -> 8616 (-0.74%)
Instrs: 689610 -> 688225 (-0.20%); split: -0.21%, +0.01%
CodeSize: 3524580 -> 3521740 (-0.08%); split: -0.11%, +0.03%
VGPRs: 28512 -> 28584 (+0.25%)
Latency: 1906219 -> 1892124 (-0.74%); split: -0.91%, +0.17%
InvThroughput: 481931 -> 483570 (+0.34%); split: -0.00%, +0.34%
VClause: 10317 -> 10296 (-0.20%)
SClause: 18105 -> 18088 (-0.09%); split: -0.17%, +0.07%
Copies: 69532 -> 67579 (-2.81%); split: -2.85%, +0.04%
Branches: 21353 -> 20501 (-3.99%)
PreSGPRs: 27004 -> 27005 (+0.00%)
VALU: 436235 -> 436334 (+0.02%); split: -0.01%, +0.03%
SALU: 102349 -> 101944 (-0.40%); split: -0.61%, +0.21%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32792>
2025-01-08 09:56:39 +00:00
Christian Gmeiner
b6ef9017f4 etnaviv: isa: Support src2 for texldb and texldl
We need to add variants of these instructions, which are used with a shadow
samper and passed the shadow reference value via src2.

Fixes: abe5bd35 ("etnaviv: Switch to isa_assemble_instruction(..)")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32926>
2025-01-08 07:57:39 +00:00
Christian Gmeiner
5daa47c1f8 etnaviv: isa: Support src2 for texld
We need to add a variant of the texld instruction, which is used with a shadow
samper and passed the shadow reference value via src2.

Blob generates such texld's for deqp's GLES3.functional.texture.shadow.2d.* (GC3000).
Fixes spec@arb_depth_texture@texdepth.

Fixes: abe5bd35 ("etnaviv: Switch to isa_assemble_instruction(..)")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32926>
2025-01-08 07:57:39 +00:00
Lucas Stach
9e71829bcf etnaviv: isa: fix typo in SRC2_USE map
Fixes: b216fd044b ("etnaviv: isa: Add encode support")
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/32926>
2025-01-08 07:57:39 +00:00
Kenneth Graunke
35f175301d brw: Fix vectorizer hole_size condition after signedness change
Marek recently changed hole_size to be signed, rather than unsigned.
A negative hole_size means that the two loads overlap - and thus are
prime candidates to be combined.

My original hole_size handling was:

   if hole_size > 4 * (8 - low->num_components) then don't vectorize

For non-overlapping loads, this worked: NIR's largest vector is vec16,
and if low was already a vec16, combining it with anything would exceed
that, so it'd never be considered.  That meant low would always be a
vec8 or less, so (8 - low->num_components) was a positive number.

Now that we see overlapping loads, we can see a vec16 low, vec4 high,
and also a negative hole size, giving us fun comparisons like:

   -16 > 4 * (8 - 16)   =>   -16 > -32   => true, don't vectorize

Which is absolutely the wrong thing to do, because the high load's data
is entirely included within the former load's data.

The idea here was to make sure the second load would be able to pack at
least one component into the first's V8 result.  But even this isn't the
best, because...even if it's simply adjacent, doing one V16 load is more
efficient than requesting two back to back V8 loads.

So, we just simplify down to a static check: if there's an entire V8 of
hole, don't vectorize.  This already won't happen because the core pass
has max_hole set to 28 bytes (7 32-bit components), but that could
change based on the needs of other drivers, so let's be defensive.

fossil-db results on Alchemist:

   Instrs: 161533978 -> 161295137 (-0.15%); split: -0.20%, +0.05%
   Subgroup size: 8092544 -> 8092568 (+0.00%)
   Send messages: 7915233 -> 7844503 (-0.89%); split: -0.94%, +0.05%
   Cycle count: 16577700697 -> 16702609256 (+0.75%); split: -0.59%, +1.35%
   Spill count: 72338 -> 67226 (-7.07%); split: -7.36%, +0.29%
   Fill count: 134058 -> 125980 (-6.03%); split: -6.83%, +0.80%
   Scratch Memory Size: 4092928 -> 3786752 (-7.48%); split: -7.53%, +0.05%
   Max live registers: 33031460 -> 32945994 (-0.26%); split: -0.27%, +0.01%
   Max dispatch width: 5778384 -> 5778536 (+0.00%); split: +0.26%, -0.26%
   Non SSA regs after NIR: 179809505 -> 152735471 (-15.06%); split: -15.08%, +0.03%

Fixes: c21bc65ba7 ("nir/opt_load_store_vectorize: make hole_size signed to indicate overlapping loads")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32932>
2025-01-08 00:19:54 +00:00
Sagar Ghuge
33d9a685a5 anv: Add pipelined coarse pixel state
3DSTATE_CPS_POINTERS is deprecated on PTL, so let's switch to
3DSTATE_COARSE_PIXEL to deliver CPS state as pipelined state.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32737>
2025-01-07 23:53:44 +00:00
Sagar Ghuge
9d33443d7b intel/genxml: Add coarse pixel related changes
This change adds CPS related new state instruction, structure and
enum.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32737>
2025-01-07 23:53:44 +00:00
Caio Oliveira
868016d92c intel/brw/xe2+: Do not use $.dst or $.src SWSB annotations in SENDs
When a SEND instruction is a EOT, the scoreboard lowering will not
allocate a new SBID for it, since nothing needs to wait for it.  In
Gfx12 this allowed the SEND to get out-of-order $.dst or $.src
dependencies.

Starting on Xe2+ this is not supported anymore, in favor of supporting
more combined modes.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32712>
2025-01-07 22:23:59 +00:00
Lucas Stach
a7d164e42b ci/etnaviv: drop gl-1.4-polygon-offset fail
Now that the offset unit is correctly scaled depending on
the depth buffer format, this test can be expected 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/32756>
2025-01-07 22:09:16 +00:00
Lucas Stach
98b3723208 etnaviv: fix polygon offset for 24bpp depth buffers
Currently we scale the polygon offset units with a fixed factor,
matching the MRD (minimal resolvable distance) for a 16bpp depth
buffer. This wastes a lot of precision when a 24bpp depth buffer
is used.

Apply the correct MRD scale, depending on the format of the
currently bound depth buffer.

Fixes piglit spec@!opengl 1.4@gl-1.4-polygon-offset.

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/32756>
2025-01-07 22:09:16 +00:00
Tapani Pälli
1cc17e9ce9 intel/compiler: take reg_unit size into account with ubo ranges
Fixes: 1ab4fe2dd6 ("brw: Don't shrink UBO push ranges in the backend")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12423
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32925>
2025-01-07 21:38:06 +00:00
Job Noorman
c3e7384bbb ir3: always set wrmask for movmsk
We failed to set the wrmask of movmsk expanded from ballot.macro. This
caused legalization to miss the need for (ss) when a component other
than the first is used.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 1a78604d20 ("ir3: Add support for subgroup arithmetic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32918>
2025-01-07 20:55:22 +00:00
Marek Olšák
c20c46cf7b ac: update ATOMIC_MEM definitions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32877>
2025-01-07 20:24:19 +00:00
Marek Olšák
f72a11f38d radeonsi: always use RADEON_USAGE_DISALLOW_SLOW_REPLY
All places are fine with getting a false negative as long as buffer_wait
returns quickly. This can improve performance.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32877>
2025-01-07 20:24:19 +00:00
Marek Olšák
271d5edf87 radeonsi: fix a perf regression due to slow reply from GEM_WAIT_IDLE for timeout=0
It sometimes takes 1 ms to return with timeout=0, which is unacceptable.

Fixes: 4194774edf - radeonsi: move barriers out of si_launch_grid_internal_ssbos

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32877>
2025-01-07 20:24:19 +00:00
Pierre-Eric Pelloux-Prayer
dd11eec06b gl/spirv: update subgroup_size if GroupNonUniform is used
This is similar to what link_intrastage_shaders is doing and it
fixes the following test:
   KHR-Single-GL46.subgroups.builtin_var.compute.subgroupsize_compute

Which was failing with SPIRV but passing with GLSL, the diff being:
 - SPIRV: "subgroup_size: 1"
 - GLSL:  "subgroup_size: 2"

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32698>
2025-01-07 19:32:43 +00:00
Pierre-Eric Pelloux-Prayer
33affa7c36 radeonsi/tests: update results
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32698>
2025-01-07 19:32:43 +00:00
Pierre-Eric Pelloux-Prayer
dc293ffe50 radeonsi: fallback to util_blitter_draw_rectangle
The blitter VS expects coords to fit in a signed int16. When this
is not the case, use util_blitter_draw_rectangle instead.

Since util_blitter_draw_rectangle sets vertex elements, we need
to make sure they're properly restored.

The alternative to this fallback would be to pass coordinates
unpacked (so 4 SGPRs instead of 2), but this doesn't fix the
fbo-blit-check-limits test because of uv interpolation precision
issue.
Using 2 triangles instead of a rectangle + disabling
window_space_position helps but then this breaks some GLES3 tests,
like dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_mag_reverse_src_x
(which doesn't pass either if u_blitter is used for all cases).

Using a single triangle covering the whole rectangles fixes all
cases but it then requires to setup scissors to not write too
much pixels...
So, instead of adding so much complexity, let's use u_blitter
for the "large coordinates" fallback, and keep the rectangle blit
for the other cases.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32698>
2025-01-07 19:32:43 +00:00
Samuel Pitoiset
7f50162424 radv: fix programming WALK_ALIGN8_PRIM_FITS_ST on GFX12
This also needs to be disabled when a VRS image is used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32914>
2025-01-07 18:56:24 +00:00
Samuel Pitoiset
d7bc370b9e radv: configure the VRS surface swizzle mode on GFX12
GFX11 allowed only one swizzle mode for the VRS image but GFX12 allows
all 2D non-linear swizzle modes and PC_SC_VRS_INFO needs to be
configured.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32914>
2025-01-07 18:56:24 +00:00
Samuel Pitoiset
0b53e645a0 radv: disable VRS coarse shading with 8x MSAA on GFX12
This isn't supported and the hw always clamps to 1x1.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32914>
2025-01-07 18:56:24 +00:00
Juan A. Suarez Romero
c5954c4329 v3dv: check requirements for USAGE_INPUT_ATTACHMENT
If the format does not support COLOR_ATTACHMENT or DEPTH_STENCIL
features then it can't be used as an input attachment.

Fixes dEQP-VK.api.info.unsupported_image_usage.*.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32790>
2025-01-07 14:50:44 +00:00
Juan A. Suarez Romero
db249f24a6 vc4: initialize variable
While this is strictly not necessary, it fixes an apparent false
positive issue about reading garbage value detected by static analyzer.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32819>
2025-01-07 14:21:42 +00:00
Juan A. Suarez Romero
69d3d7288e v3dv: fix assigned value is garbage or undefined
This is actually a false positive detected by static analyzer, because
it assumes that `device->instance->meta_cache_enabled` can change
between two execution points.

In order to instruct static analyzer this is not the case, we assing it
to a local variable, and do the checks based on that.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32819>
2025-01-07 14:21:42 +00:00
Juan A. Suarez Romero
0d14e129bc v3d: avoid 0-size variable length array
Declaring a variable-length array (VLA) based on a variable that can be
0 is declared dangerous.

In this case, the variable can't take value 0, so adding an assertion
fixes the issue.

This was detected by static analyzer.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32819>
2025-01-07 14:21:42 +00:00
Samuel Pitoiset
f94bd67b82 aco: fix VS prologs on GFX12
MTBUF/MUBUF instructions must use zero for SOFFSET, use const_offset
instead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32904>
2025-01-07 13:44:32 +00:00
Corentin Noël
55cd0fb42c virgl: Use MAX_SAMPLERS instead of MAX_SHADER_SAMPLER_VIEWS
The PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS cap is meant for samplers and not sampler
views, change this.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32706>
2025-01-07 13:15:47 +00:00
Corentin Noël
ab5084b054 virgl: Update virgl_hw.h from virglrenderer
Use the latest version and update the supported formats.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32706>
2025-01-07 13:15:46 +00:00
Job Noorman
b5c99e6f57 ir3/cp: swap back correct srcs when swap failed
While making the swapping code generic, the swap-back path was left as
is causing the wrong sources to be swapped.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 00656526d8 ("ir3/cp: extract common src swapping code")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32920>
2025-01-07 12:14:14 +00:00
Danylo Piliaiev
ac2046c5b0 tu/perfetto: Add app and engine names to the command buffer tracepoint
Makes possible to understand which app submitted a command buffer.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31550>
2025-01-07 11:44:41 +00:00
Danylo Piliaiev
5ae03b4aea tu/perfetto: Always emit submission event and time it
We previously missed submissions that don't sync timestamps.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31550>
2025-01-07 11:44:41 +00:00
Boris Brezillon
e55de285cc panfrost: Kill panfrost-job.h
It's empty now, so we don't need to include it from the packer headers.

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/32899>
2025-01-07 11:10:55 +00:00
Boris Brezillon
c0f3bac826 panfrost: Move MAX_{MIP_LEVELS,IMAGE_PLANES} to pan_texture.h
This is where those macros are used, and those are the last two
definitions preventing us from dropping panfrost-job.h.

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/32899>
2025-01-07 11:10:55 +00:00
Boris Brezillon
e48f2da7da panfrost: Move MALI_EXTRACT_INDEX to pan_format.h
Move MALI_EXTRACT_INDEX to pan_format.h where all format-related macros
live and kill the unused MALI_EXTRACT_TYPE and MALI_FORMAT_COMPRESSED
macros.

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/32899>
2025-01-07 11:10:55 +00:00
Boris Brezillon
2fdbdc270b panfrost: Kill the uXX typedefs
We use uintXX_t most of the time, so let's be consistent and use the
stdint types everywhere instead of their shorter uXX variants.

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/32899>
2025-01-07 11:10:55 +00:00
Boris Brezillon
63fc0a2de9 panfrost: Kill the mali_ptr typedef
mali_ptr is no shorter than uint64_t, and we already have a few places
where we use uint64_t to store GPU virtual addresses in src/panfrost, so
let's just kill this typedef and use uint64_t types everywhere.

That's one step towards panfrost-job.h removal.

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/32899>
2025-01-07 11:10:55 +00:00
Feng Jiang
701600fb11 radv/rt: Fix memleak in radv_init_header()
Fixes: f8b584d ("vulkan/runtime,radv: Add shared BVH building framework")
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32887>
2025-01-07 09:49:56 +00:00
Samuel Pitoiset
c5fe9dcf16 ac/descriptors: fix configuring NBC views on GFX12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32892>
2025-01-07 09:15:12 +00:00
Boris Brezillon
ae76a6a045 panvk: Pack push constants
We're about to add more sysvals, and the more we add, the bigger the
sysvals region gets, which increases the amount of memory we have to
allocate when push_uniforms are dirty.

Instead of allocating FAUs for all sysvals/push_constants, track FAU
usage per-shader, and pack those. This implies emitting an FAU buffer
per stage instead of trying to share it, but that's an acceptable
trade-off.

While at it, automate the sysval dirty tracking a bit.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
aa78fe7683 panvk: Pass a cmdbuf to blend_emit_descs()
Now that panvk_cmd_buffer.h is accessible from
src/panfrost/vulkan/panvk_vX_xxx.c files, there's no reason to pass
a gazillon arguments to blend_emit_descs(). We can just pass a cmdbuf
and let the helper extract the other parameters from there. It also
allows for extra automation, like dirtying the push_uniform buffer
when the new blend config reads the blend constant.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
ed55ab17db panvk: Factor-out the sysvals initialization logic
We're about to make the sysval logic a bit more complication when
introducing push constant packing. Let's first factor-out the sysvals
handling so the JM/CSF backend don't have to duplicate the thing.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
a6319f8951 panvk: Don't lower load_blend_const_color_rgba
We use blend shaders, so load_blend_const_color_rgba should
not be present in the fragment shader. We might want to re-introduce
this code if we decide to specialize fragment shaders when the
blend configuration is static, but let's drop it for now.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
2af6e4beeb pan: Don't pretend we support load_{vertex_id_zero_base,first_vertex}
load_vertex_id_zero_base() is supposed to return the zero-based
vertex ID, which is then offset by load_first_vertex() to get
an absolute vertex ID. At the same time, when we're in a Vulkan
environment, load_first_vertex() also encodes the vertexOffset
passed to the indexed draw.

Midgard/Bifrost have a sligtly different semantics, where
load_first_vertex() returns vertexOffset + minVertexIdInIndexRange,
and load_vertex_id_zero_base() returns an ID that needs to be offset
by this vertexOffset + minVertexIdInIndexRange to get the absolute
vertex ID. Everything works fine as long as all the load_first_vertex()
and load_vertex_id_zero_base() calls are coming from the
load_vertex_id() lowering. But as mentioned above, that's no longer
the case in Vulkan, where gl_BaseVertexARB will be turned into
load_first_vertex() and expect a value of vertexOffset in an
indexed draw context.

We thus need to fix the mismatch by introducing two new
panfrost-specific intrinsic so we can stop abusing load_first_vertex()
and load_vertex_id_zero_base().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
54033bc052 panvk: Fix first_vertex/base_instance types
gl_Base{VertexARB,Instance} are signed integers, so reflect that in
the types we declare in the sysval struct.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
19173dfa40 panvk: Don't lower load_base_vertex
load_base_vertex is coming from SYSTEM_VALUE_BASE_VERTEX which should
only exist in GL. In Vulkan, gl_BaseVertex is translated to
SYSTEM_VALUE_FIRST_VERTEX, which is turned into load_first_vertex
instructions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
bbfcd473f9 pan/bi: Fix mem_access_size_align_cb() for push constants
bit_size should be at least 32, and alignment at least 4 bytes.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
2611dc106a pan/bi: Disallow non-zero .{range,base} on load_push_constant instructions
There seems to be several lowering pass that don't take the base/range
into account, like nir_lower_mem_access_bit_sizes(). This caused
issues when we tried using it on push_constants to make sure accesses
are 32-bit aligned, so let's make sure the frontend is propagating the
base to the offset, and assigns range to zero (AKA undefined).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
8496159885 pan/mi: Don't pretend we support push constants
This code was probably added when we were considering supporting
Vulkan on Midgard, but we don't handle the
nir_intrinsic_load_push_constant, so it make little sense to
lower push constant IOs in this backend.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
8166a218ee pan/indirect: Don't use .base to pass the push_constant offset
We're about to assert when .base != 0 in the Bifrost backend,
but we first make sure all push_constant users stop passing
the offset through .base.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
22bbc8f87b panvk: Don't define push_constant range/base when we don't have to
We just removed a lowering pass making use of these because base/range
are not updated by some other lowering passes, so let's not encourage
future use of base/range by keeping them set to zero.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
3e473a9d4c pan/bi: Get rid of bi_lower_load_push_const_with_dyn_offset()
The vulkan driver is now lowering push constant dynamic indexing to
global loads, so we can get rid of this pass.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
0361c1ca08 panvk: Lower load_push_constant with dynamic offset to global loads
The csel-ladder we have in bi_lower_load_push_const_with_dyn_offset()
is not great, and is relying on base/range being valid. It turns out
nir_lower_mem_access_bit_sizes(), which we rely on to make push constant
accesses 32-bit aligned, doesn't preserve those when splitting accesses.

Let's simplify the thing by lowering push constant accesses with a
dynamic offset to global loads.

We also reset the base and offset values in the lowering pass, to make
sure the backend doesn't rely on them for other things.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
58d8d4ce7b panvk: Lower dynamic push_constant loads in desc_copy logic
We're about to drop the dynamic push_constant lowering pass,
but first we must patch all the bits relying on it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
3d5ddaaffa panvk: Automate sysval access from NIR shaders
Emitting nir_load_push_constant() calls with the right base/range/offset
for sysvals is tedious and error prone. Provide syntactic sugar macros
to automate that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
cb20cb7b2f panvk: Stop using magic values for the sysval push constant offset/range
The sysval base comes from the amount of FAU words we reserve for user
push constants, and the range is capped by the sysval struct size.
Add macros to express that instead of using magics values.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:19 +00:00
Boris Brezillon
258979d69c panvk: Wrap our descriptor lowering passes in NIR_PASS()
This allows us to do the validation after each step instead of once at
the end.

Since validation is done in nir_lower_descriptors(), we no longer
need to do it panvk_lower_nir(), and we don't need to return
progress information either. So adjust the prototype of
nir_lower_descriptors() accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32415>
2025-01-07 08:15:18 +00:00
Valentine Burley
6564f56a55 ci: Uprev vkd3d-proton to b121e6d746341e0aaba7663e3d85f3194e8e20e1
Fixes a regression affecting drivers that lack support for sparse
binding, introduced in version 2.14.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32860>
2025-01-07 07:35:26 +00:00
Sagar Ghuge
385977955b intel: Set correct maxComputeSharedMemorySize for Xe3+
For Xe3+, set preferred SLM and SLM per threadgroup size.

Bspec: 73211
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32872>
2025-01-07 07:06:09 +00:00
Rob Clark
64d76bbab2 freedreno/a6xx: Fix timestamp emit
I guess this worked accidentially before due to suballocation.  But we
can't rely on that.

Fixes: 8609d62e4d ("freedreno/a6xx: Drop "hardpin" support")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32908>
2025-01-07 06:36:31 +00:00
Marek Olšák
3800f0af41 nir/algebraic: optimize pack_split(unpack(a).x, unpack(a).y) -> a
This is required to optimize FP64 and Int64 shaders generated by
virglrenderer. It generates pack/unpack around every 64-bit op,
which NIR currently can't eliminate. This fixes that.

There is a new constraint ".y", which means that the use of an instruction
should have swizzle.y. This allows us to add patterns that have Y swizzle
on results of instructions.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32172>
2025-01-07 05:47:52 +00:00
Marek Olšák
b1bc691b0f nir/algebraic: add and improve pack/unpack patterns
Some duplicated patterns are removed.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32172>
2025-01-07 05:47:52 +00:00
Marek Olšák
ebec182b04 nir/algebraic: use is_used_once for comparison patterns
otherwise we are just creating new instructions while not removing any

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32172>
2025-01-07 05:47:52 +00:00
Deborah Brouwer
3c441191d9 ci: pipeline_message: reset empty errors
Currently marge will ignore an error message if it is just the word
"error" without any further information. However, if she never finds a
more informative message, then she will just print that meaningless
error message.

Instead of an empty error message, just leave the message blank.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:10 +00:00
Deborah Brouwer
011a867fbe ci: pipeline_message: parse fatal messages
Currently marge only parses a failed job log for error messages, which can
cause her to miss fatal messages.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32557#note_2696196
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1327177

If a `fatal` message is in the error log, add it to the pipeline message.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
3bcb29cfcc ci: pipeline_message: ignore generated errors
Currently marge does not ignore the word `generated` when she is searching
the logs for a relevant error message. So, marge's comments on a failed
pipeline say something unhelpful like "errors generated"

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32687#note_2706792
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1332129

Ignore the word `generated` so marge will provide more useful comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
6dc094decd ci: pipeline_message: ignore harmless build logs
Currently marge gets confused when parsing a build log and mistakes
innocuous lines that have the word "error" in them as actual issues.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093#note_2705442
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1331453

Ignore lines with the word `error` in them that are not actual issues,
so that marge can provide more useful comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
2a477f7df2 ci: pipeline_message: ignore error_type errors
Currently marge only ignores `error_type` when the type is None.
But other error_types are equally uninteresting e.g. `error_type: Jobs`.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32677#note_2711470
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1333563

Ignore the phrase `error_type` so marge will provide more useful comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
6ad2abc661 ci: pipeline_message: add test to parse error logs
If marge doesn't find deqp-runner results or trace errors, she will parse
a failed job log for error messages. The parsing ignores certain phrases
in an attempt to find more relevant errors.

Add a test to check marge's error log parsing to make sure that we don't
create regressions when adding new phrases to ignore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
4039043f72 ci: pipeline_message: improve job list formatting
If marge can't find an error in a failed-job log, the formatting of her
pipeline message has extra spaces between the jobs.

Example:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32577#note_2699071
https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1328702

Add a line break after jobs even if marge can't find an error message,
so that the job list is easier to read.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Deborah Brouwer
819f9f8425 ci: pipeline_message: catch module loading errors
Currently, if the pipeline_message script runs in an an env missing the
aiohttp package, the pipeline_message script will throw a
ModuleNotFoundError and crash marge.

Make sure to catch and ignore these errors since the pipeline message
should never interfere with a merge request.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
2025-01-07 05:08:09 +00:00
Chia-I Wu
1f333ac9fa hk: remove calibrated timestamp support
We don't advertise KHR_calibrated_timestamps yet.  When we do, we can
use the common implementation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
491b785fed nvk: use common calibrated timestamp support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
33ca377fab tu: use common calibrated timestamp support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
f6332ca650 radv: use common calibrated timestamp support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
dd0f8cc7de hasvk: use common calibrated timestamp support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
83dec767da anv: use common calibrated timestamp support partially
Use the common GetPhysicalDeviceCalibrateableTimeDomainsKHR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
aff78757a6 vulkan: add common GetCalibratedTimestampsKHR
The calibrate domain and the device domain period are determined in
vk_device_init.  With them known, and with the vk_time_max_deviation
helper, GetCalibratedTimestampsKHR is straightforward.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:29 +00:00
Chia-I Wu
f7791e1901 vulkan: add common GetPhysicalDeviceCalibrateableTimeDomainsKHR
VK_TIME_DOMAIN_DEVICE_KHR is always supported.  Host time domains are
checked by vk_device_get_timestamp.

This is not used when the driver does not advertise
VK_{KHR,EXT}_calibrated_timestamps.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:28 +00:00
Chia-I Wu
3bc7564bb0 vulkan: add vk_device_get_timestamp
vk_device_get_timestamp returns the current timestamp for the specified
time domain.  device can be NULL unless the domain is
VK_TIME_DOMAIN_DEVICE_KHR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32689>
2025-01-07 03:39:28 +00:00
Patrick Lerda
c6bcf88949 winsys/radeon: fix radeon_winsys_bo_from_handle() related race condition
This change prevents the reuse of the bo when the counter is already
zero. At zero, the bo is in a state where the deletion is pending,
and this implementation relying on an atomic counter can't be safely
stopped. In other words, the previous fix ccd3bb4548 lower the
probability of this race condition, but doesn't fix it.

This change prevents a race condition which has a high probability
on r600 with the test below. This change was tested with the thread
sanitizer.

For instance, this issue is triggered on r600 with
"piglit/bin/ext_image_dma_buf_import-refcount-multithread -auto":
==9876==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d000021a20 at pc 0x7f2c9f59f748 bp 0x7f2c8f3aa600 sp 0x7f2c8f3aa5f8
READ of size 4 at 0x60d000021a20 thread T6
    #0 0x7f2c9f59f747 in pipe_is_referenced ../src/gallium/auxiliary/util/u_inlines.h:65
    #1 0x7f2c9f59f747 in radeon_bo_destroy ../src/gallium/winsys/radeon/drm/radeon_drm_bo.c:342
    #2 0x7f2c9f63b541 in radeon_bo_reference ../src/gallium/include/winsys/radeon_winsys.h:794
    #3 0x7f2c9f63b541 in r600_texture_destroy ../src/gallium/drivers/r600/r600_texture.c:571
    #4 0x7f2c9d65662d in pipe_resource_destroy ../src/gallium/auxiliary/util/u_inlines.h:146
    #5 0x7f2c9d65662d in pipe_resource_reference ../src/gallium/auxiliary/util/u_inlines.h:163
    #6 0x7f2c9d65662d in st_FreeTextureImageBuffer ../src/mesa/state_tracker/st_cb_texture.c:459
    #7 0x7f2c9d5b6991 in _mesa_delete_texture_image ../src/mesa/main/teximage.c:226
    #8 0x7f2c9d5f2593 in _mesa_delete_texture_object ../src/mesa/main/texobj.c:532
    #9 0x7f2c9d5f2be7 in _mesa_reference_texobj_ ../src/mesa/main/texobj.c:639
    #10 0x7f2c9d5f3773 in _mesa_reference_texobj ../src/mesa/main/texobj.h:92
    #11 0x7f2c9d5f3773 in delete_textures ../src/mesa/main/texobj.c:1578

0x60d000021a20 is located 0 bytes inside of 144-byte region [0x60d000021a20,0x60d000021ab0)
freed by thread T5 here:
    #0 0x7f2ca8b2b4f7 in free (/usr/lib64/libasan.so.6+0xb14f7)
    #1 0x7f2c9f59efb3 in radeon_bo_destroy ../src/gallium/winsys/radeon/drm/radeon_drm_bo.c:401
    #2 0x7f2c9f63b541 in radeon_bo_reference ../src/gallium/include/winsys/radeon_winsys.h:794
    #3 0x7f2c9f63b541 in r600_texture_destroy ../src/gallium/drivers/r600/r600_texture.c:571
    #4 0x7f2c9d65662d in pipe_resource_destroy ../src/gallium/auxiliary/util/u_inlines.h:146
    #5 0x7f2c9d65662d in pipe_resource_reference ../src/gallium/auxiliary/util/u_inlines.h:163
    #6 0x7f2c9d65662d in st_FreeTextureImageBuffer ../src/mesa/state_tracker/st_cb_texture.c:459
    #7 0x7f2c9d5b6991 in _mesa_delete_texture_image ../src/mesa/main/teximage.c:226
    #8 0x7f2c9d5f2593 in _mesa_delete_texture_object ../src/mesa/main/texobj.c:532
    #9 0x7f2c9d5f2be7 in _mesa_reference_texobj_ ../src/mesa/main/texobj.c:639
    #10 0x7f2c9d5f3773 in _mesa_reference_texobj ../src/mesa/main/texobj.h:92
    #11 0x7f2c9d5f3773 in delete_textures ../src/mesa/main/texobj.c:1578

previously allocated by thread T6 here:
    #0 0x7f2ca8b2b9a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7)
    #1 0x7f2c9f5a36d5 in radeon_winsys_bo_from_handle ../src/gallium/winsys/radeon/drm/radeon_drm_bo.c:1198
    #2 0x7f2c9f641b2a in r600_texture_from_handle ../src/gallium/drivers/r600/r600_texture.c:1105
    #3 0x7f2c9d47550a in dri_create_image_from_winsys ../src/gallium/frontends/dri/dri2.c:1007
    #4 0x7f2c9d47eeb9 in dri2_from_dma_bufs ../src/gallium/frontends/dri/dri2.c:1629
    #5 0x7f2ca8854360 in dri2_create_image_dma_buf ../src/egl/drivers/dri2/egl_dri2.c:2564
    #6 0x7f2ca8854f45 in dri2_create_image_khr ../src/egl/drivers/dri2/egl_dri2.c:2817
    #7 0x7f2ca8846f2c in dri2_create_image ../src/egl/drivers/dri2/egl_dri2.c:1864
    #8 0x7f2ca87f9dd8 in _eglCreateImageCommon ../src/egl/main/eglapi.c:1850

Fixes: ccd3bb4548 ("winsys/radeon: fix a race between bo import and destroy")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32896>
2025-01-07 02:38:15 +00:00
Marek Olšák
9f08c8bd0f mesa: switch fixed-func fragment program to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32913>
2025-01-07 01:52:01 +00:00
Marek Olšák
9a1775dd33 mesa: switch ARB_vp/fp to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32911>
2025-01-07 00:31:08 +00:00
David Rosca
6478a6d888 frontends/va: Use compute only context if driver prefers compute
Enables use of async compute for shader format conversions.
Deinterlace filter still need gfx.

On my system with RX570 this fixes performance issues when using
gpu-screen-recorder to record gameplay at full GPU load. It can
now record with full framerate, compared to half framerate before.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
1917cc3364 gallium: Add param to create compute only multimedia context
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
4b658ef036 gallium/vl: Add param to create compute only vl_compositor
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
db348ac452 gallium/vl: Add rgba compute shader
It only supports blending mode that va frontend expects, so prefer the old
fragment shader and only use the compute shader when gfx is not supported.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
38979d3b4d gallium/vl: Create sampler state also when gfx is not supported
This is also used by compute shaders.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
d79fa22801 gallium/vl: Fix unbinding sampler views
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
David Rosca
cfe08808de radeonsi/vcn: Use compute only context
We don't need graphics.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32794>
2025-01-06 23:54:39 +00:00
Karol Herbst
3a9b1baa80 rusticl/kernel: take set kernel arguments into account for CL_KERNEL_LOCAL_MEM_SIZE
Cc: mesa-stable
Reviewed-by @LingMan

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32875>
2025-01-06 23:33:03 +00:00
Karol Herbst
bd1a042046 rusticl/device: fix default device enumeration
There were a couple of issues this fixes:
 - Using the env "RUSTICL_DEVICE_TYPE" variable made no device be default.
 - If multiple GPUs were detected, multiple devices were default.
 - If zink was used, no default device was advertized either.

The spec requires that there must be one and only one default device.

Cc: mesa-stable
Reviewed-by @LingMan

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32875>
2025-01-06 23:33:03 +00:00
Karol Herbst
ab640df1c2 rusticl/device: fix CL_DEVICE_HALF_FP_CONFIG query
Cc: mesa-stable
Reviewed-by @LingMan

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32875>
2025-01-06 23:33:03 +00:00
Marek Olšák
d9dd485c02 radeonsi: re-enable non-TC-compatible HTILE for write-only Z/S
It caused the Blender corruption, but the previous commit likely fixes it.

The workaround regressed performance for Furmark and Plot3D with 8xMSAA.

If you want to enable the workaround again in the future, just add this
line back: sscreen->info.gfx_level >= GFX11 ||

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32885>
2025-01-06 23:10:40 +00:00
Marek Olšák
75a03d733a radeonsi: simplify and fix enable_tc_compatible_htile_next_clear logic
It looks like it was broken and might have been responsible
for the Blender corruption.

Just do a full decompression and change to TC-compatible HTILE after
that even if we don't end up doing fast clear here.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32885>
2025-01-06 23:10:40 +00:00
Marek Olšák
fa0bf725bc radeonsi: ignore PIPE_RESOURCE_FLAG_TEXTURING_MORE_LIKELY for TC-compatible HTILE
We enable it on demand anyway, which seems better than relying on a flag.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32885>
2025-01-06 23:10:40 +00:00
Martin Krastev
092ac5a384 svga/ci: enable vmware farm
Reinstate farm after DUT maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32898>
2025-01-06 22:46:02 +00:00
Alyssa Rosenzweig
09b5608607 glsl: fix glsl_get_word_size_align_bytes
this was copypasted from the wrong function. fixes on asahi

   KHR-Single-GL46.arrays_of_arrays_gl.SubroutineArgumentAliasing4_var_type_index_13

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32871>
2025-01-06 22:09:49 +00:00
Konstantin Seurer
38c4548290 lavapipe: Advertise vulkan 1.4
Only advertise 1.4 for LLVM_VERSION_MAJOR>=10 because some subgroup
operations were promoted.

Closes: #12241
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32489>
2025-01-06 20:30:34 +00:00
Marek Olšák
d09ba36f98 glsl: fix corruption due to blake3 hash not being set for nir_opt_undef
NIR is generated sooner, so we need to set it sooner.
This fixes Viewperf13/CATIA_car_04.

Fixes: cbfc225e2b - glsl: switch to a full nir based linker

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32876>
2025-01-06 19:50:51 +00:00
Marek Olšák
451d252ca2 glsl: remove unused code
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
49897f99d6 st/mesa: recompute IO bases for ARB_vp/fp
This is a prerequisite for generating lowered IO for ARB_vp/fp.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
da8f98d202 st/mesa: don't use nir_copy_var
so that we don't have to call nir_lower_var_copies.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
4fdeeca192 st/mesa: switch st_nir_make_clearcolor_shader to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
b1c63365fc st/mesa: switch PBO create_fs to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
1c56dbdaaf st/mesa: switch st_pbo_create_vs and st_pbo_create_gs to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
eeea99210f st/mesa: switch st_nir_make_passthrough_shader to IO intrinsics
also simplify it to only make VS because it's only used for VS.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
ec68f0492b st/mesa: switch GL_SELECT shader to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
2807259a18 st/mesa: switch Z/S DrawPixels shaders to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
135c9fa7b6 st/mesa: unlower IO for internal shaders if needed
This will be required because all internal shaders will be converted
to IO intrinsics.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
7e39045733 st/mesa: switch ATI_fs to IO intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
40848ba97e st/mesa: use IO intrinsics in st_nir_lower_position_invariant
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
02b7396568 st/mesa: use IO intrinsics in st_nir_lower_fog
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
a408c0aa2b st/mesa: run DCE before st_unlower_io_to_vars
Some lowering passes can leave dead code behind, but dead IO intrinsics
are still counted as enabled IO, which breaks things.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
3f7911e7d3 st/mesa: fold st_translate_prog_to_nir into prog_to_nir
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
49f737bc14 mesa: remove unused PROGRAM_WRITE_ONLY
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:18 +00:00
Marek Olšák
14956aa0f2 mesa: remove unused PROGRAM_SYSTEM_VALUE
ARB_vp/fp don't have system values.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
ee8916c414 nir: use IO intrinsics in nir_lower_drawpixels
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
0de28a9fd0 nir: use IO intrinsics in nir_lower_bitmap
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
a7ad1b302b nir: remove redundant option linker_ignore_precision
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
730c8d506f nir: flip the early exit condition in nir_lower_io_temporaries
no change in behavior other than skipping COMPUTE as well.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
7b55ee999d nir: don't set num_slots/src/dest_type/write_mask when they're set automatically
to those values

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
55a4a8a2a8 nir: set src_type and dest_type to float implicitly for IO build helpers
If you want to set it to int/uint, set .src_type or .dest_type. If you want
to set it to float, you don't need to set the type at all. It's implicitly
set to float.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
Marek Olšák
b9f9d001d7 nir: set nir_io_semantics::num_slots to at least 1 in build helpers
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779>
2025-01-06 19:09:17 +00:00
José Roberto de Souza
7ac9ac0f93 anv: Allow larger SLM sizes for task and mesh shader
It was hard-coded to 64k but Xe2 platforms and newer supports
larger SLM sizes.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Cc: mesa-stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32874>
2025-01-06 18:31:20 +00:00
Konstantin Seurer
378fd38e1d llvmpipe: Move max_anisotropy to static sampler state
Applications typically use one globak max_anisotropy value.
Moving it to static state should save a could of instructions.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Konstantin Seurer
0797a14c52 llvmpipe: Remove unused AF code
The table and some other parameters are not used.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Konstantin Seurer
350a0fe632 llvmpipe: Use a simpler and faster AF implementation
This is based on the example given by the Vulkan specification: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#textures-texel-anisotropic-filtering

The basic idea is to compute the axis in which the uv coordinates
change the fastest in screen space (rho_y and rho_y). If rho_x is larger
than rho_y, samples are summed up along the x-Axis and the y-Axis
viceversa. The x/y offsets are mapped back into texture (u/v) space
using a linear approximation of u(x,y) and v(x,y).

This approach does not use a nested loop and the number of samples is
basically limited to max_anisotropy (+/-). The sample count of the
previous approach could explode in some situations, leading to
frametimes >1s.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Konstantin Seurer
7279e47521 llvmpipe: Disable anisotropic filtering for explicit lod
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31748>
2025-01-06 18:00:18 +00:00
Icenowy Zheng
70fa598696 zink: do not set transform feedback bits when not available
Currently the list of buffer usage bits specified is hardcoded with
transform feedback bits, which leads to a validation layer error report
with ID VUID-VkBufferCreateInfo-None-09499 when EXT_transform_feedback
is not available.

Only set these bits when EXT_transform_feedback extension is really
available to suppress this error.

Cc: mesa-stable
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32386>
2025-01-06 15:19:46 +00:00
Pavel Ondračka
c179a7dde4 r300/ci: update CI expectations
One new rv410 flake and one new rv530 fail which I can't reproduce
locally. Also remove the vs-varying-array-mat3* flakes, those were
failing because we run out of varyings, however this should no longer be
an issue since nir_opt_varyings was enabled for everyone.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32897>
2025-01-06 13:26:56 +00:00
Kenneth Graunke
4ab04799ee brw: Delete assign_constant_locations and push_constant_loc[]
The push_constant_loc[] array is always an identity mapping these days,
so it's kind of pointless.  Just use the original uniform number and
skip the unnecessary "remap" step.  With that gone, and shrinking UBO
ranges gone, assign_constant_locations() is now empty and can be removed
as well.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Kenneth Graunke
93e186e1a4 brw: Delete pull constant lowering
Now that we never shrink ranges in the backend, we never lower push
constants to pull constants late in the backend either.  get_pull_loc
will never return true, and so all of brw_lower_constant_loads becomes
a noop.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Kenneth Graunke
1ab4fe2dd6 brw: Don't shrink UBO push ranges in the backend
Back in the bad old days (vec4?) we had a bunch of smarts in the backend
to dead code eliminate unused vector components and re-pack regular
uniforms, so we really couldn't decide how much data we were pushing
until very late in the backend.  Nowadays we have none of that - we do
all of our elimination and packing in NIR.  anv shrinks ranges to deal
with Vulkan API push constants, and iris treats everything as a UBO and
as of the previous commit will also shrink appropriately.

So we don't need to do this anymore...which will let us simplify quite
a bit of code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Kenneth Graunke
583ad35455 brw: Limit maximum push UBO ranges to 64 registers in the NIR pass.
anv already does this limiting, since it needs to handle non-UBO push
constants as well.  iris treats everything as a UBO, but doesn't have
a limiter and was relying on the backend to handle it.

Do this in the NIR pass so that we can eliminate the backend code.
It's not necessary for anv, but handling it here is simple and less
error prone for iris, which calls this in a number of places.  We know
we need to limit things to this much; anv can limit more if needed.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
2025-01-06 12:45:47 +00:00
Feng Jiang
96c8eb64f0 virgl: Ensure that PIPE_SHADER_CAP_MAX_CONST_BUFFERS is less than PIPE_MAX_CONSTANT_BUFFERS
The value of the PIPE_SHADER_CAP_MAX_CONST_BUFFERS parameter should be
less than PIPE_MAX_CONSTANT_BUFFERS, otherwise, it will lead to some
assert failures. For example:

    void
    cso_unbind_context(struct cso_context *cso)
    {
    ...
        int maxsam = scr->get_shader_param(scr, sh,
                                           PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS);
        int maxview = scr->get_shader_param(scr, sh,
                                            PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS);
        int maxssbo = scr->get_shader_param(scr, sh,
                                            PIPE_SHADER_CAP_MAX_SHADER_BUFFERS);
        int maxcb = scr->get_shader_param(scr, sh,
                                          PIPE_SHADER_CAP_MAX_CONST_BUFFERS);
        int maximg = scr->get_shader_param(scr, sh,
                                          PIPE_SHADER_CAP_MAX_SHADER_IMAGES);
        assert(maxsam <= PIPE_MAX_SAMPLERS);
        assert(maxview <= PIPE_MAX_SHADER_SAMPLER_VIEWS);
        assert(maxssbo <= PIPE_MAX_SHADER_BUFFERS);
        assert(maxcb <= PIPE_MAX_CONSTANT_BUFFERS); // Crash here
        assert(maximg <= PIPE_MAX_SHADER_IMAGES);
    ...
    }

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32889>
2025-01-06 12:18:20 +00:00
Martin Roukala (né Peres)
f1a6af133a radeonsi/ci: run a fraction of glcts-vangogh in pre-merge
Now that ACO has become the default on pre-RDNA GPUs, all pre-merge CI
coverage of radeonsi+LLVM has disapeared. Let's fix this by making
our post-merge glcts-vangogh-valve job run inpre-merge pipelines.

However, we are limited in vangogh capacity, so rather than running the
full glcts/piglit test suites we run a fraction of it to stay under 15
minutes of execution time on a single Steam Deck.

Suggested-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32865>
2025-01-06 11:55:22 +00:00
Martin Roukala (né Peres)
0c538f82bc radeonsi/ci: run on ACO changes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32865>
2025-01-06 11:55:22 +00:00
Martin Roukala (né Peres)
bec7f09e76 radeonsi/ci: update the vangogh expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32865>
2025-01-06 11:55:21 +00:00
Tapani Pälli
b1b1a4ef91 iris: initialize whole pipe_box struct for memcmp
Z and depth fields were given to memcmp uninitialized.

CID: 1637431
Fixes: 1fc82ee558 ("iris: Add support for damage region")
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/32857>
2025-01-06 09:18:52 +00:00
Tapani Pälli
72351afe24 anv: handle mesh in sbe_primitive_id_override
This prevents crashes seen in some upcoming cts tests.

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/32861>
2025-01-06 08:41:18 +00:00
David Rosca
36bedf6c80 frontends/va: Get buffer feedback with locked mutex in MapBuffer
Fixes: 93d434362b ("frontends/va: Move encode fence to coded buffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12344

Tested-by: Benjamin Cheng <benjamin.cheng@amd.com>
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32761>
2025-01-06 08:19:08 +00:00
Hyunjun Ko
5ecea6ec4a anv: handle negative value of slot index for h265 decoding.
Fixes: 8d519eb5 ("anv: add initial video decode support for h265")
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32823>
2025-01-06 01:02:14 +00:00
Hyunjun Ko
168298b891 anv: Enable remapping picture ID
Fix to handle 16 refs.

v1. handle the case where a slot index is negative.
(Lionel Landwerlin <lionel.g.landwerlin@intel.com>)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32823>
2025-01-06 01:02:14 +00:00
Hyunjun Ko
9221feaf79 anv: define ANV_VIDEO_H264_MAX_DPB_SLOTS
prep work for remapping slot ids for h264 decoding.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32823>
2025-01-06 01:02:13 +00:00
Erik Faye-Lund
61593e9c54 pan/ci: update opencl expectations
It's not entirely clear to me why this has moved from Crash/Fail to
Pass, the only thing I can see in the commit history between the last
nightly pass and failure is an optimization of unpacing 8-bit values
from a 64-bit value. It's a bit suspicious that an optimization makes
somethign pass...

But we need to have correct CI expectations, otherwise we won't notice
new failures. So let's update to the new reality, and debug this if the
problem reappears in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32833>
2025-01-05 07:44:04 +00:00
Erik Faye-Lund
f313b33d13 pan/ci: update t760 checksum
Looks like this changed when IO-lowering was changed in the GLSL
linker, but because the traces job here runs post-merge, it wasn't
noticed at the time.

There's only a single pixel that has changed, from a very dark color to
another very dark color. Neigher the before nor after images looks
obviously more correct than the other.

Fixes: 73d675451b ("ci: update fail lists and trace checksums")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32833>
2025-01-05 07:44:04 +00:00
David Rosca
e33452a6d3 ac/surface: Don't force linear for VIDEO_REFERENCE with emulated image opcodes
This caused regression by using higher pitch than needed on compute-only
devices, resulting in video decode errors.

Fixes: 308bae950f ("ac/surface: Add RADEON_SURF_VIDEO_REFERENCE")
Tested-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32863>
2025-01-04 09:13:44 +00:00
Rob Clark
fb59a9fb08 freedreno/a6xx: Use LATE_Z with OC + discard
If occlusion query is used, and the FS discards samples, we need to use
LATE_Z in order to get the sample count after the FS.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32869>
2025-01-04 02:52:41 +00:00
Lionel Landwerlin
98cdb9349a anv: ensure null-rt bit in compiler isn't used when there is ds attachment
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 15987f49bb ("anv: avoid setting up a null RT unless needed")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12396
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32867>
2025-01-03 23:12:22 +00:00
Caio Oliveira
6968794c50 intel/brw: Add missing bits in 3-src SWSB encoding for Xe2+
Fix invalid SWSB annotation in dEQP-VK.glsl.builtin.precision.mix.mediump.vec4 for LNL.

Fixes: 4a24f49b57 ("intel/compiler/xe2: Implement codegen of three-source instructions.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32846>
2025-01-03 21:19:26 +00:00
Benjamin Lee
51b0bad30b panfrost/va: implement fquantizetf16 ftz
Bifrost implements this with a ftz flag in the clause header. Valhall
doesn't have clauses, and needs a separate flush instruction.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32470>
2025-01-03 20:53:36 +00:00
Benjamin Lee
c9de3d57f7 panfrost/va: add FLUSH instruction
This is needed to implement FTZ for intermediate values on valhall.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32470>
2025-01-03 20:53:36 +00:00
Benjamin Lee
9f17138571 panvk: remove load_multisampled_pan sysval
This was only used by bi_lower_sample_mask_writes, which now ignores it
in panvk due to panfrost_compile_inputs::single_sample_full_coverage.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32636>
2025-01-03 20:01:54 +00:00
Benjamin Lee
41c6148c0d panvk: handle sample mask writes on 1-sample targets
In OpenGL, non-multisample targets always have full coverage, and shader
writes to gl_SampleMask are ignored. On Vulkan, sample mask writes on
single-sample targets are treated the same way as writes with >1 sample.

Fixes dEQP-VK.pipeline.*.multisample_shader_builtin.write_sample_mask.1_samples

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32636>
2025-01-03 20:01:54 +00:00
Karol Herbst
5f30bc62fe rusticl/mesa/resource: port to NonNull
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
0fe59874c0 rusticl/mem: pass around QueueContext instead of PipeContext
This let us get rid of the Queue argument in a couple of places.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
b2f42dbe61 rusticl/queue: make QueueContext::dev public
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
d460cb3675 rusticl/mesa: add missing files to meson.build
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
f3f84cfe9f rusticl/mesa/context: use Default for pipe_grid_info initialization
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
a4cae3c6ed rusticl/device: remove unused functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
05b37f3968 rusticl/mem: remove mem_type argument from new_image
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
4cbd4bead7 rusticl/mesa: remove PipeTransfer::res
The pipe_transfer struct already stores a pointer to the pipe_resource, so
no need to store it inside the Rust wrapper as well.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
f667845741 include: Update the OpenCL headers to latest
A few breaking changes in rusticl which this also fixes.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
f75ba4f9e3 rusticl: stop using system headers for CL and GL
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Karol Herbst
ccfeda77bd rusticl/queue: add a life check to prevent applications dead locking
Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32821>
2025-01-03 18:26:19 +00:00
Dylan Baker
f70ef03100 docs: update calendar for 24.3.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32870>
2025-01-03 10:00:51 -08:00
Dylan Baker
d518c59b9d docs: Add SHA sums to 24.3.3 release notes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32870>
2025-01-03 10:00:48 -08:00
Dylan Baker
0861975f49 docs: add release notes for 24.3.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32870>
2025-01-03 10:00:47 -08:00
Vinson Lee
3514b65c35 hk: Fix hk_ia_update arguments order
Fix defect reported by Coverity Scan.

Arguments in wrong order (SWAPPED_ARGUMENTS)
swapped_arguments: The positions of arguments in the call to
hk_ia_update do not match the ordering of the parameters:stat_c_inv is
passed to c_prims.stat_c_prims is passed to c_inv.

Fixes: a3b796ba19 ("libagx,hk: handle pipeline stats queries without a GS")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32853>
2025-01-03 17:14:48 +00:00
Erik Faye-Lund
eac8f1d460 Revert "panfrost: Disable CRC by default"
There's been a bunch of CRC fixes applied recently. Let's see if this
allows us to default to this as enabled instead.

This reverts commit fc30fe5bc5.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31965>
2025-01-03 12:12:15 +00:00
Lionel Landwerlin
1448778385 anv: rework tbimr push constant workaround
We'll want to know about the empty push constant for device generated
commands. It's easier if the information is stored in
anv_pipeline_bind_map::push_ranges[].

Signed-off-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/32828>
2025-01-03 11:48:42 +00:00
Lionel Landwerlin
6281b207db anv: add tracepoints timestamp mode for empty dispatches
When the runtime is going to potentially emit no dispatch, we need to
have a way to capture a timestamp. Add a new flag for this to tell
whether we don't have a HW instruction to capture the timestamp and
rely on MI_STORE_REGISTER_MEM instead.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: de00fe3f66 ("anv: add BVH building tracking through u_trace")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12382
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32835>
2025-01-03 10:36:49 +00:00
Lionel Landwerlin
a224105a26 vulkan/runtime: avoid emitting empty build_leaves
Seen in GravityMark.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32835>
2025-01-03 10:36:49 +00:00
Zoltán Böszörményi
2b9b34887e docs/features: Mark more Vulkan 1.4 features as done for drivers
For nvk: VK_KHR_global_priority

For lvp: VK_KHR_global_priority, VK_KHR_index_type_uint8,
VK_KHR_line_rasterization, VK_KHR_load_store_op_none,
VK_KHR_shader_float_controls2, VK_KHR_shader_subgroup_rotate,
VK_KHR_vertex_attribute_divisor, VK_EXT_host_image_copy and
VK_EXT_pipeline_robustness.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32801>
2025-01-03 10:20:27 +00:00
Zoltán Böszörményi
43eaba013e docs/features: Mark VK_EXT_host_image_copy as implemented on Turnip
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32801>
2025-01-03 10:20:27 +00:00
Zoltán Böszörményi
a0931e3361 features.txt: Add Vulkan 1.4 section
Some extensions were moved to core.
See https://docs.vulkan.org/spec/latest/appendices/versions.html

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12392
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32801>
2025-01-03 10:20:27 +00:00
Valentine Burley
5fd9f08c1d lavapipe/ci: Re-enable lavapipe-vk-asan
The previous issues have been resolved, and the only error the
job encountered was due to incorrect expectations.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32832>
2025-01-03 10:02:05 +00:00
Samuel Pitoiset
03b037a0e3 radv: disable logic op for float/srgb formats
The Vulkan spec says:
    "The application can enable a logical operation between the
     fragment’s color values and the existing value in the framebuffer
     attachment. This logical operation is applied prior to updating
     the framebuffer attachment. Logical operations are applied only
     for signed and unsigned integer and normalized integer
     framebuffers. Logical operations are not applied to floating-point
     or sRGB format color attachments."

Missing VKCTS coverage has been reported.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12345
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32826>
2025-01-03 09:35:45 +00:00
Samuel Pitoiset
0019900312 radv/meta: do not create redundant pipeline layout objects
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32834>
2025-01-03 09:11:59 +00:00
Samuel Pitoiset
105e809a9d radv/meta: add radv_meta_get_noop_pipeline_layout()
To avoid duplicated objects.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32834>
2025-01-03 09:11:59 +00:00
Samuel Pitoiset
dd7343f278 radv/meta: reduce length of some cache keys
For faster hashing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32834>
2025-01-03 09:11:59 +00:00
Samuel Pitoiset
c8d2614113 radv/meta: fix loading the meta pipeline cache
This has been removed by mistake.

Fixes: f528c9e8f5 ("radv/meta: stop initializing RT accel structs")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32838>
2025-01-03 08:49:42 +00:00
Samuel Pitoiset
370e392313 radv: fix adding the BO to cmdbuf list when emitting buffer markers
Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32840>
2025-01-03 08:19:23 +00:00
Benjamin Lee
ff2a214e5f panfrost: specialize VS on FS interpolation qualifiers
This re-enables noperspective varying support for OpenGL. Because VS may
depend on FS, we now need to wait for both VS and FS to be available
before compiling shaders, and need to update VS when a new FS is bound.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
bbd268d22c panfrost: factor FS shader key into a helper function
This will make things easier to follow with the addition of a VS key.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
d93f9d6d1a panvk: use static noperspective when statically linking VS and FS
This triggers with VK_EXT_graphics_pipeline_library and monolithic
pipelines when VK_PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT is set.
With VK_EXT_shader_object, it would trigger when
VK_SHADER_CREATE_LINK_STAGE_BIT_EXT is set on both VS and FS.

The fast-linking interface from [1] (unmerged) would allow us to use the
optimization with monolithic pipelines.

[1]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27024/diffs?commit_id=cd1ba4d6375764680c5ced9be90f5519b92eefe6

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
98de4f42ff panfrost: add pass to lower noperspective varyings to a constant
This isn't hooked up yet, but should be a significant performance
improvement when available.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
30a288cdc9 panvk: pass noperspective_varyings sysval as a push constant
This can handle mismatched interpolation qualifiers between VS and FS,
and is a conformant noperspective implementation. Passing this sysval
dynamically has a performance cost. In the future we can reduce this by
passing it as a constant in some situations.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
103c4123ab panfrost: collect noperspective varyings in shader info
When linking FS and VS with mismatched interpolation qualifiers, we need
to read the FS qualifiers and pass them to the VS. I put
nir_collect_noperspective_varyings in a separate function instead of
merging it into the existing walk_varyings loop because it will later be
used on uncompiled shaders that don't have a pan_shader_info yet.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
081438ad39 panfrost: add nir pass to lower noperspective varyings
Mali only supports perspective-correct varying interpolation in
hardware, so we have to emulate noperspective with lowering in both the
VS and FS.

Both vulkan and opengl allow mismatched interpolation qualifiers between
stages. Because we need all varyings that are noperspective in the FS to
be lowered in the VS, we cannot rely on the interpolation qualifiers in
the VS. Loading the set of noperspective varyings as a sysval allows the
implementation to pass them as a compile-time constant when known
statically, or a runtime push constant when not. Passing noperspective
varyings dynamically has a performance cost with unnecessary branches
and fmuls.

This sysval is not hooked up yet in either panfrost or panvk, so shader
compilation will fail.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32127>
2025-01-03 07:04:05 +00:00
Benjamin Lee
6f541e2016 panfrost: add intrinsic to load frag coord at a barycentric
This is needed for noperspective lowering, where we need to multiply the
varying value by gl_FragCoord.w at the same barycentric as the varying.
Normal nir_load_frag_coord_zw instructions are lowered to the new
intrinsic on bifrost with the pan_lower_frag_coord_zw pass.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32127>
2025-01-03 07:04:05 +00:00
Marek Olšák
9033e64b02 util/disk_cache: silence unused result warnings
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32810>
2025-01-03 02:03:06 +00:00
Marek Olšák
8c819a2f95 llvmpipe: silence an unused result warning
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32810>
2025-01-03 02:03:06 +00:00
Marek Olšák
03d24e56a2 vulkan: silence an unused variable warning
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32810>
2025-01-03 02:03:06 +00:00
David Rosca
3474978d52 radv: Fix sampling from image layers of video decode target
Video decode target needs custom height alignment, but tex descriptor
still needs to be set to the original size the image was created with.
This makes the descriptor wrong for layer > 0, so we need to calculate
the layer offset and add it to bo address for this case.

Fixes: 5deb476095 ("radv: align video images internal width/height inside the driver.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069>
2025-01-03 01:28:07 +00:00
David Rosca
9d477fae68 radv/video: Remove dt_field_mode handling code
This would be used for decoding into interlaced buffer, but since
that's not support it is a dead code.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069>
2025-01-03 01:28:07 +00:00
David Rosca
ca0cb78869 radv/video: Use correct array index for decode target and DPB images
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12057
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069>
2025-01-03 01:28:07 +00:00
David Rosca
8dabb480e2 radv/video: Fix DPB tier2 surface params
Fixes: 3e2c768aa8 ("radv/vcn: enable dynamic dpb tier 2 for h264/h265 on navi21+")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32069>
2025-01-03 01:28:07 +00:00
Dylan Baker
d9429229cf intel/tests: Fix missing assignment of error condition
Coverity notices that `err` might be used uninitialized, which is true
as we don't assign the value we want to check! Fix that assignment so
the EXPECT_EQ macro does what we expect.

CID: 1635272
Fixes: 6b931a68c7 ("intel/common: Implement Xe KMD in mi_builder tests")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32849>
2025-01-03 00:53:49 +00:00
Dylan Baker
5420fc16d6 intel/tests: Fix coverity warning about possibly leaked memory
If the assert were to fail the memory would leak, which is pretty
harmless in a unit test, but the fix is trivial.

CID: 1635429
Fixes: 6b931a68c7 ("intel/common: Implement Xe KMD in mi_builder tests")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32849>
2025-01-03 00:53:49 +00:00
Erik Faye-Lund
51a2f70e5e panvk/ci: drop needless envvar
We no longer need this opt-in for v10 GPUs, so let's drop it.

Fixes: 976eb6825e ("panvk: do not require opt-in for panvk on v10")
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32825>
2025-01-02 23:08:27 +00:00
Erik Faye-Lund
2bb6db3fb3 docs: update panvk status
Two things happened since last update; we added support for
VK_KHR_shader_draw_parameters, and we fixed imageCubeArray for Bifrost
GPUs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32763>
2025-01-02 22:59:36 +00:00
Erik Faye-Lund
cf07e89d06 docs/ci: treat warnings as errors
When we moved building the docs to Meson, we accidentally dropped the -W
flag that we used to have. This lead to us no longer detecting certain
problems in the docs, which is unfortunate.

Let's bring this back gated by the werror meson-option, and wire that up
on the CI end.

Fixes: fdd204538b ("ci: build docs using meson")
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32831>
2025-01-02 21:33:51 +00:00
Erik Faye-Lund
7a8c46f54c docs: fixup link in radv docs
This is not how to add links, this is how to use the default-role. Let's
correct it.

Fixes: 3ba3e00750 ("radv: Add some documentation.")
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32831>
2025-01-02 21:33:51 +00:00
Erik Faye-Lund
46ccc13691 docs: fixup broken markup
We need an empty line after ".. code-block: [...]", otherwise the first
lines are interpreted as arguments, not content. This makes the entire
code-blocks not render at all.

Fixes: 5d6d67a4d1 ("docs/android: improve documentation about building llvmpipe for Android")
Reviewed-by: Dylan Baker <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32831>
2025-01-02 21:33:51 +00:00
Mel Henning
c273ada502 compiler/rust/bitset: Test next_unset()
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
2bcb950865 compiler/rust/bitset: Don't expose words
This encapsulates the bitset's word size and word count, which means
consumers no longer need to be careful about word count. Users of the old
apis for writing expressions on bit sets should migrate to the new expression
API.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
4e3ba67063 nak: Migrate liveness to new bitset expression api
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
86e5cb7c2d compiler/rust/bitset: Take a stream in union_with
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
47da213e19 compiler/rust/bitset: Add a lazy expression API
The new api doesn't require allocations for intermediate values in
expressions. It also has tests, which is nice because eg. the previous
implementation of the `&` operator was broken.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
e52b2ee4b9 compiler/rust/bitset: Remove impl Not
This is extremely difficult to use correctly for bitsets of
different sizes. Also, nobody uses it. Remove the footgun.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
8ec885da1d compiler/rust/bitset: impl FromIterator
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:48 +00:00
Mel Henning
de47702dde compiler/rust/bitset: Make BitSetIter private
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Mel Henning
06cd3c7fa3 compiler/rust/bitset: Removed unused start param
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Mel Henning
6ba317bd8c compiler/rust/bitset: Add a basic test
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Mel Henning
3b341366a6 compiler/rust: Fix running tests
`ninja test` wasn't actually running these tests, I guess because the
target name was duplicated in meson. Fix this so the tests actually run.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Mel Henning
639211dea8 compiler/rust/bitset: Fix the bitset iterator
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32812>
2025-01-02 20:52:47 +00:00
Antonio Ospite
6df997f6bc ci/android: upgrade DEBIAN_TEST_ANDROID_TAG
Also add a note in .gitlab-ci/container/debian/x86_64_test-android.sh
that DEBIAN_TEST_ANDROID_TAG needs to be updated when that file changes
too.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
578fb242f9 ci/android: add ci rules to test venus on Android
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
610fc8cd13 ci/android: add ci rules to test llvmpipe on Android
For future reference add some disabled rules to for running tests using
llvmpipe on Android, and for that to work also add
deqp-android-llvmpipe.toml

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
44caff4aba ci/android: set VK_DRIVER_FILES before launching cuttlefish
Cuttlefish performs some checks on the host system before launching,
setting VK_DRIVER_FILES to the path of the host artifacts makes sure
that a vulkan library can be found on the host side.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
d93626a84b ci/android: use a /data/deqp subdirectory on guest to store dEQP files
Use a /data/deqp subdirectory on the Android guest to store dEQP files,
so that the files are not mixed with unrelated ones under /data

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
a3c6f7aa5a ci/android: set XDG_CACHE_HOME and pass --shader-cache-dir to deqp-runner
Set XDG_CACHE_HOME when invoking deqp-runner so that mesa can create the
shader cache and avoid this error:

-----------------------------------------------------------------------
ERROR - dEQP error: Failed to create //.cache for shader cache (Read-only file system)---disabling.
-----------------------------------------------------------------------

And also pass --shader-cache-dir to deqp-runner for vulkan tests.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
a3e444ff1d ci/android: use a native adb connection
Use a "native" adb connection, it seems to have better stability,
especially when transferring a lot of files with `adb push`.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
030b5f310b ci/android: update list of deqp files pushed to the guest system
In particular push all the files in
/deqp-vk/external/vulkancts/modules/vulkan/ and /deqp-tools because they
are needed at runtime.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
2a85675eff ci/android: also copy mesa vulkan libraries to the Android guest
Also copy mesa vulkan libraries to the Android guest, this makes it
possible to test venus with the latest upstream mesa build.

While at it also keep the *_angle libraries as they will be used by the
venus_guest_angle GPU_MODE.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
948f179f65 ci/android: reorder PATH and LD_LIBRARY_PATH values to clarify priority
Prefer libraries from /cuttlefish when loading binaries, in particular
this solves some loading problem when launching
/cuttlefish/bin/virgl_render_server

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
5cec9b69fd ci/android: don't call cuttlefish-host-resources script
The /etc/init.d/cuttlefish-host-resources wnants to perform some
operations that are not really desirable on a gitlab shared runner, like
loading specific kernel modules.

Since the script does not seem to be strictly necessary for basic
operation of cuttlefish, don't call it at all, avoiding the kernel
modules problem.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
6e1959c56a ci/android: fix result dir for Android guest execution of deqp-runner
Commit 4143199be7 (ci/android: Use common $RESULTS_DIR for cuttlefish,
2024-08-21) clarified the separation between the result dir used on the
host and shipped in the artifacts, and the result dir used in the
Android guest to collect test results, however the latter was not
correctly passed to deqp-runner.

Fix that so that deqp-runner can finally run.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
4d3eced2c0 ci/android: fix warning when using chown
Fix warning when using chown:

-----------------------------------------------------------------------
+ chown root.kvm /dev/kvm
chown: warning: '.' should be ':': 'root.kvm'
-----------------------------------------------------------------------

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
8252ffbf11 ci/android: use a custom kernel when launching cuttlefish
Use a custom kernel when launching cuttlefish, this is needed for
-gpu_mode=venus.

And while at it also clean up the state from previous runs, this seems
to be required when passing a custom kernel.

In this change also pass -enable_bootanimation=false which makes
drm_virgl work, and pass -enable_minimal_mode=true to avoid using some
features which are not really needed.

Note that the file number limit has to be increased too in
.gitlab-ci/cuttlefish-runner.sh for cuttlefish to work properly.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
3cc3384e95 ci/android: better separate host and guest mesa artifacts
Clarify that artifacts from the Android guest are downloaded explicitly
and put them under /mesa-android directory so that they don't clash with
the Linux host artifacts downloaded by gitlab under
"${CI_PROJECT_DIR}/install".

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
0c0e268761 ci/android: make cuttlefish-runner.sh more robust against different Android images
Different Android images may contain different graphic libraries, for
example images from Google using an old mesa version may have
libGLES_mesa.so, while newer Android images built with mesa from
upstream have libGLESv1_CM_mesa.so, etc.

Use `rm -f` instead of just `rm` to avoid running into errors when
a file does not exist, resulting in a failing job.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
5d539f1a30 ci/android: get custom cuttlefish images from the S3
To test mesa on cuttlefish some special images tailored for upstream
mesa are needed, in particular these images may set properties or add
functionality that enable new use cases for upstream mesa on Android,
like for instance using venus via the vulkan.virtio mesa driver.

So instead of downloading the standard images from Google, get those
custom images from s3.freedesktop.org.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
92488c4598 ci/android: add sudo to EPHEMERAL deps for debian/x86_64_test-android.sh
The ./tools/buildutils/build_packages.sh script used by the
android-cuttlefish project built in debian/x86_64_test-android.sh uses
sudo, so install that as an EPHEMERAL dependency.

Also set SUDO_FORCE_REMOVE=yes when removing sudo to avoid some errors.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
711c9adb30 ci/android: update version of cuttlefish host tools
Update the version of cuttlefish host tools.

In particular the new version includes the change to be able to increase
the file number limit to 32k, as explained in
https://github.com/google/android-cuttlefish/pull/675

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
03f15ca6eb ci/android: handle premature exit of .gitlab-ci/cuttlefish-runner.sh
Save some logs and stop cuttlefish more cleanly when
.gitlab-ci/cuttlefish-runner.sh exits prematurely because of some
errors.

This makes it possible to have the logs available as artifacts even if
the script didn't run to completion.

This approach also leaves the system in a cleaner state and makes it
possible to relaunch the script and have launch_cvd work even if it had
been run in the past both with or without errors.

This is especially useful for local experiments.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
c4fd424a2b ci/android: restart all services after copying the new mesa libraries
After copying the newly built mesa libraries to the Android vendor
partition the services have to be restarted to make sure that the new
libraries are used, in particular by Surfaceflinger, so call 'stop'
and 'start' for that.

Also print the GLES implementation used by Surfaceflinger before and
after restarting, to be able to compare and check that the new libraries
are effectively picked up.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
5bd669e076 ci/android: don't copy the DRI drivers which are not needed anymore
For the current tests the DRI drivers do not seem to be needed on
Android, so remove the ANDROID_DRIVER variable and stop copying the DRI
libraries to the guest file system, only copy libgallium_dri.so which is
really needed.

While at it, also copy libGLESv1_CM.so and libGLESv2.so

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
17eabaf55c ci/android: build llvmpipe driver for Android by forcing llvm fallback
In order to build the mesa llvmpipe driver for Android, llvm libraries
for Android are needed; force meson to use a fallback for llvm and
provide prebuilt libraries making them available to meson thanks to
a wrap file.

Enable other software drivers for the x86_64-linux-android build, but
also disable the amd and intel hardware drivers for now which don't
build correctly on Android.

Download the prebuilt LLVM libraries for Android in the container job
rather than in the build job, to avoid downloading some big artifacts
for every mesa version built for Android.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
a90d771724 ci/android: build deqp for DEQP_API=VK
Build deqp for DEQP_API=VK by passing -DDEQP_ANDROID_EXE=ON.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
f6b3f2bee5 ci/android: fix problem with deqp version file when building for Android
In commit ad42be50c9 (ci/deqp: fully isolate deqp builds, 2024-03-17)
the deqp module version file was changed from something like
`/deqp/version-$deqp_api` to something like `/deqp-$deqp_api/version`
and this seems to cause some issues when building for Android:

-----------------------------------------------------------------------
[439/1301] Building CXX object external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o
FAILED: external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o
/tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=x86_64-none-linux-android28 --sysroot=/tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DAMBER_CTS_VULKAN_HEADER=1 -DAMBER_ENABLE_CLSPV=0 -DAMBER_ENABLE_DXC=0 -DAMBER_ENABLE_LODEPNG=1 -DAMBER_ENABLE_RTTI=1 -DAMBER_ENABLE_SHADERC=0 -DAMBER_ENABLE_SPIRV_TOOLS=0 -DAMBER_ENGINE_DAWN=0 -DAMBER_ENGINE_VULKAN=1 -DDE_ANDROID_API=28 -DDE_ASSERT_FAILURE_CALLBACK -DDE_COMPILER=DE_COMPILER_CLANG -DDE_CPU=DE_CPU_X86_64 -DDE_FENV_ACCESS_ON="_Pragma(\"STDC FENV_ACCESS ON\")" -DDE_MINGW=0 -DDE_OS=DE_OS_ANDROID -DDE_PTR_SIZE=8 -I/tmp/VK-GL-CTS/external/amber/../vulkancts/framework/vulkan/generated/vulkan -I/tmp/VK-GL-CTS/framework/delibs/debase -I/tmp/VK-GL-CTS/framework/delibs/decpp -I/tmp/VK-GL-CTS/framework/delibs/depool -I/tmp/VK-GL-CTS/framework/delibs/dethread -I/tmp/VK-GL-CTS/framework/delibs/deutil -I/tmp/VK-GL-CTS/framework/delibs/destream -I/tmp/VK-GL-CTS/execserver -I/tmp/VK-GL-CTS/external/spirv-headers/src/include -I/tmp/VK-GL-CTS/external/amber/src/include -I/tmp/VK-GL-CTS/external/amber/src -I/tmp/deqp-vk -I/tmp/deqp-vk/external/vulkancts/framework/vulkan/generated/vulkan -Wall -Wextra -Wno-long-long -Wshadow -Wundef -Wconversion -Wno-sign-conversion -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -frtti -fexceptions  -fwrapv -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -std=gnu++17 -fPIC -w -fno-exceptions -fvisibility=hidden -Wall -Wextra -Wno-cast-function-type-strict -Wno-padded -Wno-switch-enum -Wno-unknown-pragmas -Wno-unsafe-buffer-usage -pedantic-errors -Werror -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-format-pedantic -Wno-unknown-warning-option -Weverything -Wno-zero-as-null-pointer-constant -MD -MT external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o -MF external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o.d -o external/amber/src/src/vulkan/CMakeFiles/libamberenginevulkan.dir/blas.cc.o -c /tmp/VK-GL-CTS/external/amber/src/src/vulkan/blas.cc
In file included from /tmp/VK-GL-CTS/external/amber/src/src/vulkan/blas.cc:16:
In file included from /tmp/VK-GL-CTS/external/amber/src/src/vulkan/blas.h:19:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/vector:274:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/__bit_reference:14:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/bit:57:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/limits:105:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/type_traits:417:
In file included from /tmp/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1/cstddef:37:
/tmp/deqp-vk/version:1:1: error: unknown type name 'dEQP'
dEQP base version vulkan-cts-1.3.10.0
^
-----------------------------------------------------------------------

This seems to be caused by `cstddef` from the Android NDK which includes
a file named `version`, i.e.:

-----------------------------------------------------------------------
  #include <version>
-----------------------------------------------------------------------

To avoid the problem also add the deqp module name to the file name,
like: `/deqp-$deqp_api/deqp-$deqp_api-version`.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
960cdbae99 ci/deqp: collect the mustpass lists also for the android target
Collect the mustpass lists also for the Android target, in particular
this makes vk-main.txt to be found again when running vulkan tests on
Android.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
956ac1e562 ci/deqp: enable building testlog tools on Android too
The testlog tools seem to build fine on Android, add a patch to
VK-GL-CTS to enable them when DE_OS_IS_ANDROID.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
f908bf1e7f ci/deqp: cherry-pick fixes for building GL and GLES deqp on Android
The main branch of dEQP build fine for android but the GL and GLES
branches fail with errors like the following:

-----------------------------------------------------------------------
.../external/openglcts/modules/common/glcFramebufferBlitTests.cpp:715:26: error: no member named 'floor' in namespace 'std'
    return (GLubyte)std::floor(f == 1.0f ? 255 : f * 255.0);
                    ~~~~~^
.../external/openglcts/modules/common/glcFramebufferBlitTests.cpp:1491:14: error: no member named 'fabs' in namespace 'std'
    if (std::fabs(actual - expected) > eps)
        ~~~~~^
2 errors generated.
-----------------------------------------------------------------------

Cherry-pick a couple of commit from main that fix the errors.

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
ab29d6e4a7 ci/deqp: refresh some patches to apply on top of recent VK-GL-CTS
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Antonio Ospite
47558b718a ci: set GIT_COMMITTER_DATE in a locale-agnostic format
When adding patches wit git-am create the date format for
GIT_COMMITTER_DATE in a locale-agnostic format, this avoids potential
issues when running the scripts locally with a non-English locale, e.g.:

-----------------------------------------------------------------------
++ GIT_COMMITTER_DATE='gio 1 gen 1970, 01:00:00, CET'
++ git am
fatal: invalid date format: gio 1 gen 1970, 01:00:00, CET
-----------------------------------------------------------------------

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Eric Engestrom
195663484e ci/meson: add FORCE_FALLBACK_FOR variable for build jobs to use
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Eric Engestrom
776b537896 ci/meson: make meson wrap fallback list more readable
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30895>
2025-01-02 19:31:41 +00:00
Rob Clark
a933acdfd7 tu: Align lrz height to 32
See previous commit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32786>
2025-01-02 18:55:49 +00:00
Rob Clark
3759889846 freedreno/a6xx: Align lrz height to 32
Emperically this seems to be required when doing a linear clear of the
tiled LRZ buffer (because height needs to match aligned height for a
linear clear to dtrt).

Issue could be reproduced with nolrzfc and:

  glmark2 -s 1472x920 --visual-config samples=2 -b terrain

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12336
Fixes: a127a78548 ("freedreno: Re-enable LRZ for a7xx")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32786>
2025-01-02 18:55:49 +00:00
Rob Clark
f7af64cece freedreno/a6xx: Add nolrzfc debug option
Add option to disable lrz fast-clear.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32786>
2025-01-02 18:55:49 +00:00
Rob Clark
746f41688c freedreno/a6xx: Align lrz setup with tu
No functional change.  It's just easier to compare if there aren't
cosmetic differences.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32786>
2025-01-02 18:55:49 +00:00
Caio Oliveira
e1aebf8a0c intel/brw: Remove 'fs' prefix from passes and related functions
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32813>
2025-01-02 18:11:05 +00:00
Caio Oliveira
25384dccc0 intel/brw: Remove 'fs' prefix from passes filenames
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32813>
2025-01-02 18:11:05 +00:00
Marek Olšák
e772a4f3fd radeonsi: use nir_opt_move
TOTALS FROM AFFECTED SHADERS (35064/58359) - ACO
  Spilled SGPRs: 446 -> 402 (-9.87 %)
  Code Size: 56827400 -> 56672948 (-0.27 %) bytes
  Max Waves: 548680 -> 549799 (0.20 %)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:56 +00:00
Marek Olšák
f114a18501 radeonsi: use nir_opt_sink
TOTALS FROM AFFECTED SHADERS (29673/58359) - ACO
  Spilled SGPRs: 860 -> 446 (-48.14 %)
  Code Size: 41681748 -> 41337964 (-0.82 %) bytes
  Max Waves: 465904 -> 466036 (0.03 %)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:56 +00:00
Marek Olšák
7fbca998b1 amd: optimize atomics before lowering intrinsics
ac_nir_lower_intrinsics_to_args will lower most system values.

I have to keep the divergence analysis in ACO, otherwise it goes haywire.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:56 +00:00
Marek Olšák
d30c55abf1 radeonsi: lower sysval intrinsics as late as possible
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:56 +00:00
Marek Olšák
5dd9171765 ac/nir: set upper ranges for range analysis while lowering system values
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
0d5b03f2b9 ac/nir: split local_invocation_ids to 3 separate VGPR inputs
so that we can set the upper range per VGPR.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
65d241c947 ac/nir: set arg_upper_bound_u32 for vs_rel_patch_id
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
1d9fbe5387 ac/nir: add helper ac_nir_load_arg_upper_bound
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
cfeaa45dc6 ac/nir: clean up ac_nir_lower_indirect_derefs
IO variables can't occur here anymore.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
ae22da2ff8 ac/nir: lower more loads in ac_nir_lower_intrinsics_to_args instead of drivers
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
dc8a40ff3e ac/llvm: remove already lowered cases
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
ceb6f8fc32 amd: lower load_tess_rel_patch_id/primitive_id/tess_coord and overwrite.. in NIR
The overwrite instruction complicates it a little, which is why these
intrinsics are lowered together.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
61bfb4fa06 amd: lower load_subgroup_invocation in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
e69f47faee amd: lower load_local_invocation_index in NIR
This is the last intrinsic that needed the LS VGPR bug workaround in ACO
and ac_nir_to_llvm.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
433ca6ba38 ac/nir: extract a load_subgroup_id lowered helper
this will be used in the next commit

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
85ce311a36 radeonsi: don't return 0 from si_get_max_workgroup_size
the next commit needs this

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
342dcbdc8b amd: lower load_vertex_id/instance_id and overwrite_vs_arguments in NIR
2 things complicate this:
- overwrite_vs_arguments_amd
- the LS VGPR bug workaround

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
66dd70adc5 amd: lower load_gs_wave_id_amd in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
923f59c971 amd: lower load_barycentric_at_offset in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
16ab05fad1 amd: lower load_barycentric_pixel/centroid/sample in NIR
radeonsi needs to preserve interp_mode in the arg load.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
a15e733a81 ac,radeonsi: move load_vector_arg flags to common code
This will be needed by lowering of barycentrics.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
7e83f6ca8b amd: lower load_front_face in NIR
radeonsi must do this after si_lower_nir_abi, which optimizes front_face,
but doesn't lower it.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
6ad5225b2a amd: lower load_frag_shading_rate in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
6d2e29ff6e amd: lower load_sample_pos in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
110e474b4f amd: lower load_sample_id in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
684c8da553 amd: lower load_invocation_id in NIR
ACO can't look for it because it's lowered there.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
d281240c57 amd: lower load_first_vertex/base_instance/draw_id/view_index in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
0d372b043b amd: lower load_local_invocation_id in NIR
This is based on ACO.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
13cb5c7b72 amd: lower load_frag_coord in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
58cb155068 amd: lower load_pixel_coord in NIR
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
85c3b5159a ac/nir: handle disabled PS VGPRs in ac_nir_load_arg_at_offset
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Marek Olšák
58b7b9ab15 radv: reduce maxGeometryShaderInvocations to 32
32 is the maximum for gfx12 and recommended by AMD for all hw with NGG.

It's not worth exposing more than 32 on older hw. It's better when all hw
exposes the same limit.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
2025-01-02 17:36:55 +00:00
Lionel Landwerlin
6fb2d3b163 anv: limit the memcpy data for push constants
Signed-off-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/32824>
2025-01-02 16:48:04 +00:00
Georg Lehmann
272ff275fa aco/insert_exec: reset top exec for p_discard_if
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12363
Fixes: 31f62a6123 ("aco/insert_exec: don't always reset top exec")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32830>
2025-01-02 15:18:48 +00:00
José Roberto de Souza
1fc82ee558 iris: Add support for damage region
Newer compositor sends the damaged region of the screen, with this we
can reduce the rendering area discarding vertices outside of damaged
area.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30048>
2025-01-02 14:40:47 +00:00
Timur Kristóf
57c5962413 radv: Rename layer_input to reads_layer in PS info.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Timur Kristóf
652a0b48bc amd: Set lower_layer_fs_input_to_sysval in common code, not in drivers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Timur Kristóf
ed88616a12 ac/nir/ngg: Don't mark multiview layer output as varying.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Timur Kristóf
ec548fd37b Revert "nir/opt_varyings: Add workaround for RADV mesh shader multiview."
The workaround is not needed anymore, because RADV now implements
the FS layer ID input as a sysval.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Timur Kristóf
dd00b3f527 radv: Implement FS layer ID input as a system value.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32641>
2025-01-02 14:07:51 +00:00
Janne Grunau
b06b62bb13 panvk: Silence warning on incompatible DRM render devices
This message is printed on non-panfrost/panthor systems on every
physical device enumeration when panvk is present like in distribution
mesa builds.
This "breaks" gtk-4 tests in the default configuration since they fail
on warning log messages. gtk-4 still forwards the vulkan debug report as
warning messages after fixes for issue 11451 to stop handling it as
critical message.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11451
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32822>
2025-01-02 12:52:40 +00:00
Konstantin Seurer
407186994c radv: Fix encoding empty acceleration structures
There will always be at least one internal node so the expectation that
there are more leaf nodes than internal nodes dows not hold when the
acceleration structure has no leaf nodes.

Fixes: f8b584d ("vulkan/runtime,radv: Add shared BVH building framework")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12302
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32820>
2025-01-02 13:07:33 +01:00
David Rosca
2f76bdf35d radeonsi/vcn: Change required FW version for rc_per_pic_ex on VCN3
It only works correctly on 29 and newer.
Also change the old FW message to one time warning.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12353
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32796>
2025-01-02 11:12:46 +00:00
Georg Lehmann
3da2d96bc5 aco/optimizer: fix signed extract of sub dword temps with SDWA
If an instruction didn't already use SDWA convert_to_SDWA in apply_extract
will add ubyte0/uword0 selections for v1b/v2b operands. This loses information
that the instruction doesn't care about the high bits and makes the next
apply_extract_twice fail.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Fixes: 6cb9d39bc2 ("aco: combine extracts with sub-dword definitions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32803>
2025-01-02 09:33:18 +00:00
Tapani Pälli
346f4d3c11 dri: remove GLsync typedef
This was previously used with interop extension but since then it has
been changed to use mesa_glinterop_flush_out instead. This typedef is
causing some compilation issues, so remove it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12378
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32807>
2025-01-02 07:38:38 +00:00
Mel Henning
76e542e92a nak: Add nak_nir_mark_lcssa_invariants
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12273
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32618>
2025-01-01 18:49:13 +00:00
Marek Olšák
c21bc65ba7 nir/opt_load_store_vectorize: make hole_size signed to indicate overlapping loads
A negative hole size means the loads overlap. This will be used by drivers
to handle overlapping loads in the callback easily.

Reviewed-by: Mel Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32699>
2025-01-01 00:03:55 +00:00
Timur Kristóf
3ba3e00750 radv: Add some documentation.
Describe what RADV is, the basics of how it works,
and give some introduction to the terminology we use.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32766>
2024-12-31 23:01:23 +00:00
Timur Kristóf
01bf998e17 aco: Update documentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32766>
2024-12-31 23:01:23 +00:00
Sagar Ghuge
a857caebd2 iris: Switch to ANISOTROPIC_FAST filter mode
Same thing as ANISOTROPIC including all restrictions except HW is allowed to
take liberties with precision to speed things up, Currently only has an affect
on formats of type *_sRGB.

Signed-off-by: Sagar Ghuge <sagar.ghuge@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/32738>
2024-12-31 21:49:41 +00:00
Sagar Ghuge
76e85df2d2 anv: Switch to ANISOTROPIC_FAST filter mode
Same thing as ANISOTROPIC including all restrictions except HW is
allowed to take liberties with precision to speed things up, Currently
only has an affect on formats of type *_sRGB.

Signed-off-by: Sagar Ghuge <sagar.ghuge@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/32738>
2024-12-31 21:49:41 +00:00
Sagar Ghuge
15063d79d3 intel/genxml: Update SAMPLER_STATE structure
Add new ANISOTROPIC_FAST filter mode value to the Min/MagModeFilter
field.

Signed-off-by: Sagar Ghuge <sagar.ghuge@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/32738>
2024-12-31 21:49:41 +00:00
Caio Oliveira
fda7586439 gallium/meson: Ensure all needed sym_config are set.
Move the sym_config setting all together and ensure that we set either
a value or empty, since Meson complains about missing values.

Fixes the build warning

```
   Configuring dri.sym using configuration
   ../src/gallium/targets/dri/meson.build:28: WARNING: The variable(s) 'va_driver_init',
     'vdp_imp_device_create_x11' in the input file 'src/gallium/targets/dri/dri.sym.in' are
     not present in the given configuration data.
```

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32808>
2024-12-31 16:14:36 +00:00
Samuel Pitoiset
f528c9e8f5 radv/meta: stop initializing RT accel structs
They are already always compiled on-demand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32809>
2024-12-31 12:54:11 +01:00
Samuel Pitoiset
853c99260b radv/meta: move initializing emulated astc to radv_device_init_meta()
For consistency with emulated etc2.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32809>
2024-12-31 12:54:11 +01:00
Samuel Pitoiset
422d64d7ee radv/meta: always initialize emulated etc2 on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32809>
2024-12-31 12:54:11 +01:00
Samuel Pitoiset
1e75b6dfb8 radv/meta: remove a workaround for building accel structs with LLVM
This is no longer needded and this will allow us to compile the meta
pipelines on-demand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32818>
2024-12-31 11:34:40 +00:00
Samuel Pitoiset
18013300b6 radv: disable RT with LLVM completely
This has never been useful and only few RT extensions were enabled
anyways. This will allow us to remove a workaround for compiling
meta pipelines for accel structs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32818>
2024-12-31 11:34:40 +00:00
Samuel Pitoiset
58c5766199 radv: fix destroying DGC pipelines
They weren't destroyed at all.

Fixes: 9f8684359f ("radv: implement VK_EXT_device_generated_commands")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32816>
2024-12-31 10:57:46 +00:00
Samuel Pitoiset
09b8ed4dd4 radv/meta: remove unused radv_meta_create_xxx() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
aa709ca32c radv/meta: convert the blit2d GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
19c1397855 radv/meta: use only one push constant range for blit2d pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
8a104de180 radv/meta: convert the resolve GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
bc5c37fef8 radv/meta: convert the clear GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
64676f52b2 radv/meta: convert the blit GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
b3c587e429 radv/meta: convert the fast-clear GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
015e3e34a7 radv/meta: convert the HW resolve GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
e33f6b6394 radv/meta: convert the HTILE expand GFX pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
aad2c99e8d vulkan: use the meta pipeline cache for graphics pipelines
RADV needs to cache meta graphics pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Samuel Pitoiset
6d3b2a6531 vulkan: add a new vk_meta option to use the rect list pipeline path
RADV uses VK_PRIMITIVE_TOPOLOGY_META_RECT_LIST_MESA for some meta
operations but it doesn't need to use the existing path that draws
using VBOs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32805>
2024-12-31 10:32:50 +00:00
Valentine Burley
68c73f82ba lavapipe/ci: Update expectations
Document more flakes and add a skip for a test that can time out.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32749>
2024-12-31 08:03:46 +00:00
Valentine Burley
2c0301e155 turnip/ci: Document flake
Seen in https://gitlab.freedesktop.org/mesa/mesa/-/jobs/68562273.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32749>
2024-12-31 08:03:46 +00:00
Valentine Burley
39aee0a8a7 zink/ci: Update expectations for ANV
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32749>
2024-12-31 08:03:46 +00:00
Valentine Burley
6b0d551e8b angle/ci: Update expectations
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32749>
2024-12-31 08:03:46 +00:00
Martin Roukala (né Peres)
564aea509a ci/b2c: run the machine registration check before the test container
This was a regression I introduced in 6f9614c187 and it took me until
now to realize :o

Fixes: 6f9614c187 ("ci/b2c: Reduce the length of the kernel cmdline")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
a96d039561 ci/b2c: modernize the job description to use run_*
The `b2c.container` and `b2c.service` keywords are deprecated, so
let's use the modern names: b2c.run, and b2c.run_service.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
cf01771208 i915g/ci: use the default b2c version
Let's use the default's b2c release, so as to keep it in sync with the
default ci-tron job description.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
e445d32dd3 r300/ci: use the default b2c
Let's use the default's b2c release, so as to keep it in sync with the
default ci-tron job description.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
e27e8e1200 freedreno/ci: use the default b2c
Let's use the default's b2c release, so as to keep it in sync with the
default ci-tron job description.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
7be9fb6409 ci/test: uprev to b2c v0.9.14
This brings a new version of the b2c initrd, adding support for
diskless DUTs, reducing boot time, and fixing a bunch of bugs.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
d5335c8a8f ci/tests: de-duplicate the b2c version between architectures
This ensures a uniform b2c version across mesa jobs.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Martin Roukala (né Peres)
6f4ff32b2c ci/test: make the .b2c-${arch}-test-* jobs provide a default b2c
This removes the need for drivers to set their own defaults when they
can instead simply extend `.b2c-${arch}-test-*`.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32628>
2024-12-31 05:31:09 +00:00
Marek Olšák
15015f125f radeonsi: fix a front face regression (crash)
Since the switch to ACO for gfx8-9, LLVM is no longer covered by the CI.

Fixes: aee0c7274c - amd: switch to FRONT_FACE_ALL_BITS(0)

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32811>
2024-12-30 23:53:32 -05:00
Georg Lehmann
e112e2b047 nir,amd: optimize front_face ? a : -a
Foz-DB Navi31:
Totals from 3345 (4.21% of 79395) affected shaders:
MaxWaves: 96182 -> 96174 (-0.01%)
Instrs: 3135439 -> 3129508 (-0.19%); split: -0.24%, +0.05%
CodeSize: 16776088 -> 16718048 (-0.35%); split: -0.38%, +0.03%
VGPRs: 190884 -> 190848 (-0.02%); split: -0.03%, +0.01%
Latency: 32624132 -> 32621734 (-0.01%); split: -0.16%, +0.16%
InvThroughput: 5759987 -> 5749957 (-0.17%); split: -0.23%, +0.05%
VClause: 51044 -> 51086 (+0.08%); split: -0.12%, +0.20%
SClause: 103415 -> 103223 (-0.19%); split: -0.64%, +0.45%
Copies: 170398 -> 170555 (+0.09%); split: -0.64%, +0.74%
PreSGPRs: 135567 -> 133887 (-1.24%)
PreVGPRs: 140569 -> 141317 (+0.53%)
VALU: 1959144 -> 1953839 (-0.27%); split: -0.30%, +0.03%
SALU: 217956 -> 217676 (-0.13%); split: -0.20%, +0.07%

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32791>
2024-12-30 22:31:35 +00:00
Georg Lehmann
9bd4296845 nir: add nir_alu_srcs_negative_equal_typed
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32791>
2024-12-30 22:31:35 +00:00
Georg Lehmann
43fca7fffe amd: support load_front_face_fsign
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32791>
2024-12-30 22:31:35 +00:00
Georg Lehmann
15d754fefa nir: add load_front_face_fsign
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32791>
2024-12-30 22:31:34 +00:00
Georg Lehmann
aee0c7274c amd: switch to FRONT_FACE_ALL_BITS(0)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32791>
2024-12-30 22:31:34 +00:00
Caio Oliveira
056b14b882 intel/brw: Move two NIR passes to brw_nir.c
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32799>
2024-12-30 20:18:23 +00:00
Pavel Ondračka
8bc271e90d r300: disable microtiling for scanout buffers
Does not work with R300/R400 due to kernel driver limitations.
Suggested by Marek Olšák.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12010
Fixes: f424ef1801
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32638>
2024-12-30 19:37:36 +00:00
Caio Oliveira
1154b07d09 intel/brw: Add missing call to invalidate analysis
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32798>
2024-12-30 19:01:40 +00:00
Caio Oliveira
3ca6fa7487 intel/brw: Gather brw_reg related implementations in brw_reg.cpp
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32800>
2024-12-30 18:26:59 +00:00
Rob Clark
75c7f4e072 freedreno/registers: Add GMU_CORE_FW_VERSION
From https://patchwork.freedesktop.org/series/142856/

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32806>
2024-12-30 18:00:42 +00:00
Caio Oliveira
5860e07f92 intel/brw: Rename brw_compact_inst_* helpers to brw_eu_compact_inst_*
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
228aba779f intel/brw: Rename brw_inst_* helpers to brw_eu_inst_*
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
3031b22a8a intel/brw: Rename brw_inst_bits/set_bits to brw_eu_inst_bits/set_bits
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
06ccaad5f1 intel/brw: Rename brw_compact_inst to brw_eu_compact_inst
Consistent with brw_eu_inst.

Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
3c3f4a1235 intel/brw: Rename brw_inst to brw_eu_inst
Free the old name for the BRW IR instruction.

Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Caio Oliveira
9caa845e0f intel/brw: Rename brw_inst.h to brw_eu_inst.h
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32643>
2024-12-30 17:16:15 +00:00
Juan A. Suarez Romero
a96ded29c4 v3d/ci: clean some asan failures
Remove skipped asan tests that are now fixed.

Move some asan failures to skip, identifying what are the tests that
caused the failures.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32804>
2024-12-30 16:38:39 +00:00
Georg Lehmann
b8fa9daf0c nir: sink/move alu with two identical, non constant sources.
Foz-DB Navi21:
Totals from 32363 (40.76% of 79395) affected shaders:
MaxWaves: 787499 -> 787675 (+0.02%); split: +0.02%, -0.00%
Instrs: 28783404 -> 28783464 (+0.00%); split: -0.01%, +0.01%
CodeSize: 156763536 -> 156765148 (+0.00%); split: -0.01%, +0.02%
VGPRs: 1493304 -> 1492848 (-0.03%); split: -0.04%, +0.01%
Latency: 243022511 -> 243051994 (+0.01%); split: -0.08%, +0.09%
InvThroughput: 57827398 -> 57828129 (+0.00%); split: -0.05%, +0.05%
VClause: 582208 -> 582298 (+0.02%); split: -0.07%, +0.08%
SClause: 959634 -> 959312 (-0.03%); split: -0.07%, +0.04%
Copies: 1965821 -> 1965826 (+0.00%); split: -0.17%, +0.17%
Branches: 710593 -> 710596 (+0.00%); split: -0.00%, +0.01%
PreSGPRs: 1313513 -> 1313632 (+0.01%); split: -0.00%, +0.01%
PreVGPRs: 1210596 -> 1209103 (-0.12%); split: -0.12%, +0.00%
VALU: 19463445 -> 19463497 (+0.00%); split: -0.02%, +0.02%
SALU: 3319529 -> 3319500 (-0.00%); split: -0.01%, +0.01%

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32783>
2024-12-30 13:28:30 +00:00
Georg Lehmann
6a6b26dfa5 aco: create v_cmpx with s_andn2(exec, v_cmp)
Foz-DB Navi21:
Totals from 3928 (4.95% of 79395) affected shaders:
Instrs: 1155370 -> 1151154 (-0.36%)
CodeSize: 6332192 -> 6314616 (-0.28%)
Latency: 11955231 -> 11933281 (-0.18%); split: -0.18%, +0.00%
InvThroughput: 1842283 -> 1841822 (-0.03%); split: -0.03%, +0.00%
SALU: 175431 -> 171215 (-2.40%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32731>
2024-12-30 13:05:23 +00:00
Georg Lehmann
42512208d8 aco/insert_exec: exit shader using exec for top level discard
Totals from 14538 (18.31% of 79395) affected shaders:
no changes

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32731>
2024-12-30 13:05:23 +00:00
Georg Lehmann
6b35d6f75b aco: allow p_exit_early_if_not with exec condition
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32731>
2024-12-30 13:05:23 +00:00
Georg Lehmann
c279e63a79 aco: rename p_early_exit_if to if_not
It exits the shaders if the condition is false, not true.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32731>
2024-12-30 13:05:23 +00:00
Valentine Burley
13421a9fef venus/ci: Update expectations
These tests have been crashing or failing for a while now.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Valentine Burley
d3d95c2a82 venus/ci: Bump the number of tests per group
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group in the deqp-runner suite
to bring job durations within a reasonable range.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Valentine Burley
fb754b7d38 lavapipe/ci: Update expectations
These tests have been crashing or timing out for a while now.
Also document two flakes that appeared after decreasing the
faction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Valentine Burley
43c38dab5b lavapipe/ci: Bump the number of tests per group
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for both subsets of the
deqp-runner suite, which allows decreasing the fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32729>
2024-12-30 11:31:10 +00:00
Valentine Burley
ee36c36664 panvk/ci: Bump the number of tests per group for G52
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group in the deqp-runner suite,
which allows decreasing the fraction and lowering the timeout.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32725>
2024-12-30 10:37:09 +01:00
Valentine Burley
7198bfc590 panvk/ci: Move the fractions out of suites
The only difference between the -full and regular suites was the
fraction. By moving the fractions out of the suites and into
DEQP_FRACTION, we can reuse the same suite definitions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32725>
2024-12-30 10:37:09 +01:00
Qiang Yu
0c43ddd3e4 radeonsi: unify disk cache id no matter use_aco or not
Which compiler shader is compiled with could be distinguished
with nir->info.use_aco_amd now, so no need to separate disk
cache id for them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32742>
2024-12-30 11:36:37 +08:00
Qiang Yu
aaa28be0e8 radeonsi: enable ACO by default for pre-GFX10 GPUs
User can set AMD_DEBUG=usellvm to switch back to LLVM.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32742>
2024-12-30 11:36:37 +08:00
Qiang Yu
8dbec20a56 radeonsi: fix global access ACO compile fail when OpenCL
sel->stage is MESA_SHADER_COMPUTE for OpenCL shaders, while
nir->info.stage is MESA_SHADER_KERNEL.

Fixes: 955ae53efd radeonsi: fix OpenCL piglit tests fails when using ACO
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32787>
2024-12-30 02:03:27 +00:00
Juan A. Suarez Romero
f20a748b1b vc4: find linear modifier when required
The goal of the commit is to fix a dead assignment detected by static
analyzer: value stored to `linear_ok` is never read.

But instead of just removing the dead assignment, we just remove the
full variable, and instead search for the linear modifier in the place
that is required.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32772>
2024-12-29 23:18:54 +00:00
Juan A. Suarez Romero
90087c1a73 v3d: find linear modifier when required
The goal of the commit is to fix a dead assignment detected by static
analyzer: value stored to `linear_ok` is never read.

But instead of just removing the dead assignment, we just remove the
full variable, and instead search for the linear modifier in the place
that is required.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32772>
2024-12-29 23:18:54 +00:00
Juan A. Suarez Romero
f13f0e1f77 v3d: remove intermediate variable
Static analyzer is complaining that value stored to `v3d` during its
initialization is never read.

But the variable is used just below in a loop, so it is not clear if
this is just a false positive.

In any case, having this intermediate variable provides nothing,
specially when it is used only in a single place. So rather remove it
and use the full variable.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32772>
2024-12-29 23:18:54 +00:00
Juan A. Suarez Romero
78880603c6 v3d: fix BO allocation
`cleared_and_retried` variable is not required, as once the cache is
empty, in the second retry it will retry it is already empty so it won't
retry a new allocation.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32772>
2024-12-29 23:18:54 +00:00
Samuel Pitoiset
bf7a0285cf radv/meta: remove radv_meta_create_compute_pipeline()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
37116720a8 radv/meta: convert the compute resolve pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
ab019f14b2 radv/meta: convert the clear image pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
db40e4a78d radv/meta: convert the image-to-image pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
0c21ebbc89 radv/meta: convert the buffer-to-image pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
8396bf9d64 radv/meta: convert the image-to-buffer pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
f63ced7ff2 radv/meta: convert the query resolve pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
1a34e799bd radv/meta: convert DGC pipeline layout to vk_meta
DGC pipelines aren't using the vk_meta helper because that would
require to compute a separate key and that's useless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
27adadbe63 radv/meta: convert the DCC comp-to-single pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
23d2d76ab7 radv/meta: convert the clear HTILE mask pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
c6804016d0 radv/meta: convert the DCC decompress CS pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
a0c05dd7b5 radv/meta: convert the HTILE expand CS pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
3ff28c8f98 radv/meta: convert the DCC retile pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
4521eb1b2b radv/meta: convert the FMASK copy pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
a3aeeab434 radv/meta: convert the FMASK expand pipelines to vk_meta
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
f27bee04ce radv/meta: convert the copy VRS to HTILE pipelines to vk_meta
This pipeline was already always on-demand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:50 +00:00
Samuel Pitoiset
88ffeb61ae radv/meta: convert the copy/fill pipelines to vk_meta
This also switches these pipelines to on-demand always.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:49 +00:00
Samuel Pitoiset
9ebfe81a24 radv/meta: rework creating meta pipelines for query resolves
To use the same design as other meta operations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32744>
2024-12-29 18:31:49 +00:00
Samuel Pitoiset
2bc155959e radv: pass extra graphics pipeline create info using pNext
This will be needed to convert meta graphics pipeline to vk_meta.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32750>
2024-12-29 17:51:03 +00:00
Samuel Pitoiset
23b1df7953 radv: use VK_PRIMITIVE_TOPOLOGY_META_RECT_LIST_MESA for meta pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32750>
2024-12-29 17:51:03 +00:00
Samuel Pitoiset
0f8d07d355 radv: add support for VK_PRIMITIVE_TOPOLOGY_META_RECT_LIST_MESA
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32750>
2024-12-29 17:51:02 +00:00
Timur Kristóf
de2cb4a7d3 ac/nir: Only store params to attribute ring that are varying.
On GFX11+, varying outputs from the last pre-rasterization stage
are implemented by storing the outputs to the so-called
attribute ring.

Make sure to only store them when necessary.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:41 -06:00
Timur Kristóf
13234a8a8a ac/nir: Only export parameters when they are actually varying.
In AMD terminology, varying outputs are implemented by
parameter export instructions on GFX6-10.3 GPUs.

Only emit those when actually necessary.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:38 -06:00
Timur Kristóf
4d6c00944b ac/nir: Only export positions when they are really system values.
In AMD terminology, a system value is implemented by
position export instructions.

Make sure to only emit those when they are needed.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:36 -06:00
Timur Kristóf
f5981e8c0b ac/nir: Split GS output usage masks to varying and sysval masks.
To keep track which output is used for what purpose.

Note that this commit just adds the capability to track this
separately in ac/nir. The drivers will need to be updated
in the future to take advantage of this.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:33 -06:00
Timur Kristóf
92464109e3 ac/nir: Mark when pre-rast output is used as varying or sysval.
In this commit, just collect the info.
It will be taken into use by subsequent commits.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:29 -06:00
Timur Kristóf
cb0671aede ac/nir/ngg: Refactor storing per-primitive primitive ID to attribute ring.
Simplify the code using the helpers introduced in previous commits.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:26 -06:00
Timur Kristóf
edde762b56 ac/nir/ngg: Move emitting GS vertex param exports to if.
On GFX10-10.3 (when no attribute ring is present), only emit
the GS vertex parameter exports on the vertex export threads.
Other threads don't have anything to export.

Move this code around to make it a bit easier to follow.
Also add some comments to better explain what's what.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:23 -06:00
Timur Kristóf
68dbcdd935 ac/nir/ngg: Move wait attr ring workaround for GS to better place.
The call depends on the phis created by create_output_phis so
the code becomes more readable if we move it closer to that.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:20 -06:00
Timur Kristóf
9acc2f2435 ac/nir/ngg: Remove dead code for attribute ring stores.
These are replaced by the new helpers added in previous commits.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:17 -06:00
Timur Kristóf
f528de896e ac/nir/ngg: Refactor export_pos0_wait_attr_ring.
There is no need to create phis in this function anymore,
because they can be already created by create_output_phis before.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:14 -06:00
Timur Kristóf
badbb01c5d ac/nir/ngg: Refactor GS attribute ring stores.
Use the new helper.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:11 -06:00
Timur Kristóf
23c615bde2 ac/nir/ngg: Refactor VS/TES attribute ring stores.
Use the new helper.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:09 -06:00
Timur Kristóf
f38680aa1c ac/nir: Introduce ac_nir_store_parameters_to_attr_ring.
This function is going to be used for storing parameter outputs
to the attribute ring, instead of the current implementation.

It is going to be taken into use in the following commits.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:06 -06:00
Timur Kristóf
c4b45f1ec8 ac/nir: Pass ac_nir_prerast_out to ac_nir_export_position.
In a subsequent	commit,	ac_nir_export_position will
start using other fields from ac_nir_prerast_out.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:04 -06:00
Timur Kristóf
3d291a98c4 ac/nir: Pass ac_nir_prerast_out to ac_nir_export_parameters.
In a subsequent commit, ac_nir_export_parameters will
start using other fields from ac_nir_prerast_out.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:31:01 -06:00
Timur Kristóf
896237b52e ac/nir/ngg: Simplify updating mesh shader output info.
All 64-bit outputs are already lowered to 32-bit.
There is no need to handle them here.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:30:58 -06:00
Timur Kristóf
f460e3a36b ac/nir/ngg: Use ac_nir_prerast_out in mesh shader lowering.
This will help us share more code between the mesh shader lowering
and other passes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32640>
2024-12-28 10:30:53 -06:00
David Rosca
a642ff15a6 frontends/va: Fix deinterlace filter
Deinterlace filter uses interlaced buffer for output which needs
to be converted to progressive. Add back code that handles this.

Fixes: c324364f39 ("frontends/va: Only use interlaced surfaces when progressive is not supported")
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32768>
2024-12-28 12:02:42 +00:00
Lionel Landwerlin
5e4aeb3ad7 anv: fix index buffer size changes
With vkCmdBindIndexBuffer2KHR only the provided size can change which
currently fails to reprogram the index buffer properly.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Fixes: 5c2aca456e ("anv: implement vkCmdBindIndexBuffer2KHR")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12376
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32785>
2024-12-27 13:20:49 +00:00
David Rosca
96cb12ac68 radv/amdgpu: Set VCN version for ac_parse_ib
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32760>
2024-12-27 08:17:16 +00:00
David Rosca
e3d602de98 ac/parse_ib: Parse VCN IB_COMMON_OP_WRITEMEMORY
And more small fixes.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32760>
2024-12-27 08:17:16 +00:00
Qiang Yu
b0c47871ec ac: remove ac_nir_lower_subdword_loads
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
403cdacaff radeonsi: replace ac_nir_lower_subdword_loads
ac_nir_lower_mem_access_bit_sizes() does the work of it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
955ae53efd radeonsi: fix OpenCL piglit tests fails when using ACO
Now no regression compared with using LLVM.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
21f888a3ed ac,radv: move ac_nir_lower_bit_size_callback to common place
To be used by radeonsi for OpenCL.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
5f601361ed ac/nir: lower access for shared and scratch memory
OpenCL may load and store vec16 data, while ACO only
support <=32byte. Radeonsi is going to use
ac_nir_lower_mem_access_bit_sizes() for lowering these
access.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Qiang Yu
9a8eef282b radeonsi: fix OpenCL shader compile fail
sel->stage is assigned with MESA_SHADER_COMPUTE statically,
change to use nir->info.stage need to handle with MESA_SHADER_KERNEL.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12372
Fixes: 9b7ea720c9 ("radeonsi: use nir->info instead of sel->info.base")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32781>
2024-12-27 01:58:38 +00:00
Marek Olšák
c0e5e8f932 amd: update addrlib
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32687>
2024-12-26 21:02:21 +00:00
Georg Lehmann
33a73203b0 aco/isel: skip and(exec) for top level demote_if/terminate_if
In nested control flow this is nessecary to not demote/terminate invocations
that are part of the global but not part of the local mask.

At the top level, the masks are the same and no additional invocations
can be accidentally disabled.

Foz-DB Navi21:
Totals from 2095 (2.64% of 79395) affected shaders:
Instrs: 1058326 -> 1056839 (-0.14%)
CodeSize: 5632480 -> 5626616 (-0.10%)
Latency: 12082761 -> 12080520 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 2246677 -> 2246636 (-0.00%); split: -0.00%, +0.00%
Copies: 114446 -> 114433 (-0.01%)
SALU: 230585 -> 229098 (-0.64%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32755>
2024-12-26 18:34:38 +00:00
Georg Lehmann
5b4b195f1b nir: optimize unpacking 8bit values from a 64bit source
Useful for load vectorization.

Foz-DB Navi21:
Totals from 299 (0.38% of 79395) affected shaders:
Instrs: 287818 -> 284333 (-1.21%); split: -1.21%, +0.00%
CodeSize: 1557124 -> 1540544 (-1.06%); split: -1.07%, +0.00%
Latency: 4009407 -> 4012389 (+0.07%); split: -0.05%, +0.12%
InvThroughput: 1260613 -> 1262530 (+0.15%); split: -0.01%, +0.17%
VClause: 5472 -> 5369 (-1.88%); split: -1.92%, +0.04%
SClause: 5419 -> 5305 (-2.10%); split: -2.58%, +0.48%
Copies: 36709 -> 36060 (-1.77%); split: -1.81%, +0.04%
PreSGPRs: 11861 -> 11655 (-1.74%)
SALU: 66920 -> 64310 (-3.90%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32778>
2024-12-26 17:50:32 +00:00
Marek Olšák
47cdec24ee radeonsi: remove unused code
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
357ee7f699 radeonsi: switch si_get_blitter_vs to IO intrinsics
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
a0579f75fb radeonsi: fix a TCS regression
This change caused the regression:
@@ -853,7 +853,7 @@ bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *

       /* Reset the shader context. */
       ctx.shader = shader;
-      ctx.stage = sel->stage;
+      ctx.stage = nir->info.stage;

       bool same_thread_count = shader->key.ge.opt.same_patch_vertices;
       si_build_wrapper_function(&ctx, parts, same_thread_count);

because "nir" contains the previous shader (LS), not the current shader (HS).
Fix it by using prev_nir for the previous shader, so that we can keep using
"nir".

Fixes: 9b7ea720c9 - radeonsi: use nir->info instead of sel->info.base

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
227a894775 radeonsi/ci: update failures
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
19c00c586e ac/llvm: remove unused code
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Marek Olšák
c6fd69bd5e ac: remove unused code
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32780>
2024-12-26 10:12:43 +00:00
Evan
4e89690878 amd/vpelib: Shaper Refactor
- Refactor Shaper code to apply linear OR PQ based on input transfer function
- Program gamma based on shaper expected input CS
- fix fp16 input handling
- fix snake case in update_whitepoint

Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Signed-off-by: Evan Damphousse <evan.damphousse@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32695>
2024-12-26 01:23:59 +00:00
Hsieh, Mike
596d9ff8cf amd/vpelib: Refactor 3D LUT parameters
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32695>
2024-12-26 01:23:59 +00:00
Chen, Phoebe
7d326ab082 amd/vpelib: Refactor YUV format check
Using general vpe_is_yuv* helper function for the condition check

Reviewed-by: Evan Damphousse <evan.damphousse@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Phoebe Chen <phoebe.chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32695>
2024-12-26 01:23:59 +00:00
Ian Romanick
0f3a350087 brw/nir: Don't generate scalar byte to float conversions on DG2+ in optimize_extract_to_float
The lowering code does not generate efficient code. It is better to
just not emit the bad thing in the first place. The shaders that I
examined had blocks of NIR like:

    con 32     %527 = extract_u8 %456.o, %5 (0x0)
    con 32     %528 = extract_u8 %456.o, %35 (0x1)
    con 32     %529 = extract_u8 %456.o, %14 (0x2)
    con 32     %530 = extract_u8 %456.o, %11 (0x3)
    con 32     %531 = u2f32 %527
    con 32     %532 = u2f32 %528
    con 32     %533 = u2f32 %529
    con 32     %534 = u2f32 %530

In some cases the u2f results are multiplied with 1/255. There may be
a slightly more efficient way to do this by doing something like

    mov(8)    g40<1>UW        g12.1<32,8,4>UB
    mov(8)    g41<1>UW        g12.2<32,8,4>UB
    mov(8)    g42<1>UW        g12.3<32,8,4>UB
    mov(8)    g60<1>F         g12<32,8,4>UB
    mov(8)    g61<1>F         g40<1,1,0>UW
    mov(8)    g62<1>F         g41<1,1,0>UW
    mov(8)    g63<1>F         g42<1,1,0>UW

In SIMD16 and SIMD32 that would save temporary register space. It could
save a register in SIMD8 by using g40.8 instead of g42. Making that
happen might be tricky. Maybe we should just add a special NIR opcode
that converts a packed uint32 to a vec4?

v2: Add a bunch of documentation explaining what's going on. Suggested
by Ken.

shader-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
total instructions in shared programs: 18228689 -> 18228720 (<.01%)
instructions in affected programs: 43091 -> 43122 (0.07%)
helped: 0 / HURT: 30

total cycles in shared programs: 932542994 -> 932544290 (<.01%)
cycles in affected programs: 8150758 -> 8152054 (0.02%)
helped: 15 / HURT: 17

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 142890605 -> 142890392 (-0.00%); split: -0.00%, +0.00%
Cycle count: 21655049536 -> 21654693720 (-0.00%); split: -0.00%, +0.00%

Totals from 181 (0.03% of 553251) affected shaders:
Instrs: 188022 -> 187809 (-0.11%); split: -0.12%, +0.01%
Cycle count: 85291658 -> 84935842 (-0.42%); split: -0.47%, +0.05%

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 154438050 -> 154436980 (-0.00%)
Cycle count: 15334650326 -> 15334644375 (-0.00%); split: -0.00%, +0.00%
Spill count: 56754 -> 56706 (-0.08%)
Fill count: 95919 -> 95808 (-0.12%)
Scratch Memory Size: 2306048 -> 2304000 (-0.09%)
Max live registers: 32469924 -> 32469899 (-0.00%)

Totals from 112 (0.02% of 642922) affected shaders:
Instrs: 156186 -> 155116 (-0.69%)
Cycle count: 11111478 -> 11105527 (-0.05%); split: -0.62%, +0.56%
Spill count: 1766 -> 1718 (-2.72%)
Fill count: 2815 -> 2704 (-3.94%)
Scratch Memory Size: 78848 -> 76800 (-2.60%)
Max live registers: 11526 -> 11501 (-0.22%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
1a7593ed36 brw/nir: Treat some ballot as convergent
v2: Fix for Xe2.

v3: Add a comment explaining the use of bld instead of xbld. Suggested
by Ken. Fix a bug in handing is_scalar source. Noticed by me while
applying Ken's review feedback.

shader-db:

Lunar Lake, Meteor Lake, DG2, and Tiger Lake had similar results. (Lunar Lake shown)
total instructions in shared programs: 18228657 -> 18228689 (<.01%)
instructions in affected programs: 9333 -> 9365 (0.34%)
helped: 2 / HURT: 26

total cycles in shared programs: 932511560 -> 932542994 (<.01%)
cycles in affected programs: 2263040 -> 2294474 (1.39%)
helped: 7 / HURT: 27

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20700370 -> 20700392 (<.01%)
instructions in affected programs: 18579 -> 18601 (0.12%)
helped: 1 / HURT: 28

total cycles in shared programs: 888385851 -> 888386325 (<.01%)
cycles in affected programs: 2571368 -> 2571842 (0.02%)
helped: 14 / HURT: 6

total spills in shared programs: 4373 -> 4371 (-0.05%)
spills in affected programs: 71 -> 69 (-2.82%)
helped: 1 / HURT: 0

total fills in shared programs: 4657 -> 4653 (-0.09%)
fills in affected programs: 196 -> 192 (-2.04%)
helped: 1 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 142887258 -> 142890605 (+0.00%); split: -0.00%, +0.00%
Cycle count: 21653599282 -> 21655049536 (+0.01%); split: -0.00%, +0.01%
Max live registers: 47942973 -> 47942837 (-0.00%)

Totals from 22209 (4.01% of 553251) affected shaders:
Instrs: 4337679 -> 4341026 (+0.08%); split: -0.00%, +0.08%
Cycle count: 261852040 -> 263302294 (+0.55%); split: -0.38%, +0.93%
Max live registers: 1299670 -> 1299534 (-0.01%)

Meteor Lake, DG2, Tiger Lake, and Skylake had similar results. (Meteor Lake shown)
Totals:
Instrs: 156599915 -> 156590882 (-0.01%); split: -0.01%, +0.00%
Cycle count: 16940072009 -> 16940902317 (+0.00%); split: -0.01%, +0.01%
Max live registers: 32610801 -> 32610488 (-0.00%)
Max dispatch width: 5730736 -> 5731744 (+0.02%); split: +0.12%, -0.11%

Totals from 35528 (5.52% of 643617) affected shaders:
Instrs: 6175409 -> 6166376 (-0.15%); split: -0.21%, +0.06%
Cycle count: 230679923 -> 231510231 (+0.36%); split: -0.46%, +0.82%
Max live registers: 1354716 -> 1354403 (-0.02%)
Max dispatch width: 167648 -> 168656 (+0.60%); split: +4.26%, -3.66%

Ice Lake
Totals:
Instrs: 155330276 -> 155318037 (-0.01%); split: -0.01%, +0.00%
Cycle count: 15019092327 -> 15019637026 (+0.00%); split: -0.00%, +0.01%
Max live registers: 32640341 -> 32637305 (-0.01%)
Max dispatch width: 5780720 -> 5780688 (-0.00%); split: +0.02%, -0.02%

Totals from 37773 (5.85% of 645641) affected shaders:
Instrs: 6643030 -> 6630791 (-0.18%); split: -0.24%, +0.05%
Cycle count: 223589025 -> 224133724 (+0.24%); split: -0.29%, +0.53%
Max live registers: 1491781 -> 1488745 (-0.20%)
Max dispatch width: 167600 -> 167568 (-0.02%); split: +0.75%, -0.77%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
f2d2014636 brw/nir: Simplify get_nir_image_intrinsic_image and get_nir_buffer_intrinsic_index
shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 20041625 -> 20041634 (<.01%)
instructions in affected programs: 1206 -> 1215 (0.75%)
helped: 0 / HURT: 5

total cycles in shared programs: 929993812 -> 929993816 (<.01%)
cycles in affected programs: 10930 -> 10934 (0.04%)
helped: 1 / HURT: 2

fossil-db:

Lunar Lake
Totals:
Instrs: 142892951 -> 142893049 (+0.00%)
Send messages: 6591165 -> 6591186 (+0.00%)
Cycle count: 21653727624 -> 21653732470 (+0.00%); split: -0.00%, +0.00%
Scratch Memory Size: 5664768 -> 5660672 (-0.07%)
Max live registers: 47944999 -> 47944983 (-0.00%)

Totals from 19 (0.00% of 553292) affected shaders:
Instrs: 10671 -> 10769 (+0.92%)
Send messages: 697 -> 718 (+3.01%)
Cycle count: 234508 -> 239354 (+2.07%); split: -0.01%, +2.08%
Scratch Memory Size: 38912 -> 34816 (-10.53%)
Max live registers: 2203 -> 2187 (-0.73%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 156744203 -> 156743428 (-0.00%); split: -0.00%, +0.00%
Send messages: 7654787 -> 7654808 (+0.00%)
Cycle count: 16942341318 -> 16942329195 (-0.00%); split: -0.00%, +0.00%
Spill count: 75549 -> 75499 (-0.07%)
Fill count: 140094 -> 140012 (-0.06%)
Scratch Memory Size: 3945472 -> 3944448 (-0.03%)
Max live registers: 32642020 -> 32642009 (-0.00%)

Totals from 19 (0.00% of 644000) affected shaders:
Instrs: 12489 -> 11714 (-6.21%); split: -7.00%, +0.79%
Send messages: 697 -> 718 (+3.01%)
Cycle count: 203873 -> 191750 (-5.95%); split: -6.77%, +0.82%
Spill count: 50 -> 0 (-inf%)
Fill count: 82 -> 0 (-inf%)
Scratch Memory Size: 25600 -> 24576 (-4.00%)
Max live registers: 1150 -> 1139 (-0.96%)

No fossil-db changes on Tiger Lake, Ice Lake, or Skylake.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
9a967c5ec4 brw/nir: Don't try optimize around emit_uniformize
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
63e395fa87 brw/nir: Eliminate nir_to_brw_state::uniform_values
No shader-db changes on any Intel platform. No fossil-db changes on
Tiger Lake, Ice Lake, or Skylake.

fossil-db:

Lunar Lake
Totals:
Cycle count: 21653230858 -> 21653230518 (-0.00%); split: -0.00%, +0.00%
Max live registers: 47941741 -> 47941737 (-0.00%)

Totals from 17 (0.00% of 553202) affected shaders:
Cycle count: 201232 -> 200892 (-0.17%); split: -0.19%, +0.02%
Max live registers: 1354 -> 1350 (-0.30%)

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
Totals:
Instrs: 156455123 -> 156453396 (-0.00%); split: -0.00%, +0.00%
Cycle count: 16904545026 -> 16904393943 (-0.00%); split: -0.00%, +0.00%
Max live registers: 32638039 -> 32638035 (-0.00%)

Totals from 1201 (0.19% of 643905) affected shaders:
Instrs: 509360 -> 507633 (-0.34%); split: -0.34%, +0.00%
Cycle count: 1579931758 -> 1579780675 (-0.01%); split: -0.01%, +0.00%
Max live registers: 59633 -> 59629 (-0.01%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
a13244e57b brw/nir: Treat some resource_intel as convergent
No shader-db changes on any Intel platform. No fossil-db changes on Ice
Lake or Skylake.

fossil-db:

Lunar Lake
Totals:
Cycle count: 21653232202 -> 21653230858 (-0.00%); split: -0.00%, +0.00%

Totals from 4 (0.00% of 553202) affected shaders:
Cycle count: 14276568 -> 14275224 (-0.01%); split: -0.01%, +0.00%

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
Totals:
Instrs: 156453398 -> 156455123 (+0.00%); split: -0.00%, +0.00%
Cycle count: 16904394153 -> 16904545026 (+0.00%); split: -0.00%, +0.00%

Totals from 1189 (0.18% of 643905) affected shaders:
Instrs: 502891 -> 504616 (+0.34%); split: -0.00%, +0.34%
Cycle count: 1579688485 -> 1579839358 (+0.01%); split: -0.00%, +0.01%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
1b24612c57 brw/nir: Treat load_*_uniform_block_intel as convergent
Between 5 and 10 shaders (depending on the platform) from Blender are
massively helped for spills and fills (e.g., from 45 spills to 0, and
180 fills to 0).

Previously this commit cause a lot of spill and fill damage to
Wolfenstein Youngblood and Red Dead Redemption 2. I believe due to
!32041 and !32097, this is no longer the case. RDR2 is helped, and
Wolfenstein Youngblood has no changes.

However, q2rtx/q2rtx-rt-pipeline is hurt:

    Spill count: 126 -> 175 (+38.89%); split: -0.79%, +39.68%
    Fill count: 156 -> 235 (+50.64%); split: -1.92%, +52.56%

By the end of this series this damage is fixed, and q2rtx is helped
overall by -0.79% spills and -1.92% fills.

v2: Fix for Xe2.

v3: Just keep using bld for the group(1, 0) call. Suggested by Ken.

v4: Major re-write. Pass bld and xbld to fs_emit_memory_access. The big
fix is changing the way srcs[MEMORY_LOGICAL_ADDRESS] is calculated
(around line 7180). In previous versions of the commit, the address
would be calculated using bld (which is now xbld) even if the address
source was not is_scalar. This could cause the emit_uniformize (later in
the function) to fetch garbage. This also drops the special case
handling of constant offset. Constant propagation and algebraic will
handle this.

v5: Fix a subtle bug that was ultimately caused by the removal of
offset_to_component. The MEMORY_LOGICAL_ADDRESS for
load_shared_uniform_block_intel was being calculated as SIMD16 on LNL,
but the later emit_uniformize would treat it as SIMD32. This caused GPU
hangs in Assassin's Creed Valhalla.

v6: Fix a bug in D16 to D16U32 expansion. Noticed by Ken. Add a comment
explaining bld vs xbld vs ubld in fs_nir_emit_memory_access. Suggested
by Ken.

v7: Revert some of the v6 changes related to D16 to D16U32
expansion. This code was mostly correct. xbld is correct because DATA0
needs to be generated in size of the eventual SEND instruction. Using
offset(nir_src, xbld, c) will cause offset() to correctly added
component(..., 0) if nir_src.is_scalar but xbld is not scalar_group().

v8: nir_intrinsic_load_shared_uniform_block_intel was removed. This
caused reproducible hangs in Assassin's Creed: Valhalla. There are some
other compiler issues related to this game, and we're not yet sure
exactly what the cause of any of it is.

shader-db:

Lunar Lake
total instructions in shared programs: 18058270 -> 18068886 (0.06%)
instructions in affected programs: 5196846 -> 5207462 (0.20%)
helped: 4442 / HURT: 11416

total cycles in shared programs: 921324492 -> 919819398 (-0.16%)
cycles in affected programs: 733274162 -> 731769068 (-0.21%)
helped: 11312 / HURT: 31788

total spills in shared programs: 3633 -> 3585 (-1.32%)
spills in affected programs: 48 -> 0
helped: 5 / HURT: 0

total fills in shared programs: 2277 -> 2198 (-3.47%)
fills in affected programs: 79 -> 0
helped: 5 / HURT: 0

LOST:   123
GAINED: 377

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
total instructions in shared programs: 19703458 -> 19699173 (-0.02%)
instructions in affected programs: 5885251 -> 5880966 (-0.07%)
helped: 4545 / HURT: 14971

total cycles in shared programs: 903497253 -> 902054570 (-0.16%)
cycles in affected programs: 691762248 -> 690319565 (-0.21%)
helped: 16412 / HURT: 28080

total spills in shared programs: 4894 -> 4646 (-5.07%)
spills in affected programs: 248 -> 0
helped: 7 / HURT: 0

total fills in shared programs: 6638 -> 5581 (-15.92%)
fills in affected programs: 1057 -> 0
helped: 7 / HURT: 0

LOST:   427
GAINED: 978

Ice Lake and Skylake had similar results. (Ice Lake shonw)
total instructions in shared programs: 20384200 -> 20384889 (<.01%)
instructions in affected programs: 5295084 -> 5295773 (0.01%)
helped: 5309 / HURT: 12564

total cycles in shared programs: 873002832 -> 872515246 (-0.06%)
cycles in affected programs: 463413458 -> 462925872 (-0.11%)
helped: 16079 / HURT: 13339

total spills in shared programs: 4552 -> 4373 (-3.93%)
spills in affected programs: 546 -> 367 (-32.78%)
helped: 11 / HURT: 0

total fills in shared programs: 5298 -> 4657 (-12.10%)
fills in affected programs: 1798 -> 1157 (-35.65%)
helped: 10 / HURT: 0

LOST:   380
GAINED: 925

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 141528822 -> 141728392 (+0.14%); split: -0.21%, +0.35%
Subgroup size: 10968048 -> 10968144 (+0.00%)
Send messages: 6567930 -> 6567909 (-0.00%)
Cycle count: 22165780202 -> 21624534624 (-2.44%); split: -3.09%, +0.65%
Spill count: 69890 -> 66665 (-4.61%); split: -5.06%, +0.44%
Fill count: 128331 -> 120189 (-6.34%); split: -7.44%, +1.09%
Scratch Memory Size: 5829632 -> 5664768 (-2.83%); split: -2.86%, +0.04%
Max live registers: 47928290 -> 47611371 (-0.66%); split: -0.71%, +0.05%

Totals from 364369 (66.18% of 550563) affected shaders:
Instrs: 113448842 -> 113648412 (+0.18%); split: -0.26%, +0.44%
Subgroup size: 7694080 -> 7694176 (+0.00%)
Send messages: 5308287 -> 5308266 (-0.00%)
Cycle count: 21885237842 -> 21343992264 (-2.47%); split: -3.13%, +0.65%
Spill count: 65152 -> 61927 (-4.95%); split: -5.42%, +0.47%
Fill count: 122811 -> 114669 (-6.63%); split: -7.77%, +1.14%
Scratch Memory Size: 5438464 -> 5273600 (-3.03%); split: -3.07%, +0.04%
Max live registers: 34355310 -> 34038391 (-0.92%); split: -1.00%, +0.07%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
db2b1e4d76 brw/nir: Treat load_btd_{global,local}_arg_addr_intel and load_btd_shader_type_intel as convergent
No shader-db changes on any Intel platform. No fossil-db changes on
Tiger Lake, Ice Lake, or Skylake.

fossil-db:

Lunar Lake
Totals:
Instrs: 141808714 -> 141808513 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22177889310 -> 22181410192 (+0.02%); split: -0.00%, +0.02%
Spill count: 69892 -> 69890 (-0.00%); split: -0.01%, +0.01%
Fill count: 128313 -> 128331 (+0.01%)
Max live registers: 48052083 -> 48052742 (+0.00%); split: -0.00%, +0.00%

Totals from 549 (0.10% of 551446) affected shaders:
Instrs: 911251 -> 911050 (-0.02%); split: -0.10%, +0.07%
Cycle count: 1244153266 -> 1247674148 (+0.28%); split: -0.04%, +0.32%
Spill count: 15849 -> 15847 (-0.01%); split: -0.04%, +0.03%
Fill count: 35087 -> 35105 (+0.05%)
Max live registers: 68047 -> 68706 (+0.97%); split: -0.25%, +1.22%

Meteor Lake
Totals:
Instrs: 152744298 -> 152741241 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17410258529 -> 17405949054 (-0.02%); split: -0.04%, +0.01%
Spill count: 78528 -> 78598 (+0.09%); split: -0.01%, +0.09%
Fill count: 147893 -> 147978 (+0.06%); split: -0.00%, +0.06%
Scratch Memory Size: 3962880 -> 3969024 (+0.16%)
Max live registers: 31887206 -> 31887413 (+0.00%); split: -0.00%, +0.00%

Totals from 552 (0.09% of 633315) affected shaders:
Instrs: 907279 -> 904222 (-0.34%); split: -0.48%, +0.15%
Cycle count: 1152358569 -> 1148049094 (-0.37%); split: -0.56%, +0.19%
Spill count: 15290 -> 15360 (+0.46%); split: -0.03%, +0.48%
Fill count: 35313 -> 35398 (+0.24%); split: -0.02%, +0.26%
Scratch Memory Size: 1313792 -> 1319936 (+0.47%)
Max live registers: 34218 -> 34425 (+0.60%); split: -0.47%, +1.08%

DG2
Totals:
Instrs: 152766492 -> 152763061 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17406058608 -> 17406396943 (+0.00%); split: -0.02%, +0.02%
Spill count: 78626 -> 78624 (-0.00%); split: -0.01%, +0.01%
Fill count: 147956 -> 148007 (+0.03%); split: -0.01%, +0.04%
Scratch Memory Size: 3962880 -> 3969024 (+0.16%)
Max live registers: 31887158 -> 31887365 (+0.00%); split: -0.00%, +0.00%

Totals from 552 (0.09% of 633315) affected shaders:
Instrs: 908513 -> 905082 (-0.38%); split: -0.47%, +0.09%
Cycle count: 1148162185 -> 1148500520 (+0.03%); split: -0.23%, +0.26%
Spill count: 15364 -> 15362 (-0.01%); split: -0.07%, +0.06%
Fill count: 35343 -> 35394 (+0.14%); split: -0.03%, +0.17%
Scratch Memory Size: 1313792 -> 1319936 (+0.47%)
Max live registers: 34218 -> 34425 (+0.60%); split: -0.47%, +1.08%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
f3593df877 brw/nir: Treat load_reloc_const_intel as convergent
shader-db:

Lunar Lake, Meteor Lake, DG2, and Tiger Lake had similar results. (Lunar Lake shown)
Lunar Lake
total instructions in shared programs: 18096549 -> 18096537 (<.01%)
instructions in affected programs: 26128 -> 26116 (-0.05%)
helped: 7 / HURT: 2

total cycles in shared programs: 922073090 -> 922093922 (<.01%)
cycles in affected programs: 10574198 -> 10595030 (0.20%)
helped: 19 / HURT: 76

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20503943 -> 20504053 (<.01%)
instructions in affected programs: 23378 -> 23488 (0.47%)
helped: 6 / HURT: 5

total cycles in shared programs: 875477036 -> 875480112 (<.01%)
cycles in affected programs: 13840528 -> 13843604 (0.02%)
helped: 22 / HURT: 55

total spills in shared programs: 4546 -> 4552 (0.13%)
spills in affected programs: 8 -> 14 (75.00%)
helped: 0 / HURT: 1

total fills in shared programs: 5280 -> 5298 (0.34%)
fills in affected programs: 24 -> 42 (75.00%)
helped: 0 / HURT: 1

One compute shader in Tomb Raider was hurt for spills and fills.

fossil-db:

Lunar Lake
Totals:
Instrs: 141808815 -> 141808714 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22185066952 -> 22177889310 (-0.03%); split: -0.05%, +0.02%
Spill count: 69859 -> 69892 (+0.05%); split: -0.03%, +0.07%
Fill count: 128344 -> 128313 (-0.02%); split: -0.04%, +0.01%
Scratch Memory Size: 5833728 -> 5829632 (-0.07%)

Totals from 13384 (2.43% of 551446) affected shaders:
Instrs: 13852162 -> 13852061 (-0.00%); split: -0.00%, +0.00%
Cycle count: 7691993336 -> 7684815694 (-0.09%); split: -0.15%, +0.06%
Spill count: 53266 -> 53299 (+0.06%); split: -0.03%, +0.10%
Fill count: 96492 -> 96461 (-0.03%); split: -0.05%, +0.02%
Scratch Memory Size: 3827712 -> 3823616 (-0.11%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 152744735 -> 152744298 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17400199290 -> 17410258529 (+0.06%); split: -0.01%, +0.07%
Max live registers: 31887208 -> 31887206 (-0.00%)

Totals from 12435 (1.96% of 633315) affected shaders:
Instrs: 13445310 -> 13444873 (-0.00%); split: -0.00%, +0.00%
Cycle count: 6941685096 -> 6951744335 (+0.14%); split: -0.03%, +0.18%
Max live registers: 1071302 -> 1071300 (-0.00%)

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150644063 -> 150643944 (-0.00%); split: -0.00%, +0.00%
Cycle count: 15618718733 -> 15622092285 (+0.02%); split: -0.01%, +0.03%
Spill count: 58816 -> 58790 (-0.04%)
Fill count: 101054 -> 101065 (+0.01%)
Max live registers: 31792771 -> 31792766 (-0.00%); split: -0.00%, +0.00%

Totals from 13383 (2.12% of 632544) affected shaders:
Instrs: 12016285 -> 12016166 (-0.00%); split: -0.00%, +0.00%
Cycle count: 5239956851 -> 5243330403 (+0.06%); split: -0.02%, +0.08%
Spill count: 28977 -> 28951 (-0.09%)
Fill count: 47568 -> 47579 (+0.02%)
Max live registers: 1001554 -> 1001549 (-0.00%); split: -0.00%, +0.00%

Skylake
Totals:
Instrs: 140943195 -> 140943154 (-0.00%); split: -0.00%, +0.00%
Cycle count: 14818940190 -> 14816706154 (-0.02%); split: -0.02%, +0.00%
Max live registers: 31663173 -> 31663168 (-0.00%); split: -0.00%, +0.00%

Totals from 12625 (2.01% of 629351) affected shaders:
Instrs: 11598223 -> 11598182 (-0.00%); split: -0.00%, +0.00%
Cycle count: 4519027823 -> 4516793787 (-0.05%); split: -0.05%, +0.00%
Max live registers: 970275 -> 970270 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
fb9b363376 brw/nir: Treat load_inline_data_intel as convergent
No shader-db changes on any Intel platform.

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 141808595 -> 141808815 (+0.00%); split: -0.00%, +0.00%
Cycle count: 22181300418 -> 22185066952 (+0.02%); split: -0.01%, +0.03%
Max live registers: 48052077 -> 48052083 (+0.00%)

Totals from 720 (0.13% of 551446) affected shaders:
Instrs: 116778 -> 116998 (+0.19%); split: -0.01%, +0.20%
Cycle count: 1197931082 -> 1201697616 (+0.31%); split: -0.21%, +0.53%
Max live registers: 56552 -> 56558 (+0.01%)

No fossil-db changes on any other Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
3e63920ca5 brw/nir: Treat some load_ubo as convergent
v2: Fix for Xe2.

No changes in shader-db or fossil-db on Lunar Lake, Meteor Lake, or DG2.

shader-db:

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
total instructions in shared programs: 19626547 -> 19634353 (0.04%)
instructions in affected programs: 1591181 -> 1598987 (0.49%)
helped: 925 / HURT: 3595

total cycles in shared programs: 865236718 -> 866682659 (0.17%)
cycles in affected programs: 151284264 -> 152730205 (0.96%)
helped: 3430 / HURT: 5510

total sends in shared programs: 1032237 -> 1032233 (<.01%)
sends in affected programs: 20 -> 16 (-20.00%)
helped: 4 / HURT: 0

LOST:   48
GAINED: 141

fossil-db:

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150662952 -> 150641175 (-0.01%); split: -0.03%, +0.02%
Subgroup size: 7768880 -> 7768888 (+0.00%)
Send messages: 7502265 -> 7502044 (-0.00%)
Cycle count: 15621785298 -> 15618640525 (-0.02%); split: -0.06%, +0.04%
Spill count: 58818 -> 58816 (-0.00%)
Fill count: 101063 -> 101054 (-0.01%)
Max live registers: 31795403 -> 31792179 (-0.01%); split: -0.01%, +0.00%
Max dispatch width: 5572160 -> 5571488 (-0.01%); split: +0.00%, -0.01%

Totals from 10278 (1.62% of 632539) affected shaders:
Instrs: 5276493 -> 5254716 (-0.41%); split: -0.89%, +0.48%
Subgroup size: 156432 -> 156440 (+0.01%)
Send messages: 279259 -> 279038 (-0.08%)
Cycle count: 6483576378 -> 6480431605 (-0.05%); split: -0.16%, +0.11%
Spill count: 27133 -> 27131 (-0.01%)
Fill count: 49384 -> 49375 (-0.02%)
Max live registers: 675781 -> 672557 (-0.48%); split: -0.49%, +0.01%
Max dispatch width: 97256 -> 96584 (-0.69%); split: +0.08%, -0.77%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
c48570d2b2 brw/nir: Treat some ALU results as convergent
v2: Fix for Xe2.

v3: Fix handling of 64-bit CMP results.

v4: Scalarize 16-bit comparison temporary destination when used as a
source (as was already done for 64-bit). Suggested by Ken.

shader-db:

Lunar Lake
total instructions in shared programs: 18096500 -> 18096549 (<.01%)
instructions in affected programs: 15919 -> 15968 (0.31%)
helped: 8 / HURT: 21

total cycles in shared programs: 921841300 -> 922073090 (0.03%)
cycles in affected programs: 115946336 -> 116178126 (0.20%)
helped: 386 / HURT: 135

Meteor Lake and DG2 (Meteor Lake shown)
total instructions in shared programs: 19836053 -> 19836016 (<.01%)
instructions in affected programs: 19547 -> 19510 (-0.19%)
helped: 21 / HURT: 18

total cycles in shared programs: 906713777 -> 906588541 (-0.01%)
cycles in affected programs: 96914584 -> 96789348 (-0.13%)
helped: 335 / HURT: 134

total fills in shared programs: 6712 -> 6710 (-0.03%)
fills in affected programs: 52 -> 50 (-3.85%)
helped: 1 / HURT: 0

LOST:   1
GAINED: 1

Tiger Lake
total instructions in shared programs: 19641284 -> 19641278 (<.01%)
instructions in affected programs: 12358 -> 12352 (-0.05%)
helped: 10 / HURT: 19

total cycles in shared programs: 865413131 -> 865460513 (<.01%)
cycles in affected programs: 74641489 -> 74688871 (0.06%)
helped: 388 / HURT: 100

total spills in shared programs: 3899 -> 3898 (-0.03%)
spills in affected programs: 17 -> 16 (-5.88%)
helped: 1 / HURT: 0

total fills in shared programs: 3249 -> 3245 (-0.12%)
fills in affected programs: 51 -> 47 (-7.84%)
helped: 1 / HURT: 0

LOST:   1
GAINED: 1

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20495826 -> 20496111 (<.01%)
instructions in affected programs: 53220 -> 53505 (0.54%)
helped: 28 / HURT: 16

total cycles in shared programs: 875173550 -> 875243910 (<.01%)
cycles in affected programs: 51700652 -> 51771012 (0.14%)
helped: 400 / HURT: 39

total spills in shared programs: 4546 -> 4546 (0.00%)
spills in affected programs: 288 -> 288 (0.00%)
helped: 1 / HURT: 2

total fills in shared programs: 5224 -> 5280 (1.07%)
fills in affected programs: 795 -> 851 (7.04%)
helped: 0 / HURT: 4

LOST:   1
GAINED: 1

fossil-db:

Lunar Lake
Totals:
Instrs: 141811551 -> 141807640 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22183128332 -> 22181285594 (-0.01%); split: -0.06%, +0.05%
Spill count: 69890 -> 69859 (-0.04%); split: -0.09%, +0.04%
Fill count: 128877 -> 128344 (-0.41%); split: -0.42%, +0.00%
Max live registers: 48053415 -> 48051613 (-0.00%); split: -0.00%, +0.00%

Totals from 6817 (1.24% of 551443) affected shaders:
Instrs: 4300169 -> 4296258 (-0.09%); split: -0.14%, +0.05%
Cycle count: 17263755610 -> 17261912872 (-0.01%); split: -0.08%, +0.07%
Spill count: 41822 -> 41791 (-0.07%); split: -0.15%, +0.07%
Fill count: 75523 -> 74990 (-0.71%); split: -0.71%, +0.01%
Max live registers: 733647 -> 731845 (-0.25%); split: -0.29%, +0.04%

Meteor Lake and all older Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 152735305 -> 152735801 (+0.00%); split: -0.00%, +0.00%
Subgroup size: 7733536 -> 7733616 (+0.00%)
Cycle count: 17398725539 -> 17400873100 (+0.01%); split: -0.00%, +0.02%
Max live registers: 31887018 -> 31885742 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5561696 -> 5561712 (+0.00%)

Totals from 5672 (0.90% of 633314) affected shaders:
Instrs: 2817606 -> 2818102 (+0.02%); split: -0.05%, +0.07%
Subgroup size: 81128 -> 81208 (+0.10%)
Cycle count: 10021470543 -> 10023618104 (+0.02%); split: -0.01%, +0.03%
Max live registers: 306520 -> 305244 (-0.42%); split: -0.43%, +0.01%
Max dispatch width: 74136 -> 74152 (+0.02%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
7eab2cb67e brw/nir: Treat load_workgroup_id as convergent
v2: Fix for Xe2.

shader-db:

Lunar Lake Meteor Lake, DG2, and Tiger Lake had similar results. (Lunar Lake shown)
total instructions in shared programs: 18096526 -> 18096500 (<.01%)
instructions in affected programs: 6759 -> 6733 (-0.38%)
helped: 9 / HURT: 3

total cycles in shared programs: 921727804 -> 921841300 (0.01%)
cycles in affected programs: 110049730 -> 110163226 (0.10%)
helped: 90 / HURT: 372

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20496591 -> 20496402 (<.01%)
instructions in affected programs: 48757 -> 48568 (-0.39%)
helped: 25 / HURT: 8

total cycles in shared programs: 875253948 -> 875237902 (<.01%)
cycles in affected programs: 56760140 -> 56744094 (-0.03%)
helped: 363 / HURT: 34

total spills in shared programs: 4555 -> 4546 (-0.20%)
spills in affected programs: 174 -> 165 (-5.17%)
helped: 2 / HURT: 0

total fills in shared programs: 5243 -> 5224 (-0.36%)
fills in affected programs: 382 -> 363 (-4.97%)
helped: 2 / HURT: 0

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 141811577 -> 141811551 (-0.00%); split: -0.00%, +0.00%
Cycle count: 22173792370 -> 22183128332 (+0.04%); split: -0.00%, +0.04%
Max live registers: 48053498 -> 48053415 (-0.00%)

Totals from 3911 (0.71% of 551443) affected shaders:
Instrs: 2164804 -> 2164778 (-0.00%); split: -0.00%, +0.00%
Cycle count: 2404062476 -> 2413398438 (+0.39%); split: -0.02%, +0.41%
Max live registers: 413583 -> 413500 (-0.02%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
6fab1b77c2 brw/nir: Treat some load_uniform as convergent
No shader-db changes on any Intel platform.

v2: Fix for Xe2.

v3: Rework the way that we determine that an intrinsic can actually be
convergent. This will now depend on whether or not the important
sources have previously be determined to be convergent. Fixes
intermitent failures in some test cases (including
dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.push_constant_float_16_to_32.scalar_frag).

v4: s/the it/it/ in a comment. Noticed by Ken.

fossil-db:

No fossil-db changes on Lunar Lake.

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 152743449 -> 152743161 (-0.00%)
Cycle count: 17399179660 -> 17399193488 (+0.00%)

Totals from 144 (0.02% of 633314) affected shaders:
Instrs: 5936 -> 5648 (-4.85%)
Cycle count: 51616 -> 65444 (+26.79%)

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150646195 -> 150645907 (-0.00%)
Cycle count: 15618427818 -> 15618428942 (+0.00%)

Totals from 144 (0.02% of 632567) affected shaders:
Instrs: 6218 -> 5930 (-4.63%)
Cycle count: 39968 -> 41092 (+2.81%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:59 -08:00
Ian Romanick
341e5117ec brw/nir: Treat load_const as convergent
opt_combine_constants goes to great effort to pack 8 constants into a
single register, this can't have much effect.

There is a lot of fossil-db variation among platforms, but the results
are generally positive.

v2: Fix for Xe2.

shader-db:

Lunar Lake
total instructions in shared programs: 18095100 -> 18092845 (-0.01%)
instructions in affected programs: 158931 -> 156676 (-1.42%)
helped: 423 / HURT: 0

total cycles in shared programs: 921523326 -> 921522784 (<.01%)
cycles in affected programs: 7522774 -> 7522232 (<.01%)
helped: 225 / HURT: 228

LOST:   1
GAINED: 7

Meteor Lake and all older Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19820211 -> 19820303 (<.01%)
instructions in affected programs: 53087 -> 53179 (0.17%)
helped: 135 / HURT: 1

total cycles in shared programs: 906380523 -> 906383031 (<.01%)
cycles in affected programs: 1402315 -> 1404823 (0.18%)
helped: 156 / HURT: 100

LOST:   1
GAINED: 16

fossil-db:

Lunar Lake
Totals:
Instrs: 141876801 -> 141783010 (-0.07%); split: -0.07%, +0.00%
Subgroup size: 10994624 -> 10994704 (+0.00%)
Cycle count: 22173441950 -> 22172949188 (-0.00%); split: -0.01%, +0.01%
Spill count: 69850 -> 69890 (+0.06%); split: -0.00%, +0.06%
Fill count: 129285 -> 128877 (-0.32%)
Max live registers: 48047900 -> 48043650 (-0.01%); split: -0.01%, +0.00%

Totals from 29837 (5.41% of 551396) affected shaders:
Instrs: 7842512 -> 7748721 (-1.20%); split: -1.23%, +0.03%
Subgroup size: 940320 -> 940400 (+0.01%)
Cycle count: 3444846368 -> 3444353606 (-0.01%); split: -0.09%, +0.08%
Spill count: 23358 -> 23398 (+0.17%); split: -0.01%, +0.18%
Fill count: 52296 -> 51888 (-0.78%)
Max live registers: 3183481 -> 3179231 (-0.13%); split: -0.16%, +0.03%

Meteor Lake
Totals:
Instrs: 152709353 -> 152666543 (-0.03%); split: -0.03%, +0.00%
Cycle count: 17397176906 -> 17397668904 (+0.00%); split: -0.00%, +0.01%
Fill count: 147896 -> 147893 (-0.00%)
Max live registers: 31862891 -> 31861888 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5559664 -> 5561776 (+0.04%); split: +0.08%, -0.04%

Totals from 20913 (3.30% of 633046) affected shaders:
Instrs: 6676676 -> 6633866 (-0.64%); split: -0.64%, +0.00%
Cycle count: 1498330125 -> 1498822123 (+0.03%); split: -0.06%, +0.09%
Fill count: 41010 -> 41007 (-0.01%)
Max live registers: 1799295 -> 1798292 (-0.06%); split: -0.06%, +0.00%
Max dispatch width: 12880 -> 14992 (+16.40%); split: +33.29%, -16.89%

DG2 and Tiger Lake had similar results. (DG2 shown)
Totals:
Instrs: 152730878 -> 152688139 (-0.03%); split: -0.03%, +0.00%
Cycle count: 17394835605 -> 17394179808 (-0.00%); split: -0.01%, +0.00%
Max live registers: 31862843 -> 31861840 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5559664 -> 5561776 (+0.04%); split: +0.08%, -0.04%

Totals from 20912 (3.30% of 633046) affected shaders:
Instrs: 6563021 -> 6520282 (-0.65%); split: -0.65%, +0.00%
Cycle count: 1201999616 -> 1201343819 (-0.05%); split: -0.08%, +0.03%
Max live registers: 1798392 -> 1797389 (-0.06%); split: -0.06%, +0.00%
Max dispatch width: 12872 -> 14984 (+16.41%); split: +33.31%, -16.90%

Ice Lake
Totals:
Instrs: 151914872 -> 151868108 (-0.03%)
Cycle count: 15262958696 -> 15262665082 (-0.00%); split: -0.00%, +0.00%
Max live registers: 32194225 -> 32193192 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5650880 -> 5650608 (-0.00%); split: +0.02%, -0.03%

Totals from 22192 (3.48% of 637223) affected shaders:
Instrs: 6419739 -> 6372975 (-0.73%)
Cycle count: 184733818 -> 184440204 (-0.16%); split: -0.36%, +0.20%
Max live registers: 1989950 -> 1988917 (-0.05%); split: -0.05%, +0.00%
Max dispatch width: 5744 -> 5472 (-4.74%); split: +23.40%, -28.13%

Skylake
Totals:
Instrs: 141027379 -> 140811741 (-0.15%)
Cycle count: 14817704293 -> 14817418611 (-0.00%); split: -0.01%, +0.01%
Max live registers: 31628796 -> 31627791 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5535176 -> 5539880 (+0.08%); split: +0.14%, -0.06%

Totals from 22218 (3.53% of 628840) affected shaders:
Instrs: 5944856 -> 5729218 (-3.63%)
Cycle count: 182845101 -> 182559419 (-0.16%); split: -0.60%, +0.44%
Max live registers: 1974576 -> 1973571 (-0.05%); split: -0.07%, +0.02%
Max dispatch width: 16912 -> 21616 (+27.81%); split: +46.93%, -19.11%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
d0f1a94e3d brw/build: Prepare BROADCAST for scalar values
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
5ea9ed4798 brw/nir: Prepare try_rebuild_source for scalar values
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
59f66b4150 brw/emit: Allow scalar sources to HF math instructions on Xe2
v2: Add a comment explaining the context of the workaround. Suggested by
Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
4457073c32 brw/lower: Properly handle UNIFORM globals address in lower_trace_ray_logical_send
v2: Don't shadow previous declaration of globals_addr. Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
007c92b2ac brw/lower: Adjust source stride on DF is_scalar sources to MAD on Gfx9
This commit used to be "brw/emit: Allow scalar sources to 64-bit
3-source instructions". These instructions were fixed up in
brw_eu_emit. There seems to be some conflict with the <0,1,0> stride an
post-RA scheduling. The only difference between the passing code
generated by this commit and the failing code generated by the older
commit is some post-RA scheduling.

v2: Change the stride of a MAD even if the instruction isn't
lowered. MAD instructions that are already SIMD8 have to follow the same
rules. 🤦

v3: Pull the lowering out to its own pass. Update the comment in
brw_fs_validate. Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
d5d7ae22ae brw/nir: Fix up handling of sources that might be convergent vectors
Sources that are scalars (almost all source) and convergent generally
want <0,1,0> source stride. Sources that are vectors (e.g., texture
coordinates, SSBO write data, etc.) and convergent want no extra strides
applied. In nearly all cases LOAD_PAYLOAD lowering will do the right
thing.

v2: Use VEC in emit_pixel_interpolater_send. Suggested by Ken.

v3: With the elimination of offset_to_component(), offset() may not
convert an is_scalar source to have a zero stride. Explicitly do this
in get_nir_src and prepare_alu_destination_and_sources.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
9e6bd5bf97 brw/lower: Allow uniform and scalar sources to many kinds of SEND
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
1bff4f93ca brw: Basic infrastructure to store convergent values as scalars
In SIMD16 and SIMD32, storing convergent values in full 16- or
32-channel registers is wasteful. It wastes register space, and in most
cases on SIMD32, it wastes instructions. Our register allocator is not
clever enough to handle scalar allocations. It's fundamental unit of
allocation is SIMD8. Start treating convergent values as SIMD8.

Add a tracking bit in brw_reg to specify that a register represents a
convergent, scalar value. This has two implications:

1. All channels of the SIMD8 register must contain the same value. In
   general, this means that writes to the register must be
   force_writemask_all and exec_size = 8;

2. Reads of this register can (and should) use <0,1,0> stride. SIMD8
   instructions that have restrictions on source stride can us <8,8,1>.

Values that are vectors (e.g., results of load_uniform or texture
operations) will be stored as multiple SIMD8 hardware registers.

v2: brw_fs_opt_copy_propagation_defs fix from Ken. Fix for Xe2.

v3: Eliminte offset_to_scalar(). Remove mention of vec4 backend in
brw_reg.h. Both suggested by Caio. The offset_to_scalar() change
necessitates some trickery in the fs_builder offset() function, but I
think this is an improvement overall. There is also some rework in
find_value_for_offset to account for the possibility that is_scalar
sources in LOAD_PAYLOAD might be <8;8,1> or <0;1,0>.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Ian Romanick
ef3dc401da brw: Add devinfo parameter to fs_inst::regs_read
This isn't used now, but future commits will add uses. Doing this as a
separate commit removes a lot of "just typing" churn from commits that
have real changes to review.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29884>
2024-12-24 18:09:58 -08:00
Martin Krastev
e129d242f6 svga/ci: disable vmware farm
Farm has started experiencing intermittent dhcp/pxe issues with DUTs.
Disable the farm to investigate.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Reviewed-by: David Heidelberg <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32776>
2024-12-24 17:40:48 +00:00
Marek Olšák
af899c3752 radeonsi,radv: fix incorrect min_esverts for NGG subgroup calculation
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
c52025a1ce radeonsi: disable luminance alpha formats on gfx6
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
9b7ea720c9 radeonsi: use nir->info instead of sel->info.base
sel->info is out of date after shader variant optimizations. We need to
stop using it.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
04a0800068 radeonsi: call si_init_shader_args in si_get_nir_shader
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
409a6fd69c radeonsi: make si_init_shader_args static
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
7ddb28f447 radeonsi: remove some uses of enum pipe_shader_type
it's identical to gl_shader_stage

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
110b308841 radeonsi: make nir->info and si_shader_info::base identical
so that we can use nir->info instead of the latter.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
6a1bdf2f78 radeonsi/gfx12: tune streamout performance
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
10b951d752 radeonsi/gfx12: fix DrawTransformFeedback(stream != 0)
We only set buf_filled_size for the first target, but draws from non-zero
streams use buf_filled_size from other targets, so share the same
buf_filled_size buffer among all streamout targets because it contains
all 4 offsets.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
8440184dfd radeonsi: make NGG streamout output primitive type known at compile time
This compiles an optimized shader variant for NGG streamout where the output
primitive is known at compile time. This allows putting stores for all
vertices into the same VMEM clause.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
5003465c42 radeonsi: eliminate shader code computing killed Z/S/samplemask PS outputs
Compile a monolithic optimized shader to do that, and clean up the comments.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
58132d6fc8 radeonsi: implement nir_opt_frag_depth using kill_z instead of the NIR pass
This uses si_shader_info to store whether gl_FragDepth can be removed,
and it uses the kill_z epilog flag to do the removal without recompilation.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
b56f47611a radeonsi: fix alpha-to-coverage + alpha-to-one used together for gfx6-10.3
It works exactly like gfx11 except that COVERAGE_TO_MASK_ENABLE must be 1
to indicate that alpha for alpha-to-coverage should be read from mrtz.a.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
08abddd235 radeonsi/gfx11: fix alpha-to-coverage + alpha-to-one used together
alpha-to-coverage must be applied before alpha-to-one. The only way to do
that is to export alpha for alpha-to-coverage via mrtz, and export 1 via
mrt0.a.

ACO and monolithic shader support is already in place thanks to RADV,
so we only need to change the LLVM PS epilog and the shader key.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
de996ac481 radeonsi: kill Z and stencil PS outputs if depth or stencil is disabled
This adds kill_z and kill_stencil flags to the shader PS epilog key, which
removes those outputs if depth or stencil are disabled.

It must be implemented in:
* ACO PS epilog
* LLVM PS epilog
* ac_nir_lower_ps for monolithic shaders

Some of the samplemask code wasn't completely correct, but probably harmless.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
0beeb16e41 radeonsi: fix a gfx10.3 regression due to a gfx12 change
This fixes:
    Assertion `!"BITSET_TEST_RANGE: bit range crosses word boundary"' failed.

Fixes: e3cef02c24 - radeonsi/gfx12: set DB_RENDER_OVERRIDE based on stencil state

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
4ee1b2ee24 radeonsi/ci: update failures and flakes
If deqp-runner detects a flake, it's not reported without -v.
Here I gathered all the flakes.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Marek Olšák
31358df708 radeonsi/ci: don't copy skips.csv to the results directory
It's not needed anymore. This fixes the script for llvmpipe.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:20 +00:00
Pierre-Eric Pelloux-Prayer
c0ef2aa7f8 DEPENDENCY: ac/llvm: fix sparse code handling
The existing code produced a incorrectly sized result from visit_tex.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32713>
2024-12-24 12:02:19 +00:00
Marek Olšák
3a7737ffb5 virgl/ci: disable virgl-traces because it doesn't upload results
Not being able to review results makes it impossible to update the hashes.

Suggested by Daniel Stone.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Marek Olšák
73d675451b ci: update fail lists and trace checksums
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Marek Olšák
4932b63f36 v3d: enable uniform expression propagation from outputs to the next shader
This will take effect after nir_opt_varyings is enabled by another MR, and
will fix existing shader compiler crashes thanks to better optimizations.

For example, one GLSL program that failed to compile and had 226 VS
instructions and 356 FS instructions in NIR will be reduced to 2 or 3
instructions per shader.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Jesse Natalie
01e9449be2 microsoft/compiler: Update clip/cull split pass to handle clip/cull getting merged
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Jesse Natalie
8dd44c7e72 microsoft/compiler: Skip POS for io compaction
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Marek Olšák
dae57e184a glsl,st/mesa: always lower IO for GLSL, unlower IO for drivers
This enables nir_opt_varyings for all gallium drivers.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Marek Olšák
1dc85a34f3 st/mesa: add a pass that unlowers IO intrinsics to variables
We are going to switch all gallium drivers to nir_opt_varyings and then
use this to get IO variables in the end.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942>
2024-12-24 05:54:07 -05:00
Qiang Yu
dff14d102d aco: fix voffset missing when buffer store base >=4096
Regression on test:
  dEQP-GLES31.functional.geometry_shading.basic.output_256

voffset is missing if buffer store base >=4096, we need to
re-calculate offen after resolve_excess_vmem_const_offset().

Fixes: cdaf269924 ("aco: inline store_vmem_mubuf/emit_single_mubuf_store")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32767>
2024-12-24 01:42:45 +00:00
Deborah Brouwer
96c41f5926 ci: set python version 3.11 for run-pytest.sh
CI tests are carried out in debian/x86_64_pyutils container which is using
python version 3.11 so use this version also for local testing.

This makes local testing more accurate. For example repeated double
quotes in f-formatted strings will raise an error in python 3.11 but not
in python 3.12.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
995782d09c ci: stop using a venv for run-pytest.sh
Since run-pytest.sh uses the debian/x86_64_pyutils container, it's not
necessary to add an additional layer of isolation by creating a virtual
environment for run-pytest.sh.

So stop creating a venv when run-pytest is run in a container, but keep
the option of using a venv to run-pytest.sh locally.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
c280808c72 ci: update the pyutils container
Update the pyutils container so that it has all the required pip
packages for the new linting checks in run-pytest.sh.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
5707083c8c ci: update_traces_checksum: fix E501 line too long
Currently the update_traces_checksum script prints a label verification
request with a line that is 167 characters long.

Split the long line to make it more readable. Update the flake8
configuration to enforce a maximum line length of 159 characters to ensure
consistency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
7994a3b17a ci: add .flake8 linting to ci scripts and tests
Currently the ci scripts and tests don't have any linting checks. Add
.flake8 linting to start adding some consistency to the scripts. Ignore
most of the existing errors until they can be addressed on an individual
basis.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
e274d27be5 ci: run-pytest.sh: allow script to run locally
Currently, run-pytest.sh won't run locally outside of a pipeline
because it can't find the `setup-test-env.sh` which provides necessary
functions.

Add a default value for the SCRIPTS_DIR so that run-pytest can find and
run the setup-test-env.sh and be run locally outside of a pipeline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Deborah Brouwer
3471b47574 ci: collapse yamllint and shellcheck sections
Currently the yamllint and shellcheck sections in the log output are
uncollapsed, but they don't say anything interesting so just keep them
collapsed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32602>
2024-12-23 20:47:16 +00:00
Rohan Garg
5bddf6ceb0 iris: assert that we're not exporting a TILE64 surface
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32771>
2024-12-23 19:33:36 +00:00
Rohan Garg
308c2b9828 anv: refactor choose_isl_tiling_flags to pass fewer arguments
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32771>
2024-12-23 19:33:36 +00:00
Rohan Garg
f96b2c002d isl: disable aux when creating uncompressed TileY/Tile64 surfaces from compressed ones
Fixes: 8e96b51 ('intel/isl: Assert alignments of surface addresses')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32771>
2024-12-23 19:33:36 +00:00
Rohan Garg
abd137d079 iris: use CALLOC_STRUCT instead of calloc for readability
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: José Roberto de Souza <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32771>
2024-12-23 19:33:36 +00:00
Thomas H.P. Andersen
e38150f2fa drirc/nvk: force_vk_vendor=-1 for Artifact Classic
Without this the game crashes during the loading screen.

The game uses vkUpdateDescriptorSetWithTemplate and, in certain cases,
passes VkDescriptorBufferInfo structures where the offset + range
exceeds the size of the buffer. This triggers an assertion when
vk_buffer_range() is called, causing the game to crash.

When the nvidia vendor id is used the range is consistently set to 65536.
Without it the range varies and is much smaller - never exceeding 1000.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12349
Cc: stable
Reviewed-by: Faith Ekstrand <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32764>
2024-12-23 16:12:35 +00:00
Mary Guillemard
711b3351ef asahi: Remove unneeded dependencies for asahi_clc
There is no requirement on LLVM or SPIR-V tools since the introduction
of mesa-clc.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32719>
2024-12-23 15:09:41 +00:00
Mary Guillemard
5ddeea9a62 meson: Add precomp-compiler and install-precomp-compiler options
As Asahi, Intel and soon Panfrost requires an offline compiler for their
respective internal shaders, this commit adds generic new options to
workaround meson current limitations around cross-compillation.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32719>
2024-12-23 15:09:41 +00:00
Mary Guillemard
13fe5a597b meson: Add mesa-clc and install-mesa-clc options
Due to the cross build issues in current meson, we adds new options to
allow mesa_clc and vtn_bindgen to be installed or searched on the
system.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32719>
2024-12-23 15:09:40 +00:00
Juan A. Suarez Romero
4226be0c75 vc4: ensure sharing tiled resources are of proper format
When creating a tiled resource, it could be created either with "T" or
"LT" format.

But when sharing the resource, only "T" format is appropiate. So we need
to perform a conversion if required.

This is based on
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32661.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32703>
2024-12-23 13:08:43 +00:00
Mary Guillemard
631bea2e02 nak: Simplify 16-bit vector selection to not use try_from
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32679>
2024-12-23 11:47:49 +01:00
Mary Guillemard
979dfaf0bb nak: Fix 8-bit selection for vectors
This fix at least permutation issues on vec16 of 8-bits values for
cooperative matrix.

Fixes: 9e84e9e44b ("nak: Add base support for 8 and 16-bit types")
Suggested-by: M Henning <drawoc@darkrefraction.com>
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32679>
2024-12-23 11:47:32 +01:00
Samuel Pitoiset
2c323f2b8c radv: rename color output state to fragment output state
Now that it also exports depth.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32675>
2024-12-23 08:09:26 +00:00
Samuel Pitoiset
47dc9ca512 radv: rework emitting SPI_SHADER_Z_FORMAT
This fixes a small issue when the Z format in PS epilogs change, like
when alpha-to-coverage is enabled and then disabled.

igned-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32675>
2024-12-23 08:09:26 +00:00
Daniel Schürmann
28a214728c ac/lower_ngg: move readlane into break blocks in streamout code generation for gfx12/ACO
This avoids unnecessary shuffle code and s_wait_loadcnt.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32743>
2024-12-21 12:32:25 +00:00
Daniel Schürmann
47227089d6 ac/lower_ngg: move break blocks after loop in streamout code generation for gfx12/ACO
By inverting the break condition, the loop becomes shorter.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32743>
2024-12-21 12:32:25 +00:00
Daniel Schürmann
39dcd9dedb ac/lower_ngg: Fix collecting buffer offsets from 4 lanes on gfx12
Also use readlane for improved performance.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32743>
2024-12-21 12:32:25 +00:00
David Rosca
ed58b869e1 frontends/va: Don't allow EndPicture without calling driver begin_frame
This can happen in decode context when application send no slice
buffers or in processing context with no processing buffers.
We need to avoid calling driver end_frame as no begin_frame will be
called in this case.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32677>
2024-12-21 09:34:01 +00:00
David Rosca
42e765d48b frontends/va: Don't allow Render/EndPicture without BeginPicture
It's not valid to call RenderPicture and EndPicture without calling
BeginPicture or when BeginPicture fails. FFmpeg will however call
EndPicture when BeginPicture fails, so we need to handle this.
Use target_id, which is assigned in BeginPicture, as an indication
whether we are inside the Begin - End picture sequence.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32677>
2024-12-21 09:34:01 +00:00
David Rosca
6e911cf252 frontends/va: Fix decoding VC1 interlaced video
VC1 has different start code for FRAME and FIELD, so we need to use
FIELD start code for second field.
Also simplify start code search to only look for 00 00 01.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2347
Cc: mesa-stable
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32741>
2024-12-21 08:54:41 +00:00
Patrick Lerda
ad5c47502d r600: reverse fix spec ext_packed_depth_stencil getteximage
This change reverses d19e2597ce which is now superseded on the mesa
development branch by 42be38a8fb ("radeon/evergreen: ensure equal
sizes for depth-stencil npot textures").

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: David Heidelberg <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32553>
2024-12-21 05:07:16 +00:00
Alyssa Rosenzweig
83a7d9a814 hk: fix primitive restart dirty tracking
the previous logic was busted with the sequence Dolphin emits:

   BeginRender
   BindIndex
   Draw
   EndRender

   BeginRender
   Draw without restart
   Draw with restart
   EndRender

the second control stream would not have any restart index emitted, since the
dirty flag is set only on Begin and Bind, and cleared on draw.

this was probably also broken in the similar case

   BeginRender
   BindIndex
   Draw without restart
   Draw with restart
   EndRender

fixes Zelda: Wind Waker, Xeno Blade, etc.

thank you to pokechu22 for debug help!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
c585681378 hk: avoid compiling unneeded VS->GS variants
this should reduce pipeline compile time and memory bloat, now that we have no
non-XFB passthrough GS's.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
07e1b523b9 libagx: use designated initializers
these work now :-)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
a3b796ba19 libagx,hk: handle pipeline stats queries without a GS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
5bc89aa991 hk,libagx: handle adjacency without a GS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
872487919b hk,libagx: accelerate index buffer robustness
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
f106451a90 hk: factor out hk_draw_as_indexed_indirect
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:32 +00:00
Alyssa Rosenzweig
954080275b hk: use index buffer overflow check
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
e0cfc5eac1 libagx: factor out load/store_index
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
ff7abb1e22 libagx: refactor index buffer code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
686daf2524 libagx: move index size helpers to the gpu
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
b5d41bc0fb agx: match another address pattern
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
7626e40506 asahi: reformat
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
fc4e533709 agx: add more 8-bit address fusing rules
helps kernel I'm writing

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
e110b8f2c9 libagx: add missing agx_vdm_return
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
b6dbfe822b asahi: use common draw
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
b9155de0a1 hk,libagx: move hk_draw to the gpu
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Asahi Lina
c80c56a315 asahi: hk: Enable timestamps for virt
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Asahi Lina
e281293508 asahi: Virt UABI update
Support timestamp extensions & fix a bunch of missing/broken things we
were dragging along.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Alyssa Rosenzweig
0d5db3238b asahi: fix mmap'ing imported BOs
bo->dev wasn't being set on the import path. apparently mmap'ing imported BOs is
really rare, so this slipped through. should address segfaults with gnome
settings.

Reported-by: girona
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32759>
2024-12-21 01:50:31 +00:00
Eric R. Smith
4533144608 panfrost: apply DEPTH_STENCIL flag consistently
We were inconsistent over the usage of PAN_BIND_DEPTH_STENCIL, putting
it on some stencil only formats but not others. Apply it to all
stencil formats. However, we also need to change is_format_supported
to ignore S8_UINT (at least for GLES), because the hardware is a little
weird with that format and the gallium driver gets confused by it.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32462>
2024-12-20 23:18:08 +00:00
Eric R. Smith
b6ade2714c panvk: fix fs_required()
If the sample mask is updated, we have to run the fragment
shader, so make sure this is reflected in fs_required()

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Co-authored-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32462>
2024-12-20 23:18:08 +00:00
Caio Oliveira
5c0c3120ca intel/brw: Use variable instead of manually count the passes
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32709>
2024-12-20 22:41:20 +00:00
Caio Oliveira
ada898bb1c intel/brw: Disallow cmod in some cases of ARF scalar as destination
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32758>
2024-12-20 14:03:15 -08:00
Francisco Jerez
43d59c6186 intel/brw/xe3+: Relax SEND EOT register assignment restrictions.
These restrictions have been removed from the hardware.  Make the code
enforcing and validating them conditional.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32758>
2024-12-20 14:03:15 -08:00
nyanmisaka
8a5ec60442 frontends/vdpau: Get AV1 decode subsampling_x/y
The VDPAU frontend requires similar changes as in the VAAPI frontend.

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

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32752>
2024-12-20 16:36:42 +00:00
Rohan Garg
9a4f5b739e intel/compiler: disable mesh autostrip for WA 16020916187
Disable mesh autostrip for platforms that need WA 16020916187.
Additionally, zero out the layer and viewport slots when a shading rate
is found through the brw_nir_initialize_mue pass.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32751>
2024-12-20 17:02:20 +01:00
Erik Faye-Lund
b180e2a47c panvk/ci: update expected failures
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32748>
2024-12-20 14:52:25 +01:00
David Rosca
5621ce10a6 radeonsi/vcn: Return error when decoding 12bit VP9 and 4:2:2/4:4:4 AV1
This is not supported by VCN.
We indicate this limitation by not reporting YUV420_12 RT format
supported for VP9, and not reporting YUV422 and YUV444 for AV1.
Most applications however simply ignore this, and will pick some other
format that is supported, which obviously won't work.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32663>
2024-12-20 10:51:18 +00:00
David Rosca
245d8c8e99 frontends/va: Get AV1 decode subsampling_x/y
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32663>
2024-12-20 10:51:18 +00:00
David Rosca
d94597a2d8 pipe: Remove PIPE_DEFAULT_DECODER_FEEDBACK_TIMEOUT_NS
Use OS_TIMEOUT_INFINITE instead.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32705>
2024-12-20 11:19:49 +01:00
David Rosca
c03805e4f5 radeonsi/vcn: Use local variable for destory fence
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32705>
2024-12-20 11:19:05 +01:00
David Rosca
fed1ed1eff radeonsi/vcn: Don't keep last fence
This is not needed after 0c024bbe64 ("radeonsi/vcn: Add decode DPB buffers as CS dependency")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32705>
2024-12-20 11:18:23 +01:00
Peyton Lee
ad0dbea49d radeonsi/vpe: add destroy_fence function
implement destroy_fence() for better fence control

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32648>
2024-12-20 09:55:00 +00:00
Marek Olšák
1e14b00e8b gallium: pass XFB primitive mode to set_stream_output_targets
radeonsi would like to know the prim mode. GL always knows it,
so let's pass it through.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685>
2024-12-20 08:22:52 +00:00
Marek Olšák
e22b78a196 mesa: fix printing _NEW_* flags
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685>
2024-12-20 08:22:52 +00:00
Marek Olšák
b2ddf85591 mesa: set correct XFB prim mode for draw validation after resuming XFB
Draws were validated against an XFB primitive type from the last
glBeginTransformFeedback call, ignoring glResumeTransformFeedback that
may have been after it that may have resumed for a different primitive
type.

The spec doesn't state this explicitly, but it's logical.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685>
2024-12-20 08:22:52 +00:00
Marek Olšák
227f69716f st/mesa: don't use nir_opt_fragdepth because it's incorrect with MSAA
Doing "gl_FragDepth = gl_FragCoord.z" with MSAA and without sample shading
changes per-sample depth testing to per-pixel depth testing, so we can't
eliminate it.

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

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685>
2024-12-20 08:22:52 +00:00
Samuel Pitoiset
a7d0f0b30e radv: check descriptor indexing features for enabling the global BO list
It's more accurate.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32718>
2024-12-20 07:43:59 +00:00
Samuel Pitoiset
62edab4cac radv: cleanup enabling the global BO list when BDA is used
VK_{EXT,KHR}_buffer_device_address are redundant with the
bufferDeviceAddress feature.

VK_KHR_ray_tracing_pipeline depends on VK_KHR_acceleration_structure
which also depends on the bufferDeviceAddress feature.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32718>
2024-12-20 07:43:59 +00:00
Pavel Ondračka
b06797633d r300: disable ATI2N textures on R400
The HW can do it, however if the state tracker sees support for ATI2N,
it will assume we also don't need a fallback for ATI1N. So if something
actually tries to use ATI1N format later, we will crash.

This could be fixed at the st level, but I honestly don't think the added
complexity is worth it, especially as this is highly r300 specific and
only affects single generation. So just disable it.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32639>
2024-12-20 07:31:11 +00:00
Antonio Ospite
669b7f881d ci/container: remove S3_JWT_FILE when container_job_trampoline.sh exits
The running container jobs scripts S3_JWT_FILE needs to be removed on
exit because the resulting image is committed and we don't want the auth
token to leak permanently in the fs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Antonio Ospite
88dfda7f0a ci/android: add a script to build LLVM libraries for Android
In order to build the mesa llvmpipe driver for Android, LLVM libraries
for Android are needed, but building them each time a new upstream mesa
is built would be too much overhead.

So add a script to build LLVM libraries for Android and call it from the
debian/android_build job. The actual build will be performed only when
necessary and the resulting artifact will be uploaded to the S3 bucket
to be re-used when building mesa for Android.

The build process follows what has been documented in
docs/drivers/llvmpipe.rst

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Antonio Ospite
f1f4570402 ci/android: unset compiler env vars in debian/android_build.sh
Unset the compiler env vars in debian/android_build.sh used to
cross-build libelf for Android, to prevents those env vars to
inadvertently affect subsequent commands that might want to build for
the native host after the cross-builds.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Guilherme Gallo
742c3846e8 ci/container: set up S3_JWT_FILE also for container jobs
Set up "${S3_JWT_FILE}" also for container jobs, this can be useful in
case some jobs want to save something to S3.

Note that for container jobs setting the file /s3_swt in the
`default:before_script` section would not work: this wold be "too early"
because, when using ci-templates, the cbuild invocation switches the
root filesystem before executing FDO_DISTRIBUTION_EXEC, resulting in the
file becoming unavailable after the switch.

So set up the file exactly in FDO_DISTRIBUTION_EXEC, before launching
the actual container script.

Do this using a new trampoline script
.gitlab-ci/container/container_job_trampoline.sh so that in the future
other tasks common to all container jobs can be added there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093>
2024-12-20 04:40:52 +00:00
Mel Henning
6f6072448d gallium/winsys/nouveau: Don't mark the api PUBLIC
We don't want to export this symbol from our shared object - any use of
this function from outside of mesa (like the ddx) should get the version
from libdrm, not the private copy in mesa.

Fixes: 821f4c8d99 ("nouveau: import libdrm_nouveau")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32740>
2024-12-20 03:35:36 +00:00
Karol Herbst
6646b5f95b rusticl: fix clippy::doc-lazy-continuation
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32723>
2024-12-20 03:13:34 +00:00
Karol Herbst
c2ec0c26fd rusticl: fix clippy::needless-lifetimes
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32723>
2024-12-20 03:13:34 +00:00
Karol Herbst
a4d0d1c87b rusticl/util: fix ptr_to_integer_transmute_in_consts warning
We simply remove the const attribute :)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12288
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32723>
2024-12-20 03:13:34 +00:00
Karol Herbst
de664f05e3 rusticl/platform: silence static_mut_refs warning
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12288
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32723>
2024-12-20 03:13:34 +00:00
Marek Olšák
a50d069d1c nir/opt_varyings: clear info->clip/cull_distance_array_size if relocated
svga breaks if shader_info declares these, but the shader is missing
the outputs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32684>
2024-12-20 02:32:08 +00:00
Marek Olšák
9d129505b5 nir/opt_varyings: set all IO types to float to facilitate full vectorization
If types differ between components of a vec4 slot, IO vectorization can't
be done.

This also helps drivers like d3d12 that require matching types between
shaders.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32684>
2024-12-20 02:32:08 +00:00
Deborah Brouwer
6331de400b ci: update token retrieval method for gantt charts
When the gantt chart service was first implemented, the read_token()
function would attempt to read from the default token file if the token
argument was missing.

Now it's necessary to call a separate function to look in the default
token file, so if the token argument is not provided, expressly call
get_token_from_default_dir().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
0366eebe3e ci: add pytests for the gantt chart scripts
Add some initial pytests to test new options and to prevent future
regressions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
fd7423b38e ci: add --ci-timeout option for gantt scripts
The gantt charts have a vertical line indicating the time when marge-bot
stops waiting for CI to finish. Currently the ci-timeout is hard-coded at
60 minutes. But marge-bot's timeout is configurable, so allow this value
to be configured as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
55f452530a ci: gantt chart: include in-progress jobs
If a job is still running when the gantt chart is generated, the job's
phases won't be represented as a bar on the chart.

To show these jobs on the gantt chart, introduce a new phase "In-Progress"
to capture the current status of these jobs.  Rename the "Running" phase
as "Time spent running" to emphasize that the running phase is complete.

This provides a more complete picture of the pipeline jobs when CI times
out.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
45ef1221a3 ci: post gantt: ignore pipeline_summary message
The gantt chart script currently expect the pipeline url to be the last
line of marge-bot's comment on a failed pipeline. The pipeline summary
hook now adds additional information that was preventing the gantt chart
script from finding the pipeline url.

Change the regex for finding the pipeline url to account for pipeline
summary comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
4ae2105fcb ci: post gantt: add pipeline-id to gantt filename
Add a pipeline-id to the gantt filename so that the filename is unique.
Reduce the additional info provided in the gantt comments since the tool
is now more familiar to developers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
127a8aa9c3 ci: post gantt: add --project-id option
Currently the gantt chart script will post a comment to any project that
uses the default marge bot user id. Although the gantt chart is flexible
enough to work for any project, restrict it to mesa/mesa by default. Add
the --project-id option to add a custom project or list of projects to
analyze.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
db62fa626b ci: post gantt: add --marge-user-id option
The gantt chart currently hard-codes the marge user id, but since the
script can be used for any marge-bot user, add an option to specify the
marge-bot user id. If no option is specified, the default marge-bot user
id is still used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
1404fb5481 ci: make the gantt scripts available as modules
Instead of running the gantt scripts only from the command line, make
them available as modules also. This allows the scripts to be imported for
testing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
cb74034517 ci: add some static typing to the gantt scripts
Add some static typing where possible so that tools like mypy can be used
to avoid any future code errors.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Deborah Brouwer
9671de71a3 ci: post gantt: use logging instead of print
Replace the print statements with logging to take advantage of the
built-in logging formatting and levels.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>
2024-12-19 16:56:30 -08:00
Kenneth Graunke
cb756ae8a2 brw: Don't rely on SIMD splitting in opt_combine_convergent_txfs
The SIMD splitting pass does not handle wide force_writemask_all
instructions correctly at the moment.  For example, a SIMD32 TXF
on pre-Xe2 would get split to a pair of SIMD16.  But it will set
the groups to operate on channels 15:0 and 31:16.  That's not what
we want for a NoMask instruction - both should be 15:0, i.e.
bld.group(inst->exec_size, 0).

We could (and perhaps should) fix the SIMD splitting pass to handle
this, but the pass already has subtle complexity in which builders
are used.  Or we could alter fs_builder::group(), but that has broader
implications.  As a stop-gap, just make opt_combine_covergent_txfs stop
relying on SIMD splitting.  It's trivial to do and fixes the issue
without risking other breakage.

Fixes: 6341b3cd87 ("brw: Combine convergent texture buffer fetches into fewer loads")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32714>
2024-12-19 23:16:12 +00:00
Dylan Baker
9b07cac02e docs/release-calendar: Move next release to January 2nd
January 1st is a holiday for Dylan, and he will not be working that day.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32735>
2024-12-19 22:58:07 +00:00
Dylan Baker
83875451e2 docs: update calendar for 24.3.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32735>
2024-12-19 22:58:07 +00:00
Dylan Baker
4817771150 docs: Update checksums for 24.3.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32735>
2024-12-19 22:58:07 +00:00
Dylan Baker
d1e0572f13 docs: add release notes for 24.3.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32735>
2024-12-19 22:58:07 +00:00
Chia-I Wu
0204baaa8b panvk: silence a perfetto init warning
Kernel drivers gained timestamp support in 6.13.  CI might be on an
older kernel, but on a build with perfetto enabled.  Silence the
warning.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32728>
2024-12-19 19:00:13 +00:00
Job Noorman
419879ee62 ir3,freedreno: remove binning outputs after vs ucp lowering
nir_lower_clip_vs relies on VARYING_SLOT_CLIP_VERTEX which gets removed
when removing the outputs that are unused by the binning vs. Fix this by
only removing the outputs after running nir_lower_clip_vs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12328
Fixes: 24b422dc3e ("ir3: remove unused outputs for binning pass in NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32727>
2024-12-19 17:32:26 +00:00
Jordan Justen
adfd7486c2 iris: Check that mem_fence_bo was created
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8e8097245f ("iris: Emit STATE_SYSTEM_MEM_FENCE_ADDRESS")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32716>
2024-12-19 08:54:00 -08:00
Erik Faye-Lund
4bcb92d35b nvk: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
dc5ac13959 dozen: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
97dec34a89 hasvk: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
e17abeca44 anv: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
4de0e11b92 lavapipe: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
3df7eda3a8 panvk: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
6877ff7d9b pvr: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
8628f31f49 turnip: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
57dc5bb31f asahi: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
3b94bd03c2 radv: use vk_descriptor_type_is_dynamic
No need to open-code this one now that we have a generic helper.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
d188856ffd panvk: use vk_descriptor_type_is_dynamic
No need for our own helper now that we have a generic one.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
ea88898b04 dozen: use vk_descriptor_type_is_dynamic
No need for our own helper now that we have a generic one.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
65e62a4c96 turnip: use vk_descriptor_type_is_dynamic
No need for our own helper now that we have a generic one.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
528ad300e6 v3dv: use vk_descriptor_type_is_dynamic
No need for our own helper now that we have a generic one.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
d6047f3c33 vulkan: add vk_descriptor_type_is_dynamic helper
There's a few variants of this in the tree already, let's add a reusable
one that we can switch to.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32627>
2024-12-19 15:12:58 +00:00
Erik Faye-Lund
42b29837c9 panvk: drop fragmentStoresAndAtomics support for now
This is failing a bunch of tests on CI. In particular, it seems some
details are wrong WRT robust image access and atomics. There's some
lowering in place for that, but a quick test didn't fix it for me, so
let's walk this back and try again later.

Fixes: 605c173fbd ("panvk: update feature support")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32625>
2024-12-19 14:41:28 +00:00
Benjamin Lee
3f90d8dfd2 panvk/csf: fix alpha-to-coverage
The equivalent bit is set correctly on JM, but was missed for CSF. There
shouldn't need to be any shader changes, the alpha-to-coverage flag in
FAU_ATEST_PARAM is set automatically from the bit in DcdFlags0.

Fixes dEQP-VK.pipeline.*.multisample.alpha_to_coverage*

Fixes: 447075eeee ("panfrost: Add support for the CSF job frontend")
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32696>
2024-12-19 14:14:28 +00:00
Simon Ser
da555982b3 egl/wayland: fallback to implicit modifiers if advertised by compositor
The Wayland protocol defines INVALID as a special marker indicating
that implicit modifiers are supported. If the driver doesn't support
explicit modifiers and the compositor advertises support for implicit
modifiers, fallback to these.

This effectively restores logic removed in 4c06515892, but only
for the specific case of Wayland instead of affecting all APIs.
(Wayland is one of the few APIs defining a special meaning for
INVALID.)

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 4c06515892 ("dri: revert INVALID modifier special-casing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32535>
2024-12-19 13:09:48 +00:00
Simon Ser
d795b4712c egl/wayland: only supply LINEAR modifier when supported
If we supply modifiers to dri_create_image_with_modifiers() and
the driver doesn't support them, the function will fail. We pass
__DRI_IMAGE_USE_LINEAR anyways so stripping the modifier is fine.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 4c06515892 ("dri: revert INVALID modifier special-casing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32535>
2024-12-19 13:09:48 +00:00
Simon Ser
655ac4fff6 dri: don't fetch X11 modifiers if we don't support them
If we supply modifiers to dri_create_image_with_modifiers() and
the driver doesn't support them, the function will fail. The X11
server always supports implicit modifiers so we can always fall
back to that.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 4c06515892 ("dri: revert INVALID modifier special-casing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32535>
2024-12-19 13:09:48 +00:00
Valentine Burley
d981f66df8 ci/windows: Always include windows-msvc in scheduled pipelines
The windows-msvc job currently runs only when Windows-related
files are modified.
To always run it in scheduled runs, we need to inherit
.scheduled_pipeline-rules.

Fixes: 435017700d ("ci/windows: Add a manual full job")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32717>
2024-12-19 12:29:39 +00:00
David Rosca
3ea6ed8780 radeonsi/vcn: Enable write combine for decode
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32707>
2024-12-19 11:06:48 +00:00
David Rosca
cdf2106609 radeonsi/uvd: Align bitstream buffer to 128 when resizing
Also use the same initial size as VCN.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32673>
2024-12-19 10:37:35 +00:00
David Rosca
f1235d13bd radeonsi/vcn: Align bitstream buffer to 128 when resizing
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2824
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32673>
2024-12-19 10:37:35 +00:00
Samuel Pitoiset
0b3e7ec36f radv/nir: simplify lowering of query intrinsics
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32702>
2024-12-19 08:08:53 +00:00
Samuel Pitoiset
a7d32be1dd radv: rename GDS queries to emulated queries
Emulated is more generic than GDS. GDS will be replaced with SSBO
atomics anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32702>
2024-12-19 08:08:53 +00:00
Samuel Pitoiset
db5d57e95e radv: fix getting the number of vertices per prim for the last VGT stage
This is only valid for VS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32701>
2024-12-19 07:46:28 +00:00
Samuel Pitoiset
3939214906 radv/nir: fix checking if task shader invocations query is enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32701>
2024-12-19 07:46:28 +00:00
Samuel Pitoiset
91cdee8a38 radv: only enable emulated mesh/task shader queries on GFX10.3
It's not emulated on GFX11+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32701>
2024-12-19 07:46:28 +00:00
Louis-Francis Ratté-Boulianne
30825140d0 panfrost: Re-emit texture descriptor if the data size has changed
When updating an AFBC-packed resource, the size of the resulting
texture data can change while the BO and modifier stay the same. We
still need to update the texture descriptor in that situation so
that the size is properly reported. Having a smaller size than the
real one might cause artifacts as the GPU doesn't want to read past
the reported size.

A future (more foolproof) fix might involve having a hash key to
track the size of all slices independently, but this patch still
improves the situation and make sure we don't hit a relatively
common issue when using `PAN_MESA_DEBUG=forcepack`.

Fixes: bc55d150a9 ("panfrost: Add support for AFBC packing")
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32598>
2024-12-18 22:58:20 -05:00
Qiang Yu
8609f49d05 radeonsi: fix unigine heaven crash when use aco on gfx8/9
Unigine Heaven crash on GFX8/9 when use aco:
  heaven_x64: ../../amd/mesa/src/gallium/drivers/radeonsi/si_nir_lower_abi.c:813: lower_tex: Assertion `samp_index >= 0 && comp_index >= 0' failed.

GFX8/9 will clamp texture comparison value in si_nir_lower_abi,
but it has to be done after si_nir_lower_resource.

Fixes: ae933169 ("radeonsi: lower NIR resource srcs to descriptors last")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32694>
2024-12-19 02:40:50 +00:00
Felix DeGrood
5bb1b38409 anv: remove unnecessary driconf entries for anv_enable_buffer_comp
Prior commit enables this option for all vkd3d apps, making these
entries superfluous.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32692>
2024-12-18 21:02:19 +00:00
Felix DeGrood
e8a81ba98e anv: allow compressed buffers types on vkd3d titles
Extending MR !23519 to all vkd3d titles.

Additional improvements/regressions:
 - AssassinsCreedValhalla +6%
 - DyingLight2.dx12 +5%
 - Witcher3.dx12 +2%
 - SpidermanRemastered -0.5%

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12282
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32692>
2024-12-18 21:02:19 +00:00
Connor Abbott
247d11d635 tu: Allow UBWC with images with swapped formats.
While we're here, refactor the logic to split out the mutable and
pre-mutable cases since they are now very different.

The special case for NV12 is now necessary to avoid test failures, but
it was always necessary and we didn't notice it before because tests
didn't specify a format list.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
113cb94343 freedreno/fdl, tu: Allow swaps with mutable tiled images
With the MUTABLEEN bit, swaps when rendering is now allowed. Plumb
through the mutable bit to the various format functions to allow them to
return the correct format and swap.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
c8782f3ac7 freedreno/fdl: Don't enable r8g8 special case for mutable images
The blob seems to always use the R16 pitch align. I don't check the
block size, because the blob seems to disable UBWC when setting the
MUTABLEEN bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
ca91844fc7 freedreno/fdl, tu: Make mutable part of the image layout
Right now the image layout depends on the format for the R8G8 special
case, but this is clearly wrong if we set the mutable bit because it
could be reinterpreted. Refactor how it's set to make it part of the
layout struct, rather than specified in the view.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Connor Abbott
ef4c752b6e freedreno/fdl: Fix 3d mipmapping height alignment
We can get into a situation where the layer size for a given mip isn't
large enough to hold the pitch times the aligned height, i.e. the height
isn't aligned. This can happen even if the size is 4K aligned. The
hardware seems not to align the height for us, so we have to use the
MINLAYERSZ hammer.

This was found with a Vulkan test when enabling tiling for mutable
textures on a750, but it's also reproducable via
"bin/texelFetch fs sampler3D 76x76" using piglit.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32615>
2024-12-18 20:27:44 +00:00
Valentine Burley
d5f88190fd turnip/ci: Update expectations
Seen in the last couple nightlies with the lower fractions.
(With a bonus a750-gl UnexpectedImprovement.)

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Valentine Burley
2cbc93e4df ci/windows: Update expectations
Decreasing the fraction uncovered some new failures.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Valentine Burley
435017700d ci/windows: Add a manual full job
Add the test-dozen-deqp-full nightly job, which runs VKCTS
without a fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Valentine Burley
6076b8a49c ci/windows: Bump the number of tests per group
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group in the deqp-runner suite,
which allows decreasing the fraction.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32704>
2024-12-18 18:39:24 +00:00
Mel Henning
d99b9d5937 nak: Fix two warnings of elided_named_lifetimes
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32667>
2024-12-18 18:12:45 +00:00
M Henning
5a65300439 nvk: Fix uninitialized var warnings in host_copy
Fixes: 6c5420cd30 ("nvk: Add host copy functions")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32667>
2024-12-18 18:12:45 +00:00
José Roberto de Souza
8e8097245f iris: Emit STATE_SYSTEM_MEM_FENCE_ADDRESS
According to HAS it is necessary to emit this instruction once per
context so MI_MEM_FENCE works properly.

Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32680>
2024-12-18 17:16:05 +00:00
José Roberto de Souza
2bd3df75e5 anv: Emit STATE_SYSTEM_MEM_FENCE_ADDRESS
According to HAS it is necessary to emit this instruction once per
context so MI_MEM_FENCE works properly.

Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32680>
2024-12-18 17:16:05 +00:00
José Roberto de Souza
b8f93bfd38 anv: Always create anv_async_submit in init_copy_video_queue_state()
A next patch will emit more instructions in video and copy queues
for Gfx 200 and newer but the current code only creates anv_async_submit
if device has aux_map.
Instead we can always create anv_async_submit and only submit it to
hardware if any instruction was emited.

Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32680>
2024-12-18 17:16:05 +00:00
José Roberto de Souza
edb33b47ab intel/genxml/xe2: Add STATE_SYSTEM_MEM_FENCE_ADDRESS instruction
Fixes: 86813c60a4 ("mi-builder: add read/write memory fencing support on Gfx20+")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32680>
2024-12-18 17:16:05 +00:00
Connor Abbott
9e8824371b tu: Re-enable tiled non-ubwc R8G8 images
This effectively reverts a70b197741 ("turnip: Force linear mode for
non-ubwc R8G8 formats"), except that in the meantime we added HIC
support without supporting R8G8 so we still have to force linear tiling
in that case. The previous commit is a better fix.

Tiled uncompressed images will be used for sparse residency support,
it's not valid to arbitarily not support sparse texturing on R8G8,
the blob does use a tiled uncompressed image in that case, and we will
have to also.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32619>
2024-12-18 16:46:30 +00:00
Connor Abbott
c0404da1e5 freedreno/fdl: Make tiled r8g8 images have 4k alignment
This fixes an unrecoverable hang in the trace from #5926 without having
to disable tiling.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32619>
2024-12-18 16:46:29 +00:00
Connor Abbott
6615cbfeaf tu: Make userspace RD dump generic
Stop relying on the submit BO list, which won't exist with the new
"VM_BIND" uAPI. Instead, create a separate list in generic code, only
when dumping is enabled. As a bonus this means that it should work on
virtio and kgsl too, and more code is removed from the kernel backend.
We need to use the generic fence wait introduced in the previous commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
a8b2f45346 util/dynarray: Add macro for appending an array
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
2b428e6b3a tu: Rename bo_list to submit_bo_list
There will be another similar bo_list for dumping purposes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
f97998ff17 tu/knl: Move u_trace fence handling to generic code
Contrary to what the comment said, kgsl and drm actually have very
similar semantics for fences. Add a common function to wait on a fence,
and embed the queue + fence directly instead of a syncobj abstraction
that doesn't actually gain us much. This common fence wait function will
also be helpful for making more code generic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
0e7a91595f tu/kgsl: Make wait_timestamp_safe() return VkResult
All of its callers want a VkResult.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
84d6eedd5e tu: Refactor the submit path
Each driver implemented the Vulkan runtime submit callback itself, which
resulted in a lot of duplicated code to iterate through the command
buffers and gather the list of IBs to execute, deal with autotune and
command buffers with suspending/resuming dynamic renderpasses, etc. This
has been getting steadliy worse and was only going to get worse with
sparse, since to implement sparse bind submissions we have to similarly
traverse and flatten an array of bind structures.

Borrow an idea from nvk, and add an abstraction of a "submit" object
which holds a (dynamically growing) list of pending commands to submit.
We add kernel-specific functions to create a submit, add commands to it,
and finally submit it. For sparse, we will add additional an additional
function that adds a sparse bind and then we will parse the Vulkan
structures in common code. For now, we move various misc.
driver-independent parts of the submission path into a common
tu_queue_submit() that calls into the new abstractions.

In the future, if we need to add driver-internal syncobjs to the
user-provided ones, we could use the same approach with waits and
signals. For now we provide them as part of the submit function.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
Connor Abbott
d8c9856e75 tu: Move queue-related code to a new file
We will be expanding this shortly, as we move device state over to queue
state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32165>
2024-12-18 15:50:59 +00:00
David Rosca
6115cf93b0 radeonsi: Update minimum supported encode size for VCN5
Cc: mesa-stable
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32655>
2024-12-18 15:23:21 +00:00
Mykhailo Skorokhodov
ffdbc3bbef drirc/anv: force_vk_vendor=-1 for Bellwright
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12301

Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32649>
2024-12-18 14:48:04 +00:00
Erik Faye-Lund
75ef006b6d pan/ci: update t860 ci xfails
Update to the latest nightly results

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32660>
2024-12-18 14:29:07 +00:00
Erik Faye-Lund
385301db2f panfrost: try to survive start-up alloc fails
If we fail to allocate memory this early on, we would otherwise fall
over and die. This propagates the errors up to the caller.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
c8a6709cbc panfrost: handle errors allocating csf oom-handler
This just wires up error-handling in the csf_oom_handler_init function,
and propagates it up to the csf_init_context function, as appropriate.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
56abe1e472 panfrost: handle pool-allocation errors
Because most pool-allocations happens during rendering, we have the same
issue as in the previous commit; we don't have a good way to report
the out-of-memory error here. So we do one of two things; we either
return a NULL-ish pointer, or we print an error and ignore the call.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
09cd92e283 panfrost: propagate cs_builder error instead of asserting
This makes csf_emit_batch_end propagage errors instead of asserting.
This will matter more for upcoming changes, but this starts reporting it
properly.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
a06c1eb88f panfrost: handle NULL-batches
When allocations fail, we can end up with NULL-batches. This means we
can't really do much, so let's bail what we're trying to do here.

Unfortunately, we can't always report this up to the call-site easily,
because some pipe_context functions don't allows us to return a
pipe_error value. So in those cases, make let's just return log an error
and return as if nothing happened. It's not great, but there's nothing
super obvious to do here.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
e3f2bc7963 panfrost: handle mmap failures
This makes the call-sites to panfrost_bo_mmap check for allocation
errors, and try to do the right thing to handle it.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
054fbe5e4e panfrost: report errors from panfrost_bo_mmap
If we just set the pointer to NULL, a lot of the call-sites will end up
trying to dereference it. So let's give them a better chance to realize
what's happened, and return -1 here.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
d5f4f918f3 panfrost: clean up mmap-diagnostics
Do not double-print the failure. While we're at it, make sure the
diagnostic includes plenty of details for easier debugging.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Boris Brezillon
3006c2a7b6 pan/cs: Fix cs_builder allocation failure robustness
There's more than one error-path out of cs_alloc_ins_block(), but only
one of them got the discar_instr_slot treatment. Instead of plugging
this in one more time, let's move this handling up to cs_alloc_ins(),
where we can easily whack two birds with one stone. This makes us
consistently return NULL on error here.

At the same time, we need to patch up cs_flush_block_instrs() here,
because we don't actually set the buffer invalid here. So let's
check for NULL here instead, which is the new contract.

Fixes: 0e6aaab00a ("pan/cs: add block to handle registers backup in exception handler")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Erik Faye-Lund
41a2b86666 pan/cs: fix broken allocation-failure check
We need to check the new buffer we allocated instead of the old one.
While we're at it, we also need to mark the builder as invalid.

Fixes: 3b82448f47 ("panfrost: Add a library to build CSF command streams")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32428>
2024-12-18 13:42:15 +00:00
Juan A. Suarez Romero
2abd85bbc0 v3d: make v3d_flush_resource reallocate non-shareable resources
When we create a tiled resource originally to be non shareable, if later
we want to share it, it could happen the tile format is not valid for
sharing: only UIF formats are appropiate.

In this case, we need to re-create the resource with a valid format.

For more details, see
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13154.

This commit is heavily inspired by asahi.

Fixes
`spec@ext_image_dma_buf_import@ext_image_dma_buf_import-tex-modifier`.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32661>
2024-12-18 12:56:01 +00:00
Lucas Stach
734ba8d785 etnaviv: add debug switch to disable texture descriptor usage
Halti5 GPUs still support the state based sampler configuration,
alongside the new texture descriptor based method. Allow to switch
between both methods with a debug switch, to allow easy comparisons
between them.

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/32662>
2024-12-18 12:42:37 +00:00
Lucas Stach
66512cd897 etnaviv: Update headers from rnndb
Update to rnndb commit 1d174e311be6, documenting the TX
descriptor enable bit.

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/32662>
2024-12-18 12:42:37 +00:00
Erik Faye-Lund
4a1dd45850 st/mesa: document ARB_texture_float quirk
We're not strictly speaking doing the right thing for ARB_texture_float,
but for a very good reason. This has come up a few times in the past, so
let's document the decision for future readers.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32404>
2024-12-18 11:42:20 +00:00
Marek Olšák
4d8a508510 ac/nir: call nir_gather_tcs_info only once for RADV
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
8c2f9f0665 radv: switch to the new TCS LDS/offchip size computation
to use the same logic as radeonsi. This could be improved, see TODOs.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
823e9e846e radeonsi: switch to the new TCS LDS/offchip size computation
The new TCS LDS size should be less than what it was before.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
d3dcf73cbd radeonsi: remove unused parameter tcs_vgpr_only_inputs from si_get_nir_shader
and make the function static

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
3056bf1cb1 ac/nir: add new helpers for computing the TCS LDS/offchip size accurately
This is based on how the HS lowering passes address TCS inputs and
outputs. The new LDS size is lower in some cases.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
85c20def94 ac,radv,radeonsi: enable TCS input reads from VGPRs for all compatible loads
Cross-invocation TCS input access doesn't prevent same-invocation access.
This improves shaders that use both for the same inputs.

Also, if some components of a vec4 slot only use same-invocation access and
other components only use cross-invocation access (it's possible after
compaction), this takes the VGPR path for the components with
same-invocation access, which didn't happen previously because all masks
only describe whole vec4s.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
99a03dc9d5 ac/nir: allow a TCS input to be available from both VGPRs and LDS
Both can be used. Cross-invocation access can read it from LDS, while
same-invocation access can read it from VGPRs.

The entrypoints of the passes don't allow that flexibility yet,
but the logic inside the pass allows it.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
b49eab68a8 ac/nir: use s_sendmsg(HS_TESSFACTOR) to optimize writing tess factors for gfx11
This uses the new shader message. It eliminates memory stores and latency
for simple cases of tess level values.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Marek Olšák
f4eebb373c ac/nir: reserve the first LDS vec4 for the HS tf0/1 group vote in TCS
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31673>
2024-12-18 11:07:59 +00:00
Erik Faye-Lund
fd5779c198 Revert "panvk: disable imageCubeArray on bifrost"
This reverts commit 7d2c61c266f61e3a002345bf4a61cc9363cdffd4.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32612>
2024-12-18 10:42:29 +00:00
Erik Faye-Lund
3c40aba8b6 panvk: fix image size for cube-arrays on bifrost
We're parsing the descriptors here to read the size of the resource, but
what the HW wants and imageSize() wants is not the same. So let's fix up
the result for imageSize(), by dividing the result by 6.

If we change the descriptor instead, we end up failing shader-image
reads and writes instead.

I also looked for some unused bits in the descriptor that I could use
instead, but unfortunately there's only a few bits free here - not
enough for our needs.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32612>
2024-12-18 10:42:28 +00:00
Benjamin Lee
f5763e80f4 panvk: fix sample position when sample shading is disabled
Previous code was assuming that load_sample_id loaded the hardware
sample ID register, which is 32 when sample shading is disabled. The
expectation was that we would read (0.5,0.5) from sample_positions[32].

Because the top 3 bits of the sample ID register are masked out in
bi_load_sample_id_to, we were instead reading the position of the first
sample.

This doesn't affect OpenGL, because opengl never uses
nir_load_sample_pos when sample shading is disabled.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 60146cc57c ("panvk: implement sampleRateShading")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32601>
2024-12-18 10:04:14 +00:00
Benjamin Lee
9c6f64e599 panvk: set uses_sample_shading NIR flag when sample shading is forced
This allows NIR passes to know whether sample shading is enabled at
compile-time. The previous assignment to shader->info.fs.sample_shading
is now covered by panfrost_compile, which copies the value from
uses_sample_shading.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 60146cc57c ("panvk: implement sampleRateShading")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32601>
2024-12-18 10:04:13 +00:00
Valentine Burley
61d9c47944 ci/lava: Use CI_JOB_TIMEOUT instead of separate variable
The CI_JOB_TIMEOUT variable is the GitLab-defined job timeout in
seconds.
Use this variable in LAVA instead of the separate JOB_TIMEOUT,
which was intended to represent the test phase timeout (job timeout
minus 5 minutes), but was often overlooked.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32609>
2024-12-18 09:23:27 +00:00
Caterina Shablia
d5b96309e7 panvk: enable drawIndirectFirstInstance
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
963e9feb8a panvk: enable shaderDrawParameters
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
9b3bc9def2 panvk: lower drawid to zero
We only implement single-draw direct and indirect draws, so this is
sufficient. We'll revisit this when we get around to implementing
multidraw.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
1570f0172e panvk: Fix base_{instance,vertex} handling
At the moment, we're not initializing the base_{instance,vertex} sysvals
which we'll need to do if we want to support shader draw parameters. It
turns out even without shader draw parameters enabled, some shaders need
a valid base_instance value, so this alone should fix a few tests.

On CSF hardware, we have a way to pass a non-zero base instance that's
propagated to the instance ID, but this messes with instance divisors,
so instead of using the native base instance feature, we force it to
zero, pass the base instance through an FAU sysval, and let
panvk_lower_load_vs_input() do the lowering for vertex attribute loads.

Reviewed-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/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
c7c04e13e3 pan/bi: handle load_attribute_pan
Most code is shared with load_input, with the sole difference
being where vertex and instance IDs are sourced from.

Reviewed-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/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
f4fcfa8016 pan,nir: introduce load_attribute_pan
load_attribute_pan is a panfrost-specific intrinsic for loading
vertex attributes. Takes explicit vertex and instance IDs which
we need in order to implement vertex attribute divisor with
non-zero base instance on v9+.

Passes which are used by panvk are modified to be aware of
load_attribute_pan.

Reviewed-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/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
ed5a6c1a45 panvk/csf: use gfx_state_set_dirty instead of touching state directly
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
90f6c64067 panvk: order KHR extension enables alphabetically
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Caterina Shablia
948653019b pan/util: sort files in meson.build
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32039>
2024-12-18 08:33:16 +00:00
Samuel Pitoiset
2e1c87c1ca radv: add few more query helpers for copying results
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32678>
2024-12-18 07:51:57 +00:00
Samuel Pitoiset
5b53f6deaa radv: remove dead code in radv_CmdCopyQueryPoolResults()
Incrementing dest_va doesn't do anything.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32678>
2024-12-18 07:51:57 +00:00
Samuel Pitoiset
ebe9dc49b7 radv: reorganize query code by adding separate begin/end helpers
The query code is getting big and complex over time. It will be even
more complicated because GDS doesn't exist on GFX12. Let's reorganize
slightly to make it more readable and easier to maintain.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32678>
2024-12-18 07:51:57 +00:00
Valentine Burley
3d1dd22bb4 anv/ci: Update expectations
Remove bogus failures caused by wrong GPU_VERSION configuration,
delete tests that no longer exist in current CTS versions, and
update expectations.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
526ec3e7dd anv/ci: Remove fails that are in .gitlab-ci/all-skips.txt
These tests are always skipped in Mesa.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
f42d670ea6 anv/ci: Re-enable TGL and JSL manual jobs
Thanks to the speedup achieved by increasing tests_per_group,
nightly jobs are now within reasonable time limits, allowing them
to be re-enabled.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
eb7fb2e919 anv/ci: Bump the number of tests per group for TGL
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
629b19a59f anv/ci: Bump the number of tests per group for JSL
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
e68f9bb856 anv/ci: Bump the number of tests per group for ADL
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Valentine Burley
e7e9ceceb3 anv/ci: Fix GPU_VERSION configuration for anv-jsl and anv-jsl-full
The GPU_VERSION was incorrectly set to iris-jsl for these ANV jobs,
causing mismatched expectations.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32681>
2024-12-18 07:13:44 +00:00
Chia-I Wu
576a87a590 panvk: add u_trace perfetto support
When perfetto is enabled, u_trace_context calls driver-defined callbacks
when processing trace events.  Those callbacks are expected to emit
perfetto trace packets.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
7c61e2346d panvk: improve C++ compat for perfetto
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
3096cf2a5d panvk/csf: flush and process trace events for all cmdbufs
When a cmdbuf does not have VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
call u_trace_clone_append to clone trace events and to copy timestamps.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
e9d2a3c2c6 panvk/csf: flush and process trace events for one-time cmdbufs
Flush and process trace events on queue submit when tracing is enabled
and timestamp_frequency is valid.  Tracing can be enabled with, for
example, MESA_GPU_TRACES=print.

panvk_utrace_flush_data is allocated on queue submit and is freed after
all trace events associated with the queue submit are processed.  It is
used for synchronize gpu timestamp writes and trace event processing.
It also specifies the subqueue the trace events belong to.

For the moment, cmdbufs without
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT are silently ignored.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
b9631adb0e panvk/csf: add vk_sync to panvk_queue
It will be used to synchronize gpu timestamp writes and trace event
processing.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
39824d70b8 panvk/csf: add u_trace to panvk_cmd_buffer
There is one u_trace per subqueue to record trace events.  When tracing
is enabled, trace_begin_cmdbuf and trace_end_cmdbuf will emit trace
events to u_trace and emit timestamp writes to the command streams.

The trace events are buffered in u_trace and are not flushed for
processing yet.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
06cc6e82cf panvk/csf: add CS_REG_SCRATCH_COUNT
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
76faa6f3f3 panvk: define cmdbuf begin/end tracepoints
Add panvk_tracepoints.py with trace points for cmdbuf begin/end.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Chia-I Wu
d340ed6726 panvk: add u_trace_context to panvk_device
It allocs priv bos for timestamps and uses timestamp_frequency to
convert timestamps to nanoseconds.

There is no trace event to process yet so it is not really used.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32360>
2024-12-17 23:14:26 +00:00
Ian Romanick
b4d472cd67 brw/emit: Fix BROADCAST when value is uniform and index is immediate
Fixes: c74511f5dc ("i965: Introduce the BROADCAST pseudo-opcode.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Tried-to-help-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32668>
2024-12-17 21:57:26 +00:00
Kevron Rees
da4e2af010 anv, drirc: Add workaround to speed up Spiderman reg allocation
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11971
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32438>
2024-12-17 17:40:44 +00:00
Samuel Pitoiset
6e59778e5d radv: fix capturing RT pipelines that return VK_OPERATION_DEFERRED_KHR for RGP
This isn't an error.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32683>
2024-12-17 17:12:27 +00:00
Samuel Pitoiset
f0797c60e5 ci: uprev vkd3d-proton to c965c1351fd6915a65bb7f647319536252a24a93
This is 2.14 and it contains more tests.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32674>
2024-12-17 16:00:34 +00:00
Antonio Ospite
e8d1b13f5e docs: remove leftover mention of meson dri3 option
Remove some leftover mention of the meson dri3 option from the
documentation, the option has been removed in commit 8f6fca89aa (meson:
delete dri3 build option, 2024-08-30)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32251>
2024-12-17 12:50:06 +00:00
Antonio Ospite
5d6d67a4d1 docs/android: improve documentation about building llvmpipe for Android
Improve the documentation about building the llvmpipe driver for Android
by providing more ready-to-use scripts to build llvm and create the
needed meson wrap file.

Note: in the meson wrap file, remove 'libLLVMTableGenGlobalISel' from
the built dependencies, as apparently is not available anymore for
Android on recent LLVM versions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32251>
2024-12-17 12:50:06 +00:00
Antonio Ospite
99ae03b2ae docs/android: update docs/android.rst after libgallium_dri updates
The build of libgallium has been simplified for Android where the
versioned library is not used since it's not really needed.

Update the documentation and the proposed Android.bp files to only refer
to libgallium_dri.so

While at it also fix the proposed SELinux rules to use the correct path
for libglapi which is not under /vendor/lib(64)?/egl/

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32251>
2024-12-17 12:50:06 +00:00
Valentine Burley
e03e1adcf0 llvmpipe/ci: Actually enable ASan testing for llvmpipe-deqp-asan
The llvmpipe-deqp-asan job never preloaded libasan.so.8. Fix this
by enabling the new DEQP_FORCE_ASAN option to ensure ASan testing
is performed.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:05 +00:00
Valentine Burley
04b154b847 ci/deqp: Add a DEQP_FORCE_ASAN option
Replace the last use case for for DEQP_RUNNER_OPTIONS by introducing
a centralized option instead of hardcoding the path via the --env
argument in various test configs.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:04 +00:00
Valentine Burley
ab3356e718 ci/deqp: Simplify conditional arguments
Simplify the --baseline and --max-fails conditional arguments.
This will allow deleting DEQP_RUNNER_OPTIONS.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:04 +00:00
Valentine Burley
fb2779e511 llvmpipe/ci: Move Piglit timeout inside the suite
This will allow deleting DEQP_RUNNER_OPTIONS.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:04 +00:00
Valentine Burley
ee72c8a177 ci/deqp: Remove non-suite support
Remove deqp-runner non-suite support to simplify deqp-runner.sh,
prevent the reintroduction of non-suite jobs, and streamline
testing.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32659>
2024-12-17 12:10:04 +00:00
Samuel Pitoiset
0223f0f54d radv: fix missing variants for the last VGT stage with shader object
Last VGT stages (VS, TES or GS) can always be used with a null FS when
nextStage is non-zero. Like if a VS is created with nextStage=TCS, it's
also allowed to draw without binding a CTS (ie. nextStage=None is always
a valid case).

Because we don't want to compile two variants for NONE and FRAGMENT,
let's compile only the FRAGMENT one when necessary.

Fixes new CTS coverage, see https://gerrit.khronos.org/c/vk-gl-cts/+/15976.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32665>
2024-12-17 09:50:52 +00:00
Samuel Pitoiset
5ad025b675 radv/ci: fix expected list of failures for TAHITI
DGC tests are skipped.

Fixes: dda03a21d6 ("Revert "radv: fix creating unlinked shaders with ESO when nextStage is 0"")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32672>
2024-12-17 09:49:14 +01:00
Valentine Burley
78f60e773c turnip/ci: Enable ASan leak detection in a630-vk-asan
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32652>
2024-12-17 07:44:03 +00:00
Valentine Burley
0615b92c23 radv/ci: Use deqp-vk-main in Raven and Stoney RADV jobs
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32647>
2024-12-17 07:23:03 +00:00
Kevin Chuang
1b55f10105 anv/bvh: Dump BVH synchronously upon command buffer completion
Modified the BVH dumping mechanism to synchronously wait for the command
buffer to complete before saving BVH data to files. This approach is
more robust compared to the previous method of dumping during
acceleration strucutre destruction.

Note: if DEBUG_BVH_ANY is enabled but intel-rt is disabled, we will wait
for nothing.

Signed-off-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32585>
2024-12-16 23:01:11 +00:00
Georg Lehmann
c695043e81 nir/opt_algebraic: optimize min(max(a, b), a)
Foz-DB Navi21:
Totals from 105 (0.13% of 79395) affected shaders:
MaxWaves: 2638 -> 2646 (+0.30%)
Instrs: 76531 -> 75077 (-1.90%)
CodeSize: 413668 -> 406484 (-1.74%)
VGPRs: 4856 -> 4848 (-0.16%)
Latency: 333684 -> 328438 (-1.57%); split: -1.57%, +0.00%
InvThroughput: 80417 -> 78579 (-2.29%)
VClause: 1818 -> 1768 (-2.75%)
SClause: 3028 -> 2964 (-2.11%)
Copies: 4708 -> 4513 (-4.14%); split: -4.50%, +0.36%
PreVGPRs: 3792 -> 3715 (-2.03%); split: -2.08%, +0.05%
VALU: 54734 -> 53528 (-2.20%)
SALU: 6195 -> 6137 (-0.94%)
VMEM: 2363 -> 2313 (-2.12%)
SMEM: 5219 -> 5119 (-1.92%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32634>
2024-12-16 22:29:21 +00:00
Marek Olšák
cdecbee922 radeonsi/gfx12: adjust HiZ/HiS logic
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653>
2024-12-16 21:54:28 +00:00
Marek Olšák
e3cef02c24 radeonsi/gfx12: set DB_RENDER_OVERRIDE based on stencil state
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653>
2024-12-16 21:54:28 +00:00
Marek Olšák
8328e57512 ac/surface/gfx12: enable DCC 256B compressed blocks and reorder modifiers
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653>
2024-12-16 21:54:27 +00:00
Marek Olšák
e6345e2fd3 ac: update SPI_GRP_LAUNCH_GUARANTEE_* register values for gfx12
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32653>
2024-12-16 21:54:27 +00:00
Georg Lehmann
0e6d32777f nir/opt_remove_phis: rematerialize equal alu
Foz-DB Navi31:
Totals from 943 (1.19% of 79395) affected shaders:
MaxWaves: 24672 -> 24722 (+0.20%)
Instrs: 1541665 -> 1544956 (+0.21%); split: -0.23%, +0.44%
CodeSize: 8085180 -> 8109212 (+0.30%); split: -0.16%, +0.46%
VGPRs: 57768 -> 57624 (-0.25%)
Latency: 18043743 -> 17948245 (-0.53%); split: -1.28%, +0.75%
InvThroughput: 2692605 -> 2677049 (-0.58%); split: -2.07%, +1.49%
VClause: 25321 -> 25343 (+0.09%); split: -0.48%, +0.57%
SClause: 38473 -> 38614 (+0.37%); split: -0.00%, +0.37%
Copies: 86089 -> 86236 (+0.17%); split: -0.46%, +0.63%
Branches: 36719 -> 36777 (+0.16%); split: -0.60%, +0.76%
PreSGPRs: 44138 -> 44303 (+0.37%); split: -0.05%, +0.42%
PreVGPRs: 43319 -> 43009 (-0.72%)
VALU: 893684 -> 894272 (+0.07%); split: -0.42%, +0.48%
SALU: 189561 -> 191358 (+0.95%); split: -0.05%, +1.00%
VMEM: 42294 -> 42313 (+0.04%); split: -0.44%, +0.49%
SMEM: 72916 -> 73144 (+0.31%)

Instruction count regressions are largly caused by additional
loop unrolling.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31028>
2024-12-16 20:38:38 +00:00
Aleksi Sapon
c0a0953476 llvmpipe: PointCoord is offset when multisampling is enabled
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32578>
2024-12-16 20:15:59 +00:00
Samuel Pitoiset
dda03a21d6 Revert "radv: fix creating unlinked shaders with ESO when nextStage is 0"
This reverts commit d4ccae739b.

This is actually unnecessary. nextStage=0 means it's the last stage.
Looks like the specification was too vague and we misinterpreted it.

It's going to be clarified and VKCTS will be fixed, see
https://gitlab.khronos.org/vulkan/vulkan/-/issues/4115 for more info.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32629>
2024-12-16 19:31:57 +01:00
Samuel Pitoiset
0943f616d1 radv: report same buffer aligment for DGC preprocessed buffer
It makes sense to report the same alignment.

This fixes new VKCTS coverage.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32626>
2024-12-16 14:53:56 +00:00
Erik Faye-Lund
336e2c90ce docs: add new panvk features
We're not really in the habit of updating new_features.txt for panvk,
but let's get this up to date.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32586>
2024-12-16 15:32:20 +01:00
Erik Faye-Lund
9a8e291d45 panvk: make vk-version helper internal to source
This is no longer needed outside of this single source file, so let's
no longer make it available outside.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32654>
2024-12-16 12:10:50 +00:00
Erik Faye-Lund
42bfbe1a94 panvk: back out of vk 1.1 support
Supporting Vulkan 1.1 was premature, as we don't support subgroup
operations, which are actually required (even if it's not listed in
section "46.1. Feature Requirements"):

Here's the relevant phrasing from the Vulkan 1.1 spec:

> subgroupSupportedOperations will have the VK_SUBGROUP_FEATURE_BASIC_BIT
> bit set if any of the physical device’s queues support
> VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT.

So, it seems we have to support at least the basic feature set before we
can expose Vulkan 1.1. So let's back out of that for now.

Fixes: a6e03ce428 ("panvk: advertise version 1.1 support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32654>
2024-12-16 12:10:50 +00:00
Valentine Burley
da18cd9f9a softpipe/ci: Convert softpipe-asan-gles31 to a deqp-runner suite
Due to the differences in how the caselists are generated, there is
a discrepancy in the failures encountered. Update the expectations
accordingly.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32622>
2024-12-16 11:27:31 +00:00
Valentine Burley
309dc3c43f etnaviv/ci: Convert to deqp-runner suites
Convert gc2000-gles2 and gc7000-gles2 to deqp-runner suites.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32622>
2024-12-16 11:27:31 +00:00
Valentine Burley
b30323d77d lavapipe/ci: Convert lavapipe-vk-asan to a deqp-runner suite
This is a currently disabled job. Convert it to a deqp-runner
suite, but don't enable it yet as it is still broken.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32622>
2024-12-16 11:27:31 +00:00
Juan A. Suarez Romero
fd19106773 broadcom/compiler: fix fp16 conversion operations
The case for converting a 32-bit integer to 16-bit float is not
correctly implemented.

Fixes: 214121e9b0 ("broadcom/compiler: handle fp16 conversion ops")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
8ffdf5a2ab broadcom/compiler: ensure offset source exists
As the lowering is applied on a load uniform intrinsic, there must be an
offset source number.

This fixes CID#1604734 ("Negative array index read") detected by
Coverity Scan.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
15dfcd0db3 v3dv: ensure there is always a perfmon and counter
Helps static analyzer to don't complain about (potential) reading
unitialized values.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
13581b7380 v3dv: free pointers on multisync error
Free pointers if set_multisync() fails.

This fixes several leaks detected by static analyzer.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
f6766ccadb v3dv: fix BO allocation
`cleared_and_retried` variable is not required, as once the cache is
empty, in the second retry it will retry it is already empty so it won't
retry a new allocation.

Fixes: 2adea940f1 ("v3dv/bo: adding a BO cache")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32593>
2024-12-16 10:56:38 +00:00
Juan A. Suarez Romero
cb9650d1a2 v3dv: remove unused assignments
These variables are not used later in the code.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32593>
2024-12-16 10:56:38 +00:00
Erik Faye-Lund
c5c11481dd panvk: only validate the push-sets that we update
We are conditionally updating the push-sets, so we need to also
conditionally clear the dirty-flags here instead of clearing them
wholesale. Otherwise, we end up not updating the descriptors that are
used in subsequent draws, but not in the first one.

Fixes: 79e5146378 ("panvk: Sanitize the driver-internal dirty state tracking")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32630>
2024-12-16 10:16:05 +01:00
Erik Faye-Lund
9531f6375f panvk: fixup bad indent
We use spaces, not tabs.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32630>
2024-12-16 10:16:05 +01:00
You, Min-Hsuan
22ff26a0be amd/vpelib: fix coverity defects
\[WHY\]
The reason for making these changes is to address the defects identified
by the Coverity scan. By fixing these defects, we can ensure that any
future defects generated by our own code changes can be easily
identified and resolved.

\[HOW\]
To implement the changes/fixes, the following steps were taken:

1. CHECKED_RETURN: All cases were aligned to check the return value.
2. DC.WEAK_CRYPTO: The use of rand() to generate random numbers was
replaced with a more secure method using platofrm API.
3. DEADCODE: Useless code that always returned true was removed.
4. DIVIDE_BY_ZERO: A check was added to ensure that the divisor is not
zero before performing division.
5. HFA: An unused header was removed.
6. MISSING_BREAK: A break statement was added in switch cases where it
was missing.
7. PASS_BY_VALUE: Parameters that were being passed by value and were
too big were changed to pass by reference.

\[TESTING\]
What testings have been done (test IDs and json file):

Reviewed-by: Tomson Chang <Tomson.Chang@amd.com>
Signed-off-by: Min-Hsuan You <Min-Hsuan.You@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Koo, Anthony
54c4accdb1 amd/vpelib: Add system event logging
\[WHY\]
System event logs are different than string logging. They are meant to
generate light weight events with ID and variable args and can be
coalesced with events generated by other IP components.

\[HOW\]
Add a callback function, which is implemented by the client (Like PAL)

VPELIB adds defines for a list of possible event IDs

The client is expected to handle the callback
And translate and emit the event through
native system infrastructure like ETW logging.

\[TESTING\]
Tested on system that triggers sys event, and viewed the event through
ETW viewer

Signed-off-by : Anthony Koo <anthony.koo@amd.com>

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Zhao, Jiali
fe58bb70e6 amd/vpelib: 420 and 422 Output Single Segment cositing support
fix the style complaint
add 709 jfif color space handling

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Signed-off-by: Jiali Zhao <Jiali.Zhao@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Visan, Tiberiu
b06ee9074d amd/vpelib: fixed file headers for Palamida scan
\[WHY\]
Some header files in VPE lib did not have the proper copyright header

\[HOW\]
Proper copyrights were put in place

Reviewed-by: Roy Chan <roy.chan@amd.com>
Co-authored-by: Tiberiu Visan <tvisan@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Leder, Brendan Steve
4ef45d8d4e amd/vpelib: Move bg color
Refactor bg gen as it check_bg_support simply calls into other version specific function.
Move that function directly into check_bg_support call, and refactor unnecessary functions + format fix.

Co-authored-by: Brendan <breleder@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32646>
2024-12-16 08:13:40 +00:00
Marek Olšák
3943ed8199 ac/lower_ngg: improve streamout code generation for gfx12/ACO to match LLVM
ACO is still not perfect:
* It generates s_wait_loadcnt 0x0-0x3 when the only required wait instruction
  is s_wait_loadcnt 0x5.
* It generates a lot of unnecessary jumps and blocks for uniform loop breaks.
  Only scc1 jumps are necessary to break the loop. This is 10x better than
  LLVM, but even ACO might consider using nir_intrinsic_ordered_add_loop_gfx12_amd
  for the best performance.

How to print the streamout asm on any GPU:
    PIGLIT_PLATFORM=gbm AMD_FORCE_FAMILY=gfx12_16pipe AMD_DEBUG=vs,mono,asm,useaco ../piglit/bin/shader-io-rate vs_out_xfb

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:07 +00:00
Qiang Yu
d38efee8ef aco: enable gfx12 support for radeonsi
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:07 +00:00
Qiang Yu
129e37bab6 nir: do not generate b2i64 when driver want to lower it
This is found on GFX12 by:
  KHR-GL43.shader_ballot_tests.ShaderBallotBitmasks

ACO does not support it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:07 +00:00
Qiang Yu
12ea316a05 radeonsi: add AMD_FORCE_SHADER_USE_ACO for debug
Narrow down ACO compiler problem to a single shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Qiang Yu
679c450184 util/blake3: add _mesa_blake3_from_printed_string
To convert printed blake3 string back to blake3 hash.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Qiang Yu
0fd99353a6 radeonsi: disable use_gfx12_xfb_intrinsic when use ACO
ACO does not implement nir_ordered_add_loop_gfx12_amd which is for
LLVM only.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Qiang Yu
b14cc34415 ac/surf: add more modifiers to gfx12 supported list
OpenGL will export these modifiers for various sized
textures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Qiang Yu
b3a218d444 ac/surface/tests: support all block sizes
We are going to add more modifiers.

GFX9 has 4K DCC and non-DCC modifiers while others only have
4K non-DCC modifiers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32570>
2024-12-16 07:35:06 +00:00
Caio Oliveira
93dfe504f2 intel/brw: Add SHADER_OPCODE_READ_FROM_CHANNEL and LIVE_CHANNEL
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32412>
2024-12-14 11:38:14 -08:00
Job Noorman
4d04396531 ir3/validate: print file/line info
This makes it much easier to spot where a validation error comes from as
many assert are similar so difficult to grep for.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32623>
2024-12-14 06:05:26 +00:00
Caio Oliveira
d325de316d intel/brw: Add some tests for new Xe2 register regioning restrictions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28636>
2024-12-14 02:15:18 +00:00
Caio Oliveira
f308be16a0 intel/brw: Add validation for some Xe2 register regioning restrictions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28636>
2024-12-14 02:15:18 +00:00
Caio Oliveira
6a5a316312 intel/brw: Extract format enum in EU validation code
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28636>
2024-12-14 02:15:18 +00:00
Caio Oliveira
57b703cec3 intel/brw: Skip some regioning EU validation for Vx1 and VxH modes
Skip the ones that check the VertStride -- which is set to a special
value in those modes.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28636>
2024-12-14 02:15:18 +00:00
Kenneth Graunke
d85d6ad2a5 iris: Tune the BO cache's bucket sizes
With the introduction of the slab allocator, most of our small
allocations now hit that rather than directly hitting the bucket
cache.  Those now show up as 2MB slab allocations from the cache's
perspective.  So, we don't need quite as many buckets.  (Note that
only allocations in IRIS_MEMZONE_OTHER are suballocated today.)

Previously, we had 55 buckets, going from 4KB to 112MB, with sizes
N, N+1/4, N+1/2, N+3/4 for a series of power-of-two N's.

This patch prunes it down to 25 buckets:

   - 4K-4MB => power-of-two sizes only
   - 6MB    => a one-off bucket to reduce waste between 4MB and 8MB
   - 8MB+   => the usual N, N+1/4, N+1/2, N+3/4 system
   - 64MB   => the largest bucket size

In particular, this eliminates the 1.75MB, 2.5MB, 3MB, 3.5MB, and 7MB
buckets in favor of multiples of 2MB.  Allocating multiples of 2MB is
preferable because it allows the kernel to allocate 64KB pages rather
than being stuck using inefficient 4K pages.  And, the amount of waste
from bumping to the next multiple of 2MB isn't huge in that range of
sizes.  We also eliminate buckets larger than 64MB because they're
rarely used, and also the amount of waste from rounding up to the
80/96/112MB buckets can get pretty large.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Fixes: 0b6693a3a1 ("iris: Align fresh BO allocations to 2MB in size")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10219
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32635>
2024-12-13 15:37:09 -08:00
Felix DeGrood
0f46c53b0c anv: Use vfg distribution mode = RR_STRICT for Xe2+
Performance tuning. Round Robin strict faster on Xe2 for some
workloads.

Speedup:
 - Borderlands3-dx11-trace: +4%
 - WolfensteinYoungblood-vk.g6: +1.5%
 - Cyberpunk2077-dx12vk-2160p-ultra: +0.5%

Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32566>
2024-12-13 19:15:48 +00:00
Felix DeGrood
260f3b4444 iris: Use vfg distribution mode = RR_STRICT for Xe2+
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32566>
2024-12-13 19:15:48 +00:00
Deborah Brouwer
3bddf77f61 ci: separate python tests and artifacts
Currently the python-test job runs pytest and then creates python
related artifacts for use by other jobs. But the python-test job isn't
triggered by changes to the python scripts and libraries. Instead, changes
to python scripts and libraries can currently be merged without running
pytest and, if they do generate errors, they will only appear in ci
later when trying to generate the python artifacts.

Add pytest to the existing linting jobs and expand the rules so that it
will be triggered by changes to python scripts and libraries. Remove
pytest from the job that creates artifacts. This will ensure that the
artifacts are still valid while catching script/library errors before they
are merged.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32340>
2024-12-13 10:04:03 -08:00
Deborah Brouwer
90cb87e918 ci: yaml-toml-shell-test: use pyutils container
Currently the yaml-toml-shell-test extends the python-test job to make
use of the python packages available there. But the python-test also
generates artifacts which yaml-toml-shell-test does not need to do.

Instead of extending the python-test job, avoid extra work by just using
the pyutils container directly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32340>
2024-12-13 10:04:03 -08:00
Deborah Brouwer
b6435207ab ci: python-test rename artifacts
The current python-test job creates and compresses python related
artifacts for use by future jobs. The artifacts are currently named
`mesa-python-test` which is somewhat misleading because they are not
needed for testing python scripts or libraries.

Rename the artifacts generated by the python-test job to be more
descriptive of their purpose.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32340>
2024-12-13 10:04:03 -08:00
Deborah Brouwer
dca6310182 ci: debian/x86_64_pyutils remove redundant rules
The debian/x86_64_pyutils job incorporates references to rules from the
python-test and .container jobs, but currently these jobs don't have any
express rules. The .container job does extend jobs that have rules, but
these same rules are already included in debian/x86_64 because it
extends the .debian-container job.

Remove these empty rule references to make debian/x86_64_pyutils more
readable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32340>
2024-12-13 10:04:03 -08:00
Marek Olšák
c7366985e5 r600: fix a constant buffer memory leak for u_blitter
Fixes: 3d6e44fd - r300,r600,svga: save the FS constant buffer for u_blitter to fix a regression
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12131

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32594>
2024-12-13 16:58:38 +00:00
David Rosca
4ec3f6a0db frontends/va: Stop converting formats in Put/GetImage
This should not do any conversions and instead return error when image
and surface formats don't match.
There was also special case for I420 fourcc which would swap the order
of U/V planes and because of this the plane order of IYUV format was
incorrectly set to YVU in vl_video_buffer.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32605>
2024-12-13 16:19:39 +00:00
David Rosca
df8ee11dc6 gallium/vl: Fix plane order for IYUV format
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32605>
2024-12-13 16:19:39 +00:00
David Rosca
8a20e634ce gallium/vl: Add plane order for Y8_400 format
Also add assert for unhandled format and remove assert for number of
components.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32605>
2024-12-13 16:19:39 +00:00
David Rosca
2ed862c2fe radeonsi/vpe: Silence expected errors with unsupported output format
YUV formats are currently unsupported for output, so we should not
print any errors in case application uses YUV output format.
There is a shader fallback that will be correctly used in this case.
Don't print any vpelib errors unless AMDGPU_SIVPE_LOG_LEVEL is set.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12263
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32543>
2024-12-13 15:53:48 +00:00
Karol Herbst
a2339542f5 rusticl/util: fix duplicate key detection in Properties::new
We only need to check if the key exist, not the key as a value.

Fixes: efab5cab9f ("rusticl/util: reimplement Properties over Vec of scalars")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32621>
2024-12-13 14:24:03 +00:00
Samuel Pitoiset
1291981ebd radv: mark HAWAII (GFX7) as Vulkan 1.3 conformant
https://www.khronos.org/conformance/adopters/conformant-products#submission_848

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32620>
2024-12-13 13:32:38 +00:00
Christian Gmeiner
fb67ad890a docs: Update perfetto with the latest status
v3d supports PPS counters.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
ea0784dfb8 perfetto: Add v3d data sources to gpu.cfg
Just like for msm and i915, so it works out-of-the-box.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
e6d83f1947 perfetto: Add v3d data sources to system.cfg
Just like for msm and i915, so it works out-of-the-box.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
27771b4d55 pps: Add support for v3d ds
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
3d2d3b2c10 broadcom: Add perfetto data source
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Christian Gmeiner
27fb3c549a v3d: Sync v3d_drm.h with drm-misc-next
This pulls in changes based on 8a4b913df427 ("drm/log: Add integer scaling support")
and brings support for the perfmon set global ioctl(..).

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31751>
2024-12-13 12:29:11 +00:00
Valentine Burley
f456642501 turnip/ci: Ony increase hangcheck timer for spilling tests on a630
This also allows deleting the baremetal-deqp-test-freedreno-vk
definition.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
2b67da4cea freedreno/ci: Drop redundant DEQP_VER
DEQP_VER isn't used with deqp-runner suites.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
cea8bafd59 turnip/ci: Update expectations
Decreasing the fractions uncovered some new flakes and fails.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
61a9ab27f3 turnip/ci: Remove a630-vk-asan skip
Memory leak detection is currently disabled in the a630-vk-asan
suite, so there's no point in skipping these tests.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
31ac69aebd turnip/ci: Adjust some timeouts
Reduce the timeouts for full runs. These values are still quite
conservative.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
3602e03428 turnip/ci: Decrease fraction for a630-vk-asan
Not related to the tests_per_group changes, but this has been has
been taking approximately 4 minutes, leaving us some space to run
more tests.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
0fb55f7697 turnip/ci: Bump the number of tests per group for a660
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
69aa988eca turnip/ci: Bump the number of tests per group for a630
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
36de4c8fb9 turnip/ci: Bump the number of tests per group for a618
Due to the slow startup time of deqp-vk, the previous default of
500 tests per group caused the jobs to run up to twice as slowly
compared to using a higher number of tests per group.

Increase the number of tests per group for all subsets of the
deqp-runner suites, which allows decreasing the fractions.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32588>
2024-12-13 10:15:32 +00:00
Valentine Burley
680885d57e radv/ci: Convert Valve RADV jobs to deqp-runner suites
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32558>
2024-12-13 09:36:08 +00:00
Erik Faye-Lund
cae4c57b7a panvk/ci: add a few more g52 skips
When I last updated this, some of the jobs had too many tests that took
over 30 seconds to show them all in the output. So I only added the
longest ones. Here's the rest, and with this the skip-list seems correct
for now.

Note that there's a few tests that takes close to 30 seconds, so they
might end up getting pushed across the limit from time to time as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32603>
2024-12-13 08:35:04 +00:00
Erik Faye-Lund
ff9f4640c2 panvk/ci: fixup g52 skip sorting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32603>
2024-12-13 08:35:04 +00:00
Erik Faye-Lund
cbaf3c4849 panvk/ci: correct timeouts as crash
While these timeout when I run them locally,
MESA_VK_ABORT_ON_DEVICE_LOSS ends up turning them into crashes on the
CI. Correct this, so we don't accidentally fail the full job here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32603>
2024-12-13 08:35:04 +00:00
Sagar Ghuge
d3f9139e49 intel: Use Morton compute walk order
According to HSD 14016252163 if compute shader uses the sample
operation, morton walk order and set the thread group batch size to 4 is
expected to increase sampler cache hit rates by increasing sample
address locality within a subslice.

Rework:
 * Caio: "||" => "&&" for type checking in instr_uses_sampler()
 * Jordan: Use nir's foreach macros rather than
   nir_shader_lower_instructions()

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32430>
2024-12-12 19:56:47 -08:00
Sagar Ghuge
4bd958243d intel/genxml: Update COMPUTE_WALKER_BODY
For PTL, we can have one more additional walk order along with the
"Thread Group Batch Size" field.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32430>
2024-12-12 19:56:47 -08:00
Sagar Ghuge
41eda955af intel/genxml: Drop morton walk field from Xe2
Looks like this one got added accidently for Xe2. Xe2 doesn't support
Morton dispatch walk order.

Thanks to Rohan for bringing up this during review.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32430>
2024-12-12 19:56:47 -08:00
Caio Oliveira
0af8133f09 intel/executor: Add example using scalar register and send gather
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32236>
2024-12-13 02:18:15 +00:00
Caio Oliveira
5420c027e6 intel/brw: Add validation for ARF scalar register
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32236>
2024-12-13 02:18:15 +00:00
Caio Oliveira
f8c7348468 intel/brw: Add assembly support for ARF scalar register
And the SEND gather variant that uses a scalar register as its only
source.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32236>
2024-12-13 02:18:15 +00:00
Caio Oliveira
46e9fe6981 intel/brw: Add TGL_PIPE_SCALAR value
Add the enum value for the (in-order) scalar pipe.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32236>
2024-12-13 02:18:15 +00:00
Caio Oliveira
7acd84da51 intel/brw: Consider if SEND is gather variant when setting ex_desc
SEND instructions of gather variant will use the upcoming ARF scalar
register.  They use only Src0 and reuse the bits of Src1.Length (part of
ex_desc).  Src1.Length is (implicitly) defined as 0.

Adapt the helper functions to take the new variant into account when
manipulating ex_desc.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32236>
2024-12-13 02:18:15 +00:00
Friedrich Vock
0c02a7e8e8 radv/rt: Remove nir_intrinsic_execute_callable instrs in monolithic mode
It's allowed to place OpExecuteCallableKHR in a SPIR-V, even if the RT
pipeline doesn't contain any callable shaders. Unreal hits this case and
crashes. We can assume the intrinsic never gets executed, so we can
simply remove it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32613>
2024-12-13 01:50:58 +00:00
Ian Romanick
1b1003ca6f brw/algebraic: Pull brw_constant_fold_instruction out of the switch statement
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
f0bf68dd25 brw/const: Remove TODO that isn't allowed by the hardware
There are a lot of restrictions for bfloat16. The one that prevents this
very useful optimization from being possible is, "Broadcast of bfloat16
scalar is not supported."

Part of the reason this MR exists is to build up to implementing BF
support, and there are a couple more commits that implement
this. However, it fails on both real hardware and simulation:

    Instruction is: mad (8|M0) r6.0<1>:f 0xBF80:bf r2.0<8;1>:f r64.0<0>:f

    In bfloat/float mixed mode, bfloat src must be packed.

Alas.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
99d3755bdd brw/const: Allow HF constants in MAD on Gfx11
These can't mix with F values, but if the non-constant sources are
already HF, this is allowed in src0.

No shader-db changes on any Intel platform.

fossil-db:

Ice Lake
Totals:
Instrs: 236027458 -> 236027442 (-0.00%)
Cycle count: 24515944704 -> 24515945379 (+0.00%)

Totals from 8 (0.00% of 798454) affected shaders:
Instrs: 10226 -> 10210 (-0.16%)
Cycle count: 58567 -> 59242 (+1.15%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
4c462b6b32 brw/const: Allow constants in integer MAD
Nothing can generate this currently, but a future commit will.

The Bspec and experimentation support the following limitations:

- Gfx11: Either src0 or src2 can be W or UW.
- Gfx12: Either src0 or src2 can be W or UW.
- Gfx12.5: Both src0 and src2 can be W or UW.
- Gfx20: Both src0 and src2 can be W or UW.

v2: Add missing break statement.

v3: Leave the MAD handling in the case with the other 3 source
instructions. Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
9fa6b68f9e brw/const: Refactor checking whether an immediate source is allowed
Should be no functional change here. This simplifies some later changes.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
69d74739fd brw/algebraic: Don't restrict MAD(a, b, 1) optimization to float32
This is very unlikely for floating point MAD. At some point I intend
to add internal integer MAD uses, and this could occur there.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
b605f76b2a brw/algebraic: Constant fold multiplicands of MAD
v2: Move the full constant folding part to
brw_constant_fold_instruction. Suggested by Caio. I did this by
extracting the core part of the folding to a helper function.

v3: Delete stale comment. Noticed by Caio.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 18090847 -> 18090843 (<.01%)
instructions in affected programs: 150 -> 146 (-2.67%)
helped: 1 / HURT: 0

total cycles in shared programs: 919664648 -> 919663210 (<.01%)
cycles in affected programs: 3426 -> 1988 (-41.97%)
helped: 1 / HURT: 0

LOST:   1
GAINED: 0

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 220496486 -> 220496403 (-0.00%)
Cycle count: 31610880908 -> 31610879044 (-0.00%); split: -0.00%, +0.00%

Totals from 70 (0.01% of 702439) affected shaders:
Instrs: 47018 -> 46935 (-0.18%)
Cycle count: 6335504 -> 6333640 (-0.03%); split: -0.11%, +0.09%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
3a16ad71b7 brw/copy: Commute immediates for MAD multiplicands
This enables constant combining to do its job.

v2: Restore accidentally deleted line from a comment. Noticed by Caio.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total cycles in shared programs: 919668392 -> 919669310 (<.01%)
cycles in affected programs: 10125264 -> 10126182 (<.01%)
helped: 348 / HURT: 194

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Cycle count: 31610720660 -> 31610692748 (-0.00%); split: -0.00%, +0.00%

Totals from 9066 (1.29% of 702433) affected shaders:
Cycle count: 810411934 -> 810384022 (-0.00%); split: -0.01%, +0.00%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
e3e58d6f48 brw: Emit immediate value for MAD in canonical position
No shader-db changes on any Intel platform.

fossil-db:

Meteor Lake, DG2, Tiger Lake, and Ice Lake had similar results. (Meteor Lake shown)
Totals:
Cycle count: 25096109024 -> 25096108722 (-0.00%); split: -0.00%, +0.00%

Totals from 4106 (0.51% of 797610) affected shaders:
Cycle count: 63266176 -> 63265874 (-0.00%); split: -0.01%, +0.01%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
d9b019b683 brw/copy: Don't try to be clever about ADD3 constant propagation
Always propagate into any source. Let commute_immedates and constant
combining sort out the mess. It's literally their job.

No shader-db changes on any Intel platform. The fossil-db changes just
appear to be subtle changes in register allocation if the immediate
source changes from src0 to src2.

v2: Update the comment in commute_immediates. Suggested by Caio.

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Cycle count: 31610720510 -> 31610720660 (+0.00%); split: -0.00%, +0.00%

Totals from 8 (0.00% of 702433) affected shaders:
Cycle count: 5522382 -> 5522532 (+0.00%); split: -0.00%, +0.00%

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
a84e3a0f55 brw/const: Allow mixing signed and unsigned immediate sources
No shader-db or fossil-db changes on any Intel platform. This commit
just prevents issues with a later commit, "brw/copy: Don't try to be
clever about ADD3 constant propagation."

v2: Use 'can_promote = true; break;' instead of 'return
true;'. Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
a738c55d7b brw/algebraic: Partial constant folding of ADD3
Fold the cases where one of the sources is zero or two of the sources
are constants. Both case will result in a regular ADD.

No shader-db or fossil-db changes on any Intel platform. This commit
just prevents issues with a later commit, "brw/copy: Don't try to be
clever about ADD3 constant propagation."

v2: Move the full constant folding part to
brw_constant_fold_instruction. Suggested by Caio.

v3: Eliminate the impossible src.file == BAD_FILE case in
brw_fs_opt_algebraic. Suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
c52ce6157f brw/emit: Fix typo in recently added ADD3 assertion
The current assertion fails as soon as a MAD with src0 and src2 being
immediate is detected.

The assertion was supposted to catch, "If it's ADD3, only one of src0
and src2 can be immediate." The detect this, the opcode test should have
been !=.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: c1c09e3c4a ("brw/emit: Add correct 3-source instruction assertions for each platform")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
25de9dcd76 brw/algebraic: Fix MUL constant folding
Some callers of brw_constant_fold_instruction depend on the result being
a MOV of immediate when progress is made. Previously `MUL dst:D src0:D
1:D` would be converted to `MOV dst:D src0:D`. There was also no
handling for `MUL dst:D imm0:D imm1:D`.

This could cause problems if one of the immedate values was -1. The
existing code would convert this to a `MOV dst:D imm0:D` and set the
negate flag on src0. That is not correct.

v2: Fix the is_negative_one case handling of the non-negative-one
source. Add a comment explaining the assertion. Both suggested by Caio.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: 2cc1575a31 ("brw/algebraic: Refactor constant folding out of brw_fs_opt_algebraic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
Ian Romanick
086e83ccd9 brw/algebraic: Fix ADD constant folding
Some callers of brw_constant_fold_instruction depend on the result being
a MOV of immediate when progress is made. Previously `ADD dst:D src0:D
0:D` would be converted to `MOV dst:D src0:D`. There was also no
handling for `ADD dst:D imm0:D imm1:D`.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: 2cc1575a31 ("brw/algebraic: Refactor constant folding out of brw_fs_opt_algebraic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32436>
2024-12-13 01:24:26 +00:00
duncan.hopkins
191d7c6cb6 kopper: Add '#if' guard around loader_dri3_get_pixmap_buffer to stop missing symbol on MacOS.
MacOS does not support DRI3.

Reviewed-By: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32568>
2024-12-13 00:39:16 +00:00
duncan.hopkins
568a4ca899 glx: ignore zink check for has_explicit_modifiers and DRI3 on MacOS.
MacOS has neither of these so always fails to start up zink.

Reviewed-By: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32568>
2024-12-13 00:39:16 +00:00
duncan.hopkins
e89eba0796 glx: change #if guard around dri_common.h to stop missing 'driDestroyConfigs' symbol on MacOS builds.
Reviewed-By: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32568>
2024-12-13 00:39:16 +00:00
Caio Oliveira
c8f6d8154f intel/brw: Remove overloads for brw_print_instruction/s functions
Almost all cases now handled with default arguments.  The only real
extra work that was being done was pushed to the client code in
debug_optimizer().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32596>
2024-12-12 22:01:48 +00:00
Alyssa Rosenzweig
41076b2a55 radeonsi: use mesa_prim_has_adjacency
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
b7f2d480da agx: optimize scratch access
so we can use designated initializers and other fun features.

all affected shaders are in gfxbench:

total instructions in shared programs: 2750549 -> 2750497 (<.01%)
instructions in affected programs: 10832 -> 10780 (-0.48%)
helped: 4
HURT: 2
Inconclusive result (value mean confidence interval includes 0).

total alu in shared programs: 2278478 -> 2278760 (0.01%)
alu in affected programs: 7040 -> 7322 (4.01%)
helped: 2
HURT: 4
Alu are HURT.

total fscib in shared programs: 2276985 -> 2277267 (0.01%)
fscib in affected programs: 7040 -> 7322 (4.01%)
helped: 2
HURT: 4
Fscib are HURT.

total bytes in shared programs: 19922466 -> 19922734 (<.01%)
bytes in affected programs: 71412 -> 71680 (0.38%)
helped: 4
HURT: 2
Inconclusive result (value mean confidence interval includes 0).

total regs in shared programs: 865070 -> 865086 (<.01%)
regs in affected programs: 142 -> 158 (11.27%)
helped: 0
HURT: 2

total uniforms in shared programs: 2120930 -> 2121034 (<.01%)
uniforms in affected programs: 244 -> 348 (42.62%)
helped: 0
HURT: 2

total scratch in shared programs: 11576 -> 11600 (0.21%)
scratch in affected programs: 2744 -> 2768 (0.87%)
helped: 0
HURT: 2

total spills in shared programs: 958 -> 868 (-9.39%)
spills in affected programs: 958 -> 868 (-9.39%)
helped: 6
HURT: 0

total fills in shared programs: 732 -> 626 (-14.48%)
fills in affected programs: 732 -> 626 (-14.48%)
helped: 4
HURT: 2

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
923e6361d1 compiler/glsl_types: add glsl_get_word_size_align_bytes
this alignment matches what nir_lower_scratch_to_var wants. this is not
correctness bearing but it mitigates stats regressions.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
bd89279dd4 nir: add lower_scratch_to_var pass
to ease opencl pain.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
d5a4aa756f asahi: use mesa_prim_has_adjacency
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:13 +00:00
Alyssa Rosenzweig
8abb043c19 compiler: add mesa_prim_has_adjacency helper
hk will use this, it's a pretty obvious thing to want.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
e4f61771d8 compiler: use libcl.h for CL
instead of redefining BITFIELD_BIT.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
d695c84829 libagx: port to common libcl.h
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
a0694fd5c3 libagx: drop pointless helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
c34635c58d agx: implement halts
just translate to a stop. seems to work fine.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
21c16fe343 asahi,hk: wire up printf, abort
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Lionel Landwerlin
36623697d1 hk: fix timeline value type
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
dd4805fcc8 asahi/clc: remap __FILE__
important for reproducability. wondering if we can do this in common code but
not sure how yet.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
bfe1fd737b asahi: allow c23 extensions
hk already does. this quiesches warnings with single argument static_assert
which we want for CL parity.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
13a4186c96 util/bitpack_helpers: make partially CL safe
add enough preprocessor guards that we can include this from CL and get basic
implementations of things. FIXED packs are missing due to llroundf (probably
fixable).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
d64caf4161 libcl: add VkDraw(Indexed)IndirectCommand definitions
this is helpful to indirect draw munging code, which applies to at least 3
stacks using driver CL stuff (current Intel, shortterm Asahi, mediumterm
Panfrost)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
12e27497b3 libcl: add a common header for CPU/GPU stuff
In an attempt to make OpenCL shaders more "batteries included", start building
up a standard library. Based on libagx.h.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Alyssa Rosenzweig
13b8af95fb clc: plumb cl_khr_subgroup_ballot
although rusticl isn't lighting it up yet, it's helpful to get
sub_group_ballot for driver CL, which is all standard Vulkan-compatible spirv.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32529>
2024-12-12 21:16:12 +00:00
Paulo Zanoni
d4a54d4f92 brw: don't read past the end of old_src buffer in resize_sources()
In this case, num_sources is bigger than this->sources, so if we loop
up to num_sources (instead of this->sources) we'll end up reading past
the end of old_src[]. Only copy up to what we originally had.

This was found by code inspection, I'm not aware of any applications
failing due to the lack of this patch.

Fixes: d9e737212d ("intel/brw: Add a src array for the common case in fs_inst")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32600>
2024-12-12 20:33:13 +00:00
Samuel Pitoiset
c7a7f0244f radv: add radv_lower_terminate_to_discard and enable for Indiana Jones
To workaround game bug.

This fixes the rendering issue with eyes.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32606>
2024-12-12 19:54:39 +00:00
Samuel Pitoiset
4d4418dbb3 spirv: add an options to lower SpvOpTerminateInvocation to OpKill
To workaround game bugs like Indiana Jones.

Original workaround found by Hans-Kristian.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32606>
2024-12-12 19:54:39 +00:00
Erik Faye-Lund
976eb6825e panvk: do not require opt-in for panvk on v10
As of writing, PanVK on v10 HW is in pretty good shape. It's not yet
conformant, but we were passing over 99.9% of the CTS last time I
checked. That's probably good enough to drop the opt-in here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32561>
2024-12-12 19:32:06 +00:00
Erik Faye-Lund
12067727fa panvk: soften the language around opt-in
We already have and use vk_warn_non_conformant_implementation(), so
we're already being clear that PanVK is not yet conformant. Let's not
repeat that information here, and instead focus on it not being
well-tested.

This brings the wording more or less in-line with NVK.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32561>
2024-12-12 19:32:06 +00:00
Timur Kristóf
deab81fb0d radv: Configure implicit VS primitive ID to be per-primitive.
This is beneficial to applications that rely on
the implicit primitive ID from VS.

- We don't have to disable provoking vertex reuse,
  which results in more efficient vertex processing.
- There is no LDS access needed to export the primitive ID,
  because it is already available to GS threads.
- As a consequence of not needing LDS, we can use this
  together with NGG passthrough mode.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32270>
2024-12-12 18:11:47 +00:00
Timur Kristóf
95ac0f8d76 radv: Reorder FS primitive ID input after layer and viewport.
We want to make the implicit VS primitive ID a per-primitive
output attribute, which means that this has to be last.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32270>
2024-12-12 18:11:47 +00:00
Timur Kristóf
9224b9a752 ac/nir/ngg: Add ability to store primitive ID as per-primitive.
This configuration will be enabled in RADV in a subsequent commit.

On GFX10.3:
Do this together with the primitive export, to avoid adding extra
CF, and to ensure optimal access of the export space.

On GFX11:
It's not an export but a memory store instruction, so always do
it earlier and ensure the optimal attribute ring access pattern.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32270>
2024-12-12 18:11:45 +00:00
Timur Kristóf
d670dc0c0b radv: Only set NGG_DISABLE_PROVOK_REUSE for VS.
It doesn't do anything useful for other stages.

In VS, we use this when the implicit primitive ID is needed,
so that we can export that as a per-vertex attribute of the
provoking vertex.

In TES, the patch ID (which is used as the primitive ID) is
already a per-vertex input VGPR, so it doesn't make sense to
configure this.

In GS, the primitive ID is explicitly written by the shader,
so it makes no sense to disable provoking vertex reuse in the
input.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32270>
2024-12-12 18:11:45 +00:00
Rhys Perry
9fe92689cc radv: increase maxComputeWorkGroupCount[0]
Match AMDVLK and radeonsi.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32577>
2024-12-12 17:38:47 +00:00
Rhys Perry
53d0187bab aco: decrease max_workgroup_size
Match the limit of radeonsi and RADV.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32577>
2024-12-12 17:38:46 +00:00
Rhys Perry
87f2f77960 aco: fix max_workgroup_count[0]
This is necessary for radeonsi.

fossil-db (navi21):
Totals from 292 (0.37% of 79395) affected shaders:
Instrs: 305965 -> 306182 (+0.07%); split: -0.00%, +0.07%
CodeSize: 1624816 -> 1627212 (+0.15%); split: -0.00%, +0.15%
Latency: 5244652 -> 5243587 (-0.02%); split: -0.07%, +0.05%
InvThroughput: 1221089 -> 1225285 (+0.34%); split: -0.04%, +0.38%
Copies: 22712 -> 22702 (-0.04%)
PreSGPRs: 10713 -> 10712 (-0.01%)
PreVGPRs: 10918 -> 10920 (+0.02%)
VALU: 178613 -> 178836 (+0.12%)
SALU: 43490 -> 43493 (+0.01%); split: -0.02%, +0.03%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32577>
2024-12-12 17:38:46 +00:00
Lionel Landwerlin
e0b5179869 blorp: use 2D dimension for 1D tiled images
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 31eeb72e45 ("blorp: Add support for blorp_copy via XY_BLOCK_COPY_BLT")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32608>
2024-12-12 17:10:45 +00:00
Erik Faye-Lund
cfb5687cb3 panvk: disable imageCubeArray on bifrost
We haven't wired this up correctly on Bifrost, so let's make this V10
only for now.

Fixes: 605c173fbd ("panvk: update feature support")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32610>
2024-12-12 15:10:26 +00:00
Erik Faye-Lund
1766e676fe panvk: do not expose subgroup support
We don't currently support it in the compiler, so we shouldn't claim
support for it either.

Fixes: a6e03ce428 ("panvk: advertise version 1.1 support")
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32604>
2024-12-12 14:50:25 +00:00
Hans-Kristian Arntzen
e815d6523c radv: Add radv_invariant_geom=true for Indiana Jones.
Water puddles expect invariant position, but does not declare such in
the vertex shaders, leading to random glitches.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32607>
2024-12-12 13:54:27 +00:00
Eric R. Smith
f8bc6c8663 panfrost: fix potential memory leak
In the very unlikely case that the packed AFBC image will not
save (enough) memory, we abort packing. In this case we should
free the BO associated with the metadata.

Fixes: 5a928f7563 ("panfrost: Add env variable for max AFBC packing ratio")
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32597>
2024-12-12 13:08:28 +00:00
Eric R. Smith
b59e73e426 panfrost: fix read/write resource confusion in afbc_pack
We read the source rather than write it, due to a typo we were
not setting this correctly though.

Fixes: bc55d150a9 ("panfrost: Add support for AFBC packing")
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32597>
2024-12-12 13:08:28 +00:00
Christian Gmeiner
2ebd5fb978 etnaviv: rs: Add DBG(..) why blt usage was not possible
Can be helpful to debug issues.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32592>
2024-12-12 12:52:37 +00:00
Christian Gmeiner
faf562651a etnaviv: blt: Add DBG(..) why blt usage was not possible
Can be helpful to debug issues.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32592>
2024-12-12 12:52:37 +00:00
Konstantin
815ca049cd vulkan: Fix the argument order of update_as
Also moves the src argument before dst which is more consistent.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32488>
2024-12-12 11:15:08 +00:00
Valentine Burley
3bff52da4e ci: Drop lava-piglit:(x86_64|arm64) definitions
As part of the migration to deqp-runner suites, remove these
definitions to prevent the introduction of additional piglit
jobs without test suites.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32461>
2024-12-12 10:35:41 +00:00
Valentine Burley
8e54b77910 panfrost/ci: Convert to deqp-runner suite
Convert the panfrost-g52-piglit-gles2:arm64 job to a deqp-runner
suite.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32461>
2024-12-12 10:35:41 +00:00
Valentine Burley
ca7df52af8 svga/ci: Convert to deqp-runner suite
Convert the vmware-vmx-piglit:x86_64 job to a deqp-runner suite.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32461>
2024-12-12 10:35:40 +00:00
Samuel Pitoiset
370886c898 Revert "radv: disable alphaToOne except for Zink"
This reverts commit 3b010a9e60.

This should be fixed properly now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32583>
2024-12-12 10:07:25 +00:00
Samuel Pitoiset
c3a050da07 radv: fix alpha-to-coverage with alpha-to-one without MRTZ
This injects a MRTZ export with only the alpha channel to select it
with COVERAGE_TO_MASK_ENABLE for alpha-to-coverage.

Co-Authored-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32583>
2024-12-12 10:07:25 +00:00
Samuel Pitoiset
838b1cfcbd radv: simplify determining some fragment shader info with epilogs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32583>
2024-12-12 10:07:25 +00:00
Collabora's Gfx CI Team
8085984aa2 Uprev Piglit to 4c0fd15fd956ec70c5509bedee219d602b334464
468221c722...4c0fd15fd9

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32478>
2024-12-12 09:33:59 +00:00
Samuel Pitoiset
4d1aa9a2d0 radv: fix disabling DCC for stores with drirc
Displayable DCC should also be disabled, otherwise it's asserting
somewhere in ac_surface.c

Fixes: e3d1f27b31 ("radv: add radv_disable_dcc_stores and enable for Indiana Jones: The Great Circle")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32584>
2024-12-12 09:11:37 +00:00
Daniel Schürmann
26a3038b65 aco/lower_branches: remove edges between blocks if there is no direct branch
This way, linear predecessors and successors better reflect the
actual control flow which improves wait state insertion and hazard
mitigation.

Totals from 10252 (12.91% of 79395) affected shaders: (Navi31)

Instrs: 18824540 -> 18803823 (-0.11%); split: -0.11%, +0.00%
CodeSize: 99025464 -> 98942028 (-0.08%); split: -0.08%, +0.00%
Latency: 169291854 -> 165781877 (-2.07%); split: -2.07%, +0.00%
InvThroughput: 29701086 -> 29228602 (-1.59%); split: -1.59%, +0.00%
SClause: 510587 -> 510586 (-0.00%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32389>
2024-12-12 08:46:22 +00:00
Daniel Schürmann
22ffe72022 aco: move branch lowering optimization into separate file 'aco_lower_branches.cpp'
No fossil changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32389>
2024-12-12 08:46:22 +00:00
Friedrich Vock
845660f2b7 aco/lower_to_hw_instr: Check the right instruction's opcode
instr is the branch instruction, its opcode won't ever be writelane. We
should check inst instead.

Found by inspection.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32389>
2024-12-12 08:46:21 +00:00
Daniel Schürmann
28ab7f0168 aco/jump_threading: remove branch sequence optimization
This optimization gets applied during postRA optimization, now.

No fossil changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32330>
2024-12-12 08:11:22 +00:00
Daniel Schürmann
fcd94a8ca7 aco: move try_optimize_branching_sequence() to postRA optimizations
Totals from 196 (0.25% of 79206) affected shaders: (Navi31)

Instrs: 534343 -> 534438 (+0.02%); split: -0.00%, +0.02%
CodeSize: 2774852 -> 2775420 (+0.02%); split: -0.00%, +0.02%
Latency: 7103512 -> 7103021 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 959477 -> 959447 (-0.00%)
Copies: 42646 -> 42648 (+0.00%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32330>
2024-12-12 08:11:21 +00:00
Daniel Schürmann
95d44c7ce0 aco/optimizer_postRA: set branch()->never_taken if exec is constant non-zero
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32330>
2024-12-12 08:11:21 +00:00
Daniel Schürmann
d67932f69e aco/print_ir: don't print disconnected empty blocks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32330>
2024-12-12 08:11:21 +00:00
Lionel Landwerlin
2bb98a8f99 anv: document UBO descriptor range alignments
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32347>
2024-12-12 07:35:18 +00:00
Lionel Landwerlin
99bb2a087a intel/decoder: fix COMPUTE_WALKER handling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 17096f87 ("intel: Switch to COMPUTE_WALKER_BODY")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32347>
2024-12-12 07:35:18 +00:00
Kenneth Graunke
6341b3cd87 brw: Combine convergent texture buffer fetches into fewer loads
Borderlands 3 (both DX11 and DX12 renderers) have a common pattern
across many shaders:

  con 32x4 %510 = (uint32)txf %2 (handle), %1191 (0x10) (coord), %1 (0x0) (lod), 0 (texture)
  con 32x4 %512 = (uint32)txf %2 (handle), %1511 (0x11) (coord), %1 (0x0) (lod), 0 (texture)
  ...
  con 32x4 %550 = (uint32)txf %2 (handle), %1549 (0x25) (coord), %1 (0x0) (lod), 0 (texture)
  con 32x4 %552 = (uint32)txf %2 (handle), %1551 (0x26) (coord), %1 (0x0) (lod), 0 (texture)

A single basic block contains piles of texelFetches from a 1D buffer
texture, with constant coordinates.  In most cases, only the .x channel
of the result is read.  So we have something on the order of 28 sampler
messages, each asking for...a single uint32_t scalar value.  Because our
sampler doesn't have any support for convergent block loads (like the
untyped LSC transpose messages for SSBOs)...this means we were emitting
SIMD8/16 (or SIMD16/32 on Xe2) sampler messages for every single scalar,
replicating what's effectively a SIMD1 value to the entire register.
This is hugely wasteful, both in terms of register pressure, and also in
back-and-forth sending and receiving memory messages.

The good news is we can take advantage of our explicit SIMD model to
handle this more efficiently.  This patch adds a new optimization pass
that detects a series of SHADER_OPCODE_TXF_LOGICAL, in the same basic
block, with constant offsets, from the same texture.  It constructs a
new divergent coordinate where each channel is one of the constants
(i.e <10, 11, 12, ..., 26> in the above example).  It issues a new
NoMask divergent texel fetch which loads N useful channels in one go,
and replaces the rest with expansion MOVs that splat the SIMD1 result
back to the full SIMD width.  (These get copy propagated away.)

We can pick the SIMD size of the load independently of the native shader
width as well.  On Xe2, those 28 convergent loads become a single SIMD32
ld message.  On earlier hardware, we use 2 SIMD16 messages.  Or we can
use a smaller size when there aren't many to combine.

In fossil-db, this cuts 27% of send messages in affected shaders, 3-6%
of cycles, 2-3% of instructions, and 8-12% of live registers.  On A770,
this improves performance of Borderlands 3 by roughly 2.5-3.5%.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32573>
2024-12-12 00:05:42 +00:00
Daniel Schürmann
22881712c8 aco/assembler: Don't emit target basic block index when chaining branches
This could erroneously cause an assertion to fail if the
target block index was larger than UINT16_MAX.

Fixes: cab5639a09 ('aco/assembler: chain branches instead of emitting long jumps')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32599>
2024-12-11 23:28:55 +00:00
Erik Faye-Lund
445ff2e500 panvk/ci: update g52-vk-full job
On a single runner, this job currently times out due to taking over 5
hours. The estimate from dEQP runner itself suggests a full run might
take over 8 hours with the current configuration. We can't really work
with that long runs, even if they are manual.

We currently have 7 vim3 runners, so we can actually afford to
parallelize the run a bit, to make this a bit more manageable. If we
choose 4, we take up a bit more than half of the runners, but we leave
two runners (plus a spare) for the pre-merge CI.

With this, a each job takes about 2.5 hours. We leave the timeout at 3
hours for now, to have some headroom for new tests being enabled.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32591>
2024-12-11 20:19:43 +00:00
Erik Faye-Lund
bdbcd7c7e0 panvk/ci: update g52 results
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32591>
2024-12-11 20:19:43 +00:00
Erik Faye-Lund
8b969d7897 panvk/ci: remove duplicate skips
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32591>
2024-12-11 20:19:43 +00:00
Caio Oliveira
abe41b1d2c intel/compiler: Use #pragma once instead of header guards
Acked-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32534>
2024-12-11 19:47:44 +00:00
Tim Huang
ad75b9f1a6 amd: add GFX v11.5.3 support
This enables support for GFX version 11.5.3.

Signed-off-by: Tim Huang <tim.huang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32567>
2024-12-11 19:14:34 +00:00
Juan A. Suarez Romero
5b42da1be8 util/format: nr_channels is always <= 4
While the nr_channels is defined with 3 bits, which allows up to 7
channels, actually the number of channels is less or equal to 4.

This adds an assertion that helps static analyzers to avoid several
false positives related with this.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32589>
2024-12-11 18:34:47 +00:00
Samuel Pitoiset
167f4a87c6 radv: remove remaining discard to demote options
This is the default but the option wasn't completely removed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32590>
2024-12-11 17:59:13 +00:00
Tapani Pälli
97fc987497 intel/dev: update mesa_defs.json from internal database
This updates entry for 14017823839 which fixes issues on BMG with:
   dEQP-VK.compute.pipeline.zero_initialize_workgroup_memory.max_workgroup_memory.1

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32550>
2024-12-11 17:32:52 +00:00
Eric R. Smith
a6e03ce428 panvk: advertise version 1.1 support
We know we have a broken Vulkan driver, so it's debatable whether it's
a broken Vulkan 1.0 or broken 1.1. Advertising 1.1 lets us run more
tests, and this patch does this. We also bump the instance version id
to 1.4, which seems appropriate since the overall Vulkan infrastructure
within Mesa is at that level.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32464>
2024-12-11 17:11:06 +00:00
Eric R. Smith
2627d793a2 panvk: split device and instance version numbers
We were using the same routine to find the device and instance
version numbers. This isn't correct; the device version may
vary based on the physical hardware we are using, but the
instance version should always be the same.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32464>
2024-12-11 17:11:06 +00:00
Eric R. Smith
605c173fbd panvk: update feature support
Turn on `imageCubeArray` and `fragmentStoresAndAtomics`, which we
already support (the latter only on v10 and later).

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32464>
2024-12-11 17:11:06 +00:00
Job Noorman
f80ac64e8f ir3/cp: add support for swapping srcs of sad
Like mad, it's sometimes useful to swap the srcs of sad since not all
flags are allowed on all srcs. However, unlike mad, sad is 3-src
commutative so more srcs can be swapped.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:13 +00:00
Job Noorman
ea2a75f81a ir3/cp: make try_swap_mad_two_srcs more generic
In preparation for supporting sad, rename to try_swap_cat3_two_srcs and
add argument for src n.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:12 +00:00
Job Noorman
00656526d8 ir3/cp: extract common src swapping code
In preparation for supporting sad (which like mad may benefit from
swapping some of it srcs), extract the swapping from
try_swap_mad_two_srcs so that it can be reused for sad. This is
necessary since, unlike mad, sad might also benefit from swapping srcs
1->2 (instead of only 2->1) or 3->2.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:12 +00:00
Job Noorman
e615f30b5e ir3/cp: only mark mad srcs as swapped when swap succeeded
We would mark mad srcs as swapped once we tried swapping them, even if
it would not succeed. However, it might happen (especially after running
ir3_shared_folding) that a new opportunity for swapping comes up later.
Therefore, we should only mark the srcs as swapped when it actually
succeeded.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:12 +00:00
Job Noorman
2573c1d756 ir3: add codegen for sad
Turns out that sad is just iadd3. I assume it's an acronym for "Sum of
Absolute Differences" which may make sense since its 2nd src supports
(neg) which would allow SAD to be implemented using this instruction.

NIR already supports algebraic patterns for selecting iadd3 so adding
codegen support in ir3 is trivial. However, sad seems to have the same
hardware limitation as mad and doesn't support the scalar ALU so we have
to make sure to disable it when emitting iadd3.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:11 +00:00
Job Noorman
ed58a8688f ir3: teach backend about sad
It only supports (neg) in its 2nd src but other than that has the same
properties as mad.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:11 +00:00
Job Noorman
49c7a22ac8 ir3/isa: fix isaspec for sad.s32
FULL should be true here. Also tested in computerator and the comment
about uncertainty can be removed.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32501>
2024-12-11 16:45:10 +00:00
Job Noorman
943f666b69 ir3/isa: fix cat3-alt immed src
The override used for the immed encoding in #cat3-src-const-or-immed
used a pattern which isn't supported in overrides by isaspec. The
pattern in the base bitset (10) was too strict for immediates since it
didn't allow the most significant bit to be 1.

Fix this by making the base pattern 1 and adding an assert for the next
bit to be 0 in the non-immed case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 1c6c200c0d ("ir3: add newly found shlg.b16 instruction")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32549>
2024-12-11 16:09:46 +00:00
Eric R. Smith
6f95870561 format: Add R8_G8B8_422_UNORM format
This is the format that drivers will want to use for NV16
without YUV conversion (if they support this natively).
Previously we had NV16 working but it was always emulated
with R8 + GR88.

Fixes: 440b69210a ("dri, mesa: fix NV16 texture format")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32524>
2024-12-11 15:28:08 +00:00
Rhys Perry
26790e90d3 nir: make ballot ALU and mbcnt_amd operations reorderable
These can be lowered to ALU and load_subgroup_invocation, all of which are
reorderable.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32512>
2024-12-11 14:47:12 +00:00
Rhys Perry
650468fbdf nir/move_discards_to_top: don't move across more intrinsics
This missed dpp16_shift_amd, lane_permute_16_amd, last_invocation and
ballot_relaxed.

Instead, list the non-reorderable intrinsics which are allowed to be moved
after discards.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32512>
2024-12-11 14:47:12 +00:00
Rhys Perry
5368569d06 nir: make load_helper_invocation non-reorderable
This can't be moved to after demote, so it's not reorderable.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32512>
2024-12-11 14:47:12 +00:00
Erik Faye-Lund
d1357b1e9a panvk: expose scalarBlockLayout
This just works on Mali, nothing fancy needed.

Unfortunately, this triggers a lot of timeouts, presumably due to
uncached CPU access to memory. So lots of extra skips here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32562>
2024-12-11 13:19:19 +00:00
Georg Lehmann
65506e635b aco/ra: don't write to scc/ttmp with s_fmac
Fixes: 4bd229ac50 ("aco/gfx11.5: select SOP2 float instructions")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32545>
2024-12-11 12:51:18 +00:00
Georg Lehmann
0b9e2a5427 aco/ra: disallow s_cmpk with scc operand
Fixes: 2d6b0a4177 ("aco/optimizer: Optimize SOPC with literal to SOPK.")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32545>
2024-12-11 12:51:18 +00:00
Georg Lehmann
fe0c72caec aco/ra: don't write to exec/ttmp with mulk/addk/cmovk
ttmp sgprs are readonly outside of trap handlers, so the instructions were
probably skipped. RA should also never create additional exec writes.

Fixes: e06773281b ("aco/ra: Optimize some SOP2 instructions with literal to SOPK.")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32545>
2024-12-11 12:51:18 +00:00
Georg Lehmann
576a2e798c aco/gfx12: don't assume memory operations complete in order
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32569>
2024-12-11 12:22:59 +00:00
Hans-Kristian Arntzen
c3becade15 wsi/wayland: Add forward progress guarantee for present wait.
When a timestamped present is not used (MAILBOX or the very first present),
it's possible that the very last queued present ID won't complete in finite time.
Similar to frame callback based workaround, apply a timeout to present
waits when they target the very last submitted presentID.

Only apply the workaround when we're not guaranteed forward progress.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:48 +00:00
Hans-Kristian Arntzen
d5509c147f wsi/wayland: Remove unused present_mode member.
We use chain->base.present_mode instead.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:47 +00:00
Hans-Kristian Arntzen
63cbbf2a1c wsi/wayland: Handle FIFO -> MAILBOX transitions correctly
When transitioning from FIFO to MAILBOX with swapchain_maintenance1,
we must make sure that the first MAILBOX after FIFO observes the wait
barrier. This was done implicitly in the timestamp path, but not for
the non-commit-timing path.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Cc: mesa-stable
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:47 +00:00
Hans-Kristian Arntzen
458842c3b5 wsi/wayland: Don't fallback to broken legacy throttling with FIFO
When commit-timing was not supported, but FIFO was we would end
up in a situation with throttling on FIFO barrier and legacy fence.
At that point, the entire point of FIFO falls flat.

There are some caveats with this approach, but it's not expected
that compositors will only support FIFO, and not commit-timing long
term.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:47 +00:00
Hans-Kristian Arntzen
4dde605924 wsi/wayland: Only use commit timing protocol alongside present time.
Comming timing is meaningless when we cannot receive timing feedback.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Reviewed-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32556>
2024-12-11 11:51:47 +00:00
Samuel Pitoiset
553eb1a3fd radv: fix alpha-to-coverage with alpha-to-one when MRTZ is also exported
On AMD hardware, it's possible to export a separate alpha channel for
applying alpha-to-one after alpha-to-coverage and not before.

On GFX11+, it's already mostly supported but alpha needs to be exported
to MRTZ.a and one to MRT0.a. The hw always uses alpha for
alpha-to-coverage from MRTZ.a.

On older generations, the driver needs the same separate alpha export
but it also needs to configure the hardware with COVERAGE_TO_MASK_ENABLE
which selects alpha from MRTZ.a.

This should fix alpha-to-coverage with alpha-to-one when either
depth, stencil or samplemask are exported but it still needs a slightly
different solution without MRTZ. I will fix that later.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32523>
2024-12-11 10:50:31 +00:00
Samuel Pitoiset
70047e6bd6 aco: export alpha to MRTZ.a and one to MRT0.a for alpha-to-one on GFX11
For FS epilogs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32523>
2024-12-11 10:50:31 +00:00
Samuel Pitoiset
1037830098 ac/nir: export alpha to MRTZ.a and one to MRT0.a for alpha-to-one on GFX11
When alpha-to-coverage and alpha-to-one are both enabled in the
fragment shader, the alpha value should be exported through MRTZ and
one to MRT0.a. Otherwise, alpha-to-one will be performed before
alpha-to-coverage.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32523>
2024-12-11 10:50:31 +00:00
Samuel Pitoiset
3b010a9e60 radv: disable alphaToOne except for Zink
It's just completely broken if alpha-to-coverage is also used. Given
this is a requirement for Zink and no known GL apps are affected, let's
disable for everything except Zink. This is going to be fixed but the
fixes aren't small enough for backporting.

This fixes a rendering issue with XPlane 12.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32576>
2024-12-11 08:28:25 +00:00
Samuel Pitoiset
310e03c8d3 radv/meta: move vk_meta_device_init() to radv_device_init_meta()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32571>
2024-12-11 07:25:29 +00:00
Samuel Pitoiset
cad6e1ea09 radv/meta: add missing vk_meta_device_finish()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32571>
2024-12-11 07:25:29 +00:00
Martin Roukala (né Peres)
b8054556a0 radv/ci: update the vkcts expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
df5fb64f48 zink/ci: update the radv expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
fe900be2b6 zink/ci: update the nvk-ga106 expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
427f36ced9 nvk/ci: update the ga106 expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
16e364e7d9 turnip/ci: skip a vkd3d test that causes a GPU hang on a750
This will hopefully allow the whole test suite to run.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
56b72144e5 turnip/ci: bump the vkcts a750 timeout by 15 minutes
This fixes spurious fails due to exceeding the timeout seconds ahead of
finishing the job :s

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
c4012f9adc turnip/ci: document the a750-vkcts expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
8dc307cdc2 freedreno-ci: document a a750-gl flake
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Martin Roukala (né Peres)
654d5049d4 freedreno-ci: document more a618-gl flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
David Heidelberg
da69369382 ci/freedreno: increase Adreno 618 timeout to 1h
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
David Heidelberg
4cb139cc6a ci/freedreno: update Adreno 306 expectations
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32541>
2024-12-11 04:24:35 +00:00
Dave Airlie
699afb88ec radv/video: set max slice counts to 1 for h264/5 encode
Right now the driver doesn't support multi-slice encodes, so
report the correct value.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Autumn Ashton
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32580>
2024-12-11 01:11:32 +00:00
Simon Ser
34e6932eaa llvmpipe: handle llvmpipe_resource_map() errors
llvmpipe_resource_map() may fail, e.g. when the DMA-BUF cannot be
mmap'ed. Handle the error, either by returning NULL or by asserting.
Asserting is done in places where there is no good way to bubble up
the error (and is done in other places already, e.g. in
init_scene_texture).

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32537>
2024-12-10 22:05:19 +00:00
Sil Vilerino
ce1aad4505 vl/vl_winsys: Add missing include for function declaration
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12150
Fixes: 2548471ca1 ("vl/vl_win32_screen_create_from_d3d12_device: Allow winsys to be injected")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32559>
2024-12-10 21:29:15 +00:00
Georg Lehmann
e8b29abb25 nir: add unsigned upper bound support for fsat
Foz-DB Navi21:
Totals from 89 (0.11% of 79395) affected shaders:
Instrs: 97018 -> 96995 (-0.02%)
CodeSize: 492996 -> 492488 (-0.10%)
Latency: 504649 -> 504555 (-0.02%)
InvThroughput: 121968 -> 121875 (-0.08%)
VALU: 67427 -> 67404 (-0.03%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32565>
2024-12-10 20:53:53 +00:00
Georg Lehmann
e78e63e3fe nir: add unsigned upper bound support for f2i32
Foz-DB Navi21:
Totals from 649 (0.82% of 79395) affected shaders:
CodeSize: 2330592 -> 2314112 (-0.71%)
Latency: 2068161 -> 2053370 (-0.72%)
InvThroughput: 346583 -> 329425 (-4.95%)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32565>
2024-12-10 20:53:53 +00:00
Georg Lehmann
0b366a7ab2 nir/uub: properly limit float support to 32bit
Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32565>
2024-12-10 20:53:53 +00:00
Caio Oliveira
638802d68f intel/brw: Dump errors when brw_assemble() fails EU validation
This will allow executor to show proper inline errors.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32490>
2024-12-10 20:23:25 +00:00
Job Noorman
9052ad449b ir3/isa: fix conflict between stib.b and stsc
stsc was using don't care bits in a position position that is
significant for stib.b.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 11b2c54a9a ("ir3/a7xx: Add STSC definition")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32575>
2024-12-10 19:48:45 +00:00
Jesse Natalie
727c5a531e microsoft/clc: Initialize printf buffer for tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
83dd4889a7 nir/lower_point_size: skip non-var derefs
these can happen depending on pass order, otherwise we crash on the null
pointer.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
a667a5a5d6 vulkan: add vk_check_printf_status helper
to integrate debug printf/abort, vulkan drivers need to implement a device
status. we would need to thicken the runtime to do that entirely in common code,
but we can at least add a helper to make it easier for vk drivers to wire.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
33d839a72a util/printf: add context-ful helpers
drivers wishing to integrate driver CL printf/abort have to do some delicate
dances to maintain the data structure with the buffer size and abort flag. wrap
it all up in common helpers -- the driver just supplies the memory allocation
and calls in periodically.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
85e06f5a55 util/printf: be robust against truncated buffers
this can happen with shader aborts. don't blow up with theatrics.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
69a0962c70 nir/lower_printf: use 64-bit math
this lets load_store_vectorize vectorize the stores we produce. it also matches
actual OpenCL kernel code looks, so drivers need to have an optimized path for
these 64+32 patterns regardless.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
da967416db nir/lower_printf: use unsigned math
negative offsets/sizes don't make sense, and zero-extension is often easier
to optimize/lower than sign-extension.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
8db0751eb8 nir/lower_printf: lower aborts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
0b9072e2e5 nir/lower_printf: allow fixed address
fixed address printf buffers can avoid a lot of complexity, especially with the
general case of (e.g.) DGC-enqueued precompiled kernels. so add a knob for that
and save the driver the need to write a lowering pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Alyssa Rosenzweig
816c14d33d nir: add printf_abort intrinsic
abort() for the gpu, implemented with the printf infrastructure since they go
together.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
2024-12-10 19:13:07 +00:00
Tapani Pälli
03c9f164e8 drirc/anv: force_vk_vendor=-1 for Marvel Rivals
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12280
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32555>
2024-12-10 18:30:48 +00:00
Alyssa Rosenzweig
f2f5e634bb vulkan: bump layer api versions
these need to be kept in sync to avoid loader splat.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32557>
2024-12-10 17:17:12 +00:00
Georg Lehmann
7bb3f93fa9 radv: use nir_opt_clip_cull_const
This reduces the fixed function hardware bottleneck in vertex shading
heavy sections with d3d9 DXVK.

DXVK always declares 6 clip distances, and with
https://github.com/doitsujin/dxvk/pull/4508
it writes 0 for disabled clip planes.

But while working on this, I also discovered that other games also write
constant clip/cull distances:

Foz-DB Navi21:
Totals from 442 (0.56% of 79206) affected shaders:
MaxWaves: 10880 -> 10900 (+0.18%)
Instrs: 283569 -> 282493 (-0.38%); split: -0.38%, +0.01%
CodeSize: 1497596 -> 1491948 (-0.38%); split: -0.38%, +0.00%
VGPRs: 18928 -> 18888 (-0.21%)
Outputs: 3026 -> 2970 (-1.85%)
Latency: 1051990 -> 1048878 (-0.30%); split: -0.47%, +0.18%
InvThroughput: 184190 -> 183366 (-0.45%); split: -0.45%, +0.01%
VClause: 6071 -> 6077 (+0.10%); split: -0.38%, +0.48%
SClause: 6724 -> 6725 (+0.01%); split: -0.12%, +0.13%
Copies: 19624 -> 19160 (-2.36%); split: -2.44%, +0.08%
PreSGPRs: 18634 -> 18526 (-0.58%)
PreVGPRs: 15522 -> 15465 (-0.37%)
VALU: 156964 -> 156330 (-0.40%); split: -0.41%, +0.01%
SALU: 41802 -> 41748 (-0.13%); split: -0.13%, +0.00%

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32518>
2024-12-10 16:35:01 +00:00
Georg Lehmann
c5c22fc3a3 nir: add constant clip/cull distance optimization
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32518>
2024-12-10 16:35:01 +00:00
Georg Lehmann
4f88dbffa4 radv: track holes in the clip/cull masks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32518>
2024-12-10 16:35:01 +00:00
Erik Faye-Lund
5a06e75d4d panvk/ci: update g610 results
Seems like the multiview feature unlocked some tests that triggers a
previously unknown bug. This results in an assert triggering, but that
reveals a real, underlying issue.

A few of these doesn't trigger the assert, but still fails due to a GPU
hang.

Let's mark all of these as failures, to avoid holding back other MRs in
the mean time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32574>
2024-12-10 13:08:27 +00:00
Erik Faye-Lund
fc580a7b6e panvk/ci: update g52 results
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32574>
2024-12-10 13:08:27 +00:00
Georg Lehmann
4a977ea24f aco/gfx11+: use v_and_b32 to extract local id 0
Foz-DB Navi31:
Totals from 2561 (3.23% of 79206) affected shaders:
CodeSize: 10399004 -> 10389120 (-0.10%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32532>
2024-12-10 11:58:21 +00:00
Jordan Justen
1027b071f9 intel/dev: Add intel_check_hwconfig_items()
Rather than checking hwconfig items when using them, wait until after
devinfo has been fully initialized. This includes having workarounds
implemented.

We can then check if the hwconfig data and final Mesa initialization
agree. If the match fails, we need to investigate if Mesa or the
hwconfig data is wrong.

This code becomes a no-op when not on a release build.

Fixes: a4c5bfd34c ("intel/dev: Use hwconfig for urb min/max entry values")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12141
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32359>
2024-12-10 09:01:45 +00:00
Jordan Justen
4eb10bc25e intel/dev: Don't process hwconfig table to apply items when not required
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32359>
2024-12-10 09:01:45 +00:00
Jordan Justen
5a8107cef4 intel/dev: Split apply and check paths for hwconfig
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32359>
2024-12-10 09:01:45 +00:00
Jordan Justen
832de579e1 intel/dev: Split hwconfig warning check into hwconfig_item_warning()
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32359>
2024-12-10 09:01:45 +00:00
Karmjit Mahil
3f18c91a0b util/idalloc: Minor refactor of util_idalloc_foreach()
Changes the `for` loop code to be similar to
`util_idalloc_forach_no_zero_safe()` for cohesion.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32546>
2024-12-10 08:29:00 +00:00
Karmjit Mahil
af346cd77f util/idalloc: Fix util_idalloc_foreach() build issue
Currently `util_idalloc_foreach()` isn't being used in the codebase
but if used it causes a build error as `num_used` doesn't exist.
Fix that by using `num_set_elements`.

Fixes: 0589dfe4e2 ("util/idalloc: optimize foreach by tracking the greatest non-zero element")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32546>
2024-12-10 08:29:00 +00:00
Erik Faye-Lund
03fc483813 panvk: expose EXT_4444_formats
We already have all the bits wired up to support both
VK_FORMAT_A4R4G4B4_UNORM_PACK16 and VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT
from VK_EXT_4444_formats, and were already setting the feature-flags for
them.

Let's also expose the extension, which should just work.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32083>
2024-12-09 21:16:04 +00:00
Erik Faye-Lund
0688b0002a panfrost: add missing 4-bit formats
We were missing a couple of 4-bit formats, let's add them.

Vulkan 1.0 already requires VK_FORMAT_B4G4R4A4_UNORM_PACK16, which mapes
to PIPE_FORMAT_A4R4G4B4_UNORM, which we're currently missing support for.

But we can also support VK_FORMAT_R4G4B4A4_UNORM_PACK16, which maps to
PIPE_FORMAT_A4B4G4R4_UNORM. This format is optional, but there's no
reason we shouldn't expose support for it.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32083>
2024-12-09 21:16:04 +00:00
Erik Faye-Lund
6dab5fe0cd panfrost: match 4-bit format order
It's a bit easier to match things between the format and blendable
format arrays if the specific formats are somewhat similarly ordered. So
let's sort the various 4 bits per component formats to match.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32083>
2024-12-09 21:16:04 +00:00
Benjamin Lee
b01afd06cd nir: update docs for nir_get_io_arrayed_index_src
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
76b28c19fa panvk: add note about pan_lower_store_component requirements
This tripped me up in the multiview implementation. The commit message
that introduced the pass mentioned that we're relying on
nir_lower_io_to_temporaries, but this was dropped when it was copied to
the comment block.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
e8d67f1f6a panvk: advertise multiview support on v10+
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
cc22061878 panvk: disable position fifo optimization when multiview enabled
Without multiview, a shader that doesn't write to the any of the
extended FIFO attributes (pointsize and layer) can be used with either
FIFO format. This allows us to switch to the basic FIFO format when
using the no_psiz variant. In multiview vertex shaders, output offsets
depend on the FIFO format. Instead of trying to patch these in the
no_psiz variant, just don't do the optimization for now.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
f2b7217197 panvk: only clear enabled views
Two components to this: first we only issue fragment jobs for enabled
views. This prevents disabled layers from being cleared implicitly with
`LOAD_OP_CLEAR`, and also reduces overhead (these layers have no
primitives so the fragment job is wasted work). Second is hooking up the
view mask to vk_meta_clear.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
448b5e0225 panvk: implement multiview support
In Valhall multiview, position/varying shaders are invoked once per
draw. Each invocation write separate outputs for all views. Fragment
processing is handled by the existing multilayer support. Note that
because the hardware only supports up to 8 views, we don't have to care
about the case where there are too many layers to fit in one tiler when
multiview is enabled.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
74ccf6cbdc nir: add option to use compact view indices
In panvk we pass absolute view indices to the hardware, so we need to do
the conversion from compacted to absolute at some point. Emitting
absolute indices from nir_lower_multiview initially looks like the
simplest option, but nir_lower_io_to_temporaries will emit a write for
every element of array varyings. This results in unnecessary writes to
disabled views.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
becb014d27 nir: treat per-view outputs as arrayed IO
This is needed for implementing multiview in panvk, where the address
calculation for multiview outputs is not well-represented by lowering to
nir_intrinsic_store_output with a single offset.

The case where a variable is both per-view and per-{vertex,primitive} is
now unsupported. This would come up with drivers implementing
NV_mesh_shader or using nir_lower_multiview on geometry, tessellation,
or mesh shaders. No drivers currently do either of these. There was some
code that attempted to handle the nested per-view case by unwrapping
per-view/arrayed types twice, but it's unclear to what extent this
actually worked.

ANV and Turnip both rely on per-view outputs being assigned a unique
driver location for each view, so I've added on option to configure that
behavior rather than removing it.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
6d843cde45 nir: document index semantics in nir_lower_multiview
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Benjamin Lee
975c3ecd1e nir: handle arbitrary per-view outputs in nir_lower_multiview
This is needed for panvk, where multiview is "all or nothing". When
multiview is enabled, all outputs may be written with separate values
for each view.

The edge case mentioned in the previous `nir_can_lower_multiview` is now
handled because we now handle an arbitrary number of per-view output
vars instead of expecting to find exactly one.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31704>
2024-12-09 20:31:49 +00:00
Mi, Yanfeng
06d3eb8e01 anv:increase instruction heap to 3Gb
Black Myth Wukong is generating more than 2Gb of shaders in
pre-compiling stage after VK_EXT_shader_image_atomic_int64 extension
enabled. Driver will crash in create shader stages due to dereference
null pointer of kernel map.

Signed-off-by: Mi, Yanfeng <yanfeng.mi@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32548>
2024-12-09 19:14:38 +00:00
Mi, Yanfeng
0a5a04f509 anv:Fix memory grow calculation overflow issue
when old buffer size is large than 2G, 32bit cannot hold
2 times buffer size (>4G).

Fixes: 8d813a90d6 ("anv: fail pool allocation when over the maximal size")

Signed-off-by: Mi, Yanfeng <yanfeng.mi@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32551>
2024-12-09 18:49:17 +00:00
Samuel Pitoiset
a653654b8d radv: dump the Mesa version with RADV_DEBUG=hang
This was missing and it can be very useful to know.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32560>
2024-12-09 18:25:24 +00:00
Samuel Pitoiset
9d2b548825 radv: only dump device name info on Linux with RADV_DEBUG=hang
Doesn't make sense on Windows.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32560>
2024-12-09 18:25:24 +00:00
Samuel Pitoiset
e3d1f27b31 radv: add radv_disable_dcc_stores and enable for Indiana Jones: The Great Circle
Likely a game bug but can't be 100% sure because the game uses RT by
default and renderdoc still doesn't have support for it.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32528>
2024-12-09 17:52:43 +00:00
Valentine Burley
1798809985 panfrost/ci: Turn redundant GLESCTS-full run into disabled Piglit job
The panfrost-g610-gl-full:arm64 was identical to the merge job,
panfrost-g610-gl:arm64. Turn the -full job into a Piglit job,
but keep it disabled until it gets more stable.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32554>
2024-12-09 17:22:13 +00:00
Rhys Perry
033e76a82a ac/nir: have ac_nir_lower_mem_access_bit_sizes preserve >128 bit SMEM
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32408>
2024-12-09 16:56:29 +00:00
Rhys Perry
77f8436c62 radv: skip loading unused push constants
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32408>
2024-12-09 16:56:29 +00:00
Rhys Perry
2e63da865b radv: fix expanded push constant loads when all are inlined
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32408>
2024-12-09 16:56:29 +00:00
Rhys Perry
0ccea63b6a radv: constant fold after lowering memory accesses
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32408>
2024-12-09 16:56:29 +00:00
Paulo Zanoni
0dc2a5808e brw: don't forget the base when emitting SHADER_OPCODE_MOV_RELOC_IMM
The last argument seems to be used as brw_shader_reloc::delta (from
brw_add_reloc), and we're unconditionally setting it to 0 here, while
the other place where we handle nir_intrinsic_load_reloc_const_intel
seems to be setting the base appropriately.

I found this by inspection while debugging a bug related to this code,
so I'm not aware of any workloads that get improved by this patch.

Related patches:
 - ecbec25e84 ("intel/nir: add reloc delta to load_reloc_const_intel intrinsic")
 - 99047451c9 ("intel/fs: add plumbing for embedded samplers")

Fixes: ecbec25e84 ("intel/nir: add reloc delta to load_reloc_const_intel intrinsic")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32531>
2024-12-09 15:45:49 +00:00
Valentine Burley
4379545117 amd/ci: Increase fraction for radeonsi-raven-piglit
This job was taking longer than 10 minutes, so increase the
fraction of the quick_shader piglit profile to get the runtime
within acceptable limits.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32455>
2024-12-09 15:18:37 +00:00
Valentine Burley
a3d599e932 amd/ci: Convert LAVA RADV jobs to deqp-runner suites
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32455>
2024-12-09 15:18:37 +00:00
Valentine Burley
63b4765114 amd/ci: Merge and convert Raven piglit testing
Converting to deqp-runner suite allows merging the two jobs running
the two piglit profiles for more even distribution and granular
control of runtime.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32455>
2024-12-09 15:18:37 +00:00
Valentine Burley
e26391f7ff amd/ci: Drop x86_64 suffix from job names
These added no value and made the names unnecessarily long.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32455>
2024-12-09 15:18:36 +00:00
Lionel Landwerlin
de00fe3f66 anv: add BVH building tracking through u_trace
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32483>
2024-12-09 14:45:00 +00:00
Lionel Landwerlin
719e4dfa66 vulkan: track encode step of the BVH building
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32483>
2024-12-09 14:45:00 +00:00
Lionel Landwerlin
4c32469fa4 vulkan: add an enum for the build step
For Anv this will make more sense than strings.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32483>
2024-12-09 14:45:00 +00:00
Lionel Landwerlin
877a296b2c vulkan: make acceleration structure debug markers virtual
Not every implementation supports VK_EXT_debug_marker.
VK_EXT_debug_utils is also pretty similar, it would be nice to plug
into whatever is available.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32483>
2024-12-09 14:45:00 +00:00
Karmjit Mahil
fd1511e42e ir3: Fix some Wsign-compare when compiling a generate-rd.cc
Fix a bunch of `warning: comparison of integer expressions of different
signedness: 'int' and 'long unsigned int' [-Wsign-compare]` which
appeared when compiling a rddecompiled generate-rd.cc .

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32503>
2024-12-09 14:18:15 +00:00
Karmjit Mahil
c22f88cbcf freedreno/rddecompiler: Fix some unsused function warnings
Some of the functions defined in the header might not be used
by the `generate-rd.cc` file being compiled so add `UNUSED`
to them.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32503>
2024-12-09 14:18:15 +00:00
Karmjit Mahil
0bbcb1f6f7 freedreno/rddecompiler: clang-format fix
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32503>
2024-12-09 14:18:14 +00:00
Hans-Kristian Arntzen
81526187a8 wsi/x11: Do not use allocation callbacks on a thread.
This is banned by spec.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32508>
2024-12-09 13:43:34 +00:00
Erik Faye-Lund
19ac94d68b panvk/ci: add a full panvk job
This allows us to collect accurate CI expectations.

A full run takes around 45 minutes per job, and spawns 5 jobs. Let's set
the timeout to 1.5 hours, to give some headroom.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
93ae871c75 panvk/ci: add a few flakes
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
6410bdd61b panvk/ci: update ci results for g610
This is based on doing full runs, and reveals some things we've missed
in pre-merge CI due to fractions.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
9e0e607809 panvk/ci: add some missing skips
There's a few more tests that takes more than 30 seconds, so let's skip
those as well. Some of them even occasionally take more than 60 seconds.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
68203caa08 panvk/ci: remove duplicate skips
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
853285aedd panvk/ci: correct name of skips-file
The slips-file should use the plural form of skip, otherwise it doesn't
end up being used.

We also had some tests that were supposed to be skipped in the expected
failures. Let's remove them, and add a new failure that should have been
turned into a skip to the list as well.

Fixes: eff8a3517d ("panvk: Enable CI on G610")
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32460>
2024-12-09 13:09:41 +00:00
Erik Faye-Lund
1ef21fa004 panvk, nvk: spell width correctly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32499>
2024-12-09 12:14:04 +00:00
Lars-Ivar Hesselberg Simonsen
5e5f4432cf panvk: Remove ZS texture_swizzle_replicate_x
The texture_swizzle_replicate_x functionality appears not to be required
for Vulkan anymore, so let's remove it.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:20:07 +01:00
Lars-Ivar Hesselberg Simonsen
12f69d26dc panfrost: Standardize naming of sampler reswizzle
This aligns the functions for reswizzling the sampler with the
equivalent functionality in texture for easier grepping.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:31 +01:00
Lars-Ivar Hesselberg Simonsen
3a187036f0 panfrost: Decouple reswizzling from texture build
Move the decision on whether to enable AFBC reswizzle in the texture
descriptor from the shared function to the upper layers, as that allows
each API flexibility in when to apply it.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:28 +01:00
Lars-Ivar Hesselberg Simonsen
d83e374150 panfrost: Limit reswizzle to AFBC formats
The texture/sampler reswizzle is implemented to allow AFBC for non
canonical component order formats, but it's enabled regardless of
whether the format supports AFBC.

Limit the reswizzling to only apply to formats that support AFBC.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:24 +01:00
Lars-Ivar Hesselberg Simonsen
afbcf675c5 panfrost: Only allow AFBC(RGB) and AFBC(BGR) on v7
The AFBC texture/sample reswizzle will not work for formats with
component orders that are not canonical or RB-swapped, as moving the
alpha channel breaks opaque black border-colors.

Disable AFBC for formats with other component orders than RGB and BGR on
v7.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:21 +01:00
Lars-Ivar Hesselberg Simonsen
1aa3bb4e22 panvk: Disable AFBC for mutable formats on v7
As v7 only allows AFBC for RGB and BGR component swizzles, we'll need to
disable AFBC in case an image is created with
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT as we can no longer ensure they
adhere to this limitation.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:17 +01:00
Lars-Ivar Hesselberg Simonsen
86527273b9 panfrost: Disable AFRC texture/sampler reswizzle
There should be no limitation on component order support for AFRC, so
the reswizzling of texture/sampler should not be necessary in this case.

For PanVK, only the texture reswizzling was implemented (with the
equivalent sampler reswizzling missing), so removing it allows us to
pass various border-color tests.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32515>
2024-12-09 12:09:05 +01:00
Boris Brezillon
81d0c24e2f panvk: Ignore the view aspects when dealing with depth/stencil attachments
The spec says:
"
  When an image view of a depth/stencil image is used as a
  depth/stencil framebuffer attachment, the aspectMask is
  ignored and both depth and stencil image subresources are used.
"

Make sure we do that when initializing depth/stencil attachments.

Fixes the
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.*.subpass_count_*.d24_unorm_s8_uint
dEQP-VK.renderpass.suballocation.subpass_dependencies.late_fragment_tests.*.subpass_count_*.d32_sfloat_s8_uint
failures.

Signed-off-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/32379>
2024-12-09 08:24:22 +00:00
Boris Brezillon
ccced641b5 vk/meta: Pass depth/stencil attachments only when a clear is requested
If we pass both, and only one of them is cleared, the other aspect might
be disturbed if the format contains both aspects.

Signed-off-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/32379>
2024-12-09 08:24:22 +00:00
Boris Brezillon
63b99fde38 panvk: Move the descriptors preparation out of CreateImageView()
Let's try to make the CreateImageView() function shorter by moving
the descriptors preparation to sub-functions.

Signed-off-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/32379>
2024-12-09 08:24:21 +00:00
Dave Airlie
a0918ca13d lavapipe: fix beta build due to changes in AMDX ext
This is probably not correct, but this needs an overhaul,
fixes the -Dvulkan-beta=true build.

Fixes: fcaf0f2590 ("vulkan: update to 302 headers for av1 encode")
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32520>
2024-12-09 06:30:32 +10:00
GKraats
bed66430ab i915g: fix glClearColor using a 1 byte color format
Unscissored glClearColor is using i915_fill_blit().
Clearing can be done with the 1 byte formats
GL_ALPHA, GL_LUMINANCE or GL_INTENSITY.
Routine i915_fill_blit() is called with a rgba-mask containing
1 byte, but it is handling this as a 2-byte color.
This fix adds the needed 1 byte setup to both
i915_fill_blit() and i915_copy_blit().

It solves 1 piglit-test concerning arb_clear_texture-base-formats
and 15 tests concerning fbo-clear-formats.

No regression is shown at other piglit-tests.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32178>
2024-12-08 17:33:27 +01:00
liuqiang
8dda40c6e9 d3d10umd: Modify comment
Modify comments that do not match

Signed-off-by: liuqiang <liuqiang@kylinos.cn>
Reviewed-by: Max Ramanouski <max8rr8@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32294>
2024-12-07 07:05:27 +00:00
José Roberto de Souza
2aae000edb intel/dev/xe: Fix size of eu_per_dss_mask
Real Xe KMD actually returns a uint64, so here changing from uint32
to uint64.

Fixes: 04bdbeec31 ("intel/dev/xe: Fix access to eu_per_dss_mask")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32527>
2024-12-06 19:52:50 +00:00
Alyssa Rosenzweig
972f8aa287 vulkan: rename depth bias graphics states
"constant" is a special keyword in OpenCL C, and we'd like to #define it
suitably in host C23 to facilitate compatiblity between host/device headers.
That means we can't have any identifiers named "global" or "constant".
Fortunately, this is the only 'constant' in any file I'm hitting.

To avoid the clash, don't abbreviate "constant factor", use "constant_factor"
instead. For consistency, "slope factor" then becomes "slope_factor".
The new names are longer but match the Vulkan API exactly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> [Intel]
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> [NVK and panvk]
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> [V3DV]
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com> [IMG]
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Alyssa Rosenzweig
c6021bd83c libagx: remove redundant source files
depfiles handles now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Alyssa Rosenzweig
11fc604f0e libagx: switch to depfile support
this fixes a lot of weirdness with #including common headers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Alyssa Rosenzweig
3d35ea6a6b mesa_clc: add depfile support
This allows the tool to tell ninja what headers it read, so ninja can
correctly rebuild when necessary.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Dylan Baker
33a1acb0da clc: Tell clang to track imported dependencies
Clang is capable of tacking what headers it imports, as long as we set
it up to do that. While that isn't important for rusticl, it would be
useful for the various `_clc` tools, as they can then tell Ninja which
headers they read to make rebuilds more reliable.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32505>
2024-12-06 13:48:26 -05:00
Nanley Chery
483c40a21d anv: Allow compressed memtypes with default buffer types
Source 2 games segfault if certain buffers are not able to use the same
memory types as images. CS2 specifically expects this to be the case for
vertex and index buffers (VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT,
VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT). I have not tested other Source 2
games to see how much the requirement differs for the usage (if at all).

Up until now, we've disabled CCS for the Source 2 engine with the
anv_disable_xe2_ccs driconf option. However, this option is not great
for performance. So, replace this with a new option to allow the same
memory types we use for images on buffers - anv_enable_buffer_comp.

Compression of buffers is generally not good for performance. I
collected the result of unconditionally enabling the feature in the
performance CI on BMG. I used the default configuration to average the
result of two runs of each trace.

The CI reports that 4 game traces would regress between 0.44-1.01% FPS
with buffer compression. However, the CI actually shows it to be
beneficial in three of our game traces:

* Cyberpunk-trace-dx12-1080p-high 106.51%
* Hitman3-trace-dx12-1080p-med    101.59%
* Blackops3-trace-dx11-1080p-high 100.44%

So, enable the option for the two games we already have driconf entries
for, Cyberpunk and Hitman3.

Of course, also enable the option for Source 2 games. Casey Bowman
reports that on BMG, some frame times drop from ~15ms to ~7ms in CS2.
This is in large part due to the removal of HiZ resolves, which is a
consequence of the game now using of HIZ_CCS_WT instead of plain HIZ.

Ref: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11520
Acked-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32519>
2024-12-06 17:21:06 +00:00
Martin Krastev
fec6ef6d7f svga/ci: drop FDO_CI_CONCURRENT to 1
* drop FDO_CI_CONCURRENT to 1; eliminate intermittent piglit concurrecy issues
* bump PIGLIT_FRACTION to 2; lowering concurrency increases exec time, so
  for now compensate with job fraction set to 50%
* triage piglit failures

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Martin Krastev
82d2e1df6c svga/ci: update svga/ci KERNEL_TAG
A new kernel build was provided, update the KERNEL_TAG accordingly.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Martin Krastev
2f3335d878 svga/ci: triage piglit failures
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Martin Krastev
3cf17feb2a svga/ci: set vmware piglit job parallelism to 2
Job parallelism controls the number of DUTs employed by the job.
As vmware CI farm enabled multiple DUTs recently, bump this to 2
DUTs for the time being.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Martin Krastev
5f31cec10a svga/ci: enable vmware farm
* enable vmware farm after maintenance
* update svga/ci KERNEL_TAG

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32526>
2024-12-06 16:38:43 +00:00
Tomeu Vizoso
da77188d7d etnaviv/ml: Implement FullyConnected
Lower FullyConnected to a regular convolution so it executes in the NN
cores.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32510>
2024-12-06 16:03:05 +00:00
Tomeu Vizoso
ad82a7c388 teflon: Add tests for FullyConnected
Same as we do with convolutions and additions.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32510>
2024-12-06 16:03:05 +00:00
Tomeu Vizoso
3d8f108514 teflon: Add support for FullyConnected
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32510>
2024-12-06 16:03:05 +00:00
Tomeu Vizoso
3e74234450 etnaviv/ml: Add support for tensor padding operations
Just one more TP operation, at least for the pad modes supported.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32509>
2024-12-06 15:09:52 +00:00
Tomeu Vizoso
02e92bbcea teflon: Add support for tensor padding operations
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32509>
2024-12-06 15:09:52 +00:00
Daniel Schürmann
b64fff7731 aco: remove definition from Pseudo branch instructions
They are not needed anymore.

Totals from 7019 (8.84% of 79395) affected shaders: (Navi31)

Instrs: 14805400 -> 14824196 (+0.13%); split: -0.00%, +0.13%
CodeSize: 78079972 -> 78132932 (+0.07%); split: -0.01%, +0.08%
SpillSGPRs: 4485 -> 4515 (+0.67%); split: -0.76%, +1.43%
Latency: 165862000 -> 165836134 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 30061764 -> 30057781 (-0.01%); split: -0.01%, +0.00%
SClause: 392323 -> 392286 (-0.01%); split: -0.01%, +0.00%
Copies: 1012262 -> 1012234 (-0.00%); split: -0.04%, +0.04%
Branches: 365910 -> 365909 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 360167 -> 355363 (-1.33%)
VALU: 8837197 -> 8837276 (+0.00%); split: -0.00%, +0.00%
SALU: 1402593 -> 1402621 (+0.00%); split: -0.03%, +0.03%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
7e4687fd04 aco: remove definition from SOPP branch instructions
Totals from 17942 (22.60% of 79395) affected shaders: (Navi31)

Instrs: 20334063 -> 20312676 (-0.11%); split: -0.11%, +0.00%
CodeSize: 108458732 -> 108377540 (-0.07%); split: -0.08%, +0.00%
Latency: 180510540 -> 180479666 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 28079325 -> 28077938 (-0.00%); split: -0.01%, +0.00%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
cab5639a09 aco/assembler: chain branches instead of emitting long jumps
As regular branch instructions cannot jump further than
32768 dwords, previously we used long jumps as fallback
solution. The disadvantage of that is that an extra SGPR
pair must be provided in order to temporarily store the PC.

This patch changes that to chained branch instructions by
inserting an artificial extra block into the code to be
targeted by the original branch. This block contains a
single branch instruction jumping to the original target.
Before the block, if necessary, we insert a <branch 1>
instruction for the existing code in order to jump over
the newly inserted block.

Only a few RT shaders are affected.

Totals from 29 (0.04% of 79395) affected shaders: (Navi31)

CodeSize: 17281176 -> 17276332 (-0.03%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
c3d777d8ac aco/assembler: change ctx.loop_header to uint32_t instead of Block*
We are about to add new blocks during assembly which makes
pointers into a vector unreliable.
Also, only set it if the loop has no back-edge.

Totals from 126 (0.16% of 79206) affected shaders: (Navi31)

CodeSize: 1486152 -> 1488152 (+0.13%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
592f3fd994 aco/assembler: Actually insert s_inst_prefetch instructions when aligning blocks for loops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
b92afdbd28 aco/assembler: constify assembly functions
Ensure that instruction formats and special operands
are not manipulated during assembly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Daniel Schürmann
3a02bbd916 aco/print_asm: allow for empty blocks with arbitrary offsets
We will add empty blocks at the end of the shader,
in order to store some branch offset information.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32037>
2024-12-06 14:34:03 +00:00
Rhys Perry
ab26b99c2c aco: don't CSE p_shader_cycles_hi_lo_hi
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: fae2a85d57 ("aco/gfx12: implement subgroup shader clock")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12243
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32500>
2024-12-06 14:06:05 +00:00
Tomeu Vizoso
6c70b10f03 etna/ml: Write out the size of the requested tensor
Instead of the size of its backing resource.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
fe08834004 teflon: Limit support for Add to two unpopulated tensors
As the only implementations depend of both inputs coming from
convolutions.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
c2d1f08116 etnaviv/ml: Add support for tensor split and concatenation operations
Just point previous and further operations to offsets in a combined
tensor.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
4ced6480ea teflon: Add support for tensor split and concatenation operations
These are often use to reuse the output from a previous operation, or to
implement convolution groups.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
418f864ae4 etnaviv/ml: Take offsets into account in TP operations
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
566166b0aa etnaviv/ml: Fix in_image_slice in transposes when width != height
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Tomeu Vizoso
10bd5c23c6 etnaviv/ml: Specify which of the input tensors need transposing.
In preparation for operations that have more than one input that may
need transposing, such as Add.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32498>
2024-12-06 13:29:11 +00:00
Georg Lehmann
d47deba142 zink: spec@ext_framebuffer_multisample@blit-mismatched-formats was fixed
Fixed in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31378

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32522>
2024-12-06 12:58:47 +00:00
Georg Lehmann
da4b9ac4a5 radeonsi/ci: add vangogh ubo fail
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32522>
2024-12-06 12:58:47 +00:00
Georg Lehmann
b2464e3609 aco/gfx12+: do not use v_pack_b32_f16 to pack untyped data
GFX12 removed IEEE_MODE, and made its signalling NaN quieting the default.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12251
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32502>
2024-12-06 12:33:05 +00:00
Georg Lehmann
7425e71ae0 aco/gfx12: disable vinterp ddx/ddy optimization
This only seems to work on gfx11 and gfx11.5, and it's only faster on gfx11.5.

We could continue to use vinterp, with constants copied to vgprs, but
whether that's beneficial depends on the shader.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>

Fixes: bee487df48 ("aco/gfx11.5+: use vinterp for fddx/fddy")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12250
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32495>
2024-12-06 12:01:39 +00:00
David Rosca
3dd6ddde3b radeonsi/vcn: Cleanup JPEG supported formats
Stop reporting L8_UNORM as supported.
Remove unsupported IYUV, YV12, P010 and P016 formats from list,
add rest of the supported formats and add assert.

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
22ced06ee6 radeonsi/vcn: Make sure JPEG target buffer format matches sampling factor
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
1a7d956c75 radeonsi/vcn: Gracefully handle decode errors and report to frontend
Previously it would print error message and then most likely crash later.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
9a3a1027a6 radeonsi/vcn: Unmap bitstream buffer in radeon_dec_destroy
If an error occured, the bitstream buffer may still be mapped when
calling radeon_dec_destroy and this would trigger assert when destroying
the bo.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
ed5794c5e3 radeonsi/vcn: Remove code handling buffer_get_virtual_address failure
buffer_get_virtual_address can't return zero.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
David Rosca
5f3a93dacf frontends/va: Move mjpeg sampling_factor to pipe_mjpeg_picture_desc
Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32504>
2024-12-06 11:24:53 +00:00
Benjamin Lee
7a9f14d3c2 panvk: advertise VK_EXT_provoking_vertex
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32273>
2024-12-06 10:40:03 +00:00
Benjamin Lee
fec20b26dd panvk: set provoking vertex in fbinfo
This must match the value set in TILER_CONTEXT. Fixes
dEQP-VK.rasterization.flatshading.*, which were failing previously
because we were setting first_provoking_vertex to true in the tiler
descriptor and false in fbinfo.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32273>
2024-12-06 10:40:03 +00:00
Benjamin Lee
c324790ca8 panvk: treat provoking vertex as dynamic state
Needed for VK_EXT_provoking_vertex, and makes the fbinfo provoking
vertex requirements easier to follow.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32273>
2024-12-06 10:40:03 +00:00
Benjamin Lee
c383859a07 panvk: refactor fbinfo into a temp var in get_tiler_desc
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32273>
2024-12-06 10:40:03 +00:00
David Rosca
1a90c3102b radeonsi/vcn: Don't allow encoding H264 B-frame references
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12242

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32479>
2024-12-06 10:00:47 +00:00
David Rosca
cd8ad03364 frontends/va: Store picture type for buffers in encode DPB
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32479>
2024-12-06 10:00:47 +00:00
Friedrich Vock
c2f8f20ef7 radv,driconf: Apply DOOM Eternal/idTech workarounds for Indiana Jones
It's based on idTech and exhibits the same idTech bugs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32521>
2024-12-06 09:21:17 +00:00
Karmjit Mahil
047049dcb5 nir: Fix the spelling of compare
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32189>
2024-12-06 08:42:36 +00:00
Karmjit Mahil
b79994e92d nir,ir3: Add icsel_eqz
In IR3 `sel.b32` works based on the 0 so add `icsel_eqz` to fuse the
cmp and sel that we'd otherwise need.

total Instruction Count in shared programs: 1112814 -> 1110473 (-0.21%)
Instruction Count in affected programs: 162701 -> 160360 (-1.44%)
helped: 81
HURT: 29
Instruction count are helped.

total MOV Count in shared programs: 86777 -> 88671 (2.18%)
MOV Count in affected programs: 28119 -> 30013 (6.74%)
helped: 1
HURT: 292
Mov count are HURT.

total COV Count in shared programs: 15070 -> 14962 (-0.72%)
COV Count in affected programs: 5770 -> 5662 (-1.87%)
helped: 76
HURT: 2
Cov count are helped.

total Last helper instruction in shared programs: 592729 -> 590638 (-0.35%)
Last helper instruction in affected programs: 91331 -> 89240 (-2.29%)
helped: 30
HURT: 1
Last helper instruction are helped.

total Instructions with SS sync bit in shared programs: 29336 -> 29546 (0.72%)
Instructions with SS sync bit in affected programs: 4702 -> 4912 (4.47%)
helped: 8
HURT: 43
Instructions with ss sync bit are HURT.

total Estimated cycles stalled on SS in shared programs: 111590 -> 112401 (0.73%)
Estimated cycles stalled on SS in affected programs: 27708 -> 28519 (2.93%)
helped: 21
HURT: 61
Estimated cycles stalled on ss are HURT.

total cat1 instructions in shared programs: 101933 -> 103695 (1.73%)
cat1 instructions in affected programs: 35804 -> 37566 (4.92%)
helped: 18
HURT: 290
Cat1 instructions are HURT.

total cat2 instructions in shared programs: 380299 -> 377499 (-0.74%)
cat2 instructions in affected programs: 128609 -> 125809 (-2.18%)
helped: 322
HURT: 0
Cat2 instructions are helped.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32189>
2024-12-06 08:42:36 +00:00
Karmjit Mahil
aad0aa0a9c nir/algebraic: turn u{ge,lt} a, 1 to i{ne,eq} a, 0
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32189>
2024-12-06 08:42:36 +00:00
Samuel Pitoiset
6b671d4dab radv: remove redundant drirc for incorrect dual-source blending
The pass that lowers PS outputs has been rewritten since 45d8cd037a
("ac/nir: rewrite ac_nir_lower_ps epilog to fix dual src blending
with mono PS") to handle invalid uses of dual-source blending.

This drirc used to workaround game bugs on GFX11 only should no longer
be necessary.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32514>
2024-12-06 07:54:23 +00:00
Ian Romanick
e1bb53bb3c nir/algebraic: Optimize some trivial bfi
In fossil-db, one big compute shader on Hogwarts Legacy is helped for
spills and fills. It has a lot of instances of bfi(0x3f, a, a).

On Tiger Lake and Skylake, a compute shader in Unicom that has a
single instance of this pattern is hurt for spills and fills. I think
this is just due to non-determinism in the register allocation
algorithm.

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total instructions in shared programs: 16992643 -> 16992548 (<.01%)
instructions in affected programs: 17533 -> 17438 (-0.54%)
helped: 33 / HURT: 0

total cycles in shared programs: 914313986 -> 914316238 (<.01%)
cycles in affected programs: 3734544 -> 3736796 (0.06%)
helped: 26 / HURT: 6

fossil-db:

Lunar Lake, Meteor Lake, DG2, and Ice Lake had similar results. (Lunar Lake shown)
Totals:
Instrs: 208952780 -> 208952537 (-0.00%)
Send messages: 10934879 -> 10934875 (-0.00%)
Cycle count: 30988230904 -> 30988228660 (-0.00%); split: -0.00%, +0.00%
Spill count: 534864 -> 534843 (-0.00%)
Fill count: 667081 -> 667068 (-0.00%)
Max live registers: 65686656 -> 65686624 (-0.00%)
Non SSA regs after NIR: 244185358 -> 244185335 (-0.00%)

Totals from 3 (0.00% of 704834) affected shaders:
Instrs: 4708 -> 4465 (-5.16%)
Send messages: 234 -> 230 (-1.71%)
Cycle count: 264382 -> 262138 (-0.85%); split: -0.88%, +0.03%
Spill count: 91 -> 70 (-23.08%)
Fill count: 73 -> 60 (-17.81%)
Max live registers: 647 -> 615 (-4.95%)
Non SSA regs after NIR: 3957 -> 3934 (-0.58%)

Tiger Lake
Totals:
Instrs: 230516919 -> 230515185 (-0.00%); split: -0.00%, +0.00%
Send messages: 12657684 -> 12657680 (-0.00%)
Cycle count: 23060318600 -> 23060279758 (-0.00%); split: -0.00%, +0.00%
Spill count: 548462 -> 548446 (-0.00%); split: -0.00%, +0.00%
Fill count: 582304 -> 582294 (-0.00%); split: -0.00%, +0.00%
Scratch Memory Size: 19538944 -> 19539968 (+0.01%)
Max live registers: 41713622 -> 41713593 (-0.00%)
Non SSA regs after NIR: 260667939 -> 260667712 (-0.00%); split: -0.00%, +0.00%

Totals from 174 (0.02% of 794323) affected shaders:
Instrs: 158346 -> 156612 (-1.10%); split: -1.13%, +0.04%
Send messages: 14330 -> 14326 (-0.03%)
Cycle count: 24859875 -> 24821033 (-0.16%); split: -0.32%, +0.16%
Spill count: 183 -> 167 (-8.74%); split: -9.29%, +0.55%
Fill count: 284 -> 274 (-3.52%); split: -7.39%, +3.87%
Scratch Memory Size: 9216 -> 10240 (+11.11%)
Max live registers: 12587 -> 12558 (-0.23%)
Non SSA regs after NIR: 164466 -> 164239 (-0.14%); split: -0.16%, +0.02%

Skylake
Totals:
Instrs: 158904982 -> 158903764 (-0.00%)
Send messages: 8490500 -> 8490496 (-0.00%)
Cycle count: 19732284279 -> 19732345496 (+0.00%); split: -0.00%, +0.00%
Spill count: 519127 -> 519115 (-0.00%)
Fill count: 594283 -> 594290 (+0.00%); split: -0.00%, +0.00%
Max live registers: 33708764 -> 33708739 (-0.00%)
Non SSA regs after NIR: 169377234 -> 169377007 (-0.00%); split: -0.00%, +0.00%

Totals from 174 (0.03% of 648725) affected shaders:
Instrs: 160391 -> 159173 (-0.76%)
Send messages: 14354 -> 14350 (-0.03%)
Cycle count: 24776486 -> 24837703 (+0.25%); split: -0.07%, +0.32%
Spill count: 332 -> 320 (-3.61%)
Fill count: 587 -> 594 (+1.19%); split: -0.17%, +1.36%
Max live registers: 12709 -> 12684 (-0.20%)
Non SSA regs after NIR: 166557 -> 166330 (-0.14%); split: -0.16%, +0.02%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32493>
2024-12-05 21:39:07 +00:00
José Roberto de Souza
04bdbeec31 intel/dev/xe: Fix access to eu_per_dss_mask
DRM_XE_TOPO_EU_PER_DSS and DRM_XE_TOPO_SIMD16_EU_PER_DSS can be any
number of bytes long but it was assuming it was always 4 bytes long.
That was not a issue because Xe KMD return 4 bytes even if only needs
1 or 2 bytes but that is a problem with our HW simulator that was
returning 2 bytes.

Fixes: a24d93aa89 ("intel/dev: Query and compute hardware topology for Xe")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32307>
2024-12-05 20:30:44 +00:00
Lionel Landwerlin
371b7a9b0d anv: set pipeline flags correct for imported libs
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3d49cdb71e ("anv: implement VK_EXT_graphics_pipeline_library")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32507>
2024-12-05 19:53:34 +00:00
Lionel Landwerlin
6e396b400a anv: fix missing bindings valid dynamic state change check
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ddd296cd3 ("anv: implement VK_EXT_vertex_input_dynamic_state")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32507>
2024-12-05 19:53:34 +00:00
Adam Jackson
266dfb15c1 docs/envvars: Combine WGL sections
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32316>
2024-12-05 19:46:38 +00:00
Adam Jackson
f447e31daa docs/envvars: Remove mention of IRIS_ENABLE_CLOVER
This went away when clover dropped nir driver support.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32316>
2024-12-05 19:46:38 +00:00
Eric R. Smith
a2f96667e2 mesa: update more drivers to handle pipe_blit_info swizzle_enable
Handle swizzling by falling through to the software path. Swizzle
should be rarely enabled, so this shouldn't affect performance in
most cases.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31378>
2024-12-05 18:27:37 +00:00
Eric R. Smith
3da4a404ae aux: add support for dumping the swizzle in pipe_blit_info
Just some additional debug code for the new blit swizzle feature.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31378>
2024-12-05 18:27:37 +00:00
Eric R. Smith
b81aefcc19 mesa: when blitting between formats clear any unused components
If the state tracker chooses to implement one format with a more
general one (e.g. GL_ALPHA implemented with GL_RGBA) we end up
in a situation where some components should be ignored. Readpix
handles this correctly, but blit does not, which means that if
we blit between different formats we can end up writing garbage
into some components. Work around this by adding an explicit
swizzle to the pipe_blit_info struct, which can re-arrange elements
and/or put 0 or 1 into appropriate channels, and use this to
set the appropriate values into unused channels via the sampler
view.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31378>
2024-12-05 18:27:37 +00:00
Erik Faye-Lund
9f69f7a66d panvk: free preload-shaders after compiling
These shaders are created using nir_builder_init_simple_shader(), which
allocates using a NULL ralloc-parent, so ralloc_free should be the right
function to free them with.

Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32486>
2024-12-05 17:45:16 +00:00
Erik Faye-Lund
43738a9a94 vulkan/meta: plug a couple of memory leaks
We create NIR shaders here, and we need to free them when we're done with
them as well.

These shaders are created using nir_builder_init_simple_shader(), which
allocates using a NULL ralloc-parent, so ralloc_free should be the right
function to free them with.

Fixes: 514c10344e ("vulkan/meta: Add a concept of rect pipelines")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32486>
2024-12-05 17:45:16 +00:00
Tomeu Vizoso
3aad0afc30 teflon/tests: Also use the cache for models in the test suite
To speed things up now that we have more models under testing.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:27 +00:00
Tomeu Vizoso
74239aeb77 teflon/tests: Add support for models with float inputs and outputs
Ended up deciding to drop C++ collections and use instead C pointers
because the template use was starting to get ridiculous.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:27 +00:00
Tomeu Vizoso
f21d8af43a teflon: Don't crash when a tensor isn't quantized
We don't support yet hardware that can deal with floats, but it is
better not to crash.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:27 +00:00
Tomeu Vizoso
a548b17b4e teflon: Rename model tests so they aren't skipped by gtest-runner
The regular expression engine in gtest-runner was matching more tests
than we wanted, so we weren't testing all we thought.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:26 +00:00
Tomeu Vizoso
1e117478d4 teflon: Support tests with inputs with less than 4 dims
Needed in models such as YOLOX.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:26 +00:00
Tomeu Vizoso
140150083e teflon: Add tests for the YOLOX model
The model was generated from:

https://github.com/Megvii-BaseDetection/YOLOXa (Apache License 2.0)

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32485>
2024-12-05 17:02:26 +00:00
David Rosca
8d3d35bf05 frontends/va: Add support for VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_3
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32113>
2024-12-05 16:34:09 +00:00
Lionel Landwerlin
80c0d2718c anv: report formats supported by the common bvh framework
Enables DXR 1.1 with vkd3d-proton

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge<sagar.ghuge@intel.com>
Reviewed-by: Kevin Chuang <kaiwenjon23@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32487>
2024-12-05 15:54:10 +00:00
Eric R. Smith
aba90c1523 panfrost: check afbc status in panfrost_query_compression_modifiers
In panfrost_query_compression_modifiers we need to ignore AFBC
modifiers if the device does not support AFBC. In order to avoid
duplicating code, we do this by calling panfrost_walk_dmabuf_modifiers
with a flag that indicates we do not want AFRC modifiers.

Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32406>
2024-12-05 14:54:09 +00:00
Marek Olšák
dfc2f054b6 radeonsi/ci: update navi31 failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
ed4606a062 radeonsi/ci: remove --slow
The tests were split or reduced in glcts.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
c0ccae84a7 radeonsi/ci: remove most flakes and some skips, update navi31 failures
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
af618dd907 radeonsi/ci: stop using a global flakes list, only use a per-chip flakes list
We need to start treating flakes as fails and they are likely different
between chips.

I removed the gfx9 flakes file and renamed the original flakes file
to gfx6-tahiti-flakes.csv, but it would be better to add a new flakes
file for each generation we test.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
3ff8111fc6 radeonsi/ci: handle glinfo errors better
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
738a501e92 radeonsi: don't compute total_direct_count in si_draw if it's unused
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
ed372d4b7c radeonsi: try to fix Navi14 regression in debug builds
Assertion failure:
    ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:1369: unsigned int si_get_input_prim(const
    si_shader_selector*, const si_shader_key*, bool): Assertion `gs->stage == MESA_SHADER_VERTEX' failed.

Fixes: 7e959864b2 ("radeonsi: enable NGG culling for non-monolithic TES and GS")

Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
a3c293cdcd radeonsi: revert to always returning true for load_cull_any_enabled_amd
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Marek Olšák
511a637a5c radeonsi: pass cull face state via user SGPRs for shader culling
The culling code always computes the determinant for culling zero-area
triangles, so passing the state via user SGPRs doesn't really add much
shader code to justify having shader variants for front/back face
culling that uses the same determinant.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32288>
2024-12-05 12:07:06 +00:00
Alyssa Rosenzweig
ca9bf43d0b nir,asahi: make argument alignment configurable
this is more flexible. Mali needs 32-bit alignment, for example.

I added an option struct in case we need to make this a callback or something
later.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32398>
2024-12-05 10:58:51 +00:00
Alyssa Rosenzweig
0d77e91ca3 nir/opt_load_store_vectorize: match amul like imul
for AGX, we preserve amul all the way until fusing address modes in order to be
able to fuse effectively. so the load/store vectorizer wouldn't vectorize before
fusing.

however, after fusing we get fused intrinsics which are tricky to teach the
vectorizer about as their semantics are pretty subtle. so we can't vectorize
after, either.

the easiest solution is to teach the vectorize about amul, which can always be
replaced by imul for our pattern matches.

this fixes certain cases of vectorization in OpenCL kernels on asahi.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32398>
2024-12-05 10:58:51 +00:00
Alyssa Rosenzweig
77d4ed0a01 nir/opt_algebraic: optimize sign bit manipulation
libclc loves to generate the iand(0x7fffffff) pattern. ior/ixor patterns are
added for completeness.

Shaves 4 instructions off libclc vec4 normalize.

v2: Loop over the bit sizes (Georg).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> [v1]
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32398>
2024-12-05 10:58:51 +00:00
Alyssa Rosenzweig
be049e1c14 nir/search_helpers: handle bcsel in is_only_used_as_float
this lets algebraic see through chains of instructions.

v2: Limit recursion depth (Georg).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> [v1]
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32398>
2024-12-05 10:58:51 +00:00
Pavel Ondračka
ecc4d5da67 i915/ci: update CI expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32494>
2024-12-05 09:35:43 +00:00
Boris Brezillon
19231c7ae3 pan: s/NIR_PASS_V/NIR_PASS/
Move away from NIR_PASS_V() like other drivers have done long ago.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Boris Brezillon
b47cf63cca panvk: s/NIR_PASS_V/NIR_PASS/
Move away from NIR_PASS_V() like other drivers have done long ago.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Boris Brezillon
7e78aa73dd panfrost: Use nir_shader_intrinsics_pass() for the line_smooth lowering pass
We have a helper function to iterate only on intrinsics, so let's use it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Boris Brezillon
34beb93635 panfrost: s/NIR_PASS_V/NIR_PASS/
Move away from NIR_PASS_V() like other drivers have done long ago.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Boris Brezillon
98e3c1e6fb nir: Let nir_lower_texcoord_replace_late() report progress
Useful if we want to wrap this pass with a NIR_PASS() to enforce
validation.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
2024-12-05 08:49:45 +00:00
Samuel Pitoiset
ea112cf84d ci: update VKCTS main to a9f7069b9a5ba94715a175cb1818ed504add0107
This contains many more tests for Vulkan 1.4, but the Vulkan loader
probably needs an update too.

This should only affect RADV which is the only user for VKCTS main.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32475>
2024-12-05 08:06:23 +00:00
Samuel Pitoiset
8b755840fc radv: fix initializing HTILE when the image has VRS rates
VRS rates should only be preserved for clears, otherwise the HTILE
buffer should be cleared completely.

This fixes some failures/flakes in CI.

Fixes: 8197d744f5 ("radv: Do not overwrite VRS rates when doing fast clears")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32463>
2024-12-05 07:34:58 +00:00
Samuel Pitoiset
e73fdac9a6 radv: enable DGC IES for compute with ESO
This was supposed to be enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32484>
2024-12-05 07:06:17 +00:00
Simon Perretta
e26a383ee8 pco: fix x86 build
Use inttypes.h when printing variables whose format specifier changes
across different archs.

Fixes: 37d47913
Fixes: e67e4452
Closes: #12238
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32492>
2024-12-05 00:50:16 +00:00
Dylan Baker
43bdc84831 docs: update calendar for 24.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32491>
2024-12-05 00:43:50 +00:00
Dylan Baker
fd0da8eb80 docs: Add SHA sums for 24.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32491>
2024-12-05 00:43:50 +00:00
Dylan Baker
a3715349fd docs: add release notes for 24.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32491>
2024-12-05 00:43:50 +00:00
Ian Romanick
0754a18621 brw/copy: Allow copy prop into src1 of broadcast
This is the selector, and it must always be a uniform UD, so there's no
reason to not propagate into it.

No shader-db change on any Intel platform.

fossil-db:

All Intel platforms had similar results. (Lunar Lake shown)
Totals:
Instrs: 220507131 -> 220507127 (-0.00%)
Cycle count: 31607052398 -> 31607053364 (+0.00%); split: -0.00%, +0.00%

Totals from 5 (0.00% of 702410) affected shaders:
Instrs: 995 -> 991 (-0.40%)
Cycle count: 86392 -> 87358 (+1.12%); split: -0.07%, +1.19%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32097>
2024-12-05 00:15:27 +00:00
Ian Romanick
662339a2ff brw/build: Use SIMD8 temporaries in emit_uniformize
The fossil-db results are very different from v1. This is now mostly
helpful on older platforms.

v2: When optimizing BROADCAST or FIND_LIVE_CHANNEL to a simple MOV,
adjust the exec_size to match the size allocated for the destination
register. Fixes EU validation failures in some piglit OpenCL tests
(e.g., atomic_add-global-return.cl).

v3: Use component_size() in emit_uniformize and BROADCAST to properly
account for UQ vs UD destination. This doesn't matter for
emit_uniformize because the type is always UD, but it is technically
more correct.

v4: Update trace checksums. Now amly expects the same checksum as
several other platforms.

v5: Use xbld.dispatch_width() in the builder for when scalar_group()
eventually becomes SIMD1. Suggested by Lionel.

shader-db:

Lunar Lake, Meteor Lake, DG2, and Tiger Lake had similar results. (Lunar Lake shown)
total instructions in shared programs: 18091701 -> 18091586 (<.01%)
instructions in affected programs: 29616 -> 29501 (-0.39%)
helped: 28 / HURT: 18

total cycles in shared programs: 919250494 -> 919123828 (-0.01%)
cycles in affected programs: 12201102 -> 12074436 (-1.04%)
helped: 124 / HURT: 108

LOST:   0
GAINED: 1

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20480808 -> 20480624 (<.01%)
instructions in affected programs: 58465 -> 58281 (-0.31%)
helped: 61 / HURT: 20

total cycles in shared programs: 874860168 -> 874960312 (0.01%)
cycles in affected programs: 18240986 -> 18341130 (0.55%)
helped: 113 / HURT: 158

total spills in shared programs: 4557 -> 4555 (-0.04%)
spills in affected programs: 93 -> 91 (-2.15%)
helped: 1 / HURT: 0

total fills in shared programs: 5247 -> 5243 (-0.08%)
fills in affected programs: 224 -> 220 (-1.79%)
helped: 1 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 220486064 -> 220486959 (+0.00%); split: -0.00%, +0.00%
Subgroup size: 14102592 -> 14102624 (+0.00%)
Cycle count: 31602733838 -> 31604733270 (+0.01%); split: -0.01%, +0.02%
Max live registers: 65371025 -> 65355084 (-0.02%)

Totals from 12130 (1.73% of 702392) affected shaders:
Instrs: 5162700 -> 5163595 (+0.02%); split: -0.06%, +0.08%
Subgroup size: 388128 -> 388160 (+0.01%)
Cycle count: 751721956 -> 753721388 (+0.27%); split: -0.54%, +0.81%
Max live registers: 1538550 -> 1522609 (-1.04%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 241601142 -> 241599114 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 9631168 -> 9631216 (+0.00%)
Cycle count: 25101781573 -> 25097909570 (-0.02%); split: -0.03%, +0.01%
Max live registers: 41540611 -> 41514296 (-0.06%)
Max dispatch width: 6993456 -> 7000928 (+0.11%); split: +0.15%, -0.05%

Totals from 16852 (2.11% of 796880) affected shaders:
Instrs: 6303937 -> 6301909 (-0.03%); split: -0.11%, +0.07%
Subgroup size: 323592 -> 323640 (+0.01%)
Cycle count: 625455880 -> 621583877 (-0.62%); split: -1.20%, +0.58%
Max live registers: 1072491 -> 1046176 (-2.45%)
Max dispatch width: 76672 -> 84144 (+9.75%); split: +14.04%, -4.30%

Tiger Lake
Totals:
Instrs: 235190395 -> 235193286 (+0.00%); split: -0.00%, +0.00%
Cycle count: 23130855720 -> 23128936334 (-0.01%); split: -0.02%, +0.01%
Max live registers: 41644106 -> 41620052 (-0.06%)
Max dispatch width: 6959160 -> 6981512 (+0.32%); split: +0.34%, -0.02%

Totals from 15102 (1.90% of 793371) affected shaders:
Instrs: 5771042 -> 5773933 (+0.05%); split: -0.06%, +0.11%
Cycle count: 371062226 -> 369142840 (-0.52%); split: -1.04%, +0.52%
Max live registers: 989858 -> 965804 (-2.43%)
Max dispatch width: 61344 -> 83696 (+36.44%); split: +38.42%, -1.98%

Ice Lake and Skylake had similar results. (Ice Lake shown)
Totals:
Instrs: 236063150 -> 236063242 (+0.00%); split: -0.00%, +0.00%
Cycle count: 24516187174 -> 24516027518 (-0.00%); split: -0.00%, +0.00%
Spill count: 567071 -> 567049 (-0.00%)
Fill count: 701323 -> 701273 (-0.01%)
Max live registers: 41914047 -> 41913281 (-0.00%)
Max dispatch width: 7042608 -> 7042736 (+0.00%); split: +0.00%, -0.00%

Totals from 3904 (0.49% of 798473) affected shaders:
Instrs: 2809690 -> 2809782 (+0.00%); split: -0.02%, +0.03%
Cycle count: 182114259 -> 181954603 (-0.09%); split: -0.34%, +0.25%
Spill count: 1696 -> 1674 (-1.30%)
Fill count: 2523 -> 2473 (-1.98%)
Max live registers: 341695 -> 340929 (-0.22%)
Max dispatch width: 32752 -> 32880 (+0.39%); split: +0.44%, -0.05%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32097>
2024-12-05 00:15:27 +00:00
Ian Romanick
d2b266187d brw: Use resize_sources several more places
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32097>
2024-12-05 00:15:27 +00:00
Ian Romanick
12d1886b87 brw/lower: Don't "fix" regioning of broadcast
The next two commits modify the destination regioning in a way that,
which still correct, trigger assertion failures if we try to fix the
regioning here.

Broadcast gets lowered in brw_eu_emit. For the purposes of region
restrictions, let's assume that the final code emission will do the
right thing. Doing a bunch of shuffling here is only going to make a
mess of things.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32097>
2024-12-05 00:15:27 +00:00
Chia-I Wu
f9b41056e9 panvk: use cs_tracing_ctx::enabled for exception handler
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32469>
2024-12-04 23:47:07 +00:00
Chia-I Wu
50c3615115 panvk/csf: fix subqueue ctx memory pool
We want NC when tracing and cached when not tracing.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32469>
2024-12-04 23:47:07 +00:00
Chia-I Wu
c83b3de729 panvk/csf: fix SIMULTANEOUS_USE gpu faults
tracing_ctx is always non-NULL in issue_fragment_jobs.  Check
tracing_ctx->enabled instead.  This fixes GPU faults when the desc
ringbuf wraps.

Fixes: bd49fa68b0 ("panvk/csf: Use event-based CS tracing")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32469>
2024-12-04 23:47:07 +00:00
Caio Oliveira
cbc45ac99e intel/brw: Enable EU validation and compaction tests for PTL
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32195>
2024-12-04 23:03:11 +00:00
Erik Faye-Lund
1f294e808c panvk: expose KHR_dedicated_allocation
Caterina already implemented this in ed64fa034b ("panvk: never prefer or
require dedicated allocation for buffers") and dbdaefb6ed ("panvk: never
require dedicated allocation for images"), so let's flip the switch.

We pass 4505 of the CTS tests, and fail a single one. Let's mark that
one as an expected failure and move on for now.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32466>
2024-12-04 21:34:59 +00:00
Kai Wasserbäch
8a453669e2 fix(FTBFS): clc/clover: pass a VFS instance explicitly
This just replicates what upstream did before breaking mesa with commit
df9a14d7bbf and requiring a VFS instance.

Reported-by: @Lone_Wolf
Reference: <df9a14d7bb>
Closes: <https://gitlab.freedesktop.org/mesa/mesa/-/issues/12223>
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32439>
2024-12-04 19:55:56 +00:00
Sagar Ghuge
9afb0480c4 intel/compiler: Extend nir_intrinsic_load_topology_id_intel for xe3
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32426>
2024-12-04 19:20:51 +00:00
Caio Oliveira
369942b76c mr-label-maker: Rules for intel/executor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32198>
2024-12-04 19:14:02 +00:00
Jose Maria Casanova Crespo
d0f4d0b6d0 v3d/ci: update rpi expectations by last piglit uprev
Fixes: 52f13f5603 ("Uprev Piglit to 468221c722481c470e6a23760b914c33143c2af6")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32482>
2024-12-04 16:57:24 +00:00
Karol Herbst
12752228db rusticl/util: rename Properties::from_ptr to new
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:08 +00:00
Karol Herbst
d791135df1 rusticl/api: remove Option around Properties
It already has the right semantics we are looking for.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:08 +00:00
Karol Herbst
825936b3f8 rusticl/util: make Properties::from_ptr unsafe
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
86453fe053 rusticl/api: use Properties for 0 terminated arrays consistently
Now that the semantics of Properties match exactly what we need here,
let's use it for all queries with 0 terminated arrays.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
976dd83a7a rusticl/api: simplify CLProp implementation of Properties
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
efab5cab9f rusticl/util: reimplement Properties over Vec of scalars
Tuples don't have a well defined layout, which might make it inefficient
to copy from.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
237f081866 rusticl/util: make Properties::props private
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
b4b01498a6 rusticl/util: add Properties::iter()
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
da5cf9414e rusticl/util: add Properties::is_empty() and len()
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
ef9910df4f rusticl/api: mark get_info and get_info_obj as unsafe
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
3692bb3429 rusticl/proc: make generated entry points unsafe
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
3a155a4591 rusticl/context: use write_iter for CL_DEVICES_FOR_GL_CONTEXT_KHR
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
86a279c36b rusticl/api: use constant arrays instead of Vecs for queries
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
67abda9fd5 rusticl/platform: pass the slice directly for CL_PLATFORM_EXTENSIONS_WITH_VERSION
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
379e72e7ed rusticl/program: use write_len_only for CL_PROGRAM_IL
The spec mandates that if the program object isn't created from IL, it
should not touch the buffer. Passing an empty slice would achieve that,
but it's better to be explicit here.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
69fd3a33dc rusticl/program: pass the slice directly for CL_PROGRAM_IL
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
ac292ad452 rusticl/program: use write_iter for CL_PROGRAM_DEVICES
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
aed4a7bf83 rusticl/program: use write_len_only for CL_PROGRAM_BINARIES
This query would simply write back the same content, so skip it.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
45af2e45f3 rusticl/api: add a write_iter variant for writing API properties
This allows us to get rid of temporary vectors or other allocations.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
26e08accca rusticl/api: add a write_len_only variant for writing API properties
For some queries we do not want to touch the buffer at all, this helps out
with that.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
008caff86d rusticl: rework query APIs
The old way was quite annoying as it required to create a Vec to even get
the size of the result causing needless computations.

This also meant that copying into the result buffer always required to go
through a byte Vec even though we could just do the copy directly.

The main idea here is that instead of returning the result, we simply call
into a write function giving us more flexibility here.

Potentially this will also allow us to add overloads for Iterators or to
even use closures in case the size calculation is cheaper than creating
the value just to get the size.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Karol Herbst
6fd6de46dc rusticl/program: check if provided binary pointers are null
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32268>
2024-12-04 16:20:07 +00:00
Friedrich Vock
ff76d27554 vulkan/runtime/bvh: Set leaf_node_count for updates
Since the leaf node pass doesn't run for updates, leaf_node_count never
got set. This resulted in updates always running on 0 leaves (i.e. being
no-ops).

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32451>
2024-12-04 15:36:15 +00:00
Marek Olšák
3effa3d53b nir/lower_io_passes: lower indirect IO for TCS
nir_lower_io_to_temporaries doesn't do anything and gives up when it gets TCS.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
943360c86b amd/ci: add piglit failures due to a overzealous test
It's missing: https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/976

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
f5a0cde125 nir/opt_varyings: fix compile failures in the disabled PRINT code
linkage is a pointer, but it was used as a structure.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
dd788d0a7f nir/opt_varyings: remove rare dead output stores after inter-shader code motion
Backward inter-shader code motion left dead output stores in the producer
in rare cases. Those dead stores would then make their way into drivers
and hw.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
f0c4e71d58 nir/opt_varyings: fix getting deref variables for sysvals
This might fix array system values. Noticed by luck.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
dcc679ab3a nir/opt_varyings: add inter-shader code motion for uniform/UBO indexing
If input_value, index, index1 or index2 is an input, here are examples of
code that this commit moves from consumers to producers:
* input_value * uniform_array[index]
* uniform_array[index]
* ubo[0].array[index]
* ubo[index].var
* ubo[index1].array[index2]

If the array index is computed from an input, it must be flat or convergent
within a primitive to be moved. If the array index is not an input, it must
be a uniform expression.

dEQP-GLES31.functional.shaders.opaque_type_indexing.ubo.dynamically_uniform_fragment
has UBO indexing that is moved to the producer by this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
f52ae35d73 nir/opt_varyings: propagate indirect uniform/UBO loads into the next shader
Uniform and UBO loads with non-constant indices are now propagated.
The majority of this code implements cloning deref chains.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
d8468d5463 amd,zink: remove options.varying_estimate_instr_cost callbacks
They are a maintainenance burden since they would need changes to
support more instruction types that nir_opt_varyings will be able to
move between shaders, and they are almost identical to
default_varying_estimate_instr_cost, so just use that.

The cost threshold is adjusted for AMD because
default_varying_estimate_instr_cost is slightly different.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
c0de78f120 nir/opt_varyings: change try_move_postdominator param to nir_instr type
We want more instructions to be movable, like
load_deref(var, index = load_input).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
8e39e8ed4d nir/opt_varyings: make top-level compaction code for TES, TCS, GS separate
Add a separate "if" block for each and use a helper for repeated code.
There will be more code added here that keeping TES, TCS, and GS compaction
code unified would be a mess.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
d20e07dbad nir/opt_varyings: fix max_slot for color varying compaction
It should be in units of slots. This was unlikely to break anything.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
69b1853ecf nir/opt_varyings: count the number of unused components for compaction correctly
Holes due to indirectly-indexed inputs were ignored, making the compaction
worse when such inputs were present alongside convergent inputs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
1aa9fec542 nir/opt_varyings: fix compaction with sparse indirect FS inputs
Without this, compaction can put inputs into vec4 slots already occupied
by indirectly-accessed inputs while ignoring their interpolation qualifier,
which is incorrect.

All input components sharing the same vec4 slot must use interpolation
qualifiers that are compatible with each other.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
b01f3cea7a nir/opt_varyings: remove redundant conditions from a while loop
Most of these conditions are repeated below with a continue statement.
This just puts break at the end where all of them are false.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
a618a2aa8b nir/linking_helpers: don't promote interpolated varyings to flat
Even the most flexible interpolation that we have in NIR options
(nir_io_has_flexible_input_interpolation_except_flat) doesn't allow
mixing flat and non-flat in the same vec4. This (legacy) optimization
can't promote interpolated inputs to flat if it doesn't consider
the interpolation mode of the whole vec4 slot.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
16f7d22394 util/bitset: add BITSET_GET_RANGE_INSIDE_WORD
to be used later

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Marek Olšák
da3f9e3626 util/bitset_test: test the return value of BITSET_TEST_RANGE_INSIDE_WORD better
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32424>
2024-12-04 13:40:41 +00:00
Konstantin Seurer
16f4b93cac lavapipe: Implement VK_KHR_compute_shader_derivatives
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31056>
2024-12-04 12:53:57 +00:00
Konstantin Seurer
eac613bc70 gallivm: Use an accurate log2 implementation for lodq
The fast implementation can be off by a lot for small values.

Fixes:

dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.compute.lod_op.query.linear.16_1_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.compute.lod_op.query.linear.16_1_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.compute.lod_op.query.linear.4_4_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.compute.lod_op.query.linear.4_4_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.mesh.lod_op.query.linear.16_1_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.mesh.lod_op.query.linear.16_1_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.mesh.lod_op.query.linear.4_4_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.mesh.lod_op.query.linear.4_4_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.task.lod_op.query.linear.16_1_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.task.lod_op.query.linear.16_1_1.mip_1
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.task.lod_op.query.linear.4_4_1.mip_0
dEQP-VK.spirv_assembly.instruction.compute.compute_shader_derivatives.task.lod_op.query.linear.4_4_1.mip_1

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31056>
2024-12-04 12:53:57 +00:00
Timothy Arceri
fcebbfc399 glsl: drop unused array refcount code and tests
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32450>
2024-12-04 11:50:57 +00:00
Sagar Ghuge
2af9853432 intel: Use the common RT BVH framework
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Michael Cheng
ed620bcd41 anv : Add tracepoint for as_build
Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Kevin Chuang
5098c0c5df anv: Add INTEL_DEBUG for bvh dump and visualization tools
This commit allows you to dump different regions of memory related to
bvh building. An additional script to decode the memory dump is also
added, and you're able to view the built bvh in 3D view in html. See the
included README.md for usage.

Rework:
- you can now view the actual child_coord in internalNode in html
- change exponent to be int8_t in the interpreter
- fix the actual coordinates using an updated formula
- now you can have 3D view of the bvh
- blockIncr could be 2 and vk_aabb should be first
- Now, if any bvh dump is enabled, we will zero out tlas, to prevent gpu
  hang caused by incorrect tlas traversal
- rootNodeOffset is back to the beginning
- Add INTEL_DEBUG=bvh_no_build.
- Fix type of dump_size
- add assertion for a 4B alignment
- when clearing out bvh, only clear out everything after
  (header+bvh_offset)
- TODO: instead of dumping on destory, track in the command buffer

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
5561db68c3 anv: Add helper to copy data from src to dest anv_address
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
41baeb3810 anv: Implement acceleration structure API
Rework: (Kevin)
- Properly setup bvh_layout
   Our bvh resides in contiguous memory and can be divided into two sections:
      1. anv_accel_struct_header, tightly followed by
      2. actual bvh, which starts with root node, followed by interleaving
         leaves or internal nodes.
- Update comments for some fields for BVH and nodes.
- Properly populate the UUIDs in serialization header
- separate header func into completely two paths based on compaction bit
- Encode rt_uuid at second VK_UUID_SIZE.
- Write query result at correct slot
- add assertion for a 4B alignment
- move bvh_layout to anv_bvh
- Use meson option to decide which files to compile
- The alignment of serialization size is not needed
- Change static_assert to STATIC_ASSERT and move them inside functions

Rework (Sagar)
- Use anv_cmd_buffer_update_buffer instead of MI to copy data

Rework (Lionel)
- Remove flush after builds, and add flush in copy before dispatch
- Handle the flushes in CmdWriteAccelerationStructuresPropertiesKHR properly

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
9002e52037 anv: Implement cmd_dispatch_unaligned callback
Rework: (Kevin)
- Calculate correct number of threads in GPGPU thread group based on
  SIMD size.
- Instead of round up, just use the simple division and let the
  remainder part handle groupCount < local_size_x.
- Drop indirect_unroll_off and fix the bug that we're not using is_unaligned_size_x

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
0cab02ca9b anv: Implement flush_buffer_write_cp callbck
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
b2cffdb1ed anv: Implement write_buffer_cp callback
Rework: (Kevin)
 - Fix pointer arithmatic calculation.
 - Add assertion for a 4B alignment

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
8817ff26fc anv: Move update buffer code in helper
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
0edf208ab9 anv: Implement cmd_fill_buffer_addr callback
Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Kevin Chuang
2fe57947e3 anv: Implement encode shader to fit in ANV BVH
This shader gets called and will construct ANV BVH from IR BVH. More
specifically, each invocation will take care of one internal node. The
internal nodes get processed starting from root node all the way to the
bottom leaves.

During processing, we keep track of the destination of
where the internal node should be encoded (tracked in
vk_ir_box.bvh_offset), and where its leaves should be encoded (tracked
in vk_ir_header.dst_node_offset).

The processed bvh is in contiguous memory, which starts with header,
followed by interleaving internal nodes and leaves. The nodes
information are also populated.

Rework: (Sagar)
- Return out of bounds threads early
- Mimic GRL internal node encoding
- Handle node mask
- Fix block_incr_and_start_prim
- Fix shader_index_and_geom_mask for instance node
- Fix instance flag
- Fix block_incr and instance_contribution_and_geom_flags initialized to be zero
- Fix lower_x and upper_x to be properly flipped for invalid child
- For invalid node, clear blockIncr and set startPrim to INVALID
- Calculated things upfront and assign, cutting down more than ~200
  instructions

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
692b5fa9f2 anv: Add shader to copy acceleration structures
Rework (Kevin)
- encode the address of anv_instance_leaf after header in order to
  handle serialization and deserialization part.
- draw serialized data layout and explanation

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
a6b1a1fce1 anv: Add shader to build BVH header
Rework: (Kevin)
- Calculate the compacted_size properly
- Update instance count and self pointer
- The alignment of serialization size is not needed

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
ef94b7097b anv: Add header to track BVH data structures
This commit adds build interface and helper header for ANV BVH.

Rework: (Kevin)
- Use block_size macro to represent bvh node/leaf size
- Rename BVH-related node/leaf size macros for clarity
- Updated comments for some fields for bvh and nodes.
- move bvh_layout to anv_bvh.h
- Draw anv_bvh layout
- rename child_offset to child_block_offset

Co-authored-by: Kevin Chuang <kaiwenjon23@gmail.com>
Co-authored-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:45 +00:00
Sagar Ghuge
617b7602ea anv: Split GRL code path in separate file
Rework (Kevin)
- Remove genX_acceleration_structure.c from meson option to avoid
  linking error

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:44 +00:00
Sagar Ghuge
b002b2589c anv: Update include dir for anv_tests
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
2024-12-04 10:41:44 +00:00
Samuel Pitoiset
5d072e0e73 radv: fix stencil only copies of depth/stencil images with SDMA
This was broken for two reasons:
- the number of bytes per element should be 1 (8-bit for stencil)
- the base offset should be adjusted for the stencil

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32459>
2024-12-04 09:30:36 +00:00
Lionel Landwerlin
69edf4144a brw: use transpose unspill messages when possible
This simplifies the unspill messages quite a bit.

A/B testing on DG2 :

BlackOps3 : +0.96%
TotalWarPharaoh: +0.31%

DG2 shader changes :

  Assassin's Creed Valhalla:
  Totals from 19 (0.89% of 2131) affected shaders:
  Instrs: 70542 -> 64369 (-8.75%)
  Cycle count: 18810945 -> 18560169 (-1.33%); split: -1.40%, +0.06%

  Black Ops 3:
  Totals from 55 (3.41% of 1612) affected shaders:
  Instrs: 389549 -> 350646 (-9.99%)
  Cycle count: 344168275 -> 340652311 (-1.02%); split: -1.17%, +0.15%

  Control:
  Totals from 1 (0.11% of 878) affected shaders:
  Instrs: 3409 -> 3212 (-5.78%)
  Cycle count: 255991 -> 250411 (-2.18%)

  Cyberpunk 2077:
  Totals from 1 (0.08% of 1264) affected shaders:
  Instrs: 2363 -> 2337 (-1.10%)
  Cycle count: 69283 -> 69186 (-0.14%)

  Fallout 4:
  Totals from 1 (0.06% of 1601) affected shaders:
  Instrs: 27946 -> 20056 (-28.23%)
  Cycle count: 2391398 -> 2153658 (-9.94%)

  Fortnite:
  Totals from 273 (3.65% of 7470) affected shaders:
  Instrs: 634377 -> 601519 (-5.18%)
  Cycle count: 31870433 -> 31624089 (-0.77%); split: -0.78%, +0.01%

  Hogwarts Legacy:
  Totals from 50 (3.02% of 1656) affected shaders:
  Instrs: 110455 -> 103339 (-6.44%)
  Cycle count: 6613728 -> 6530832 (-1.25%); split: -1.28%, +0.03%

  Metro Exodus:
  Totals from 70 (0.16% of 43076) affected shaders:
  Instrs: 253847 -> 245321 (-3.36%)
  Cycle count: 13269473 -> 13209131 (-0.45%)
  Spill count: 1111 -> 1108 (-0.27%)
  Fill count: 2868 -> 2865 (-0.10%)

  Red Dead Redemption 2:
  Totals from 139 (2.38% of 5847) affected shaders:
  Instrs: 496551 -> 450180 (-9.34%)
  Cycle count: 43233944 -> 40947386 (-5.29%); split: -5.33%, +0.04%
  Spill count: 6322 -> 6326 (+0.06%)
  Fill count: 15558 -> 15568 (+0.06%)

  Rise Of The Tomb Raider:
  Totals from 1 (0.56% of 178) affected shaders:
  Instrs: 1682 -> 1437 (-14.57%)
  Cycle count: 603670 -> 586766 (-2.80%)

  Spiderman Remastered:
  Totals from 820 (11.77% of 6965) affected shaders:
  Instrs: 4622877 -> 3984893 (-13.80%)
  Cycle count: 235094963186 -> 234483925430 (-0.26%); split: -0.42%, +0.16%
  Spill count: 73414 -> 73581 (+0.23%); split: -0.02%, +0.25%
  Fill count: 215090 -> 215627 (+0.25%); split: -0.02%, +0.27%
  Scratch Memory Size: 3520512 -> 3528704 (+0.23%); split: -0.12%, +0.35%

Some of stats show spilling changes which is telling of how our spill
code is not adequate. Some of the spilled values are probably being
respilled which shouldn't be the case.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32110>
2024-12-04 08:59:07 +00:00
Pavel Ondračka
dcfa8851bd ci: bring back some i915g testing
Only single g33 as part of r300 ci-tron-based farm.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32376>
2024-12-04 08:18:43 +00:00
Kenneth Graunke
2ade3ec2a9 brw: Allow SIMD32 math instructions on Xe2
There's no restriction here AFAICT - only when HF types are involved.

fossil-db results on Lunar Lake:

   Totals:
   Instrs: 143665291 -> 142654109 (-0.70%)
   Cycle count: 22516049016 -> 22514172014 (-0.01%); split: -0.02%, +0.01%
   Max live registers: 49038116 -> 49017687 (-0.04%); split: -0.04%, +0.00%

   Totals from 117623 (21.07% of 558370) affected shaders:
   Instrs: 25098642 -> 24087460 (-4.03%)
   Cycle count: 1038884570 -> 1037007568 (-0.18%); split: -0.48%, +0.29%
   Max live registers: 12423219 -> 12402790 (-0.16%); split: -0.16%, +0.00%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32471>
2024-12-04 02:42:34 +00:00
Kenneth Graunke
815236b417 brw: Fix register unit calculation in SIMD32 LOAD_PAYLOAD lowering
We were wanting to check if the destination region spanned multiple
registers.  But we were checking against REG_SIZE, when the register
size is actually REG_SIZE * reg_unit(devinfo) now.

This meant that SIMD32 LOAD_PAYLOAD was always getting SIMD-split
on Xe2 platforms, generating a lot of unnecessary mess for compute
shaders.

fossil-db results on Lunar Lake:

   Totals:
   Instrs: 146178614 -> 143291988 (-1.97%); split: -1.98%, +0.00%
   Subgroup size: 11089632 -> 11089376 (-0.00%); split: +0.00%, -0.00%
   Cycle count: 22528892444 -> 22507551650 (-0.09%); split: -0.12%, +0.03%
   Max live registers: 48834202 -> 48886685 (+0.11%); split: -0.09%, +0.20%

   Totals from 134306 (24.10% of 557327) affected shaders:
   Instrs: 28806335 -> 25919709 (-10.02%); split: -10.02%, +0.00%
   Subgroup size: 4297680 -> 4297424 (-0.01%); split: +0.00%, -0.01%
   Cycle count: 956867650 -> 935526856 (-2.23%); split: -2.84%, +0.61%
   Max live registers: 13085711 -> 13138194 (+0.40%); split: -0.33%, +0.73%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32471>
2024-12-04 02:42:34 +00:00
Caio Oliveira
dfa4c55a4f intel/brw: Add is_control_source for the new subgroup ops
Fixes: 019770f026 ("intel/brw: Add SHADER_OPCODE_VOTE_*")
Fixes: 9537b62759 ("intel/brw: Add SHADER_OPCODE_REDUCE")
Fixes: 0ba1159b0a ("intel/brw: Add SHADER_OPCODE_*_SCAN")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32411>
2024-12-04 01:19:37 +00:00
Nanley Chery
428a970511 anv: Only consider R32 image formats as supporting atomics
Only consider R32 image formats as supporting atomics because we only
expose VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT for those formats.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32192>
2024-12-03 22:54:35 +00:00
Nanley Chery
122c01a496 anv: Enable more storage compression on gfx12+
On gfx12.0, allow storage compression unless the image may be used with
atomics.

On gfx20, use the CCS_E aux-usage for storage compression. This causes
ISL to create surface states with more appropriate render compression
formats.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5657
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32192>
2024-12-03 22:54:35 +00:00
Nanley Chery
01c4ea771c anv: Enable storage accesses with modifiers on gfx12+
I tested this patch with an ACM card. It enables "Halo: The Master Chief
Collection" to use the clear color modifier instead falling back to the
uncompressed Tile4 modifier.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32192>
2024-12-03 22:54:35 +00:00
Nanley Chery
2dedd8dbb2 intel/isl: Fix DecompressInL3 assignment on gfx12.5
* In the ACM PRMs, the programming notes under
  RENDER_SURFACE_STATE::MemoryCompressionEnable state that the
  DecompressInL3 bit must be set for media compression.

* Unlike TGL, ACM seems to handle format reinterpretation just fine
  without using the bit.

Update the assignment accordingly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32192>
2024-12-03 22:54:34 +00:00
Autumn Ashton
7e9ea5c1b5 radv/video: Fix bitstreamStartOffset including dstBufferOffset
The bitstreamStartOffset from the VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR query in RADV is currently relative to the dstBuffer, and not dstBuffer + dstBufferOffset like the spec states.

To fix this, let's append the offset to the VA directly and not tell the encoder about the offset relative to the VA at all.

The Vulkan spec states:
"VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR specifies that queries managed by the pool will capture the byte offset of the bitstream data written by the video encode operation to the bitstream buffer specified in VkVideoEncodeInfoKHR::dstBuffer relative to the offset specified in VkVideoEncodeInfoKHR::dstBufferOffset."

The relevant part being that is is relative to dstBufferOffset and not the start of the VkBuffer.

Signed-off-by: Autumn Ashton <misyl@froggi.es>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32452>
2024-12-03 22:19:43 +00:00
Georg Lehmann
1a7ebfd2a8 radv: rework vk_property initialization
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32457>
2024-12-03 21:43:34 +00:00
Georg Lehmann
b961537a17 radv: fix reporting mesh/task/rt as supported dgc indirect stages
Fixes: 8300378bf3 ("radv: advertise VK_EXT_device_generated_commands on GFX8+")

Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32457>
2024-12-03 21:43:34 +00:00
Gurchetan Singh
03b527ea92 gfxstream: fix issues with VK1.4 build
Fixes build after VK1.4 update.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32446>
2024-12-03 20:35:44 +00:00
Gurchetan Singh
ade6a19f14 gfxstream: remove abort()
I have no idea why it just started complaining now about
this.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32446>
2024-12-03 20:35:44 +00:00
Erik Faye-Lund
7b8f5b0881 panvk: report minmax-support for sampled formats
We also need to report minmax as part of the format-features.

This fixes the following CTS tests for me:
- dEQP-VK.api.info.format_properties.r8_unorm
- dEQP-VK.api.info.format_properties.r8_snorm
- dEQP-VK.api.info.format_properties.r16_sfloat
- dEQP-VK.api.info.format_properties.r32_sfloat
- dEQP-VK.api.info.format_properties.d16_unorm

Fixes: 1fc454673a ("panvk: Implement VK_EXT_sampler_filter_minmax for v10")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32445>
2024-12-03 20:16:58 +00:00
Aleksi Sapon
0812a8bccc draw: front-face injection must check geometry shader primitive type
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32306>
2024-12-03 19:42:22 +00:00
Mary Guillemard
cdf822632a panvk: Add a nightly job for Mali-G52
We have quite a big fraction currently and it has been proven that we
are missing new failures right now.

This adds a new nightly job that run a full CTS on a single VIM3.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32421>
2024-12-03 19:11:30 +00:00
Mary Guillemard
913a7b26e1 panvk: Update Mali-G52 CI baseline
We seems to have new regressions that were introduced but never seen
because of the massive fraction used.

This adds the failures seen with a full run while trying to document
some.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32421>
2024-12-03 19:11:30 +00:00
Pavel Ondračka
61d890b6db r300/ci: update RV410 CI expectations
The test was almost passing before but we can't really always get the
required five decimal point tolerance with the R300/R400 hw.
nir_opt_algebraic improvements in 92797c6878
shuffled the ALUs a bit and we now do a bit better.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32458>
2024-12-03 18:48:32 +00:00
Konstantin Seurer
4ed867825a lavapipe: Implement VK_KHR_shader_float_controls2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31273>
2024-12-03 16:15:25 +00:00
Konstantin Seurer
540e84bedb gallivm: Preserve -0 and nan
Some operations need additional or different code to preserve the sign
of 0 or nan.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31273>
2024-12-03 16:15:25 +00:00
Konstantin Seurer
f5db70cb24 gallivm: Add float operation behavior flags to lp_type
Used to emit additional code if -0 or nan needs to be preserved.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31273>
2024-12-03 16:15:25 +00:00
Samuel Pitoiset
9df3c9e4a1 ac/parse_ib: print VA for the SDMA CONSTANT_FILL/WRITE packets
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32456>
2024-12-03 15:29:40 +00:00
Samuel Pitoiset
31524d42a2 ac/parse_ib: fix parsing SDMA CONSTANT_FILL packet
This packet only has 5 DWORDS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32456>
2024-12-03 15:29:39 +00:00
Georg Lehmann
34a47e4b14 nir/opt_algebraic: mark a - ffract(a) as nan incorrect.
Inf + fract(Inf) -> Inf + NaN -> NaN
floor(Inf) -> Inf

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32393>
2024-12-03 14:42:18 +00:00
Georg Lehmann
2ee96cf514 nir/opt_algebraic: optimize d3d9 ceil
No Foz-DB changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32393>
2024-12-03 14:42:18 +00:00
Georg Lehmann
34caed8adb nir/opt_algebraic: optimize d3d9 ftrunc
Foz-DB Navi21:
Totals from 85 (0.11% of 79395) affected shaders:
MaxWaves: 1972 -> 1968 (-0.20%)
Instrs: 48682 -> 47067 (-3.32%)
CodeSize: 255664 -> 247172 (-3.32%)
VGPRs: 3752 -> 3768 (+0.43%)
Latency: 154414 -> 150360 (-2.63%)
InvThroughput: 37186 -> 35081 (-5.66%)
VClause: 847 -> 865 (+2.13%); split: -0.24%, +2.36%
SClause: 768 -> 796 (+3.65%)
Copies: 2763 -> 2869 (+3.84%); split: -0.14%, +3.98%
VALU: 28133 -> 26781 (-4.81%)
SALU: 7182 -> 6939 (-3.38%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32393>
2024-12-03 14:42:18 +00:00
Georg Lehmann
ea4aa8e5a6 nir/opt_algebraic: optimize ffma(b2f, b2f, c)
Foz-DB Navi21:
Totals from 134 (0.17% of 79395) affected shaders:
Instrs: 153297 -> 153326 (+0.02%); split: -0.03%, +0.05%
CodeSize: 829520 -> 828444 (-0.13%); split: -0.13%, +0.00%
Latency: 900489 -> 899964 (-0.06%); split: -0.07%, +0.01%
InvThroughput: 267838 -> 267478 (-0.13%); split: -0.14%, +0.00%
VClause: 2452 -> 2454 (+0.08%)
Copies: 8331 -> 8353 (+0.26%); split: -0.25%, +0.52%
PreSGPRs: 4974 -> 4964 (-0.20%)
PreVGPRs: 6209 -> 6218 (+0.14%)
VALU: 112317 -> 112092 (-0.20%); split: -0.21%, +0.01%
SALU: 12451 -> 12694 (+1.95%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32393>
2024-12-03 14:42:18 +00:00
Marek Olšák
1f69258fb4 st/mesa: replace EmitNoIndirectInput / EmitNoIndirectOutput with NIR options
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32423>
2024-12-03 12:57:36 +00:00
Marek Olšák
7f4e36ff7d gallium: replace PIPE_SHADER_CAP_INDIRECT_INPUT/OUTPUT_ADDR with NIR options
This is a prerequisite for enabling nir_opt_varyings for all gallium
drivers.

nir_lower_io_passes (called by the GLSL linker) only uses NIR options
to lower indirect IO access before lowering IO and calling
nir_opt_varyings.

Most drivers report full support for indirect IO and lower it themselves,
which prevents compaction of lowered indirectly accessed varyings because
nir_opt_varyings doesn't touch indirect varyings.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> (Rb for asahi)
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com> (for r300)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32423>
2024-12-03 12:57:36 +00:00
Yogesh Mohan Marimuthu
f930201898 ac/gpu_info: populate fw info using new fw info ioctl for userq
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
8c91624614 winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM and GTT allocations
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
f0d31eda25 winsys/amdgpu: keep has_local_buffers true for userq
In case of userqueue, kernel bo kms_handle will not hold fences for non
shared bo. Non shared bo fences are taken care within mesa. Hence need
to copy the data to another shared buffer for export.

Keeping has_local_buffers true for userq will make non shared bo to
be copied to shared bo for export in si_texture_get_handle().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
8447cb563f winsys/amdgpu: send hdp flush packet for userq
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
45fa34284f winsys/amdgpu: don't add fence dependency of other queues for userq
In case of userq, there will be only 1 userq per process. So all the jobs for
that process goes into single queue. Hence there is no need to add fence
of other queues even if info num_queues is > 1.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
93703d2d19 winsys/amdgpu: add userq cmd submission support in amdgpu_cs_submit_ib()
This patch adds the job submission code for userq. An indirect buffer, in
short ib, can be considered a job. The job is submitted directly to the
userq ring buffer and the doorbell is rung to notify the firmware to
execute the job.

The packets that are submitted to execute the job is below,

1) fence wait multi packet for any dependency fence
2) hdp flush packs to flush host data path
3) indirect buffer packet
4) protected signal packet

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
97664d9e84 winsys/amdgpu: move legacy chunk init and submission to new function
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
afeb500498 winsys/amdgpu: move noop and ib_bytes adjustment to cs_flush
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
6e813b99af winsys/amdgpu: wait for vm syncobj before creating userq
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
2a499412e5 winsys/amdgpu: pass job fences to VM ioctl
In case of userq, fences are not installed in kernel kms handled. fences are
handled internally in mesa. So when unmapping a buffer, fences will have to
be passed by mesa to kernel so that kernel can wait on these fences to unmap
the buffer.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
37b217b0fb winsys/amdgpu: destroy bo_fence_lock late in do_winsys_deinit()
In case of userq when destroying bo, fences are gathered and passed to kernel.
Fences are gathered using bo_fence_lock, In do_winsys_deinit() currently
bo_cache is destroyed after destroying bo_fence_lock. This leads to crash.
Fix this by moving destroying bo_fence_lock late in do_winsys_deinit().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
30e95cfd87 winsys/amdgpu: use timeline syncobj for userq vm operations
In case of kernel queues method of job submission, buffer list for the job
is passed to amdgpu_cs ioctl. Kernel can ensure that VM mapping is
completed before submitting the job.

With user queues amdgpu_cs ioctl is not called, so the kernel can't determine
automatically when BO should be prepared for submissions. To achieve this, a
timeline syncobj is attach to the gem_va ioctls, which can then be used as a
dependency for future jobs.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
7c1ba1078b winsys/amdgpu: use bo_va_op_raw() function instead of bo_va_op()
This will make it easy when adding timeline syncobj parameter
for user queue.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
94c41852bd ac: add inherit vmid field to indirect buffer packet
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
cda75d6497 ac: add new userq signal and wait packet id
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
086741b3ae winsys/amdgpu: call userq init and destroy functions
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
093cf74b26 ac/gpuinfo: add use_userq and AMD_USERQ variable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
0182629411 winsys/amdgpu: add userq helper functions
This patch adds init(), deinit(), ring packet
helpder macros functions for userq.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
48ea133c97 winsys/amdgpu: add CLEAR_VRAM flag to zero vram when creating bo
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
468ea03c6e winsys/amdgpu: add DOORBELL domain to bo
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Shashank Sharma
42d49faee5 amd: add new AMDGPU_INFO subquery for userqueue metadata
This patch:
- adds a new subquery (AMDGPU_INFO_UQ_FW_AREAS) in AMDGPU_INFO_IOCTL
  to get the size and alignment of shadow and csa objects from the
  kernel. This information is required for a userqueue consumer (like
  MESA/libdrm) to create the userqueue metadata objects properly.
- also adds supporting metadata structures and a high level wrapper
  function (amdgpu_query_uq_metadata_info) to the query, to make it
  easy to use.

The corresponding kernel changes for this UAPI extension can be found
in amd-gfx mailing list, link:
https://patchwork.freedesktop.org/patch/621390/?series=139715&rev=2

This patch adds support only for the GFX IP, and the other engines may
be supported in subsequent development.

This patch was reviewed in libdrm library at
https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/400

Cc: Marek Olsak <marek.olsak@amd.com>
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Arvind Yadav <arvind.yadav@amd.com>
Reviewed-by: Marek Olsak <marek.olsak@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Arvind Yadav
b0a70da496 amd: Add amdgpu userqueue IOCTL functions
This patch adds new IOCTL functions to support
userqueue create, remove, signal and wait etc.

This patch was reviewed in libdrm library at
https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/392

Cc: Deucher, Alexander <alexander.deucher@amd.com>
Cc: Koenig, Christian <christian.koenig@amd.com>
Cc: Sharma, Shashank <shashank.sharma@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Arvind Yadav <arvind.yadav@amd.com>
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
3981b017eb amd: include amdgpu_drm.h from mesa instead of system for ac_fake_hw_db.h
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:06 +00:00
Yogesh Mohan Marimuthu
367856bc72 amd: update amdgpu_drm.h for new userq ioctl
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
2024-12-03 12:02:05 +00:00
Lucas Stach
e6b018c9dd etnaviv: stall after RS/BLT operation when draw_stall debug option is enabled
RS and BLT operations can exhibit issues in some cases. To help in debugging
such issues stall after RS and BLT operations when ETNA_MESA_DEBUG=draw_stall
is enabled. In that case the FE will point right at the faulty RS/BLT
operation, instead of the next stall which may be many state loads later.

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/32444>
2024-12-03 11:18:45 +00:00
Jose Maria Casanova Crespo
a5485a9414 v3d: Don't load/store if rasterizer discard is enabled
This moves the tlb job load/store logic to the new helper
v3d_update_job_tlb_load_store. Then an early return is included
so if the rasterizer discard is enabled, no load/stores are
emitted because of the draw call.

This helps in situations where transform feedback is used
and there is only interest in the geometry results. We identified
that some jobs were not rendering at all, but they were having the
performance cost of doing several loads and stores.

This generates a huge performance improvement on manhattan benchmarks.

fps_avg  helped:  gl_gfxbench_manhattan.trace:     8.37 -> 11.54 (37.85%)
fps_avg  helped:  gl_gfxbench_manhattan31.trace:   6.02 ->  7.51 (24.62%)

total fps_avg in affected (through threshold) runs: 14.39 -> 19.04 (32.32%)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32351>
2024-12-03 10:56:17 +00:00
Samuel Pitoiset
9535f27d8f radv/ci: mark few tests as expected failures
RADV is the only driver in Mesa CI to use VKCTS main but it doesn't
recognize 1.4 correctly yet. This will be fixed with a VKCTS uprev.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
40f95c63f4 radv: bump VKCTS conformance version to 1.4.0.0 for some GFX8+ GPUs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
00afc4e353 radv: advertise Vulkan 1.4 on GFX8+
GFX6-7 can't support Vulkan 1.4 because indexTypeUint8 isn't supported
in hardware, and emulating features for very old hardware isn't the
option I would personally choose.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
db61d45b94 radv: add new Vulkan 1.4 features/properties
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
75691dd59c radv: promote VK_EXT_pipeline_robustness to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
7892e8600b radv: promote VK_KHR_shader_subgroup_rotate to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
8c2ff0a80b radv: promote VK_KHR_push_descriptor to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
e20d5173fd radv: promote VK_KHR_map_memory2 to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
5b9ebe331c radv: promote VK_KHR_maintenance6 to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
54cd43f93e radv: promote VK_KHR_maintenance5 to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
81798d9ebe radv: promote VK_KHR_line_rasterization to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
5917f70a6e radv: promote VK_KHR_index_type_uint8 to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:55 +00:00
Samuel Pitoiset
64101baecf radv: promote VK_KHR_global_priority to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:54 +00:00
Samuel Pitoiset
ac26c5af52 radv: promote VK_KHR_dynamic_rendering_local_read to core 1.4 API
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32432>
2024-12-03 10:21:54 +00:00
Samuel Pitoiset
a437af59fc zink/ci: skip one more modifier test on POLARIS10
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32453>
2024-12-03 08:46:00 +00:00
Samuel Pitoiset
3d804851be radv: try to detect use-after-free with address binding report
This performs some very basic verifications with the faulty VA we get
from the kernel. This will probably be improved over time.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Samuel Pitoiset
1b68a92c59 radv: dump address binding report with RADV_DEBUG=hang
This contains much more info than the BO history from the winsys and
it will be helpful for debugging.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Samuel Pitoiset
1ae6fcfbaf radv: add a small helper to dump VM fault with the GPU hang report
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Samuel Pitoiset
f8af89aaa0 radv: add address binding report support for BOs imported with a ptr
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Samuel Pitoiset
723cbc95d8 radv: add address binding report support for BOs imported with a fd
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32403>
2024-12-03 08:13:13 +00:00
Deborah Brouwer
caa6ccd7d6 ci: move pipeline_summary tool to .marge/hooks
Move the tool to summarize a failed pipeline to a generic .marge/hooks
directory. This will allow the fdo-bots repo to handle all marge hooks in
a consistent way across repositories that use this service.

Add a symlink to the bin/ci directory so that the pipeline summary tool
can still be run locally as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32413>
2024-12-02 19:22:59 -08:00
Timothy Arceri
fd431a5b71 glsl: drop unused ir_equals.cpp
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32448>
2024-12-03 02:46:39 +00:00
Kenneth Graunke
6fd10a6620 brw: Tune vectorizer conditions to allow overfetching with holes
Notably, our convergent block loads were already overfetching - we
rounded up to block sizes of 8, 16, 32, or 64(LSC-only).  But we did
so in the backend, rather than NIR.

With recent changes, nir_opt_load_store_vectorizer allows holes of up
to 28 bytes (7 components at 4 bytes each).  This allows us to detect
cases where we did a convergent block load for 1 component (but loaded
a whole vec8), then another load for the next vec8, and combine them
into a single V16 load.  Single component loads aren't the most common,
but convergent loads of a vec2 in one group and a vec3 in another are
quite common, and it makes no sense to do V8+V8 loads instead of V16.

For non-block loads, we allow a max hole of 4 bytes.  This allows the
common case of XYZ_ + XYZ_ loads (where the last component is unread)
to combine into a single larger load.

fossil-db results on Lunarlake:

   Totals:
   Instrs: 146692608 -> 146246432 (-0.30%); split: -0.33%, +0.02%
   Subgroup size: 11100528 -> 11100512 (-0.00%)
   Send messages: 7003425 -> 6862529 (-2.01%); split: -2.01%, +0.00%
   Cycle count: 22396273274 -> 22523048654 (+0.57%); split: -1.08%, +1.64%
   Spill count: 67671 -> 67594 (-0.11%); split: -1.59%, +1.48%
   Fill count: 128999 -> 130223 (+0.95%); split: -1.73%, +2.68%
   Scratch Memory Size: 5986304 -> 6042624 (+0.94%); split: -1.40%, +2.34%
   Max live registers: 48898858 -> 48881655 (-0.04%); split: -0.05%, +0.01%
   Non SSA regs after NIR: 172397792 -> 167577380 (-2.80%); split: -2.80%, +0.00%

   Totals from 451003 (80.87% of 557667) affected shaders:
   Instrs: 134111754 -> 133665578 (-0.33%); split: -0.36%, +0.03%
   Subgroup size: 9039104 -> 9039088 (-0.00%)
   Send messages: 6127775 -> 5986879 (-2.30%); split: -2.30%, +0.00%
   Cycle count: 20306336726 -> 20433112106 (+0.62%); split: -1.19%, +1.81%
   Spill count: 56230 -> 56153 (-0.14%); split: -1.92%, +1.78%
   Fill count: 112920 -> 114144 (+1.08%); split: -1.97%, +3.06%
   Scratch Memory Size: 3769344 -> 3825664 (+1.49%); split: -2.23%, +3.72%
   Max live registers: 43750259 -> 43733056 (-0.04%); split: -0.05%, +0.01%
   Non SSA regs after NIR: 158449343 -> 153628931 (-3.04%); split: -3.04%, +0.00%

   In particular, sends get cut by 20.85% for Borderlands 3 DX12, 13.82%
   on Cyberpunk 2077, 10.75% on Strange Brigade, and 10.20% on Red Dead
   Redemption 2.  Yet, spill/fills remain about the same.

fossil-db results on Alchemist are similar though not quite as good.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
f88eb48ff2 anv: Don't consider nir_var_mem_global for vectorizer robustness checks
nir_opt_load_store_vectorize checks for potential address wrapping
when vectorizing two loads ("low" and "high").  It looks for cases where
"low" might have a large address, and "high" has a positive offset
which, when added together, could trigger integer wraparound.  The issue
here is that if the large address of "low" was considered out-of-bounds,
adding offset could wrap around to a small address, which might actually
be in-bounds.  Thus, when loaded separately, "low" will fail and trigger
robustness out-of-bound-read behavior, but "high" would read correctly.
When vectorized, the entire load would fail.  This is explicitly tested
for with 32-bit SSBO addresses in the Vulkan CTS.

However, anv's 64-bit global addresses and VMA handling effectively
prevent this case.  Addresses 0-4095 are a reserved page so that if
people try to use 0 as a NULL pointer, it never maps to a valid BO.
That alone guarantees that the above case where "high" gets a small
address would never be in-bounds, so we don't need to check for it.

In fact, we allocate most user allocations out of high addresses,
and have specialized allocation heaps for certain types of GPU data
structures in the lower GB of memory.  For a load to wrap around and
successfully land in the right heap, it would have to load gigabytes.

Disabling this allows load vectorization and overfetching in more cases.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
5712fc48a9 nir: Allow large overfetching holes in the load store vectorizer
The load_*_uniform_block_intel intrinsics always load either 8x or 16x
32-bit components worth of data (so 32 byte increments).  This leads to
cases where we load a few components from one vec8, followed by a few
components of an adjacent vec8.  We want to combine those into a vec16
load, as that loads a whole cacheline at a time, and requires less hoops
to calculate addresses and request memory loads.

So, we allow 7 * 4 = 28 bytes of holes, which handles vec8+vec8 where
only the .x component is read.

Most drivers and intrinsics will not want such large holes.  I thought
about adding a per-intrinsic max_hole to the core code, but decided that
since we already have driver callbacks, we can just rely on them to
reject what makes sense to them.

No driver callbacks currently allow holes, so this should not currently
affect any drivers.  But any work in progress branches may need to be
updated to reject larger holes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
01680a66a9 brw: Simplify choose_oword_block_size_dwords()
Just calculate the block size using util_logbase2() - it's simpler.

Also drop the name "oword" as this refers to legacy HDC messages,
rather than the newer LSC "vector size" field.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
e8c85f8476 brw: Only consider components read for UBO push analysis
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
e703ff5e02 brw: Only consider components read for UBO loads
This will matter more with overfetching, where we may suggest loading
additional data that we don't actually need for vectorization purposes.

We want to make sure that push ranges have the data we actually need;
any extra padding is irrelevant.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:33 +00:00
Kenneth Graunke
da93b13f8b brw: Use nir_combined_align in brw_nir_should_vectorize_mem
Better than open-coding this.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:32 +00:00
Kenneth Graunke
8c795af0b8 brw: Drop a few crocus references in comments
crocus no longer uses brw.  It uses elk.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:32 +00:00
Kenneth Graunke
46af23649c brw: Drop "regular uniform" concept from UBO push analysis
i965 used to upload its own regular GL uniforms and push those in
addition to UBO ranges.  st/mesa instead uploads regular uniforms
and presents those to use as UBO 0.  So this really isn't a thing
anymore.

nir_intrinsic_load_uniform is still used today but it represents
Vulkan push constants.  anv_nir_compute_push_layout already takes
care of ensuring too many ranges aren't present, so it doesn't need
the pass to do so.  iris doesn't use this intrinsic at all.

We can also drop the compute shader check, because neither iris nor
anv use UBO push analysis for compute shaders - except for anv's
internal kernels, which already have well specified push layouts.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:32 +00:00
Kenneth Graunke
586a470a00 brw: Drop image deref handling from brw_analyze_ubo_ranges
This was for pre-Skylake image load/store handling with image params.

We don't support that in brw anymore.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315>
2024-12-03 02:02:32 +00:00
Marek Olšák
8752401e03 nir/algebraic: optimize (a & b) | (a | c) => a | c, (a & b) & (a | c) => a & b
No change in shader-db with ACO, but it doesn't seem to be optimized by
any other patterns.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449>
2024-12-03 01:24:27 +00:00
Marek Olšák
3670d42c74 nir/algebraic: optimize (a | b) | (a | c) ==> (a | b) | c
shader-db with ACO:
    3 shaders have -0.11% average decrease in the code size

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449>
2024-12-03 01:24:27 +00:00
Marek Olšák
978ad93375 nir/algebraic: optimize (a & b) & (a & c) ==> (a & b) & c
shader-db with ACO:
    3 shaders have -0.57% average decrease in the code size

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449>
2024-12-03 01:24:27 +00:00
Marek Olšák
83b093f95e nir/algebraic: use is_used_once in a few iand/ior patterns
shader-db with ACO:
    1 shader has -4 decrease in the code size

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449>
2024-12-03 01:24:27 +00:00
Antonino Maniscalco
2b9738ce6d nir,zink,asahi: support passing through gl_PrimitiveID
When this pass is used with Zink, gl_PrimitiveID needs to be passed
through, however this is unnecessary for other divers.

Analogous to previous commit

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32397>
2024-12-03 00:24:04 +00:00
Alyssa Rosenzweig
23601d6632 zink: fix gl_PrimitiveID reads with quads
Zink emulates quads with a GS, which imposes requirements for gl_PrimitiveID.
Handle them here. Previously Zink went out of spec.

Fixes spec@glsl-1.50@execution@primitive-id-no-gs-quads and
spec@glsl-1.50@execution@primitive-id-no-gs-quad-strip.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com>
Fixes: e2220ee55e ("zink: filled quad emulation gs generation function")
Closes: #12214
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32397>
2024-12-03 00:24:04 +00:00
Dylan Baker
845f5eca27 maintainer-scripts: Bump Vulkan release version to 1.4
Since support is landed or landing for several drivers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32442>
2024-12-03 00:20:05 +00:00
Faith Ekstrand
69bce622e9 nvk: Move Vulkan 1.4 properties to the 1.4 section
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32443>
2024-12-02 23:20:07 +00:00
Faith Ekstrand
cf4e10e466 nvk: Move Vulkan 1.4 features to the 1.4 section
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32443>
2024-12-02 23:20:07 +00:00
Faith Ekstrand
01046afae5 nvk: Only support Vulkan 1.4 on Turing+
It needs hostImageCopy which we don't have working pre-Turing yet.

Fixes: 173171f73e ("nvk: Advertise Vulkan 1.4")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32443>
2024-12-02 23:20:07 +00:00
Jesse Natalie
128caf94ca microsoft/compiler: Put holes in driver_location based on I/O variable sizes
DXIL requires that each I/O variable has a unique semantic name, but when
dealing with semantics that take up multiple slots, that variable implicitly
takes up multiple names. So when assigning driver_location, we need to do
the same.

That means also updating outputs and patch constants to have a mapping from
driver_location to a compacted index, since the metadata arrays *can't* have
holes.

This would be simpler if we could hang it off the nir_variable but there's
not really any free fields to be able to do that. We only need this compacted
mapping inside the DXIL backend anyway so we can just store the array in the
module.

Tested-by: Benjamin Otte <otte@gnome.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12128
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32047>
2024-12-02 22:40:39 +00:00
Dylan Baker
5a6531b5d6 anv: bump conformance version to 1.4
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441>
2024-12-02 21:56:40 +00:00
Dylan Baker
212565f42e anv: Add new Vulkan 1.4 features and properties
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441>
2024-12-02 21:56:39 +00:00
Dylan Baker
953d8a61f8 anv: bump max number of push constants to 256
As is required by Vulkan 1.4

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441>
2024-12-02 21:56:39 +00:00
Dylan Baker
8105f80244 anv: advertise Vulkan 1.4
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441>
2024-12-02 21:56:39 +00:00
Connor Abbott
0c55770b3e tu: Expose Vulkan 1.4 on a7xx
Vulkan 1.4 can only be exposed on a7xx devices due to a number of bumps
in the required limits, including bumping maxDescriptorSets to 7. a7xx
bumped the number of bindless bases from 5 to 8, with one reserved for
the driver.

I've followed what we've already done and exposed a conformanceVersion
of 1.4.0.0 for all a7xx devices, even though I've only submitted
conformance for X1-85. I'm not sure if we want to change this, but at
least for now a618 on Chromebooks and X1-85 on laptops are the only
cases where turnip is being "shipped" to users in some official
capacity, so it shouldn't be a huge deal.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32437>
2024-12-02 21:22:44 +00:00
Connor Abbott
21838dcbb6 tu: Add Vulkan 1.4 features and properties
Only add features and properties new to Vulkan 1.4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32437>
2024-12-02 21:22:44 +00:00
Caterina Shablia
2cac1389e5 panvk: enable shaderInt8, VK_KHR_8bit_storage and VK_KHR_shader_float16_int8
We already could handle int8 load/stores and arithmetic.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Caterina Shablia
d9ce6b266f panvk: implement vkGetDeviceImageMemoryRequirements
Vulkan runtime doesn't layer vkGetImageMemoryRequirements2
on top of vkGetDeviceImageMemoryRequirements, as that would
require initializing a full image, which is expensive on
certain drivers such as NVK, so it's up to us to implement
both functions.

In our implementation of vkGetDeviceImageMemoryRequirements,
we initialize a slimmed down image and then forward everything
to vkGetImageMemoryRequirements2.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Caterina Shablia
110f5edf7a panvk: add panvk_image_init helper
This factors out the initialization of panvk_image, so we can reuse the
logic for computing requirements without crating an actual VkImage
object first.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Constantine Shablia
dbdaefb6ed panvk: never require dedicated allocation for images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Constantine Shablia
ed64fa034b panvk: never prefer or require dedicated allocation for buffers
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:23 +00:00
Constantine Shablia
ef120460e7 panvk: replace vkGetBufferMemoryRequirements2 with vkGetDeviceBufferMemoryRequirements
Mesa's Vulkan runtime will implement the former in terms of the
latter for us.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361>
2024-12-02 20:58:22 +00:00
Rebecca Mckeever
07b8ce4351 panvk: Support D32_S8 as a multiplanar format
This format was already supported on Bifrost as a single
plane format. Valhall doesn't support this interleaved D32_S8,
so we add support for multiplanar D32_S8 and move Bifrost to
this layout too, as it's more memory efficient than the
interleaved layout.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
cc2cb69e2e pan/texture: Pass pan_image_section_info around
Pass pan_image_section_info around instead of passing each field
of the struct separately.

Signed-off-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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
0dfb28cebc pan/texture: Stop passing a layout to panfrost_emit_plane()
The layout can be extracted from the iview and plane_index arguments.

Signed-off-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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
d731abb17a pan/texture: s/index/plane_index/ in panfrost_emit_plane()
Index is vague as it could refer to the array index too. Let's clarify
the situation by renaming the argument plane_index.

Signed-off-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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
3cf2658a9a pan/texture: Stop passing the view format around
The format is never adjusted, and can thus be extracted from the view.

Signed-off-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/32275>
2024-12-02 20:18:43 +00:00
Boris Brezillon
726dec5abd pan/texture: Move the plane info retrieval logic to a helper function
This allows us to properly split the multiplanar and single plane cases
in panfrost_emit_surface(), which makes the code easier to follow.

Signed-off-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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
a8ed53881e pan/desc: Add a pan_image_view_get_s_plane() helper and use it
The depth and stencil planes might be different. Let's add a specific
helper to retrieve the stencil plane. We keep using
pan_image_view_get_zs_plane() for the depth plane, because it's
guaranteed to always be on the first plane.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
c9b4030f33 pan/desc: Pass an image to pan_force_clean_write_rt()
Pass an image to pan_force_clean_write_rt() so we can easily
support the multiplanar depth-stencil case, and rename the
function pan_force_clean_write_on() to avoid the confusion.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
878a7d6de0 pan/texture: Accept holes in the pan_image_view::planes array
We are about to add multiplanar depth/stencil support. A stencil
only view of a multiplanar d32_s8 format will have NULL depth plane
(plane0), so we need to prepare the texture logic to deal with that.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
5df95a97f1 pan/texture: s/pan_image_view_get_rt_image/pan_image_view_get_color_plane/
Pick a name that's consistent with pan_image_view_get_plane().

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
c0140148f1 pan/texture: s/pan_image_view_get_zs_image/pan_image_view_get_zs_plane/
Pick a name that's consistent with pan_image_view_get_plane().

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@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/32275>
2024-12-02 20:18:43 +00:00
Eric R. Smith
a0dd108b8a panfrost: convert resources before binding them to images
pan_resource_modifier_convert can use a blit to convert images
from AFBC. If we call this from panfrost_set_shader_images then
we end up crashing due to using an inconsistent set of images.
Fix this by doing the AFBC/AFRC conversion before the image
bindings.

This fixes a crash in piglit oes_egl_image_external_essl3 tests.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30243>
2024-12-02 19:49:58 +00:00
Eric R. Smith
fc3cfaa4aa panfrost: add a perf warning when resources need to be converted
This is a minor debugging aid.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30243>
2024-12-02 19:49:58 +00:00
Alyssa Rosenzweig
56acdca86d hk: claim 1.4
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:47 +00:00
Alyssa Rosenzweig
3f5086016b hk: implement timestamps
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:47 +00:00
Alyssa Rosenzweig
55cd987de2 asahi: fix agxdecode memory mapping
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:47 +00:00
Asahi Lina
fbb38a30a6 asahi: Add timestamp buffer ops
TODO: virt support (needs virglrenderer changes & virt ABI break)

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Asahi Lina
6697fb26ed asahi: UAPI update to add support for user timestamp buffers
Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
751bd986fb asahi: add =bodump debug help
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
8caddd2ca1 asahi: fix agx_batch_add_bo
when we have exactly POT BOs. fixes crash in portal 2. oh lord.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f34cd9e966 asahi: add more asserts around bo add
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f98971e776 asahi,hk: mmap BO on first use
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
e7b3dcb9f7 asahi: label individual pools
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
09c8520293 asahi: fix u_blitter related leaks
see also 689f38b2b4 ("panfrost: fix refcnt imbalance related to blitter")

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
d49f0786c8 asahi: fix page size alignment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
59b0dd7c64 asahi: drop dead
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Asahi Lina
07e836b932 asahi: Fix agx_gpu_time_to_ns & implement DRM_ASAHI_GET_TIME
agx_gpu_time_to_ns() was broken since it was overflowing the u64
timestamp after just ~10 minutes. Fix that by automatically computing a
reduced conversion fraction, and add support for DRM_ASAHI_GET_TIME
where supported (replacing the CPU timer hack).

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Asahi Lina
925eca02c4 asahi: UAPI update to add GET_TIME & cleanup
Also fix editor config for this file & disable clang-format, to make
syncing with the kernel easier.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
d894941895 hk,asahi,libagx: unify a bit of code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
b41b7e6bc8 asahi: don't leak rodata
needs a bigger refactor but that's not a right now problem.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
1ac82c8d24 asahi: drop dead pool stuff
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
fe92abf82b agx: reduce preamble/main alignment
this was overkill.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
91ce434103 agx: disable bounds check optimization
fixes Fallout 4. needs more investigation when we have better debug tooling.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
2b3b0cd339 hk: clarify bounds check calculations
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
4d4f82b739 hk: implement hack for layered no attachments
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
4386150ab3 hk: fix z bias perf regression
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
57447cbb82 hk: fix incorrect index size translate
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
be8a24f3b2 asahi: crash on fault
now that we have soft fault we don't need this w/a to pass cts, and this will
help us with avoiding flakes in other places.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
ecd94113ca libagx: increase wg size for query copy
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434>
2024-12-02 19:26:46 +00:00
Simon Ser
105fcb9cfd dri: revert INVALID modifier special-casing
Commit 361f362258 ("dri: Unify createImage and createImageWithModifiers")
has introduced new behavior for drivers which don't support explicit
format modifiers. Before this commit, INVALID was not special-cased
and any call to dri_create_image() with one or more modifiers returned
NULL. After this commit, INVALID gained a special meaning: it indicates
that the implicit modifier is accepted by the caller. This is surprising
and is an API break.

This causes further API breaks: for instance, before this commit a BO
created via gbm_bo_create_with_modifiers() was guaranteed to always
return a non-INVALID modifier in gbm_bo_get_modifier().

This is inconsistent with gbm_dri_surface_create(): that function
treats INVALID as a bad entry in the modifier list, and fails if
it's the only acceptable modifier.

Additionally, drivers don't special-case INVALID and just ignore it
if they see it in a modifier list. This causes more inconsistencies.
For instance, let's say that a library user passes the modifier list
{ INVALID, FOO } to GBM. If a driver supports explicit modifiers and
doesn't support FOO for scanout, it'll return NULL. If a driver
doesn't support explicit modifiers, the current logic would return
a non-NULL BO with an INVALID modifier. This discrepency makes it
harder to reason about the system: half of the API ignores INVALID,
while the other half assumes INVALID indicates an implicit modifier.

To fix these issues, revert to the behavior before the commit, and
require use of the dedicated API without supplying any modifier for
implicit modifiers.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 361f362258 ("dri: Unify createImage and createImageWithModifiers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32396>
2024-12-02 18:42:59 +00:00
Connor Abbott
1b42bc76da ir3: Fix reload_live_out() in shared RA
We never split live ranges, so we don't need to store the location of
each live value when recording live outs, but the physreg assigned to a
register will still be clobbered when we reload it so we have to record
the original physreg and then make sure to use it when reloading the
live out.

We probably never encountered a case where we needed to reload live outs
in a loop before, but after enabling clustered subgroup reductions
dEQP-VK.subgroups.clustered.compute.subgroupclusteredmin_{i,u}64vec4_requiredsubgroupsize
hits this case and fails in RA validation without this fix.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32435>
2024-12-02 18:06:18 +00:00
Faith Ekstrand
173171f73e nvk: Advertise Vulkan 1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
dbf4424d07 nvk: Add new Vulkan 1.4 features and properties
These are the features and properties that don't already exist in
extensions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
f9e993dfaf nvk: No-op implement VK_KHR_global_priority
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
0819e04f21 nvk: Increase push constant space to 256B
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
218fff2d5c vulkan: Update XML and headers to 1.4.303
Also fix vk_cmd_queue generation for dropped KHR suffixes

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
2fae75b278 treewide: Stop putting enum in front of Vulkan enum types
The Vulkan headers add typedefs to fix aliasing issues whenever a type
gets renamed.  However, C doesn't allow "enum typedef" so this doesn't
work if people stick the "enum" keyword in front.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
54aeff37ee vulkan: Add Vulkan 1.4 feature aliases
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Faith Ekstrand
6fe6c42903 vulkan: Allow the same item to show up twice in core version <requires>
The way the XML is being organized these days, they're doing one
<requires> section for each promoted thing and if something gets
promoted twice by different extensions.  As long as we grab the lowest
of those core versions, we should be fine.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32433>
2024-12-02 17:22:49 +00:00
Job Noorman
25eee91016 ir3: add reformatting commits to .git-blame-ignore-revs
Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32429>
2024-12-02 16:44:50 +00:00
Bas Nieuwenhuizen
0702c554de util/perf: Fix some warnings.
Warnings about long unsigned vs. long long unsigned, so lets use the proper thing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32019>
2024-12-02 15:15:52 +00:00
Christian Gmeiner
105fbaab49 v3dv: Switch to use libbroadcom_perfcntr
Switch to a common library that does all the performance counter
readout. This converts one version-dependend file to a generic one.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
bb3fc7a44f v3d: Switch to use libbroadcom_perfcntrs
Switch to a common library that does all the performance counter
readout. This converts one version-dependend file to a generic one.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
e531e9d616 broadcom: Add perfcount library
Copy the code from the gallium driver into a small library located
in src/broadcom.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
5d186d1386 v3dv: Switch to v3d_X(..)
Use the common helper.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
3b4636c769 v3d: Move v3d_X(..) to src/broadcom/common
It will be re-used by libbroadcom_perfcntrs

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
787da655d1 v3dv: Switch to v3d_ioctl(..)
Use the common helper.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:24 +00:00
Christian Gmeiner
0d4313951f v3d: Move v3d_ioctl(..) to src/broadcom/common
It will be re-used by libbroadcom_perfcntrs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:23 +00:00
Christian Gmeiner
fadcea80c0 broadcom/common: Make v3d_device_info.h usable for C++
We need it for our pps ds.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
2024-12-02 14:13:23 +00:00
David Rosca
4da1756be4 radeonsi/vcn: Create encode DPB surfaces with PIPE_BIND_VIDEO_ENCODE_DPB
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
David Rosca
7d27de70af radeonsi/vcn: Create decode DPB surfaces with PIPE_BIND_VIDEO_DECODE_DPB
Always use surface for DPB now that it is not GFX12 only.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
David Rosca
1d206ca94c radeonsi: Support PIPE_BIND_VIDEO_DECODE/ENCODE_DPB
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
David Rosca
308bae950f ac/surface: Add RADEON_SURF_VIDEO_REFERENCE
Select supported swizzle mode for VCN DPB surfaces.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
2024-12-02 13:48:22 +00:00
Kenneth Graunke
92797c6878 nir/algebraic: Reassociate fadd into fmul in DP4-like pattern
This extends the optimization from commit 09705747d7 ("nir/algebraic:
Reassociate fadd into fmul in DPH-like pattern") to a chain of 4 ffmas
for a DP4-style pattern.

Moving the add to the other end of the sequence allows it to be fused
into an FMA.

fossil-db results from Alchemist:

   Totals:
   Instrs: 158544142 -> 158490516 (-0.03%); split: -0.04%, +0.00%
   Subgroup size: 7808912 -> 7808920 (+0.00%); split: +0.00%, -0.00%
   Cycle count: 17859550672 -> 17859491966 (-0.00%); split: -0.01%, +0.01%
   Spill count: 84652 -> 84494 (-0.19%); split: -0.37%, +0.18%
   Fill count: 160728 -> 160623 (-0.07%); split: -0.29%, +0.23%
   Scratch Memory Size: 4278272 -> 4272128 (-0.14%); split: -0.29%, +0.14%
   Max live registers: 32411695 -> 32409789 (-0.01%); split: -0.01%, +0.00%
   Max dispatch width: 5627856 -> 5627920 (+0.00%); split: +0.00%, -0.00%
   Non SSA regs after NIR: 185359099 -> 185307703 (-0.03%); split: -0.03%, +0.00%

   Totals from 16378 (2.56% of 640872) affected shaders:
   Instrs: 9818723 -> 9765097 (-0.55%); split: -0.58%, +0.04%
   Subgroup size: 194056 -> 194064 (+0.00%); split: +0.01%, -0.01%
   Cycle count: 294967108 -> 294908402 (-0.02%); split: -0.58%, +0.56%
   Spill count: 10088 -> 9930 (-1.57%); split: -3.09%, +1.53%
   Fill count: 24738 -> 24633 (-0.42%); split: -1.90%, +1.48%
   Scratch Memory Size: 439296 -> 433152 (-1.40%); split: -2.80%, +1.40%
   Max live registers: 1297204 -> 1295298 (-0.15%); split: -0.22%, +0.07%
   Max dispatch width: 133232 -> 133296 (+0.05%); split: +0.14%, -0.10%
   Non SSA regs after NIR: 11999084 -> 11947688 (-0.43%); split: -0.43%, +0.00%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32197>
2024-12-02 13:15:16 +00:00
Lionel Landwerlin
888f63cf1b anv/iris: leave 4k alignments for clear colors with modifiers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 17f97a69c1 ("iris: Reduce clear color state alignment to 64B")
Fixes: 063715ed45 ("anv: Reduce clear color state alignment to 64B")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12195
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13057
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32422>
2024-12-02 12:51:45 +00:00
Collabora's Gfx CI Team
52f13f5603 Uprev Piglit to 468221c722481c470e6a23760b914c33143c2af6
d04d6fff00...468221c722

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32272>
2024-12-02 12:13:05 +00:00
Sergi Blanch Torne
a4e3ff0464 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit fd14b34923.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32420>
2024-12-02 11:38:20 +00:00
Michel Dänzer
8197111881 winsys/amdgpu: Always use amdgpu_device_get_fd for aws->fd
If the caller passed in the same DRM file description, use it for sws->fd
as well. This is simpler than the previously reverted commit and also
fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/12208.

v2:
* Move fallback sws->fd assignment to proper scope, fixes CI failures.
* Remove close(sws->fd) from amdgpu_winsys_create failure path, it can
  never be a valid file descriptor != aws->fd there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32377>
2024-12-02 10:38:22 +00:00
Michel Dänzer
f873ee506f Revert "winsys/amdgpu: fix FD mismatch"
This reverts commit 9223528059.

Not needed. (The amdgpu_screen_winsys::input_fd reference in the comment
didn't make sense, there was no such thing)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32377>
2024-12-02 10:38:22 +00:00
Rhys Perry
fd19ff0b9e aco: force linear for event_vmem_sample and event_vmem_bvh
I don't know if this issue affects GFX12, but workaround it anyway to be
safe.

fossil-db (gfx1200):
Totals from 3463 (4.36% of 79395) affected shaders:
Instrs: 9794280 -> 9833253 (+0.40%); split: -0.00%, +0.40%
CodeSize: 52306040 -> 52457988 (+0.29%); split: -0.01%, +0.30%
Latency: 90549385 -> 93617517 (+3.39%); split: -0.00%, +3.39%
InvThroughput: 13189030 -> 13602942 (+3.14%); split: -0.00%, +3.14%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32373>
2024-12-02 10:13:39 +00:00
Rhys Perry
86c63b29bc aco/gfx12: insert wait between VMEM WaW
https://github.com/llvm/llvm-project/pull/105549

fossil-db (gfx1200):
Totals from 1783 (2.25% of 79395) affected shaders:
Instrs: 7398391 -> 7404566 (+0.08%); split: -0.00%, +0.08%
CodeSize: 38862456 -> 38886364 (+0.06%); split: -0.00%, +0.06%
Latency: 83191513 -> 84211504 (+1.23%); split: -0.00%, +1.23%
InvThroughput: 15185936 -> 15345744 (+1.05%); split: -0.01%, +1.06%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32373>
2024-12-02 10:13:39 +00:00
Rhys Perry
9f3607de76 nir/tests: fix SSA dominance in opt_if_merge tests
It isn't necessary for these ALU instructions to be used in the next IF.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes: c437f2e79c ("nir/tests: Add tests for opt_if_merge")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12211
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32391>
2024-12-02 09:38:22 +00:00
Benjamin Cheng
e9d9c67eab radv/video: enable by default on vcn2/3 with latest fw
The latest FW in the linux-firmware repo provides the required features
to pass all the CTS tests.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32407>
2024-12-02 08:30:08 +00:00
Sergi Blanch Torne
fd14b34923 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2024-12-02 08:00 UTC
* End: 2024-12-02 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32183>
2024-12-02 07:07:07 +00:00
David Rosca
76e3004fef radv/video: Always use setup reference slot when valid
Reviewed-by: Benjamin Cheng <ben@bcheng.me>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10977
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32414>
2024-12-02 06:26:34 +00:00
David Rosca
ef6facac15 radv/video: Fix IB signature checksum
Reviewed-by: Benjamin Cheng <ben@bcheng.me>
Fixes: 152b06acd8 ("ac/vcn: allow sq signature package to be skipped")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32414>
2024-12-02 06:26:34 +00:00
Timothy Arceri
6ca81adffc nir: allow loops with unknown induction var initialiser to unroll
If the condition of the loop terminator is based on an unsigned value we
can in some cases find the max number of possible loop trips. With the
max loop trips know a complex unroll can unroll the loop.

For example:

   uniform uint x;
   uint i = x;
   while (true) {
      if (i >= 4)
         break;

      i += 6;
   }

The above loop can be unrolled even though we don't know the initial
value of the induction variable because it can have at most 1 iteration.

There were no changes with my shader-db collection. Change was inspired
by MR #31312 where builtin shader code failed to unroll.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31701>
2024-12-02 11:44:33 +11:00
Dave Airlie
fcaf0f2590 vulkan: update to 302 headers for av1 encode
Some of the spirv AMDX stuff probably broke things, but it should
still build.

Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32401>
2024-12-02 06:29:00 +10:00
Connor Abbott
8fe3674df8 vulkan/runtime,radv: Add shared BVH building framework
This is mostly adapted from radv's BVH building. This defines a common
"IR" for BVH trees, two algorithms for constructing it, and a callback
that the driver implements for encoding. The framework takes care of
parallelizing the different passes, so the driver just has to split the
encoding process into "stages" and implement just one part for each
stage.

The runtime changes are:
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
The radv changes are;

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31433>
2024-12-01 20:08:35 +01:00
Connor Abbott
f8b584d6a5 vulkan/runtime,radv: Add shared BVH building framework
This is mostly adapted from radv's BVH building. This defines a common
"IR" for BVH trees, two algorithms for constructing it, and a callback
that the driver implements for encoding. The framework takes care of
parallelizing the different passes, so the driver just has to split the
encoding process into "stages" and implement just one part for each
stage.

The runtime changes are:
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
The radv changes are;

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31433>
2024-12-01 16:08:06 +00:00
Konstantin
d19af11e49 vulkan/meta: Add a pipeline cache
RADV has a pipeline cache for meta shaders that can be used. It is also
required to correctly identify the pipelines as meta pipelines.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31433>
2024-12-01 16:08:06 +00:00
Connor Abbott
c1c39116a7 vulkan/runtime: Add driver callbacks for BVH building
All of these are functions that could reasonably be incorporated into a
Vulkan extension, but are currently missing. While we could in theory do
BVH building without them, using them simplifies the code significantly
and both radv and turnip can reasonably implement them.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31433>
2024-12-01 16:08:06 +00:00
Job Noorman
8ae5b27ee0 ir3: reformat after refactoring in previous commit
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Job Noorman
fda91b49d7 ir3: refactor builders to use ir3_builder API
All functions that used to take an ir3_block as argument to append
instructions to now take an ir3_builder as argument.

Add an ir3_builder field to ir3_context and replace all uses of
ir3_context::block for creating instructions with ir3_context::build.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Job Noorman
6c38402e9a ir3: use generic INSTR0 implementation for ir3_NOP
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Job Noorman
af92e4934e ir3: add ir3_after_instr_and_phis helper
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Job Noorman
62b23f175e ir3: don't update builder cursor for IR3_CURSOR_AFTER_BLOCK
During instruction selection, instructions are sometimes emitted to
blocks other than the current one. For example, to predecessor blocks
for phi sources or to the first block for inputs. For those cases, a new
builder is created to emit at the end of the target block. However, if
the target block happens to be the same as the current block, the main
builder would not be updated to point past the new instructions.
Therefore, don't update the cursor when it points to the end of a block
to ensure that new instructions will always be added at the end.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32088>
2024-12-01 10:21:26 +00:00
Arseny Kapoulkine
6a3944a195 radv: On GFX11, use box sorting heuristic based on ray flags
Use box with largest ray interval for shadow rays (terminate on first
hit) as it maximizes the probability of finding some object in that box;
for reflection (closest hit) rays, use midpoint instead, which defers
processing of larger boxes the ray origin is in in favor of smaller
boxes closer to origin.

Since the sorting mode must be uniform, when terminate_on_first_hit flag
is divergent, we leave it as closest.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32416>
2024-12-01 05:20:58 +00:00
Robert Mader
379de4cdce freedreno: Support offset query for multi-planar planes
This allows `gbm_bo_get_offset()` to return the correct offset for e.g.
the second plane of a resource with the NV12 format. Crucially this
fixes direct scanout / hardware plane usage in Mutter and possibly other
clients.

While on it also add support for stride, modifier and n_planes queries.
The later two should not change in behavior and just safe a few CPU
cycles. The stride query support in theory fixes queries for multi-plane
formats, however in practice most/all currently used formats such as NV12,
P010 and YUV420 use the same stride for all planes.

Cc: mesa-stable
Acked-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32282>
2024-11-29 18:10:28 +01:00
Job Noorman
1cd09a0177 tu: advertise VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
659e033897 ir3: lower clustered rotates to shuffles
shfl.rdown only works for the non-clustered case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
d5d0628728 nir/lower_subgroups: add option to only lower clustered rotates
On ir3, we have native support for full rotates but not for clustered
ones.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
eba6a70a66 tu: advertise VK_SUBGROUP_FEATURE_CLUSTERED_BIT
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
c44f998d69 ir3: add support for clustered subgroup reductions
This is implemented differently depending on the cluster size:
- At most 8: in this case, executing brcst.active will leave the
  reduction in the last invocation of each cluster. Simply iterate the
  clusters and broadcast the last invocation to the rest.
- Otherwise, also iterate the clusters but execute the usual
  reduce_clusters_ir3 loop for each of them.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
5dbd2b08f4 nir/lower_subgroups: disable boolean reduce when not supported
lower_boolean_reduce only supports ballot_components == 1. Fall back to
lower_scan_reduce when this is not the case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
493f7b8084 nir/lower_subgroups: add extra filter data to options
It might be convenient for filter implementations to have access to
extra information. This will be used, for example, by ir3 to access
compiler features.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
c789a0a3d3 ir3: rename cluster_size to brcst_cluster_size
In preparation for the next commit where we'll want to use cluster_size
for the intrinsic's cluster size.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:48 +00:00
Job Noorman
0be9ff47b4 ir3: add helper to get the subgroup size
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
2e2a36ddb0 ir3: add codegen for read_getlast_ir3
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
e6c63a88fb nir: add read_getlast_ir3 intrinsic
Like read_first_invocation but using getlast. Note that I intentionally
used the name of the ir3 instruction in the name as its semantics are
tricky to exactly describe otherwise.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
7bab441ae6 ir3: remove unused ir3_nir_lower_64b_subgroups
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
5e9cf354ca ir3: use generic lowering for 64b scan/reduce
Now that we use shfl for lowering shuffle operations, the generic
lowering of scan/reduce to shuffles results in faster code than our
custom loop for 64b operations.

Note that this was measured using a micro benchmark on full subgroups.
The generic lowering might be slower when not all invocations are active
but this should be a rare case.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Job Noorman
60e1615ced nir/lower_subgroups: support unknown subgroup size
Some targets (e.g., ir3) don't always know the exact subgroup size.
Calculate the maximum subgroup size in that case by multiplying
ballot_components and ballot_bit_size.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
2024-11-29 16:22:47 +00:00
Simon Perretta
cee548095a CODEOWNERS: update for new pco compiler tree
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
e67e44522f pco: initial validation boilerplate and SSA checks
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
b35ba3a8a5 pco: modifier propagation optimization, shared opt context boilerplate
Tackles cases where mod propagation candidate ops have a restriction on one
of their sources but are commutative, thus allowing the restriction to be
worked around by swapping the sources.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
527b38d1fd pvr, pco: rewrite compiler/driver interface for vs & fs I/O
Basic vertex/fragment shader I/O and sysval allocation rewritten to use
the new compiler/driver interface, with allocation moved entirely into
the driver.

RHW coeffs now only emitted when required.

Boilerplate support for converting formats for vs inputs/fs outputs.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
99852fbe4d pco: track the number of bytes encoded for each function
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
0f720a5c98 pco: add opt subpass for propagating comps referencing hw regs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
37d4791343 pco: vec coalescing improvement to register allocation
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
ce8392024d pco: add helpers for overriding ref chans and offsetting vals
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
71480c075e pco: temporarily add hardcoded vs/fs I/O for testing, BXS-4-64 iteration support
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
cf83858a47 pco: add mappings and translation for ditr
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
a89a9b65f8 pco: re-indexing debug option and additional vector and component tracking
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
d55e98a32d pco: vector component tracking, vector collation when ingesting NIR
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
b4049c9b0a pco: add public print wrappers
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
e57c4b5b3b pco: initial implementation of translation and passes
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
f6a729563c pco, pygen: isa itrsmp op
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
d5bab0c157 pco, pygen: isa ditr op
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
84766a9157 pco, pygen: amend bitfield assertion messages
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
58337957ac pco, pygen: restructure igrp alu components into arrays
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
fee1f029cc pco, pygen: add defs and mappings for common ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
3c081c9abf pco, pygen: drop unspecified bit sizes for references
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
fcf05a732e pco: print ranges of non-ssa refs with >1 channel, datatypes for immediates
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
981e6cfabc pco, pygen: re-order some mods to match their evaluation order
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
fab0ef7d59 pco, pygen: add support for instructions with variable srcs/dests
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
45139c72f7 pco: set up and tear down glsl type singleton with context
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
1b36e34095 pco, pygen: support querying ref mods, if op/ref mods have been set
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
687abeee5a pco: adjust align padding to be per-function instead of per-shader
Shaders may contain more than one function, e.g. a preamble
and an entrypoint, which require alignment.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
59a4b9ff2d pco, pygen: add better exception messages
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
f57b817f7b pco, pygen: add initial uvsw op boilerplate
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
70aa0df836 pco: boilerplate nir lowering passes
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
bf22e4076b pco: additional ref functions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
6a3ba1f1f4 pco, pygen: instruction to instruction group mapping, printing
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
0d85b71387 pco, pygen: distinguish hw ops that are built directly into instruction groups
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
f3cc7c128c pco: add verbose printing debug option
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
6b0a738bfd pco, pygen: common underscore replacement for op names
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:12 +00:00
Simon Perretta
561098cf7d pco, pygen: add bitset support for op mods
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
7c57e25550 pco, pygen: move unnamed tuple structs into classes
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
08ce5c0e23 pco: basic instruction printing
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8b193b4dd2 pco, pygen: generate string representations of enum elements
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
f014a14e2c pco: printing and validation boilerplate
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
3c51c6ac17 pco: NIR translation and PCO IR pass boilerplate
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
f179e5a220 pco: define data structures and basic builder implementation with ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
d47ac545d5 pco, pygen: generate op and mod info
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8887bc0d47 pco, pygen: query bytes required for each variant
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
5670eb6732 pco, pygen: isa control alu ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
d423ac4fc7 pco, pygen: isa bitwise alu ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
f886677843 pco, pygen: isa backend alu ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
9fa96b6140 pco, pygen: isa main alu ops
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
ba959bc992 pco, pygen: isa destination definitions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
b03d618f63 pco, pygen: isa internal source selector definitions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
ed5dc3e64d pco, pygen: isa upper sources definitions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
9b64e1a8de pco, pygen: isa lower source definitions
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
ce5de01d1a pco, pygen: isa instruction group header validation and encoding support
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
4ca21e7038 pco, pygen: define and emit isa instruction group header variant fields
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
ee312ebd6f pco, pygen: define basic isa field types
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
77a183fc14 pco, pygen: enum emit support, define some enums and op/ref mods/types
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
4d8653a643 pco: pygen stubs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
fa9892026e pco: suppress warning for functions passing structs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
14d7ade582 pvr: drop PVRX macro
All core-specific selections will take place at runtime.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
cbc9896264 pvr: fix GetInstanceProcAddr ubsan warning when _instance == NULL
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8f1613accf pvr: add device info for additional iterator features
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
898dd3bdf6 pvr: track pipeline flags
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8d440ece64 pvr: add shader compilation stubs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
7a32dc673b pvr: add device info and functions for calculating available temps
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
aea38c1e47 pvr: remove pipeline shader hard-coding support
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:11 +00:00
Simon Perretta
8702dfce62 pvr: connect basic pco functions to the driver
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Simon Perretta
008b635031 pco: stubs for SPIR-V/NIR compilation options
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Simon Perretta
3349b5b296 pco: add env debug option parsing
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Simon Perretta
e90c851b8c pvr, pco: Add new compiler framework and shader gen stubs
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Simon Perretta
ab1298e926 pvr: add initial pco stub/boilerplate
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Frank Binns
b82793221a pvr: add 36.53.104.796 (BXS-4-64) to the list of supported GPUs
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
Frank Binns
cd630fe704 pvr: add TI j721s2 as a supported device
This is found in various boards, such as the TI SK-AM68.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32258>
2024-11-29 15:14:10 +00:00
David (Ming Qiang) Wu
e359b3c525 radeonsi/vcn: support 12bit YUV420 AV1 decoding
Add 12bit AV1 decoding support for PIPE_VIDEO_PROFILE_AV1_PROFILE2.
This feature is tested on VCN5 and VCN4.

Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32383>
2024-11-29 14:38:30 +00:00
David (Ming Qiang) Wu
389c77d127 frontends/va: add PIPE_VIDEO_PROFILE_AV1_PROFILE2
Add PIPE_VIDEO_PROFILE_AV1_PROFILE2 and
enable with VA_CHECK_VERSION(1, 23, 0) check

Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32383>
2024-11-29 14:38:30 +00:00
David (Ming Qiang) Wu
9c6d14d736 frontends/va: adding PIPE_FORMAT_P012
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32383>
2024-11-29 14:38:30 +00:00
Erik Faye-Lund
284952b864 mesa: error-check GL_TEXTURE_TILING_EXT params
This just seems like the right thing to do. We shouldn't allow
unexpected params just like that.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
7b0d401265 st/mesa: check requirements for MESA_texture_const_bandwidth
This extension depends on EXT_memory_object, and is not usable without
it. So let's disable it, so applications don't try to use it.

Fixes: 5cccd6d689 ("mesa: Implement MESA_texture_const_bandwidth")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
42205ac386 mesa/main: properly check for EXT_semaphore_win32
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
640837ff78 mesa/main: properly check for EXT_semaphore
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
da04f4cb92 mesa/main: properly check for EXT_memory_object_win32
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
d90c81740d mesa/main: properly check for EXT_memory_object_fd
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:27 +00:00
Erik Faye-Lund
0284e7fedb mesa/main: properly check for EXT_memory_object
This extension isn't supported in GLES 1.x, so let's tighten the check.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32349>
2024-11-29 13:48:26 +00:00
Philipp Zabel
dddec9a66d teflon: Support fused ReLU6 activation via output saturation
If the output tensor quantization range does not exceed 6.0, ReLU6 can
be replaced with ReLU: output values larger than 6.0 are clipped by
output saturation.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32388>
2024-11-29 13:32:42 +00:00
Hans-Kristian Arntzen
6370acbead radv: Add sparse mappings to radv_check_va.py.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32146>
2024-11-29 12:57:42 +00:00
Hans-Kristian Arntzen
cb15b34295 radv/winsys: Report VA mappings in bo_log too.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32146>
2024-11-29 12:57:42 +00:00
Philipp Zabel
a9f0624d6b teflon: Reject per-axis quantization
Until a workaround for missing hardware support is implemented, stop
pretending to support convolution operations on tensors with per-axis
quantization.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32387>
2024-11-29 11:20:27 +00:00
Philipp Zabel
0501a3b5c1 etnaviv/ml: Create combined input tensors for addition first
Fix addition where one summand was already used as input to an earlier
operation, for example in the last operation of MobileNet V2 residual
blocks.

Fixes an assertion when trying to run MobileNet V2:

  .../src/gallium/drivers/etnaviv/etnaviv_ml.c:58: etna_ml_create_tensor: Assertion `size == pipe_buffer_size(res)' failed.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31987>
2024-11-29 10:46:33 +00:00
Philipp Zabel
47b4aef5db teflon/tests: Enable int8 tests
Enable signed 8-bit convolution tests.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31979>
2024-11-29 10:53:01 +01:00
Philipp Zabel
563316417a teflon/tests: prep test executor for signed convolutions
Subtract 128 from the input and output tensor zero points, to keep
them in int8_t range (conv2d.tflite is set up for uint8_t).

Set weight tensor zero point to zero, as required by TensorFlow Lite
for int8_t weight tensors.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31979>
2024-11-29 10:52:58 +01:00
Philipp Zabel
4153154423 etnaviv/nn: Add support for signed 8-bit tensors
The hardware only supports unsigned 8-bit tensors, but with the
configurable zero point we can map signed 8-bit integers to unsigned
8-bit integers by adding a constant offset of 128 to all values and to
the zero point setting.

This requires adding 128 to all input tensors and subtracting 128
from all output tensors during inference.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31979>
2024-11-29 10:52:56 +01:00
Philipp Zabel
f9c34a3eb0 teflon: Add is_signed parameter to ml_subgraph_invoke and ml_subgraph_read_output
There probably is a better way to provide this information to the
gallium driver, but this allows the driver to apply conversions as
needed when writing input tensors and reading back output tensors.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31979>
2024-11-29 10:52:48 +01:00
Peyton Lee
1ca2137a84 radeonsi/vpe: optimize software functions
1. Break down the configuration functions
2. Remove unnecessary debug messages and redundant coding
3. Add support for color primaries

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32296>
2024-11-29 08:37:47 +00:00
Timothy Arceri
05d2fe2372 glsl: remove glsl/program.h
It is now unused.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32402>
2024-11-29 14:31:30 +11:00
Timothy Arceri
8142797721 glsl: move _mesa_glsl_compile_shader() declaration
The function is in glsl_parser_extras.cpp so move the declaration to
glsl_parser_extras.h

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32402>
2024-11-29 14:30:03 +11:00
Benjamin Cheng
323b59a5b5 radv/video: support event for pre-VCN4 decode queues
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32400>
2024-11-29 10:03:48 +10:00
Benjamin Cheng
1689d88e4a radv/video: support event for pre-VCN4 encode queues
Prior to VCN4, the encode queue is separate from the decode queue. For
encode, the WRITE_MEMORY command can be executed with similar framing as
for VCN4, but notably there is no signature support, so it must be
skipped.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32400>
2024-11-29 10:02:14 +10:00
Benjamin Cheng
152b06acd8 ac/vcn: allow sq signature package to be skipped
This is preparing for radv event support on pre-VCN4 encode queues.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32400>
2024-11-29 10:01:49 +10:00
Boris Brezillon
25c0a11cf7 panvk: Add a flag to force SIMULTANEOUS_USE
Turns out we have a bunch of test that fail when the descriptor
ring-buffer is involved. Add a flag so we can extend testing coverage
without adding more CTS tests.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
46a0231c9c panvk/csf: Don't disable SIMULTANEOUS_USE when tracing is enabled
Now that we switched to event-based tracing, we can keep the
SIMULTANEOUS_USE flag even when tracing is enabled.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
bd49fa68b0 panvk/csf: Use event-based CS tracing
Use the new event-based tracing system to capture IDVS/COMPUTE/FRAGMENT
jobs and their context.

When tracing is enabled, the descriptor ring buffer is replaced by
a bigger linear buffer such that descriptors are not recycled before
we get a change to decode the trace.

If the decode buffer is too small and a OOB is detected, the driver will
suggest the user to allocate a bigger buffer with the
PANVK_{DESC,CS}_TRACEBUF_SIZE env vars.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
bf05842a8d pan/cs: Add an event-based tracing mechanism
Interpreting the command buffer only really works if everything is
static, but panvk started to make extensive use of loops, and
conditionals which depends on memory values that get updated by the
command stream itself. This makes it impossible to walk back to the
original state in order to replay the CS actions.

Move away from this approach in favor of an event-based tracing
mechanism recording particular CS commands and their context at
execution time. Of course, that means the auxiliary descriptors
shouldn't be recycled until the traces are decoded, but that's more
tractable. We just need to turn the descriptor ring buffers into
linear buffers with a guard page, and crash on OOB, with a message
suggesting the user to tweak the maximum trace buffer sizes.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
4e5f75d1d7 pan/cs: Add a LOAD_IP pseudo instruction
Will be useful if we want to be able to make the trace events point to
the instruction they are recording.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
8c30c2924f pan/decode: Provide a helper to print messages outside of the decoding path
Just a wrapper around pandecode_log() taking the lock and making sure
the dump stream is opened.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
7d0dc3d30c pan/decode: Add a helper to print CS binaries without interpreting them
In panvk, we want to switch from interpretation-based decoding to
event-tracing based decoding, so we no longer depend on the memory state
to get accurate job information.

Even if we're not interested in interpreting the CS, we still want to
dump CS binaries so developers can know what's passed to the GPU.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
41d3f16a28 pan/decode: Rename pandecode_cs() into pandecode_interpret_cs()
pandecode_cs() does both the decoding and the interpretation.
Rename the function to avoid the confusion.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
1a8ef18aeb pan/decode: s/interpret_ceu/interpret_cs/
Everything else is prefixed cs, not ceu, so let's drop the remaining
ceu occurrences.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Boris Brezillon
3778df8778 pan/decode: Untangle CS disassembling and interpretation
Despite the name, disassemble_ceu_instr() does more than disassembling
the instruction, it also partially interpret it.

Add a print_cs_instr() helper that does just the disassembling/printing
part, and move the remaining of disassemble_ceu_instr() to
interpret_ceu_instr().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32284>
2024-11-28 20:21:52 +00:00
Rob Clark
dfd519ed80 vdrm+tu+fd: Make cross-device optional
Similar to commit 087e9a96d1 ("venus: make cross-device optional"),
make VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE use optional, because qemu does
not support this.

Fixes: 06e57e3231 ("virtio: Add vdrm native-context helper")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32392>
2024-11-28 19:55:11 +00:00
Caio Oliveira
a9acc0bea4 util/ra: Remove unimplemented function declaration
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32395>
2024-11-28 19:19:26 +00:00
Timur Kristóf
2089bf7b57 radv: Use default 0 for undefined builtin PS inputs.
The previous code not only left them undefined, but also
didn't increment the array index, so subsequent PS inputs
would be broken after the undefined one.

Note that this doesn't affect any valid Vulkan apps, but it makes
the code a bit simpler and it makes undefined inputs a little more
forgiving, at no expense for valid PS.

This code actually uncovers a bug in Zink, so I'm also documenting
the failing Zink test case.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32220>
2024-11-28 18:14:57 +00:00
Timur Kristóf
b0b1a07193 radv: Remove now unused num_prim_interp from shader_info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32220>
2024-11-28 18:14:57 +00:00
Timur Kristóf
12b9b461e5 radv: Emit SPI_PS_IN_CONTROL when emitting PS inputs on GFX10.3.
GFX10.3 keeps track of per-vertex and per-primitive PS inputs
separately in NUM_INTERP / NUM_PRIM_INTERP,
which we only really know when emitting the inputs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32220>
2024-11-28 18:14:57 +00:00
Timur Kristóf
e2b8c4a9ac radv, aco: Consolidate num_interp + num_prim_interp into num_inputs.
num_inputs contains the total number of FS inputs.

Note that this also fixes a bug where some calculations in RADV
and ACO were missing the per-primitive attributes from the LDS
usage of PS.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32220>
2024-11-28 18:14:57 +00:00
Timur Kristóf
e5a9ae912b radv: Slightly simplify potentially per-primitive FS inputs.
Add export_prim_id_per_primitive for mesh shaders.
This prepares to also configure some of these to be per-primitive
in the future, even in the traditional pipeline.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32220>
2024-11-28 18:14:56 +00:00
Timur Kristóf
930243bf36 radv: Reorder potentially per-primitive FS builtins.
There are some FS built-ins that can be per-vertex or
per-primitive depending on whether a mesh shader is used:
primitive ID (implicit in VS), layer and viewport.

However, the HW requires per-primitive FS inputs to be ordered last.
This causes bugs when the same unlinked FS is used together
with VS/TES/GS and MS (with unlinked ESO or fast-linked GPL).

To solve this problem, we reorder the FS inputs so that these
potentially per-primitive inputs go after per-vertex inputs but
before per-primitive inputs.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32220>
2024-11-28 18:14:56 +00:00
Alyssa Rosenzweig
f4a3ba5302 asahi,vtn: precompile kernels
switch libagx to the precompilation pipeline. see the big comment in the
previous commit for why we're doing this.

while doing so, we move some dispatch stuff. there was so much churn from
precompile that this avoids doing the churn twice. that new header will be used
for DGC down the road.

there's also a small vtn/bindgen patch in here to skip bindgen'ing entrypoints,
as that conflicts with the new dispatch macros. this is the sane behaviour, we
just need to do the full precomp switch across the tree at once.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32339>
2024-11-28 17:34:12 +00:00
Alyssa Rosenzweig
e3001352ad nir: add helpers for precompiled shaders
v2: generalize function signatures.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> [v1]
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> [v1]
Acked-by: Mary Guillemard <mary.guillemard@collabora.com> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32339>
2024-11-28 17:34:12 +00:00
Rhys Perry
4c3809e7fc aco: use small_vec in RegCounterMap
This seems to be a little faster.

insert_NOPs (navi31):
Difference at 95.0% confidence
	-11.484 +/- 6.13377
	-1.62767% +/- 0.860593%
	(Student's t, pooled s = 5.71913)

insert_NOPs (gfx1200):
Difference at 95.0% confidence
	-35.6745 +/- 4.97972
	-8.1236% +/- 1.10453%
	(Student's t, pooled s = 4.6431)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32374>
2024-11-28 17:07:34 +00:00
Rhys Perry
7a500c8b22 aco: make small_vec copyable
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32374>
2024-11-28 17:07:34 +00:00
Marek Olšák
c26da94b4c nir/opt_varyings: replace options::lower_varying_from_uniform with a cost number
This is a simple way for drivers to enable uniform expression propagation
without having to set any callbacks for it. It replaces the old option.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32390>
2024-11-28 15:39:46 +00:00
Marek Olšák
428613b690 nir/opt_varyings: add a default callback for varying_estimate_instr_cost
used when the driver doesn't set it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32390>
2024-11-28 15:39:46 +00:00
Marek Olšák
1f238f0a2e nir/opt_varyings: always call remove_dead_varyings in init_linkage
so that we don't have to do it after every init_linkage call.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32390>
2024-11-28 15:39:46 +00:00
Scott Moreau
7d1a32fafd dri: Fix hardware cursor for cards without modifier support
After the breaking commit, gbm_bo_create_with_modifiers({LINEAR}) returns
a BO with gbm_bo_get_modifier() = INVALID. This restores the functionality
and fixes most notably, hardware cursors for cards without modifiers.

Fixes #12039.

Fixes: 361f362258 ("dri: Unify createImage and createImageWithModifiers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31725>
2024-11-28 14:52:42 +00:00
Marek Olšák
c1442030ec vc4: lower clip planes in st/mesa
This fixes:
    spec@glsl-1.20@execution@clipping@vs-clip-vertex-enables
with the latest nir_lower_clip changes.

The driver breaks when POS is stored before CLIP_DIST.
That's the only change caused by previous commits according to
VC4_DEBUG=nir.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
c50c9e9bf9 nir/lower_clip: implement ClipVertex lowering for GS + lowered IO correctly
This is currently needed to fix d3d12 for st_unlower_io_to_vars.

The idea is to track the current value of ClipVertex in a temporary
variable, and for every emit_vertex, we load the ClipVertex value from
the temporary (which matches the stored value) and insert new CLIP_DIST
stores before emit_vertex.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
a648acc287 nir/lower_clip: convert nir_lower_clip_gs to nir_shader_intrinsics_pass
and add struct lower_clip_state to hold the state for both
nir_lower_clip_gs and nir_lower_clip_vs.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
3b8e4a71fe nir/lower_clip: set clip_distance_array_size outside of create_clipdist_vars
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
b4ef50bca8 nir/lower_clip: separate code for IO variables and intrinsics
The code for IO variables was interleaved with code for IO intrinsics,
which was difficult to follow.

lower_clip_outputs is split and replaced by more accurate names:
lower_clip_vertex_var and lower_clip_vertex_intrin

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Marek Olšák
3e40c2010e nir/lower_clip: don't set cursor to fix crashes due to removed instructions
The original builder already points at the end of the function impl.
Just use that.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32363>
2024-11-28 14:14:47 +00:00
Job Noorman
1a0b4531d1 ir3: add workaround for predication hardware bug
Predication instructions sometimes need extra nops to workaround what
seems to be a hardware bug: prede needs 6 nops and the second
predt/predf of a predt/predf pair needs 4 nops.

The prede workaround is enabled starting from a6xx gen3 and the
predf/predt workaround from a6xx gen4, following the blob.

Fixes rendering corruption in God of War (2018).

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32366>
2024-11-28 13:08:36 +00:00
Job Noorman
c129547d9c ir3/isa: allow rpt6/rpt7
The blob sometimes uses this for nop.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32366>
2024-11-28 13:08:36 +00:00
Danylo Piliaiev
794a092693 tu: Handle cmdbuf and rp_blit flags of TU_DEBUG_STALE_REGS_FLAGS
The flags handling was accidentally dropped before.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32352>
2024-11-28 12:48:15 +00:00
Erik Faye-Lund
14bca200be panvk: widen type before multiplying
This function returns an uint64_t, but returns the result of two
uint32_t values. If we don't widen at least one of them before
returning, the multiplication wraps large results.

So let's widen the type first, so we can preserve large offsets.

Fixes: d1934e44fc ("panvk: Implement occlusion queries for JM")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
CID: 1634943
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32380>
2024-11-28 10:22:22 +00:00
Erik Faye-Lund
2c6bc9615d panvk: correct signedness of timestamps
These functions returns signed values, so we shouldn't use an unsigned
variable to store one of them in.

Fixes: d1934e44fc ("panvk: Implement occlusion queries for JM")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
CID: 1635021
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32380>
2024-11-28 10:22:22 +00:00
Erik Faye-Lund
22985caf3f panfrost: sanity-check alignment
The page-alignment should always be a positive power of two. Let's
assert that, to avoid confusion.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
CID: 1605086
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32380>
2024-11-28 10:22:21 +00:00
Erik Faye-Lund
0d51248e5d lima: avoid memleak on error
We should free this pointer, otherwise we're leaking it.

CID: 1521251
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32381>
2024-11-28 09:59:51 +00:00
Erik Faye-Lund
b8bb9e08bc lima: add assert to validate list-lenght
If this could be zero, we'd end up with divisions by zero here, which
uh... would be bad? I don't think that can happen, so let's assert about
this, to make it clear what's going on.

CID: 1444660
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32381>
2024-11-28 09:59:51 +00:00
Erik Faye-Lund
e50f7fad86 lima: fixup typo
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32381>
2024-11-28 09:59:51 +00:00
Boris Brezillon
0109e012b8 panvk: Filter out input-attachment usage on non renderable formats
Fixes dEQP-VK.api.info.unsupported_image_usage.*.input_attachment_*
failures.

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/32378>
2024-11-28 09:28:14 +00:00
David Rosca
489ba819b0 radeonsi/vcn: Support tiling for JPEG decode
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32301>
2024-11-28 08:52:37 +00:00
Caterina Shablia
7ca8c19246 Revert "nir: introduce instance_index system value"
This reverts commit b9be1f1f20.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32332>
2024-11-28 07:53:01 +00:00
Caterina Shablia
9d5ba87ca1 Revert "nir: lower INSTANCE_{ID,INDEX} to an offset load_instance_{index,id} respectively"
This reverts commit a5bcf566a9.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32332>
2024-11-28 07:53:01 +00:00
Samuel Pitoiset
9bae92f659 radv: add support for capturing RGP per-submit
This is pretty basic but it can be enabled with MESA_VK_TRACE=rgp and
MESA_VK_TRACE_PER_SUBMIT=1.

Can be useful for compte-only workloads.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12202
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370>
2024-11-28 07:03:21 +00:00
Samuel Pitoiset
f3272f0044 radv: add new start/stop sqtt helpers for capturing with SQTT
They will be also used for per-submit captures.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370>
2024-11-28 07:03:21 +00:00
Samuel Pitoiset
df52c70b8a radv: finish tools after cleaning meta resources
Otherwise, the number of registered RGP pipelines could be non-zero
and this will assert.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370>
2024-11-28 07:03:21 +00:00
Samuel Pitoiset
851a8a481b vulkan: add MESA_VK_TRACE_PER_SUBMIT
To capture RGP per-submit for compute-only workloads. Other capture
tools like RMV are not covered here.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32370>
2024-11-28 07:03:20 +00:00
Job Noorman
86465a3f2b ir3: add pass to select bitwise triops
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
faba4ca5f8 ir3: add codegen for bitwise triops
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
5879e4470e ir3: fix backend support for bitwise triops
- Immediates are not allowed in 2nd src.
- Immediates are 12 bits, not sign-extended.
- Only one of the first two sources can be shared when not scalar ALU.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
1333af5d77 nir/search: add is_only_used_by_{iand,ior} helpers
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
a8c947df9a nir/search: make is_only_used_by_iadd reusable
The algorithm is exactly the same for other opcodes so we don't have to
have to copy paste it.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Job Noorman
22fc90a116 nir: add ir3-specific bitwise triop opcodes
ir3 has a number of bitwise triops (e.g., shrm == (src0 >> src1) & src2)
that don't have NIR-equivalents. Doing instruction selection for them is
a lot more convenient using algebraic patterns than to have to manually
match for them. This patch add NIR opcodes for these instructions.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32181>
2024-11-28 06:19:59 +00:00
Eric Engestrom
c51378fa6c docs: add sha sum for 24.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32384>
2024-11-28 01:32:32 +01:00
Eric Engestrom
955bdb82c3 docs: add release notes for 24.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32384>
2024-11-28 01:32:32 +01:00
Eric Engestrom
4b0c600fa2 docs: update calendar for 24.2.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32384>
2024-11-28 01:32:32 +01:00
Marek Olšák
1a7c54b840 Revert "gbm: mark surface buffers as explicit flushed"
This reverts commit c49a71c03c.

It broke radeonsi.

GBM can't set __DRI_IMAGE_USE_BACKBUFFER if gbm itself doesn't use it as
a back buffer by rendering to it and calling SwapBuffers. If another
library uses it as a back buffer, that library should set
__DRI_IMAGE_USE_BACKBUFFER, not GBM. A different flag could be added
to indicate the behavior that the original commit expected.

Fixes: c49a71c03c - gbm: mark surface buffers as explicit flushed
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11996
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32345>
2024-11-27 22:48:04 +00:00
Timothy Arceri
1f954a207b glsl: remove now unused ir reader
This was used to parse glsl ir in string format and create real ir with
it. It was previously used for some really old test infrastructure which
has now been removed so lets burn this with fire also.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Timothy Arceri
722f939614 glsl: drop last remaining lower jump test
This test only tests that a redundant continue is removed. This test is
not very useful and there are hundreds of lines of supporting test
infrastructure that can be removed if we drop it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Timothy Arceri
cf188a0efb glsl: remove return lowering from glsl ir
We don't need it as nir does it for us anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Timothy Arceri
6c86b56c06 glsl: disable function return lowering in glsl ir
We just let the nir lowering pass do it instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32364>
2024-11-27 22:05:06 +00:00
Eric Engestrom
a37d5dcd63 radv/ci: use deqp-vk-main in radv jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
596c58b582 ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
beab815670 ci/deqp: add a deqp-vk build on the main branch
To be able to run new tests as soon as they are merged, instead of
having to wait for the next official CTS release

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
328a3de7cc ci/lava: turn the $BUILD_VK check into a proper if block
Allows us to simply add something in the block in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
ec27d138cb ci/deqp: only print the commit list header when the list is not empty
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
044cab6751 ci/deqp: mention the deqp api in the version string
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
ffb6c3e1de ci/deqp: simplify generating the version description file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
72a2b92e3e ci/deqp: support having commit backports and local patches for main too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
1634ad2782 ci/deqp: fix the "is this a build on main?" check
Suggested-by: Antonio Ospite
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Eric Engestrom
601088aebb ci/deqp: simplify paths since we are already in /deqp-$deqp_api/
Some commands used relative paths, while most used complex absolute
paths; let's just avoid unnecessary complexity.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Antonio Ospite
3bdb77e378 ci/deqp: replace local android patches with upstream solution
In commit a34982063 (Support standalone executable builds on Android,
2024-09-12) upstream VK-GL-CTS added support for building deqp as an
executable command for Android, this change is included in the vulkan
branch used by build-deqp.sh so the custom patches can be dropped for
the Vulkan CTS build.

After that and by passing -DDEQP_ANDROID_EXE=ON deqp can now be built
with DEQP_API=tools.

[Eric]
Note that the upstream solution seems to be broken on EGL, so GL & GLES
continue to use the local android patches; for more details, see:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168#note_2676128

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28168>
2024-11-27 20:38:05 +00:00
Alyssa Rosenzweig
c2973765e2 nir: add nir_lower_constant_to_temp helper
this comes up with clc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
12cc22af4c nir: add nir_remove_entrypoints helper
opposite of nir_remove_non_entrypoint. this operation comes up with
precompiling.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
c076900360 nir: add nir_function::pass_flags
convenience, asahi will stash stuff here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
7d6e923a4f vtn: gather workgroup size in libraries
we have multiple kernels. that's fine, gather sizes for each.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
9c37745f9d vtn: plumb through OpEntryPoint
mark nir_functions as entrypoints according to the source.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
5555769102 nir: add workgroup size to functions
for cl kernel libraries with many entrypoints. spirv can represent, nir should
be able to as well.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
ba30eb9f40 nir: add nir_foreach_entrypoint macros
for compiling libraries full of kernels.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:05 +00:00
Alyssa Rosenzweig
83581b3f1f asahi/clc: switch to nir_lower_calls_to_builtins
common code has a generic version, so we don't need to handroll this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:04 +00:00
Alyssa Rosenzweig
d8ece9bf3a nir: add nir_lower_calls_to_builtins pass
nir_builder for the GPU

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32382>
2024-11-27 20:02:04 +00:00
Pierre-Eric Pelloux-Prayer
879e8bfe6d radeonsi: use bytes units in streamout
GFX10.3 and earlier were configured to count the number of dwords written,
and VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE was also configured in dw units.

GFX11+ on the other hand used nir code that would use bytes.

This commit aligns radeonsi's logic on the radv's one, and use STRMOUT_DATA_TYPE
to configure older chips to use bytes as well.

This fixes GTF-GL46.gtf40.GL3Tests.transform_feedback2.transform_feedback2_two_buffers.

It also seems to have an effect on:
  - dEQP-GLES3.functional.transform_feedback.random.separate.*
  - dEQP-GLES3.functional.transform_feedback.random_full_array_capture.separate.*
but the results seem flaky so need further investigation.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
272addc672 ac/nir: remove prim_stride_ret arg from ngg_build_streamout_buffer_info
This is not used outside of this function, so declare it as a local
variable instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
9f4ab06842 glx: return BadMatch for invalid reset notification strategy
The specification doesn't say which error should be reported, but
piglit expects BadMatch:

   /* The GLX_ARB_create_context_robustness spec does not say what error
    * code should be generated.  However, similar cases (e.g., valid GL
    * versions) specify BadMatch.  This is also the behavior of NVIDIA's
    * closed-source driver.
    */

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
d3798130ad radeonsi: disable DCC for PIPE_BIND_USE_FRONT_RENDERING
Front rendering and (display) DCC are causing artifacts on screen.

si_texture_get_handle deals with this problem by disabling dcc, but
we can make it simpler by not allocating DCC at all when this flag
is set.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
666a6eb871 radeonsi/gfx12: disable display dcc for front buffer rendering
Same logic as other chips, except we need to reallocate the texture
as we can't disable dcc.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Pierre-Eric Pelloux-Prayer
df7bb6bfd2 dri: Remove unused function
This function is unused so get rid of it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281>
2024-11-27 19:00:20 +00:00
Zan Dobersek
be9f2e5189 tu/a7xx: support 8x MSAA
a7xx hardware has 8x MSAA capabilities we can expose. The 8-bit sample
count flag is included in the supported sample counts when computing image
format properties for MSAA-capable image creation conditions, with the
exception of 128-bit formats that don't support 8x MSAA.

UBWC blocksize logic is updated to cover cases of 16-bit and 32-bit formats
that support 8x MSAA. The per-cpp blocksize array is adjusted to also cover
128-byte values for which UBWC has to be disabled anyway.

VK_EXT_sample_locations implementation is adjusted to support sampling in
up to 8 locations, achieved by writing into additional sample location
registers.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32180>
2024-11-27 17:26:02 +00:00
Lionel Landwerlin
292c6a5156 anv: avoid using cmd_buffer for flushing runtime
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
ce4f884fcc anv: avoid using cmd_buffer for TBIMR state computation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
6096586893 anv: rework Wa_18038825448 to track state on anv_gfx_dynamic_state
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
337763f461 anv: reuse device local variable in hw state emission
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
fc404c962c anv: try to avoid using cmd_buffer in gfx runtime flushing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Lionel Landwerlin
560ce4ba1d anv: move primitive_topology to anv_gfx_dynamic_state
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
2024-11-27 16:51:57 +00:00
Georg Lehmann
fd669fa69d aco/optimizer: label fcanonicalize like a copy if there is nothing to flush
Allows copy propagation into non alu instructions like phis.

Foz-DB Navi21:
Totals from 138 (0.17% of 79395) affected shaders:
Instrs: 308135 -> 307792 (-0.11%); split: -0.12%, +0.01%
CodeSize: 1567924 -> 1566484 (-0.09%); split: -0.10%, +0.01%
VGPRs: 9696 -> 9720 (+0.25%)
Latency: 1162719 -> 1161663 (-0.09%); split: -0.10%, +0.00%
InvThroughput: 256944 -> 256590 (-0.14%); split: -0.15%, +0.01%
VClause: 5631 -> 5626 (-0.09%); split: -0.14%, +0.05%
Copies: 29962 -> 30028 (+0.22%); split: -0.10%, +0.32%
Branches: 8241 -> 8237 (-0.05%)
PreVGPRs: 7800 -> 7797 (-0.04%)
VALU: 216243 -> 215898 (-0.16%); split: -0.17%, +0.01%
SALU: 30768 -> 30767 (-0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32355>
2024-11-27 15:14:31 +00:00
Konstantin
8197d744f5 radv: Do not overwrite VRS rates when doing fast clears
Fixes a whole bunch of VRS tests on navi24.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32318>
2024-11-27 14:45:31 +00:00
Konstantin
1a3f6c586c radv/printf: Guard against helper invocations
Helper invocations can allocate printf buffer space but they do not
write any data which can cause crashes in radv_dump_printf_data.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32318>
2024-11-27 14:45:31 +00:00
Eric R. Smith
5bc4d33fa5 panvk: fix depth bias calculation
We don't need to multiply the depth bias constant by 2.0. This brings
panvk in line with other vulkan implementations (like asahi and nvk)
and fixes the one failing CTS test while still passing the other
CTS depth_bias tests.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32358>
2024-11-27 13:22:02 +00:00
Mary Guillemard
e1a8fd80d4 panvk: Use vk_zalloc for queue array allocation
No need to call memset that way.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32368>
2024-11-27 09:42:03 +01:00
Mary Guillemard
e5877cefc4 panvk: Call vk_free on queue array instead of vk_object_free
This is allocated using vk_alloc and isn't a vk_object.
This fixes an invalid free that could manifest as a double free error.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 5b0ff2643f ("panvk: Make the device creation/destruction per-arch")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32368>
2024-11-27 09:41:58 +01:00
Samuel Pitoiset
4308668a25 radv: allow shaders caching with RADV_DEBUG=hang and the trap handler
When debugging a game that compiles a ton of shaders at beginning, it
can be very very slow because shaders cache was disabled by default
with RADV_DEBUG=hang.

To make debugging such a game faster, let's cache shaders with
RADV_DEBUG=hang. Note that only the backend IR (ACO or LLVM) and the
disassembly are stored in the cache. To get SPIR-V and NIR, you might
need RADV_DEBUG=hang,nocache.

This also handles the trap handler.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32246>
2024-11-27 08:04:59 +00:00
Samuel Pitoiset
f1d103f7de radv: capture shader executable info at shader creation time
This doesn't need to be delayed and it will allow us to support
caching with eg. RADV_DEBUG=hang.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32246>
2024-11-27 08:04:59 +00:00
Samuel Pitoiset
acc84133f1 radv: only pass relevant stages when emitting DGC push constants
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32346>
2024-11-27 07:35:40 +00:00
Vignesh Raman
aa8cd5ea7b ci: Uprev crosvm
With Linux kernel 6.12-rc2, crosvm crashes in drm-ci
with the following error,
[ERROR crosvm::sys::linux::panic_hook] thread 'crosvm_vcpu0' panicked at devices/src/virtio/gpu/mod.rs:1761:14:
[ERROR crosvm::sys::linux::panic_hook] failed to send activation resources to worker thread: SendError { .. }

Uprev crosvm to fix this issue.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31900>
2024-11-27 03:07:02 +00:00
Mauro Rossi
b192c6927b nvk/android: Add support for ANDROID_native_buffer
ANB implementation aims to rely as much as possible on 'ANB common' code in vulkan/runtime
and vk_common_* entry points automatically handled by mesa at build time.

(v1) Initial Vulkan HAL skeleton with vk_android_{init,destroy}_ugralloc() in nvk_open_hal()

Changelog:

nvk_android.{c,h}: skeleton nvk_open_hal()/nvk_close_hal() and meson.build changes
nvk_instance.h: nvk_*() functions declaration required by nvk_android.c
nvk_device.c: add ANB support
nvk_image.c: add ANB code paths
nvk_physical_device.c: enable ANB extension support

NOTE: Avoid including any AHB code/headers <vndk/hardware_buffer.h>
use only <vulkan/vk_android_native_buffer.h>

Achievements:

Vulkan HAL is detected by Android build, but no Vulkan application is rendering
Android libvulkan.so loader performs dlopen() of /vendor/lib64/hw/vulkan.nouveau.so
Sascha Willems vulkanCapsViewer App detects the Vulkan HAL in Android builds on RTX2060
Android CTS 11 dEQP-VK can be run and completed, but com.drawelements.deqp app shows black surface

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568738	   161	568899

(v2) Further replication of other using 'ANB common' implementation

Changelog:

Move vk_android_{init,destroy}_ugralloc() from nvk_open_hal() to nvk_CreateInstance()
Remove nvk_GetPhysicalDeviceProperties2() and rely on vk_common_GetPhysicalDeviceProperties2()

Achievements:

Improvements in dEQP-VK test results, but many dEQP.wsi.android.* tests are still failing

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568783	   115	568899

(v3) Get inspiration from lavapipe recent llvmpipe ANB implementation and cleanups

nvk_physical_device.c: brace nvk_init_wsi,nvk_finish_wsi with #ifdef NVK_USE_WSI_PLATFORM/#endif
nvk_image.c: if (!mem) return VK_SUCCESS in DETECT_OS_ANDROID path
nvk_android.h: remove nvk_ahb_format_for_vk_format() and add vk_format_from_android()

Achievements:

Improvement in dEQP.wsi.android.* test results, only dEQP.wsi.android.swapchain.simulae_oom.* are failing.
Most of Vulkan Apps generate these errors in logcat:
... E BufferQueueConsumer: [tech.incr.vulkanandroid/tech.incr.vulkanandroid.MinimalNativeActivity#0](id:85900000010,api:1,p:5060,c:2137) acquireBuffer: max acquired buffer count reached: 2 (max 1)
... E BufferLayerConsumer: [tech.incr.vulkanandroid/tech.incr.vulkanandroid.MinimalNativeActivity#0] updateTexImage: acquire failed: Function not implemented (-38)
while some other apps (vkCube and GearsVK) generate these errors:
... E RenderEngine: failed to wait on fence fd
... E Layer   : [Surface(name=Task=136)/@0x832783c - animation-leash#0] No local sync point found
... E Layer   : [Surface(name=Task=1)/@0xd82067 - animation-leash#0] No local sync point found

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568820	    79	568899

(v4) Vulkan HAL implement nvk specific ANB gralloc and synchronization, inspired by llvmpipe ANB

Changelog:

nvk_android.c: nvk_GetSwapchainGrallocUsageANDROID, nvk_AcquireImageANDROID, nvk_QueueSignalReleaseImageANDROID
               implemented as porting of llvmpipe commit 0dce939e with 's/lvp_/nvk_/g' for functions rename

NOTE: at this stage nvk_GetSwapchainGrallocUsageANDROID is only setting gralloc SW usage flags
nvk_image.h: NVK_MAX_PLANE_COUNT 1 - NOTE: I don' know how many max planes are supported by NVK

Achievements:

GearsVK working
dEQP-VK tests produce colored output on screen
3DMARK API Overhead, Slingshot Extreme: running but meshes are not rendered
Other Vulkan API enabled Android Apps (Sascha Willems vulkanTriangle) are showing black surface,
which is due to basic gralloc SW usage flags implemented in nvk_GetSwapchainGrallocUsageANDROID()

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568820	    79	568899

The failed tests are in the following modules/test:

dEQP-VK.api.driver_properties#driver_id_match					 1
dEQP-VK.pipeline.multisample.min_sample_shading_enabled.*			 9
dEQP-VK.pipeline.multisample.min_sample_shading.*				56
dEQP-VK.sparse_resources.image_sparse_binding.cube_array.rgba32i#256_256_6	 1
dEQP-VK.sparse_resources.image_sparse_binding.cube_array.rgba32ui#256_256_6	 1
dEQP-VK.ssbo.layout.random.all_shared_buffer#5					 1
dEQP-VK.wsi.android.swapchain.simulate_oom					10

(v5) use ANB common code for GetSwapchainGrallocUsage*ANDROID

Changelog:

Replace the "SW usage only" nvk_GetSwapchainGrallocUsage{,2}ANDROID
and rely on vk_common_GetSwapchainGrallocUsage{,2}ANDROID

Achievements:

Vulkan Apps are rendering on screen
Tested on Android 11 with Vulkan 1.1 API

Android apps working:

Khronos Vulkan-Samples
Sacha Willems Vulkan Examples
Vulkan Android Test
vkCube
GearsVK
PPSSPP
3DMARK API Overhead, Slingshot Extreme - Still with meshes issue

dEQP Test Results:

Module		Passed	Failed	Total
dEQP-VK		568820	    79	568899

The failed tests are in the following modules/test (same as per previous iteration):

dEQP-VK.api.driver_properties#driver_id_match					 1
dEQP-VK.pipeline.multisample.min_sample_shading_enabled.*			 9
dEQP-VK.pipeline.multisample.min_sample_shading.*				56
dEQP-VK.sparse_resources.image_sparse_binding.cube_array.rgba32i#256_256_6	 1
dEQP-VK.sparse_resources.image_sparse_binding.cube_array.rgba32ui#256_256_6	 1
dEQP-VK.ssbo.layout.random.all_shared_buffer#5					 1
dEQP-VK.wsi.android.swapchain.simulate_oom#					10

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30833>
2024-11-26 21:45:16 +00:00
Mauro Rossi
63fa21334f nvk/android: Advertise Vulkan 1.1 for Android 12L and lower
Vulkan 1.3 is supported starting from Android 13

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30833>
2024-11-26 21:45:16 +00:00
Mauro Rossi
07e60fb255 nvk/android: Avoid building error in nak bindings
Required to compile nvk for android

Fixes the following building error:

FAILED: src/nouveau/compiler/nak_bindings.rs
...
/usr/include/xf86drm.h:40:10: fatal error: 'drm.h' file not found
panicked at 'Unable to generate bindings: ClangDiagnostic("/usr/include/xf86drm.h:40:10:
fatal error: 'drm.h' file not found\n")', main.rs:52:36

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30833>
2024-11-26 21:45:16 +00:00
Marek Olšák
9223528059 winsys/amdgpu: fix FD mismatch
The original fd was only used like this. Importing the ioctl wrappers
started using it for calling ioctls, which was incorrect.

Fixes: 049641ca54 - amd: import libdrm_amdgpu ioctl wrappers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12208

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32356>
2024-11-26 21:21:29 +00:00
Marek Olšák
733e0ebf19 radeonsi: handle a failure to create gfx_cs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32356>
2024-11-26 21:21:29 +00:00
Marek Olšák
b23161ace1 radeonsi: don't call set_framebuffer_state in si_destroy_context
si_set_framebuffer_state can allocate a buffer for sample positions,
and we don't want to create new buffers in si_destroy_context because
it might not work.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32356>
2024-11-26 21:21:29 +00:00
Eric Engestrom
ffd02b8ad8 meson/megadriver: support various lib suffixes
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
6586f755b9 meson/megadriver: simplify setting common megadriver arguments
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
b029974aab meson/megadriver: s/_/-/ in an argument name to be consistent
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
6f493ec517 meson: reuse variable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
aa31c286c6 meson: drop unused variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Eric Engestrom
a093806798 meson: simplify logic a bit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32333>
2024-11-26 20:45:41 +00:00
Chia-I Wu
a562047b60 panvk: move pandecode_next_frame a bit earlier
Call pandecode_next_frame (to close the file stream) before validating
against queue->debug_syncobjs which may abort.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
b078cacce5 panvk: clean up panvk_queue_submit
Now that panvk_queue_submit is fully refactored, clean it up.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
def0fa0fc3 panvk: add panvk_queue_submit_process_debug
It handles PANVK_DEBUG_{TRACE,SYNC,DUMP}.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
2c0a76cdf7 panvk: add panvk_queue_submit_process_signals
It transfers queue->syncobj_handle to vk_sync_signal.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
934fafe90c panvk: add panvk_queue_submit_ioctl
It makes the DRM_IOCTL_PANTHOR_GROUP_SUBMIT ioctl call.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
9679150ed9 panvk: add panvk_queue_submit_init_signals
It initializes drm_panthor_sync_op and drm_panthor_queue_submit to
signal queue->syncobj_handle.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
460cbc0491 panvk: add panvk_queue_submit_init_cmdbufs
It parses panvk_cmd_buffer to drm_panthor_queue_submit.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
21edb20746 panvk: add panvk_queue_submit_init_waits
It parses vk_sync_wait to drm_panthor_sync_op and
drm_panthor_queue_submit.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
c8fcbc2990 panvk: add panvk_queue_submit_init_storage
It prepares the storage for panvk_queue_submit.

There is a small functional change, in that signal_ops is allocated only
when necessary.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:06 +00:00
Chia-I Wu
dc75b4c755 panvk: add panvk_queue_submit_init
This is the first step toward panvk_queue_submit refactoring.  It
introduces "struct panvk_queue_submit" and adds panvk_queue_submit_init
to initialize the struct.

No functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32341>
2024-11-26 20:10:05 +00:00
Chia-I Wu
2cbb8467c1 panvk: fix vs image support
Since valhall, panvk_per_arch(nir_lower_descriptors) separates the
driver set and the user sets, and does not need pan_lower_image_index.

Fixes: 5db135f66a ("panvk: Advertize v10 support")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32308>
2024-11-26 19:47:22 +00:00
Danylo Piliaiev
7fa31b7eea tu,ir3: Add workaround for reading shading rate on A7XX gen1,gen2
On A7XX reading fragment shading rate correctly requires declare
SAMPLEMASK input. It doesn't need to be used anywhere, just declared.

This workaround was seen in the prop driver v512.762.12

Fixes a lot of tests in:
 dEQP-VK.fragment_shading_rate.*

Fixes: 2ab8eff511
("tu/a7xx: Implement VK_KHR_fragment_shading_rate")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32335>
2024-11-26 19:20:44 +00:00
Danylo Piliaiev
8858b16e4a tu: Disable fragmentShadingRateWithShaderSampleMask due to issues
FSR with VK_EXT_post_depth_coverage enabled has wrong values of
gl_SampleMaskIn[0]. Prop driver has fragmentShadingRateWithShaderSampleMask
enabled, but it doesn't support VK_EXT_post_depth_coverage.

Sample mask is supplied by HW and there is no flag in sight to fix it.

The failing tests were:
 dEQP-VK.pipeline.fast_linked_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_2_post_depth_coverage
 dEQP-VK.pipeline.fast_linked_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_4_post_depth_coverage
 dEQP-VK.pipeline.monolithic.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_2_post_depth_coverage
 dEQP-VK.pipeline.monolithic.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_4_post_depth_coverage
 dEQP-VK.pipeline.pipeline_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_2_post_depth_coverage
 dEQP-VK.pipeline.pipeline_library.multisample_with_fragment_shading_rate.sample_mask_with_depth_test.samples_4_post_depth_coverage

Fixes: 2ab8eff511
("tu/a7xx: Implement VK_KHR_fragment_shading_rate")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32335>
2024-11-26 19:20:44 +00:00
Georg Lehmann
239c0124df radv: optimize sample mask comparisons
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
2024-11-26 18:44:39 +00:00
Georg Lehmann
3f26e9ca19 nir/opt_intrinsic: fix sample mask opt with demote
Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Fixes: d3ce8a7f6b ("nir: optimize gl_SampleMaskIn to gl_HelperInvocation for radeonsi when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
2024-11-26 18:44:39 +00:00
Georg Lehmann
22557497ec nir/opt_intrinsic: rework sample mask opt with vector alu
Purely theoretical issue, for example gl_SampleMaskIn.xx == 0.xx.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Fixes: d3ce8a7f6b ("nir: optimize gl_SampleMaskIn to gl_HelperInvocation for radeonsi when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32327>
2024-11-26 18:44:38 +00:00
Ian Romanick
08fa4635c7 Fix copy-and-paste bug in nir_lower_aapoint_impl
Reported-by: Anddy Ren(WH-RD) <AnddyRen@glenfly.com>
Tested-by: Anddy Ren(WH-RD) <AnddyRen@glenfly.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: d3a95f0f71 ("gallium/draw: Enable aapoint NIR helpers to generate bool1, bool32, or float32 Booleans")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32313>
2024-11-26 18:12:07 +00:00
Yinjie Yao
64ea1175cc radeonsi/vcn: Disable 2pass encode for VCN 5.0.
VCN 5.0 will not support 2pass encoding.
Backport-to: 24.3

Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32336>
2024-11-26 16:55:30 +00:00
Boris Brezillon
b11e9168d8 panfrost: Use the handler size returned by cs_exception_handler_def()
Use the handler size returned by cs_exception_handler_def() instead
of extracting it from the cs_builder state.

Signed-off-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/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
16dd990bac panvk/csf: Use the information returned by cs_exception_handler_def()
cs_exception_handler contains the handler size and the dump region
size. Use those instead of deducing them from the cs_builder state
or using a maximum value.

Signed-off-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/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
7a8e560c4e panfrost: Add cs_exception_handler_def() to the ForEachMacros list
And fix the call-sites accordingly.

Signed-off-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/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
7a32fac596 pan/cs: Return exception handler size/address
Will be useful when we start allocating exception handlers from a
memory pool that grows over time without having to fix a maximum
handler size.

Signed-off-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/32353>
2024-11-26 15:16:44 +00:00
Boris Brezillon
d0cff9e4c1 pan/cs: Return the dump region size when an exception handler is defined
Useful to reserve only what we need for spilling regs.

Signed-off-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/32353>
2024-11-26 15:16:43 +00:00
Lionel Landwerlin
cafec54c79 Revert in correct commit "fix"
This reverts commit 38c7e40bc02578585cc56c3a2d016d0b06ade184.

Fixes: b625a573 ("fix")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32354>
2024-11-26 16:36:06 +02:00
Georg Lehmann
28dff72d3b freedreno/ci: update a630 KSP checksum
This causes warnings in CI for quite a while now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32348>
2024-11-26 13:51:30 +00:00
Boris Brezillon
00e232d5f0 panvk/csf: Fix register overlap in issue_fragment_jobs()
add_val is a 64-bit register, meaning release_sz points to the high word
of add_val, which leads to corruptions of the value added to the sync
object when simul_use=true.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-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/32350>
2024-11-26 13:31:39 +00:00
Lionel Landwerlin
b625a573da fix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
6eb48a3e47 brw: move fs_msaa_flags logic to intel_shader_enums.h
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
ba3ff8b3bb brw: move barycentric_mode enum to intel_shader_enums.h
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
bfcb9bf276 brw: rename brw_sometimes to intel_sometimes
Moving it to intel_shader_enums.h

The plan is to make it visible to OpenCL shaders.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
9016a5458a brw: change fs_msaa flags checks to test compiled flag first
There should be no functional change here. This is just trying to make
things more clear, we use the compiled value if != BRW_SOMETIMES and
otherwise use the dynamically computed flags.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
54e6a8b019 anv: split runtime flushing code for reuse
We'll want to reuse some of this for device generated commands.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
d9d1894bb9 anv: move tracking of tcs_input_vertices/fs_msaa_flags to hw state
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
d1795a73e2 anv: move gfx tracking values to anv_cmd_graphics_state
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
db258503fa anv: split vertex buffer emission in a different function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
195350c5da anv: rework vertex input helper
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
c4e7578fa6 anv: pass anv_device to batch_set_preemption
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:30 +00:00
Lionel Landwerlin
c36f7e42a7 anv: remove 3DSTATE_VF_STATISTICS from pipeline
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:29 +00:00
Lionel Landwerlin
ce40a1e05b anv: remove 3DSTATE_MULTISAMPLE from the pipeline
We can make this completely dynamic, there is no information from the
pipeline.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:29 +00:00
Lionel Landwerlin
2b49249a4d anv: remove 3DSTATE_RASTER from pipeline
At a pipeline level, we only put fixed values in this instruction.
Might has well put that in the final emission and avoid :
  - store the instruction on the anv_graphics_pipeline
  - diff the instructions between pipelines

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:29 +00:00
Lionel Landwerlin
9d8950e435 anv: move helpers out of genX_pipeline.c/anv_private.h
Those are only used in genX_gfx_state.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32329>
2024-11-26 13:05:29 +00:00
Tapani Pälli
f0b7262209 iris: allow bo cache for compressed bos on verx10 == 200
Test list mentioned in the issue is passing fine on current main.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11362
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32325>
2024-11-26 12:36:29 +00:00
Maíra Canal
3594a35610 v3dv: use Mesa log infrastructure instead of using stderr
The Mesa log infrastructure is really useful as it allows us to get
debug and error information in Android systems. Apart from that, it also
allows us to forward diagnostics into the right logs and files.

Therefore, instead of using stderr for all messages, use Mesa log and
separate the messages into debugging and error messages.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32304>
2024-11-26 12:09:29 +00:00
Maíra Canal
2c45a999a6 v3dv: delete v3dv_debug.h
It's not being used anymore.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32304>
2024-11-26 12:09:29 +00:00
Lars-Ivar Hesselberg Simonsen
afaf454eb7 panvk: Add incremental rendering support on v10+
This commit adds support for incremental rendering on V10+ in PanVK by
setting a tiler out-of-memory exception handler in the fragment subqueue
when waiting for the tiler work to complete.

In case the tiler is unable to finish its work due to lack of memory,
the handler is invoked which will render out the fragment work available
so far, recycle the tiler heap memory and trigger a preload for the
remaining fragment work.

Once the fragment subqueue is made aware that the tiler work has
completed, it will disable the exception handler until the state for the
next renderpass has been set up correctly, as we could otherwise get the
handler invoked based on state from a previous renderpass.

The implementation based on the similar implementation in Panfrost [1],
but works slightly differently due to PanVK utilizing multiple subqueues
and supporting layered rendering.

[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:58:28 +01:00
Lars-Ivar Hesselberg Simonsen
687fd95399 panvk: Build cmd_fb_preload on explicit fb_info
Start explicitly passing the pan_fb_info-pointer to use for building
preloads rather than implicitly fetching it from the passed
command_buffer.

This allows building preloads for different fb_infos, which is required
for incremental rendering.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:58:28 +01:00
Boris Brezillon
7ae7152b0b pan/cs: Add block macro for exception handler
This commit provides a block-like macro to to define exception handlers
instead of requiring the user to call the start/end helpers.

Signed-off-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/31941>
2024-11-26 11:58:24 +01:00
Boris Brezillon
a502841fec pan/cs: Add dynamic save_reg to exception handler
Make the register dump address dynamic instead of passing it at handler
creation time. This is needed for PanVK if we want to re-use the same
handlers for different VkQueues, since the dump buffer needs to be per
VkQueue.

Signed-off-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/31941>
2024-11-26 11:58:20 +01:00
Boris Brezillon
1acc5e1433 pan/cs: Align exception handlers with NOPs
Align exception handlers to cache lines to allow having multiple
exception handlers in the same BO.

Signed-off-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/31941>
2024-11-26 11:58:15 +01:00
Boris Brezillon
0ae8e69810 pan/cs: Add cs_exception_handler_ctx
This allows us to modify the exception handler start arguments without
having to modify the function declaration.

Signed-off-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/31941>
2024-11-26 11:57:47 +01:00
Lars-Ivar Hesselberg Simonsen
2941a44b69 pan/cs: Add mask support for reg_perm
Add support for masks to reg_perm in order to not erroneously hit
asserts for restricted registers that are parts of tuples but are not
read/written to due to register mask.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:57:47 +01:00
Lars-Ivar Hesselberg Simonsen
565476d3b2 pan/genxml: Fix decode of exception_handler 0x0
Fixes the check for address 0x0 or length 0 when decoding
set_exception_handler.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31941>
2024-11-26 11:57:47 +01:00
Marek Olšák
8fc640b256 nir/lower_io_to_temporaries: fix interp_deref_at_* lowering
The pass converts:
    ...
    %.. = load_deref(input)
to:
    temp = copy_deref(input) // beginning of the shader
    ...
    %.. = load_deref(temp)

If interp_deref_at_* occurs between copy_deref and load_deref,
the interp_deref_at_* lowering overwrites temp, so all future
load_deref(temp) return the result of interp_deref_at_* instead of
copy_deref, which is incorrect.

The issue manifests when the same input is used by both load_deref
and interp_deref_at_* in the same shader and when interp_deref_at_*
happens to be before load_deref.

This fixes it by using a completely new temporary for each instance
of interp_deref_at_*.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32344>
2024-11-26 06:50:40 +00:00
Marek Olšák
c23abb12e8 nir: allow cloning indirect array derefs in nir_clone_deref_instr
but only if cloning within the same shader. This will be used to fix
nir_lower_io_to_temporaries.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32344>
2024-11-26 06:50:40 +00:00
Marek Olšák
a3516dafc9 util,amd: add inlinable versions of drmIoctl/drmCommandWrite*
The reason for this is to inline those calls in drivers.
They are very trivial, so why not.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32067>
2024-11-26 00:16:02 -05:00
Marek Olšák
049641ca54 amd: import libdrm_amdgpu ioctl wrappers
This imports 35 libdrm_amdgpu functions into Mesa.

The following 15 functions are still in use:
   amdgpu_bo_alloc
   amdgpu_bo_cpu_map
   amdgpu_bo_cpu_unmap
   amdgpu_bo_export
   amdgpu_bo_free
   amdgpu_bo_import
   amdgpu_create_bo_from_user_mem
   amdgpu_device_deinitialize
   amdgpu_device_get_fd
   amdgpu_device_initialize
   amdgpu_get_marketing_name
   amdgpu_query_sw_info
   amdgpu_va_get_start_addr
   amdgpu_va_range_alloc
   amdgpu_va_range_free

We can't import them because they make sure that we only use 1 VMID
per process shared by all APIs. (except the marketing name)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32067>
2024-11-25 21:03:41 -05:00
Timothy Arceri
65b73e6d87 glsl: drop unused symbol table from gl_shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00
Timothy Arceri
340f7edfba glsl: use symbol table directly for builtin functions
Builtin functions do no make use of gl_shader at all other than to store
a symbol table. So lets just create and use the symbol table directly
instead. This will allow us to drop the symbol table member from
gl_shader in the following patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00
Timothy Arceri
4ce9421acb glsl: drop _mesa_glsl_copy_symbols_from_table()
Unused since the previous commit

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00
Timothy Arceri
3b40db0ef6 glsl: don't copy symbol table to shaders
This is no longer needed since we switched to a full nir base linker. The
symbol table witchcraft is now only used in the ast code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32293>
2024-11-25 23:53:37 +00:00
Marek Olšák
6f0333920b nir/opt_varyings: use a hash table to make cloning SSA faster
Cloning recursively can have an exponential time complexity if
we don't skip already cloned nodes.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32337>
2024-11-25 22:24:22 +00:00
Timur Kristóf
8653abac09 ac/nir/ngg: Remove erroneous NUW addition from workgroup scan.
This may add constant -1 so naturally it can indeed cause
an unsigned wrap.

Fixes: 492d8f3778
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12204
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32338>
2024-11-25 21:43:45 +00:00
Alyssa Rosenzweig
96b38119ea nir/pack_bits: handle 8-bit vec8 -> 64-bit
This is a very silly case, but there's no reason not to handle it efficiently,
and this implementation is faster than the fallback. Noticed when playing with
scratch optimizations.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32322>
2024-11-25 15:53:31 -05:00
Alyssa Rosenzweig
4c84321683 vtn: ignore SpvFunctionParameterAttributeSret
this can happen with CL, but it seems it's just informational.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32322>
2024-11-25 15:53:31 -05:00
Manuel Dun
e928fc09d4 gfxstream: Using DETECT_OS_LINUX from util instead of __linux__
The DETECT_OS_LINUX constant defined in util/detect_os.h allows
replacing the ocurrences of defined(__linux__) and __linux__. They
are equivalent in functionality but the util's one is easier to read and
write. Also it does not require the define() syntax.

The change involve replacing every ocurrence of defined(__linux__) with
DETECT_OS_LINUX. Then replacing every ocurrence of #ifdef __linux__
with #if DETECT_OS_LINUX.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32286>
2024-11-25 19:05:00 +00:00
Manuel Dun
5cf2d8efa3 gfxstream: Using DETECT_OS_FUCHSIA from util instead of __Fushsia__
The DETECT_OS_FUCHSIA constant defined in util/detect_os.h allows
replacing the ocurrences of defined(__Fushsia__) and __Fuschsia__. They
are equivalent in functionality but the util's one is easier to read and
write. Also it does not require the define() syntax.

The change involve replacing every ocurrence of defined(__Fuchsia__) with
DETECT_OS_FUCHSIA. Then replacing every ocurrence of #ifdef __Fuchsia__
with #if DETECT_OS_FUCHSIA.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32286>
2024-11-25 19:04:59 +00:00
Manuel Dun
870aa88a5f gfxstream: Using DETECT_OS_ANDROID from util instead of __ANDROID__
The DETECT_OS_ANDROID constant defined in util/detect_os.h allows
replacing the ocurrences of defined(__ANDROID__) and __ANDROID__. They are
equivalent in functionality but the util's one is easier to read and
write. Also it does not require the define() syntax.

The change involve replacing every ocurrence of defined(__ANDROID__) with
DETECT_OS_ANDROID. Then replacing every ocurrence of #ifdef __ANDROID__
with #if DETECT_OS_ANDROID.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32286>
2024-11-25 19:04:59 +00:00
Mary Guillemard
dec5523e33 panvk: Advertise VK_EXT_pipeline_robustness
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32331>
2024-11-25 18:33:40 +00:00
Mary Guillemard
8485b3fcff panvk: Advertise VK_EXT_image_robustness
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32331>
2024-11-25 18:33:40 +00:00
Mary Guillemard
bacdf351f6 panvk: Disable integer array indices clamping
This is required to support VK_EXT_image_robustness properly as
otherwise the array index would be clamped to the array size on
TEX_FETCH and would not end up returning zeroes as expected by
the extension.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32331>
2024-11-25 18:33:40 +00:00
Chia-I Wu
f9c39ceaf5 panvk: use u_foreach_bit to loop over mask bits
It is both faster and more readable.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32324>
2024-11-25 18:07:10 +00:00
Rebecca Mckeever
412c286331 panvk: Enable multiplane images and image views
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31776>
2024-11-25 17:34:35 +00:00
Rebecca Mckeever
9aa2c1ec56 panvk: Replace tab with spaces
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31776>
2024-11-25 17:34:35 +00:00
Rebecca Mckeever
3295cb9700 panvk: Use vk_image::drm_format_mod instead of pan_image::layout.modifier
This will help prepare for multiplane, where panvk_image will have an array
of pan_image structs to represent the planes. The format modifier is the
same for all planes, so we can use vk_image::drm_format_mod.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31776>
2024-11-25 17:34:35 +00:00
Boris Brezillon
1289c5a30b panvk: Fix panvk_plane_index() for D32_SFLOAT_S8_UINT
We currently support D32_S8 as a single-planar format on Bifrost, so
fix the panvk_plane_index() accordingly.

We will restore this once we move to multi-planar D32_S8, which should
happen soon.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31776>
2024-11-25 17:34:35 +00:00
Erik Faye-Lund
ad8da772ab docs: add missing panfrost extensions
We've supported GL_ARB_transform_feedback3 since 2019,
GL_ARB_draw_indirect and GL_ARB_texture_cube_map_array since 2021.

...you get the picture. There's more, and they've all been around for a
good while. But it seems we forgot to tell features.txt about them.

Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:58 +01:00
Erik Faye-Lund
75fbf492ac docs: fixup a few mistakes with panfrost
Both of GL_OES_sample_shading and GL_OES_shader_multisample_interpolation
are enabled on panfrost when GL_OES_gpu_shader5 is enabled. And that's
the case on Bifrost and later, but not Midgard.

Let's fix up features.txt to match reality here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:58 +01:00
Erik Faye-Lund
d7342a0179 docs: refer to panfrost by version
The different Mali architecture versions are an easier way of reasoning
about what is and what isn't supported, so let's switch to that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:57 +01:00
Erik Faye-Lund
dc8c6d9978 docs: update GL_ARB_multi_draw_indirect support
This is always supported when GL_ARB_draw_indirect is supported, so
let's not needlessly repeat drivers here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:56 +01:00
Erik Faye-Lund
dcf380d1b6 docs: update GL_OES_shader_image_atomic support
This is always supported on GLES 3.1 now, so let's update features.txt
with that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:56 +01:00
Erik Faye-Lund
a9b662908c docs: mark GL_ARB_get_program_binary as always supported
We always support the extension. Wether we support any formats or not
depends on one of two conditions:

1. If Mesa is built with shader-cache support or not, which is not a
   driver decision.
2. If GL_ARB_gl_spirv is supported or not, which is covered elsewhere.

So there's no reason to list individual drivers here, as that doesn't
really change anything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:55 +01:00
Erik Faye-Lund
71b9848c07 docs: mark GL_ARB_shader_subroutine as always supported
This extension is always supported, no need to maintain a list of
drivers that support it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32300>
2024-11-25 18:19:55 +01:00
Eric R. Smith
3022258de5 panfrost: add panfrost support for NV15, NV16 and NV20
Update panfrost to add support for NV16 and for the 10 bit
NV15 and NV20 formats.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31854>
2024-11-25 13:04:19 +00:00
Eric R. Smith
f539763cfc dri: fix NV15 and NV20 definitions to make sure they will be used
Although there are no DRI formats directly corresponding to 10bpp
planes (as used in e.g. NV15), some hardware can emulate NV15 with
R10_G10B10_420. Check for this in dri2_yuv_dma_buf_supported, so
that we can advertise support for these formats if available.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31854>
2024-11-25 13:04:19 +00:00
Eric R. Smith
1ea79ec164 egl, mesa: add support for NV15 and NV20 textures
Support external images with 10 bit YUV in NV15 and NV20 formats.
These are produced by some hardware decoders, so this will be
useful.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31854>
2024-11-25 13:04:19 +00:00
Eric R. Smith
440b69210a dri, mesa: fix NV16 texture format
Support for NV16 was kind of half done, by declaring it to be
NV12. That didn't actually work though, so add some more stuff
to make it work.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31854>
2024-11-25 13:04:19 +00:00
Eric R. Smith
b6531e45ed util: rename PIPE_FORMAT_Y8_U8V8_422_UNORM
Y8_U8V8_422_UNORM is more commonly known as NV16. There has been
a fourcc for NV16 for a while now, so let's rename it to be in
line with NV12 and similar formats.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31854>
2024-11-25 13:04:19 +00:00
Hans-Kristian Arntzen
fc9ae4b974 radv: Fix missing gang barriers for task shaders.
It's also possible to use ALL_GRAPHICS and PRE_RASTERIZATION as
alternatives.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32323>
2024-11-25 12:37:47 +00:00
Georg Lehmann
2865dc5fa5 radv/ci: document test_shader_sm66_is_helper_lane as fixed
This reverts commit 480fcf7aff.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32310>
2024-11-25 11:50:27 +00:00
Georg Lehmann
5edae68966 nir/move_discards_to_top: don't move across is_helper_invocation
This was obviously broken because demote results in more helper invocations.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: b447f5049b ("nir: Add a discard optimization pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32310>
2024-11-25 11:50:27 +00:00
Boris Brezillon
74f76f8df2 panvk/csf: Explain why the tiler is set to 0xdeadbeefdeadbeef
When simul_use=true, the tiler descriptors are allocated from
the descriptor ringbuf. We set state.gfx.render.tiler to a
non-NULL value to satisfy the is_tiler_desc_allocated() tests,
but we want it to point to a faulty address so we can easily
detect if it's used in the command stream/framebuffer
descriptors.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32213>
2024-11-25 11:20:23 +00:00
Boris Brezillon
3d5d6327be panvk/csf: Fix cross command buffer render pass suspend/resume
Fix cross command buffer render pass suspend/resume by
emitting a render context (tiler+framebuffer descriptors)
on suspend that we can re-use on resume.

This involves splitting the issue_fragment_jobs() logic to
decouple the framebuffer descriptor initialization and the
run_fragment emission. This also requires patching a few
places where we were testing the tiler/fbd values to
determine if we are in a render pass, which no longer works
when a render pass is resumed.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32213>
2024-11-25 11:20:23 +00:00
Boris Brezillon
5a6e992048 panvk/csf: Keep a cache of the CS reg file at the panvk_queue level
This allows us to start from the HW reg file state instead of a
zero-initialized reg file.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32213>
2024-11-25 11:20:23 +00:00
Boris Brezillon
b2bac439d5 pan/decode: Flush the dump file before crashing
Useful when debugging GPU faults.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32213>
2024-11-25 11:20:23 +00:00
Pavel Ondračka
9838024547 r300: always transform sin/cos input for fs
We don't need to check anymore if this was already applied and it turned
out the check was not working properly in the first place.

The check for vs is kept in place, because that one still detects that
few wine shaders already have the sin/cos input in correct range.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32160>
2024-11-25 10:59:38 +00:00
Marek Olšák
ec1a00f507 r300: don't lower sin/cos in finalize_nir
finalize_nir requires that calling it multiple times on the same shader
doesn't break it.

RV530 shader-db:
total instructions in shared programs: 132915 -> 132851 (-0.05%)
instructions in affected programs: 2016 -> 1952 (-3.17%)
helped: 16
HURT: 0
total temps in shared programs: 18238 -> 18232 (-0.03%)
temps in affected programs: 42 -> 36 (-14.29%)
helped: 6
HURT: 0
total cycles in shared programs: 197510 -> 197446 (-0.03%)
cycles in affected programs: 2102 -> 2038 (-3.04%)
helped: 16
HURT: 0

Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32160>
2024-11-25 10:59:37 +00:00
Pavel Ondračka
d406dbbde9 r300: run nir_opt_algebraic in the backend
No effect in shader-db right now, but without it the next commit
leads to small regression in instruction numbers (0.03%) instead
of the small win we have now (-0.05%).

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32160>
2024-11-25 10:59:37 +00:00
Rhys Perry
63b0692eac aco: don't use uniform continues if exec might be empty
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
aa0ede751d aco/tests: add tests for empty exec masks
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
f35e229fae aco: skip code if exec is empty
This is safer and potentially faster.

fossil-db (navi21):
Totals from 690 (0.87% of 79395) affected shaders:
Instrs: 4534778 -> 4535916 (+0.03%)
CodeSize: 25268516 -> 25272080 (+0.01%); split: -0.00%, +0.01%
Latency: 48482721 -> 48513907 (+0.06%); split: -0.00%, +0.07%
InvThroughput: 13213965 -> 13217828 (+0.03%); split: -0.00%, +0.03%
Copies: 432307 -> 432295 (-0.00%); split: -0.05%, +0.04%
Branches: 187305 -> 188249 (+0.50%)
VALU: 2904490 -> 2904508 (+0.00%); split: -0.00%, +0.00%
SALU: 674962 -> 675133 (+0.03%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
f00c3a14c0 aco: require WQM after demote in control flow
fossil-db (navi21):
Totals from 424 (0.53% of 79395) affected shaders:
Instrs: 404496 -> 404752 (+0.06%); split: -0.07%, +0.13%
CodeSize: 2150608 -> 2151616 (+0.05%); split: -0.05%, +0.09%
Latency: 9124298 -> 9115957 (-0.09%); split: -0.12%, +0.03%
InvThroughput: 1883570 -> 1883468 (-0.01%); split: -0.01%, +0.00%
VClause: 6832 -> 6830 (-0.03%)
SClause: 13801 -> 13778 (-0.17%); split: -0.17%, +0.01%
Copies: 26758 -> 26673 (-0.32%); split: -0.44%, +0.12%
Branches: 9819 -> 9567 (-2.57%)
PreSGPRs: 17902 -> 17934 (+0.18%)
SALU: 45407 -> 45906 (+1.10%); split: -0.01%, +1.11%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
8a175b02bc aco: use repair pass for LCSSA workaround
This makes instruction selection simpler and fixes potential issues with
allocated_vec or the optimizer moving SGPR uses out of the loop.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31143>
2024-11-25 10:32:59 +00:00
Rhys Perry
5de990f5a9 aco: add SSA repair pass
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31143>
2024-11-25 10:32:58 +00:00
Roman Stratiienko
83b4b829fd v3dv/android: Suppress AHB-related log spam
The VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID is handled
by the common code.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32314>
2024-11-25 08:08:25 +00:00
Samuel Pitoiset
ba77b2d65d radv: fix printing with RADV_DEBUG=psocachestats
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32254>
2024-11-25 07:36:49 +00:00
Samuel Pitoiset
6c967c9bbe radv: fix dumping the trap handler shader disassembly
This has been broken in the recent RADV_DEBUG=shaders refactoring.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32254>
2024-11-25 07:36:49 +00:00
Samuel Pitoiset
5c3a757ba6 radv: add a pipeline helper to skip shaders cache
It's common for the three type of pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32254>
2024-11-25 07:36:48 +00:00
Samuel Pitoiset
3f646d43dd radv: fix dumping debug/perftest options when there are holes
Also fix the wrong assertion.

Fixes: 8c1e2ac03b ("radv: Refactor RADV_DEBUG=shaders to be a combination of other options.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32276>
2024-11-25 07:01:06 +00:00
Boris Brezillon
e0f48568c7 panfrost: Advertise support for AFBC(32x8,sparse,split)
Some MTK display controller drivers support only this AFBC modifier.
Give it a chance to use AFBC for scanout resources.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:26:36 -05:00
Boris Brezillon
4af57952b1 panfrost: Add support for AFBC(split)
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:26:26 -05:00
Boris Brezillon
762a0f4133 panfrost: Add the concept of render block
When dealing with AFBC render targets using wide blocks, the GPU needs to
keep rendering tiles that are a multiple of 16x16. This is described
as AFBC render block size, and adds extra constraints:

- render target buffers need to be aligned on 16 pixels in the vertical
  direction, even if the AFBC super block size is 4 or 8 pixels.
- if the effective tile size is smaller than the render block size, we
  should force a clean write and discard+ignore the CRC

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:26:14 -05:00
Boris Brezillon
303acdef07 panfrost: Add a helper to expose the maximum effective tile size
On all previous GPUs, the effective tile size was limited to 16x16, but
it got increased on v10. Add an helper to query this maximum effective
tile size.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:26:02 -05:00
Louis-Francis Ratté-Boulianne
a3c8258908 panfrost: Select the effective tile size as part of pan_fb_info
This allows using the tile size to make decisions not related to the
framebuffer descriptor. Mainly, for the near future, to decide
whether some tiling hierarchy levels should be disabled.

The color buffer allocation size is also calculated at the same time
as it's using common data underneath.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:25:58 -05:00
Louis-Francis Ratté-Boulianne
eead8b6efd panfrost: Split up allocation and packing of tiler descriptor
This is mostly useful so that we can set the hierarchy level mask
using information from the `pan_fb_info` structure that isn't filled
yet when the tiler descriptor is first allocated.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:25:51 -05:00
Boris Brezillon
ca84b1e9b5 panfrost: Increase AFBC body alignment requirement on v6+
AFBC body is required to be aligned on 128 bytes on v6+ hardware.

Cc: mesa-stable
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31948>
2024-11-25 00:25:05 -05:00
Timur Kristóf
45c523104a ac/nir/ngg: Implement optional primitive compaction.
It's an experimental feature that we may enable later.
Instead of exporting NULL primitives, perform a compaction
on primitives after culling.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32290>
2024-11-25 01:56:20 +01:00
Timur Kristóf
492d8f3778 ac/nir/ngg: Workgroup scan over two bools.
Implement two workgroup scans over two boolean values in parallel,
so that they can be done with very minimal ALU overhead.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32290>
2024-11-25 01:56:08 +01:00
Timur Kristóf
78f77e161c ac/nir/ngg: Pass wg_repack_result as pointer instead of returning it.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32290>
2024-11-25 01:55:30 +01:00
Patrick Lerda
ac78692be4 r600: evergreen stencil/depth mipmap blit workaround
In certain cases, the hardware fails to properly process a mipmap level
of these special stencil and depth formats. This happens at width=16.
This change adds a software workaround.

Modifying the corresponding mipmap nblk_x, and the other related
values, could make the tests below to work. Anyway, this method
generates regressions.

This change was tested on palm and cayman and fixes the following tests:
spec/arb_framebuffer_object/framebuffer-blit-levels read stencil: fail pass
spec/arb_depth_buffer_float/fbo-clear-formats stencil/gl_depth32f_stencil8: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31957>
2024-11-24 21:01:54 +00:00
Patrick Lerda
81889f4d5c r600: ensure that the last vertex is always processed on evergreen
This situation is happening, for instance, when the hardware is
using the type FMT_8_8_8_8 (4 bytes) while the software was
requesting a 3 bytes type. The width should be adjusted to the
expected hardware size; otherwise, the last vertex is lost.

Note: The rv770 didn't behave like this. This is definitely
a hardware change between these gpus.

This change was tested on palm and cayman. Here are the tests fixed:
spec/!opengl 2.0/gl-2.0-vertexattribpointer-size-3: fail pass
deqp-gles2/functional/draw/random/62: fail pass
deqp-gles2/functional/vertex_arrays/single_attribute/strides/buffer_0_32_byte3_vec4_dynamic_draw_quads_1: fail pass
deqp-gles2/functional/vertex_arrays/single_attribute/strides/buffer_0_32_short3_vec4_dynamic_draw_quads_1: fail pass
deqp-gles2/functional/vertex_arrays/single_attribute/strides/buffer_0_32_short3_vec4_dynamic_draw_quads_256: fail pass
deqp-gles3/functional/draw/random/117: fail pass
deqp-gles3/functional/vertex_arrays/single_attribute/strides/byte/buffer_stride32_components3_quads1: fail pass
deqp-gles3/functional/vertex_arrays/single_attribute/strides/short/buffer_stride32_components3_quads1: fail pass
deqp-gles3/functional/vertex_arrays/single_attribute/strides/short/buffer_stride32_components3_quads256: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32184>
2024-11-24 20:23:38 +00:00
Patrick Lerda
275535774c r600: restructure r600_create_vertex_fetch_shader() to remove memcpy()
Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32184>
2024-11-24 20:23:38 +00:00
Patrick Lerda
4d24995adb r600: fix the evergreen sampler when the minification and the magnification are not identical
This change fixes the evergreen nonconformity issue on non-mipmap
textures when the minification and the magnification are not in
the same state.

This modification disables 5278436d67 when the minification and
the magnification are different. This fixes the nonconformity
without new regressions. Anyway, I was unable to reproduce
the issue described by 5278436d67 on palm and cayman.

This change was tested on cayman and palm. It fixes 84 deqp-gles2
tests and 128 deqp-gles3 tests:
deqp-gles2/functional/texture/filtering/2d/linear_nearest_*
deqp-gles2/functional/texture/filtering/2d/nearest_linear_*
deqp-gles2/functional/texture/filtering/cube/linear_nearest_*
deqp-gles2/functional/texture/filtering/cube/nearest_linear_*
deqp-gles2/functional/texture/vertex/2d/filtering/linear_nearest_*
deqp-gles2/functional/texture/vertex/2d/filtering/nearest_linear_*
deqp-gles2/functional/texture/vertex/cube/filtering/linear_nearest_*
deqp-gles2/functional/texture/vertex/cube/filtering/nearest_linear_*
deqp-gles3/functional/texture/filtering/2d/combinations/linear_nearest_*
deqp-gles3/functional/texture/filtering/2d/combinations/nearest_linear_*
deqp-gles3/functional/texture/filtering/2d_array/combinations/linear_nearest_*
deqp-gles3/functional/texture/filtering/2d_array/combinations/nearest_linear_*
deqp-gles3/functional/texture/filtering/3d/combinations/linear_nearest_*
deqp-gles3/functional/texture/filtering/3d/combinations/nearest_linear_*
deqp-gles3/functional/texture/filtering/cube/combinations/linear_nearest_*
deqp-gles3/functional/texture/filtering/cube/combinations/nearest_linear_*
deqp-gles3/functional/texture/vertex/2d/filtering/linear_nearest_*
deqp-gles3/functional/texture/vertex/2d/filtering/nearest_linear_*
deqp-gles3/functional/texture/vertex/2d_array/filtering/linear_nearest_*
deqp-gles3/functional/texture/vertex/2d_array/filtering/nearest_linear_*
deqp-gles3/functional/texture/vertex/3d/filtering/linear_nearest_*
deqp-gles3/functional/texture/vertex/3d/filtering/nearest_linear_*
deqp-gles3/functional/texture/vertex/cube/filtering/linear_nearest_*
deqp-gles3/functional/texture/vertex/cube/filtering/nearest_linear_*

Fixes: 5278436d67 ("r600: force LOD range to be only one value when mip.min filter is NONE")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32185>
2024-11-24 20:07:42 +00:00
Gert Wollny
42be38a8fb radeon/evergreen: ensure equal sizes for depth-stencil npot textures
On evergreen depth-stencil textures are allocated as two objects, and
when using the eg_surface_init_1d_miptrees code path the size evaluation
uses the generalized surf_minify function. Here when allocating the
depth texture the alignment takes the depth bpe value into account, and
uses bpe=1 for the stencil texture. As a result the texture pair may
consist of textures with two different nblk_x sizes and this seems to
be a problem with some textures, namely npot and small (width < 32), but
not for mipmapped textures. In the problematic cases, if the so allocated
depth texture is larger than the stencil texture, then the kernel may reject
sent data with an error message like:

 evergreen_cs_track_validate_stencil:622 stencil read bo too
  small (layer size 131072, offset 524288, max layer 1, bo size 606208)

- because apparently the expected layer size is evaluated from the depth
texture size, but the actual bo size is evaluated based on the true texture
size values. If, on the other hand, the stencil texture is larger than the
depth texture, then the data is send with a wrong alignment, and certain
dEQP-GLES31 tests fail.

In order to obtain equal texture sizes in the problematic cases magnify
the depth texture alignment requirement by its bpe, so that the relative
alignment is the same for depth and stencil texture.

Fixes:
  dEQP-GLES31.functional.stencil_texturing.format
    .depth32f_stencil8_2d
    .depth32f_stencil8_2d_array
    .depth24_stencil8_2d
    .depth24_stencil8_2d_array
    .stencil_index8_2d
    .stencil_index8_2d_array
    .depth32f_stencil8_draw
    .depth24_stencil8_draw

  dEQP-GLES31.functional.texture.border_clamp.formats
    .stencil_index8.nearest_size_npot
    .depth24_stencil8_sample_stencil.nearest_size_npot
    .depth32f_stencil8_sample_stencil.nearest_size_npot

  dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d
    .uint_stencil.nearest.s_clamp_to_edge_t_clamp_to_border_npot
    .uint_stencil.nearest.s_repeat_t_clamp_to_border_npot
    .uint_stencil.nearest.s_mirrored_repeat_t_clamp_to_border_npot

  piglits:
    arb_framebuffer_object-depth-stencil-blit *stencil*
    framebuffer-blit-levels draw stencil
    arb_texture_stencil8/
       texwrap formats offset/gl_stencil_index8, npot
       texwrap formats/gl_stencil_index8, npot
    ext_framebuffer_multisample
       accuracy all_samples stencil_resolve small depthstencil
       unaligned-blit * stencil downsample
    ext_texture_array/fbo-depth-array *stencil
    egl_khr_gl_renderbuffer_image-clear-shared-image gl_depth_component24

v2: use util_is_power_of_two_or_zero (Marek)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32169>
2024-11-24 20:43:57 +01:00
Benjamin Lee
7eda433095 nir: document order requirement for nir_lower_viewport_transform
This requirement is currently satisfied by the usage in panfrost and
lima.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32084>
2024-11-24 17:25:14 +00:00
Benjamin Lee
11b6e47618 nir: clamp small W in nir_lower_viewport_transform
Because we are doing perspective division before clipping, small
gl_Position.w values will give Inf for positions and interpolated
varyings. Before this change, primitives containing a vertex with w=0
were invisible.

This is only used in panfrost and lima.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32084>
2024-11-24 17:25:14 +00:00
Tapani Pälli
19b6991160 anv/android: always create 2 graphics and compute capable queues
Android hwui requires 2 queues.

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/32279>
2024-11-24 16:39:33 +00:00
Alyssa Rosenzweig
430fa29953 asahi: refmt
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
0755b6d3d5 asahi: add XML for cdm stream link with return
I don't know of any case of Apple's driver using this, but it seems to work. The
stream link bit is identical to VDM so that was easy, the tricky part was the
return but I bruteforced the encoding space and this is the (only) thing that
worked. So add the XML.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
ebdca6344e asahi/genxml: define missing macros
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
e01dc7a588 asahi/genxml: optimize out masking with shr
noticed in the agx asm.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
6a1a3dac21 asahi/genxml: fix 128-bit in CL path
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
a34b3ecb75 asahi/genxml: fix 0 encoding for groups
this was breaking launch word merging.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
65cc99a916 libagx: don't export vertex_id_for_top
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
810971532f libagx: fix return type
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
6dea5f49f2 hk: dce
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
33b41e029a hk: add cmd buffer to hk_cs
convenient.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
7609a974a3 hk: use common wg size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:09 +00:00
Alyssa Rosenzweig
7c921fa0d7 hk: do not increment GS queries for passthru GS
fixes vkd3d-proton test_query_pipeline_statistics

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
6b8d4cca7e hk: be robust against invalid MSAA inputs
fixes vkd3d-proton test_multisample_rendering

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
1f7598c202 hk: implement EXT_depth_bias_control
fixes Z24 depth bias with Proton

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
94160615ef hk: handle mismatching colour vs z/s dimensions
hw doesn't really care. fixes test_mismatching_rtv_dsv_size

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
628a119d82 hk: expose missing eds3 feature
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
0caf6e0440 hk: generalize internal launch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
aae0c1d5a8 asahi,hk: reenable rgb32 buffer textures
Apparently Direct3D has this. Boo :'(

This reverts commit 049808630e.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
02d4f49bcd agx: gather workgroup size
deduplicate this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
f4bd5466ee agx: vectorize scratch access
can help a lot for scratchy shaders. affected shader is a compute shader in
graphics bench.

total instructions in shared programs: 2751334 -> 2750950 (-0.01%)
instructions in affected programs: 4308 -> 3924 (-8.91%)
helped: 2
HURT: 0

total bytes in shared programs: 21482512 -> 21480592 (<.01%)
bytes in affected programs: 27448 -> 25528 (-7.00%)
helped: 2
HURT: 0

total fills in shared programs: 732 -> 540 (-26.23%)
fills in affected programs: 396 -> 204 (-48.48%)
helped: 2
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
e99418919c asahi/clc: drop getopt
I don't think it's buying us anything anymore.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
a1fe60fd98 asahi/decode: disasm 3D helper progs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
b001d68c69 asahi: drop desc align alloc
might bring it back later idk we'll see.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
ae8e45e19c asahi,agx: move texture lowering into the compiler
this untangles things for precomp.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
2c17df7010 asahi: drop dead ACCESS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
c602832471 libagx: DCE
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
Alyssa Rosenzweig
6aad96f6cd libagx: move out of lib/
make the hierarchy saner.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
2024-11-24 13:06:08 +00:00
liuqiang
82e68de681 lavapipe: Resolved write to pointer after free
Write to "alloc" pointer variable after free "alloc"

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")

Signed-off-by: liuqiang <liuqiang@kylinos.cn>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32292>
2024-11-24 06:11:40 +00:00
Karol Herbst
6088a4373c rusticl/mesa: make driver_name() return a &CStr
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32253>
2024-11-23 11:29:18 +00:00
Karol Herbst
4750619491 rusticl/kernel: convert name and type_name to Option<CString>
This also lets us throw CL_KERNEL_ARG_INFO_NOT_AVAILABLE easily on non
existing metadata.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32253>
2024-11-23 11:29:18 +00:00
Karol Herbst
813edb6cea rusticl: check for overrun status when deserializing
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32253>
2024-11-23 11:29:18 +00:00
Mike Lothian
3aa7497cc0 gallium/radeon: Fix r600_pci_ids.h include
The new location is pci_ids/r600_pci_ids.h

Fixes: 1299f5c50a ("gallium/radeon: import libdrm_radeon source code, drop the dependency")
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32298>
2024-11-23 02:35:57 +00:00
Alyssa Rosenzweig
41958cfc73 libagx: switch to vtn_bindgen
this splits out our headers properly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32226>
2024-11-22 23:04:17 +00:00
Alyssa Rosenzweig
0b588506ff vtn: introduce vtn_bindgen tool
This is a small command line utility to generate NIR bindings for a SPIR-V
library, using vtn's infrastructure for this. This is split out from asahi_clc
in an effort to make clc more modular. Notably, this tool does not depend on:

* LLVM, SPIRV-LLVM, CLC, etc (important for Android, and gets us closer to the
  clang spir-v future)
* Driver details other than addressing modes (which are already largely
  hardcoded, setting them to anything else doesn't make a ton of sense for CL C)
* The driver itself, or its backend compiler. That means that the backend
  compiler can depend on the generated bindings header, even if the compiler is
  also used for internal shader precompiling. This breaks the dep loop.

So in short term, this solves the dependency problem for asahi, and in the long
term helps more drivers use clc infrastructure without re-rolling things
themselves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32226>
2024-11-22 23:04:17 +00:00
Alyssa Rosenzweig
6874c4f516 nir: add nir_fixup_is_exported pass
See comment in the pass for motivation. To be used for asahi clc.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32226>
2024-11-22 23:04:17 +00:00
Caio Oliveira
0c0b61b029 intel/brw: Dump IR after lower scoreboard pass
Acked-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32269>
2024-11-22 21:47:46 +00:00
Caio Oliveira
90343f452d intel/brw: Fix SWSB output when printing IR
The printing routine was ignoring dependencies that
were only unordered.

Acked-by: Iván Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32269>
2024-11-22 21:47:46 +00:00
Caio Oliveira
1d704af515 intel/brw: Fix decoding of cond_modifier and saturate in EU validation
These fields are only valid in certain formats, so set them accordingly.
Note the check if !is_send is used because FORMAT_BASIC is reused for
SEND/SENDS in some platforms.  If we start to see more cases like that,
we can create a new FORMAT for it.

The cond_modifier is trickier because on top of that, it is not valid
for 64-bit immediates in some platforms.  Found when EU validation
complained about moving 64-bit immediates with higher bits.

Fixes: e4440df2d8 ("intel/brw: Add pred/cmod/sat to brw_hw_decoded_inst")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32287>
2024-11-22 21:15:46 +00:00
Eric Engestrom
480fcf7aff radv/ci: document regression of test_shader_sm66_is_helper_lane in 7469f99e...25b8f4f7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32309>
2024-11-22 20:49:52 +00:00
Nanley Chery
385080fb92 intel: Allow CCS on 3D surfaces for gfx120
According to HSD 1406738321, full resolves and fast-clears don't work
properly on 3D textures. Up until now, we've disabled CCS for this case.
Instead, redescribe the surface as 2-dimensional to perform auxiliary
surface operations.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31880>
2024-11-22 20:11:43 +00:00
Nanley Chery
84208d514e intel/isl: Allow CCS on 3D 64bpp+ Tile64
The restriction is incorrectly tagged for gfx12.5.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31880>
2024-11-22 20:11:43 +00:00
Nanley Chery
e32203827a intel/blorp: Assert 3D Ys fast-clear restriction
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31880>
2024-11-22 20:11:43 +00:00
Chia-I Wu
4d35002949 panvk: expand top-of-pipe and bottom-of-pipe
Use vk_expand_src_stage_flags2 and vk_expand_dst_stage_flags2, instead
of vk_expand_pipeline_stage_flags2, to expand bottom-of-pipe and
top-of-pipe respectively.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32289>
2024-11-22 19:46:35 +00:00
Deborah Brouwer
4c8ff06449 ci/pipeline_message: add unit tests for tool
Add initial unit tests for pipeline_summary.py

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32151>
2024-11-22 19:42:32 +00:00
Deborah Brouwer
76648a60bb ci: add a tool to summarize a failed pipeline
pipeline_summary.py generates a markdown summary of the reasons why a
gitlab pipeline failed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32151>
2024-11-22 19:42:32 +00:00
Caio Oliveira
9383a62d95 intel/executor: Enable PTL
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32196>
2024-11-22 10:26:12 -08:00
Derek Foreman
2e49448a43 vulkan/wsi/wayland: Move timing calculations to the swapchain
When we create a new swapchain to replace the one currently presenting on
a surface, we need to reset all these timing variables. Otherwise we can
lose track of corrections that were made for the old swapchain when we
delete undelivered presentation feedback results.

Also, we use these variables when queuing a presentation, but we also use
them in the dispatch code that can be called by WaitForPresent from another
thread. We need to protect these variables against concurrent usage.

This is all much easier to do when they're stored as part of the swapchain
instead of the surface, so just move them there and adjust the locking.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32121>
2024-11-22 15:50:35 +00:00
Derek Foreman
b9c8afae33 vulkan/wsi/wayland: Avoid spurious discard event at startup
When we start using timestamps, the current code will generate an event
stream like:

feedback
set barrier
wait barrier
commit

feedback
set timestamp
set barrier
commit

wait barrier
commit

The second content update can cause the feedback request from the first to
send a discarded event if the timestamp is in the past.

Be less clever and just put waits in both our content updates.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32121>
2024-11-22 15:50:35 +00:00
Derek Foreman
ed2bb692f7 vulkan/wsi/wayland: Fix time calculation
When occluded, the current math always rounds down to 0 cycles and leads
to improperly throttled frame delivery.

Improve the comment, and use a formula that leads to generating future
times even when occluded.

Also remove some dead code, as we can never get here with a period of 0.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Fixes: c26ab1aee1 ("vulkan/wsi/wayland: Pace frames with commit-timing-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32121>
2024-11-22 15:50:34 +00:00
Boris Brezillon
f1665024b8 panvk/ci: Update CI expectations to have a green CI
Update just enough of the fail list to have a green CI. I'm sure a
no-fraction run would uncover other improvements/failures/flakes, but
the goal here is to detect improvements/regressions introduced by new
MRs, not to make the list accurate. This will be tackled in a follow-up
MR.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32302>
2024-11-22 15:00:51 +00:00
David Rosca
12fff8005a frontends/va: Enable 3-plane YUV formats as postproc output
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
David Rosca
6c83f3c3bb gallium/vl: Don't support planar RGB as video format
We assume everywhere that RGB is not planar, so sampling
and color space conversions will not work correctly with RGBP.
Drivers can still support RGBP, but processing entrypoint with
shaders doesn't support it.

Fixes: bdb7f36aa8 ("frontends/va: add support for RGBP rt_format")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
David Rosca
0f533b387c gallium/vl: Implement rendering to 3-plane YUV formats
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
David Rosca
7d1ce3d802 frontends/va: Change default fourcc for RGB 10bit to X2R10G10B10
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
David Rosca
3e3eb62cae frontends/va: Return correct pixel formats in surface attributes query
This matches the supported formats we query for in config attributes.
Also prefer YUY2 over YUYV (identical formats), as YUY2 has a VA_FOURCC_YUY2
definition and some applications will only try to use this fourcc code.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32252>
2024-11-22 14:29:53 +00:00
Eric Engestrom
c20e9868bf ci/container: setup sections in all image builds
Several of them don't use sections yet, but let's just have it
everywhere to avoid weird surprised when moving code around and suddenly
a section is used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32299>
2024-11-22 11:40:56 +01:00
Eric Engestrom
712eccf544 ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
ad42be50c9 ci/deqp: fully isolate deqp builds
Since the builds can be from very different versions of the code, we
need to make sure the common bits are compiled from the correct code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
1b973278bd ci/deqp: make sure the main commit is actually from the main branch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
84e855953c ci/deqp: add build of main branch
For now, this just contains the tools unrelated to any API being tested
(`testlog-to-{xml,csv,junit})`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
e3c3b270d8 ci/deqp: build glcts in gles build, for gles*-khr tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
393eafe10b ci/deqp: error out in case of invalid build API
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
9a689b15d9 ci/deqp: avoid downloading 1.47 GiB multiple times
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
7832ff9b26 ci/deqp: fetch & checkout exactly the commit/tag/branch requested
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
97e6bda35c ci/deqp: build testlog tools on android
`cuttlefish-runner.sh` uses them so we can't skip them

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
e549b6fba2 ci/deqp: only compress caselists when they exist
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
08e5a50921 ci/deqp: move testlog-to-* tools to /deqp
While at it, make it a move instead of copy + delete.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
55eb200e81 zink+radv/ci: fix deqp binary used for gles tests
I did half the job in that commit: I split the two apis into two
invocations, but I didn't fix the binary used for the gles one...

Fixes: 14279087fb ("ci/deqp-runner: split gl & gles groups to use the correct binary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Eric Engestrom
25bf8e9682 zink+nvk/ci: fix deqp binary used for gles tests
Fixes: 5a6ffd1420 ("zink/ci: add zink+nvk glcts+piglit job on a GA106 (RTX 3060)")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32250>
2024-11-22 10:16:49 +00:00
Daniel Schürmann
bb87832ce0 aco/insert_NOPs: add early exit to handle_valu_partial_forwarding_hazard_instr
No need to continue if there was already a hazard found in
a different control flow path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32191>
2024-11-22 08:46:32 +00:00
Daniel Schürmann
07df37ba01 aco/insert_NOPs: use RegCounterMap as replacement for the CounterMap implementation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32191>
2024-11-22 08:46:32 +00:00
Daniel Schürmann
fb5e5adfb3 aco/insert_NOPs: implement vector-based RegCounterMap as replacement for VGPRCounterMap
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32191>
2024-11-22 08:46:32 +00:00
Lionel Landwerlin
b44faa22ab anv: document the X4 Foundations workaround a bit more
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32297>
2024-11-22 10:19:26 +02:00
Lionel Landwerlin
0fa3be44aa anv: add a workaround for X4 Foundations
This title incorrectly tries to allocate descriptor sets larger than
the number of sampler items in the descriptor pool.

Workaround by taking other largest item count in the descriptor pool
and use that for samplers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11795
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32285>
2024-11-22 06:44:34 +00:00
Lionel Landwerlin
14d8da4c3c anv: indent driconf code
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32285>
2024-11-22 06:44:34 +00:00
Lionel Landwerlin
d483f7d984 anv: track allocated descriptor pool sizes
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32285>
2024-11-22 06:44:34 +00:00
Dave Airlie
25b8f4f714 venus: handle device probing properly.
Currently if you try to probe the virtio ICD on a non-virtio system
it will fail in CreateInstance which causes the loader to spit on the
screen.

However instance creation shouldn't fail, the driver should just
not enumerate any devices in this case. It's a bit tricky to ensure
this, but return instance and then handle instance destruction
and fail device enumeration.

Cc: mesa-stable
Reviewed-by: Ryan Neph
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32266>
2024-11-22 13:06:11 +10:00
Dave Airlie
0d15376647 v3dv: report correct error on failure to probe
When probing ICDs, the broadcom driver returns the wrong error code
which spews on the console instead of silently failing.

Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32266>
2024-11-22 13:05:57 +10:00
Caio Oliveira
3e2599d475 intel/brw: Use <V,W,H> notation for FIXED_GRF and ARF source when printing IR
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32260>
2024-11-21 17:36:34 -08:00
Caio Oliveira
71d362db66 intel/brw: Omit type and region in payload sources when printing IR
These are not really used since SEND messages deal with full GRFs.

Before

```
send(8) (mlen: 1) (ex_mlen: 1) (null):UD, 0u, 0u, g1:UD, g8:UD
send(8) (mlen: 1) g5:UD, 0u, 0u, g4:UD, (null):UD
send(8) (mlen: 1) (ex_mlen: 1) (null):UD, 0u, 16777216u, g1:D, g6:UD
send(8) (mlen: 1) (EOT) (null):UD, 0u, 0u, g126:UD, (null):UD NoMask
```

and after

```
send(8) (mlen: 1) (ex_mlen: 1) (null), 0u, 0u, g1, g8
send(8) (mlen: 1) g5, 0u, 0u, g4, (null)
send(8) (mlen: 1) (ex_mlen: 1) (null), 0u, 16777216u, g1, g6
send(8) (mlen: 1) (EOT) (null), 0u, 0u, g126, (null) NoMask
```

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32259>
2024-11-22 00:50:40 +00:00
Caio Oliveira
8474dc853d intel/brw: Add SHADER_OPCODE_QUAD_SWAP
For the horizontal, vertical and diagonal variants.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31053>
2024-11-22 00:27:01 +00:00
Timur Kristóf
73fc29b25c ac/nir/ngg: Slightly refactor workgroup scan.
No functional changes, just makes the code more readable.
Use inverse_ballot instead of elect.
Wrap if contents, rename if.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31973>
2024-11-22 01:01:39 +01:00
Timur Kristóf
24ccd134a6 ac/nir/cull: Slightly refactor control flow for small primitive culling.
Move the NIR control flow out of the cull_small_primitive_triangle
function to make it more readable and follow the other functions.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31973>
2024-11-22 01:01:35 +01:00
Timur Kristóf
218c824e27 ac/nir/ngg: Trade 1 VALU shift for 2 SALU add.
Change the workgroup scan to be inclusive and adjust
the scalar operations after it.
This gets rid of 1 VALU instruction for 2 SALU. Win!

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31973>
2024-11-22 01:01:31 +01:00
Timur Kristóf
340ec61984 ac/nir/ngg: Don't emit dead code with dot_op.
dot_op would be dead code when v_dot instructions are unavailable.
It was originally added there because ACO didn't have an ILP
scheduler yet, but now it does so let's trust it to do its job.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31973>
2024-11-22 01:01:09 +01:00
Timur Kristóf
b9d2b5e100 radv: Don't flush at the end of each command buffer on GFX6.
It should be enough to do this at the end of each submit instead.

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/31695>
2024-11-21 23:23:09 +00:00
Timur Kristóf
030a7510ce radv: Add a flush postamble on GFX6.
Create a CS which contains just a cache flush,
that can be used as a postamble in command submissions.

According to RadeonSI code, the kernel flushes L2
before shaders are finished on GFX6.

Previously, RADV always added a flush at the end of
each command buffer. The flush postamble should be
a less wasteful alternative to that.

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/31695>
2024-11-21 23:23:09 +00:00
Chia-I Wu
b3adf02b22 panvk: fix dirty check for prepare_blend
Add the missing fs_user_dirty and PANVK_CMD_GRAPHICS_DIRTY_RENDER_STATE
checks.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32267>
2024-11-21 23:02:22 +00:00
Chia-I Wu
e6f0c473ca panvk: minor clean up to prepare_blend
Sort the dirty states and make it clear that we use
panvk_rendering_state.

Constify color_attachment_samples for panvk_per_arch(blend_emit_descs).

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32267>
2024-11-21 23:02:21 +00:00
Danylo Piliaiev
fc50fb35b0 tu,freedreno: Enable linear mipmap tail for UBWC images
There is no point in using UBWC for last small mip levels,
it's an additional overhead for memory and likely less performant.

Additionaly this change fixes multi-planar formats with `noubwc`.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31631>
2024-11-21 22:28:34 +00:00
Danylo Piliaiev
9fc01ec4df freedreno/fdl: Pass fd_dev_info to fdl6_layout
In the next commit we will need to make a decision about layouts
based on GPU capabilities.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31631>
2024-11-21 22:28:34 +00:00
Danylo Piliaiev
4ccbc924b5 tu: Enable UBWC for 3D images without mipmaps
Many D3D11 games use 3D images writing to them from compute shaders.
Most of such 3D images don't use mipmaps, and in such case enabling
UBWC is trivial.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31631>
2024-11-21 22:28:34 +00:00
Alyssa Rosenzweig
0aaf174e31 nir/lower_system_values: add ID to 32-bit lowering
OpenCL has 64-bit global IDs, but for driver-internal OpenCL we only need
32-bit. Might as well lower in nir_lower_system_values instead of bringing up a
whole new pass just for this.

Will be used for asahi precomp

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32210>
2024-11-21 21:50:30 +00:00
Aleksi Sapon
f682982e53 zink: spec@arb_tessellation_shader@execution@gs-primitiveid-instanced is fixed
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32231>
2024-11-21 21:10:00 +00:00
Aleksi Sapon
f5379608fe llvmpipe: spec@arb_tessellation_shader@execution@gs-primitiveid-instanced is fixed
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32231>
2024-11-21 21:10:00 +00:00
Aleksi Sapon
b80d0d8bf4 draw: primitive ID is per-patch
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32231>
2024-11-21 21:10:00 +00:00
Tapani Pälli
c2b7bafd76 intel/dev: lower amount of max gs threads for Wa_18040209780
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/32245>
2024-11-21 20:43:38 +00:00
Tapani Pälli
7117e14026 intel/dev: update mesa_defs.json from workaround database
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/32245>
2024-11-21 20:43:38 +00:00
Eric Engestrom
2d1e0788d4 ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
4facfd6f4d ci/container: add section around strip-rootfs.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
31a23d9801 ci/lava: add setup-test-env.sh to the rootfs
This allows strip-rootfs.sh to use sections, useful in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
05b2024c36 ci/container: close debian_{setup,cleanup} sections
Allowing users to collapse them without hiding everything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
b693b704d9 ci/container: add sections around the other build scripts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
bc59acee8e ci/container: move wayland build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
b18cb0cb31 ci/container: move vulkan-validation build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
5655a30412 ci/container: move vkd3d-proton build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:56 +00:00
Eric Engestrom
b791074f2e ci/container: move rust build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
bc5ae2e5cb ci/container: move piglit build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
999cc1a86f ci/container: move ninetests build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
500c1c2d7c ci/container: move mold build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
0a7ab7da1a ci/container: move llvm-spirv build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
0cebd6b097 ci/container: move libclc build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
aba579811b ci/container: move kdl build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
5bfd49215b ci/container: move gfxreconstruct build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
493bebb9e9 ci/container: move fossilize build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
a824381408 ci/container: move deqp-runner build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
33ea8d3b81 ci/container: move crosvm build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
07de2140a3 ci/container: move apitrace build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Eric Engestrom
6551fb6504 ci/container: move deqp build section into the script itself
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32241>
2024-11-21 19:59:55 +00:00
Caio Oliveira
2bd7592b0b intel/brw: Add SHADER_OPCODE_BALLOT
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31052>
2024-11-21 19:32:59 +00:00
Dylan Baker
50e7a8ef25 docs: Add calendar entries for 24.3 release.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32283>
2024-11-21 19:24:32 +00:00
Dylan Baker
94d3415dcb docs/release-calendar: remove 24.3 RC dates
Those are done

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32283>
2024-11-21 19:24:32 +00:00
Dylan Baker
3b5d135fad docs/relnotes/24.3.0: Add SHA sums
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32283>
2024-11-21 19:24:32 +00:00
Dylan Baker
8661ff683a docs: add release notes for 24.3.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32283>
2024-11-21 19:24:32 +00:00
Danylo Piliaiev
e1efe655a7 ir3/parser: Add fullnop and fullsync sections for debugging
@fullnopstart
some assembly instructions
@fullnopend

Similar to fullnop and fullsync IR3 dbg options, but useful for
bisecting the assembly via shader override to find the problematic
place.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32256>
2024-11-21 18:45:15 +00:00
Danylo Piliaiev
2ab8eff511 tu/a7xx: Implement VK_KHR_fragment_shading_rate
- A650+ - should be able to support pipelineFragmentShadingRate
          but in some other way than A7XX. Not implemented here.
- A7XX  - support pipelineFragmentShadingRate and attachmentFragmentShadingRate
- A740+ - support primitiveFragmentShadingRate

layeredShadingRateAttachments is unsupported at the moment due to tests
failure, but prop driver supports it.

Passes:
  dEQP-VK.fragment_shading_rate.*
On A750/A740

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30905>
2024-11-21 17:59:09 +00:00
Danylo Piliaiev
117379a77a ir3,tu: Add support for Fragment Shading Rate and plumb it into Turnip
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30905>
2024-11-21 17:59:09 +00:00
Danylo Piliaiev
2038d363e7 freedreno/registers: Define Fragment Shading Rate registers
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30905>
2024-11-21 17:59:09 +00:00
Ruijing Dong
a53e6ae699 radeosi/vcn: enable EFC for VCN5.0+ when gfx >= 12
When gfx version >=12, EFC should be enabled for
VCN5 and plus, in that case DCC is transparent to
VCN engine.

The previous condition for DCC will be invalid, in
that case.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32263>
2024-11-21 16:14:11 +00:00
Eric Engestrom
db2806cf52 radeonsi/ci: drop two failures that are mysteriously fixed by using mold?
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Eric Engestrom
518ccd1ff3 ci: bump image tags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Eric Engestrom
524231d119 ci: when installing mold, make its use automatic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Eric Engestrom
ba0bb03c84 ci: drop override forcing ld to be gold (and forcing gold to be installed everywhere)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Eric Engestrom
657f8a08b7 ci/build: drop mold wrapper for ninja install
`install` doesn't perform any linking, it just installs what we built in
the previous command.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32046>
2024-11-21 15:33:31 +00:00
Georg Lehmann
43f77214a0 nir/move_discards_to_top: single final iteration
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Georg Lehmann
12d026d679 util: add BITSET_LAST_BIT_BEFORE
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
4c7d6e9437 nir/algebraic: optimize more bcsel(, bcsel())
This inot should be pretty optimizable.

fossil-db (navi21);
Totals from 2361 (2.97% of 79395) affected shaders:
MaxWaves: 50808 -> 50890 (+0.16%)
Instrs: 4168195 -> 4167332 (-0.02%); split: -0.05%, +0.03%
CodeSize: 22727496 -> 22708088 (-0.09%); split: -0.12%, +0.03%
VGPRs: 135160 -> 134824 (-0.25%)
SpillSGPRs: 723 -> 725 (+0.28%)
Latency: 37498671 -> 37479794 (-0.05%); split: -0.07%, +0.02%
InvThroughput: 10468406 -> 10453028 (-0.15%); split: -0.16%, +0.01%
VClause: 98258 -> 98283 (+0.03%); split: -0.04%, +0.07%
SClause: 111281 -> 111323 (+0.04%); split: -0.06%, +0.09%
Copies: 299281 -> 300155 (+0.29%); split: -0.17%, +0.46%
Branches: 115951 -> 116111 (+0.14%); split: -0.00%, +0.14%
PreSGPRs: 109404 -> 109462 (+0.05%); split: -0.14%, +0.19%
PreVGPRs: 114558 -> 114421 (-0.12%)
VALU: 2876823 -> 2869990 (-0.24%); split: -0.24%, +0.00%
SALU: 500286 -> 506124 (+1.17%); split: -0.03%, +1.20%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
7ef1585fd6 nir/algebraic: add is_used_once to bcsel(, bcsel()) opts
fossil-db (navi21):
Totals from 888 (1.12% of 79395) affected shaders:
MaxWaves: 18034 -> 18046 (+0.07%)
Instrs: 3422053 -> 3418446 (-0.11%); split: -0.11%, +0.01%
CodeSize: 18520912 -> 18500604 (-0.11%); split: -0.12%, +0.01%
VGPRs: 53200 -> 53176 (-0.05%)
Latency: 27739575 -> 27735200 (-0.02%); split: -0.06%, +0.04%
InvThroughput: 6784257 -> 6782188 (-0.03%); split: -0.06%, +0.03%
VClause: 83188 -> 83199 (+0.01%); split: -0.00%, +0.02%
SClause: 91350 -> 91362 (+0.01%); split: -0.00%, +0.02%
Copies: 263277 -> 262638 (-0.24%); split: -0.29%, +0.05%
PreSGPRs: 52478 -> 51940 (-1.03%); split: -1.03%, +0.01%
PreVGPRs: 47418 -> 47397 (-0.04%); split: -0.06%, +0.02%
VALU: 2235368 -> 2234513 (-0.04%); split: -0.05%, +0.01%
SALU: 547587 -> 544839 (-0.50%); split: -0.51%, +0.00%
VMEM: 142861 -> 142871 (+0.01%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
b8c8482dbb nir/algebraic: add ddxy to is_only_used_as_float
The sources for these intrinsics are floating point.

fossil-db (navi21):
Totals from 67 (0.08% of 79395) affected shaders:
MaxWaves: 1128 -> 1116 (-1.06%)
Instrs: 113552 -> 113319 (-0.21%); split: -0.21%, +0.01%
CodeSize: 595248 -> 593360 (-0.32%)
VGPRs: 4344 -> 4392 (+1.10%)
Latency: 578158 -> 577526 (-0.11%); split: -0.18%, +0.07%
InvThroughput: 170150 -> 169908 (-0.14%); split: -0.23%, +0.09%
SClause: 3787 -> 3780 (-0.18%)
Copies: 4305 -> 4294 (-0.26%); split: -0.51%, +0.26%
PreVGPRs: 3883 -> 3925 (+1.08%)
VALU: 90007 -> 89774 (-0.26%); split: -0.27%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
69f1a035ff nir/lcssa: use nir_intrinsic_can_reorder
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
ca27951743 nir/opt_move_discards_to_top: allow multiple discards to be moved
fossil-db (navi21):
Totals from 755 (0.95% of 79395) affected shaders:
MaxWaves: 19732 -> 19808 (+0.39%); split: +0.61%, -0.22%
Instrs: 518468 -> 518982 (+0.10%); split: -0.09%, +0.19%
CodeSize: 2837120 -> 2841432 (+0.15%); split: -0.10%, +0.26%
VGPRs: 33240 -> 32592 (-1.95%); split: -2.48%, +0.53%
Latency: 5583293 -> 5651636 (+1.22%); split: -0.41%, +1.64%
InvThroughput: 1417459 -> 1416762 (-0.05%); split: -0.22%, +0.17%
VClause: 8477 -> 8461 (-0.19%); split: -1.06%, +0.87%
SClause: 16058 -> 16292 (+1.46%); split: -1.20%, +2.66%
Copies: 27310 -> 27288 (-0.08%); split: -1.27%, +1.19%
Branches: 11165 -> 11223 (+0.52%); split: -0.09%, +0.61%
PreSGPRs: 28883 -> 29096 (+0.74%); split: -0.99%, +1.73%
PreVGPRs: 25318 -> 25044 (-1.08%); split: -1.38%, +0.30%
VALU: 388566 -> 388586 (+0.01%); split: -0.05%, +0.06%
SALU: 46783 -> 47037 (+0.54%); split: -0.38%, +0.93%
VMEM: 12181 -> 12186 (+0.04%)
SMEM: 27818 -> 27772 (-0.17%); split: -0.17%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
37d77a12e9 nir/opt_move_discards_to_top: add more intrinsics to add_src_to_worklist
fossil-db (navi21):
Totals from 115 (0.14% of 79395) affected shaders:
MaxWaves: 2882 -> 2886 (+0.14%); split: +0.62%, -0.49%
Instrs: 71640 -> 71686 (+0.06%); split: -0.21%, +0.28%
CodeSize: 395820 -> 395084 (-0.19%); split: -0.39%, +0.20%
VGPRs: 5224 -> 5256 (+0.61%); split: -0.61%, +1.23%
Latency: 1114025 -> 1145891 (+2.86%); split: -0.12%, +2.98%
InvThroughput: 239149 -> 239028 (-0.05%); split: -0.07%, +0.02%
VClause: 1289 -> 1291 (+0.16%); split: -0.62%, +0.78%
SClause: 2267 -> 2203 (-2.82%); split: -5.38%, +2.56%
Copies: 4359 -> 4372 (+0.30%); split: -2.18%, +2.48%
Branches: 1215 -> 1225 (+0.82%)
PreSGPRs: 4225 -> 4265 (+0.95%); split: -1.35%, +2.30%
PreVGPRs: 4166 -> 4189 (+0.55%); split: -0.96%, +1.51%
VALU: 53590 -> 53614 (+0.04%); split: -0.10%, +0.14%
SALU: 6527 -> 6539 (+0.18%); split: -0.84%, +1.03%
SMEM: 4120 -> 4117 (-0.07%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
08e355a287 nir/opt_move_discards_to_top: use nir_intrinsic_can_reorder
fossil-db (navi21):
Totals from 2306 (2.90% of 79395) affected shaders:
MaxWaves: 65920 -> 65952 (+0.05%); split: +0.22%, -0.17%
Instrs: 1056765 -> 1058517 (+0.17%); split: -0.09%, +0.26%
CodeSize: 5802396 -> 5808076 (+0.10%); split: -0.13%, +0.23%
VGPRs: 79976 -> 79248 (-0.91%); split: -1.46%, +0.55%
Latency: 17215154 -> 17527774 (+1.82%); split: -0.11%, +1.92%
InvThroughput: 4911203 -> 4918838 (+0.16%); split: -0.06%, +0.22%
VClause: 16214 -> 16268 (+0.33%); split: -0.44%, +0.78%
SClause: 33208 -> 34167 (+2.89%); split: -1.02%, +3.91%
Copies: 58352 -> 58343 (-0.02%); split: -1.20%, +1.18%
Branches: 21857 -> 21863 (+0.03%); split: -0.02%, +0.05%
PreSGPRs: 73666 -> 74298 (+0.86%); split: -0.82%, +1.67%
PreVGPRs: 55234 -> 55720 (+0.88%); split: -0.41%, +1.29%
VALU: 756386 -> 756329 (-0.01%); split: -0.06%, +0.05%
SALU: 123838 -> 124320 (+0.39%); split: -0.35%, +0.74%
VMEM: 25002 -> 25009 (+0.03%)
SMEM: 60765 -> 60580 (-0.30%); split: -0.41%, +0.11%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
fff3eb7848 nir/opt_move_discards_to_top: update variable name
Discard doesn't exist anymore. There is only terminate.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
eea5be2e28 nir/opt_move_discards_to_top: remove recursion
This kind of recursion is unreliable with large shaders or small stack
limits.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:45 +00:00
Rhys Perry
4c6fdb113f nir: fix return value of nir_instr_move for some cases
This fixes a potential issue where nir_opt_move_discards_to_top would
always return progress.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: f97fb1fa55 ("nir: Add a nir_instr_move helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:44 +00:00
Rhys Perry
8bbc8284d9 nir/opt_move_discards_to_top: use nir_tex_instr_has_implicit_derivative
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 48158636bf ("nir: add is_gather_implicit_lod")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32145>
2024-11-21 14:50:44 +00:00
Georg Lehmann
f3926c9d4e aco/isel: use undef Operands for p_create_vector created from nir vecs
Foz-DB Navi31:
Totals from 27464 (34.59% of 79395) affected shaders:
Instrs: 9595601 -> 9535260 (-0.63%); split: -0.63%, +0.00%
CodeSize: 47900112 -> 47658648 (-0.50%); split: -0.50%, +0.00%
Latency: 43928471 -> 43918448 (-0.02%); split: -0.05%, +0.02%
InvThroughput: 4940105 -> 4903447 (-0.74%); split: -0.75%, +0.01%
Copies: 667294 -> 604603 (-9.39%); split: -9.39%, +0.00%
VALU: 5282264 -> 5219604 (-1.19%); split: -1.19%, +0.00%
VOPD: 342 -> 311 (-9.06%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32249>
2024-11-21 14:09:52 +00:00
Georg Lehmann
ec487d01e2 nir/opt_undef: handle unpack/pack like mov/vec
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32249>
2024-11-21 14:09:52 +00:00
Georg Lehmann
af974b5fe9 nir/opt_undef: keep undefs used by partial undef vectors
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32249>
2024-11-21 14:09:52 +00:00
Georg Lehmann
a9d3caf3bf nir/opt_undef: use some nir helpers
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32249>
2024-11-21 14:09:52 +00:00
Georg Lehmann
6630c6d912 nir/opt_undef: replace undef in a separate pass
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32249>
2024-11-21 14:09:52 +00:00
Eric Engestrom
5ba6200b99 intel/ci: add missing .intel-common-manual-rules to .{iris,crocus,i915g}-manual-rules
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32278>
2024-11-21 11:37:01 +00:00
Eric Engestrom
5ffd170033 intel/ci: disable CML jobs because of networking issues
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32278>
2024-11-21 11:37:01 +00:00
Maíra Canal
2af12c5b36 v3dv: Check multiple DRM primary nodes before picking the display fd
Raspberry Pi 5 has different drivers for different types of connectors.
For example, HDMI connections are handled through vc4, but DSI
connections are handled through drm-rp1-dsi.

Currently, we only allow vc4 as display driver, which means that, when
we use VK_KHR_display with a DSI display, we won't get any available
displays.

In order to make sure we have available displays when using DSI/DPI/VEC
displays, enumerate all DRM primary nodes and use the first fd that has
a connected output. For example, in the case we have only a DSI display
connected to the RPi 5, it will pick the drm-rp1-dsi as the device. In
the case we have both DSI and HDMI displays connected, it will pick the
first fd that it checks.

Ideally, we would like to see all displays available in the return of
`vkGetPhysicalDeviceDisplayProperties2KHR`, but `wsi->fd` is a variable,
not an array. Therefore, it only supports one fd.

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/32123>
2024-11-21 11:13:07 +00:00
Gert Wollny
2a35d1a13f ci: Upref virglrenderer version
The host has changes that are required by the latest virgl patches.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Gert Wollny
41c6738882 virgl/vtest: Add support for creating blob resources
Buffers that are created using MAP_PERSISTENT or
MAP_COHERENT will created as blob resources.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Gert Wollny
8b33eece30 virgl/vtest: change interface of virgl_vtest_submit_cmd
Instead of passing the whole command buffer structure just pass
the actual command stream buffer and its size. With that we can
submit a command ad-hoc.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Gert Wollny
a32de23a9d virgl/vtest: When trying to use protocol 3 check host feature
Protocol version 3 used host side resource IDs that may be reused.
Because with older host versions index-buffer binding may go wrong
in this case, we have to check whether the host vrend version is
actually ready for protocol version 3, and if not we re-negotiate
the protocol version only allowing up to version 2.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Gert Wollny
4e3f21533a virgl/vtest: take handle from host when using protocol version >=3
When the protocol is >=3 multiple contexts may be handled by one host
process, and therefore we have to use the handle/resource ID that is
assigned by the host.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31624>
2024-11-21 09:23:10 +00:00
Erik Faye-Lund
58498ab806 panvk: document reason for maxResourceSize-limit
There's no reason to calculate this more closely; the Vulkan spec
explicitly allows for it to be conservative. And there's no other Vulkan
driver in Mesa that currently does anything else.

But, we have another reason to limit to this specific value (which also
happens to be the minimum value allowed by the spec); we'll overflow the
32-bits of slice_stride for resources where the product of width, height
and texel-size is over UINT32_MAX. But with this limit in place, we
avoid this.

This limit will go away in v11, beacuse there's an additional five bits
of slice_stride there. But let's leave that for later.

Anyway, let's document why this is the correct limit, insted of having
the FINISHME-comment.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32265>
2024-11-21 08:59:15 +00:00
Erik Faye-Lund
b81eb99b42 panvk: check for maxResourceSize-overflow in vkCreateImage
We're supposed to report an error if we're attempting to allocate images
larger than maxResourceSize. So let's add the logic for this.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32265>
2024-11-21 08:59:15 +00:00
Iago Toral Quiroga
f988a2f336 broadcom: move double-buffer heuristic helpers to the compiler
This avoids pulling the dependency on NIR headers in
libbroadcom_v3d.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32240>
2024-11-21 07:21:47 +00:00
John Anthony
653808c209 panvk: Enable VK_KHR_vertex_attribute_divisor
Panvk currently enables VK_EXT_vertex_attribute_divisor, but Mali HW
does not support a non-zero firstInstance when a divisor is used.
supportsNonZeroFirstInstance is correctly set to false to advertise
this, however this property was only added when the extension was
promoted. Thus we need to remove support for
VK_EXT_vertex_attribute_divisor and enable
VK_KHR_vertex_attribute_divisor instead.

Also fixes an issue with non-zero divisor for v10.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32137>
2024-11-21 06:02:13 +00:00
Martin Roukala (né Peres)
5e40ccf979 Revert "ci: disable mupuf's farm"
This reverts commit bb228bc684e63f392bbbb7e859dfde4725a5a30d now that the
electric renovation is essentially over \o/.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32274>
2024-11-21 04:50:29 +00:00
Guilherme Gallo
2e8e14fa9f ci/iris: Update iris-cml-deqp CI expectations
One test has timed out when the parallel number changed.
And other one flaked.
Both are inside the `KHR-Single-GL46.arrays_of_arrays_gl` test group.
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/66875845

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
17e36bc894 ci/iris: Fix iris-cml-traces expectations
The results just changed a tiny bit, nothing relevant, so let's update
the traces checksums.

See also:
https://mesa.pages.freedesktop.org/-/mesa/-/jobs/66830844/artifacts/results/summary/problems.html

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
9b567a59f4 ci/iris: Rebalance iris-cml-deqp jobs
There are more puffs available in the farm, so let's use them to reduce
from 20 minutes on average to 10 minutes.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
b15eeff992 ci/iris: Force UART for puff boards
We are expericing some difficulties with the LAVA IP addressing for puff
DUTs atm, blocking the SSH session to happen smoothly.

So, let's force the UART only communication to bypass this issue until
it is solved.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
f7e7a9ed57 ci/intel: Set HWCI modules for puff DUT
We were missing the i915 during the boot, making the intel-cml jobs fail

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
f4301626cd ci/lava: Uprev freezegun
The former version was presenting some bugs running fixtures in parallel
testing.
With the new version, we need to change the side effects on mocks a
little bit and fix a start time to make the tests reproducible.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
93ce733425 ci/lava: Improve exception handling for job failures
Include detailed error messages when raising exceptions on LAVA job
failures to enhance debugging and error tracking.

Also, handle additional error types by extracting error messages from
metadata and retrying accordingly.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Guilherme Gallo
b2c2f0d187 ci/lava: Set default exit code to 1 for failed jobs
Sets the default exit code to 1 to ensure the GitLab job fails when the
LAVA job fails or is interrupted. Adds tests to verify the exit code is
correctly set based on the logs or the lack of them (unexpected
finishing: timeouts and canceling).

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32163>
2024-11-21 04:10:52 +00:00
Timothy Arceri
7469f99ea1 glsl: remove more now unused params from glsl_to_nir()
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
2024-11-21 03:21:08 +00:00
Timothy Arceri
44de5f1c46 Revert "glsl: Move ForceGLSLAbsSqrt handling to glsl-to-nir."
This reverts commit 46bf687882.

We wont be removing this lowering file and having this workaround in
glsl_to_nir() creates a dependency on the const values that we could
otherwise avoid, so lets just move this back. Dropping the consts
will be useful in a follow up series that aims to drop all the glsl
ir function inlining code by converting builtin functions to nir.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
2024-11-21 03:21:08 +00:00
Timothy Arceri
10c292acf6 glsl: remove unused member
Unused since 063d62f142

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
2024-11-21 03:21:08 +00:00
Timothy Arceri
8ac81c5bb4 glsl: tidy up glsl_to_nir() params
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
2024-11-21 03:21:08 +00:00
Juston Li
cbb3bb5c7b util/cache_test: Fix racey Cache.List test
Instead of using unreliable polling to wait for foz db updater to parse
and load from the dynamic list, also use inotify to wait for foz db
updater close the list file after its done updating.

Fixes: 4dfd306454 ("disk_cache: Disable the "List" test for RO disk cache.")
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32237>
2024-11-21 02:11:32 +00:00
Chia-I Wu
3e9b8488b6 panvk: fix frag_completed for layered rendering
Make sure frag_completed is incremented once per render pass, regardless
of layer count.

This fixes

  [44354.379592] panthor fb000000.gpu: [drm] Failed to extend the tiler heap

in some cases.

Fixes: 157a4dc509 ("panvk/csf: Fix multi-layer rendering")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32234>
2024-11-21 01:01:08 +00:00
Chia-I Wu
9c6b71217d panvk: clang-format issue_fragment_jobs
To avoid mixing cosmetic and functional changes in the following commit.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32234>
2024-11-21 01:01:08 +00:00
Chia-I Wu
79a99a2c05 panvk: no need to map IB internally on valhall
The hack is only needed before valhall.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12178
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32232>
2024-11-21 00:33:18 +00:00
Georg Lehmann
0776b56ad6 nir: cse terminate/demote
Foz-DB Navi21:
Totals from 32 (0.04% of 79206) affected shaders:
MaxWaves: 984 -> 976 (-0.81%)
Instrs: 7719 -> 7496 (-2.89%)
CodeSize: 43220 -> 42264 (-2.21%)
VGPRs: 856 -> 872 (+1.87%)
Latency: 62689 -> 62453 (-0.38%); split: -0.72%, +0.34%
InvThroughput: 8988 -> 8968 (-0.22%); split: -0.23%, +0.01%
VClause: 248 -> 249 (+0.40%)
SClause: 296 -> 293 (-1.01%)
Copies: 580 -> 534 (-7.93%); split: -9.31%, +1.38%
Branches: 181 -> 139 (-23.20%)
PreSGPRs: 841 -> 834 (-0.83%)
SALU: 1091 -> 933 (-14.48%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32235>
2024-11-20 23:54:04 +00:00
Georg Lehmann
a67ca0eb59 nir/instr_set: support instrs with no def
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32235>
2024-11-20 23:54:04 +00:00
Georg Lehmann
7097b705b5 nir/instr_set: replace nir_instr_get_def_def with nir_instr_def
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32235>
2024-11-20 23:54:04 +00:00
Georg Lehmann
4299809321 nir: return def for debug info in nir_instr_def
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32235>
2024-11-20 23:54:04 +00:00
Benjamin Lee
8f25cc0bbc panvk: inherit sample count in secondary cmdbufs
Fixes crashes in dEQP-VK.draw.dynamic_rendering.partial_secondary_cmd_buff.multiple_interpolation.*

    src/panfrost/vulkan/csf/panvk_vX_cmd_draw.c:1413: void panvk_cmd_draw(struct panvk_cmd_buffer *, struct panvk_draw_info *): Assertion `rasterization_samples == fbinfo->nr_samples' failed.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32238>
2024-11-20 22:20:43 +00:00
Marek Olšák
680f7afe0b radeonsi: don't use nir_io_dont_optimize because it's deprecated
There is a new environment variable that can be used instead.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:30 +00:00
Marek Olšák
7e959864b2 radeonsi: enable NGG culling for non-monolithic TES and GS
It doesn't enable back face culling and small line culling. Those can only
be enabled for monolithic shaders. It only enables view culling and small
triangle culling.

Doing this has these minor advantages:

1. We can enable at least some culling immediately instead of when the first
   monolithic shader finishes compilation.

2. If back face culling and clip planes are disabled, we no longer compile
   monolithic TES and GS shader variants to get only view culling and small
   triangle culling.

3. shader-db will show culling code changes for TES and GS.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:30 +00:00
Marek Olšák
d75df43b5f radeonsi: only compute and use min_direct_count on gfx7-8
min_direct_count and multi_instances_smaller_than_primgroup
are only used by gfx7-8.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
06292538ae radeonsi: add helper si_shader_culling_enabled
it will contain more logic

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
d7415d3717 radeonsi: clean up and rename gfx10_edgeflags_have_effect
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
5bf1ef94db radeonsi: return a better value for load_initial_edgeflags_amd
Handle points and lines for all relevant shader stages.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
6988967a1f radeonsi: rewrite/replace gfx10_ngg_get_vertices_per_prim
Reuse si_get_input_prim (which is similar) and split it into 2 functions:
- si_get_output_prim_simplified
- si_get_num_vertices_per_output_prim

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
963a84677e radeonsi: optionally return MESA_PRIM_UNKNOWN from si_get_input_prim
it will be used later

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
691a9ccb33 radeonsi: prepare for making SI_NGG_CULL_TRIANGLES/LINES VS only, rename them
They will have no effect on TES and GS, so this will make it more obvious.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Marek Olšák
1b03b78bf8 ac/surface: adjust HiZ enablement
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32257>
2024-11-20 21:08:29 +00:00
Samuel Pitoiset
aca20fd2e1 radv: mark VERDE (GFX6) as Vulkan 1.3 conformant
https://www.khronos.org/conformance/adopters/conformant-products#submission_820

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32255>
2024-11-20 19:26:20 +00:00
Karmjit Mahil
21baf2f6c1 tu: Fix memory leaks on VK_PIPELINE_COMPILE_REQUIRED
For a TU_PIPELINE_GRAPHICS_LIB we were taking a ref to the descriptor
set layout but never releasing on VK_PIPELINE_COMPILE_REQUIRED.
Since VK_PIPELINE_COMPILE_REQUIRED is technically an error, the user
doesn't call vkDestroyPipeline() for it so the descriptor sets
referenced were never getting freed.

Addresses:
```
Direct leak of 304 byte(s) in 1 object(s) allocated from:
    #0 0x7fa5a93ee0 in __interceptor_malloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7fa44bac84 in vk_default_alloc ../src/vulkan/util/vk_alloc.c:26
    #2 0x7fa32ea5d8 in vk_alloc ../src/vulkan/util/vk_alloc.h:48
    #3 0x7fa32ea60c in vk_zalloc ../src/vulkan/util/vk_alloc.h:56
    #4 0x7fa32ea750 in vk_descriptor_set_layout_zalloc
       ../src/vulkan/runtime/vk_descriptor_set_layout.c:49
    #5 0x7fa306fc98 in tu_CreateDescriptorSetLayout(VkDevice_T*,
       VkDescriptorSetLayoutCreateInfo const*, VkAllocationCallbacks
const*, VkDescriptorSetLayout_T**)
../src/freedreno/vulkan/tu_descriptor_set.cc:161
```
and
```
Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7f9b4b3ee0 in __interceptor_malloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7f9925e900 in ralloc_size ../src/util/ralloc.c:118
    #2 0x7f9925e8d4 in ralloc_context ../src/util/ralloc.c:105
    #3 0x7f98b4b214 in tu_pipeline_builder_build<(chip)7>
       ../src/freedreno/vulkan/tu_pipeline.cc:3898
    #4 0x7f98b46bd8 in tu_graphics_pipeline_create<(chip)7>
       ../src/freedreno/vulkan/tu_pipeline.cc:4203
    #5 0x7f98b22588 in VkResult
       tu_CreateGraphicsPipelines<(chip)7>(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**)
../src/freedreno/vulkan/tu_pipeline.cc:4234
```
seen in:
dEQP-VK.pipeline.pipeline_library.shader_module_identifier.pipeline_from_id.graphics.4_variants.no_spec_constants.no_pipeline_cache.all_zeros_id.no_exec_properties.vert_tesc_tese_frag

Cc: mesa-stable
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32188>
2024-11-20 18:52:35 +00:00
Zan Dobersek
2817a286e0 tu: ensure completion of generic-clear resolves for color, depth/stencil clears
Combination of concurrent resolve groups and generic clear support on a750
exposed a problem around color and depth/stencil clears. With all resolves
now non-blocking in nature, we need a guarantee that clears issued through
commands will complete before any future resolves.

To achieve that, in case of generic clears being used, a cache flush is
done in order to generate the CCU_RESOLVE_CLEAN event that will ensure any
future resolve will block until the just-emitted clears are completed.

Fixes following flaky CTS tests on a750:
  dEQP-VK.pipeline.monolithic.framebuffer_attachment.2d_array_32x32_48x48_4_ms
  dEQP-VK.pipeline.pipeline_library.framebuffer_attachment.2d_array_32x32_48x48_4_ms

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: 25b73dff5a ("tu/a7xx: use concurrent resolve groups")
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32242>
2024-11-20 17:39:31 +00:00
Alyssa Rosenzweig
4477eed302 compiler: make glsl_sampler_dim available to CL
useful with the NIR bindings for image load/store.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
39afffe956 nir: split off some definitions for OpenCL
we want some enum values on device for NIR->CL bindings. specifically,
src_type/dest_type indices.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
e3b14481e3 vtn: preserve name, is_return in bindings
we want to plumb as much signature through as possible.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
733ec7c675 vtn: use named parameters in bindgen
If the input spir-v isn't stripped, preserving the names makes the generated
header more readable. This makes semantic autocomplete (IDEs) work properly with
vtn_bindgen prototypes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
f25b7103fe vtn: use rzalloc in bindgen
we don't want garbage.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
5d7a230324 vtn: gather function parameter names
Unstripped SPIR-V libraries generated from OpenCL have lots of function
parameter names. Gather them.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
d248618d81 nir/print: print parameter names in calls
if we have them. example:

call libagx_geometry_input_address %10, p %3, vtx %9, location %0 (0x0)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
6b35d7eb13 nir/print: annotate entrypoints
we can have multiple in a collection of OpenCL kernels.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
eebfbf5ecd nir/print: print function signature
parameter dimensions and names if we have them. example:

decl_function libagx_geometry_input_address (64 return, 64 p, 32 vtx, 32 location)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
3da8444be5 nir: add names to function parameters
SPIR-V has this information. We should try to preserve it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:51 +00:00
Alyssa Rosenzweig
61862b209e nir/opt_algebraic: optimize convert_uint_sat(ulong)
I wrote this in my query copy shader, it didn't get the codegen I expected, so I
investigated.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:50 +00:00
Alyssa Rosenzweig
07ba9335ae nir/conversion_builder: avoid redundant uint->uint clamp
algebraic will clean up but there's no reason to generate it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:50 +00:00
Alyssa Rosenzweig
76927a3b43 nir/lower_convert_alu_types: use intrinsics_pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32208>
2024-11-20 16:53:50 +00:00
Alyssa Rosenzweig
b94d640ba0 agx: make needs_g13x_coherency a tri-state
If we know the shader doesn't use global atomics, we don't care if the target
has this quirk or not and we can produce a single binary for all G13/G14
hardware. Model that in the shader key.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32224>
2024-11-20 16:10:11 +00:00
Alyssa Rosenzweig
358f40ea90 panfrost: switch to u_tristate
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32224>
2024-11-20 16:10:11 +00:00
Alyssa Rosenzweig
847e0e78f8 util: add u_tristate data structure
rip the pan_tristate enum from panfrost and move it to common.

I've often wanted some sort of "yes/no/maybe" or "true/false/unknown" or
"always/never/sometimes" data structure. This adds a common one that is
hopefully neutral enough to cover all of the above.

Asahi will use this.

The Intel drivers could be ported to this (brw_sometimes/elk_sometimes), it
should be straightforward but I don't want to do that without being able to
easily test those changes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32224>
2024-11-20 16:10:11 +00:00
David Rosca
1cf5ae4854 radeonsi/vpe: Don't allow DCC surfaces
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32136>
2024-11-20 15:43:30 +00:00
David Rosca
f5903ab60d radeonsi/vpe: Set correct surface swizzle mode
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32136>
2024-11-20 15:43:30 +00:00
Erik Faye-Lund
60146cc57c panvk: implement sampleRateShading
It doesn't feel great that we need to compile multiple identical shaders
just because we're going to toggle a bit in the command-stream, but this
seems to be the current state-of-art in mesa, so hmpf...

It makes state-validation trivial, so there's that.

This is loosely based on what NVK does.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32004>
2024-11-20 15:16:18 +00:00
Mary Guillemard
83c2d82637 panvk: Advertise VK_KHR_map_memory2
Already supported.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32248>
2024-11-20 14:45:14 +00:00
Mary Guillemard
6ffde9294e panvk: Advertise VK_KHR_index_type_uint8
We already support VK_EXT_index_type_uint8 and this is the promoted
version of it.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32248>
2024-11-20 14:45:14 +00:00
Mary Guillemard
52a03ab179 panvk: Enable shaderInt16
We already have all the lowering we need for this.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32248>
2024-11-20 14:45:14 +00:00
Mary Guillemard
6e8cfc3ce4 panvk: Enable depthClamp and depthBiasClamp
Both are implemented but were not enabled.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32248>
2024-11-20 14:45:14 +00:00
Jose Maria Casanova Crespo
48978d5ce5 rpi4/ci: Increase timeout for rusticl jobs.
Test run time has increased to 26min so last days
the nightly jobs have reached the 30min timeout just
before finishing the test execution.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32243>
2024-11-20 14:09:04 +00:00
Jose Maria Casanova Crespo
4675dfb959 vc4/ci: fails udpate after last piglit uprev
spec@arb_clear_texture@arb_clear_texture-supported-formats was fixed
with https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/970

Fixes: 93c8a65dee ("Uprev Piglit to d04d6fff00849a2a8e29ef3251c6ca04a2f68dc7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32243>
2024-11-20 14:09:04 +00:00
Philipp Zabel
7805a20d7b etnaviv/nn: Enable fused ReLU activation
Handle fused ReLU activation by setting the corresponding
flag in the NN engine configuration.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31981>
2024-11-20 13:33:11 +00:00
Philipp Zabel
01dc82bc63 teflon: Support fused ReLU activation
Enable support for fused ReLU activation on Conv2D and
DepthwiseConv2D operations.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31981>
2024-11-20 13:33:11 +00:00
Philipp Zabel
ad0ea175d5 teflon: Mark dilated convolutions and fused activation as not supported
Dilation and fused activations are not yet implemented.
Mark them as unsupported for now.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31981>
2024-11-20 13:33:11 +00:00
Philipp Zabel
319c56b10a teflon: Use correct convolution params struct
Use TfLiteDepthwiseConvParams for kTfLiteBuiltinDepthwiseConv2d.
The layout of stride_width, stride_height, and padding struct members
happens to be the same, but we shouldn't depend on that.
This prepares for using the activation, dilation_width_factor, and
dilation_height_factor members, which are at different offsets.

Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31981>
2024-11-20 13:33:11 +00:00
Lucas Stach
e3257f7461 etnaviv: drm: use list_first_entry
Instead of open-coding the same logic.

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/32233>
2024-11-20 13:08:28 +00:00
Lucas Stach
916bd73f1d etnaviv: drm: assert mutual exclusivity between cache and zombie list
The BO list member is used to track the BO both on the cache bucket list
as well as the zombie list. The BO being on both lists at the same time
is an invalid state. Add some asserts to validate this assumption.

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/32233>
2024-11-20 13:08:28 +00:00
Lucas Stach
6dd1640ff6 etnaviv: drm: properly handle BO list member
The BO list member isn't the head/entrypoint for a list, but is only
to be used to link the BO in various lists, so it should not be
initialized as a list head.

Now that the member is properly NULL initialized, we can use the
proper list_is_linked() function to check if the BO is on any
cache bucket or the zombie list.

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/32233>
2024-11-20 13:08:28 +00:00
Eric Engestrom
b471f75215 docs: fix invalid expression in teflon docs
Fixes: 4d23156127 ("teflon/docs: Clarify smoke test instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32247>
2024-11-20 12:54:28 +00:00
Eric Engestrom
d61dc62c59 docs: fix invalid expression in new pipe cap
Fixes: 89dad5618d ("gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32247>
2024-11-20 12:54:28 +00:00
Peyton Lee
8ee52b5e23 frontends/va: function process_frame has return value
if the video post-processing is failed with some reason, the flow can
fall back to use shader/gfx to perform the processing.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32106>
2024-11-20 12:18:48 +00:00
Erik Faye-Lund
efe62ee03f panvk: remove duplicate property
We're setting this twice, whoops.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32244>
2024-11-20 11:51:15 +00:00
Erik Faye-Lund
3305f772fa panvk: wire up swapchain image creation
This is also needed to properly support VK_KHR_swapchain, so we should
implement it.

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32216>
2024-11-20 11:28:39 +00:00
Erik Faye-Lund
f77fe432c1 panvk: support binding swapchain memory
This is required by VK_KHR_swapchain, so let's support it.

Fixes a crash in this CTS test-case:
dEQP-VK.wsi.wayland.swapchain.simulate_oom.image_swapchain_create_info

Fixes: d970fe2e9d ("panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32216>
2024-11-20 11:28:39 +00:00
Daniel Schürmann
1ff9a0fe80 aco: remove Pseudo_instruction::tmp_in_scc
This information is redundant, now.

No fossil-changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32217>
2024-11-20 11:04:32 +00:00
Daniel Schürmann
a1a4a6061c aco/ra: explicitly assign scratch SGPR for linear phis
We are about to remove the branch definitions which previously
served this purpose. Also remove Block::scc_live_out.
Some changes due to round-robin RA.

Totals from 939 (1.18% of 79395) affected shaders: (Navi31)

Instrs: 5038786 -> 5038611 (-0.00%); split: -0.01%, +0.00%
CodeSize: 26153412 -> 26152904 (-0.00%); split: -0.00%, +0.00%
Latency: 41649989 -> 41650120 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 6447508 -> 6447536 (+0.00%); split: -0.00%, +0.00%
SClause: 131319 -> 131276 (-0.03%); split: -0.03%, +0.00%
Copies: 359362 -> 359256 (-0.03%); split: -0.05%, +0.02%
SALU: 639275 -> 639169 (-0.02%); split: -0.03%, +0.01%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32217>
2024-11-20 11:04:32 +00:00
Daniel Schürmann
17da551133 aco/ra: use bitset for sgpr_operands_alias_defs
We cannot rely on SGPR Temps being fully aligned to 64 SGPRs.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32217>
2024-11-20 11:04:32 +00:00
Daniel Schürmann
a04e096339 aco/ra: set Pseudo_instruction::scratch_sgpr to SCC if it doesn't need to be preserved
Also ensure that 'needs_scratch_reg' is always true if SCC might be overwritten.
Few changes, because some p_split_vector get SCC as scratch reg assigned,
and thus, can inhibit some postRA optimizations.

Totals from 3 (0.00% of 79395) affected shaders: (Navi31)
Instrs: 10501 -> 10500 (-0.01%); split: -0.02%, +0.01%
CodeSize: 51580 -> 51520 (-0.12%); split: -0.12%, +0.01%
Latency: 84166 -> 84174 (+0.01%)
InvThroughput: 13109 -> 13111 (+0.02%)
SALU: 859 -> 860 (+0.12%)

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32217>
2024-11-20 11:04:32 +00:00
Samuel Pitoiset
08c9dca8db radv: fix skipping on-disk shaders cache when not useful
This was just broken because individual shaders were still stored
on-disk in many situations:
- for shader object, all compute/graphics shaders were stored
- for fast-GPL, graphics shaders were stored
- for pipeline binaries, when the create flag was used
- for rt capture/replay and ray history

This should stop storing unused binaries on-disk and save space.

Found this by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32227>
2024-11-20 10:01:26 +00:00
Erik Faye-Lund
9c1de5c6b3 panvk: set correct max extents for images
We updated maxImageDimension2D etc to report the actual max size, but we
forgot to update GetPhysicalDeviceImageFormatProperties in the same way.
Let's do that to make things consistent.

This fixes the following CTS test-case:
dEQP-VK.wsi.wayland.swapchain.create.image_extent

Fixes: d5ed77800e ("panvk: Fix GetPhysicalDeviceProperties2() to report accurate info")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32221>
2024-11-20 09:20:17 +00:00
Erik Faye-Lund
00b25ec769 panfrost: use 64-bits for layout calculations
On modern Mali GPUs, we can have 16 bits for the X and Y sizes, already
overflowing 32-bit barrier even with a single layer of byte-sized
formats.

So let's make sure we have enough bits to avoid overflows here.

Fixes: d5ed77800e ("panvk: Fix GetPhysicalDeviceProperties2() to report accurate info")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32221>
2024-11-20 09:20:17 +00:00
Samuel Pitoiset
92446a2dcc radv: remove VK_VALVE_descriptor_set_host_mapping
This extension was only enabled for vkd3d-proton and it's obsolete
since VK_EXT_descriptor_buffer, which landed in September 2022.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32218>
2024-11-20 08:56:41 +00:00
David Rosca
c3ee2129ae pipe: Remove video update_decoder_target
Not used anymore.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32095>
2024-11-20 08:31:00 +00:00
David Rosca
c324364f39 frontends/va: Only use interlaced surfaces when progressive is not supported
There is no good reason to use interlaced surfaces when progressive
is supported and it only creates issues when exporting the surface
or trying to do transcoding.
This allows to remove all workarounds that handled reallocating
from interlaced to progressive because a given operation would not
work for interlaced.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32095>
2024-11-20 08:31:00 +00:00
Samuel Pitoiset
2abbd361e2 radv,aco: dump LDS from the trap handler
Can be useful for debugging.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32182>
2024-11-20 07:35:47 +00:00
Martin Roukala (né Peres)
2878a1343a ci: disable mupuf's farm
This is the second phase of the electric renocation I'm currently going
through, and hopefully will be the last time the system needs to be
taken down.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32212>
2024-11-20 06:09:37 +00:00
Lina Versace
56116c4da5 anv: Fix feature pipelineProtectedAccess
We enable VK_EXT_pipeline_protected_access only if
anv_physical_device::has_protected_contexts. Therefore we should do the
same for vk_features::pipelineProtectedAccess.

Fixes: 0b5408f ("anv: expose VK_EXT_pipeline_protected_access")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32206>
2024-11-20 04:31:54 +00:00
Lina Versace
4743695e91 anv: Update features.txt
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32205>
2024-11-20 03:53:19 +00:00
Lina Versace
906b1a0678 anv: Sort extensions in enablement table
Several extensions were unsorted in
anv_physical_device.c:get_device_extensions().
The worse was an EXT found between INTEL/NV.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32205>
2024-11-20 03:53:19 +00:00
Timothy Arceri
e34357015c glsl: fix compiler global temp collisions
glsl ir creates these temps to copy global initialiser values for
example. To avoid collisions during linking due to 2 shaders in the same
stage having temps with the same name we make sure to define these as
function variables not shader globals. This will put the temps into the
global instructions wrapper created in 7c5b21c032.

Fixes: cbfc225e2b ("glsl: switch to a full nir based linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12136

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32202>
2024-11-20 03:20:47 +00:00
Marek Olšák
25d4943481 nir: make use_interpolated_input_intrinsics a nir_lower_io parameter
This will need to be set to true when the GLSL linker lowers IO, which
can later be unlowered by st/mesa, and then drivers can lower it again
without load_interpolated_input. Therefore, it can't be a global
immutable option.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32229>
2024-11-20 02:45:37 +00:00
Timur Kristóf
c294e7f138 amd: Rename GFX1103_R1/R2 to PHOENIX/2
This is to match the code names used in other enums.
Also add comments to separate GFX11.5 and GFX12 chips.

v2 by Marek Olšák:
- Rename GFX1103 to in addrlib also
- Rework ac_get_family_name

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32170>
2024-11-20 02:14:40 +00:00
Caio Oliveira
d918edaf9a intel/common: Enable mi_builder test for PTL
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/32194>
2024-11-20 01:47:04 +00:00
Caio Oliveira
6b931a68c7 intel/common: Implement Xe KMD in mi_builder tests
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32194>
2024-11-20 01:47:04 +00:00
Caio Oliveira
3998602d0e intel/common: Prepare mi_builder tests to support Xe KMD
No functional change, just move i915 specific data to a struct
and check for kmd_type where appropriate.  This will make the
next patch (which adds Xe KMD support here) cleaner.

This patch had to make intel_kmd.h header C++ friendly so it
can use its symbols.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32194>
2024-11-20 01:47:04 +00:00
Caio Oliveira
3735652be8 intel/common: Properly dispose resources in mi_builder tests
Since we will already use SetUp()/TearDown(), remove the ctor/dtor
that now would be unused.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32194>
2024-11-20 01:47:04 +00:00
Chia-I Wu
1be7e2e89d panvk: implement check_status on v10+
vk_common_*Wait* calls vk_device_check_status to detect device lost.
This allows device lost to be reported more timely.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32166>
2024-11-20 01:19:32 +00:00
Chia-I Wu
a52ffa9f24 panvk: report queue lost timely when PANVK_DEBUG=sync
When PANVK_DEBUG=sync detects a failed job, report queue lost
immediately.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32166>
2024-11-20 01:19:32 +00:00
Chia-I Wu
c631f1d1b6 ci: update the comment on MESA_VK_ABORT_ON_DEVICE_LOSS
deqp-runner version is 0.20.2 already.  But we would like to keep
MESA_VK_ABORT_ON_DEVICE_LOSS globally because, without it, after the
first VK_ERROR_DEVICE_LOST in a test group, the error is sticky and the
remaining tests will be considered failed as well.

deqp-vk gained --deqp-terminate-on-device-lost since 1.3.8.0 and enabled
it by default since 1.3.10.0.  But let's prefer our own mechanism.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32228>
2024-11-20 00:37:28 +00:00
Marek Olšák
3affe3cb17 vc4/lower_blend: don't read non-existent channels
nir_lower_texcoord_replace_late had swapped parameters in nir_undef.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
4da5b11ca9 nir: add nir_io_separate_clip_cull_distance_arrays to replace PIPE_CAP
to make the flag available in NIR passes

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
23eb4f3454 nir: rename nir_io_glsl_opt_varyings to nir_io_dont_optimize and deprecate it
The meaning is negated.

This NIR option is deprecated and shouldn't be used. It means any IO
optimizations can be disabled and it's a currently a workaround for zink,
which is the only driver that asks for it by default. The original option
is replaced by an environment variable for the GLSL linker.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
dacae272bf nir: add nir_io_semantics::fb_fetch_output_coherent
Lowering IO should preserve this. Freedreno needs it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
5d5a7bd221 nir/lower_two_sided_color: fix for lowered IO
1-bit input loads are illegal in NIR.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
65d32b96cf nir/lower_fragcoord_wtrans: handle trimmed fragcoord loads
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
dcca0e590c nir/lower_clip: rewrite find_output to handle vec2/3 and make it readable
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
45b20c8249 nir/lower_clip: fixes for lowered IO without compact arrays
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
878d23e171 nir/lower_pntc_ytransform: handle lowered IO
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Marek Olšák
18f3c92b87 nir/print: print fb_fetch_output for variables
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
2024-11-19 23:48:38 +00:00
Chia-I Wu
3f84573be4 panvk: fix base_workgroup_id sysval
Make sure the sysval is pushed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32203>
2024-11-19 23:13:54 +00:00
Lionel Landwerlin
9b779068c3 anv: prevent access to destroyed vk_sync objects post submission
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 36ea90a361 ("anv: Convert to the common sync and submit framework")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12145
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32219>
2024-11-19 19:40:03 +00:00
Rhys Perry
6c07c0b862 glsl/list: remove underscores in foreach_list_typed macros
I'm not sure why they're here, but I find them to be annoying to read.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
66df291513 glsl/list: remove parenthesis in foreach_list_typed macros
These are not necessary because __node is only a single token. The
variable declaration wouldn't work otherwise.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
02e353a066 glsl/list: add and use helpers in foreach_list_typed macros
This reduces noise when reading them.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
17045b9465 glsl/list: add comments above foreach macros
The _safe suffix is misleading.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
65a54b4ec4 nir/lcssa: fix premature exit of loop after rematerializing derefs
If we have NIR such as:

32x4  %48 = @load_vulkan_descriptor (%47) (desc_type=SSBO)
32x4  %76 = deref_cast (tint_symbol_11 *)%48 (ssbo tint_symbol_11)  (ptr_stride=0, align_mul=4, align_offset=0)
32x4  %77 = deref_struct &%76->tint_symbol_10 (ssbo int)  // &((tint_symbol_11 *)%48)->tint_symbol_10

A single nir_rematerialize_deref_in_use_blocks() will rematerialize the
deref_struct and then it's deref_cast. However,
nir_foreach_instr_reverse_safe is not safe if the next iteration's
instruction is removed. This can result in the instruction loop exiting
and the load_vulkan_descriptor never having an LCSSA phi.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Fixes: 439e8c42cc ("nir/lcssa: Fix rematerializing derefs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11770
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32225>
2024-11-19 18:59:05 +00:00
Rhys Perry
327e5465fc nir/algebraic: check bit sizes in lowered unpack(pack()) optimization
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Fixes: 894f7f4387 ("nir_opt_algebraic: Add a couple optimizations for lowered unpack(pack())")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32157>
2024-11-19 18:17:18 +00:00
Rhys Perry
ecd6ae12fb nir/algebraic: fix iabs(ishr(iabs(a), b)) optimization
iabs(a) is not positive if "a" is the minimum signed value, so this is
incorrect in that case for some values of "b".

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Fixes: 2b76de9b5d ("nir/algebraic: Add a couple optimizations for iabs and ishr")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32157>
2024-11-19 18:17:17 +00:00
David Rosca
217d70fc38 frontends/va: Use compositor blit with different number of planes
This fixes Y8_U8_V8_444_UNORM -> NV12 conversion for example.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
6a01102efe frontends/va: Stop reallocating buffers in EndPicture
This is not used anymore and can be removed now.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
6bd21e4a06 frontends/va: Check if target buffer is supported in EndPicture
Check for all entrypoints, not just encode.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
7925f13a41 frontends/va: Stop reallocating according to JPEG sampling factor
Tested with FFmpeg 7.1, it uses correct formats for each sampling factor,
so this has been fixed and is not needed anymore.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
0df7e80179 frontends/va: Stop reallocating buffers for protected playback
Instead set the protected flag on allocation and return error
when the protected state of surface doesn't match context.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
63fd685b31 frontends/va: Stop reallocating from progressive to interlaced in EndPicture
No driver should be hitting this path anymore.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
910b81f73d frontends/va: Stop reallocating to prefered format in EndPicture
This was needed because of the issue with using NV12 regardless
of RT format that was fixed in previous commit.
There was a special case for AV1, because AV1 Profile 0 supports
both 8 and 10 bit, but this is also not needed anymore.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
c8a893becd frontends/va: Create surfaces with correct fourcc for RT format
If applications doesn't send any attributes to describe the format,
we would always use driver preferred format (NV12). This is wrong
for any RT format other than the driver preferred (YUV420).
Driver doesn't have a choice here, we must use the matching format.

Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:18 +00:00
David Rosca
f70ecba49a radeonsi: Check all supported formats in si_vid_is_target_buffer_supported
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32089>
2024-11-19 17:24:17 +00:00
Matt Turner
ba5c65f10b nir: Get correct number of components
The code wants the number of components used by the variable in the
current attribute slot, not the total number of components.

For e.g. a 4x3 matrix, glsl_get_components() returns 12, leading to the
following error reported by AddressSanitizer:

```
Test case 'dEQP-VK.tessellation.shader_input_output.cross_invocation_per_patch_mat4x3'..
../src/compiler/nir/nir_lower_io_to_vector.c:265:16: runtime error: index 4 out of bounds for type 'nir_variable *[4]'
```

Fixes: 5ef2b8f1f2 ("nir: Add a pass for lowering IO back to vector when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32193>
2024-11-19 16:35:17 +00:00
Timur Kristóf
cf36fc134e radv: Set dump flags in a smarter way by default.
If shader stages are specified but compilation stages aren't,
dump NIR, backend IR and disassembly.

If compilation stages are specified but shader stages aren't,
dump all shader stages.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:45 +01:00
Timur Kristóf
14ea24ab6f radv: Also allow filtering SPIR-V dump per stage.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:43 +01:00
Timur Kristóf
e6eaf7b950 radv: Slightly reword preoptir debug flag.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:42 +01:00
Timur Kristóf
8c1e2ac03b radv: Refactor RADV_DEBUG=shaders to be a combination of other options.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:40 +01:00
Timur Kristóf
6d5caabdd7 radv: Separate option to dump backend IR.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:38 +01:00
Timur Kristóf
649da9e744 radv: Separate option to print shader disassembly.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:35 +01:00
Timur Kristóf
3f92c0bbe9 radv: Separate option to dump NIR.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:33 +01:00
Timur Kristóf
d94e65574f aco: Separate options for printing IR and recording disassembly.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:28 +01:00
Timur Kristóf
ab89fdc3d4 radv: Add ability to dump shaders based on stage.
The new debug flags can make the output less overwhelming
and only dump what we want to see.

The old RADV_DEBUG=shaders will still print all stages.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:15:23 +01:00
Timur Kristóf
57161f516e radv: Mark GS copy shaders as internal.
Instead of passing the meta_shader arg.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
2024-11-19 16:14:45 +01:00
Job Noorman
86795a6337 ir3: fold shared movs into other movs
Handle cases like this in ir3_shared_fold:

cov.f32f16 sssa_1, c0.x
mov.u16u16 ssa_2, sssa_1
=>
cov.f32f16 ssa_1, c0.x

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32211>
2024-11-19 14:30:35 +00:00
Mary Guillemard
957db02fed panvk: Advertise VK_EXT_host_query_reset
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:40:07 +01:00
Mary Guillemard
89e65dd227 panvk: Expose precise occlusion queries
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
cbdb4757d4 panvk: Implement occlusion queries for CSF
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
d1934e44fc panvk: Implement occlusion queries for JM
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
61534faf4e panvk: Wire occlusion queries to internals
Prepare CSF & JM to support occlusion queries.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
be023a3fe0 panfrost: Remove faulty assert in cs_loop_conditional_*
In case of nested if/else, the current block will not be the loop block.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
25248fae83 panvk: Take rasterization samples into account in draw
We were ignoring rasterization samples count before.

This fix "dEQP-VK.query_pool.occlusion_query.no_attachments_multisample"
failure.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Mary Guillemard
0d0547ee4a panvk: Only flag rw_nc pool as uncached on v10+
Panfrost doesn't support PAN_KMOD_BO_FLAG_GPU_UNCACHED and to keep
things usable on all generation, let's do that for now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.cim>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31843>
2024-11-19 13:39:34 +01:00
Marek Olšák
ef4342e3c3 radeonsi/ci: add options to test llvmpipe, softpipe, virgl, zink
for https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
51aa1d8381 radeonsi: fix gl_FrontFace elimination when one side is culled
Fixes: 55d81214c9 - radeonsi: replace gl_FrontFacing with a constant if one side is always culled

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
48c1c6247c radeonsi: handle nir_intrinsic_component in kill_ps_outputs
The assertion was failing with AMD_DEBUG=mono.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
5be9d76861 radeonsi: fix an assertion failure in si_shader_ps with AMD_DEBUG=mono
assert(!shader->key.ps.part.prolog.force_persp_center_interp ||
       (!G_0286CC_PERSP_SAMPLE_ENA(input_ena) && !G_0286CC_PERSP_CENTROID_ENA(input_ena)));
failed when all FS inputs have been eliminated by optimizations, which
causes LLVM to set PERSP_SAMPLE_ENA because at least 1 of those must be
enabled, which this code didn't expect.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Marek Olšák
5b09aaf44d radeonsi: fix buffer_size for emulated GS statistics
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32186>
2024-11-19 11:43:20 +00:00
Mary Guillemard
1fc454673a panvk: Implement VK_EXT_sampler_filter_minmax for v10
This is supported by the hardware since v10.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32215>
2024-11-19 11:55:05 +01:00
Caterina Shablia
a5bcf566a9 nir: lower INSTANCE_{ID,INDEX} to an offset load_instance_{index,id} respectively
If the hardware does not support INSTANCE_INDEX natively, it will be
lowered to load_instance_id + base_instance. Otherwise, INSTANCE_ID
will be lowered to load_instance_index - base_instance.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32158>
2024-11-19 09:18:47 +00:00
Caterina Shablia
b9be1f1f20 nir: introduce instance_index system value
The semantics of this newly introduced system value match
Vulkan's InstanceIndex exactly, and are equivalent to
instance_id + base_instance.

Some hardware, such as Mali Valhall or later, only provides
instance id offset by base_instance. Introducing a new system
value to represent this, rather than handling the mismatch
when lowering to BIR lets us use NIR to eliminate redundant
arithmetic that would follow from mismatched semantics, e.g.
instance_id could be lowered to instance_index - base_instance,
so expressions such as instance_id + base_instance would be
optimized to a simple instance_index.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32158>
2024-11-19 09:18:47 +00:00
Samuel Pitoiset
2f13723c0a radv: add a new drirc option to disable DCC for mips and enable it for RDR2
The game aliases two images. It binds a memory object to two different
images, the first one being an image with 4 mips and the second with
only one mip but the bind offset is incorrect. It's like it queried
the first image size with different usage flags, so that DCC was
disabled.

Force disabling DCC for mips fixes the incorrect rendering and doesn't
hurt performance.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10200
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32190>
2024-11-19 07:39:13 +00:00
Samuel Pitoiset
2e51d0c724 radv: add a helper to destroy a logical device
It's less error prone than duplicating every cleanups with a bunch of
gotos.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32112>
2024-11-19 07:02:52 +00:00
Samuel Pitoiset
2181ddf383 radv: destroy meta resources properly when creating the device failed
Better to call radv_device_finish_meta().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32112>
2024-11-19 07:02:52 +00:00
Caio Oliveira
0b66cb1f82 intel/brw: Allow extra SWSB encodings for Xe2
There are new combinations of ordered and unordered dependencies
available for the instructions to use, which among others include:

- combining FLOAT and INT pipe deps in SENDs;
- combining SRC mode deps in regular instructions for the inferred type.

This patch enables a couple of tests checking for the first case.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31375>
2024-11-19 04:27:00 +00:00
Caio Oliveira
1b13eea642 intel/brw: Add test for combining SWSB dependencies in SENDs
These are currently DISABLED_ since they fail.  A later patch will
enable them.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31375>
2024-11-19 04:27:00 +00:00
Dave Airlie
6714689613 nir/functions: force inlining for barriers.
A recent algebraic opt made a function that used to inline
with llvmpipe CL not inline anymore. However that function
has a barrier in it.

Handling barriers from inside a callstack is hard for llvmpipe
coroutines, so just force functions with barriers to be inlined.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32204>
2024-11-19 12:26:28 +10:00
Aaron Ruby
4614097756 meson: Remove experimental from gfxstream driver build
We (QNX) is using this with our VMM, and our Linux reference distro (which is currently in development).
With libaemu removed, it's much easier to integrate into a Linux-guest
build.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32161>
2024-11-19 00:42:52 +00:00
Chia-I Wu
0fb4609d94 panvk: add support for VK_EXT_queue_family_foreign
We can treat VK_QUEUE_FAMILY_FOREIGN_EXT as the host,  This makes sure
that, on release, all subqueues self-wait and all caches are flushed.
On acquire, all caches are invalidated.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
2024-11-18 23:06:43 +00:00
Chia-I Wu
715d6e740a panvk: improve VK_QUEUE_FAMILY_EXTERNAL support
The spec says that the user-specified srcStageMask/srcAccessMask should
be ignored for the acquire operation and the user-specified
dstStageMask/dstAccessMask should be ignored for the release operation.

Since we don't need any special handling for VK_QUEUE_FAMILY_EXTERNAL,
override them to NONE.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
2024-11-18 23:06:43 +00:00
Chia-I Wu
9e90e50362 panvk: add normalize_dependency
It normalizes the stage and access masks of a barrier.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32164>
2024-11-18 23:06:43 +00:00
LingMan
0f47e362a6 rusticl: Use C-string literals for DiskCache::new
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
85aaeb4bf8 rusticl: Use C-string literals for NirShader::add_var
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
b9ccee0071 rusticl/core: Use C-string literals for XPlatManager::get_proc_address_func
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
fab6fa2bc8 rusticl/cl_prop: Use C-string literals
Avoids some pointless allocations when converting `&str` to `&CStr`.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
7ac2846c96 rusticl: Use C-string literals for spirv extension names
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
612ad0cb70 rusticl: Use C-string literals
They got stabilized with Rust 1.77.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
62b8e053f7 mesa: Add rustfmt.toml
Unless rustfmt gets informed that we use the 2021 edition, it chokes on
C-string literals.

Passing the `--edition` parameter with every invocation would be annoying.
Create a config file instead.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:14 +00:00
LingMan
0ff3e2a0f9 compiler/rust: Use std::mem::offset_of!()
It got stabilized with Rust 1.77.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:13 +00:00
LingMan
190fbbe1d6 nak/hw_test: Use std::mem::offset_of!()
It got stabilized with Rust 1.77.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:13 +00:00
LingMan
718407e806 mesa: Bump required Rust version to 1.78
The Linux kernel requires Rust 1.78 since version 6.10. Thus, this update is
in line with our Rust update policy.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31510>
2024-11-18 22:29:13 +00:00
Michel Zou
795a36325a ac/gpu_info: Fix missing prototype mingw error
Fixes: 246051ebc6 ("ac/gpu_info: print 32bpp modifiers")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>

Closes #8858

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32177>
2024-11-18 21:49:24 +00:00
Vldly
6d14cad330 freedreno: Fix resource tracking on repeated map with discard
In two functions implementing resource discard rebind_resource is called
on resource before its track record is reset. This prevents update of
dirty_resource or dirty_shader_resource because of conditions in
needs_dirty_resource. With rsc->track reset and dirty_resource bits
missing further calls to transfer_map will not try to reallocate
resource storage when needed.

A way to reproduce the issue in both functions is by executing at least
3 draws modifying bound texture or VBO each time. This patch fixes those
cases and some related piglit tests on a5xx and should fix it on other
GPUs. Also it fixes rendering in Firefox and vsraytrace (except vertical
line at right edge).

Fixes: 0a62a874fc ("freedreno: Re-work dirty-resource tracking")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10374
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32167>
2024-11-18 21:17:50 +00:00
Jordan Justen
eb10dc2e73 intel/dev: Add PTL 0xb0b0 PCI ID
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32149>
2024-11-18 20:53:06 +00:00
Job Noorman
554494e2cd ir3,tu: filter debug flags included in the hash key
Only include debug flags that have an influence on codegen.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32052>
2024-11-18 20:19:56 +00:00
Job Noorman
d8c90806e4 ir3,tu: include ir3 debug flags in shader hash key
Many debug flags influence shader codegen but are currently not included
in the hash key. This causes surprising effects as cache lookups may
return shaders compiled with different debug flags than currently in
effect. This patch fixes this by including all debug flags  in the
shader hash key.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: c323848b0b ("ir3, tu: Plumb through support for per-shader robustness")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32052>
2024-11-18 20:19:56 +00:00
David Rosca
4ec43c59da radeonsi/vcn: Use correct frame context buffer for preencode on VCN5
Fixes: 3c5fe03b92 ("radeonsi/vcn: Add support for VCN5 dpb tier2")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31985>
2024-11-18 19:41:05 +00:00
Karol Herbst
c0edb9344f rusticl: enable cl_khr_depth_images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:29 +00:00
Karol Herbst
67212c2fa6 rusticl/device: advertize cl_khr_depth_images if supported
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:29 +00:00
Karol Herbst
2aec563acf rusticl/image: fix clEnqueueFillImage for CL_DEPTH
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:28 +00:00
Karol Herbst
2acfb55dfb rusticl/mem: add restrictions for CL_DEPTH, CL_DEPTH_STENCIL and msaa images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:28 +00:00
Karol Herbst
fa379a9495 nir/lower_cl_images: lower scalar image_loads to vec4
This will be required for supporting depth images as the rest of mesa assumes those
to always return vec4.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30831>
2024-11-18 17:57:28 +00:00
Gurchetan Singh
b805e23f40 gfxstream: change output location
Change the output location for codegen to guest/vulkan_enc.
This is only run by AOSP devs, so it won't affect upstream.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Gurchetan Singh
214dee0447 gfxstream: for Android, look for the autogenerated files
This is mostly a developer preference issue.  Some Android
devs like to commit auto-generated files for ${reasons},
though the style of Mesa is not to do so.

I personally like the Mesa style, since otherwise a 25 million
LoC project would be 40 million, but whatever.

An easy solution to just to check them in AOSP Mesa, but not
in upstream.  There are various mechanisms, particularly
auto-rollers, that enable this.  For example, there is no plan to
check in Blueprint files upstream, but they will be checked-in
and committed by the auto-roller.

For the scheme to work, we'll need slightly different meson
rules when the build target is Android versus otherwise.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Gurchetan Singh
7c219ae7e0 gfxstream: delete qemu_pipe target
It has no sources..

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Gurchetan Singh
9a1654f5ce gfxstream: conditionals for using gfxstream::aemu
It's a guest-only build target, and shouldn't be on the host.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Joshua Duong
04f5bfaee6 gfxstream: update auto-generated comments.
gfxstream-protocols/scripts/generate-vulkan-sources.sh ==>
mesa3d/src/gfxstream/codegen/generate-gfxstream-vulkan.sh

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Bo Hu
cd8b4d730b gfxstream: snapshot: DescriptorSet allocate and update
When batched descriptorset udpate optimization is turned
off, the descriptorset is not handled in snapshot.
This cl handles this situation.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Bo Hu
94b906ae44 gfxstream: snapshot: avoid double boxing dispatchable handle
For dispatchable handle, such as commandBuffer, it is always
left as boxed by decoder; consequently snapshoter should not
box it again.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
2024-11-18 17:16:28 +00:00
Lionel Landwerlin
8845255881 anv: fix missing push constant reallocation
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 62d96a6546 ("anv: add dirty tracking for push constant data")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12151
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30007>
2024-11-18 16:31:33 +00:00
Manuel
217c17e8a2 gfxstream: Avoid repeated functionality
Removed a function that creates anonymous file descriptors when called.
Additionally replaced a call of said function with the one from the "util"
directory. The intention is to avoid repeated functionality

util: Allow code to be compatible in c++ compilers

Added an extern "C" statement and preprocessor directives to make the
“os_create_anonymous_file” function compatible with c++ compilers

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32096>
2024-11-18 15:51:48 +00:00
Nanley Chery
f1724b44d0 anv: Drop fast-clear value conversion check
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5622
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32187>
2024-11-18 14:57:46 +00:00
Nanley Chery
93e42f9700 anv: Store fast-clear colors with the view swizzle
Prevents the next patch from failing CTS tests such as:

   dEQP-VK.api.image_clearing.core.clear_color_image.*.b4g4r4a4*

Brings back the feature that was introduced in commit 46187bb54f
("anv: Swizzle fast-clear values"), but went unused in commit
721d0c3e77 ("anv,hasvk: Always use BLORP_BATCH_NO_UPDATE_CLEAR_COLOR").

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32187>
2024-11-18 14:57:46 +00:00
Nanley Chery
2a9d7a3bd0 anv: Support non-0/1 sRGB fast-clear colors on gfx9
We're going to drop a generic restriction on clear color conversions in
anv_can_fast_clear_color(). Without preparing for it, the following
tests would fail:

* piglit.spec.arb_framebuffer_srgb.blit texture srgb msaa disabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit renderbuffer srgb msaa disabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit texture srgb downsample enabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit renderbuffer srgb downsample enabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit renderbuffer srgb msaa enabled clear.gen9_zinkm64
* piglit.spec.arb_framebuffer_srgb.blit texture srgb msaa enabled clear.gen9_zinkm64

So, add support for sRGB sampling via BLORP transfer operations and drop
the gfx9-specific restriction on sRGB fast-clears.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32187>
2024-11-18 14:57:46 +00:00
Marek Olšák
899bee4af8 nir/opt_varyings: don't count the cost of the same instruction multiple times
Use pass_flags to indicate whether the instruction has already been added
to the total cost of the expression.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Marek Olšák
405e9d9b74 nir/opt_varyings: implement compaction without flexible interpolation
We have to honor drivers when they say that different interpolation
qualifiers can't be mixed in the same vec4, indicated by
nir_io_has_flexible_input_interpolation_except_flat not being set.

This is a prerequisite for enabling nir_opt_varyings for all drivers.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Marek Olšák
a7c671efc6 nir/opt_varyings: fix packing color varyings
BITSET_TEST_RANGE_INSIDE_WORD uses first_bit .. last_bit, same as
BITSET_RANGE, not first_bit .. size like BITFIELD_RANGE.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Marek Olšák
f9b03cf405 nir/opt_varyings: add nir_io_compaction_rotates_color_channels
This was enabled by default in nir_opt_varyings, but vc4 can't handle
when shader outputs write Y but not X. Add an option for it and enable
it only for the driver that benefits from it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Marek Olšák
8518e1cfd7 nir/opt_varyings: add nir_io_always_interpolate_convergent_fs_inputs
for Asahi

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32174>
2024-11-18 13:39:08 +00:00
Kenneth Graunke
95bc42af74 nir: Use load_global_constant for reorderable nir_var_mem_global access
The main difference between load_global and load_global_constant is that
the latter can be reordered arbitrarily.  If the access being lowered is
already tagged as being reorderable, then we can preserve that by using
the load_global_constant intrinsics instead of load_global.  This gives
us more flexibility.

On Intel, this lets us use the load_global_constant_uniform_block_intel
intrinsic for doing convergent block loads in more cases.  This nets us
significant reductions in spill/fills: Borderlands 3 on Lunarlake sees
spills/fills reduced by 53%.  Alchemist sees a 13% reduction.

Improves performance of Borderlands 3 DX12 on Intel Battlemage by
around 44%.  Improves Hogwarts Legacy by around 14%.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31995>
2024-11-18 12:55:47 +00:00
Kenneth Graunke
5848035443 brw: Fix try_rebuild_source's ult32/ushr handling to use unsigned types
We were accidentally doing a signed integer comparison here for ult32,
or a sign-extending shift for ushr.

One notable bit of fallout was that load_global_uniform_block_intel
address calculations broke on platforms that don't have native 64-bit
integer support, as the iadd64 lowering for "do I need to carry?" was
using ult32...and performing the wrong comparison.  We spotted this in
Borderlands 3 on Alchemist once we turned on other optimizations.

Thanks to Lionel Landwerlin for helping spot the problem!

Fixes: c7b312ad45 ("brw: factor out source extraction for rematerialization")
Fixes: 339630ab05 ("brw: enable A64 loads source rematerialization")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31995>
2024-11-18 12:55:47 +00:00
Kenneth Graunke
0a376a672a brw: Fix emit_a64_oword_block_header UNIFORM -> VGRF copies
This was triggering an assertion in the fs_builder::MOV helper that
the destination stride can't be 0 when dispatch_width > 1.  What we
want to do is copy the single 64-bit channel of data from the UNIFORM
file to a VGRF.  We can use a SIMD1 builder for that.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31995>
2024-11-18 12:55:47 +00:00
Karol Herbst
d0560f59ce vtn: handle struct kernel arguments passed by value
Due to LLVM ABI reasons the SPIRV-LLVM-Translator always uses pointers to
private memory for struct function parameters. This includes kernel entry
points.

However technically it's also legal to pass those parameters by value
according to the OpenCL SPIR-V Env spec.

One compiler making use of this is e.g. artic based on Thorin.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12149
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32141>
2024-11-18 12:12:21 +00:00
Marek Olšák
237ed6fd08 mesa: capture shaders to disk before invoking the linker
If there is an infinite loop in the GLSL linker, we want to write shaders
to disk before that.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
3179c65a5a st/mesa: add ST_DEBUG=xfb printing xfb info
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
89dad5618d gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER
It's required by the latest IO refactoring.

screen.rst explains it and it's not pretty. It can be argued that
finalize_nir shouldn't exist.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
b8ee69f7fe st/mesa: call pipe_screen::finalize_nir outside of st_finalize_nir
This is easier to read.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
7717e458f1 gallium: use struct nir_shader * type in finalize_nir instead of void *
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
6cd302dc39 glsl: add a helper for duplicated code calling nir_opt_varyings
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Collabora's Gfx CI Team
93c8a65dee Uprev Piglit to d04d6fff00849a2a8e29ef3251c6ca04a2f68dc7
eebe1b555f...d04d6fff00

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32085>
2024-11-18 10:05:34 +00:00
Erik Faye-Lund
5ced8b0ea2 glx: avoid null-deref
psc can be NULL here, so let's avoid dereferencing it.

Fixes: 34dea2b38e ("glx: unify extension binding")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32144>
2024-11-18 09:13:14 +00:00
Iago Toral Quiroga
d2fb489e0c v3dv: use the double buffer heuristic helpers
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
6d54a5514c v3d: use heuristic to enable double-buffer mode
This is still experimental and only enabled if V3D_DEBUG=db
is set.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
d81bcbe3de broadcom: add helpers for double-buffer heuristic
So we can share them between vulkan and gl.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
3355ceec3b v3d: store size of qpu program for compiled shaders
We will use this to inform heuristics about double-buffer.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
0ba8f65d44 v3d: drop blank line
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
234bea1bca v3dv: add missing support for double-buffer on V3D 7.x
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
f78d3833ef v3d: only enable double-buffer for jobs where it might make sense
Previously, double-buffer mode would apply to all jobs except msaa,
but this is not smart, since not all jobs can benefit from this. In
particular, if jobs load the tile buffer and don't store tiles
double buffer mode won't be effective and we would instead pay the
cost of the smaller tile size so we only want to enable in jobs
that meet these requirements.

In order to achieve this we need to postpone the decision about
double buffering until we know the loads and stores of the job,
which means we need to do this late after we have recorded draws.
This means that by default, we assume no double-buffer mode is
used and if we find we want to enable after emitting the draws
we need to re-compute tile sizes and rewrite the
TILE_BINNING_MODE_CFG packet accordingly.

Making the decison about double-buffer late will also enable us to
add heuristics to decide about double-buffer based on the draw calls
emitted in the job, but we will do this in a separate patch.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
c958dd4b6b v3d: do tile state BO allocation later
We don't need this until we are ready to emit the RCL for
the job and we want to do this late because double-buffering
will impact how big the allocations need to be.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
93ef28a134 v3d: save a pointer to the TILE_BINNING_MODE_CFG packet in the CL
We want to make the decision about double-buffer enablement much later
when we have enough information to make it. That means we might need
to rewrite this packet, so we need to save a pointer to its location
in the CL.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
3c0f84aa41 v3d: group tile spec into a struct inside the job
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
f0543d79aa broadcom: handle double buffer on V3D 7.1 tile size calculations
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
87acd4cde5 v3d: add a V3D_DEBUG option to force synchronous execution of jobs
This is useful to debug sync issues and can also can be used to
instrument tooling for dumping job execution times in the future.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Mary Guillemard
e5d64ca69c bi: Execute nir_opt_algebraic after nir_lower_pack
nir_lower_pack can generate split operations, execute algebraic again
to handle them.

This fix an assert on
"dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_float16" and
probably others tests.

Fixes: 3904cfabd6 ("bi: Use nir_opt_load_store_vectorize")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
98cff2e098 panvk: Implement VK_KHR_zero_initialize_workgroup_memory
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
f88ecf6bb1 panvk: Advertise VK_KHR_shader_relaxed_extended_instruction
Handled by common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
3478f01b0d panvk: Advertise VK_KHR_shader_non_semantic_info
Handled by common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
b13643f16e panvk: Advertise VK_EXT_tooling_info
Already implemented in common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Lionel Landwerlin
431f353bfe anv: fix incorrect aspect flag for depth/stencil formats
We're asking if compression is supported and
anv_formats_ccs_e_compatible() is assuming color aspect.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0317c44872 ("anv: add VK_EXT_host_image_copy support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12155
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32153>
2024-11-18 07:01:28 +00:00
Sagar Ghuge
e5776bcb39 blorp: Use the calculated execution mask
Instead of setting execution mask to 0xFFFFFFFF, use the previously
calculated execution mask.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30474>
2024-11-18 04:42:52 +00:00
Brad Smith
67333c2632 util: Support elf_aux_info() on OpenBSD arm and ppc
Signed-off-by: Brad Smith <brad@comstyle.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31102>
2024-11-18 01:03:28 +00:00
Jianxun Zhang
8db71c95e1 isl: Move a CCS restriction in GFX 12.x
3D+MSAA is not supported and depth-stencil formats are all
32bpp or less. Move this restriction into single-sample
case.

Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496>
2024-11-17 22:41:56 +00:00
Jianxun Zhang
ab56a9eecd isl: Allow CCS in more cases (xe2)
By restricting these limitations up to GFX 12, CCS support
can be present on these cases that we think Xe2+ platform
should support compression.

Noticeably, CCS is allowed on depth resources without HiZ,
multi-sampled resources without CCS, and multi-sampled
stencil resources.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496>
2024-11-17 22:41:56 +00:00
Jianxun Zhang
dc70e2d556 iris: Allow compression on multi-sampled stencil (xe2)
Two aux functions are updated to fix piglit test once CCS is enabled on
multi-sampled stencil resources in a following change. As reviewers
suggested, we don't see much value of the assertion.
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496#note_2601233

Piglit test:
fbo-depthstencil blit default_fb -samples=16 -auto

iris_resolve.c:972: iris_resource_get_aux_state: Assertion
`res->surf.samples == 1 || res->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY' failed.

iris_resolve.c:996: iris_resource_set_aux_state: Assertion
`res->surf.samples == 1 || res->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY' failed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496>
2024-11-17 22:41:55 +00:00
Jianxun Zhang
705555b6b0 isl: Refactor WA 22015614752
Using intel_needs_workaround() within a block of GFX version
checker requires extra carefulness on the road because both
of them specify a range of applicable platforms. The WA block
can be unexpectedly skipped once the GFX version checker gets
updated later.

Moving the WA implementation out of the GFX block to decouple
them for more clarity and less chance of messing up next time.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496>
2024-11-17 22:41:55 +00:00
Tomeu Vizoso
4d23156127 teflon/docs: Clarify smoke test instructions
Some improvements suggested by users.

Suggested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32168>
2024-11-17 09:47:41 +00:00
Tomeu Vizoso
778ca0824f teflon/docs: Add i.MX8MP to list of supported NPUs
It's working now!

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32168>
2024-11-17 09:47:41 +00:00
Tomeu Vizoso
5adb9d03ae teflon/docs: Update performance measurements on LibreComputer Alta
We got faster!

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32168>
2024-11-17 09:47:41 +00:00
Marek Olšák
a37c8b4e7c radeonsi/ci: update navi31 failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 22:01:06 -05:00
Marek Olšák
8deb32ac2e radeonsi: split outputs_written_before_tes_gs into ls_es_* and tcs_* masks
these will have different values later

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:29 -05:00
Marek Olšák
1d16d88e1e radeonsi: set *outputs_written in scan_io_usage instead of later
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:25 -05:00
Marek Olšák
3f6bc3e58d radeonsi: remove unused si_shader_info::output_readmask
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:21 -05:00
Marek Olšák
b10bb9f0ba radeonsi: don't set tess level outputs in patch_outputs_written unconditionally
It doesn't do anything. The tess level outputs that are actually written are
set just below that.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:17 -05:00
Marek Olšák
3a9e7e1e82 radeonsi: remove unused function si_get_tcs_out_patch_stride
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:13 -05:00
Marek Olšák
25ac573140 radeonsi: reduce si_shader_key_ge::tes_prim_mode size to 2 bits
enum tess_primitive_mode has only 4 values.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:10 -05:00
Marek Olšák
a00ed96585 radeonsi: replace are_tessfactors_def_in_all_invocs with nir_gather_tcs_info
This is now in common code.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:06 -05:00
Marek Olšák
702982d399 radeonsi: get the value for load_tcs_primitive_mode_amd from shader info
This is possible thanks to the commit:
    "st/mesa: copy some TES shader info fields to TCS".

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:00 -05:00
Marek Olšák
e28e05ffe4 radeonsi: don't overwrite info.tess._primitive mode when it can be correct
The linker now sets TCS info to match TES, and the key can contain 0
if it's not optimized.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:56 -05:00
Marek Olšák
3570edeae2 radeonsi: fix passing TCS wave ID from LS to HS for monolithic LS+HS
required by the new HS shader message code

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:34 -05:00
Marek Olšák
a7ba36f589 ac/nir: get pass_tessfactors_by_reg from nir_gather_tcs_info
If nir_tcs_info::all_invocations_define_tess_levels is true, the pass
doesn't have to insert a barrier and use output loads to get tess level
output values. It can just use the SSA defs that are being stored (or phis
thereof) to get the tess level output values.

The remaining tcs_info fields will be used by the HS shader message.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:29 -05:00
Marek Olšák
b258a9aa4e aco: remove unused TCS fields from aco_shader_info
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:26 -05:00
Eric Engestrom
985285f30a v3dv/ci: mark whole group as flaky
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32162>
2024-11-16 21:50:39 +00:00
Matt Turner
3d24f0ece1 vulkan: Avoid pointer aliasing
Avoids the sanitizer errors:

```
Test case 'dEQP-VK.pipeline.monolithic.spec_constant.graphics.vertex.basic.mixed_packed'..
../src/vulkan/util/vk_util.c:111:38: runtime error: load of misaligned address 0x603002b1c591 for type 'const uint16_t', which requires 2 byte alignment
0x603002b1c591: note: pointer points here
 00 00 00  98 76 98 54 76 98 ba 10  32 54 76 98 ba dc fe ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff
              ^
../src/vulkan/util/vk_util.c:108:38: runtime error: load of misaligned address 0x603002b1c593 for type 'const uint32_t', which requires 4 byte alignment
0x603002b1c593: note: pointer points here
 00  98 76 98 54 76 98 ba 10  32 54 76 98 ba dc fe ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff
              ^
../src/vulkan/util/vk_util.c:105:38: runtime error: load of misaligned address 0x603002b1c597 for type 'const uint64_t', which requires 8 byte alignment
0x603002b1c597: note: pointer points here
 54 76 98 ba 10  32 54 76 98 ba dc fe ff  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  03 11 00
             ^
```

Fixes: 476dc3c050 ("vulkan: add vk_spec_info_to_nir_spirv util method")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32159>
2024-11-16 03:14:31 +00:00
Eric Engestrom
ad4e5538ba ci/crosvm: remove noise inside deqp-runner output
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32156>
2024-11-15 20:24:17 +00:00
Pavel Ondračka
8d3f2d2c23 r300: group KIL for R300/R400
Separate KIL counts to the indirection limit, so try to schedule it
within the TEX block on R300/R400, except for small shaders, where we
already know we are fine.

42 gained shaders on R400 (40 Trine and 2 This war of mine) at the
expense of some increase in register pressure.

shader-db:
total temps in shared programs: 18107 -> 18129 (0.12%)
temps in affected programs: 262 -> 284 (8.40%)
helped: 0
HURT: 22

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32023>
2024-11-15 18:02:55 +00:00
Tomeu Vizoso
6cdfc2d51c teflon: Add files mentioned in the docs for image classification
It is an easy way to check that the installation works and is in a
useful state.

The Python script is based on a example in the TensorFlow repository at:

tensorflow/lite/examples/python/label_image.py

The labels file is distributed by Google along the MobileNetV1 model
that we already have. These files are released under the Apache
license.

Reported-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Tested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31860>
2024-11-15 17:24:19 +00:00
Tomeu Vizoso
3f096c6995 etnaviv/ml: Support addition operations on V8
The proprietary driver on V8 uses a different way of lowering the
addition to a convolution that seems to be faster.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32105>
2024-11-15 16:41:05 +00:00
Tomeu Vizoso
eaecd0ffd6 etnaviv/ml: Adapt to changes in teflon regarding multiple inputs
The Gallium API that Teflon uses now supports a variable number of
inputs per operation.

Adapt to this change without any change in functionality.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32105>
2024-11-15 16:41:05 +00:00
Tomeu Vizoso
986f8c7ff2 teflon: Support multiple graph inputs and outputs
Operations other than tensor addition will also need to be able to
handle multiple inputs, and a variable number of them.

And for testing individual operations, we also need to support models
with multiple inputs.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32105>
2024-11-15 16:41:04 +00:00
Boris Brezillon
c0f47b12fc panvk/cs: Poison cmdbuf registers when PANVK_DEBUG=cs is set
Poison all cmdbuf registers to make sure we don't inherit state from
a previously executed cmdbuf.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
c3ff3f2405 panvk/csf: Fix a wait-LS operation in finish_cs()
cs_wait_slots() expects a mask, cs_wait_slot() a slot ID.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b9eed7a0d4 panvk: Cache the fs_required() result
get_fs() (and thus fs_required()) is called enough times during a draw
that it makes sense to cache the value in the graphics state instead of
calling fs_required() repeatedly.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
fd497b2278 panvk: Move common gfx bits to a new source file in the common dir
Keeping those distinct makes it hard to maintain (fixes hitting one
version but not the other). Let's make it common code and guard CSF/JM
specific code under #if PAN_ARCH blocks.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
79e5146378 panvk: Sanitize the driver-internal dirty state tracking
Coalesce all the dirty bits into a single bitset, and use dirty bits for
stuff that were already tracked through NULL GPU pointers.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
8b70f66440 panvk: Don't link the VS and FS shaders on v10
When IDVS+malloc is used, there's no linking involved (getting the
VS and FS shaders to agree on the varyings attributes), so we can
purely and simply skip this phase.

If we ever have to support the non-malloc or non-IDVS case, we'll need
to revisit the linking logic anyway, so let's kill the linking on v10
for now.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b07fd26211 panvk: Move is_dirty() to panvk_cmd_draw.h and rename it
We're about to bitset-based driver-internal dirty state tracking, and
we'll need to define new xx_is_dirty() macros, so let's rename the
existing one dyn_gfx_state_dirty() to avoid the confusion, and move it
to panvk_cmd_draw.h, since it's the same for JM and CSF.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b304a0c49b panvk: Move panvk_cmd_compute_state to a common place
panvk_cmd_compute_state is exactly the same in JM and CSF, so let's move
it to a common place.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
b67b350b4c panvk: Move the panvk_cmd_graphics_state definition to panvk_cmd_draw.h
Those structs are almost the same on JM and CSF, so let's move them to a
common place and use #ifdef sections for fields that only apply to
CSF or JM.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
f211e5f9c5 panvk: Kill unused fields in panvk_cmd_graphics_state
Some fields are never used, others are set but never checked.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Boris Brezillon
8a5814b456 panvk: Change the prototype of panvk_select_tiler_hierarchy_mask()
We're going to put the panvk_cmd_graphics_state definition to
panvk_cmd_draw.h, which involves including panvk_cmd_draw.h from
panvk_cmd_buffer.h, which in turn means we can't include
panvk_cmd_buffer.h from panvk_cmd_draw.h.

Kill the circular inclusion by changing the prototype of
panvk_select_tiler_hierarchy_mask() to take a panvk_physical_device
and a panvk_cmd_graphics_state instead of a panvk_cmd_buffer oject.

Signed-off-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/31911>
2024-11-15 16:00:25 +00:00
Tomeu Vizoso
f6c3544392 etnaviv/ml: Zero all BOs
A few bugs due to uninitialized buffers have cropped up. For now let's
zero them all and see if we want to do something else when we get
concerned about compilation times.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32104>
2024-11-15 15:35:32 +00:00
Karol Herbst
a5149f3fef rusticl/kernel: fix kernel variant selection
Apparently I messed up enough so that the optimized kernel variant was
almost never selected.

This fixes that :)

Fixes: f098620c21 ("rusticl/kernel: add optimized Kernel variant")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32139>
2024-11-15 14:21:36 +00:00
Lars-Ivar Hesselberg Simonsen
0291f62c6a panvk: update expectations for G610
The prior commit fixed various dEQP-VK.*.suballocation.multisample*
tests.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32155>
2024-11-15 13:03:10 +01:00
Lars-Ivar Hesselberg Simonsen
595019526d panvk: Add frag->frag barrier before resolve
As resolve is implemented as a separate renderpass, we'll need to add a
frag->frag barrier before executing it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32155>
2024-11-15 13:03:07 +01:00
Corentin Noël
a7c8677241 virgl: Simply loop over the resources to figure-out if it is already added
There is not that many resources added to a command buffer to justify the resource
id being cached.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32134>
2024-11-15 11:33:52 +00:00
Robert Mader
758941ab0c v3d: Support SAND128 base modifier
The BROADCOM_SAND128 modifier is usually used with an extra parameter
to pass in the stride via a side channel. Quoting from drm_fourcc.h:
> The pitch between the start of each column is set to optimally
> switch between SDRAM banks. This is passed as the number of lines
> of column width in the modifier (we can't use the stride value due
> to various core checks that look at it , so you should set the
> stride to width*cpp).

So apparently this is just a workaround for limitations in some kernel
APIs. DRM modifiers, however, are arguably a bad fit for extra
parameters that aren't known in advance. In the Wayland/KMS ecosystem
many components depend on being able to treat modifiers as opaque, e.g.
for negotiations etc. In practice the current approach requires various
software components to manually use the
`DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT()` macro - using the
`DRM_FORMAT_MOD_BROADCOM_SAND128` modifier directly with formats like
`NV12` results in a rejection in the KMS driver and corrupted output
in Mesa (because we'd bail out early in `v3d_sand8_blit()`).

Fortunately the stride check limitations mentioned above don't seem to
apply to Mesa though. Thus we can just add support for the base modifier
and stride (coming from V4L2), allowing various toolkits, Wayland
compositors and V4L2 decoder implementations to support e.g.
`NV12` + `DRM_FORMAT_MOD_BROADCOM_SAND128` (`NC12` in V4L2) in a generic
way.

Notes:
1. Wayland compositors trying to offload composition to KMS will still
fail when doing a test commit.
2. There is another limitation - in the V4L2 MPLANE API - that
requires userspace to know the correct offset of the second plane. That's
a known API limitation though and only affects V4L2 decoder implementations.

Cc: mesa-stable
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32033>
2024-11-15 11:09:02 +00:00
Jose Maria Casanova Crespo
808ae13042 rpi4/ci: another detected flaky timeline_semaphore test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32154>
2024-11-15 10:48:54 +00:00
John Anthony
eb84f1e61f panvk: Enable storageBuffer16BitAccess
This is a mandatory feature if VK_KHR_16bit_storage is enabled.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32138>
2024-11-15 10:28:08 +00:00
Sam Lantinga
4ed8ef74b4 util: Fixed crash in HEVC encoding on 32-bit systems
This builds on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25059, and extends that change to all 32-bit systems.

This fixes a crash on SteamOS with the following test case:

        unsigned char data[] = {
          0x00, 0x00, 0x00, 0x01, 0x40, 0x01, 0x0c, 0x01, 0xff, 0xff, 0x01, 0x60,
          0x00, 0x00, 0x03, 0x00, 0xb0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00,
          0x99, 0x2c, 0x0c, 0x01, 0x64, 0x7c, 0x00, 0x7c, 0xd2, 0x56, 0x01, 0x40,
          0x00, 0x00, 0x00, 0x01, 0x42, 0x01, 0x01, 0x01, 0x60, 0x00, 0x00, 0x03,
          0x00, 0xb0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x00, 0x99, 0xa0, 0x02,
          0x80, 0x80, 0x32, 0x16, 0x24, 0xbb, 0x90, 0x84, 0x48, 0x9a, 0x83, 0x03,
          0x03, 0x02, 0x00, 0xb2, 0x3e, 0x00, 0x3e, 0x69, 0x2b, 0x00, 0x5f, 0x08,
          0x04, 0x10, 0x00, 0x00, 0x00, 0x01, 0x44, 0x01, 0xc0, 0x62, 0x0f, 0x02,
          0x24
        };
        vlVaContext context;
        vlVaBuffer buf;

        memset(&context, 0, sizeof(context));
        memset(&buf, 0, sizeof(buf));
        context.packed_header_emulation_bytes = true;
        buf.data = data;
        buf.size = sizeof(data);
        vlVaHandleVAEncPackedHeaderDataBufferTypeHEVC(&context, &buf);

Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31596>
2024-11-15 09:51:39 +00:00
Lars-Ivar Hesselberg Simonsen
4ab14de32f panvk: Set fs.multisampled sysval for v10+
This allows us to observe writes to SampleMask, which would otherwise be
ignored.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32132>
2024-11-15 09:24:06 +00:00
Constantine Shablia
9b7f547fef panvk: adjust maxSamplerAllocationCount limit
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Constantine Shablia
a245b397c6 panvk: elaborate the comment on the maxMemoryAllocationCount limit
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Constantine Shablia
c01449ef5c panvk: enable shaderInt64
We already were lowering int64

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Constantine Shablia
bdb2f0dc2a panvk: move samplerAnisotropy in the order it appears in struct definition
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31917>
2024-11-15 08:59:46 +00:00
Samuel Pitoiset
d2960a8430 radv: consider VK_PIPELINE_STAGE_2_NONE like BOTTOM_OF_PIPE
VK_PIPELINE_STAGE_2_NONE from sync2 is similar to BOTTOM_OF_PIPE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32115>
2024-11-15 08:22:23 +00:00
Samuel Pitoiset
c08d2c40ed radv: fix ignoring src stage mask when dst stage mask is BOTTOM_OF_PIPE
Otherwise the driver doesn't synchronize if there are image layout
transitions.

This fixes rendering issues with displayable DCC (usually black squares
in the bottom of screen). This mostly happens when an application
uses a lower resolution than the screen supports and fshack
(wine/proton) which upscales images uses COMPUTE_SHADER->BOTTOM_OF_PIPE
for the barrier after a dispatch.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11547
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11600
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11789
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8705
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9890
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32115>
2024-11-15 08:22:23 +00:00
Francisco Jerez
0ad835a929 intel/fs/xe2: Fix up subdword integer region restriction with strided byte src and packed byte dst.
This fixes a corner case of the LNL sub-dword integer restrictions
that wasn't being detected by has_subdword_integer_region_restriction(),
specifically:

> if(Src.Type==Byte && Dst.Type==Byte && Dst.Stride==1 && W!=2) {
>    // ...
>    if(Src.Stride == 2) && (Src.UniformStride) && (Dst.SubReg%32  ==  Src.SubReg/2 ) { Allowed }
>    // ...
> }

All the other restrictions that require agreement between the SubReg
number of source and destination only affect sources with a stride
greater than a dword, which is why
has_subdword_integer_region_restriction() was returning false except
when "byte_stride(srcs[i]) >= 4" evaluated to true, but as implied by
the pseudocode above, in the particular case of a packed byte
destination, the restriction applies for source strides as narrow as
2B.

The form of the equation that relates the subreg numbers is consistent
with the existing calculations in brw_fs_lower_regioning (see
required_src_byte_offset()), we just need to enable lowering for this
corner case, and change lower_dst_region() to call lower_instruction()
recursively, since some of the cases where we break this restriction
are copy instructions introduced by brw_fs_lower_regioning() itself
trying to lower other instructions with byte destinations.

This fixes some Vulkan CTS test-cases that were hitting these
restrictions with byte data types.

Fixes: 217d412360 ("intel/fs/gfx20+: Implement sub-dword integer regioning restrictions.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30630>
2024-11-15 07:39:33 +00:00
Tapani Pälli
50243892b4 isl: modify existing assert by allowing CCS_E aux usage
Relax this assert based on x/y offsets for GFX_VERx10 >= 200.

This is getting hit when running gfxbench5 on LNL/BMG.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32128>
2024-11-15 05:20:07 +00:00
Iván Briano
d32a26b3e6 anv: remove unused/misleading/wrong parameters from the RT trampoline
Since the shader parameters are passed as inline data, push constants
are no longer used and so, not actually set on dispatch. But the
nr_params = 4 was still making the shader emit the code to load them,
causing page faults on simulation, and would also on HW if we didn't
always have a scratch page set.

The uses_inline_data parameter will be set from brw_compile_cs(), called
shortly after this point, so we don't need it here.

The subgroup_size is misleading, as we don't actually require that size
and the code that checks for it isn't even running for this shader.

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

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

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32150>
2024-11-14 19:23:42 -08:00
David Heidelberg
1368ee5e1a compiler/rust: drop duplicated bindgen check
The same check is present in meson file in root directory.

Cc: mesa-stable # 24.3
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32101>
2024-11-14 20:12:31 +00:00
Chia-I Wu
97be761f92 vulkan: include host write in expanded dst access flags
From the perspective of the gpu, host read or host write has the same
implication (gpu cache flush) in the dst access flags.  We should
include host write in the dst access flags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32102>
2024-11-14 19:29:00 +00:00
Chia-I Wu
8d31cb8747 panvk: update expectations for G610
The prior commit fixed dEQP-VK.glsl.440.linkage.varying.component.*.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
619463837f panvk: fix a missing cache invalidation
For the host-to-device domain operation, it is possible that
wait_sb_mask is empty but there is a cache invalidaton,

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
a23c0eb61a panvk: improve should_split_render_pass
Fragments are processed in rasterization order within a fragment job.
The fragment subqueue self-wait is nop in most cases.  The only
exception is when there is a feedback loop.

When there is a feedback loop, because we lower subpassLoad to
texelFetch, we have to split the render pass.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
bee7ef4670 panvk: skip tiler subqueue self-wait within a render pass
IDVS jobs within a render pass use the same scoreboard slot.  There is
no need to wait.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
1b2ea10d68 panvk: skip frag subqueue self-wait within a render pass
We don't emit the fragment job until the end of a render pass.  There is
nothing to wait.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
764a294059 panvk: always skip frag->tiler subqueue wait
The fragment subqueue always waits for the tiler subqueue.  There is no
need to emit additional waits for barriers.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
ca7814ccf4 panvk: rework collect_cs_deps
src_stages and dst_stages together define an execution dependency.  Both
of them should be considered at the same time.

Add a low-level helper, add_execution_dependency, to translate pipeline
stages to subqueue wait masks.  The subqueue wait masks only specify
which subqueues should wait for which.  The callers will decide how the
waits are performed exactly.

Update collect_cs_deps to call add_execution_dependency and use the
subqueue wait masks to initialize panvk_cs_deps.

The main difference is that barriers such as

  .srcStageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
  .dstStageMask = VK_PIPELINE_STAGE_2_NONE,

are ignored.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
f1f3b56834 panvk: rework collect_cache_flush_info
src_access defines the availability op and the host-to-device domain op.
dst_access defines the visibility op and the device-to-host domain op.
They should be treated separately.

Add a low-level helper, add_memory_dependency, to translate access flags
to panvk_cache_flush_info.

Update collect_cache_flush_info to use add_memory_dependency.  Also
replace the custom subqueue access flag mappings by
vk_filter_{src,dst}_access_flags2.

The main difference is that barriers such as

  .srcAccessMask = VK_ACCESS_2_MEMORY_WRITE_BIT,
  .dstAccessMask = VK_ACCESS_2_NONE,

or

 .srcAccessMask = VK_ACCESS_2_NONE,
 .dstAccessMask = VK_ACCESS_2_MEMORY_READ_BIT,

are no longer ignored.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
4a598e946c panvk: add get_subqueue_stages
This is a minor refactoring with no functional change.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32074>
2024-11-14 19:07:52 +00:00
Chia-I Wu
764cb8aebb panvk: update CI expectations
The prior commit fixed
dEQP-VK.memory.mapping.suballocation.full.variable.implicit_unmap.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32125>
2024-11-14 18:45:44 +00:00
Chia-I Wu
7a60e1dcd7 panvk: do not leak mapped memory
vkFreeMemory implies vkUnmapMemory.  Without the implied unmap, mapped
memories leak.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32125>
2024-11-14 18:45:44 +00:00
Chia-I Wu
3419fc0d8a panvk: add memory mmap/munmap helpers
Add and use panvk_memory_mmap and panvk_memory_munmap.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32125>
2024-11-14 18:45:44 +00:00
Martin Roukala (né Peres)
8ef5734185 Revert "ci: disable mupuf's farm"
This reverts commit acb48bde44, now that
the first part of the electric renovation is done. It will be
re-disabled for a day later next week.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32147>
2024-11-14 20:01:34 +02:00
Yinjie Yao
19c4b734f2 radeonsi/vcn: Fix compile warnings with previously uninitialized variables.
Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32126>
2024-11-14 17:01:54 +00:00
Yinjie Yao
03462aff8f radeonsi/vcn: Indentation fix
Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32126>
2024-11-14 17:01:54 +00:00
Casey Bowman
b8d253b30c vulkan/screenshot-layer: Add region command option
Adds an optional region selection, based off percentages of the
starting/ending of an image's X & Y values.

This is intended as a performance enhancement tradeoff for smaller
images to be created.

With a smaller image size, the screenshotting layer will change the
region boundaries on the GPU side, which will decrease the amount of
time it takes to copy the image over to CPU-accessible memory.

Using vkcube as an example, the original image size is 500x500:

mesa-screenshot: DEBUG: Screenshot Authorized!
mesa-screenshot: DEBUG: Needs 2 steps
mesa-screenshot: DEBUG: Time to copy: 123530 nanoseconds

Then, by cropping the area to a 100x100 image, we get the following:

mesa-screenshot: DEBUG: Screenshot Authorized!
mesa-screenshot: DEBUG: Using region: startX = 40% (200), startY = 40% (200), endX = 60% (300), endY = 60% (300)
mesa-screenshot: DEBUG: Needs 2 steps
mesa-screenshot: DEBUG: Time to copy: 12679 nanoseconds

For this example, this is a ~90% time reduction improvement!

Overall, this option reduces the copy time to a point where it can
become negligible, relative to the frame time of the application.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Reviewed-by: Felix DeGrood felix.j.degrood@intel.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32016>
2024-11-14 16:35:24 +00:00
Samuel Pitoiset
45c0ef3bb4 radv: dump SPIR-V and NIR for the faulty shader detected with the trap
More logs is always better for debugging.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32116>
2024-11-14 15:57:07 +00:00
Samuel Pitoiset
9149488a9d radv: mark live invocations when dumping VGPRS with the trap handler
Similar to UMR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32116>
2024-11-14 15:57:07 +00:00
Georg Lehmann
3e037ac2a9 aco/gfx8: use ds_swizzle_b32 rotate mode
Despite only being mentioned in the ISA docs since vega, rotate (and fft)
swizzle mode seem to exist since gfx8.

https://github.com/llvm/llvm-project/issues/28975#issuecomment-980964939

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31348>
2024-11-14 15:34:48 +00:00
Michel Dänzer
fdc1c61306 Revert "util: Use persistent array of index entries"
This reverts commit 031f2c2a69.

It broke the macOS build.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12083
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32078>
2024-11-14 14:20:18 +00:00
Michel Dänzer
66d68263f8 Revert "util/mesa-db: Further simplify mesa_db_compact"
This reverts commit 92893309bc.

Need to revert this as well for the next revert.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32078>
2024-11-14 14:20:18 +00:00
Lionel Landwerlin
5cfd841dda anv: fix descriptor asserts
Lots of tests are hitting the assert, one in particular :

dEQP-VK.binding_model.mutable_descriptor.single.switches.sampler_combined_image_sampler.update_copy.nonmutable_source.normal_source.pool_same_types.pre_update.no_array.comp

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b6d11ba5b4 ("anv: Protect memcpy/memset/qsort calls against NULL arguments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32133>
2024-11-14 13:45:19 +00:00
Jose Maria Casanova Crespo
07f44ecd31 rpi4/ci: mark another flaky timeline_semaphore test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32135>
2024-11-14 12:54:44 +01:00
Alejandro Piñeiro
7c3e2927fe docs/features: mark VK_EXT_scalar_block_layout as supported for vc7+
This feature is available on vc7+ (rpi5) since commit
3b9aaf25a0

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32072>
2024-11-14 11:38:37 +00:00
Danylo Piliaiev
b501cbf153 nir/nir_opt_offsets: Do not fold load/store with const offset > max
When (off_const > max) there is a wrap around uint when calling
try_extract_const_addition.
Exit early since folding doesn't make sense in this case.

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32118>
2024-11-14 10:22:39 +00:00
Friedrich Vock
73d513c5be vulkan/rmv: Correctly set heap size
RMV expects the size to be in bits 5-68, not 4-68.

Fixes: 845792db ("vulkan: Add RMV file exporter")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31903>
2024-11-14 09:11:25 +00:00
Lionel Landwerlin
a21cd8c5b6 brw: allocate physical register sizes for spilling
All of the spilling code should work with physical register units
because for example SEND messages will expect a physical register as
destination.

So always allocate a full physical register for the spilled/unspilled
values and adjust the offsets of the registers to physical sizes too.

Cc: mesa-stable
Fixes: aa494cba ("brw: align spilling offsets to physical register sizes")
Closes: mesa/mesa#11967

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Found-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32124>
2024-11-14 08:44:03 +00:00
Boris Brezillon
d13bcd1daf pan/ci: Move g610-vk jobs to post-merge CI
The g610-vk jobs are just too unstable to be pre-merge jobs. Let's keep
them as post-merge so people can still execute them manually if they
care.

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/32129>
2024-11-14 08:16:36 +00:00
David Rosca
dcfc956521 radv/video: Override pic_init_qp_minus26 in PPS
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
d166bb5dd1 radv/video: Use 64x16 alignment for HEVC encode
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
d1c1a33b35 radv/video: Avoid selecting rc layer over maximum
Vulkan spec doesn't say if this is allowed or not, but trying
to do this will hang.

Fixes: 4a19047d32 ("radv/video: Select temporal layer when encoding each frame")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
e941acfb9d radv/video: Report correct encodeInputPictureGranularity
Only aligned size can be encoded.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
e4ec135d8b radv/video: Fix HEVC slice control
This needs to use aligned size, otherwise it will output two
slices when the size is not 64 aligned.

Fixes: 967e4e09de ("radv/video: add h265 encode support")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
David Rosca
6a121f1507 radv/video: Fix H264 slice control
This needs to use aligned size, otherwise it will output two
slices when the size is not 16 aligned.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31418>
2024-11-14 07:52:56 +00:00
Caio Oliveira
15ea28b835 intel/executor: Fix exec_size in @read macro for Xe2
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32122>
2024-11-14 05:31:03 +00:00
Matt Turner
b3a14d7b91 intel: Avoid unaligned pointer access
Avoids the sanitizer error:

```
../src/intel/common/intel_debug_identifier.c:122:15: runtime error: member access within misaligned address 0x7f5ca8b32051 for type 'struct intel_debug_block_base', which requires 4 byte alignment
0x7f5ca8b32051: note: pointer points here
 66 30 29  00 03 00 00 00 10 00 00  00 00 00 00 00 00 00 00  00 01 00 00 00 08 00 00  00 00 00 00 00
              ^
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32098>
2024-11-14 01:05:02 +00:00
Matt Turner
1f3e24f4f3 anv: Avoid null ptr dereference
Avoids the sanitizer error:

```
../src/intel/vulkan/anv_instance.c:266:37: runtime error: member access within null pointer of type 'struct anv_instance'
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32098>
2024-11-14 01:05:01 +00:00
Matt Turner
b6d11ba5b4 anv: Protect memcpy/memset/qsort calls against NULL arguments
Avoids sanitizer errors like:

```
../src/intel/vulkan/anv_pipeline_cache.c:409:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_descriptor_set.c:696:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_descriptor_set.c:2709:10: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_descriptor_set.c:2709:10: runtime error: null pointer passed as argument 2, which is declared to never be null
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32098>
2024-11-14 01:05:01 +00:00
Matt Turner
6e544214d5 vulkan: Skip memcpy() call if passed null pointers
Avoids sanitizer errors like:

```
../src/intel/vulkan/anv_pipeline_cache.c:406:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:406:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:417:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:435:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:435:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:439:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:439:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:443:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:443:4: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:447:4: runtime error: null pointer passed as argument 1, which is declared to never be null
../src/intel/vulkan/anv_pipeline_cache.c:447:4: runtime error: null pointer passed as argument 2, which is declared to never be null
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32098>
2024-11-14 01:05:01 +00:00
David Heidelberg
d21f7f75ff llvmpipe: align with u_cpu_detect struct changes
Cc: mesa-stable # 24.3
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
David Heidelberg
962b996d4c util: drop XOP detection code
Introduced in 2013 with prospect of being used in future.
... 11 years later.

Fixes: 4b45b61fef ("util: add avx2 and xop detection to cpu detection code") # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
David Heidelberg
ca947e1295 util: Drop ancient Intel CPU detection
We don't use it for anything.

Cc: mesa-stable # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
David Heidelberg
a78c2bf2a4 util: Remove MMX/MMXext detection code
Currently pointless, Pentium II or Celeron and later has SSE.

Cc: mesa-stable # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
David Heidelberg
ae85e6920c util: Drop 3Dnow optimisation leftovers
Fixes: a3218e65d1 ("mesa: remove long dead 3Dnow optimisation") # 24.3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31998>
2024-11-13 23:33:15 +00:00
Timothy Arceri
59b2549279 glsl/nir: fix function cloning at link time
As per the code comment added in this commit the nir produced from
glsl to nir doesn't always keep function declarations before the
code that calls them e.g. calls from within other function
implementations. The change in this commit works around this problem by
first cloning all function declarations in a first pass, then cloning
the implementations in a second pass once we have filled the remap
table.

Fixes: cbfc225e2b ("glsl: switch to a full nir based linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12115

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32100>
2024-11-13 22:47:50 +00:00
Eric Engestrom
6a6e37728d turnip/ci: document regression
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32117>
2024-11-13 17:14:06 +00:00
Eric Engestrom
b0c9789bc1 docs: add sha sum for 24.2.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32114>
2024-11-13 16:13:44 +00:00
Eric Engestrom
c2c89b1a49 docs: add release notes for 24.2.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32114>
2024-11-13 16:13:44 +00:00
Eric Engestrom
b4654cef70 docs: update calendar for 24.2.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32114>
2024-11-13 16:13:44 +00:00
Samuel Pitoiset
b4b5f9eeb0 radv,aco: dump VGPRS from the trap handler shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:54 +00:00
Samuel Pitoiset
132b7a85c7 aco: drop the second M0 operand for s_set_gpr_idx_on
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:54 +00:00
Samuel Pitoiset
c712555a9f aco: save/restore VGPRS on GFX8 in the trap handler shader
This will be needed for dumping VGPRs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:54 +00:00
Samuel Pitoiset
a77af57e83 aco: use all invocations from the current wave in the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:54 +00:00
Samuel Pitoiset
034014a165 aco: restore m0/exec before exiting the trap handler
Dumping VGPRs will overwrite m0 and exec and they need to be restored
if we want to return to the shader.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:53 +00:00
Samuel Pitoiset
185a165a85 aco: fix validation for v_movrels_b32 and friends
m0 is the second operand.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:53 +00:00
Samuel Pitoiset
40b343bbee aco: add a new variant for vop1() with two operands
For v_movrels_b32 and friends which need a second operand for m0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:53 +00:00
Samuel Pitoiset
f4cf6a71ed aco: use a 64-bit mov to save exec in the trap handler shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32090>
2024-11-13 15:27:53 +00:00
Rhys Perry
7d4cc04156 radv,ac/nir: split global access using nir_lower_mem_access_bit_sizes
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
17cc8a5a54 aco: remove load byte_align
8/16-bit loads given to instruction selection now always use VMEM and
scalar load instructions unless alignment easily allows a vector load.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
8fdc5d7f9f radv,ac/nir: lower sub-dword loads using nir_lower_mem_access_bit_sizes
fossil-db (navi21):
Totals from 427 (0.54% of 79395) affected shaders:
Instrs: 2939637 -> 2937224 (-0.08%); split: -0.08%, +0.00%
CodeSize: 15982272 -> 15969880 (-0.08%); split: -0.08%, +0.00%
Latency: 21128645 -> 21125738 (-0.01%); split: -0.04%, +0.03%
InvThroughput: 5626811 -> 5626220 (-0.01%); split: -0.03%, +0.02%
SClause: 65771 -> 65731 (-0.06%); split: -0.07%, +0.00%
Copies: 243247 -> 242917 (-0.14%); split: -0.14%, +0.01%
Branches: 100089 -> 100085 (-0.00%)
PreSGPRs: 17879 -> 18118 (+1.34%)
VALU: 1899641 -> 1899278 (-0.02%)
SALU: 468508 -> 466469 (-0.44%)
SMEM: 84305 -> 84291 (-0.02%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
d3ae1842a2 aco,ac/nir: flag loads to use smem in NIR
This pass will be re-used later.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
7fe4f4c14c nir_lower_mem_access_bit_sizes: support load_constant
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
45c1280d2c nir_lower_mem_access_bit_sizes: pass access to callback
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
61752152f7 nir_lower_mem_access_bit_sizes: add nir_mem_access_shift_method
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
e2dd36c66e nir_lower_mem_access_bit_sizes: support 64-bit offsets
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
0619e4db63 nir,aco,ac/llvm: add nir_op_alignbyte_amd
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
db0cbb7e9b aco: optimize nir_op_shfr with <32 src1
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
bd88c8733a ac/nir: add ACCESS_CAN_REORDER to lowered load_global_constant
fossil-db (navi21):
Totals from 39 (0.05% of 79395) affected shaders:
Instrs: 2619146 -> 2619273 (+0.00%); split: -0.00%, +0.01%
CodeSize: 14158064 -> 14158304 (+0.00%)
Latency: 17277051 -> 17274098 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 4242241 -> 4241746 (-0.01%); split: -0.01%, +0.00%
SClause: 56514 -> 57561 (+1.85%); split: -0.02%, +1.87%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
0c7830eb85 nir/algebraic: optimize ushr(a, ishl(iand(b, 3), 3))
nir_lower_mem_access_bit_sizes creates this.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
e95a3364b8 nir/algebraic: optimize bcsel(ieq(b, 0), a, shift(a, b))
nir_lower_mem_access_bit_sizes can create this.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Rhys Perry
80b76ba692 nir: add more intrinsics to nir_intrinsic_can_reorder
Including nir_intrinsic_load_global.

fossil-db (navi21):
Totals from 2725 (3.43% of 79395) affected shaders:
MaxWaves: 71972 -> 71964 (-0.01%); split: +0.01%, -0.02%
Instrs: 2831052 -> 2819902 (-0.39%); split: -0.45%, +0.06%
CodeSize: 15047548 -> 14973072 (-0.49%); split: -0.57%, +0.08%
VGPRs: 108864 -> 108856 (-0.01%); split: -0.02%, +0.01%
SpillSGPRs: 906 -> 926 (+2.21%)
SpillVGPRs: 196 -> 1092 (+457.14%)
Scratch: 729088 -> 741376 (+1.69%)
Latency: 16621317 -> 16586551 (-0.21%); split: -0.34%, +0.13%
InvThroughput: 4169987 -> 4164876 (-0.12%); split: -0.23%, +0.11%
VClause: 63247 -> 63471 (+0.35%); split: -0.21%, +0.56%
SClause: 56978 -> 55276 (-2.99%); split: -3.50%, +0.51%
Copies: 252545 -> 252495 (-0.02%); split: -0.98%, +0.96%
Branches: 91378 -> 91388 (+0.01%); split: -0.03%, +0.04%
PreSGPRs: 112753 -> 126850 (+12.50%); split: -0.48%, +12.98%
PreVGPRs: 90617 -> 90708 (+0.10%)
VALU: 1709034 -> 1709368 (+0.02%); split: -0.01%, +0.03%
SALU: 463554 -> 462253 (-0.28%); split: -0.57%, +0.29%
VMEM: 115952 -> 116272 (+0.28%); split: -0.21%, +0.49%
SMEM: 129097 -> 120538 (-6.63%); split: -6.64%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31904>
2024-11-13 12:59:26 +00:00
Eric Engestrom
c925730779 freedreno/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32080>
2024-11-13 12:26:50 +00:00
Eric Engestrom
234b9c72f9 nvk/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32080>
2024-11-13 12:26:50 +00:00
Eric Engestrom
d688a25d7e broadcom/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32080>
2024-11-13 12:26:50 +00:00
Eric Engestrom
6018d15f32 radv/ci: document flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32080>
2024-11-13 12:26:49 +00:00
Samuel Pitoiset
0c77469995 aco: fix saving/restoring VGPRS in the trap handler on GFX9
When ADD_TID_ENABLE=1, DATA_FORMAT is STRIDE[14:17], so the stride
was too large.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32109>
2024-11-13 11:12:54 +00:00
Eric Engestrom
b32d0d4b45 meson: define only once the versions of the x11 deps
This was a "bumped the version, missed one copy" bug waiting to happen.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32032>
2024-11-13 10:35:55 +00:00
Eric Engestrom
9dc872c4c7 meson: move openmp block out of the middle of the x11 deps block
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32032>
2024-11-13 10:35:55 +00:00
Eric Engestrom
594b8d9f81 ci: reduce priority of nightly pipeline jobs from 50 to 45
This means the fork jobs now have clear priority over nightly jobs,
although it might not matter much as nightly jobs are mostly
long-running jobs and pre-merge & forks will have to wait regardless of
priority.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32093>
2024-11-13 10:01:32 +00:00
Eric Engestrom
50f9bec3ce ci: raise priority of release manager pipelines
KernelCI jobs have priority 44 and are very long-running jobs (and
there might be an issue with the KernelCI that makes it create hundreds
of jobs, @sergi is looking into that).

While bumping to 45+ would be enough to allow Mesa release staging
pipelines to run despite the KernelCI, during the CI meeting with @sergi
and @mupuf it was determined that the Mesa releases are an important
enough operation to warrant being a higher priority than user forks
pipelines, so priority 70 was picked (still under the 75 of Marge
pipelines).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32093>
2024-11-13 10:01:31 +00:00
Erik Faye-Lund
62da644221 panfrost: use mesa_log infra instead of stdio
It's generally useful to use mesa_log for error messages etc. This makes
it easier to forward diagnostics into the right logs etc.

So let's be more consistent about where we're logging things.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32094>
2024-11-13 09:15:05 +00:00
Erik Faye-Lund
c53b944453 panvk: drop unused include
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32094>
2024-11-13 09:15:05 +00:00
Tomeu Vizoso
936da3eb9c etnaviv/ml: Zero out the NN config
As some bits were being left unitialized and causing flakiness.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
b3057ab511 etnaviv/ci: Update expectations for the NPU in the A311D
Several tests have been fixed with the changes to enable the NPU in the
i.MX8MP.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
459da82db6 etnaviv/ml: Make use of the new depthwise support in V8
The V8 hardware supports a faster way of executing depthwise
convolutions, instead of having to fully lower them to regular
convolutions.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
63a10f770c etnaviv/ml: Only reshuffle when needed on V8
Because of how depthwise convolutions are implemented on V8, we
sometimes don't need reshuffling the input with strided convolutions.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
93298a873b etnaviv/ml: Fix reshuffle TP jobs on V8
What we had didn't work on V8, but with these fixes for V8, these jobs
still run well on V7.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
f186844545 etnaviv/ml: Disable caching on V8
The assumptions we make on V7 doesnt work as-is on V8.

Revisit this later.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
41a9540ab9 etnaviv/ml: Set two bits in the NN instruction for V8
Not sure why they have to be set, but they are always on V8.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
bb06e082f8 etnaviv/ml: Implement tiling for V8
Have had to tweak the code to stay safe on the i.MX8MP.

Also, we are for now being very conservative with tiling to prevent
underruns.

In the future, we may want to consider testing different possibilities
during compilation and choosing the optimal one. Also maybe detecting
underruns by checking whether the NPU hung with a given combination.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
0ef5aa5fb6 etnaviv/ml: Fix padding for convolutions in V8
Two bits that aren't used in V7 seem to be used for this in V8.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
b4ba62fcda etnaviv/ml: Add encoding of coefficients for V8
In V8 the weights and biases of convolution operations are encoded with
a totally different scheme.

The initial reverse engineering and implementation was done by:

Philipp Zabel <p.zabel@pengutronix.de>

Support for zero run length encoding and average bias is not implemented yet.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
f3d765ed5d etnaviv/ml: Split V7 coefficient encoding to a new file
In preparation for V8 support, which uses a completely different
encoding.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
3744defc7e etnaviv: Add script to decode weights in Huffman format
The bitstream encoding is based on information reverse engineered by:

Philipp Zabel <p.zabel@pengutronix.de>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
88b5b998d2 etnaviv/ml: Rework the dumping of tensors
Name the file dumps after the operation and suboperation they belong to.

Also dump the command stream for each operation.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
4ca98fa662 etnaviv/ci: Add expectation files for the VIPNano-SI+ NPU
This is the NPU in the NXP i.MX8MP SoC.

Initially, only convolutions are supported.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
f9bb9aa7d5 etnaviv/nn: Fix use of etna_core_info
Right now we were retrieving the properties of the NPU from the
etna_core_info of the GPU.

Fixes: 92a6f697d5 ("etnaviv: npu: Switch to use etna_core_info")
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Tomeu Vizoso
70bff0c971 etnaviv/ml: Fix includes
etnaviv_ml.h uses dynarray, but the u_inlines.h header is needed by
some of the files that include it.

Fixes: d6473ce28e ("etnaviv: Use NN cores to accelerate convolutions")
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31842>
2024-11-13 07:39:35 +00:00
Peyton Lee
79b34a6539 frontends/va: add support for VAProcColorStandardExplicit
for video post processing,
add support for VAProcColorStandardExplicit

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32087>
2024-11-13 06:52:39 +00:00
Peyton Lee
a9e4461c26 frontends/va: add support for VAProcColorStandardExplicit
for video post processing,
add support for VAProcColorStandardExplicit

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32087>
2024-11-13 06:52:39 +00:00
Martin Roukala (né Peres)
acb48bde44 ci: disable mupuf's farm
I'm about to have an electric renovation at my house, which will start
by having a 4h downtime.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32091>
2024-11-13 06:29:55 +00:00
Tapani Pälli
fbe5d41b58 anv: extend Wa_14017794102 with lineage Wa_14023061436
This workaround is applicable for Xe3 with new lineage.

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/31963>
2024-11-13 04:54:32 +00:00
Tapani Pälli
9429c0075b anv: utilize ray query bo per queue for Wa_14022863161
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/31963>
2024-11-13 04:54:32 +00:00
Tapani Pälli
1bd9e51a73 intel/dev: update mesa_defs.json from workaround database
Brings in some PTL workarounds.

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/31963>
2024-11-13 04:54:32 +00:00
Benjamin Otte
e757238370 vulkan/wsi: Support alpha swapchains on win32
Map VkSwapchainCreateInfoKHR.compositeAlpha to corresponding
DXGI_SWAP_CHAIN_DESC1.alphaMode.

Add VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR to capabilities as
it was missing there.

Signed-off-by: Benjamin Otte <otte@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32048>
2024-11-13 04:26:46 +00:00
Iván Briano
f2f4206d49 intel/decoder: fix INTEL_DEBUG=bat
Now that all genxml filenames are in verx10 format, we don't need to fix
the number up when we look them up.

Fixes: 8906816f49 ("anv,hasvk,genxml: Rename genxml files using verx10")

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32099>
2024-11-13 00:45:40 +00:00
M Henning
68cdcf5bbc nvk: Fix two typos in comments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32086>
2024-11-12 23:26:49 +00:00
M Henning
05770374a3 nvk: Remove params for dirty_cbufs_for_descriptors
dyn_start/dyn_end are unused now.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32086>
2024-11-12 23:26:49 +00:00
M Henning
dc12c78235 nvk: Fix invalidation of NVK_CBUF_TYPE_DYNAMIC_UBO
Because dyn_start and dyn_end are indices into
nvk_root_descriptor_table->dynamic_buffers, we would need to offset
cbuf->dynamic_idx by
nvk_root_descriptor_table->set_dynamic_buffer_start[cbuf->desc_set]
in order to do those comparisons correctly.

We could do that, but it's simpler and no less precise to sinply
re-use the same comparison that we do in the other cases here.

This fixes a rendering artifact in Baldur's Gate 3 (Vulkan), which
regressed with the commit listed below.

Fixes: 091a945b57 ("nvk: Be much more conservative about rebinding cbufs")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32086>
2024-11-12 23:26:49 +00:00
M Henning
64f17c1391 nvk/cmd_buffer: Pass count to set_root_array
Previously, we were passing the end index which was incorrect.
Also, improve the macros so that they can take an expression for
the count.

Fixes: b2d85ca36f ("nvk: Use helper macros for accessing root descriptors")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32086>
2024-11-12 23:26:49 +00:00
Lionel Landwerlin
08530462bd anv: implement Wa_16011107343/22018402687 for generated draws
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32059>
2024-11-12 22:48:39 +00:00
Lionel Landwerlin
53eed61a90 intel: make sure intel_wa.h can be included by opencl code
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32059>
2024-11-12 22:48:39 +00:00
Lionel Landwerlin
672d41d22a anv: split generated draw flags from mocs/dword-count
We'll add more flags.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32059>
2024-11-12 22:48:39 +00:00
Lionel Landwerlin
d6acb56f11 anv: update shader descriptor resource limits
Some limits got stuck to the old binding table limits. Those don't
apply anymore since EXT_descriptor_indexing was implemented.

Fixes: 6e230d7607 ("anv: Implement VK_EXT_descriptor_indexing")
Fixes: 96c33fb027 ("anv: enable direct descriptors on platforms with extended bindless offset")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31999>
2024-11-12 22:01:52 +00:00
Gurchetan Singh
1794ff7309 gfxstream: use canonical Mesa dependencies
drm_dep -> dep_libdrm, essentially.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Gurchetan Singh
5e9c14395d gfxstream: guest: use internal version of AEMU headers + impls
This removes the dependency of libaemu-v0.1.2 on
gfxstream guest vulkan.

ALSO:

find ./ -type f -exec sed -i -e 's/android::base/gfxstream::aemu/g' {} \;

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Gurchetan Singh
a8c1021d79 gfxstream: modify libaemu for Mesa use case
- Modifications to directory paths.
- saveStringArray moved to Stream.h/Stream.cpp to avoid
  importing StreamSerializing
- C++ include guards
- Namespace changes

find ./ -type f -exec sed -i -e 's/namespace android/namespace gfxstream/g' {} \;

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Gurchetan Singh
43e378c537 gfxstream: aemu: vendor it
This imports certain files from libaemu into gfxstream
guest.

Some are quite specific to gfxstream (Stream, ring_buffer) and others
we expect to Mesa-ify with time (AlignedBuf, Allocator) [probably
while keeping some C++ interface].

The main benefit of importing is easier refactoring and packaging.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Gurchetan Singh
c7decb61ee gfxstream: nuke EntityManager.h include
So this is not actually used.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32062>
2024-11-12 19:21:10 +00:00
Georg Lehmann
8f094a7762 nir: handle fmul(a,a)/ffma(a,a,b) in nir_def_all_uses_ignore_sign_bit
Foz-DB Navi31:
Totals from 436 (0.55% of 79395) affected shaders:
Instrs: 808917 -> 805868 (-0.38%)
CodeSize: 4269056 -> 4246512 (-0.53%)
Latency: 5827077 -> 5819815 (-0.12%); split: -0.13%, +0.00%
InvThroughput: 625482 -> 622959 (-0.40%); split: -0.41%, +0.00%
SClause: 21797 -> 21756 (-0.19%); split: -0.23%, +0.04%
Copies: 48502 -> 48505 (+0.01%); split: -0.04%, +0.05%
VALU: 481686 -> 479074 (-0.54%); split: -0.54%, +0.00%
SALU: 76699 -> 76700 (+0.00%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31844>
2024-11-12 18:03:57 +00:00
Georg Lehmann
7e8a08ae77 aco: use nir_def_all_uses_ignore_sign_bit
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31844>
2024-11-12 18:03:57 +00:00
Georg Lehmann
7d5db1ee52 pan/bi: use nir_def_all_uses_ignore_sign_bit
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31844>
2024-11-12 18:03:57 +00:00
Georg Lehmann
34f41abe24 nir: add nir_def_all_uses_ignore_sign_bit
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31844>
2024-11-12 18:03:57 +00:00
Samuel Pitoiset
44fa24580f radv: optimize the pipe misaligned L2 cache invalidation on GFX11
When using the subresource range, it's possible to reduce the number
of L2 cache invalidations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
7a3a65c0c4 radv: pass the image subresource range to radv_{src,dst}_access_flush()
This will allow us to optimize the pipe misaligned special case for
GFX11 because only the first mip in the mip-tail needs the L2 cache
invalidation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
f7a39fac10 radv: use vk_image_view_subresource_range() when possible
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
7a8b725d03 radv: determine the first mip that is pipe misaligned on GFX10+
This will allow us to optimize the GFX11 case where not all mips are
affected by the L2 invalidation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
c5d5f2fbef radv: move the GFX11 special case for mips to radv_image_is_pipe_misaligned()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Samuel Pitoiset
65bb39bf96 radv: do not always invalidate L2 for GPUs with non-coherent RBs on GFX10+
According to PAL, L2 should be invalidated only for images with
DCC/HTILE even on GPUs with non-coherent RBs. In practice, most of
the images have either DCC/HTILE but this can reduce the number of L2
flushes for images without any compression.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31921>
2024-11-12 17:27:39 +00:00
Boris Brezillon
eff8a3517d panvk: Enable CI on G610
The number of failures/crashes/flakes is still considerable, but the
goal is to catch regressions when fixing bugs or adding features, so
let's enable CI on G610 anyway.

We might decide to turn g610-vk into a post-merge jobs if CI on G610
is too unstable.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31524>
2024-11-12 16:46:47 +00:00
Samuel Pitoiset
5e0b81413d radv: emit nir_debug_break instructions when the trap handler is enabled
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32061>
2024-11-12 16:05:17 +00:00
Samuel Pitoiset
2d5df46c25 aco: emit nir_intrinsic_debug_break
s_trap is used to enter the trap.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32061>
2024-11-12 16:05:17 +00:00
Samuel Pitoiset
b6c72b3717 spirv: handle NonSemantic.DebugBreak to emit nir_debug_break()
NonSemantic SPIR-V allows to declare extended instructions. This
NonSemantic.DebugBreak allows to emit a breakpoint.

See https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.DebugBreak.html

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32061>
2024-11-12 16:05:17 +00:00
Samuel Pitoiset
a85f0143e0 nir: add nir_intrinsic_debug_break instruction
This instruction can be used as a breakpoint in shaders to enter a
trap if supported by the driver. It will be used to handle
NonSemantic.DebugBreak in SPIR-V.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32061>
2024-11-12 16:05:17 +00:00
Jose Maria Casanova Crespo
5b951bcdd7 v3d: Enable Early-Z with discards when depth updates are disabled
The Early-Z optimization is disabled when there is a discard
instruction in the shader used in the draw call.

But if discard is the only reason to disable Early-Z, and at
draw call time the updates in the draw call are disabled we
can enable Early-Z using a shader variant.

If there are occlussion queries active we also need to disable
Early-z optimization.

So this patch enables Early-Z in this scenario.

The performance improvement is significant when running gfxbench
benchmark showing an average improvement of 11.15%

fps_avg  helped:  gl_gfxbench_aztec_high.trace:  3.13 ->  3.73 (19.13%)
fps_avg  helped:  gl_gfxbench_aztec.trace:       4.82 ->  5.68 (17.88%)
fps_avg  helped:  gl_gfxbench_manhattan31.trace: 5.10 ->  6.00 (17.59%)
fps_avg  helped:  gl_gfxbench_manhattan.trace:   7.24 ->  8.36 (15.52%)
fps_avg  helped:  gl_gfxbench_trex.trace:       19.25 -> 20.17 ( 4.81%)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32028>
2024-11-12 13:26:38 +00:00
Sagar Ghuge
fef8490eb9 anv: Enable MCS_CCS compression on Gfx12+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32009>
2024-11-12 12:27:21 +00:00
Karmjit Mahil
2a7df331af nir: Fix no_lower_set leak on early return
Addresses:
```
Indirect leak of 256 byte(s) in 2 object(s) allocated from:
    #0 0x7faaf53ee0 in __interceptor_malloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7fa8cfe900 in ralloc_size ../src/util/ralloc.c:118
    #2 0x7fa8cfeb20 in rzalloc_size ../src/util/ralloc.c:152
    #3 0x7fa8cff004 in rzalloc_array_size ../src/util/ralloc.c:232
    #4 0x7fa8d06a84 in _mesa_set_init ../src/util/set.c:133
    #5 0x7fa8d06bcc in _mesa_set_create ../src/util/set.c:152
    #6 0x7fa8d0939c in _mesa_pointer_set_create ../src/util/set.c:613
    #7 0x7fa95e5790 in nir_lower_mediump_vars
       ../src/compiler/nir/nir_lower_mediump.c:574
    #8 0x7fa862c1c8 in tu_spirv_to_nir(tu_device*, void*, unsigned long,
       VkPipelineShaderStageCreateInfo const*, tu_shader_key const*,
pipe_shader_type) ../src/freedreno/vulkan/tu_shader.cc:116
    #9 0x7fa8646f24 in tu_compile_shaders(tu_device*, unsigned long,
       VkPipelineShaderStageCreateInfo const**, nir_shader**,
tu_shader_key const*, tu_pipeline_layout*, unsigned char const*,
tu_shader**, char**, void*, nir_shader**, VkPipelineCreationFeedback*)
../src/freedreno/vulkan/tu_shader.cc:2741
    #10 0x7fa85a16a4 in tu_pipeline_builder_compile_shaders
	../src/freedreno/vulkan/tu_pipeline.cc:1887
    #11 0x7fa85eb844 in tu_pipeline_builder_build<(chip)7>
	../src/freedreno/vulkan/tu_pipeline.cc:3923
    #12 0x7fa85e6bd8 in tu_graphics_pipeline_create<(chip)7>
	../src/freedreno/vulkan/tu_pipeline.cc:4203
    #13 0x7fa85c2588 in VkResult
	tu_CreateGraphicsPipelines<(chip)7>(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**)
../src/freedreno/vulkan/tu_pipeline.cc:4234
```
seen in:
dEQP-VK.binding_model.mutable_descriptor.single.switches.uniform_texel_buffer_storage_image.update_write.no_source.no_source.pool_expand_types.pre_update.no_array.vert

Fixes: 7e986e5f04 ("nir/lower_mediump_vars: Don't lower mediump shared vars with atomic access.")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32057>
2024-11-12 11:48:11 +00:00
Karmjit Mahil
c923eff742 tu: Fix potential alloc of 0 size
We can end up calling vk_multialloc_alloc with 0 size when
`attachment_count` is 0 and `clearValueCount` is 0.

Addressed:
```
Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x7faf033ee0 in __interceptor_malloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7fada5cc10 in vk_default_alloc ../src/vulkan/util/vk_alloc.c:26
    #2 0x7fac50b270 in vk_alloc ../src/vulkan/util/vk_alloc.h:48
    #3 0x7fac555040 in vk_multialloc_alloc
       ../src/vulkan/util/vk_alloc.h:234
    #4 0x7fac555040 in void
       tu_CmdBeginRenderPass2<(chip)7>(VkCommandBuffer_T*,
VkRenderPassBeginInfo const*, VkSubpassBeginInfo const*)
../src/freedreno/vulkan/tu_cmd_buffer.cc:4634
    #5 0x7fac900760 in vk_common_CmdBeginRenderPass
       ../src/vulkan/runtime/vk_render_pass.c:261
```
seen in:
dEQP-VK.robustness.robustness2.bind.notemplate.r32i.dontunroll.nonvolatile.uniform_texel_buffer.no_fmt_qual.len_252.samples_1.1d.frag

Fixes: 4cfd021e3f ("turnip: Save the renderpass's clear values in the cmdbuf state.")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32057>
2024-11-12 11:48:11 +00:00
Karmjit Mahil
53c2d5e426 tu: Fix push_set host memory leak on command buffer reset
Addresses:
```
Direct leak of 192 byte(s) in 1 object(s) allocated from:
    #0 0x7fbe5e4230 in __interceptor_realloc
       ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    #1 0x7fbd008bf4 in vk_default_realloc
       ../src/vulkan/util/vk_alloc.c:37
    #2 0x7fbbabb2fc in vk_realloc ../src/vulkan/util/vk_alloc.h:70
    #3 0x7fbbaead38 in tu_push_descriptor_set_update_layout
       ../src/freedreno/vulkan/tu_cmd_buffer.cc:3173
    #4 0x7fbbaeb0b4 in tu_push_descriptor_set
       ../src/freedreno/vulkan/tu_cmd_buffer.cc:3203
    #5 0x7fbbaeb500 in tu_CmdPushDescriptorSet2KHR(VkCommandBuffer_T*,
       VkPushDescriptorSetInfoKHR const*)
../src/freedreno/vulkan/tu_cmd_buffer.cc:3235
    #6 0x7fbbe35c80 in vk_common_CmdPushDescriptorSetKHR
       ../src/vulkan/runtime/vk_command_buffer.c:300
```
seen in:
dEQP-VK.binding_model.shader_access.secondary_cmd_buf.bind.with_push.sampler_mutable.tess_eval.multiple_discontiguous_descriptors.1d_array

Fixes: 03294e1dd1 ("turnip: Keep a host copy of push descriptor sets.")
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32057>
2024-11-12 11:48:11 +00:00
Samuel Pitoiset
5f79b8ea2d radv,aco: save/restore overwritten VGPRs in the trap handler shader
The trap currently doesn't return to the shader but it will be needed
for example for the debug mode.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
ccde8ecd64 radv: compute the TMA BO size instead of using a constant
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
3e88f996a5 radv: fix the TMA descriptor size
The TMA BO contains the descriptor first.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
6ec0c85908 radv,aco: use the trap handler layout struct while compiling the shader
It's less error prone to rely on the layout for offsets.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
6bfd92123f aco: simplify postprocessing the trap handler shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
44dfeb4479 radv,aco: add a separate function to compile the trap handler shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
62e335c779 radv,aco: dump more SQ_WAVE regs from the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Samuel Pitoiset
0cc21d0601 radv: cleanup printing SGPRS dumped from the trap handler
It's more readable like that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32056>
2024-11-12 11:16:13 +00:00
Georg Lehmann
ee74b090db nir/opt_16bit_tex_image: optimize extract half sources
I also tried extract_i16/u16, but that causes a lot of regressions.

Foz-DB Navi21:
Totals from 3 (0.00% of 79395) affected shaders:
Instrs: 367 -> 355 (-3.27%)
CodeSize: 2156 -> 2136 (-0.93%)
VGPRs: 80 -> 72 (-10.00%)
Latency: 3163 -> 3153 (-0.32%); split: -0.51%, +0.19%
InvThroughput: 424 -> 404 (-4.72%)
Copies: 31 -> 42 (+35.48%); split: -3.23%, +38.71%
PreVGPRs: 27 -> 25 (-7.41%)
VALU: 208 -> 196 (-5.77%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32058>
2024-11-12 10:19:40 +00:00
Mary Guillemard
bad38c1e76 panvk: Implement global priority extensions
Wire up with common kmod code.

On JM, this is a no-op implementation only allowing medium priority.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31961>
2024-11-12 08:46:22 +00:00
Mary Guillemard
e2c81380a9 pan/kmod: Expose medium priority on panfrost
Panfrost currently doesn't support priorities, assumes default priority as
medium to properly support global priorities on Vulkan.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31961>
2024-11-12 08:46:22 +00:00
Mary Guillemard
2237cff1af panfrost: Report default value for GROUP_PRIORITIES_INFO in drm-shim
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31961>
2024-11-12 08:46:22 +00:00
Zan Dobersek
25b73dff5a tu/a7xx: use concurrent resolve groups
Establish groups of resolve and unresolve operations that the a7xx
hardware can then use to improve efficiency. Creating such groups enables
continuation of command stream processing while these (un)resolves are in
progress, as long as those latter operations don't depend on the grouped
(un)resolves.

To enable concurrent resolves and unresolves, corresponding fields on the
RB_CCU_CNTL register have to be set appropriately.

Resolve groups are tracked through a scoped struct that logs any pending
resolve operation. Once the group is complete, the emit helper function
will write out the CCU_END_RESOLVE_GROUP event to the command stream.

The buffer ID field on the RB_BLIT_INFO register can be used to disperse
different resolve operations across all available slots in the resolve
engine. The 0x8 and 0x9 IDs are reserved for depth and stencil buffers,
while the 0x0-0x7 range is used for color buffers. A simple incremented
counter is used to assign IDs for all color buffers inside any resolve
group. While it can occur for two color or depth/stencil buffers inside
the same resolve group to have identical IDs, hardware doesn't seem to
have a problem with handling that.

Two TU_DEBUG options are provided, 'noconcurrentresolves' and
'noconcurrentunresolves` disable respective operations by adjusting the
mode set through RB_CCU_CNTL.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31190>
2024-11-12 07:50:45 +00:00
Zan Dobersek
f0e5331b21 freedreno/registers: update RB_BLIT_INFO, RB_CCU_CNTL
For RB_BLIT_INFO, documentation of the buffer ID field is updated to
explain its use on a7xx.

RB_CCU_CNTL definition for a7xx is updated with fields for concurrent
resolve/unresolve modes and enhanced with dedicated enum types.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31190>
2024-11-12 07:50:45 +00:00
Job Noorman
b36a7ce0f1 ir3/ra: prevent moving source intervals for shared collects
Non-trivial collects (i.e., ones that will introduce moves because the
sources don't line-up with the destination) may cause source intervals
to get implicitly moved when they are inserted as children of the
destination interval. Since we don't support moving intervals in shared
RA, this may cause illegal register allocations. Prevent this by
creating a new top-level interval for the destination so that the source
intervals will be left alone.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31978>
2024-11-11 20:08:34 +00:00
Matt Turner
a2c4a34303 anv: Align anv_descriptor_pool::host_mem
Otherwise anv_descriptor_set is accessed through an unaligned pointer,
which is undefined behavior in C.

```
anv_descriptor_set.c:1620:17: runtime error: member access within misaligned address 0x61900002c2b5
               for type 'struct anv_descriptor_set', which requires 8 byte alignment 0x61900002c2b5
```

Fixes: 2570a58bcd ("anv: Implement descriptor pools")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32070>
2024-11-11 19:45:14 +00:00
Georg Lehmann
ece1ab3b87 radv: run copy prop before vectorizing
Otherwise there are a lot of scalar movs between texture instructions
and alu. With those removed, the top down vectorizer has more starting
points.

Totals from 296 (0.37% of 79206) affected shaders:
MaxWaves: 5710 -> 5754 (+0.77%)
Instrs: 388051 -> 386630 (-0.37%); split: -0.46%, +0.09%
CodeSize: 2120800 -> 2117144 (-0.17%); split: -0.30%, +0.13%
VGPRs: 17496 -> 17344 (-0.87%)
Latency: 8893751 -> 8901364 (+0.09%); split: -0.10%, +0.18%
InvThroughput: 1740411 -> 1731710 (-0.50%); split: -0.57%, +0.07%
VClause: 6573 -> 6576 (+0.05%); split: -0.21%, +0.26%
SClause: 11233 -> 11209 (-0.21%); split: -0.28%, +0.07%
Copies: 31582 -> 31635 (+0.17%); split: -1.49%, +1.66%
PreSGPRs: 15878 -> 15876 (-0.01%)
PreVGPRs: 15380 -> 15274 (-0.69%)
VALU: 278528 -> 277036 (-0.54%); split: -0.65%, +0.11%
SALU: 49062 -> 49054 (-0.02%); split: -0.03%, +0.02%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32060>
2024-11-11 18:33:48 +00:00
Samuel Pitoiset
107f29c39a aco: do not reorder s_trap instructions
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32055>
2024-11-11 15:46:36 +00:00
Asahi Lina
252e9a4cdf hk: Bump up max buffer size
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Asahi Lina
81546c769e asahi: Use 64bit size fields
This allows for BOs >4G.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
63dd4c13d0 asahi: move agx_gather_device_key
for precomp

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
7e57e0aa7d asahi: factor out more compiled shader
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
f36ea1818b asahi: drop dead param
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
e7f100013f asahi: don't take compiled_shader in agx_build_internal_usc
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
8d73a3ae40 asahi: assert/cse resource valid
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
b94bcf0318 asahi: fix a2c with sample shading, harder
Fixes: 9bbe93d158 ("hk: fix alpha-to-coverage with sample shading")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
b9429930b9 asahi: correct core count, max freq
fixes clinfo.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
beab5d2792 asahi: extract agx_get_num_cores
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
e145425746 agx: fuse also 8-bit address math
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
75d3c51e51 libagx: drop silliness in restart kernel
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
4660911cf9 libagx: fix unroll kernel constant qualifier
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
2963cd900f libagx: don't key unroll to index size
Probably a premature optimization, it's annoying for precomp and for DGC.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
6030b204d5 libagx: simplify index patch expression
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
5e4e8df95a libagx: drop Clockwise
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
0c0097ab34 libagx: vectorize triangle def'n
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
c54fdde1a4 libagx: drop dead code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
d00a504cb0 libagx: drop branch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
28a2844309 libagx: fix cl warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
663b367a76 hk: fix meta shader name
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
f8b69ebdc2 hk: drop assert
works fine without.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
ece3bd74db agx: make imad+ishl rules actually work
total instructions in shared programs: 2750211 -> 2750184 (<.01%)
instructions in affected programs: 50499 -> 50472 (-0.05%)
helped: 27
HURT: 0
Instructions are helped.

total alu in shared programs: 2273669 -> 2273642 (<.01%)
alu in affected programs: 29874 -> 29847 (-0.09%)
helped: 27
HURT: 0
Alu are helped.

total fscib in shared programs: 2271986 -> 2271959 (<.01%)
fscib in affected programs: 29874 -> 29847 (-0.09%)
helped: 27
HURT: 0
Fscib are helped.

total bytes in shared programs: 21475184 -> 21474968 (<.01%)
bytes in affected programs: 371574 -> 371358 (-0.06%)
helped: 27
HURT: 0
Bytes are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
f737470736 agx: fuse iadd+large shift into imad
total instructions in shared programs: 2750352 -> 2750211 (<.01%)
instructions in affected programs: 86944 -> 86803 (-0.16%)
helped: 32
HURT: 18
Instructions are helped.

total alu in shared programs: 2273810 -> 2273669 (<.01%)
alu in affected programs: 76720 -> 76579 (-0.18%)
helped: 32
HURT: 18
Alu are helped.

total fscib in shared programs: 2272127 -> 2271986 (<.01%)
fscib in affected programs: 76720 -> 76579 (-0.18%)
helped: 32
HURT: 18
Fscib are helped.

total bytes in shared programs: 21476424 -> 21475184 (<.01%)
bytes in affected programs: 649884 -> 648644 (-0.19%)
helped: 33
HURT: 18
Bytes are helped.

total regs in shared programs: 865114 -> 865090 (<.01%)
regs in affected programs: 525 -> 501 (-4.57%)
helped: 3
HURT: 0

total uniforms in shared programs: 2120792 -> 2120848 (<.01%)
uniforms in affected programs: 414 -> 470 (13.53%)
helped: 0
HURT: 8
Uniforms are HURT.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
c9e42073a1 agx: optimize signext imad
improves clpeak short.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Asahi Lina
cf0261980a hk: Enable missing swapchainMaintenance1 support
This was inconsistent with claiming the extension is supported, and that
trips up GTK4.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
d449800e46 hk: don't advertise impossible modifiers
fixes dEQP-VK.drm_format_modifiers.bound_to_dma_buf.a2b10g10r10_sint_pack32,Crash

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Asahi Lina
e5d61631fe hk: Fix DRM modifier selection for compressed surfaces
We have to reject DRM_FORMAT_MOD_APPLE_TWIDDLED_COMPRESSED for surfaces
which are too small. Since the modifier is for all planes, that means
that for multiplane images we need to test all planes for compression
support.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Asahi Lina
da1601a4ec hk: Add virtio implicit sync support
Since we can't know what BOs are written easily, just sync against all
external BOs.

This should go away once we have proper fence passing support so we can
do implicit sync passing in muvm-x11bridge.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Mary Guillemard
1a621a6967 agx: Add support for EGL_NV_context_priority_realtime
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
ddc6d9e984 agx: fix atomics in tess count shaders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
2c7635ab63 agx: add tests for sign/zero-extend propagate
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:02 +00:00
Alyssa Rosenzweig
6d56c8bc02 agx: fold zext into int sources
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Alyssa Rosenzweig
200d0794e2 agx: optimize signext+iadd
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Alyssa Rosenzweig
cfe0a9acec agx: add pseudo for signext
easier to optimize

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Alyssa Rosenzweig
8de339c0d8 agx: change int conversion test
it's not useful as is but we can salvage

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
85c5a25ec3 asahi: In-place decompress shared resources for feedback loops
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
f04387a415 asahi: Introduce batch->feedback to disable compression in PBE
Used for RTs that have feedback with in-place decompression.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
9288a3a583 asahi: Extract agx_decompress_inplace()
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
f28a1b3fcf asahi: Add PIPE_BIND_SHARED to imported resources
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Asahi Lina
59501af723 asahi: Add pipe bind flags to resource debug
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32081>
2024-11-11 14:33:01 +00:00
Zan Dobersek
e17038cc88 fd/pps: provide derived counters on a7xx
Provide various derived counters that can be reported by the freedreno
perfetto producer on a7xx devices.

Specific to a7xx is the split of counters for some countables between the
rendering and visibility bins. Such counters have to be configured
separately inside the appropriate perfcounter group, which then enables
the derived counter to use the separate counter values in its measured
metrics.

Not all possible derived counters are enabled because the perfcounter
groups cannot handle as many counters as would be necessary. There's also
disabled derived counters that would require counters from the VBIF group
which isn't exposed for now due to its more complex way of enabling the
relevant counters.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29677>
2024-11-11 13:39:40 +00:00
Zan Dobersek
fae4a23ab1 fd/pps: specify counter group for each countable
For each countable that's being set up, the specific counter group is now
also required. This way on a7xx it will be possible to differentiate
between countables that have the same name but can be used through counter
groups for rendering bin or for visibility bin (e.g. CP and BV_CP).

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29677>
2024-11-11 13:39:39 +00:00
Danylo Piliaiev
21359417ba ir3/parser: Print the line where parsing error occurred
Super useful with rddecompiler, otherwise it's impossible to
determine the instruction which is failed to be parsed.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31954>
2024-11-11 11:38:17 +00:00
Samuel Pitoiset
30d9166d80 radv: dump the trap handler shader with RADV_DEBUG=dump_trap_handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32031>
2024-11-11 09:34:05 +00:00
Samuel Pitoiset
4d50691ae9 radv: remove unused parameter to radv_fill_nir_compiler_options()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32031>
2024-11-11 09:34:05 +00:00
Samuel Pitoiset
fb5a3cca7a docs: add missing documentation for RADV_DEBUG=psocachestats
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32077>
2024-11-11 09:26:28 +00:00
Konstantin Seurer
e3cf6290e0 radv: Add RADV_DEBUG=nirdebuginfo
Annotates the shader with source locations into the nir shader.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
cf447c5da1 nir: Do not gather source locations for phis
Phi instructions are expected to be the first instructions in a block.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
f2c204daf0 nir: Add a first_line parameter to gather_debug_info
Useful when the file contains multiple shaders.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
736c8c6f23 radv: Dump nir shaders before compiling
It will allow adding source locations that point to the nir_string to
the shader.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
aaf65d6219 radv: Store debug info inside radv_shader
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:14 +00:00
Konstantin Seurer
54c22656b8 radv: Add a helper for accessing the shader binary
Use pointers into the blob instead of hardcoding the layout everywhere.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:13 +00:00
Konstantin Seurer
69ebba82d4 aco: Pass debug information to the driver
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:13 +00:00
Konstantin Seurer
f8ef1afec8 aco: Handle nir_debug_info_instr
Propagated debug info using p_debug_info and Program::debug_info.
Offsets into the shader binary are gathered during assembly.
This will be usefull for mapping back the disassembled shader to
nir, glsl or spirv.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:13 +00:00
Konstantin Seurer
7dd9840128 amd: Add ac_shader_debug_info
This is very similar to nir_debug_info_instr but it can exist outside of
a nir shader.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29298>
2024-11-11 08:39:13 +00:00
Konstantin
4d09cd7fa5 nir/lower_non_uniform_access: Group accesses using the same resource
Avoids emitting the waterfall loop for every access if they use the same
resource:

waterfall_loop {
   access
}
waterfall_loop {
   access
}

->

waterfall_loop {
   access
   access
}

Totals from 276 (0.33% of 84770) affected shaders:
MaxWaves: 3360 -> 3356 (-0.12%)
Instrs: 3759927 -> 3730650 (-0.78%)
CodeSize: 21125784 -> 20899580 (-1.07%)
VGPRs: 23096 -> 23104 (+0.03%)
Latency: 35593716 -> 35315455 (-0.78%); split: -0.78%, +0.00%
InvThroughput: 7353071 -> 7297309 (-0.76%); split: -0.76%, +0.00%
VClause: 120983 -> 118579 (-1.99%)
SClause: 113073 -> 110671 (-2.12%)
Copies: 358272 -> 348686 (-2.68%)
Branches: 166706 -> 159500 (-4.32%)
PreSGPRs: 18598 -> 18596 (-0.01%)
PreVGPRs: 21417 -> 21424 (+0.03%); split: -0.01%, +0.04%
VALU: 2354862 -> 2350053 (-0.20%)
SALU: 582291 -> 567638 (-2.52%)
SMEM: 139875 -> 137473 (-1.72%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30509>
2024-11-11 07:53:13 +00:00
Konstantin Seurer
c5e40a60f8 radv: Lower non-uniform access after vectorization
Scalar access can make nir_lower_non_uniform_access emit a lot of
waterfall loops.

Totals from 83 (0.10% of 84770) affected shaders:
Instrs: 2747926 -> 2745959 (-0.07%); split: -0.07%, +0.00%
CodeSize: 15022460 -> 14998240 (-0.16%); split: -0.16%, +0.00%
Latency: 18602932 -> 18404976 (-1.06%); split: -1.18%, +0.12%
InvThroughput: 4500730 -> 4450364 (-1.12%); split: -1.18%, +0.06%
VClause: 93651 -> 91848 (-1.93%); split: -1.93%, +0.00%
SClause: 63672 -> 63595 (-0.12%); split: -0.13%, +0.00%
Copies: 229377 -> 229896 (+0.23%); split: -0.04%, +0.27%
Branches: 107630 -> 107627 (-0.00%); split: -0.01%, +0.00%
PreSGPRs: 5247 -> 5253 (+0.11%)
PreVGPRs: 5911 -> 5903 (-0.14%); split: -0.29%, +0.15%
VALU: 1761158 -> 1761540 (+0.02%); split: -0.01%, +0.03%
SALU: 419743 -> 419783 (+0.01%); split: -0.01%, +0.02%
VMEM: 152142 -> 150208 (-1.27%)
SMEM: 80251 -> 80244 (-0.01%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30509>
2024-11-11 07:53:13 +00:00
Konstantin Seurer
d44f74896e nir: Add missing access flags to print_access
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30509>
2024-11-11 07:53:13 +00:00
Konstantin Seurer
01ca436263 util: Fix some brackets in util_dynarray_.*_ptr
Fixes a compiler error when directly accessing members of the returned
pointer.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30509>
2024-11-11 07:53:13 +00:00
Visan, Tiberiu
d379a3a428 amd/vpelib: remove luma offset (#459)
\[WHY\]
Shader and VPE does not apply brightness adjs in the same manner

\[HOW\]
Removed luma offset added in VPE

\[TESTING\]
Tested on real time video rendering

Co-authored-by: Tiberiu Visan <tvisan@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32075>
2024-11-11 13:00:54 +08:00
Visan, Tiberiu
2172ab2c2a amd/vpelib: patch to match shader (#456)
\[WHY\]
Shader and VPE had different behavior while adjusting the brightness

\[HOW\]
Apply the same normalization factor

\[TESTING\]
Tested on real video outputs

Co-authored-by: Tiberiu Visan <tvisan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32075>
2024-11-11 13:00:44 +08:00
Leder, Brendan Steve
891c4694ba amd/vpelib: Refactor OCSC and update missing check
Missing check for 601 in limited format check, updated that.
Refactored OCSC to use specific limited depths.
Cleaned up general color processing.

Co-authored-by: Brendan <breleder@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32075>
2024-11-11 13:00:29 +08:00
Martin Roukala (né Peres)
dc1fe83aa5 zink/ci: document new-ish vangogh flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32071>
2024-11-10 07:21:41 +02:00
Marek Olšák
1299f5c50a gallium/radeon: import libdrm_radeon source code, drop the dependency
Only radeon_surface.h/c is used from libdrm and radeon_drm.h is imported
too. This code doesn't change anymore. We don't need the dependency.

Acked-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31827>
2024-11-10 00:52:18 +00:00
Russell Greene
ae9d365686 perfetto: fix macos compile
On macos, <sys/types.h> does not declare clockid_t,
but it's instead in <time.h>, which also includes
<sys/types.h> on Linux, so just include <time.h> on
all UNIX platforms.

Fixes: a871eabc
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12064
Tested-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31881>
2024-11-09 09:23:22 +00:00
Deborah Brouwer
276447ef81 ci/b2c: update RESULTS_DIR for .b2c-test jobs
Since $RESULTS_DIR is now centrally defined in setup-test-env.sh it's no
longer necessary to manually add a hard-coded results directory for the
b2b-test job results.

This keeps the results directory consistent between b2c-test jobs and lava.

Fixes: 9b6d14aed1 ("ci: Always create results dir from init")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32051>
2024-11-09 08:40:48 +00:00
Deborah Brouwer
b5b2515f86 ci: Remove duplicate slash before $RESULTS_DIR
The RESULTS_DIR variable is defined by reference to the present
working directory, but if the pwd is the root directory then the
$RESULTS_DIR begins with two slashes instead of one like this: //results.

This is harmless but not necessary, so remove it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32051>
2024-11-09 08:40:48 +00:00
Deborah Brouwer
e368623fff freedreno/ci: add prefix for a630-vk-asan tests
Currently a630-vk-asan has separate files for its expected failures and
skips, but by using the deqp-runner prefix option, the job can use the
common a630 expectation files. This simplifies `a630-vk-asan` without any
substantive changes to the ci job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31970>
2024-11-09 08:15:36 +00:00
Alyssa Rosenzweig
0a81434adf agx: rewrite address mode lowering
AGX load/stores supports a single family of addressing modes:

   64-bit base + sign/zero-extend(32-bit) << (format shift + optional shift)

This is a base-index addressing mode, where the index is minimally in elements
(never bytes, unless we're doing 8-bit load/stores). Both base and the resulting
address must be aligned to the format size; the mandatory shift means that
alignment of base is equivalent to alignment of the final address, which is
taken care of by lower_mem_access_bit_size anyhow.

The other key thing to note is that this is a 64-bit shift, after the sign- or
zero-extension of the 32-bit index. That means that AGX does NOT implement

   64-bit base + sign/zero-extend(32-bit << shift)

This has sweeping implications.

For addressing math from C-based languages (including OpenCL C), the AGX mode is
more helpful, since we tend to get 64-bit shifts instead of 32-bit shifts.
However, for addressing math coming from GLSL, the AGX mode is rather annoying
since we know UBOs/SSBOs are at most 4GB so nir_lower_io & friends are all
32-bit byte indexing. It's tricky to teach them to do otherwise, and would not
be optimal either since 64-bit adds&shifts are *usually* much more expensive
than 32-bit on AGX *except* for when fused into the load/store.

So we don't want 32-bit NIR, since then we can't use the hardware addressing
mode at all. We also don't want 64-bit NIR, since then we have excessive 64-bit
math resulting from deep deref chains from complex struct/array cases. Instead,
we want a middle ground: 32-bit operations that are guaranteed not to overflow
32-bit and can therefore be losslessly promoted to 64-bit.

We can make that no-overflow guarantee as a consequence of the maximum UBO/SSBO
size, and indeed Mesa relies on this already all over the place. So, in this
series, we use relaxed amul opcodes for addressing
math. Then, we rewrite our address mode pattern matching to fuse AGX address
modes.

The actual pattern matching is rewritten. The old code was brittle handwritten
nir_scalar chasing, based on a faulty model of the hardware (with the 32-bit
shift). We delete it all, it's broken. In the new approach, we add some NIR
pseudo-opcodes for address math (ulea_agx/ilea_agx) which we pattern match with
NIR algebraic rules. Then the chasing required to fuse LEA's into load/stores is
trivial because we never go deeper than 1 level. After fusing, we then lower the
leftover lea/amul opcodes and let regular nir_opt_algebraic take it from
here.

We do need to be very careful around pass order to make sure things like
load/store vectorization still happen. Some passes are shuffled in this commit
to make this work. We also need to cleanup amul before fusing since we
specifically do not have nir_opt_algebraic do so - the entire point of the
pseudo-opcodes is to make nir_opt_algebraic ignore the opcodes until we've had a
chance to fuse. If we simply used the .nuw bit on iadd/imul, nir_opt_algebraic
would "optimize" things and lose the bit and then we would fail to fuse
addressing modes, which is a much more expensive failure case than anything
nir_opt_algebraic can do for us. I don't know what the "optimal" pass order for
AGX would look like at this point, but what we have here is good enough for now
and is a net positive for shader-db.

That all ends up being much less code and much simpler code, while fixing the
soundness holes in the old code, and also optimizing a significantly richer set
of addressing calculations. Now we don't juts optimize GL/VK modes, but also CL.
This is crucial even for GL/VK performance, since we rely on CL via libagx even
in graphics shaders.

Terraintessellation is up 10% to ~310fps, which is quite nice.

The following stats are for the end of the series together, including this
change + libagx change + the NIR changes building up to this... but not
including the SSBO vectorizer stats or the IC modelling fix. In other words,
these are the stats for "rewriting address mode handling". This is on OpenGL,
and since the old code was targeted at GL, anything that's not a loss is good
enough - we need this for the soundness fix regardless.

total instructions in shared programs: 2751356 -> 2750518 (-0.03%)
instructions in affected programs: 372143 -> 371305 (-0.23%)
helped: 715
HURT: 75
Instructions are helped.

total alu in shared programs: 2279559 -> 2278721 (-0.04%)
alu in affected programs: 304170 -> 303332 (-0.28%)
helped: 715
HURT: 75
Alu are helped.

total fscib in shared programs: 2277843 -> 2277008 (-0.04%)
fscib in affected programs: 304167 -> 303332 (-0.27%)
helped: 715
HURT: 75
Fscib are helped.

total ic in shared programs: 632686 -> 621886 (-1.71%)
ic in affected programs: 113078 -> 102278 (-9.55%)
helped: 1159
HURT: 82
Ic are helped.

total bytes in shared programs: 21489034 -> 21477530 (-0.05%)
bytes in affected programs: 3018456 -> 3006952 (-0.38%)
helped: 751
HURT: 107
Bytes are helped.

total regs in shared programs: 865148 -> 865114 (<.01%)
regs in affected programs: 1603 -> 1569 (-2.12%)
helped: 10
HURT: 9
Inconclusive result (value mean confidence interval includes 0).

total uniforms in shared programs: 2120735 -> 2120792 (<.01%)
uniforms in affected programs: 22752 -> 22809 (0.25%)
helped: 76
HURT: 49
Inconclusive result (value mean confidence interval includes 0).

total threads in shared programs: 27613312 -> 27613504 (<.01%)
threads in affected programs: 1536 -> 1728 (12.50%)
helped: 3
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
d466ccc6bd libagx: promote math to use AGX address mode
we want to fit into the 64 + ext() << #n pattern to let us fuse address
arithmetic into our loads, so rework some libagx addressing to better match that

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
77ce91e99b hk: reduce max SSBO size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
01d2aa1d53 agx: fix bfeil timing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
db8d467ec6 agx: model IC dispatch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
3c222da6c0 agx: vectorize SSBOs
this was missed due to the lowering, and mitigates a lot of stats weirdness with
the address mode rework.

total instructions in shared programs: 2755170 -> 2751399 (-0.14%)
instructions in affected programs: 16323 -> 12552 (-23.10%)
helped: 71
HURT: 0
helped stats (abs) min: 10 max: 178 x̄: 53.11 x̃: 42
helped stats (rel) min: 2.04% max: 50.00% x̄: 34.73% x̃: 40.79%
95% mean confidence interval for instructions value: -60.94 -45.28
95% mean confidence interval for instructions %-change: -37.81% -31.65%
Instructions are helped.

total alu in shared programs: 2169888 -> 2168281 (-0.07%)
alu in affected programs: 9547 -> 7940 (-16.83%)
helped: 71
HURT: 0
helped stats (abs) min: 5 max: 90 x̄: 22.63 x̃: 16
helped stats (rel) min: 1.02% max: 43.33% x̄: 25.39% x̃: 29.41%
95% mean confidence interval for alu value: -26.33 -18.93
95% mean confidence interval for alu %-change: -27.91% -22.87%
Alu are helped.

total fscib in shared programs: 2165597 -> 2163990 (-0.07%)
fscib in affected programs: 9547 -> 7940 (-16.83%)
helped: 71
HURT: 0
helped stats (abs) min: 5 max: 90 x̄: 22.63 x̃: 16
helped stats (rel) min: 1.02% max: 43.33% x̄: 25.39% x̃: 29.41%
95% mean confidence interval for fscib value: -26.33 -18.93
95% mean confidence interval for fscib %-change: -27.91% -22.87%
Fscib are helped.

total bytes in shared programs: 21517750 -> 21489352 (-0.13%)
bytes in affected programs: 126270 -> 97872 (-22.49%)
helped: 71
HURT: 0
helped stats (abs) min: 80 max: 1084 x̄: 399.97 x̃: 324
helped stats (rel) min: 1.77% max: 50.57% x̄: 35.07% x̃: 42.31%
95% mean confidence interval for bytes value: -455.66 -344.28
95% mean confidence interval for bytes %-change: -38.34% -31.79%
Bytes are helped.

total regs in shared programs: 864490 -> 865162 (0.08%)
regs in affected programs: 4567 -> 5239 (14.71%)
helped: 4
HURT: 61
helped stats (abs) min: 6 max: 6 x̄: 6.00 x̃: 6
helped stats (rel) min: 4.51% max: 5.13% x̄: 4.82% x̃: 4.82%
HURT stats (abs)   min: 2 max: 24 x̄: 11.41 x̃: 12
HURT stats (rel)   min: 1.98% max: 82.35% x̄: 21.05% x̃: 16.00%
95% mean confidence interval for regs value: 8.52 12.16
95% mean confidence interval for regs %-change: 14.91% 24.00%
Regs are HURT.

total threads in shared programs: 27613056 -> 27613312 (<.01%)
threads in affected programs: 3200 -> 3456 (8.00%)
helped: 4
HURT: 0
helped stats (abs) min: 64 max: 64 x̄: 64.00 x̃: 64
helped stats (rel) min: 7.69% max: 8.33% x̄: 8.01% x̃: 8.01%
95% mean confidence interval for threads value: 64.00 64.00
95% mean confidence interval for threads %-change: 7.42% 8.60%
Threads are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
b593a6aa98 rusticl: respect late_lower_int64
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
5c73a8af44 nir/lower_uniforms_to_ubo: use amul
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
fc460e7f20 nir/opt_algebraic: don't lower amul if requested
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
1f3c97547a nir/builder: use amul over ishl on agx
ishl can wrap, amul cannot. so we need amul in the backend, or otherwise we
would need to introduce an ashl opcode instead. that doesn't seem better.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
9ab8d70fa6 nir: add ilea_agx/ulea_agx opcodes
to facilitate address mode lowering.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
23afe968ad nir: add late_lower_int64 option
Some drivers generally need int64 lowered, but prefer to do this lowering
themselves late, to have a chance to optimize targeted int64 patterns before
lowering the rest. This isn't currently possible since nir_lower_int64 takes no
options except what's const* in the shader, and frontends call nir_lower_int64
before passing the shader off to the driver. Add an option to defer int64
lowering. This is a bit ugly but the alternative is replumbing nir_lower_int64's
option handling cross-tree and no-thank-you-not-right-now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
eaf75169ee nir: add amul flag
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
227026b7ad nir/opt_algebraic: add another 64-bit pattern
clpeak

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:42 -04:00
Alyssa Rosenzweig
2a3f133fd0 nir/opt_algebraic: add more 64-bit patterns
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:41 -04:00
Alyssa Rosenzweig
a4a3487aae nir/opt_algebraic: optimize patterns from Skia
shaders/skia/1567.shader_test relies on algebraic + constant folding, subtle
changes in the input compiling flow can cause it to baloon. these patterns fix
that. annoying!

shader-db results aren't amazing, but they avert a major stats regression for
that one Skia shader.

total instructions in shared programs: 2751399 -> 2751295 (<.01%)
instructions in affected programs: 6509 -> 6405 (-1.60%)
helped: 21
HURT: 1
helped stats (abs) min: 1 max: 14 x̄: 5.62 x̃: 6
helped stats (rel) min: 0.53% max: 13.73% x̄: 3.57% x̃: 1.62%
HURT stats (abs)   min: 14 max: 14 x̄: 14.00 x̃: 14
HURT stats (rel)   min: 2.45% max: 2.45% x̄: 2.45% x̃: 2.45%
95% mean confidence interval for instructions value: -7.09 -2.36
95% mean confidence interval for instructions %-change: -5.14% -1.45%
Instructions are helped.

total alu in shared programs: 2274577 -> 2274468 (<.01%)
alu in affected programs: 6178 -> 6069 (-1.76%)
helped: 21
HURT: 1
helped stats (abs) min: 1 max: 14 x̄: 5.86 x̃: 7
helped stats (rel) min: 0.55% max: 16.47% x̄: 3.93% x̃: 1.72%
HURT stats (abs)   min: 14 max: 14 x̄: 14.00 x̃: 14
HURT stats (rel)   min: 2.83% max: 2.83% x̄: 2.83% x̃: 2.83%
95% mean confidence interval for alu value: -7.35 -2.56
95% mean confidence interval for alu %-change: -5.67% -1.57%
Alu are helped.

total fscib in shared programs: 2272894 -> 2272785 (<.01%)
fscib in affected programs: 6178 -> 6069 (-1.76%)
helped: 21
HURT: 1
helped stats (abs) min: 1 max: 14 x̄: 5.86 x̃: 7
helped stats (rel) min: 0.55% max: 16.47% x̄: 3.93% x̃: 1.72%
HURT stats (abs)   min: 14 max: 14 x̄: 14.00 x̃: 14
HURT stats (rel)   min: 2.83% max: 2.83% x̄: 2.83% x̃: 2.83%
95% mean confidence interval for fscib value: -7.35 -2.56
95% mean confidence interval for fscib %-change: -5.67% -1.57%
Fscib are helped.

total bytes in shared programs: 21489352 -> 21488668 (<.01%)
bytes in affected programs: 53362 -> 52678 (-1.28%)
helped: 21
HURT: 2
helped stats (abs) min: 6 max: 98 x̄: 35.52 x̃: 40
helped stats (rel) min: 0.39% max: 10.63% x̄: 2.27% x̃: 1.27%
HURT stats (abs)   min: 2 max: 60 x̄: 31.00 x̃: 31
HURT stats (rel)   min: 0.08% max: 1.40% x̄: 0.74% x̃: 0.74%
95% mean confidence interval for bytes value: -42.73 -16.74
95% mean confidence interval for bytes %-change: -3.13% -0.89%
Bytes are helped.

total regs in shared programs: 865162 -> 865148 (<.01%)
regs in affected programs: 509 -> 495 (-2.75%)
helped: 4
HURT: 5
helped stats (abs) min: 2 max: 14 x̄: 6.00 x̃: 4
helped stats (rel) min: 3.17% max: 35.90% x̄: 14.01% x̃: 8.48%
HURT stats (abs)   min: 2 max: 2 x̄: 2.00 x̃: 2
HURT stats (rel)   min: 3.17% max: 3.17% x̄: 3.17% x̃: 3.17%
95% mean confidence interval for regs value: -5.75 2.64
95% mean confidence interval for regs %-change: -14.31% 5.39%
Inconclusive result (value mean confidence interval includes 0).

total uniforms in shared programs: 2120731 -> 2120735 (<.01%)
uniforms in affected programs: 358 -> 362 (1.12%)
helped: 1
HURT: 2
helped stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
helped stats (rel) min: 2.94% max: 2.94% x̄: 2.94% x̃: 2.94%
HURT stats (abs)   min: 2 max: 4 x̄: 3.00 x̃: 3
HURT stats (rel)   min: 1.05% max: 4.00% x̄: 2.53% x̃: 2.53%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31964>
2024-11-08 21:15:41 -04:00
Chia-I Wu
015f6a7aff panvk: ensure res table is restored after meta
Set res_table to 0 to ensure that the res table is re-emitted.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Fixes: 5067921349 ("panvk: Switch to vk_meta")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32044>
2024-11-09 00:48:47 +00:00
Jianxun Zhang
8906816f49 anv,hasvk,genxml: Rename genxml files using verx10
It could be confusing that a newer platform named with a smaller
number than a half-generation of an older platform like 'gfx20' and
'gfx75' in xml files.

Down the road, it can be a little worse once we pass something like
'gfx40' when there is already a gfx45.xml for the oldest platform.

Unify naming xml files with verx10 numbers to resolve the issue.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31943>
2024-11-09 00:04:47 +00:00
Eric Engestrom
7e0e433482 radv+zink/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32066>
2024-11-08 22:49:21 +00:00
Eric Engestrom
66df09ffda nvk+zink/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32066>
2024-11-08 22:49:21 +00:00
Eric Engestrom
f9593d9eb5 freedreno/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32066>
2024-11-08 22:49:21 +00:00
Eric Engestrom
4ab210f588 broadcom/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32066>
2024-11-08 22:49:21 +00:00
Eric Engestrom
8d2620569c ci: make error handling quieter
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32054>
2024-11-08 20:56:46 +00:00
Eric Engestrom
e5708ab2b4 ci: use quiet alias for commands
And set x_off again when nesting these functions but we're not done and
we have more after.

Fixes: d69bd58365 ("ci: consistently restore `-x` after temporarily disabling it")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32054>
2024-11-08 20:56:46 +00:00
Eric Engestrom
5cd054ebe5 ci: move error handling functions at the end
So that everything is defined by the time we use it in here.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32054>
2024-11-08 20:56:46 +00:00
Iván Briano
aee04bf4fb intel/rt: fix ray_query stack address calculation
While the documentation says to use NUM_SIMD_LANES_PER_DSS for the stack
address calculation, what the HW actually uses is
NUM_SYNC_STACKID_PER_DSS. The former may vary depending on the platform,
while the latter is fixed to 2048 for all current platforms.

Fixes: 6c84cbd8c9 ("intel/dev/xe: Set max_eus_per_subslice using topology query")

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32049>
2024-11-08 18:31:52 +00:00
Ian Romanick
7aad19ccd2 brw/lower: Lower invalid source conversion to better code
There are two fragment shaders from RDR2 that is hurt for spills and
fills on Lunar Lake.

    Totals from 2 (0.00% of 551413) affected shaders:
    Spill count: 1252 -> 1317 (+5.19%)
    Fill count: 2518 -> 2642 (+4.92%)

Those shaders... have a lot of room for improvement. There are some
patterns in those shaders that we handle very, very poorly. Improving
those patterns would likely improve the spills and fills in these
shaders quite dramatically.

Given how much other platforms are helped, I don't this should block
this commit.

No shader-db or fossil-db changes on any pre-Gfx12.5 Intel platforms.

v2: Add some comments and an additional assertion. Suggested by Ken.

shader-db:

Lunar Lake
total instructions in shared programs: 18094517 -> 18094511 (<.01%)
instructions in affected programs: 809 -> 803 (-0.74%)
helped: 6 / HURT: 0

total cycles in shared programs: 921532158 -> 921532168 (<.01%)
cycles in affected programs: 2266 -> 2276 (0.44%)
helped: 0 / HURT: 3

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
total instructions in shared programs: 19820845 -> 19820839 (<.01%)
instructions in affected programs: 803 -> 797 (-0.75%)
helped: 6 / HURT: 0

total cycles in shared programs: 906372999 -> 906372949 (<.01%)
cycles in affected programs: 3216 -> 3166 (-1.55%)
helped: 6 / HURT: 0

fossil-db:

Lunar Lake
Totals:
Instrs: 141887377 -> 141884465 (-0.00%); split: -0.00%, +0.00%
Cycle count: 21990301498 -> 21990267232 (-0.00%); split: -0.00%, +0.00%
Spill count: 69732 -> 69797 (+0.09%)
Fill count: 128521 -> 128645 (+0.10%)

Totals from 349 (0.06% of 551413) affected shaders:
Instrs: 506117 -> 503205 (-0.58%); split: -0.79%, +0.21%
Cycle count: 32362996 -> 32328730 (-0.11%); split: -0.52%, +0.41%
Spill count: 1951 -> 2016 (+3.33%)
Fill count: 4899 -> 5023 (+2.53%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 152773732 -> 152761383 (-0.01%); split: -0.01%, +0.00%
Cycle count: 17187529968 -> 17187450663 (-0.00%); split: -0.00%, +0.00%
Spill count: 79279 -> 79003 (-0.35%)
Fill count: 148803 -> 147942 (-0.58%)
Scratch Memory Size: 3949568 -> 3946496 (-0.08%)
Max live registers: 31879325 -> 31879230 (-0.00%)

Totals from 366 (0.06% of 633185) affected shaders:
Instrs: 557377 -> 545028 (-2.22%); split: -2.22%, +0.01%
Cycle count: 26171205 -> 26091900 (-0.30%); split: -0.54%, +0.24%
Spill count: 3238 -> 2962 (-8.52%)
Fill count: 10018 -> 9157 (-8.59%)
Scratch Memory Size: 257024 -> 253952 (-1.20%)
Max live registers: 28187 -> 28092 (-0.34%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
2a57568ebd brw/build: Add scalar_group() helper
Some uses of the old pattern still exist. The use in brw_fs_nir.cpp is
deleted by commits !29884. The use in brw_lower_logical_sends.cpp seems
different, so I decided to keep it.

The next commit wants to use this.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
5dfea87623 brw/opt: Always do both kinds of copy propagation before lower_load_payload
shader-db:

All Intel platforms except Skylake had similar results. (Lunar Lake shown)
total instructions in shared programs: 18092932 -> 18092713 (<.01%)
instructions in affected programs: 139290 -> 139071 (-0.16%)
helped: 103
HURT: 18
helped stats (abs) min: 1 max: 8 x̄: 2.43 x̃: 2
helped stats (rel) min: 0.02% max: 9.09% x̄: 0.73% x̃: 0.29%
HURT stats (abs)   min: 1 max: 5 x̄: 1.72 x̃: 1
HURT stats (rel)   min: 0.02% max: 0.55% x̄: 0.10% x̃: 0.08%
95% mean confidence interval for instructions value: -2.17 -1.45
95% mean confidence interval for instructions %-change: -0.83% -0.38%
Instructions are helped.

total cycles in shared programs: 922792268 -> 921495900 (-0.14%)
cycles in affected programs: 400296984 -> 399000616 (-0.32%)
helped: 765
HURT: 635
helped stats (abs) min: 2 max: 77018 x̄: 6739.33 x̃: 60
helped stats (rel) min: <.01% max: 35.59% x̄: 1.98% x̃: 0.32%
HURT stats (abs)   min: 2 max: 88658 x̄: 6077.51 x̃: 152
HURT stats (rel)   min: <.01% max: 51.33% x̄: 2.75% x̃: 0.63%
95% mean confidence interval for cycles value: -1620.41 -231.54
95% mean confidence interval for cycles %-change: -0.10% 0.44%
Inconclusive result (%-change mean confidence interval includes 0).

LOST:   4
GAINED: 3

Skylake
total instructions in shared programs: 18658324 -> 18579715 (-0.42%)
instructions in affected programs: 2089957 -> 2011348 (-3.76%)
helped: 9842
HURT: 23
helped stats (abs) min: 1 max: 24 x̄: 7.99 x̃: 8
helped stats (rel) min: 0.05% max: 40.00% x̄: 5.37% x̃: 4.52%
HURT stats (abs)   min: 1 max: 5 x̄: 1.57 x̃: 1
HURT stats (rel)   min: 0.02% max: 1.28% x̄: 0.36% x̃: 0.24%
95% mean confidence interval for instructions value: -7.98 -7.95
95% mean confidence interval for instructions %-change: -5.43% -5.29%
Instructions are helped.

total cycles in shared programs: 860031654 -> 860237548 (0.02%)
cycles in affected programs: 449175235 -> 449381129 (0.05%)
helped: 7895
HURT: 4416
helped stats (abs) min: 1 max: 14129 x̄: 113.70 x̃: 22
helped stats (rel) min: <.01% max: 40.95% x̄: 1.31% x̃: 0.56%
HURT stats (abs)   min: 1 max: 33397 x̄: 249.89 x̃: 34
HURT stats (rel)   min: <.01% max: 67.47% x̄: 2.65% x̃: 0.65%
95% mean confidence interval for cycles value: 1.46 31.98
95% mean confidence interval for cycles %-change: 0.02% 0.19%
Cycles are HURT.

LOST:   557
GAINED: 900

fossil-db:

Lunar Lake
Totals:
Instrs: 141933621 -> 141884681 (-0.03%); split: -0.03%, +0.00%
Cycle count: 21990657282 -> 21990200212 (-0.00%); split: -0.14%, +0.14%
Spill count: 69754 -> 69732 (-0.03%); split: -0.05%, +0.02%
Fill count: 128559 -> 128521 (-0.03%); split: -0.05%, +0.02%
Scratch Memory Size: 5934080 -> 5925888 (-0.14%)
Max live registers: 48021653 -> 48051253 (+0.06%); split: -0.00%, +0.06%

Totals from 13510 (2.45% of 551410) affected shaders:
Instrs: 19497180 -> 19448240 (-0.25%); split: -0.25%, +0.00%
Cycle count: 2455370202 -> 2454913132 (-0.02%); split: -1.25%, +1.23%
Spill count: 10975 -> 10953 (-0.20%); split: -0.32%, +0.12%
Fill count: 21709 -> 21671 (-0.18%); split: -0.28%, +0.10%
Scratch Memory Size: 674816 -> 666624 (-1.21%)
Max live registers: 2502653 -> 2532253 (+1.18%); split: -0.01%, +1.19%

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 152763523 -> 152772716 (+0.01%); split: -0.00%, +0.01%
Cycle count: 17188701887 -> 17187510768 (-0.01%); split: -0.10%, +0.09%
Spill count: 79280 -> 79279 (-0.00%); split: -0.00%, +0.00%
Fill count: 148809 -> 148803 (-0.00%)
Max live registers: 31879240 -> 31879093 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5559984 -> 5559712 (-0.00%); split: +0.00%, -0.01%

Totals from 20524 (3.24% of 633183) affected shaders:
Instrs: 20366964 -> 20376157 (+0.05%); split: -0.01%, +0.05%
Cycle count: 2406162382 -> 2404971263 (-0.05%); split: -0.68%, +0.63%
Spill count: 19935 -> 19934 (-0.01%); split: -0.02%, +0.01%
Fill count: 34487 -> 34481 (-0.02%)
Max live registers: 1745598 -> 1745451 (-0.01%); split: -0.01%, +0.01%
Max dispatch width: 117992 -> 117720 (-0.23%); split: +0.03%, -0.26%

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150694108 -> 150683859 (-0.01%); split: -0.01%, +0.00%
Cycle count: 15526754059 -> 15529031079 (+0.01%); split: -0.10%, +0.12%
Max live registers: 31791599 -> 31791441 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5569488 -> 5569296 (-0.00%); split: +0.00%, -0.01%

Totals from 15000 (2.37% of 632406) affected shaders:
Instrs: 10965577 -> 10955328 (-0.09%); split: -0.11%, +0.02%
Cycle count: 2025347115 -> 2027624135 (+0.11%); split: -0.80%, +0.91%
Max live registers: 983373 -> 983215 (-0.02%); split: -0.02%, +0.00%
Max dispatch width: 83064 -> 82872 (-0.23%); split: +0.12%, -0.35%

Skylake
Totals:
Instrs: 140588784 -> 140413758 (-0.12%); split: -0.13%, +0.00%
Cycle count: 14724286265 -> 14723402393 (-0.01%); split: -0.04%, +0.04%
Fill count: 100130 -> 100129 (-0.00%)
Max live registers: 31418029 -> 31417146 (-0.00%); split: -0.00%, +0.00%
Max dispatch width: 5513400 -> 5535192 (+0.40%); split: +0.89%, -0.49%

Totals from 39733 (6.35% of 625986) affected shaders:
Instrs: 17240737 -> 17065711 (-1.02%); split: -1.02%, +0.01%
Cycle count: 1994668203 -> 1993784331 (-0.04%); split: -0.31%, +0.27%
Fill count: 44481 -> 44480 (-0.00%)
Max live registers: 2766781 -> 2765898 (-0.03%); split: -0.03%, +0.00%
Max dispatch width: 210600 -> 232392 (+10.35%); split: +23.23%, -12.89%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
be26012f1d brw/opt: Always do copy prop, DCE, and register coalesce after lower_regioning
shader-db:

Lunar Lake
total instructions in shared programs: 18100289 -> 18083853 (-0.09%)
instructions in affected programs: 790048 -> 773612 (-2.08%)
helped: 3058 / HURT: 1

total cycles in shared programs: 921691992 -> 921293816 (-0.04%)
cycles in affected programs: 37210762 -> 36812586 (-1.07%)
helped: 2329 / HURT: 624

LOST:   27
GAINED: 26

Meteor Lake, DG2, Tiger Lake, and Ice Lake had similar results. (Meteor Lake shown)
total instructions in shared programs: 19825635 -> 19821391 (-0.02%)
instructions in affected programs: 138675 -> 134431 (-3.06%)
helped: 877 / HURT: 0

total cycles in shared programs: 907900598 -> 907885713 (<.01%)
cycles in affected programs: 7127161 -> 7112276 (-0.21%)
helped: 318 / HURT: 242

total spills in shared programs: 5790 -> 5758 (-0.55%)
spills in affected programs: 660 -> 628 (-4.85%)
helped: 8 / HURT: 0

total fills in shared programs: 6744 -> 6712 (-0.47%)
fills in affected programs: 708 -> 676 (-4.52%)
helped: 8 / HURT: 0

LOST:   10
GAINED: 0

Skylake
total instructions in shared programs: 18722197 -> 18637637 (-0.45%)
instructions in affected programs: 2757553 -> 2672993 (-3.07%)
helped: 12290 / HURT: 1

total cycles in shared programs: 859716039 -> 859432560 (-0.03%)
cycles in affected programs: 113731837 -> 113448358 (-0.25%)
helped: 9555 / HURT: 2422

LOST:   265
GAINED: 714

fossil-db:

Lunar Lake, Meteor Lake, and DG2 had similar results. (Lunar Lake shown)
Totals:
Instrs: 142000618 -> 141928331 (-0.05%); split: -0.05%, +0.00%
Subgroup size: 10995136 -> 10995072 (-0.00%)
Cycle count: 21994723230 -> 21990481140 (-0.02%); split: -0.08%, +0.06%
Spill count: 69911 -> 69754 (-0.22%); split: -0.23%, +0.00%
Fill count: 128723 -> 128559 (-0.13%); split: -0.15%, +0.02%
Scratch Memory Size: 5936128 -> 5934080 (-0.03%)
Max live registers: 48006880 -> 48020936 (+0.03%); split: -0.01%, +0.04%

Totals from 17450 (3.16% of 551410) affected shaders:
Instrs: 14984149 -> 14911862 (-0.48%); split: -0.48%, +0.00%
Subgroup size: 365744 -> 365680 (-0.02%)
Cycle count: 2585095128 -> 2580853038 (-0.16%); split: -0.71%, +0.54%
Spill count: 20893 -> 20736 (-0.75%); split: -0.76%, +0.00%
Fill count: 44181 -> 44017 (-0.37%); split: -0.44%, +0.07%
Scratch Memory Size: 995328 -> 993280 (-0.21%)
Max live registers: 2378069 -> 2392125 (+0.59%); split: -0.20%, +0.79%

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150719758 -> 150676269 (-0.03%); split: -0.04%, +0.01%
Subgroup size: 7764560 -> 7764632 (+0.00%)
Cycle count: 15526689814 -> 15525687740 (-0.01%); split: -0.03%, +0.02%
Spill count: 60120 -> 59472 (-1.08%); split: -1.17%, +0.10%
Fill count: 105973 -> 104675 (-1.22%); split: -1.40%, +0.17%
Scratch Memory Size: 2396160 -> 2381824 (-0.60%); split: -0.73%, +0.13%
Max live registers: 31782879 -> 31788857 (+0.02%); split: -0.01%, +0.03%
Max dispatch width: 5569200 -> 5569344 (+0.00%); split: +0.00%, -0.00%

Totals from 10089 (1.60% of 632405) affected shaders:
Instrs: 6389866 -> 6346377 (-0.68%); split: -0.87%, +0.19%
Subgroup size: 102912 -> 102984 (+0.07%)
Cycle count: 681310278 -> 680308204 (-0.15%); split: -0.65%, +0.51%
Spill count: 19571 -> 18923 (-3.31%); split: -3.61%, +0.30%
Fill count: 38229 -> 36931 (-3.40%); split: -3.88%, +0.48%
Scratch Memory Size: 808960 -> 794624 (-1.77%); split: -2.15%, +0.38%
Max live registers: 677473 -> 683451 (+0.88%); split: -0.45%, +1.33%
Max dispatch width: 88672 -> 88816 (+0.16%); split: +0.27%, -0.11%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
b2d7a823be brw/lower: Don't emit spurious moves to or from NULL register
Previously an instruction like

    cmp.l.f0.0(16) null:F, v359:F, 0f

would get lowered to

    undef(16) v13703:UD
    cmp.l.f0.0(16) v13703:F, v359:F, 0f
    mov(16) null:UD, v13703:UD

After copy propagation and dead-code elimination are run again, the
original CMP gets turned back into its original form!

Some cases can also emit MOVs from the original NULL register.

It should be possible to not do any lowering here, but there are some
interactions with source lowering passes for things like

    cmp.l.f0.0(16) null:HF, g89.1<16,16,1>:HF, 0hf

What inspired this was... diff'ing step-by-step dumps from
INTEL_DEBUG=optimizer had a lot of useless changes due to these MOVs
and undefs. It was very annoying.  This low-effort change gets the
majority of the possible benefit.

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
9aba731d03 brw/cse: Don't eliminate instructions that write flags
With other changes in my tree, I observed this code from
dEQP-VK.subgroups.vote.compute.subgroupallequal_float have the second
cmp.z removed.

    undef(8) %69:UD
    cmp.z.f0.0(8) %69:F, %37:F, %57+0.0<0>:F
    mov(1) v58+0.0:D, 0d NoMask group0
    (+f0.0) mov(1) v58+0.0:D, -1d NoMask group0
    cmp.nz.f0.0(8) null:D, v58+0.0<0>:D, 0d
    ...
    undef(8) %72:UD
    cmp.z.f0.0(8) %72:F, %37:F, %57+0.0<0>:F
    mov(1) v63+0.0:D, 0d NoMask group0
    (+f0.0) mov(1) v63+0.0:D, -1d NoMask group0

This was also fixed by running dead-code elimination before CSE. That
seems more like avoiding the problem than fixing it, though.

I believe this affects shader-db results because leaving the second
CMP in the shader can give more opportunities for cmod propagation.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: 234c45c929 ("intel/brw: Write a new global CSE pass that works on defs")

shader-db:

All Intel platforms had similar results. (Lunar Lake shown)
total cycles in shared programs: 922097690 -> 922260862 (0.02%)
cycles in affected programs: 3178926 -> 3342098 (5.13%)
helped: 130
HURT: 88
helped stats (abs) min: 2 max: 2194 x̄: 296.71 x̃: 16
helped stats (rel) min: <.01% max: 16.56% x̄: 1.86% x̃: 0.18%
HURT stats (abs)   min: 4 max: 11992 x̄: 2292.55 x̃: 47
HURT stats (rel)   min: 0.04% max: 57.32% x̄: 11.82% x̃: 0.61%
95% mean confidence interval for cycles value: 320.36 1176.63
95% mean confidence interval for cycles %-change: 1.59% 5.73%
Cycles are HURT.

LOST:   2
GAINED: 1

fossil-db:

Lunar Lake, Meteor Lake, Tiger Lake had similar results. (Lunar Lake shown)
Totals:
Instrs: 142022960 -> 142022928 (-0.00%); split: -0.00%, +0.00%
Cycle count: 21995242782 -> 21995384040 (+0.00%); split: -0.00%, +0.00%
Max live registers: 48013385 -> 48013343 (-0.00%)

Totals from 507 (0.09% of 551441) affected shaders:
Instrs: 886191 -> 886159 (-0.00%); split: -0.01%, +0.01%
Cycle count: 69302492 -> 69443750 (+0.20%); split: -0.66%, +0.86%
Max live registers: 94413 -> 94371 (-0.04%)

DG2
Totals:
Instrs: 152856370 -> 152856093 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17237159885 -> 17236804052 (-0.00%); split: -0.00%, +0.00%
Fill count: 150673 -> 150631 (-0.03%)
Max live registers: 31871520 -> 31871476 (-0.00%)

Totals from 506 (0.08% of 633197) affected shaders:
Instrs: 831795 -> 831518 (-0.03%); split: -0.04%, +0.01%
Cycle count: 55578509 -> 55222676 (-0.64%); split: -1.38%, +0.74%
Fill count: 2779 -> 2737 (-1.51%)
Max live registers: 51383 -> 51339 (-0.09%)

Ice Lake and Skylake had similar results. (Ice Lake shown)
Totals:
Instrs: 152017826 -> 152017793 (-0.00%); split: -0.00%, +0.00%
Cycle count: 15180773451 -> 15180761166 (-0.00%); split: -0.00%, +0.00%
Fill count: 106610 -> 106614 (+0.00%)
Max live registers: 32195006 -> 32194966 (-0.00%)

Totals from 411 (0.06% of 637268) affected shaders:
Instrs: 705935 -> 705902 (-0.00%); split: -0.01%, +0.01%
Cycle count: 47830019 -> 47817734 (-0.03%); split: -0.05%, +0.02%
Fill count: 2865 -> 2869 (+0.14%)
Max live registers: 42883 -> 42843 (-0.09%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Ian Romanick
80a5d158ae brw/copy: Don't copy propagate through smaller entry dest size
Copy propagation would incorrectly occur in this code

    mov(16) v4+2.0:UW, u0<0>:UW NoMask
    ...
    mov(8) v6+2.0:UD, v4+2.0:UD NoMask group0

to create

    mov(16) v4+2.0:UW, u0<0>:UW NoMask
    ...
    mov(8) v6+2.0:UD, u0<0>:UD NoMask group0

This has different behavior. I think I just made a mistake when I
changed this condition in e3f502e007.

It seems like this condition could be relaxed to cover cases like (note
the change of destination stride)

    mov(16) v4+2.0<2>:UW, u0<0>:UW NoMask
    ...
    mov(8) v6+2.0:UD, v4+2.0:UD NoMask group0

I'm not sure it's worth it.

No shader-db or fossil-db changes on any Intel platform. Even the code
for the test case mentioned in the original commit did not change.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: e3f502e007 ("intel/fs: Allow copy propagation between MOVs of mixed sizes")
Closes: #12116
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32041>
2024-11-08 17:46:45 +00:00
Samuel Pitoiset
ced2404cb4 vulkan/runtime: return same cmdbuf level from the command pool freelist
This fixes a performance issue on RADV because secondaries are
allocated in GTT instead of VRAM for primaries.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12119
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32010>
2024-11-08 17:20:43 +00:00
Ian Romanick
c1c09e3c4a brw/emit: Add correct 3-source instruction assertions for each platform
Specifically, allow two immediate sources for BFE on Gfx12+. I stumbled
on this while trying some stuff with !31852.

v2: Don't be lazy. Add proper assertions for all the things on all the
platforms. Based on a suggestion by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Fixes: 7bed11fbde ("intel/brw: Allow immediates in the BFE instruction on Gfx12+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31858>
2024-11-08 16:48:57 +00:00
Gurchetan Singh
aebc6c974f gfxstream: use vulkan_lite_runtime
This results in faster compiles.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015>
2024-11-08 08:10:09 -08:00
Gurchetan Singh
dd5244e6ac gfxstream: nuke android::base::SubAllocator
Use u_mm, one less dependency on libaemu v0.1.2

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015>
2024-11-08 08:10:05 -08:00
Gurchetan Singh
6a9eb986c2 gfxstream: move isHostVisible function
It's separable from the rest of CoherentMemory class.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015>
2024-11-08 08:10:00 -08:00
Gurchetan Singh
5d299a0bd4 util: add c++ guards to u_mm.h
Needed for gfxstream.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015>
2024-11-08 08:09:49 -08:00
Hans-Kristian Arntzen
5f70858ece vulkan/wsi/wayland: Use X11-style image count strategy when using FIFO.
This is required, otherwise we regress latency in cases where
applications are using FIFO without explicit KHR_present_wait.
This is an unacceptable regression.

The fix is to normalize the behavior to X11 WSI.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: d052b0201e ("vulkan/wsi/wayland: Use fifo protocol for FIFO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32029>
2024-11-08 14:28:08 +00:00
Samuel Pitoiset
437bd63265 radv,aco: dump m0 and exec from the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:15 +00:00
Samuel Pitoiset
d1d41be43f aco: declare phys regs for tba_hi/tma_hi
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:15 +00:00
Samuel Pitoiset
13bab450a2 aco: fix storing SQ_WAVE_STATUS in the trap handler shader
SQ_WAVE_STATUS can change inside the trap because of SCC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Samuel Pitoiset
494050d2ea aco: add a helper to dump SGPR to memory for the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Samuel Pitoiset
8c6f2fef1b aco: use scalar buffer stores for dumping SGPRS from the trap on GFX8
This avoids using any VGPRs on GFX8.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Samuel Pitoiset
17f6b4e51e aco: save/restore SCC in the trap handler shader
SCC is only updated on GFX9+ but let's do it by default because the
trap handler shader is likely going to be more and more complex over
time.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Samuel Pitoiset
7b4386facd aco: cleanup using fixed registers in the trap handler shader
It's easier to read and potentially less error prone.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32026>
2024-11-08 14:00:14 +00:00
Pierre-Eric Pelloux-Prayer
9c3ac69568 ac/perfcounter: fix buffer overflow
If block->b->selectors is larger than 999, "+ 4" is not enough.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
8467f57e30 radeonsi/tests: update expected results
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
cce45dc0bf ac: switch AMD_FORCE_FAMILY handling to using ac_fake_hw_db
ac_fake_hw_db can be the single place where radeon_info content
is emulated when overriding the GPU type.

For some fields we need to avoid overriding them with the value
coming from the ioctls to get the correct behavior.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
c097c37455 ac: add 'polaris12' gpu to ac_fake_hw_db
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
1c31cec31e ac: rename ac_surface_test_common -> ac_fake_hw_db
The next commit will reuse the radeon_info when AMD_FORCE_FAMILY
is used.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
2ff67083e5 radeonsi: refuse to import texture with family_overriden being set
If the gfx version is overriden by the exporter process, the surface
layout might not be compatible with the importer process (which uses
the real gfx version).

So fail early, except if the layout is LINEAR (because it should work
on all gen) or a modifier is used (which should be rejected elsewhere
if not supported).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
9d0aba1f97 ac/surface: add flags to surface metadata
Instead of increasing the version number to describe which fields
are set, use the lower 16 bits for the metadata format version,
and the other bits as flags.
This way the version number defines the layout, and the flags
tell which values are set.

The format version is bumped to 3 (= can have flags), and 2 flags
are defined:
* AC_SURF_METADATA_FLAG_EXTRA_MD_BIT: replaces what was version
  number = 2. This means the metadata contains extra information
  for tools.
* AC_SURF_METADATA_FLAG_FAMILY_OVERRIDEN_BIT: if set, it means the
  surface was allocated from a context that used an overriden gfx
  family. This allows the importer process to fail the import early,
  as the surface is likely to be invalid.
  It also adds an extra dw at the end, to store the fake family.

This is a breaking change for existing code that interpreted
"version > 1" as 2, but only in one case:
AC_SURF_METADATA_FLAG_FAMILY_OVERRIDEN_BIT being set, but not
AC_SURF_METADATA_FLAG_EXTRA_MD_BIT, which produces a version number
of 0x20001 but there's not extra data.
I think this is ok, since both gfx family overriding and extra_md
are debugging tools.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Pierre-Eric Pelloux-Prayer
acc32cadf5 radv: set info->family_overridden when RADV_FORCE_FAMILY is used
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31841>
2024-11-08 13:31:02 +00:00
Karol Herbst
3154920c36 gallium: drop PIPE_SHADER_IR_NIR_SERIALIZED
It's not used anymore

Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783>
2024-11-08 12:49:23 +00:00
Karol Herbst
80c4ffb61a clover: drop support for nir drivers
People had enough time to migrate to rusticl, also nobody would support
this anyway anymore.

Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783>
2024-11-08 12:49:23 +00:00
Karol Herbst
277925471e nvc0: return NULL instead of asserting in nvc0_resource_from_user_memory
Fixes: 212f1ab40e ("nvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY")
Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783>
2024-11-08 12:49:23 +00:00
Corentin Noël
89d709a43e virgl: Propagate the GL_MAX_stage_SHADER_STORAGE_BLOCKS for each stage
Some hardware have a higher number in the computer stage than in others, let's
simply propagate everything when possible.

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

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31666>
2024-11-08 12:26:06 +00:00
Collabora's Gfx CI Team
85d25cc5c8 Uprev Piglit to eebe1b555f51dbb702f696d08ad5ae8153bcdcdd
c2b3133392...eebe1b555f

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32020>
2024-11-08 11:21:05 +00:00
David Rosca
79b12001fd radeonsi/vcn: Stop clearing decode internal buffers
FW will clear them if needed.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
David Rosca
1f00dfd1a7 radeonsi: Support PIPE_VIDEO_CAP_SKIP_CLEAR_SURFACE
Starting with .59 amdgpu now clears VRAM on allocation, so we don't
need to clear video buffers which are always allocated in VRAM.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
David Rosca
b4b74617ae frontends/vdpau: Support skip clear on surface creation
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
David Rosca
5df9097c95 frontends/va: Support skip clear on surface creation
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
David Rosca
76df53f59b gallium: Add PIPE_VIDEO_CAP_SKIP_CLEAR_SURFACE
Used to skip calling clear_render_target when creating surface.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31677>
2024-11-08 09:48:54 +00:00
Karol Herbst
47a1565c3d nv/codegen: Do not use a zero immediate for tex instructions
They aren't always legal for tex instructions, specifically for TXQ when
an actual source is needed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11999
Fixes: 85a31fa1fc ("nv50/ir/nir: fix txq emission on MS textures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32043>
2024-11-08 09:18:54 +00:00
David Rosca
2c3dd2a37d frontends/va: Add minus_1 to AV1 render_width/height
Rename to match the spec and to match the actual value.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31977>
2024-11-08 08:39:49 +00:00
David Rosca
7f2624e6ae radeonsi/vcn: Fix coding AV1 render size
This is only header metadata hint, so it should be passed directly
from packed headers to output. Also fix the value as render_width from
frontend is actually render_width_minus_1 (and same for height).

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31977>
2024-11-08 08:39:49 +00:00
Eric Engestrom
4ad8a5443b ci/build: add workaround for incorrect maybe-uninitialized error
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31890>
2024-11-08 07:09:15 +00:00
Eric Engestrom
f09ae95c10 ci/build: drop "verify after bump to F39" as that did not help
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31890>
2024-11-08 07:09:15 +00:00
Eric Engestrom
45e1ffeceb ci: upgrade the fedora image from 38 to 41
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31890>
2024-11-08 07:09:15 +00:00
Lionel Landwerlin
3ecf2a0518 anv: fix extent computation in image->image host copies
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0317c44872 ("anv: add VK_EXT_host_image_copy support")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32027>
2024-11-07 22:44:41 +00:00
Eric Engestrom
625ad5bc52 freedreno/ci: add more flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32045>
2024-11-07 21:49:29 +01:00
Eric Engestrom
a1b309a177 broadcom/ci: add more flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32045>
2024-11-07 21:49:29 +01:00
Eric Engestrom
e83613d906 radv/ci: add more flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32045>
2024-11-07 21:49:29 +01:00
Eric Engestrom
9229bcaf13 radeonsi/ci: add more flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32045>
2024-11-07 21:49:29 +01:00
Dylan Baker
b130cc0af7 docs/release-calendar: update one more time for pushed back release
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32042>
2024-11-07 19:27:31 +00:00
Eric Engestrom
95c2496412 meson: bump spirv-tools version needed to v2022.1
Since c60a421f0c ("vtn: Add a debug flag to dump SPIR-V
assembly"), we use SPIR-V 1.6, which was added in `spirv-tools 2022.1`.

Fixes: c60a421f0c ("vtn: Add a debug flag to dump SPIR-V assembly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11802
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32034>
2024-11-07 18:23:53 +00:00
Dylan Baker
d301046eaa docs: reset new_features.txt
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32040>
2024-11-07 17:57:57 +00:00
Dylan Baker
ad0c3c4ebf VERSION: bump to 25.0
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32040>
2024-11-07 17:57:57 +00:00
3193 changed files with 209180 additions and 134425 deletions

View File

@@ -65,3 +65,6 @@ c7bf3b69ebc8f2252dbf724a4de638e6bb2ac402
# ir3: Reformat source with clang-format
177138d8cb0b4f6a42ef0a1f8593e14d79f17c54
# ir3: reformat after refactoring in previous commit
8ae5b27ee0331a739d14b42e67586784d6840388

View File

@@ -30,6 +30,10 @@ workflow:
# do not duplicate pipelines on merge pipelines
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
# tag pipelines are disabled as it's too late to run all the tests by
# then, the release has been made based on the staging pipelines results
- if: $CI_COMMIT_TAG
when: never
# merge pipeline
- if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
@@ -47,12 +51,17 @@ workflow:
# nightly pipeline
- if: &is-scheduled-pipeline $CI_PIPELINE_SOURCE == "schedule"
variables:
JOB_PRIORITY: 45
# (some) nightly builds perform LTO, so they take much longer than the
# short timeout allowed in other pipelines.
# Note: 0 = infinity = gitlab's job `timeout:` applies, which is 1h
BUILD_JOB_TIMEOUT_OVERRIDE: 0
# pipeline for direct pushes that bypassed the CI
- if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $GITLAB_USER_LOGIN != "marge-bot"
- if: &is-direct-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
variables:
JOB_PRIORITY: 70
# pipeline for direct pushes from release maintainer
- if: &is-staging-push $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\//
variables:
JOB_PRIORITY: 70
@@ -67,7 +76,12 @@ variables:
rm download-git-cache.sh
set +o xtrace
S3_JWT_FILE: /s3_jwt
S3_JWT_FILE_SCRIPT: |-
echo -n '${S3_JWT}' > '${S3_JWT_FILE}' &&
unset CI_JOB_JWT S3_JWT # Unsetting vulnerable env variables
S3_HOST: s3.freedesktop.org
# This bucket is used to fetch ANDROID prebuilts and images
S3_ANDROID_BUCKET: mesa-rootfs
# This bucket is used to fetch the kernel image
S3_KERNEL_BUCKET: mesa-rootfs
# Bucket for git cache
@@ -91,13 +105,14 @@ variables:
ARTIFACTS_BASE_URL: https://${CI_PROJECT_ROOT_NAMESPACE}.${CI_PAGES_DOMAIN}/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts
# Python scripts for structured logger
PYTHONPATH: "$PYTHONPATH:$CI_PROJECT_DIR/install"
# Drop once deqp-runner is upgraded to > 0.18.0
# No point in continuing once the device is lost
MESA_VK_ABORT_ON_DEVICE_LOSS: 1
# Avoid the wall of "Unsupported SPIR-V capability" warnings in CI job log, hiding away useful output
MESA_SPIRV_LOG_LEVEL: error
# Default priority for non-merge pipelines
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
JOB_PRIORITY: 50
DATA_STORAGE_PATH: data_storage
default:
id_tokens:
@@ -111,9 +126,8 @@ default:
- >
export SCRIPTS_DIR=$(mktemp -d) &&
curl -L -s --retry 4 -f --retry-all-errors --retry-delay 60 -O --output-dir "${SCRIPTS_DIR}" "${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/setup-test-env.sh" &&
. ${SCRIPTS_DIR}/setup-test-env.sh &&
echo -n "${S3_JWT}" > "${S3_JWT_FILE}" &&
unset CI_JOB_JWT S3_JWT # Unsetting vulnerable env variables
. ${SCRIPTS_DIR}/setup-test-env.sh
- eval "$S3_JWT_FILE_SCRIPT"
after_script:
# Work around https://gitlab.com/gitlab-org/gitlab/-/issues/20338
@@ -211,6 +225,7 @@ include:
- bin/git_sha1_gen.py
- bin/install_megadrivers.py
- bin/symbols-check.py
- bin/ci/**/*
# GitLab CI
- .gitlab-ci.yml
- .gitlab-ci/**/*
@@ -241,6 +256,9 @@ include:
# Build everything after someone bypassed the CI
- if: *is-direct-push
when: on_success
# Build everything when pushing to staging branches
- if: *is-staging-push
when: on_success
# Build everything in scheduled pipelines
- if: *is-scheduled-pipeline
when: on_success
@@ -251,7 +269,7 @@ include:
.ci-deqp-artifacts:
artifacts:
name: "mesa_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
when: always
untracked: false
paths:
@@ -260,6 +278,7 @@ include:
- artifacts
- _build/meson-logs/*.txt
- _build/meson-logs/strace
- _build/.ninja_log
# Git archive
@@ -276,11 +295,11 @@ make git archive:
# Compactify the .git directory
- git gc --aggressive
# Download & cache the perfetto subproject as well.
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
- rm -rf subprojects/perfetto ; mkdir -p subprojects/perfetto && curl --fail https://android.googlesource.com/platform/external/perfetto/+archive/$(grep 'revision =' subprojects/perfetto.wrap | cut -d ' ' -f3).tar.gz | tar zxf - -C subprojects/perfetto
# compress the current folder
- tar -cvzf ../$CI_PROJECT_NAME.tar.gz .
- ci-fairy s3cp --token-file "${S3_JWT_FILE}" ../$CI_PROJECT_NAME.tar.gz https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/$CI_PROJECT_NAME.tar.gz
- s3_upload ../$CI_PROJECT_NAME.tar.gz "https://$S3_HOST/git-cache/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/"
# Sanity checks of MR settings and commit logs
sanity:
@@ -350,9 +369,7 @@ mr-label-maker-test:
# Jobs that need to pass before spending hardware resources on further testing
.required-for-hardware-jobs:
needs:
- job: clang-format
optional: true
- job: rustfmt
optional: true
- job: toml-lint
- job: yaml-toml-shell-py-test
optional: true

33
.gitlab-ci/.flake8 Normal file
View File

@@ -0,0 +1,33 @@
[flake8]
exclude = .venv*,
# PEP 8 Style Guide limits line length to 79 characters
max-line-length = 159
ignore =
# continuation line under-indented for hanging indent
E121
# continuation line over-indented for hanging indent
E126,
# continuation line under-indented for visual indent
E128,
# whitespace before ':'
E203,
# missing whitespace around arithmetic operator
E226,
# missing whitespace after ','
E231,
# expected 2 blank lines, found 1
E302,
# too many blank lines
E303,
# imported but unused
F401,
# f-string is missing placeholders
F541,
# local variable assigned to but never used
F841,
# line break before binary operator
W503,
# line break after binary operator
W504,

View File

@@ -2,7 +2,7 @@ version: 1
# Rules to match for a machine to qualify
target:
id: '{{ ci_runner_id }}'
id: '{{ ci_runner_description }}'
timeouts:
@@ -27,6 +27,12 @@ timeouts:
retries: 0
# no retries possible here
watchdogs:
boot:
minutes: {{ timeout_boot_wd_minutes | default(0, true) }}
seconds: {{ timeout_boot_wd_seconds | default(0, true) }}
retries: {{ timeout_boot_wd_retries | default(0, true) }}
console_patterns:
session_end:
regex: >-
@@ -45,6 +51,20 @@ console_patterns:
{{ job_warn_regex }}
{% endif %}
{% if boot_wd_start_regex and boot_wd_stop_regex %}
watchdogs:
boot:
start:
regex: >-
{{ boot_wd_start_regex }}
reset:
regex: >-
{{ boot_wd_reset_regex | default(boot_wd_start_regex, true) }}
stop:
regex: >-
{{ boot_wd_stop_regex }}
{% endif %}
# Environment to deploy
deployment:
# Initial boot
@@ -59,9 +79,9 @@ deployment:
{% for volume in volumes %}
b2c.volume={{ volume }}
{% endfor %}
b2c.service="--privileged --tls-verify=false --pid=host docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/telegraf:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
b2c.run_service="--privileged --tls-verify=false --pid=host docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/telegraf:latest" b2c.hostname=dut-{{ '{{' }} machine.full_name }}
b2c.run="-ti --tls-verify=false docker://{{ '{{' }} fdo_proxy_registry }}/gfx-ci/ci-tron/machine-registration:latest check"
b2c.container="-v {{ '{{' }} job_bucket }}-results:{{ working_dir }} -w {{ working_dir }} {% for mount_volume in mount_volumes %} -v {{ mount_volume }}{% endfor %} --tls-verify=false docker://{{ local_container }} {{ container_cmd | replace('"', '\\\"') }}"
b2c.run="-v {{ '{{' }} job_bucket }}-results:{{ working_dir }} -w {{ working_dir }} {% for mount_volume in mount_volumes %} -v {{ mount_volume }}{% endfor %} --tls-verify=false docker://{{ local_container }} {{ container_cmd | replace('"', '\\\"') }}"
kernel:
{% if kernel_url %}
url: '{{ kernel_url }}'
@@ -78,12 +98,22 @@ deployment:
{{ kernel_cmdline_extras }}
{% endif %}
{% if initramfs_url %}
{% if initramfs_url or firmware_url %}
initramfs:
url: '{{ initramfs_url }}'
{% if firmware_url %}
- url: '{{ firmware_url }}'
{% endif %}
{% if initramfs_url %}
- url: '{{ initramfs_url }}'
{% endif %}
{% endif %}
{% if dtb_url %}
dtb:
url: '{{ dtb_url }}'
{% if dtb_match %}
format:
archive:
match: "{{ dtb_match }}"
{% endif %}
{% endif %}

View File

@@ -37,7 +37,7 @@ env = Environment(loader=FileSystemLoader(path.dirname(values['job_template'])),
template = env.get_template(path.basename(values['job_template']))
values['ci_job_id'] = environ['CI_JOB_ID']
values['ci_runner_id'] = environ['CI_RUNNER_ID']
values['ci_runner_description'] = environ['CI_RUNNER_DESCRIPTION']
values['job_volume_exclusions'] = [excl for excl in values['job_volume_exclusions'].split(",") if excl]
values['working_dir'] = environ['CI_PROJECT_DIR']

View File

@@ -17,9 +17,6 @@ cp "${S3_JWT_FILE}" "${rootfs_dst}${S3_JWT_FILE}"
date +'%F %T'
cp $CI_COMMON/capture-devcoredump.sh $rootfs_dst/
cp $CI_COMMON/intel-gpu-freq.sh $rootfs_dst/
cp $CI_COMMON/kdl.sh $rootfs_dst/
cp "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/"
set +x

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=clang++-15
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=clang++
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=clang-15
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=clang
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=g++
. compiler-wrapper.sh

View File

@@ -1,7 +0,0 @@
#!/bin/sh
# shellcheck disable=SC1091
set -e
_COMPILER=gcc
. compiler-wrapper.sh

View File

@@ -1,21 +0,0 @@
# shellcheck disable=SC1091
# shellcheck disable=SC2086 # we want word splitting
if command -V ccache >/dev/null 2>/dev/null; then
CCACHE=ccache
else
CCACHE=
fi
if echo "$@" | grep -E 'meson-private/tmp[^ /]*/testfile.c' >/dev/null; then
# Invoked for meson feature check
exec $CCACHE $_COMPILER "$@"
fi
if [ "$(eval printf "'%s'" "\"\${$(($#-1))}\"")" = "-c" ]; then
# Not invoked for linking
exec $CCACHE $_COMPILER "$@"
fi
# Compiler invoked by ninja for linking. Add -Werror to turn compiler warnings into errors
# with LTO. (meson's werror should arguably do this, but meanwhile we need to)
exec $CCACHE $_COMPILER "$@" -Werror

View File

@@ -11,15 +11,17 @@
# instead timeout so that the retry mechanism can kick in.
# A few exception are made, see overrides in the rest of this file.
BUILD_JOB_TIMEOUT: 15m
RUN_MESON_TESTS: "true"
timeout: 1h
# We don't want to download any previous job's artifacts
dependencies: []
artifacts:
name: "mesa_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
when: always
paths:
- _build/meson-logs/*.txt
- _build/meson-logs/strace
- _build/.ninja_log
- artifacts
# Just Linux
@@ -58,8 +60,6 @@
- .build-linux
- .use-debian/x86_64_build
stage: build-only
variables:
LLVM_VERSION: 15
script:
- &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} .gitlab-ci/meson/build.sh
@@ -72,6 +72,8 @@
optional: true
- job: debian-testing-asan
optional: true
- job: debian-testing-ubsan
optional: true
- job: debian-build-testing
optional: true
- job: debian-arm32
@@ -86,7 +88,7 @@
# no need to wait on the "first one" to be done.
# - job: windows-msvc
# optional: true
- job: python-test
- job: python-artifacts
optional: true
@@ -99,25 +101,25 @@ debian-testing:
BUILD_JOB_TIMEOUT: 30m
UNWIND: "enabled"
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
-D egl=enabled
-D gbm=enabled
-D glvnd=disabled
-D glx=dri
-D platforms=x11,wayland
GALLIUM_ST: >
-D gallium-nine=true
-D gallium-va=enabled
-D gallium-nine=false
-D gallium-rusticl=true
GALLIUM_DRIVERS: "llvmpipe,softpipe,virgl,radeonsi,zink,crocus,iris,i915,r300,svga"
VULKAN_DRIVERS: "swrast,amd,intel,intel_hasvk,virtio,nouveau"
-D gallium-va=enabled
GALLIUM_DRIVERS: "llvmpipe,softpipe,virgl,radeonsi,zink,iris,svga"
VULKAN_DRIVERS: "swrast,amd,intel,virtio"
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D intel-elk=false
-D spirv-to-dxil=true
-D valgrind=disabled
-D perfetto=true
-D tools=drm-shim
-D valgrind=disabled
S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE}
LLVM_VERSION: 15
RUN_MESON_TESTS: "false" # debian-build-testing already runs these
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
@@ -131,28 +133,36 @@ debian-testing-asan:
stage: build-for-tests
variables:
BUILD_JOB_TIMEOUT: 30m
VULKAN_DRIVERS: "swrast"
GALLIUM_DRIVERS: "llvmpipe,softpipe"
C_ARGS: >
-Wno-error=stringop-truncation
EXTRA_OPTION: >
-D b_sanitize=address
-D valgrind=disabled
-D gallium-va=false
-D gallium-nine=false
-D gallium-rusticl=false
-D mesa-clc=system
-D tools=dlclose-skip
-D intel-clc=system
-D valgrind=disabled
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
# Do a host build for intel-clc (asan complains not being loaded
# as the first library)
RUN_MESON_TESTS: "false" # just too slow
# Do a host build for mesa-clc (asan complains not being loaded as
# the first library)
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-rusticl=false
-D gallium-nine=false
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
-D install-mesa-clc=true
-D mesa-clc=enabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
-D video-codecs=
-D vulkan-drivers=
debian-testing-msan:
# https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo
@@ -166,7 +176,7 @@ debian-testing-msan:
EXTRA_OPTION:
-D b_sanitize=memory
-D b_lundef=false
-D intel-clc=system
-D mesa-clc=system
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
# Don't run all the tests yet:
@@ -175,8 +185,9 @@ debian-testing-msan:
MESON_TEST_ARGS: "--suite glcpp --suite format"
GALLIUM_DRIVERS: "freedreno,iris,nouveau,r300,r600,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
VULKAN_DRIVERS: intel,amd,broadcom,virtio
# Do a host build for intel-clc (msan complains about
# uninitialized values in the LLVM libs)
RUN_MESON_TESTS: "false" # just too slow
# Do a host build for mesa-clc (msan complains about uninitialized
# values in the LLVM libs)
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
@@ -186,14 +197,49 @@ debian-testing-msan:
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
-D mesa-clc=enabled
-D install-mesa-clc=true
debian-testing-ubsan:
extends:
- debian-testing
stage: build-for-tests
timeout: 40m
variables:
BUILD_JOB_TIMEOUT: 30m
C_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-truncation
CPP_ARGS: >
-Wno-error=array-bounds
GALLIUM_DRIVERS: "swrast"
VULKAN_DRIVERS: "swrast"
EXTRA_OPTION: >
-D b_sanitize=undefined
-D mesa-clc=system
-D gallium-rusticl=false
-D gallium-va=false
-D gallium-nine=false
S3_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
-D gallium-opencl=disabled
-D gallium-rusticl=false
-D gallium-drivers=
-D vulkan-drivers=
-D video-codecs=
-D glx=disabled
-D platforms=
-D mesa-clc=enabled
-D install-mesa-clc=true
debian-build-testing:
extends: .meson-build
stage: build-for-tests
variables:
BUILDTYPE: debug
UNWIND: "enabled"
DRI_LOADERS: >
-D glx=dri
@@ -206,15 +252,16 @@ debian-build-testing:
-D gallium-vdpau=enabled
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=false
-D gallium-nine=true
-D gallium-rusticl=false
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
VULKAN_DRIVERS: swrast
GALLIUM_DRIVERS: "i915,iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
VULKAN_DRIVERS: "intel_hasvk,imagination-experimental,microsoft-experimental,nouveau,swrast"
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D spirv-to-dxil=true
-D osmesa=true
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi
LLVM_VERSION: 15
-D perfetto=true
S3_ARTIFACT_NAME: debian-build-testing
script:
- *meson-build
@@ -251,6 +298,8 @@ shader-db:
paths:
- shader-db
timeout: 15m
tags:
- kvm # FIXME: this is a hack, should not be needed
# Test a release build with -Werror so new warnings don't sneak in.
debian-release:
@@ -259,7 +308,6 @@ debian-release:
- !reference [.meson-build, needs]
- !reference [.build-for-tests-jobs]
variables:
LLVM_VERSION: 15
UNWIND: "enabled"
C_ARGS: >
-Wno-error=stringop-overread
@@ -277,13 +325,13 @@ debian-release:
-D gallium-nine=false
-D gallium-rusticl=false
-D llvm=enabled
GALLIUM_DRIVERS: "i915,iris,nouveau,freedreno,r300,svga,llvmpipe,softpipe,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,crocus"
VULKAN_DRIVERS: "amd,imagination-experimental,microsoft-experimental"
GALLIUM_DRIVERS: "i915,iris,nouveau,r300,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
VULKAN_DRIVERS: "swrast,intel_hasvk,imagination-experimental,microsoft-experimental"
EXTRA_OPTION: >
-D spirv-to-dxil=true
-D osmesa=true
-D tools=all
-D intel-clc=enabled
-D mesa-clc=enabled
-D intel-rt=enabled
-D imagination-srv=true
BUILDTYPE: "release"
@@ -339,20 +387,17 @@ fedora-release:
- !reference [.build-for-tests-jobs]
variables:
BUILDTYPE: "release"
# array-bounds are pure non-LTO gcc buggy warning, verify after bump to F39
# array-bounds are pure non-LTO gcc buggy warning
# maybe-uninitialized is misfiring in nir_lower_gs_intrinsics.c, and
# a "maybe" warning should never be an error anyway.
C_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
-Wno-error=array-bounds
-Wno-error=maybe-uninitialized
CPP_ARGS: >
-Wno-error=dangling-reference
-Wno-error=overloaded-virtual
C_LINK_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
CPP_LINK_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
@@ -379,12 +424,12 @@ fedora-release:
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
LLVM_VERSION: ""
UNWIND: "disabled"
VULKAN_DRIVERS: "amd,asahi,broadcom,freedreno,imagination-experimental,intel,intel_hasvk"
debian-android:
extends:
- .android-variables
- .meson-cross
- .use-debian/android_build
- .ci-deqp-artifacts
@@ -411,20 +456,20 @@ debian-android:
-D egl=enabled
-D glvnd=disabled
-D platforms=android
FORCE_FALLBACK_FOR: llvm
EXTRA_OPTION: >
-D android-stub=true
-D llvm=disabled
-D platform-sdk-version=33
-D platform-sdk-version=${ANDROID_SDK_VERSION}
-D cpp_rtti=false
-D valgrind=disabled
-D android-libbacktrace=disabled
-D intel-clc=system
-D mesa-clc=system
GALLIUM_ST: >
-D gallium-vdpau=disabled
-D gallium-va=disabled
-D gallium-xa=disabled
-D gallium-nine=false
-D gallium-rusticl=false
LLVM_VERSION: "15"
PKG_CONFIG_LIBDIR: "/disable/non/android/system/pc/files"
HOST_BUILD_OPTIONS: >
-D build-tests=false
@@ -435,8 +480,8 @@ debian-android:
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
-D mesa-clc=enabled
-D install-mesa-clc=true
ARTIFACTS_DEBUG_SYMBOLS: 1
S3_ARTIFACT_NAME: mesa-x86_64-android-${BUILDTYPE}
script:
@@ -445,13 +490,12 @@ debian-android:
- export VULKAN_DRIVERS=freedreno,broadcom,virtio
- *meson-build
# x86_64 build:
# Can't do Intel because gen_decoder.c currently requires libexpat, which
# is not a dependency that AOSP wants to accept. Can't do Radeon Gallium
# drivers because they requires LLVM, which we don't have an Android build
# of.
# Can't do AMD drivers because they require LLVM, which is currently
# problematic in our Android builds.
- export CROSS=x86_64-linux-android
- export GALLIUM_DRIVERS=iris,virgl
- export VULKAN_DRIVERS=amd,intel
- export GALLIUM_DRIVERS=iris,virgl,zink,softpipe,llvmpipe,swrast
- export VULKAN_DRIVERS=intel,virtio,swrast
- .gitlab-ci/create-llvm-meson-wrap-file.sh
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
@@ -479,7 +523,7 @@ debian-android:
needs:
- debian/arm64_build
variables:
VULKAN_DRIVERS: asahi,freedreno,broadcom
VULKAN_DRIVERS: "asahi,broadcom,freedreno"
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,llvmpipe,softpipe,tegra,v3d,vc4,zink"
BUILDTYPE: "debugoptimized"
tags:
@@ -495,11 +539,12 @@ debian-arm32:
DRI_LOADERS:
-D glvnd=disabled
# remove asahi & llvmpipe from the .meson-arm list because here we have llvm=disabled
VULKAN_DRIVERS: freedreno,broadcom
VULKAN_DRIVERS: "broadcom,freedreno"
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,softpipe,tegra,v3d,vc4,zink"
EXTRA_OPTION: >
-D llvm=disabled
-D valgrind=disabled
-D gallium-rusticl=false
S3_ARTIFACT_NAME: mesa-arm32-default-${BUILDTYPE}
# The strip command segfaults, failing to strip the binary and leaving
# tempfiles in our artifacts.
@@ -513,6 +558,9 @@ debian-arm32-asan:
- debian-arm32
stage: build-for-tests
variables:
BUILD_JOB_TIMEOUT: 30m
GALLIUM_DRIVERS: "etnaviv"
VULKAN_DRIVERS: ""
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
@@ -520,9 +568,10 @@ debian-arm32-asan:
-D b_sanitize=address
-D valgrind=disabled
-D tools=dlclose-skip
-D gallium-rusticl=false
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
S3_ARTIFACT_NAME: mesa-arm32-asan-${BUILDTYPE}
MESON_TEST_ARGS: "--no-suite mesa:compiler --no-suite mesa:util"
debian-arm64:
extends:
@@ -533,17 +582,18 @@ debian-arm64:
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-truncation
VULKAN_DRIVERS: "asahi,freedreno,broadcom,panfrost,imagination-experimental"
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,panfrost,v3d,vc4,zink"
VULKAN_DRIVERS: "broadcom,freedreno,panfrost"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D valgrind=disabled
-D imagination-srv=true
-D perfetto=true
-D freedreno-kmds=msm,virtio
-D teflon=true
GALLIUM_ST:
-D gallium-rusticl=true
RUN_MESON_TESTS: "false" # run by debian-arm64-build-testing
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
script:
- *meson-build
@@ -554,15 +604,43 @@ debian-arm64-asan:
- debian-arm64
stage: build-for-tests
variables:
BUILD_JOB_TIMEOUT: 30m
VULKAN_DRIVERS: "broadcom,freedreno"
GALLIUM_DRIVERS: "freedreno,vc4,v3d"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D b_sanitize=address
-D valgrind=disabled
-D tools=dlclose-skip
-D gallium-rusticl=false
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
S3_ARTIFACT_NAME: mesa-arm64-asan-${BUILDTYPE}
MESON_TEST_ARGS: "--no-suite mesa:compiler"
debian-arm64-ubsan:
extends:
- debian-arm64
stage: build-for-tests
variables:
BUILD_JOB_TIMEOUT: 30m
VULKAN_DRIVERS: "broadcom"
GALLIUM_DRIVERS: "v3d,vc4"
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-overflow
-Wno-error=stringop-truncation
CPP_ARGS: >
-Wno-error=array-bounds
-fno-var-tracking-assignments
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D b_sanitize=undefined
-D gallium-rusticl=false
ARTIFACTS_DEBUG_SYMBOLS: 1
RUN_MESON_TESTS: "false" # just too slow
S3_ARTIFACT_NAME: mesa-arm64-ubsan-${BUILDTYPE}
debian-arm64-build-test:
extends:
@@ -572,11 +650,12 @@ debian-arm64-build-test:
- !reference [.meson-arm, needs]
- !reference [.build-for-tests-jobs]
variables:
VULKAN_DRIVERS: "amd,nouveau"
VULKAN_DRIVERS: "amd,asahi,imagination-experimental,nouveau"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-Dtools=panfrost,imagination
-D tools=panfrost,imagination
-D perfetto=true
debian-arm64-release:
extends:
@@ -624,7 +703,6 @@ debian-clang:
- !reference [.build-for-tests-jobs]
variables:
BUILDTYPE: debug
LLVM_VERSION: 15
UNWIND: "enabled"
C_ARGS: >
-Wno-error=constant-conversion
@@ -637,6 +715,7 @@ debian-clang:
-Wno-error=overloaded-virtual
-Wno-error=tautological-constant-out-of-range-compare
-Wno-error=unused-private-field
-Wno-error=vla-cxx-extension
DRI_LOADERS: >
-D glx=dri
-D gbm=enabled
@@ -654,7 +733,6 @@ debian-clang:
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
-D opencl-spirv=true
-D shared-glapi=enabled
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi"
VULKAN_DRIVERS: intel,amd,freedreno,broadcom,virtio,swrast,panfrost,imagination-experimental,microsoft-experimental,nouveau
@@ -665,7 +743,7 @@ debian-clang:
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,intel-ui,nir,nouveau,lima,panfrost,asahi,imagination
-D vulkan-layers=device-select,overlay
-D build-aco-tests=true
-D intel-clc=enabled
-D mesa-clc=enabled
-D intel-rt=enabled
-D imagination-srv=true
-D teflon=true
@@ -692,7 +770,6 @@ debian-clang-release:
-D llvm=enabled
-D microsoft-clc=disabled
-D shared-llvm=enabled
-D opencl-spirv=true
-D shared-glapi=disabled
windows-msvc:
@@ -716,7 +793,6 @@ debian-vulkan:
variables:
BUILD_JOB_TIMEOUT: 30m
BUILDTYPE: debug
LLVM_VERSION: 15
UNWIND: "disabled"
DRI_LOADERS: >
-D glx=disabled
@@ -755,14 +831,17 @@ debian-x86_32:
variables:
BUILDTYPE: debug
CROSS: i386
VULKAN_DRIVERS: intel,amd,swrast,virtio
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,llvmpipe,softpipe,virgl,zink,crocus,d3d12"
LLVM_VERSION: 15
VULKAN_DRIVERS: intel,amd,swrast,virtio,panfrost
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,radeonsi,llvmpipe,softpipe,virgl,zink,crocus,d3d12,panfrost"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay
-D intel-clc=system
-D mesa-clc=system
C_LINK_ARGS: >
-Wl,--no-warn-rwx-segments
CPP_LINK_ARGS: >
-Wl,--no-warn-rwx-segments
HOST_BUILD_OPTIONS: >
-D build-tests=false
-D enable-glcpp-tests=false
@@ -772,8 +851,8 @@ debian-x86_32:
-D video-codecs=
-D glx=disabled
-D platforms=
-D intel-clc=enabled
-D install-intel-clc=true
-D mesa-clc=enabled
-D install-mesa-clc=true
# While s390 is dead, s390x is very much alive, and one of the last major
# big-endian platforms, so it provides useful coverage.
@@ -791,7 +870,6 @@ debian-s390x:
BUILDTYPE: debug
CROSS: s390x
GALLIUM_DRIVERS: "llvmpipe,virgl,zink"
LLVM_VERSION: 15
VULKAN_DRIVERS: "swrast,virtio"
DRI_LOADERS:
-D glvnd=disabled
@@ -811,17 +889,18 @@ debian-ppc64el:
DRI_LOADERS:
-D glvnd=disabled
# This job tests our Python scripts, and also emits our scripts into
# artifacts, so they can be reused for job submission to hardware devices.
python-test:
# This job emits our scripts into artifacts so they can be reused for
# job submission to hardware devices.
python-artifacts:
stage: build-for-tests
extends:
- .use-debian/x86_64_pyutils
- .build-common
variables:
GIT_STRATEGY: fetch
S3_ARTIFACT_NAME: mesa-python-test
S3_ARTIFACT_NAME: mesa-python-ci-artifacts
timeout: 10m
script:
- .gitlab-ci/run-pytest.sh
- .gitlab-ci/prepare-artifacts-python.sh
tags:
- placeholder-job

View File

@@ -31,24 +31,23 @@ VARS=(
CROSVM_GPU_ARGS
CURRENT_SECTION
DEQP_BIN_DIR
DEQP_CONFIG
DEQP_EXPECTED_RENDERER
DEQP_FORCE_ASAN
DEQP_FRACTION
DEQP_HEIGHT
DEQP_RUNNER_MAX_FAILS
DEQP_RUNNER_OPTIONS
DEQP_SUITE
DEQP_TEMP_DIR
DEQP_VER
DEQP_WIDTH
DEVICE_NAME
DRIVER_NAME
EGL_PLATFORM
ETNA_MESA_DEBUG
FDO_CI_CONCURRENT
FDO_HTTP_CACHE_URI
FDO_UPSTREAM_REPO
FD_MESA_DEBUG
FLAKES_CHANNEL
FLUSTER_CODECS
FLUSTER_FRACTION
FLUSTER_VECTORS_VERSION
FREEDRENO_HANGCHECK_MS
GALLIUM_DRIVER
GALLIVM_PERF
@@ -116,6 +115,8 @@ VARS=(
RADV_PERFTEST
SKQP_ASSETS_DIR
SKQP_BACKENDS
STORAGE_FORK_HOST_PATH
STORAGE_MAINLINE_HOST_PATH
TU_DEBUG
USE_ANGLE
VIRGL_HOST_API

View File

@@ -140,13 +140,14 @@ if [ "$HWCI_FREQ_MAX" = "true" ]; then
# and enable throttling detection & reporting.
# Additionally, set the upper limit for CPU scaling frequency to 65% of the
# maximum permitted, as an additional measure to mitigate thermal throttling.
/intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
/install/common/intel-gpu-freq.sh -s 70% --cpu-set-max 65% -g all -d
fi
# Start a little daemon to capture sysfs records and produce a JSON file
if [ -x /kdl.sh ]; then
KDL_PATH=/install/common/kdl.sh
if [ -x "$KDL_PATH" ]; then
echo "launch kdl.sh!"
/kdl.sh &
$KDL_PATH &
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
else
echo "kdl.sh not found!"
@@ -160,8 +161,9 @@ fi
# Start a little daemon to capture the first devcoredump we encounter. (They
# expire after 5 minutes, so we poll for them).
if [ -x /capture-devcoredump.sh ]; then
/capture-devcoredump.sh &
CAPTURE_DEVCOREDUMP=/install/common/capture-devcoredump.sh
if [ -x "$CAPTURE_DEVCOREDUMP" ]; then
$CAPTURE_DEVCOREDUMP &
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
fi
@@ -228,7 +230,7 @@ cleanup
# upload artifacts
if [ -n "$S3_RESULTS_UPLOAD" ]; then
tar --zstd -cf results.tar.zst results/;
ci-fairy s3cp --token-file "${S3_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst;
s3_upload results.tar.zst https://"$S3_RESULTS_UPLOAD"/
fi
# We still need to echo the hwci: mesa message, as some scripts rely on it, such

View File

@@ -6,6 +6,9 @@
# ALPINE_X86_64_BUILD_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
EPHEMERAL=(

View File

@@ -4,6 +4,9 @@
# shellcheck disable=SC1091
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
EPHEMERAL=(

View File

@@ -7,7 +7,7 @@ set -o xtrace
# network transfer, disk usage, and runtime on test jobs)
# shellcheck disable=SC2154 # arch is assigned in previous scripts
if curl -X HEAD -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
if curl --fail -X HEAD -s "${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}/done"; then
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${FDO_UPSTREAM_REPO}/${ARTIFACTS_SUFFIX}/${arch}"
else
ARTIFACTS_URL="${ARTIFACTS_PREFIX}/${CI_PROJECT_PATH}/${ARTIFACTS_SUFFIX}/${arch}"
@@ -31,7 +31,7 @@ if [[ $arch == "arm64" ]]; then
-O "${KERNEL_IMAGE_BASE}"/arm64/cheza-kernel
DEVICE_TREES=""
DEVICE_TREES="$DEVICE_TREES apq8016-sbc.dtb"
DEVICE_TREES="$DEVICE_TREES apq8016-sbc-usb-host.dtb"
DEVICE_TREES="$DEVICE_TREES apq8096-db820c.dtb"
DEVICE_TREES="$DEVICE_TREES tegra210-p3450-0000.dtb"
DEVICE_TREES="$DEVICE_TREES imx8mq-nitrogen.dtb"

View File

@@ -0,0 +1,119 @@
#!/usr/bin/env bash
set -exu
# If CI vars are not set, assign an empty value, this prevents -u to fail
: "${CI:=}"
: "${CI_PROJECT_PATH:=}"
# Early check for required env variables, relies on `set -u`
: "$ANDROID_NDK_VERSION"
: "$ANDROID_SDK_VERSION"
: "$ANDROID_LLVM_VERSION"
: "$ANDROID_LLVM_ARTIFACT_NAME"
: "$S3_JWT_FILE"
: "$S3_HOST"
: "$S3_ANDROID_BUCKET"
# Check for CI if the auth file used later on is non-empty
if [ -n "$CI" ] && [ ! -s "${S3_JWT_FILE}" ]; then
echo "Error: ${S3_JWT_FILE} is empty." 1>&2
exit 1
fi
if curl -s -o /dev/null -I -L -f --retry 4 --retry-delay 15 "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"; then
echo "Artifact ${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst already exists, skip re-building."
# Download prebuilt LLVM libraries for Android when they have not changed,
# to save some time
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
tar -C / --zstd -xf "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
rm "/${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
exit
fi
# Install some dependencies needed to build LLVM
EPHEMERAL=(
ninja-build
unzip
)
apt-get update
apt-get install -y --no-install-recommends --no-remove "${EPHEMERAL[@]}"
ANDROID_NDK="android-ndk-${ANDROID_NDK_VERSION}"
ANDROID_NDK_ROOT="/${ANDROID_NDK}"
if [ ! -d "$ANDROID_NDK_ROOT" ];
then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "${ANDROID_NDK}.zip" \
"https://dl.google.com/android/repository/${ANDROID_NDK}-linux.zip"
unzip -d / "${ANDROID_NDK}.zip" "$ANDROID_NDK/source.properties" "$ANDROID_NDK/build/cmake/*" "$ANDROID_NDK/toolchains/llvm/*"
rm "${ANDROID_NDK}.zip"
fi
if [ ! -d "/llvm-project" ];
then
mkdir "/llvm-project"
pushd "/llvm-project"
git init
git remote add origin https://github.com/llvm/llvm-project.git
git fetch --depth 1 origin "$ANDROID_LLVM_VERSION"
git checkout FETCH_HEAD
popd
fi
pushd "/llvm-project"
# Checkout again the intended version, just in case of a pre-existing full clone
git checkout "$ANDROID_LLVM_VERSION" || true
LLVM_INSTALL_PREFIX="/${ANDROID_LLVM_ARTIFACT_NAME}"
rm -rf build/
cmake -GNinja -S llvm -B build/ \
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
-DANDROID_ABI=x86_64 \
-DANDROID_PLATFORM="android-${ANDROID_SDK_VERSION}" \
-DANDROID_NDK="${ANDROID_NDK_ROOT}" \
-DCMAKE_ANDROID_ARCH_ABI=x86_64 \
-DCMAKE_ANDROID_NDK="${ANDROID_NDK_ROOT}" \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION="${ANDROID_SDK_VERSION}" \
-DCMAKE_INSTALL_PREFIX="${LLVM_INSTALL_PREFIX}" \
-DCMAKE_CXX_FLAGS="-march=x86-64 --target=x86_64-linux-android${ANDROID_SDK_VERSION} -fno-rtti" \
-DLLVM_HOST_TRIPLE="x86_64-linux-android${ANDROID_SDK_VERSION}" \
-DLLVM_TARGETS_TO_BUILD=X86 \
-DLLVM_BUILD_LLVM_DYLIB=OFF \
-DLLVM_BUILD_TESTS=OFF \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_BUILD_DOCS=OFF \
-DLLVM_BUILD_TOOLS=OFF \
-DLLVM_ENABLE_RTTI=OFF \
-DLLVM_BUILD_INSTRUMENTED_COVERAGE=OFF \
-DLLVM_NATIVE_TOOL_DIR="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin" \
-DLLVM_ENABLE_PIC=False \
-DLLVM_OPTIMIZED_TABLEGEN=ON
ninja "-j${FDO_CI_CONCURRENT:-4}" -C build/ install
popd
rm -rf /llvm-project
tar --zstd -cf "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "$LLVM_INSTALL_PREFIX"
# If run in CI upload the tar.zst archive to S3 to avoid rebuilding it if the
# version does not change, and delete it.
# The file is not deleted for non-CI because it can be useful in local runs.
if [ -n "$CI" ]; then
s3_upload "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst" "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CI_PROJECT_PATH}/"
rm "${ANDROID_LLVM_ARTIFACT_NAME}.tar.zst"
fi
rm -rf "$LLVM_INSTALL_PREFIX"
apt-get purge -y "${EPHEMERAL[@]}"

View File

@@ -6,6 +6,8 @@
set -uex
uncollapsed_section_start angle "Building angle"
ANGLE_REV="76025caa1a059f464a2b0e8f879dbd4746f092b9"
SCRIPTS_DIR="$(pwd)/.gitlab-ci"
ANGLE_PATCH_DIR="${SCRIPTS_DIR}/container/patches"
@@ -28,7 +30,7 @@ angle_patch_files=(
)
for patch in "${angle_patch_files[@]}"; do
echo "Apply patch to ANGLE from ${patch}"
GIT_COMMITTER_DATE=$(date -d@0) git am < "${ANGLE_PATCH_DIR}/${patch}"
GIT_COMMITTER_DATE="$(LC_TIME=C date -d@0)" git am < "${ANGLE_PATCH_DIR}/${patch}"
done
{
@@ -97,3 +99,5 @@ rm -rf out
popd
rm -rf /depot-tools
rm -rf /angle-build
section_end angle

View File

@@ -9,6 +9,8 @@
set -uex
uncollapsed_section_start apitrace "Building apitrace"
APITRACE_VERSION="0a6506433e1f9f7b69757b4e5730326970c4321a"
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
@@ -23,3 +25,5 @@ cp _build/eglretrace build
${STRIP_CMD:-strip} build/*
find . -not -path './build' -not -path './build/*' -delete
popd
section_end apitrace

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
uncollapsed_section_start bindgen "Building bindgen"
BINDGEN_VER=0.65.1
CBINDGEN_VER=0.26.0
@@ -18,3 +20,4 @@ RUSTFLAGS='-L native=/usr/local/lib' cargo install \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local
section_end bindgen

View File

@@ -1,18 +1,27 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BASE_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -uex
uncollapsed_section_start crosvm "Building crosvm"
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
CROSVM_VERSION=1641c55bcc922588e24de73e9cca7b5e4005bd6d
CROSVM_VERSION=2118fbb57ca26b495a9aa407845c7729d697a24b
git clone --single-branch -b main --no-checkout https://chromium.googlesource.com/crosvm/crosvm /platform/crosvm
pushd /platform/crosvm
git checkout "$CROSVM_VERSION"
git submodule update --init
VIRGLRENDERER_VERSION=d9c002fac153b834a2c17731f2b85c36e333e102
VIRGLRENDERER_VERSION=57a2b82e0958f08d02ade8400786e1ca0935c9b1
rm -rf third_party/virglrenderer
git clone --single-branch -b main --no-checkout https://gitlab.freedesktop.org/virgl/virglrenderer.git third_party/virglrenderer
pushd third_party/virglrenderer
@@ -42,3 +51,5 @@ CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L nati
popd
rm -rf /platform/crosvm
section_end crosvm

View File

@@ -9,7 +9,9 @@
set -uex
DEQP_RUNNER_VERSION=0.20.2
uncollapsed_section_start deqp-runner "Building deqp-runner"
DEQP_RUNNER_VERSION=0.20.3
commits_to_backport=(
)
@@ -94,3 +96,5 @@ popd
if [ -z "${DEQP_RUNNER_GIT_TAG:-}${DEQP_RUNNER_GIT_REV:-}" ]; then
rm -f /usr/local/bin/igt-runner
fi
section_end deqp-runner

226
.gitlab-ci/container/build-deqp.sh Normal file → Executable file
View File

@@ -8,15 +8,24 @@
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -uex -o pipefail
set -ue -o pipefail
# shellcheck disable=SC2153
deqp_api=${DEQP_API,,}
uncollapsed_section_start deqp-$deqp_api "Building dEQP $DEQP_API"
set -x
# See `deqp_build_targets` below for which release is used to produce which
# binary. Unless this comment has bitrotten:
# - the commit from the main branch produces the deqp tools and `deqp-vk`,
# - the VK release produces `deqp-vk`,
# - the GL release produces `glcts`, and
# - the GLES release produces `deqp-gles*` and `deqp-egl`
DEQP_VK_VERSION=1.3.10.0
DEQP_MAIN_COMMIT=a9988483c0864d7190e5e6264ccead95423dfd00
DEQP_VK_VERSION=1.4.1.1
DEQP_GL_VERSION=4.6.5.0
DEQP_GLES_VERSION=3.2.11.0
@@ -26,29 +35,36 @@ DEQP_GLES_VERSION=3.2.11.0
# Both list variables would have comments explaining the reasons behind the
# patches.
# shellcheck disable=SC2034
main_cts_commits_to_backport=(
# If you find yourself wanting to add something in here, consider whether
# bumping DEQP_MAIN_COMMIT is not a better solution :)
)
# shellcheck disable=SC2034
main_cts_patch_files=(
)
# shellcheck disable=SC2034
vk_cts_commits_to_backport=(
# Remove multi-line test results in DRM format modifier tests
8c95af68a2a85cbdc7e1d9267ab029f73e9427d2
)
# shellcheck disable=SC2034
vk_cts_patch_files=(
)
if [ "${DEQP_TARGET}" = 'android' ]; then
vk_cts_patch_files+=(
build-deqp-vk_Allow-running-on-Android-from-the-command-line.patch
build-deqp-vk_Android-prints-to-stdout-instead-of-logcat.patch
)
fi
# shellcheck disable=SC2034
gl_cts_commits_to_backport=(
# Add #include <cmath> in deMath.h when being compiled by C++
71808fe7d0a640dfd703e845d93ba1c5ab751055
# Revert "Add #include <cmath> in deMath.h when being compiled by C++ compiler"
# This also adds an alternative fix along with the revert.
6164879a0acce258637d261592a9c395e564b361
)
# shellcheck disable=SC2034
gl_cts_patch_files=(
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
)
if [ "${DEQP_TARGET}" = 'android' ]; then
@@ -61,10 +77,16 @@ fi
# shellcheck disable=SC2034
# GLES builds also EGL
gles_cts_commits_to_backport=(
# Add #include <cmath> in deMath.h when being compiled by C++
71808fe7d0a640dfd703e845d93ba1c5ab751055
# Revert "Add #include <cmath> in deMath.h when being compiled by C++ compiler"
# This also adds an alternative fix along with the revert.
6164879a0acce258637d261592a9c395e564b361
)
# shellcheck disable=SC2034
gles_cts_patch_files=(
build-deqp-gl_Build-Don-t-build-Vulkan-utilities-for-GL-builds.patch
)
if [ "${DEQP_TARGET}" = 'android' ]; then
@@ -83,86 +105,142 @@ git config --global user.name "Mesa CI"
# shellcheck disable=SC2153
case "${DEQP_API}" in
tools) DEQP_VERSION="$DEQP_MAIN_COMMIT";;
*-main) DEQP_VERSION="$DEQP_MAIN_COMMIT";;
VK) DEQP_VERSION="vulkan-cts-$DEQP_VK_VERSION";;
GL) DEQP_VERSION="opengl-cts-$DEQP_GL_VERSION";;
GLES) DEQP_VERSION="opengl-es-cts-$DEQP_GLES_VERSION";;
*) echo "Unexpected DEQP_API value: $DEQP_API"; exit 1;;
esac
git clone \
https://github.com/KhronosGroup/VK-GL-CTS.git \
-b $DEQP_VERSION \
--depth 1 \
/VK-GL-CTS
mkdir -p /VK-GL-CTS
pushd /VK-GL-CTS
[ -e .git ] || {
git init
git remote add origin https://github.com/KhronosGroup/VK-GL-CTS.git
}
git fetch --depth 1 origin "$DEQP_VERSION"
git checkout FETCH_HEAD
DEQP_COMMIT=$(git rev-parse FETCH_HEAD)
mkdir -p /deqp
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
git fetch origin main
if ! git merge-base --is-ancestor "$DEQP_MAIN_COMMIT" origin/main; then
echo "VK-GL-CTS commit $DEQP_MAIN_COMMIT is not a commit from the main branch."
exit 1
fi
fi
# shellcheck disable=SC2153
deqp_api=${DEQP_API,,}
mkdir -p /deqp-$deqp_api
cts_commits_to_backport="${deqp_api}_cts_commits_to_backport[@]"
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
prefix="main"
else
prefix="$deqp_api"
fi
cts_commits_to_backport="${prefix}_cts_commits_to_backport[@]"
for commit in "${!cts_commits_to_backport}"
do
PATCH_URL="https://github.com/KhronosGroup/VK-GL-CTS/commit/$commit.patch"
echo "Apply patch to ${DEQP_API} CTS from $PATCH_URL"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | \
GIT_COMMITTER_DATE=$(date -d@0) git am -
GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am -
done
cts_patch_files="${deqp_api}_cts_patch_files[@]"
cts_patch_files="${prefix}_cts_patch_files[@]"
for patch in "${!cts_patch_files}"
do
echo "Apply patch to ${DEQP_API} CTS from $patch"
GIT_COMMITTER_DATE=$(date -d@0) git am < $OLDPWD/.gitlab-ci/container/patches/$patch
GIT_COMMITTER_DATE=$(LC_TIME=C date -d@0) git am < $OLDPWD/.gitlab-ci/container/patches/$patch
done
{
echo "dEQP base version $DEQP_VERSION"
echo "The following local patches are applied on top:"
git log --reverse --oneline $DEQP_VERSION.. --format='- %s'
} > /deqp/version-$deqp_api
if [ "$DEQP_VERSION" = "$DEQP_MAIN_COMMIT" ]; then
commit_desc=$(git show --no-patch --format='commit %h on %ci' --abbrev=10 "$DEQP_COMMIT")
echo "dEQP $DEQP_API at $commit_desc"
else
echo "dEQP $DEQP_API version $DEQP_VERSION"
fi
if [ "$(git rev-parse HEAD)" != "$DEQP_COMMIT" ]; then
echo "The following local patches are applied on top:"
git log --reverse --oneline "$DEQP_COMMIT".. --format='- %s'
fi
} > /deqp-$deqp_api/deqp-$deqp_api-version
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
# libpng (sigh). The archives get their checksums checked anyway, and git
# always goes through ssh or https.
python3 external/fetch_sources.py --insecure
# Save the testlog stylesheets:
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
if [[ "$DEQP_API" = tools ]]; then
# Save the testlog stylesheets:
cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp-$deqp_api
fi
popd
pushd /deqp
deqp_build_targets=()
case "${DEQP_API}" in
VK|VK-main)
deqp_build_targets+=(deqp-vk)
;;
GL)
deqp_build_targets+=(glcts)
;;
GLES)
deqp_build_targets+=(deqp-gles{2,3,31})
deqp_build_targets+=(glcts) # needed for gles*-khr tests
# deqp-egl also comes from this build, but it is handled separately below.
;;
tools)
deqp_build_targets+=(testlog-to-xml)
deqp_build_targets+=(testlog-to-csv)
deqp_build_targets+=(testlog-to-junit)
;;
esac
OLD_IFS="$IFS"
IFS=";"
CMAKE_SBT="${deqp_build_targets[*]}"
IFS="$OLD_IFS"
pushd /deqp-$deqp_api
if [ "${DEQP_API}" = 'GLES' ]; then
if [ "${DEQP_TARGET}" = 'android' ]; then
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=android \
-DCMAKE_BUILD_TYPE=Release \
-DSELECTED_BUILD_TARGETS="deqp-egl" \
${EXTRA_CMAKE_ARGS:-}
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-android
ninja modules/egl/deqp-egl
mv modules/egl/deqp-egl{,-android}
else
# When including EGL/X11 testing, do that build first and save off its
# deqp-egl binary.
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=x11_egl_glx \
-DCMAKE_BUILD_TYPE=Release \
-DSELECTED_BUILD_TARGETS="deqp-egl" \
${EXTRA_CMAKE_ARGS:-}
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-x11
ninja modules/egl/deqp-egl
mv modules/egl/deqp-egl{,-x11}
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=wayland \
-DCMAKE_BUILD_TYPE=Release \
-DSELECTED_BUILD_TARGETS="deqp-egl" \
${EXTRA_CMAKE_ARGS:-}
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-wayland
ninja modules/egl/deqp-egl
mv modules/egl/deqp-egl{,-wayland}
fi
fi
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=${DEQP_TARGET} \
-DCMAKE_BUILD_TYPE=Release \
-DSELECTED_BUILD_TARGETS="${CMAKE_SBT}" \
${EXTRA_CMAKE_ARGS:-}
# Make sure `default` doesn't silently stop detecting one of the platforms we care about
@@ -172,90 +250,72 @@ if [ "${DEQP_TARGET}" = 'default' ]; then
grep -q DEQP_SUPPORT_XCB=1 build.ninja
fi
deqp_build_targets=()
case "${DEQP_API}" in
VK)
deqp_build_targets+=(deqp-vk)
;;
GL)
deqp_build_targets+=(glcts)
;;
GLES)
deqp_build_targets+=(deqp-gles{2,3,31})
# deqp-egl also comes from this build, but it is handled separately above.
;;
esac
if [ "${DEQP_TARGET}" != 'android' ]; then
deqp_build_targets+=(testlog-to-xml)
deqp_build_targets+=(testlog-to-csv)
deqp_build_targets+=(testlog-to-junit)
fi
ninja "${deqp_build_targets[@]}"
mold --run ninja "${deqp_build_targets[@]}"
if [ "${DEQP_TARGET}" != 'android' ]; then
if [ "$DEQP_API" != tools ]; then
# Copy out the mustpass lists we want.
mkdir -p /deqp/mustpass
mkdir -p mustpass
if [ "${DEQP_API}" = 'VK' ]; then
if [ "${DEQP_API}" = 'VK' ] || [ "${DEQP_API}" = 'VK-main' ]; then
for mustpass in $(< /VK-GL-CTS/external/vulkancts/mustpass/main/vk-default.txt) ; do
cat /VK-GL-CTS/external/vulkancts/mustpass/main/$mustpass \
>> /deqp/mustpass/vk-main.txt
>> mustpass/vk-main.txt
done
fi
if [ "${DEQP_API}" = 'GL' ]; then
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass/main/*-main.txt \
/deqp/mustpass/
mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass_single/main/*-single.txt \
/deqp/mustpass/
mustpass/
fi
if [ "${DEQP_API}" = 'GLES' ]; then
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/aosp_mustpass/main/*.txt \
/deqp/mustpass/
mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/egl/aosp_mustpass/main/egl-main.txt \
/deqp/mustpass/
mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/khronos_mustpass/main/*-main.txt \
/deqp/mustpass/
mustpass/
fi
# Compress the caselists, since Vulkan's in particular are gigantic; higher
# compression levels provide no real measurable benefit.
zstd -1 --rm mustpass/*.txt
fi
if [ "$DEQP_API" = tools ]; then
# Save *some* executor utils, but otherwise strip things down
# to reduct deqp build size:
mkdir /deqp/executor.save
cp /deqp/executor/testlog-to-* /deqp/executor.save
rm -rf /deqp/executor
mv /deqp/executor.save /deqp/executor
mv executor/testlog-to-* .
rm -rf executor
fi
# Compress the caselists, since Vulkan's in particular are gigantic; higher
# compression levels provide no real measurable benefit.
zstd -1 --rm /deqp/mustpass/*.txt
# Remove other mustpass files, since we saved off the ones we wanted to conventient locations above.
rm -rf /deqp/external/**/mustpass/
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-main*
rm -rf /deqp/external/vulkancts/modules/vulkan/vk-default
rm -rf external/**/mustpass/
rm -rf external/vulkancts/modules/vulkan/vk-main*
rm -rf external/vulkancts/modules/vulkan/vk-default
rm -rf /deqp/external/openglcts/modules/cts-runner
rm -rf /deqp/modules/internal
rm -rf /deqp/execserver
rm -rf /deqp/framework
rm -rf external/openglcts/modules/cts-runner
rm -rf modules/internal
rm -rf execserver
rm -rf framework
find . -depth \( -iname '*cmake*' -o -name '*ninja*' -o -name '*.o' -o -name '*.a' \) -exec rm -rf {} \;
if [ "${DEQP_API}" = 'VK' ]; then
if [ "${DEQP_API}" = 'VK' ] || [ "${DEQP_API}" = 'VK-main' ]; then
${STRIP_CMD:-strip} external/vulkancts/modules/vulkan/deqp-vk
fi
if [ "${DEQP_API}" = 'GL' ]; then
if [ "${DEQP_API}" = 'GL' ] || [ "${DEQP_API}" = 'GLES' ]; then
${STRIP_CMD:-strip} external/openglcts/modules/glcts
fi
if [ "${DEQP_API}" = 'GLES' ]; then
${STRIP_CMD:-strip} modules/*/deqp-*
fi
du -sh ./*
rm -rf /VK-GL-CTS
popd
section_end deqp-$deqp_api

View File

@@ -7,9 +7,13 @@
set -uex
uncollapsed_section_start directx-headers "Building directx-headers"
git clone https://github.com/microsoft/DirectX-Headers -b v1.614.1 --depth 1
pushd DirectX-Headers
meson setup build --backend=ninja --buildtype=release -Dbuild-test=false ${EXTRA_MESON_ARGS:-}
meson install -C build
popd
rm -rf DirectX-Headers
section_end directx-headers

View File

@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
# shellcheck disable=SC2034 # Variables are used in scripts called from here
# shellcheck disable=SC2086 # we want word splitting
# Install fluster in /usr/local.
FLUSTER_REVISION="e997402978f62428fffc8e5a4a709690d9ca9bc5"
git clone https://github.com/fluendo/fluster.git --single-branch --no-checkout
pushd fluster || exit
git checkout ${FLUSTER_REVISION}
popd || exit
if [ "${SKIP_UPDATE_FLUSTER_VECTORS}" != 1 ]; then
# Download the necessary vectors: H264, H265 and VP9
# When updating FLUSTER_REVISION, make sure to update the vectors if necessary or
# fluster-runner will report Missing results.
fluster/fluster.py download \
JVT-AVC_V1 JVT-FR-EXT JVT-MVC JVT-SVC_V1 \
JCT-VC-3D-HEVC JCT-VC-HEVC_V1 JCT-VC-MV-HEVC JCT-VC-RExt JCT-VC-SCC JCT-VC-SHVC \
VP9-TEST-VECTORS-HIGH VP9-TEST-VECTORS
# Build fluster vectors archive and upload it
tar --zstd -cf "vectors.tar.zst" fluster/resources/
s3_upload vectors.tar.zst "https://${S3_PATH_FLUSTER}/"
touch /lava-files/done
s3_upload /lava-files/done "https://${S3_PATH_FLUSTER}/"
# Don't include the vectors in the rootfs
rm -fr fluster/resources/*
fi
mkdir -p "${ROOTFS}/usr/local/"
mv fluster "${ROOTFS}/usr/local/"

View File

@@ -7,6 +7,8 @@
set -ex
uncollapsed_section_start fossilize "Building fossilize"
git clone https://github.com/ValveSoftware/Fossilize.git
cd Fossilize
git checkout b43ee42bbd5631ea21fe9a2dee4190d5d875c327
@@ -17,3 +19,5 @@ cmake -S .. -B . -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja -C . install
cd ../..
rm -rf Fossilize
section_end fossilize

View File

@@ -2,6 +2,8 @@
set -ex
uncollapsed_section_start gfxreconstruct "Building gfxreconstruct"
GFXRECONSTRUCT_VERSION=761837794a1e57f918a85af7000b12e531b178ae
git clone https://github.com/LunarG/gfxreconstruct.git \
@@ -17,3 +19,5 @@ cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:
cmake --build _build --parallel --target tools/{replay,info}/install/strip
find . -not -path './build' -not -path './build/*' -delete
popd
section_end gfxreconstruct

View File

@@ -3,6 +3,8 @@
set -ex
uncollapsed_section_start kdl "Building kdl"
KDL_REVISION="cbbe5fd54505fd03ee34f35bfd16794f0c30074f"
KDL_CHECKOUT_DIR="/tmp/ci-kdl.git"
@@ -26,3 +28,5 @@ popd
)
rm -rf ${KDL_CHECKOUT_DIR}
section_end kdl

View File

@@ -2,6 +2,8 @@
set -uex
uncollapsed_section_start libclc "Building libclc"
export LLVM_CONFIG="llvm-config-${LLVM_VERSION:?"llvm unset!"}"
LLVM_TAG="llvmorg-15.0.7"
@@ -29,3 +31,5 @@ ln -s /usr/share/clc/spirv-mesa3d-.spv /usr/lib/clc/
du -sh ./*
rm -rf /libclc /llvm-project
section_end libclc

View File

@@ -5,6 +5,8 @@
set -uex
uncollapsed_section_start libdrm "Building libdrm"
export LIBDRM_VERSION=libdrm-2.4.122
curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
@@ -15,3 +17,5 @@ meson setup build -D vc4=disabled -D freedreno=disabled -D etnaviv=disabled ${EX
meson install -C build
cd ..
rm -rf "$LIBDRM_VERSION"
section_end libdrm

View File

@@ -2,7 +2,13 @@
set -ex
VER="${LLVM_VERSION:?llvm not set}.0.0"
uncollapsed_section_start llvm-spirv "Building LLVM-SPIRV-Translator"
if [ "${LLVM_VERSION:?llvm version not set}" -ge 18 ]; then
VER="${LLVM_VERSION}.1.0"
else
VER="${LLVM_VERSION}.0.0"
fi
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v${VER}.tar.gz"
@@ -20,3 +26,5 @@ popd
du -sh "SPIRV-LLVM-Translator-${VER}"
rm -rf "SPIRV-LLVM-Translator-${VER}"
section_end llvm-spirv

View File

@@ -10,6 +10,8 @@ set -ex
# FEDORA_X86_64_BUILD_TAG
# KERNEL_ROOTFS_TAG
uncollapsed_section_start mold "Building mold"
MOLD_VERSION="2.32.0"
git clone -b v"$MOLD_VERSION" --single-branch --depth 1 https://github.com/rui314/mold.git
@@ -19,5 +21,12 @@ cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D MOLD_LTO=ON
cmake --build . --parallel "${FDO_CI_CONCURRENT:-4}"
cmake --install . --strip
# Always use mold from now on
find /usr/bin \( -name '*-ld' -o -name 'ld' \) \
-exec ln -sf /usr/local/bin/ld.mold {} \; \
-exec ls -l {} +
popd
rm -rf mold
section_end mold

View File

@@ -6,6 +6,8 @@
set -ex -o pipefail
uncollapsed_section_start ninetests "Building Nine tests"
### Careful editing anything below this line
git config --global user.email "mesa@example.com"
@@ -23,3 +25,5 @@ mv NineTests/NineTests /NineTests/
popd
rm -rf /Xnine
section_end ninetests

View File

@@ -2,13 +2,15 @@
# shellcheck disable=SC2086 # we want word splitting
set -uex
uncollapsed_section_start piglit "Building piglit"
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
REV="c2b31333926a6171c3c02d182b756efad7770410"
REV="68658566da1c9cd6a378b5ca36999617e26440e7"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit
@@ -32,3 +34,5 @@ if [ "${PIGLIT_BUILD_TARGETS:-}" = "piglit_replayer" ]; then
-exec rm -rf {} \; 2>/dev/null
fi
popd
section_end piglit

View File

@@ -5,17 +5,16 @@
set -ex
uncollapsed_section_start rust "Building Rust toolchain"
# cargo (and rustup) wants to store stuff in $HOME/.cargo, and binaries in
# $HOME/.cargo/bin. Make bin a link to a public bin directory so the commands
# are just available to all build jobs.
mkdir -p "$HOME"/.cargo
ln -s /usr/local/bin "$HOME"/.cargo/bin
# Rusticl requires at least Rust 1.66.0 and NAK requires 1.73.0
#
# Also, pick a specific snapshot from rustup so the compiler doesn't drift on
# us.
RUST_VERSION=1.76.0-2024-02-08
# Pick a specific snapshot from rustup so the compiler doesn't drift on us.
RUST_VERSION=1.78.0-2024-05-02
# For rust in Mesa, we use rustup to install. This lets us pick an arbitrary
# version of the compiler, rather than whatever the container's Debian comes
@@ -37,3 +36,5 @@ linker = "arm-linux-gnueabihf-gcc"
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
EOF
section_end rust

View File

@@ -6,9 +6,13 @@
set -ex
uncollapsed_section_start shader-db "Building shader-db"
pushd /usr/local
git clone https://gitlab.freedesktop.org/mesa/shader-db.git --depth 1
rm -rf shader-db/.git
cd shader-db
make
popd
section_end shader-db

View File

@@ -10,6 +10,8 @@
set -uex
uncollapsed_section_start skqp "Building skqp"
SKQP_BRANCH=android-cts-12.1_r5
SCRIPT_DIR="$(pwd)/.gitlab-ci/container"
@@ -66,8 +68,8 @@ cat "${SKQP_PATCH_DIR}"/build-skqp_*.patch |
# hack for skqp see the clang
pushd /usr/bin/
ln -s "../lib/llvm-${LLVM_VERSION:-15}/bin/clang" clang
ln -s "../lib/llvm-${LLVM_VERSION:-15}/bin/clang++" clang++
ln -s "../lib/llvm-${LLVM_VERSION}/bin/clang" clang
ln -s "../lib/llvm-${LLVM_VERSION}/bin/clang++" clang++
popd
# Fetch some needed build tools needed to build skia/skqp.
@@ -98,3 +100,5 @@ popd
rm -Rf "${SKIA_DIR}"
set +ex
section_end skqp

View File

@@ -34,6 +34,11 @@ extra_cflags_cc = [
"-Wno-unused-but-set-variable",
"-Wno-sizeof-array-div",
"-Wno-string-concatenation",
"-Wno-unsafe-buffer-usage",
"-Wno-switch-default",
"-Wno-cast-function-type-strict",
"-Wno-format",
"-Wno-enum-constexpr-conversion",
]
cc_wrapper = "ccache"

View File

@@ -6,6 +6,8 @@
set -uex
uncollapsed_section_start va-tools "Building va-tools"
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
@@ -17,9 +19,11 @@ git clone \
pushd /va-utils
# Too old libva in Debian 11. TODO: when this PR gets in, refer to the patch.
curl -L https://github.com/intel/libva-utils/pull/329.patch | git am
curl --fail -L https://github.com/intel/libva-utils/pull/329.patch | git am
meson setup build -D tests=true -Dprefix=/va ${EXTRA_MESON_ARGS:-}
meson install -C build
popd
rm -rf /va-utils
section_end va-tools

View File

@@ -6,7 +6,9 @@
# KERNEL_ROOTFS_TAG
set -ex
VKD3D_PROTON_COMMIT="59d6d4b5ed23766e69fe252408a3401d2fd52ce8"
uncollapsed_section_start vkd3d-proton "Building vkd3d-proton"
VKD3D_PROTON_COMMIT="b121e6d746341e0aaba7663e3d85f3194e8e20e1"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
@@ -45,3 +47,5 @@ popd
rm -rf "$VKD3D_PROTON_BUILD_DIR"
rm -rf "$VKD3D_PROTON_SRC_DIR"
section_end vkd3d-proton

View File

@@ -7,13 +7,19 @@
set -uex
uncollapsed_section_start vulkan-validation "Building Vulkan validation layers"
VALIDATION_TAG="snapshot-2024wk39"
git clone -b "$VALIDATION_TAG" --single-branch --depth 1 https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
pushd Vulkan-ValidationLayers
python3 scripts/update_deps.py --dir external --config release --generator Ninja
# we don't need to build SPIRV-Tools tools
sed -i scripts/known_good.json -e 's/SPIRV_SKIP_EXECUTABLES=OFF/SPIRV_SKIP_EXECUTABLES=ON/'
python3 scripts/update_deps.py --dir external --config release --generator Ninja --optional tests
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=OFF -DBUILD_WERROR=OFF -C external/helper.cmake -S . -B build
ninja -C build
cmake --install build --strip
popd
rm -rf Vulkan-ValidationLayers
section_end vulkan-validation

View File

@@ -3,6 +3,8 @@
set -uex
uncollapsed_section_start wayland "Building Wayland"
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BUILD_TAG
@@ -30,3 +32,5 @@ meson setup -Dtests=false _build ${EXTRA_MESON_ARGS:-}
meson install -C _build
cd ..
rm -rf wayland-protocols
section_end wayland

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# When changing this file, check if the *_BUIL_TAG tags in
# .gitlab-ci/image-tags.yml need updating.
set -eu
# Early check for required env variables, relies on `set -u`
: "$S3_JWT_FILE_SCRIPT"
if [ -z "$1" ]; then
echo "usage: $(basename "$0") <CONTAINER_CI_JOB_NAME>" 1>&2
exit 1
fi
CONTAINER_CI_JOB_NAME="$1"
# Tasks to perform before executing the script of a container job
eval "$S3_JWT_FILE_SCRIPT"
unset S3_JWT_FILE_SCRIPT
trap 'rm -f ${S3_JWT_FILE}' EXIT INT TERM
bash ".gitlab-ci/container/${CONTAINER_CI_JOB_NAME}.sh"

View File

@@ -23,19 +23,6 @@ if test -x /usr/bin/ccache; then
ccache --show-stats
fi
# When not using the mold linker (e.g. unsupported architecture), force
# linkers to gold, since it's so much faster for building. We can't use
# lld because we're on old debian and it's buggy. mingw fails meson builds
# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
if [ -e /usr/bin/ld.gold ]; then
find /usr/bin -name \*-ld -o -name ld | \
grep -v mingw | \
xargs -n 1 -I '{}' ln -sf '{}.gold' '{}'
else
echo "ld.gold is missing, not replacing ld with it."
echo "Builds might be slower, consider installing gold."
fi
# Make a wrapper script for ninja to always include the -j flags
{
echo '#!/bin/sh -x'

View File

@@ -18,7 +18,7 @@ cat > "$cross_file" <<EOF
[binaries]
ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}${sdk_version}-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '--start-no-unused-arguments', '-static-libstdc++', '--end-no-unused-arguments']
c_ld = 'lld'
cpp_ld = 'lld'
strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip'

View File

@@ -2,10 +2,13 @@
# shellcheck disable=SC2086 # we want word splitting
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(

21
.gitlab-ci/container/debian/android_build.sh Normal file → Executable file
View File

@@ -5,7 +5,11 @@
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BUILD_TAG
set -ex
set -e
. .gitlab-ci/setup-test-env.sh
set -x
EPHEMERAL=(
autoconf
@@ -16,10 +20,10 @@ EPHEMERAL=(
apt-get install -y --no-remove "${EPHEMERAL[@]}"
# Fetch the NDK and extract just the toolchain we want.
ndk=$ANDROID_NDK
ndk="android-ndk-${ANDROID_NDK_VERSION}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o $ndk.zip https://dl.google.com/android/repository/$ndk-linux.zip
unzip -d / $ndk.zip "$ndk/toolchains/llvm/*"
unzip -d / $ndk.zip "$ndk/source.properties" "$ndk/build/cmake/*" "$ndk/toolchains/llvm/*"
rm $ndk.zip
# Since it was packed as a zip file, symlinks/hardlinks got turned into
# duplicate files. Turn them into hardlinks to save on container space.
@@ -85,9 +89,20 @@ for arch in \
--libdir=/usr/local/lib/${arch}
make install
make distclean
unset CC
unset CC
unset CXX
unset LD
unset RANLIB
done
cd ..
rm -rf $LIBELF_VERSION
# Build LLVM libraries for Android only if necessary, uploading a copy to S3
# to avoid rebuilding it in a future run if the version does not change.
bash .gitlab-ci/container/build-android-x86_64-llvm.sh
apt-get purge -y "${EPHEMERAL[@]}"

View File

@@ -2,14 +2,18 @@
# shellcheck disable=SC2086 # we want word splitting
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set}"
apt-get -y install ca-certificates
apt-get -y install ca-certificates curl gnupg2
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
apt-get update
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
@@ -78,6 +82,8 @@ DEPS=(
zstd
)
apt-get update
apt-get -y install "${DEPS[@]}" "${EPHEMERAL[@]}"
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2

View File

@@ -6,6 +6,9 @@
# KERNEL_ROOTFS_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
############### Install packages for baremetal testing

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Check to see if we need a separate repo to install LLVM.
case "${FDO_DISTRIBUTION_VERSION%-*},${LLVM_VERSION}" in
bookworm,15)
NEED_LLVM_REPO="false"
;;
*)
NEED_LLVM_REPO="true"
;;
esac
if [ "$NEED_LLVM_REPO" = "true" ]; then
curl --fail -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
export LLVM_APT_REPO="deb [trusted=yes] https://apt.llvm.org/${FDO_DISTRIBUTION_VERSION%-*}/ llvm-toolchain-${FDO_DISTRIBUTION_VERSION%-*}-${LLVM_VERSION} main"
echo "$LLVM_APT_REPO" | tee /etc/apt/sources.list.d/llvm.list
fi

View File

@@ -2,6 +2,8 @@
set -e
. .gitlab-ci/setup-test-env.sh
arch=s390x
# Ephemeral packages (installed for this script and removed again at the end)

View File

@@ -15,13 +15,15 @@ uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
apt-get install -y ca-certificates gnupg2 software-properties-common
apt-get install -y curl ca-certificates gnupg2 software-properties-common
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
@@ -40,6 +42,7 @@ EPHEMERAL=(
libasound2-dev
libcap-dev
"libclang-cpp${LLVM_VERSION}-dev"
"libclang-rt-${LLVM_VERSION}-dev"
libdrm-dev
libegl-dev
libelf-dev
@@ -82,6 +85,7 @@ DEPS=(
liblz4-1
libpng16-16
libpython3.11
libubsan1
libvulkan1
libwayland-client0
libwayland-server0
@@ -126,54 +130,44 @@ pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedeskt
# Needed for manipulation with traces yaml files.
pip3 install --break-system-packages yq
section_end debian_setup
############### Download prebuilt kernel
if [ "$DEBIAN_ARCH" = amd64 ]; then
uncollapsed_section_switch kernel "Downloading kernel"
uncollapsed_section_start kernel "Downloading kernel"
export KERNEL_IMAGE_NAME=bzImage
mkdir -p /lava-files/
. .gitlab-ci/container/download-prebuilt-kernel.sh
section_end kernel
fi
############### Build mold
uncollapsed_section_switch mold "Building mold linker"
. .gitlab-ci/container/build-mold.sh
############### Build LLVM-SPIRV translator
uncollapsed_section_switch llvmspv "Building LLVM-SPIRV-Translator"
. .gitlab-ci/container/build-llvm-spirv.sh
############### Build libclc
uncollapsed_section_switch libclc "Building libclc"
. .gitlab-ci/container/build-libclc.sh
############### Build Wayland
uncollapsed_section_switch wayland "Building Wayland"
. .gitlab-ci/container/build-wayland.sh
############### Install Rust toolchain
uncollapsed_section_switch rust "Installing Rust toolchain"
. .gitlab-ci/container/build-rust.sh
############### Build Crosvm
uncollapsed_section_switch crosvm "Building crosvm"
. .gitlab-ci/container/build-crosvm.sh
############### Build dEQP runner
uncollapsed_section_switch deqpr "Building deqp-runner"
. .gitlab-ci/container/build-deqp-runner.sh
############### Uninstall the build software
@@ -185,3 +179,5 @@ apt-get purge -y "${EPHEMERAL[@]}"
rm -rf /root/.rustup
. .gitlab-ci/container/container_post_build.sh
section_end debian_cleanup

View File

@@ -10,7 +10,7 @@ set -o xtrace
uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
apt-get install -y libelogind0 # this interfere with systemd deps, install separately
@@ -82,9 +82,9 @@ apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
. .gitlab-ci/container/container_pre_build.sh
############### Build piglit
section_end debian_setup
uncollapsed_section_switch piglit "Building Piglit"
############### Build piglit
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
-DPIGLIT_USE_GBM=ON
@@ -104,32 +104,30 @@ PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
############### Build dEQP GL
uncollapsed_section_switch piglit_gl "Building dEQP for GL"
DEQP_API=tools \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GL \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
uncollapsed_section_switch piglit_gles "Building dEQP for GLES"
DEQP_API=GLES \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
rm -rf /VK-GL-CTS
############### Build apitrace
. .gitlab-ci/container/build-apitrace.sh
############### Build validation layer for zink
uncollapsed_section_switch vvl "Building Vulkan validation layers"
. .gitlab-ci/container/build-vulkan-validation.sh
############### Build nine tests
uncollapsed_section_switch nine "Building Nine tests"
. .gitlab-ci/container/build-ninetests.sh
############### Uninstall the build software
@@ -139,3 +137,5 @@ uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh
section_end debian_cleanup

View File

@@ -80,9 +80,9 @@ apt-get install -y --no-remove --no-install-recommends \
. .gitlab-ci/container/container_pre_build.sh
############### Build piglit replayer
section_end debian_setup
uncollapsed_section_switch piglit "Building Piglit for Vulkan (traces only)"
############### Build piglit replayer
# We don't run any _piglit_ Vulkan tests in the containers.
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
@@ -104,34 +104,34 @@ PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
############### Build dEQP VK
uncollapsed_section_switch deqp "Building Vulkan CTS (dEQP)"
DEQP_API=tools \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=VK-main \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=VK \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
############### Build apitrace
rm -rf /VK-GL-CTS
uncollapsed_section_switch apitrace "Building apitrace"
############### Build apitrace
. .gitlab-ci/container/build-apitrace.sh
############### Build Fossilize
uncollapsed_section_switch fossilize "Building Fossilize"
. .gitlab-ci/container/build-fossilize.sh
############### Build gfxreconstruct
uncollapsed_section_switch gfxreconstruct "Building gfxreconstruct"
. .gitlab-ci/container/build-gfxreconstruct.sh
############### Build VKD3D-Proton
uncollapsed_section_switch proton "Installing Proton (Wine/D3DVK emulation)"
. .gitlab-ci/container/setup-wine.sh "/vkd3d-proton-wine64"
. .gitlab-ci/container/build-vkd3d-proton.sh
@@ -143,3 +143,5 @@ uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh
section_end debian_cleanup

View File

@@ -6,15 +6,20 @@
# DEBIAN_BUILD_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
apt-get install -y ca-certificates
apt-get install -y ca-certificates curl gnupg2
sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list.d/*
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
# Ephemeral packages (installed for this script and removed again at
# the end)
EPHEMERAL=(

View File

@@ -6,10 +6,13 @@
# DEBIAN_BUILD_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
# Ephemeral packages (installed for this script and removed again at the end)
EPHEMERAL=(
@@ -28,6 +31,7 @@ DEPS=(
libarchive-dev
libdrm-dev
"libclang-cpp${LLVM_VERSION}-dev"
"libclang-rt-${LLVM_VERSION}-dev"
libgbm-dev
libglvnd-dev
liblua5.3-dev

View File

@@ -6,6 +6,9 @@
# DEBIAN_PYUTILS_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive

59
.gitlab-ci/container/debian/x86_64_test-android.sh Normal file → Executable file
View File

@@ -1,8 +1,15 @@
#!/usr/bin/env bash
# The relative paths in this file only become valid at runtime.
# shellcheck disable=SC1091
#
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
@@ -16,6 +23,7 @@ EPHEMERAL=(
debhelper-compat
dpkg-dev
ninja-build
sudo
unzip
)
@@ -32,7 +40,7 @@ apt-get install -y --no-remove --no-install-recommends \
############### Downloading NDK for native builds for the guest ...
# Fetch the NDK and extract just the toolchain we want.
ndk=$ANDROID_NDK
ndk="android-ndk-${ANDROID_NDK_VERSION}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "$ndk.zip" "https://dl.google.com/android/repository/$ndk-linux.zip"
unzip -d / "$ndk.zip"
@@ -50,37 +58,63 @@ rm -rf /root/.rustup
############### Build dEQP GL
DEQP_API=tools \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GL \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GLES \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28" \
EXTRA_CMAKE_ARGS="-DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=VK \
DEQP_TARGET="android" \
EXTRA_CMAKE_ARGS="-DDEQP_ANDROID_EXE=ON -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DANDROID_NDK_PATH=/$ndk -DANDROID_ABI=x86_64 -DDE_ANDROID_API=$ANDROID_SDK_VERSION" \
. .gitlab-ci/container/build-deqp.sh
rm -rf /VK-GL-CTS
############### Downloading Cuttlefish resources ...
CUTTLEFISH_VERSION=9082637 # Chosen from https://ci.android.com/builds/branches/aosp-master/grid?
CUTTLEFISH_PROJECT_PATH=ao2/aosp-manifest
CUTTLEFISH_BUILD_VERSION_TAGS=mesa-venus
CUTTLEFISH_BUILD_NUMBER=20250115.001
mkdir /cuttlefish
pushd /cuttlefish
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip https://ci.android.com/builds/submitted/$CUTTLEFISH_VERSION/aosp_cf_x86_64_phone-userdebug/latest/raw/aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip
unzip aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip
rm aosp_cf_x86_64_phone-img-$CUTTLEFISH_VERSION.zip
-o aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip"
unzip aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
rm aosp_cf_x86_64_phone-img-$CUTTLEFISH_BUILD_NUMBER.zip
ls -lhS ./*
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
https://ci.android.com/builds/submitted/$CUTTLEFISH_VERSION/aosp_cf_x86_64_phone-userdebug/latest/raw/cvd-host_package.tar.gz | tar -xzvf-
-o cvd-host_package.tar.gz "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${CUTTLEFISH_PROJECT_PATH}/aosp-${CUTTLEFISH_BUILD_VERSION_TAGS}.${CUTTLEFISH_BUILD_NUMBER}/cvd-host_package.tar.gz"
tar -xzvf cvd-host_package.tar.gz
rm cvd-host_package.tar.gz
AOSP_KERNEL_PROJECT_PATH=ao2/aosp-kernel-manifest
AOSP_KERNEL_BUILD_VERSION_TAGS=common-android14-6.1-venus
AOSP_KERNEL_BUILD_NUMBER=20241107.001
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o bzImage "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/bzImage"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o initramfs.img "https://${S3_HOST}/${S3_ANDROID_BUCKET}/${AOSP_KERNEL_PROJECT_PATH}/aosp-kernel-common-${AOSP_KERNEL_BUILD_VERSION_TAGS}.${AOSP_KERNEL_BUILD_NUMBER}/initramfs.img"
popd
############### Building and installing Debian package ...
ANDROID_CUTTLEFISH_VERSION=f6494d9fbeaa9974b56923e3029909e5d5f440dd
ANDROID_CUTTLEFISH_VERSION=v1.0.1
mkdir android-cuttlefish
pushd android-cuttlefish
@@ -89,11 +123,9 @@ git remote add origin https://github.com/google/android-cuttlefish.git
git fetch --depth 1 origin "$ANDROID_CUTTLEFISH_VERSION"
git checkout FETCH_HEAD
pushd base
dpkg-buildpackage -uc -us
popd
./tools/buildutils/build_packages.sh
apt-get install -y ./cuttlefish-base_*.deb
apt-get install -y --allow-downgrades ./cuttlefish-base_*.deb ./cuttlefish-user_*.deb
popd
rm -rf android-cuttlefish
@@ -105,6 +137,7 @@ usermod -a -G kvm,cvdnetwork root
rm -rf "/${ndk:?}"
export SUDO_FORCE_REMOVE=yes
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh

View File

@@ -6,6 +6,9 @@
# FEDORA_X86_64_BUILD_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
@@ -74,13 +77,15 @@ DEPS=(
python-unversioned-command
python3-devel
python3-mako
python3-packaging
python3-ply
python3-pycparser
python3-yaml
rust-packaging
vulkan-headers
spirv-tools-devel
spirv-llvm-translator-devel
vulkan-headers
which
)
dnf install -y --setopt=install_weak_deps=False "${DEPS[@]}" "${EPHEMERAL[@]}"

View File

@@ -57,7 +57,7 @@
- .incorporate-templates-commit
variables:
FDO_REPO_SUFFIX: $CI_JOB_NAME
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/${CI_JOB_NAME}.sh'
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/container/container_job_trampoline.sh "${CI_JOB_NAME}"'
# no need to pull the whole repo to build the container image
GIT_STRATEGY: none
@@ -72,6 +72,7 @@ debian/x86_64_build-base:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_build-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: &debian-x86_64-llvm 19
.use-debian/x86_64_build-base:
extends:
@@ -82,6 +83,7 @@ debian/x86_64_build-base:
MESA_BASE_IMAGE: ${DEBIAN_X86_64_BUILD_BASE_IMAGE}
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_ARTIFACTS_BASE_TAG: *debian-x86_64_build-base
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_build-base
@@ -91,6 +93,7 @@ debian/x86_64_build:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_build ${DEBIAN_BUILD_TAG}
LLVM_VERSION: *debian-x86_64-llvm
.use-debian/x86_64_build:
extends:
@@ -99,6 +102,7 @@ debian/x86_64_build:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: ${DEBIAN_X86_64_BUILD_IMAGE_PATH}
MESA_IMAGE_TAG: *debian-x86_64_build
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_build
@@ -116,6 +120,7 @@ debian/x86_32_build:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/x86_32_build"
MESA_IMAGE_TAG: *debian-x86_32_build
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_32_build
@@ -125,6 +130,7 @@ debian/ppc64el_build:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-ppc64el_build ${DEBIAN_BUILD_TAG}
LLVM_VERSION: &debian-ppc64el-llvm 15 # no LLVM packages for PPC
.use-debian/ppc64el_build:
extends:
@@ -133,6 +139,7 @@ debian/ppc64el_build:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/ppc64el_build"
MESA_IMAGE_TAG: *debian-ppc64el_build
LLVM_VERSION: *debian-ppc64el-llvm
needs:
- debian/ppc64el_build
@@ -142,6 +149,7 @@ debian/s390x_build:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-s390x_build ${DEBIAN_BUILD_TAG}
LLVM_VERSION: &debian-s390x-llvm 19
.use-debian/s390x_build:
extends:
@@ -150,20 +158,32 @@ debian/s390x_build:
MESA_BASE_TAG: *debian-x86_64_build-base
MESA_IMAGE_PATH: "debian/s390x_build"
MESA_IMAGE_TAG: *debian-s390x_build
LLVM_VERSION: *debian-s390x-llvm
needs:
- debian/s390x_build
# Android NDK cross-build image
.android-variables:
variables:
ANDROID_NDK_VERSION: "r27c"
ANDROID_SDK_VERSION: 34
ANDROID_LLVM_VERSION: llvmorg-18.1.8
ANDROID_LLVM_ARTIFACT_NAME: android-x86_64-llvm-20250103
# This can be confusing: LLVM_VERSION refers to the host LLVM toolchain
# used (LLVM 19 in our Debian system), but ANDROID_LLVM_VERSION refers to
# the cross-compiling LLVM toolchain used to build for the Android system.
LLVM_VERSION: &debian-android-llvm 19
debian/android_build:
extends:
- .android-variables
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-android_build ${DEBIAN_BUILD_TAG}
ANDROID_SDK_VERSION: 33
ANDROID_NDK: android-ndk-r25b
.use-debian/android_build:
extends:
- .android-variables
- .set-image-base-tag
variables:
MESA_BASE_TAG: *debian-x86_64_build-base
@@ -172,12 +192,98 @@ debian/android_build:
needs:
- debian/android_build
# Debian based ARM build image
debian/arm64_build:
extends:
- .fdo.container-build@debian
- .container
- .debian-container-version
tags:
- aarch64
variables:
MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: &debian-arm64-llvm 19
.use-debian/arm64_build:
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "debian/arm64_build"
MESA_IMAGE_TAG: *debian-arm64_build
MESA_ARTIFACTS_TAG: *debian-arm64_build
LLVM_VERSION: *debian-arm64-llvm
needs:
- debian/arm64_build
# Alpine based x86_64 build image
.alpine/x86_64_build-base:
extends:
- .fdo.container-build@alpine
- .container
variables:
FDO_DISTRIBUTION_VERSION: "edge" # switch to 3.20 when gets released
FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
# Alpine based x86_64 build image
alpine/x86_64_build:
extends:
- .alpine/x86_64_build-base
variables:
MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG}
LLVM_VERSION: &alpine-llvm_version 19
rules:
# Note: the next three lines must remain in that order, so that the rules
# in `linkcheck-docs` catch nightly pipelines before the rules in `pages`
# exclude them.
- !reference [linkcheck-docs, rules]
- !reference [pages, rules]
- !reference [test-docs, rules]
- !reference [.container, rules]
.use-alpine/x86_64_build:
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "alpine/x86_64_build"
MESA_IMAGE_TAG: *alpine-x86_64_build
LLVM_VERSION: *alpine-llvm_version
needs:
- alpine/x86_64_build
# Alpine based x86_64 image for LAVA SSH dockerized client
alpine/x86_64_lava_ssh_client:
extends:
- .alpine/x86_64_build-base
variables:
MESA_IMAGE_TAG: &alpine-x86_64_lava_ssh_client ${ALPINE_X86_64_LAVA_SSH_TAG}
# Fedora based x86_64 build image
fedora/x86_64_build:
extends:
- .fdo.container-build@fedora
- .container
variables:
FDO_DISTRIBUTION_VERSION: 41
MESA_IMAGE_TAG: &fedora-x86_64_build ${FEDORA_X86_64_BUILD_TAG}
LLVM_VERSION: &fedora-x86_64-llvm 19
.use-fedora/x86_64_build:
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "fedora/x86_64_build"
MESA_IMAGE_TAG: *fedora-x86_64_build
LLVM_VERSION: *fedora-x86_64-llvm
needs:
- fedora/x86_64_build
# Debian based x86_64 test image base
debian/x86_64_test-base:
extends:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}--${KERNEL_TAG}"
LLVM_VERSION: *debian-x86_64-llvm
.use-debian/x86_64_test-base:
extends:
@@ -187,6 +293,7 @@ debian/x86_64_test-base:
variables:
MESA_BASE_IMAGE: ${DEBIAN_X86_64_TEST_BASE_IMAGE}
MESA_BASE_TAG: *debian-x86_64_test-base
LLVM_VERSION: *debian-x86_64-llvm
needs:
- debian/x86_64_test-base
@@ -198,6 +305,7 @@ debian/arm64_test-base:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-arm64_test-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
LLVM_VERSION: *debian-arm64-llvm
.use-debian/arm64_test-base:
tags:
@@ -209,6 +317,7 @@ debian/arm64_test-base:
variables:
MESA_BASE_IMAGE: ${DEBIAN_ARM64_TEST_BASE_IMAGE}
MESA_BASE_TAG: *debian-arm64_test-base
LLVM_VERSION: *debian-arm64-llvm
needs:
- debian/arm64_test-base
@@ -246,10 +355,11 @@ debian/x86_64_test-vk:
# Debian based x86_64 test image for Android
.debian/x86_64_test-android:
extends: .use-debian/x86_64_test-base
extends:
- .android-variables
- .use-debian/x86_64_test-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_test-android ${DEBIAN_TEST_ANDROID_TAG}
ANDROID_NDK: android-ndk-r25b
.use-debian/x86_64_test-android:
extends:
@@ -267,10 +377,6 @@ debian/x86_64_pyutils:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_pyutils "${DEBIAN_PYUTILS_TAG}"
rules:
# python-test requires this job
- !reference [python-test, rules]
- !reference [.container, rules]
.use-debian/x86_64_pyutils:
extends:
@@ -323,88 +429,6 @@ debian/arm64_test-vk:
needs:
- debian/arm64_test-vk
# Debian based ARM build image
debian/arm64_build:
extends:
- .fdo.container-build@debian
- .container
- .debian-container-version
tags:
- aarch64
variables:
MESA_IMAGE_TAG: &debian-arm64_build "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
.use-debian/arm64_build:
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "debian/arm64_build"
MESA_IMAGE_TAG: *debian-arm64_build
MESA_ARTIFACTS_TAG: *debian-arm64_build
needs:
- debian/arm64_build
# Alpine based x86_64 build image
.alpine/x86_64_build-base:
extends:
- .fdo.container-build@alpine
- .container
variables:
FDO_DISTRIBUTION_VERSION: "edge" # switch to 3.20 when gets released
FDO_BASE_IMAGE: alpine:$FDO_DISTRIBUTION_VERSION # since cbuild ignores it
# Alpine based x86_64 build image
alpine/x86_64_build:
extends:
- .alpine/x86_64_build-base
variables:
MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG}
LLVM_VERSION: &alpine-llvm_version 19
rules:
# Note: the next three lines must remain in that order, so that the rules
# in `linkcheck-docs` catch nightly pipelines before the rules in `pages`
# exclude them.
- !reference [linkcheck-docs, rules]
- !reference [pages, rules]
- !reference [test-docs, rules]
- !reference [.container, rules]
.use-alpine/x86_64_build:
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "alpine/x86_64_build"
MESA_IMAGE_TAG: *alpine-x86_64_build
LLVM_VERSION: *alpine-llvm_version
needs:
- alpine/x86_64_build
# Alpine based x86_64 image for LAVA SSH dockerized client
alpine/x86_64_lava_ssh_client:
extends:
- .alpine/x86_64_build-base
variables:
MESA_IMAGE_TAG: &alpine-x86_64_lava_ssh_client ${ALPINE_X86_64_LAVA_SSH_TAG}
# Fedora based x86_64 build image
fedora/x86_64_build:
extends:
- .fdo.container-build@fedora
- .container
variables:
FDO_DISTRIBUTION_VERSION: 38
MESA_IMAGE_TAG: &fedora-x86_64_build ${FEDORA_X86_64_BUILD_TAG}
.use-fedora/x86_64_build:
extends:
- .set-image
variables:
MESA_IMAGE_PATH: "fedora/x86_64_build"
MESA_IMAGE_TAG: *fedora-x86_64_build
needs:
- fedora/x86_64_build
# Get firmware directly rather than using package versions.
# Change KERNEL_ROOTFS_TAG to add firmware changes.
# FIRMWARE_FILES is a list of json files arranged by vendor in .gitlab-ci/firmware/*
@@ -427,7 +451,7 @@ fedora/x86_64_build:
- .container+build-rules
- .debian-container-version
stage: container
timeout: 90m
timeout: 120m
variables:
GIT_STRATEGY: fetch
MESA_ROOTFS_TAG: &kernel-rootfs ${KERNEL_ROOTFS_TAG}
@@ -444,6 +468,7 @@ kernel+rootfs_x86_64:
variables:
DEBIAN_ARCH: "amd64"
DISTRIBUTION_TAG: &distribution-tag-x86_64 "${MESA_ROOTFS_TAG}--${KERNEL_TAG}--${MESA_ARTIFACTS_BASE_TAG}--${MESA_TEMPLATES_COMMIT}"
LLVM_VERSION: *debian-x86_64-llvm
kernel+rootfs_arm64:
extends:
@@ -454,6 +479,7 @@ kernel+rootfs_arm64:
- aarch64
variables:
DEBIAN_ARCH: "arm64"
LLVM_VERSION: *debian-arm64-llvm
kernel+rootfs_arm32:
extends:
@@ -461,6 +487,7 @@ kernel+rootfs_arm32:
- .firmware_arm32
variables:
DEBIAN_ARCH: "armhf"
LLVM_VERSION: &debian-arm32-llvm 15 # no armhf builds for LLVM
# Cannot use anchors defined here from included files, so use extends: instead
.use-kernel+rootfs-arm:

View File

@@ -6,6 +6,10 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# KERNEL_ROOTFS_TAG
# If you need to update the fluster vectors cache without updating the fluster revision,
# you can update the FLUSTER_VECTORS_VERSION tag in .gitlab-ci/image-tags.yml.
# When changing FLUSTER_REVISION, KERNEL_ROOTFS_TAG needs to be updated as well to rebuild
# the rootfs.
set -e
@@ -14,8 +18,9 @@ set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
: "${LLVM_VERSION:?llvm version not set!}"
export FIRMWARE_FILES="${FIRMWARE_FILES}"
export SKIP_UPDATE_FLUSTER_VECTORS=0
check_minio()
{
@@ -27,9 +32,22 @@ check_minio()
fi
}
check_fluster()
{
S3_PATH_FLUSTER="${S3_HOST}/${S3_KERNEL_BUCKET}/$1/${DATA_STORAGE_PATH}/fluster/${FLUSTER_VECTORS_VERSION}"
if curl -L --retry 4 -f --retry-delay 60 -s -X HEAD \
"https://${S3_PATH_FLUSTER}/done"; then
echo "Fluster vectors are up-to-date, skip downloading them."
export SKIP_UPDATE_FLUSTER_VECTORS=1
fi
}
check_minio "${FDO_UPSTREAM_REPO}"
check_minio "${CI_PROJECT_PATH}"
check_fluster "${FDO_UPSTREAM_REPO}"
check_fluster "${CI_PROJECT_PATH}"
. .gitlab-ci/container/container_pre_build.sh
# Install rust, which we'll be using for deqp-runner. It will be cleaned up at the end.
@@ -50,7 +68,7 @@ if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
DEVICE_TREES+=" mt8192-asurada-spherion-r0.dtb"
DEVICE_TREES+=" mt8183-kukui-jacuzzi-juniper-sku16.dtb"
DEVICE_TREES+=" tegra210-p3450-0000.dtb"
DEVICE_TREES+=" apq8016-sbc.dtb"
DEVICE_TREES+=" apq8016-sbc-usb-host.dtb"
DEVICE_TREES+=" apq8096-db820c.dtb"
DEVICE_TREES+=" sc7180-trogdor-lazor-limozeen-nots-r5.dtb"
DEVICE_TREES+=" sc7180-trogdor-kingoftown.dtb"
@@ -165,6 +183,8 @@ CONTAINER_EPHEMERAL=(
echo "deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" | tee /etc/apt/sources.list.d/gfx-ci_.list
. .gitlab-ci/container/debian/maybe-add-llvm-repo.sh
apt-get update
apt-get install -y --no-remove \
-o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' \
@@ -184,6 +204,7 @@ PKG_CI=(
bash ca-certificates curl
initramfs-tools jq netcat-openbsd dropbear openssh-server
libasan8
libubsan1
git
python3-dev python3-pip python3-setuptools python3-wheel
weston # Wayland
@@ -196,6 +217,7 @@ PKG_MESA_DEP=(
)
PKG_DEP=(
libpng16-16
libva-wayland2
libwaffle-1-0
libpython3.11 python3 python3-lxml python3-mako python3-numpy python3-packaging python3-pil python3-renderdoc python3-requests python3-simplejson python3-yaml # Python
sntp
@@ -212,6 +234,7 @@ PKG_DEP=(
[ "$DEBIAN_ARCH" = "amd64" ] && PKG_ARCH=(
firmware-amd-graphics
firmware-misc-nonfree
gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools gstreamer1.0-vaapi libgstreamer1.0-0 # Fluster
libgl1 libglu1-mesa
inetutils-syslogd iptables libcap2
libfontconfig1
@@ -245,7 +268,8 @@ mmdebstrap \
bookworm \
"$ROOTFS/" \
"http://deb.debian.org/debian" \
"deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main"
"deb [trusted=yes] https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo/-/raw/${PKG_REPO_REV}/ ${FDO_DISTRIBUTION_VERSION%-*} main" \
"${LLVM_APT_REPO:-}"
############### Install mold
. .gitlab-ci/container/build-mold.sh
@@ -293,6 +317,11 @@ mv /usr/local/bin/*-runner $ROOTFS/usr/bin/.
############### Build dEQP
DEQP_API=tools \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
DEQP_API=GL \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
@@ -301,11 +330,19 @@ DEQP_API=GLES \
DEQP_TARGET=surfaceless \
. .gitlab-ci/container/build-deqp.sh
[ "$BUILD_VK" == "ON" ] && DEQP_API=VK \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
if [ "$BUILD_VK" == "ON" ]; then
DEQP_API=VK \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
mv /deqp $ROOTFS/.
DEQP_API=VK-main \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
fi
rm -rf /VK-GL-CTS
mv /deqp-* $ROOTFS/.
############### Build SKQP
@@ -349,10 +386,15 @@ if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
fi
############### Build ci-kdl
section_start kdl "Prepare a venv for kdl"
. .gitlab-ci/container/build-kdl.sh
mv /ci-kdl $ROOTFS/
section_end kdl
############### Install fluster
if [[ ${DEBIAN_ARCH} = "amd64" ]]; then
section_start fluster "Install fluster"
. .gitlab-ci/container/build-fluster.sh
section_end fluster
fi
############### Build local stuff for use by igt and kernel testing, which
############### will reuse most of our container build process from a specific
@@ -375,12 +417,14 @@ if [ "$DEBIAN_ARCH" = "amd64" ]; then
fi
############### Fill rootfs
cp .gitlab-ci/setup-test-env.sh $ROOTFS/.
cp .gitlab-ci/container/setup-rootfs.sh $ROOTFS/.
cp .gitlab-ci/container/strip-rootfs.sh $ROOTFS/.
cp .gitlab-ci/container/debian/llvm-snapshot.gpg.key $ROOTFS/.
cp .gitlab-ci/container/debian/winehq.gpg.key $ROOTFS/.
chroot $ROOTFS bash /setup-rootfs.sh
rm $ROOTFS/{llvm-snapshot,winehq}.gpg.key
rm "$ROOTFS/setup-test-env.sh"
rm "$ROOTFS/setup-rootfs.sh"
rm "$ROOTFS/strip-rootfs.sh"
cp /etc/wgetrc $ROOTFS/etc/.
@@ -400,8 +444,7 @@ popd
. .gitlab-ci/container/container_post_build.sh
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/"${ROOTFSTAR}" \
https://${S3_PATH}/"${ROOTFSTAR}"
s3_upload /lava-files/"${ROOTFSTAR}" "https://${S3_PATH}/"
touch /lava-files/done
ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/done https://${S3_PATH}/done
s3_upload /lava-files/done "https://${S3_PATH}/"

View File

@@ -1,4 +1,4 @@
From dc97ee83a813f6b170079ddf2a04bbb06221a5a7 Mon Sep 17 00:00:00 2001
From 6250d347d15502e3b45769edba57ae244e20fb92 Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Fri, 26 Aug 2022 18:24:27 +0200
Subject: [PATCH 1/2] Allow running on Android from the command line
@@ -20,10 +20,10 @@ Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
3 files changed, 34 insertions(+), 52 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb58cc7ba..98b8fc6cc 100644
index 309bdda18..7c833751f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,7 +272,7 @@ include_directories(
@@ -275,7 +275,7 @@ include_directories(
external/vulkancts/framework/vulkan
)
@@ -32,7 +32,7 @@ index eb58cc7ba..98b8fc6cc 100644
# On Android deqp modules are compiled as libraries and linked into final .so
set(DEQP_MODULE_LIBRARIES )
set(DEQP_MODULE_ENTRY_POINTS )
@@ -316,7 +316,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
@@ -319,7 +319,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
set(DEQP_MODULE_LIBRARIES ${DEQP_MODULE_LIBRARIES} PARENT_SCOPE)
set(DEQP_MODULE_ENTRY_POINTS ${DEQP_MODULE_ENTRY_POINTS} PARENT_SCOPE)
@@ -41,7 +41,7 @@ index eb58cc7ba..98b8fc6cc 100644
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -338,7 +338,7 @@ macro (add_deqp_module_skip_android MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
@@ -341,7 +341,7 @@ macro (add_deqp_module_skip_android MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
add_library("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" STATIC ${SRCS})
target_link_libraries("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" ${LIBS})
@@ -50,7 +50,7 @@ index eb58cc7ba..98b8fc6cc 100644
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -390,37 +390,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
@@ -393,37 +393,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
add_subdirectory(external/openglcts ${MAYBE_EXCLUDE_FROM_ALL})
# Single-binary targets
@@ -90,54 +90,54 @@ index eb58cc7ba..98b8fc6cc 100644
set(DEQP_IOS_CODE_SIGN_IDENTITY "drawElements" CACHE STRING "Code sign identity for iOS build")
diff --git a/framework/platform/android/tcuAndroidNativeActivity.cpp b/framework/platform/android/tcuAndroidNativeActivity.cpp
index 6f8cd8fc5..b83e30f41 100644
index 82a9ab699..4eab14a39 100644
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
@@ -116,23 +116,25 @@ namespace Android
NativeActivity::NativeActivity (ANativeActivity* activity)
: m_activity(activity)
@@ -115,23 +115,25 @@ namespace Android
NativeActivity::NativeActivity(ANativeActivity *activity) : m_activity(activity)
{
- activity->instance = (void*)this;
- activity->callbacks->onStart = onStartCallback;
- activity->callbacks->onResume = onResumeCallback;
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
- activity->callbacks->onPause = onPauseCallback;
- activity->callbacks->onStop = onStopCallback;
- activity->callbacks->onDestroy = onDestroyCallback;
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
- activity->callbacks->onLowMemory = onLowMemoryCallback;
+ if (activity) {
+ activity->instance = (void*)this;
+ activity->callbacks->onStart = onStartCallback;
+ activity->callbacks->onResume = onResumeCallback;
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
+ activity->callbacks->onPause = onPauseCallback;
+ activity->callbacks->onStop = onStopCallback;
+ activity->callbacks->onDestroy = onDestroyCallback;
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
+ }
- activity->instance = (void *)this;
- activity->callbacks->onStart = onStartCallback;
- activity->callbacks->onResume = onResumeCallback;
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
- activity->callbacks->onPause = onPauseCallback;
- activity->callbacks->onStop = onStopCallback;
- activity->callbacks->onDestroy = onDestroyCallback;
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
- activity->callbacks->onLowMemory = onLowMemoryCallback;
+ if (activity) {
+ activity->instance = (void *)this;
+ activity->callbacks->onStart = onStartCallback;
+ activity->callbacks->onResume = onResumeCallback;
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
+ activity->callbacks->onPause = onPauseCallback;
+ activity->callbacks->onStop = onStopCallback;
+ activity->callbacks->onDestroy = onDestroyCallback;
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
+ }
}
NativeActivity::~NativeActivity (void)
NativeActivity::~NativeActivity(void)
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index b8a35898c..cf02e6b70 100644
index 0472fa615..ff8929409 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -22,6 +22,7 @@
@@ -148,35 +148,35 @@ index b8a35898c..cf02e6b70 100644
#include "tcuAndroidUtil.hpp"
#include "gluRenderContext.hpp"
#include "egluNativeDisplay.hpp"
@@ -170,7 +171,7 @@ eglu::NativeWindow* NativeWindowFactory::createWindow (const eglu::WindowParams&
Window* window = m_windowRegistry.tryAcquireWindow();
@@ -198,7 +199,7 @@ eglu::NativeWindow *NativeWindowFactory::createWindow(const eglu::WindowParams &
Window *window = m_windowRegistry.tryAcquireWindow();
if (!window)
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
if (!window)
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
return new NativeWindow(window, params.width, params.height, format);
return new NativeWindow(window, params.width, params.height, format);
}
@@ -292,6 +293,9 @@ static size_t getTotalSystemMemory (ANativeActivity* activity)
@@ -319,6 +320,9 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
try
{
+ if (!activity)
+ throw tcu::InternalError("No activity (running from command line?");
try
{
+ if (!activity)
+ throw tcu::InternalError("No activity (running from command line?");
+
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
return totalMemory;
@@ -388,3 +392,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
return totalMemory;
@@ -416,3 +420,9 @@ bool Platform::hasDisplay(vk::wsi::Type wsiType) const
} // Android
} // tcu
} // namespace Android
} // namespace tcu
+
+tcu::Platform* createPlatform (void)
+{
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+}
--
2.42.0
2.45.2

View File

@@ -0,0 +1,328 @@
From 4f53bcbb597a91bab715bc8d555cfd6c81263ac1 Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Wed, 29 Jan 2025 12:50:33 +0000
Subject: [PATCH] Build: Don't build Vulkan utilities for GL builds
Change-Id: Ie412f914bb6264ffbd502deea57d80cc11a9948e
Signed-off-by: Daniel Stone <daniels@collabora.com>
---
framework/platform/CMakeLists.txt | 9 --
.../platform/android/tcuAndroidPlatform.cpp | 118 ------------------
framework/platform/lnx/tcuLnxPlatform.cpp | 9 +-
.../surfaceless/tcuSurfacelessPlatform.cpp | 54 --------
4 files changed, 1 insertion(+), 189 deletions(-)
diff --git a/framework/platform/CMakeLists.txt b/framework/platform/CMakeLists.txt
index ec1deb5c2..49fe412a7 100644
--- a/framework/platform/CMakeLists.txt
+++ b/framework/platform/CMakeLists.txt
@@ -15,8 +15,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
win32/tcuWin32Window.hpp
win32/tcuWin32EGLNativeDisplayFactory.hpp
win32/tcuWin32EGLNativeDisplayFactory.cpp
- win32/tcuWin32VulkanPlatform.hpp
- win32/tcuWin32VulkanPlatform.cpp
)
elseif ((DE_OS_IS_UNIX OR DE_OS_IS_OSX) AND (DEQP_USE_X11 OR DEQP_USE_WAYLAND OR DEQP_USE_HEADLESS))
@@ -28,8 +26,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
lnx/tcuLnxPlatform.hpp
lnx/tcuLnxEglPlatform.hpp
lnx/tcuLnxEglPlatform.cpp
- lnx/tcuLnxVulkanPlatform.hpp
- lnx/tcuLnxVulkanPlatform.cpp
)
include_directories(lnx)
@@ -164,8 +160,6 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
set(TCUTIL_PLATFORM_SRCS
osx/tcuOSXPlatform.cpp
osx/tcuOSXPlatform.hpp
- osx/tcuOSXVulkanPlatform.cpp
- osx/tcuOSXVulkanPlatform.hpp
osx/tcuOSXMetalView.mm
osx/tcuOSXMetalView.hpp
)
@@ -191,9 +185,6 @@ if (DEQP_USE_WAYLAND)
add_dependencies(tcutil-platform deqp-xdg-shell)
endif()
-# Add vkutil to the deps before tcutil so that it picks up the c++11 dependencies
-target_link_libraries(tcutil-platform vkutil)
-
target_link_libraries(tcutil-platform tcutil ${TCUTIL_PLATFORM_LIBS})
# Always link to glutil as some platforms such as Win32 always support GL
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index 0472fa615..87033ad56 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -31,7 +31,6 @@
#include "eglwLibrary.hpp"
#include "eglwEnums.hpp"
#include "tcuFunctionLibrary.hpp"
-#include "vkWsiPlatform.hpp"
// Assume no call translation is needed
#include <android/native_window.h>
@@ -217,102 +216,6 @@ eglu::NativeDisplay *NativeDisplayFactory::createDisplay(const EGLAttrib *attrib
return new NativeDisplay();
}
-// Vulkan
-
-class VulkanLibrary : public vk::Library
-{
-public:
- VulkanLibrary(const char *libraryPath)
- : m_library(libraryPath != DE_NULL ? libraryPath : "libvulkan.so")
- , m_driver(m_library)
- {
- }
-
- const vk::PlatformInterface &getPlatformInterface(void) const
- {
- return m_driver;
- }
-
- const tcu::FunctionLibrary &getFunctionLibrary(void) const
- {
- return m_library;
- }
-
-private:
- const tcu::DynamicFunctionLibrary m_library;
- const vk::PlatformDriver m_driver;
-};
-
-DE_STATIC_ASSERT(sizeof(vk::pt::AndroidNativeWindowPtr) == sizeof(ANativeWindow *));
-
-class VulkanWindow : public vk::wsi::AndroidWindowInterface
-{
-public:
- VulkanWindow(tcu::Android::Window &window)
- : vk::wsi::AndroidWindowInterface(vk::pt::AndroidNativeWindowPtr(window.getNativeWindow()))
- , m_window(window)
- {
- }
-
- void setVisible(bool visible)
- {
- DE_UNREF(visible);
- }
-
- void resize(const UVec2 &newSize)
- {
- DE_UNREF(newSize);
- }
-
- void setMinimized(bool minimized)
- {
- DE_UNREF(minimized);
- TCU_THROW(NotSupportedError, "Minimized on Android is not implemented");
- }
-
- ~VulkanWindow(void)
- {
- m_window.release();
- }
-
-private:
- tcu::Android::Window &m_window;
-};
-
-class VulkanDisplay : public vk::wsi::Display
-{
-public:
- VulkanDisplay(WindowRegistry &windowRegistry) : m_windowRegistry(windowRegistry)
- {
- }
-
- vk::wsi::Window *createWindow(const Maybe<UVec2> &initialSize) const
- {
- Window *const window = m_windowRegistry.tryAcquireWindow();
-
- if (window)
- {
- try
- {
- if (initialSize)
- window->setBuffersGeometry((int)initialSize->x(), (int)initialSize->y(), WINDOW_FORMAT_RGBA_8888);
-
- return new VulkanWindow(*window);
- }
- catch (...)
- {
- window->release();
- throw;
- }
- }
- else
- TCU_THROW(ResourceError, "Native window is not available");
- }
-
-private:
- WindowRegistry &m_windowRegistry;
-};
-
static size_t getTotalSystemMemory(ANativeActivity *activity)
{
const size_t MiB = (size_t)(1 << 20);
@@ -355,11 +258,6 @@ bool Platform::processEvents(void)
return true;
}
-vk::Library *Platform::createLibrary(const char *libraryPath) const
-{
- return new VulkanLibrary(libraryPath);
-}
-
void Platform::describePlatform(std::ostream &dst) const
{
tcu::Android::describePlatform(m_activity.getNativeActivity(), dst);
@@ -398,21 +296,5 @@ void Platform::getMemoryLimits(tcu::PlatformMemoryLimits &limits) const
limits.devicePageTableHierarchyLevels = 3;
}
-vk::wsi::Display *Platform::createWsiDisplay(vk::wsi::Type wsiType) const
-{
- if (wsiType == vk::wsi::TYPE_ANDROID)
- return new VulkanDisplay(const_cast<WindowRegistry &>(m_windowRegistry));
- else
- TCU_THROW(NotSupportedError, "WSI type not supported on Android");
-}
-
-bool Platform::hasDisplay(vk::wsi::Type wsiType) const
-{
- if (wsiType == vk::wsi::TYPE_ANDROID)
- return true;
-
- return false;
-}
-
} // namespace Android
} // namespace tcu
diff --git a/framework/platform/lnx/tcuLnxPlatform.cpp b/framework/platform/lnx/tcuLnxPlatform.cpp
index 8c0a3ef06..6b1a4985a 100644
--- a/framework/platform/lnx/tcuLnxPlatform.cpp
+++ b/framework/platform/lnx/tcuLnxPlatform.cpp
@@ -23,12 +23,10 @@
#include "tcuLnxPlatform.hpp"
-#include "tcuLnxVulkanPlatform.hpp"
#include "tcuLnxEglPlatform.hpp"
#include "deUniquePtr.hpp"
#include "gluPlatform.hpp"
-#include "vkPlatform.hpp"
#if defined(DEQP_SUPPORT_X11)
#include <X11/Xlib.h>
@@ -64,10 +62,6 @@ public:
return !m_eventState.getQuitFlag();
}
- const vk::Platform &getVulkanPlatform(void) const
- {
- return m_vkPlatform;
- }
const eglu::Platform &getEGLPlatform(void) const
{
return m_eglPlatform;
@@ -79,12 +73,11 @@ public:
private:
EventState m_eventState;
- VulkanPlatform m_vkPlatform;
egl::Platform m_eglPlatform;
LinuxGLPlatform m_glPlatform;
};
-LinuxPlatform::LinuxPlatform(void) : m_vkPlatform(m_eventState), m_eglPlatform(m_eventState)
+LinuxPlatform::LinuxPlatform(void) : m_eglPlatform(m_eventState)
{
#if defined(DEQP_SUPPORT_GLX)
m_glPlatform.registerFactory(x11::glx::createContextFactory(m_eventState));
diff --git a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
index 1cea9dd97..3d5bd8b62 100644
--- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
+++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp
@@ -43,7 +43,6 @@
#include "tcuPixelFormat.hpp"
#include "tcuPlatform.hpp"
#include "tcuRenderTarget.hpp"
-#include "vkPlatform.hpp"
#include <EGL/egl.h>
@@ -93,52 +92,6 @@ namespace tcu
namespace surfaceless
{
-class VulkanLibrary : public vk::Library
-{
-public:
- VulkanLibrary(const char *libraryPath)
- : m_library(libraryPath != DE_NULL ? libraryPath : DEQP_VULKAN_LIBRARY_PATH)
- , m_driver(m_library)
- {
- }
-
- const vk::PlatformInterface &getPlatformInterface(void) const
- {
- return m_driver;
- }
- const tcu::FunctionLibrary &getFunctionLibrary(void) const
- {
- return m_library;
- }
-
-private:
- const tcu::DynamicFunctionLibrary m_library;
- const vk::PlatformDriver m_driver;
-};
-
-// Copied from tcuX11Platform.cpp
-class VulkanPlatform : public vk::Platform
-{
-public:
- vk::Library *createLibrary(const char *libraryPath) const
- {
- return new VulkanLibrary(libraryPath);
- }
-
- void describePlatform(std::ostream &dst) const
- {
- utsname sysInfo;
-
- deMemset(&sysInfo, 0, sizeof(sysInfo));
-
- if (uname(&sysInfo) != 0)
- throw std::runtime_error("uname() failed");
-
- dst << "OS: " << sysInfo.sysname << " " << sysInfo.release << " " << sysInfo.version << "\n";
- dst << "CPU: " << sysInfo.machine << "\n";
- }
-};
-
bool isEGLExtensionSupported(const eglw::Library &egl, eglw::EGLDisplay, const std::string &extName)
{
const vector<string> exts = eglu::getClientExtensions(egl);
@@ -185,13 +138,6 @@ public:
{
return *this;
}
- const vk::Platform &getVulkanPlatform(void) const
- {
- return m_vkPlatform;
- }
-
-private:
- VulkanPlatform m_vkPlatform;
};
class ContextFactory : public glu::ContextFactory
--
2.48.1

View File

@@ -1,4 +1,4 @@
From dc97ee83a813f6b170079ddf2a04bbb06221a5a7 Mon Sep 17 00:00:00 2001
From 2503bf1be98eaa810672f6a6eb8f735a33511a4f Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Fri, 26 Aug 2022 18:24:27 +0200
Subject: [PATCH 1/2] Allow running on Android from the command line
@@ -20,10 +20,10 @@ Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
3 files changed, 34 insertions(+), 52 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb58cc7ba..98b8fc6cc 100644
index 309bdda18..7c833751f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,7 +272,7 @@ include_directories(
@@ -275,7 +275,7 @@ include_directories(
external/vulkancts/framework/vulkan
)
@@ -32,7 +32,7 @@ index eb58cc7ba..98b8fc6cc 100644
# On Android deqp modules are compiled as libraries and linked into final .so
set(DEQP_MODULE_LIBRARIES )
set(DEQP_MODULE_ENTRY_POINTS )
@@ -316,7 +316,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
@@ -319,7 +319,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
set(DEQP_MODULE_LIBRARIES ${DEQP_MODULE_LIBRARIES} PARENT_SCOPE)
set(DEQP_MODULE_ENTRY_POINTS ${DEQP_MODULE_ENTRY_POINTS} PARENT_SCOPE)
@@ -41,7 +41,7 @@ index eb58cc7ba..98b8fc6cc 100644
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -338,7 +338,7 @@ macro (add_deqp_module_skip_android MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
@@ -341,7 +341,7 @@ macro (add_deqp_module_skip_android MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
add_library("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" STATIC ${SRCS})
target_link_libraries("${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}" ${LIBS})
@@ -50,7 +50,7 @@ index eb58cc7ba..98b8fc6cc 100644
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -390,37 +390,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
@@ -393,37 +393,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
add_subdirectory(external/openglcts ${MAYBE_EXCLUDE_FROM_ALL})
# Single-binary targets
@@ -90,54 +90,54 @@ index eb58cc7ba..98b8fc6cc 100644
set(DEQP_IOS_CODE_SIGN_IDENTITY "drawElements" CACHE STRING "Code sign identity for iOS build")
diff --git a/framework/platform/android/tcuAndroidNativeActivity.cpp b/framework/platform/android/tcuAndroidNativeActivity.cpp
index 6f8cd8fc5..b83e30f41 100644
index 82a9ab699..4eab14a39 100644
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
@@ -116,23 +116,25 @@ namespace Android
NativeActivity::NativeActivity (ANativeActivity* activity)
: m_activity(activity)
@@ -115,23 +115,25 @@ namespace Android
NativeActivity::NativeActivity(ANativeActivity *activity) : m_activity(activity)
{
- activity->instance = (void*)this;
- activity->callbacks->onStart = onStartCallback;
- activity->callbacks->onResume = onResumeCallback;
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
- activity->callbacks->onPause = onPauseCallback;
- activity->callbacks->onStop = onStopCallback;
- activity->callbacks->onDestroy = onDestroyCallback;
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
- activity->callbacks->onLowMemory = onLowMemoryCallback;
+ if (activity) {
+ activity->instance = (void*)this;
+ activity->callbacks->onStart = onStartCallback;
+ activity->callbacks->onResume = onResumeCallback;
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
+ activity->callbacks->onPause = onPauseCallback;
+ activity->callbacks->onStop = onStopCallback;
+ activity->callbacks->onDestroy = onDestroyCallback;
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
+ }
- activity->instance = (void *)this;
- activity->callbacks->onStart = onStartCallback;
- activity->callbacks->onResume = onResumeCallback;
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
- activity->callbacks->onPause = onPauseCallback;
- activity->callbacks->onStop = onStopCallback;
- activity->callbacks->onDestroy = onDestroyCallback;
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
- activity->callbacks->onLowMemory = onLowMemoryCallback;
+ if (activity) {
+ activity->instance = (void *)this;
+ activity->callbacks->onStart = onStartCallback;
+ activity->callbacks->onResume = onResumeCallback;
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
+ activity->callbacks->onPause = onPauseCallback;
+ activity->callbacks->onStop = onStopCallback;
+ activity->callbacks->onDestroy = onDestroyCallback;
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
+ }
}
NativeActivity::~NativeActivity (void)
NativeActivity::~NativeActivity(void)
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index b8a35898c..cf02e6b70 100644
index 0472fa615..ff8929409 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -22,6 +22,7 @@
@@ -148,35 +148,35 @@ index b8a35898c..cf02e6b70 100644
#include "tcuAndroidUtil.hpp"
#include "gluRenderContext.hpp"
#include "egluNativeDisplay.hpp"
@@ -170,7 +171,7 @@ eglu::NativeWindow* NativeWindowFactory::createWindow (const eglu::WindowParams&
Window* window = m_windowRegistry.tryAcquireWindow();
@@ -198,7 +199,7 @@ eglu::NativeWindow *NativeWindowFactory::createWindow(const eglu::WindowParams &
Window *window = m_windowRegistry.tryAcquireWindow();
if (!window)
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
if (!window)
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
return new NativeWindow(window, params.width, params.height, format);
return new NativeWindow(window, params.width, params.height, format);
}
@@ -292,6 +293,9 @@ static size_t getTotalSystemMemory (ANativeActivity* activity)
@@ -319,6 +320,9 @@ static size_t getTotalSystemMemory(ANativeActivity *activity)
try
{
+ if (!activity)
+ throw tcu::InternalError("No activity (running from command line?");
try
{
+ if (!activity)
+ throw tcu::InternalError("No activity (running from command line?");
+
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
return totalMemory;
@@ -388,3 +392,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
return totalMemory;
@@ -416,3 +420,9 @@ bool Platform::hasDisplay(vk::wsi::Type wsiType) const
} // Android
} // tcu
} // namespace Android
} // namespace tcu
+
+tcu::Platform* createPlatform (void)
+{
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+}
--
2.42.0
2.45.2

View File

@@ -1,173 +0,0 @@
From dc97ee83a813f6b170079ddf2a04bbb06221a5a7 Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Fri, 26 Aug 2022 18:24:27 +0200
Subject: [PATCH 1/2] Allow running on Android from the command line
For testing the Android EGL platform without having to go via the
Android activity manager, build deqp-egl.
Tests that render to native windows are unsupported, as command line
programs cannot create windows on Android.
$ cmake -S . -B build/ -DDEQP_TARGET=android -DDEQP_TARGET_TOOLCHAIN=ndk-modern -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror -DANDROID_NDK_PATH=./android-ndk-r21d -DANDROID_ABI=x86_64 -DDE_ANDROID_API=28 -DGLCTS_GTF_TARGET=gles32 -G Ninja
$ ninja -C build modules/egl/deqp-egl
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
CMakeLists.txt | 36 ++-----------------
.../android/tcuAndroidNativeActivity.cpp | 36 ++++++++++---------
.../platform/android/tcuAndroidPlatform.cpp | 12 ++++++-
3 files changed, 33 insertions(+), 51 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9c61d0db..d6ad2990b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -272,7 +272,7 @@ include_directories(
external/vulkancts/framework/vulkan
)
-if (DE_OS_IS_ANDROID OR DE_OS_IS_IOS)
+if (DE_OS_IS_IOS)
# On Android deqp modules are compiled as libraries and linked into final .so
set(DEQP_MODULE_LIBRARIES )
set(DEQP_MODULE_ENTRY_POINTS )
@@ -316,7 +316,7 @@ macro (add_deqp_module MODULE_NAME SRCS LIBS EXECLIBS ENTRY)
set(DEQP_MODULE_LIBRARIES ${DEQP_MODULE_LIBRARIES} PARENT_SCOPE)
set(DEQP_MODULE_ENTRY_POINTS ${DEQP_MODULE_ENTRY_POINTS} PARENT_SCOPE)
- if (NOT DE_OS_IS_ANDROID AND NOT DE_OS_IS_IOS)
+ if (NOT DE_OS_IS_IOS)
# Executable target
add_executable(${MODULE_NAME} ${PROJECT_SOURCE_DIR}/framework/platform/tcuMain.cpp ${ENTRY})
target_link_libraries(${MODULE_NAME} PUBLIC "${EXECLIBS}" "${MODULE_NAME}${MODULE_LIB_TARGET_POSTFIX}")
@@ -390,37 +390,7 @@ add_subdirectory(external/vulkancts/vkscpc ${MAYBE_EXCLUDE_FROM_ALL})
add_subdirectory(external/openglcts ${MAYBE_EXCLUDE_FROM_ALL})
# Single-binary targets
-if (DE_OS_IS_ANDROID)
- include_directories(executor)
- include_directories(${PROJECT_BINARY_DIR}/external/vulkancts/framework/vulkan)
-
- set(DEQP_SRCS
- framework/platform/android/tcuAndroidMain.cpp
- framework/platform/android/tcuAndroidJNI.cpp
- framework/platform/android/tcuAndroidPlatformCapabilityQueryJNI.cpp
- framework/platform/android/tcuTestLogParserJNI.cpp
- ${DEQP_MODULE_ENTRY_POINTS}
- )
-
- set(DEQP_LIBS
- tcutil-platform
- xecore
- ${DEQP_MODULE_LIBRARIES}
- )
-
- add_library(deqp SHARED ${DEQP_SRCS})
- target_link_libraries(deqp ${DEQP_LIBS})
-
- # Separate out the debug information because it's enormous
- add_custom_command(TARGET deqp POST_BUILD
- COMMAND ${CMAKE_STRIP} --only-keep-debug -o $<TARGET_FILE:deqp>.debug $<TARGET_FILE:deqp>
- COMMAND ${CMAKE_STRIP} -g $<TARGET_FILE:deqp>)
-
- # Needed by OpenGL CTS that defines its own activity but depends on
- # common Android support code.
- target_include_directories(deqp PRIVATE framework/platform/android)
-
-elseif (DE_OS_IS_IOS)
+if (DE_OS_IS_IOS)
# Code sign identity
set(DEQP_IOS_CODE_SIGN_IDENTITY "drawElements" CACHE STRING "Code sign identity for iOS build")
diff --git a/framework/platform/android/tcuAndroidNativeActivity.cpp b/framework/platform/android/tcuAndroidNativeActivity.cpp
index 6f8cd8fc5..b83e30f41 100644
--- a/framework/platform/android/tcuAndroidNativeActivity.cpp
+++ b/framework/platform/android/tcuAndroidNativeActivity.cpp
@@ -116,23 +116,25 @@ namespace Android
NativeActivity::NativeActivity (ANativeActivity* activity)
: m_activity(activity)
{
- activity->instance = (void*)this;
- activity->callbacks->onStart = onStartCallback;
- activity->callbacks->onResume = onResumeCallback;
- activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
- activity->callbacks->onPause = onPauseCallback;
- activity->callbacks->onStop = onStopCallback;
- activity->callbacks->onDestroy = onDestroyCallback;
- activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
- activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
- activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
- activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
- activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
- activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
- activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
- activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
- activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
- activity->callbacks->onLowMemory = onLowMemoryCallback;
+ if (activity) {
+ activity->instance = (void*)this;
+ activity->callbacks->onStart = onStartCallback;
+ activity->callbacks->onResume = onResumeCallback;
+ activity->callbacks->onSaveInstanceState = onSaveInstanceStateCallback;
+ activity->callbacks->onPause = onPauseCallback;
+ activity->callbacks->onStop = onStopCallback;
+ activity->callbacks->onDestroy = onDestroyCallback;
+ activity->callbacks->onWindowFocusChanged = onWindowFocusChangedCallback;
+ activity->callbacks->onNativeWindowCreated = onNativeWindowCreatedCallback;
+ activity->callbacks->onNativeWindowResized = onNativeWindowResizedCallback;
+ activity->callbacks->onNativeWindowRedrawNeeded = onNativeWindowRedrawNeededCallback;
+ activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyedCallback;
+ activity->callbacks->onInputQueueCreated = onInputQueueCreatedCallback;
+ activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyedCallback;
+ activity->callbacks->onContentRectChanged = onContentRectChangedCallback;
+ activity->callbacks->onConfigurationChanged = onConfigurationChangedCallback;
+ activity->callbacks->onLowMemory = onLowMemoryCallback;
+ }
}
NativeActivity::~NativeActivity (void)
diff --git a/framework/platform/android/tcuAndroidPlatform.cpp b/framework/platform/android/tcuAndroidPlatform.cpp
index b8a35898c..cf02e6b70 100644
--- a/framework/platform/android/tcuAndroidPlatform.cpp
+++ b/framework/platform/android/tcuAndroidPlatform.cpp
@@ -22,6 +22,7 @@
*//*--------------------------------------------------------------------*/
#include "tcuAndroidPlatform.hpp"
+#include "tcuAndroidNativeActivity.hpp"
#include "tcuAndroidUtil.hpp"
#include "gluRenderContext.hpp"
#include "egluNativeDisplay.hpp"
@@ -170,7 +171,7 @@ eglu::NativeWindow* NativeWindowFactory::createWindow (const eglu::WindowParams&
Window* window = m_windowRegistry.tryAcquireWindow();
if (!window)
- throw ResourceError("Native window is not available", DE_NULL, __FILE__, __LINE__);
+ throw NotSupportedError("Native window is not available", DE_NULL, __FILE__, __LINE__);
return new NativeWindow(window, params.width, params.height, format);
}
@@ -292,6 +293,9 @@ static size_t getTotalSystemMemory (ANativeActivity* activity)
try
{
+ if (!activity)
+ throw tcu::InternalError("No activity (running from command line?");
+
const size_t totalMemory = getTotalAndroidSystemMemory(activity);
print("Device has %.2f MiB of system memory\n", static_cast<double>(totalMemory) / static_cast<double>(MiB));
return totalMemory;
@@ -388,3 +392,9 @@ bool Platform::hasDisplay (vk::wsi::Type wsiType) const
} // Android
} // tcu
+
+tcu::Platform* createPlatform (void)
+{
+ tcu::Android::NativeActivity activity(NULL);
+ return new tcu::Android::Platform(activity);
+}
--
2.42.0

View File

@@ -1,26 +0,0 @@
From a602822c53e22e985f942f843ccadbfb64613212 Mon Sep 17 00:00:00 2001
From: Helen Koike <helen.koike@collabora.com>
Date: Tue, 27 Sep 2022 12:35:22 -0300
Subject: [PATCH 2/2] Android prints to stdout instead of logcat
Signed-off-by: Helen Koike <helen.koike@collabora.com>
---
framework/qphelper/qpDebugOut.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/qphelper/qpDebugOut.c b/framework/qphelper/qpDebugOut.c
index 6579e9f48..c200c6f6b 100644
--- a/framework/qphelper/qpDebugOut.c
+++ b/framework/qphelper/qpDebugOut.c
@@ -98,7 +98,7 @@ void qpDiev (const char* format, va_list args)
}
/* print() implementation. */
-#if (DE_OS == DE_OS_ANDROID)
+#if (0)
#include <android/log.h>
--
2.42.0

View File

@@ -5,6 +5,8 @@
# KERNEL_ROOTFS_TAG
set -ex
. setup-test-env.sh
export DEBIAN_FRONTEND=noninteractive
# Needed for ci-fairy, this revision is able to upload files to

View File

@@ -2,6 +2,8 @@
set -u
uncollapsed_section_start wine "Setting up Wine"
export WINEPREFIX="$1"
export WINEDEBUG="-all"
@@ -24,3 +26,5 @@ rm crashdialog.reg
# it a bit more of time for it to be created solves the problem
# ...
while ! test -f "${WINEPREFIX}/system.reg"; do sleep 1; done
section_end wine

View File

@@ -5,6 +5,8 @@
# KERNEL_ROOTFS_TAG
set -ex
section_start strip-rootfs "Stripping rootfs"
export DEBIAN_FRONTEND=noninteractive
UNNEEDED_PACKAGES=(
@@ -155,3 +157,5 @@ EOF
chmod +x /usr/bin/apt-get
ln -s /usr/bin/apt-get /usr/bin/apt
section_end strip-rootfs

View File

@@ -0,0 +1,42 @@
#!/usr/bin/env bash
set -exu
# Early check for required env variables, relies on `set -u`
: "$ANDROID_LLVM_ARTIFACT_NAME"
# if DEST_DIR is not set, assing an empty value, this prevents -u to fail
: "${DEST_DIR:=}"
# TODO, check if meson can do the download and wrap file generation for us.
LLVM_INSTALL_PREFIX="${DEST_DIR}/${ANDROID_LLVM_ARTIFACT_NAME}"
if [ ! -d "$LLVM_INSTALL_PREFIX" ]; then
echo "Cannot find an LLVM build in $LLVM_INSTALL_PREFIX" 1>&2
exit 1
fi
mkdir -p subprojects/llvm
cat << EOF > subprojects/llvm/meson.build
project('llvm', ['cpp'])
cpp = meson.get_compiler('cpp')
_deps = []
_search = join_paths('$LLVM_INSTALL_PREFIX', 'lib')
foreach d: ['libLLVMAggressiveInstCombine', 'libLLVMAnalysis', 'libLLVMAsmParser', 'libLLVMAsmPrinter', 'libLLVMBinaryFormat', 'libLLVMBitReader', 'libLLVMBitstreamReader', 'libLLVMBitWriter', 'libLLVMCFGuard', 'libLLVMCFIVerify', 'libLLVMCodeGen', 'libLLVMCodeGenTypes', 'libLLVMCore', 'libLLVMCoroutines', 'libLLVMCoverage', 'libLLVMDebugInfoBTF', 'libLLVMDebugInfoCodeView', 'libLLVMDebuginfod', 'libLLVMDebugInfoDWARF', 'libLLVMDebugInfoGSYM', 'libLLVMDebugInfoLogicalView', 'libLLVMDebugInfoMSF', 'libLLVMDebugInfoPDB', 'libLLVMDemangle', 'libLLVMDiff', 'libLLVMDlltoolDriver', 'libLLVMDWARFLinker', 'libLLVMDWARFLinkerClassic', 'libLLVMDWARFLinkerParallel', 'libLLVMDWP', 'libLLVMExecutionEngine', 'libLLVMExegesis', 'libLLVMExegesisX86', 'libLLVMExtensions', 'libLLVMFileCheck', 'libLLVMFrontendDriver', 'libLLVMFrontendHLSL', 'libLLVMFrontendOffloading', 'libLLVMFrontendOpenACC', 'libLLVMFrontendOpenMP', 'libLLVMFuzzerCLI', 'libLLVMFuzzMutate', 'libLLVMGlobalISel', 'libLLVMHipStdPar', 'libLLVMInstCombine', 'libLLVMInstrumentation', 'libLLVMInterfaceStub', 'libLLVMInterpreter', 'libLLVMipo', 'libLLVMIRPrinter', 'libLLVMIRReader', 'libLLVMJITLink', 'libLLVMLibDriver', 'libLLVMLineEditor', 'libLLVMLinker', 'libLLVMLTO', 'libLLVMMC', 'libLLVMMCA', 'libLLVMMCDisassembler', 'libLLVMMCJIT', 'libLLVMMCParser', 'libLLVMMIRParser', 'libLLVMObjCARCOpts', 'libLLVMObjCopy', 'libLLVMObject', 'libLLVMObjectYAML', 'libLLVMOption', 'libLLVMOrcDebugging', 'libLLVMOrcJIT', 'libLLVMOrcShared', 'libLLVMOrcTargetProcess', 'libLLVMPasses', 'libLLVMProfileData', 'libLLVMRemarks', 'libLLVMRuntimeDyld', 'libLLVMScalarOpts', 'libLLVMSelectionDAG', 'libLLVMSupport', 'libLLVMSymbolize', 'libLLVMTableGen', 'libLLVMTableGenCommon', 'libLLVMTarget', 'libLLVMTargetParser', 'libLLVMTextAPI', 'libLLVMTextAPIBinaryReader', 'libLLVMTransformUtils', 'libLLVMVectorize', 'libLLVMWindowsDriver', 'libLLVMWindowsManifest', 'libLLVMX86AsmParser', 'libLLVMX86CodeGen', 'libLLVMX86Desc', 'libLLVMX86Disassembler', 'libLLVMX86Info', 'libLLVMX86TargetMCA', 'libLLVMXRay']
_deps += cpp.find_library(d, dirs : _search)
endforeach
dep_llvm = declare_dependency(
include_directories : include_directories('$LLVM_INSTALL_PREFIX/include'),
dependencies : _deps,
version : '$(sed -n -e 's/^#define LLVM_VERSION_STRING "\([^"]*\)".*/\1/p' "${LLVM_INSTALL_PREFIX}/include/llvm/Config/llvm-config.h" )',
)
has_rtti = false
irbuilder_h = files('$LLVM_INSTALL_PREFIX/include/llvm/IR/IRBuilder.h')
EOF

View File

@@ -80,9 +80,12 @@ ${SCRIPTS_DIR}/common/generate-env.sh | tee ${VM_TEMP_DIR}/crosvm-env.sh
cp ${SCRIPTS_DIR}/setup-test-env.sh ${VM_TEMP_DIR}/setup-test-env.sh
# Set the crosvm-script as the arguments of the current script
echo "export SCRIPTS_DIR=${SCRIPTS_DIR}" > ${VM_TEMP_DIR}/crosvm-script.sh
echo ". ${VM_TEMP_DIR}/setup-test-env.sh" >> ${VM_TEMP_DIR}/crosvm-script.sh
echo "$@" >> ${VM_TEMP_DIR}/crosvm-script.sh
{
echo "export SCRIPTS_DIR=${SCRIPTS_DIR}"
echo "export RESULTS_DIR=${RESULTS_DIR}"
echo ". ${VM_TEMP_DIR}/setup-test-env.sh"
echo "$@"
} > ${VM_TEMP_DIR}/crosvm-script.sh
# Setup networking
/usr/sbin/iptables-legacy -w -t nat -A POSTROUTING -o eth0 -j MASQUERADE
@@ -102,7 +105,12 @@ CROSVM_KERN_ARGS="${CROSVM_KERN_ARGS} init=${SCRIPTS_DIR}/crosvm-init.sh -- ${VS
[ "${CROSVM_GALLIUM_DRIVER:-}" = "llvmpipe" ] && \
CROSVM_LIBGL_ALWAYS_SOFTWARE=true || CROSVM_LIBGL_ALWAYS_SOFTWARE=false
set +e -x
set +e
if [ "${INSIDE_DEQP_RUNNER:-}" != "true" ]
then
set -x
fi
# We aren't testing the host driver here, so we don't need to validate NIR on the host
NIR_DEBUG="novalidate" \
@@ -129,7 +137,7 @@ CROSVM_RET=$?
# Show crosvm output on error to help with debugging
[ ${CROSVM_RET} -eq 0 ] || {
set +x
{ set +x; } 2>/dev/null
echo "Dumping crosvm output.." >&2
cat ${VM_TEMP_DIR}/crosvm >&2
set -x

View File

@@ -8,27 +8,68 @@ section_start cuttlefish_setup "cuttlefish: setup"
set -xe
export HOME=/cuttlefish
export PATH=$PATH:/cuttlefish/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${CI_PROJECT_DIR}/install/lib/:/cuttlefish/lib64
export PATH=/cuttlefish/bin:$PATH
export LD_LIBRARY_PATH=/cuttlefish/lib64:${CI_PROJECT_DIR}/install/lib:$LD_LIBRARY_PATH
export EGL_PLATFORM=surfaceless
# Pick up a vulkan driver
ARCH=$(uname -m)
export VK_DRIVER_FILES=${CI_PROJECT_DIR}/install/share/vulkan/icd.d/${VK_DRIVER:-}_icd.$ARCH.json
syslogd
chown root.kvm /dev/kvm
chown root:kvm /dev/kvm
/etc/init.d/cuttlefish-host-resources start
pushd /cuttlefish
cd /cuttlefish
# Add a function to perform some tasks when exiting the script
function my_atexit()
{
# shellcheck disable=SC2317
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat $RESULTS_DIR || true
# shellcheck disable=SC2317
cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log $RESULTS_DIR || true
# shellcheck disable=SC2317
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log $RESULTS_DIR || true
# shellcheck disable=SC2317
/cuttlefish/bin/stop_cvd -wait_for_launcher=10
}
# stop cuttlefish if the script ends prematurely or is interrupted
trap 'my_atexit' EXIT
trap 'exit 2' HUP INT PIPE TERM
ulimit -S -n 32768
# Clean up state of previous run
rm -rf /cuttlefish/cuttlefish
rm -rf /cuttlefish/.cache
rm -rf /cuttlefish/.cuttlefish_config.json
launch_cvd \
-daemon \
-verbosity=VERBOSE \
-file_verbosity=VERBOSE \
-use_overlay=false \
-enable_bootanimation=false \
-enable_minimal_mode=true \
-guest_enforce_security=false \
-report_anonymous_usage_stats=no \
-gpu_mode="$ANDROID_GPU_MODE" \
-cpus=${FDO_CI_CONCURRENT:-4} \
-memory_mb 8192 \
-kernel_path="$HOME/bzImage" \
-initramfs_path="$HOME/initramfs.img"
launch_cvd --verbosity=DEBUG --report_anonymous_usage_stats=n --cpus=8 --memory_mb=8192 --gpu_mode="$ANDROID_GPU_MODE" --daemon --enable_minimal_mode=true --guest_enforce_security=false --use_overlay=false
sleep 1
cd -
popd
adb connect vsock:3:5555
ADB="adb -s vsock:3:5555"
ADB=adb
$ADB root
$ADB wait-for-device root
sleep 1
$ADB shell echo Hi from Android
# shellcheck disable=SC2035
@@ -50,72 +91,145 @@ $ADB shell setenforce 0
# deqp
$ADB push /deqp/modules/egl/deqp-egl-android /data/.
$ADB push /deqp/assets/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-main.txt /data/
$ADB push /deqp-runner/deqp-runner /data/.
$ADB shell mkdir -p /data/deqp
$ADB push /deqp-gles/modules/egl/deqp-egl-android /data/deqp
$ADB push /deqp-gles/assets/gl_cts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-main.txt /data/deqp
$ADB push /deqp-vk/external/vulkancts/modules/vulkan/* /data/deqp
$ADB push /deqp-vk/mustpass/vk-main.txt.zst /data/deqp
$ADB push /deqp-tools/* /data/deqp
$ADB push /deqp-runner/deqp-runner /data/deqp
# download Android Mesa from S3
MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}.tar.zst
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL}
tar -xvf ${S3_ARTIFACT_NAME}.tar.zst
rm "${S3_ARTIFACT_NAME}.tar.zst" &
MESA_ANDROID_ARTIFACT_URL=https://${PIPELINE_ARTIFACTS_BASE}/${S3_ANDROID_ARTIFACT_NAME}.tar.zst
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -o ${S3_ANDROID_ARTIFACT_NAME}.tar.zst ${MESA_ANDROID_ARTIFACT_URL}
mkdir /mesa-android
tar -C /mesa-android -xvf ${S3_ANDROID_ARTIFACT_NAME}.tar.zst
rm "${S3_ANDROID_ARTIFACT_NAME}.tar.zst" &
$ADB push install/all-skips.txt /data/.
$ADB push install/$GPU_VERSION-flakes.txt /data/.
$ADB push install/deqp-$DEQP_SUITE.toml /data/.
INSTALL="/mesa-android/install"
$ADB push "$INSTALL/all-skips.txt" /data/deqp
$ADB push "$INSTALL/angle-skips.txt" /data/deqp
if [ -e "$INSTALL/$GPU_VERSION-flakes.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-flakes.txt" /data/deqp
fi
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-fails.txt" /data/deqp
fi
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
$ADB push "$INSTALL/$GPU_VERSION-skips.txt" /data/deqp
fi
$ADB push "$INSTALL/deqp-$DEQP_SUITE.toml" /data/deqp
# remove 32 bits libs from /vendor/lib
$ADB shell rm /vendor/lib/dri/${ANDROID_DRIVER}_dri.so
$ADB shell rm /vendor/lib/libglapi.so
$ADB shell rm /vendor/lib/egl/libGLES_mesa.so
$ADB shell rm -f /vendor/lib/libglapi.so
$ADB shell rm -f /vendor/lib/egl/libGLES_mesa.so
$ADB shell rm /vendor/lib/egl/libEGL_angle.so
$ADB shell rm /vendor/lib/egl/libEGL_emulation.so
$ADB shell rm /vendor/lib/egl/libGLESv1_CM_angle.so
$ADB shell rm /vendor/lib/egl/libGLESv1_CM_emulation.so
$ADB shell rm /vendor/lib/egl/libGLESv2_angle.so
$ADB shell rm /vendor/lib/egl/libGLESv2_emulation.so
$ADB shell rm -f /vendor/lib/egl/libEGL_angle.so
$ADB shell rm -f /vendor/lib/egl/libEGL_emulation.so
$ADB shell rm -f /vendor/lib/egl/libGLESv1_CM_angle.so
$ADB shell rm -f /vendor/lib/egl/libGLESv1_CM_emulation.so
$ADB shell rm -f /vendor/lib/egl/libGLESv2_angle.so
$ADB shell rm -f /vendor/lib/egl/libGLESv2_emulation.so
$ADB shell rm -f /vendor/lib/hw/vulkan.*
# replace on /vendor/lib64
$ADB push install/lib/dri/${ANDROID_DRIVER}_dri.so /vendor/lib64/dri/${ANDROID_DRIVER}_dri.so
$ADB push install/lib/libglapi.so /vendor/lib64/libglapi.so
$ADB push install/lib/libEGL.so /vendor/lib64/egl/libEGL_mesa.so
$ADB push "$INSTALL/lib/libgallium_dri.so" /vendor/lib64/libgallium_dri.so
$ADB push "$INSTALL/lib/libEGL.so" /vendor/lib64/egl/libEGL_mesa.so
$ADB push "$INSTALL/lib/libGLESv1_CM.so" /vendor/lib64/egl/libGLESv1_CM_mesa.so
$ADB push "$INSTALL/lib/libGLESv2.so" /vendor/lib64/egl/libGLESv2_mesa.so
$ADB shell rm /vendor/lib64/egl/libEGL_angle.so
$ADB shell rm /vendor/lib64/egl/libEGL_emulation.so
$ADB shell rm /vendor/lib64/egl/libGLESv1_CM_angle.so
$ADB shell rm /vendor/lib64/egl/libGLESv1_CM_emulation.so
$ADB shell rm /vendor/lib64/egl/libGLESv2_angle.so
$ADB shell rm /vendor/lib64/egl/libGLESv2_emulation.so
$ADB push "$INSTALL/lib/libvulkan_lvp.so" /vendor/lib64/hw/vulkan.lvp.so
$ADB push "$INSTALL/lib/libvulkan_virtio.so" /vendor/lib64/hw/vulkan.virtio.so
$ADB shell rm -f /vendor/lib64/egl/libEGL_emulation.so
$ADB shell rm -f /vendor/lib64/egl/libGLESv1_CM_emulation.so
$ADB shell rm -f /vendor/lib64/egl/libGLESv2_emulation.so
AOSP_RESULTS=/data/results
# Check what GLES implementation Surfaceflinger is using before copying the new mesa libraries
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
$ADB shell dumpsys SurfaceFlinger | grep GLES
# restart Android shell, so that surfaceflinger uses the new libraries
$ADB shell stop
$ADB shell start
# Check what GLES implementation Surfaceflinger is using after copying the new mesa libraries
while [ "$($ADB shell dumpsys SurfaceFlinger | grep GLES:)" = "" ] ; do sleep 1; done
MESA_RUNTIME_VERSION="$($ADB shell dumpsys SurfaceFlinger | grep GLES:)"
MESA_BUILD_VERSION=$(cat "$INSTALL/VERSION")
if ! printf "%s" "$MESA_RUNTIME_VERSION" | grep "${MESA_BUILD_VERSION}$"; then
echo "Fatal: Android is loading a wrong version of the Mesa3D libs: ${MESA_RUNTIME_VERSION}" 1>&2
exit 1
fi
BASELINE=""
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
BASELINE="--baseline /data/deqp/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
$ADB shell "touch /data/deqp/$GPU_VERSION-flakes.txt"
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/$GPU_VERSION-skips.txt"
fi
if [ -n "$USE_ANGLE" ]; then
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/angle-skips.txt"
fi
AOSP_RESULTS=/data/deqp/results
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
set +e
$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; ./deqp-runner \
$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; \
XDG_CACHE_HOME=/data/local/tmp \
./deqp-runner \
suite \
--suite /data/deqp-$DEQP_SUITE.toml \
--output $RESULTS \
--skips /data/all-skips.txt $DEQP_SKIPS \
--flakes /data/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp/executor/testlog-to-xml \
--suite /data/deqp/deqp-$DEQP_SUITE.toml \
--output $AOSP_RESULTS \
--skips /data/deqp/all-skips.txt $DEQP_SKIPS \
--flakes /data/deqp/$GPU_VERSION-flakes.txt \
--testlog-to-xml /data/deqp/testlog-to-xml \
--shader-cache-dir /data/local/tmp \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $(( CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS"
$BASELINE \
${DEQP_RUNNER_MAX_FAILS:+--max-fails \"$DEQP_RUNNER_MAX_FAILS\"} \
"
EXIT_CODE=$?
set -e
section_switch cuttlefish_results "cuttlefish: gathering the results"
$ADB pull $RESULTS $RESULTS_DIR
$ADB pull "$AOSP_RESULTS/." "$RESULTS_DIR"
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat $RESULTS_DIR
cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log $RESULTS_DIR
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log $RESULTS_DIR
# Remove all but the first 50 individual XML files uploaded as artifacts, to
# save fd.o space when you break everything.
find $RESULTS_DIR -name \*.xml | \
sort -n |
sed -n '1,+49!p' | \
xargs rm -f
# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
find $RESULTS_DIR -name \*.xml \
-exec cp /deqp-tools/testlog.css /deqp-tools/testlog.xsl "$RESULTS_DIR/" ";" \
-quit
$ADB shell "cd ${AOSP_RESULTS}/..; \
./deqp-runner junit \
--testsuite dEQP \
--results $AOSP_RESULTS/failures.csv \
--output $AOSP_RESULTS/junit.xml \
--limit 50 \
--template \"See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml\""
$ADB pull "$AOSP_RESULTS/junit.xml" "$RESULTS_DIR"
section_end cuttlefish_results
exit $EXIT_CODE

View File

@@ -38,69 +38,9 @@ findmnt -n tmpfs ${SHADER_CACHE_HOME} || findmnt -n tmpfs ${SHADER_CACHE_DIR} ||
mount -t tmpfs -o nosuid,nodev,size=2G,mode=1755 tmpfs ${SHADER_CACHE_DIR}
}
if [ -z "$DEQP_SUITE" ]; then
if [ -z "$DEQP_VER" ]; then
echo 'DEQP_SUITE must be set to the name of your deqp-gpu_version.toml, or DEQP_VER must be set to something like "gles2", "gles31-khr" or "vk" for the test run'
exit 1
fi
DEQP_WIDTH=${DEQP_WIDTH:-256}
DEQP_HEIGHT=${DEQP_HEIGHT:-256}
DEQP_CONFIG=${DEQP_CONFIG:-rgba8888d24s8ms0}
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-width=$DEQP_WIDTH --deqp-surface-height=$DEQP_HEIGHT"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-type=${DEQP_SURFACE_TYPE:-pbuffer}"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-gl-config-name=$DEQP_CONFIG"
DEQP_OPTIONS="$DEQP_OPTIONS --deqp-visibility=hidden"
if [ "$DEQP_VER" = "vk" ] && [ -z "$VK_DRIVER" ]; then
echo 'VK_DRIVER must be to something like "radeon" or "intel" for the test run'
exit 1
fi
# Generate test case list file.
if [ "$DEQP_VER" = "vk" ]; then
MUSTPASS=/deqp/mustpass/vk-main.txt.zst
DEQP=/deqp/external/vulkancts/modules/vulkan/deqp-vk
elif [ "$DEQP_VER" = "gles2" ] || [ "$DEQP_VER" = "gles3" ] || [ "$DEQP_VER" = "gles31" ] || [ "$DEQP_VER" = "egl" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt.zst
DEQP=/deqp/modules/$DEQP_VER/deqp-$DEQP_VER
elif [ "$DEQP_VER" = "gles2-khr" ] || [ "$DEQP_VER" = "gles3-khr" ] || [ "$DEQP_VER" = "gles31-khr" ] || [ "$DEQP_VER" = "gles32-khr" ]; then
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt.zst
DEQP=/deqp/external/openglcts/modules/glcts
else
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt.zst
DEQP=/deqp/external/openglcts/modules/glcts
fi
[ -z "${DEQP_FRACTION:-}" ] && DEQP_FRACTION=1
[ -z "${CI_NODE_INDEX:-}" ] && CI_NODE_INDEX=1
[ -z "${CI_NODE_TOTAL:-}" ] && CI_NODE_TOTAL=1
# This ugly sed expression does a single pass across the case list to take
# into account the global fraction and sharding.
#
# First, we select only every n'th line, according to DEQP_FRACTION; for a
# fraction of 3, it will select lines 1, 4, 7, 10, etc.
#
# Then, we select $CI_NODE_INDEX/$CI_NODE_TOTAL for sharding; for a two-way
# shard, the first node will select lines 1 and 7, and the second node will
# select lines 4 and 10.
#
# Sharding like this gives us the best coverage, as sequential tests often
# test very slightly different permutations of the same functionality. So
# by distributing our skips as widely across the set as possible, rather
# than grouping them together, we get the broadest coverage.
zstd -d $MUSTPASS -c | sed -n "$(((CI_NODE_INDEX - 1) * DEQP_FRACTION + 1))~$((DEQP_FRACTION * CI_NODE_TOTAL))p" > /tmp/case-list.txt
if [ ! -s /tmp/case-list.txt ]; then
echo "Caselist generation failed"
exit 1
fi
fi
BASELINE=""
if [ -e "$INSTALL/$GPU_VERSION-fails.txt" ]; then
DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --baseline $INSTALL/$GPU_VERSION-fails.txt"
BASELINE="--baseline $INSTALL/$GPU_VERSION-fails.txt"
fi
# Default to an empty known flakes file if it doesn't exist.
@@ -139,15 +79,6 @@ if [ -n "$USE_ANGLE" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/angle-skips.txt"
fi
if [ -n "$VK_DRIVER" ] && [ -z "$DEQP_SUITE" ]; then
# Bump the number of tests per group to reduce the startup time of VKCTS.
DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --tests-per-group ${DEQP_RUNNER_TESTS_PER_GROUP:-5000}"
fi
if [ -n "${DEQP_RUNNER_MAX_FAILS:-}" ]; then
DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --max-fails ${DEQP_RUNNER_MAX_FAILS}"
fi
# Set the path to VK validation layer settings (in case it ends up getting loaded)
# Note: If you change the format of this filename, look through the rest of the
# tree for other places that need to be kept in sync (e.g.
@@ -174,60 +105,37 @@ if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
sleep 1
fi
if [ -z "$DEQP_SUITE" ]; then
if [ -n "$DEQP_EXPECTED_RENDERER" ]; then
export DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --renderer-check $DEQP_EXPECTED_RENDERER"
fi
if [ $DEQP_VER != vk ] && [ $DEQP_VER != egl ]; then
VER=$(sed 's/[() ]/./g' "$INSTALL/VERSION")
export DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --version-check $VER"
fi
fi
uncollapsed_section_switch deqp "deqp: deqp-runner"
# Print the detailed version with the list of backports and local patches
{ set +x; } 2>/dev/null
for api in vk gl gles; do
deqp_version_log=/deqp/version-$api
for api in vk-main vk gl gles; do
deqp_version_log=/deqp-$api/deqp-$api-version
if [ -r "$deqp_version_log" ]; then
cat "$deqp_version_log"
fi
done
set -x
# If you change the format of the suite toml filenames or the
# $GPU_VERSION-{fails,flakes,skips}.txt filenames, look through the rest
# of the tree for other places that need to be kept in sync (e.g.
# src/**/ci/gitlab-ci*.yml)
set +e
deqp-runner -V
if [ -z "$DEQP_SUITE" ]; then
deqp-runner \
run \
--deqp $DEQP \
--output $RESULTS_DIR \
--caselist /tmp/case-list.txt \
--skips $INSTALL/all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp/executor/testlog-to-xml \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS \
-- \
$DEQP_OPTIONS; DEQP_EXITCODE=$?
else
# If you change the format of the suite toml filenames or the
# $GPU_VERSION-{fails,flakes,skips}.txt filenames, look through the rest
# of the tree for other places that need to be kept in sync (e.g.
# src/**/ci/gitlab-ci*.yml)
deqp-runner \
suite \
--suite $INSTALL/deqp-$DEQP_SUITE.toml \
--output $RESULTS_DIR \
--skips $INSTALL/all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp/executor/testlog-to-xml \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $((CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS; DEQP_EXITCODE=$?
fi
deqp-runner \
suite \
--suite $INSTALL/deqp-$DEQP_SUITE.toml \
--output $RESULTS_DIR \
--skips $INSTALL/all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
--testlog-to-xml /deqp-tools/testlog-to-xml \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $((CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$BASELINE \
${DEQP_RUNNER_MAX_FAILS:+--max-fails "$DEQP_RUNNER_MAX_FAILS"} \
${DEQP_FORCE_ASAN:+--env LD_PRELOAD=libasan.so.8:/install/lib/libdlclose-skip.so}; DEQP_EXITCODE=$?
{ set +x; } 2>/dev/null
@@ -247,7 +155,7 @@ find $RESULTS_DIR -name \*.xml | \
# If any QPA XMLs are there, then include the XSL/CSS in our artifacts.
find $RESULTS_DIR -name \*.xml \
-exec cp /deqp/testlog.css /deqp/testlog.xsl "$RESULTS_DIR/" ";" \
-exec cp /deqp-tools/testlog.css /deqp-tools/testlog.xsl "$RESULTS_DIR/" ";" \
-quit
deqp-runner junit \

View File

@@ -0,0 +1,113 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
set -uex -o pipefail
if [ -z "$GPU_VERSION" ]; then
echo 'GPU_VERSION must be set to something like "radeonsi-raven" or "freedreno-a630" (the name used in your ci/gpu-version-*.txt)'
exit 1
fi
if [ -z "$FLUSTER_CODECS" ]; then
echo 'FLUSTER_CODECS must be set to a space sparated list of codecs like "VP8" or "H.265"'
exit 1
fi
# Check which fluster vectors to get
FLUSTER_VECTORS_HOST_PATH="${STORAGE_MAINLINE_HOST_PATH}/fluster/${FLUSTER_VECTORS_VERSION}"
if [ "$CI_PROJECT_PATH" != "$FDO_UPSTREAM_REPO" ]; then
if ! curl -s -X HEAD -L --retry 4 -f --retry-delay 60 "https://${FLUSTER_VECTORS_HOST_PATH}/done"; then
echo "Using Fluster vectors from the fork, cached from mainline is unavailable."
FLUSTER_VECTORS_HOST_PATH="${STORAGE_FORK_HOST_PATH}/fluster/${FLUSTER_VECTORS_VERSION}"
else
echo "Using the cached Fluster vectors."
fi
fi
FLUSTER_VECTORS_HOST_PATH="${FDO_HTTP_CACHE_URI:-}https://${FLUSTER_VECTORS_HOST_PATH}/vectors.tar.zst"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 ${FLUSTER_VECTORS_HOST_PATH} | tar --zstd -x -C /usr/local/
INSTALL="$PWD/install"
# Set up the driver environment.
export LD_LIBRARY_PATH="$INSTALL/lib/"
export LIBVA_DRIVERS_PATH=$INSTALL/lib/dri/
# libva spams driver open info by default, and that happens per testcase.
export LIBVA_MESSAGING_LEVEL=1
RESULTS=$PWD/${FLUSTER_RESULTS_DIR:-results}
mkdir -p $RESULTS
if [ -n "${FLUSTER_FRACTION:-}" ] || [ -n "$CI_NODE_INDEX" ]; then
FRACTION=$((${FLUSTER_FRACTION:-1} * ${CI_NODE_TOTAL:-1}))
FLUSTER_RUNNER_OPTIONS="${FLUSTER_RUNNER_OPTIONS:-} --fraction $FRACTION"
fi
# If the job is parallel at the gitab job level, take the corresponding fraction
# of the caselist.
if [ -n "$CI_NODE_INDEX" ]; then
FLUSTER_RUNNER_OPTIONS="${FLUSTER_RUNNER_OPTIONS:-} --fraction-start ${CI_NODE_INDEX}"
fi
for codec in ${FLUSTER_CODECS}; do
DECODERS="${DECODERS:-} GStreamer-${codec}-VAAPI-Gst1.0"
done
# Default to an empty known flakes file if it doesn't exist.
FLUSTER_FLAKES=$INSTALL/$GPU_VERSION-fluster-flakes.txt
touch ${FLUSTER_FLAKES}
# Default to an empty known fails file if it doesn't exist.
FLUSTER_FAILS=$INSTALL/$GPU_VERSION-fluster-fails.txt
touch ${FLUSTER_FAILS}
# Default to an empty known skips file if it doesn't exist.
FLUSTER_SKIPS=$INSTALL/$GPU_VERSION-fluster-skips.txt
touch ${FLUSTER_SKIPS}
set +e
fluster-runner \
run \
--fluster /usr/local/fluster/fluster.py \
--output ${RESULTS} \
--jobs ${FDO_CI_CONCURRENT:-4} \
--skips ${FLUSTER_SKIPS} \
--flakes ${FLUSTER_FLAKES} \
--baseline ${FLUSTER_FAILS} \
--decoders ${DECODERS} \
${FLUSTER_RUNNER_OPTIONS} \
-v -v
FLUSTER_EXITCODE=$?
set -e
# Report the flakes to the IRC channel for monitoring (if configured):
if [ -n "${FLAKES_CHANNEL:-}" ]; then
python3 $INSTALL/report-flakes.py \
--host irc.oftc.net \
--port 6667 \
--results $RESULTS/results.csv \
--known-flakes ${FLUSTER_FLAKES} \
--channel "$FLAKES_CHANNEL" \
--runner "$CI_RUNNER_DESCRIPTION" \
--job "$CI_JOB_ID" \
--url "$CI_JOB_URL" \
--branch "${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-$CI_COMMIT_BRANCH}" \
--branch-title "${CI_MERGE_REQUEST_TITLE:-$CI_COMMIT_TITLE}" || true
fi
deqp-runner junit \
--testsuite "fluster-${FLUSTER_CODECS// /-}" \
--results $RESULTS/results.csv \
--output $RESULTS/junit.xml \
--template "See https://$CI_PROJECT_ROOT_NAMESPACE.pages.freedesktop.org/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/results/{{testcase}}.xml"
# Compress results.csv to save on bandwidth during the upload of artifacts to
# GitLab.
zstd --rm -T0 -8qc $RESULTS/results.csv -o $RESULTS/results.csv.zst
exit $FLUSTER_EXITCODE

View File

@@ -13,10 +13,10 @@
variables:
DEBIAN_X86_64_BUILD_BASE_IMAGE: "debian/x86_64_build-base"
DEBIAN_BASE_TAG: "20241106-wlproto2"
DEBIAN_BASE_TAG: "20250130-vvless"
DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
DEBIAN_BUILD_TAG: "20241106-wlproto2"
DEBIAN_BUILD_TAG: "20250128-llvm19-up"
DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base"
DEBIAN_ARM64_TEST_BASE_IMAGE: "debian/arm64_test-base"
@@ -27,20 +27,23 @@ variables:
DEBIAN_ARM64_TEST_IMAGE_VK_PATH: "debian/arm64_test-vk"
DEBIAN_X86_64_TEST_ANDROID_IMAGE_PATH: "debian/x86_64_test-android"
DEBIAN_TEST_ANDROID_TAG: "20241106-wlproto2"
DEBIAN_TEST_GL_TAG: "20241106-wlproto2"
DEBIAN_TEST_VK_TAG: "20241107-setup"
KERNEL_ROOTFS_TAG: "20241107-setup"
DEBIAN_TEST_ANDROID_TAG: "20250130-vvless"
DEBIAN_TEST_GL_TAG: "20250327-piglit-250"
DEBIAN_TEST_VK_TAG: "20250327-piglit-250"
KERNEL_ROOTFS_TAG: "20250327-trace-250"
DEBIAN_PYUTILS_IMAGE: "debian/x86_64_pyutils"
DEBIAN_PYUTILS_TAG: "20241002-pyutils"
DEBIAN_PYUTILS_TAG: "20250129-lavacli"
ALPINE_X86_64_BUILD_TAG: "20241106-wlproto2"
ALPINE_X86_64_LAVA_SSH_TAG: "20241106-wlproto2"
FEDORA_X86_64_BUILD_TAG: "20241106-wlproto2"
KERNEL_TAG: "v6.6.21-mesa-f8ea"
ALPINE_X86_64_BUILD_TAG: "20250128-llversionm"
ALPINE_X86_64_LAVA_SSH_TAG: "20250124-spirv-tools"
FEDORA_X86_64_BUILD_TAG: "20250128-llversionm"
KERNEL_TAG: "v6.13-rc4-mesa-5e77"
KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "bca9635d"
PKG_REPO_REV: "95bf62c"
FLUSTER_VECTORS_VERSION: "5"
WINDOWS_X64_MSVC_PATH: "windows/x86_64_msvc"
WINDOWS_X64_MSVC_TAG: "20240827-v143"

View File

@@ -18,10 +18,12 @@ variables:
JOB_ROOTFS_OVERLAY_PATH: "${JOB_ARTIFACTS_BASE}/job-rootfs-overlay.tar.gz"
JOB_RESULTS_PATH: "${JOB_ARTIFACTS_BASE}/results.tar.zst"
LAVA_S3_ARTIFACT_NAME: "mesa-${ARCH}-default-debugoptimized"
S3_ARTIFACT_NAME: "mesa-python-test"
S3_ARTIFACT_NAME: "mesa-python-ci-artifacts"
S3_RESULTS_UPLOAD: "${JOB_ARTIFACTS_BASE}"
PIGLIT_NO_WINDOW: 1
VISIBILITY_GROUP: "Collabora+fdo"
STORAGE_MAINLINE_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${FDO_UPSTREAM_REPO}/${DATA_STORAGE_PATH}"
STORAGE_FORK_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${CI_PROJECT_PATH}/${DATA_STORAGE_PATH}"
before_script:
- !reference [.download_s3, before_script]
script:
@@ -46,7 +48,7 @@ variables:
artifacts: false
- job: debian/x86_64_pyutils
artifacts: false
- job: python-test
- job: python-artifacts
artifacts: false
.lava-test:arm32:
@@ -157,12 +159,12 @@ variables:
- .lava-piglit
- .lava-traces-base
.lava-piglit:x86_64:
extends:
- .lava-test:x86_64
- .lava-piglit
.lava-fluster:
variables:
FLUSTER_RESULTS: "${GPU_VERSION}-${FLUSTER_CODEC}"
HWCI_TEST_SCRIPT: "/install/fluster/fluster-runner.sh"
.lava-piglit:arm64:
.lava-fluster:x86_64:
extends:
- .lava-test:arm64
- .lava-piglit
- .lava-fluster

View File

@@ -48,14 +48,11 @@ rm -rf results
mkdir -p results/job-rootfs-overlay/
artifacts/ci-common/generate-env.sh > results/job-rootfs-overlay/set-job-env-vars.sh
cp artifacts/ci-common/capture-devcoredump.sh results/job-rootfs-overlay/
cp artifacts/ci-common/init-*.sh results/job-rootfs-overlay/
cp artifacts/ci-common/intel-gpu-freq.sh results/job-rootfs-overlay/
cp artifacts/ci-common/kdl.sh results/job-rootfs-overlay/
cp "$SCRIPTS_DIR"/setup-test-env.sh results/job-rootfs-overlay/
tar zcf job-rootfs-overlay.tar.gz -C results/job-rootfs-overlay/ .
ci-fairy s3cp --token-file "${S3_JWT_FILE}" job-rootfs-overlay.tar.gz "https://${JOB_ROOTFS_OVERLAY_PATH}"
s3_upload job-rootfs-overlay.tar.gz "https://${JOB_ARTIFACTS_BASE}"
# Prepare env vars for upload.
section_switch variables "Environment variables passed through to device:"
@@ -69,7 +66,7 @@ PYTHONPATH=artifacts/ artifacts/lava/lava_job_submitter.py \
--farm "${FARM}" \
--device-type "${DEVICE_TYPE}" \
--boot-method "${BOOT_METHOD}" \
--job-timeout-min ${JOB_TIMEOUT:-30} \
--job-timeout-min $((CI_JOB_TIMEOUT/60 - 5)) \
--dump-yaml \
--pipeline-info "$CI_JOB_NAME: $CI_PIPELINE_URL on $CI_COMMIT_REF_NAME ${CI_NODE_INDEX}/${CI_NODE_TOTAL}" \
--rootfs-url "${ROOTFS_URL}" \

View File

@@ -103,20 +103,22 @@ def raise_exception_from_metadata(metadata: dict, job_id: int) -> None:
if "result" not in metadata or metadata["result"] != "fail":
return
if "error_type" in metadata:
error_type = metadata["error_type"]
if error_type == "Infrastructure":
raise MesaCIRetriableException(
f"LAVA job {job_id} failed with Infrastructure Error. Retry."
)
error_type: str = metadata["error_type"]
error_msg: str = metadata.get("error_msg", "")
full_err_msg: str = error_type if not error_msg else f"{error_type}: {error_msg}"
if error_type == "Job":
# This happens when LAVA assumes that the job cannot terminate or
# with mal-formed job definitions. As we are always validating the
# jobs, only the former is probable to happen. E.g.: When some LAVA
# action timed out more times than expected in job definition.
raise MesaCIRetriableException(
f"LAVA job {job_id} failed with JobError "
f"LAVA job {job_id} failed with {full_err_msg}. Retry."
"(possible LAVA timeout misconfiguration/bug). Retry."
)
if error_type:
raise MesaCIRetriableException(
f"LAVA job {job_id} failed with error type: {full_err_msg}. Retry."
)
if "case" in metadata and metadata["case"] == "validate":
raise MesaCIRetriableException(
f"LAVA job {job_id} failed validation (possible download error). Retry."

View File

@@ -35,7 +35,10 @@ class LAVAJob:
self._is_finished = False
self.log: dict[str, Any] = log
self.status = "not_submitted"
self._exit_code = None
# Set the default exit code to 1 because we should set it to 0 only if the job has passed.
# If it fails or if it is interrupted, the exit code should be set to a non-zero value to
# make the GitLab job fail.
self._exit_code: int = 1
self.__exception: Optional[Exception] = None
def heartbeat(self) -> None:

View File

@@ -162,6 +162,16 @@ class LAVAJobDefinition:
"minutes": 5
* NUMBER_OF_ATTEMPTS_LAVA_BOOT,
},
"uboot-action": {
# For rockchip DUTs, U-Boot auto-login action downloads the kernel and
# setup early network. This takes 72 seconds on average.
# The LAVA action that wraps it is `uboot-commands`, but we can't set a
# timeout for it directly, it is overridden by one third of `uboot-action`
# timeout.
# So actually, this timeout is here to enforce that `uboot-commands`
# timeout to be 100 seconds (300 sec / 3), which is more than enough.
"minutes": 5
},
},
},
}

View File

@@ -35,9 +35,13 @@ LAVA_QUEUE_TIMEOUT = int(getenv("LAVA_QUEUE_TIMEOUT", 60))
# the enqueue delay.
LAVA_BOOT_TIMEOUT = int(getenv("LAVA_BOOT_TIMEOUT", 9))
# Estimated overhead in minutes for a job from GitLab to reach the test phase,
# including LAVA scheduling and boot duration
LAVA_TEST_OVERHEAD_MIN = 5
# Test DUT suite phase is where the initialization happens in DUT, not on docker.
# The device will be listening to SSH session until the end of the job.
LAVA_TEST_DUT_SUITE_TIMEOUT = int(getenv("JOB_TIMEOUT", 60))
LAVA_TEST_DUT_SUITE_TIMEOUT = int(getenv("CI_JOB_TIMEOUT")) // 60 - LAVA_TEST_OVERHEAD_MIN
# Test suite phase is where the initialization happens on docker.
LAVA_TEST_SUITE_TIMEOUT = int(getenv("LAVA_TEST_SUITE_TIMEOUT", 5))
@@ -45,7 +49,7 @@ LAVA_TEST_SUITE_TIMEOUT = int(getenv("LAVA_TEST_SUITE_TIMEOUT", 5))
# Test cases may take a long time, this script has no right to interrupt
# them. But if the test case takes almost 1h, it will never succeed due to
# Gitlab job timeout.
LAVA_TEST_CASE_TIMEOUT = int(getenv("JOB_TIMEOUT", 60))
LAVA_TEST_CASE_TIMEOUT = int(getenv("CI_JOB_TIMEOUT")) // 60 - LAVA_TEST_OVERHEAD_MIN
# LAVA post processing may refer to a test suite teardown, or the
# adjustments to start the next test_case

View File

@@ -68,7 +68,7 @@ EOF
ping -c 5 -w 60 $(lava-target-ip)
lava_ssh_test_case() {
set -x
set -ex
local test_case="${1}"
shift
lava-test-case \"${test_case}\" --shell \\
@@ -170,7 +170,7 @@ def generate_docker_test(
# maintainers with monitoring
f"lava_ssh_test_case '{args.project_name}_{args.mesa_job_name}' "
# Changing directory to /, as the HWCI_SCRIPT expects that
"'\"cd / && /init-stage2.sh\"'",
"'cd / && /init-stage2.sh'",
]
return init_stages_test

View File

@@ -10,15 +10,25 @@ section_switch meson-cross-file "meson: cross file generate"
set -e
set -o xtrace
comma_separated() {
local IFS=,
echo "$*"
}
no_werror() {
# shellcheck disable=SC2048
for i in $*; do
echo "-D${i}:werror=false "
done
}
CROSS_FILE=/cross_file-"$CROSS".txt
export PATH=$PATH:$PWD/.gitlab-ci/build
touch native.file
printf > native.file "%s\n" \
"[binaries]" \
"c = 'compiler-wrapper-${CC:-gcc}.sh'" \
"cpp = 'compiler-wrapper-${CXX:-g++}.sh'"
"[binaries]"
# We need to control the version of llvm-config we're using, so we'll
# tweak the cross file or generate a native file to do so.
@@ -127,22 +137,42 @@ else
MAX_LD=${FDO_CI_CONCURRENT:-4}
fi
# these are built as Meson subprojects; we want to use Meson's
# --force-fallback-for to ensure that we build the subprojects from their wrap
# files, and we also want to disable Werror on those, since we do not control
# these projects and making them warning-free is not our goal.
# shellcheck disable=2206
meson_subprojects=(
perfetto
syn
paste
pest
pest_derive
pest_generator
pest_meta
roxmltree
indexmap
${FORCE_FALLBACK_FOR:-}
)
section_switch meson-configure "meson: configure"
rm -rf _build
# shellcheck disable=SC2046
meson setup _build \
--native-file=native.file \
--wrap-mode=nofallback \
--force-fallback-for perfetto,syn,paste,pest,pest_derive,pest_generator,pest_meta,roxmltree,indexmap \
--force-fallback-for "$(comma_separated "${meson_subprojects[@]}")" \
$(no_werror "${meson_subprojects[@]}") \
${CROSS+--cross "$CROSS_FILE"} \
-D prefix=$PWD/install \
-D libdir=lib \
-D buildtype=${BUILDTYPE:?} \
-D build-tests=true \
-D build-tests=${RUN_MESON_TESTS} \
-D c_args="$(echo -n $C_ARGS)" \
-D c_link_args="$(echo -n $C_LINK_ARGS)" \
-D c_link_args="$(echo -n $C_LINK_ARGS) -Wl,--fatal-warnings" \
-D cpp_args="$(echo -n $CPP_ARGS)" \
-D cpp_link_args="$(echo -n $CPP_LINK_ARGS)" \
-D cpp_link_args="$(echo -n $CPP_LINK_ARGS) -Wl,--fatal-warnings" \
-D enable-glcpp-tests=false \
-D libunwind=${UNWIND} \
${DRI_LOADERS} \
@@ -160,20 +190,14 @@ meson configure
uncollapsed_section_switch meson-build "meson: build"
if command -V mold &> /dev/null ; then
mold --run ninja
else
ninja
ninja
if [ "${RUN_MESON_TESTS}" = "true" ]; then
uncollapsed_section_switch meson-test "meson: test"
LC_ALL=C.UTF-8 meson test --num-processes "${FDO_CI_CONCURRENT:-4}" --print-errorlogs ${MESON_TEST_ARGS}
fi
uncollapsed_section_switch meson-test "meson: test"
LC_ALL=C.UTF-8 meson test --num-processes "${FDO_CI_CONCURRENT:-4}" --print-errorlogs ${MESON_TEST_ARGS}
section_switch meson-install "meson: install"
if command -V mold &> /dev/null ; then
mold --run ninja install
else
ninja install
fi
ninja install
cd ..
section_end meson-install

View File

@@ -13,7 +13,6 @@ set -ex
export PAGER=cat # FIXME: export everywhere
INSTALL=$(realpath -s "$PWD"/install)
S3_ARGS="--token-file ${S3_JWT_FILE}"
export PIGLIT_REPLAY_DESCRIPTION_FILE="$INSTALL/$PIGLIT_TRACES_FILE"
@@ -120,7 +119,7 @@ replay_s3_upload_images() {
fi
__S3_PATH="$PIGLIT_REPLAY_REFERENCE_IMAGES_BASE"
__DESTINATION_FILE_PATH="${line##*-}"
if curl -L -s -I "https://${__S3_PATH}/${__DESTINATION_FILE_PATH}" | grep -q "content-type: application/octet-stream" 2>/dev/null; then
if curl --fail -L -s -I "https://${__S3_PATH}/${__DESTINATION_FILE_PATH}" | grep -q "content-type: application/octet-stream" 2>/dev/null; then
continue
fi
else
@@ -128,8 +127,7 @@ replay_s3_upload_images() {
__DESTINATION_FILE_PATH="$__S3_TRACES_PREFIX/${line##*-}"
fi
ci-fairy s3cp $S3_ARGS "$RESULTS_DIR/$__PREFIX/$line" \
"https://${__S3_PATH}/${__DESTINATION_FILE_PATH}"
s3_upload "$RESULTS_DIR/$__PREFIX/$line" "https://${__S3_PATH}/${__DESTINATION_FILE_PATH%/*}"
done
}
@@ -169,7 +167,9 @@ rm -rf replayer-db
if [ -n "$PIGLIT_REPLAY_ANGLE_TAG" ]; then
ARCH="amd64"
FILE="angle-bin-${ARCH}-${PIGLIT_REPLAY_ANGLE_TAG}.tar.zst"
ci-fairy s3cp $S3_ARGS "https://s3.freedesktop.org/mesa-tracie-private/${FILE}" "${FILE}"
curl --location --fail --retry-all-errors --retry 4 --retry-delay 60 \
--header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
"https://s3.freedesktop.org/mesa-tracie-private/${FILE}" --output "${FILE}"
mkdir -p replayer-db/angle
tar --zstd -xf ${FILE} -C replayer-db/angle/
fi

View File

@@ -53,7 +53,7 @@ if [ -n "$S3_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage
S3_ARTIFACT_TAR="$S3_ARTIFACT_NAME.tar.zst"
tar cv artifacts/ | zstd -o "${S3_ARTIFACT_TAR}"
ci-fairy s3cp --token-file "${S3_JWT_FILE}" "${S3_ARTIFACT_TAR}" "https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_TAR}"
s3_upload "${S3_ARTIFACT_TAR}" "https://${PIPELINE_ARTIFACTS_BASE}/"
rm "${S3_ARTIFACT_TAR}"
fi

View File

@@ -36,6 +36,7 @@ echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" > install/VERSION
cp -Rp .gitlab-ci/bare-metal install/
cp -Rp .gitlab-ci/common install/
cp -Rp .gitlab-ci/piglit install/
cp -Rp .gitlab-ci/fluster install/
cp -Rp .gitlab-ci/fossils.yml install/
cp -Rp .gitlab-ci/fossils install/
cp -Rp .gitlab-ci/fossilize-runner.sh install/
@@ -83,7 +84,7 @@ if [ -n "$S3_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage
S3_ARTIFACT_NAME="$S3_ARTIFACT_NAME.tar.zst"
zstd --quiet --threads ${FDO_CI_CONCURRENT:-0} artifacts/install.tar -o ${S3_ARTIFACT_NAME}
ci-fairy s3cp --token-file "${S3_JWT_FILE}" ${S3_ARTIFACT_NAME} https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME}
s3_upload "${S3_ARTIFACT_NAME}" "https://${PIPELINE_ARTIFACTS_BASE}/"
fi
section_end prepare-artifacts

View File

@@ -7,33 +7,46 @@
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
# shellcheck disable=SC2086 # quoting PYTEST_VERBOSE makes us pass an empty path
. "${SCRIPTS_DIR}/setup-test-env.sh"
set -eu
section_start pytest_setup "Setting up pytest environment"
PYTHON_BIN="python3.11"
set -exu
if [ -z "${SCRIPTS_DIR:-}" ]; then
SCRIPTS_DIR="$(dirname "${0}")"
fi
if [ -z "${CI_JOB_STARTED_AT:-}" ]; then
CI_JOB_STARTED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ) # isoformat
fi
source "${SCRIPTS_DIR}/setup-test-env.sh"
if [ -z "${CI_PROJECT_DIR:-}" ]; then
CI_PROJECT_DIR="$(dirname "${0}")/../"
fi
if [ -z "${MESA_PYTEST_VENV:-}" ]; then
MESA_PYTEST_VENV="${CI_PROJECT_DIR}/.venv-pytest"
if [ -z "${CI_JOB_TIMEOUT:-}" ]; then
# Export this default value, 1 hour in seconds, to test the lava job submitter
export CI_JOB_TIMEOUT=3600
fi
# Use this script in a python virtualenv for isolation
python3 -m venv "${MESA_PYTEST_VENV}"
. "${MESA_PYTEST_VENV}"/bin/activate
python3 -m pip install --break-system-packages -r "${CI_PROJECT_DIR}/bin/ci/requirements.txt"
python3 -m pip install --break-system-packages -r "${CI_PROJECT_DIR}/bin/ci/test/requirements.txt"
# If running outside of the debian/x86_64_pyutils container,
# run in a virtual environment for isolation
# e.g. USE_VENV=true ./.gitlab-ci/run-pytest.sh
if [ "${USE_VENV:-}" == true ]; then
echo "Setting up virtual environment for local testing."
MESA_PYTEST_VENV="${CI_PROJECT_DIR}/.venv-pytest"
${PYTHON_BIN} -m venv "${MESA_PYTEST_VENV}"
source "${MESA_PYTEST_VENV}"/bin/activate
${PYTHON_BIN} -m pip install --break-system-packages -r "${CI_PROJECT_DIR}/bin/ci/test/requirements.txt"
fi
LIB_TEST_DIR=${CI_PROJECT_DIR}/.gitlab-ci/tests
SCRIPT_TEST_DIR=${CI_PROJECT_DIR}/bin/ci
uncollapsed_section_switch pytest "Running pytest"
uncollapsed_section_start pytest "Running pytest"
PYTHONPATH="${LIB_TEST_DIR}:${SCRIPT_TEST_DIR}:${PYTHONPATH:-}" python3 -m \
PYTHONPATH="${LIB_TEST_DIR}:${SCRIPT_TEST_DIR}:${PYTHONPATH:-}" ${PYTHON_BIN} -m \
pytest "${LIB_TEST_DIR}" "${SCRIPT_TEST_DIR}" \
-W ignore::DeprecationWarning \
--junitxml=artifacts/ci_scripts_report.xml \
@@ -41,3 +54,9 @@ PYTHONPATH="${LIB_TEST_DIR}:${SCRIPT_TEST_DIR}:${PYTHONPATH:-}" python3 -m \
${PYTEST_VERBOSE:-}
section_end pytest
section_start flake8 "flake8"
${PYTHON_BIN} -m flake8 \
--config "${CI_PROJECT_DIR}/.gitlab-ci/.flake8" \
"${LIB_TEST_DIR}" "${SCRIPT_TEST_DIR}"
section_end flake8

View File

@@ -111,7 +111,7 @@ export -f _uncollapsed_section_switch
[ -n "${XDG_RUNTIME_DIR:-}" ] || export XDG_RUNTIME_DIR="$(mktemp -p "$PWD" -d xdg-runtime-XXXXXX)"
if [ -z "${RESULTS_DIR:-}" ]; then
export RESULTS_DIR="$(pwd)/results"
export RESULTS_DIR="${PWD%/}/results"
if [ -e "${RESULTS_DIR}" ]; then
rm -rf "${RESULTS_DIR}"
fi
@@ -119,7 +119,6 @@ if [ -z "${RESULTS_DIR:-}" ]; then
fi
function error {
x_off 2>/dev/null
RED="\e[0;31m"
ENDCOLOR="\e[0m"
# we force the following to be not in a section
@@ -134,11 +133,28 @@ function error {
}
function trap_err {
x_off
error ${CURRENT_SECTION:-'unknown-section'}: ret code: $*
}
export -f error
export -f trap_err
s3_upload() {
x_off
local file=$1 s3_folder_url=$2
if [ ! -f "$file" ] || [[ "$s3_folder_url" != https://* ]]
then
echo "s3_upload used incorrectly: first argument is the file, second argument is the s3 folder url"
exit 1
fi
curl --fail --retry-all-errors --retry 4 --retry-delay 60 \
--header "Authorization: Bearer $(cat "${S3_JWT_FILE}")" \
-X PUT --form file=@"$file" \
"$s3_folder_url"
x_restore
}
export -f s3_upload
set -E
trap 'trap_err $?' ERR

View File

@@ -40,7 +40,7 @@
.restricted-rules:
rules:
# If the triggerer has access to the restricted traces and if it is pre-merge
- if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu|okias|gallo|kwg|llanderwelin|zmike|vigneshraman)$/") &&
- if: '($GITLAB_USER_LOGIN !~ "/^(robclark|anholt|flto|cwabbott0|Danil|tomeu|okias|gallo|kwg|llanderwelin|zmike|vigneshraman|Valentine)$/") &&
($GITLAB_USER_LOGIN != "marge-bot" || $CI_COMMIT_BRANCH)'
when: never
@@ -122,7 +122,7 @@
LAVA_TAGS: "cbg-0"
# Ensure that we are using the release build artifact
LAVA_S3_ARTIFACT_NAME: mesa-${ARCH}-default-release
S3_ARTIFACT_NAME: mesa-python-test
S3_ARTIFACT_NAME: mesa-python-ci-artifacts
# Reset dependencies in performance jobs to enforce the release build artifact
dependencies: null
# Don't run in parallel. It is okay to performance jobs to take a little

View File

@@ -13,7 +13,7 @@
- section_end ldd_section
artifacts:
when: always
name: "mesa_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
paths:
- results/
rules:
@@ -43,34 +43,50 @@ rustfmt:
- rustfmt --version
- rustfmt --verbose src/**/lib.rs
yaml-toml-shell-test:
yaml-toml-shell-py-test:
extends:
- python-test
- .use-debian/x86_64_pyutils
- .no-auto-retry # this job can't be flaky
stage: code-validation
script:
- uncollapsed_section_start tomllint "tomllint"
- echo "If your change looks right but this script rejects it, contact @eric (GitLab) / eric_engestrom (IRC)."
- python3 bin/toml_lint.py
- uncollapsed_section_switch yamllint "yamllint"
- section_end tomllint
- section_start yamllint "yamllint"
- .gitlab-ci/run-yamllint.sh
- uncollapsed_section_switch shellcheck "shellcheck"
- section_end yamllint
- section_start shellcheck "shellcheck"
- .gitlab-ci/run-shellcheck.sh
- section_end
- section_end shellcheck
- .gitlab-ci/run-pytest.sh
rules:
- !reference [.disable-farm-mr-rules, rules]
- !reference [.never-post-merge-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
- if: $GITLAB_USER_LOGIN == "marge-bot"
changes: &toml_lint_files
# merge pipeline
- if: $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
changes: &lint_files
- .gitlab-ci/test/gitlab-ci.yml
- .gitlab-ci/**/*.sh
- .shellcheckrc
- bin/toml_lint.py
- src/**/ci/*.toml
- .gitlab-ci/tests/**/*
- bin/ci/**/*
when: on_success
- changes: *toml_lint_files
# direct pushes that bypassed the CI
- if: $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
changes: *lint_files
when: on_success
# direct pushes from release manager
- if: $CI_PROJECT_NAMESPACE == "mesa" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME =~ /^staging\//
changes: *lint_files
when: on_success
- changes: *lint_files
when: manual
tags:
- placeholder-job
.test-gl:
extends:
@@ -107,7 +123,13 @@ yaml-toml-shell-test:
- .test
- .use-debian/x86_64_test-android
variables:
S3_ARTIFACT_NAME: mesa-x86_64-android-debug
# This is for the guest artifacts from debian-android which will be
# downloaded explicitly by cuttlefish-runner.sh
S3_ANDROID_ARTIFACT_NAME: mesa-x86_64-android-debug
# Set the default Vulkan driver to lavapipe for some preliminary checks
# that Cuttlefish always performs before starting the VM. This can be
# overwritten depending on the physical machine running the job.
VK_DRIVER: "lvp"
needs:
- job: debian-testing
artifacts: true # On the host we want the Linux build
@@ -122,6 +144,8 @@ yaml-toml-shell-test:
artifacts:
paths:
- results/
tags:
- kvm
.b2c-vkd3d-proton-test:
variables:
@@ -130,7 +154,7 @@ yaml-toml-shell-test:
.piglit-traces-test:
artifacts:
when: on_failure
name: "mesa_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
reports:
junit: results/junit.xml
paths:
@@ -164,7 +188,7 @@ yaml-toml-shell-test:
- ./install/fossilize-runner.sh
artifacts:
when: on_failure
name: "mesa_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
paths:
- results/
@@ -192,7 +216,7 @@ yaml-toml-shell-test:
BM_ROOTFS: /rootfs-${DEBIAN_ARCH}
artifacts:
when: always
name: "mesa_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
paths:
- results/
- serial*.txt
@@ -232,8 +256,8 @@ yaml-toml-shell-test:
# ARM32/64 testing of bare-metal boards attached to an x86 gitlab-runner system, using an asan mesa build
.baremetal-arm32-asan-test:
variables:
DEQP_RUNNER_OPTIONS: "--env LD_PRELOAD=libasan.so.8:/install/lib/libdlclose-skip.so"
S3_ARTIFACT_NAME: mesa-arm32-asan-debugoptimized
DEQP_FORCE_ASAN: 1
needs:
- debian/baremetal_arm32_test
- job: debian-arm32-asan
@@ -242,14 +266,26 @@ yaml-toml-shell-test:
.baremetal-arm64-asan-test:
variables:
DEQP_RUNNER_OPTIONS: "--env LD_PRELOAD=libasan.so.8:/install/lib/libdlclose-skip.so"
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
DEQP_FORCE_ASAN: 1
needs:
- debian/baremetal_arm64_test
- job: debian-arm64-asan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-ubsan-test:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test
variables:
S3_ARTIFACT_NAME: mesa-arm64-ubsan-debugoptimized
needs:
- debian/baremetal_arm64_test
- job: debian-arm64-ubsan
artifacts: false
- !reference [.required-for-hardware-jobs, needs]
.baremetal-deqp-test:
variables:
HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
@@ -273,8 +309,7 @@ yaml-toml-shell-test:
# No need by default to pull the whole repo
GIT_STRATEGY: none
# boot2container initrd configuration parameters.
B2C_KERNEL_URL: 'https://gitlab.freedesktop.org/gfx-ci/ci-tron/-/package_files/519/download' # Linux 6.1
B2C_INITRAMFS_URL: 'https://gitlab.freedesktop.org/mupuf/boot2container/-/releases/v0.9.10/downloads/initramfs.linux_amd64.cpio.xz'
B2C_VERSION: v0.9.14
B2C_JOB_SUCCESS_REGEX: 'hwci: mesa: pass, exit_code: 0\r$'
B2C_LOG_LEVEL: 6
B2C_POWEROFF_DELAY: 15
@@ -375,34 +410,70 @@ yaml-toml-shell-test:
artifacts:
when: always
name: "mesa_${CI_JOB_NAME}"
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
paths:
- results
reports:
junit: results/**/junit.xml
.b2c-x86_64-test:
extends:
- .b2c-test
variables:
B2C_KERNEL_URL: 'https://gitlab.freedesktop.org/gfx-ci/ci-tron/-/package_files/519/download' # Linux 6.1
B2C_INITRAMFS_URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/${B2C_VERSION}/downloads/initramfs.linux_amd64.cpio.xz'
.b2c-x86_64-test-vk:
extends:
- .use-debian/x86_64_test-vk
- .b2c-test
- .b2c-x86_64-test
needs:
- debian/x86_64_test-vk
- debian-testing
- !reference [.required-for-hardware-jobs, needs]
.b2c-x86_64-test-vk-manual:
extends:
- .use-debian/x86_64_test-vk
- .b2c-x86_64-test
variables:
S3_ARTIFACT_NAME: "debian-build-testing"
needs:
- debian/x86_64_test-vk
- debian-build-testing
- !reference [.required-for-hardware-jobs, needs]
.b2c-x86_64-test-gl:
extends:
- .use-debian/x86_64_test-gl
- .b2c-test
- .b2c-x86_64-test
needs:
- debian/x86_64_test-gl
- debian-testing
- !reference [.required-for-hardware-jobs, needs]
.b2c-x86_64-test-gl-manual:
extends:
- .use-debian/x86_64_test-gl
- .b2c-x86_64-test
variables:
S3_ARTIFACT_NAME: "debian-build-testing"
needs:
- debian/x86_64_test-gl
- debian-build-testing
- !reference [.required-for-hardware-jobs, needs]
.b2c-arm64-test:
extends:
- .b2c-test
variables:
B2C_INITRAMFS_URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/${B2C_VERSION}/downloads/initramfs.linux_arm64.cpio.xz'
B2C_KERNEL_URL: 'https://gitlab.freedesktop.org/gfx-ci/boot2container/-/releases/${B2C_VERSION}/downloads/linux-arm64'
.b2c-arm64-test-vk:
extends:
- .use-debian/arm64_test-vk
- .b2c-test
- .b2c-arm64-test
needs:
- debian/arm64_test-vk
- debian-arm64
@@ -411,7 +482,7 @@ yaml-toml-shell-test:
.b2c-arm64-test-gl:
extends:
- .use-debian/arm64_test-gl
- .b2c-test
- .b2c-arm64-test
needs:
- debian/arm64_test-gl
- debian-arm64

View File

@@ -25,7 +25,7 @@ def mock_sleep():
@pytest.fixture
def frozen_time(mock_sleep):
with freeze_time() as frozen_time:
with freeze_time("2024-01-01") as frozen_time:
yield frozen_time
@@ -34,6 +34,10 @@ RESULT_GET_TESTJOB_RESULTS = [{"metadata": {"result": "test"}}]
@pytest.fixture
def mock_proxy(frozen_time):
def mock_job_state(jid) -> dict[str, str]:
frozen_time.tick(1)
return {"job_state": "Running"}
def create_proxy_mock(
job_results=RESULT_GET_TESTJOB_RESULTS,
testsuite_results=[generate_testsuite_result()],
@@ -53,8 +57,7 @@ def mock_proxy(frozen_time):
proxy_logs_mock.return_value = jobs_logs_response()
proxy_job_state = proxy_mock.scheduler.job_state
proxy_job_state.return_value = {"job_state": "Running"}
proxy_job_state.side_effect = frozen_time.tick(1)
proxy_job_state.side_effect = mock_job_state
proxy_show_mock = proxy_mock.scheduler.jobs.show
proxy_show_mock.return_value = defaultdict(

View File

@@ -16,6 +16,8 @@ timeouts:
minutes: 1
depthcharge-action:
minutes: 15
uboot-action:
minutes: 5
actions:
- deploy:
timeout:
@@ -43,7 +45,8 @@ actions:
steps:
- cat Image.gz my_dtb_filename.dtb > Image.gz+dtb
- mkbootimg --kernel Image.gz+dtb --cmdline "root=/dev/nfs rw nfsroot=$NFS_SERVER_IP:$NFS_ROOTFS,tcp,hard,v3
ip=dhcp init=/init rootwait usbcore.quirks=0bda:8153:k" --pagesize 4096 --base 0x80000000 -o boot.img
ip=dhcp init=/init rootwait usbcore.quirks=0bda:8153:k" --pagesize 4096
--base 0x80000000 -o boot.img
namespace: dut
- deploy:
timeout:
@@ -118,7 +121,7 @@ actions:
ping -c 5 -w 60 $(lava-target-ip)
lava_ssh_test_case() {
set -x
set -ex
local test_case="${1}"
shift
lava-test-case "${test_case}" --shell \
@@ -137,6 +140,6 @@ actions:
sed -i '/S3_RESULTS_UPLOAD/d' /set-job-env-vars.sh
EOF
- export SSH_PTY_ARGS=-tt
- lava_ssh_test_case 'test-project_dut' '"cd / && /init-stage2.sh"'
- lava_ssh_test_case 'test-project_dut' 'cd / && /init-stage2.sh'
docker:
image:

View File

@@ -16,6 +16,8 @@ timeouts:
minutes: 1
depthcharge-action:
minutes: 15
uboot-action:
minutes: 5
actions:
- deploy:
timeout:
@@ -42,7 +44,8 @@ actions:
steps:
- cat Image.gz my_dtb_filename.dtb > Image.gz+dtb
- mkbootimg --kernel Image.gz+dtb --cmdline "root=/dev/nfs rw nfsroot=$NFS_SERVER_IP:$NFS_ROOTFS,tcp,hard,v3
ip=dhcp init=/init rootwait usbcore.quirks=0bda:8153:k" --pagesize 4096 --base 0x80000000 -o boot.img
ip=dhcp init=/init rootwait usbcore.quirks=0bda:8153:k" --pagesize 4096
--base 0x80000000 -o boot.img
- deploy:
timeout:
minutes: 2

View File

@@ -16,6 +16,8 @@ timeouts:
minutes: 1
depthcharge-action:
minutes: 15
uboot-action:
minutes: 5
actions:
- deploy:
timeout:
@@ -90,7 +92,7 @@ actions:
ping -c 5 -w 60 $(lava-target-ip)
lava_ssh_test_case() {
set -x
set -ex
local test_case="${1}"
shift
lava-test-case "${test_case}" --shell \
@@ -109,6 +111,6 @@ actions:
sed -i '/S3_RESULTS_UPLOAD/d' /set-job-env-vars.sh
EOF
- export SSH_PTY_ARGS=-tt
- lava_ssh_test_case 'test-project_dut' '"cd / && /init-stage2.sh"'
- lava_ssh_test_case 'test-project_dut' 'cd / && /init-stage2.sh'
docker:
image:

View File

@@ -16,6 +16,8 @@ timeouts:
minutes: 1
depthcharge-action:
minutes: 15
uboot-action:
minutes: 5
actions:
- deploy:
timeout:

Some files were not shown because too many files have changed in this diff Show More