Compare commits

...

5122 Commits

Author SHA1 Message Date
Dylan Baker
85ba713d76 VERSION: bump for 24.3.0-rc1 release 2024-11-07 10:44:28 -08:00
Chia-I Wu
879ec4270d panvk: fix dummy sampler handle for vs
When there is no dynamic buffer, create_copy_table early returns.  Make
sure dummy_sampler_handle is still set.

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/32018>
2024-11-07 17:35:12 +00:00
Chia-I Wu
7e737500bd panvk: fix missing same-subqueue wait for CmdWaitEvents2
CmdSetEvent2 does not call cs_wait_slots.  CmdWaitEvents2 should wait
for the syncobj even on the same subqueue.  To that goal, update
collect_cs_deps to not clear self from wait_subqueue_mask.

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/31997>
2024-11-07 17:15:12 +00:00
Daniel Stone
fe50011ddb build: Don't run wayland-protocols tests
There's not too much point in running tests in general, but also
specifically for wayland-protocols, which requires a newer
wayland-scanner to run the tests (for DTD validation) but not to parse
the protocol files.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: cdef622a0a ("meson: Update wayland-protocols to 1.38")
Closes: mesa#12126
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32036>
2024-11-07 15:55:58 +00:00
Eric Engestrom
f789dd42b8 ci: replace plain meson with explicit meson setup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32030>
2024-11-07 14:48:41 +00:00
Eric Engestrom
1149d69b39 ci: drop unused extra args in build-vkd3d-proton.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32030>
2024-11-07 14:48:41 +00:00
Eric Engestrom
06cca41889 meson: add dependencies needed by wsi_common_x11.c even on non-drm platforms
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11907
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32012>
2024-11-07 12:56:40 +00:00
Eric Engestrom
3e7be078f8 meson: drop variable initialized twice
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32012>
2024-11-07 12:56:40 +00:00
Benjamin Herrenschmidt
e1098310da dril: Fixup order of pixel formats in drilConfigs
Having the RGB* formats before the BGR* formats in the table causes
problems where under some circumstances, some applications end up
with the wrong colors.

The repro case for me is: Xvnc + mutter + chromium

There was an existing comment in dri_fill_in_modes() which explained
the problem. This was lost when dril_target.c was created.

Fixes: ec7afd2c24 ("dril: rework config creation")
Fixes: 3de62b2f9a ("gallium/dril: Compatibility stub for the legacy DRI loader interface")

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31950>
2024-11-07 12:12:57 +00:00
Samuel Pitoiset
9cc07bbd09 radv: mark some GFX6-7 GPUs as Vulkan 1.3 conformant
It's the first time RADV is Vulkan conformant on GFX6-7! Some chips
are missing because we don't have access but most of the GFX6-7 GPUs
are covered.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32022>
2024-11-07 11:50:10 +00:00
Mary Guillemard
125223b391 panvk: Ensure that render_info is not null in force_fb_preload
This fixes various crashes that I saw with occlusion query tests.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: ba2c7fd00a ("panvk: use force_fb_preload for unaligned preload")
Fixes: c108dfc930 ("panvk: force_fb_preload should insert a barrier")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32024>
2024-11-07 10:26:48 +00:00
Christian Gmeiner
f4e8849d79 etnaviv: Fix incorrect pipe_nn creation
When etna_screen_create(..) is called with gpu != NULL and npu == NULL,
screen->pipe_nn is incorrectly set up. This leads to an unintended
stream configuration for compute-only contexts, as determined by

  pipe = (compute_only && screen->pipe_nn) ? screen->pipe_nn : screen->pipe;

To address this, extend the gpu != npu condition by adding a check for
npu != NULL to ensure pipe_nn is only initialized when both gpu and npu
are provided.

Fixes: a4653587cc ("etnaviv: Add a separate NPU pipe")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32025>
2024-11-07 10:02:48 +00:00
David Heidelberg
9f5ee44986 freedreno: python fixes
Acked-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29390>
2024-11-07 09:15:54 +00:00
Samuel Pitoiset
b67218645d radv: save the trap handler report in the HOME directory
It's similar to where GPU hang reports are saved.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31988>
2024-11-07 09:28:16 +01:00
Derek Foreman
71cc22504f adv+zink/ci: Add a recent flake
Signed-off-by: Derek Foreman <derekf@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26150>
2024-11-07 00:03:23 +00:00
Derek Foreman
c26ab1aee1 vulkan/wsi/wayland: Pace frames with commit-timing-v1
Instead of using frame callbacks - which may stop firing if our surface is
occluded - use the new commit-timing-v1 protocol in combination with the
presentation feedback protocol.

If the required protocols are unavailable, or the environment variable
MESA_VK_WSI_DEBUG contains "nowlts", we fall back to frame callback
based pacing behaviour.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26150>
2024-11-07 00:03:23 +00:00
Derek Foreman
d052b0201e vulkan/wsi/wayland: Use fifo protocol for FIFO
The fifo protocol allows us to ensure that a compositor presents
an image that we submit to it. Use this to reliably implement FIFO
semantics.

Note: On systems where the fifo protocol is available an occluded
surface may find itself unthrottled when previously it would have
been frozen.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26150>
2024-11-07 00:03:23 +00:00
Derek Foreman
50d3fb65db vulkan/wsi/wayland: Use presentation timing v2 when available
Presentation timing v2 gives us a usable value instead of a 0 when
VRR is in use. Prefer that if available.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26150>
2024-11-07 00:03:23 +00:00
Derek Foreman
cdef622a0a meson: Update wayland-protocols to 1.38
Update the wrap and the dependency, as well as bumping several build tags.

I've also turned off wayland-protocols tests, as we don't want to bump the
wayland-scanner version at this time.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26150>
2024-11-07 00:03:23 +00:00
Chia-I Wu
c108dfc930 panvk: force_fb_preload should insert a barrier
Preloading is effectively texel fetching.  When we force preloading, we
need to insert a barrier for the feedback loop.

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/31895>
2024-11-06 15:23:45 -08:00
Chia-I Wu
ba2c7fd00a panvk: use force_fb_preload for unaligned preload
Extend force_fb_preload to take an optional VkRenderingInfo.  When it is
non-NULL, this is the unaligned preload and force_fb_preload should
clear attachments.

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/31895>
2024-11-06 15:23:41 -08:00
Felix DeGrood
bf96702985 intel/measure: increase size of filename malloc to account for \0
Corrects regression caused by prior commit that created memory
overwrite by not mallocing enough space for filename string.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32013>
2024-11-06 22:12:29 +00:00
Sergi Blanch Torne
918978f525 Nightly full job for a630-gles-asan
The a630-gles-asan has a significant fraction, that's a trade-off for the
pre-merge, but then we need a full test in the nightly run.

The a630-gles-asan-full job usually takes 40-50 minutes. Therefore, the 20
minutes timeout is increased to 1h. The parallel feature is not used because
the nightly run is, with the introduction of this job, using 4 of the 6
devices available.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31713>
2024-11-06 21:44:44 +00:00
Pavel Ondračka
f59f322efc r300/ci: fails update after recent piglit uprev
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31745>
2024-11-06 21:10:21 +00:00
Pavel Ondračka
5480831e5e r300: add driconf math mode override for Unigine Tropics and Oilrush
Fixes rendering in both apps. Specifically they want the ME_RECIP_FF
opcode. Figured out by Filip Gawin.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/332
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31745>
2024-11-06 21:10:21 +00:00
Pavel Ondračka
be595d0e52 r300: remove wrong Unigine Sanctuary driconf override
I used this for testing when adding r300 driconf support
and it was commited by mistake.

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/31745>
2024-11-06 21:10:21 +00:00
Pavel Ondračka
584ac64670 r300: add switch to support IEEE and FF math opcodes
Also add support for the 0*NaN = NaN IEEE compliant multiply on R500.
All of this is disabled by default, but can be enabled with a
RADEON_DEBUG variable or alternativelly with a driconf tweak.

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/31745>
2024-11-06 21:10:21 +00:00
Jesse Natalie
26fc1ea9e5 dzn: Clean up dri options cache
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32011>
2024-11-06 20:53:13 +00:00
Rhys Perry
215c44c124 aco: apply extract to v_cvt_f32_ubyte0
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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
f1a932bc29 aco: apply extract to p_extract_vector
fossil-db (navi21):
Totals from 46 (0.06% of 79395) affected shaders:
Instrs: 80126 -> 79944 (-0.23%); split: -0.27%, +0.04%
CodeSize: 486860 -> 485668 (-0.24%); split: -0.31%, +0.06%
Latency: 1615395 -> 1614218 (-0.07%); split: -0.07%, +0.00%
InvThroughput: 705479 -> 705013 (-0.07%); split: -0.07%, +0.00%
Copies: 18934 -> 18797 (-0.72%); split: -0.98%, +0.25%
VALU: 52452 -> 52268 (-0.35%); split: -0.41%, +0.06%
SALU: 17253 -> 17255 (+0.01%); split: -0.02%, +0.03%

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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
6cb9d39bc2 aco: combine extracts with sub-dword definitions
fossil-db (navi21):
Totals from 23 (0.03% of 79395) affected shaders:
Instrs: 55133 -> 55099 (-0.06%)
CodeSize: 335744 -> 335512 (-0.07%)
Latency: 1709146 -> 1709031 (-0.01%)
InvThroughput: 613788 -> 613713 (-0.01%)
Copies: 14405 -> 14407 (+0.01%); split: -0.03%, +0.04%
VALU: 37038 -> 37000 (-0.10%)
SALU: 11125 -> 11131 (+0.05%)

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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
30af7ae44f aco: add and use apply_extract_twice helper
This will be used in the next commit.

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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
05d0fa894e aco: allow applying sign-extended sel to p_extract more often
In the case of v1=p_extract(v1=p_extract(src, 0, 16, 1), 0, 32, 0).
When we apply extracts with sub-dword definitions, this will also
include v2b=p_extract(v2b=p_extract(src, 0, 8, 1), 0, 16, 0).

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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
e47bc3e750 aco: shrink code size of some p_extract
fossil-db (navi21):
Totals from 37 (0.05% of 79395) affected shaders:
CodeSize: 2048204 -> 2047836 (-0.02%)

fossil-db (navi31):
Totals from 307 (0.39% of 79395) affected shaders:
CodeSize: 3075732 -> 3065236 (-0.34%); split: -0.34%, +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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
d285333800 aco: add a bit more p_extract/p_insert validation
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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
d3ac69f79b aco: handle SGPR limitations when applying extract
We were already doing this, but missing it in a few places.

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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
07e28dad75 aco: disallow p_extract(,,32,)
Nothing uses these.

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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
f528597906 aco: check for SDWA before applying extract to lshl/cvt_f32
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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
6ce51ea168 aco/gfx11: fix v1b=p_extract(src, 0, 16, 0)
This is weird, but the SDWA path supports this.

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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
da5c5a3edd nir/algebraic: add bit-size check to extract_u8 pattern
This only worked when "a" was 16-bit because a pattern above replaced the
shift.

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/31762>
2024-11-06 19:31:20 +00:00
Rhys Perry
b318fe47e9 aco: don't byte align global VMEM loads if it might be unsafe
Using the byte align path can be unsafe even when 12 byte loads are
supported.

fossil-db (navi21):
Totals from 185 (0.23% of 79395) affected shaders:
Instrs: 391501 -> 391575 (+0.02%); split: -0.03%, +0.05%
CodeSize: 2147336 -> 2147672 (+0.02%); split: -0.03%, +0.05%
Latency: 3762613 -> 3860941 (+2.61%); split: -0.01%, +2.62%
InvThroughput: 871429 -> 888013 (+1.90%); split: -0.08%, +1.98%
VClause: 9712 -> 10210 (+5.13%)
Copies: 53775 -> 53010 (-1.42%); split: -1.46%, +0.04%
VALU: 254009 -> 252146 (-0.73%)
SALU: 56698 -> 56699 (+0.00%); split: -0.00%, +0.00%
VMEM: 18503 -> 19601 (+5.93%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 391bf3ea30 ("aco: don't expand smem/mubuf global loads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31807>
2024-11-06 19:07:16 +00:00
Job Noorman
dc47ecc9ac ir3: merge is_reg_gpr and reg_gpr
These two helpers were basically doing the same thing so no point in
having them both around.

Signed-off-by: Job Noorman <job@noorman.info>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32000>
2024-11-06 17:00:25 +00:00
Pavel Ondračka
b196e1c3c2 Revert "ci: disable ondracka farm"
This reverts commit ef8772e9bf.
The ci-tron gateway is up and running again.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32008>
2024-11-06 16:38:47 +00:00
Marek Olšák
2352fcd5b4 nir/lower_clip_disable: handle non-scalar store intrinsics
It only supported scalar intrinsics because it was written before
nir_opt_vectorize_io existed. The introduction of nir_opt_vectorize_io
exposes this issue. The direct path has been tested. The indirect path
hasn't. That's fine because if we see a CLIP_DIST failure with indirect
in the future, this pass is likely the cause.

This is a prerequisite for enabling nir_opt_varyings for all gallium
drivers.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31994>
2024-11-06 15:51:51 +00:00
Marek Olšák
a21320ec47 st/mesa: implement key->persample_shading for lowered IO
It was only done for variables.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31994>
2024-11-06 15:51:51 +00:00
Marek Olšák
2a9d590b6c Revert "amd/ci: adjust stoney traces checksums"
This reverts commit 5882b5b93b.

It was added because nir_opt_varyings was accidentally disabled.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31994>
2024-11-06 15:51:51 +00:00
Marek Olšák
979373d583 glsl: fix accidentally disabling nir_opt_varyings for all drivers
Fixes: adc40aee25 - glsl: lower IO in the linker if enabled, don't lower it later

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31994>
2024-11-06 15:51:51 +00:00
Eric Engestrom
7e3ac4d476 broadcom/ci: document flakes seen lately
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32007>
2024-11-06 14:14:38 +00:00
Eric Engestrom
79d101d985 freedreno/ci: document flakes seen lately
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32007>
2024-11-06 14:14:38 +00:00
Eric Engestrom
73db4d350a nvk/ci: document flakes seen lately
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32007>
2024-11-06 14:14:38 +00:00
Eric Engestrom
cdeb284dce amd/ci: document flakes seen lately
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32007>
2024-11-06 14:14:38 +00:00
Georg Lehmann
2cd8a9fef7 amd: lower gl_FragCoord.w rcp in NIR
This allows NIR to remove the rcps if the application uses rcp(gl_FragCoord.w).
D3D provides w, not 1/w like GL/VK in the shader, so this is commonly used.

Foz-DB Navi21:
Totals from 2068 (2.61% of 79206) affected shaders:
MaxWaves: 45636 -> 45652 (+0.04%)
Instrs: 2173444 -> 2169671 (-0.17%); split: -0.18%, +0.00%
CodeSize: 11881304 -> 11867208 (-0.12%); split: -0.12%, +0.01%
VGPRs: 118000 -> 117968 (-0.03%)
Latency: 35689676 -> 35675909 (-0.04%); split: -0.06%, +0.02%
InvThroughput: 9167199 -> 9159801 (-0.08%); split: -0.08%, +0.00%
VClause: 45076 -> 45078 (+0.00%); split: -0.01%, +0.02%
SClause: 92503 -> 92366 (-0.15%); split: -0.31%, +0.17%
Copies: 140282 -> 140303 (+0.01%); split: -0.13%, +0.14%
Branches: 53347 -> 53346 (-0.00%); split: -0.01%, +0.00%
PreVGPRs: 96495 -> 96465 (-0.03%)
VALU: 1522980 -> 1519252 (-0.24%); split: -0.25%, +0.01%
SALU: 213451 -> 213460 (+0.00%); split: -0.02%, +0.02%

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/31967>
2024-11-06 12:57:08 +00:00
Georg Lehmann
917f312873 nir/lower_fragcoord_wtrans: use intrinsics_pass
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/31967>
2024-11-06 12:57:08 +00:00
Lionel Landwerlin
0ab2849597 anv: move pipe control debug to anv_util.c
We're going to add more printing.

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/31928>
2024-11-06 12:20:23 +00:00
Lionel Landwerlin
b5403a4e40 anv: fix indentation
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/31928>
2024-11-06 12:20:23 +00:00
Lionel Landwerlin
f9e76e8ca6 anv: add texture cache inval after binding pool update
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31928>
2024-11-06 12:20:22 +00:00
Lionel Landwerlin
b3f487bd0d anv: fix even set/reset on blitter engine
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31928>
2024-11-06 12:20:22 +00:00
Connor Abbott
423d472a4e tu: Re-emit visibility stream before each render pass
When we set the visibility stream with CP_SET_PSEUDO_REG, it does two
things (or only one of the two, with concurrent binning):

- Set the "pseudo register" used by CP_SET_BIN_DATA5_OFFSET, which in
  turn is used when decoding the vis. streams.
- Set the VSC register used by the binning pass.

Preemption with skipsaverestore obliterates the second, but not the
first. This means that before running the binning pass, we have to
re-emit these registers. I *think* this is what the blob does on a7xx.
On a6xx, where the pseudo register doesn't exist, the blob seems to
re-emit the preamble every time we re-allocate the visibility streams,
but we don't support a6xx yet so we can defer making that decision.

Fixes supertuxkart under zink with preemption enabled in the kernel.

Fixes: 1d2b479a3b ("tu: Allow being preempted on a7xx")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31937>
2024-11-06 11:55:28 +00:00
Lionel Landwerlin
2cadab5dcf vulkan/runtime: fix allocation failure handling
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 93d0c66b27 ("vulkan/pipeline_cache: Add helpers for storing NIR in the cache")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31982>
2024-11-06 11:23:27 +00:00
Rhys Perry
5375d77488 aco: wait for scratch stores to complete before dealloc_vgprs
fossil-db (navi31):
Totals from 392 (0.49% of 79395) affected shaders:
Instrs: 5052043 -> 5054100 (+0.04%)
CodeSize: 26701200 -> 26709428 (+0.03%)
Latency: 43614861 -> 43615368 (+0.00%)
InvThroughput: 7353147 -> 7353216 (+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/24884>
2024-11-06 09:58:05 +00:00
Rhys Perry
575f24d19f aco: don't emit early exit over dealloc_vgprs
fossil-db (navi31):
Totals from 3308 (4.17% of 79395) affected shaders:
Instrs: 387145 -> 375373 (-3.04%)
CodeSize: 2018276 -> 1964380 (-2.67%)
Latency: 6588004 -> 6549068 (-0.59%)
InvThroughput: 458792 -> 457025 (-0.39%); split: -0.39%, +0.00%
Branches: 10710 -> 7402 (-30.89%)

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/24884>
2024-11-06 09:58:05 +00:00
Rhys Perry
295b7d606f aco: insert NOP before dealloc_vgpr in the insert_NOPs pass
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/24884>
2024-11-06 09:58:05 +00:00
Rhys Perry
4dfc564669 aco: fix printing of block_kind_discard_early_exit
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/24884>
2024-11-06 09:58:04 +00:00
Rhys Perry
0ad713ca9f aco: add waitcnt build helper
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/24884>
2024-11-06 09:58:04 +00:00
Eric Engestrom
4ec045a533 ci: bump ci-templates
debian/x86_64_build-base was missing the package that provides
LLVMConfig.cmake, breaking cmake builds that need LLVM, like the
SPIRV-LLVM-Translator build.

The cross-builds were missing arch-test to allow dpkg to figure out
which arch it's running on.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31940>
2024-11-06 07:53:21 +00:00
Eric Engestrom
18b5108a3d ci: don't replace ld with ld.gold if ld.gold doesn't exist
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31940>
2024-11-06 07:53:21 +00:00
Eric Engestrom
7a89e7afe3 ci: properly quote ccache dir and path
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31940>
2024-11-06 07:53:21 +00:00
Timur Kristóf
766617e8da radv: Enable NGG culling by default on GFX10.
We never took the time to actually test this, but it works fine.
Improves performance on Navi 10 in the following test cases:

Baldur's Gate 3 Vulkan: up to 10%
Witcher 3 D3D11: around 4%
Granite primitive stress test: 107%
FSR2 sample app: 57%

Notes:
NGG is still disabled on Navi 14.
Not tested on Navi 12.

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/31971>
2024-11-06 03:16:54 +00:00
Timur Kristóf
6bf19b2d70 radv: Increase NGG culling PS param limit to 12 on GFX10.
Helps performance in Baldur's Gate 3 on Navi 10
when NGG culling is enabled.

Also fix the description of the RADV_PERFTEST=nggc env var.

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/31971>
2024-11-06 03:16:53 +00:00
Matt Turner
5068a6b4ce anv: Set shader_spilling_rate=11
This has the best fossil-db results across in a sweep from 0..15.

fossil-db results on Alderlake:

Instructions in all programs: 152849904 -> 152824116 (-0.0%)
SENDs in all programs: 7677830 -> 7677830 (+0.0%)
Loops in all programs: 48470 -> 48470 (+0.0%)
Cycles in all programs: 11988670382 -> 11987530942 (-0.0%)
Spills in all programs: 42863 -> 41777 (-2.5%)
Fills in all programs: 77114 -> 73044 (-5.3%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31990>
2024-11-06 02:47:26 +00:00
Evan
c3c80491f9 amd/vpelib: Input Format Adjustment
Reviewed-by: Jiali Zhao <Jiali.Zhao@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Signed-off-by: Evan <evan.damphousse@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31918>
2024-11-06 02:19:39 +00:00
Chang, Tomson
d1b790c028 amd/vpelib: Fix color fill performance issue on VPE1.1 (#419)
\[WHY\]
For color fill only case we see performance on Vpe1.1 are not doubled due
to CD are all 0, no odd CD

\[HOW\]
1. Dummy stream dst rect should be in the middle of target rect so the
two (dummy seg + bg only seg) are balanced, instead of target at upper
left corner which makes it imbalance
2. BG gap generation should consider more for collaboration mode
num_multiple
3. When pure bg case, skip dummy stream handling and go ahead do BG gap
generation
4. Update memory requirement for the new pure BG case flow to avoid run out of embedded buffer
4. Additional -- fix the random Collaborate data generation bug (benign)

\[TESTING\]
Vpelibtest app + nv12torgb case with debug flag bgcolorfill set on in
vpelibtestapp
Media player with/without bgcolorfillonly flag
Teams

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Signed-off-by: Tomson Chang <tomson.chang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31918>
2024-11-06 02:19:39 +00:00
Visan, Tiberiu
4661bf3659 amd/vpelib: Remove TODO comments and legacy check(#421)
\[WHY\]
1.Remove TODO comments that don't need action item
2.Delete the legacy command number check as it is now using a vector (i.e. without hard limit)

\[HOW\]
Remove TODO comments and delete the legacy command number check

Signed off by <tvisan@amd.com>

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31918>
2024-11-06 02:19:39 +00:00
Chenyu Chen
e0754a6dc7 amd/vpelib: Remove unused define macro
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Signed-off-by: Chenyu Chen <Chen-Yu.Chen@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31918>
2024-11-06 02:19:39 +00:00
Kenneth Graunke
22b511ef02 intel: Set shader_spilling_rate=11 in intel_clc
A while back Matt enabled shader_spilling_rate by default for anv.
But intel_clc doesn't use the driconf mechanism that we use there.

The GRL shaders spill a lot, and with us now compiling additional
generations of the shaders, Mesa build time is getting prohibitively
expensive.  By setting this, we drop the time taken for a clean debug
build by approximately 35% on my current laptop.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31993>
2024-11-06 01:57:10 +00:00
Gurchetan Singh
a6d4274822 gfxstream: update Kumquat API
crrev.com/c/5980832 is updating kumquat api .. it's not
distro-packaged and used as a testing tool.  For the
mechanism it is used (GfxstreamEnd2EndTests build target
in AOSP), this API change will not be disruptive.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31929>
2024-11-05 16:28:56 -08:00
Bo Hu
21a07e850c gfxstream: global_state_wrapped_decoding of vkCreateComputePipelines
Similar to vkCreateGraphicsPipelines, this
function also need to be wrapped.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31929>
2024-11-05 16:28:56 -08:00
Serdar Kocdemir
e53a2c7474 gfxstream: Allow VK_KHR_line_rasterization
Allow KHR version of the line_rasterization extension to be
supported from the guest side.

Test: dEQP-VK.dynamic_state.monolithic.line_width.*

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31929>
2024-11-05 16:28:56 -08:00
Serdar Kocdemir
6912c95efe gfxstream: Keep VK_EXT_line_rasterization for codegen
Codegen does not automatically generate code for promoted
extensions, so we need to explicitly define support for
VK_EXT_line_rasterization to generate necessary code.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31929>
2024-11-05 16:28:56 -08:00
sergiuferentz
72dbabdfef gfxstream: VulkanBatchedDescriptorSetUpdate toggled on caps on Guest
The descriptor set optimization doesn't seem to help performance
during benchmarks and it seems to cause erratic behaviour during normal
operation. This disables it from being on by default.
Can be enabled by -feature VulkanBatchedDescriptorSetUpdate

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31929>
2024-11-05 16:28:54 -08:00
nyanmisaka
e3a0091638 intel/pci_ids: Update DG1 device names
Ref: 9097b19c3c/shared/source/dll/devices/devices_base.inl (L43-L46)
Ref: https://ark.intel.com/content/www/us/en/ark/products/codename/195485/products-formerly-dg1.html
Ref: https://www.intel.com/content/www/us/en/content-details/682687/2020-discrete-gpu-formerly-named-dg1-programmer-s-reference-manual-configurations.html?wapkw=0x4905
Ref: bspec 44463
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30760>
2024-11-05 22:14:04 +00:00
nyanmisaka
b777e433c3 intel/pci_ids: Update TGL device names
Ref: 9097b19c3c/shared/source/dll/devices/devices_base.inl (L96-L97)
Ref: https://www.intel.com/content/www/us/en/products/sku/208659/intel-core-i51140g7-processor-8m-cache-up-to-4-20-ghz-with-ipu/specifications.html?wapkw=0x9a40
Ref: https://www.intel.com/content/www/us/en/products/sku/208660/intel-core-i51145g7-processor-8m-cache-up-to-4-40-ghz-with-ipu/specifications.html?wapkw=0x9a49
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30760>
2024-11-05 22:14:04 +00:00
nyanmisaka
e39deb7700 intel/pci_ids: Update RPL device names
Ref: 9097b19c3c/shared/source/dll/devices/devices_base.inl (L166-L169)
Ref: https://www.intel.com/content/www/us/en/products/sku/232175/intel-core-i71370pe-processor-24m-cache-up-to-4-80-ghz/specifications.html?wapkw=0xa7a0
Ref: https://www.intel.com/content/www/us/en/products/sku/232143/intel-core-i51334u-processor-12m-cache-up-to-4-60-ghz/specifications.html?wapkw=0xa7a1
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30760>
2024-11-05 22:14:04 +00:00
nyanmisaka
eb98962eab intel/pci_ids: Update ADL device names
Ref: 9097b19c3c/shared/source/dll/devices/devices_base.inl (L154-L156)
Ref: https://www.intel.com/content/www/us/en/products/sku/132215/intel-core-i912900hk-processor-24m-cache-up-to-5-00-ghz/specifications.html?wapkw=0x46a6
Ref: https://www.intel.com/content/www/us/en/products/sku/230905/intel-core-i71265ul-processor-12m-cache-up-to-4-80-ghz/specifications.html?wapkw=0x46a8
Ref: https://www.intel.com/content/www/us/en/products/sku/226454/intel-core-i71250u-processor-12m-cache-up-to-4-70-ghz/specifications.html?wapkw=0x46aa
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30760>
2024-11-05 22:14:04 +00:00
Georg Lehmann
8104c89174 nir/lower_wpos_ytransform: remove reference to long removed TGSI code
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31951>
2024-11-05 21:42:37 +00:00
Georg Lehmann
e307f40ebe nir/lower_wpos_ytransform: use more typical pass structure
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31951>
2024-11-05 21:42:37 +00:00
Georg Lehmann
a948c9a3eb nir/lower_wpos_ytransform: clean up wpos_adjustment
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31951>
2024-11-05 21:42:37 +00:00
Georg Lehmann
b5d6b31cc5 nir/lower_wpos_ytransform: clean up sample_pos
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31951>
2024-11-05 21:42:37 +00:00
Georg Lehmann
807b267c4d nir/lower_wpos_ytransform: clean up baryc_at_offset
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31951>
2024-11-05 21:42:37 +00:00
Georg Lehmann
5d8adf92e7 nir/lower_wpos_ytransform: remove redundant state shader
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31951>
2024-11-05 21:42:37 +00:00
Georg Lehmann
63f828d262 nir/lower_wpos_ytransform: remove unnecessary state variable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31951>
2024-11-05 21:42:37 +00:00
Georg Lehmann
3738c69796 nir/opt_frag_coord_to_pixel_coord: optimize trunc/floor
Foz-DB Navi21:
Totals from 207 (0.26% of 79206) affected shaders:
MaxWaves: 5924 -> 5980 (+0.95%)
Instrs: 83164 -> 83144 (-0.02%); split: -0.06%, +0.04%
CodeSize: 457296 -> 459092 (+0.39%); split: -0.00%, +0.39%
VGPRs: 5336 -> 5160 (-3.30%)
Latency: 1308811 -> 1307754 (-0.08%); split: -0.16%, +0.08%
InvThroughput: 232768 -> 222979 (-4.21%); split: -4.21%, +0.00%
VClause: 1359 -> 1370 (+0.81%); split: -0.07%, +0.88%
SClause: 3300 -> 3293 (-0.21%); split: -0.24%, +0.03%
Copies: 4992 -> 4985 (-0.14%); split: -0.56%, +0.42%
PreVGPRs: 3757 -> 3619 (-3.67%)
VALU: 58366 -> 58338 (-0.05%); split: -0.08%, +0.03%

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31966>
2024-11-05 21:09:45 +00:00
Eric Engestrom
62011e564c ci/b2c: make dut boot quieter on ci-tron jobs
!31602 but for b2c jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:22 +00:00
Eric Engestrom
c8f5477685 ci/b2c: properly escape double-quoted container command
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:22 +00:00
Eric Engestrom
b76b53cbbb ci: rename state_x to previous_state_x to be clear about what it contains
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:22 +00:00
Eric Engestrom
d69bd58365 ci: consistently restore -x after temporarily disabling it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:22 +00:00
Eric Engestrom
4a19f7d53d ci: initialize state_x (tracking set -x)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:21 +00:00
Eric Engestrom
4fa1730cdd ci: only end current section if there is a current section
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31939>
2024-11-05 20:30:21 +00:00
José Roberto de Souza
a991935088 anv: Enable perf metrics id set syncronization
Now actually making use of new Xe KMD OA syncronization uAPI.

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/31283>
2024-11-05 19:25:53 +00:00
José Roberto de Souza
953abc7d1e intel/perf: Add INTEL_PERF_FEATURE_METRIC_SYNC and check if KMD supports it
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/31283>
2024-11-05 19:25:53 +00:00
José Roberto de Souza
a38a98c4cb intel/perf: Extend intel_perf_stream_set_metrics_id() to syncronize metrics id changes
Xe KMD added a uAPI to syncronze metrics id changes, so we can make
it wait for all previous workloads in exec_queue and all previous
metrics id changes to finish before start change it again.
This should make Vulkan queries more robust.

So this makes use of intel_bind_timeline to syncronize the metrics id
changes and xe_queue_get_syncobj_for_idle() to syncronize with
exec_queue.

As i915 and some versions of Xe KMD will not support it, this feature
will only be used then intel_bind_timeline parameter is not NULL and
timeline has a valid syncobj id.
At this patch level all callers will set it to NULL, next patch will
add and initialize timeline in ANV when supported by Xe KMD.

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/31283>
2024-11-05 19:25:53 +00:00
José Roberto de Souza
3e6546f662 drm-uapi: Sync xe_drm.h
Sync with:
commit 086ed1d51544bfc1123b93eccc2ae88e0fbf3d51
Merge: fb6c5b1fdc 53f4b30b05
Author: Dave Airlie <airlied@redhat.com>

    Merge tag 'exynos-drm-next-for-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

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/31283>
2024-11-05 19:25:53 +00:00
David Rosca
764b316623 radeonsi/vcn: Rework encode padding and session init params
Move the session init params into common code, instead of having the
same code copied for each VCN version.
Change the padding logic to enforce minimum padding required for input
surface (in case the input surface is smaller than aligned coded size)
and also avoid setting the padding above supported maximum.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31975>
2024-11-05 18:53:16 +00:00
David Rosca
16281f29fb radeonsi/vcn: Gracefully handle encode errors and report to frontend
Previously it would show 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/31975>
2024-11-05 18:53:16 +00:00
David Rosca
41964a5f2b radeonsi/vcn: Don't try to override HEVC SPS conformance window
No point doing this as the padding is set according to the conformance
window anyway.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31975>
2024-11-05 18:53:16 +00:00
Pavel Ondračka
ef8772e9bf ci: disable ondracka farm
Its broken at the moment due to ci-tron gateway iPXE issues.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31984>
2024-11-05 16:00:30 +00:00
Samuel Pitoiset
64774f9c19 radv: cleanup tools related resources when destroying logical device
This was missing.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31986>
2024-11-05 15:31:00 +00:00
José Roberto de Souza
27fef94851 intel/perf: Add OA support to ARL
ARL has enough differences in OA files to have its own set of files.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31685>
2024-11-05 14:56:49 +00:00
Marek Olšák
5882b5b93b amd/ci: adjust stoney traces checksums
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31968>
2024-11-05 14:13:40 +00:00
Marek Olšák
09355290d3 st/mesa: fix incorrect types of shader CSOs
CSOs are always void *.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31968>
2024-11-05 14:13:40 +00:00
Marek Olšák
e329d39aa9 gallium: set proper type for pipe_shader_state::ir::nir
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31968>
2024-11-05 14:13:40 +00:00
Marek Olšák
9d043e138d nir: add nir_clear_divergence_info, use it in nir_opt_varyings
nir_opt_varyings computes vertex divergence, which isn't exactly expected
by any other passes.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31968>
2024-11-05 14:13:40 +00:00
Marek Olšák
b71edce77a nir/lower_io: change INTERP_MODE_NONE to SMOOTH when NONE means SMOOTH
to improve CSE of load_barycentric_* and IO vectorization.
This is only for load_interpolated_input, which can never be FLAT.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31968>
2024-11-05 14:13:40 +00:00
Marek Olšák
aee1ebb992 nir: print interp_mode better
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31968>
2024-11-05 14:13:40 +00:00
Marek Olšák
2ca56376a4 nir: rename nir_io_glsl_lower_derefs -> nir_io_has_io_intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31968>
2024-11-05 14:13:40 +00:00
Marek Olšák
adc40aee25 glsl: lower IO in the linker if enabled, don't lower it later
This removes the useless codepath that kept IO derefs until st_finalize_nir.
It was used before nir_opt_varyings existed.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31968>
2024-11-05 14:13:40 +00:00
Samuel Pitoiset
32a537b25b aco: use inlined constant offsets for storing SGPRs in the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31976>
2024-11-05 11:55:24 +00:00
Constantine Shablia
29db405c16 pan/bi: Lower nir_texop_txd to TEXC in GRDESC_DER mode followed by sampling TEXC
On v7-, use TEXC(op=GRDESC_DER) to convert user-provided gradient into a
gradient descriptor consumed by the hardware, and then supply that
descriptor to the TEXC instruction.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29521>
2024-11-05 11:20:21 +00:00
Constantine Shablia
52226d0e3f pan/va: Lower nir_texop_txd to TEX_GRADIENT with derivs followed by TEX_SINGLE
On v9+, use TEX_GRADIENT to convert user-provided gradient into a
gradient descriptor consumed by the hardware, and then supply that
descriptor to TEX_SINGLE.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29521>
2024-11-05 11:20:21 +00:00
Boris Brezillon
9199c25e5e pan/bi: Expose the packed TextureOperationDescriptor in bifrost_texture_operation
Rather than adding memcpy()s to a local u32 variable, add a union
to bifrost_texture_operation so we can directly access the packed
value.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29521>
2024-11-05 11:20:21 +00:00
David Rosca
93d434362b frontends/va: Move encode fence to coded buffer
Instead of using the surface fence, store the fence in buffer.
This way the fence won't be overwritten when encoding multiple frames
using the same source surface and SyncBuffer will sync the correct job.
Also fixes possible crash when destroying coded buffer before calling
SyncSurface and possible leak when destroying or reusing coded buffer
with pending encode job without calling SyncSurface/SyncBuffer.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31959>
2024-11-05 09:42:55 +00:00
Samuel Pitoiset
9bcf17ef5a aco: add support for the trap handler shader on GFX11
This has been verified on navi31.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31960>
2024-11-05 07:58:38 +00:00
Samuel Pitoiset
6d5a2ae928 aco: clear the current wave exception in the trap handler
This is required to re-enable VALU instructions in this wave, only
float exception seem to be affected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31960>
2024-11-05 07:58:38 +00:00
Samuel Pitoiset
e85fc0f869 aco: fix validation for VOP1 instructions without any dest/src
Like v_clrexcp.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31960>
2024-11-05 07:58:38 +00:00
Samuel Pitoiset
81f4670ed6 radv,aco: dump all SGPRS from the trap handler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31960>
2024-11-05 07:58:38 +00:00
Samuel Pitoiset
45d56d9395 radv: set missing shader info values for the trap handler
This fixes an assert in radv_precompute_registers_pgm() on GFX11
because it was considered a vertex shader.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31962>
2024-11-05 07:11:30 +00:00
itycodes
10c92cbd39 intel: Fix a typo in intel_device_info.c:has_get_tiling
The structs are of equal size and both ioctls were added at the same
time, so the functionality is equivalent, but it's nonetheless the
incorrect type being passed.

Signed-off-by: tranquillitycodes@proton.me
Fixes: 762e601f77
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31974>
2024-11-05 04:31:50 +01:00
Chia-I Wu
07ca1bbb05 panvk: expand meta stage and access flags
VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT is equivalent to the logical OR of:

 - VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT
 - VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT

VK_ACCESS_2_SHADER_READ_BIT is equivalent to the logical OR of:

 - VK_ACCESS_2_SHADER_SAMPLED_READ_BIT
 - VK_ACCESS_2_SHADER_STORAGE_READ_BIT

VK_ACCESS_2_SHADER_WRITE_BIT is equivalent to
VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT.

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/31898>
2024-11-04 22:22:13 +00:00
Chia-I Wu
c61116a2a6 panvk: fix truncated access flags in collect_cs_deps
Use 64-bit VkAccessFlags2 instead of 32-bit VkAccessFlags.

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/31898>
2024-11-04 22:22:12 +00:00
Deborah Brouwer
a02dd9b36f freedreno/ci: convert a630-gles-asan to toml suite
Currently a630-gles-asan is running deqp-runner directly rather than
through a toml suite configuration

Convert a630-gles-asan to use a toml suite. This makes it similar to other
freedreno jobs. The two substantive consequences are:
* it runs tests in default groups of 500 instead of 5000
* it skips tests listed in `freedreno-a6xx-skips.txt`

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31916>
2024-11-04 13:14:23 -08:00
Deborah Brouwer
37602ad653 ci: simplify .baremetal-arm64-asan-test
The `.baremetal-arm64-asan-test` job extends `.baremetal-test` and
`.use-debian/baremetal_arm64_test` but doing this is unnecessary because
all of the arm64-asan jobs also inherit the `.baremetal-test-arm64` job
which does the same thing.

Furthermore when `.baremetal-arm64-asan-test` appears last in the list of
extended jobs, as in the case of the `a630-gles-asan`, the general rules
inherited by `.baremetal-arm64-asan-test` override the more specific
driver rules and prevent the driver job from appearing in the merge
pipeline.

Simply bumping the `.baremetal-arm64-asan-test` job back earlier in the
list of extended jobs would allow the driver rules to take precedence but
then the S3_ARTIFACT_NAME, provided by `.baremetal-arm64-asan-test`, which
is specific for asan builds, is overridden.

By removing the inherited jobs from the `.baremetal-arm64-asan-test`,
this job can continue to provide the asan artifact without interfering
with the driver jobs appearing in the merge pipeline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31916>
2024-11-04 13:14:22 -08:00
Deborah Brouwer
14f929035f ci: simplify .baremetal-arm32-asan-test
The `.baremetal-arm32-asan-test` job extends `.baremetal-test` and
`.use-debian/baremetal_arm32_test` but doing this is unnecessary because
the only job that extends `.baremetal-arm32-asan-test`, i.e.
`gc2000-gles2-asan`, also indirectly inherits `.baremetal-test-arm32`
which does the same thing.

Duplicating the extended jobs in `.baremetal-arm32-asan-test` can
unnecessarily cause rule overrides and unexpectedly remove jobs from
pipelines.

Remove the inherited jobs from the `.baremetal-arm32-asan-test` job so
that (when the necessary farm is enabled) `gc2000-gles2-asan` will appear
in pipelines as expected.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31916>
2024-11-04 13:14:22 -08:00
Felix DeGrood
99e8502013 intel/measure: defer file open until first write
Fixes abort on steam.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31938>
2024-11-04 20:25:14 +00:00
Felix DeGrood
f345019830 intel/measure: add nogl feature
Do not trigger INTEL_MEASURE for ogl apps with INTEL_MEASURE=nogl

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31938>
2024-11-04 20:25:14 +00:00
Marek Olšák
5d09374ffe radeonsi/gfx12: fix AMD_DEBUG=nodcc not working
surface->modifier is always 0 here. We should use the parameter instead.

Fixes: 3d05d86d88 (radeonsi/gfx12: add DCC)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31910>
2024-11-04 19:45:54 +00:00
Marek Olšák
755fb7a262 amd: move Tonga and Iceland TC-compat HTILE workarounds to ac_gpu_info.c
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31910>
2024-11-04 19:45:54 +00:00
Marek Olšák
047532b1e1 radeonsi/gfx11: fix Z corruption for Blender
The corruption only happens with non-TC-compatible HTILE, so always use
TC-compatible HTILE.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11891
Cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31910>
2024-11-04 19:45:54 +00:00
Benjamin Lee
7ca01506c9 panvk: hack to improve depth clipping with small viewport depth range
Fixes 'dEQP-VK.draw.renderpass.inverted_depth_ranges.nodepthclamp_deltazero'.
This is an unfortunate fix, but it's not a situation that's likely to
come up in practice. The proprietary driver does something similar.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Co-authored-by: Boris Brezillon <boris.brezillon@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/31879>
2024-11-04 14:02:36 +00:00
Danylo Piliaiev
fd5c94b8c7 ir3: Fix cat5 parsing with a1.x src present
Such instructions were failing to be parsed:

 sam.s2en.uniform.base1 (f32)(xyz)r1.w, r0.z, r1.y, a1.x
 saml.s2en.uniform.base1 (f32)(xyzw)r13.x, r0.w, r13.w, r11.w, a1.x
 isam.v.s2en.uniform.base0 (u32)(xyzw)r1.y, r0.x+3, r2.y

Also fix fixup_cat5_s2en which incorrectly rotated instruction sources.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31952>
2024-11-04 13:26:54 +00:00
Martin Krastev
cfbe30745a svga/ci: disable vmware farm
Disable farm for investigating an intermittent kernel
driver crash under piglit and linux v6.8.0-ga49175f6ce23

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31956>
2024-11-04 13:19:10 +00:00
Georg Lehmann
a7f6294f90 radv: use nir_opt_frag_coord_to_pixel_coord
Foz-DB Navi21:
Totals from 1648 (2.08% of 79395) affected shaders:
MaxWaves: 44918 -> 44950 (+0.07%); split: +0.09%, -0.02%
Instrs: 1004193 -> 1001179 (-0.30%); split: -0.33%, +0.03%
CodeSize: 5486412 -> 5486592 (+0.00%); split: -0.08%, +0.09%
VGPRs: 56664 -> 56552 (-0.20%); split: -0.93%, +0.73%
Latency: 15430894 -> 15435320 (+0.03%); split: -0.12%, +0.15%
InvThroughput: 3097789 -> 3092861 (-0.16%); split: -0.20%, +0.04%
VClause: 18757 -> 18793 (+0.19%); split: -0.13%, +0.32%
SClause: 34475 -> 34495 (+0.06%); split: -0.11%, +0.17%
Copies: 66195 -> 66150 (-0.07%); split: -0.88%, +0.81%
Branches: 23035 -> 23033 (-0.01%)
PreVGPRs: 42235 -> 41724 (-1.21%); split: -1.32%, +0.11%
VALU: 709730 -> 706662 (-0.43%); split: -0.47%, +0.04%
SALU: 111731 -> 111722 (-0.01%); split: -0.02%, +0.01%
VMEM: 25988 -> 25987 (-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/31864>
2024-11-04 12:34:31 +00:00
Georg Lehmann
bedd6310dc nir: add nir_opt_frag_coord_to_pixel_coord
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/31864>
2024-11-04 12:34:31 +00:00
Georg Lehmann
a58d2b59e9 aco: implement load_pixel_coord
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/31864>
2024-11-04 12:34:30 +00:00
Georg Lehmann
42d5cb62bb ac/llvm: implement load_pixel_coord
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/31864>
2024-11-04 12:34:30 +00:00
Georg Lehmann
a2a9e93e72 radv: add support for load_pixel_coord
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/31864>
2024-11-04 12:34:30 +00:00
Georg Lehmann
2f830f9b94 nir: add SYSTEM_VALUE_PIXEL_COORD
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/31864>
2024-11-04 12:34:30 +00:00
Vignesh Raman
1c36699b8d Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 3637570725.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31949>
2024-11-04 11:35:19 +00:00
Samuel Pitoiset
1fa0fe1e0c aco: add support for the trap handler shader on GFX9-GFX10.3
This has been tested on navi21.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31926>
2024-11-04 10:48:52 +00:00
Samuel Pitoiset
281eb14df8 aco: fix reading registers from the trap handler shader
It should read 32-bit values, otherwise some MSB are 0 and it's missing
some information.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31926>
2024-11-04 10:48:52 +00:00
Erik Faye-Lund
94cf47e43f docs/features: mark off missing panvk feature
This was recenctly wired up, but we forgot to expose it in features.txt.
Let's add it!

Fixes: e474d4ebee ("panvk: add support for VK_KHR_timeline_semaphore")
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31932>
2024-11-04 10:13:00 +01:00
Valentine Burley
d205d7ed58 lavapipe: Block YCbCr formats from getting blit feature flags
Block all YCbCr formats from getting blit feature flags by using
vk_format_ycbcr_info.

Fixes dEQP-VK.api.info.format_properties.g10x6_b10x6r10x6_2plane_420_unorm_3pack16
and dEQP-VK.api.info.format_properties.g12x4_b12x4r12x4_2plane_420_unorm_3pack16.

Fixes: ab298b9c3a ("lavapipe: Remap 10 and 12 bit formats to 16 bit formats")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31863>
2024-11-04 08:18:23 +00:00
Sergi Blanch Torne
3637570725 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2024-11-04 08:00 UTC
* End: 2024-11-04 14:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31816>
2024-11-04 06:35:50 +00:00
Lucas Fryzek
159fb9691d lp: Only close udmabuf handle if its valid
Also change ifdef's from just `HAVE_LIBDRM` to check for both LIBDRM
and for UDMABUF HEADER. preventing unbalanced guards preventing part of
the code from being included if you just have LIBDRM or just have the
udmabuf headers.

Fixes: 4cfaf10c ("llvmpipe: Only use udmabuf with libdrm")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31877>
2024-11-03 19:27:28 +00:00
Sviatoslav Peleshko
3a962a28e7 intel/elk_asm: Add BranchCtrl support
We emit it for gfx8, so the assembler should support it too.

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31747>
2024-11-02 18:01:20 +00:00
Sviatoslav Peleshko
cd4c328408 intel/elk: List all instructions that have BranchCtrl bit
Previously this bit was not clearly documented in PRMs, but gfx12 PRMs
finally list all the instructions where it is present.

Although it's unclear if it's functional for anything other than "if",
"else", and "goto", we probably still should acknowledge its existence
in other instructions.

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31747>
2024-11-02 18:01:20 +00:00
Sviatoslav Peleshko
445df8d611 intel/brw_asm: Add BranchCtrl support
We emit it for gfx9, so the assembler should support it too.

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31747>
2024-11-02 18:01:19 +00:00
Sviatoslav Peleshko
aea7366613 intel/brw: List all instructions that have BranchCtrl bit
Previously this bit was not clearly documented in PRMs, but gfx12 PRMs
finally list all the instructions where it is present.

Although it's unclear if it's functional for anything other than "if",
"else", and "goto", we probably still should acknowledge its existence
in other instructions.

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31747>
2024-11-02 18:01:19 +00:00
David Rosca
ab1479ae6a pipe: Remove PIPE_VIDEO_CAP_ENC_SUPPORTS_ASYNC_OPERATION
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31933>
2024-11-02 07:02:55 +00:00
David Rosca
baa96bce45 frontends/va: Stop using PIPE_VIDEO_CAP_ENC_SUPPORTS_ASYNC_OPERATION
The gallium interface always expected the driver to support multiple
in-flight feedbacks, so this shouldn't have been needed in the first
place.
Even if the driver wouldn't support it, we still can't force
applications to sync after each frame. In fact, the old VCE dual
instance feature relied on the vaSyncSurface not being called every
frame.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31933>
2024-11-02 07:02:55 +00:00
David Rosca
fa65224c86 frontends/va: Remove H264 encode delayed flush
This was added for the VCE dual instance feature and it tries
to delay flush such as the flush is done only every second frame.
For this it requires applications not to call vaSyncSurface after
each vaEndPicture, otherwise every frame will be flushed.
When this was implemented in 2016, libva and applications were
different. Now applications will always sync surface after each
end frame, making this feature completely non-functional.

Another issue is that this is incorrect, the flush cannot be delayed
and every vaEndPicture needs to flush. This is needed to ensure
interop with other APIs (eg. sharing dmabufs with GL) works correctly.
Delaying the flush would also mean submitting the same surface
every frame for encoding (and changing the surface contents before
encoding each frame) will not work.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31933>
2024-11-02 07:02:55 +00:00
David Rosca
d6c08a4345 radeonsi/vce: Remove dual instance support
This feature requires only flushing every second frame (submit two
encode jobs together), but that's not possible with VAAPI where
vaEndPicture is required to flush.
Current implementation in va frontend needs application to not call
vaSyncSurface after each vaEndPicture, but all applications actually
sync surface after each end picture so it will always flush after each
frame.

Remove this feature as the frontend implementation is wrong and it's not
even used currently because applications don't behave the way this expects.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31933>
2024-11-02 07:02:55 +00:00
Patrick Lerda
5c63d7a916 r600: fix sfn_nir_legalize_image_load_store cubearray behavior
This change fixes the calculation of the number of cubemap
images which requires a 6x multiplier.

This commit is inspired from nir_lower_robust_access and fixes
at least the following tests on cayman:
spec/arb_shader_image_load_store/layer/imagecubearray/layered binding test: fail pass
spec/arb_shader_image_load_store/max-size/imagecubearray max size test/8x8x2046x1: fail pass

Fixes: 27f5157777 ("r600/sfn: Add lowering pass to legalize image access")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31626>
2024-11-01 22:35:25 +00:00
Alyssa Rosenzweig
4a931ec9eb asahi/clc: ingest spir-v
use mesa_clc for the spir-v part, this improves incremental build granularity.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31923>
2024-11-01 13:25:37 -07:00
Alyssa Rosenzweig
f31b451916 clc: add mesa_clc tool
This is a generic tool to convert OpenCL C to SPIR-V.

In the future, this will be replaced by `clang` directly using the LLVM SPIR-V
backend, but for now we need a tool in Mesa to provide this functionality with
older LLVM versions.

The important parts are that:

1. It does not depend on NIR or any real platform details. An older mesa_clc
   from a previous Mesa version can generally be used to build a newer Mesa to
   ease cross-OS builds.

2. Its output can be consumed without any LLVM dependence, which will untangle
   the LLVM mess we have now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31923>
2024-11-01 13:25:37 -07:00
Casey Bowman
478b5aa050 vulkan/screenshot-layer: Remove extraneous malloc operations
Reduced the looping copy structure of a 2D array down to a single malloc
& memcpy operation to copy the entirety of the image buffer to a local
1D array copy.

With this setup, we can write the image row by row using the associated
libpng API call.

Local testing with vkcube showed ths as a large perf gain, reducing the
time it took to copy images by more than half:

Previous method:
mesa-screenshot: DEBUG: Time to copy: 251907 nanoseconds

Current method:
mesa-screenshot: DEBUG: Time to copy: 112904 nanoseconds

Also reduced swapchain image list malloc operations to one use. This
doesn't have much perf impact, but it's good to reduce the number of malloc
operations overall.

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/31793>
2024-11-01 17:11:29 +00:00
Casey Bowman
0b60969ec2 vulkan/screenshot-layer: Fix memory leaks
This frees a fairly large amount of memory from the 2D matrix by
iterating over the rows to free them individually.

Liuqiang spotted some areas that we return early in the threaded
function and don't free some pointers.

To remedy this, we'll reorder the checks so that we don't have to
return early and can instead use an if/else flow to take care of
these problematic areas in a more elegant way.

Co-authored-by: Casey Bowman <casey.g.bowman@intel.com>
Co-authored-by: liuqiang <liuqiang@kylinos.cn>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31793>
2024-11-01 17:11:29 +00:00
Casey Bowman
1438cb5c25 vulkan/screenshot-layer: Increase buffer sizes
This allows larger buffer sizes when using the env config as well
as filepath for the output directory.

This will allow, for example, using a large number of singular frames:
frames=1/2/3/4/5/6/7/8/.../300

Also fixed an issue with filepaths sometimes being appended with garbage
characters due to not being initialized.

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/31793>
2024-11-01 17:11:29 +00:00
Casey Bowman
461e1f985f vulkan/screenshot-layer: Fix image index selection
Previously, only the first image in the swapchain was chosen at all times
to be copied to a file.

This meant that if a list of consecutive images were selected, multiple
duplicate images would be saved, instead of the proper frames actually
used in the workload.

Now, the index is properly obtained from AcquireNextImageKHR(), leading
to the same image being used for the workload to be copied and saved to
a file.

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/31793>
2024-11-01 17:11:29 +00:00
Mike Blumenkrantz
5fd0b634d4 zink: add VVL for RADV jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27705>
2024-11-01 16:49:50 +00:00
Mike Blumenkrantz
01608a4067 zink: stop leaking precompiled generated tcs
this may have been created during precompile when using shader objects

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27705>
2024-11-01 16:49:50 +00:00
Samuel Pitoiset
f7636b611a radv: add a struct that describes the trap handler layout
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31934>
2024-11-01 15:40:25 +00:00
Samuel Pitoiset
49682fc0cb radv,aco: save SQ_WAVE_GPR_ALLOC from the trap handler
This would be used to dump SGPRs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31934>
2024-11-01 15:40:25 +00:00
Samuel Pitoiset
31fc3199dd radv: fix dumping the faulty shader detected by the trap handler on GFX9+
The most significant bits need to be cleared.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31925>
2024-11-01 15:01:35 +00:00
Samuel Pitoiset
7b4da7f736 radv: only emit the TBA/TMA registers on GFX8
On GFX9+, these registers are privilegied and the kernel needs to
configure them.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31925>
2024-11-01 15:01:35 +00:00
Samuel Pitoiset
930395c5e4 radv: check for has_trap_handler_support instead of asserting
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31925>
2024-11-01 15:01:35 +00:00
Samuel Pitoiset
e27ba67d33 ac: add ac_gpu_info::has_trap_handler_support
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31925>
2024-11-01 15:01:35 +00:00
Samuel Pitoiset
b23cc8c1d3 radv: add missing L2 non-coherent image case for mipmaps with DCC/HTILE on GFX11
According to PAL, an image with DCC/HTILE and mipmaps isn't coherent
with L2 when the mip level is in the metadata mip-tail region.

This fix isn't super optimal because the driver should rely on the
subresource range to determine if the mip level is in the mip-tail,
but it's easier to backport. Upcoming commits will optimize that.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11939
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31920>
2024-11-01 14:36:55 +00:00
David Rosca
c9ade8c3b5 radeonsi/vcn: Enable VCN4 AV1 encode WA
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31889>
2024-11-01 14:05:04 +00:00
Job Noorman
0d94bf1ef9 freedreno,computerator: add support for local memory
Add @localmem header to set the shared size of the shader. This allows
instructions like ldlw and stlw to be used.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31919>
2024-11-01 10:22:37 +00:00
Paulo Zanoni
5ca883505e brw: add a NOP in between WHILE instructions on LNL
This is a workaround that is still in progress, see HSD 22020521218.
If we don't have these NOPs we may see rendering corruption or even
GPU hangs.

While we still don't fully understand the issue from the hardware
point of view, let's have this workaround so we can pass CTS and move
things forward. If we need to change this later, we can. Besides, the
impact is minimal. Shaderdb/fossilize report no changes for this
patch.

On our Blackops trace, the lack of this patch causes corruption in fog
rendering (rectangles where fog was supposed to be shown don't show
the fog).

On dEQP-VK.graphicsfuzz.cov-array-copies-loops-with-limiters, without
this patch we get a GPU hang.

Backport-to: 24.2
Testcase: dEQP-VK.graphicsfuzz.cov-array-copies-loops-with-limiters
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11813
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31331>
2024-10-31 23:57:10 +00:00
Deborah Brouwer
a39d6f5003 freedreno/ci: remove redundant skip files
When running deqp-runner with a toml suite, the skip files can be
specified in the toml configuration or on the command line. The names of
most skip files are generated in `deqp-runner.sh` and passed through on
the command line so it’s not necessary to specify them again in the toml
suite. It doesn’t hurt, but it can be confusing.

Simplify the toml files by removing the duplicate skip files.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31912>
2024-10-31 15:05:16 -07:00
Rob Clark
eef0b09939 freedreno/a6xx: Random whitespace fix
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31927>
2024-10-31 20:02:00 +00:00
Rob Clark
49dd40247d freedreno/a6xx: Don't check dst coords
Only the src coords of a blit must be in-bounds.

"Fixes" dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_out_of_bounds_{min,mag}*
by virtue of avoiding the 3d u_blitter fallback, where NEAREST filtering
doesn't do what the deqp test expects.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/12085

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31927>
2024-10-31 20:02:00 +00:00
Jordan Justen
39fab9b240 intel/dev: Set L3 bank count for Xe2+ from Xe KMD
Rather than updating intel_device_info_update_l3_banks(), the Xe KMD
provides this info via the DRM_XE_DEVICE_QUERY_GT_TOPOLOGY query item.

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/31894>
2024-10-31 18:40:27 +00:00
Guilherme Gallo
2d5b574b8d ci/lava: Fix LAVA job definition tests
Now that the LAVAJobSubmitter's `__post_init__` method is working for
unit tests, one of the job definitions parametrized tests started to
fail due to lack of LAVA proxy mocking.

This commit adds the missing pieces.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31882>
2024-10-31 18:00:27 +00:00
Guilherme Gallo
bc86b73bbe ci/lava: Fix lava-tags parsing
python-fire auto-converts `item1,item2` into a tuple, but if there is a
dash `-` inside the argument, it treats it as a string.

Let's validate the data, when it comes as a `str` or `tuple`.

For more details, here are the tested scenarios:

| --lava-tags= | Type  | Value               |
|--------------|-------|---------------------|
| None         | bool  | True                |
| ''           | str   | ''                  |
| tag1         | str   | "tag1"              |
| tag1,        | tuple | ("tag1",)           |
| tag-1,tag-2  | str   | 'tag-1,tag-2'       |
| tag1,tag2    | tuple | ("tag1", "tag2")    |
| ','          | str   | ','                 |
| ',,'         | str   | ',,'                |
| 'tag1,,'     | str   | 'tag1,,'            |

See also:
https://google.github.io/python-fire/guide/#argument-parsing

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31882>
2024-10-31 18:00:27 +00:00
Daniel Stone
ce78dcb24e ci/lava: Refactor is-rootfs-uploaded function
We don't need the /done anymore, because we have better job
dependencies. But the mainline-or-fork query is still helpful, so
refactor that out into a common helper we can reuse for other things.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31882>
2024-10-31 18:00:27 +00:00
Daniel Stone
f44970173d ci/lava: Provide list of overlays to submitter
Instead of providing a hardcoded set of arguments, allow overlays to be
added to the submitter script. Passing Python dicts as a string
representation and relying on coercion from strings is far from great,
but fire doesn't give anything else, so.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31882>
2024-10-31 18:00:27 +00:00
Daniel Stone
f32a2de26d ci/lava: Provide LAVA rootfs URL directly
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31882>
2024-10-31 18:00:27 +00:00
Daniel Stone
2b3839c9c7 ci/lava: Use LAVA rootfs overlays for build/per-job
We compose the rootfs from a mixture of the base rootfs (exported from
the container build stage, currently lava_build.sh, which can be reused
as long as the container isn't rebuilt), the Mesa build overlay
(exported from the debian-* build job, which can be reused for every job
in that pipeline), and the per-job rootfs (containing job-specific
variables which cannot be reused).

Instead of having LAVA pull the base rootfs and separately downloading
the build/per-job parts on the DUT, get LAVA to compose the whole thing
by using overlays.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31882>
2024-10-31 18:00:26 +00:00
Daniel Stone
021d7d8b77 ci/lava: Remove duplicate build download
We already do it above.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31882>
2024-10-31 18:00:26 +00:00
Samuel Pitoiset
01f329ec82 radv/ci: skip dEQP-VK.api.command_buffers.many_indirect_disps_on_secondary
It can also hang randomly on VanGogh, let's skip it by default for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31922>
2024-10-31 11:44:12 +00:00
Erik Faye-Lund
62622c6523 panvk: enable KHR_16bit_storage
This enables the 16bit storage extensions, with the
uniformAndStorageBuffer16BitAccess feature-bit.

This seems to already be implemented, so let's just expose it!

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31907>
2024-10-31 11:06:28 +00:00
Samuel Pitoiset
77e59eefc1 radv: add an option to configure the trap handler exceptions
This introduces RADV_TRAP_HANDLER_EXCP to configure the various
shader exceptions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31902>
2024-10-31 06:58:15 +00:00
Samuel Pitoiset
75d979cdfb docs: add missing RADV_TRAP_HANDLER
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31902>
2024-10-31 06:58:15 +00:00
Samuel Pitoiset
6b5a0f57ba radv: fix configuring the memory violation exception for the compute stage
The compute stage has two EXCP_EN fields and the memory violation bit
is in EXCP_EN_MSB. Confirmed by writing a small test on GFX8.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31902>
2024-10-31 06:58:14 +00:00
Chia-I Wu
e474d4ebee panvk: add support for VK_KHR_timeline_semaphore
On panthor, VK_SYNC_FEATURE_TIMELINE is always supported.  On panfrost,
we can use vk_sync_timeline_get_type.

Note that there is a kernel issue regarding syncobj query that causes
dEQP-VK.synchronization.timeline_semaphore.wait.poll_signal_from_device
to time out when VK_SYNC_FEATURE_TIMELINE is set.  It is considered a
kernel bug and is not dealt with here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31720>
2024-10-30 21:04:20 +00:00
Chia-I Wu
287a4f4701 panvk/jm: assert that the submit mode is not threaded
If the submit mode was VK_QUEUE_SUBMIT_MODE_THREADED, we would need to
call vk_common_QueueWaitIdle.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31720>
2024-10-30 21:04:20 +00:00
Chia-I Wu
60ade50d2d Revert "panvk: Set the submit mode to THREADED_ON_DEMAND"
This reverts commit aedb00ca08.
vk_device_init is able to set the submit mode correctly based on
vk_sync_type.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31720>
2024-10-30 21:04:20 +00:00
Chia-I Wu
d3eb432155 panvk: remove an incorrect assert in collect_cs_deps
src_stages_to_subqueue_sb_mask calls stages_cover_subqueue, but also has
a special case for VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31720>
2024-10-30 21:04:20 +00:00
Lionel Landwerlin
1485b5659a anv: update some of the indirect invalidations
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31915>
2024-10-30 20:39:31 +00:00
Lionel Landwerlin
cb224370b6 anv: avoid L3 fabric flush in pipeline barriers
This bit is not needed for barriers and appears to trigger a
performance regression. So leave it for just for AUX-TT
flushing/invalidation.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e3814dee1a ("anv: add plumbing/support for L3 fabric flush")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12090
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31915>
2024-10-30 20:39:31 +00:00
Rob Clark
98ff271c5a util/primconvert: Avoid OoB with improbable draws
Detect when the temporary index buffer cannot be generated due to too
large primitive count, and simply drop the draw on the floor.

Fixes a webgl reachable asan/crash.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12092
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31914>
2024-10-30 19:59:14 +00:00
Alyssa Rosenzweig
506b9a5ff5 nir/divergence_analysis: add AGX atomics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31909>
2024-10-30 19:04:32 +00:00
Eric Engestrom
a84abce84b docs: add sha sum for 24.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31913>
2024-10-30 18:54:56 +00:00
Eric Engestrom
e0c05642a3 docs: update calendar for 24.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31913>
2024-10-30 18:54:56 +00:00
Eric Engestrom
d9c8396918 docs: add release notes for 24.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31913>
2024-10-30 18:54:56 +00:00
Collabora's Gfx CI Team
ff442e49b3 Uprev Piglit to c2b31333926a6171c3c02d182b756efad7770410
791e420b26...c2b3133392

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31811>
2024-10-30 18:11:56 +00:00
Timur Kristóf
96b95c8427 radv: Flush L2 cache for non-L2-coherent images in EndCommandBuffer.
This fixes a CTS hang on Hawaii.

We previously only did a CB/DB flush,
but that doesn't include a L2 cache flush.
Also fix the comment that said this is for GFX9+.

Fixes: 7c62f6fa01
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/31906>
2024-10-30 17:46:50 +00:00
Samuel Pitoiset
7015e22cb6 ac/nir: cull triangles/lines when all W positions are zero/NaN
It looks like the fixed-func hardware is very slow to cull primitives
with zero pos.w but shader based culling helps a lot.

This fixes a massive performance gap with the FSR2 demo compared to
AMDGPU-PRO, +228% on RDNA2.

Based on my investigation, AMDGPU-PRO seems to always cull these
primitives. Note that disabling NGG culling with AMDGPU-PRO reports the
same performance as RADV without that fix. Also note that the FSR2
sample doesn't specify any cull mode (ie. VK_CULL_MODE_NONE is used),
so this is the only reason PRO was culling more than RADV.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7260
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31891>
2024-10-30 17:09:37 +00:00
Eric Engestrom
322a83f321 ci/build: lower most job's timeout from 30 to 15 min
Out of 5 run during busy hours, all the jobs that once took 5+ min are:
build-for-tests / debian-arm64-asan      6 min
build-only      / debian-s390x           6 min
build-only      / debian-android         7 min
build-only      / debian-clang           8 min
build-for-tests / debian-arm32-asan      8 min
build-only      / debian-vulkan         11 min
build-for-tests / debian-testing        12 min
build-only      / debian-testing-msan   12 min
build-only      / debian-clang-release  13 min
build-only      / alpine-build-testing  14 min
build-for-tests / debian-testing-asan   21 min

The jobs at 10+ min are considered to take long enough that they might
risk crossing the 15 min mark, so let's keep these ones at 30 min and
lower the timeout for everyone else to 15 min.

It's worth pointing out that debian-testing-asan is a build-for-tests
job and as such it blocks build-only jobs from running until it's
finished, which can be a problem for a job that has been seen taking 20+
minutes. We should do something about that, but that's not the topic of
this MR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31846>
2024-10-30 16:21:16 +00:00
Eric Engestrom
6425b6e3d4 ci/build: handle build timeout ourselves to give more time to nightly LTO builds
GitLab doesn't (yet) support `timeout:` being a variable, so let's put
the real `timeout:` at the max timeout we want, and internally use
another timeout (using coreutils' `timeout`) that we _can_ set using
a variable.

With that, we can set a 1h timeout on nightly LTO builds while keeping
our tighter 30min timeout the rest of the time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31846>
2024-10-30 16:21:16 +00:00
Eric Engestrom
f5f82fdff5 ci/build: deduplicate meson build command
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31846>
2024-10-30 16:21:16 +00:00
Connor Abbott
d3533716f9 ir3: Fix detection of nontrivial continues
We may still need to insert a continue block even if there is only one
backedge, in a situation like:

for (...) {
   if (...) continue;
   foo();
   break;
}

We want foo() to be executed before reconverging. This is important for
the BVH encoding kernel, which launches an invocation for each node in
the tree and does a preorder traversal:

while (true) {
   if (!ready[node]) continue;
   encode();
   for (child node)
      ready[child] = true;
   break;
}

For the first few nodes, which will be in the same wave, we need
encode() for the root node to be called first, then its children spin
until ready, then the children call encode(), and so on. This can only
work if the children that aren't ready yet are parked while the parent
executes encode(), which requires the continue block.

This is also required because divergence analysis will assume that
uniform values written before the continue are still uniform after it,
which isn't the case now and causes an RA validation failure with Godot.

Fixes: 0fa93fb662 ("ir3: Fix convergence behavior for loops with continues")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31905>
2024-10-30 15:37:31 +00:00
Erik Faye-Lund
c245609b64 docs/features: mark off more panvk extensions
These are already implemented, let's check them off.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31887>
2024-10-30 15:23:29 +00:00
Erik Faye-Lund
c987a2a3dd docs/features: claim vk 1.0 for panvk
We're not yet fully conformant to Vulkan 1.0, but we are getting
reasonably close. But this document isn't about conformance, it's
documenting what features are implemented, and we currently support all
Vulkan 1.0 features on PanVK.

So let's toggle this switch.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31887>
2024-10-30 15:23:29 +00:00
Alyssa Rosenzweig
0f278bf3c5 hk: enable constant promotion
reduce the perf gap with GL :)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
c8870da833 agx: fold more inots
noticed in the tessellator.

total instructions in shared programs: 2757905 -> 2757078 (-0.03%)
instructions in affected programs: 105372 -> 104545 (-0.78%)
helped: 115
HURT: 0
helped stats (abs) min: 1 max: 29 x̄: 7.19 x̃: 6
helped stats (rel) min: 0.02% max: 6.67% x̄: 2.01% x̃: 2.44%
95% mean confidence interval for instructions value: -8.67 -5.71
95% mean confidence interval for instructions %-change: -2.31% -1.71%
Instructions are helped.

total alu in shared programs: 2172400 -> 2171573 (-0.04%)
alu in affected programs: 82535 -> 81708 (-1.00%)
helped: 115
HURT: 0
helped stats (abs) min: 1 max: 29 x̄: 7.19 x̃: 6
helped stats (rel) min: 0.03% max: 9.58% x̄: 2.90% x̃: 3.30%
95% mean confidence interval for alu value: -8.67 -5.71
95% mean confidence interval for alu %-change: -3.33% -2.47%
Alu are helped.

total fscib in shared programs: 2168107 -> 2167280 (-0.04%)
fscib in affected programs: 82535 -> 81708 (-1.00%)
helped: 115
HURT: 0
helped stats (abs) min: 1 max: 29 x̄: 7.19 x̃: 6
helped stats (rel) min: 0.03% max: 9.58% x̄: 2.90% x̃: 3.30%
95% mean confidence interval for fscib value: -8.67 -5.71
95% mean confidence interval for fscib %-change: -3.33% -2.47%
Fscib are helped.

total bytes in shared programs: 21534940 -> 21528976 (-0.03%)
bytes in affected programs: 774528 -> 768564 (-0.77%)
helped: 115
HURT: 1
helped stats (abs) min: 2 max: 192 x̄: 51.88 x̃: 42
helped stats (rel) min: 0.01% max: 6.06% x̄: 1.85% x̃: 2.11%
HURT stats (abs)   min: 2 max: 2 x̄: 2.00 x̃: 2
HURT stats (rel)   min: 0.10% max: 0.10% x̄: 0.10% x̃: 0.10%
95% mean confidence interval for bytes value: -62.70 -40.13
95% mean confidence interval for bytes %-change: -2.14% -1.52%
Bytes are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
d51ae1b634 agx: don't upload constant padding at the start
noticed in vkcube.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
d6d66bf72d asahi,agx: rework constant promotion upload
stuff promoted constants into the binary, this simplifies state management.
saves a big pile of alloc&copy in the gl driver. will unblock this for VK.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
a3696f29c1 agx: run algebraic later
to deal with ldst vectorize leftover

ironically worse due to nir_opt_preamble lottery, but confirmed it fixes ldst
vectorize silliness in preambles, making preambles a *lot* shorter.

total instructions in shared programs: 2759806 -> 2759882 (<.01%)
instructions in affected programs: 26821 -> 26897 (0.28%)
helped: 0
HURT: 10
HURT stats (abs)   min: 1 max: 15 x̄: 7.60 x̃: 6
HURT stats (rel)   min: 0.07% max: 1.33% x̄: 0.47% x̃: 0.19%
95% mean confidence interval for instructions value: 3.65 11.55
95% mean confidence interval for instructions %-change: 0.09% 0.85%
Instructions are HURT.

total alu in shared programs: 2174292 -> 2174340 (<.01%)
alu in affected programs: 25727 -> 25775 (0.19%)
helped: 1
HURT: 10
helped stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
helped stats (rel) min: 0.05% max: 0.05% x̄: 0.05% x̃: 0.05%
HURT stats (abs)   min: 1 max: 11 x̄: 5.00 x̃: 4
HURT stats (rel)   min: 0.09% max: 0.52% x̄: 0.27% x̃: 0.23%
95% mean confidence interval for alu value: 1.92 6.81
95% mean confidence interval for alu %-change: 0.12% 0.37%
Alu are HURT.

total fscib in shared programs: 2170011 -> 2170059 (<.01%)
fscib in affected programs: 25727 -> 25775 (0.19%)
helped: 1
HURT: 10
helped stats (abs) min: 2 max: 2 x̄: 2.00 x̃: 2
helped stats (rel) min: 0.05% max: 0.05% x̄: 0.05% x̃: 0.05%
HURT stats (abs)   min: 1 max: 11 x̄: 5.00 x̃: 4
HURT stats (rel)   min: 0.09% max: 0.52% x̄: 0.27% x̃: 0.23%
95% mean confidence interval for fscib value: 1.92 6.81
95% mean confidence interval for fscib %-change: 0.12% 0.37%
Fscib are HURT.

total bytes in shared programs: 18414728 -> 18415244 (<.01%)
bytes in affected programs: 234114 -> 234630 (0.22%)
helped: 1
HURT: 11
helped stats (abs) min: 8 max: 8 x̄: 8.00 x̃: 8
helped stats (rel) min: 0.02% max: 0.02% x̄: 0.02% x̃: 0.02%
HURT stats (abs)   min: 4 max: 90 x̄: 47.64 x̃: 34
HURT stats (rel)   min: 0.03% max: 1.18% x̄: 0.39% x̃: 0.18%
95% mean confidence interval for bytes value: 20.47 65.53
95% mean confidence interval for bytes %-change: 0.08% 0.63%
Bytes are HURT.

total regs in shared programs: 864549 -> 864533 (<.01%)
regs in affected programs: 117 -> 101 (-13.68%)
helped: 3
HURT: 0
helped stats (abs) min: 4 max: 6 x̄: 5.33 x̃: 6
helped stats (rel) min: 10.26% max: 15.38% x̄: 13.68% x̃: 15.38%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
25c302d337 agx: test immediate packing opt
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
6d4dc9d9bf agx: negate iadd/imsub constants
total instructions in shared programs: 892853 -> 892841 (<.01%)
instructions in affected programs: 44400 -> 44388 (-0.03%)
helped: 12
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.02% max: 0.03% x̄: 0.03% x̃: 0.03%
95% mean confidence interval for instructions value: -1.00 -1.00
95% mean confidence interval for instructions %-change: -0.03% -0.03%
Instructions are helped.

total alu in shared programs: 676057 -> 676045 (<.01%)
alu in affected programs: 28599 -> 28587 (-0.04%)
helped: 12
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.04% max: 0.05% x̄: 0.04% x̃: 0.04%
95% mean confidence interval for alu value: -1.00 -1.00
95% mean confidence interval for alu %-change: -0.05% -0.04%
Alu are helped.

total fscib in shared programs: 675565 -> 675553 (<.01%)
fscib in affected programs: 28599 -> 28587 (-0.04%)
helped: 12
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.04% max: 0.05% x̄: 0.04% x̃: 0.04%
95% mean confidence interval for fscib value: -1.00 -1.00
95% mean confidence interval for fscib %-change: -0.05% -0.04%
Fscib are helped.

total bytes in shared programs: 6047050 -> 6046978 (<.01%)
bytes in affected programs: 303744 -> 303672 (-0.02%)
helped: 12
HURT: 0
helped stats (abs) min: 6 max: 6 x̄: 6.00 x̃: 6
helped stats (rel) min: 0.02% max: 0.03% x̄: 0.02% x̃: 0.02%
95% mean confidence interval for bytes value: -6.00 -6.00
95% mean confidence interval for bytes %-change: -0.03% -0.02%
Bytes are helped.

total uniforms in shared programs: 552413 -> 552315 (-0.02%)
uniforms in affected programs: 13800 -> 13702 (-0.71%)
helped: 48
HURT: 0
helped stats (abs) min: 2 max: 4 x̄: 2.04 x̃: 2
helped stats (rel) min: 0.39% max: 5.26% x̄: 0.96% x̃: 1.04%
95% mean confidence interval for uniforms value: -2.13 -1.96
95% mean confidence interval for uniforms %-change: -1.18% -0.75%
Uniforms are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
f6d8bb9a66 agx: optimize wait_pix a bit
this is a start at least.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
85b3dc90e0 nir,agx: lower fmin/fmax in NIR
we want to elide flushes, doing so requires more sophisticated analysis than I'd
like in the middle of isel. also, it should be done before forming preambles for
efficiency (notice the uniform reduction here). let's do it with a NIR pass.

total instructions in shared programs: 2768481 -> 2757832 (-0.38%)
instructions in affected programs: 644084 -> 633435 (-1.65%)
helped: 2242
HURT: 18
helped stats (abs) min: 1 max: 349 x̄: 4.77 x̃: 3
helped stats (rel) min: 0.01% max: 34.91% x̄: 3.19% x̃: 2.19%
HURT stats (abs)   min: 1 max: 19 x̄: 2.89 x̃: 1
HURT stats (rel)   min: 0.24% max: 7.94% x̄: 1.27% x̃: 0.81%
95% mean confidence interval for instructions value: -5.20 -4.22
95% mean confidence interval for instructions %-change: -3.30% -3.01%
Instructions are helped.

total alu in shared programs: 2182880 -> 2172352 (-0.48%)
alu in affected programs: 513166 -> 502638 (-2.05%)
helped: 2235
HURT: 16
helped stats (abs) min: 1 max: 349 x̄: 4.73 x̃: 3
helped stats (rel) min: 0.02% max: 37.65% x̄: 3.70% x̃: 2.59%
HURT stats (abs)   min: 1 max: 19 x̄: 2.50 x̃: 1
HURT stats (rel)   min: 0.33% max: 3.74% x̄: 1.04% x̃: 0.91%
95% mean confidence interval for alu value: -5.16 -4.20
95% mean confidence interval for alu %-change: -3.83% -3.49%
Alu are helped.

total fscib in shared programs: 2178643 -> 2168059 (-0.49%)
fscib in affected programs: 514666 -> 504082 (-2.06%)
helped: 2243
HURT: 17
helped stats (abs) min: 1 max: 349 x̄: 4.74 x̃: 3
helped stats (rel) min: 0.02% max: 37.65% x̄: 3.74% x̃: 2.59%
HURT stats (abs)   min: 1 max: 19 x̄: 2.65 x̃: 1
HURT stats (rel)   min: 0.33% max: 14.71% x̄: 1.85% x̃: 0.93%
95% mean confidence interval for fscib value: -5.16 -4.20
95% mean confidence interval for fscib %-change: -3.87% -3.53%
Fscib are helped.

total bytes in shared programs: 18467348 -> 18403042 (-0.35%)
bytes in affected programs: 4403648 -> 4339342 (-1.46%)
helped: 2247
HURT: 20
helped stats (abs) min: 2 max: 2132 x̄: 28.73 x̃: 18
helped stats (rel) min: 0.01% max: 33.53% x̄: 2.80% x̃: 1.94%
HURT stats (abs)   min: 4 max: 72 x̄: 12.60 x̃: 6
HURT stats (rel)   min: 0.23% max: 6.58% x̄: 1.06% x̃: 0.75%
95% mean confidence interval for bytes value: -31.29 -25.45
95% mean confidence interval for bytes %-change: -2.90% -2.64%
Bytes are helped.

total regs in shared programs: 864605 -> 864442 (-0.02%)
regs in affected programs: 4692 -> 4529 (-3.47%)
helped: 68
HURT: 48
helped stats (abs) min: 1 max: 54 x̄: 7.25 x̃: 3
helped stats (rel) min: 4.26% max: 43.20% x̄: 13.21% x̃: 10.53%
HURT stats (abs)   min: 1 max: 36 x̄: 6.88 x̃: 6
HURT stats (rel)   min: 3.64% max: 91.67% x̄: 23.12% x̃: 24.00%
95% mean confidence interval for regs value: -3.60 0.79
95% mean confidence interval for regs %-change: -2.10% 5.75%
Inconclusive result (value mean confidence interval includes 0).

total uniforms in shared programs: 2120927 -> 2120911 (<.01%)
uniforms in affected programs: 770 -> 754 (-2.08%)
helped: 6
HURT: 0
helped stats (abs) min: 2 max: 4 x̄: 2.67 x̃: 2
helped stats (rel) min: 1.79% max: 2.70% x̄: 2.13% x̃: 1.96%
95% mean confidence interval for uniforms value: -3.75 -1.58
95% mean confidence interval for uniforms %-change: -2.50% -1.76%
Uniforms are helped.

total threads in shared programs: 27612224 -> 27613056 (<.01%)
threads in affected programs: 7168 -> 8000 (11.61%)
helped: 6
HURT: 3
helped stats (abs) min: 64 max: 192 x̄: 170.67 x̃: 192
helped stats (rel) min: 8.33% max: 23.08% x̄: 20.62% x̃: 23.08%
HURT stats (abs)   min: 64 max: 64 x̄: 64.00 x̃: 64
HURT stats (rel)   min: 8.33% max: 9.09% x̄: 8.59% x̃: 8.33%
95% mean confidence interval for threads value: -3.17 188.06
95% mean confidence interval for threads %-change: -0.92% 22.69%
Inconclusive result (value mean confidence interval includes 0).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
b3ef0f5aa8 asahi: don't leak drm version
valgrind.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
9ce092c982 asahi: don't leak linked shaders
Oof!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
ae7c9995ff asahi: don't leak binaries
ouch. valgrind.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
cb7348eac0 asahi: don't leak blit shaders
valgrind

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
6a27a3838c asahi: assert guard previously-subtle code
would've caught the bug in the previous patch.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
09fde905a0 asahi: fix extremely subtle UAF
we can get into weird situations and the clever logic isn't worth it. do
unclever logic instead and fix subtle CTS flakes. GL was a mistake.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
72a05db7ea asahi: fix indirect buffer UAF
discovered by disabling BO cache, was working by chance before!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
08b2e10dee asahi: add the BO even for internal dispatches
whoops.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
fc6cf2020f asahi: use indirect ptr helper more
ergonomic

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
28b7ad6e27 asahi: pad blit key
avoid uninit read.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
8937277143 asahi: drop unused
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
b40fd95eee asahi/clc: strip nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
e86a35dad2 libagx: always tessellate clockwise
easy enough to flip later in the pipeline instead and reduce significantly the
tessellator variants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
87e6324459 libagx: make points mode dynamic
it's a cold enough path.

16 to 10 tessellator variants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
a7843643c6 libagx: drop generated VDM tess path (for now?)
this was definitely the coolest thing I did in my career. but it has a lot of
drawbacks:

* complexity across the whole stack.
* perf #s even for synthetic tess workloads are... lackluster. couple % on
  terraintess. and games tend not to be tess heavy (and if they are we're
  screwed and this won't save us.) ironically, sascha willem's non-terrain tess
  is sped up a ton by the prefix sum path, so.. lol?
* more brittle for (M3?) porting.
* makes it harder to make the tessellator common code.
* doesn't play nice with the indirect path.
* pile of extra tessellator variants.
* harder to test, coverage is already not great here.

so... drop it, for now. the code isn't gone, and the idea may come back in a
future iteration, perhaps based on mesh shaders. but in its current form I don't think it's worth keeping right now.

my main resevation is actually about heap usage from doubling the index buffer
size. hopefully this is tolerable in practice.

this gets us from 24 to 16 tessellator variants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
02e29bdea4 libagx: don't rely on loop unroll in txs
silly, should reduce memory footprint.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
4607e0bf31 libagx: fix missing statics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
ddf2f2f5b1 hk: make tess partitioning dynamic
no discernible difference in perf in terraintessellation. reduces tessellator
variants from 72 to 24.

before:
SHADER-DB:  - MESA_SHADER_COMPUTE shader: 2966 inst, 2310 alu, 2310 fscib, 1216 ic, 23148 bytes, 239 regs, 180 uniforms, 0 scratch, 384 threads, 17 loops, 0:0 spills:fills

after:
SHADER-DB:  - MESA_SHADER_COMPUTE shader: 3011 inst, 2343 alu, 2343 fscib, 1264 ic, 23508 bytes, 235 regs, 188 uniforms, 0 scratch, 384 threads, 17 loops, 0:0 spills:fills

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
d3d22039e1 hk: allow tess modes in either stage
this makes shader objects more flexible.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
9bbe93d158 hk: fix alpha-to-coverage with sample shading
fixes sascha willem's deferredmultisampling.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
d0b3b4c309 agx: move binary_size into info
this simplifies serialization, and will simplify future work.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
6c5be08269 agx: pack agx_cf_binding
dramatically reduces shader info size.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
5d628e3892 agx: fix uniform packing with local_load
fixes with constant promotion:

dEQP-VK.compute.shader_object_spirv.workgroup_memory_explicit_layout.alias.i32_to_u16_array_scalar_func_read_write_barrier

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
773dd89fde asahi: fix no16 flag
regressed when shuffling code for hk.

Fixes: 3cb8c1de81 ("asahi: get debug in common")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Asahi Lina
02169e76dd agx: Fix queue destroy op for virtgpu
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
12ab3abaac hk: bump max push size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
6dad37c812 hk: use push size macro
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
fe84aaa8a7 hk: switch to 64-bit queries
for timestamps

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
b1b125dbe6 hk: drop store_op_dontcare w/a
updated CTS fixes this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
3ee036b2b5 hk: wire up indirect tess
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
a4e3ca1fc5 hk: add mechanism to test indirects
while we wait for cts.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
b8ae31948d hk: plumb indirect_local
for tess.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
e68aed3a13 libagx: extend indirect tess to handle indexed
this was missed, vk cts hits it

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
5e464521fb asahi: presumably fix indirect indexed tess
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Mary Guillemard
053d4c5666 hk: Fill deviceUUID
Before this the device UUID was never filled.

Fixes: 5bc8284816 ("hk: add Vulkan driver for Apple GPUs")
Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Sergio Lopez
167744dce9 hk: allow overriding sysmem with an env var
When running in a VM, the amount of RAM seen through /proc/meminfo
doesn't necessarily reflect the real amount of memory available in the
system to be used as VRAM. For instance, on a system with 8 GB of
physical RAM, the user might want to run a VM with 2 GB of RAM and still
be able to use 4 GB as VRAM.

To achieve this, allow the reported sysmem to be overridden by the
value (in bytes) of the HK_SYSMEM environment variable.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Sergio Lopez
2c18b0c6aa hk: limit the number of free BOs in each cmd pool
Some clients like to have long living command pools, each one with
multiple command buffers, and trigger bursts of BO allocations on them.
This leads to the an ever increasing number of BOs allocated on each
command pool, easily reaching over a couple thousand BOs per pool.

The visible effect is an ever increasing amount of VRAM consumption,
which has been observed to easily get over 700MB for a workload
consuming around 4GB of heap.

Here we limit the number of free BOs in each pool to 32. The rest are
dereferenced when the command buffer is reset. In practice, with
workloads triggering bursts of BO allocations on command buffers, those
BOs aren't really released, keeping them in the BO cache and getting
reused shortly after. This has the nice size effect of doing bookkeeping
on the BO cache, trimming it up when needed.

With this change, the tested workloads present a significant reduction
of VRAM, combined with an stabilization of BO allocations.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
2c513e8689 agx: consistent ffma name
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
7e9d468891 agx: encoding_32 -> encoding
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
22a8a0fe6d agx: drop encoding_16
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
ce02690902 agx: special case mov_imm
so we can rm a worse special case

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
11f797d93a agx: split up f16 ops
they're fundamentally different instructions, model that appropriately.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
72b533f5c7 asahi,agx: clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:07 -04:00
Alyssa Rosenzweig
7ca27ebd46 asahi: rm tessellator branch
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
ea18348d94 asahi: defer fixed->float to tess
this should parallelize better.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
3f6ff1b11e asahi: don't do extra runtime validation for exact
silly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
cc8d50baf5 asahi: make wrapping less silly
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
c8a1c82175 asahi: get rid of default from the XML
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
1a2938704d asahi: drop implied defaults
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
f3612689d9 asahi: automatically set default to encode to zero
even with mods.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
f5d8edd2de asahi: be explicit about frag properties
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
2dff6a541e asahi: be explicit about usc reg unk
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
0e49bd15ff asahi: drop unused default
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
0f5f4e10b5 asahi: set clamp W? explicitly
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
20fd77ba03 asahi: idetnify Clamp W
this is in the powervr xml.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a88cebb7c3 asahi: drop dated comments
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
37161f2483 asahi: drop comment about blob weirdness
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
e55207f973 asahi: drop comment
I no longer believe this is correct.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
7cdd2a642d asahi: set exact on some fixed? unknown fields
I don't think I've ever seen these change. Treat as fixed constants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
04a27020be asahi: drop fragment face 2 defaults
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
8dfe60bd26 asahi: drop PBE default
this changes null PBE to use 1d instead of 2d, this should be ok and is
consistent with texturing.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
0098941c99 asahi: drop macOS defaults
we don't pack macOS structs anymore so we dont' care.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
15a97db59d asahi: drop zero defaults
this is implied.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
2a2889b72e asahi: be explicit about LOD clamps
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
c8f8e2e19d asahi: drop trailing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
50798855b8 asahi: convert to exact
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a8bb267b16 asahi: add exact fields to genxml
instead of misusing default for this. get better validation and eventually I
want to whack default.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a0c786b47f asahi: fix newlines
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
5f54d8d195 asahi: guard darwin stuff
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a91aecc03f asahi: guard some apple code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
0ec9b27ff0 asahi: drop extra new line
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
d370b81fd4 asahi: cleanup generate valid
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
84d3d7e158 asahi: cleanup validation
make less of a mess of generated output.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
c3b202b71e asahi: fix indentation
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
8809b8c662 asahi: migrate f-strings
https://github.com/ikamensh/flynt nifty

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
a1b8aae170 asahi: normalize enum formatting
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
06a3ecf617 asahi: assume compiler is not stupid
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
f16597d488 asahi: fix spacing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
5787a6ade8 asahi: split out genxml header
for syntax highlighting and autoformatting and so on.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
2024-10-30 10:14:06 -04:00
Alyssa Rosenzweig
e3f91fb13c nir/serialize: fix name
no more nir_register

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31892>
2024-10-30 12:59:11 +00:00
Alyssa Rosenzweig
b8624d5c6b nir: correct comment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31892>
2024-10-30 12:59:11 +00:00
Alyssa Rosenzweig
af2a796b13 util/ralloc: add total_size helper
It's useful to determine how much memory a nir_shader consumes for debugging
memory bloat, particularly for persistent NIR library. Add a helper that lets us
compute this.

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/31892>
2024-10-30 12:59:10 +00:00
Alyssa Rosenzweig
33299354e0 nir/opt_algebraic: optimize patterns hit with OpenCL
This patterns were all found in the AGX quads tessellator, a medium-sized OpenCL
kernel. LLVM generates a lot of garbage around booleans which we need to chew
through. Though there's nothing AGX or really OpenCL specific here, so some of
this could help graphics shaders too.

Together, their effect is significant for that kernel instr count & occupancy:

before: 2966 inst, 2310 alu, 2310 fscib, 1216 ic, 23148 bytes, 239 regs, 384 threads
after:  2848 inst, 2246 alu, 2246 fscib, 1000 ic, 22260 bytes, 231 regs, 448 threads

No significant changes on GL shaderdb (a single godot shader regressed 1
instruction, 1344->1345).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31892>
2024-10-30 12:59:10 +00:00
Samuel Pitoiset
fc0545e6a7 radv: fix wrong index in radv_skip_graphics_pipeline_compile()
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12089
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31901>
2024-10-30 11:25:59 +00:00
Boris Brezillon
32ccec7450 pan/cs: Fix lazy allocation support
Commit 0e6aaab00a ("pan/cs: add block to handle registers backup in
exception handler") broke the lazy allocation case by checking the
current chunk capacity too early.

Fixes: 0e6aaab00a ("pan/cs: add block to handle registers backup in exception handler")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Tested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Tested-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com>
Tested-by: Benjamin Re <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31884>
2024-10-30 10:19:21 +00:00
Benjamin Lee
ffe68eb225 panvk: flush sync point before executing secondary cmdbufs
Secondary command buffers need seqno registers to hold the current value
at the start of command buffer execution in order to calculate correct
wait values.

Fixes: c2299b6642 ("panvk/csf: Implement vkCmdExecuteCommands")
Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@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/31813>
2024-10-30 09:57:53 +00:00
Benjamin Lee
2b1ec1c35d panvk: allow resuming secondary cmdbufs with dynamic rendering
The removed assertion was originally added to enforce

> VUID-vkCmdExecuteCommands-pCommandBuffers-00100:
>  If vkCmdExecuteCommands is not being called within a render pass
>  instance, each element of pCommandBuffers must not have been recorded
>  with the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT

However, if a render pass instance is entered with vkCmdBeginRendering,
vk_command_buffer::render_pass is unset.

Code change was done by Boris, only commit description was added.

Fixes: c2299b6642 ("panvk/csf: Implement vkCmdExecuteCommands")
Co-authored-by: Boris Brezillon <boris.brezillon@collabora.com>
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>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31813>
2024-10-30 09:57:53 +00:00
Daniel Schürmann
62715984f8 aco/README: add descriptions of recently added passes
... and less recent ones.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31888>
2024-10-30 09:23:54 +00:00
Daniel Schürmann
21ceeb22ed aco: move jump threading optimization into separate pass
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31888>
2024-10-30 09:23:54 +00:00
Daniel Schürmann
87a3c08df1 aco/ssa_elimination: remove some redundant checks during jump threading
Since phis got already lowered to parallelcopies by this point,
there is no need to cross-check.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31888>
2024-10-30 09:23:54 +00:00
Daniel Schürmann
a6c38f706d aco/ssa_elimination: perform jump threading after parallelcopy insertion
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31888>
2024-10-30 09:23:54 +00:00
Erik Faye-Lund
b63dab29f0 panvk: expose EXT_depth_clip_enable
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/31886>
2024-10-30 09:55:56 +01:00
Erik Faye-Lund
e6174e6139 panvk/csf: respect depth-clip state
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/31886>
2024-10-30 09:55:50 +01:00
Erik Faye-Lund
117283cdf8 panvk/jm: respect depth-clip state
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/31886>
2024-10-30 09:55:43 +01:00
Erik Faye-Lund
0ebb1b737c panvk: drop duplicate dirty-test
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/31886>
2024-10-30 09:55:17 +01:00
David Rosca
84bce1af41 radeonsi: Support HEVC features and block sizes for UVD
Features are the same as VCN 1.0, block sizes are different.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31872>
2024-10-30 07:13:30 +00:00
David Rosca
4f31625aa6 radeonsi/uvd_enc: Allocate session buffer in VRAM
Improves encoding performance on dGPUs.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31872>
2024-10-30 07:13:30 +00:00
David Rosca
079ff0a9df radeonsi: Enable VIDEO_CAP_ENC_SUPPORTS_ASYNC_OPERATION on VCE/UVD
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31872>
2024-10-30 07:13:30 +00:00
David Rosca
1921473f1f radeonsi/vce: Implement fence_wait
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31872>
2024-10-30 07:13:30 +00:00
David Rosca
375ecea7b5 radeonsi/uvd_enc: Implement fence_wait
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31872>
2024-10-30 07:13:29 +00:00
Eric Engestrom
e69aba2cde freedreno/ci: add nightly freedreno gl testing on a750
Not very stable (got a hang 7/20 times while stress-testing), but it's
probably still useful in nightly, especially given how quick it is.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31849>
2024-10-29 20:31:48 +00:00
Eric Engestrom
1bfbc3abf6 freedreno/ci: abort a750 testing when a hang is detected
There's no point continuing just to get a massive number of fails.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31849>
2024-10-29 20:31:48 +00:00
Samuel Pitoiset
4459a1d210 radv: resize the SPM bo when it's too small
This used to abort (see the previous commit) when the hardware wasn't
able to sample all SPM counters because the BO was too small. The SPM
BO can now be resized like the SQTT BO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31883>
2024-10-29 18:33:17 +00:00
Samuel Pitoiset
e14511f77d ac/spm: do not abort when the SPM BO is too small
It needs to be resized instead, like the SQTT BO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31883>
2024-10-29 18:33:17 +00:00
Chia-I Wu
cc1c663152 panvk: disable depth write when depth test is disabled
The spec says

  depthWriteEnable controls whether depth writes are enabled when
  depthTestEnable is VK_TRUE. Depth writes are always disabled when
  depthTestEnable is VK_FALSE.

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/31878>
2024-10-29 18:08:03 +00:00
Eric Engestrom
09a2de2a51 egl: error out during setup if the configuration is invalid
If EGL is built, it needs a driver; if we don't abort setup here,
the compilation fails with:

    ld: error: undefined symbol: _eglDriver

See #11397 or #11956 for instance.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31870>
2024-10-29 17:25:08 +00:00
Marek Olšák
16aec27515 radeonsi: simplify util_rast_prim_is_lines_or_triangles
PATCHES can't occur here.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
2024-10-29 16:47:44 +00:00
Marek Olšák
73abbf1175 radeonsi: rewrite how small prim precision is passed to culling code
Instead of passing 2 different 4-bit precision values via the SGPR, pass
the quant mode enum + log_samples as 3 bits, and 2-bit log_samples
separately. This saves 3 bits in the SGPR, which we'll need for culling
states.

This completely changes how the small prim precision is computed from
the state bits.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
2024-10-29 16:47:44 +00:00
Marek Olšák
4f096b994d ac/nir,radeonsi: use load_cull_line_viewport_xy_scale_and_offset_amd
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
2024-10-29 16:47:44 +00:00
Marek Olšák
0f39d44f1b ac/nir,radeonsi: use load_cull_small_line_precision_amd
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
2024-10-29 16:47:44 +00:00
Marek Olšák
10c6f87adb ac/nir,radeonsi: use load_cull_small_lines_enabled_amd
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
2024-10-29 16:47:44 +00:00
Marek Olšák
ee452129c6 nir: add cull_triangles_, cull_lines_ prefixes to viewport_xy_scale_and_offset
for radeonsi

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
2024-10-29 16:47:44 +00:00
Marek Olšák
2227f5be9d nir: rename load_cull_small_primitive_precision -> triangle, add line_precision
for radeonsi

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
2024-10-29 16:47:44 +00:00
Marek Olšák
0914e0d02f nir: rename load_cull_small_primitives -> triangles, add load_cull_small_lines
for radeonsi

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
2024-10-29 16:47:44 +00:00
Lu Yao
0442a6c292 ac/radeonsi: compute htile for tile mode RADEON_SURF_MODE_1D on GFX6-8
Computing 'htile_size/meta_size' is allowed for RADEON_SURF_MODE_1D when
RADEON_SURF_TC_COMPATIBLE_HTILE isn't set.
Lacking of computing causes performance degradation in some scenarios.

Fixes: d4d9ec55c5 ("radeonsi: implement TC-compatible HTILE")
Signed-off-by: Lu Yao <yaolu@kylinos.cn>
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/31617>
2024-10-29 16:23:51 +00:00
Sagar Ghuge
17096f87c1 intel: Switch to COMPUTE_WALKER_BODY
Stuff COMPUTE_WALKER_BODY in COMPUTER_WALKER in both iris and anv.

This also fixes the tracepoint for ray dispatches. Stuffing
COMPUTE_WALKER_BODY allow us to set the
cmd_buffer->state.last_compute_walker.

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/31822>
2024-10-29 15:54:43 +00:00
Georg Lehmann
938f5ec7ce radv: use nir_opt_fragdepth
Cyberpunk 2077 writes unmodified depth.

Foz-DB Navi21:
Totals from 28 (0.04% of 79395) affected shaders:
Instrs: 6484 -> 6448 (-0.56%)
CodeSize: 36016 -> 35784 (-0.64%)
Latency: 58517 -> 58400 (-0.20%)
InvThroughput: 7719 -> 7717 (-0.03%)
Branches: 129 -> 119 (-7.75%)
PreVGPRs: 394 -> 372 (-5.58%)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31874>
2024-10-29 15:15:24 +00:00
Benjamin Lee
e52a599eba panvk: fix combined image/sampler descriptor arrays
For combined image/sampler descriptors, each user-facing descriptor gets
two entries in the descriptor table. Indexes must be strided to account
for this.

Signed-off-by: Benjamin Lee <benjamin.lee@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/31777>
2024-10-29 13:07:56 +00:00
cheyang
122fd46b15 Android15 support gralloc IMapper5
In Android15 libui.so the vendor partition can access.
so use GraphicBufferMapper load mapper4 or mapper5.
still using U_GRALLOC_TYPE_GRALLOC4 because GraphicBufferMapper
load mapper5 fail will rollback loading mapper4

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

Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31766>
2024-10-29 12:32:04 +00:00
YaoBing Xiao
b63dfcc172 vulkan/x11: use xcb_connection_has_error to check for failue
xcb_connectxx() always returns a non-NULL pointer to a
xcb_connection_t, even on failure.

cc: mesa-stable

Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31812>
2024-10-29 11:52:37 +00:00
Georg Lehmann
d6535f2602 nir/opt_algebraic: create ubfe with non constant mask
Foz-DB Navi21:
Totals from 278 (0.35% of 79395) affected shaders:
MaxWaves: 7444 -> 7448 (+0.05%)
Instrs: 316069 -> 314584 (-0.47%); split: -0.47%, +0.00%
CodeSize: 1608064 -> 1593204 (-0.92%)
VGPRs: 11128 -> 11120 (-0.07%)
Latency: 796599 -> 797786 (+0.15%); split: -0.19%, +0.34%
InvThroughput: 141195 -> 139472 (-1.22%); split: -1.22%, +0.00%
Copies: 28565 -> 29796 (+4.31%); split: -0.15%, +4.46%
PreSGPRs: 14335 -> 14336 (+0.01%)
VALU: 161342 -> 159426 (-1.19%)
SALU: 87794 -> 88305 (+0.58%); split: -0.03%, +0.61%

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31852>
2024-10-29 10:51:10 +00:00
Timur Kristóf
be68aeafdc nir/opt_algebraic: Add various bitfield extract patterns.
v2 (Georg Lehmann):
- fixed incorrect imin in ubfe_ubfe
- simplied outer_bits of ushr((ubfe, ...), ...) opt
- added is_used_once to iand(ushr(), ...) opt to improve stats

For-DB Navi21:
Totals from 3309 (4.18% of 79206) affected shaders:
Instrs: 5295291 -> 5282128 (-0.25%); split: -0.28%, +0.03%
CodeSize: 28299320 -> 28298456 (-0.00%); split: -0.07%, +0.06%
Latency: 51566173 -> 51521923 (-0.09%); split: -0.09%, +0.01%
InvThroughput: 13222050 -> 13204557 (-0.13%); split: -0.14%, +0.01%
VClause: 116451 -> 116458 (+0.01%); split: -0.02%, +0.02%
SClause: 160356 -> 160324 (-0.02%); split: -0.03%, +0.01%
Copies: 424152 -> 423670 (-0.11%); split: -0.20%, +0.09%
Branches: 156701 -> 156192 (-0.32%); split: -0.33%, +0.01%
PreSGPRs: 168507 -> 168500 (-0.00%); split: -0.02%, +0.01%
PreVGPRs: 151477 -> 151474 (-0.00%)
VALU: 3486077 -> 3476675 (-0.27%); split: -0.31%, +0.04%
SALU: 786467 -> 783109 (-0.43%); split: -0.45%, +0.03%
VMEM: 188035 -> 188060 (+0.01%)
SMEM: 259632 -> 259630 (-0.00%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
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/31852>
2024-10-29 10:51:09 +00:00
Erik Faye-Lund
78f23bf295 panfrost: add an assert in render-target setup
This code isn't really wrong, but it makes some assumptions that are a
bit hard to grok. Let's thread a bit more carefully, by adding an assert
that hopefully clears things up a tad.

We area after all choosing in the range of RAW8 to RAW128.

CID: 1605056
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31767>
2024-10-29 10:13:16 +00:00
Erik Faye-Lund
a62e80ce11 panfrost: drop needless assign
We are overwriting l right after the conditional block, so let's just
drop this for simplicity.

CID: 1529404
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31767>
2024-10-29 10:13:16 +00:00
Erik Faye-Lund
8b619b2360 panvk/csf: only look at fs if it's required
If the FS isn't used, there's no reason to consult it. This was inspired
by a coverity report, which was technically wrong, but made me look
closer at the code.

CID: 1620442
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31767>
2024-10-29 10:13:16 +00:00
Erik Faye-Lund
712c11fc17 panvk: assert on missing vs
A vs is always required, and we already dereference it in this function
unconditionally. Let's add an assert to be sure, and drop the run-time
check here.

CID: 1620449
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31767>
2024-10-29 10:13:16 +00:00
Erik Faye-Lund
9ad9d9ac68 panvk: put conditional outside of define
While this is perfectly valid, stuffing the conditional into the define
makes us evaluate it over and over again, causing some warnings about
nonsensical compares with Coverity.

CID: 1618771
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31767>
2024-10-29 10:13:16 +00:00
Erik Faye-Lund
19fdfd6429 panvk: drop needless assert
The value can't be larger than 31 here anyway, due to the bitfield
width. So the assert is completely needless.

CID: 1633082
Fixes: b8bfbbdf66 ("panvk: check against texfeat_bit")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31767>
2024-10-29 10:13:16 +00:00
Erik Faye-Lund
103ad15ece panvk: avoid signed integer underflow
This is undefined behavior, let's use unsigned integer underflow
instead.

CID: 1605124
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31767>
2024-10-29 10:13:15 +00:00
Georg Lehmann
695d2414cd nir,radv: optimize shared atomic offsets
Foz-DB Navi21:
Totals from 87 (0.11% of 79395) affected shaders:
Instrs: 140877 -> 140873 (-0.00%)
CodeSize: 747760 -> 747164 (-0.08%); split: -0.09%, +0.01%
Latency: 4528171 -> 4528162 (-0.00%)
InvThroughput: 826358 -> 826349 (-0.00%)
Copies: 10888 -> 10884 (-0.04%)
VALU: 84634 -> 84630 (-0.00%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31080>
2024-10-29 09:31:08 +00:00
Georg Lehmann
a2baff4810 ac/llvm: handle shared atomic base offset
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31080>
2024-10-29 09:31:08 +00:00
David Rosca
69ea2fcfe9 radeonsi/vcn: Add support for AV1 still picture encode
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31784>
2024-10-29 08:06:45 +00:00
David Rosca
fae8c09932 frontends/va: Add support for AV1 still picture encode
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31784>
2024-10-29 08:06:44 +00:00
Samuel Pitoiset
e83f91f206 radv: regroup and emit all raster related states in the same function
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31787>
2024-10-29 07:25:34 +00:00
Samuel Pitoiset
62f51becbb radv: track more redundant raster related registers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31787>
2024-10-29 07:25:34 +00:00
Rob Clark
6800cd2703 freedreno/ci: Garbage collect some obsolete xfails
We are on v6.11 kernel now in CI.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31857>
2024-10-29 02:34:08 +00:00
Rob Clark
63370e47a6 freedreno/a6xx: Fix MSAA depth on a6xx gen1
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31857>
2024-10-29 02:34:08 +00:00
Rob Clark
42446052d4 freedreno: Fix tile-per-pipe debug overrides
Fixes: 0f3c12c0ab ("freedreno: add env var to override tiles-per-pipe")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31857>
2024-10-29 02:34:08 +00:00
Rob Clark
f8e7c0e2a2 freedreno/a6xx: Stop exposing MSAA image load/store harder
Fixes KHR-GL46.multi_bind.dispatch_bind_image_textures which decides
max_image_samples==1 means that MSAA image load/store is supported.
Switch the condition to > 0, which matches what zink does.

Fixes: e277b13182 ("freedreno: Stop exposing MSAA image load/store on desktop GL.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31857>
2024-10-29 02:34:08 +00:00
Rob Clark
32d670c4e5 freedreno/a6xx: Don't try resolve blits
Fixes KHR-GL46.direct_state_access.renderbuffers_storage_multisample

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31857>
2024-10-29 02:34:08 +00:00
Rob Clark
b4c64b71a6 ir3: Don't lower VS driver params to UBO
Both turnip and gallium push VS driver params the old way, and ir3 needs
to agree with them.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31857>
2024-10-29 02:34:08 +00:00
Rob Clark
9e24157478 ir3: Fix binning pass driver UBOs
Fixes: e80c6d0f00 ("ir3: fix calling ir3_const_state_mut in the binning VS")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31857>
2024-10-29 02:34:07 +00:00
Patrick Lerda
5a423d2d9a glsl: fix gl_nir_validate_intrastage_interface_blocks() memory leak
For instance, this issue is triggered on redeonsi with
"piglit/bin/shader_runner tests/spec/glsl-1.50/linker/interface-blocks-multiple-vs-member-count-mismatch.shader_test -auto -fbo":
Indirect leak of 176 byte(s) in 1 object(s) allocated from:
    #0 0x7f894b5cd7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f894183aebf in ralloc_size ../src/util/ralloc.c:118
    #2 0x7f894183b36e in rzalloc_size ../src/util/ralloc.c:152
    #3 0x7f894183b36e in rzalloc_array_size ../src/util/ralloc.c:232
    #4 0x7f894182da67 in _mesa_hash_table_init ../src/util/hash_table.c:163
    #5 0x7f894182da67 in _mesa_hash_table_create ../src/util/hash_table.c:186
    #6 0x7f894169af03 in gl_nir_validate_intrastage_interface_blocks ../src/compiler/glsl/gl_nir_link_interface_blocks.c:533
    #7 0x7f89414464a4 in link_intrastage_shaders ../src/compiler/glsl/gl_nir_linker.c:2750
    #8 0x7f894144bad2 in gl_nir_link_glsl ../src/compiler/glsl/gl_nir_linker.c:3785
    #9 0x7f894128977e in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:515
    #10 0x7f894128977e in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:1008
    #11 0x7f894113c7b5 in link_program ../src/mesa/main/shaderapi.c:1317
    #12 0x7f894113c7b5 in link_program_error ../src/mesa/main/shaderapi.c:1426
    #13 0x7f8940afb1bb in _mesa_unmarshal_LinkProgram src/mapi/glapi/gen/marshal_generated2.c:1627
    #14 0x7f894063319b in glthread_unmarshal_batch ../src/mesa/main/glthread.c:141
    #15 0x7f894184e658 in util_queue_thread_func ../src/util/u_queue.c:294
    #16 0x7f89418d220a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67
    #17 0x7f894a66a7c3  (/lib64/libc.so.6+0x867c3)
...
SUMMARY: AddressSanitizer: 1392 byte(s) leaked in 11 allocation(s).

Fixes: ffbd763586 ("glsl: add gl_nir_validate_intrastage_interface_blocks()")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31871>
2024-10-28 22:23:29 +00:00
José Roberto de Souza
6a0f2dd44b intel/dev: Fix max_cs_threads value on simulator
intel_device_info_update_after_hwconfig() updates max_cs_threads
based on max_eus_per_subslice and num_thread_per_eu but in some
platforms simulator the hwconfig don't have the
INTEL_HWCONFIG_MAX_NUM_EU_PER_DSS value, causing max_cs_threads to
be set to a wrong value and then causing issues when programing
CFE_STATE with a invalid value.

Fortunately we can also get max_eus_per_subslice from topology query,
so here moving the hwconfig query and
intel_device_info_update_after_hwconfig() call to after topology.

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/31850>
2024-10-28 21:24:09 +00:00
José Roberto de Souza
6c84cbd8c9 intel/dev/xe: Set max_eus_per_subslice using topology query
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/31850>
2024-10-28 21:24:09 +00:00
Boris Brezillon
2cef9cd913 pan/desc: Fix the CRC validity update when clean tiles are not written
CRCs don't become valid if the GPU omits pushing clean tiles to memory.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31771>
2024-10-28 20:55:09 +00:00
Louis-Francis Ratté-Boulianne
05abdda27b panfrost: properly align CRC buffer size for prefetching
CRC values are prefetched in 32x32 regions so we need to round up
the framebuffer size to account for that.

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/31771>
2024-10-28 20:55:09 +00:00
Louis-Francis Ratté-Boulianne
45810bfc9c panfrost: check the right discard property when selecting CRC target
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/31771>
2024-10-28 20:55:08 +00:00
Louis-Francis Ratté-Boulianne
fc07afb70b panfrost: disable CRC for AFBC-packed resources
This shouldn't affect current behavior as CRC values are only used
when using a resource as render target and it's impossible to render
to a AFBC-P texture. However, it now properly updates the
CRC-related properties for debugging and future usage.

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/31771>
2024-10-28 20:55:08 +00:00
Louis-Francis Ratté-Boulianne
df20edd24d panfrost: properly update data size of AFBC-packed resources
Only the slices' size was correctly set. Also, disable packing for
array resources as it's not currently implemented.

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/31771>
2024-10-28 20:55:08 +00:00
Louis-Francis Ratté-Boulianne
774b70974a panfrost: add support for incremental rendering in CSF
When the tiler heap is exhausted while running an IDVS job, the
out-of-memory exception handler is gonna be executed. If that
happens, we start fragment shading for all the polygons that have
been generated until then and recycle the tiler heap memory to
continue the tiling job.

The framebuffer descriptor used for the fragment job depends on the
current pass:

  - FIRST_PASS: Used the first time the OOM handler is called. We
    want to preload/clear just like configured for the draw but
    don't want to discard the result.
  - MIDDLE_PASS: Used the subsequent times the OOM handler is
    called. We want to preload the content rendered from previous
    rendering passes and still don't want to discard the result.
  - LAST_PASS: Used for the fragment job run when back in normal
    operation. We want to preload the content from the rendering
    passes that occurred in the OOM handler and want to deal with
    the result just like it was configured initially for the draw.

If incremental rendering is not triggered by an OOM exception, the
fragment job is using the default framebuffer descriptor.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Signed-off-by: antonino <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:21 +00:00
Louis-Francis Ratté-Boulianne
f1e3e68241 panfrost: add debug flag to enable extra CS checks
For now, the flag enables these checks for CSF-based GPUs:

   - registers are not used as a source after being loaded without a
      WAIT() in the middle
   - registers are not reused (used as a destination) after they
     served as a STORE() source without a WAIT() in the middle

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:21 +00:00
Louis-Francis Ratté-Boulianne
4e2030cc68 panfrost: create a backend-specific hook for emit_fbds
When using CSF backend, we might want to create multiple versions of
the framebuffer descriptor to support incremental rendering.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:21 +00:00
Louis-Francis Ratté-Boulianne
cebe29ae39 panfrost: add debug tracing for CSF context initialization
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:21 +00:00
Louis-Francis Ratté-Boulianne
b519ae7336 pan/genxml: small fix to FINISH_FRAGMENT tracing
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:21 +00:00
Louis-Francis Ratté-Boulianne
90a722e312 pan/genxml: enable decoding for SET_EXCEPTION_HANDLER
Signed-off-by: antonino <antonino.maniscalco@collabora.com>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:21 +00:00
antonino
16815b5900 pan/genxml: fix SET_EXCEPTION_HANDLER instruction definition
Signed-off-by: antonino <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:21 +00:00
Louis-Francis Ratté-Boulianne
0e6aaab00a pan/cs: add block to handle registers backup in exception handler
It's gonna be used to save and restore registers content when an
exception handler is executed as to not interfere with normal
operation.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31174>
2024-10-28 20:31:20 +00:00
Louis-Francis Ratté-Boulianne
e9e0153248 pan/cs: only flush block instrs if there is a pending if block
It is only needed for pending `if` block as it's the only block
we don't end normally and where instructions are only flushed when
we are certain that no `else` branch is gonna be added.

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

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

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

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

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

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

Userspace managed surfaces can be enabled with VMW_SVGA_USERSPACE_SURFACE
environment variable.

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

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

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

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

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

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

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

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

dEQP-VK.renderpass.suballocation.load_store_op_none.color_load_op_none_store_op_none

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

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

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

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

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

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

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

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

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

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

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

Fixes: 07cd0f2306 ("etnaviv: blend: Add support for MRTs")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31845>
2024-10-28 13:23:29 +00:00
Samuel Pitoiset
f7652de1f1 Revert "ac/surface: add RADEON_SURF_VIEW_3D_AS_2D_ARRAY for GFX9+"
This reverts commit dc5ef90547.

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

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

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

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

This reverts commit f5805bcb8e.

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

This reverts commit 493d5910a3.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Piglit OpenCL support enablement already got merged.

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

  export RUSTICL_ENABLE=msm

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

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

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

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

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

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

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

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

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

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

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31856>
2024-10-26 18:12:41 +00:00
Jordan Justen
b7560fa048 anv: Build for Xe3
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
35ace9d4e2 intel/compiler: Xe2 and Xe3 use the same compaction tables
Ref: bspec 56709
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
688a673c5a intel/brw: Allow Xe3 in brw_stage_has_packed_dispatch()
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
efa7aa4e47 intel/dev: Add PTL PCI IDs (with FORCE_PROBE set)
Ref: bspec 72574
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
bd52bef69e intel/dev: Add PTL device info
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
6242b70354 intel/dev: Add INTEL_PLATFORM_PTL platform enum
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
cd33b7766a intel/compiler: Add compiler enum for Xe3
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
f59ae1ec10 intel/dev: Add Xe3 support to get_l3_list()
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
fa964dcadc iris: Build for Xe3
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
ae7619429e intel/shaders: Build for Xe3
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:30 +00:00
Jordan Justen
521d2299b8 intel/isl: Build for Xe3
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:29 +00:00
Jordan Justen
acb1c45a8b intel/genxml: Start Xe3 support
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:29 +00:00
Jordan Justen
2d15c23e4a intel/dev: Add XE3_FEATURES macro
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:29 +00:00
Jordan Justen
d476badb48 intel/dev: Support Xe3 device init (for intel_device_info_test)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31838>
2024-10-26 07:39:29 +00:00
Ian Romanick
04e1783278 brw: Call brw_fs_opt_algebraic less often
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/31729>
2024-10-25 23:39:36 +00:00
Ian Romanick
ac64b78f1f brw/copy: Perform constant folding with constant propagation
No shader-db or fossil-db changes on any Intel platform.

v2: Simlify the logic for when to try constant folding. Do
commute_immediates before constant folding. Both suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31729>
2024-10-25 23:39:36 +00:00
Ian Romanick
2cc1575a31 brw/algebraic: Refactor constant folding out of brw_fs_opt_algebraic
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31729>
2024-10-25 23:39:36 +00:00
Eric Engestrom
90ad5d3f06 ci: drop dead "load jwt in the environment just before exiting the job" code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31855>
2024-10-25 21:41:05 +00:00
Ian Romanick
5dcad54902 brw/sat: Convert nearly all tests to use new style builders
v2: Use new style builder for second ADD in other_non_saturated_use
too.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31834>
2024-10-25 20:31:45 +00:00
Ian Romanick
19ae7aceb5 brw/sat: Fix small typos, copy and paste, etc.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31834>
2024-10-25 20:31:45 +00:00
Ian Romanick
de45273307 brw/builder: Add new style ALU3 builder
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31834>
2024-10-25 20:31:45 +00:00
Ian Romanick
8329c04521 brw/copy: Don't remove instructions w/ conditional modifier
Fixes: 9e750f00c3 ("intel/brw: Make opt_copy_propagation_defs clean up its own trash")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31834>
2024-10-25 20:31:44 +00:00
Kenneth Graunke
d949d47f09 brw/emit: Fix align16 3src subregister encodings for HF types
Prior to Cherryview, align16 3src instruction sources had to have their
subregister number be DWord-aligned.  Cherryview added a discontiguous
bit in the encoding to represent bit 1 of the subregister number.  This
allows us to use packed HF sources.

Update the ISA encoding helpers to properly handle bit 1.  While we're
at it, make them take a full subregister number and adjust accordingly,
rather than making the callers divide or multiply by some alignment.

Note that the destination subregister must still be DWord aligned, so
HF destinations must be strided.

Thanks to Ian Romanick for discovering that we were botching this.

BSpec: 12054, 12081

v2 (idr): Fix ordering of high and low bit parameters to brw_inst_bits.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31834>
2024-10-25 20:31:44 +00:00
Kenneth Graunke
33cd5a49f1 brw/validate: Return an error for Align16 access mode on Icelake+
Gfx11+ doesn't support Align16 instructions anymore - only Align1 mode.

Bailing early for Align16 is important so that brw_hw_decode_inst
doesn't try to read Align16 related instruction fields on generations
where they no longer exist (which could trigger assertions).

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31834>
2024-10-25 20:31:44 +00:00
Lionel Landwerlin
393ca64716 anv: avoid companion usage on RCS
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e98759c7f4 ("anv: Use RCS engine for copying stencil resource for gfx125")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31847>
2024-10-25 19:06:18 +00:00
Dmitry Osipenko
f83c2fcc98 ci/zink: Mark glx-multithread-clearbuffer flake on ADL
The glx-multithread-clearbuffer test both fails and passes depending on
a Mesa build for ADL. This test is flaky in general for everyone in Mesa,
hence move to the flakes.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Dmitry Osipenko
f76ed795de util/cache_test: Add mesa-db test for adding cache entry bigger than empty cache
Add Mesa-DB regression test for a segfault bug that happened when a cache
entry bigger than size-limit of the cache is added to empty cache.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Dmitry Osipenko
5ec424c6be util/mesa-db: Fix crash on compacting empty DB
Fix mesa_db_compact() segfaulting if compacted DB is empty. This crash
happens on writing cache entry that is bigger than DB's size limit and
when DB is empty, which can be triggered by setting DB size to a small
value.

Fixes: 32211788d0 ("util/disk_cache: Add new mesa-db cache type")
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Dmitry Osipenko
7b40d32187 util/mesa-db: Open DB files during access time
Open DB files when DB is accessed and close them afterwards to reduce
number of FDs used by multi-part DB cache.

Fixes: fd9f7b748e ("util/mesa-db: Introduce multipart mesa-db cache")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11776
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11810
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Dmitry Osipenko
2a9378a0f9 util/mesa-db-multipart: Open one cache part at a time
Open one cache DB part at a time for a multi-part cache to reduce number
of FDs used by the cache. Previously multi-part DB cache instance was
consuming 100 FDs, now it's 2 and cache files are opened when cache
is read or written instead of opening them at the init time.

Fixes: fd9f7b748e ("util/mesa-db: Introduce multipart mesa-db cache")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11776
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Dmitry Osipenko
6a2f5cb556 util/mesa-db: Fix missing O_CLOEXEC
Use O_CLOEXEC flag for opened cache DB files to not leak cache FDs when
process forks.

Fixes: 32211788d0 ("util/disk_cache: Add new mesa-db cache type")
Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11810
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Michel Dänzer
92893309bc util/mesa-db: Further simplify mesa_db_compact
Taking advantage of the persistent array of index entries. In
particular, it's no longer necessary to read from the index file during
compaction.

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Michel Dänzer
031f2c2a69 util: Use persistent array of index entries
Instead of allocating separate memory for each index entry in the hash
table, use a single array (backed by a mapping of anonymous memory
pages, which allows efficient array resizes) which holds a copy of the
index file contents.

The hash table now references each entry via its offset in the index
file, so that the array address can change on resize.

This eliminates some index file reads and reduces memory management
overhead for the hash table entries. It should be more efficient in
general.

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Michel Dänzer
feef4bf828 util/mesa-db: Use single read for whole index
Instead of separate reads per index entry. Should be more efficient.

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Michel Dänzer
1ba3996fd5 util/mesa-db: Reserve hash table for total number of index entries
Without this, the hash table needed to be rehashed about
log2(<total number of entries>) times as it grew.

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Michel Dänzer
e596882dd1 util/mesa-db: Recreate files if header load or index update fails
The previous behaviour had these issues:

1. It meant that this part of the cache couldn't be used
   this time.
2. It left the corrupted index/cache files unchanged, so the same failure
   might happen again next time.

Recreating the index & cache files for this part means it can be used,
it just loses any previously cached contents.

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Michel Dänzer
13c44abaac util/mesa-db: Make mesa_db_lock robust against signals
flock may be interrupted by a signal, in which case it returns with
EINTR error. In this case we need to retry until it returns success
or another error.

Fixes: 32211788d0 ("util/disk_cache: Add new mesa-db cache type")
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30988>
2024-10-25 18:06:14 +00:00
Georg Lehmann
d01c1ba939 aco: move exec copy out of waterfall loops
Foz-DB Navi21:
Totals from 348 (0.44% of 79395) affected shaders:
CodeSize: 17944800 -> 17946268 (+0.01%); split: -0.02%, +0.03%
Latency: 29775973 -> 29774369 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 10233380 -> 10232801 (-0.01%); split: -0.01%, +0.00%

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19070>
2024-10-25 16:47:32 +00:00
Georg Lehmann
6c73a8a7f2 aco: optimize conditional divergent breaks at the end of loops
Removes one branch and one s_mov.

Foz-DB Navi21:
Totals from 1483 (1.87% of 79395) affected shaders:
Instrs: 6424114 -> 6373084 (-0.79%)
CodeSize: 35309320 -> 35091084 (-0.62%); split: -0.63%, +0.01%
Latency: 87950935 -> 88030841 (+0.09%); split: -0.03%, +0.12%
InvThroughput: 24784756 -> 24799536 (+0.06%); split: -0.02%, +0.08%
Copies: 588743 -> 561805 (-4.58%)
Branches: 242521 -> 215578 (-11.11%)
SALU: 877856 -> 850918 (-3.07%)

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19070>
2024-10-25 16:47:32 +00:00
Georg Lehmann
075c5818cb aco/ssa_elimination: don't assume exec writes can be removed based on block kind
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19070>
2024-10-25 16:47:32 +00:00
Georg Lehmann
61ab33c883 aco/ssa_elimination: add instr_accesses helper
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19070>
2024-10-25 16:47:32 +00:00
Valentine Burley
7ec0b62341 ir3: Don't lower to LCSSA before calling nir_divergence_analysis()
NIR can now calculate divergence without converting to LCSSA beforehand.
However, removing this particular instance of nir_convert_to_lcssa was
missed in commit 87cb42f953 ("treewide: don't lower to LCSSA before calling nir_divergence_analysis()")

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31821>
2024-10-25 16:12:51 +00:00
Valentine Burley
5bb0296e08 freedreno/devices: Establish a7xx sub-generations
We can differentiate three distinctive sub-generations on a7xx.
This reduces the number of copy-pasted quirks.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31821>
2024-10-25 16:12:51 +00:00
Valentine Burley
0981f983ee freedreno/devices: Enable 64-bit atomics on a735 and a740v3
The blob exposes VK_KHR_shader_atomic_int64 on these devices too,
but this was missed during initial enablement.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31821>
2024-10-25 16:12:51 +00:00
Valentine Burley
da989edde8 freedreno/devices: Document common name for a635 speedbins
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31821>
2024-10-25 16:12:51 +00:00
Valentine Burley
45bb8002df freedreno/devices: Inline a690 quirk
Similarly as on FD621, we only have one GPU-specific quirk, no
need to use a separate dictionary for it.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31821>
2024-10-25 16:12:51 +00:00
Rob Clark
7f63fa34da nir/lower_amul: Fix ASAN error
We shouldn't assume the bindings are sparse when we allocate an array
indexed on the binding.  See, for example:

  dEQP-GLES31.functional.program_interface_query.buffer_variable.random.55

Fixes: 2e833b16bc ("nir/lower_amul: Use num_ubos/ssbos instead of recomputing it.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31611>
2024-10-25 15:38:51 +00:00
Rob Clark
e548f90edb freedreno/ir3: Create UBO variables for driver-UBOs
Some nir passes, like lower_amul, expect to have varibles declared for
things that are accessed via load_ubo().

Fixes: 76e417ca59 ("turnip,ir3/a750: Implement consts loading via preamble")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31611>
2024-10-25 15:38:51 +00:00
Jocelyn Falempe
b24d4f0c86 gbm/dri: Fix color format for big endian.
Using wayland on s390x has all the colors wrong.
Mesa reports using GBM_FORMAT_XRGB8888 but inside the buffer, the
colors are in GBM_FORMAT_BGRX8888 order.
This patch fixes it for common formats, and also introduced BGRX8888
which is the default on big endian.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31707>
2024-10-25 14:18:24 +00:00
Jocelyn Falempe
3814dee11a gbm/dri: Use PIPE_FORMAT_* instead of using __DRI_IMAGE_*
__DRI_IMAGE formats are not well defined for big endian.
This patch has no functionnal change and prepare the work to better support
big endian.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31707>
2024-10-25 14:18:24 +00:00
Jocelyn Falempe
c6d7ab7c1f loader: Fix typo in __DRI_IMAGE_FORMAT_XBGR16161616 definition
The X and A format are inverted by mistake.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31707>
2024-10-25 14:18:24 +00:00
Pierre-Eric Pelloux-Prayer
60f7b2fc9f radeonsi/ci: mark *.tessellation_shader_tessellation.max_in_out_attributes as fixed
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31684>
2024-10-25 13:36:54 +00:00
Pierre-Eric Pelloux-Prayer
9434ac65f4 glsl: use nir_io_add_const_offset_to_base in gl_nir_opts
This fixes:
   KHR-GLES32.core.tessellation_shader.tessellation_shader_tessellation.max_in_out_attributes

Without this change the assert in gather_output is hit:
   assert(!nir_src_is_const(offset) || nir_src_as_uint(offset) == 0)

Because nir_opt_algebraic determines that some ssa values are constant,
but the nir_io_add_const_offset_to_base wasn't run afterwards.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31684>
2024-10-25 13:36:54 +00:00
Pierre-Eric Pelloux-Prayer
60578df33a nir: skip offset=0 in nir_io_add_const_offset_to_base
When offset=0, the pass was a no-op but was setting the progress
flag which could cause infinite loops when this pass is going
to be added to gl_nir_opts.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31684>
2024-10-25 13:36:54 +00:00
David Rosca
f24c799c67 radeonsi/vcn: Only enable skip mode with matching references
Skip mode frames must match the reference frames otherwise skip
mode needs to be disabled.

Fixes: 1e1f078099 ("radeonsi/vcn: Add support for VCN5 AV1 compound")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31805>
2024-10-25 13:09:15 +00:00
Samuel Pitoiset
38d7492391 ci: uprev VKCTS to 1.3.10.0
This tag contains tests for DGC EXT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31789>
2024-10-25 14:03:37 +02:00
Joshua Ashton
c66fd95d92 radv: Fix sample locations at 0 for X/Y
We cannot set the {X,Y}MAX_RIGHT_EXCLUSION bits
if we have a sample location at a pixel boundary.

CTS does not seem to be catching this.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Co-authored-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31839>
2024-10-25 11:24:12 +00:00
Joshua Ashton
130a423118 radv: Enable variableSampleLocations
This should come for free now we are dynamic
rendering based.

This passes CTS on RX 7900XTX.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31839>
2024-10-25 11:24:12 +00:00
Rhys Perry
8efc765a3d nir/algebraic: fix shfr optimization with zero src2
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 08903bbe89 ("nir: add mqsad_4x8, shfr and nir_opt_mqsad")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31808>
2024-10-25 09:59:40 +00:00
Rhys Perry
b2abd3bdba nir: fix shfr constant folding with zero src2
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 08903bbe89 ("nir: add mqsad_4x8, shfr and nir_opt_mqsad")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31808>
2024-10-25 09:59:40 +00:00
Eric Engestrom
03f056ea71 ci: skip slow tests on all non-"full" jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31828>
2024-10-25 08:26:31 +00:00
Eric Engestrom
bedb2f8a86 ci: rename "merge-skips" to "slow-skips" as they're about to be used outside of merge piplines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31828>
2024-10-25 08:26:31 +00:00
Samuel Pitoiset
927a17f30a amd: do not emit PA_SU_PRIM_FILTER_CNTL in the common GFX preamble
RADV needs to adjust this register for user sample locations because
it seems possible to have a sample on the -8 coordinate.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31815>
2024-10-25 07:41:22 +00:00
Samuel Pitoiset
3d172d08b0 radv: do no emit PA_SC_CONSERVATIVE_RASTERIZATION_CNTL in the preamble on GFX12
It's already emitted as part of the cmdbuf.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31815>
2024-10-25 07:41:22 +00:00
Samuel Pitoiset
56cffd4b9b radv: simplify determining if a graphics pipeline uses NGG culling
has_ngg_culling can only be TRUE if the last VGT shader also uses NGG.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31829>
2024-10-25 07:10:28 +00:00
Samuel Pitoiset
62efebfd70 radv: fix emitting NGG culling state for ESO
It's possible to enable NGG culling with ESO if shaders are linked, or
if the VS doesn't need a prolog or if TES is used. This wasn't
supposed to be enabled but I think it worked just by luck because the
user SGPR value was probably zero and NGGC was disabled at draw time.

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/31829>
2024-10-25 07:10:27 +00:00
Samuel Pitoiset
982af1a2bc radv: capture shader statistics when RGP is enabled
This is useful in order to correlate shader hashes between RGP and
Fossilize. This is because Fossilize needs to pass the capture
statistics flag for getting shader hashes and the pipeline key won't
match otherwise.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31820>
2024-10-25 06:29:02 +00:00
Eric Engestrom
460c2eb967 ci: move shellcheck options to .shellcheckrc
That way, IDEs get to have the same behaviour as the CI

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31826>
2024-10-24 22:43:03 +00:00
Francisco Jerez
e2eba3c7da intel/brw/xe2+: Adjust performance analysis divergence weight due to EU fusion removal.
This reduces the penalty the heuristic gives to SIMD32 shaders
relative to SIMD16 in presence of discard control flow on Xe2+.  The
penalty was meant to account for the inefficient divergence behavior
of SIMD32 shaders on Gfx12.x platforms, since Gfx12 hardware had EUs
bundled in groups of two, and each pair shared control flow logic so
both EUs could only execute instructions in lockstep, which meant that
SIMD32 shaders had an effective warp size of 64 on Gfx12.x.

This change switches back to more optimistic modelling of discard
divergence.  With it we gain about 6% performance in a Shadow of the
Tomb Raider trace (tested on BMG).

One may wonder if there are still workloads that would suffer
materially from enabling SIMD32 for all pixel shaders on Xe2 instead
of using this heuristic, since Xe2 EUs have twice the GRF space, twice
the FPU throughput and better divergence behavior than Xe, but the
answer seems to be yes unfortunately: E.g. Superposition has some
pixel shaders where SIMD32 has substantially worse scheduling due to
the increased number of false dependencies due to higher register
pressure, and using SIMD32 for them reduces performance significantly.
The heuristic seems to model this correctly so it doesn't look like we
can do without it at least right now on Xe2.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31697>
2024-10-24 22:06:52 +00:00
Kenneth Graunke
7bed11fbde intel/brw: Allow immediates in the BFE instruction on Gfx12+
We weren't allowing immediates in BFE at all.  Gfx12+ supports
immediates in src0 (value) and src2 (width), but not src1 (offset).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31437>
2024-10-24 21:31:28 +00:00
Patrick Lerda
d19e2597ce r600: fix spec ext_packed_depth_stencil getteximage
This very test was working until the commit 4da147a02b
("mesa: remove fallback for GL_DEPTH_STENCIL"). Indeed this
commit lets the driver handles this path and this was
failing on evergreen r600.

The test was processed through r600_blit() which loads the
fragment shader util_make_fs_blit_zs(). This fragment shader
loads two textures the stencil and depth. The texture depth
was processed properly but the other texture was generating
incorrect values. This issue, which seems to be related to
the hardware configuration, disappears when the underlying
surface is allocated using a width multiple of 32.

This change was tested on cayman and palm with the normal test:
"piglit/bin/ext_packed_depth_stencil-getteximage -auto -fb" and
the test was modified to test all the relevant width and height
values. The gpu rv770 was not affected by this issue. Here is
the result:
spec/ext_packed_depth_stencil/getteximage: fail pass

Cc: mesa-stable
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/31757>
2024-10-24 21:06:36 +00:00
Aditya Swarup
e98759c7f4 anv: Use RCS engine for copying stencil resource for gfx125
HSD 14021541470 lists a HW bug on blitter engine where the compression pairing bit is
not programmed correctly for stencil resources.

Use RCS Engine to perform copy instead.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31792>
2024-10-24 20:14:13 +00:00
Chia-I Wu
5fea98c4a1 panvk: fix scissor box
Fix a typo in prepare_vp which causes incorrect scissor box with
non-zero X in viewport/scissor.

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>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31832>
2024-10-24 12:49:02 -07:00
Chia-I Wu
029b8b11a0 panvk: fix gl_VertexIndex
According to pandecode, r32 is global attribute offset and r36 is vertex
offset.  Follow panfrost to use r36 instead of r32 for both non-indexed
firstVertex and indexed vertexOffset.

With this, gl_VertexIndex stops being zero-based which is incorrect.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31810>
2024-10-24 18:19:48 +00:00
Georg Lehmann
b79950fc1f aco: remove heuristic that restricts VOP2/C with 2 sgprs
Looking at the stats, the slightly increased code size isn't a problem
compared to the benefits. This also only affects gfx10+, and those generations
aren't throughput limited by 64bit instructions like early gcn.

Foz-DB Navi21:
Totals from 12377 (15.59% of 79395) affected shaders:
MaxWaves: 269323 -> 269857 (+0.20%); split: +0.23%, -0.03%
Instrs: 16505304 -> 16472552 (-0.20%); split: -0.21%, +0.01%
CodeSize: 89815804 -> 90130344 (+0.35%); split: -0.02%, +0.37%
VGPRs: 661160 -> 658640 (-0.38%); split: -0.40%, +0.02%
SpillSGPRs: 3032 -> 3049 (+0.56%)
SpillVGPRs: 826 -> 796 (-3.63%)
Latency: 145800231 -> 145818568 (+0.01%); split: -0.14%, +0.15%
InvThroughput: 39026010 -> 38892467 (-0.34%); split: -0.36%, +0.02%
VClause: 325693 -> 325992 (+0.09%); split: -0.12%, +0.21%
SClause: 497938 -> 497208 (-0.15%); split: -0.23%, +0.08%
Copies: 1239036 -> 1204045 (-2.82%); split: -2.90%, +0.07%
Branches: 462952 -> 462934 (-0.00%); split: -0.01%, +0.00%
PreSGPRs: 586066 -> 587558 (+0.25%)
PreVGPRs: 550024 -> 547736 (-0.42%)
VALU: 11147608 -> 11114528 (-0.30%); split: -0.31%, +0.01%
SALU: 2105546 -> 2105131 (-0.02%); split: -0.03%, +0.01%
VMEM: 575983 -> 575923 (-0.01%)

Foz-DB Navi31:
Totals from 11544 (14.54% of 79395) affected shaders:
MaxWaves: 319612 -> 319804 (+0.06%)
Instrs: 17563158 -> 17527341 (-0.20%); split: -0.22%, +0.02%
CodeSize: 92366832 -> 92626280 (+0.28%); split: -0.03%, +0.31%
VGPRs: 667620 -> 665484 (-0.32%); split: -0.33%, +0.01%
SpillSGPRs: 3418 -> 3434 (+0.47%)
SpillVGPRs: 896 -> 858 (-4.24%)
Scratch: 4738048 -> 4736512 (-0.03%)
Latency: 141366653 -> 141399756 (+0.02%); split: -0.10%, +0.12%
InvThroughput: 26213994 -> 26165751 (-0.18%); split: -0.21%, +0.03%
VClause: 307956 -> 308124 (+0.05%); split: -0.12%, +0.18%
SClause: 477816 -> 477326 (-0.10%); split: -0.18%, +0.08%
Copies: 1161148 -> 1129386 (-2.74%); split: -2.81%, +0.08%
Branches: 411509 -> 411506 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 531354 -> 535027 (+0.69%)
PreVGPRs: 525201 -> 521861 (-0.64%)
VALU: 10360363 -> 10330274 (-0.29%); split: -0.30%, +0.01%
SALU: 1778044 -> 1777585 (-0.03%); split: -0.04%, +0.01%
VMEM: 551379 -> 551303 (-0.01%)
VOPD: 3539 -> 3471 (-1.92%); split: +0.14%, -2.06%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31804>
2024-10-24 17:44:13 +00:00
Georg Lehmann
54fa55a3f7 radv: don't use v_mqsad_u32_u8 on gfx7
According to tests on hawaii, v_mqsad_u32_u8 always uses saturating accumulation
while v_msad_u8 truncates. GFX8+ can control this with the VOP3 clamp bit,
on older hardware that's not supported.

We want truncation for the NIR opcode.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12062
Fixes: c3c138b10f ("radv: optimize msad_4x8 to mqsad_4x8")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31809>
2024-10-24 17:20:56 +00:00
Eric Engestrom
a85ed2a28f lavapipe/ci: document regression in the commit range 765d1c47...366f63fd
There's a cts uprev in one of these commits, so it's possible they're all just new tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
150fd992b6 lavapipe/ci: skip builtin ray query tests that take too long and time out
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
4724bbe7a7 lavapipe/ci: group & sort skips
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
6d3e1ab56d lavapipe/ci: group & sort fails
They were in a completely random order, making it hard to see anything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
831eab2375 nvk/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
dff8ece33f turnip/ci: add more dEQP-VK.renderpass2.fragment_density_map.* flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
1c61e5c40f zink+nvk/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
cd912582bf zink+nvk/ci: drop duplicate flakes lines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
b6bd7522f1 all-drivers/ci: drop duplicate flakes lines
Done programmatically, not manually, so there shouldn't be any incorrect
removal.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
454d9dbbd0 zink+nvk/ci: document ext_egl_image_storage regression in c06a55fd...2fb4aed9 (likely !31585)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
654683143b nvk/ci: add back a crash that was mistakenly removed from the expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31825>
2024-10-24 16:50:44 +00:00
Eric Engestrom
bf0c24da2d docs: update link to perf wiki
https://perf.wiki.kernel.org/ is now a permanent http redirect to
https://perfwiki.github.io/, which itself is an html redirect to
https://perfwiki.github.io/main/, but let's just link to the root and
let the second redirection be a detail on their side.

Since the second redirection is not an http redirection, it won't light
up the linkcheck, so we don't have to add an equivalent line to what was
previously there.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31824>
2024-10-24 16:42:41 +00:00
Rhys Perry
4579586c66 aco/tests: add tests for VALUReadSGPRHazard
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/30478>
2024-10-24 16:08:08 +00:00
Rhys Perry
47e0f468cf aco: workaround VALUReadSGPRHazard
fossil-db (gfx1200):
Totals from 65112 (82.01% of 79395) affected shaders:
Instrs: 41732906 -> 42987198 (+3.01%); split: -0.00%, +3.01%
CodeSize: 222451964 -> 226942644 (+2.02%); split: -0.01%, +2.03%
Latency: 290411063 -> 290944688 (+0.18%); split: -0.00%, +0.18%
InvThroughput: 45854913 -> 45910275 (+0.12%); split: -0.00%, +0.12%

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/30478>
2024-10-24 16:08:07 +00:00
Rhys Perry
9ab0c4b047 aco: minor CounterMap::operator== fix
I don't think this matters for how we use CounterMap::operator==.

The BITSET_TEST() was unnecessary because of the BITSET_EQUAL above.

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/30478>
2024-10-24 16:08:07 +00:00
Rhys Perry
f5b871f825 aco: split CounterMap off from VGPRCounterMap
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/30478>
2024-10-24 16:08:07 +00:00
Rhys Perry
d312220c2d aco,radv,radeonsi: add aco_shader_info::ps::has_prolog
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/30478>
2024-10-24 16:08:07 +00:00
Erik Faye-Lund
23c34f89fc panvk: fix broken wsi
We don't need to bend over backwards to try to repair the consequences
of something that happened earlier when we can just prevent that from
happening in the first palce instead.

While we're at it, also move the cmd_dispatch initialization into the
conditional block, because that's only used by the secondary-buffer
emulation code.

This fixes WSI, because there's more differences than just secondary
command buffers between the device-level dispatch-table and the
cmd_dispatch table.

Fixes: c2299b6642 ("panvk/csf: Implement vkCmdExecuteCommands")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31819>
2024-10-24 15:33:59 +00:00
Connor Abbott
048afdd438 tu: Don't invalidate CS state for 3D blits
We don't dirty the CS state, so if a 3D blit comes between binding a
compute pipeline and executing a dispatch then we won't re-emit the
pipeline and invalidating CS state causes immediates emitted via
CP_LOAD_STATE to disappear. Fixes
dEQP-VK.binding_model.descriptor_buffer.ycbcr_sampler.compute_comp.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31764>
2024-10-24 14:56:04 +00:00
Connor Abbott
3e3c1b042e tu: Implement VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR
This was missed because the tests for it were broken. An upcoming CTS
fix will make the tests actually useful, and with this change they pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31764>
2024-10-24 14:56:04 +00:00
Connor Abbott
3c8190e8b2 freedreno: Add compute constlen quirk for X1-85
This GPU seems to have half the compute constlen of other a7xx GPUs,
because there are sporadic hangs in dEQP-VK.robustness.robustness2.* and
other tests unless we limit the constlen. This does *not* happen on
SM8550-HDK, so it does seem to be specific to the GPU in x1e laptops.

Fixes: b0d22461b9 ("freedreno: Enable the X1-85")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31764>
2024-10-24 14:56:03 +00:00
Samuel Pitoiset
605d4dd42a radv: do not use MRT counters for images created for db capture&replay
Setting the surface index is optimal for performance in case of
multiple MRTs because addrlib rotates tiles differently.

But this should be disabled when the image is used for descriptor
buffers capture&replay because the descriptor isn't immutable
(ie. tile_swizzle can be different).

This fixes dEQP-VK.binding_model.descriptor_buffer.capture_replay.*
on some GPUs where tile_swizzle is non-zero.

Fixes: 3b57a35ece ("radv: Enable descriptorBufferCaptureReplay.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31818>
2024-10-24 13:53:20 +00:00
David Rosca
35eb12e2fd frontends/va: Evict unused surfaces from encode DPB
Application should send the full DPB state in each pic to keep
the references alive. Ideally the surfaces would be evicted immediately,
but unfortunately this breaks some applications. Add evict flag and
only evict surfaces if not present in reference frames array for two
consecutive frames.
DPB buffers are not destroyed upon eviction, but instead they are kept
around and reused next time a new surface is added to DPB.

Fixes: cc14724d73 ("frontends/va: Implement DPB management for H264/5 encode")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31741>
2024-10-24 12:36:37 +00:00
David Rosca
33c6491244 pipe: Fix video enc max DPB size for H264
H264 have 16 as maximum DPB size by spec (A.3.1. f) MaxDpbFrames).
For encode we need one more slot for current recon, so use max size + 1.

Fixes: cc14724d73 ("frontends/va: Implement DPB management for H264/5 encode")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31741>
2024-10-24 12:36:37 +00:00
Yao Zi
5ffc5ba8ef panvk: Link with --build-id explicitly
panvk provides driver UUID generated from build id of the dynamic
library, but ld_args_build_id isn't used during linking. This leads to
broken drivers when building mesa with a toolchain defaults to
--no-build-id. Let's specify the flag explicitly.

Fixes: 8ea2931ed1 ("panvk: Generate proper device and driver UUIDs")
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31654>
2024-10-24 12:09:16 +00:00
Rhys Perry
d227968201 ac/llvm: cast to integer after derivative intrinsics
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: daa97bb41a ("amd: switch to derivative intrinsics")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31788>
2024-10-24 11:23:07 +00:00
Danylo Piliaiev
3209a97c5c util/vma: Fix util_vma_heap_get_max_free_continuous_size calculation
It was based on misunderstanding of how holes are sorted, they are
sorted by address and not by size.

Fixes: df3ba95a24
("util/vma: Add function to get max continuous free size")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31722>
2024-10-24 10:50:08 +00:00
Daniel Schürmann
87cb42f953 treewide: don't lower to LCSSA before calling nir_divergence_analysis()
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
95ed72922e nir/divergence: Don't assume that LCSSA phis are not loop-invariant
Since we check for loop-invariance, we don't have to unconditionally
flag LCSSA phis as divergent in presence of divergent breaks.
This ensures consistency, with or without LCSSA form.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
c5f142a695 nir/divergence: skip expensive nir_src_is_divergent() check in most cases
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
0eff03d385 nir/divergence: calculate divergence without requiring LCSSA form
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
d34d2f8fa8 nir: consider loop invariance in nir_src_is_divergent()
By doing so, this function does not require LCSSA form anymore
in order to provide correct results.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
1a55d6c23b nir/divergence: Introduce and set nir_def::loop_invariant
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
c0b3d7a916 nir/divergence: require nir_metadata_block_index
This allows for fast checks whether some value is defined inside a loop.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
8d1abd4996 treewide: use nir_src_is_divergent() rather than checking the divergence of the SSA
Without LCSSA, divergence between src and def might differ.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
c8348139fd nir: change signature of nir_src_is_divergent()
Now, it takes nir_src * instead of nir_src.
Also move the implementation to nir_divergence_analysis.c.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
421b42637d nir: remove nir_update_instr_divergence()
This function has obscure limitations.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
ce0a3fe645 nir/opt_uniform_atomics: don't preserve divergence information
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Daniel Schürmann
c25c63ebc0 nir/divergence: separately indicate whether loops have divergent continues or breaks
bool nir_loop_is_divergent(nir_loop *)
 replaces the previous loop->divergent indicator.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30787>
2024-10-24 10:06:17 +00:00
Jordan Justen
a4c5bfd34c intel/dev: Use hwconfig for urb min/max entry values
Backport-to: 24.2
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/31692>
2024-10-24 09:21:56 +00:00
Jordan Justen
7b86da0ccd intel/dev: Allow specifying a version when to always use hwconfig
Backport-to: 24.2
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/31692>
2024-10-24 09:21:56 +00:00
Jordan Justen
a71702d342 intel/dev: Simplify DEVINFO_HWCONFIG_KV by adding should_apply_hwconfig_item()
Backport-to: 24.2
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/31692>
2024-10-24 09:21:56 +00:00
Jordan Justen
b4df9658f5 intel/dev: Rework DEVINFO_HWCONFIG; add DEVINFO_HWCONFIG_KV macro
Backport-to: 24.2
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/31692>
2024-10-24 09:21:56 +00:00
Vignesh Raman
ce98715566 ci/crosvm: Use default value for CROSVM_GALLIUM_DRIVER
Use a default value for CROSVM_GALLIUM_DRIVER. This change
ensures that if the variable is unset, it defaults to an
empty string. This prevents unbound variable errors with
set -u in the case of drm-ci.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31814>
2024-10-24 08:46:54 +00:00
Stéphane Cerveau
ac2b7d07e4 anv: check that inline query pool is VK_NULL_HANDLE
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Stéphane Cerveau <scerveau@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31765>
2024-10-24 08:17:11 +00:00
Stéphane Cerveau
aaa5770d4b anv: inline query for vulkan video encode
Follow up of the work performed in decode to
support inline query.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Signed-off-by: Stéphane Cerveau <scerveau@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31765>
2024-10-24 08:17:11 +00:00
Samuel Pitoiset
be81c8b8db radv: fix initializing the HTILE buffer on transfer queue
When only of the depth/stencil aspects is used, RADV dispatches a
compute shader to initialize the HTILE buffer. But dispatching on SDMA
just hangs and the only way to initialize the HTILE buffer is to clear
both aspects using a memory fill operation.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31803>
2024-10-24 06:25:18 +00:00
Tapani Pälli
dcb88ea4ab anv/iris: add note about Wa_18039438632 for RT flush after SBA
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/31801>
2024-10-24 04:29:56 +00:00
Paulo Zanoni
c0bceaf057 brw: don't emit instruction to add zero in spilling code
When the spill_offset is zero, don't emit an instruction that adds
zero.

Results on MTL:

- Shaders:
instructions helped:   shaders/blender/581.shader_test FS SIMD8:         6760 -> 6759 (-0.01%) (scheduled: none)
instructions helped:   shaders/blender/1017.shader_test FS SIMD8:        6760 -> 6759 (-0.01%) (scheduled: none)
instructions helped:   shaders/blender/1045.shader_test FS SIMD8:        6474 -> 6473 (-0.02%) (scheduled: none)
instructions helped:   shaders/blender/723.shader_test FS SIMD8:         6458 -> 6457 (-0.02%) (scheduled: none)
instructions helped:   shaders/blender/1042.shader_test FS SIMD8:        6458 -> 6457 (-0.02%) (scheduled: none)
instructions helped:   shaders/blender/917.shader_test FS SIMD8:         4900 -> 4897 (-0.06%) (scheduled: none)
instructions helped:   shaders/blender/455.shader_test FS SIMD8:         4832 -> 4829 (-0.06%) (scheduled: none)

cycles helped:   shaders/blender/917.shader_test FS SIMD8:         891856 -> 891832 (<.01%) (scheduled: none)
cycles helped:   shaders/blender/455.shader_test FS SIMD8:         894692 -> 894660 (<.01%) (scheduled: none)

total instructions in shared programs: 1596934 -> 1596923 (<.01%)
instructions in affected programs: 42642 -> 42631 (-0.03%)
helped: 7
HURT: 0

- Fossils:

Instrs: 151744378 -> 151741213 (-0.00%)
Cycle count: 16007811131 -> 16007643963 (-0.00%); split: -0.00%, +0.00%

Totals from 1353 (0.21% of 632545) affected shaders:
Instrs: 3925143 -> 3921978 (-0.08%)
Cycle count: 2292838118 -> 2292670950 (-0.01%); split: -0.01%, +0.00%

 RELATIVE IMPROVEMENTS - Instrs                                      Before     After      Delta      Percentage
 mesa/benchmarks/gravity_mark/3e9c48cebaddf012/cs/0                  1947       1941       -6         -0.31%
 mesa/steam-native/red_dead_redemption2/571534e21fb7bd2a/fs.8/0      3431       3421       -10        -0.29%
 mesa/steam-dxvk/batman_arkham_city_goty/d783eacc9ebe324d/fs.8/0     717        715        -2         -0.28%
 mesa/steam-dxvk/batman_arkham_city_goty/14e0878a6a9605c9/fs.8/0     724        722        -2         -0.28%
 mesa/steam-dxvk/batman_arkham_city_goty/d859c2ae858269dc/fs.8/0     744        742        -2         -0.27%
 mesa/steam-dxvk/total_war_warhammer3/18b9d4a3b1961616/vs/0          1539       1535       -4         -0.26%
 mesa/steam-dxvk/total_war_warhammer3/a21827ce57dc0e29/vs/0          1539       1535       -4         -0.26%
(and a bunch of others where the delta is -2, -4 or -6)

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31694>
2024-10-23 20:19:48 +00:00
Adam Jackson
858eb18952 glx: Fix the GLX_EXT_swap_control_tear drawable attributes
GLX_SWAP_INTERVAL_EXT is always positive, GLX_LATE_SWAPS_TEAR_EXT is how
you tell whether the drawable is set to do it. This aligns us with the
spec and NVIDIA's GLX.

Closes: mesa/mesa#10193
Fixes: 5e9e457383 glx/dri3: Implement GLX_EXT_swap_control_tear
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31655>
2024-10-23 19:55:53 +00:00
Georg Lehmann
a4b179e445 aco/ssa_elimination: don't avoid saving exec when optimizing branching sequence
insert_exec_mask will no longer use s_and_saveexec if there was a previous copy
from a sgpr to exec, so this code path is no longer taken.

No Foz-DB changes.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31567>
2024-10-23 19:34:53 +00:00
Georg Lehmann
d2dcaf1f5e aco/insert_exec: reuse old exec temp instead using s_and_saveexec
This means the v_cmpx optimization in ssa_elimination no longer
needs to insert a copy to save exec.

Foz-DB Navi31:
Totals from 13816 (17.40% of 79395) affected shaders:
Instrs: 23694267 -> 23670199 (-0.10%); split: -0.11%, +0.01%
CodeSize: 124559288 -> 124457508 (-0.08%); split: -0.09%, +0.01%
SpillSGPRs: 5324 -> 5354 (+0.56%); split: -1.00%, +1.56%
Latency: 207245846 -> 207213681 (-0.02%); split: -0.03%, +0.01%
InvThroughput: 35442657 -> 35437220 (-0.02%); split: -0.02%, +0.01%
VClause: 444672 -> 444670 (-0.00%); split: -0.00%, +0.00%
SClause: 639419 -> 639373 (-0.01%); split: -0.04%, +0.03%
Copies: 1529008 -> 1515871 (-0.86%); split: -1.02%, +0.16%
Branches: 557201 -> 557701 (+0.09%); split: -0.00%, +0.09%
PreSGPRs: 682840 -> 686048 (+0.47%)
VALU: 13978010 -> 13978032 (+0.00%); split: -0.00%, +0.00%
SALU: 2214600 -> 2197061 (-0.79%); split: -0.81%, +0.02%
VOPD: 5561 -> 5560 (-0.02%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31567>
2024-10-23 19:34:53 +00:00
Georg Lehmann
0471522377 aco/insert_exec: reuse old exec temp in loop pre-header
Avoid an exec copy.

Foz-DB Navi31:
Totals from 2315 (2.92% of 79395) affected shaders:
Instrs: 9082831 -> 9058990 (-0.26%); split: -0.27%, +0.00%
CodeSize: 48017244 -> 47858064 (-0.33%); split: -0.34%, +0.01%
SpillSGPRs: 1680 -> 1684 (+0.24%); split: -0.48%, +0.71%
Latency: 109511718 -> 109525041 (+0.01%); split: -0.01%, +0.02%
InvThroughput: 20287085 -> 20289370 (+0.01%); split: -0.00%, +0.02%
VClause: 192259 -> 192260 (+0.00%)
SClause: 234082 -> 234124 (+0.02%); split: -0.01%, +0.03%
Copies: 667271 -> 645577 (-3.25%); split: -3.27%, +0.02%
Branches: 264086 -> 264088 (+0.00%)
PreSGPRs: 136831 -> 136966 (+0.10%)
VALU: 5234735 -> 5234740 (+0.00%); split: -0.00%, +0.00%
SALU: 949283 -> 927327 (-2.31%); split: -2.32%, +0.01%
VOPD: 1529 -> 1535 (+0.39%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31567>
2024-10-23 19:34:53 +00:00
Georg Lehmann
31f62a6123 aco/insert_exec: don't always reset top exec
This allows to re-use previous temporaries in case exec was restored
from a Temp, rather than having to create a new copy of exec.

Foz-DB Navi31:
Totals from 545 (0.69% of 79395) affected shaders:
Instrs: 216563 -> 215698 (-0.40%)
CodeSize: 1183536 -> 1180076 (-0.29%)
Latency: 1135269 -> 1135294 (+0.00%); split: -0.00%, +0.00%
Copies: 11933 -> 11072 (-7.22%)
SALU: 18990 -> 18129 (-4.53%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31567>
2024-10-23 19:34:53 +00:00
Georg Lehmann
4f04e6f0c4 aco/insert_exec: avoid phis for masks in exec
Exec always contains the same value as the top of stack, even if the
top of stack is a temporary/constant. So if the predecessors have different
top of stack operands, don't insert a phi and use exec as the new top of stack.

No Foz-DB changes.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31567>
2024-10-23 19:34:53 +00:00
Georg Lehmann
0338bb9ae8 aco/ssa_elimination: also optimize branching sequence with s_and without saveexec
insert_exec will start using this in the future, handle it the same
just without the path to save exec before the v_cmpx instruction.

No Foz-DB changes.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31567>
2024-10-23 19:34:53 +00:00
Lionel Landwerlin
68a372f6ce anv: use UINT32_MAX to be consistent
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/31799>
2024-10-23 18:54:39 +00:00
Lionel Landwerlin
b4ae8cf381 anv: reemit push constants on pipeline changes
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 02294961ee ("anv: stop using a binding table entry for gl_NumWorkgroups")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12058
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31799>
2024-10-23 18:54:39 +00:00
Lionel Landwerlin
7d9449c873 anv: fix missing inline parameter emission
Should only impact Xe2+

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 02294961ee ("anv: stop using a binding table entry for gl_NumWorkgroups")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31799>
2024-10-23 18:54:39 +00:00
Lionel Landwerlin
3a5b9ee59e anv: fix binding table entry count for compute shaders
We're not using a binding table entry anymore for num_workgroups.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 02294961ee ("anv: stop using a binding table entry for gl_NumWorkgroups")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31799>
2024-10-23 18:54:39 +00:00
Chia-I Wu
fc2aecd2c9 panvk: fix texture size/levels/samples query
Fix an off-by-one for user sets in load_resource_deref_desc.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31794>
2024-10-23 18:31:22 +00:00
Eric Engestrom
1cb4378479 zink+turnip/ci: update a750 results
These are regressions, but impossible to bisect since everything was
completely broken for ages and no test could run at all.

A commit in the range 834b919f...02269223 fixed it, and we now have
results, so let's update the results so that we can see future
unexpected results!

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31806>
2024-10-23 18:09:28 +00:00
Martin Krastev
80233f5a88 svga/ci: enable vmware farm
Enable farm after DUT maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31800>
2024-10-23 17:12:17 +00:00
Simon Perretta
981ddec633 pvr: Make Vulkan driver depend only on nir headers, not library
Avoids linking issues when building with the compiler.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Simon Perretta
c1c71b93bf pvr: rename pds unused reg constant
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Simon Perretta
84a610db30 pvr: Inline xxhash header functions
Avoids a build error under certain configs.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Simon Perretta
ac48e83af1 pvr: Add missing include for FALLTHROUGH
Noticed with a newer version of gcc.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Simon Perretta
b882cb2d90 pvr: Rescope msaa_mode
Removes an unnecessary dependency on the compiler.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
1612255de6 pvr: ensure stencil clear value fits TA_STATE_ISPA.sref field
If the stencil clear value was larger than the maximum supported by the hardware
(255) then it would end up corrupting other fields in TA_STATE_ISPA. The Vulkan
1.0.266 spec says for VkClearDepthStencilValue:

  "stencil is the clear value for the stencil aspect of the depth/stencil
   attachment. It is a 32-bit integer value which is converted to the
   attachment’s format by taking the appropriate number of LSBs."

As such, mask the clear value when packing TA_STATE_ISPA.

Fixes a number of GLES tests, including:
  dEQP-GLES2.functional.depth_stencil_clear.*stencil_scissored*
  dEQP-GLES2.functional.fragment_ops.stencil.*
  dEQP-GLES3.functional.depth_stencil_clear.*stencil_scissored*
  dEQP-GLES3.functional.fragment_ops.stencil.*

Fixes: 821c6b9342 ("pvr: Implement depth/stencil/depth+stencil attachment...")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
e8cbfa2a57 pvr: add handling for retry error in pvr_srv_rgx_kick_compute2()
Speculative fix following similar fixes to pvr_srv_rgx_kick_render2() and
pvr_srv_rgx_submit_transfer2().

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
a186e28476 pvr: add handling for retry error in pvr_srv_rgx_submit_transfer2()
The caller of pvr_srv_rgx_submit_transfer2() handles VK_NOT_READY, but
pvr_srv_rgx_submit_transfer2() would never return this error as it was missing
handling for retry errors returned by the
PVR_SRV_BRIDGE_RGXTQ_RGXSUBMITTRANSFER2 bridge call. This resulted in
pvr_srv_rgx_submit_transfer2() returning VK_ERROR_OUT_OF_DEVICE_MEMORY, which
was treated as a device lost error by callers further up the stack.

Fixes a hang seen with a release/debugoptimized build when running
KHR-GLES3.copy_tex_image_conversions.required.cubemap_negy_cubemap_negy as part
of a batch of tests.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Iliyan Dinev
eb77cad906 pvr: handle PVR_SRV_ERROR_RETRY pvr_srv_rgx_kick_render2()
ret.error wasn't being checked, so the driver incorrectly returned OOM state.

Fixes GLES test:
  dEQP-GLES2.functional.fragment_ops.stencil.zero_stencil_fail

Signed-off-by: Iliyan Dinev <iliyan.dinev@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
2210e7ab4f pvr: remove set but not used struct member
Use of 'in_render_pass' was removed in 80f864cd23 ("pvr: Use common queue
submit implementation").

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Luigi Santivetti
9651d73671 pvr: really free memory in subpass render init
Fixes: 10b6a0d567 ("pvr: Add support for generating render pass hw setup data.")
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Luigi Santivetti
b8e0c15531 pvr: for fragment stages only do not insert a barrier
If within a render pass, only insert a mid fragment barrier if needed for
stencil load/store.

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Luigi Santivetti
35f824fb07 pvr: fix when to emit ppp state uniform base address
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Oskar Rundgren
703f3e902c pvr: improve buffer copy format selection
Take the source and destination address alignment into account when selecting
the pixel format / texel width. This avoids the transfer job code having to
handle an unaligned copy and, as a result, trying to encode a value that is too
large for the maxclip_x field in PBESTATE_REG_WORD1.

Fixes the following test cases:
  dEQP-GLES2.functional.vertex_arrays.single_attribute.offset.buffer_4_32_fixed2_vec2_dynamic_draw_quads_256
  dEQP-GLES2.functional.vertex_arrays.single_attribute.offset.buffer_4_8_fixed2_vec2_dynamic_draw_quads_256

Signed-off-by: Oskar Rundgren <oskar.rundgren@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Iliyan Dinev
1d0f23752c pvr: fix mipmap alignment for non-32bpp textures
There is no alignment necessary between mip levels.

Fixes test cases:
  dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_non_square_fastest
  dEQP-GLES2.functional.texture.mipmap.2d.generate.a8_non_square_nicest
  dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_non_square_fastest
  dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_non_square_nicest
  dEQP-GLES3.functional.texture.mipmap.2d.generate.a8_non_square_fastest
  dEQP-GLES3.functional.texture.mipmap.2d.generate.a8_non_square_nicest
  dEQP-GLES3.functional.texture.mipmap.2d.generate.l8_non_square_fastest
  dEQP-GLES3.functional.texture.mipmap.2d.generate.l8_non_square_nicest

Fixes: 8991e64641 ("pvr: Add a Vulkan driver for Imagination Technologies...")
Signed-off-by: Iliyan Dinev <iliyan.dinev@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
fa889ffec7 pvr: fix use of uninitialised value when setting up tex info swizzle
Resolves the following valgrind issue when running GLES CTS:

  ==8318== Conditional jump or move depends on uninitialised value(s)
  ==8318==    at 0x72AE91C: vk_format_to_pipe_format (vk_format.c:263)
  ==8318==    by 0x7051EE7: vk_format_description (vk_format.h:176)
  ==8318==    by 0x7052CFB: pvr_get_format_swizzle (pvr_formats.c:701)
  ==8318==    by 0x708CC2F: pvr_init_tex_info (pvr_query_compute.c:454)
  ==8318==    by 0x708D887: pvr_add_query_program (pvr_query_compute.c:663)
  ==8318==    by 0x708B9BB: pvr_CmdCopyQueryPoolResults (pvr_query.c:535)
  ==8318==    by 0x607E68F: copy_pool_results_to_buffer (zink_query.c:782)
  ==8318==    by 0x607EB37: update_qbo (zink_query.c:853)
  ==8318==    by 0x607FA17: zink_get_query_result (zink_query.c:1145)
  ==8318==    by 0x5E82987: tc_get_query_result (u_threaded_context.c:1283)
  ==8318==    by 0x59A7543: get_query_result (queryobj.c:297)
  ==8318==    by 0x59A78A7: _mesa_check_query (queryobj.c:388)

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Luigi Santivetti
1b67637fa0 pvr: fix calculation for textures z position fractional part
The fractional part of the z position will only be used with linear or bi-linear
filtering. Otherwise it is safe to discard the original fractional value and
reset it to 0.5.

Fixes: 480bdff4b5 ("pvr: Add support to process transfer and blit cmds")
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
c1bd0deb97 pvr: fix bo refcounting for imported buffers
When importing the same dma-buf multiple times, the kernel will return us the
same GEM handle each time. This means that if we close the GEM handle for one BO
we'll end up making the handle invalid for all BOs. The driver wasn't taking
this into account and was therefore creating a new BO each time a dma-buf was
imported, meaning we could end up with multiple BOs with the same GEM
handle. Fix this by creating a single BO per GEM handle and taking an additional
reference on a BO when the kernel returns an existing GEM handle.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
5ef9c552b2 pvr: fix image size calculation when mipLevels is 1
When calculating the size of an image, the driver was always factoring in space
for a full mip chain. However, this isn't necessary when mipLevels is 1 and this
resulted in applications needing to allocate more memory for these images than
is strictly necessary. Fix this by calculating the size of additional mip levels
(those greater than mipLevels) when more than 1 mip level has been requested.

Fixes: 2a3aa6da50 ("pvr: Fix cubemap layer stride")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
ba6a5b0354 pvr: drop 'Imagination' from deviceName
This is to align the device naming with the closed source driver.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Vlad Schiller
490bd13b5c pvr: Minor code refactor
The local_size and global_size arguments have been reordered to make them more
consistent.

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Karmjit Mahil
e23123b7f6 pvr: Handle DISABLE_PIXELMERGE
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Matt Coster
13e85fa911 pvr: Use vk_buffer_view base
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
SoroushIMG
1dc37f650a pvr: fix texture address offset when base level >0
Base level offseting only needs to be applied when creating non-compressed view
of a compressed image. Additionally the logic when patching offset, did not fix
up the rest of image state.

Seen in:
  dEQP-VK.pipeline.monolithic.image_view.view_type.2d.format.r32_uint.subresource_range.lod_base_mip_level_array_layer_last

Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Matt Coster
fbca3d64ad pvr: Fix reordering of sub-cmds when performing ds subtile alignment
The use of list_move_to() meant that the first transfer sub-command wasn't being
correctly placed before the target graphics sub-command.

Fixes: d1b17a5edc ("pvr: Implement ZLS subtile alignment")
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Matt Coster
6ba3c5263d pvr: Fix ds subtile alignment NULL pointer dereference
pvr_cmd_buffer_end_sub_cmd() sets the current sub-command to NULL. This was
causing list_move_to(), which is called immediately after this, to access a NULL
pointer. Fix this by storing the current sub command before calling
pve_cmd_buffer_end_sub_cmd() so that this can be used instead when modifying the
list.

Fixes: d1b17a5edc ("pvr: Implement ZLS subtile alignment")
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Donald Robson
a324a028a9 pvr: Fixed creation of waits in queue submission
Waits were not previously being created for job dependencies in
pvr_driver_queue_submit() because the pvr_stage_mask() was being called in place
of pvr_stage_mask_dst(), and the former does not handle the top-of-pipe bit.

Signed-off-by: Donald Robson <donald.robson@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Donald Robson
f29ddf4817 pvr: Stop creating waits when there are no waits
This prevents the creation of unused syncobjs in the kernel by not processing
waits when there aren't any waits given in the submit info.

Signed-off-by: Donald Robson <donald.robson@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Karmjit Mahil
019281fb0d pvr: Regenerate all descriptor program data sections
The descriptor set code will undergo a rework fairly soon so instead of trying
to fixup `per_stage_descriptor_masks` and deal with possible side effects of
that, for now let's always regenerate all descriptor program data sections no
matter the stage mask.

Fixes the following:
  dEQP-VK.pipeline.monolithic.dynamic_offset.graphics
    .{multi,single_}set.{storage,uniform}_buffer.numcmdbuffers_1
    .sameorder.numdescriptorsetbindings_2.numdynamicbindings_1
    .numnondynamicbindings_0

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
SoroushIMG
8a92ee673e pvr: fix msaa setup for resolve TQs
Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Karmjit Mahil
1ed8fb9cc3 pvr: Use a pixel size of 0 for invalid pbe accum formats
In `pvr_create_renderpass_hwsetup()` we use the size of the pbe accum format to
setup a mask for the valid parts of the output regs.

For formats such as `E5B9G9R9_UFLOAT_PACK32` which aren't supported as colour
attachments, `vkCreateRenderPass()` can still be called so to avoid undefined
behavior we use `0` as the bitsize.

Fixes `Unknown pbe accum format. Implementation error` for:
  dEQP-VK.api.granularity.in_render_pass.e5b9g9r9_ufloat_pack32
  dEQP-VK.api.granularity.multi.e5b9g9r9_ufloat_pack32
  dEQP-VK.api.granularity.random.e5b9g9r9_ufloat_pack32
  dEQP-VK.api.granularity.random.r32g32b32_uint
  dEQP-VK.api.granularity.random.r32g32b32a32_sint
  dEQP-VK.api.granularity.single.e5b9g9r9_ufloat_pack32

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
SoroushIMG
9a94a28bf4 pvr: cleanup 2101010 int format handling
There is an actual PBE accum format for this, so use that.

Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
SoroushIMG
972dd866ad pvr: fix intermediate size when configuring mrt setup
The accumulation format must be used here, not the final PBE emitted format.

Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Karmjit Mahil
ab2be6a224 pvr: Fix barier->barrier typo
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Simon Perretta
fda6904060 pvr: Add missing feature check in compute cmd stream
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:34 +00:00
Frank Binns
bd8c8e4af9 pvr: minor vulkan driver formatting fixes
clang-format the code.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
2024-10-23 16:47:33 +00:00
Samuel Pitoiset
9fda96db5b ci: uprev vkd3d-proton to 59d6d4b5ed23766e69fe252408a3401d2fd52ce8
It contains few fixes for recent DGC tests.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31796>
2024-10-23 15:47:54 +00:00
Sviatoslav Peleshko
ebd6738260 intel/elk/chv: Implement WaClearArfDependenciesBeforeEot
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/31746>
2024-10-23 15:02:27 +00:00
Sviatoslav Peleshko
2a4efe21c5 intel/brw/gfx9: Implement WaClearArfDependenciesBeforeEot
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11928
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/31746>
2024-10-23 15:02:27 +00:00
Daniel Schürmann
e8472d484f aco/spill: use float division for score() calculation rather than integers
This was the original intention and should result in more fine-grained
and thus better decisions.

Totals from 63 (0.08% of 79395) affected shaders: (Navi31)
Instrs: 3173500 -> 3174012 (+0.02%); split: -0.01%, +0.02%
CodeSize: 16345348 -> 16349288 (+0.02%); split: -0.01%, +0.03%
Latency: 18528036 -> 18526082 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 3619125 -> 3618709 (-0.01%); split: -0.02%, +0.01%
VClause: 82654 -> 82648 (-0.01%)
SClause: 61256 -> 61257 (+0.00%); split: -0.00%, +0.01%
Copies: 250037 -> 250158 (+0.05%); split: -0.06%, +0.11%
Branches: 101302 -> 101303 (+0.00%)
VALU: 1791447 -> 1791435 (-0.00%); split: -0.00%, +0.00%
SALU: 401898 -> 402007 (+0.03%); split: -0.03%, +0.06%
VOPD: 730 -> 741 (+1.51%)

Totals from 40 (0.06% of 63053) affected shaders: (Vega10)

Instrs: 161584 -> 161567 (-0.01%); split: -0.04%, +0.03%
CodeSize: 891168 -> 891004 (-0.02%); split: -0.04%, +0.03%
Latency: 3550766 -> 3549770 (-0.03%); split: -0.05%, +0.03%
InvThroughput: 2627028 -> 2626484 (-0.02%); split: -0.03%, +0.01%
VClause: 2970 -> 2971 (+0.03%)
SClause: 4203 -> 4205 (+0.05%); split: -0.26%, +0.31%
Copies: 19923 -> 19893 (-0.15%); split: -0.44%, +0.29%
VALU: 116045 -> 116054 (+0.01%); split: -0.01%, +0.02%
SALU: 22100 -> 22066 (-0.15%); split: -0.39%, +0.24%
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31769>
2024-10-23 14:35:29 +00:00
Daniel Schürmann
30d85b23ef aco/spill: fix faulty assertions
By unintentionally using integer division for score(), these
assertions were likely to be raised by accident.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31769>
2024-10-23 14:35:29 +00:00
Boris Brezillon
1a9b504e57 pan/bi: Add support for nir_texop_lod
The TEXC(GRDESC) instruction returns the LOD for a given texture
coordinates. Use it to implement nir_texop_lod.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Boris Brezillon
e317136536 pan/va: Add support for nir_texop_lod
The TEX_GRADIENT instruction returns the LOD for a given texture
coordinates. Use it to implement nir_texop_lod.

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>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Constantine Shablia
ec0646a0b3 pan/va: Define the TEX_GRADIENT instruction
Define the TEX_GRADIENT instruction in valhall/ISA.xml, and add the
necessary bits to the compiler to expose it.

Reviewed-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>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Boris Brezillon
9ad80a86c9 pan/va: Don't set bit 26:27 on texture instructions
These bits are reserved in the spec. Even if setting them is harmless,
we'd rather keep them zero just in case.

Suggested-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>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Boris Brezillon
c80e182019 panvk: Fix the maximum sampler LOD bias
The LOD bias in encoded in a signed 8.8 fixed point, meaning the valid
range is [-128,+127.966] not [-255,+255]. Since .maxSamplerLodBias
encodes an absolute value not a range, we make it [-127.996,+127,996].

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>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31742>
2024-10-23 11:02:38 +00:00
Daniel Schürmann
d5581b1124 aco/live_var_analysis: check isFixed() for definitions in order to set needs_vcc
In rare cases, it could happen that during post-RA validation,
live-var-analysis sets needs_vcc = false after if was true
before register allocation.

Fixes: bb5eace0dc ('aco/live_var_analysis: check for isPrecolored flag rather than isFixed')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31791>
2024-10-23 09:42:26 +00:00
Georg Lehmann
1f9b82bb2a nir/opt_algebraic: optimize -0.0 + a
Foz-DB Navi21:
Totals from 428 (0.54% of 79395) affected shaders:
MaxWaves: 8510 -> 8512 (+0.02%)
Instrs: 731062 -> 729665 (-0.19%); split: -0.19%, +0.00%
CodeSize: 3735788 -> 3728324 (-0.20%); split: -0.20%, +0.00%
VGPRs: 27328 -> 27336 (+0.03%); split: -0.03%, +0.06%
SpillSGPRs: 315 -> 314 (-0.32%)
Latency: 3872986 -> 3873236 (+0.01%); split: -0.08%, +0.09%
InvThroughput: 971001 -> 970056 (-0.10%); split: -0.17%, +0.08%
VClause: 11954 -> 11956 (+0.02%); split: -0.02%, +0.03%
SClause: 17361 -> 17358 (-0.02%)
Copies: 59038 -> 59045 (+0.01%); split: -0.22%, +0.24%
Branches: 17685 -> 17656 (-0.16%)
PreSGPRs: 26103 -> 26102 (-0.00%)
PreVGPRs: 23220 -> 23206 (-0.06%)
VALU: 515293 -> 513963 (-0.26%); split: -0.26%, +0.00%
SALU: 91591 -> 91544 (-0.05%)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31770>
2024-10-23 08:58:34 +00:00
Christian Gmeiner
7dccaf6c3e etnaviv: isa: Add img_store instruction
Blob generates such img_write's for piglit's tests/cl/program/execute/image-write-2d.cl

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31774>
2024-10-23 07:58:04 +00:00
Samuel Pitoiset
3a5d40b152 radv: fix enabling/disabling user sample locations
When user sample locations are disabled dynamically, the driver should
re-emit the standard sample locations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31786>
2024-10-23 06:28:20 +00:00
Marek Olšák
0226922384 nir: add nir_gather_tcs_info, new gathering/analysis pass
This does shader analysis that is more niche than regular shader info.

It's planned to be used by nir_restructure_tcs_flow as discussed here:
    https://gitlab.freedesktop.org/mesa/mesa/-/issues/11910

It's also useful for driver-specific passes.

The code for gathering "all_invocations_define_tess_levels" is copied
from radeonsi. The rest is new.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31447>
2024-10-23 03:17:16 +00:00
Russell Greene
a871eabced wsi/wayland/perfetto: supply presentation clock to perfetto
Perfetto is allowed to choose it's own default clock, and before this we just assumed the presentation times reported by the compositor are the same as perfetto's internal clock, which is not always the case. I got a nasty trace where all the wayland presents were in the wrong location. This fixes that by asking the compositor which clock it uses, then passing that along to perfetto.

A workaround for my compositor was setting use_monotonic_clock=true in the perfetto config, as my compositor (and I suspect most others) use the monotonic clock for presentation timestamps. However, asking the compositor is definitely the most correct solution.

I added a clock param to `MESA_TRACE_TIMESTAMP_{BEGIN,END}`, as it's only use that I could see was in wsi_common_wayland, and in general it seems good to be careful about which clock tracing timestamps come from.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31779>
2024-10-22 21:16:40 +00:00
Rohan Garg
2a34b492d8 anv: Xe2+ doesn't need the special flush for sparse
Fixes: 4aa3b2d ('anv: LNL+ doesn't need the special flush for sparse')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31737>
2024-10-22 20:49:07 +00:00
Tapani Pälli
dddd765553 anv: implement VF_STATISTICS emit for Wa_16012775297
Emit dummy VF_STATISTICS state before each VF state.

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/31759>
2024-10-22 20:19:48 +00:00
Tapani Pälli
9465d6e3d7 iris: implement VF_STATISTICS emit for Wa_16012775297
Emit dummy VF_STATISTICS state before each VF state.

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/31759>
2024-10-22 20:19:48 +00:00
David Heidelberg
562b80cf69 ci/build: Do not do LTO on any pre-merge job
Running LTO on pre-merge can be time-consuming,
especially on (over)loaded CI.

Let's keep it in nightly jobs to ensure coverage without causing
timeouts in pre-merge pipelines.

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31790>
2024-10-22 19:51:34 +00:00
David Heidelberg
72b5e4045b ci/fedora: add workaround for buggy GCC warning triggered by r600
In function 'r600_init_resource_fields',
    inlined from 'r600_buffer_create' at ../src/gallium/drivers/r600/r600_buffer_common.c:561:2:
../src/gallium/drivers/r600/r600_buffer_common.c:121:48: error: array subscript 'struct r600_texture[0]' is partly outside array bounds of 'unsigned char[256]' [-Werror=array-bounds=]
  121 |         if ((res->b.b.target != PIPE_BUFFER && !rtex->surface.is_linear) ||
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/util/os_memory.h:37

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31790>
2024-10-22 19:51:34 +00:00
Chia-I Wu
c23f7a2562 panvk: fix descriptor set layout hash
Save the hash to layout->vk.blake3, rather than the unused layout->hash.

Fixes: 73518dc169 ("panvk: Add Valhall DescriptorSetLayout implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31773>
2024-10-22 19:21:29 +00:00
Chia-I Wu
382e078659 panvk: remove unused is_sampler and is_texture
There is no user.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31773>
2024-10-22 19:21:28 +00:00
Gurchetan Singh
ceefcbecd5 gfxstream: move generate-gfxstream-vulkan.sh script
This moves the generate-gfxstream-vulkan.sh script
to upstream Mesa too.  Right now, Mesa is the source
of truth for both guest and host codegen.

There needs to be a simple way to invoke genvk.py
for users.  The script assumes the AOSP directory
structure to find gfxstream host, but the user may
also pass the path to gfxstream as the first argument.

Please run this from the src/gfxstream/codegen directory.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31775>
2024-10-22 18:36:16 +00:00
Serdar Kocdemir
b318fbbd42 gfxstream: Check metal extension for external memory
Enable guest side support for external memory on host devices
with VK_EXT_external_memory_metal extension.
Keeping old moltenvk extension check for backwards compatibility.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31775>
2024-10-22 18:36:16 +00:00
Georg Lehmann
5da34ebee4 aco/insert_exec: remove get_exec_op
We used to only store Temps in the stack, so undef meant exec.
Then the stack was changed to operands, and some places started storing exec
directly, drop the undef handling by replacing everything with Operand(exec, lm)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
Georg Lehmann
8d148401cb aco/ir: rework Operand equality to return true for equal fixed non-temp ops
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
Georg Lehmann
6716fb08d8 aco/insert_exec: remove unused includes
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
Georg Lehmann
23fb0883eb aco/insert_exec: untangle add_branch_code control flow
All of the single ifs with return hide that this is effectively almost an
if-else chain, so convert it to one for real.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
Georg Lehmann
de7d931962 aco/insert_exec: remove stray break_cond variable
This was always trivial since some discard rework.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
Georg Lehmann
ade7f1a203 aco/insert_exec: replace pair with a named struct
.first and .second everywhere was hard to read.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
Georg Lehmann
a3054499ba aco/insert_exec: don't pretend WQMState is a bit mask
It's a simple enum.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31560>
2024-10-22 17:03:26 +00:00
José Roberto de Souza
3ed020031c iris: Program async compute registers of STATE_COMPUTE_MODE in compute engine
Iris also makes use of compute engine in paralel with render engine,
so here also programing the async compute registers like it is done
in ANV.
This should improve performance when render and compute engine
are running in parallel.

It was also necessary to copy 2 workarounds that are needed before
programing STATE_COMPUTE_MODE.

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/30796>
2024-10-22 15:24:32 +00:00
José Roberto de Souza
aa5b2c4165 anv: Set recommended values for gfx20 async compute registers in STATE_COMPUTE_MODE
This recommended values should improve the performance of async
compute in gfx20, we may want to tweek this for Linux but at least
this values should give us a better baseline than default values.

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/30796>
2024-10-22 15:24:32 +00:00
José Roberto de Souza
2483f8f7cd intel/genxml: Do small fixes in gfx20 definition of STATE_COMPUTE_MODE
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/30796>
2024-10-22 15:24:32 +00:00
José Roberto de Souza
3efba707bf anv: Set all async compute registers in STATE_COMPUTE_MODE
Setting the missing registers to specification recommended values that
is also the default value, so it is not expected any changes in
behavior or performance here.

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/30796>
2024-10-22 15:24:32 +00:00
José Roberto de Souza
86ed5ec78e intel/genxml: Append 'Z Async Throttle settings' to gfx125 definition of STATE_COMPUTE_MODE
DG2 has the 'Force Non-Coherent' fields but MTL and ARL has
'Z Async Throttle settings', so here adding the missing one.

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/30796>
2024-10-22 15:24:32 +00:00
David Rosca
4adb652392 frontends/va: Don't relock mutex in vlVaEndPicture
While this should not cause any real issues, there is no reason
to unlock the mutex just to lock it again couple lines below.

Fixes coverity issue 1559431 Value not atomically updated

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31622>
2024-10-22 14:48:29 +00:00
David Rosca
2cb3c2e8d5 frontends/va: Fix parsing leb128 when using more than 4 bytes
Bit shift would go over 32 bits. Also add assert for maximum
value as allowed by spec.

Fixes coverity issue 1469252 Bad bit shift operation

Fixes: 5edbecb856 ("frontends/va: adding va av1 encoding functions")
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31622>
2024-10-22 14:48:29 +00:00
David Rosca
91222671f1 frontends/va: Fix NULL check in intra refresh params
Return early when p_intra_refresh is NULL.

Fixes coverity issue 1553113 Dereference after null check

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31622>
2024-10-22 14:48:28 +00:00
David Rosca
f9d1a50d8d frontends/va: Fix some small coverity issues
* 1547216 Operands don't affect result
  - PRESET_MODE_HIGH_QUALITY is maximum value
* 1255678 Dereference after null check
  - no need to check against NULL because the data can
    only be NULL when the array is empty (size == 0)
* 1619397 Unsigned compared against 0
  - check >= 0 is always true in vlVaAddRawHeader
*  1468885 Dereference null return value
  - add NULL check for buffers in vlVaRenderPicture

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31622>
2024-10-22 14:48:28 +00:00
Daniel Stone
64ba87b68f ci/fdno: Add flake seen in the wild
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31754>
2024-10-22 14:12:32 +00:00
Daniel Stone
2ed84534d2 ci/rpi: Add flakes seen in the wild
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31754>
2024-10-22 14:12:32 +00:00
Samuel Pitoiset
7cd7631554 ci: uprev vkd3d-proton to 65b81403435576d882d9141ae3eb4a29373fba0e
For EXT DGC implementation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31754>
2024-10-22 14:12:32 +00:00
Eric Engestrom
bc0da4bdfc ci: move comment into the appropriate section
I wrote the toml linter, but not the rest.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31785>
2024-10-22 13:01:56 +00:00
Eric Engestrom
ba789f2ce6 ci: move yaml-toml-shell-test out of build-for-tests stage
It inherited the stage from `python-test`, but it's not accurate here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31785>
2024-10-22 13:01:56 +00:00
Daniel Schürmann
ef47cce51c aco/ra: always block register file for precolored operands
so that they don't accidentally get renamed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31387>
2024-10-22 12:29:18 +00:00
Daniel Schürmann
18e7e8d8f0 aco/ra: make use of Precolored flag
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31387>
2024-10-22 12:29:18 +00:00
Daniel Schürmann
bb5eace0dc aco/live_var_analysis: check for isPrecolored flag rather than isFixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31387>
2024-10-22 12:29:18 +00:00
Daniel Schürmann
e2705a9d85 aco: set Precolored flag before register allocation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31387>
2024-10-22 12:29:18 +00:00
Daniel Schürmann
c2ed4b474a aco: introduce 'isPrecolored' flag for Operand and Definition
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31387>
2024-10-22 12:29:18 +00:00
Samuel Pitoiset
b33f47b498 radv: regroup and emit all DS related states in the same function
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31662>
2024-10-22 11:52:10 +00:00
Samuel Pitoiset
8791e56b62 radv: track more redundant DB related registers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31662>
2024-10-22 11:52:10 +00:00
Daniel Stone
2950d55828 ci/skqp: Set $SKQP_ARCH from build-skqp.sh
Let's just use $DEBIAN_ARCH consistently for our target architecture,
and do any mappings down in build scripts.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31781>
2024-10-22 10:44:36 +00:00
Daniel Stone
abf7f11796 ci: Use sections for test container builds
These can be really long; it's helpful to have the sections to be able
to separate the individual builds, as well as to get an idea of where
our time goes.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31781>
2024-10-22 10:44:36 +00:00
Daniel Stone
4b2ff9c946 ci/skqp: Fix relative paths
When we use build-skqp as a sourced script, $0 refers to the overall
build script, which may not be in .gitlab-ci/container/.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31781>
2024-10-22 10:44:36 +00:00
Daniel Stone
2d03e67bbf ci/angle: Use relative paths
When we use build-angle as a sourced script, $0 refers to the overall
build script, which may not be in .gitlab-ci/container/.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31781>
2024-10-22 10:44:36 +00:00
Daniel Stone
ff97a8b006 ci/firmware: Allow calling firmware as sourced script
Most of our build scripts are sourced rather than executed in a
subshell, so they inherit our environment. Allow our firmware script to
do the same by not exiting when we have no firmware to download, as is
the case on arm32.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31781>
2024-10-22 10:44:36 +00:00
Daniel Stone
24a9fe6655 ci: Really remove Mesa drivers from rootfs
It turns out dpkg doesn't actually support wildcard expansion. Oops.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31781>
2024-10-22 10:44:36 +00:00
Daniel Stone
5e1d3c2ffe ci/mold: Use appropriate parallelism and strip binaries
--parallel will by default launch way too many processes and just DoS
itself. We also want to strip the installed binary.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31781>
2024-10-22 10:44:36 +00:00
Daniel Stone
05b5701c01 ci/lava: Source setup-test-env
Make sure we have it available everywhere.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31781>
2024-10-22 10:44:36 +00:00
Vignesh Raman
68135b620c ci: move rules from rules-anchors to workflow
The workflow is almost self-contained except by two rules that are still in an
old rules-anchors definition. So, we can keep all the rules in the same place.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31561>
2024-10-22 09:54:59 +00:00
Vignesh Raman
a9e11c2f09 ci: build KERNEL_IMAGE_BASE in before_script
When a job modifies the KERNEL_TAG variable, the url shall be rebuilt. So,
instead of building it in the variables section, do right before the script
when all the environment is set.

But, as we still have the FORCE_KERNEL_TAG that then defines the
KERNEL_IMAGE_BASE in the old style, for backwards compatibility it is not
overwriting the KERNEL_IMAGE_BASE.

The last two rules are now redundant and can be dropped.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31561>
2024-10-22 09:54:59 +00:00
Marek Olšák
0bffe8ec05 mesa_interface: rename __DRIimage to struct dri_image
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
ee54fe9f69 mesa_interface: rename __DRIconfig to struct dri_config
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
872b5c70d1 mesa_interface: remove redundant __DRI*Rec types
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
186a3b6dad mesa_interface: replace opaque __DRIdrawable with struct dri_drawable everywhere
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
329e03535b mesa_interface: replace opaque __DRIcontext with struct dri_context everywhere
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
1ce9aa3d65 mesa_interface: replace opaque __DRIscreen with struct dri_screen everywhere
it's always struct dri_screen

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
Marek Olšák
3b603d1646 mesa_interface: remove unused stuff
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:01 +00:00
Eric Engestrom
28655b26f5 ci/b2c: make initramfs & kernel urls optional
If omitted, the default ones are used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31570>
2024-10-22 05:29:07 +00:00
Eric Engestrom
fa7c4b148b ci/b2c: allow B2C_DTB_URL to be set to an empty string to unset it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31570>
2024-10-22 05:29:06 +00:00
Louis-Francis Ratté-Boulianne
7af000a6ec panfrost: initialize all UBO and vertex buffer descriptors
When tracing the command stream with PAN_MESA_DEBUG=trace, all
descriptors are read and decoded. Trying to read an invalid or old
descriptor might cause confusion or (more importantly) a crash.

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/31768>
2024-10-22 05:01:27 +00:00
Kenneth Graunke
834b919f6a brw: Optimize 16-bit texture fetches later
At the point we were calling this, we hadn't necessarily cleaned up
derefs via nir_lower_vars_to_ssa, nor movs/vecs via copy propagation,
so it wasn't necessarily easy for this pass to see the actual usage of
the destination.

Moving this later allows us to detect f2f32(txf(...)) and avoid
converting it to a 16-bit txf (why convert with ALU instructions
when the sampler could do it for us?).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31750>
2024-10-22 01:15:10 +00:00
Chia-I Wu
ea478efa2e panvk: advertise VK_EXT_image_drm_format_modifier
The extension is supported despite we only support
DRM_FORMAT_MOD_LINEAR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31719>
2024-10-22 00:47:47 +00:00
Chia-I Wu
b7bc7852d7 panvk: advertise VK_KHR_image_format_list
Since panvk does not treat VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT specially,
we can just advertise the extension.  When AFBC is supported in the
future, we will want to check the list to see if we can keep AFBC even
when VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT is set.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31719>
2024-10-22 00:47:47 +00:00
Chia-I Wu
cb7ce6a934 panvk: check VkPhysicalDeviceImageDrmFormatModifierInfoEXT
Make sure VK_ERROR_FORMAT_NOT_SUPPORTED is returned when
VkPhysicalDeviceImageDrmFormatModifierInfoEXT specifies an unsupported
modifier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31719>
2024-10-22 00:47:47 +00:00
Chia-I Wu
252ddaf51b panvk: fix VkDrmFormatModifierPropertiesListEXT query
Do not advertise unsupported formats.  Fix the array type and init
drmFormatModifierTilingFeatures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31719>
2024-10-22 00:47:47 +00:00
Chia-I Wu
b3266db918 panvk: remove panvk_GetImageDrmFormatModifierPropertiesEXT
Init vk_image::drm_format_mod and let
vk_common_GetImageDrmFormatModifierPropertiesEXT handle it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31719>
2024-10-22 00:47:47 +00:00
Adam Jackson
514ba16d95 rusticl: Enable out-of-order execution
Ought to work, let's find out.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12029
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31672>
2024-10-22 00:03:48 +00:00
Karol Herbst
1798597637 radeonsi: move si_compute::global_buffers to si_context
si_set_global_binding is a context function, but it touches the bound
compute program. As radeonsi also advertizes PIPE_CAP_SHAREABLE_SHADERS
this function is supposed to be safe when the same compute state object is
bound to multiple contexts at once.

In order to fix this data race global_buffers is moved to si_context so it
becomes context private data instead.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31672>
2024-10-22 00:03:48 +00:00
Christian Gmeiner
fad599a619 etnaviv: Enable ARB_framebuffer_no_attachments
There is not much needed to pass the supported tests.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31578>
2024-10-21 23:27:30 +00:00
David Heidelberg
3dbbc24cb3 ci/build: debian-build-testing should follow same limit as other jobs
This was temporarily measure to prevent long LTO builds get stuck.

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31758>
2024-10-21 22:30:09 +00:00
Eric Engestrom
5a65c478dd ci: fix shader-db rules
All the post-merge pipelines are failing to be created with this error:

  'shader-db' job needs 'debian-build-testing' job, but 'debian-build-testing' is not in any previous stage

Like all the other test jobs, shader-db should never run in post-merge
pipelines.

Fixes: 0724b00dad ("ci: run shader-db only when one of the drivers it tests is modified")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31758>
2024-10-21 22:30:08 +00:00
Amber
9ace01edbe tu, ir3: Implement VK_KHR_shader_atomic_int64 for a7xx.
Passes dEQP-VK.glsl.atomic_operations.*64bit*

Signed-off-by: Amber Harmonia <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27776>
2024-10-21 21:47:44 +00:00
Amber
a3afe22dc9 nir: add pass to lower atomic arithmetic to a loop with cmpxchg.
Signed-off-by: Amber Harmonia <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27776>
2024-10-21 21:47:44 +00:00
Amber
7d0870e5d5 ir3: add support for 64 bit atomics
Signed-off-by: Amber Harmonia <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27776>
2024-10-21 21:47:44 +00:00
Amber
5628a01523 ir3: add encoding support for 64-bit atomics introduced in a7xx.
Signed-off-by: Amber Harmonia <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27776>
2024-10-21 21:47:44 +00:00
Mary Guillemard
84d57e1fb1 nir: Move atomic_op_to_alu to common code
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27776>
2024-10-21 21:47:44 +00:00
quic_lkondred
334af37697 freedreno: Add support for Adreno 663 GPU
Add support to enable basic functionality of Adreno 663 GPU.

Signed-off-by: quic_lkondred <quic_lkondred@quicinc.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31211>
2024-10-21 21:05:57 +00:00
Eric Engestrom
ce02c9b5ef ci: simplify setting lava job priority
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31755>
2024-10-21 20:18:23 +00:00
Eric Engestrom
e70db26d18 ci: simplify ci-tron priority variable
Set it to low, and only override in merge pipelines.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31755>
2024-10-21 20:18:23 +00:00
Rebecca Mckeever
c2299b6642 panvk/csf: Implement vkCmdExecuteCommands
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.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/31159>
2024-10-21 19:39:07 +00:00
Rebecca Mckeever
3513960fe6 panvk: Move rendering info to panvk_rendering_state struct
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.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/31159>
2024-10-21 19:39:07 +00:00
Rebecca Mckeever
ddb2f6f1fa panvk: Track VkFormats for depth and stencil attachments
These can be used directly in vk_meta_rendering_info.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.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/31159>
2024-10-21 19:39:07 +00:00
Rebecca Mckeever
26a03222ef panvk/csf: Split tiler flags initialization into two steps
The first step conditionally updates the tiler flags based on dirty bits,
and the second step is the override flags, which are unconditionally
updated at draw time.

Use pan_pack_nodefaults() to avoid default initialized fields.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.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/31159>
2024-10-21 19:39:07 +00:00
Rebecca Mckeever
07346ea1e6 panvk/csf: Set and clear vb.dirty flag
Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.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/31159>
2024-10-21 19:39:07 +00:00
Marek Olšák
fb6184f89c nir: add shader_info::tess::tcs_same_invocation_inputs_read(_indirect)
We need both the same-invocation usage mask and cross-invocation usage
mask. The AMD reason is below.

Cross-invocation TCS input access doesn't prevent the same-invocation
fast path in AMD hw because it's just a different way to load the same
data, and we want to use both paths for the same TCS input based on
the load instruction. The fast path can't be used for indirect access,
which is gathered separately for same-invocation access.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31645>
2024-10-21 18:53:51 +00:00
David Heidelberg
9ef6ff1702 build: Fix LTO with Android NDK
`no-emulated-tls` is passed, but also link arguments are required for LTO.

Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31615>
2024-10-21 17:39:59 +00:00
Rhys Perry
8221367fba radv: use explicitly sized types for some radv_shader_info members
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31593>
2024-10-21 15:52:53 +00:00
Rhys Perry
4383a917e6 radv: optimize VS input load components to constants earlier
This helps some linking optimizations.

fossil-db (navi21):
Totals from 2262 (2.85% of 79395) affected shaders:
MaxWaves: 57680 -> 57738 (+0.10%); split: +0.11%, -0.01%
Instrs: 1061526 -> 1053937 (-0.71%); split: -0.79%, +0.07%
CodeSize: 5766352 -> 5736784 (-0.51%); split: -0.60%, +0.08%
VGPRs: 89376 -> 89000 (-0.42%); split: -0.43%, +0.01%
Latency: 4102938 -> 4059773 (-1.05%); split: -1.14%, +0.08%
InvThroughput: 1105885 -> 1092291 (-1.23%); split: -1.24%, +0.01%
VClause: 18917 -> 18972 (+0.29%); split: -0.12%, +0.41%
SClause: 28839 -> 28115 (-2.51%); split: -3.32%, +0.81%
Copies: 73396 -> 72671 (-0.99%); split: -1.63%, +0.65%
PreSGPRs: 65866 -> 65838 (-0.04%); split: -0.22%, +0.17%
PreVGPRs: 69752 -> 69278 (-0.68%)
VALU: 680351 -> 673489 (-1.01%); split: -1.03%, +0.02%
SALU: 121459 -> 121515 (+0.05%); split: -0.00%, +0.05%
VMEM: 29632 -> 30021 (+1.31%); split: -0.02%, +1.33%
SMEM: 73744 -> 73836 (+0.12%); split: -0.01%, +0.14%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31593>
2024-10-21 15:52:53 +00:00
Rhys Perry
9784165de5 radv: fix output statistic for fragment shaders
This is a per-component bit mask (0xf for each output).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 0e0c2574d1 ("radv: Add shader stats for inputs and outputs.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31593>
2024-10-21 15:52:52 +00:00
Marek Olšák
45d8cd037a ac/nir: rewrite ac_nir_lower_ps epilog to fix dual src blending with mono PS
Unigine Heaven with AMD_DEBUG=mono has incorrect rendering on gfx11
because it doesn't set nir_io_semantics::dual_source_blend_index for
the second output, resulting in garbage asm.

Instead of trying to find out what's wrong, I decided to rewrite this
to make it the same as the LLVM IR path. It simplifies the code and fixes
Unigine Heaven with AMD_DEBUG=mono.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31669>
2024-10-21 12:06:14 +00:00
Eric Engestrom
d117411309 {freedreno,intel}/ci: add missing tracking of merge-skips.txt files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31739>
2024-10-21 10:22:57 +00:00
Eric Engestrom
ee0d782229 {freedreno,intel}/ci: rename "premerge-skips.txt" to "merge-skips.txt" to accurately reflect what they are
This also means the infrastructure added by @gallo in 1dc64d0613
("ci: Use merge-skips files during merge pipelines") can be used and all
the manual adding of these files can be dropped, reducing the likeliness
of bugs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31739>
2024-10-21 10:22:57 +00:00
Eric Engestrom
bb98949134 ci: rename "freedreno" farm to "google-freedreno"
There are 3 freedreno farms: google, collabora, and valve.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31709>
2024-10-21 09:36:05 +00:00
Eric Engestrom
18489da224 freedreno/ci: use {freedreno,turnip}{,-manual}-rules
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31709>
2024-10-21 09:36:05 +00:00
Eric Engestrom
51125f8b39 freedreno/ci: add {freedreno,turnip}{,-manual}-rules to simplify the rest of the code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31709>
2024-10-21 09:36:05 +00:00
Eric Engestrom
85de24ebc5 ci/prepare-artifacts: use more than one thread when compressing the install tarball
Also, add `--quiet` to avoid partial progress output.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30416>
2024-10-21 08:52:23 +00:00
Eric Engestrom
e9998fdef5 ci/{deqp,piglit}-runner: make zstd respect FDO_CI_CONCURRENT when set, and fallback to the current "all the threads"
Also, expand `-q` to `--quiet` to be more explicit, and drop a stray
`-c` which did nothing except cancel out `--rm`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30416>
2024-10-21 08:52:22 +00:00
Pavel Ondračka
9672f9732f r300/ci: add new RV410 flakes
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31753>
2024-10-21 08:22:32 +00:00
Georg Lehmann
10951bb11a aco: fix 64bit extract_i8/extract_i16
The old code only sign extended to 32bit, with a zero hi half.

Fixes: 1f2518ef9f ("aco: implement nir_op_extract/nir_op_insert")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31734>
2024-10-21 07:13:57 +00:00
David Heidelberg
4375133abb ci/alpine: stay trendy, Alpine flies on LLVM 19 now
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31656>
2024-10-20 19:39:32 -07:00
Georg Lehmann
3120fec0c0 ci: remove selinux from containers
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31656>
2024-10-21 01:14:35 +00:00
Georg Lehmann
894c4f0c78 meson: remove selinux option
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31656>
2024-10-21 01:14:35 +00:00
Daniel Stone
ec95f07a1f ci: Quieten test execution
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:43 +01:00
Daniel Stone
ef175ea594 ci: Make section emission really quiet
If you're emitting a section header under set -x, you will see:
+ section_start foo "foo"
+ x_off
[the section header]

This is kind of annoying. Instead of trying to squash it everywhere by
dancing around local set +x management, play some extremely stupid
tricks with shells to make sure we never emit it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:43 +01:00
Daniel Stone
8316654dac ci: Quieten post-test cleanup
Ordinary people are not interested in reading this.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:43 +01:00
Daniel Stone
dd415e45bb ci/traces: Use sections to quiet execution
Only print the good bits by default.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:43 +01:00
Daniel Stone
5dcd5bfc3e ci/crosvm: Replace SCRIPT_DIR with SCRIPTS_DIR
This is what gets used everywhere else, so do that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:43 +01:00
Daniel Stone
5edb11e9ea ci/crosvm: Make crosvm-runner safe for set +u
This is a really useful thing to have; the next commit cost me an
embarrassing amount of time for not having it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:43 +01:00
Daniel Stone
da292b019c ci/bare-metal: Use section for boot messages from poe-powered
Very few people ever want to see the exact details of how we attempt to
boot a device.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:43 +01:00
Daniel Stone
d9e1b29504 ci/bare-metal: Truncate printed times and prefixes
The date isn't interesting, since you can tell if it wraps around
anyway. Just print the time down to the millisecond, which should be
plenty enough. We also don't need to print 'R SERIAL_CPU> ' when almost
every line is reading from the CPU serial buffer, so make that the
default.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
3ed9fd3140 ci/bare-metal: Use section for boot messages from cros-servo
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
a9b03a8fc4 ci/bare-metal: Move preparation steps into section
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
d171f47f44 ci/lava: Coalesce post-processed job information
We can combine a section _and_ a print.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
9be46b29f0 ci/lava: Print relative timestamps in sections
Follow what the shell executor does and print the time since the job
started in the section header.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
8ee6241a8c ci/hw: Wrap pre-test setup in collapsed section
Most people don't care about environment variables and starting Weston.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
970f37be09 ci/lava: Change default section colour to cyan
This matches the sections from the shell prints, which are quite nice.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
3c7b53e27c ci/lava: Be a little less enthusiastic with bold
Some things can just fade away into the background.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
dead2b7e62 ci/lava: Fix colour definitions
All the foreground colours pass 1 to ANSI SGR, which sets bold. The
other arguments are either a colour from 30-37 (passed directly), or
38;5;nnn, where nnn is an extended RGB colour. It looks like most of the
definitions were cargo-culted from FG_RED, which correctly sets an
extended colour, because the arguments there were being parsed as
setting blinking, followed by 197 which was ignored as unknown.

Fix them to just set the original definition.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
3068279280 ci/lava: Truncate printed times
We don't need to go down to the microsecond.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
65f05f2231 ci/lava: Explicitly pass UTC timezone
Rather than putting it into the environment, just pass it explicitly
every time we need a timestamp.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
2b4d468421 ci/lava: Hide more boot details into sections
Make sure we keep as much of the boot as we can behind sections, so
by default people only see the actual test run.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
837004fa26 ci/lava: Rename lava_boot section
'LAVA boot' is less meaningful to normal people than explaining that
we're booting the hardware device under test.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
964b979131 ci/lava: Add section for device wait
This way it's easier to see how long it took.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
586abb1e10 ci/lava: Break section-header print into separate function
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
bfe03bb6a0 ci/lava: Quieten timestamp warnings from tar
'tar: results/results.csv.zst: time stamp 2024-09-10 13:54:49 is
11.443107788 s in the future'

No-one cares.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
46c8423489 ci/lava: Remove pointless messages
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
cff886d808 ci: Don't print structured log data URL
People who want to get it will know where to find it. Most people will
not care.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
9af1ceb7a2 ci: Don't move results directory
No sense in moving things around; just create it in the right place to
begin with.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
3dde227022 ci/python: Fix section emission
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
2bac04aa4b ci/shellcheck: Don't exit on first failure
It's really tedious having to run shellcheck in a loop to find every
failure; go through them all and print them all at once.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Daniel Stone
80d3ee3c78 ci/shellcheck: Don't overwrite SCRIPTS_DIR with relative path
shellcheck doesn't like it when we have relative paths and it's trying
to check if the files exist.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
2024-10-20 11:32:42 +01:00
Mary Guillemard
4bc2d221c9 winsys/nouveau: Reformat to stop relying on tabs
Also remove .editorconfig as we don't need it anymore.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31667>
2024-10-19 17:24:46 +02:00
Mary Guillemard
f9e72b7fcb winsys/nouveau: Rework to use u_pipe_screen_lookup_or_create
All the boilerplate can be removed to use u_pipe_screen_lookup_or_create
instead.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31667>
2024-10-19 17:24:46 +02:00
Caio Oliveira
019770f026 intel/brw: Add SHADER_OPCODE_VOTE_*
Add opcodes for VOTE_ALL, VOTE_ANY and VOTE_EQUAL.  The first two
are also used for the quad variants.  Move their lowering from
NIR conversion to brw_lower_subgroup_ops.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31029>
2024-10-19 02:44:20 +00:00
Caio Oliveira
f20df2984d intel/brw: Ensure BROADCAST() value respect register alignment
If we have a non-register-aligned source, MOV it to a new register
so that the invariant expected when generating SHADER_OPCODE_BROADCAST
is respected.

Added to ensure a later patch won't hit the `src.subnr == 0` assertion
in brw_broadcast() generation code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31029>
2024-10-19 02:44:20 +00:00
Caio Oliveira
d97381efd8 intel/brw: Add fs_builder::BROADCAST() helper
Include in the helper which already take care of using exec_all() and
taking the first component of the result.  Both are expected by
SHADER_OPCODE_BROADCAST.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31029>
2024-10-19 02:44:20 +00:00
C Stout
67aadd4f0b meson: add log dependency to dep_android
Log library entrypoints are included with android-stub=true.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30345>
2024-10-18 21:17:30 +00:00
Valentine Burley
f3ef27e0b9 ci: Add global ANGLE skips for its waiver
ANGLE has a waiver for certain XFB tests, but this wasn't properly applied
on Alder Lake and these tests weren't skipped there.

Add a global angle-skips.txt file so that we don't have to keep copy-pasting
these skips.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31721>
2024-10-18 20:39:33 +00:00
C Stout
2fef9e9029 u_gralloc: include dep_android_mapper4 as needed
Since it is not included in dep_android.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30353>
2024-10-18 19:21:18 +00:00
Eric Engestrom
c4e8e3fb2f zink+nvk/ci: document more flakes seen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31740>
2024-10-18 17:57:45 +00:00
Eric Engestrom
3a7881d126 zink+nvk/ci: mark a few tests as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31740>
2024-10-18 17:57:45 +00:00
Eric Engestrom
0724b00dad ci: run shader-db only when one of the drivers it tests is modified
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31708>
2024-10-18 17:06:14 +00:00
Sergi Blanch Torne
a41c4cc1fd WIP: Re-enable Comet Lake
There is a fresher device type with a CML GPU, with also a bigger number of
boards. Those are more reliable, so also we can remove the manual rules.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26830>
2024-10-18 16:33:15 +00:00
Mike Blumenkrantz
b4e18fb188 vdpau: fail context create if driver does not support video
not all drivers support this, and forcing them to implement stubs
is not how gallium works

cc: mesa-stable

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31736>
2024-10-18 15:54:41 +00:00
Mike Blumenkrantz
fd0b20e8e8 va: fail context create if driver does not support video
not all drivers support this, and forcing them to implement stubs
is not how gallium works

cc: mesa-stable

Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31736>
2024-10-18 15:54:41 +00:00
David Heidelberg
49d5dcebd5 ci/freedreno: switch to dash instead of underscore, same as rest of the CI
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31723>
2024-10-18 15:21:16 +00:00
Mike Blumenkrantz
45eb3bfd32 device-select: only try wayland/x11 if the required vars are set
don't try to infer connections, as this may deadlock compositors

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31738>
2024-10-18 14:47:10 +00:00
Daniel Stone
f4bb0e74fd ci: Don't carry static libraries around for tests
Our current install tarball is 120ish MB zstd, and over 500MB unpacked.
A lot of this size was two static libraries which we'll obviously never
use at runtime.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31735>
2024-10-18 14:04:12 +00:00
Christian Gmeiner
f4f527cd3e etnaviv: isa: Add img_load instruction
Blob generates such img_load's for piglit's tests/cl/program/execute/image-read-2d.cl

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31674>
2024-10-18 13:33:51 +00:00
Christian Gmeiner
1562e51f34 etnaviv: isa: Add clamp0_max instruction
Reverse engineered with the following OpenCL kernel:

kernel void add(global float* out, float a, float b) {
  float r;

  _viv_asm(CLAMP0MAX, r, a, b);

  out[0] = r;
}

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31674>
2024-10-18 13:33:50 +00:00
Christian Gmeiner
5fa4c1a191 compiler/rust: Copy NirInstrPrinter from NAK
Switch NAK to it.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31706>
2024-10-18 12:43:52 +00:00
Pierre-Eric Pelloux-Prayer
5607c7ee49 ac/surface: fix determination of gfx12_enable_dcc
For surfaces without a modifier, the surf_size check wasn't
necessary, but it was also invalid since surf_size is set later
(in gfx12_compute_miptree).

Since it's not required anyway, drop this check.

Fixes: 060d5dacfd ("ac: add gfx12 DCC shared code")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31683>
2024-10-18 14:04:04 +02:00
Pierre-Eric Pelloux-Prayer
19fa5561be radeonsi: fix radeon_canonicalize_bo_flags domain handling
ffs(VRAM, GTT) returns the GTT bit as it's the smaller.

Simplify the code by explicitely selecting VRAM when both
domains are active, otherwise assert that only 1 bit is set.

Fixes: 593f72aa21 ("winsys/amdgpu-radeon: rework how we describe heaps")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31683>
2024-10-18 14:04:02 +02:00
Pierre-Eric Pelloux-Prayer
bb08596645 radeonsi/gfx12: fill missing dcc tiling info
Display DCC support has been enabled in 0bb83a4060 but this TODO
was forgotten.
Now that the kernel is fixed, we can set the related fields.

Fixes: 0bb83a4060 ("ac/surface: finish display DCC for gfx12")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31683>
2024-10-18 14:03:46 +02:00
Daniel Stone
a5a5a50ae8 ci/angle: Update ANGLE, reduce build times
ANGLE currently pulls absolutely loads of stuff that we don't need. Fix
it up so we don't need to do that anymore, so it's much faster to build.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31716>
2024-10-18 10:40:31 +00:00
Collabora's Gfx CI Team
19ef6b247e Uprev Piglit to 791e420b2628c1e35eea81b3bafdb1c904a141e8
7ce69da119...791e420b26

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31716>
2024-10-18 10:40:31 +00:00
Pavel Ondračka
33c8dc4f18 nir/nir_group_loads: reduce chance of max_distance check overflow
Helps for the case when max_distance is set to ~0, where the pass would now
only create groups of two loads together due to overflow. Found while
experimenting with this pass on r300, however the only driver currently
affected is i915.

With i915 this change gains around 20 shaders in my small shader-db
(most notably some GLMark2, Unigine Tropics, Tesseract, Amnesia) at
the expense of increased register pressure in few other cases.
I'm assuming this is a good deal for such old HW, and this seems like what
was intended when the pass was introduced to i915, but anyway this
could be tweaked further driver side with a more optimized max_distance
value. Only shader-db tested.

Relevant i915 shader-db stats (lpt):
total tex_indirect in shared programs: 1529 -> 1493 (-2.35%)
tex_indirect in affected programs: 96 -> 60 (-37.50%)
helped: 29
HURT: 2
total temps in shared programs: 3015 -> 3200 (6.14%)
temps in affected programs: 465 -> 650 (39.78%)
helped: 1
HURT: 91

GAINED: 20

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: GKraats <vd.kraats@hccnet.nl>
Fixes: 33b4eb149e
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31529>
2024-10-18 09:21:22 +00:00
Lionel Landwerlin
0317c44872 anv: add VK_EXT_host_image_copy support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
2024-10-18 07:43:37 +00:00
Lionel Landwerlin
3beb269721 anv: factor out sanitizing mmap offset code
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
2024-10-18 07:43:37 +00:00
Lionel Landwerlin
b202f0f422 anv: add a host map of image for host image copy usage
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
2024-10-18 07:43:37 +00:00
Lionel Landwerlin
6e4d527158 anv: wrap binding address setting
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
2024-10-18 07:43:37 +00:00
Lionel Landwerlin
f33fbb215b anv: disable pat compression for host images
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
2024-10-18 07:43:37 +00:00
Lionel Landwerlin
cb9537a815 anv: drop non host memory types for host-transfer on non-rebar
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
2024-10-18 07:43:36 +00:00
Lionel Landwerlin
1c7d79374f anv: allow subresource queries on non-linear images
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
2024-10-18 07:43:36 +00:00
Lionel Landwerlin
70a8e5b8a9 isl/tests: add range_B_tile test
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24276>
2024-10-18 07:43:36 +00:00
Lionel Landwerlin
bcc820950d isl: fix range_B_tile end_tile_B value
Quoting the documentation :

   "The returned range is a half-open interval where all of the
    addresses within the subimage are < end_tile_B."

This is obviously not true with images smaller than a logical tile.
Currently the code return 1.

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/24276>
2024-10-18 07:43:36 +00:00
Job Noorman
509606e56d nir/lower_subgroups: scan/reduce for multiple ballot components
lower_scan_reduce only worked when ballot_components equals one. This
commit adds support for arbitrary ballot_components.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31587>
2024-10-18 06:57:52 +00:00
Job Noorman
58b199f7ed nir/lower_subgroups: add build_cluster_mask helper
This functionality will become more complex in the next commit so
separate it into a helper function.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31587>
2024-10-18 06:57:52 +00:00
Job Noorman
e0cb4a94a3 nir/lower_subgroups: move up some helper functions
build_subgroup_mask and build_ballot_imm_ishl will be needed by other
functions higher-up the file.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31587>
2024-10-18 06:57:52 +00:00
Mike Blumenkrantz
085e7e419d zink: rewrite the high-IQ image tiling selection loop
this took me almost an hour to properly rewrite and I still
don't know why I wrote it like this in the first place

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31714>
2024-10-18 06:28:55 +00:00
Wang, Kyle
4be4983fc7 amd/vpelib: Add missing copyrights
Missing copyrights added

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: yuankwan <yuankwan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31693>
2024-10-18 05:56:36 +00:00
Chan, Roy
8dc7fbaed3 amd/vpelib: Revise the config sharing handling
[WHY]
- was hardcoded to store 16 configs only
- as the config descriptor usage grows, more is needed
- in bypass case, we also generate a new config which is a waste

[HOW]
- change to use vector to store configs
- don't force new config desc if in bypass
- revise the vector API, reduce the parameter passing

[TESTING]
- Tested with corresponding test cases

Reviewed-by: Brendan Leder <breleder@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Roy Chan <roy.chan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31693>
2024-10-18 05:56:36 +00:00
Leder, Brendan Steve
9751b52a10 amd/vpelib: Update chip headers
Tested with corresponding test cases.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Brendan Leder: <breleder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31693>
2024-10-18 05:56:36 +00:00
Chan, Roy
c252d22e91 amd/vpelib: Fix compilation warnings
Reviewed-by: Navid Assadian <Navid.Assadian@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Roy Chan <roy.chan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31693>
2024-10-18 05:56:36 +00:00
Leder, Brendan Steve
ab9bd6b932 amd/vpelib: Generalize visual confirm handling
Generalize the visual confirm handling through helper function with
minor coding style changes

Reviewed-by: Evan Damphousse <evan.damphousse@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Brendan Leder <breleder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31693>
2024-10-18 05:56:36 +00:00
Leder, Brendan Steve
257658cbca amd/vpelib: Fix backend bug for multiple instances
Fix potential duplicated config if config_writer_complete is called
multiple times

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Evan Damphousse <evan.damphousse@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Brendan Leder <BrendanSteve.Leder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31693>
2024-10-18 05:56:36 +00:00
Hsieh, Mike
b010a2eaf6 amd/vpelib: Refactor 3D LUT code
Refactor 3D LUT code and tested with corresponding test cases

Reviewed-by: Roy Chan <Roy.Chan@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/31693>
2024-10-18 05:56:36 +00:00
Brendan
338dd3b687 amd/vpelib: Fix duplicate config writer bug
[WHY]
Config writer duplicates packets when switching pipes.

[HOW]
Update config writer to only write new packets if new type is required.

[TESTING]
Tested with corresponding test cases.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Brendan Leder <breleder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31693>
2024-10-18 05:56:36 +00:00
Jiali
8fa10461c9 amd/vpelib: Enhance output format capabilities
- Generalize the p2b programming to support chroma viewport if any
- Turn vpe_get_element_size_in_bytes to a global helper function

Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Jiali <jiali.zhao@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31693>
2024-10-18 05:56:36 +00:00
Serdar Kocdemir
10acd37e93 Update decoder.py to use try_unbox on destroy calls
Missing code generator changes for aosp/3272729.

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31728>
2024-10-18 05:29:41 +00:00
Faith Ekstrand
d52a9d832e nvk: Put a sample map in the descriptor for MSAA storage images
This tells us exactly where each sample instead of assuming they're laid
out row-major. NIL_SAMPLE_LAYOUT_4X2_D3D is not row-major.

Fixes: 8f1697b12d ("nil: Use D3D sample modes by default")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31727>
2024-10-18 04:56:26 +00:00
Faith Ekstrand
9724028c15 nil: Add a nil_sample_offset() helper
Fixes: 8f1697b12d ("nil: Use D3D sample modes by default")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31727>
2024-10-18 04:56:26 +00:00
Faith Ekstrand
6e30ab8b16 nvk: Fix host copies for array images
Our offset handling was hitting asserts inside of NIL because we're
passing in offsets and extents with non-trivial array dimensions.

Fixes: 6c5420cd30 ("nvk: Add host copy functions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31727>
2024-10-18 04:56:26 +00:00
Faith Ekstrand
aee0ce980b nak/bindings: Use an enum for IOCTL numbers
This should be more robust against weird bindgen shenanigans because it
forces LLVM to constant-fold and give us an actual thing we can generate
bindings for.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12008
Fixes: cd7128c2e3 ("nak: Add a bare HW shader runner")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31727>
2024-10-18 04:56:26 +00:00
Paulo Zanoni
b88bcacf2b anv/trtt: remove useless VK_RESULT checks
We jump out of the loops whenever result is not VK_SUCCESS, there is
no need to check for it there. I guess I missed this detail in the
most recent rework for this function.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31698>
2024-10-18 04:10:47 +00:00
Paulo Zanoni
da396a49a0 anv/trtt: fix the creation of sparse buffers of size 2^32 on 32bit systems
When the VkBuffer is of size 2^32 (which matches maxBufferSize), we
have vm_bind->size set to 2^32, which is fine because it fits in an
uint64_t. What is not fine is the 'i' variable being size_t, because
on 32bit systems it will loop forever since it will always be smaller
than 2^32.

Credits to Iván for not only reporting it, but also coming up with the
solution at the same time as I did, then testing it.

Cc: mesa-stable
Reported-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31698>
2024-10-18 04:10:47 +00:00
Guilherme Gallo
7bea8ee8bb ci/turnip: Rebalance kingoftown jobs
For each pipeline, we launch 13 jobs for kingoftown, let's decrement it
to match the number of 12 trogdor-kingoftown available in Collabora's
farm atm.

Let's decrement the parallel no., and increment the dEQP fraction for
a618_vk job.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:46 +00:00
Guilherme Gallo
862bfceb70 ci/freedreno: Rebalance limozeen jobs
We have 6 DUTs but we are running a total of 7 jobs per pipeline,
increasing the DUT pending time.

- Job: parallel no.
- 'a618_gl: 2'
- 'a618_egl: 1'
- 'a618_piglit: 1'
- 'zink-tu-a618: 1'

So, reduce the `a618_gl` parallel from 2 to 1 and increase dEQP fraction
from 2 to 5 to reach the 10-min mark.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:46 +00:00
Guilherme Gallo
0e95113a27 ci/panfrost: Increment panfrost-g52-gl parallel no.
We have one spare meson-g12b-a311d-khadas-vim3 DUT, and this job is
taking 14 minutes to run on average and retries are rare, so let's
increment the parallel to reach the 10 min-mark.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:46 +00:00
Guilherme Gallo
024bf6330f ci/amd: Reassign radv-raven-traces from zork to dalboz
With the addition of the radeonsi-raven-cdna-lower-image:x86_64 job,
zork devices are being overutilized.

To balance the load, we're moving the radv-raven-traces job to dalboz,
where one DUT per pipeline remains available.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:46 +00:00
Guilherme Gallo
72659d04e6 ci/amd: Track merge-skips.txt changes
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:46 +00:00
Guilherme Gallo
1dc64d0613 ci: Use merge-skips files during merge pipelines
These skip files contain tests that exceed one minute in execution time,
which are better suited for nightly jobs. This change aims to optimize
execution time and prevent delays in merge pipelines under time
constraints.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:45 +00:00
Guilherme Gallo
9930e46fca ci/radv: Rebalance stoney-vkcts
- Increase the fraction for radv-stoney-vkcts from 15 to 18.
- Same for radv-angle, from 2 to 3

The last one should take around 7 minutes, but this new 3 minute gap can
be filled in by the ~95% DUT availability and eventual infra retries.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:45 +00:00
Guilherme Gallo
6e0325dc5a ci/zink: Add skips for zink-anv-(adl|tgl)
Some tests are taking too long to finish

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31699>
2024-10-18 03:27:45 +00:00
Faith Ekstrand
f49a3e0a68 nvk: Use nvk_queue_submit_simple() for nvk_queue_state_update()
This change has two main advantages.  First is that the previous code
had a subtle bug where state updates would drop the previous state
pushbuf without first guaranteeing that the queue was idle, potentially
leading to a fault.  This worked when I first wrote the code because we
were using the old nouveau UAPI which took a list of BOs on each submit
and the kernel would interanlly reference count them.  With the modern
UAPI, there is no such safety net.

The second effect of this commit is that we're now only submitting the
pushbuf when one of the pointers or ranges actually changes.  This
should hopefully reduce GPU stalling as setting those pointers is a
pretty heavy-weight operation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30596>
2024-10-18 02:58:00 +00:00
Faith Ekstrand
5fa5c5a300 nvk: move nvk_queue_state_update to nvk_queue_submit_exec
The only reason we had it pulled out was because that made more sense
back when we had drm/nouveau baked into our queue code.  With the new
NVKMD interface, there's no point.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30596>
2024-10-18 02:58:00 +00:00
Faith Ekstrand
86a6b894a8 nvk: Only submit the state pushbuf if there are commands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30596>
2024-10-18 02:58:00 +00:00
Faith Ekstrand
296746d4b9 nvk: Only wait on the upload queue if there are commands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30596>
2024-10-18 02:58:00 +00:00
Lionel Landwerlin
608d521086 elk: Don't apply discard_if condition opt if it can change results
Replicates the change from 57344052b6 ("intel/brw: Don't apply
discard_if condition opt if it can change results")

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0ba9497e66 ("intel/fs: Improve discard_if code generation")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31604>
2024-10-18 01:57:58 +00:00
Rob Clark
7e4e46a004 freedreno/a6xx: Add missing GRAS_SU_DEPTH_CNTL
And GRAS_SU_STENCIL_CNTL.. Needed on a750.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
a1f2a8ebb9 freedreno/a6xx: Add VPC hardware workaround for a750
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
ecc8d271e1 freedreno/a6xx: Don't open-code INVALID_REG
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
65df706b21 freedreno/a6xx: Fix color_cache_size
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
3a0b022136 freedreno/a6xx: Add support to load driver-params via UBO
In this case, we can't use CP_LOAD_STATE to push the consts inline in
the cmdstream, but instead need to setup a UBO.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
f193c61c6b freedreno: Rework indirect compute param emit
There are more driver params than what is contained in the indirect
buffer.  So switch things around to always allocate a buffer into which
we copy the indirect params.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
fe1c733798 freedreno/ir3: Fix need_driver_params for UBO case
When we are pushing driver params via driver UBO, which need to check
the driver_params UBO idx.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
97ab362914 freedreno/ir3: Track # of app UBOs
Before the gallium driver can support load_shader_consts_via_preamble it
needs a way to differentiate between # of API level UBOs and the number
of UBOs after the driver inserts ones for driver-params, etc.  This is
because the driver UBOs are emit in a different place from user UBOs.
If we didn't have this distinction, and the app had more UBOs bound than
the shader used, we would otherwise emit some conflicting UBO
descriptors (ie. ones for unused const slots conflicting with the driver
UBO slots).

This also moves the consts_ubo emit into the PROG state.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
94c3c39f21 freedreno/a6xx: Move tess-bo emit
Move this to where the rest of the hs/ds params are emit, because for
a7xx with load_shader_consts_via_preamble we'll need this all to be a
single UBO.  So we won't be able to piecemeal upload consts.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
efb93c9f52 freedreno/a6xx: Fix double SP_MODE_CONTROL emit
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
b877106e75 freedreno/ir3: Indentation fix
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
7e9b948430 freedreno/ir3+tu: Convert driver-params to structs
This at least lets us de-dup the dp setup between the push-const path
and preamble-loads-from-ubo path.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
81d8387dbc freedreno/ir3: Add assert about const emit
If the old (non-ubo) way of const emit isn't supported for the shader
stage, make sure we hit an assert.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
824733c4d7 freedreno/ir3: Avoid draw/grid time input iteration
These don't change at draw time, so need to iterate them each time.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:40 +00:00
Rob Clark
4812bf2758 freedreno/decode: Fix UBO decode on a7xx
And add UBO dumping.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:39 +00:00
Rob Clark
e32237739f freedreno: Assert we aren't writing to 0x0
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:39 +00:00
Rob Clark
fd8eabdd4b freedreno/a6xx: Add some missing a7xx bits
Fixes: ad90bf0500 ("freedreno/a6xx: Initial a7xx support")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31534>
2024-10-18 01:25:39 +00:00
Sid Pranjale
21beb7a6bd nvk: implement VK_EXT_depth_clamp_zero_one
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31488>
2024-10-18 00:56:15 +00:00
Sid Pranjale
aa417da964 vulkan/util: add vk_format_has_float_depth()
A small helper function to check if a format has a floating point depth
value.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31488>
2024-10-18 00:56:15 +00:00
Samuel Pitoiset
0f2363993d radv: fix emitting DB_RENDER_OVERRIDE on GFX12
This register is already set in the GFX12 preamble and it shouldn't
be overwritten.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31690>
2024-10-18 00:28:02 +00:00
Samuel Pitoiset
daefd280e2 radv do not force-disable hierarchical stencil testing
Looks like this was disabled by mistake. RadeonSI relies on the default
value which is "no force" and PAL only sets this to FORCE_DISABLE when
HTILE is completely disabled using settings.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31690>
2024-10-18 00:28:01 +00:00
David Heidelberg
195cb98d30 ci/etnaviv: unify job naming with the rest of the CI
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31724>
2024-10-17 23:49:54 +00:00
Thomas H.P. Andersen
8654a7727f driconf: set vk_zero_vram driconf for X4 Foundations
Fixes artifacts when the game is loading

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29892>
2024-10-17 22:19:33 +00:00
Thomas H.P. Andersen
3abee25f0b driconf: set vk_zero_vram driconf for Path of Exile
Fixes frequent crashes in the loading screen when using vulkan on nvk

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29892>
2024-10-17 22:19:33 +00:00
Thomas H.P. Andersen
ade4512803 nvk: handle driconf for zeroing vram
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29892>
2024-10-17 22:19:33 +00:00
Thomas H.P. Andersen
20fae61d10 dirconf: add a common vk_zero_vram
This adds a vk_zero_vram dri conf.
Vulkan drivers needs this to run several games.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29892>
2024-10-17 22:19:33 +00:00
Julia Zhang
47e74ba175 mesa/st: use drawable->ID as hash for drawable_ht
Using address of drawable as hash table key will cause memory issue in this
situation:

1. drawable A with address addr is destroyed and deleted from the hash table.
2. drawable B with same address addr is created and added to the hash table
right after 1 is done.
3. st_framebuffers_purge will seach the hash table with drawable addr that
associated with each framebuffer. If drawable is not in the hash table, then
free this framebuffer.

So when drawable B is created, then the framebuffer that associated with
drawable A will not be freed in time. This will cause framebuffer memory leak.

Since drawable->ID is unique, this uses drawable-ID as pre-hash to store
drawable in hash table. This also removes key_hash_function because we already
use drawable-ID as pre-hash when insert the data and we need to avoid assert of
_mesa_hash_table_search_pre_hashed fail.

Signed-off-by: Julia Zhang <Julia.Zhang@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31161>
2024-10-17 21:43:32 +00:00
Zack Rusin
05e0554d76 svga: Redo the way generated files are handled
Long time ago svga had a sourceforge project where auto-generated
header files for the SVGA device were hosted. Gallium's svga driver
copied those files and when the sourceforge project became
obsolete they started being updated by hand.

Kernel and igt projects switched to the official way in which the SVGA
header files are generated but Mesa3d wasn't ported at the time.

The official SVGA headers diverged from the official ones creating bugs.
Fix it by porting the SVGA Gallium driver to the auto-generated SVGA
header files.

Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31653>
2024-10-17 21:06:57 +00:00
Iván Briano
8423998d69 hasvk: fix non matching image/view format attachment resolve
Port of 5a7e58a430 ("anv: fix non matching image/view format attachment resolve")
to hasvk.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31696>
2024-10-17 20:24:37 +00:00
Lionel Landwerlin
02294961ee anv: stop using a binding table entry for gl_NumWorkgroups
This will make things easier in situations where we don't want to use
the binding table at all (indirect draws/dispatches).

The mechanism is simple, upload a vec3 either through push constants
(<= Gfx12.0) or through the inline parameter register (>= Gfx12.5).

In the shader, do this :

  if vec.x == 0xffffffff:
     addr = pack64_2x32 vec.y, vec.z
     vec = load_global addr

This works because we limit the maximum number of workgroup size to
0xffff in all dimension :
   maxComputeWorkGroupCount = { 65535, 65535, 65535 },

So we can use the large values to signal the need for indirect
loading.

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/31508>
2024-10-17 19:35:59 +00:00
Lionel Landwerlin
97b17aa0b1 brw/nir: rework inline_data_intel to work with compute
This intrinsic was initially dedicated to mesh/task shaders, but the
mechanism it exposes also exists in the compute shaders on Gfx12.5+.

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/31508>
2024-10-17 19:35:59 +00:00
Lionel Landwerlin
1dc125338e brw: fix mesh fence emission
In SIMD32, the fence instruction is currently going to read grf0-3
leading to such assertions in the backend :

 ../src/intel/compiler/brw_fs_reg_allocate.cpp:206:
   void fs_visitor::calculate_payload_ranges(bool, unsigned int, int*) const:
     Assertion `j < payload_node_count' failed.

The reason we haven't seen the problem yet is that there always enough
payload register to accomodate this. But the following change is going
to make the inline parameter register optional.

Since SHADER_OPCODE_MEMORY_FENCE is emitted in the generator as SIMD1
NoMask (see brw_memory_fence), we can limit ourselves to SIMD1
exec_all() in the IR as well so that the IR accounts for grf0 as a
source.

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/31508>
2024-10-17 19:35:59 +00:00
Lionel Landwerlin
b2c5ca0ade brw: remove rebuild single element special case
No shader-db difference on DG2.

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/31508>
2024-10-17 19:35:59 +00:00
Lionel Landwerlin
19eb601cfc brw: avoid clashing nested loop indices
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/31508>
2024-10-17 19:35:59 +00:00
Lionel Landwerlin
f5d123b977 brw: delay printf lowering
Useful to insert debug traces a bit later in the lowering process (in
particular after load/store vectorization).

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/31508>
2024-10-17 19:35:59 +00:00
Lionel Landwerlin
be3f62af15 brw: remove unused prototype
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/31508>
2024-10-17 19:35:59 +00:00
Faith Ekstrand
4cc9730307 compiler/rust: Fix a bad cast in the memstream abstraction
If you just do ref.cast(), it will cast the thing it's a reference to.
If you want to turn a reference into a pointer, you need to explicitly
use "as".

Fixes: 279f38918f ("nak: memstream: move into common code")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31718>
2024-10-17 18:59:02 +00:00
Faith Ekstrand
212e07a70e compiler/rust: Add a unit test for the memstream abstraction
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31718>
2024-10-17 18:59:02 +00:00
Faith Ekstrand
ec24156b31 compiler/rust: Enable unit tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31718>
2024-10-17 18:59:01 +00:00
Connor Abbott
016ce14ac7 tu: Implement VK_EXT_host_image_copy
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Connor Abbott
e77a2f1cc3 tu: Add a flag for cached non-coherent BOs
We will have to flush/invalidate the memory backing an image in the
driver when copying it to/from the host if it's cached and not coherent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Connor Abbott
7a5a33e0e3 freedreno/fdl: Add tiling/untiling implementation for a6xx/a7xx
This implements copies to/from the standard tiling (aka TILE6_3),
similar to isl_tiled_memcpy for intel.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Connor Abbott
66bdb50736 tu: Gather UBWC config
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Connor Abbott
3df6c19a22 virtio/drm: Update header
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Connor Abbott
927968e266 freedreno: Add default UBWC config values
These values are programmed by the kernel and not determined by the
hardware, but provide a default value that should match what drm/msm
programs for older kernels that can't report it. kgsl has always
supported returning the highest_bank_bit, although it hardcodes some of
the other parameters so we have to follow what it does instead of using
this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Connor Abbott
f67b64ae6c freedreno/fdl: Add UBWC config struct
This will be used for the tiled memcpy implementation, but we add this
part of the API first so that subsequent commits can embed it in turnip
and set it up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Connor Abbott
8a6f051a13 freedreno/a6xx: Remove dead fd6_get_ubwc_blockwidth() call
Unused since a9057d4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Connor Abbott
a266360dff freedreno/fdl: Extend 2bpp UBWC special case to 1bpp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26578>
2024-10-17 18:17:18 +00:00
Zan Dobersek
b44480e86a zink: fix bo_export caching
When creating and caching the bo_export object for a given zink_bo, the
screen file descriptor was used. Since no buffer object's file descriptor
would match that, bo_export objects were continuously added to the exports
list and no bo_export was effectively picked from the cache. Using the
buffer object's file descriptor avoids that.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: b0fe621459 ("zink: add back kms handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31715>
2024-10-17 17:27:20 +00:00
Aleksi Sapon
cfdb653f1c llvmpipe: update traces for aniso filtering fix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31562>
2024-10-17 16:47:22 +00:00
Aleksi Sapon
e7a851e6cf softpipe: Fix anisotropic sampling aliasing bug
"Backport" of the llvmpip fix.

Nearest sampling was being done using coordinates
on texel boundaries, which caused aliasing bugs.
Shift coordinates by half a texel to correct this.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31562>
2024-10-17 16:47:22 +00:00
Aleksi Sapon
5947e3d760 llvmpipe: Fix pmin calculation
Based on the original code from sp_tex_sample.c,
this was supposed to be a comparison with pmax2,
not pmin2.

This mostly seemed to result in anisotropic filtering
turning on to "maximum" at any value of max_aniso > 1.
Most apparent when runing the texfilt test in demos.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31562>
2024-10-17 16:47:22 +00:00
Aleksi Sapon
313115f98b llvmpipe: Fix anisotropic sampling aliasing bug
Nearest sampling was being done using coordinates
on texel boundaries, which caused aliasing bugs.
Shift coordinates by half a texel to correct this.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31562>
2024-10-17 16:47:21 +00:00
Connor Abbott
e9bb906a32 tu: Implement VK_EXT_pipeline_robustness
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31687>
2024-10-17 16:16:05 +00:00
Connor Abbott
c323848b0b ir3, tu: Plumb through support for per-shader robustness
We need to pass through the robust_modes flag to nir_opt_vectorize based
on a flag set when compiling the shader, not globally in the compiler,
for VK_EXT_pipeline_robustness. Refactor the ir3 compiler interface
to add an ir3_shader_nir_options struct that can be passed around to
the appropriate places, and wire it up in turnip to the shader key. The
shader key replaces the old mechanism of hashing in the compiler
options.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31687>
2024-10-17 16:16:05 +00:00
Anil Hiranniah
3d066e5ef1 panfrost: Fix a memory leak in the CSF backend
The geometry BO should be released in csf_cleanup_context().

Fixes: 447075eeee ("panfrost: Add support for the CSF job frontend")
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/31705>
2024-10-17 15:03:44 +00:00
Boris Brezillon
27bde761a7 panvk: Fix the hierarchy_mask selection
Always enable the level covering the whole FB, and disable the finest
levels if we don't have enough to cover everything.

This is suboptimal for small primitives, since it might force primitives
to be walked multiple times even if they don't cover the the tile being
processed. On the other hand, it's hard to guess the draw pattern, so
it's probably good enough 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/31682>
2024-10-17 14:29:57 +00:00
Iago Toral Quiroga
ad111aed29 v3dv: fix leak during device initialization
Fixes: 188f1c6cbe ('v3dv: rewrite device identification')

Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31703>
2024-10-17 13:27:05 +00:00
Juan A. Suarez Romero
e4301621a2 v3d/ci: add OpenCL failures
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31710>
2024-10-17 12:35:33 +00:00
Lionel Landwerlin
ea2bbe3271 anv: use stage mask to deduce cs/pb-stall requirements
When flushing the render target cache for future operations, we need a
stall at pixel scoreboard. We likely didn't see any issue until now
because a change in render target added the pb-stall.

When using a 2 compute shaders with the following pattern :
  vkCmdDispatch()
  vkCmdPipelineBarrier() ImageBarrier with (src|dst)AccessMask=0 & identical layout
  vkCmdDispatch()

we should ensure that the first dispatch is completed before executing
the second one, otherwise they can race to on resource accesses. This
fixes failures in some new CTS tests.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31676>
2024-10-17 11:55:33 +00:00
Georg Lehmann
aabadb30fc aco/print_ir: use parse_depctr_wait
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31132>
2024-10-17 11:16:16 +00:00
Georg Lehmann
ced7a01954 aco/statistics: update branch issue cycles
Foz-DB Navi31:
Totals from 14319 (18.04% of 79395) affected shaders:
Instrs: 20064495 -> 20062876 (-0.01%)
CodeSize: 105334568 -> 105327704 (-0.01%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31132>
2024-10-17 11:16:16 +00:00
Georg Lehmann
ec11cfc69d aco/insert_delay_alu: do not delay lane mask fast forwarding
The delay actually hurts performance in this case.

Foz-DB Navi31:
Totals from 30340 (38.21% of 79395) affected shaders:
Instrs: 30778999 -> 30726605 (-0.17%); split: -0.17%, +0.00%
CodeSize: 162380180 -> 162170808 (-0.13%); split: -0.13%, +0.00%
Latency: 228185562 -> 228186976 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 39001151 -> 39000897 (-0.00%); split: -0.00%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31132>
2024-10-17 11:16:16 +00:00
Georg Lehmann
e4889fd4b5 aco/insert_delay_alu: consider more implicit waits
Foz-DB Navi31:
Totals from 37961 (47.81% of 79395) affected shaders:
Instrs: 34175286 -> 33978599 (-0.58%)
CodeSize: 180059352 -> 179190076 (-0.48%); split: -0.48%, +0.00%
Latency: 259826196 -> 259798474 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 42792700 -> 42789298 (-0.01%); split: -0.01%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31132>
2024-10-17 11:16:16 +00:00
Georg Lehmann
840b5841d3 aco: do not track ALU delay across jumps
This assumes that the best case jump latency is higher than the worst case
ALU latency.

Foz-DB Navi31:
Totals from 17720 (22.32% of 79395) affected shaders:
Instrs: 26009663 -> 25929989 (-0.31%); split: -0.31%, +0.00%
CodeSize: 136571496 -> 136254420 (-0.23%); split: -0.23%, +0.00%
Latency: 215731308 -> 215722059 (-0.00%); split: -0.01%, +0.00%
InvThroughput: 36534197 -> 36532070 (-0.01%); split: -0.01%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31132>
2024-10-17 11:16:16 +00:00
Georg Lehmann
977f435f4c aco/ir: add function to parse depctr waits
No Foz-DB changes on Navi31.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31132>
2024-10-17 11:16:16 +00:00
Mike Blumenkrantz
a061c80629 zink: further improve image usage detection
there was some confusion over exactly where ici->usage should be set,
since the value must be set when doing all the format checks but then
also it was re-set again later to a potentially different value based
on an unchecked return

now get_image_usage() is set_image_usage() with a more consistent policy
around exactly where the usage is set

this code still sucks tho

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31686>
2024-10-17 10:38:28 +00:00
Georg Lehmann
dbf63a0788 nir: remove nir_op_is_derivative
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014>
2024-10-17 09:50:19 +00:00
Georg Lehmann
f9d2aad7a3 nir: remove alu ddx/ddy
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014>
2024-10-17 09:50:19 +00:00
Georg Lehmann
bf0d1a42b4 nir: remove uses_fddx_fddy
Unused and the code didn't even do what the comment said.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014>
2024-10-17 09:50:19 +00:00
Georg Lehmann
cba575f4df nir: always emit ddx intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014>
2024-10-17 09:50:19 +00:00
Georg Lehmann
5205501e2f mesa/prog_to_nir: use derivative builder
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014>
2024-10-17 09:50:19 +00:00
Georg Lehmann
41cce70584 spirv: remove alu fddx/fddy from comment
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014>
2024-10-17 09:50:19 +00:00
Georg Lehmann
403e2393e3 ir3: remove alu fddx/fddy check
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014>
2024-10-17 09:50:19 +00:00
Georg Lehmann
6cb6bc7133 elk: remove alu fddx/fddy check
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014>
2024-10-17 09:50:19 +00:00
Georg Lehmann
1371a8fe2b nir/opt_move_discards_to_top: handle ddx/ddy intrinsics
Fixes: daa97bb41a ("amd: switch to derivative intrinsics")

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31014>
2024-10-17 09:50:19 +00:00
Marek Olšák
948f94b8c5 nir/opt_varyings: pack TCS inputs with cross-invocation access together
Unigine Heaven has a TCS that reads pos.xyz and tescoord.w from all
invocations in every invocation. By putting those two in the same vec4,
AMD hw can reduce the amount of shared memory that is allocated for those
inputs from 2 vec4s to 1 vec4.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31670>
2024-10-17 03:30:07 +00:00
Marek Olšák
8e93907b7c nir/opt_varyings: assign locations of no_varying IO for TCS outputs only
Skip the code for other shader stages because it doesn't do anything there.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31670>
2024-10-17 03:30:07 +00:00
Daniel Almeida
01586bc57e util: u_memstream: add tests
Now we have a few extra methods and things are diverging a bit between
Linux and Windows. Add a few unit tests to make sure this works.

Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30594>
2024-10-17 02:50:21 +00:00
Daniel Almeida
279f38918f nak: memstream: move into common code
Move the memstream code into common code. Other Rust code interfacing
with FILE pointers will find the memstream abstraction useful.

Most notably, pinning is actually enforced this time with PhantomPinned.

Add a .clang-format from a sibling dir (i.e.: compiler/nir) while we're
at it to keep things tidy.

Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30594>
2024-10-17 02:50:21 +00:00
Daniel Almeida
3136d1c8c6 util: memstream: add fflush support
Flush support is needed by the Rust code, which will switch from
its own memstream to u_memstream in a future patch.

Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30594>
2024-10-17 02:50:20 +00:00
Connor Abbott
e6c5dcd295 tu: Expose VK_KHR_dynamic_rendering_local_read
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:45 +00:00
Connor Abbott
a99600322c tu: Track possible feedback loops for dynamic renderpasses
With DRLR, we unfortunately don't get notified about when there are
feedback loops. We also can't detect ahead of time the case where an
input attachment is read before written. This means we need to try and
guess in the driver when that happens based on which input attachments
we read.

There are three main things we have to do with feedback loops:

- Forcing flushing between primitives in sysmem to avoid problems with
  compressed textures before a7xx.
- Forcing late depth test if it's a depth feedback loop.
- Invalidating UCHE because we may read blit results.

The way this is implemented is currently a bit conservative, following
radv. However the impact of the flushing should be mitigated by
switching to GMEM whenever we can, which we already do.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
ef693c5785 tu: Fix flushes for feedback_invalidate case
We also have to wait for the blits to land, and WFI so that everything
finishes before any draws. Noticed when adding the equivalent thing for
dynamic renderpasses.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
cad2ca74d9 tu: Make input attachments always contain a real descriptor
We need this for read-only input attachments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
beb513ad78 tu: Support dynamic input attachments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
d50eef5b06 tu: Support color attachment remapping
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
5a4dff5922 ir3: Fix non-bindless s2en texture/sampler order
In gallium samplers and textures have a 1:1 correspondance, so it was
impossible to tell which is which. But we use non-bindless textures for
subpass loads, which don't have a sampler (so common code lowers to an
index of 0) and therefore the order matters. With dynamic rendering, we
can have more than 16 slots for input attachments, so the s2en wasn't
getting optimized away and suddenly it starts mattering, and it turns
out we got it wrong. By fixing this we also make the order the same as
the bindless order, which was always tested well by Vulkan.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
65c0846537 nir/lower_input_attachments: Handle unscaled input attachments with no index
With VK_KHR_dynamic_rendering_local_read we can have input attachments
with no index, which normally correspond to depth/stencil attachments,
and we have to handle this here when determining whether we need to emit
an unscaled fragcoord for FDM.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
4bd506a7f3 spirv: Make the default input attachment index ~0
This will let us know when an input attachment doesn't have an
InputAttachmentIndex, which used to be illegal but is now allowed and
meaningful with VK_KHR_dynamic_rendering_local_read.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
87d9127136 v3dv: Don't misuse nir_variable::data.index
The code seems to assume that it's supposed to be a base index for the
binding array, but it's not. It's entirely meaningless and happens to be
set to 0 for all descriptor types except for input attachments, which is
the one case where it's already ignored. Delete the dead code so that
when we change it to a "no index" sentinel value v3dv doesn't blow up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
8e153bbd8f vulkan/state: Track the input attachment count
Tilers need to know, at the very least, which input attachments are
"real" input attachments which map to a color or depth/stencil
attachment in tile memory and which are "fake" input attachments that
should be treated as regular textures. To do this we need to know
VkRenderingInputAttachmentIndexInfoKHR::colorAttachmentCount, which
wasn't provided by the state tracking infrastructure. When the
VkRenderingInputAttachmentIndexInfoKHR isn't provided, we don't know it,
though, so we have to record a special UKNOWN value. In that case, the
driver will know thanks to
VUID-VkGraphicsPipelineCreateInfo-renderPass-09652 that all input
attachments are "real" input attachments that map directly to color
attachments if they have an InputAttachmentIndex.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Connor Abbott
82169ec551 vulkan/state: Handle NULL in DS input attachment mapping correctly
NULL and VK_ATTACHMENT_UNUSED have different meanings, and we need to
preserve the difference for drivers that use the input attachment
mapping (i.e. turnip).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31261>
2024-10-17 00:30:44 +00:00
Daniel Stone
938e827c48 ci/deqp: Compress caselists with zstd
The Vulkan caselist is gigantic - over 400MB - and only growing over
time. Luckily zstd gets that down to about 9MB, with absolutely
negligible runtime overhead.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31595>
2024-10-16 22:52:44 +00:00
Daniel Stone
ed8441a339 ci/deqp: Flatten fraction/shard sed into a single pass
Currently, we:
  * copy the case list to a temporary file
  * have sed read it in, decimate for fraction, write it out again
  * have sed read it in, decimate for shard, write it out again

Flatten this out to have a single-pass sed covering both fraction and
shard that reads the source caselist in directly and writes the final
one.

This comes at the cost of an expression that's unreadable even for sed,
but with the Vulkan mustpass over 400MB and growing, it's a good
improvement.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31595>
2024-10-16 22:52:44 +00:00
Daniel Stone
0ec961325b ci: Strip yet more unnecessary things from the rootfs
We don't need to ship a Rust toolchain, drivers from Debian's version of
Mesa, etc. So stop doing it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31595>
2024-10-16 22:52:44 +00:00
Daniel Stone
9295de1396 ci/vk: Strip and optimise validation layers
The validation layers being installed are somehow 206MB in size. Slim
them down to 26 MB by building the dependencies in release mode, and
stripping on install.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31595>
2024-10-16 22:52:44 +00:00
Daniel Stone
e26ea7a00e ci: Remove non-Proton Wine
We previously only had two traces (one for Raven, one for lavapipe)
running via Wine. To support this, the Vulkan container had Debian's
full Wine installation, one from DXVK, and then a third from Proton
which is used by the b2c jobs.

At 600MB each, this was pretty unsustainable. Remove everything but the
Proton ones.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31595>
2024-10-16 22:52:44 +00:00
Daniel Stone
400694c7c6 ci: Disable trace jobs using old Wine
The radv-raven and lavapipe trace jobs were using Wine installed from
Debian. lavapipe had a single post-merge trace running, and raven had
all but one trace disabled due to being flaky.

b2c is using Proton instead, and it makes absolutely no sense to have
two parallel versions of Wine installed. These should be brought back at
some point running on the same version of Wine as the newer b2c jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31595>
2024-10-16 22:52:44 +00:00
Job Noorman
dd6ac7055f ir3: optimize subgroup shuffles using shfl
One quirk of the shfl instruction is that it only works with dynamically
uniform indices. This commit adds a pass to lower shuffles to the
ir3-specific ones using a loop that iterates all distinct indices one by
one. This is based on the blob's sequence.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31501>
2024-10-16 22:05:10 +00:00
Job Noorman
0919d0f694 ir3: add helper to get glsl type for nir_def
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31501>
2024-10-16 22:05:10 +00:00
Job Noorman
575c89a73c ir3: add codegen for shuffle_{xor,up,down}_uniform_ir3
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31501>
2024-10-16 22:05:10 +00:00
Job Noorman
4556b18f51 nir: add shuffle_{xor,up,down}_uniform_ir3 intrinsics
These are like shuffle_{xor,up,down} except they expect a dynamically
uniform index. This is necessary since the ir3 shfl instruction does not
work with a divergent index.

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/31501>
2024-10-16 22:05:10 +00:00
Eric Engestrom
9f58d0b0e7 nvk/ci: document more flakes seen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31691>
2024-10-16 20:40:18 +00:00
Eric Engestrom
6c88251167 zink+radv/ci: document more flakes seen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31691>
2024-10-16 20:40:18 +00:00
Eric Engestrom
f53deeda9d zink+nvk/ci: document more flakes seen
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31691>
2024-10-16 20:40:18 +00:00
Eric Engestrom
078cbfb076 zink+nvk/ci: document regression
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31691>
2024-10-16 20:40:18 +00:00
Eric Engestrom
01285a1da4 ci: drop spec@egl_ext_surface_compression@create from the rest of the expected fails
Fixes: 68aa78a858 ("Uprev Piglit to 7ce69da1199d12ed0ddaa251ed489750523798fb")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31691>
2024-10-16 20:40:18 +00:00
Eric Engestrom
e0c933677e docs: add sha sum for 24.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31689>
2024-10-16 20:31:45 +00:00
Eric Engestrom
cf7f8afecc docs: update calendar for 24.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31689>
2024-10-16 20:31:45 +00:00
Eric Engestrom
d04cc53f55 docs: add release notes for 24.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31689>
2024-10-16 20:31:45 +00:00
Dylan Baker
bf3b1d8ea9 anv: when handling descriptor sets, layout cannot be NULL if dynamic_offets are used
We have no cases where we intentionally pass a NULL layout when dynamic
offsets, and doing so would cause a null dereference. Le't asd an assert
for that.

CID: 1620447
Fixes: f39cd30f4f ("anv: Track all the descriptor sets")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31638>
2024-10-16 19:54:07 +00:00
Dylan Baker
0714fbff8f anv: assert that we don't read off the end color_att array
Coverity notices that we've insured that index index is < MAX_RTS in one
case, but that it must be greater in one case. Since `color_att_count`
is a uint32_t, it can easily exceed MAX_RTS (8), and would thus create
an out-of-bounds read situation. While the type system would allow this,
the actually implementation shouldn't, so an assert should make Coverity
happy and help us check our assumption.

CID: 1620440
Fixes: d2f7b6d5a7 ("anv: implement VK_KHR_dynamic_rendering_local_read")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31640>
2024-10-16 19:09:25 +00:00
Samuel Pitoiset
17dc91709d radv: use radv_normalize_blend_factor() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31688>
2024-10-16 18:24:22 +00:00
Samuel Pitoiset
38e12dd53c radv: optimize breaking batch when CB_TARGET_MASK change
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31688>
2024-10-16 18:24:22 +00:00
Deborah Brouwer
f406595ec7 ci/deqp-runner: implement max-fails
If we get more than 40 unexpected fails/crashes in a merge pipeline,
then stop early to preserve pipeline resources.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31429>
2024-10-16 17:32:53 +00:00
Deborah Brouwer
fd9e0a41dd ci/deqp-runner: uprev from 0.20.0 to 0.20.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31429>
2024-10-16 17:32:53 +00:00
Deborah Brouwer
aa53f73be1 ci/deqp-runner: update instructions for uprevving
Since deqp-runner is already being built in the debian base image for test
jobs, it’s not necessary to build it subsequently in GL and VK debian
test images. Update the image tag instructions for uprevving deqp-runner.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31429>
2024-10-16 17:32:53 +00:00
Deborah Brouwer
6a564d84e2 ci/deqp-runner: print version info
Since deqp-runner is built in several different images, print the
deqp-runner version before running it just to double check that we are
using the expected version.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31429>
2024-10-16 17:32:53 +00:00
Deborah Brouwer
5acdef547e ci/deqp-runner: fix option to build from a commit
Since the 'git clone --branch' option only accepts branch names or tags as
arguments, it’s not currently possible to build deqp-runner directly from
a git commit hash.

Revise the deqp-runner build script so that it can build from a commit
even if it doesn’t have a tag or version number.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31429>
2024-10-16 17:32:53 +00:00
Deborah Brouwer
3e901f7c37 ci: remove obsolete build-hang-detection script
The build-hang-detection script was part of the old parallel-deqp-runner
repository which is now superseded by deqp-runner.

Remove the script because it’s no longer used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31429>
2024-10-16 17:32:53 +00:00
Chia-I Wu
7f4f20c811 panvk: advertise VK_KHR_external_{fence,semaphore}_fd
Remove panvk_GetPhysicalDeviceExternal{Fence,Semaphore}Properties and
let vk_common_GetPhysicalDeviceExternal{Fence,Semaphore}Properties
handle them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31647>
2024-10-16 16:48:09 +00:00
Samuel Pitoiset
fc52c6358c radv: stop recomputing the viewport xform for guarband/viewport
It's already computed when viewports are bound.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31680>
2024-10-16 16:10:12 +00:00
Chia-I Wu
da80d7dc86 panvk: advertise VK_EXT_external_memory_dma_buf
It is already supported.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31649>
2024-10-16 15:19:25 +00:00
Chia-I Wu
a78b7d3c52 panvk: advertise VK_KHR_external_memory_fd
It is already supported.

Also remove an outdated TODO because pan_kmod_bo_import supports
reference counting.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31649>
2024-10-16 15:19:25 +00:00
Chia-I Wu
21f6ec9e8e panvk: remove panvk_GetPhysicalDeviceImageFormatProperties
Let vk_common_GetPhysicalDeviceImageFormatProperties handle it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31649>
2024-10-16 15:19:25 +00:00
Chia-I Wu
95db0250e6 panvk: fill in VkExternalImageFormatProperties
Opaque fds are internally dma-bufs.  We also support both export and
import.  But for dma-bufs, we additonally require the image tiling
allows vkGetImageSubresourceLayout for export and
VkImageDrmFormatModifierExplicitCreateInfoEXT for import.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31649>
2024-10-16 15:19:25 +00:00
Chia-I Wu
75f833ca82 panvk: fill in VkExternalBufferProperties
Opaque fds are internally dma-bufs.  We also support both export and
import.

Fixes: 17b81d1fdc ("panvk: expose KHR_external_memory and KHR_external_memory_capabilities")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31649>
2024-10-16 15:19:25 +00:00
Valentine Burley
50a9d1b987 vulkan/format: Update vk_format_from_pipe_format with additional formats
This has been neglected.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:16 +00:00
Valentine Burley
aa01a8c018 vulkan/format: Properly translate 10-bit and 12-bit formats
Some hardware have native 10-bit and 12-bit formats. In order to be able to support these, we need
to translate these VK_FORMATs to new padded pipe formats instead of regular 16-bit formats.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:16 +00:00
Valentine Burley
af338d2d2e tu: Fix incorrect bpcs value for padded formats
This doesn't make a difference for now as we don't expose any padded formats yet,
but will be needed for VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:15 +00:00
Valentine Burley
c8a8543af7 vulkan: Fix incorrect bpcs value for padded formats
Skip padding channels and only consider valid color channels.
Add and use a common helper for this.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:15 +00:00
Valentine Burley
9eb315ff98 hk: Remap 10 and 12 bit formats to 16 bit formats
Preserves the previous behavior while handling the new formats.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:15 +00:00
Valentine Burley
a33538cb9f nvk: Remap 10 and 12 bit formats to 16 bit formats
Preserves the previous behavior while handling the new formats.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:15 +00:00
Valentine Burley
ab298b9c3a lavapipe: Remap 10 and 12 bit formats to 16 bit formats
Preserves the previous behavior while handling the new formats.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:15 +00:00
Konstantin Seurer
0098f8ef35 radv: Remap 10 and 12 bit formats to 16 bit formats
Preserves the previous behavior while handling the new formats.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:15 +00:00
Valentine Burley
81ebd6ea8d util/format: Add new 12-bit P012 RGB/planar formats
Introduce three 12-bit formats: X4R12_UNORM, X4R12X4G12_UNORM, and X4G12_X4B12X4R12_420_UNORM.
These formats allocate 12 bits for each color channel with 4 bits of padding to align with Vulkan's P012
and related planar formats.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:15 +00:00
Valentine Burley
1134ad8799 util/format: Add new 10-bit P010 RGB/planar formats
Introduce three 10-bit formats: X6R10_UNORM, X6R10X6G10_UNORM, and X6G10_X6B10X6R10_420_UNORM.
These formats allocate 10 bits for each color channel with 6 bits of padding to align with Vulkan's P010
and related planar formats.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
2024-10-16 14:30:15 +00:00
Boris Brezillon
ad13268c72 panvk: Fix the ZStencil descriptor initialization in the preload logic
We're not expected to write stencil/depth if the preload draw is reloading
color attachments.

Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
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/31678>
2024-10-16 13:20:56 +00:00
Boris Brezillon
2806ff022d panvk: Set .is_blit=true when compiling preload shaders
Preload shaders are blit shaders.

Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
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/31678>
2024-10-16 13:20:56 +00:00
Boris Brezillon
9f099ca6e0 pan/util: Discard depth/stencil writes when early fragment test is forced
Writing depth/stencil when update/kill is set to force-early seems to
trip out Valhall GPUs. Since depth/stencil writes are supposed to be
ignored in that case anyway, drop them from shader.

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/31678>
2024-10-16 13:20:56 +00:00
Christian Gmeiner
8dc8fa88ed etnaviv: nir: Switch to derivative intrinsics
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31034>
2024-10-16 12:32:07 +00:00
Christian Gmeiner
5a15b36a64 etnaviv: nir: Enforce stricter swizzle for virtual scalar x register
This change enforces stricter swizzle behavior for the virtual scalar x
register, addressing a regression encountered in piglit's
spec@glsl-1.10@execution@derivatives@glsl-derivs-abs-sign test.
The regression occurred after switching to derivative intrinsics.

CC: mesa-stable
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31034>
2024-10-16 12:32:07 +00:00
Danylo Piliaiev
7b09fc98fb nir/opt_16b_tex_image: Sign extension should matter for texel buffer txf
Texel buffer could be arbitrary large, so the assumption being made in
the following comment is wrong:

 "Zero-extension (u16) and sign-extension (i16) have
  the same behavior here - txf returns 0 if bit 15 is set
  because it's out of bounds and the higher bits don't matter."

Sign extension should matter for GLSL_SAMPLER_DIM_BUF.

This fixes the case of doing texelFetch with u16 offset:

  uniform itextureBuffer s1;
  uint16_t offset = some_ssbo.offset;
  value = texelFetch(s1, offset).x;

If the offset is higher than s16 optimization incorrectly
left it as 16b.

In spirv the above glsl is translated into:

  %22 = OpLoad %ushort %21
  %23 = OpUConvert %uint %22
  %24 = OpBitcast %int %23
  %26 = OpImageFetch %v4int %16 %24

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31664>
2024-10-16 10:10:00 +00:00
Martin Krastev
5f7f33f323 svga/ci: disable vmware farm
Disable farm for DUT maintenance.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
2024-10-16 11:38:48 +03:00
Benjamin Lee
49e9cd5211 panvk: don't dirty preloaded tiles for writeback
Tiles that are only touched by the preload shader don't need to be
written back, because their contents will be the same. The comment
suggests that this was the original intent, and that the value of
clean_fragment_write was just swapped by accident.

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/31652>
2024-10-16 07:00:29 +00:00
Timothy Arceri
aa7c59e02c nir/glsl: set deref cast mode for blocks during function inlining
More cast fixes this time for UBO and SSBO. Which were missing testing
previously.

Fixes: d681cf96fb ("nir/glsl: set deref cast mode during function inlining")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11587

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31668>
2024-10-16 06:25:57 +00:00
Leder, Brendan Steve
bd6f3e30f2 amd/vpelib: Fix output_ctx gamma curve cache bug
[Why]
Reprogramming gamma curve unnecessary and wastes power/time.

[How]
Bool array checked instead of bool inside said array, add index.

[Testing]
Tested with corresponding test cases.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Brendan Leder <breleder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:17 +00:00
Jude Shih
259b44d97b amd/vpelib: Restructure CDC FE/BE
[Why]
CDC has two separate functionalities : backend and frontend.
split them into two for better resource management.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:17 +00:00
Roy Chan
0d7f51724b amd/vpelib: Add documentation
Reviewed-by: Navid Assadian <navid.assadian@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Roy Chan <roy.chan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:17 +00:00
Brendan
5826ef5e44 amd/vpelib: Visual confirm on input
[Why]
The gap pointer should advance if it is used.
Not a functional bug fix but a nice-to-have change.

[How]
Advancing the pointer once the memory is used

Reviewed-by: Jesse Agate <Jesse.Agate@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Brendan <brendanSteve.leder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:17 +00:00
Assadian, Navid
a0d2f074cd amd/vpelib: Add mirror & rotation capability check function for vpe1.1
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:16 +00:00
Brendan
af01d7a181 amd/vpelib: Update configs to be per-pipe specific
[Why]
config settings should be per pipe in concept

[How]
update the framework to store configs per pipe

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Brendan <brendanSteve.leder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:16 +00:00
Assadian, Navid
6a68af7d21 amd/vpelib: Add better rotation and mirror capability check
Add a general rotation and mirror support check support.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:16 +00:00
Evan
3ef8e6a6ae amd/vpelib: Luma AND Color Keyer Full Support
[New]
- Added new vpe_stream params for color keying
- Added new struct in dpp to capture keying params
- Added new capability for color keying
- Added keying support in vpe1.0

[Updated]
- Updated capability check
- Updated Luma and Color Keying functions to better implement the entire feature
- Updated resource to map stream params -> dpp keyer param

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Evan <evan.damphousse@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:16 +00:00
Assadian, Navid
338760d9b5 amd/vpelib: Document public API structures
Doxygen style inline comments are added to the public API functions and
structures.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:16 +00:00
Brendan
ded1a2b3f0 amd/vpelib: Multiple instance support in caching framework
Generalize the caching to work with multiple instances of objects.
Change some static functions to public functions to maximize function
re-use possibilities.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Brendan <brendanSteve.leder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:16 +00:00
Evan
7a293a812a amd/vpelib: Color Keyer Implementation
[New] - New color keyer function. Take input from VPE_STREAM and FORMAT, program - Added color keyer call in Front end - Hard code Alpha Keyer Range to be entire range - Added vpe_is_yuv() to determine if input format is any YUV format. Combines existing functions - Set Per-pixel Alpha in vpelib when stream.enable_luma_key=1

[Updated]
- Updated the macros to include the luma_key field
- Updated vpe10 and resource calls to have mathching function calls
- removed unused data structure for keying mode since hard code keyer mode to 0x3 in real world
- Updated Luma Key enum to properly represent reg spec

[Removed]
- Removed unused alpha keyer struct. Opted to take in directly from stream_ctx

Reviewed-by: Brendan Steve Leder <brendanSteve.leder@amd.com>
Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com>
Signed-off-by: Evan <evan.damphousse@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31605>
2024-10-16 02:30:16 +00:00
Marek Olšák
2272db2ac6 radeonsi: set the valid buffer range for bindless image buffers
This was missing.

Cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31651>
2024-10-16 00:27:56 +00:00
Marek Olšák
88f057eb53 gallium/u_threaded: fix crash in tc_create_image_handle due to resource == NULL
Fixes: 3df9d8ed80 - gallium/u_threaded: implement pipelined partial buffer uploads using CPU storage
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12020

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31651>
2024-10-16 00:27:56 +00:00
Paulo Zanoni
4d60f905b3 anv/trtt: extract anv_trtt_first_bind_init_queue()
The code that initializes each queue got big enough that the
repetitive error handling is getting ugly and it could benefit from
being on its own function.

v2: Rebase, try to improve the comments.

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
8280a6fee9 anv/trtt: convert anv_trtt_bind arrays to util_dynarray
Since the L2 bug fix we've been overestimating l3l2_binds by a lot in
most of the cases: almost every single call to anv_sparse_bind_trtt
ends up using either 0 or 1 elements for l3l2_binds, with occasionally
something using 512 or more. By switching to util_dynarray we can
guarantee the best of every case:
  - l1_binds will remain a stack array for the vast majority of the
    calls
      - even more than before, since STACK_ARRAY was limited to 8
        elements and now we do 32
  - l1 will be properly dimensioned without the need for reallocs
  - l3l2_binds will be completely empty most of the times and only
    trigger allocations when necessary

Here's the top 10 most common results of anv_sparse_bind_trtt() for a
trace of Assassin's Creed: Valhalla. The first column is how many
times we had that case while running the trace. After this patch, all
these cases will proceed without any memory allocations.

    168 trtt_binds: num_vm_binds:04 l3l2:0000 l1:0004
    344 trtt_binds: num_vm_binds:01 l3l2:0000 l1:0004
    420 trtt_binds: num_vm_binds:01 l3l2:0000 l1:0012
    422 trtt_binds: num_vm_binds:04 l3l2:0000 l1:0008
    479 trtt_binds: num_vm_binds:01 l3l2:0000 l1:0024
    560 trtt_binds: num_vm_binds:03 l3l2:0000 l1:0003
   1005 trtt_binds: num_vm_binds:01 l3l2:0000 l1:0002
   1024 trtt_binds: num_vm_binds:02 l3l2:0000 l1:0004
   2145 trtt_binds: num_vm_binds:02 l3l2:0000 l1:0002
   3735 trtt_binds: num_vm_binds:01 l3l2:0000 l1:0001

Only 70 out of total 11340 calls to anv_sparse_bind_trtt() contained
l3l2 elements.

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
5839b9d083 anv/trtt: remove TODO comment regarding the reloc list
We use 2MB page table BOs, as defined by ANV_TRTT_PAGE_TABLE_BO_SIZE.
Each BO is enough to hold 512 pages, since each one has 4096 bytes.
Each L1 page can fit 1024 entries of 64kb size, which means our 512
pages should be able to fit a little less than 32gb of sparse resource
memory, since we also need some L2 pages and an L3 page. I don't see
any real world application using more than a single BO.

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
e047365d76 anv/trtt: delay batch garbage collection
Move it past the (n_l3l2_binds == 0 && n_l1_binds == 0) check so we
don't end up trying to do garbage collection more often than we submit
batches.

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
acb759c44f anv/trtt: decrement trtt->timeline_val when submission fails
Otherwise code such as anv_sparse_trtt_garbage_collect_batches() may
end up stuck waiting forever on a timeline of a submission that
failed.

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
0802bbd486 anv/trtt: don't submit empty batches when there are no binds to do
The application can submit bind operations where it simply resets
state that is already in our page tables, so there's nothing to do.
Before commit 7da5b1caef ("anv: move trtt submissions over to the
anv_async_submit") we would simply return and not submit any batches
when this happened, but the commit reorganized things in a way where
we started submitting empty batches instead.

Fix this by simply jumping out when we detect this case. Because of
this, rename the "error" labels to "out" as they can now happen on a
happy case.

It should be noted that an alternative to this implementation would be
to move all the handling of 'submit' to after the n_lX_binds check,
but this would put all the initialization inside the trtt->mutex,
creating extra contention even when we have stuff to bind. Since the
"there's nothing to bind" check is now rare (after we stopped doing
NULL binds during resource creation), it is probably better to reduce
lock contention in the common case at the expense of a little more CPU
in the rare case.

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
aea9ac47d2 anv/trtt: fix error handling when adding binds
We're missing a check for 'result' in the middle of a loop and we have
an unnecessary check for 'result' after the loop.

Fixes: 7da5b1caef ("anv: move trtt submissions over to the anv_async_submit")
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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
fd43c4a973 anv/trtt: unset trtt->l3_addr if initialization fails
There is a lot that can go wrong during initialization after we assign
trtt->l3_addr, and we use its value to check if trtt is initialized.
If an initialization fails after l3_addr is already assigned, the next
bind will attempt to use the leftover values from the failed
initialization attempt and will likely cause all sorts of random
errors. So when we fail, just set l3_addr back to 0, causing the next
bind to attempt to initialize everything again.

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
c832ed6bd2 anv/trtt: ensure all L3 entries are NULL-bound during init
Since everything is always NULL-bound at init and we always bind
things back to NULL in anv_free_sparse_bindings(), this means we don't
need to do NULL bindings during anv_init_sparse_bindings(), saving us
a bunch of time, espcially since we don't track L1 entries so we may
end up submitting TR-TT batches just to write zeroes on top of zeroes.

v2: Don't unnecessarily check for uses_relocs (Lionel).

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
3845d0d393 anv/trtt: inline anv_trtt_init_queues_state()
- There's only one caller.
- The caller is rather small.
- We want to introduce initialization code that's not exactly queue
  state and reuse the 'submit'.

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
6af1d1ae7f anv/trtt: extract anv_trtt_first_bind_init()
In the next commits we're going to move this out of
anv_sparse_bind_trtt() and we're also going to add more code to it.

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/30953>
2024-10-15 23:05:31 +00:00
Paulo Zanoni
4c366ef67b anv/trtt: set every entry to NULL when we create an L2 table
When we create sparse resources the first thing we do is a NULL bind
on them, as the Vulkan spec mandates certain behavior even for unbound
sparse resources. We do this with the minimal effort possible: if we
can get away with marking an L2 pointer as NULL in the L3 table, we
just do it and return, instead of going all the way to creating L1
tables and marking all the final entries as NULL.

The strategy we were using had a bug that could lead to previously
created NULL entries not being marked as NULL anymore. Let's give an
example:

 (before proceeding, keep in mind that a NULL entry in the L3 and L2
  tables has bit 1 set, it does *not* have the value 0)

 - Create a 64mb buffer that uses an entire L1 table (needs to be
   properly aligned), which triggers a NULL bind.
     - Our algorithm will just set the L3 entry (pointing to the L2
       table) as NULL.
 - Create a 64kb buffer that uses the same L2 table (but a different
   L1 table).
     - The NULL bind triggered won't do anything as the L2 table is
       already NULL.
 - Bind the first buffer to actual memory. This will end up creating
   the L2 table and the L1 table. The only entry we will set in the L2
   table will be the one pointing to the L1 table. All the other
   values will be 0 (so they won't have neither the NULL or Invalid
   bits set: access to them will lead to page faults).
 - Try to use the second buffer, which is still unbound. It was
   relying on the fact that its L2 table pointer was NULL, but now
   it's not anymore, so the page walker will fetch the L1 entries in
   the L2 table and they will all be zero instead of having the NULL
   bit set.

The fix is pretty simple: whenever we create a new L2 table, set every
entry to NULL (except the one we're about to set to non-NULL). This
preserves behavior for every other NULL resource relying on the L3
entry being set to NULL.

We don't need to do this for the L1 table because its entries are
different and instead of having bits to signal NULL entries we have
a special TR-TT register that we can set that gets compared to check
if an entry is NULL, and we conveniently program it to 0: see
ANV_TRTT_L1_NULL_TILE_VAL.

I am not aware of any real workloads that are triggering this
behavior, I found this issue while investigating something else,
running a custom sparse program in our pre-silicon environment, and it
told us about the page faults.

Cc: mesa-stable
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/30953>
2024-10-15 23:05:30 +00:00
M Henning
537ada2308 nak: Phi coalescing via biased register coloring
Reduces code size by -29.08% on shaderdb + nvk-fossils-foss

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31498>
2024-10-15 22:29:11 +00:00
Dylan Baker
38f7ae5288 release: push 24.3 out two weeks
I've had a couple of requests to push the release out 1-2 weeks. There
have been various reasons for this, but the best one (IMHO) is that this
is the week directly after XDC, and many people will be jetlagged and/or
suffering from the post-XDC flu.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31637>
2024-10-15 14:59:50 -07:00
Karol Herbst
ff2c4e8f11 zink: add CL CTS result
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31614>
2024-10-15 21:07:07 +00:00
Juston Li
0c9ee0f2b9 android: look for debug/vendor prefixed options
Properties from the vendor partition must use a "vendor." prefix from
Android T+. Meanwhile the "debug." prefix can be used for local
overrides.

The order of precedence thus becomes:
1. getenv
2. debug.mesa.*
3. vendor.mesa.*
4. mesa.* (as a fallback for older versions)

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31584>
2024-10-15 20:22:17 +00:00
Kenneth Graunke
4cb67cb07a intel/brw: Use whole 512-bit registers in constant combining on Xe2
Xe2 increased the register size from 256-bits to 512-bits.  So we can
store 32 16-bit values in a register, rather than 16 values.  Prior to
this patch, we hadn't updated the pass, so the second half of each of
our registers was unused.

Backport-to: 24.2
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499>
2024-10-15 18:14:37 +00:00
Kenneth Graunke
d9e5022650 intel/brw: Delete more Gfx8 code from brw_fs_combine_constants
These platforms are supported by elk, not brw.

Backport-to: 24.2
Reviewed-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/31499>
2024-10-15 18:14:37 +00:00
Kenneth Graunke
dea61b7399 intel/brw: Fix register and builder size in emit_barrier() for Xe2
We were manually allocating 1 REG_SIZE for the barrier payload, which is
only half a register on Xe2.  This should eventually get allocated to a
whole register anyway, but it's awkward in the meantime.  Also, we were
zero-initializing the header using group(8, 0) which only initialized
half the register.  The rest of the fields are Reserved MBZ, so they're
likely unused and unread anyway - but it's better to zero-initialize
them so we don't get random undefined, miserable-to-debug behavior.

Backport-to: 24.2
Reviewed-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/31499>
2024-10-15 18:14:37 +00:00
Kenneth Graunke
7c9eb8b289 intel/brw: Make a ubld temporary in emit_barrier()
Saves typing .exec_all() in a lot of places.

Backport-to: 24.2
Reviewed-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/31499>
2024-10-15 18:14:37 +00:00
Kenneth Graunke
a9d9488788 intel/brw: Delete Gfx7-8 code from emit_barrier()
Those are supported by elk, not brw.

Backport-to: 24.2
Reviewed-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/31499>
2024-10-15 18:14:37 +00:00
Kenneth Graunke
c747c1e1f4 intel/brw: Fix spill/fill count for load/store_scratch in SIMD32
Honestly, I don't know what I was thinking - we are emitting a single
spill/fill message here, but were counting it as 2 spill/fills in SIMD32
shaders.  So our eventual shader stat reporting would subtract the
number of spills and fills from send_count, and get a negative number,
wrapping around to just shy of UINT32_MAX.  That's way too many sends.

This is especially noticable on Xe2 which often uses SIMD32 shaders.

Backport-to: 24.2
Reviewed-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/31499>
2024-10-15 18:14:37 +00:00
Pavel Ondračka
58d6906f8c r300/ci: update ci expectations after piglit uprev
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31663>
2024-10-15 17:43:00 +00:00
Faith Ekstrand
03a393d6ca nak: Handle annotations in legalization
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31665>
2024-10-15 17:13:27 +00:00
Faith Ekstrand
36d9d11882 nak: Remove annotations before calc_instr_deps()
Otherwise the annotations might throw off latency information which
needs exact instruction counts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31665>
2024-10-15 17:13:27 +00:00
Aleksi Sapon
9e769a0620 lavapipe: enable alpha-to-coverage dithering
This is a common feature on hardware, both Nvidia
and Apple GPUs have it always enabled.

On OpenGL this can be controlled using
NV_alpha_to_coverage_dither_control, but as far
as I can tell there is no extension on Vulkan.
Metal also has this feature without a control.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31373>
2024-10-15 16:17:40 +00:00
Aleksi Sapon
ad4635d6ef llvmpipe: implement alpha-to-coverage dithering
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31373>
2024-10-15 16:17:40 +00:00
Danylo Piliaiev
6d6d5b869c freedreno/cffdec: Add option to dump bindless descriptors
cffdump --bindless would dump bindless descriptors. We don't know
what exactly is in the descriptors, so we dump all interpretations
for each of them.

Example:
    set[1]:
    UBO[0]:
        { BASE_LO = 0x23806420 }
        { BASE_HI = 0xc | SIZE = 0x2 }
    STORAGE/TEXEL/IMAGE[0]:
        { TILE_MODE = TILE6_LINEAR | SWIZ_X = A6XX_TEX_Z | SWIZ_Y = A6XX_TEX_X | SWIZ_Z = A6XX_TEX_Y | SWIZ_W = A6XX_TEX_W | MIPLVLS = 0 | SAMPLES = MSAA_ONE | FMT = FMT6_R8_G8B8_2PLANE_420_UNORM | SWAP = WZYX }
        { WIDTH = 12 | HEIGHT = 8 }
        { STRUCTSIZETEXELS = 1024 | STARTOFFSETTEXELS = 0 | PITCHALIGN = 1 | PITCH = 128 | TYPE = A6XX_TEX_2D }
        { ARRAY_PITCH = 4096 | MIN_LAYERSZ = 0 }
        { BASE_LO = 0xa5000 }
        { BASE_HI = 0x1 | DEPTH = 1 }
        { MIN_LOD_CLAMP = 0.000000 | PLANE_PITCH = 128 }
        { FLAG_LO = 0xa6000 }
        { FLAG_HI = 0x1 }
        { FLAG_BUFFER_ARRAY_PITCH = 327680 | 0xa0000 }
        { FLAG_BUFFER_PITCH = 64 | FLAG_BUFFER_LOGW = 0 | FLAG_BUFFER_LOGH = 0 }
        { 11 = 0 }
        { 12 = 0 }
        { 13 = 0 }
        { 14 = 0 }
        { 15 = 0 }
    SAMPLER[0]:
        { XY_MAG = A6XX_TEX_NEAREST | XY_MIN = A6XX_TEX_NEAREST | WRAP_S = A6XX_TEX_CLAMP_TO_EDGE | WRAP_T = A6XX_TEX_MIRROR_CLAMP | WRAP_R = A6XX_TEX_MIRROR_CLAMP | ANISO = A6XX_TEX_ANISO_2 | LOD_BIAS = 4.437500 }
        { COMPARE_FUNC = FUNC_GEQUAL | MAX_LOD = 4.000000 | MIN_LOD = 0.000000 }
        { REDUCTION_MODE = A6XX_REDUCTION_MODE_MIN | BCOLOR = 0x400080 }
        { 3 = 0x1 }

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31632>
2024-10-15 15:35:39 +00:00
Danylo Piliaiev
e2e9dd4f21 freedreno/rnndec: Consider array length when finding by reg name
Otherwise we get a valid reg base for reg array with OOB index.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31632>
2024-10-15 15:35:39 +00:00
Deborah Brouwer
0007077c11 ci: remove xfail program@build@include-directories
Now that build-piglit.sh is no longer removing ‘include_test.h’
this test `program@build@include-directories` is passing which is causing
jobs to fail due to this unexpected improvement. Remove this test from
expected fails so that the jobs can pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31379>
2024-10-15 15:50:47 +01:00
Collabora's Gfx CI Team
68aa78a858 Uprev Piglit to 7ce69da1199d12ed0ddaa251ed489750523798fb
e9ab30aeae...7ce69da119

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31379>
2024-10-15 15:50:47 +01:00
Mike Blumenkrantz
4ac4004816 llvmpipe: expose GL multiview extensions
this is a no-op since lavapipe is already doing it

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31590>
2024-10-15 14:01:42 +00:00
Mike Blumenkrantz
f5bd39e0e3 gallium: delete duplicated viewmask member in draw info
this was added for lavapipe, but it should have been in the
framebuffer state since it is a framebuffer state

now the GL multiview extensions are supported with viewmask
in the framebuffer struct, which means this is all redundant
and should be corrected/deleted

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31590>
2024-10-15 14:01:42 +00:00
Mike Blumenkrantz
8487ecfa44 iris: assert that viewmask is 0
this is not supported by the driver, so it doesn't need to
be checked at runtime

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31590>
2024-10-15 14:01:42 +00:00
Mike Blumenkrantz
a82d8e638d util/framebuffer: add viewmask compare for fb equal
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31590>
2024-10-15 14:01:42 +00:00
Boris Brezillon
e113ce0d87 panvk/csf: Fix the clear-only RUN_FRAGMENT case
Issuing a RUN_FRAGMENT with no tiler descriptor is a valid use case
when one just needs to clear attachments. Make sure we take that case
into account in issue_fragment_jobs().

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/31625>
2024-10-15 13:16:07 +00:00
Boris Brezillon
e9462e77d8 panvk: Advertise dynamic rendering support
This was already supported, but not yet exposed.

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/31625>
2024-10-15 13:16:07 +00:00
Boris Brezillon
66543a111c panvk/csf: Fix a buffer/stack-overflow when PANVK_DEBUG=sync
We're not allocating enough qsubmit slots when force_sync=true in
panvk_queue_submit().

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/31625>
2024-10-15 13:16:07 +00:00
Boris Brezillon
195fd67910 panvk/csf: Fix cmd_emit_dcd() in the FB preload logic
We need to mask the bound_attachments value with
MESA_VK_RP_ATTACHMENT_ANY_COLOR_BITS otherwise we're passing
depth/stencil attachments masks too.

Fixes: 0bc3502ca3 ("panvk: Implement a custom FB preload logic")
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/31625>
2024-10-15 13:16:07 +00:00
Boris Brezillon
4199212ebe panvk/csf: Fix dirty checking in prepare_ds()
If the fragment shader changed, we need to re-emit the depth-stencil
descriptor.

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/31625>
2024-10-15 13:16:07 +00:00
Boris Brezillon
1096adb128 panvk/csf: Fix no-fragment IDVS
Fragment shader program/resource table are only set when the shader or
descriptor table is updated. But if the first RUN_IDVS happening on
the command buffer doesn't require fragment shading, those registers
won't be updated, and we might inherit values set by a previous command
buffer executed on the same queue, leading to GPU faults if these
descriptor buffers have been recycled.

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/31625>
2024-10-15 13:16:07 +00:00
Boris Brezillon
ce1562e9cc panvk: Make panvk_pool_free_mem() error proof
It's pretty easy to pass the wrong pool to panvk_pool_free_mem()
(was the case in panvk_shader_destroy() and
panvk_internal_shader_destroy()), so let's make the existing interface
more robust to this kind of mistake by storing the 'owned-by-pool'
information at the panvk_priv_mem level. We use the lower 3 bits of the
BO pointer for that, since a BO object is guaranteed to be aligned on
8-byte.

Fixes: ce14681ebf ("panvk: Don't leak vertex shader program descriptors")
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/31625>
2024-10-15 13:16:07 +00:00
Georg Lehmann
40c4ec881d radv: call nir_opt_remove_phis in radv_optimize_nir_algebraic
Foz-DB Navi31:
Totals from 3048 (3.84% of 79395) affected shaders:
Instrs: 603535 -> 599281 (-0.70%); split: -0.74%, +0.03%
CodeSize: 3074416 -> 3056236 (-0.59%); split: -0.60%, +0.01%
Latency: 2851382 -> 2849808 (-0.06%); split: -0.07%, +0.01%
InvThroughput: 294247 -> 294201 (-0.02%); split: -0.02%, +0.01%
SClause: 18077 -> 18083 (+0.03%); split: -0.03%, +0.07%
Copies: 63860 -> 59926 (-6.16%); split: -6.33%, +0.17%
Branches: 15901 -> 15899 (-0.01%)
PreSGPRs: 62441 -> 61353 (-1.74%)
VALU: 291049 -> 291035 (-0.00%); split: -0.01%, +0.00%
SALU: 96786 -> 92606 (-4.32%); split: -4.42%, +0.10%

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31360>
2024-10-15 10:01:43 +00:00
Pavel Ondračka
f94087be2c r300/compiler: reformat using default mesa .clang-format rules
Most notably switch from tabs to 3 spaces.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Acked-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23771>
2024-10-15 09:24:02 +00:00
Pavel Ondračka
4a6abbc9c1 r300: opt in to clang-format CI enforcement for the compiler
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Acked-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23771>
2024-10-15 09:24:02 +00:00
Pavel Ondračka
4e4b124fa9 r300: add .clang-format file for the compiler
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Acked-by: :Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23771>
2024-10-15 09:24:02 +00:00
Mary Guillemard
b12c294e7b panvk: Define primitive size for RUN_TILER/RUN_IDVS
We were ignoring line width with line topologies.

This also force a value of 1.0f in case point topology is in use while
no write in shader is being performed to respect maintenance5
requirements.

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/31623>
2024-10-15 08:50:19 +00:00
Iago Toral Quiroga
188f1c6cbe v3dv: rewrite device identification
Instead of trying to match device compatible strings like 'brcm,2712-v3d',
which may change with product revisions, match the device name, like 'v3d'.
This simplifies a bit the matching logic and allows us to have less
diverging paths for hardware and simulator.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31619>
2024-10-15 07:57:51 +00:00
Iago Toral Quiroga
23432921b3 v3dv: drop device_id field
This was added only to report the DRM device ID of the actual
GPU used in the simulated environment but there is no real
reason we need to do that, so let's juts keep it simple and
provide the device ID of the simulated device instead.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31619>
2024-10-15 07:57:51 +00:00
Tapani Pälli
a3c03b6a96 mesa: fix DXT1 support with EXT_texture_compression_dxt1
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11987
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31540>
2024-10-15 07:19:55 +00:00
Utku Iseri
271fdedc5a st/mesa: clamp reported max lod bias
mesa clamps lod bias values to -32,31 during quantization,
so the reported max value should also be limited to 31.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11977
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31525>
2024-10-15 06:38:48 +00:00
Marek Olšák
0727634443 nir/opt_load_store_vectorize: vectorize load_smem_amd
radeonsi+ACO with the new vectorization callback:

TOTALS FROM AFFECTED SHADERS (19508/58918)
  VGPRs: 708672 -> 708864 (0.03 %)
  Code Size: 31458688 -> 31217160 (-0.77 %) bytes
  Max Waves: 305960 -> 305952 (-0.00 %)

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
a44e5cfccf nir/opt_load_store_vectorize: allow a 4-byte hole between 2 loads
If there is a 4-byte hole between 2 loads, drivers can now optionally
vectorize the loads by including the hole between them, e.g.:
    4B load + 4B hole + 8B load --> 16B load

All vectorize callbacks already reject all holes, but AMD will want to
allow it.

radeonsi+ACO with the new vectorization callback:

TOTALS FROM AFFECTED SHADERS (25248/58918)
  VGPRs: 871116 -> 871872 (0.09 %)
  Spilled SGPRs: 397 -> 407 (2.52 %)
  Code Size: 43074536 -> 42496352 (-1.34 %) bytes

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
80c156422d nir/opt_load_store_vectorize: allow overfetching, merge overfetched loads
New load merging transformations (first, second), examples:
    (vec4, vec3) ==> vec8(read=0x7f) (because NIR doesn't have vec7)
    (vec1, vec8(read=0x7f)) ==> vec8(read=0xff)
    - the unused component at the end of vec8 is dropped

Not merged:
    vec8(read=0xfe) + vec1
    - unused components at the beginning are kept

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
65ace5649b nir: reject unsupported component counts from all vectorize callbacks
If you allow an unsupported component count in the callback for loads,
nir_opt_load_store_vectorize will align num_components to the next supported
vector size, essentially overfetching.

This changes all callbacks to reject it. AMD will enable it in a later commit.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
02923e237d nir: add hole_size parameter into the vectorize callback
It will be used to allow merging loads with a hole between them.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Marek Olšák
8ce43b7765 nir/opt_load_store_vectorize: add entry::num_components
We will represent vec6..vec7, vec9..vec15 loads with 8 and 16
components respectively, so we need to track how many components
we really use.

This is a prerequisite for optimal merging up to vec16. Example:
    Step 1: vec4 + vec3 ==> vec7as8 (last component unused)
    Step 2: vec1 + vec7as8 ==> vec8 (last unused component dropped)

Without using the number of components read, the same example would end up
doing:
    Step 1: vec4 + vec3 ==> vec8
    Step 2: vec1 + vec8 ==> vec9 (fail)

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Alyssa Rosenzweig
e9303c0952 nir: extract round component helper
another nir pass will use this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29398>
2024-10-15 05:50:24 +00:00
Faith Ekstrand
c2684968de nvk: Advertise 64-bit atomics on buffer views
We also add an nvk_format_supports_atomics() helper.  This helper lives
in NVK for now because it's not just about the format and hardware but
also about whether or not we have compiler support in NAK.

Fixes: 1d10de539c ("nvk: Implement VK_EXT_shader_image_atomic_int64")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31633>
2024-10-15 05:21:03 +00:00
Faith Ekstrand
d3d8271620 nvk: Re-sort the features table
There were a couple of KHR extensions that got mixed in with the EXTs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31633>
2024-10-15 05:21:03 +00:00
Faith Ekstrand
681f807747 nvk: Only set texture/sampler tables and SLM for enabled engines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31633>
2024-10-15 05:21:02 +00:00
Faith Ekstrand
7ae2cc7f0a nvk: Add an nvkmd_engines bitfield to nvk_queue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31633>
2024-10-15 05:21:02 +00:00
Serdar Kocdemir
1efbfd370b gfxstream: Use KHR version of the line_rasterization extension
Vulkan headers are exposing KHR version of the extension. Without this
change, codegen won't generate the necessary guest code, and the calls
with the extension structures will be skipped, causing dEQP failures.

Test: dEQP-VK.api.info.vulkan1p2_limits_validation*

Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31650>
2024-10-15 04:49:06 +00:00
Marek Olšák
64c4d29e65 nir/opt_vectorize_io: fix stack buffer overflow with 16-bit output stores
uncovered by unrelated work

Fixes: 2514999c9c - nir: add nir_opt_vectorize_io, vectorizing lowered IO

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31644>
2024-10-15 03:59:17 +00:00
Timothy Arceri
46facf9037 nir/glsl: set cast mode for image during function inlining
Fixes: d681cf96fb ("nir/glsl: set deref cast mode during function inlining")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11980

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31554>
2024-10-15 03:13:24 +00:00
Chia-I Wu
b0a378374b panvk: advertise VK_EXT_physical_device_drm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31635>
2024-10-15 00:34:04 +00:00
Chia-I Wu
fbea9ab3b8 panvk: query device ids of drm device nodes
They are needed for VK_EXT_physical_device_drm.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31635>
2024-10-15 00:34:04 +00:00
Chia-I Wu
6df3a0af4b panvk: refactor panthor_kmod_dev creation
Move pan_kmod_dev creation code to create_kmod_dev.  It also fixes
double close of render fd on errors, if the render fd ownership has been
transferred to pan_kmod_dev.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31635>
2024-10-15 00:34:04 +00:00
Chia-I Wu
620a2f17d0 panvk: remove unused panvk_physical_device::master_fd
panvk does not and could not support VK_KHR_display.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31635>
2024-10-15 00:34:04 +00:00
José Roberto de Souza
ab12e01af6 intel/perf: Add BMG OA support
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/30982>
2024-10-14 23:54:04 +00:00
José Roberto de Souza
aa2f9b72b2 intel/perf: Sync oa-lnl.xml
IGT have sync the oa-lnl.xml with latest OA definitions.

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/30982>
2024-10-14 23:54:04 +00:00
Alessandro Astone
2c79e01259 panvk: Add missing headers to android platform
Fixes: 2de95773b9 ("panvk: Kill panvk_private.h")

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31610>
2024-10-14 23:09:03 +00:00
David Heidelberg
321012b95d osmesa: Fix OSMesaGetDepthBuffer() test without depth
Correct copy-paste typo of depth_cpp instead of depth and use nullptr
instead of NULL, as GTest suggest in documentation:

When comparing a pointer to NULL, use EXPECT_EQ(ptr, nullptr) instead of EXPECT_EQ(ptr, NULL).

Fixes: ef9362acb8 ("gallium/osmesa: Return cleanly for OSMesaGetDepthBuffer() with no depth.")
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31606>
2024-10-14 22:10:55 +00:00
Konstantin Seurer
70a1453537 nir/print: Fix the alignment of 8-bit definitions
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31612>
2024-10-14 21:21:04 +00:00
Jordan Justen
0530d4d59d intel/dev: Add 0xb640 ARL PCI id
Backport-to: 24.2
Ref: 35667a0330
Ref: bspec 55420
Signed-off-by: Jordan Justen <jordan.l.justen@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/31618>
2024-10-14 19:43:35 +00:00
Sergi Blanch Torne
e8e8c17a0c Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 98f2a55eda.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31620>
2024-10-14 19:02:59 +00:00
Erik Faye-Lund
620739ebc4 panvk: expose KHR_external_fence and KHR_external_fence_capabilities
These seems to already be implemented, let's expose them!

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
17b81d1fdc panvk: expose KHR_external_memory and KHR_external_memory_capabilities
Seems to be implemented already, let's expose them!

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
f18bab24eb panvk: expose KHR_external_semaphore and KHR_external_semaphore_capabilities
These seem to already be implemented, so let's expose them.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
76172b8ebd docs/features: fix bad sorting of drivers
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
c144e065a7 panvk: expose KHR_bind_memory2 support
This seems to already be implemented, so let's expose it...

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
1e9788e20f panvk: expose KHR_relaxed_block_layout support
There's nothing that prevents this AFAIK, so let's just expose it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Erik Faye-Lund
9940702477 panvk: implement and expose KHR_maintenance2
All we were missing were VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, let's
implement that and enable the extension.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31487>
2024-10-14 18:33:29 +00:00
Samuel Pitoiset
56813236f4 radv: use app names instead of exec name for shader based drirc workarounds
Otherwise, they aren't applied if shaders are pre-compiled using
builders because the executable name would be fossilize-replay.

Using pApplicationName is the correct way to do because it's replayed
by Fossilize correctly.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31621>
2024-10-14 17:56:20 +00:00
Pavel Ondračka
0a81dc8782 r300/ci: add deqp and piglit on RV410
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30137>
2024-10-14 17:25:53 +00:00
Pavel Ondračka
bb3eb60c0c r300/ci: share some common variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30137>
2024-10-14 17:25:53 +00:00
David Heidelberg
d14d3c5bdd amd: Pass addrlib cpp args to the tests
The declaration and definition used by tests otherwise differs from
addrlib.
Found by LTO -Werror=lto-type-mismatch.

Fixes: 1d69c0419b ("amd/addrlib: prevent defining regparm differently")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31613>
2024-10-14 16:52:31 +00:00
Alejandro Piñeiro
e965dfd90b panfrost: make DRM version panfrost/panthor conditional on drm-shim
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31542>
2024-10-14 15:31:36 +00:00
Alejandro Piñeiro
6a6a8c6cff panfrost: add support for DRM_PANTHOR_DEV_QUERY_TIMESTAMP_INFO on drm-shim
In opposite to other DRM_PANTHOR_DEV_QUERY queries, it just fills it
with noop values. Real values doesn't seem relevant on the usual uses
for drm-shim.

This avoids the following error when using shader-db:
  $ ./run shaders/glmark/1-1.shader_test
  Unknown DRM_IOCTL_PANTHOR_DEV_QUERY 2
  MESA: error: DRM_IOCTL_PANTHOR_DEV_QUERY failed (err=2)

As we are here we also add DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO
support.

Fixes: 302127fe9d ("pan/kmod: Add timestamp uapi support")

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31542>
2024-10-14 15:31:36 +00:00
Sergi Blanch Torne
281d135810 ci: run shellcheck when changes on scripts to check
The 'yaml-toml-shell-test' job has a task to review the CI shell files. So,
we need this job present when there is a change on any of those shells.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31627>
2024-10-14 13:50:26 +00:00
Sergi Blanch Torne
abb29959ee ci: shellcheck requires better 'boolean or' syntax
Some merge requests are failing due to `.gitlab-ci/run-shellcheck.sh` failing
on the 'yaml-toml-shell-test' because an 'or', on an elif, in the meson's
build needs to be reformulated.

Fixes: afab416be4 ("ci: enable IPO/LTO only for nightly builds")

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31627>
2024-10-14 13:50:26 +00:00
Faith Ekstrand
f33e18ab39 vulkan/queue: Check for _mem_signal_temp before we submit
vk_queue_push_submit() takes ownership of the vk_queue_submit object and
potentially passes it to another thread.  This fixes a race where, if
the other thread processes and deletes the vk_queue_submit before we get
to checking _mem_signal_temp, we may have a use-after-free.

Fixes: c95b646e23 ("vulkan/queue: Use _mem_signal_temp instead of signal_mem_sync")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11988
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31597>
2024-10-14 13:13:15 +00:00
Christian Gmeiner
980d0e2d06 docs: Update the list of drivers with CPU tracepoints
v3d and vc4 gained support for this feature.

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/31575>
2024-10-14 12:21:51 +00:00
Christian Gmeiner
63f0a2f9a0 vc4: Add a few function traces
Sprinkle around a few traces that were useful in locating submit and
fence waits.

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/31575>
2024-10-14 12:21:51 +00:00
Christian Gmeiner
cf939334e6 v3d: Add a few function traces
Sprinkle around a few traces that were useful in locating submit and
fence waits.

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/31575>
2024-10-14 12:21:51 +00:00
Samuel Pitoiset
03b4477c8f radv: fix returning non-zero captured address without binding
The Vulkan spec says:
    "If the buffer was created with a non-zero value of
    VkBufferOpaqueCaptureAddressCreateInfo::opaqueCaptureAddress or
    VkBufferDeviceAddressCreateInfoEXT::deviceAddress, the return
    value will be the same address that was returned at capture time."

My interpretation is that you can get the buffer device address before
binding if you passed a non-zero address during buffer creation. The
returned BDA would be similar if a memory object is bound to the
buffer later.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31145>
2024-10-14 07:37:00 +00:00
Sergi Blanch Torne
98f2a55eda ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2024-10-14 07:00 UTC
* End: 2024-10-14 13:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31603>
2024-10-14 05:59:01 +00:00
Rob Clark
c7b126f627 freedreno: Balance out u_blitter cb0 save/restore
Fixes: 5de33f3d3e ("freedreno: Implement stencil blit fallback")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31569>
2024-10-13 15:18:40 +00:00
Pavel Ondračka
cc14d40239 r300: remove gl_ClipVertex early
There is no HW support, but in some cases the shaders mostly work even
if we ignore it, and so far we have just done so. However since the
driver didn't know to what output position in the PVS we should
redirect it, it ended in the first slot. Importantly, if the
CLIP_VERTEX output would be written after position (which actually
belongs in the first slot) it would overwrite it and things blow up.

So just remove it early, and also improve the warning a bit, including
the part that we could use draw module to actually emulate the feature.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11856
Fixes: 5dcef1e7b8
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31547>
2024-10-13 05:47:17 +00:00
GKraats
a2b97b7b56 i915g: fix GL_TEXTURE_BASE_LEVEL MAX_LEVEL MIN_LOD and MAX_LOD
Since opengl 1.4 i915g should support GL_TEXTURE_BASE_LEVEL,
GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_MIN_LOD and GL_TEXTURE_MAX_LOD.
This MR fixes it.
See also check at tests/texturing/tex-miplevel-selection.c at piglit.

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Tested-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31073>
2024-10-12 23:38:04 +00:00
David Heidelberg
3c0bf42381 util: add aarch64 fast half-float to float conversion
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31564>
2024-10-12 22:05:01 +00:00
Bas Nieuwenhuizen
c8c354d9c3 radv: Disable EXT BDA capture and replay.
Spec allows calling VkBufferGetDeviceAddressInfo without binding to memory:

VUID-VkBufferDeviceAddressInfo-buffer-02600
If buffer is non-sparse and was not created with the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag, then it must be bound completely and contiguously to a single VkDeviceMemory object

Which  we can only do by making it sparse unconditionally, which feels very wrong to me for a capture & replay extension as that significantly impacts execution.

Current theory is that this was only intended for the EXT and not the core functionality. As such, let's disable capture using the EXT.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31140>
2024-10-11 22:17:33 +00:00
Ian Forbes
40557383dd driconf: Re-enable GLX_EXT_buffer_age on vmwgfx
Now that distributions are no longer installing device specific Xorg
drivers by default we have to rely on the modesetting driver which
currently does not work with glXCopySubBuffer. Both kwin and mutter prefer
using glXSwapBuffers over glXCopySubBuffer if GLX_EXT_buffer_age is present.
Therefore we want to ensure that it is available in order to avoid using
the broken glXCopySubBuffer.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31565>
2024-10-11 21:27:48 +00:00
Konstantin Seurer
d975d23cd8 radv/meta: Do not pass NULL to vk_texcompress_astc_finish
The pointer can be NULL if initialization fails.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11953
Fixes: f97b449 ("radv: integrate meta astc compute decoder to radv")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31505>
2024-10-11 20:56:21 +00:00
Vignesh Raman
8d5c67c937 ci: prepare-artifacts-python: copy if src dir exist
prepare-artifacts-python.sh fails in drm-ci, since
src directory is not present in linux. So copy files
only if src directory is present.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31586>
2024-10-11 20:10:20 +00:00
Satadru Pramanik
fa9cd89a85 Update lp_bld_misc.cpp to support llvm-19+.
Fixes #11896.
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31533>
2024-10-11 18:21:47 +00:00
Adam Jackson
605d6aaf13 vtn: Handle SPV_INTEL_optnone
We don't advertise this in rusticl (and probably shouldn't, at least
until we can honor the request) but DPC++ emits this regardless so we
may as well ignore it.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31592>
2024-10-11 15:39:45 +00:00
Mike Blumenkrantz
f87072f5b0 gallium/sw: make llvmpipe the "default" sw driver
if GALLIUM_DRIVERS isn't set, this string can be "", which fails
to load any driver

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31546>
2024-10-11 14:47:12 +00:00
David Rosca
6a598cccc3 radeonsi/vcn: Select layer for rate control
This makes the per-layer rate control work. Previously it would always
use rate control params for last configured layer.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31148>
2024-10-11 13:55:54 +00:00
David Rosca
d2ad188915 radeonsi/vcn: Implement per-layer rate control for HEVC
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31148>
2024-10-11 13:55:54 +00:00
David Rosca
5b157d4ad0 frontends/va: Calculate VBV params for other layers relative to base layer
VAAPI only gives these parameters for base layer, but we need them for
other layers too.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31148>
2024-10-11 13:55:54 +00:00
David Rosca
c56fc312a8 frontends/va: Parse H264 prefix for temporal_id
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31148>
2024-10-11 13:55:54 +00:00
David Rosca
ce2eedd13e frontends/va: Fix parsing HEVC st_ref_pic_set
According to spec, the slice ref pic set is the last entry
in st_ref_pic_set[] array.
As such, the maximum number of st ref pic sets is 65.

Fixes: ef8ba75718 ("frontends/va: Parse HEVC slice packed header")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31308>
2024-10-11 10:46:49 +00:00
Lucas Stach
7db47af6dd etnaviv: Update headers from rnndb
Update to rnndb commit 3e64c80ed98f.

This extends two fields related to vertex attribute and stream
configuration, so they work correctly with the limits exposed
by the GPU.

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/31594>
2024-10-11 09:33:03 +00:00
Caio Oliveira
b9787fcc80 intel/brw: Move emit_scan/emit_scan_step near its usage
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Caio Oliveira
0ba1159b0a intel/brw: Add SHADER_OPCODE_*_SCAN
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Caio Oliveira
9537b62759 intel/brw: Add SHADER_OPCODE_REDUCE
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Caio Oliveira
4361a08254 intel/brw: Reduce scope of has_source_and_destination_hazard
This predicate at the moment is only relevant during register
allocation, so move it there and the code can ignore virtual
instructions that were already lowered previously.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Caio Oliveira
bf9456753d intel/brw: Validate some instructions exists only up until some phases
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Caio Oliveira
affa7567c2 intel/brw: Add phases to backend
The general idea is to be able to validate that certain instructions
were lowered and certain restrictions were already handled.  Passes can
now assert their expectations, i.e. if a pass is mean to run after
certain lowerings or not.

The actual phases are a initial stab and as we re-organized the passes,
we may remove/add phases.

This commit just add some phase steps, later commits will make use of
them.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Caio Oliveira
21f78454bf intel/brw: Fix Gfx9 3-src validation to handle FIXED_GRF
Note this validation path is not being used at the moment, but will in a
later commit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Caio Oliveira
3e8796b677 intel/brw: Print Non-SSA regs after NIR in debug output
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Caio Oliveira
2811cb2923 intel: Add statistic for Non SSA registers after NIR to BRW
This is going to be useful while we convert the NIR to BRW to produce
SSA definitions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Caio Oliveira
6db7d1af16 intel/compiler: Rename shader_stats structs
Add the `brw_` and `elk_` prefixes to the structs to avoid compilation
failure building with LTO ("violates the C++ One Definition Rule") when
the structs diverge.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30496>
2024-10-11 06:40:29 +00:00
Christian Gmeiner
babeba264b etnaviv: Implement ARB_draw_indirect
Passes all relevant piglits with forced GLSL 330 and GL 3.1.

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/31535>
2024-10-11 07:42:47 +02:00
Caio Oliveira
13d99979d2 intel/brw: Remove the remaining DO_SRC macro from EU validation
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
f1036da345 intel/brw: Add vstride/width/hstride to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
2251748aad intel/brw: Add dst/srcs register numbers to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
808b8b65b6 intel/brw: Add abs/negate to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
f6dbb72219 intel/brw: Add dst/src0 address_mode to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
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/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
be70d1f9b1 intel/brw: Add dst/srcs type to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
e0ba4ca166 intel/brw: Add dst/srcs reg file to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
3db1c3fc0e intel/brw: Add access_mode to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
3dc1f64e51 intel/brw: Add exec_size to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
853fe03470 intel/brw: Add has_dst to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
c394eb3111 intel/brw: Add num_sources to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
9cdb90e787 intel/brw: Add opcode to brw_hw_decoded_inst
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
76e177d87d intel/brw: Create a struct to hold a decoded brw_inst in eu_validation
For now it contains only the "raw" brw_inst.  Later patches will add
useful fields to it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Caio Oliveira
382bd4ce36 intel/brw: Add ERROR helper variant that returns to EU validation
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31296>
2024-10-11 04:13:48 +00:00
Faith Ekstrand
2fb4aed9d8 nvk: Advertise VK_KHR_fragment_shading_rate
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
e45effe555 nvk: Set VARIABLE_PIXEL_RATE_SHADING_TABLE_SELECT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
99107ef8d4 nak: Add support for gl_PrimitiveShadingRateEXT
This aliases gl_ViewportIndex in the NVIDIA attribute space.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
ab8e6bf4c3 nak: Pass a nak_compiler into sysval and attrib helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
58252622f1 nak: Add support for gl_ShadingRateEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
957a1add26 nak: Rename SV_VERTEX_COUNT to PRIM_TYPE
This is what nvdisasm calls it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
1e7c3ddc33 nak: Get rid of some dead code warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
75bcb656d9 nvk: Add support for binding fragment shading rate images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
16bd3f0f50 nvk: Emit FSR state
This is mostly a matter of filling out the
VARIABLE_PIXEL_SHADING_INDEX_TO_RATE tables.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
55854de584 nvk: Rework setting of min_sample_shading
Instead of just storing a pre-computed min_sample_shading, store both
sample_shading_enable and min_sample_shading and then compute the final
min_sample_shading value when we emit state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
746ea7b0cd vulkan: Add a vk_fragment_shading_rate_is_disabled() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
29dd0236b5 nvk: Initialize VARIABLE_PIXEL_RATE_SAMPLE_ORDER
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
840ec73f51 nvk: Implement GetPhysicalDeviceFragmentShadingRatesKHR()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
8f1697b12d nil: Use D3D sample modes by default
Only the D3D modes work with RASTER_SAMPLES_MODE or with variable
shading rates.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
e14b4bcb88 nvk: Support D3D sample modes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
097f8b2c7d nil: Add D3D sample layouts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
279cebf726 nouveau/class_parser: Add more method arrays
A bunch of FSR stuff is arrays.  While we're at it, add a handful of
other things I've seen in blob traces.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
48898c47bf nvk: Rework setup of sample masks
Annoyingly, 2x2 with 2 passes uses the masks 0xa and 0x5, not 0x3 and
0xc as the current code assumes.  When we enable 4x2_D3D, that one gets
even more wonky.  This reworks things so that we have two copies of root
descriptor sample_masks array in scratch states, one for 2pass and one
for 4pass, that get copied into the push constants as needed.  This
should handle the needs of both 2x2 and 4x2_D3D as well as 4x4 when the
time comes.

Fixes: 6a84d5439d ("nvk: Move the ANTI_ALIAS_CONTROL logic to the MME")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
f009721d11 nvk: Add an nvk_cmd_emit_sample_layout() helper
This also pulls SET_ANTI_ALIAS and MME_SET_ANTI_ALIAS together.

Fixes: 6a84d5439d ("nvk: Move the ANTI_ALIAS_CONTROL logic to the MME")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
f8c0377421 nil: Add a helper to get samples from a SampleLayout
Fixes: 6a84d5439d ("nvk: Move the ANTI_ALIAS_CONTROL logic to the MME")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
cf31388a9a nouveau/mme: Turing can't have emit and state in the same op
Fixes: 6a84d5439d ("nvk: Move the ANTI_ALIAS_CONTROL logic to the MME")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:57 +00:00
Faith Ekstrand
095db78474 nouveau/mme: Evaluate methods immediately in the Turing sim
Fixes: 6a84d5439d ("nvk: Move the ANTI_ALIAS_CONTROL logic to the MME")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:56 +00:00
Faith Ekstrand
f380136c1d nouveau/mme: Test ifs with immediate parameters
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31585>
2024-10-10 23:16:56 +00:00
Daniel Stone
3dcb6a0f23 egl/x11: Downgrade warning to info
This warning is emitted 10,074 times during a virpipe-on-gl job. Let's
emit it zero times.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31591>
2024-10-10 20:52:02 +00:00
David Heidelberg
ace38d8432 ci: restrict number of maximum threads
This makes LTO non-abusive to the servers.

Suggested-by: psykose <alice@ayaya.dev>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28684>
2024-10-10 19:19:54 +00:00
David Heidelberg
afab416be4 ci: enable IPO/LTO only for nightly builds
1. nightly takes a long, the extra few minutes for linking don't matter
2. nightly will run faster, since where it's CPU dependent it's at least +5% perf
3. it may reveal some painful areas of common code or driver.
4. for some jobs (not enabled yet, it generates ugly errors, disable
   there

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28684>
2024-10-10 19:19:54 +00:00
David Heidelberg
2630e3e47a ci/fedora: when doing non-LTO build, we need C_ARGS too
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28684>
2024-10-10 19:19:54 +00:00
Karol Herbst
9cdf897c5e rusticl: allow asahi to be enabled by default
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31589>
2024-10-10 18:24:31 +00:00
Karol Herbst
767695b2c4 asahi: implement get_cl_cts_version
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31589>
2024-10-10 18:24:31 +00:00
Jose Maria Casanova Crespo
687ed3fcaa v3d: initialize job local key with the 8 color buffer available in v7.1+
Fixes: 9e90d95508 ("v3d,v3dv: support up to 8 render targets in v7.1+")

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31582>
2024-10-10 16:44:58 +00:00
Samuel Pitoiset
583b93f7a2 radv: rename 'gfx' to 'main' in the DGC path
It can be confusing because the main DGC IB can be executed either on
GFX or ACE compute queues.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31583>
2024-10-10 15:52:51 +00:00
Rhys Perry
33eb2d7fe4 aco: skip uniformization of certain merge phis
If a source is a VGPR, then skip if it's safe. This fixes the regressions
from the previous commit.

fossil-db (navi31):
Totals from 5118 (6.45% of 79395) affected shaders:
MaxWaves: 159560 -> 159520 (-0.03%); split: +0.01%, -0.03%
Instrs: 2165351 -> 2138456 (-1.24%); split: -1.26%, +0.02%
CodeSize: 11260340 -> 11152460 (-0.96%); split: -0.98%, +0.02%
VGPRs: 218124 -> 225144 (+3.22%); split: -0.13%, +3.35%
Latency: 11059208 -> 11116102 (+0.51%); split: -0.18%, +0.69%
InvThroughput: 1252148 -> 1230193 (-1.75%); split: -1.77%, +0.01%
VClause: 39513 -> 39518 (+0.01%); split: -0.48%, +0.49%
SClause: 59434 -> 59378 (-0.09%); split: -0.11%, +0.02%
Copies: 165997 -> 156172 (-5.92%); split: -6.68%, +0.76%
PreSGPRs: 181203 -> 181094 (-0.06%)
PreVGPRs: 139393 -> 139731 (+0.24%)
VALU: 1244301 -> 1220769 (-1.89%); split: -1.91%, +0.02%
SALU: 200240 -> 199567 (-0.34%); split: -0.34%, +0.00%

fossil-db (navi21):
Totals from 35520 (44.74% of 79395) affected shaders:
MaxWaves: 951870 -> 951830 (-0.00%)
Instrs: 20229388 -> 20227776 (-0.01%); split: -0.01%, +0.00%
CodeSize: 105379916 -> 105513740 (+0.13%); split: -0.01%, +0.13%
VGPRs: 1375232 -> 1375400 (+0.01%)
Latency: 81046435 -> 81013986 (-0.04%); split: -0.04%, +0.00%
InvThroughput: 15269166 -> 15273295 (+0.03%); split: -0.01%, +0.04%
VClause: 354314 -> 354310 (-0.00%); split: -0.00%, +0.00%
SClause: 417049 -> 417047 (-0.00%); split: -0.00%, +0.00%
Copies: 1699445 -> 1699488 (+0.00%); split: -0.01%, +0.01%
Branches: 591274 -> 591269 (-0.00%); split: -0.00%, +0.00%
PreSGPRs: 1371062 -> 1370567 (-0.04%)
PreVGPRs: 1100716 -> 1100953 (+0.02%)
VALU: 11076189 -> 11075167 (-0.01%); split: -0.01%, +0.00%
SALU: 3648002 -> 3647378 (-0.02%); split: -0.02%, +0.00%

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/30211>
2024-10-10 14:59:27 +00:00
Rhys Perry
ce33ffd03a aco: ensure phis uniformized by divergence analysis are SGPR
Otherwise, they might not actually be uniform when divergence analysis
claimed they are.

fossil-db (navi31):
Totals from 5118 (6.45% of 79395) affected shaders:
MaxWaves: 159520 -> 159560 (+0.03%); split: +0.03%, -0.01%
Instrs: 2138456 -> 2165351 (+1.26%); split: -0.02%, +1.28%
CodeSize: 11152460 -> 11260340 (+0.97%); split: -0.02%, +0.98%
VGPRs: 225144 -> 218124 (-3.12%); split: -3.25%, +0.13%
Latency: 11116102 -> 11059208 (-0.51%); split: -0.69%, +0.18%
InvThroughput: 1230193 -> 1252148 (+1.78%); split: -0.01%, +1.80%
VClause: 39518 -> 39513 (-0.01%); split: -0.49%, +0.48%
SClause: 59378 -> 59434 (+0.09%); split: -0.02%, +0.11%
Copies: 156172 -> 165997 (+6.29%); split: -0.81%, +7.10%
PreSGPRs: 181094 -> 181203 (+0.06%)
PreVGPRs: 139731 -> 139393 (-0.24%)
VALU: 1220769 -> 1244301 (+1.93%); split: -0.02%, +1.95%
SALU: 199567 -> 200240 (+0.34%); split: -0.00%, +0.34%

fossil-db (navi21):
Totals from 35520 (44.74% of 79395) affected shaders:
MaxWaves: 951830 -> 951870 (+0.00%)
Instrs: 20227773 -> 20229388 (+0.01%); split: -0.00%, +0.01%
CodeSize: 105513724 -> 105379916 (-0.13%); split: -0.13%, +0.01%
VGPRs: 1375400 -> 1375232 (-0.01%)
Latency: 81013985 -> 81046435 (+0.04%); split: -0.00%, +0.04%
InvThroughput: 15273291 -> 15269166 (-0.03%); split: -0.04%, +0.01%
VClause: 354310 -> 354314 (+0.00%); split: -0.00%, +0.00%
SClause: 417047 -> 417049 (+0.00%); split: -0.00%, +0.00%
Copies: 1699486 -> 1699445 (-0.00%); split: -0.01%, +0.01%
Branches: 591269 -> 591274 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1370567 -> 1371062 (+0.04%)
PreVGPRs: 1100953 -> 1100716 (-0.02%)
VALU: 11075164 -> 11076189 (+0.01%); split: -0.00%, +0.01%
SALU: 3647378 -> 3648002 (+0.02%); split: -0.00%, +0.02%

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/30211>
2024-10-10 14:59:26 +00:00
Rhys Perry
67ad7359ff nir/divergence_analysis: disable phi undef optimization by default
If the backend does not implement this too, or some other future transform
modifiess the phi so that this isn't the case (replace the phi with a
bcsel or replace undef with zero), then it will not actually be uniform.

This keeps it enabled to some degree for RADV/ACO.

fossil-db (navi31):
Totals from 76 (0.10% of 79395) affected shaders:
Instrs: 195008 -> 195282 (+0.14%)
CodeSize: 1012592 -> 1015884 (+0.33%)
Latency: 3892826 -> 3898843 (+0.15%); split: -0.00%, +0.15%
InvThroughput: 460681 -> 460964 (+0.06%)
Copies: 13508 -> 13516 (+0.06%)
Branches: 5244 -> 5412 (+3.20%)
PreVGPRs: 5092 -> 5096 (+0.08%)
VALU: 116177 -> 116197 (+0.02%)
SALU: 23449 -> 23785 (+1.43%)

fossil-db (navi21):
Totals from 76 (0.10% of 79395) affected shaders:
Instrs: 164471 -> 164981 (+0.31%)
CodeSize: 883988 -> 888420 (+0.50%)
Latency: 4074287 -> 4082043 (+0.19%)
InvThroughput: 783783 -> 784276 (+0.06%); split: -0.00%, +0.06%
Branches: 5262 -> 5430 (+3.19%)
PreVGPRs: 5100 -> 5104 (+0.08%)
VALU: 116375 -> 116381 (+0.01%)
SALU: 23589 -> 23925 (+1.42%)

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/30211>
2024-10-10 14:59:26 +00:00
Samuel Pitoiset
2643c48700 radv/amdgpu: remove unused code about external IBs in the submit path
Now that everything is chained, the driver no longer uses external IBs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30809>
2024-10-10 14:08:39 +00:00
Samuel Pitoiset
d686ba36a9 radv/amdgpu: simplify cs_execute_ib()
It's only used for executing IB2 on GFX.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30809>
2024-10-10 14:08:39 +00:00
Samuel Pitoiset
c1b2cb6ef7 radv: implement IB chaining for DGC when it's executed on compute
The IB2 packet is only supported on the graphics queue. To execute DGC
IB on compute, the previous solution was to submit it separately
without any chaining. Though this solution was incomplete because it's
easy to reach the maximum number of IBs per submit when there is a lot
of ExecuteIndirect() calls.

To fix that, the proposed solution is to implement DGC IB chaining when
it's executed on the compute only. The idea is to add a trailer that is
added at the beginning of the DGC IB (to know the offset). This trailer
is used to chain back back the DGC IB to a normal CS, it's patched at
execution time. Patching is fine because it's not allowed to execute
the same DGC IB concurrently and the entire solution relies on that.

When the DGC IB is executed on graphics, the trailer isn't patched and
it only contains NOPs padding. Performance should be mostly similar.

This fixes
dEQP-VK.dgc.nv.compute.misc.execute_many_*_primary_cmd_compute_queue.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30809>
2024-10-10 14:08:39 +00:00
Samuel Pitoiset
303a456aa5 radv: add PKT3_INDIRECT_BUFFER_BYTES in the DGC path
To avoid using a magic number.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30809>
2024-10-10 14:08:39 +00:00
Samuel Pitoiset
056b638588 radv: add a helper to bind the color output state
Instead of duplicating almost the same code chunk in three different
locations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31566>
2024-10-10 13:19:22 +00:00
Samuel Pitoiset
39745dd7cf radv: move radv_compact_spi_shader_col_format() to radv_cmd_buffer.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31566>
2024-10-10 13:19:22 +00:00
Zan Dobersek
61ad069a21 freedreno: sanitize device names for config name usage
Names used in libconfig's configuration files only allow alphanumerics,
underscores, dashes and asterisks. Freedreno device names, used as names
in fdperf.cfg, can also contain other characters, currently spaces and
plus characters. Not accounting for those makes it impossible to store
fdperf configuration across separate runs.

Once the Freedreno device name is retrieved, it's now sanitized for use
in fdperf.cfg. Unsupported characters are converted to underscores.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31577>
2024-10-10 11:48:45 +00:00
Daniel Stone
d741a6766e ci/{b2c,swrast,layered}: Strip unnecessary things from runtime containers
Bring it up to parity with the LAVA and bare-metal containers by
stripping things we don't need at runtime. There is a lot of stuff we
don't need in container images we only use to execute tests, including
but not limited to the system Mesa which can only cause problems. Call
the same strip-rootfs we already run for LAVA to make sure that this
doesn't happen, as well as slimming down the container image.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
3e7c9aad8a ci/virgl: Fix library path
We need to set $LD_LIBRARY_PATH so we can find GL/Vulkan at all, and
$LIBGL_DRIVERS_PATH so Xvfb will pick up the correct DRI modules.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
4e3e84c240 ci/zink: Fix library path
We need to set $LD_LIBRARY_PATH so we can find GL at all, and
$LIBGL_DRIVERS_PATH so Xvfb will pick up the correct DRI modules.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
61f5178f6e ci/swrast: Archive Xvfb logs
If anything goes wrong, it's useful to have actual output, as opposed to
guessing from the void.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
8b594d29b6 ci/swrast: Fix library paths for llvmpipe/softpipe
We need to set $LIBGL_DRIVERS_PATH so Xvfb will pick up the correct DRI
modules. We were setting $LD_LIBRARY_PATH, but llvmpipe was getting it
wrong, so Weston was picking up the host GLES, which we're about to no
longer install.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
a3560fabc6 ci/kernel: Make download-prebuilt-kernel safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
560d43b75e ci/skqp: Don't hardcode LLVM version
Use our ${LLVM_VERSION} instead.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
5aceba599b ci/skqp: Reorder some things
Declare all our variables first, so we can use them fearlessly.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
1dd728a3d8 ci/skqp: Make build-skqp safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
0fc65e437a ci/deqp-runner: Make build-deqp-runner safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
fef3170cae ci/angle: Make build-angle safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
7b56710e77 ci/vkd3d: Make Proton build safe for set -u
The version hadn't been used in years now, so was always just an empty
string.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
6f0457dddb ci/vulkan: Make build-vulkan-validation safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
51dc1ff706 ci/libclc: Make build-libclc safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
ed9c67997a ci/wine: Make build-wine safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
2382b3ea8d ci/windows: Make build-directx-headers safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
d14b27b7fe ci/libdrm: Make build-libdrm safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
c3171bfd6a ci/wayland: Make build-wayland safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
7824cc1265 ci/crosvm: Make build-crosvm safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
4c52663e4a ci/va: Make build-va-tools safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
41774fde2f ci/apitrace: Make build-apitrace safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
ef05facc5e ci/deqp: Make build-deqp safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:57 +00:00
Daniel Stone
a7824caa8b ci/piglit: Make build-piglit safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:56 +00:00
Daniel Stone
4ae2d97c36 ci: Make setup-test-env safe for set -u
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31281>
2024-10-10 11:05:56 +00:00
Tapani Pälli
e4fcbe8d6f anv: set StackIDControlOverride_RTGlobals for 2 workarounds
GFX_VER block matches both workarounds and while these workarounds are
almost about the same cause, other one applies only for LNL and other
one for BMG, need to check for both.

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/31571>
2024-10-10 10:20:56 +00:00
Tapani Pälli
b8fc0288af 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31571>
2024-10-10 10:20:56 +00:00
Erik Faye-Lund
aa517f7eb3 mesa: clean up setup of MaxAddressRegs constant
This value is only ever read for vertex or fragment shaders, so let's
make sure it's zero otherwise.

While we're at it, make the state-tracker not overwrite MaxAddressRegs
to the same value as it already is.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31538>
2024-10-10 09:36:43 +00:00
Erik Faye-Lund
12eba85544 mesa: remove superfluous "native" limits and stats
We don't ever set these to anything else than the same as the non-native
counterparts. Let's drop the members in the first place, and use the
non-native version instead.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31538>
2024-10-10 09:36:43 +00:00
Erik Faye-Lund
cf71e5534b i915: do not calculate native instructions
This isn't wired up anywhere, so let's just drop it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31538>
2024-10-10 09:36:43 +00:00
David Rosca
3c5fe03b92 radeonsi/vcn: Add support for VCN5 dpb tier2
Co-authored-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
2024-10-10 09:02:21 +00:00
David Rosca
1e1f078099 radeonsi/vcn: Add support for VCN5 AV1 compound
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
2024-10-10 09:02:21 +00:00
David Rosca
05f7589fec radeonsi/vcn: Fix coded size in sequence header on VCN5
Introduce coded_width/coded_height for values used in headers
and change it to aligned size on VCN4 to reflect the actual coded size.
VCN5 doesn't have this limitation and can code any size.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
2024-10-10 09:02:21 +00:00
David Rosca
8b2f0fb574 radeonsi/vcn: Support raw packed headers for AV1
Same as H264/HEVC, we still write sequence header ourselves
and slice header is sent to FW, everything else gets copied
directly to output bitstream buffer.
Fixes generating correct output with libva-utils/av1encode.
Also fixes temporal delimiter insertion, it's no longer forced
on every frame, but instead it lets application handle it.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
2024-10-10 09:02:21 +00:00
David Rosca
46d8e57f16 frontends/va: Remove now unused ref fields for AV1 encode
Need to get rid of these as they allocate buffers for drivers
not implementing create_dpb_buffer and waste memory.
No driver is using these fields anymore.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
2024-10-10 09:02:20 +00:00
David Rosca
813812b925 radeonsi/vcn: Switch to app DPB management for AV1
Also move the common part of the frame header into shared function.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
2024-10-10 09:02:20 +00:00
David Rosca
454a26662d frontends/va: Support raw packed headers for AV1
When there is show_existing_frame = 1 frame header, we don't parse
it and instead output directly as raw header. Only the frame header
that will be used for encoding current frame is parsed and indicated
with is_slice.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
2024-10-10 09:02:20 +00:00
David Rosca
1fdd773450 frontends/va: Parse more AV1 frame and sequence header params
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
2024-10-10 09:02:20 +00:00
David Rosca
36ddcc130b frontends/va: Implement DPB management for AV1
Same logic as H264 and HEVC, except surfaces are evicted immediately.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
2024-10-10 09:02:20 +00:00
Christian Gmeiner
3ae3425c5d etnaviv: blt: Convert assert to real if
etna_try_blt_blit(..) returns if it is possible to do the blit
in hardware or not. When building mesa in debug mode this assert(..)
is hit many times.

Fixes the following piglits on GC7000L:
 - spec@!opengl 1.0@gl-1.0-scissor-copypixels
 - spec@nv_conditional_render@copypixels
 - spec@!opengl 1.1@copypixels-draw-sync
 - spec@!opengl 1.1@copypixels-sync
 - spec@!opengl 1.1@depthstencil-default_fb-blit
 - spec@!opengl 1.1@draw-copypixels-sync
 - spec@!opengl 1.1@gl-1.1-xor-copypixels

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/31581>
2024-10-10 08:31:53 +00:00
Iago Toral Quiroga
4d1971f17f broadcom: fix pairing tmu lookup with previous ldtmu
There are some restrictions when pairing a new TMU lookup with
a previous LDTMU and we had code to handle this but we were not
limiting the restriction only to TMU lookups.

total instructions in shared programs: 10856992 -> 10823967 (-0.30%)
instructions in affected programs: 1823670 -> 1790645 (-1.81%)
helped: 10212
HURT: 110
Instructions are helped.

total max-temps in shared programs: 2234069 -> 2233153 (-0.04%)
max-temps in affected programs: 15100 -> 14184 (-6.07%)
helped: 660
HURT: 3
Max-temps are helped.

total sfu-stalls in shared programs: 15935 -> 15967 (0.20%)
sfu-stalls in affected programs: 317 -> 349 (10.09%)
helped: 31
HURT: 57
Inconclusive result (%-change mean confidence interval includes 0).

total inst-and-stalls in shared programs: 10872927 -> 10839934 (-0.30%)
inst-and-stalls in affected programs: 1824656 -> 1791663 (-1.81%)
helped: 10199
HURT: 111
Inst-and-stalls are helped.

total nops in shared programs: 185612 -> 185767 (0.08%)
nops in affected programs: 4865 -> 5020 (3.19%)
helped: 164
HURT: 256
Nops are HURT.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31574>
2024-10-10 06:58:15 +00:00
David Rosca
20d5020ad7 radeonsi/vcn: Fix out of bounds read in H264 decode
When all 16 references are used, this would read pic->ref[16].
Same for HEVC, but HEVC only uses 15 reference frames so it would
never happen there yet is still reported by coverity.

Fixes coverity issues 1497283 and 1465569 Out-of-bounds read

Cc: mesa-stable

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31558>
2024-10-10 06:25:36 +00:00
David Rosca
10a7356488 radeonsi/vcn: Fix out of bounds write when invalidating QP map regions
Fixes coverity issue 1559460 Out-of-bounds write

Fixes: 9c07a2e10d ("radeonsi/vcn: ROI feature implementation")

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31558>
2024-10-10 06:25:35 +00:00
David Rosca
17842f0584 radeonsi/vcn: Fix some small coverity issues
* 1619409 Resource leak
  - fix leak when mapping encode bitstream buffer fails
* 1619403 Dereference after null check
  - remove size ptr NULL check in radeon_enc_get_feedback, can't be NULL
* 1434887 Out-of-bounds access
  - use correct variable for memset in get_vp9_msg
* 1619400 'Constant' variable guards dead code
  - remove code handling frame_mbs_only_flag == 0, hardcoded to true

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31558>
2024-10-10 06:25:35 +00:00
Tapani Pälli
f77ffd6b7c drirc/anv: force_vk_vendor=-1 for Silent Hill 2
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11992
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/31573>
2024-10-10 04:07:12 +00:00
Caio Oliveira
c06a55fd39 spirv: Update SPIR-V grammar to use aliases
For enumerants and instruction names, instead of duplicating the values
now the grammar will use an aliases field to list the alternative names.
Update the Python scripts for that.

The new SPIR-V files correspond to d92cf88c371424591115a87499009dfad41b669c
("Add "aliases" fields to the grammar and remove duplicated (#447)")
in https://github.com/KhronosGroup/SPIRV-Headers.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31369>
2024-10-10 02:48:00 +00:00
Vignesh Raman
d43fec5da9 ci/lava: set exit code in exception case
Set exit_code to 1 in case of an exception; otherwise,
the job exits with 0, and GitLab shows the job as successful.

Fixes: b9cee06f9e ("ci/lava: handle non-zero exit codes")
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31556>
2024-10-10 02:16:22 +00:00
Guilherme Gallo
59d909eb56 ci/lava: Make perf jobs use pyutils artifact
Following the merge of Merge Request #31151, we encountered an issue
where the performance jobs were failing silently. Although these
failures did not cause the pipeline to fail, they resulted in warnings
for all merge requests that ran the .*-traces-performance jobs, putting
critical performance data for the [Mesa Performance Driver
dashboard](https://ci-stats-grafana.freedesktop.org/goto/G3xkvykHg?orgId=1)
at risk.

To resolve this issue, this commit updates the LAVA performance jobs to
utilize the Pyutils artifact package, which is now the only required
artifact for the jobs that run the LAVA job submitter.

Fixes: dd5d737e6c ("ci/lava: Use new pyutils container")

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31553>
2024-10-10 01:33:16 +00:00
Rob Clark
f54748ea38 freedreno/drm: Add preemption support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Rob Clark
753c8bf834 freedreno/a6xx: Emit CP_SET_AMBLE packets
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Rob Clark
d572fcf04a freedreno/a6xx: Move more state emit per-bin
With skipsaverestore=1 we can't rely on this values being restored.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Rob Clark
270e595811 freedreno/a6xx: Move static regs to preamble IB
We can re-use this for preemption.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Rob Clark
0c36ca7446 freedreno/a6xx: Move PC_TESSFACTOR_ADDR emit
This depends on batch state, so emit in gmem code.  The remainder of the
static reg initialization can be re-used across batches.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Rob Clark
f3cc9335e6 freedreno/a6xx: Set bin size per bin
It is not saved/restored by level 1 preemption with skipsaverestore=1,
so we need to set it for each bin.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Rob Clark
be6342633c freedreno/a6xx: Cleanup WFIs around RB_CCU_CNTL
This was only actually needed on the earliest a6xx (probably just
a630?).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Rob Clark
3aac51a6d5 freedreno/a6xx: De-open-code VFD_MODE_CNTL
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Rob Clark
2f82555efa freedreno/a6xx: Only emit VFD/PC_POWER_CNTL for a6xx
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Connor Abbott
c7a7f6dad8 tu: Add TU_DEBUG=hiprio
The same as FD_MESA_DEBUG=hiprio in freedreno.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Connor Abbott
1d2b479a3b tu: Allow being preempted on a7xx
This is only tested on a7xx so far, although it should work on a6xx too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Connor Abbott
3631f9ad62 tu/virtio: Make virtio_simple_ioctl take a vdrm_device
We need to do an ioctl in order to try to create a queue before the
tu_device is created.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Connor Abbott
6cbb7aa147 freedreno: Bump kernel uapi
Update to this commit in msm-next:

commit a20a91fb1bfac5d05ec5bcf9afe0c9363f6c8c93
Author: Antonino Maniscalco <antomani103@gmail.com>

    Documentation: document adreno preemption

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Connor Abbott
700e26a448 tu: Emit CP_SET_AMBLE packets
Make sure skipsaverestore works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Connor Abbott
db86c4c496 tu: Simplify device startup CS creation
We have a few different command streams we create at startup. Simplify
the initialization by creating a single sub_cs to allocate all of the
cs's out of and inlining structures where appropriate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:46 +00:00
Connor Abbott
acdbfe9812 tu: Re-emit LRZ state before each bin
Similar to the bin size register, even though this is the same for each
bin it needs to be re-emitted to make skipsaverestore work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:45 +00:00
Connor Abbott
b9d9fdb6d1 tu: Write bin size for each bin
While the register is constant for all bins in the render pass, it is
not saved and restored with level 1 preemption with skipsaverestore=1 so
it needs to be restored. Follow what the blob does and set it before
each bin.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:45 +00:00
Connor Abbott
4d75a4ac4b tu: Split out register setting from tu6_init_hw()
Split out the parts that will also have to be done in the bin restore
IB.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:45 +00:00
Connor Abbott
a9f88ff2af tu: Don't WFI after initializing RB_CCU_CNTL on a7xx
There's no reason to do this and the blob doesn't.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:45 +00:00
Jonathan Marek
b6432a6c66 freedreno/a6xx: add missing USES_GMEM flag and BIN_RENDER_END markers
Add USES_GMEM flag to indicate that GMEM is in use, so that preemption can
know it needs save and restore GMEM contents.

The missing BIN_RENDER_END markers are also added, their purpose is to
clear the USES_GMEM flag once GMEM is no longer in use.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:45 +00:00
Jonathan Marek
72900e1aac freedreno: improve a6xx CP_SET_MARKER xml definition
Use real names for most of a6xx_marker enum, add USES_GMEM, remove
overlapping bitfields.

Note the actual "real names" start with PM4_RENDER_MODE_ instead of RM6_

This is a small change to adreno_pm4.xml, with the corresponding
find/replace and updated ci references

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30544>
2024-10-10 00:50:45 +00:00
Connor Abbott
022fb8e4c7 ir3, turnip: Support VK_*_compute_shader_derivatives on a7xx
Quad derivative groups are supported since a7xx using the tiling mode
bit. Linear derivative groups may also work on a6xx but I haven't tested
it yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31130>
2024-10-10 00:14:04 +00:00
Lionel Landwerlin
624d83bfd1 isl: add support of aux disable bit on hiz
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31579>
2024-10-09 23:38:19 +00:00
Lionel Landwerlin
e4d1fd7fd6 iris: delete stencil mapping support
Now that we have ISL support.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31579>
2024-10-09 23:38:19 +00:00
Lionel Landwerlin
1a72fc013c isl: Tile W memcpy support
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31579>
2024-10-09 23:38:19 +00:00
Lionel Landwerlin
c0e98d2c89 isl/tests: rename span variable to xt_sub_range_alignment
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31579>
2024-10-09 23:38:19 +00:00
Lionel Landwerlin
e44249af5d isl/tests: add more coordinates for full tiles testing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31579>
2024-10-09 23:38:19 +00:00
Lionel Landwerlin
52263413f4 isl: remove duplicated copy for tileX/TileY
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/31579>
2024-10-09 23:38:19 +00:00
Gurchetan Singh
635cefcdad gfxstream: use sync_fence_info
This gives logs of the form:

[bootanimation] Fence: bbq-adapter#0(BLAST Consumer:0, status: 1, timestamp (ms): 15391

sync_merge(..) allows userspace to name the fence
and that's what's observed for in-fences.  The goal
is debug potentially long-running fences via the
use of timestamp data.

Perfetto may be used too.

Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31548>
2024-10-09 22:53:05 +00:00
Gurchetan Singh
d7f264452e util: add sync_fence_info
This returns sync file info, including timestamps.
The caller is responsible for freeing the memory.

Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31548>
2024-10-09 22:53:05 +00:00
Gurchetan Singh
02b383fded gfxstream: use util/libsync
Gets rid of some #ifdefs.

Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31548>
2024-10-09 22:53:05 +00:00
Gurchetan Singh
34e0394580 gfxstream: nuke util function
Use ALIGN_POT instead.

Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31548>
2024-10-09 22:53:05 +00:00
Gurchetan Singh
5b82c130d9 gfxstream: add clang-format
Version of clang from the gfxstream
repo.

Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31548>
2024-10-09 22:53:05 +00:00
Danylo Piliaiev
b31a4037de tu/a750: Workaround GPU fault when fast-clearing R8G8 formats
Clearing VK_FORMAT_R8G8_* with fast-clear value and certain
dimensions (e.g. 960x540), and having GMEM renderpass afterwards
may lead to a GPU fault on A7XX.

Prop driver directly clears UBWC layers for R8G8_UNORM, and
doesn't use UBWC for R8G8_UINT. It uses generic clear for R8G8 only
for renderpass, where doesn't cause issues in Turnip.

Fixes GPU fault in Limbo game running via Zink.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31258>
2024-10-09 22:01:10 +00:00
Connor Abbott
96530a391d Reapply "ci/lima: Temporarily disable"
This reverts commit b339c525f4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31580>
2024-10-09 21:57:14 +00:00
Samuel Pitoiset
1641db461f radv: fix generating the global key for pipeline binaries
The global key wasn't considering GPU family, Git revision etc and it
was mostly invariant.

Fixes: be06bfcbed ("radv: add initial support for pipeline binaries")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11995
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31576>
2024-10-09 21:15:48 +00:00
Maíra Canal
47a78614ea v3d: Don't use performance counters names array with an older kernel
Starting with Linux v6.11+, performance counter information is no
longer duplicated in both the kernel and userspace. Instead, an IOCTL
retrieves this information, allowing userspace to maintain a local
array for reuse, thus avoiding redundant kernel queries.

However, support for older kernels without these new IOCTLs remains.
To distinguish between versions, we check `devinfo->max_perfcnt` -
which is non-zero on Linux v6.11+ and zero on older kernels.

Currently, applications using performance queries on platforms with
older kernels encounter a SEGFAULT, as we don't validate
`devinfo->max_perfcnt` before accessing the userspace array for
performance counter information.

This commit makes sure that, if `devinfo->max_perfcnt` is zero,
`screen->perfcnt_names` will be NULL. This way, we can check if
`screen->perfcnt_names` is different than NULL before attempting to use
the userspace array.

Fixes: 017dde0d1c ("v3d: Use DRM_IOCTL_V3D_GET_COUNTER to get perfcnt information")
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31552>
2024-10-09 15:51:51 -03:00
Zhang He
5d7f3753d7 iris, crocus: fix a typo and break comment line correctly
Signed-off-by: Zhang He <zhanghe9702@163.com>
Reviewed-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/31557>
2024-10-09 17:56:23 +00:00
Christian Gmeiner
04521c14b0 etnaviv: Improve split sampler check
Check if the block size is bigger then 64. We want to block
e.g. one of the following formats:
 - R32G32B32A32_FLOAT
 - R32G32B32A32_SINT
 - R32G32B32A32_ZINT

Unbreaks e.g. dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgb16i

Fixes: e481c1269c ("etnaviv: disable 64bpp render/sampler formats")
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/27111>
2024-10-09 15:17:33 +00:00
Juan A. Suarez Romero
992ada2f8f v3d: add new flake
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31572>
2024-10-09 09:17:36 +02:00
David Heidelberg
2c31b9e6c2 ci/piglit: keep the include_test.h used for OpenCL testing
Since https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/956
the file is shipped properly, preserve it in MesaCI too.

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31549>
2024-10-09 01:55:12 +00:00
Samuel Pitoiset
336f80137d radv: fix conditional rendering with DGC preprocessing on compute
Preprocess now must use the same conditional rendering state as the
execute, so the DGC prepare shader must reset the number of sequences
to generate an empty cmdbuf for compute.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31563>
2024-10-08 12:35:16 -04:00
David Rosca
89ea2b6c26 radeonsi/vcn: Don't hardcode nal_ref_idc
For slice header use the value parsed by frontend.
For SPS and PPS directly output first NAL byte from packed header.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31354>
2024-10-08 15:24:36 +00:00
David Rosca
8880f0f141 radeonsi/vcn: Use correct initial DPB size for HEVC encode
sps_max_dec_pic_buffering_minus1 specifies the maximum number of
references, same as H264 max_num_ref_frames.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31354>
2024-10-08 15:24:36 +00:00
David Rosca
88c134d496 radeonsi/vcn: Allow per-frame QP and max frame size changes
Also don't reset QP values when rate control changes because
QP is ignored with rate control enabled anyway.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31354>
2024-10-08 15:24:36 +00:00
Rob Clark
85d7826afa freedreno/ir3: Add more cat1 float-immed cases
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31446>
2024-10-08 13:50:05 +00:00
Rob Clark
8ddfe9cfc8 freedreno/ir3: Fix cat1 parser ambiguity vs FLUTs
The lexer can't really tell the difference.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31446>
2024-10-08 13:50:05 +00:00
Rob Clark
0633a23dc9 freedreno/ir3: Add half-FLUT cases
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31446>
2024-10-08 13:50:05 +00:00
Rob Clark
771fe03787 freedreno/ir3: Fix GPU name in disasm test
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31446>
2024-10-08 13:50:05 +00:00
Lucas Stach
a422ebc500 etnaviv: flush shader caches when UBO content is modified
Shader load/stores are cached by the shader L1 cache. As UBOs on etnaviv
are implemented as regular loads from the constant buffer, this cache
needs to be flushed whenever the content of a constant buffer is modified.

Fixes most of the currently failing dEQP-GLES3.functional.ubo.* on GC3000.

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/31527>
2024-10-08 10:32:16 +00:00
Tapani Pälli
78b614b333 anv: add depth, DC and L3 fabric flush for aux map invalidation
These should be included according to table in Bspec 43904.

Patch removes PIPE_CONTROL_STATE_CACHE_INVALIDATE based on HSDES.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764>
2024-10-08 08:45:40 +00:00
Tapani Pälli
3e29ea69ce iris: add depth, DC and L3 fabric flush for aux map invalidation
These should be included according to table in Bspec 43904.

Patch removes PIPE_CONTROL_STATE_CACHE_INVALIDATE based on HSDES.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764>
2024-10-08 08:45:40 +00:00
Tapani Pälli
11774075a3 iris: add plumbing/support for L3 fabric flush
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764>
2024-10-08 08:45:40 +00:00
Tapani Pälli
e3814dee1a anv: add plumbing/support for L3 fabric flush
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764>
2024-10-08 08:45:40 +00:00
Tapani Pälli
03f762f90c intel/ds: add L3 fabric flush support
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764>
2024-10-08 08:45:40 +00:00
Tapani Pälli
8cb08830e6 intel/genxml: introduce L3 Fabric Flush for gfx12
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764>
2024-10-08 08:45:40 +00:00
Peyton Lee
0dacdba804 radeonsi: correct map and unmap function timing
The timing of buffer map and unmap is wrong.
Correct the usage of map and unmap function.

Signed-off-by: Peyton Lee <peytolee@amd.com>
2024-10-08 13:44:24 +08:00
Samuel Pitoiset
5bd825a4b8 vulkan: fix merging bind sparse submits together
Looks like this was completely broken because what we want is to merge
first/second binds to the merged object.

This fixes new CTS dEQP-VK.sparse_resources.image_sparse_binding.*.

Fixes: bba6bf33a8 ("vulkan/queue: Merge submits when possible")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31545>
2024-10-07 15:59:42 +00:00
Mike Blumenkrantz
e46dffddb1 util/vbuf: rename/consolidate some bools
now that the pipe caps are unified, this makes reading a bit easier

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/31482>
2024-10-07 13:09:59 +00:00
Mike Blumenkrantz
d008aaa6da gallium: rework vbuf alignment pipe caps
this consolidates 4 pipe caps into 1 using an enum

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31482>
2024-10-07 13:09:59 +00:00
Samuel Pitoiset
afe28429f9 zink/ci: update list of expected failures for NAVI10
Looks like this test is also fixed on NAVI10.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31543>
2024-10-07 12:33:41 +00:00
Samuel Pitoiset
1cbc316999 radv: remove RADV_THREAD_TRACE_TRIGGER completely
SteamOS switched to VK_MESA_TRACE_TRIGGER since a while.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31539>
2024-10-07 11:42:38 +00:00
Samuel Pitoiset
2e66ab265d radv: squash radv_get_memory_fd() with radv_GetMemoryFdKHR()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31539>
2024-10-07 11:42:37 +00:00
Samuel Pitoiset
78666f1caf radv: remove RADV_MAX_DRM_DEVICES
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31539>
2024-10-07 11:42:37 +00:00
Daniel Schürmann
19583023a2 aco/ra: remove unnecessary check for duplicate precolored operands
An instruction can have at most one operand precolored to the same register.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31362>
2024-10-07 07:00:20 +00:00
Daniel Schürmann
9b2c4c4644 aco/ra: manually fill killed operands when required
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31362>
2024-10-07 07:00:20 +00:00
Daniel Schürmann
b530b67c73 aco/ra: add RegisterFile::fill_killed_operands(Instruction*) helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31362>
2024-10-07 07:00:20 +00:00
Daniel Schürmann
1499848487 aco/live_var_analysis: don't test whether phis are assigned to VCC
This check is redundant.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31362>
2024-10-07 07:00:19 +00:00
Daniel Schürmann
1d3e01cd62 aco: remove Program::allocationId
It is a duplicate of temp_rc.size().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31362>
2024-10-07 07:00:19 +00:00
Daniel Schürmann
39fc327b8f aco/reindex_ssa: remove update_live_out parameter
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31362>
2024-10-07 07:00:19 +00:00
Daniel Schürmann
bc2d166b50 aco/lower_to_hw: don't allocate new temporaries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31362>
2024-10-07 07:00:19 +00:00
Daniel Schürmann
30e7644e5f aco: simplify Definition constructors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31362>
2024-10-07 07:00:19 +00:00
Erico Nunes
b339c525f4 Revert "ci/lima: Temporarily disable"
The lab was disabled because new changes in our LAVA infrastructure
assumed there was a caching proxy configured, and the lima farm didn't
configure any.
To fix this, we actually implement a caching proxy so it should also
speed up some downloads now.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31537>
2024-10-06 09:54:30 +00:00
Erico Nunes
b274e32de3 lima/ci: update piglit ci expectations
Some tests were affected during lima lab downtime.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31537>
2024-10-06 09:54:30 +00:00
Erico Nunes
e60c735594 lima/ci: define FDO_HTTP_CACHE_URI for caching-proxy
This did not use to exist in the lima lab, but it does now.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31537>
2024-10-06 09:54:30 +00:00
Karol Herbst
f3f4f0fb83 docs: document gallium-rusticl-enable-drivers
Reviewed-by: David Heidelberg <david@ixit.cz>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31202>
2024-10-05 22:13:12 +00:00
Karol Herbst
1301d61de4 rusticl: allow devices to be enabled by default
Reviewed-by: David Heidelberg <david@ixit.cz>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31202>
2024-10-05 22:13:12 +00:00
Alyssa Rosenzweig
911606081f hk: drop gunk
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
6f3d9cba75 hk: fail probing silently
so we don't spam qualcomm devices

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
921aeeaf5d hk: check arch in pipeline cache
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
870dbfae12 hk: drop FSR todo
idk if we'll even do this ext.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
423318b7b2 hk: support geom/tess subgroups
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
76e18c23de hk: fix store_op_none
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
71d76c318d agx: inline texture states into EOT
fixes extra moves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
a0c9cba600 asahi: rm include
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
57c357befb hk: advertise KHR_dynamic_rendering_local_read
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
9845e01f0f asahi,hk: implement remapping in epilog
for DRLR

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
03a81d79f8 hk: Reset rendering attachment locations in BeginCommandBuffer/Rendering
backport of b1abf771c7 ("nvk: Reset rendering attachment locations in
BeginCommandBuffer/Rendering")

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
d741adf1f3 hk: perf debug some meta
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
713aa46a8e hk: perf debug resolves
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
071f4ba651 hk: drop #include
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
eaaf2d494c hk: use real opaque black with integers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
ac2531225a util,hk: add border colour driconf
* DXVK lacks the problematic rgba4 formats. It can use opaque black.
* lots of games dont use custom colours. Skip the emulation.

Not a general solution but speeds up a few things, and buys me some time.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
fb8fb77835 hk: reformat driconf
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
3a0e5335c9 hk: enable compressed MSAA
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
8c599576b3 hk: fix emrt compressed msaa arrays
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
698a1f1b63 hk: end pregfx even if there's no gfx
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
e965d4e695 hk: fix eMRT decompress of msaa
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
cc7a4dca7a hk: use vk_meta for compressed MSAA copies
these don't work with imgwblk for some reason, idk why but apple uses PDM blits
here. just fall back to vk_meta.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
d1db047fb3 hk: optimize !robust VBO
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
1d195b2074 asahi: optimize !robust VBO
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
db36ece9dd asahi: optimize !robustness with soft fault
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
d5ec115260 hk: reduce heap size
at least until our swapping is better in the kernel.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
3a13e318de hk: parametrize sysmem heap fraction
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
d959346780 hk: add norobust test
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
0d9ac1299d hk: add =batch perftest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
13b50d709b hk: add nobarrier test
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
b669e24040 hk: split out HK_PERFTEST
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
cbd9cb04cf agx: fix load_first_vertex
base vertex is GL, first vertex is VK. because we missed this check, VK (but not
GL) shaders using first vertex (but not base instance) would not get that flag
set and so hk wouldn't bother uploading the draw parameters, so first_vertex
would read garbage.

because vertex ID is defined differently between the Khronos and Microsoft APIs,
every complex DXVK vertex shader will implement vertex ID with a subtraction of
first vertex.

forcing geometry shaders worked around the bug, because IIRC geometry shaders
also force the draw parameter upload path for $REASONS. maybe

disabling preambles changed symptoms simply because the uniform file looked
different, and we were reading uninitialized garbage regardless writing stuff in
preambles would maybe change the garbage for other draws or something.  (Not
sure on the details but the physical uniform registers I guess get reused over
the lifetime of a shader core and never zero initialized) So we were reading
uninitialized garbage and yeah everything blows up

Anyway. I just wasted too much of my life on this.

This single line of code fixes rendering in every DX11 game. that's probably not
an exaggeration.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
f786bcc8c2 hk: add helper to dump draw
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
d56bfdc54c hk: fix ZLS across split CRs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
e092e1c5bb hk: fix partial EOT program
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
ee96ab6976 hk: fix shadowing
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
b1da16ccc9 agx: validate RA
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
f511c06ba0 agx: fix shuffles of vectors
a real bug caught by RA validation! wow!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:13 +00:00
Alyssa Rosenzweig
ab8d1cfe95 agx: commonize ra_class
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
a07faaf6c9 agx: lower swaps late
for RA validation

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
6f1c275c94 agx: produce regful SSA in RA
for validation

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
13191efa86 agx: assert a subtle invariant
we should probably be more explicit about this ...

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
ce2067b41c agx: strengthen assert
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
00a5d32d60 agx: reset kill bits in liveness
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
4b46314133 agx: add reg to agx_index
for validation

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
f19e387c2b agx: fix shuffling with partial clobbered vector
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
71448e391a agx: add another RA torture mode
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
819bd2ea62 agx: factor out insert_copy
commonize the scalarization logic.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
f8af6397de agx: commonize reg_to_ssa update
this skips an update in the live-in path but that's ok by the invariant defining
the reg_to_ssa array

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
34a000dbe0 agx: use reserved_size more
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
4e8f4bc4b0 agx: fix corner with uniform source lowering
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
d0b0485b6c agx: gimme c23
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
5f2df312b7 hk: flush with events
Not sure if strictly needed. Revisit when we rework pipeline barriers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
e0b83ecaa6 hk: drop dead
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
196fcb9d3c hk: fix tess with notess
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
f39d1bc945 agx: add unit test for tricky backwards phi case
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
93f2398685 agx: fix backwards copyprop with phis
Fixes issue in Control.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
bef3655d06 agx: expand macro
nfc

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
372580086e hk: bump max input/output components
apparently webgpu wants this

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Mary Guillemard
b130a129de hk: Implement global priority extensions
This wires other priorities than medium and exposes
VK_EXT_global_priority / VK_EXT_global_priority_query.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
8b3e8106c3 agx: don't propagate constants from trivial phis
fixes a pack assert.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
7ab777a959 agx: print pack assertions to stderr
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
eff48b9826 agx: fix shuffling with large reserved region
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
f14d5b5fd8 agx: don't reserve regs if we won't use them
reduces live range splitting in the remat-only case. this could still be
improved.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
c500242b90 agx: fix corner case scratch allocation
if we call into the spiller but it rematerializes enough to eliminate all
spilling, we don't need to allocate any scratch. correct our accounting for this
case to avoid the allocation.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
ea856ccec0 agx: quiesche assert with r1l preload
fixes spilling in sample shaded frag shaders. this depends on the ABI
change in the last commit to be valid in the presence of subgroup ops.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
7faca2220c asahi: move sample mask to r1l
r0h is used for subgroup shuffles already.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
702c038b91 asahi: #define the ABI
This is a lot more readable, and lets us adjust the ABI in a central place
(except the README..)

No functional change

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
edc8ef7412 agx: use reserved_size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
3d48658fe3 agx: split up optimizer
validate in the middle

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
5abdce5af5 agx: add pass manager
validate more often, like NIR does.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
3a25c1241b agx: validate sizes are consistent in the IR
subtle correctness requirement for the spiller.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
981ff77431 agx: validate phi sources are defined
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
f9201eb7d3 asahi,hk: fix st_tile mask size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
ad48cd2759 asahi: fix AGX_MAX_OCCLUSION_QUERIES
it's 256kb / 8 = 32k

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
225797601b asahi/genxml: add nicer error checking
avoids digging into backtraces for basic info. lot of bang for buck here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
3a0e152de2 agx: add helper to visualize reg file
I used to do these by hand. Example print:

   ---- ---- 1... .... 22.1 4444 2222 2222 2222 2222

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
4f5637c873 agx: fix RA shuffling algorithm
to guarantee that we find a shuffle, we need to shuffle in descending order of
alignment. this ensures we don't refragment the part of the register file we're
attempting to defragment. rewrite the shuffle code accodingly, using a worklist
that picks a largest variable to shuffle at each iteration.

fixes crashes with =spill.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
fb3e11ac1a agx: factor out reserved_region
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
0bd23366b1 agx: use padding helper
avoids data type splat

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
5bb99b1104 agx: add helper to pad 16-bit to 32-bit
this is a bit tricky to get right

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
92d7ecb98c agx: fix spilling around exports
need to hoist the reloads.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
eae4c50be9 agx: add spilling debug helpers
I keep typing these

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
8f6ba21627 hk: fix =spill with tess
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
4ca52cde7a agx: increase lower vars to scratch thresh
should reduce silliness.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:12 +00:00
Alyssa Rosenzweig
fde518e3f3 asahi: add nosoft debug
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
665be681ad asahi: add tess assert
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
8f3caec5dc agx: handle hw tess eval shaders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
b621b8e3dd asahi: optimize trivial load_invocation_id
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
049808630e asahi,hk: disable rgb32 buffer textures
gl weirdness.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
b586c294fc asahi: fix speculation of rgb32 loads
kinda silly but hey.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
8b8c724b9e asahi/lower_vbo: optimize robustness2
with softfault

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
9b3216f61b agx: clean up packs from bounds check
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
5b86a55f10 agx: optimize robust access
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
37aeeff9a6 hk: smarten bounds check lowering
optimize 1 case and use bounds_agx so the compiler can optimize the other.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
0376c1930b hk: clean up before lowering bounds checks
for next patch

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
6287346482 agx: handle bounds_agx
fallback when optimization fails.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
802c30beab hk: use 0 pointer for 0-sized buffers
allows eliding bounds checks

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
675b876b8c asahi: carveout lower VAs
for cheaper bounds checks.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
6287c8251d nir: add bounds_agx opcode
used to facilitate bounds checking optimization

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
b1e5e73011 hk: run opt_access
saves a barrier in a CTS test.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
ad8f005ecb hk: parallelize after-graphics available sets
reduces cdm overhead.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
a2edffad2f hk: assert batches are nonempty
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
0d5b76113e hk: optimize out empty VDM batches
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
a01a010255 hk: optimize empty tiles
setting ASAHI_RENDER_PROCESS_EMPTY_TILES is very expensive, so do it less.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
291dd9c3d5 hk: soup up =perf
Lots and lots more slow paths annotated, plus statistics.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
f7d3cd0a3e hk: add noborder perf test
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
f7c1097e7b hk: add notess perftest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
3d1d1baa07 hk: mutex shader compiles when debugging
make the prints readable.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
d0a3856771 hk: clarify spilling
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
a1d0f1dc4b hk: drop dead
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
0322ccda4c hk: fix phi ordering
undefined argument order means phis are busted. fixes crash starting castle
crashers with an i386 gcc build of hk.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
c69fd49728 hk: fix oq availability set
by inspection.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
dfafe5267e hk: fix vertex clustering
this fixes fails in
dEQP-VK.memory.pipeline_barrier.host_write_vertex_buffer.1048576_vertex_buffer_stride_2
with clustering. I have no idea why. Not questioning it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
cdf7eb21dc hk: fix loop submit with NONE
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
aafd78830b hk: shush gcc warning
it's bogus but whatever.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
dee089e9c2 hk: fix ptr cast
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
9fab9c8979 hk: fix debug cache key
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
75639cf4e5 hk: quiesce gcc uninitialized var warning
it's bogus, but shrug.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
fe75c95204 hk: fix weird formatting
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
169acb1170 agx: clarify spill lowering math
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
e16ad50bfa agx: allocate scratch in spilling unit test
for assertion

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
2600224f77 agx: clarify scratch size units
bytes, not words.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
d21bc62f4d agx: fix =spill
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
4e3a5f0e60 agx: fix spilling in i686 builds
../src/asahi/compiler/agx_pack.c: In function ‘agx_pack_instr’:
../src/asahi/compiler/agx_pack.c:1074:38: warning: left shift count >= width of type [-Wshift-count-overflow]
 1074 |          ((uint64_t)q4 << 42) | (1UL << 47) | // XXX
      |                                      ^~
../src/asahi/compiler/agx_pack.c:1110:43: warning: left shift count >= width of type [-Wshift-count-overflow]
 1110 |          ((uint64_t)i5 << 44) | (L ? (1UL << 47) : 0) |
      |                                           ^~
../src/asahi/compiler/agx_pack.c:1131:64: warning: left shift count >= width of type [-Wshift-count-overflow]
 1131 |          ((uint64_t)((I->stack_size >> 4) & 0xF) << 32) | (1UL << 47) | // XXX

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
8f9cf43828 asahi/virtio: fix allocate-with-alignment
fixes crashes when spilling inside the microVM:

../src/asahi/lib/agx_scratch.c:176: void agx_scratch_realloc(struct agx_scratch *): Assertion `!(blocks_gpu & (block_size_bytes - 1))' failed

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
e0cda48a90 asahi/virtio: fix ptr cats
../src/asahi/lib/decode.c:933:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  933 |       (void *)c->vertex_attachments;
      |       ^
../src/asahi/lib/decode.c:941:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  941 |       (void *)c->fragment_attachments;

etc

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
9bd3a854e6 asahi/decode: fix ptr casts
../src/asahi/lib/decode.c:933:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  933 |       (void *)c->vertex_attachments;
      |       ^
../src/asahi/lib/decode.c:941:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  941 |       (void *)c->fragment_attachments;

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
88a0da6b7c asahi: identify factor buffer size
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
bbad4454bf asahi: fix UB affecting x86 builds
dEQP-VK.robustness.image_robustness.bind.notemplate.r32f.unroll.nonvolatile.sampled_image.no_fmt_qual.img.samples_1.2d_array.comp

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
673f56fcb1 libagx: drop unused arg
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:11 +00:00
Alyssa Rosenzweig
8d95f584da libagx: simplify tcs out calc
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
9cfffc5e86 libagx: cleanup loop vars
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Asahi Lina
01ef3152c9 agx: Fix implicit sync for virtgpu
The asahi kernel driver is a pure-explicit-sync driver and userspace is
required to handle implicit sync itself, by importing/exporting fences
in shared dma-bufs. Mesa handles this in its own native or guest
context, but dma-buf fences are not shared between the guest and the
host, so this breaks implicit sync across the VM boundary.

To make this work, explicitly pass a resource list to the host so it can
perform the implicit sync dance, like we do in agx_batch.c. This
essentially turns the virtgpu protocol into an implicit sync protocol
(like many other legacy GPU drivers), which makes sense here since we
don't particularly have the primitives to pass through and manage "host"
syncobjs that we'd need to do it at that level.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
6f3c1c909b hk: don't leak GS subparts in an error path
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
568f0a81c6 hk: don't leak GS rast with rast disc
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
2dbd6c440f hk: don't leak NIR with VS/GS
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
332a97cc34 hk: free large_bos
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
cd66a6813b agx: plumb COHERENT
set the magic caching bits. this fixes memory model fails on g13d.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
d4e34bc829 agx: pull out the big hammers for device-barriers
g13d.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
f67db39aef hk: lower memory model
we don't know how to flush caches on g13d and we don't want to try either.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
0ac160e1c4 hk: ban compression with feedback loops
affects dEQP-VK.pipeline.monolithic.attachment_feedback_loop_layout.sampler.sampled_image.image_type.2d.format.d16_unorm_depth_read_write_different_areas

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
2f2effcb7e hk: fix attachmentless multisampling tile sizes
fixes dEQP-VK.pipeline.monolithic.framebuffer_attachment.no_attachments_ms on
g14c. it's unclear to me how this passed on g13g, though.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
2f0935459f asahi: add tib sample setter helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
f3a407344d hk: quiet gcc warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
57aabdb159 hk: drop bad comment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
a830037638 hk: drop some dead code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
3e8b8fadb0 hk: switch to vk_meta for buffer copies
no reason not to.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
6604fc8d88 hk: advertise modifiers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
52fcd0412a hk: disable mods on funny float formats
Honeykrisp version of b78a691ce2 ("nil,nvk: Disable modifiers for
B10G11R11_UFLOAT and E5B9G9R9_UFLOAT").

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
3a3a0c97f6 hk: handle compression modifiers
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
4ddfc1cfdd ail: pull in DRM modifier helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Alyssa Rosenzweig
b01d53d95a hk: add missing dep
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
Georg Lehmann
07032102e9 aco: use s_pack_lh for bitfield_select(0xffff)
Foz-DB Navi31
Totals from 13 (0.02% of 79206) affected shaders:
Instrs: 44871 -> 44838 (-0.07%)
CodeSize: 223804 -> 223608 (-0.09%)
Latency: 220186 -> 220191 (+0.00%); split: -0.01%, +0.02%
InvThroughput: 54169 -> 54186 (+0.03%); split: -0.00%, +0.03%
SALU: 5048 -> 5023 (-0.50%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31509>
2024-10-05 17:55:08 +00:00
Georg Lehmann
a6f82cf16d aco: use s_pack_hl for shfr16
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31509>
2024-10-05 17:55:08 +00:00
Sergi Blanch Torne
27dbaccb5c Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 686459f115.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31530>
2024-10-05 16:32:51 +00:00
Ganesh Belgur Ramachandra
cc27e3ea29 amd: remove the redundant target library info instance in LLVM compiler
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30506>
2024-10-05 09:10:06 +00:00
Ganesh Belgur Ramachandra
0a352a838a amd,radeonsi: reduce legacy::PassManager use to only run backend passes
The legacy::PassManager is only required to run backend optimizations
and for code generation. It should be deprecated when the new PM
can handle code generation on its own.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30506>
2024-10-05 09:10:06 +00:00
Ganesh Belgur Ramachandra
38e50221cd amd,radeonsi: use new pass manager to handle midend optimizations
Adds an optimizer structure that builds an optimization
pipeline to run LLVM passes using the new pass manager.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30506>
2024-10-05 09:10:06 +00:00
Sergi Blanch Torne
686459f115 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2024-10-05 05:00 UTC
* End: 2024-10-05 19:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31461>
2024-10-05 04:16:54 +00:00
Carlos Santa
39e3015c36 intel/hang_replay: remove EXEC_OBJECT_WRITE
This flag causes the following failure:

total_vma: 0x0000000071c9d000
fail to set context hw img: Invalid argument

Fixes: bab52763f4 ("intel/hang_replay: fix batch address")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11959
Signed-off-by: Carlos Santa <carlos.santa@intel.corp-partner.google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31494>
2024-10-04 21:37:41 +00:00
Carlos Santa
700141da43 intel/hang_replay: fix the typo in the ioctl call
What we really want to pass is DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM
vs DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM

Fixes: a9f1151de2 ("intel/hang_replay: use hw image param")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11959
Signed-off-by: Carlos Santa <carlos.santa@intel.corp-partner.google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31494>
2024-10-04 21:37:41 +00:00
Alyssa Rosenzweig
5fe3f57d3f vulkan: export vk_robustness_disabled
HK will use this for a HK_PERFTEST=norobust flag.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31466>
2024-10-04 17:52:10 +00:00
Alyssa Rosenzweig
1a2827e401 vulkan: merge driver internal bits
no reason for hk and vk_meta to diverge here.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31466>
2024-10-04 17:52:10 +00:00
Alyssa Rosenzweig
07470d19dd zink: fix buffer view clamp overflow
dEQP-GLES3.functional.texture.specification.teximage2d_pbo.rgba32ui_cube
asserting on hkz

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31306>
2024-10-04 17:11:52 +00:00
Alyssa Rosenzweig
f7d45cb362 tu/virtio: silence startup spam on asahi
quiet a big pile of:

TU: error: ../src/freedreno/vulkan/tu_knl_drm_virtio.cc:1299: could not get connect vdrm: No such file or directory (VK_ERROR_INCOMPATIBLE_DRIVER)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31243>
2024-10-04 16:30:17 +00:00
Alyssa Rosenzweig
78a202157e virtio/vdrm: don't spam
number of log splat would be proportional to # of enabled vdrm drivers
otherwise. silences a pile of

   MESA: info: wrong context_type: 2

Signed-off-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/31243>
2024-10-04 16:30:17 +00:00
Samuel Pitoiset
0503975363 radv: fix image view descriptors for samplers on GFX6-8
On GFX6-8, there are some cases where the view must use mip0 and
minified image sizes. Otherwise, samplers use BASE_LEVEL=level and
image sizes.

Note that CB/DS surfaces use minified image sizes because the mip
level can't be set in registers.

This fixes an issue uncovered by c87ce78d10 ("ac/surface: enable
thick tiling for 3D textures for better perf on gfx6-8"). But it
also fixes a bunch of Zink failures specific to GFX6-8.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11112
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31363>
2024-10-04 14:59:31 +00:00
Samuel Pitoiset
0ac5e3c9b1 radv: update image view extent for non-compressed views earlier on GFX10+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31363>
2024-10-04 14:59:31 +00:00
Karmjit Mahil
581c99b30c ir3: Use foreach_instr_safe in ir3_shared_folding
When processing the last instruction prior to the block terminator,
ir3_shader_folding can append a new instruction prior to the
terminator, so the `current_instruction->next == new_instruciton`
instead of `current_instruction->next == terminator` which leads
to the assert in `foreach_instr` being hit, so use
`foreach_instr_safe`.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31478>
2024-10-04 13:49:57 +00:00
Mike Blumenkrantz
5ba00df1f9 anv: add VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 to modifier exceptions
this is implemented

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31516>
2024-10-04 13:22:08 +00:00
Sergi Blanch Torne
6c94c24978 ci: Disable gk20a-gles
This job may have some issue with its FDO_HTTP_CACHE_URI to download the
artifacts from S3.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11973
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31522>
2024-10-04 12:52:58 +00:00
Eric Engestrom
828319a8d5 ci/build: mention the .build-for-tests-jobs exception
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31486>
2024-10-04 11:18:58 +00:00
Eric Engestrom
9ed5bad644 ci/build: move debian-build-testing to priority build-for-tests stage
The shader-db test job uses it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31486>
2024-10-04 11:18:58 +00:00
Eric Engestrom
b9f0586b8d Revert "ci/build: move debian-clang-release to priority build-for-tests stage"
This reverts commit 480793be98.

I got my wires crossed somehow, I meant to move `debian-build-testing`.
Just reverting the mistake here, and then doing the right change in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31486>
2024-10-04 11:18:58 +00:00
John Anthony
2ffc05d8d2 panvk: Add support for CmdDispatchIndirect
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11885
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31370>
2024-10-04 10:31:11 +00:00
John Anthony
8855f31962 panvk: Pull out task axis and increment calculation for dispatch
Moves some some code specific to CmdDispatchBase out of cmd_dispatch and
into a new function.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31370>
2024-10-04 10:31:11 +00:00
John Anthony
67f0c35c9d panvk: Add cmd_dispatch
Moves most of the implementation of CmdDispatchBase into a new static
function cmd_dispatch which will also be used by CmdDispatchIndirect
once implemented.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31370>
2024-10-04 10:31:11 +00:00
John Anthony
ba36333fd8 pan/kmod: Add max_tasks_per_core to kmod props
max_tasks_per_core is available via the THREAD_FEATURES register.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31370>
2024-10-04 10:31:10 +00:00
Christian Gmeiner
2675a2fae7 etnaviv: Enable ARB_draw_buffers_blend for HALTI5+
Starting with HALTI5 we have per-buffer blend functions.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
acd3faa463 etnaviv: Enable EXT_draw_buffers2 for HALTI5+
Starting with HALTI5 we have per-buffer blend enable and mask.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
bf70a992b1 etnaviv: Report correct PIPE_CAP_MAX_RENDER_TARGETS value
The basic logic is taken form npx's linux-imx git repository (branch lf-6.1.1-1.0.0).
I have removed the support for 16 MRTs (gcv880/0x5124/0x103) and the gcv900/0x5250 case
for 8 MRTs.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
928a276b78 etnaviv: Limit max supported render targets
We want to use some render targets for internal use. For instance, the
blob uses two render targets for GL_RGBA32F emulation.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
6b154706f3 etnaviv: TS usage for MRT needs HALTI2
I have not seen any usage of TS when MRTs are used in my traces for
GC2000. I think that this is related to gcvFEATURE_MRT_TILE_STATUS_BUFFER
found in some galcore kernel headers.

We need to take extra care as those render targets might already have valid
TS state, because they have been fast cleared or have been rendered to with
a state that did allow TS usage.

Fixes piglit's related to MRTs on GC2000.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
2df17da0c3 etnaviv: Relink shader when framebuffer state changed
We need to apply a new output mapping.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
c6ad3f3ded etnaviv: shader: Apply output saturation
The saturation bits for render targets 4-8 are stored PS_OUTPUT_REG[1].

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
9a082ae142 etnaviv: shader: Apply output remapping
The mapping between fragment shader output and and render target is not
fixed and depends on the framebuffer state. Apply the mapping during the
linking of the shaders.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
d3a5306b91 etnaviv: blt: Extend to support MRTs
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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
1ad37d42be etnaviv: rs: Extend to support MRTs
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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
54e841bfe4 etnaviv: blt/rs: Just pass the color to the callee
Accessing the color with an index that will be in range of
[0..nr_cbus) is wrong. Just pass the clear color down to
the callee.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
07cd0f2306 etnaviv: blend: Add support for MRTs
Adds also the handling of independent_blend_enable that is supported by
HALTI5+ GPUs.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
ec7a962e3a etnaviv: blend: Move logicop_enable assignment
With this change the next one will look nicer.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
1e4ad853df etnaviv: blend: Store information per render target
This is a prep change to add MRT support.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
c9158f5aab etnaviv: Emit PS_OUTPUT_REG2 if num_rt is 8
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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
0de929e73e etnaviv: Emit MRT states
We do not need to emit states for render targets 1..7 as
the GPU only processes up to VIVS_PS_CONTROL_RT_COUNT(..) ones.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
d70531ca93 etnaviv: Extend etna_update_ts_config(..) for MRTs
Sadly there is quite some use if's as the TS config values are different
for rt0 and the rest.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
2436babbd2 etnaviv: Extend etna_set_framebuffer_state(..) for MRTs
The GPU needs all the active (non-null) render targets in a
contiguous representation. For instance, if fb->nr_cbufs is 4 but
fb->cbufs[0] and fb->cbufs[1] are null we need to program the GPU that
fb->cbufs[2] is configured via PE_COLOR_FORMAT and friends and
fb->cbufs[3] via PE_RT_CONFIG[0] and friends.

We need to keep track which render target is used as we need to update
the fragment shader output mapping.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
546c4b992c etnaviv: Extend etna_update_zsa(..) for MRTs
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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
64b78ef9c2 etnaviv: Extend etna_update_blend_color(..) for MRTs
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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
5598a449f1 etnaviv: Extend etna_record_flush_resources(..) for MRTs
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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
f070d44add etnaviv: Extend compiler for MRTs
We will see multiple fragment outputs when MRTs are used. Keep
track of the registers for the outputs.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
035a100246 etnaviv: Extend compiled_shader_state for MRTs
We can have up to 8 MRTs (depending on HALTI) and we need
more two uint32_t in total. Just convert PS_OUTPUT_REG to
an array and change the code that works with it.

This is just prep change for MRT support.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
4e83236ced etnaviv: Extend frag_rb_swap for MRTs
We need to handle rb_swap for every color buffer.

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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
594f38bde6 etnaviv: Call etna_resource_level_mark_changed(..) for all rts
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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
63bae5940f etnaviv: nir: Make use of reported number of render targets
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/26565>
2024-10-04 09:48:24 +00:00
Christian Gmeiner
4b01e9056d etnaviv: Report number of render targets
At the basic infrastructure to report the number of supported
render targets. etna_determine_num_rts(..) will be extended later
to report correct numbers based on GPU's capability.

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/26565>
2024-10-04 09:48:23 +00:00
Christian Gmeiner
3e6f178734 etnaviv: nir: Make use of nir_lower_fragcolor
This is a prep step to be able to use nir_lower_blend(..) and
also simplifies the compiler a little bit.

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/26565>
2024-10-04 09:48:23 +00:00
Christian Gmeiner
a83b816f03 etnaviv: Update headers from rnndb
Update to rnndb commit 8a5797f25d90.

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/26565>
2024-10-04 09:48:23 +00:00
Lucas Stach
c12697abe0 etnaviv: re-emit uniforms on sampler view changes when txs is used
The shader uniforms used for emulating TXS depend on the current
sampler view state and thus need to be re-emitted when this
states changes.

Fixes: 88f399b651 ("etnaviv: nir: support intrinsic used for txs lowering")
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/31495>
2024-10-04 09:18:01 +00:00
Samuel Pitoiset
50f78e4a54 radv: remove GFX6-7 DGC support completely
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31491>
2024-10-04 07:58:37 +00:00
Samuel Pitoiset
e4f67f2106 radv: do not expose NV DGC extensions on GFX6-7
These extensions were experimental and only exposed with radv_dgc=true
for vkd3d-proton. Only two games require DGC (Starfield and Halo
Infinite) and both also require sparse support which GFX6-7 can't
support.

GFX6-7 support is also mostly broken because IB2 can't be used when
indirect draw packets are used and RADV uses that to preprocess IBO.
Also with the EXT, indirect draws are more common and can't be
supported.

Everything could work with a bunch of time and workarounds but I don't
think it's worth the effort given there is no real use.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31491>
2024-10-04 07:58:37 +00:00
Timothy Arceri
065b45e4dc glsl: remove linker.cpp
All functionality has now been converted to NIR or moved elsewhere.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31500>
2024-10-04 00:10:59 +00:00
Timothy Arceri
e4c3e7e0d8 glsl: rename link_shaders() -> link_shaders_init()
And move it to the linker util file.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31500>
2024-10-04 00:10:59 +00:00
Timothy Arceri
37ac8f5e79 glsl: move shader cache lookup call to st
The nir shader cache read call is just below this call now so the code
is easier to follow.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31500>
2024-10-04 00:10:59 +00:00
Timothy Arceri
b663eb83fe glsl: move error and warning helpers to util file
These functions are already defined in linker_util.h so moving them here
is logical.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31500>
2024-10-04 00:10:59 +00:00
Timothy Arceri
19c27c39b4 glsl/mesa: remove ir_uniform.h
We moved its contents elsewhere in a previous patch.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31500>
2024-10-04 00:10:59 +00:00
Timothy Arceri
13301e2509 glsl: move resource_name_updated() to linker_util.cpp
We want to remove the old linker.cpp file in following patches so move
this util function to the util code file.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31500>
2024-10-04 00:10:58 +00:00
Timothy Arceri
08e25e091b glsl/mesa: move uniform related shader structs to shader_types.h
This is where all the other uniform related structs are and these were
the only structs used by both the compiler and gl api that were defined
in the compiler code so lets move them to where everything else is
defined.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31500>
2024-10-04 00:10:58 +00:00
Faith Ekstrand
bba6bf33a8 vulkan/queue: Merge submits when possible
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25576>
2024-10-03 22:11:40 +00:00
Faith Ekstrand
c3bf1a67a1 vulkan/queue: Split vk_queue_submit into create and submit
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25576>
2024-10-03 22:11:40 +00:00
Faith Ekstrand
f0392779d9 vulkan/queue: Use a builder pattern for vk_queue_submit
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25576>
2024-10-03 22:11:39 +00:00
Faith Ekstrand
899c774b9a vulkan: Add a vk_queue_submit_has_bind() helper
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25576>
2024-10-03 22:11:39 +00:00
Faith Ekstrand
c95b646e23 vulkan/queue: Use _mem_signal_temp instead of signal_mem_sync
The two checks should be equivalent.  This just lets us use data in
struct vk_queue_submit rather than a local boolean.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25576>
2024-10-03 22:11:39 +00:00
Faith Ekstrand
267b7f1deb vulkan/queue: Move has_binary_permanent_semaphore_wait into the sumbit struct
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25576>
2024-10-03 22:11:39 +00:00
Faith Ekstrand
9b21dc06c4 vulkan/queue: Don't use vk_semaphore in threaded payload stealing
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25576>
2024-10-03 22:11:39 +00:00
Danylo Piliaiev
e5d3eba096 u_trace: Fix trace_payload_as_extra_func desync between drivers
Buffer with indirect args wasn't passed to the function which
adds extra event args. Since function definition depends on the
common code, the definition is moved to a single place.

Fixes: 0a17035b5c
("u_trace: add support for indirect data")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31090>
2024-10-03 20:25:48 +00:00
Nanley Chery
26692deefc anv: Delete stale comment for BLORP clear color addr
It looks like this comment attempted to describe all the reasons we need
to pass the clear color address to BLORP. This comment actually isn't
exhaustive and some bits are out of date (e.g., BLORP no longer updates
the clear color address for us). Let's just delete it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31136>
2024-10-03 19:41:31 +00:00
Nanley Chery
10bcfb63d5 anv: Prevent clear color modifier corruption with views
If a dmabuf is shared with a clear color, the raw clear color channels
generally won't be interpreted correctly during format reinterpretation.
So, prevent Vulkan apps from trying to use such dmabufs as mutable
format render targets. Also, prevent such apps from using such dmabufs
as blorp_copy() destinations if doing so would require format
reinterpretation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31136>
2024-10-03 19:41:31 +00:00
Nanley Chery
edfb33efdd intel/blorp: Use original surface format for some copies
In iris, this should avoid some partial resolves when copying between
images. In anv, this will reduce restrictions on dmabufs which have
clear color support in the next patch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31136>
2024-10-03 19:41:31 +00:00
Nanley Chery
73637dbce4 intel/blorp: Choose some copy formats independently
blorp_copy_get_formats() tries to make the source and destination view
formats match as much as possible. This avoids some casting in the copy
shader, but it makes determining the format that will be used for a
surface impossible without having the ISL surface for both that surface
and a source or destination.

We'd like to enable the Vulkan driver to know as early as possible what
format an image may be reinterpreted as for correctness. So, determine
the copy formats more independently and expose a helper which does so
for drivers.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31136>
2024-10-03 19:41:31 +00:00
Nanley Chery
6721064939 anv: Use image formats when copying to/from buffers
blorp_copy() will sometimes use a complex shader if the source and
destination surface formats differ. For example, it will do this when
both formats support CCS_E, but have differing numbers of
bits-per-channel.

To reduce the chance of using this complex shader during transfers
between images and buffers, ensure the same format is used. We can't
completely prevent the complex shader because a copy may happen between
surface formats that have a different number of bits-per-pixel.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31136>
2024-10-03 19:41:31 +00:00
Mike Blumenkrantz
f7b5faa1a2 zink: block srgb with winsys imports
these are already a set format

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467>
2024-10-03 19:06:02 +00:00
Mike Blumenkrantz
f3c206d61e zink: fix external_only reporting for dmabuf formats
this is based on format features

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467>
2024-10-03 19:06:02 +00:00
Mike Blumenkrantz
49950d3b2f zink: clamp out dmabuf exports from optimal tiling images
this is an impossible combo since optimal tiling cannot return stride

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467>
2024-10-03 19:06:02 +00:00
Mike Blumenkrantz
3c44886d9e zink: also init format props when getting modifier props
forgot this in earlier refactor

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467>
2024-10-03 19:06:02 +00:00
Mike Blumenkrantz
efeb65cfe8 zink: assert images aren't created with dmabuf export and optimal tiling
this is illegal

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467>
2024-10-03 19:06:02 +00:00
Mike Blumenkrantz
2fdba5b914 zink: block dmabuf fallback into optimal tiling
when modifiers are specified the frontend needs stride, and optimal
tiling cannot provide a stride

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467>
2024-10-03 19:06:02 +00:00
Faith Ekstrand
15fb18063b nvk: Fix a comment in SET_VIEWPORT_CLIP_CONTROL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31514>
2024-10-03 18:34:55 +00:00
Rhys Perry
96e7cd89ea aco: fix is_vector_intact for GFX11 BVH
fossil-db (navi31):
Totals from 44 (0.06% of 79395) affected shaders:
Instrs: 1539111 -> 1539109 (-0.00%); split: -0.00%, +0.00%
CodeSize: 7880452 -> 7880380 (-0.00%); split: -0.00%, +0.00%
Latency: 7578794 -> 7578844 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 1450872 -> 1450876 (+0.00%); split: -0.00%, +0.00%
VClause: 40014 -> 40010 (-0.01%)
Copies: 116005 -> 116001 (-0.00%); split: -0.01%, +0.01%
VALU: 854630 -> 854626 (-0.00%); split: -0.00%, +0.00%

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/31346>
2024-10-03 17:55:56 +00:00
Rhys Perry
24c60be1ad aco: create vector affinities for phi operands
fossil-db (navi21):
Totals from 2934 (3.70% of 79395) affected shaders:
Instrs: 8368484 -> 8365630 (-0.03%); split: -0.05%, +0.01%
CodeSize: 46032152 -> 45998480 (-0.07%); split: -0.09%, +0.01%
VGPRs: 200360 -> 200280 (-0.04%); split: -0.12%, +0.08%
Latency: 85556147 -> 85562615 (+0.01%); split: -0.09%, +0.10%
InvThroughput: 19066462 -> 19065173 (-0.01%); split: -0.09%, +0.09%
VClause: 209834 -> 209783 (-0.02%); split: -0.14%, +0.12%
SClause: 261811 -> 261826 (+0.01%); split: -0.00%, +0.01%
Copies: 727502 -> 724394 (-0.43%); split: -0.56%, +0.13%
Branches: 291083 -> 291120 (+0.01%); split: -0.01%, +0.03%
VALU: 5564021 -> 5560975 (-0.05%); split: -0.07%, +0.02%
SALU: 1100996 -> 1100942 (-0.00%); split: -0.02%, +0.02%

fossil-db (navi31):
Totals from 34207 (43.08% of 79395) affected shaders:
MaxWaves: 1036893 -> 1036781 (-0.01%); split: +0.01%, -0.02%
Instrs: 21977229 -> 21884600 (-0.42%); split: -0.47%, +0.05%
CodeSize: 112680884 -> 112298404 (-0.34%); split: -0.38%, +0.04%
VGPRs: 1590832 -> 1615912 (+1.58%); split: -0.25%, +1.83%
Latency: 142542601 -> 142670271 (+0.09%); split: -0.12%, +0.21%
InvThroughput: 19481055 -> 19434110 (-0.24%); split: -0.44%, +0.20%
VClause: 462865 -> 462558 (-0.07%); split: -0.20%, +0.13%
SClause: 619822 -> 619685 (-0.02%); split: -0.02%, +0.00%
Copies: 1704870 -> 1610889 (-5.51%); split: -5.89%, +0.38%
Branches: 518238 -> 518241 (+0.00%); split: -0.01%, +0.01%
VALU: 12230157 -> 12136112 (-0.77%); split: -0.82%, +0.05%
SALU: 2444075 -> 2444099 (+0.00%); split: -0.01%, +0.01%
VOPD: 3443 -> 3476 (+0.96%); split: +1.80%, -0.84%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11186
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31346>
2024-10-03 17:55:56 +00:00
Rhys Perry
1e60509135 aco: stop using instructions in ra_ctx::vectors
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/31346>
2024-10-03 17:55:56 +00:00
Eric Engestrom
87c9690d8d docs: add sha sum for 24.2.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31511>
2024-10-03 17:47:52 +00:00
Eric Engestrom
7791afe7d7 docs: update calendar for 24.2.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31511>
2024-10-03 17:47:52 +00:00
Eric Engestrom
34d02b9191 docs: add release notes for 24.2.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31511>
2024-10-03 17:47:52 +00:00
David Rosca
be9b9c5fc4 pipe: Remove video get_*_fence
Replaced now with fence_wait.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442>
2024-10-03 17:04:26 +00:00
David Rosca
206bd951b4 frontends/va: Use fence_wait instead of get_*_fence
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442>
2024-10-03 17:04:26 +00:00
David Rosca
a98aa21873 r600/uvd: Implement fence_wait
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442>
2024-10-03 17:04:26 +00:00
David Rosca
a511dc1dda d3d12: Implement fence_wait
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442>
2024-10-03 17:04:26 +00:00
David Rosca
9080741d8f radeonsi/vpe: Implement fence_wait
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442>
2024-10-03 17:04:26 +00:00
David Rosca
02bcdc7648 radeonsi/vcn: Implement fence_wait
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442>
2024-10-03 17:04:26 +00:00
David Rosca
135f780e57 radeonsi/uvd: Implement fence_wait
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442>
2024-10-03 17:04:26 +00:00
David Rosca
3cec5a84ca pipe: Add video fence_wait
This will be used to replace get_*_fence functions.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31442>
2024-10-03 17:04:26 +00:00
Tapani Pälli
ac00d97e31 anv: use mi_builder in CmdBeginTransformFeedbackEXT
Patch converts MI_LOAD_REGISTER_MEM, MI_LOAD_REGISTER_IMM to use
mi_builder in CmdBeginTransformFeedbackEXT.

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/31502>
2024-10-03 16:20:40 +00:00
Friedrich Vock
64c406774f radv/rt: Skip all AABB code when no_skip_aabbs is not set
This avoids having to execute the load_global just to throw the results
away and ignore the node.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31443>
2024-10-03 15:22:08 +00:00
Mike Blumenkrantz
b43a639fe7 zink: block all 2d view creation with sparse
this is illegal (for now)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31489>
2024-10-03 14:45:33 +00:00
Samuel Pitoiset
5ab8caf5e2 zink/ci: update expected list of failures on NAVI31
This one seems fixed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31506>
2024-10-03 14:11:03 +00:00
Erico Nunes
6659b299e6 v3dv: match render and display device for wsi present
Since the last changes for EGL_EXT_device_drm_render_node, the
can_present_on_device callback now may receive the render device.
With that, the v3dv implementation may return that this device cannot
be used for presentation.
In particular, this callback is used for x11 wsi, and when through
XWayland it does now get the render device. On x11 wsi, this makes the
swapchain operate on blit mode. The blit mode introduces additional
unneeded overhead on wsi and runs through a different path which
currently causes rendering issues (in particular also with Zink).

Allowing both devices to match in the callback returns all wsi to
operate on the native mode and fixes the issues above.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31490>
2024-10-03 13:42:23 +00:00
Tatsuyuki Ishi
3b57a35ece radv: Enable descriptorBufferCaptureReplay.
The descriptors should be deterministic as long as the memory address it's
assigned to is equal. Enable it by just advertising the feature and putting
a dummy capture replay data requirement of 1 (0 is not permitted).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19952>
2024-10-03 13:06:07 +00:00
Boris Brezillon
fe6e96d685 panfrost: Move pan_blitter.{c,h} to the gallium driver
Move pan_blitter.{c,h} to the gallium driver and rename it
pan_fb_preload to reflect the fact it's not a generic blitter framework.

While at it, get rid of the remaining generic blitting bits and pick
better names for objects related to the preload stuff in
panfrost_{device,screen}.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31441>
2024-10-03 09:53:35 +00:00
Boris Brezillon
0bc3502ca3 panvk: Implement a custom FB preload logic
This has several advantages over using pan_blitter for that:

- we can catch allocation failures and flag the command buffer invalid
- we can re-use the vk_meta_device object list to keep track of our
  preload shaders
- we can re-use surface descriptors instead of re-emitting them every
  time a preload is done

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31441>
2024-10-03 09:53:35 +00:00
Boris Brezillon
607e517a11 panvk: Store attachment image views in the graphics state
Will be needed if we want to re-use pre-emitted texture payloads in the
FB preload path.

With this in place, we no longer need the src_iview in the resolve info
struct.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31441>
2024-10-03 09:53:35 +00:00
Boris Brezillon
a676d7ffb2 panvk: Emit textures needed for FB preload at image view creation time
Once we've specialized the framebuffer preload logic in panvk, this
will prevent re-emission of texture descriptors in the preload path.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31441>
2024-10-03 09:53:34 +00:00
Boris Brezillon
4971538ffc panvk: Keep our copy_desc shader in vk_meta_device
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/31441>
2024-10-03 09:53:34 +00:00
Boris Brezillon
d2515347f4 panvk: Keep our blend shaders in vk_meta_device
Now that vk_meta can keep track of VkShaderEXT objects, we can keep
our blend shaders in panvk_device::meta and get rid of our custom
hash-table.

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/31441>
2024-10-03 09:53:34 +00:00
Boris Brezillon
91c86c31cd panvk: Add an helper to create internal shaders
Blend and framebuffer preload shaders will be created as internal
shaders and added to the vk_meta object list.

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/31441>
2024-10-03 09:53:34 +00:00
Boris Brezillon
206bf1be09 panvk: Add a debug flag to force image copies through the gfx pipeline
Useful to debug copy-related issues.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31441>
2024-10-03 09:53:34 +00:00
Boris Brezillon
3d7bf07089 vk/meta: Make some helpers public
vk_image_view_type_to_sampler_dim() and vk_image_view_type_is_array()
can be useful to driver-specific meta shaders.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31441>
2024-10-03 09:53:34 +00:00
Boris Brezillon
cd38fd37f7 vk/meta: Allow tracking of driver-specific objects in the meta list
Add VK_META_OBJECT_KEY_DRIVER_OFFSET to define an offset for
driver-specific key types.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31441>
2024-10-03 09:53:34 +00:00
Boris Brezillon
7fe4f64c3b vk/meta: Support VkShaderExt objects to allow tracking internal shaders
PanVK has a few internal shaders that don't fit in the vk_meta
compute/graphics pipeline model. Teaching vk_meta about VkShaderEXT
allows us to keep track of those internal shaders without using yet
another hash table.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31441>
2024-10-03 09:53:34 +00:00
Iago Toral Quiroga
c58bfb355a broadcom/compiler: generate mali opcodes for clamping on Pi5
Models C0 and D0 support these opcodes too.

total instructions in shared programs: 10869461 -> 10856992 (-0.11%)
instructions in affected programs: 1467666 -> 1455197 (-0.85%)
helped: 6012
HURT: 1413
Instructions are helped.

total threads in shared programs: 431014 -> 431010 (<.01%)
threads in affected programs: 8 -> 4 (-50.00%)
helped: 0
HURT: 2

total uniforms in shared programs: 5432771 -> 5430909 (-0.03%)
uniforms in affected programs: 183047 -> 181185 (-1.02%)
helped: 976
HURT: 128
Uniforms are helped.

total max-temps in shared programs: 2235272 -> 2234069 (-0.05%)
max-temps in affected programs: 38163 -> 36960 (-3.15%)
helped: 1262
HURT: 168
Max-temps are helped.

total spills in shared programs: 4331 -> 4363 (0.74%)
spills in affected programs: 964 -> 996 (3.32%)
helped: 6
HURT: 47

total fills in shared programs: 6527 -> 6622 (1.46%)
fills in affected programs: 2047 -> 2142 (4.64%)
helped: 6
HURT: 47

total sfu-stalls in shared programs: 15807 -> 15935 (0.81%)
sfu-stalls in affected programs: 787 -> 915 (16.26%)
helped: 71
HURT: 172
Sfu-stalls are HURT.

total inst-and-stalls in shared programs: 10885268 -> 10872927 (-0.11%)
inst-and-stalls in affected programs: 1469423 -> 1457082 (-0.84%)
helped: 5998
HURT: 1417
Inst-and-stalls are helped.

total nops in shared programs: 184280 -> 185612 (0.72%)
nops in affected programs: 10000 -> 11332 (13.32%)
helped: 311
HURT: 1193
Nops are HURT.

The results show a reduction in register pressure, but an increase in
spills, which looks contradictory. This is because for some reason, this
optimization makes the NIR scheduler produce code for some shaders in Godot
that cause additional spilling, but the problem seems to be exclusive to
Godot shaders and not really related to the optimization itself but to
how the NIR scheduler works. Excluding Godot shaders we actually see a
decrease in spills and a slightly larger improvement in instruction
counts:

total instructions in shared programs: 10720106 -> 10707621 (-0.12%)
instructions in affected programs: 1375316 -> 1362831 (-0.91%)
helped: 5948
HURT: 1364
Instructions are helped.

total threads in shared programs: 428248 -> 428244 (<.01%)
threads in affected programs: 8 -> 4 (-50.00%)
helped: 0
HURT: 2

total spills in shared programs: 3729 -> 3712 (-0.46%)
spills in affected programs: 451 -> 434 (-3.77%)
helped: 6
HURT: 0

total fills in shared programs: 4738 -> 4714 (-0.51%)
fills in affected programs: 564 -> 540 (-4.26%)
helped: 6
HURT: 0

Comparing only shaders from Godot:

total instructions in shared programs: 149355 -> 149371 (0.01%)
instructions in affected programs: 92350 -> 92366 (0.02%)
helped: 64
HURT: 49
Inconclusive result (value mean confidence interval includes 0).

total max-temps in shared programs: 16477 -> 16472 (-0.03%)
max-temps in affected programs: 180 -> 175 (-2.78%)
helped: 5
HURT: 0
Max-temps are helped.

total spills in shared programs: 602 -> 651 (8.14%)
spills in affected programs: 513 -> 562 (9.55%)
helped: 0
HURT: 47

total fills in shared programs: 1789 -> 1908 (6.65%)
fills in affected programs: 1483 -> 1602 (8.02%)
helped: 0
HURT: 47

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31480>
2024-10-03 09:02:08 +00:00
Iago Toral Quiroga
c57be33d96 broadcom/compiler: implement NIR mali opcodes for clamping
These translate directly to new unpack modifiers on V3D 7.x.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31480>
2024-10-03 09:02:08 +00:00
Iago Toral Quiroga
a13bf51a9f broadcom: add helpers to identify availability of new unpack modifiers
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31480>
2024-10-03 09:02:08 +00:00
Iago Toral Quiroga
22c1471945 broadcom: add missing opcodes for fmov on mul alu for V3D 7.x
These represent fmov variants for max0 and sat6 unpack modifiers. The variants
for max0 also exist in the add alu, but sat6 is exclusive to the mul alu.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31480>
2024-10-03 09:02:07 +00:00
Iago Toral Quiroga
aac1c074cc nir: make fclamp_pos_mali and fsat_signed_mali opcodes generic
V3D can use these too.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31480>
2024-10-03 09:02:07 +00:00
David Rosca
023277173c frontends/va: Fix AV1 packed header parsing
AV1 has no startcode, so the packed header will not contain any
additional data at the beginning of the buffer that we would need
to skip to get to the OBU header.
Also ignore OBU types that we are not parsing.
Fixes assertions with libva-utils/av1encode.

Fixes: 5edbecb856 ("frontends/va: adding va av1 encoding functions")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31359>
2024-10-03 08:25:19 +00:00
Timothy Arceri
1c58f513c4 glsl: fix gl_{Clip,Cull}Distance error messages
The error message in the linker that checked
gl_MaxCombinedClipAndCullDistances would never be issued because the
compiler was already doing the check. I think the compiler might have
been done this way in the original commit d656736b as the linker
only sets the size when the clip/cull outputs are written so the
piglit test for this wouldn't have been triggered as it does not
write to the outputs.

Here we move the error to the compiler and fix things up so the
correct messages are triggered.

Fixes: d656736bbf ("glsl: Add arb_cull_distance support (v3)")

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31471>
2024-10-03 06:59:47 +00:00
LingMan
c58b8db547 nak/hw_tests: Use f32::to_bits()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31493>
2024-10-02 22:37:51 +00:00
Boris Brezillon
790759dfaf vk/image: Fix the extent adjustment of non-compressed views
When creating a non-compressed view of a compressed image, we need to
divide the extent by the image block size not the view block size.

Fixes: 8ddc527ba4 ("vk/image: Fix the view extent of uncompressed views of compressed images")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31439>
2024-10-02 21:54:53 +00:00
Boris Brezillon
c79470a37c zink: Adjust the surface size of non-compressed views
When creating a surface with a non-compressed format that's backed
by a resource with a compressed format, we need to adjust the surface
size accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31439>
2024-10-02 21:54:53 +00:00
Boris Brezillon
767a7d785b vk/meta: Fix buffer -> image copy using a graphics pipeline
Unlike 3D image views, 2D array image views created by meta_copy only
contain the layers needed for rendering, so we shouldn't consider the
base layer an image offset.

Fixes: 07c6459cd8 ("vk/meta: Add copy/fill/update helpers")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31439>
2024-10-02 21:54:53 +00:00
Faith Ekstrand
7dc6826bc3 nak,nvk: Implement VK_KHR_shader_quad_control
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10687
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31470>
2024-10-02 21:10:32 +00:00
Faith Ekstrand
62a4fe861a nir: Add an option to lower quad vote
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31470>
2024-10-02 21:10:32 +00:00
Faith Ekstrand
64e3e2890d nvk/nvkmd: Stop leaking the primary FD
4db1bd5846 ("nvk/nvkmd: Implement dev and pdev for nouveau")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31470>
2024-10-02 21:10:32 +00:00
Marek Olšák
f546df95a6 nir/opt_vectorize_io: fix skipped output vectorization if inputs were vectorized
Fixes: 2514999c9c - nir: add nir_opt_vectorize_io, vectorizing lowered IO

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31454>
2024-10-02 20:26:23 +00:00
Juan A. Suarez Romero
b7c66f4f89 v3dv/ci: move asan fail to skip
We need to add the asan failures to skip list because otherwise all the
tests run in the same group will be marked as fail too.

Fixes: e120176c58 ("ci: uprev VKCTS to 1.3.9.2")
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/31477>
2024-10-02 19:56:28 +00:00
Eric Engestrom
842a7b2821 egl: fix dri2_from_names() call
The offset argument is `int *offsets`.

!31406 pointed this out and I checked for other instances of the same bug.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31484>
2024-10-02 18:33:03 +00:00
Erik Faye-Lund
fd0ff1502a panvk: expose already-implemented KHR_maintenance1
Seems this is already implemeted, mostly thanks to common code.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31264>
2024-10-02 17:59:45 +00:00
Erik Faye-Lund
14261cbb18 panvk: drop needless function implementation
The common code implements this one for us already.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31264>
2024-10-02 17:59:45 +00:00
Erik Faye-Lund
322c89e9fa panvk: implement KHR_get_memory_requirements2
The rest is already in place, it seems.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31264>
2024-10-02 17:59:44 +00:00
Lionel Landwerlin
1f2ad64b63 anv: optimize WA 16011107343/22018402687
No need to emit the instruction twice.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31481>
2024-10-02 17:27:55 +00:00
Lionel Landwerlin
4cdb5de163 anv: consolidate pre/post draw workaround in helpers
This avoids sprinkling those all over the code base. Debug breakpoints
are put in there too.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31481>
2024-10-02 17:27:55 +00:00
Lionel Landwerlin
18e2c25dad anv: limit 22018402687 to impacted platforms
ARL is impacted, but LNL is not.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31481>
2024-10-02 17:27:55 +00:00
Boris Brezillon
65d5231381 panvk: Advertise KHR_create_renderpass2 support
This is implemented for us by vk_renderpass.c, so let's enable it and
get rid of the skips caused by a NULL dereference on
->CreateRenderPass2(), even though that's a CTS bug.

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/31462>
2024-10-02 15:51:34 +00:00
Boris Brezillon
fbe8428af8 panvk/csf: Fix prepare_vp() when viewport->x is negative
The scissor descriptor wants positive min/max bounds.

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/31462>
2024-10-02 15:51:34 +00:00
Boris Brezillon
2203376865 panvk: Fix bounds checking in upload_shader_desc_info()
Replace the less-than test by a less-or-equal when checking the
dynamic buffer count.

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/31462>
2024-10-02 15:51:34 +00:00
Boris Brezillon
e489a92c33 panvk: Make sure RUN_IDVS has a valid tiler descriptor
As soon as we call RUN_IDVS, we need a valid tiler descriptor. Let's
kill the needs_tiling optimization until we have a proper way of
knowing when draws can be skipped or when IDVS jobs can be replaced
by plain compute.

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/31462>
2024-10-02 15:51:34 +00:00
Eric Engestrom
5b25784df7 zink+nvk/ci: document more flakes seen lately
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31483>
2024-10-02 15:03:56 +00:00
Eric Engestrom
6337bde12e zink+nvk/ci: mark spec@egl 1.4@egl-ext_egl_image_storage as fixed
Fixed by a commit in the 27295ca4...d5df263a range

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31483>
2024-10-02 15:03:56 +00:00
Eric Engestrom
50f04a8e99 turnip/ci: mark vkd3d test_planar_video_formats as fixed
Fixed by a commit in the 765d1c47...366f63fd range, likely !31304

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31483>
2024-10-02 15:03:56 +00:00
Erik Faye-Lund
b8bfbbdf66 panvk: check against texfeat_bit
This is the same as the previous commit, but for PanVK instead.

Fixes: 213e895da0 ("panvk: Allow compressed formats")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Erik Faye-Lund
6f1b5f3eea panfrost: do not re-fetch compressed formats
We store this in the device on start-up, no need to do it again.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Erik Faye-Lund
23cad7c695 panfrost: check fmt.bitfeat_bit for compressed-support
Because we map compressed formats to the interchange-formats on V9 and
later, we end up not actually checking for compressed support here, but
instead always checking bit 0, which is reserved in the spec.

So let's instead explicitly check bitfeat_bit here instead, which we
conveniently stored away in the previous commit.

Use 1u instead of 1 for the shifted constant, to avoid undefined
behavior when we're testing bit 31.

Fixes: 0c1fde956b ("panfrost: Add Valhall compressed formats")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Erik Faye-Lund
1637fa3d85 panfrost: store texfeat_bit in panfrost_format
To avoid increasing memory usage, make sure we pack this together with
the hw format.

This will be used in the next commit.

Fixes: 0c1fde956b ("panfrost: Add Valhall compressed formats")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Erik Faye-Lund
8072c901e1 panfrost: unify compressed formats
This reduces some duplication, and we're going to start needing the
texfeat format on valhall anyway...

Fixes: 0c1fde956b ("panfrost: Add Valhall compressed formats")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
2024-10-02 14:21:56 +00:00
Vignesh Raman
d4fa181f7b ci/image-tags: add DEBIAN_PYUTILS_TAG
Enforce maximum image tag length for DEBIAN_PYUTILS_TAG
and sort the tags in order.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31475>
2024-10-02 13:29:33 +00:00
Mark Collins
30dc71b060 tu: Improve 2D buffer-to-image copies for A7XX
A7XX supports buffer-to-images copies with a lower alignment requirement
for the pitch and start VA, this makes it unnecessary to loop over every
row and copy them individually for any previously unaligned images. The
new alignment requirements match Vulkan requirements and should cover
all cases that aren't handled by 3D copies.

This can result in a significant performance improvement, up to 10x or
more in some cases.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31401>
2024-10-02 12:56:40 +00:00
Mark Collins
73e7ba8f14 freedreno/registers: Document TPL1_2D_SRC_CNTL register
This A7XX register is used for defining properties of the source buffer
for the 2D copies.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31401>
2024-10-02 12:56:40 +00:00
David Heidelberg
61f3294786 pvr: unify code into one condition
gcc 13.2 incorrectly evaluate that first_use is unitialized value.
This should avoid the bug and make code clearner.

Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31476>
2024-10-02 12:16:19 +00:00
Samuel Pitoiset
7702520239 radv: stop passing image create flags to radv_image_view_init()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31463>
2024-10-02 09:28:51 +00:00
Samuel Pitoiset
e7cf039657 radv: remove redundant assertions about image views
The vulkan/runtime already has assertions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31463>
2024-10-02 09:28:51 +00:00
Samuel Pitoiset
4308bf4cdf radv: stop passing redundant parameters to radv_image_view_make_descriptor()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31463>
2024-10-02 09:28:51 +00:00
Samuel Pitoiset
6bd9c4dad1 radv: use base mip level from vk_image_view
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31463>
2024-10-02 09:28:51 +00:00
Samuel Pitoiset
e76a26579a radv/amdgpu: add assertions to check the IB size
This can be triggered with DGC if the maximum number of sequences count
is too high. Luckily, vkd3d-proton doesn't do that, but it should be
fixed for EXT DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31464>
2024-10-02 08:44:47 +00:00
Samuel Pitoiset
d1f3a92671 radv/amdgpu: do not use a constant value for the IB size in dwords
Better to avoid magic number.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31464>
2024-10-02 08:44:47 +00:00
Eric Engestrom
816ae4ee67 ci/build: don't wait on the windows build anymore
Windows runners don't have more than one build right now, so there is
no need to wait on the "first one" to be done.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31473>
2024-10-02 07:48:44 +00:00
Job Noorman
f73d2eedfd tu: advertise shaderInt64
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
38604485be ir3: add support for 64b reductions
The existing scan/reduce macros (OPC_SCAN_MACRO/OPC_SCAN_CLUSTERS_MACRO)
hard code the reduction operations in ir3. Adding support for 64b
operations will blow up these already complicated macros. Implement a
simple scan loop in NIR for the few (hopefully rare) cases where the
generic passes cannot lower the reduction to 32b.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
52c456c641 tu: lower 64b push constants before lowering IO
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
8a17eb5377 ir3: make ir3_mem_access_size_align publically available
We want to reuse it from tu_shader.cc.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
aa9b8316ae ir3: lower 64b SSBO accesses
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
c515d4bd81 ir3: run 64b phi lowering together with other 64b lowerings
nir_lower_64bit_phis was run in ir3_optimize_loop where it would fight
with nir_opt_if, causing shader compilation hangs. There's no point in
running this pass in the optimization loop as 64b phis should be lowered
together with the other 64b operations and then never appear again.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10355
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
ad12886775 ir3: lower 64b intrinsics after generic 64b lowering
ir3_nir_lower_64b_intrinsics will blindly set the def bit size to 32 for
unknown intrinsics. Give the generic passes a chance to lower them
first.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
4d50504b26 nir/lower_int64: add nir_intrinsic_rotate
Can simply be split into 32b ops.

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/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
e6a5c342da nir/lower_int64: add nir_intrinsic_read_invocation_cond_ir3
Can simply be split into 32b ops.

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/31455>
2024-10-02 06:35:49 +00:00
Job Noorman
584b63ecab nir/load_store_vectorize: fix division by zero
Don't use glsl_get_explicit_stride as it may return 0 for vector types,
use nir_deref_instr_array_stride instead.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31460>
2024-10-02 05:53:57 +00:00
Caio Oliveira
366f63fd88 intel/brw: Enable mi_builder test for Xe2
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31299>
2024-10-01 16:03:35 -07:00
Caio Oliveira
a0ea2a656f intel/brw: Enable EU validation and compaction tests for Xe2
A few EU validation tests had to be updated to account for larger GRF,
extra supported types for 3-src instructions and the lack of AccWrEnable
in Xe2.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31299>
2024-10-01 16:03:35 -07:00
Caio Oliveira
8b1c5425a9 intel/brw: Update DPAS validation tests for Xe2
The main change is that in Xe2 DPAS instruction requires SIMD16.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31299>
2024-10-01 16:03:35 -07:00
Lionel Landwerlin
ee738c523a isl/tests: split linear & tiled buffer sizes
There is this weird thing in the current tests that the linear & tiled
buffers are sized the same.

They don't need to be, compute a max area we want to check (aligned to
a tile logical size), allocate the linear buffer using that aligned
size and allocate the tiled buffer using a size aligned to the
physical tile size.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
d8da594a60 isl/tests: rename tile_(width|height) variables
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
05b641becc isl/tests: add TileX memcpy testing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
2994eca831 isl/tests: fix inclusive coordinate checking
The coordinates are supposed to be inclusive.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
0b22d43f86 isl/tests: use modulo for more variability per pixel
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
e80a02f52d isl/tests: bump coordinate types to 32bits
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
451b9e6850 isl/tests: rename ytile to be consistent with other names
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
25d6b47298 isl/tests: fix coordinates for comparison scan
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
3384179e26 isl/tests: fixup multi-tile testing
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
86900e3cf6 isl/tests: add a space in memcpy test error printouts
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Lionel Landwerlin
b2b654d851 isl: fix comment typo
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31469>
2024-10-01 22:26:44 +00:00
Caio Oliveira
b4acc3fc42 intel/brw: Remove Gfx8- from test_eu_validate.c
These tests only run for Gfx9+.

Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31272>
2024-10-01 21:16:54 +00:00
Aleksi Sapon
06dfcffd20 llvmpipe: correctly implement output variables loads
GLSL 4.60 spec, section 4.3.6: output variables
should behave like private variables during shader
execution. Framebuffer fetching now also checks
that fb_fetch_output is set on the variable.

cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31047>
2024-10-01 20:28:00 +00:00
Aleksi Sapon
942a584db2 llvmpipe: fix quad group helper invocation masking
https://docs.vulkan.org/spec/latest/chapters/shaders.html#shaders-helper-invocations

Concretely, this fixes implicit derivatives of SSBO
variables on triangle edges, which are used in USD.

cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31047>
2024-10-01 20:28:00 +00:00
Mike Blumenkrantz
8a1ce9a144 util/vbuf: delete/fix broken incompatible stride calc
this was accidentally duplicated from the conditional below,
except this one didn't have the buffer_stride_unaligned
caps check, which meant any 4-byte attrib which was
unaligned got marked for rewrites even on drivers
supporting unaligned strides

the correct change should have checked the stride against
the component size in the top case

Fixes: 7672545223 ("gallium: move vertex stride to CSO")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31425>
2024-10-01 19:52:02 +00:00
Craig Stout
e2388350f2 tu: add OS guards to drm_format_mod
vk_image.h has these guards, and any non-{Linux}/{BSD}
compile would hit this issue.

The alternative is just to remove the OS-specific guards
in vk_image.h, since the modifier is just 64-bit opaque
number and theoretically can work on any OS, though the
non-Linux spec language is lacking.

Acked-by: Rob Clark <robdclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31453>
2024-10-01 19:17:25 +00:00
Valentine Burley
38ba3ea469 tu: Add an assert to tu6_plane_index
Like hk_image_aspects_to_plane in Honeykrisp, assert that non-depth/stencil formats have one aspect.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
9aaf115316 tu: Update comments about the blob driver
Newer versions of the blob don't seem to expose linear features for VK_FORMAT_D32_SFLOAT_S8_UINT,
but they advertise VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT for more formats now.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
087679343f tu: Use v2 format feature flags
Turnip supports VK_KHR_format_feature_flags2 but has been using a mixture of VK_FORMAT_FEATURE and
VK_FORMAT_FEATURE_2 flags. Always use the new 64-bit flags.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
296ea45bc9 tu: Set some feature bits earlier
Assign the feature bits for depth formats and VK_FORMAT_*_PACK16 earlier.
If we configure their optimalTilingFeatures before we copy those over to linearTilingFeatures
we don't have repeat them.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
c3dd62840b tu: Unify zeroing bufferFeatures
We have to disable bufferFeatures for a format for various reasons. Do this in one place for comprehensibility.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
03c75d32fd tu: Introduce tu_aspects_to_plane helper function
Add and use a new helper function, tu_aspects_to_plane, that combines tu6_plane_index and tu6_plane_format.

This allowed for spotting and fixing a copy-paste mistake in tu6_blit_image, in dst_format for D32_S8.
The existing code wouldn't return the right dst_format if you blitted an S8 image to the stencil aspect
of a D32_S8 image, which should be a legal thing to do.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
21181fb4f2 tu: Use existing helpers in tu_clear_blit
Use existing helpers for deciding the VK format to treat our data as for memcpy-style blits.
No need to special case these a second time when it's already done in our helpers.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
827e9bc0f4 tu: Use vk_format_get_plane_format
Use vk_format_get_plane_format for determining the plane format of multi-plane YCbCr formats where possible.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
39d943874e tu: Fix conditional check in tu_image_view_init
Only call tu6_plane_format for VK_FORMAT_D32_SFLOAT_S8_UINT in tu_image_view_init.
vk_format is always a single plane format here but checking the aspect mask wasn't enough.
It was possible for e.g. R8_UNORM to not have VK_IMAGE_ASPECT_COLOR_BIT apsect mask but a
PLANE aspect mask in formats like G8_B8_R8_3PLANE_420_UNORM.

This was masked by the default case in tu6_plane_format, which just returned vk_format_to_pipe_format
anyway without checking the plane index.

We need to fix this for when we switch tu6_plane_format to using vk_format_get_plane_format, where we
would otherwise trip an assert.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
7bd97313e5 tu: Use vk_format_get_plane_count instead of special casing
Use the vk_format_get_plane_count helper in tu_image_view_init instead of
checking the formats directly.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
913d452dc5 tu: Be more consistent with using vk_format helpers
We've been using a mixture of util_format and vk_format helpers.
Always use the vk_format ones when available.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:01 +00:00
Valentine Burley
c5d180a0bb tu: Streamline setting YCbCr feature bits
Use ycbcr_info instead of checking the layout or the format directly.
Swap the order of the if statement for clarity.
These should make the code significanntly easier to read.

Also document Chia-I's findings on SEPARATE_RECONSTRUCTION_FILTER_BIT.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31304>
2024-10-01 18:44:00 +00:00
Juan A. Suarez Romero
c46a704e92 v3d/ci: use special kernel for full jobs
This kernel unmask all the MMU errors, so it gives us more visibility
for driver issues.

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/31445>
2024-10-01 18:06:31 +00:00
Samuel Pitoiset
e120176c58 ci: uprev VKCTS to 1.3.9.2
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31423>
2024-10-01 17:30:38 +00:00
Lionel Landwerlin
17c3bd358e anv: limit render target cache flushing due to color output remapping
Fixes a performance regression of 1%/2% introduced in badb3f6301
("anv: Only flush render target cache when detecting RT changes")

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31380>
2024-10-01 15:52:39 +00:00
Connor Abbott
5a42df669b ir3: Ban conversions with mismatching sizes
This prevents folding something like this:

add.u hrA, hrB, hrC
mov.u8u32 rD, hrA

When I wrote this I assumed that because the conversion source and ALU
destination were the same register that meant the types must have the
same size, but that's not the case with u8 which is an 8-bit type in a
16-bit register, so this could've been broken with 8-bit types.

Fixes: f58e1ef7ec ("tu: enable shaderInt8 support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31399>
2024-10-01 15:17:11 +00:00
Boris Brezillon
084f87915b panvk: Catch indirect allocation failures
The kmod layer allocates memory through the vulkan allocator for its
internal objects. When the allocation fails, we should return
VK_ERROR_OUT_OF_HOST_MEMORY, and the
dEQP-VK.api.object_management.alloc_callback_fail.* tests check this.

Generalize the errno trick we have and hide it behind panvk_error[f]()
macros, which serve as a replacement for vk_error[f]().

We also catch allocation failures in the panvk_cmd_alloc_xxx() path
so we can report the right error on the command buffer.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
b2ef147f33 panvk: Let panvk_priv_bo_create() return a VkResult
Knowing that a private BO couldn't be allocated is not enough, in some
situations we need to know why. Rework the panvk_priv_bo_create() to
return a VkResult.

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/31382>
2024-10-01 14:36:38 +00:00
Mary Guillemard
18068517a9 panvk: Cleanup rw_nc pool in panvk_device_cleanup_mempools
panvk_pool_cleanup call was missing.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 7049d31676 ("panvk: Add a read-write non-cached memory pool for CSF events"
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
ce14681ebf panvk: Don't leak vertex shader program descriptors
Vertex shaders can have up to three different program descriptors. Free
all of them in panvk_shader_destroy().

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
bea7c59113 panvk: Don't call queue_finish() on non-initialized queues
panvk_per_arch(queue_init)() can fail, and we need to undo the
initialization only on queues that were properly initialized.

In order to do that, increment queue_count only after the
initialization succeeds, and adjust the test in the error path to not
leave an allocated but non-initialized panvk_queue object behind.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
904cf2b189 panvk/v10: Add missing cleanup_queue() in queue_finish()
Fixes a memory leak reported by
dEQP-VK.api.object_management.alloc_callback_fail.device_group.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
4645384b37 panvk: Fix stencil attachment resolve on JM
We need to update resolve_info to point to the stencil resolve info,
otherwise it's still pointing to the depth resolve info.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
2b00d080b6 panvk: Fix FB initialization when using non-compressed views of compressed images
vk_image_view::extent is adjusted to take non-compressed views of
compressed images into account, so let's use it instead of calling
vk_image_mip_level_extent() on the image.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
63fb2e2c04 panvk: Report allocation failures in the CreateImageView path
Allocation of the texture payload can fail, we need to report
VK_ERROR_OUT_OF_DEVICE_MEMORY in that case.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
7da23be734 panvk: Check allocation failures in panvk_shader_upload()
Allocations done in panvk_shader_upload() can fail. Add NULL checks so
we don't silently ignore such allocation 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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
bf9d6b96e0 panvk: Use the proper alignment for texture payloads
Texture is aligned on 32-byte, which matches the plane or multiplanar
surface descriptor constraint, and exceeds the surface descriptor one,
but let's be accurate and use the right descriptor alignment.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
cfc9448e82 panvk: Stop including pan_blend.h from panvk_device.h
We don't depend on it, and panvk_vX_blend.c already includes it.

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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
5d0072ae7e panvk: Don't reset errno in panvk_kmod_zalloc()
We shouldn't reset errno when the allocation succeeds, otherwise we might
be overriding previous allocation 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/31382>
2024-10-01 14:36:38 +00:00
Boris Brezillon
ea23d4f04e pan/kmod: Try to use local storage in panthor_kmod_vm_bind()
panthor_kmod_vm_bind() is usually called with a single op and at most
one sync, so let's optimize the low-number-of-ops-or-syncs case to
avoid transient heap allocation.

This also fixes some dEQP-VK.api.object_management.alloc_callback_fail.*
crashes where panthor_kmod_vm_bind(UNBIND) is called and not expected
to fail.

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/31382>
2024-10-01 14:36:38 +00:00
Job Noorman
211616cc98 ir3: disallow immediates for shfl src1
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: d43f39678c ("ir3: make backend aware of shfl:")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31457>
2024-10-01 13:48:40 +00:00
Juan A. Suarez Romero
306cc0e0d5 v3d/v3dv/ci: update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31458>
2024-10-01 13:04:21 +00:00
Rhys Perry
be64454710 nir/tests: test opt_loop_peel_initial_break with derefs in header block
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/31324>
2024-10-01 12:24:22 +00:00
Rhys Perry
0484044b1a nir/opt_loop: rematerialize header block derefs in their use blocks
Otherwise, we could end up with phis of derefs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31324>
2024-10-01 12:24:22 +00:00
Christian Gmeiner
1421319dcf compiler/rust: Copy MappedInstrs from NAK
Rename it to SmallVec, make it more generic and switch NAK
to it.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31409>
2024-10-01 11:33:35 +00:00
Tapani Pälli
8d82b7cfe8 drirc/anv: force_vk_vendor=-1 for Faaast Penguin
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11955
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/31438>
2024-10-01 10:53:10 +00:00
Boris Brezillon
85bc72ad26 pan/genxml: Fix resource table alignment constraint on v9
While a resource entry indeed has an alignment requirement of 16 byte,
the resource table itself needs to be aligned on 64-byte. Given the
alignment is only used for allocation, make it 64 byte in the XML (as
done in v10.xml).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31440>
2024-10-01 09:09:51 +00:00
Boris Brezillon
77571b6b5b pan/genxml: Fix surface descriptor alignment on v6
Surface descriptors need to be aligned on 16-byte.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31440>
2024-10-01 09:09:51 +00:00
Boris Brezillon
cead2eae15 pan/genxml: Remove surface descriptors on v6/v7
Those don't exist on Bifrost.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31440>
2024-10-01 09:09:51 +00:00
Samuel Pitoiset
053c19e996 zink/ci: update expected list of failures for VANGOGH
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31385>
2024-10-01 08:33:51 +00:00
Samuel Pitoiset
493d5910a3 radv: advertise sampler2DViewOf3D
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31385>
2024-10-01 08:33:51 +00:00
Samuel Pitoiset
f5805bcb8e radv: implement 2D views of 3D images using 2D_ARRAY descriptors on GFX9+
This also allows us to disable a workaround in ACO for GFX9, but it
can't be removed completely because RadeonSI needs to use it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31385>
2024-10-01 08:33:51 +00:00
Samuel Pitoiset
dc5ef90547 ac/surface: add RADEON_SURF_VIEW_3D_AS_2D_ARRAY for GFX9+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31385>
2024-10-01 08:33:51 +00:00
Vignesh Raman
04f30870b6 ci: add Gen10 Arm Mali firmware to rootfs
Add firmware for Gen10 Arm Mali GPUs directly to rootfs since
it is not available from debian package. For the panthor kernel
driver to be able to execute jobs on the GPU it needs this firmware.

Update the kernel, which contains a fix to build the panthor driver
as module and use HWCI_KERNEL_MODULES to load panthor module.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31342>
2024-10-01 07:57:42 +00:00
Mike Blumenkrantz
8494849b92 vl: add pipe_video_buffer::flags to sync up with pipe_resource::flags
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31319>
2024-10-01 17:00:39 +10:00
Dave Airlie
caafa50af6 va: add some h264 fields
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31319>
2024-10-01 17:00:36 +10:00
Valentine Burley
1e623ad308 freedreno/ci: Document new flake
KHR-GL46.texture_view.view_classes started flaking after the CTS
uprev and is blocking merges.

Fixes: 3178170516 ("ci: bump gl cts versions")

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31456>
2024-10-01 06:17:13 +00:00
Marek Olšák
765d1c4757 st/mesa: copy some TES shader info fields to TCS
radeonsi would like to have the tess prim mode and spacing in TCS.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31448>
2024-10-01 02:48:30 +00:00
Hyunjun Ko
f76781feb8 anv: enable KHR_video_maintenance1
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/31436>
2024-10-01 10:45:14 +09:00
Hyunjun Ko
ac2fd8ae66 anv: support VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR
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/31436>
2024-10-01 10:45:14 +09:00
Hyunjun Ko
0981d20850 anv: support for inline query for vulkan video
v1. Removed the unnecessary query begin code.
(lionel.g.landwerlin@intel.com)

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/31436>
2024-10-01 10:45:14 +09:00
Hyunjun Ko
1b06d4a8ea anv: consider VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR when
allocating mv storgae.

Fixes: 3ec8f7f99 ("anv/video: initial support for h264 encoding")

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/31436>
2024-10-01 10:45:14 +09:00
Hyunjun Ko
8a3f852119 anv/video: support VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR.
Which means to support CQP mode.

Fixes: 3ec8f7f99 ("anv/video: initial support for h264 encoding")
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/31436>
2024-10-01 10:45:14 +09:00
Faith Ekstrand
bf013cf8de vulkan: Add a comment explainint SEVERITY_WARNING_BIT for vk_error*()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31449>
2024-10-01 00:48:36 +00:00
Gert Wollny
29fd096d91 Revert: r600/sfn: call nir_lower_doubles explicitely"
This reverts commit 36c81b5e88.

With

   nir/opt_algebraic: Allow two-step lowering of ftrunc@64 to use ffract@64

it is no longer necessary to call nir_lower_doubles explicitely in r600/sfn.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29281>
2024-09-30 23:51:02 +00:00
Gert Wollny
f19f1ec17b nir/opt_algebraic: Allow two-step lowering of ftrunc@64 to use ffract@64
If ftrunc@64 is lowered by nir_lower_doubles it is turned into a
comparable long series of 32 bit operations. If the hardware
supports ffract@64 then nir_opt_algebraic can first lower ftrunc@64
to use some combinations with ffloor@64. They can then be turned
into a combination of fsub@64 and ffract@64 resulting in less
all-over instructions.

Fixes: 5218cff34b
   nir/algebraic: avoid double lowering of some fp64 operations

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29281>
2024-09-30 23:51:02 +00:00
Konstantin Seurer
8aa314d3e1 lavapipe: Set minAccelerationStructureScratchOffsetAlignment to 8
The 128 alignment was copied from RADV (which does not need it). 8 bytes
should be enough.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31365>
2024-09-30 23:24:05 +00:00
Konstantin Seurer
4cb8ecd47c Revert "lavapipe: Do not return in report_ray_intersection"
This reverts commit 466bbaf40f.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31405>
2024-09-30 22:58:12 +00:00
Jules Blok
1c119b1d95 docs: Update status of VK_EXT_depth_clamp_control support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31411>
2024-09-30 22:18:27 +00:00
Jules Blok
6e39d56252 nvk: Add support for VK_EXT_depth_clamp_control
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31411>
2024-09-30 22:18:27 +00:00
Jules Blok
4994c5a243 anv: Add support for VK_EXT_depth_clamp_control
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31411>
2024-09-30 22:18:27 +00:00
Jules Blok
12b4ab3b04 radv: Add support for VK_EXT_depth_clamp_control
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31411>
2024-09-30 22:18:27 +00:00
Jules Blok
b9af5564bb vulkan: Add support for VK_EXT_depth_clamp_control
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31411>
2024-09-30 22:18:27 +00:00
Paulo Zanoni
bd33917509 anv: remove another copy of the texture cache pipe_control workaround
The workaround is already implemented by
batch_emit_pipe_control_write(), we don't need to do it here as well.

This was spotted by Lionel Landwerlin. The credits go to him, I just
wrote the patch.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
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/31412>
2024-09-30 21:44:12 +00:00
Paulo Zanoni
fd4a44430c anv: remove duplicate pipe_control workaround
Commit a603cc0633 ("anv: move some pc was to
batch_emit_pipe_control_write") moved some WAs from
emit_apply_pipe_flushes() to batch_emit_pipe_control_write(), but it
turns out one of them was already there since cf7e1f3817 ("anv,
iris: add missing CS_STALL bit for GPGPU texture invalidation").

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
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/31412>
2024-09-30 21:44:12 +00:00
Patrick Lerda
242da61b9d r600/sfn: fix class Shader object last_alu_with_indirect_reg memory leak
For instance, this issue is triggered with "piglit/bin/glsl-vs-arrays -auto -fbo":
Direct leak of 104 byte(s) in 1 object(s) allocated from:
    #0 0x7f2fab415f57 in operator new(unsigned long) (/usr/lib64/libasan.so.6+0xb2f57)
    #1 0x7f2f9fd9d541 in __gnu_cxx::new_allocator<std::__detail::_Hash_node_base*>::allocate(unsigned long, void const*) /usr/include/c++/11.4.0/ext/new_allocator.h:127
    #2 0x7f2f9fd9d541 in std::allocator_traits<std::allocator<std::__detail::_Hash_node_base*> >::allocate(std::allocator<std::__detail::_Hash_node_base*>&, unsigned long) /usr/include/c++/11.4.0/bits/alloc_traits.h:464
    #3 0x7f2f9fd9d541 in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<int const, r600::Instr*>, false> > >::_M_allocate_buckets(unsigned long) /usr/include/c++/11.4.0/bits/hashtable_policy.h:1927
    #4 0x7f2f9fd9d541 in std::_Hashtable<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_allocate_buckets(unsigned long) /usr/include/c++/11.4.0/bits/hashtable.h:440
    #5 0x7f2f9fd9d541 in std::_Hashtable<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>) /usr/include/c++/11.4.0/bits/hashtable.h:2382
    #6 0x7f2f9fd9d541 in std::_Hashtable<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash(unsigned long, unsigned long const&) /usr/include/c++/11.4.0/bits/hashtable.h:2361
    #7 0x7f2f9fd9d541 in std::_Hashtable<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<int const, r600::Instr*>, false>*, unsigned long) /usr/include/c++/11.4.0/bits/hashtable.h:2021
    #8 0x7f2f9fd9e7f8 in std::__detail::_Map_base<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](int&&) /usr/include/c++/11.4.0/bits/hashtable_policy.h:741
    #9 0x7f2f9fd9f6fe in std::unordered_map<int, r600::Instr*, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, r600::Instr*> > >::operator[](int&&) /usr/include/c++/11.4.0/bits/unordered_map.h:984
    #10 0x7f2f9fd9f6fe in r600::Shader::InstructionChain::visit(r600::AluInstr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:1358
    #11 0x7f2f9fd8f309 in r600::Shader::emit_instruction(r600::Instr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:1419
    #12 0x7f2f9fd8f822 in r600::RegisterReadHandler::visit(r600::LocalArray&) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:1040
    #13 0x7f2f9fd8e726 in r600::Shader::emit_load_reg_indirect(nir_intrinsic_instr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:993
    #14 0x7f2f9fd8de5c in r600::Shader::process_instr(nir_instr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:848
    #15 0x7f2f9fd8de5c in r600::Shader::process_block(nir_block*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:836
    #16 0x7f2f9fd962f2 in r600::Shader::process_cf_node(nir_cf_node*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:669
    #17 0x7f2f9fdac01a in r600::Shader::process(nir_shader*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:537
    #18 0x7f2f9fdac3d1 in r600::Shader::translate_from_nir(nir_shader*, pipe_stream_output_info const*, r600_shader*, r600_shader_key const&, r600_chip_class, radeon_family) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:494
    #19 0x7f2f9fb5c8f5 in r600_shader_from_nir ../src/gallium/drivers/r600/r600_sfn.cpp:111
    #20 0x7f2f9fb5e50c in r600_pipe_shader_create ../src/gallium/drivers/r600/r600_shader.c:198
    #21 0x7f2f9fb96642 in r600_shader_select ../src/gallium/drivers/r600/r600_state_common.c:961
    #22 0x7f2f9fb97340 in r600_create_shader_state ../src/gallium/drivers/r600/r600_state_common.c:1056
    #23 0x7f2f9e060f82 in st_create_common_variant ../src/mesa/state_tracker/st_program.c:720
    #24 0x7f2f9e06e779 in st_get_common_variant ../src/mesa/state_tracker/st_program.c:773
    #25 0x7f2f9e06f78d in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1259
    #26 0x7f2f9e06f78d in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345
    #27 0x7f2f9ead0f20 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:723
    #28 0x7f2f9ead0f20 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:951
    #29 0x7f2f9e9b0d15 in link_program ../src/mesa/main/shaderapi.c:1336
    #30 0x7f2f9e9b0d15 in link_program_error ../src/mesa/main/shaderapi.c:1447

Fixes: ddb167e81a ("r600/sfn: Handle indirect array load/store dependencies better")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27334>
2024-09-30 21:16:56 +00:00
Patrick Lerda
b660c73693 r600/sfn: fix class Shader object m_register_allocations memory leak
For instance, this issue is triggered with "piglit/bin/glsl-fs-loop -auto -fbo":
Indirect leak of 120 byte(s) in 5 object(s) allocated from:
    #0 0x7f8e7930ef57 in operator new(unsigned long) (/usr/lib64/libasan.so.6+0xb2f57)
    #1 0x7f8e6dc8c68a in __gnu_cxx::new_allocator<std::_List_node<nir_intrinsic_instr*> >::allocate(unsigned long, void const*) /usr/include/c++/11.4.0/ext/new_allocator.h:127
    #2 0x7f8e6dc8c68a in std::allocator_traits<std::allocator<std::_List_node<nir_intrinsic_instr*> > >::allocate(std::allocator<std::_List_node<nir_intrinsic_instr*> >&, unsigned long) /usr/include/c++/11.4.0/bits/alloc_traits.h:464
    #3 0x7f8e6dc8c68a in std::__cxx11::_List_base<nir_intrinsic_instr*, std::allocator<nir_intrinsic_instr*> >::_M_get_node() /usr/include/c++/11.4.0/bits/stl_list.h:443
    #4 0x7f8e6dc8c68a in std::_List_node<nir_intrinsic_instr*>* std::__cxx11::list<nir_intrinsic_instr*, std::allocator<nir_intrinsic_instr*> >::_M_create_node<nir_intrinsic_instr* const&>(nir_intrinsic_instr* const&) /usr/include/c++/11.4.0/bits/stl_list.h:635
    #5 0x7f8e6dc8c68a in void std::__cxx11::list<nir_intrinsic_instr*, std::allocator<nir_intrinsic_instr*> >::_M_insert<nir_intrinsic_instr* const&>(std::_List_iterator<nir_intrinsic_instr*>, nir_intrinsic_instr* const&) /usr/include/c++/11.4.0/bits/stl_list.h:1912
    #6 0x7f8e6dc8c68a in std::__cxx11::list<nir_intrinsic_instr*, std::allocator<nir_intrinsic_instr*> >::push_back(nir_intrinsic_instr* const&) /usr/include/c++/11.4.0/bits/stl_list.h:1213
    #7 0x7f8e6dc8c68a in r600::Shader::scan_instruction(nir_instr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:655
    #8 0x7f8e6dc8cc2a in r600::Shader::scan_shader(nir_function const*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:554
    #9 0x7f8e6dcab5bc in r600::Shader::process(nir_shader*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:526
    #10 0x7f8e6dcabae1 in r600::Shader::translate_from_nir(nir_shader*, pipe_stream_output_info const*, r600_shader*, r600_shader_key const&, r600_chip_class, radeon_family) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:494
    #11 0x7f8e6da5bf15 in r600_shader_from_nir ../src/gallium/drivers/r600/r600_sfn.cpp:111
    #12 0x7f8e6da5db2c in r600_pipe_shader_create ../src/gallium/drivers/r600/r600_shader.c:198
    #13 0x7f8e6da95c62 in r600_shader_select ../src/gallium/drivers/r600/r600_state_common.c:961
    #14 0x7f8e6da9c09f in r600_update_derived_state ../src/gallium/drivers/r600/r600_state_common.c:1888
    #15 0x7f8e6da9c09f in r600_draw_vbo ../src/gallium/drivers/r600/r600_state_common.c:2219
    #16 0x7f8e6d55229d in u_vbuf_draw_vbo ../src/gallium/auxiliary/util/u_vbuf.c:1782
    #17 0x7f8e6c5d6322 in _mesa_draw_arrays ../src/mesa/main/draw.c:1204

Fixes: 5de814171b ("r600/sfn: Allow skipping backend shader optimization for a subset of shaders")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27334>
2024-09-30 21:16:56 +00:00
David Heidelberg
51f04dc804 freedreno/ir3: Do not allow 16-bit mad.x24
Doesn't work with half registers. For 16-bit operations, there is mad.x16.

Cc: mesa-stable
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31334>
2024-09-30 20:14:06 +00:00
David Heidelberg
c36cc1fdf2 freedreno/ir3: mad.x24 is not safe to lower
Fixes following piglit tests on Adreno 630:
program@execute@builtin@builtin-char-mad_sat-1.0.generated
program@execute@builtin@builtin-uchar-mad_sat-1.0.generated

Cc: mesa-stable
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31334>
2024-09-30 20:14:06 +00:00
Eric R. Smith
5fdc82d5f1 panfrost: fix earlyzs settings for alpha_to_coverage
When alpha_to_coverage is enabled, the zs_update_operation field
must be set to force_late, according to (some of) the documentation.
Actually the docs are ambiguous; the main thrust is that late coverage
updates are only required when Z or S is written, or when occlusion
queries are enabled. But there is a side note in a table that indicates
force_late should be used for coverage updates even if Z or S is not
written.

Logically this shouldn't be necessary and the note is probably
just lazily written. But it turns out that we do seem to need the
force_late setting on valhall. It's currently unclear whether
there's a hardware issue on valhall, or some other issue.

Fixes piglit ext_framebuffer_multisample-*alpha-to-coverage* tests
on valhall.

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/31181>
2024-09-30 18:33:41 +00:00
Mike Blumenkrantz
83495533b0 zink: revert compression control handling
I misunderstood how this works, and there is no general format-query,
which may mean the current gallium interface is unimplementable

This reverts commit 735e402ae4.
This reverts commit 9696df4132.
This reverts commit 33c1b940e0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31444>
2024-09-30 17:57:11 +00:00
Erik Faye-Lund
4ae273dcf4 mesa: make compressed-format emulation optional
There's good reasons to emulate compressed formats; mobile and desktop
HW generally have different ideas of what formats are worth the extra
silicon, so they support different formats based on the legacy they were
designed to support. This means we can get better application
compatibility by emulating these formats.

But, that comes at a price, namely that applications that supports
multiple formats don't really have a way to detect which ones are
natively supported and which ones are not. This means they might make
the wrong choice, and end up wasting memory and bandwidth when that
could have been avoided.

So let's make the emulation optional, by introducing a DRIconf variable
to disable it.

This intentionally still leaves in place transcoding support, because
that's still *probably* a win. Besides, those needs to be opted into
anyway.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31420>
2024-09-30 17:18:19 +00:00
Vitaliy Triang3l Kuzmin
0a70207648 r600: Add missing formats to r600_colorformat_endian_swap
Adds all formats that can be returned by r600_translate_colorformat.

Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23005>
2024-09-30 14:11:56 +00:00
Corentin Noël
bef454f227 virgl: Avoid a race condition on handle removal
We were unlocking the bo handles hash table right after removing the bo handle
and afterward closing it. This leads to race conditions where the handle could
have been re-acquired on another thread. As the kernel would return the same
bo handle and do not reference count them, this leads to it being used after
being closed.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31421>
2024-09-30 13:23:10 +00:00
Vitaliy Triang3l Kuzmin
659d88e7fc r600: Add FMT_1_REVERSED to r600_formats.h
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23010>
2024-09-30 12:48:08 +00:00
Juan A. Suarez Romero
9b3399b3f7 vc4: handle nir_op_ult32 intrinsic
Fixes `spec@glsl-1.10@execution@vs-loop-partial-unroll-multiple-breaks`.

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/31427>
2024-09-30 12:16:54 +00:00
Mauro Rossi
15bea329d7 android: gbm: split the DRI backend into separate library
Changes required after commit 514df444e

dri_gbm module is installed as /vendor/lib{64}/dri_gbm.so
to avoid changes in system/linkerconfig AOSP project

gbm-backends-path option is set as /vendor/$(MESA3D_LIB_DIR)

MESA3D_GBM_BINS variable simplifies dependencies declarations

Test results: gbm_gralloc works again

Fixes: 514df444e ("gbm: split the DRI backend into a separate library and unify backend handling")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31428>
2024-09-30 13:56:19 +02:00
Tomson Chang
fdbdda8c9a amd/vpelib: Only update cached adjustment when it is valid
Only update cached adjustment when it is valid.

Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Tomson Chang <tomson.chang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31274>
2024-09-30 10:12:14 +00:00
Tomson Chang
52289f4ab2 amd/vpelib: Fix color adjustment change detect hole
When color adjustment changed from custom values to default values, the
useColorAdj will be false and the code to update new stream ctx color adj
will be skipped, thus when the color adj changes to the same custom values
later, it will show as "not dirty", causing custom color adj not taking effect
unless its value changed.

We should always update the new steam ctx color adj no matter it is default or not.

Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Tomson Chang <tomson.chang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31274>
2024-09-30 10:12:14 +00:00
Jude Shih
dba0c98ca5 amd/vpelib: Dynamic Command List Expansion
1. Implement a vector like data structure to expand
command list memory dynamically.
2. The size will be doubled once we reach its capacity.
3. Make vector a generic util under utils folder.

Reviewed-by: Roy Chan <roy.chan@amd.com>
Reviewed-by: Jesse Agate <jesse.agate@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31274>
2024-09-30 10:12:14 +00:00
Roy Chan
b2ce281319 amd/vpelib: fix zero input handling
[why]
Fix in 0 input stream, it would crash in accessing null param->streams.

[how]
- Only use stream_ctx->stream instead of param->stream in color
  handling.
- Revise the geometric downscaling support.

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Roy Chan <roy.chan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31274>
2024-09-30 10:12:14 +00:00
Roy Chan
acde345606 amd/vpelib: Optimize the CPU usage by caching all the LUT configs
[why]
The fix point conversion takes quite a bit of CPU time.
And if there are no changes, we don't need to convert all sw points
into hw points and generate the corresponding configs.

[how]
Introduce a config cache header so that all config caching handlings
can be done in the same way.

Luts won't be cached if it is in bypass mode, only cache when it is
non bypass and some dirty flag is set by the upper layer.
The config cache handling will re-apply the cached config if not
dirty and not in bypass mode.

Reviewed-by: Krunoslav Kovac <krunoslav.kovac@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Roy Chan <roy.chan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31274>
2024-09-30 10:12:14 +00:00
Jesse
ee590ee91a amd/vpelib: Config Writer hook and CDC refinement
Generalize CDC and config writer hook.

Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jesse Agate <jesse.agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31274>
2024-09-30 10:12:14 +00:00
Rhys Perry
7f092cbd91 aco: workaround hazards in emit_long_jump
fossil-db (navi31):
Totals from 29 (0.04% of 79395) affected shaders:
CodeSize: 17612888 -> 17615096 (+0.01%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31316>
2024-09-30 09:04:35 +00:00
Rhys Perry
9fb97085d1 aco/tests: update assembler tests for llvm
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31316>
2024-09-30 09:04:35 +00:00
Kenneth Graunke
0b34a7aff0 nir: Don't generate single iteration loops to zero-initialize memory
If the stride we're adding to our loop counter is larger than the total
amount of shared local memory we're trying to initialize, we know the
loop will run at most one time.  So we can skip emitting a loop.

Loop unrolling appears to be unable to detect this currently.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31312>
2024-09-30 05:27:17 +00:00
Tapani Pälli
c1a44e8d43 anv: force StackIDControl value for Wa_14021821874
This is also encouraged by another wa, Wa_14018813551.

Both workarounds state that StackIDControlOverride_RTGlobals should
always be set to 0 (i.e. 2k).

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/30937>
2024-09-30 07:33:37 +03:00
Mike Blumenkrantz
9b51cb05d2 ci: bump VVL to current week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31432>
2024-09-29 22:26:46 +00:00
Pavel Ondračka
cd40732b25 r300: get rid of unneeded CMP before KIL
NIR discard_if expects bools, therefore we end with extr CMP in
the end, however we can handle floats just fine (only with the
reversed logic, so it triggers for src < 0).

Shader-db RV530:
total instructions in shared programs: 120787 -> 120687 (-0.08%)
instructions in affected programs: 5559 -> 5459 (-1.80%)
helped: 102
HURT: 8
total temps in shared programs: 16770 -> 16764 (-0.04%)
temps in affected programs: 151 -> 145 (-3.97%)
helped: 8
HURT: 5
total cycles in shared programs: 181520 -> 181444 (-0.04%)
cycles in affected programs: 10932 -> 10856 (-0.70%)
helped: 101
HURT: 12

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/30967>
2024-09-29 14:13:50 +00:00
Pavel Ondračka
3075c8a29c r300: preserve NaNs and denormals for MIN/MAX/CMP/CND
Always use MAX instead of MAD for MOV and we use RM_OMOD_DISABLE
to prevent flushing denormals for MIN/MAX/CMP/CND and prevent
-NaN -> NaN conversion.
Inspired by patch from Filip Gawin.

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/30967>
2024-09-29 14:13:50 +00:00
Pavel Ondračka
cb41864343 r300: use fake ADD instead of MOV for negative KIL source fixup
Just emit fake ADD + 0 instead, because we want to emit MAX for MOV in
the next commit and also use RC_OMOD_DISABLE so that we preserve denormals
and correctly handle negative NaNs. Using ADD here will mean we get
RC_OMOD_MUL_1 later which will convert -0 to 0 and  therefore KIL will
work correctly.

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/30967>
2024-09-29 14:13:50 +00:00
GKraats
a95bd2dcf0 i915g: fix texture3d npot mipmaps
At i945_texture_layout_3d() util_next_power_of_two() is called,
which oversizes the npot-blocks for every level to get power of 2
for width and height. Hardware doesnot expect these oversized
npot-blocks. The call is removed.

Code is added to align allocation of npot-blocks correctly.

Also at i915_texture_layout_3d() the util_next_power_of_two() call
is removed. Besides the computation of block-allocation is changed,
because it still was using classic i915-coding.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31057>
2024-09-29 12:58:02 +00:00
Mike Blumenkrantz
3178170516 ci: bump gl cts versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31118>
2024-09-29 12:18:49 +00:00
Kai Wasserbäch
b53377b23b fix(FTBFS): build: link OpenCL target with dep_clang from top-level
The OpenCL target defined its own `dep_clang`, which was rather
incomplete, when compared to the version from the main `meson.build`
file.

This commit removes the custom version and relies on the main version of
`dep_clang` in the root level `meson.build`.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11945
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31364>
2024-09-29 11:38:54 +00:00
Valentine Burley
4497ea2a31 ci: Build zink and llvmpipe in debian-no-libdrm
Enable build testing for zink and llvmpipe in the debian-no-libdrm job.
EGL is still excluded due to additional dependencies on libdrm.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31430>
2024-09-28 18:08:27 +00:00
Valentine Burley
83c2f30349 egl: Fix missing libdrm check
Guard the usage of DRM_PRIME_CAP_IMPORT and DRM_PRIME_CAP_EXPORT behind HAVE_LIBDRM.

Fixes: c20d6a9197 ("egl: make dmabuf/modifier display bools a bit more precise/intelligible")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31430>
2024-09-28 18:07:01 +00:00
Martin Roukala (né Peres)
a74ebffc6a zink/ci: bump the polaris10 timeout to 30 minutes
We are dangerously close to begin with, but having some failures makes
it go over the 20 minutes timeout by ~30s. Let's add 50% to be safe.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31415>
2024-09-28 07:37:11 +03:00
Martin Roukala (né Peres)
dd27369522 zink/ci: document more radv flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31415>
2024-09-28 07:37:11 +03:00
Martin Roukala (né Peres)
e8cf44a71a radv/ci: document more vkcts flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31415>
2024-09-28 07:37:11 +03:00
Mohamed Ahmed
d5df263ac9 nvk: Enable VK_EXT_host_image_copy
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30044>
2024-09-28 02:46:28 +00:00
Mohamed Ahmed
5990de9182 nvk: Block off non-2D DRM format modifier images
Fixes: cd428e01d7 ("nvk: Advertise VK_EXT_image_drm_format_modifier")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30044>
2024-09-28 02:46:28 +00:00
Mohamed Ahmed
6c5420cd30 nvk: Add host copy functions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30044>
2024-09-28 02:46:28 +00:00
Faith Ekstrand
b99f28b7d6 nil: Add tiled memcpy helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30044>
2024-09-28 02:46:28 +00:00
Mohamed Ahmed
1c131de30e nil: Add level_layer_size_B() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30044>
2024-09-28 02:46:28 +00:00
Mohamed Ahmed
7314177245 nil: Expose px_to_B helpers to C
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30044>
2024-09-28 02:46:28 +00:00
Faith Ekstrand
c6adb0ac68 nil: Add a couple Extent4D and Offset4D methods
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30044>
2024-09-28 02:46:28 +00:00
GKraats
6c84103276 X11: fix crash of gnome-shell if mesa is compiled with legacy-x11=dri2
X11 starts up if Mesa is compiled with legacy-x11=dri2 and shows
the desktop.
It crashes with segfault as soon as an application is started.
At src/egl/drivers/dri2/platform_x11.c function dri2_from_names
(at src/gallium/frontends/dri/dri2.c) should be called
with offset address instead of with offset value.

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31406>
2024-09-27 22:55:20 +00:00
Eric Engestrom
210345cf09 ci: fix windows container jobs being missing on forks
The `.common-rules` need to be executed first, before all the "does this
file exist? is it modified?" logic in the farm rules (and in
api/driver/etc. rules after).

The custom override in windows jobs was bypassing this, resulting in
windows container jobs something being missing, breaking the pipelines.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31390>
2024-09-27 22:06:12 +00:00
Faith Ekstrand
05ece3e219 vulkan: Use SEVERITY_WARNING_BIT for vk_error*()
Our usage of vk_error to expound on error messages returned by drivers
probably falls more into the warning category.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31292>
2024-09-27 21:28:17 +00:00
Faith Ekstrand
891d8be5ac nvk,nil: Replace gob_height_is_8 and is_tiled with a new GOBType enum
This gives us the possibility of describing other GOB formats in the
future.  This also cleans things up a bit as it replaces all of the uses
of GOB_WIDTH/DEPTH with an extent which we can change in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31410>
2024-09-27 20:59:37 +00:00
Faith Ekstrand
d885e2bf21 nvk: Assume a GOB height of 8 for copies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31410>
2024-09-27 20:59:37 +00:00
Faith Ekstrand
62eccb66a6 nvk: Handle aspects in D32_S8_UINT copies
Fixes: 3572f5cd7e ("nvk: add support for D32_SFLOAT_S8_UINT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31410>
2024-09-27 20:59:37 +00:00
Marek Olšák
246051ebc6 ac/gpu_info: print 32bpp modifiers
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31187>
2024-09-27 19:21:55 +00:00
Marek Olšák
f7199b9971 ac/llvm: don't use the 64-bit umul_hi workaround with LLVM 19.1
It's fixed there.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31187>
2024-09-27 19:21:55 +00:00
Marek Olšák
89db355cc4 ac/llvm: use LLVM processor gfx942 for GFX940 when it's available
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31187>
2024-09-27 19:21:55 +00:00
Marek Olšák
163222abd0 ac/nir: set .image_dim and .image_array for all opcodes
for consistency

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31187>
2024-09-27 19:21:55 +00:00
Marek Olšák
14b576e023 ac: make sure VEGA20 and MI200 version ranges don't overlap with other chips
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31187>
2024-09-27 19:21:55 +00:00
Mike Blumenkrantz
64f3ef2ad7 lavapipe: EXT DGC
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31386>
2024-09-27 18:41:41 +00:00
Mike Blumenkrantz
8097a8e81e vk/runtime: add EXT DGC layout handling
Signed-off-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/31386>
2024-09-27 18:41:41 +00:00
Connor Abbott
b24c340cee freedreno/a6xx+: Add CP_CONTEXT_SWITCH_CNTL bitfields
Add missing bitfields necessary for preemption, taken from kgsl.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31422>
2024-09-27 17:28:35 +00:00
Guilherme Gallo
d801c1101d ci/anv: Update xfiles
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31414>
2024-09-27 16:38:27 +00:00
Guilherme Gallo
a748d38ec9 ci/anv: Introduce missing farm var for ADL jobs
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31414>
2024-09-27 16:38:27 +00:00
Guilherme Gallo
a06102ca6c ci/intel: Rebalance jobs via parallel
Take advantage of 3 spare JSL in Collabora lab to load the balance of
those jobs:

job name	avg duation (min)

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
---		---
anv-jsl		15
anv-jsl-angle	20
iris-jsl-deqp	18

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31414>
2024-09-27 16:38:26 +00:00
Guilherme Gallo
f25fb0c128 ci/amd: Rebalance jobs via DEQP_FRACTION
As we don't have capacity for more parallelism atm, increase the
fraction of the CTS for those jobs.

job name		average min

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
---			---
radv-stoney-angle	16
radv-stoney-vkcts	15

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31414>
2024-09-27 16:38:26 +00:00
Guilherme Gallo
82633b08e7 ci/amd: Rebalance radeonsi-stoney-gl:x86_64
It is taking 19 min on average to run this job.
As we don't have more capacity, introduce a fraction of 2 and create the
`full` version to be run on nightly pipelines.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31414>
2024-09-27 16:38:26 +00:00
Guilherme Gallo
f7d678a571 ci/freedreno: Add a618_gl_full
To cover up the new fraction in a618_gl job during nightly pipelines

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31414>
2024-09-27 16:38:26 +00:00
Guilherme Gallo
8786737c51 ci/freedreno: Rebalance jobs via fraction and parallel
job name	avg duration (min)
a618_vk		13
a660_gl		17
zink-tu-a618	18

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31414>
2024-09-27 16:38:26 +00:00
Guilherme Gallo
7a518a5bbf ci/freedreno: Replace 2 limozeen with kingoftown
By rebalancing the `a618_vk` job fraction from **2** to **3**, we have
freed up 2 `kingoftown` devices. These devices can now be reallocated to
the `a618_traces` and `a618_skqp` jobs to optimize resource utilization.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31414>
2024-09-27 16:38:26 +00:00
Guilherme Gallo
bee23535e1 ci/freedreno: Rebalance limozeen jobs
We lost another limozeen DUT, so reduce the parallelism.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31414>
2024-09-27 16:38:26 +00:00
Mike Blumenkrantz
c9ab80d2e5 zink: rework HIC image creation checks
the suboptimal check should just be another failure mode, and lacking
HIC support should not be a reason to potentially change tiling modes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
59487e4a61 zink: rework modifier selection (again)
the original handling here was supposed to be more granular, but I
never got around to making the granularity work

now it should do something like:
* run through all the modifiers and check for one that supports expected usage
  * do not ever remove mutable; this should always be supported for SOME modifier
* use LINEAR as a fallback (with mutable)

supporting mutable for srgb is the most important aspect of modifier selection
here since it avoids having to later reallocate the dmabuf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
dbfa597544 zink: stop passing modifier pointers internally
this is confusing and unnecessary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
4bd8daa24c zink: simplify some confusing modifier code
this makes passing modifiers more intelligible

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
d754425644 zink: add HIC back if suboptimal check fails
this should be checked again at every fallback

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
77ba1ad9f2 zink: delete redundant HIC usage check
this is the whole point of suboptimal_check_ici()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
8ca6549500 zink: fix some indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
be3424dee8 zink: init format props dynamically
this amortizes the (significant) cost of gathering format properties
across driver use and avoids checking props for formats that are never used

it cuts around 5% off init

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
8ce4951bf7 zink: wrap all access to format_props and modifier_props
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
086791ade8 zink: zink_modifier_prop -> zink_modifier_props
for consistency

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
1ca68ab87e zink: only use DISJOINT for planar images
minor typo

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31413>
2024-09-27 15:39:09 +00:00
Mike Blumenkrantz
d1f6e52de2 zink: check HAVE_LIBDRM for xf86drm.h include
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31408>
2024-09-27 12:58:00 +00:00
Daniel Svensson
55e1a596f6 zink: add spirv_info_h dep to libzink.
Build dependency of zink_compiler.c.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11926
Fixes: a09c5d55ed ("spirv: Auto-generate spirv_info.h")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31407>
2024-09-27 12:30:17 +00:00
Sviatoslav Peleshko
57344052b6 intel/brw: Don't apply discard_if condition opt if it can change results
We can't just always negate the alu instruction's cmod, because negating
it can produce different results when the argument is NaN float. We can
still do that if the condition is == or !=.

Fixes: 0ba9497e ("intel/fs: Improve discard_if code generation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11800
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/31042>
2024-09-27 11:52:27 +00:00
Rhys Perry
93372ea9af aco: do not use inline constants for 16-bit pseudo scalar trancendentals
Like https://github.com/llvm/llvm-project/pull/104395

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/30729>
2024-09-27 11:11:42 +00:00
Caio Oliveira
93c3780bc1 intel/brw: Skip per-primitive inputs when computing flat input mask
The per-primitive have their own separate section in the FS thread
payload, and are not considered when setting the mask in
3STATE_SBE's ConstantInterpolationEnable.

This is also consistent with what is done for brw_interp_reg().

Fixes
- dEQP-VK.mesh_shader.ext.misc.clip_geom_provoking_last
- dEQP-VK.mesh_shader.ext.misc.clip_geom_and_task_shader_provoking_last

Backport-to: 24.2
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11844
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31417>
2024-09-27 08:15:18 +00:00
Juan A. Suarez Romero
cc66268817 v3d/ci: add new flakes and timeouts
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31403>
2024-09-27 07:45:01 +00:00
Samuel Pitoiset
ad95cc1a5c radv: simplify determining conformant products
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31367>
2024-09-27 06:29:16 +00:00
Georg Lehmann
2ddffab33d vc4/ci: documment new failure
No idea how this can be caused by my MR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
bb7e8d51b6 nir: delete nir_opt_reuse_constants
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
5ccee0fe83 radv: remove nir_opt_reuse_constants call
aco now rematerializes constants per block, so this nir pass
no longer does anything meaningful besides adding noise:

Foz-DB Navi31:
Totals from 4674 (5.89% of 79395) affected shaders:
Instrs: 11497431 -> 11497335 (-0.00%); split: -0.02%, +0.02%
CodeSize: 60720620 -> 60725904 (+0.01%); split: -0.02%, +0.03%
VGPRs: 294440 -> 294428 (-0.00%)
SpillSGPRs: 3486 -> 3488 (+0.06%); split: -0.06%, +0.11%
Latency: 109298610 -> 109319617 (+0.02%); split: -0.02%, +0.04%
InvThroughput: 18606377 -> 18640872 (+0.19%); split: -0.01%, +0.19%
VClause: 232602 -> 232622 (+0.01%); split: -0.00%, +0.01%
SClause: 299675 -> 299746 (+0.02%); split: -0.01%, +0.04%
Copies: 840683 -> 840105 (-0.07%); split: -0.14%, +0.07%
Branches: 304581 -> 304646 (+0.02%); split: -0.00%, +0.03%
PreSGPRs: 233651 -> 233611 (-0.02%); split: -0.02%, +0.00%
VALU: 6624760 -> 6625051 (+0.00%); split: -0.00%, +0.01%
SALU: 1236841 -> 1236103 (-0.06%); split: -0.12%, +0.06%
VOPD: 2993 -> 2970 (-0.77%); split: +0.17%, -0.94%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
60776f87c3 nir/opt_remove_phis: rematerialize constants
Foz-DB Navi31:
Totals from 749 (0.94% of 79395) affected shaders:
Instrs: 1224359 -> 1223722 (-0.05%); split: -0.07%, +0.02%
CodeSize: 6468392 -> 6466296 (-0.03%); split: -0.06%, +0.03%
Latency: 9764410 -> 9766457 (+0.02%); split: -0.01%, +0.03%
InvThroughput: 1017401 -> 1017380 (-0.00%); split: -0.03%, +0.03%
VClause: 19902 -> 19873 (-0.15%); split: -0.16%, +0.02%
SClause: 38441 -> 38424 (-0.04%); split: -0.05%, +0.01%
Copies: 86880 -> 86304 (-0.66%); split: -0.73%, +0.06%
Branches: 34206 -> 34159 (-0.14%); split: -0.14%, +0.01%
PreSGPRs: 45557 -> 45527 (-0.07%); split: -0.08%, +0.01%
PreVGPRs: 32406 -> 32408 (+0.01%)
VALU: 671633 -> 671533 (-0.01%); split: -0.02%, +0.01%
SALU: 155284 -> 154675 (-0.39%); split: -0.40%, +0.00%
VMEM: 27303 -> 27271 (-0.12%)
SMEM: 67490 -> 67455 (-0.05%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
40fc85c15b nir: make nir_instr_clone usable with load_const and undef
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Georg Lehmann
a9f8089240 nir: replace nir_opt_remove_phis_block with a single source version
This is what callers actually want, and it simplifies nir_opt_remove_phis
because we can assume dominance meta data is valid.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31031>
2024-09-27 05:19:16 +00:00
Iván Briano
a4cbc903a8 anv: allocate sparse descriptor buffers from the correct heap
When allocating a buffer normally, this flag gets to the allocator from
the memory requirements, but when sparse bindings are created we were
checking for them but never setting them.
Fixes sparse descriptor buffers on Xe2.
Makes the failure on TRTT more obvious.

Fixes: c6a91f1695 ("anv: add new heap/pool for descriptor buffers")
Fixes: 692e1ab2c1 ("anv: get rid of the second dynamic state heap")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31372>
2024-09-27 04:49:22 +00:00
Paulo Zanoni
fe59044f47 anv/trtt: mark vk_sync_get_value()'s value as defined for Valgrind
Valgrind doesn't seem to know that drmSyncobjQuery() writes to the
variable that we pass as 'last_value'. This gets rid of:

==6275== Conditional jump or move depends on uninitialised value(s)
==6275==    at 0x5308370: anv_sparse_trtt_garbage_collect_batches (anv_sparse.c:540)
==6275==    by 0x53091E2: anv_sparse_bind_trtt (anv_sparse.c:825)
==6275==    by 0x5309771: anv_sparse_bind (anv_sparse.c:953)
==6275==    by 0x5309A3B: anv_free_sparse_bindings (anv_sparse.c:1041)
==6275==    by 0x529FF21: anv_DestroyBuffer (anv_buffer.c:248)
==6275==    by 0x932ADBD: ??? (in /usr/lib/x86_64-linux-gnu/libVkLayer_khronos_validation.so)
==6275==    by 0x127AA2: MyVkBuffer::~MyVkBuffer() (sparse.cpp:364)
==6275==    by 0x12B2D4: MyApp::test1_trivial_sparse() (sparse.cpp:1421)
==6275==    by 0x13E01A: MyApp::run_test(int) (sparse.cpp:6594)
==6275==    by 0x13E3B0: main (sparse.cpp:6656)
==6275==  Uninitialised value was created by a stack allocation
==6275==    at 0x53082D3: anv_sparse_trtt_garbage_collect_batches (anv_sparse.c:525)

An alternative to these Valgrind macros would simply have been to
zero-intialize last_value.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31332>
2024-09-27 04:10:12 +00:00
Paulo Zanoni
ab91106d4f anv: fix compute engines when using ANV_QUEUE_OVERRIDE
I just noticed that my custom sparse program was not working correctly
when I used ANV_QUEUE_OVERRIDE (instead of enabling the compute queue
by default or using INTEL_ENGINE_CLASS_COMPUTE, which was removed by
commit 600d88ab3c ("intel: Remove INTEL_ENGINE_CLASS_COMPUTE and
INTEL_ENGINE_CLASS_COPY parameters").

It turns out we were not setting the same engine class type when using
ANV_QUEUE_OVERRIDE vs the other cases. Move the code around so the
behavior can stay the same.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31332>
2024-09-27 04:10:12 +00:00
Matt Turner
75f02ed4b5 anv: Set shader_spilling_rate=15 by default
This avoids massively long shader compile times when there is lots of
spilling, at a minor cost of a few more spills/fills. Choose 15 as it is
already the default used by the Cyberpunk 2077 driconf workaround.

Surprisingly the number of additional spills/fills are miniscule in
fossil-db:

  Instructions in all programs: 152680595 -> 152681525 (+0.0%)
  SENDs in all programs: 7672789 -> 7672789 (+0.0%)
  Loops in all programs: 48469 -> 48469 (+0.0%)
  Cycles in all programs: 11981743456 -> 11984228708 (+0.0%)
  Spills in all programs: 42989 -> 42779 (-0.5%)
  Fills in all programs: 76380 -> 76776 (+0.5%)

partly because of the chaotic unpredictability that the choice of
registe to spill has on a shader. For example, this patch massively
helps some shaders in terms of spills/fills:

  Spills helped fossils/fossil-db/steam-native/red_dead_redemption2.vk-g6.foz/4101ff9c9b83bf22/SIMD8 fragment: 3208 -> 2894 (-9.8%)
  Fills helped fossils/fossil-db/steam-native/red_dead_redemption2.vk-g6.foz/4101ff9c9b83bf22/SIMD8 fragment: 7258 -> 6795 (-6.4%)
  Spills helped fossils/q2rtx/q2rtx-rt-pipeline.976f4ab1c0fee975.1.foz/c496e8a549f6b4bf/compute: 109 -> 92 (-15.6%)

Related: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31133
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9241
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11709
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11844
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31269>
2024-09-27 03:43:52 +00:00
Serdar Kocdemir
27295ca4d0 gfxstream: Handle tmp folder explicitly on codegen
Avoid getting different relative folders for tmp folder when the
code is generated from different checkout locations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31400>
2024-09-27 03:20:07 +00:00
Serdar Kocdemir
73ac603f9d gfxstream: Add VkPrivateDataSlot handle type
Private data slot types are required to support VK_EXT_private_data
extension. Some additional changes for handle remapping over uint64_t
types will be submitted later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31400>
2024-09-27 03:20:06 +00:00
Caio Oliveira
4e559077e4 intel/executor: Dump both pre-processed source and assembly
Having the actual generated assembly is helpful when trying to figure
out if the code emission and disassembly are implemented correctly.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31305>
2024-09-27 02:46:28 +00:00
Caio Oliveira
2455e2765a intel/brw: Add DUMP flag to brw_assemble
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31305>
2024-09-27 02:46:28 +00:00
Lionel Landwerlin
50cc738a6d blorp: convert fast clear color for unsupported formats
This tests is asserting on LNL like :

  dEQP-VK.pipeline.monolithic.sampler.border_swizzle.r8_srgb.gbar.custom.gather_1.no_swizzle_hint
  dEQP-VK.api.image_clearing.core.clear_color_image.2d.optimal.single_layer.e5b9g9r9_ufloat_pack32

Because blorp tries, for example, to setup a render target with
L8_UNORM_SRGB (which is mapped to the R8_UNORM_SRGB of Vulkan) but is
not supported for rendering.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 1c7fe9ad1b ("anv: Support fast clears in anv_CmdClearColorImage")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31357>
2024-09-27 00:37:25 +00:00
Mary Guillemard
10282ee079 panvk/ci: Increase panfrost-g52-vk fraction
premerge have a time limit of 15 min, those jobs takes between 20 to 33
min with a fraction of 8 right now.

Additionally, we only have 7 VIM3 and could be trying to queue 8 jobs.

Let's fraction to 32 for now and revert back to 2 runners.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 2f54228da5 ("panvk/ci: Update to run full CTS on G52")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31404>
2024-09-26 23:48:05 +00:00
Caio Oliveira
28ef0de250 intel/brw: Add SWSB MATH pipe to assembler
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31336>
2024-09-26 20:40:28 +00:00
Eric Engestrom
df1a89b9e1 ci/deqp: make sure the git commit hash of deqp is stable across rebuilds
This makes it much easier to verify whether two jobs are running the same deqp build.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31397>
2024-09-26 19:46:08 +00:00
Eric Engestrom
a942ed351e mr-label-maker: add gfxstream
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31402>
2024-09-26 18:53:58 +00:00
Faith Ekstrand
83b220f833 nvk: Advertise VK_EXT_device_generated_commands
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
347e6b493b nvk: Handle indirect dispatch in pipeline barriers
Preprocess writes need to flush the data cache and indirect reads now
need to invalidate the constant cache and the QMD cache.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
976f22a5da nvk: Implement CmdProcess/ExecuteGeneratedCommandsEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
78e0adbfe1 nvk: Expose an nvk_cmd_flush_cs_qmd() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
341dca8eaf nvk: Export graphics state flushing helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
2dfd1b9151 nvk: Move flush_push_descriptors to the front of flush_state()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
e1404ffd11 nvk: Track and dump device-generated commands if possible
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
7b6b2f9501 nvk/nvkmd: Add a mechanism to track and look up nvkmd_mems
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
f63ec91b52 nvk/nvkmd: Always map read/write for internal maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
10b3222522 nvk: Add an implementation of VkIndirectExecutionSetEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
09ed607a37 nvk: Disable CBuf pushing when INDIRECT_BINDABLE_BIT is set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:26 +00:00
Faith Ekstrand
0e1545586d nvk: Use VkShaderStageFlags for shaders_dirty
This requires a bit more juggling of shader enums but it also cleans
things up a bit since we're no longer using a bitfield which isn't
VkShaderStageFlags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:25 +00:00
Faith Ekstrand
a5f20591eb nvk: Fill out shader push data at compile time
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:25 +00:00
Faith Ekstrand
5ebcb71e94 vulkan/pipeline: Patch through INDIRECT_BINDABLE_BIT
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:25 +00:00
Faith Ekstrand
4ae2882bc1 vulkan: Add a vk_pipeline_ops::get_shader method
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:25 +00:00
Faith Ekstrand
4a9a4721fe vulkan: Add a stages field to vk_pipeline
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31394>
2024-09-26 17:18:25 +00:00
Job Noorman
71080b0fa1 tu: advertise VK_KHR_shader_subgroup_rotate
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31358>
2024-09-26 16:36:36 +00:00
Job Noorman
6c7192ce24 ir3: add codegen for rotate
shfl.rdown is an exact match for subgroupRotate so codegen is
straightforward.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31358>
2024-09-26 16:36:36 +00:00
Job Noorman
d43f39678c ir3: make backend aware of shfl:
- Validation;
- Copy prop: src2 can be shared;
- Legalization: is (ss) producer.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31358>
2024-09-26 16:36:36 +00:00
Job Noorman
222b46f008 ir3/print: add support for shfl
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31358>
2024-09-26 16:36:36 +00:00
Job Noorman
a8661f1186 ir3: add ir3_compiler::has_shfl for shfl support on a6xx+
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31358>
2024-09-26 16:36:36 +00:00
Job Noorman
fb7b7401a5 ir3/isa: add isaspec definition for shfl
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31358>
2024-09-26 16:36:35 +00:00
Lionel Landwerlin
fe57b10221 zink: avoid host transfer usage with sparse
It's not a requirement to support this for implementations. Also
doesn't make much sense...

Fixes
KHR-GL46.sparse_texture_clamp_tests.SparseTextureClampLookupResidency
on Anv with VK_EXT_host_image_copy enabled.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: f24891269d ("zink: check/use suboptimal HIC during ici init")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31391>
2024-09-26 15:59:18 +00:00
Eric Engestrom
159cc0fe6f lavapipe/ci: document ray tracing regression
Regression from a commit in 878ae970...e0efab52, likely
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31186

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31395>
2024-09-26 15:24:10 +00:00
Georg Lehmann
41e82b8b8e nir: sink is_subgroup_invocation_lt_amd
Having it closer to the branches means we can eliminate an exec copy.

Foz-DB Navi31:
Totals from 11615 (14.63% of 79395) affected shaders:
Instrs: 6804372 -> 6804903 (+0.01%); split: -0.04%, +0.05%
CodeSize: 33684672 -> 33680584 (-0.01%); split: -0.07%, +0.05%
VGPRs: 578616 -> 578604 (-0.00%)
SpillSGPRs: 1506 -> 1304 (-13.41%)
Latency: 29817034 -> 29821320 (+0.01%); split: -0.03%, +0.05%
InvThroughput: 3581587 -> 3581217 (-0.01%); split: -0.02%, +0.01%
VClause: 124826 -> 124782 (-0.04%); split: -0.04%, +0.00%
SClause: 187916 -> 187645 (-0.14%); split: -0.27%, +0.13%
Copies: 520969 -> 510027 (-2.10%); split: -2.20%, +0.10%
PreSGPRs: 442584 -> 421344 (-4.80%)
VALU: 3810755 -> 3810267 (-0.01%); split: -0.01%, +0.00%
SALU: 763402 -> 752650 (-1.41%); split: -1.48%, +0.07%

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31184>
2024-09-26 14:29:14 +00:00
Georg Lehmann
78b8ec9c93 aco: optimize lanecount_to_mask
s_bfe uses 7 bits for the size, so when we extract from -1,
we can get all possible lane masks in one instruction.

Foz-DB Navi31:
Totals from 38601 (48.62% of 79395) affected shaders:
Instrs: 13670163 -> 13509738 (-1.17%)
CodeSize: 68011644 -> 67368308 (-0.95%)
Latency: 61203404 -> 61065419 (-0.23%); split: -0.23%, +0.00%
InvThroughput: 6897028 -> 6894634 (-0.03%); split: -0.05%, +0.01%
SALU: 1491291 -> 1342553 (-9.97%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31184>
2024-09-26 14:29:14 +00:00
Georg Lehmann
63b45767f8 aco/ssa_elimination: optimize branching sequence with SALU that has multiple definitions
Foz-DB Navi31:
Totals from 1801 (2.27% of 79395) affected shaders:
Instrs: 1595030 -> 1591942 (-0.19%); split: -0.19%, +0.00%
CodeSize: 8442656 -> 8430140 (-0.15%); split: -0.15%, +0.00%
Latency: 12885611 -> 12879201 (-0.05%); split: -0.05%, +0.00%
InvThroughput: 2420596 -> 2419800 (-0.03%); split: -0.03%, +0.00%
Copies: 125726 -> 123572 (-1.71%)
SALU: 249990 -> 247836 (-0.86%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31184>
2024-09-26 14:29:14 +00:00
Georg Lehmann
f129ae647a aco/ssa_elimination: don't check for VALU limitation when optimizing branching sequence
These instructions need exec, so we would never see them here because
try_optimize_branching_sequence will not be called.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31184>
2024-09-26 14:29:14 +00:00
Georg Lehmann
151cd9c92b ac/lower_ngg: use is_subgroup_invocation_lt_amd offset
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31184>
2024-09-26 14:29:14 +00:00
Georg Lehmann
bcfc5c09fa amd: add offset to is_subgroup_invocation_lt_amd
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31184>
2024-09-26 14:29:13 +00:00
Dave Airlie
29207d83a7 zink: whitespace fixups
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Dave Airlie
fd2a816010 zink: handle mutable check without crashing if format list not found
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
1511e6e24c zink: move some image ici init up
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
3f65a3928f zink: stop creating useless sampler conversions
this needs to be context-based and hashed/shared

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Dave Airlie
890e7555d4 zink: free modifiers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
f332128ccf zink: swap sampler conversion conditional with yuv check
this is more useful

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
ad7eee23e9 zink: slightly refactor image tiling inference
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
db420b2406 zink: correctly handle disjoint image creation
this is set/bound based on format flags

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
e820e002ce zink: fix planar image creation with mutable
spec currently broken, but this is correct

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Mike Blumenkrantz
54d16dbe29 zink: only clamp samplerview aspect for zs formats
this otherwise breaks planar images

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31320>
2024-09-26 12:51:01 +00:00
Kai Wasserbäch
4d88d8ba4c fix(FTBFS): clover: use .getDataLayout() with LLVM >= 20
Upstream LLVM commit 75c7bca740935a0cca462e28475dd6b046a6872c removed
the option to pass a Module pointer to DataLayout's constructor.

This commit does the same, that upstream did for their code in clover.

Reference: 75c7bca740
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11863
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31350>
2024-09-26 12:03:37 +00:00
Samuel Pitoiset
777f9900b3 vulkan: Update XML and headers to 1.3.296
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31381>
2024-09-26 11:12:03 +00:00
Mary Guillemard
d4cb32f42f panfrost: Implement context priority on v10
This implement PIPE_CAP_CONTEXT_PRIORITY_MASK and handle priority flags
for v10.

This effectively expose EGL_IMG_context_priority and
EGL_NV_context_priority_realtime.

Expose of what is currently supported from the panthor uAPI.

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/30991>
2024-09-26 10:21:19 +00:00
Mary Guillemard
83bc9bb1af pan/kmod: Add priority query uapi support
This adds support for the new DEV_QUERY_GROUP_PRIORITIES_INFO query from
panthor to report and will be used to report appropriate priority mask
in the Gallium driver.

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/30991>
2024-09-26 10:21:19 +00:00
Mary Guillemard
c0b55da825 panfrost: Update panthor_drm.h with latest
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/30991>
2024-09-26 10:21:19 +00:00
Lucas Stach
c49a71c03c gbm: mark surface buffers as explicit flushed
Some drivers are able to optimize buffer usage when it is known that
external visibility of buffer changes only needs to be guaranteed
after well defined transition points, like eglSwapBuffers.

Add a BO flag to specify this behavior and set it with GBM surfaces.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30077>
2024-09-26 09:36:46 +00:00
Thomas Wagner
3786f5c27a llvmpipe: Remove unused struct member
This was removed by an earlier commit but snuck back in.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31022>
2024-09-26 08:26:33 +00:00
Thomas Wagner
3e01c15fa7 llvmpipe: properly save llvmpipe_memory_allocation in memory_object
Importing an opaque fd no longer returns the mapped pointer but
a pointer to llvmpipe_memory_allocation to support both memfds and
dma bufs. This saves the pointer with the correct type and we can
unwrap the mapped data in a correct way.

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31022>
2024-09-26 08:26:32 +00:00
Thomas Wagner
39156b6cd4 llvmpipe: Unmap DMA buffer to release all resources
If the buffer is not unmapped then a reference to the DMA buffer
is still kept. The DRM device is then not properly cleaned up.
This can cause the application to keep a DRM device open which is
still DRM master without any visible open file descriptors.

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31022>
2024-09-26 08:26:32 +00:00
Thomas Wagner
af16ec6e0c llvmpipe: Fix external memory object reference
Make the external memory object a reference counted object. Without
that deleting the memory object in OpenGL would also delete and unmap
the memfd, which causes any operation on a texture or buffer that is
bound to that memory object to access invalid memory.

Fixes: 1608a815e3 ("llvmpipe: add support for EXT_memory_object(_fd)")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31022>
2024-09-26 08:26:32 +00:00
Sagar Ghuge
f39cd30f4f anv: Track all the descriptor sets
During compute state save/restore, let's track all the descriptor sets.

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/30798>
2024-09-26 06:56:21 +00:00
Juan A. Suarez Romero
786caf580b broadcom: do not include simulator if not available
Instead of including always the simulator file and have the code under
`#ifdefs` depending if the simulator is available or not, let's not
include the simulator directory entirely if the simulator is not
available.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31356>
2024-09-26 06:12:23 +00:00
Dave Airlie
a59efe40b2 radv/video: handle missing h265 feedback struct.
I'm not sure this should be missing, but handle if if it is.

Reviewed-by: Lynne <dev@lynne.ee>
Fixes: 7c6e3c70b6 ("radv/video/enc: report pps overrides in feedback for h265")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31158>
2024-09-26 04:56:34 +00:00
Dave Airlie
db5312f842 radv/video: add encode field for vcn4
Reviewed-by: Lynne <dev@lynne.ee>
Fixes: 967e4e09de ("radv/video: add h265 encode support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31158>
2024-09-26 04:56:34 +00:00
Dave Airlie
c78e32da3b radv/video/enc: report pictureAccessGranularity of CTB size.
Reviewed-by: Lynne <dev@lynne.ee>
Fixes: 967e4e09de ("radv/video: add h265 encode support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31158>
2024-09-26 04:56:34 +00:00
Dave Airlie
9fab2072a3 radv/video: use the h264 defines for macroblock w/h
Just a cleanup, add some comments as well.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31158>
2024-09-26 04:56:34 +00:00
Colin Marc
88dacc3d80 radv/video: set TemporalId correctly
This is only relevant for hierarchical coding using sub-layers.

Fixes: 967e4e09de ("radv/video: add h265 encode support")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Colin Marc <hi@colinmarc.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31303>
2024-09-26 04:18:11 +00:00
Colin Marc
2cf5ef37ba vulkan/video: set HEVC nuh_temporal_id_plus1 and nal_unit_type correctly
This is only relevant for hierarchical coding using sub-layers.

Fixes: 72f52329cd ("vulkan/video: add a nal_unit lookup for hevc")

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Colin Marc <hi@colinmarc.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31303>
2024-09-26 04:18:11 +00:00
Iván Briano
101a803858 vulkan: use standard sample locations if there's no VkPipelineSampleLocationsStateCreateInfoEXT
If the pipeline is created with no
VkPipelineSampleLocationsStateCreateInfoEXT, but
VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is set, we end up
dereferencing a NULL pointer.

Fixes future dEQP-VK.pipeline.*.extended_dynamic_state.*.sample_locations_enable_no_create_info

Fixes: 1deb83fb86 ("vulkan: Add more dynamic multisample states")

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31377>
2024-09-26 03:43:57 +00:00
Marek Olšák
09e64e3682 nir/opt_shrink_vectors: shrink memory loads, not just IO
The problem with radeonsi+ACO is that UBO loads from vec4 uniforms using
only 1 component always load all 4 components. This fixes that.

We are only interested in shrinking UBO and SSBO loads, but I added more
intrinsics because why not.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29384>
2024-09-26 03:01:38 +00:00
Eric R. Smith
ef2bb4728f panvk: Support blend shaders for alpha_to_one_enable
As in OpenGL, if alpha-to-one is required for Vulkan generate a
blend shader for it (since the hardware does not support alpha_to_one
natively).

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31194>
2024-09-26 02:25:28 +00:00
Eric R. Smith
008a17da60 panfrost: fix SAMPLE_ALPHA_TO_ONE
When SAMPLE_ALPHA_TO_ONE is enabled we need to use a blend shader, as
the BlendDescriptor.alpha_to_one bit is deprecated (does not work)
on bifrost and valhall.

In order to generate the appopriate blend shader code, we must put the
alpha_to_one status into pan_blend_state.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31194>
2024-09-26 02:25:28 +00:00
Rob Clark
9ee75f9141 freedreno/register: A couple pm4 updates
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31349>
2024-09-26 01:06:24 +00:00
Rob Clark
0ae340bb0d freedreno/crashdec: Fix fault address handling
The "  - far:" pattern never landed upstream (yet) but was part of some
enhanced fault debugging we have in the CrOS kernel.  Update crashdec to
handle both cases.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31349>
2024-09-26 01:06:23 +00:00
Pohsiang (John) Hsu
e0d77f925e d3d12: fix incorrect memset in d3d12_video_encoder_references_manager_hevc
Fixes: 92d6989fdc ("d3d12: Add support for HEVC 4:4:4 video encode using AYUV format")

Signed-Off-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31371>
2024-09-26 00:29:53 +00:00
Nikita Popov
a8eed9cca2 gallium: Don't pass avx512er and avx512pf features on LLVM 19
These target features have been remove in LLVM 19, and cause
warnings like the following to be printed:

    '-avx512er' is not a recognized feature for this target (ignoring feature)
    '-avx512pf' is not a recognized feature for this target (ignoring feature)

Do not pass these target features on LLVM 19 and newer.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11870
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31321>
2024-09-25 22:40:35 +00:00
Dylan Baker
f8273555d3 anv: enable VK_EXT_ycbcr_2plane_444_formats
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31352>
2024-09-25 22:10:14 +00:00
Sil Vilerino
6aca12c51d d3d12: Fix HEVC chroma_format_idc, separate_colour_plane_flag and conf_win_*_offset for HEVC 444
Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31361>
2024-09-25 21:18:18 +00:00
Mary Guillemard
43db7e5323 egl: Support NV_context_priority_realtime
This extension extends EGL_IMG_context_priority with a new
EGL_CONTEXT_PRIORITY_REALTIME_NV attribute.

Effectively, Gallium drivers would need to implement
PIPE_CONTEXT_REALTIME_PRIORITY flag in context_create and expose
PIPE_CONTEXT_PRIORITY_REALTIME on PIPE_CAP_CONTEXT_PRIORITY_MASK to
enable this extension.

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/30989>
2024-09-25 20:17:27 +00:00
Caio Oliveira
d12950539c intel/brw: Consider pipe when comparing SWSB in tests
When tests were added, there was a single pipe (float), so there wasn't
a pipe to compare in `operator==`.  Add it there now and adjust
expectations accordingly.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31335>
2024-09-25 19:32:31 +00:00
Konstantin Seurer
b33a29f61e lavapipe: Implement VK_KHR_shader_subgroup_rotate
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31250>
2024-09-25 18:47:56 +00:00
Konstantin Seurer
dfa314e805 lavapipe: Implement clustered reductions
Replaces the runtime loop with a compile time loop and restarts the scan
on multiples of cluster_size.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31250>
2024-09-25 18:47:56 +00:00
Lars-Ivar Hesselberg Simonsen
1f3b8bb918 panvk: Add support for Draw[Indexed]Indirect
Adds support for limited Draw[Indexed]Indirect. MultiDrawIndirect and
DrawIndirect + layers are still not supported and will just hit an
assert for now.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11887
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:31 +00:00
Lars-Ivar Hesselberg Simonsen
ec2222f7a6 panvk: Split panvk_cmd_draw into prepare_draw
To prepare for adding draw_indirect, move shared parts into a separate
function called prepare_draw.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:31 +00:00
Lars-Ivar Hesselberg Simonsen
1fa364bfe3 panvk: Add get_tiler_idvs_flags
To prepare for factoring out a larger part of panvk_cmd_draw to a
separate prepare function, move tiler idvs flag calculation to a
separate function.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:30 +00:00
Lars-Ivar Hesselberg Simonsen
fb67fc6d08 panvk: Only set index buffer size for DrawIndexed
There is no need to update the index_array_size register unless the draw
is indexed and the index buffer has changed. For non-indexed draws, this
field is not read.

To achieve this, add a new function prepare_index_buffer that updates
both the size and the pointer registers in case the state is dirty.

As this decouples the index buffer size register from the drawcall, set
the full index buffer size.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:30 +00:00
Lars-Ivar Hesselberg Simonsen
9da908838a panvk: Use the passed Vertex Attribute divisor
MALI_ATTRIBUTE_FREQUENCY_INSTANCE allows us to use the passed vertex
attribute divisor directly without having to multiply it by vertex
count.

This decouples the vertex attribute building from drawcalls.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:30 +00:00
Lars-Ivar Hesselberg Simonsen
0b11d1a96f panvk: Map device memory for PANVK_DEBUG=trace
This allows us to trace applications that use device memory for
LOAD_MULTIPLE operations.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31314>
2024-09-25 17:23:30 +00:00
Lionel Landwerlin
0b5408f9fc anv: expose VK_EXT_pipeline_protected_access
Intel's protection mechanism is descriptor based. There is nothing
going on in the shaders.

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/31339>
2024-09-25 16:45:49 +00:00
Valentine Burley
61c7c8266d freedreno/devices: Document an alias for FD644
While the blob driver calls this GPU A644, in kgsl (and internally) it is known as A662.
The chip_id also reflects this name.

A662 is a closer match to reality as we're talking about an A660-based GPU, but keep the name
we expose as FD644 to match the blob.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31328>
2024-09-25 15:50:55 +00:00
Valentine Burley
dde6acceb5 freedreno/devices: Unify magic_regs for A740 and A32
The only difference was RB_UNKNOWN_8E01 being set to 0x0 or 0x00000000.
Their raw_magic_regs however are different.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31328>
2024-09-25 15:50:55 +00:00
Valentine Burley
7968b356f8 freedreno/devices: Fix A740v3 from Quest 3
Based on a patch by weab chan.

The chip_id wasn't getting picked up with the capital B, so use lowercase hex values
like everywhere else.

Move it as a separate entry and turn on enable_tp_ubwc_flag_hint as the Quest 3 ships
with blob version 7xx, and expose the name as FD740v3 for clarity.

Unify the raw_magic_regs with a740, but as noted by Danylo in the initial enablement, set
RB_DBG_ECO_CNTL to 1 on a740v3 in magic_regs.

Fixes image corruption issues on this device.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10316
Fixes: 0b5097081a ("freedreno/devices: Add A740v3 from Quest 3")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31328>
2024-09-25 15:50:55 +00:00
Iago Toral Quiroga
050c0948f2 v3d: support shader precompile for compute shaders
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31355>
2024-09-25 14:21:46 +00:00
Iago Toral Quiroga
5a62d47762 broadcom/compiler: don't use small immediates in geometry stages
Shader-db shows this is beneficial, even if it comes with a small
increase in register pressure.

total instructions in shared programs: 10889197 -> 10869857 (-0.18%)
instructions in affected programs: 3625014 -> 3605674 (-0.53%)
helped: 14911
HURT: 8324
Instructions are helped.

total threads in shared programs: 431034 -> 431014 (<.01%)
threads in affected programs: 40 -> 20 (-50.00%)
helped: 0
HURT: 10
Threads are HURT.

total uniforms in shared programs: 5308006 -> 5432767 (2.35%)
uniforms in affected programs: 2204951 -> 2329712 (5.66%)
helped: 9
HURT: 30766
Uniforms are HURT.

total max-temps in shared programs: 2226471 -> 2235269 (0.40%)
max-temps in affected programs: 272670 -> 281468 (3.23%)
helped: 2372
HURT: 8479
Max-temps are HURT.

total spills in shared programs: 4318 -> 4331 (0.30%)
spills in affected programs: 39 -> 52 (33.33%)
helped: 2
HURT: 7

total fills in shared programs: 6514 -> 6527 (0.20%)
fills in affected programs: 42 -> 55 (30.95%)
helped: 2
HURT: 7

total sfu-stalls in shared programs: 15166 -> 15808 (4.23%)
sfu-stalls in affected programs: 2389 -> 3031 (26.87%)
helped: 513
HURT: 944
Inconclusive result (%-change mean confidence interval includes 0).

total inst-and-stalls in shared programs: 10904363 -> 10885665 (-0.17%)
inst-and-stalls in affected programs: 3660930 -> 3642232 (-0.51%)
helped: 14878
HURT: 8450
Inst-and-stalls are helped.

total nops in shared programs: 183672 -> 184256 (0.32%)
nops in affected programs: 12532 -> 13116 (4.66%)
helped: 1841
HURT: 2251
Nops are HURT.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31355>
2024-09-25 14:21:46 +00:00
Iago Toral Quiroga
390849f6a2 broadcom/compiler: don't add const offset to unifa if it is 0
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31355>
2024-09-25 14:21:46 +00:00
Iago Toral Quiroga
09e0e53a3b broadcom/compiler: avoid register conflict with ldunif(a) and ldvary
ldvary instructions have implicit writes to rf0 (r5 in Pi4) that are
read in follow-up instructions to complete the interpolation calculations
so we rather not allocate ldunif(a)'s dst to rf0/r5  during these sequence
too to facilitate pairing.

This gives us -0.25% of instructions for fragment shaders in shader-db for
Pi5 and -0.64% on Pi4.

Shader-db Pi5:

total instructions in shared programs: 10890641 -> 10889197 (-0.01%)
instructions in affected programs: 575506 -> 574062 (-0.25%)
helped: 2506
HURT: 1378
Instructions are helped.

total max-temps in shared programs: 2226555 -> 2226471 (<.01%)
max-temps in affected programs: 5061 -> 4977 (-1.66%)
helped: 139
HURT: 78
Max-temps are helped.

total sfu-stalls in shared programs: 15143 -> 15166 (0.15%)
sfu-stalls in affected programs: 310 -> 333 (7.42%)
helped: 134
HURT: 195
Inconclusive result (value mean confidence interval includes 0).

total inst-and-stalls in shared programs: 10905784 -> 10904363 (-0.01%)
inst-and-stalls in affected programs: 577053 -> 575632 (-0.25%)
helped: 2497
HURT: 1415
Inst-and-stalls are helped.

total nops in shared programs: 183945 -> 183672 (-0.15%)
nops in affected programs: 3862 -> 3589 (-7.07%)
helped: 478
HURT: 234
Nops are helped.

Shader-db Pi4:

total instructions in shared programs: 12842116 -> 12835720 (-0.05%)
instructions in affected programs: 996970 -> 990574 (-0.64%)
helped: 6027
HURT: 367
Instructions are helped.

total max-temps in shared programs: 2251877 -> 2251707 (<.01%)
max-temps in affected programs: 2670 -> 2500 (-6.37%)
helped: 167
HURT: 9
Max-temps are helped.

total sfu-stalls in shared programs: 21132 -> 21093 (-0.18%)
sfu-stalls in affected programs: 114 -> 75 (-34.21%)
helped: 92
HURT: 55
Sfu-stalls are helped.

total inst-and-stalls in shared programs: 12863248 -> 12856813 (-0.05%)
inst-and-stalls in affected programs: 1008237 -> 1001802 (-0.64%)
helped: 6070
HURT: 359
Inst-and-stalls are helped.

total nops in shared programs: 281645 -> 281200 (-0.16%)
nops in affected programs: 2241 -> 1796 (-19.86%)
helped: 501
HURT: 88
Nops are helped.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31355>
2024-09-25 14:21:46 +00:00
Iago Toral Quiroga
917e8e5439 broadcom/compiler: rename is_ldunif_dst to try_rf0
We flag nodes used to ldunif dst so we can try and favor allocating
rf0 to them, so be more explicit about its purpose.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31355>
2024-09-25 14:21:46 +00:00
Lionel Landwerlin
d2f7b6d5a7 anv: implement VK_KHR_dynamic_rendering_local_read
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/27270>
2024-09-25 12:51:07 +00:00
Lionel Landwerlin
15987f49bb anv: avoid setting up a null RT unless needed
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/27270>
2024-09-25 12:51:07 +00:00
Lionel Landwerlin
6f5d032c6f intel/decoder: decode the 8 BLEND_STATEs
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/27270>
2024-09-25 12:51:07 +00:00
Lionel Landwerlin
d164fe839c intel/decoder: split state tracking handlers from printing ones
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/27270>
2024-09-25 12:51:07 +00:00
Lionel Landwerlin
b39980c616 intel/decoder: add filter feature
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/27270>
2024-09-25 12:51:07 +00:00
Lionel Landwerlin
7bd4b537fe intel/decoder: constify functions not modifying instructions/fields
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/27270>
2024-09-25 12:51:07 +00:00
Mary Guillemard
8318bef289 panvk/ci: Make panfrost-g52-vk run at premerge
This is stable and only take 20 min max currently.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31340>
2024-09-25 11:05:52 +00:00
Mary Guillemard
2f54228da5 panvk/ci: Update to run full CTS on G52
A full CTS run currently takes around 4 hours.

As we are allocating 4 runners to stay in a 45 min budget,
let's have a 8 fraction (that should be around 30 min)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31340>
2024-09-25 11:05:52 +00:00
Mary Guillemard
131d2745c4 panvk/ci: Update Mali-G52 status with full VKCTS
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31340>
2024-09-25 11:05:52 +00:00
Lionel Landwerlin
2193d87277 brw: remove EOT handling from sampler messages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31307>
2024-09-25 10:22:40 +00:00
Lionel Landwerlin
2ed4af057a brw: fix mask componentation for 16-bit sampler returns
We can't use register counts since 16-bit sampler loads in SIMD8 will
only write back half a GRF.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Fixes: 0116430d39 ("intel/brw: Handle 16-bit sampler return payloads")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31307>
2024-09-25 10:22:40 +00:00
Lionel Landwerlin
eeb5f6e8c8 brw: make sampler message emission more generic
We can generalize the simd8-16bits case by just rounding to a physical
register.

We also take the opportunity to limit the register allocation to a
single physical GRF for the residency data.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Fixes: 0116430d39 ("intel/brw: Handle 16-bit sampler return payloads")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31307>
2024-09-25 10:22:40 +00:00
Timothy Arceri
f6e7520b13 glsl: remove now unused linker code
This has all be replaced by a nir based linker implementation.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
cbfc225e2b glsl: switch to a full nir based linker
This commit does 3 things at once (3 squashed commits) as required
to make sure the commit doesn't break things.

1. convert to nir at compile time
2. enable full nir linking
3. switch standalone compiler to nir linker

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
5108a9a37d glsl: set blake3 hash in standalone scaffolding
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
1c88ed6194 glsl: add lower_derivatives_without_layout() helper
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Georg Lehmann
ff4596ae61 spirv: explicitly lower derivatives to zero
To allow removal of the existing nir_builder lowering.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
721d23b8ff glsl: add intrastage shader linking helpers for nir linker
Conversions of the existing glsl ir linking code to nir.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
fe9b93fc1c nir: handle wildcard array deref
Here we add handling of wildcard array derefs when attempting to mark
an io as partially used rather than hitting an assert.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
6bb6b0e5ad nir: add nir_intrinsic_deref_implicit_array_length intrinsic
This will be used to handle .length() calls on unsized arrays

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
083b4ffb78 glsl: add gl_nir_linker_size_arrays()
This will size implicitly size arrays during linking, replacing the glsl
ir version.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
a235da080e glsl: add gl_nir_link_function_calls()
This will link functions combining multiple shaders from the same stage
into a single shader. Unlike alot of the glsl ir linker that has been
converted to NIR the logic here is completely different from the glsl ir
code that linked functions. The existing nir cloning code allows us to
implement this functionality in a much more eligant way than what glsl
ir was doing.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
60937b5286 nir: add implicit_conversion_prohibited field to nir_parameter
Will be used in link time validation in following patches.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
5645495156 nir: store variable mode in nir_parameter
This will be used by the nir glsl linker in following patches.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
89a2411c54 nir: serialize nir_parameter type
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
6ff3e87e5f nir: add function in/outs to variable modes
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:44 +00:00
Timothy Arceri
f3da074dc3 glsl: move _mesa_glsl_can_implicitly_convert() to linker_util.cpp
Makes more sense here as its used by both the compiler and linker.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri
1cb115abd2 nir: add nir_function_impl_clone_remap_globals()
This will be use by the glsl nir linker when we are combining
different shaders from the same shader stage that might have multiple
declarations of global variables across the different shaders.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri
7a1061e0dd nir: add max_ifc_array_access field to vars
This will be used in following patches by the nir based glsl
linker code.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri
6219275ffe util/hash_table: add _mesa_string_hash_table_create() helper
This adds a string version of the _mesa_pointer_hash_table_create()
helper allowing us to write tidy code.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri
7c5b21c032 glsl: add support for converting global instructions to NIR
NIR doesn't really support global instructions such as global val
initilisation. So here we add functionality to glsl_to_nir() to
put these instructions into a temporary function that will be
later inlined into main.

We give the function a name starting with gl_mesa_tmp_ as functions
starting with gl_ are reserved and will not have any clashes with
user functions, we finish the name with the blake3 of the shader
source to avoid conflicts with multiple shaders attached to a single
stage.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri
1fc9d5223e glsl: make gl_nir_validate_intrastage_arrays() more flexible
This will allow us to use it before shaders from the same stage have
been linked and merged.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri
ffbd763586 glsl: add gl_nir_validate_intrastage_interface_blocks()
This is a nir version of the existing glsl ir validation function.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Timothy Arceri
90e76d34ff mesa/glsl: add nir fields to the gl shader structs
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
2024-09-25 09:39:43 +00:00
Samuel Pitoiset
a9095f0dbf radv: do not keep executable info when compiling shaders for ESO
This is completely useless and it's wasting memory.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31345>
2024-09-25 08:33:31 +00:00
Samuel Pitoiset
f7482e85ba radv: move updating compute scratch for RT when stack size is emitted
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31347>
2024-09-25 07:56:58 +00:00
Samuel Pitoiset
ebe66dee08 radv: move emitting some RT user SGPRs when the RT pipeline is emitted
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31347>
2024-09-25 07:56:58 +00:00
Mike Blumenkrantz
c4d6d9254a vk/image: fix view creation for planar video aspects
drivers do implement this

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31318>
2024-09-25 06:21:58 +00:00
Mike Blumenkrantz
e0efab520e zink: add adl flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:27 +00:00
Mike Blumenkrantz
427014e4e3 zink: add some other missing X format emulation variants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:27 +00:00
Mike Blumenkrantz
66e3df6a2a zink: add X format variants for 30-bit formats
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:27 +00:00
Mike Blumenkrantz
f96dc11e41 zink: fix zink_format_is_voidable_rgba_variant()
this should just match whatever X formats are emulated

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:27 +00:00
Mike Blumenkrantz
42648508f7 zink: move x8 format function to zink_format.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31277>
2024-09-25 03:16:26 +00:00
Mike Blumenkrantz
735e402ae4 zink: implement compression control
this just passes the info through to struct creation and returns
previously queried info

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz
9696df4132 zink: store compression rate info for formats
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz
33c1b940e0 zink: hook up compression control extensions
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz
33335fdd89 egl/kopper: hook up EGL_EXT_surface_compression on wayland
the driver hook isn't supported yet, so this does nothing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz
f4aab9984b gallium: delete pipe_screen::is_compression_modifier
this is unused

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31024>
2024-09-25 02:30:40 +00:00
Mike Blumenkrantz
1cb1212823 trace: add get_device_reset_status
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31276>
2024-09-25 01:08:21 +00:00
Timothy Arceri
c1b97415fa ci: disable gimark trace
gimark requires a mesa environment variable to be set to work around
a shader bug, disable it for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31353>
2024-09-25 09:25:52 +10:00
Valentine Burley
ec59d56c52 ci: Add a new build-only job without libdrm
Add a new build job for Turnip/kgsl, to have coverage for building without libdrm.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31182>
2024-09-24 19:22:24 +00:00
Samuel Pitoiset
087ef34b9c aco: fix descriptor leaking when printing assembly with CLRX
This can explode the maximum number of descriptors.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31344>
2024-09-24 18:11:36 +00:00
Eric Engestrom
480793be98 ci/build: move debian-clang-release to priority build-for-tests stage
`shader-db` uses its output, and with its 8-10min runtime it can't be
ignored and should be counted with the other test jobs.

This makes the critical build jobs a bit slower but makes the overall
pipeline shorter when the test jobs respect the 15min deadline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31327>
2024-09-24 17:31:54 +00:00
Konstantin Seurer
25b09b9c5a radv: Fix report_ray_intersection affecting terminated rays
Fixes dEQP-VK.ray_tracing_pipeline.amber.flags-accept-first.

cc: mesa-stable

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31186>
2024-09-24 16:18:31 +00:00
Konstantin Seurer
466bbaf40f lavapipe: Do not return in report_ray_intersection
report_ray_intersection should not terminate invocations.

Fixes: d99e95e ("lavapipe: Implement VK_KHR_ray_tracing_pipeline")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31186>
2024-09-24 16:18:31 +00:00
Konstantin Seurer
4824bcdd5d lavapipe: Fix report_ray_intersection affecting terminated rays
Fixes dEQP-VK.ray_tracing_pipeline.amber.flags-accept-first.

Fixes: d99e95e ("lavapipe: Implement VK_KHR_ray_tracing_pipeline")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31186>
2024-09-24 16:18:31 +00:00
Rhys Perry
bf41cf2eef radv/rt: don't split array/struct payload variables
If the shader has multiple payload variables, split passes might not
preserve the order and this can cause the offsets used for the stores to
not match the payload offsets for nir_intrinsic_trace_ray.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31204>
2024-09-24 15:41:04 +00:00
Rhys Perry
204e446bcd radv/rt: align constant data by 64 when inlining shaders
There's never any need for anything higher. If this were too high (such
as NIR_ALIGN_MUL_MAX), it would have caused issues.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31204>
2024-09-24 15:41:04 +00:00
Sagar Ghuge
7e48cbb029 intel: uncached L1 to fix memory barrier issue in RT shader
In the RT shader, if there's a executeCallableEXT() in between,
even though the called shader does nothing, the instructions before and
after the executeCallableEXT() is not properly synced.

Patch fixes:
- dEQP-VK.ray_tracing_pipeline.memguarantee.inside.rgen
- dEQP-VK.ray_tracing_pipeline.memguarantee.inside.chit
- dEQP-VK.ray_tracing_pipeline.memguarantee.inside.miss
- dEQP-VK.ray_tracing_pipeline.memguarantee.inside.call

Thank to Kevin for finding out there is a load/store issue.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31201>
2024-09-24 14:33:11 +00:00
Nanley Chery
730e83b525 anv: Require compression for fast-clears on gfx20+
In commit 44351d67f8, I needed to change some variables in a check for
compression in anv_can_fast_clear_color_view(). Instead of doing that, I
dropped the check altogether because I thought the call to
anv_layout_to_fast_clear_type() which followed right afterwards would
return ANV_FAST_CLEAR_NONE if the aux usage was ISL_AUX_USAGE_NONE.

That turned out not to be the case, due to special-casing of Xe2+. For
now, make Xe2+ more like other platforms when it comes to enabling
fast-clears. If there comes a reason to actually fast-clear with
ISL_AUX_USAGE_NONE, we can revisit this.

Fixes: 44351d67f8 ("anv: Change params of anv_can_fast_clear_color_view")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11920
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31297>
2024-09-24 13:56:02 +00:00
Benjamin Otte
d5f207311d pvr: Don't emit critical warning all the time
Instead of unconditionally emitting a warning to applications about
the missing environment variable to enable the driver, only check it
after determining that the device actually matches.

Signed-off-by: Benjamin Otte <otte@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31293>
2024-09-24 13:26:46 +00:00
Sviatoslav Peleshko
78a664b584 anv: Update XeSS workaround executable names for Satisfactory 1.0
Fixes: 8b36d230 ("anv: workaround XeSS for Satisfactory")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11915
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31343>
2024-09-24 12:06:54 +00:00
Mike Blumenkrantz
04709e4f7d anv: fix video profile lists
these didn't include dmabuf layout or mutable formats despite both
being supported

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31317>
2024-09-24 11:38:48 +00:00
Hyunjun Ko
a36b17d7a8 zink: walk the chain of resources for multi-planar formats.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31333>
2024-09-24 11:11:10 +00:00
Lionel Landwerlin
f81dc17e7d anv: add missing pipeline instance multiplier
Fix zink/anv tests : dEQP-GLES3.functional.fbo.multiview.samples_*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11911
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31341>
2024-09-24 10:36:17 +00:00
Rohan Garg
56adf42110 intel/brw: lower math op regions for Xe2+
This helps fix:
  - dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_3.tan_frag
  - dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_2.tan_frag

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31218>
2024-09-24 09:58:28 +00:00
Michel Dänzer
dc7723f788 radeonsi: Revert to GLSL_SAMPLER_DIM_2D in si_create_fmask_expand_cs
Fixes piglit arb_shader_texture_image_samples-builtin-image hanging
Navi 14.

Fixes: 997c39c268 ("radeonsi: clean up and make corrections to si_create_fmask_expand_cs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31323>
2024-09-24 07:52:55 +00:00
Michel Dänzer
d69c1ca1a0 Revert "radeonsi: remove CB sync after FMASK and DCC decompression"
This reverts commit 3527d9f81d.

It broke piglit glx@glx-visuals-depth/glx@glx-visuals-stencil on Navi
14.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31323>
2024-09-24 07:52:55 +00:00
Eric Engestrom
76c5c49fca radeonsi/ci: mark KHR-GL46.shader_image_load_store.basic-allTargets-atomic as fixed
Fixed by a commit in the range e1a53d41...1b4e1007

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31337>
2024-09-24 07:34:11 +00:00
Eric Engestrom
bc6eae7d0a radeonsi/ci: document spec@egl_ext_surface_compression@create as crashing
Fixes: 213f5e9152 ("Uprev Piglit to e9ab30aeaed97b69868cf4d6d6a3f70f3b53c362")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31337>
2024-09-24 07:34:11 +00:00
David Rosca
712e49f137 radeonsi/vcn: Don't reuse context with multiple VCN instances
Kernel does VCN instance scheduling per context, so when we have
multiple instances we should use new context to be able to utilize
all of them.
Another issue is with AV1, VCN 3 and VCN 4 only support AV1 on
first instance. Kernel parses IBs and switches to first instance when
it detects AV1, but this only works for first submitted IB in context.
The CS would be rejected if we first decode/encode other codecs, kernel
schedules on second instance (default) and then we try to decode/encode AV1.

Cc: mesa-stable

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31249>
2024-09-24 07:06:32 +00:00
Samuel Pitoiset
cf536f63d1 radv: introduce dirty flags for shaders state
Instead of re-emitting some dynamic states when a new shader is bound,
only re-emit the user SGPR states. This is slightly more optimal.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31160>
2024-09-24 06:00:00 +00:00
Samuel Pitoiset
8beea85232 radv: rename shader_query_state to task_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31160>
2024-09-24 06:00:00 +00:00
Samuel Pitoiset
a0951bae70 radv: use only one user SGPR for all NGG state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31160>
2024-09-24 06:00:00 +00:00
Samuel Pitoiset
3022282ba3 radv: make sure to re-emit shader query state when a task shader is bound
This doesn't change anything in practice because if we have a task
shader, we also have a mesh shader and the state was already re-emitted.

Though, this will prevent a regression from the upcoming patches because
the user SGPR layout will change.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31160>
2024-09-24 06:00:00 +00:00
Samuel Pitoiset
16341f41e1 radv: emit all shader related user SGPR states in one place
This will allow us to use only one user SGPR for NGG shaders, and also
further optimizations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31160>
2024-09-24 05:59:59 +00:00
Caio Oliveira
e1b74407bb intel/brw: Only validate GRF boundary crossing restriction for GRFs
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31294>
2024-09-24 03:39:05 +00:00
Kenneth Graunke
878ae9708a intel/brw: Don't include sync.nop in INTEL_DEBUG instruction counts
In an earlier commit, I made us stop counting sync.nops in the shader
statistics we use for shader-db (brw_debug_log_message) and fossil-db
(stats->instructions = ...).  However, I missed adjusting the printout
for INTEL_DEBUG.

Fixes: 1497f4e0c2 ("intel/fs: Don't include sync.nop in instruction count statistics")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31311>
2024-09-24 03:12:32 +00:00
Jason Macnak
c243970d50 gfxstream: use gralloc metadata in vkGetAHBPropertiesANDROID
... now that gralloc buffer metadata is more widely available
and actually populated.

Test: cvd start --gpu_mode=gfxstream_guest_angle_host_swiftshader
Test: cts -m CtsGraphicsTestCases
Test: cts -m CtsMediaCodecTestCases
Test: cts -m CtsMediaDecoderTestCases
Test: cts -m CtsViewTestCasesTest
Test: Open Youtube in Webview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31330>
2024-09-23 23:03:47 +00:00
Eric R. Smith
466df904b7 panfrost: Add back A8_UNORM format for valhall
If A8_UNORM isn't specified in the format table, then it is emulated
in the state tracker by RGBA8. This is suboptimal, both because it requires
more memory, and because the blit gets more complicated (and in fact there's
a bug currently in the blit code where we don't mask properly for GL_ALPHA).
Fix this by adding an explicit A8_UNORM format entry.

Fixes piglit test ext_framebuffer_multisample-blit-mismatched-formats.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31322>
2024-09-23 21:35:15 +00:00
Trigger Huang
7c01f70bdc mesa: Fix AMD performance monitor implementation
For cmd GL_PERFMON_RESULT_SIZE_AMD and GL_PERFMON_RESULT_AMD of
glGetPerfMonitorCounterDataAMD(), the current implementation will
return 0 if the result is not available on HW, but according to the
sepc, if cmd is PERFMON_RESULT_SIZE_AMD, <data> will contain actual
size of all counter results being sampled, instead of 0. And if cmd is
PERFMON_RESULT_AMD, <data> will contain results. The spec doesn't
require the application to wait for the result available on HW before
executing cmd PERFMON_RESULT_SIZE_AMD and PERFMON_RESULT_AMD. So for
cmd PERFMON_RESULT_SIZE_AMD, it should immediately return the correct
result size for the counters enabled by
glSelectPerfMonitorCountersAMD(), and for cmd PERFMON_RESULT_AMD, it
should wait until the result is available on HW and then return the
result.

Without this fix, the Sample Usage in the spec will not work properly
as it always gets size 0 when calling the cmd PERFMON_RESULT_SIZE_AMD

V2: If SelectPerfMonitorCountersAMD is called on a monitor, then the
result of querying for PERFMON_RESULT_SIZE will be 0.

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/31179>
2024-09-23 21:01:18 +00:00
Marek Olšák
f8788b2a38 radeonsi: remove the make_texture_descriptor indirect function call
Call gfx10_make_texture_descriptor from si_make_texture_descriptor and
use si_make_texture_descriptor everywhere.

This is more readable.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30904>
2024-09-23 20:34:13 +00:00
Marek Olšák
a578ca8388 radeonsi: rename hw_level -> view_level
for readability

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30904>
2024-09-23 20:34:13 +00:00
Marek Olšák
f5b0f80de4 radeonsi: don't insert any barrier after the copy for PIPE_MAP_READ
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30904>
2024-09-23 20:34:13 +00:00
Marek Olšák
a7cb1433e3 radeonsi: use ACO on GFX11.5 with LLVM 18 or older to work around GPU hangs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30904>
2024-09-23 20:34:13 +00:00
Marek Olšák
1c156f7fa9 radeonsi: clean up set_log_context code for all aux contexts
Instead of allocating it and then leaking it, store the log context
in si_screen.

Also, the log context was only set for "general" instead of all aux
contexts.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30904>
2024-09-23 20:34:13 +00:00
Iván Briano
2e1c278e3d anv: skip rt pipeline compile if we found all shaders
When no pipeline cache is provided by the application and we rely on the
internal one, cache hits are not counted as such.
This was causing us to return COMPILE_REQUIRED on some cases where all
shaders had been found in the cache, as well as some unnecessary extra
processing in the case that we did have to compile the pipeline.

Fixes: 1dacea10f3 ("anv: implement caching for ray tracing pipelines")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31298>
2024-09-23 19:57:53 +00:00
Iván Briano
1a45c8827b anv: free shaders on rt pipeline compile error
We have not yet added the shaders to the pipeline->shaders array at
this point. If we couldn't compile (or were asked not to) the
pipeline, we were leaking references to any shaders found in the cache.
This would manifest as an assert on device destruction:
vk_pipeline_cache_destroy: Assertion `cache->object_cache->entries == 0' failed.

Fixes: 58c9f817cb ("anv: fix pipeline executable properties with graphics libraries")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31298>
2024-09-23 19:57:53 +00:00
David Rosca
f263e6d242 radeonsi/vcn: Enable IB parsing with AMD_DEBUG=ib
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31275>
2024-09-23 19:25:09 +00:00
David Rosca
1459193b99 ac: Add VCN IB parser
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31275>
2024-09-23 19:25:08 +00:00
Eric Engestrom
ada6702af0 llvmpipe/ci: document regression
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31326>
2024-09-23 18:50:33 +00:00
Eric Engestrom
bc086fcbdb lavapipe/ci: document regression
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31326>
2024-09-23 18:50:33 +00:00
Eric Engestrom
bb51cb3f0e zink+nvk/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31325>
2024-09-23 18:26:20 +00:00
Eric Engestrom
10b83041b8 zink+nvk/ci: document spec@egl_ext_surface_compression@create as crashing
Fixes: 213f5e9152 ("Uprev Piglit to e9ab30aeaed97b69868cf4d6d6a3f70f3b53c362")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31325>
2024-09-23 18:26:20 +00:00
Thong Thai
8da847560b ci: partially emulate cdna devices using lower image opcodes
Use the AMD_IMAGE_OPCODES=0 environment variable to test the lower image
opcode code path used by AMD CDNA/compute devices without graphics.

Runs a very limited subset of GL tests.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31180>
2024-09-23 17:46:33 +00:00
Eric Engestrom
2c62ca05b3 docs/release-calendar: add 24.3 branchpoint and rcs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31279>
2024-09-23 17:39:00 +00:00
Benjamin Otte
9f612155fc nvk: Don't emit critical messages during init
vk_error() is used for application errors with
VK_DEBUG_REPORT_ERROR_BIT_EXT.

Don't emit those for old hardware or old kernels.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/7020

Fixes: 4db1bd5846 ("nvk/nvkmd: Implement dev and pdev for nouveau")
Signed-off-by: Benjamin Otte <otte@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31289>
2024-09-23 16:52:30 +00:00
Boris Brezillon
dc1a7b94a8 pan/va: Fix nir_op_pack_uvec4_to_uint
We don't have a generic v4i8 on Valhall, we have to lower it to two
v2i8. Fortunately, bi_make_vec_to() hides the Bifrost/Valhall
differences, so use that for nir_op_pack_uvec4_to_uint.

Fixes: 934b0f1add ("pan/bi: Respect swizzles for more vector ops")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31280>
2024-09-23 16:22:49 +00:00
Lionel Landwerlin
35ea8b6cd2 brw: disable null_rt only if color output does not affect other outputs
We found out that some HW changes on Xe2 make the HW avoid reading the
blend state if we're using the null_rt bit in the extended descriptor.

Since the alpha_to_coverage bit resides in the blend state, that state
is ignored and writes are going through to the depth/stencil buffers.

Disable null_rt in the color outputs if the color outputs can affect
other outputs (through alpha_to_coverage & omask).

Fixes tests in this pattern on Xe2 :

dEQP-VK.pipeline.*.multisample.alpha_to_coverage_no_color_attachment.*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
2024-09-23 15:56:02 +00:00
Lionel Landwerlin
b45ce7d43e brw: move null_rt control up a layer
We'll want to tune this setting based on other parameters.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
2024-09-23 15:56:02 +00:00
Lionel Landwerlin
9b42215e0d iris: ensure null render target for specific cases
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
2024-09-23 15:56:02 +00:00
Lionel Landwerlin
badb3f6301 anv: Only flush render target cache when detecting RT changes
We setup an empty render target when there are no color attachments,
which effectively makes it a different surface state. In most cases
the compiler will insert a null-rt bit in the extended descriptor
which means the RT isn't even accessed. But in some cases like
alpha-to-coverage output + depth/stencil write, we will access the
render target because using the null-rt will prevent alpha-to-coverage
from happening.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2bd304bc8f ("anv: Skip the RT flush when doing depth-only rendering.")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
2024-09-23 15:56:02 +00:00
Lionel Landwerlin
fb3ae17d96 anv: fix missing tracking for alpha-to-coverage runtime changes
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9926aedc96 ("anv: enable EDS3 AlphaToCoverageEnable & RasterizationSamples")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31196>
2024-09-23 15:56:01 +00:00
Boris Brezillon
22841babee panvk: Protect access to the virtual address heap
Device memory can be allocated from different threads and thus requires
locking when allocating/freeing virtual addresses.

Fixes: 53fb1d99ca ("panvk: Transition to explicit VA assignment on v10+")
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/31282>
2024-09-23 17:29:12 +02:00
Charmaine Lee
5bdcc290e3 svga: sync up with the latest svga include files
Also imported vm_basic_types.h to make upstream sync up easier.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31290>
2024-09-23 15:05:15 +00:00
Konstantin Seurer
00c94e0cd4 radv: Workaround apps using ray tracing when it is unsupported
Emitting bvh64_intersect_ray_amd will crash the compiler on pre-GFX10_3
hardware.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11786
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30886>
2024-09-23 14:02:28 +00:00
Georg Lehmann
0e21cd9e15 aco/gfx10+: work around non uniform ds_append wave64 result
In wave64 for hw with native wave32, ds_append seems to be split in a load for
the low half and an atomic for the high half, and other LDS instructions can
be scheduled between the two.
Which means the result of the low half is unusable because it might be out of date.

I was only able to reproduce this issue in WGP mode, but be conservative and
apply the workaround in CU mode too.

Foz-DB Navi31:
Totals from 13 (0.02% of 79395) affected shaders:
Instrs: 7599 -> 7656 (+0.75%)
CodeSize: 39708 -> 39972 (+0.66%)
Latency: 83174 -> 83572 (+0.48%)
InvThroughput: 8271 -> 8357 (+1.04%)
Copies: 718 -> 717 (-0.14%)
VALU: 3689 -> 3703 (+0.38%)
SALU: 935 -> 965 (+3.21%)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11921
Fixes: 45e935800a ("aco: implement nir_shared_append/consume_amd")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31301>
2024-09-23 13:17:58 +00:00
Patrick Lerda
b6b363c478 iris: fix iris_ensure_indirect_generation_shader() memory leak
This change ensures that all these allocations are using
the same memory context.

For instance, this issue is triggered with:
"piglit/bin/arb_shader_image_load_store-host-mem-barrier -auto -fbo":
Indirect leak of 32816 byte(s) in 1 object(s) allocated from:
    #0 0x7f49a35447ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
    #1 0x7f49998e4b4f in ralloc_size ../src/util/ralloc.c:118
    #2 0x7f49998e7521 in create_slab ../src/util/ralloc.c:801
    #3 0x7f49998e7521 in gc_alloc_size ../src/util/ralloc.c:840
    #4 0x7f49998e7d11 in gc_zalloc_size ../src/util/ralloc.c:868
    #5 0x7f49999a6126 in nir_alu_instr_create ../src/compiler/nir/nir.c:682
    #6 0x7f49999cba48 in clone_alu ../src/compiler/nir/nir_clone.c:217
    #7 0x7f49999cc85a in clone_instr ../src/compiler/nir/nir_clone.c:456
    #8 0x7f49999cee3a in clone_block ../src/compiler/nir/nir_clone.c:529
    #9 0x7f49999cee3a in clone_cf_list ../src/compiler/nir/nir_clone.c:583
    #10 0x7f49999d03be in clone_function_impl ../src/compiler/nir/nir_clone.c:660
    #11 0x7f49999d13f7 in nir_function_impl_clone ../src/compiler/nir/nir_clone.c:678
    #12 0x7f4999a0e2c5 in lower_call_function_impl ../src/compiler/nir/nir_functions.c:397
    #13 0x7f4999a0e2c5 in function_link_pass ../src/compiler/nir/nir_functions.c:430
    #14 0x7f4999a0e2c5 in function_link_pass ../src/compiler/nir/nir_functions.c:408
    #15 0x7f4999a0e2c5 in nir_function_instructions_pass ../src/compiler/nir/nir_builder.h:108
    #16 0x7f4999a0e2c5 in nir_link_shader_functions ../src/compiler/nir/nir_functions.c:452
    #17 0x7f499ca30b8f in link_libintel_shaders ../src/gallium/drivers/iris/iris_program_cache.c:329
    #18 0x7f499ca30b8f in iris_ensure_indirect_generation_shader ../src/gallium/drivers/iris/iris_program_cache.c:374
    #19 0x7f499d185267 in gfx9_emit_indirect_generate ../src/gallium/drivers/iris/iris_indirect_gen.c:593
    #20 0x7f499d119c79 in iris_upload_indirect_shader_render_state ../src/gallium/drivers/iris/iris_state.c:8744
    #21 0x7f499fe86b01 in iris_indirect_draw_vbo ../src/gallium/drivers/iris/iris_draw.c:233
    #22 0x7f499fe86b01 in iris_draw_vbo ../src/gallium/drivers/iris/iris_draw.c:343
    #23 0x7f499a174e43 in tc_call_draw_indirect ../src/gallium/auxiliary/util/u_threaded_context.c:3828
    #24 0x7f499a1557fe in batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:453
    #25 0x7f499a1557fe in tc_batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:504
    #26 0x7f499a167f26 in _tc_sync ../src/gallium/auxiliary/util/u_threaded_context.c:761
    #27 0x7f499a168888 in tc_texture_map ../src/gallium/auxiliary/util/u_threaded_context.c:2783
    #28 0x7f49986f2631 in pipe_texture_map ../src/gallium/auxiliary/util/u_inlines.h:556
    #29 0x7f49986f2631 in _mesa_map_renderbuffer ../src/mesa/main/renderbuffer.c:494
    #30 0x7f49991af7ca in readpixels_memcpy ../src/mesa/main/readpix.c:260
    #31 0x7f49991af7ca in _mesa_readpixels ../src/mesa/main/readpix.c:898
    #32 0x7f499931ee23 in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:575
    #33 0x7f49991b40b5 in read_pixels ../src/mesa/main/readpix.c:1199
    #34 0x7f49991b40b5 in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
    #35 0x7f49991b4a20 in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231
...
SUMMARY: AddressSanitizer: 323648 byte(s) leaked in 201 allocation(s).

Fixes: 5438b19104 ("iris: enable generated indirect draws")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31313>
2024-09-23 12:47:11 +00:00
Samuel Pitoiset
5c897d00ef radv: fix assigning mesh shader outputs when clip/cull distances are read in FS
The per-primitive output offsets need to be recomputed.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31224>
2024-09-23 12:12:13 +00:00
Patrick Lerda
6e994fdb6e i915: fix vertex atan regression
This is a regression happening with the commit 87b99d5797 ("nir: use copysign for atan").
Indeed, the opcode "copysign" was generating an incompatible i915 sequence.

For instance, this issue is triggered with
"deqp-gles2 --deqp-case=dEQP-GLES2.functional.shaders.operator.angle_and_trigonometry.atan2.highp_float_vertex":
deqp-gles2: ../src/compiler/nir/nir_lower_int_to_float.c:239: lower_alu_instr: Assertion `nir_alu_type_get_base_type(info->output_type) != nir_type_int && nir_alu_type_get_base_type(info->output_type) != nir_type_uint' failed.

Fixes: c4cec84231 ("nir/i915g/r300/nv30: skip marking varyings as flat in some drivers")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31315>
2024-09-23 11:46:40 +00:00
Connor Abbott
dbc4a2e30b tu: Initial support for VK_KHR_calibrated_timestamps on a750
Starting with a750, the ALWAYS_ON counter is initialized from a loadable
counter in CX power domain, which is never turned off except during a
GPU reset. This means that timestamps should always be monotonic except
if the GPU resets, in which case subsequent submits should return
DEVICE_LOST anyway. Thus it should be good enough to satisfy the Vulkan
requirement that vkCmdWriteTimestamp is monotonic.

kgsl tries to synchronize the CX counter to the CPU counter, and
additionally adds a synchronization ioctl to improve the accuracy. I'm
not sure whether the former is really useful for us, but the latter
should eventually be implemented in drm/msm. However for now we can
expose the extension without any kernel support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31100>
2024-09-23 07:17:01 -04:00
Juan A. Suarez Romero
c968c5a740 v3dv/ci: add new flake
New flake for rpi4.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31310>
2024-09-23 09:30:21 +00:00
Valentine Burley
1494b2143d freedreno/ci: Document some a630 EGL flakes
Not related to the kernel uprev, unkown when they started appearing.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31286>
2024-09-23 08:55:37 +00:00
Valentine Burley
4b51a2c9da turnip/ci: Remove fixed test from a660 xfails
It appears this was missed due to fractional runs, but the fix for this issue has already been merged.
While the test hasn't run in the full runs yet, it should now be considered fixed, just like on other GPUs.

Fixes: 812c8f6abe ("tu: Treat partially-bound depth/stencil attachments as passthrough")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31286>
2024-09-23 08:55:37 +00:00
Valentine Burley
28168d0971 freedreno/ci: Update expectations after Piglit uprev
The expectations for the manual runs were missed during the uprev, update them now.

Fixes: 213f5e9152 ("Uprev Piglit to e9ab30aeaed97b69868cf4d6d6a3f70f3b53c362")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31286>
2024-09-23 08:55:36 +00:00
Valentine Burley
5b8f27d3d7 freedreno/ci: Uprev kernel to 6.11
The new kernel brings improved stability.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31286>
2024-09-23 08:55:36 +00:00
Valentine Burley
b20983f9a8 freedreno/ci: Skip timing out test on a630
KHR-GL46.texture_swizzle.functional usually takes 50+ seconds and can
time out on occasion. This isn't caused by the new kernel, it always
took this long. Skip it for pre-merge jobs on a630.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31286>
2024-09-23 08:55:36 +00:00
Iago Toral Quiroga
68014b0d9b broadcom/compiler: skip small immediates optimization on vpm instructions
total instructions in shared programs: 11164938 -> 10890641 (-2.46%)
instructions in affected programs: 6557250 -> 6282953 (-4.18%)
helped: 59134
HURT: 9752
Instructions are helped.

total threads in shared programs: 431068 -> 431034 (<.01%)
threads in affected programs: 68 -> 34 (-50.00%)
helped: 0
Threads are HURT.

total uniforms in shared programs: 3880437 -> 5308006 (36.79%)
uniforms in affected programs: 2669367 -> 4096936 (53.48%)
helped: 2
HURT: 74046
Uniforms are HURT.

total max-temps in shared programs: 2244298 -> 2226555 (-0.79%)
max-temps in affected programs: 463611 -> 445868 (-3.83%)
helped: 17473
HURT: 8040
Max-temps are helped.

total spills in shared programs: 4312 -> 4318 (0.14%)
spills in affected programs: 0 -> 6
helped: 0
HURT: 2

total fills in shared programs: 6508 -> 6514 (0.09%)
fills in affected programs: 0 -> 6
helped: 0
HURT: 2

total sfu-stalls in shared programs: 14794 -> 15143 (2.36%)
sfu-stalls in affected programs: 1261 -> 1610 (27.68%)
helped: 238
HURT: 586
Inconclusive result (value mean confidence interval and %-change mean confidence interval disagree).

total inst-and-stalls in shared programs: 11179732 -> 10905784 (-2.45%)
inst-and-stalls in affected programs: 6570407 -> 6296459 (-4.17%)
helped: 59126
HURT: 9786
Inst-and-stalls are helped.

total nops in shared programs: 273422 -> 183945 (-32.72%)
nops in affected programs: 139446 -> 49969 (-64.17%)
helped: 60679
HURT: 2277
Nops are helped.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31259>
2024-09-23 07:45:46 +00:00
Eric R. Smith
fd11bbbb90 panfrost: print human readable versions of some swizzle fields
In traces produced with PAN_MESA_DEBUG, print swizzles in human readable
form (like BGRA) as well as the raw decimal format we were printing
before. This is purely a convenience feature for developers.

Reviewed-by: Boris Brezilllon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31242>
2024-09-21 09:18:55 -03:00
Faith Ekstrand
1b4e100779 nvk: Add an NVK_DEBUG=gart flag
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31295>
2024-09-20 18:15:13 -05:00
Faith Ekstrand
611b0bb73d nvk: Silence a maybe-uninitialized warning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31295>
2024-09-20 18:15:11 -05:00
Jason Macnak
6b83d49879 gfxstream: fix log levels in descriptor handling
... that potentially were accidentally promoted to info logs in
aosp/3252215 which affects common hot path.

Fixes: 6f0fff4634 ("gfxstream: guest: fully mesa-ify vulkan_enc")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31288>
2024-09-20 20:33:14 +00:00
Marek Olšák
58d5847fe3 radeonsi: don't use VS/PS/CS partial flushes if we use a TS event
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:45 +00:00
Marek Olšák
653bcd85e0 radeonsi: remove barriers around clears using aux_context.compute_resource_init
Nothing else uses that context, so all barriers are unnecessary.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:45 +00:00
Marek Olšák
58b512ddd6 radeonsi: execute clears at resource allocation using compute instead of gfx
This adds an additional aux_context, so that the gfx queue isn't stalled
due to clearing buffers or initializing DCC.

This aux context will only be used by resource_create, which will allow
us to remove all barriers around the clears because there are no others
users of those buffers on that context.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:45 +00:00
Marek Olšák
c99b55092f radeonsi: move barriers out of si_execute_clears
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:45 +00:00
Marek Olšák
36c368d466 radeonsi: move si_execute_clears barrier code into separate functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:45 +00:00
Marek Olšák
0112fd7d40 radeonsi/aco: fix asm dumps to debug output via radeonsi_debug_disassembly=true
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:45 +00:00
Marek Olšák
997c39c268 radeonsi: clean up and make corrections to si_create_fmask_expand_cs
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:45 +00:00
Marek Olšák
799a0a980b radeonsi: adjust GFX12 checks in si_compute.c
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:45 +00:00
Marek Olšák
40d9616bd3 radeonsi: don't pad esgs_vertex_stride if it's 0
so that we don't allocate any LDS for ES->GS varyings 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/31291>
2024-09-20 19:49:44 +00:00
Marek Olšák
02e9572335 radeonsi: wait for idle after end_query in si_test_blit_perf
end_query writes the timestamp only when everything is finished,
so the extra barrier only adds unnecessary overhead.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:44 +00:00
Marek Olšák
3527d9f81d radeonsi: remove CB sync after FMASK and DCC decompression
It's not needed according to docs.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:44 +00:00
Marek Olšák
a9eb83a15f radeonsi: don't sync CS and PS before rendering if there are no FBO attachments
because CB/DB don't read/write anything in that case

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:44 +00:00
Marek Olšák
58c72e9648 radeonsi: deduplicate code emitting VGT_FLUSH/PIPELINESTAT events
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:44 +00:00
Marek Olšák
d6f54a0551 radeonsi: count VS/PS/CS/L2 flushes in get_reduced_barrier_flags
also it no longer counts PS flushes as VS flushes, which is just for the HUD

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:44 +00:00
Marek Olšák
15e320e970 radeonsi: don't sync VS and PS if they are idle
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:44 +00:00
Marek Olšák
17e994dab1 radeonsi: check and update compute_is_busy in get_reduced_barrier_flags
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
2024-09-20 19:49:44 +00:00
Mike Blumenkrantz
ac912b3754 mesa: OVR_multiview_multisampled_render_to_texture
this is automatically supported for anyone that supports OVR_multiview
and EXT_multisampled_render_to_texture

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31235>
2024-09-20 18:54:26 +00:00
Mike Blumenkrantz
894b37e060 mesa: fix sample count handling for MSRTT
this extension specifies error checking (which was not implemented)
and also sample count clamping needs to be done since the samples
specified are just min samples and not an exact param

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31235>
2024-09-20 18:54:26 +00:00
Boris Brezillon
157a4dc509 panvk/csf: Fix multi-layer rendering
We assumed a tiler descriptor could handle 256 layers at a time, but
it's actually limited to 8 on v10, so let's adjust the code to take
that into account.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11882
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Tested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31227>
2024-09-20 18:21:50 +00:00
Boris Brezillon
dbfaf15bc1 pan/genxml: Fix layer_offset definition on v9+
The layer offset is a 9-bit signed integer, not an 8-bit unsigned.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Tested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31227>
2024-09-20 18:21:50 +00:00
Boris Brezillon
8822f5949c pan/desc: Add layer_offset field to pan_tiler_context::valhall
Compared to Bifrost, Valhall slightly improved layered rendering in
that you no longer need one IDVS job per layer. But they didn't quite
unleash things, because tiler descriptors still have a limited amount
of layers they can deal with, forcing us to emit more than one IDVS/tiler
descriptor per draw call if the number of layer exceeds this limit.

In order to specify where the starting point, a
{layer_offset,internal_layer_index} field has been added, so we need to
extend pan_tiler_context to pass this information and let the common
logic adjust the framebuffer internal_layer_index accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Tested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31227>
2024-09-20 18:21:50 +00:00
Boris Brezillon
6224a1e4d1 pan/decode: Interpret CS_BRANCH instructions
panvk uses loops and conditional blocks. We need to follow these
conditional branches if we want to dump the right amount of jobs.

Following branching has the annoying side effect of repeating
instructions, so we probably want to dump the CS and jobs separately
at some point, but that's good enough for now.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Tested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31227>
2024-09-20 18:21:50 +00:00
Boris Brezillon
1e0c502a77 panfrost: Don't turn 3D/cube images into 2D arrays
Instead of special-casing 3D image handling in the gallium driver, use
the actual image type and extend the compiler to deal with cube/3D
image coordinates.

This fixes panvk without resorting to the image type casting that was
in place in the gallium driver.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Tested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31227>
2024-09-20 18:21:50 +00:00
Boris Brezillon
e171579f51 vk/meta: Make sure texel is 32-bit in build_buffer_to_image_cs()
Just like fragment stores, image stores expect 32-bit values (at least
that's the case of the Bifrost backend), so make sure the value passed
to write_img() is always 32-bit, even when convert_texel() doesn't touch
the texel because the image view format matches the buffer format.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Tested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31227>
2024-09-20 18:21:50 +00:00
Corentin Noël
b4900cd3f8 ci: Allow to pass the PIGLIT_RUNNER_OPTIONS variable
When debugging piglit job failure in CI, it is sometimes useful to pass options to
the runner, allow to do this even in guest when using crosvm.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31284>
2024-09-20 17:42:04 +00:00
Faith Ekstrand
f36e5dbe60 nvk: Advertise VK_KHR_shader_float_controls2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31170>
2024-09-20 17:09:14 +00:00
Nanley Chery
b3882c4488 intel: Avoid no-op calls to anv_image_clear_color
Whenever we execute a fast-clear due to LOAD_OP_CLEAR, we decrease the
number of layers to clear by one. We then enter the slow clear function
and possibly exit without clearing if the layer count is zero.
Unfortunately, we've already compiled the shader for slow clears by the
time we exit. Skip the slow clear function if there are no layers to
clear.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31167>
2024-09-20 16:34:37 +00:00
Nanley Chery
1c7fe9ad1b anv: Support fast clears in anv_CmdClearColorImage
At least two game traces make use of this path: TWWH3 and Factorio.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31167>
2024-09-20 16:34:37 +00:00
Nanley Chery
46d58583ff anv: Move exec_ccs_op and exec_mcs_op higher up
The next patch will use them in anv_CmdClearColorImage().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31167>
2024-09-20 16:34:37 +00:00
Nanley Chery
03286117ef anv: Move and rename anv_can_fast_clear_color_view
It's no longer specific to image views.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31167>
2024-09-20 16:34:36 +00:00
Nanley Chery
44351d67f8 anv: Change params of anv_can_fast_clear_color_view
Expand the scope to more than just image views.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31167>
2024-09-20 16:34:36 +00:00
Sil Vilerino
83fdbf8772 d3d12: Plumb H264/HEVC temporal_id from pipe params
Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31268>
2024-09-20 15:50:42 +00:00
Sil Vilerino
1b66866275 d3d12: d3d12_video_encoder_references_manager_h264 to use FrameDecodingOrderNumber as h264Pic->slice.frame_num
Fixes: da2cbfe3bf ("d3d12: Video Encode H264 to use direct DPB from frontend")

Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31268>
2024-09-20 15:50:42 +00:00
Sil Vilerino
96bf8f5a7d d3d12: H264 Encode - Set SPS.gaps_in_frame_num_value_allowed_flag=1 when num_temporal_layers > 1
Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31268>
2024-09-20 15:50:42 +00:00
Sil Vilerino
fc1a96822d d3d12: Report H264/HEVC support for 4 max temporal layers
Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31268>
2024-09-20 15:50:41 +00:00
Sil Vilerino
e0b84d4af1 d3d12: Support writing H264 temporal scalability prefix slice NAL on demand
Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31268>
2024-09-20 15:50:41 +00:00
Sil Vilerino
06787d947d d3d12: Support writing H264_SEI_SCALABILITY_INFO header on demand
Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31268>
2024-09-20 15:50:41 +00:00
Sil Vilerino
5e22ddacb6 pipe: Add temporal_id to pipe_h26x_enc_dpb_entry
Reviewed-By: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31268>
2024-09-20 15:50:41 +00:00
Samuel Pitoiset
80d60acb77 radv: only export KHR_video_maintenance1 with KHR_video_queue
It's required, otherwise dEQP-VK.info.device_extensions fails.

Fixes: b30462535b ("radv/video: add KHR_video_maintenance1 support")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31285>
2024-09-20 15:26:28 +00:00
Mike Blumenkrantz
80344bdc7c va: support zink on Windows
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31240>
2024-09-20 13:25:18 +00:00
Mike Blumenkrantz
e079116cf0 vl: add Windows kopper support
this passes through the LUID when provided by the caller

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31240>
2024-09-20 13:25:18 +00:00
Mike Blumenkrantz
f294b8262b vl: rename/ifdef the x11 kopper functionality
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31240>
2024-09-20 13:25:18 +00:00
Mike Blumenkrantz
62d93a53b4 zink: add screen create to match windows LUID
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31240>
2024-09-20 13:25:18 +00:00
Juan A. Suarez Romero
f364c11a7d v3d/ci: update expected results
Bring new fails and flakes due upreving the piglit version used in the
CI.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31278>
2024-09-20 12:53:06 +00:00
Samuel Pitoiset
cbae7792f9 radv: stop emulating GS invocations for legacy GS on RDNA1-2
This is basically a revert of !24231. This emulation was introduced
to fix counting the number of GS invocations in cases it's VS/TES as
NGG (hw does that), but it's unnecessary.

Since the specification has been clarified and pipeline stat queries
are undefined for stages not present in pipelines.
See https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6547

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31153>
2024-09-20 12:28:08 +00:00
Daniel Stone
4682ea0e8b ci: Make common rules common
None of the test jobs were referencing our 'common-rules', so we weren't
marking test jobs as manual when they should be.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 07202111a6 ("ci/rules: make every job exist as manual in fork pipelines")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31270>
2024-09-20 11:03:50 +00:00
Daniel Stone
9f21e90a0c ci: Make token parsing more robust
Start by finding our known prefix, stripping only that off, then
validating that the rest of the data makes sense. This fixes certain
tokens which were erroneously getting rejected.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31270>
2024-09-20 11:03:50 +00:00
Vignesh Raman
1f9f7ae112 ci/bare-metal: handle non-zero exit codes
The fastboot/poe/cros-servo scripts always exits with code 1,
regardless of the HWCI_TEST_SCRIPT's exit code. This commit
fixes these scripts to exit with the actual code returned by
the test.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31189>
2024-09-20 10:29:39 +00:00
Vignesh Raman
9b762a3caf ci/lava: update unit tests
Update unit tests to handle exit code in HWCI result output.

Co-developed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31189>
2024-09-20 10:29:39 +00:00
Vignesh Raman
b9cee06f9e ci/lava: handle non-zero exit codes
The LAVA job submitter always exits with code 1, regardless
of the HWCI_TEST_SCRIPT's exit code. This commit fixes the
LAVA job submitter to exit with the actual code returned by
the test.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31189>
2024-09-20 10:29:39 +00:00
Vignesh Raman
c6c011ee47 ci: include exit code in test result output
The HWCI result output now includes the exit code from
the test script to help in debugging. Also Update
B2C_JOB_SUCCESS_REGEX with the exit_code for ci-tron.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31189>
2024-09-20 10:29:39 +00:00
Samuel Pitoiset
d8be265bd5 zink/ci: update expected list of failures since recent piglit uprev
These are missing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31271>
2024-09-20 09:46:23 +00:00
Boris Brezillon
15f18c862f panvk: Hook up descriptor array bounds checking
The clamping on the array index was already implemented, but
lower_desc_ctx::add_bounds_checks was always false. Set it based on
the robustness state we're being passed.

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/31251>
2024-09-20 09:12:42 +00:00
Boris Brezillon
0872c65f13 panvk: Pass the robustness state to nir_lower_descriptors()
Pass the robustness state to nir_lower_descriptors() instead of using
the default robustness set at device creation time.

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/31251>
2024-09-20 09:12:42 +00:00
Boris Brezillon
e4613f8b23 panvk: Lower get_ssbo_size() on Valhall
On Valhall, the nir_lower_explicit_io(ssbo) pass can add
get_ssbo_size() intrinsics. Make sure those are lowered to load_ubo()s
on the targeted buffer descriptor.

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/31248>
2024-09-20 08:30:12 +00:00
Boris Brezillon
e5ba60ca86 panvk: Use nir_metadata_control_flow
Replace nir_metadata_block_index | nir_metadata_dominance by
nir_metadata_control_flow.

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/31248>
2024-09-20 08:30:12 +00:00
Boris Brezillon
ae9df204e9 panvk/csf: Fix TLS pointer copy
The source/destination was inverted. While at it, make this copy
conditional on tlsinfo.tls.size > 0.

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/31248>
2024-09-20 08:30:12 +00:00
Boris Brezillon
28e4d22497 panvk/csf: Pass a non-zero flush-id to benefit from cache flush reduction
The cache flush reduction mechanism relies on the flush ID to
conditionally eliminate cache flush requests if another cache flush
happened between the time the flush ID was retrieved and the time
the flush operation happens.

Store the current flush ID at EndCommandBuffer() time, and pass it
back to the submit ioctl().

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/31230>
2024-09-20 07:59:48 +00:00
Boris Brezillon
73f7020ade panvk/csf: Replace a cs_while() by a cs_if()
The cs_while() in cs_render_desc_ringbuf_move_ptr() was never meant to
be a while() loop, but we didn't have a cs_if() helper back then.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31205>
2024-09-20 07:25:03 +00:00
Boris Brezillon
741f6b9e5a pan/cs: Add helpers for if/else blocks
The logic is a bit more involved than with other blocks to keep
cs_if/else() declaration consistent with the rest. This forces us to
keep track of the last end_if() so we can flush it if the next CS
[pseudo-]instruction is not a cs_else().

These changes require quite a bit of code motion to avoid forward
declarations.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31205>
2024-09-20 07:25:03 +00:00
Boris Brezillon
944ee9e088 pan/cs: Don't use a list for our block stack
We don't need a double-linked list to manage our block stack. Use a
single-link list instead, which simplifies things a bit and hopefully
lets the compiler optimize things a bit more.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31205>
2024-09-20 07:25:03 +00:00
Boris Brezillon
c0455249ea pan/cs: Drop the cs_builder::blocks::cur field
The current block is just the top of the stack, so let's just provide
an helper that returns the current block and drop the cur field.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31205>
2024-09-20 07:25:03 +00:00
Boris Brezillon
79ff741104 pan/cs: Pass the block to end to cs_block_end()
This allows us to check that the block to end is at the top of the
stack.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31205>
2024-09-20 07:25:03 +00:00
Boris Brezillon
e6ba99deda pan/cs: Make the CS loop helpers more robust
Always pass the loop object around so we can check that the current
block is the loop block, and provide syntactic sugor for unconditional
continue/break statements.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31205>
2024-09-20 07:25:03 +00:00
Boris Brezillon
7e322396aa pan/cs: Make sure cs_alloc_ins() is never passed num_instrs=0
If zero instructions are requested, we should return NULL, but there's
no good reason to accept this case in the first place, so let's assert
that num_instrs > 0 instead.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31205>
2024-09-20 07:25:03 +00:00
Boris Brezillon
df1088e16f pan/cs: Make sure we don't overflow the chunk capacity
assert that a block is no bigger than a chunk allocated by
::alloc_buffer().

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31205>
2024-09-20 07:25:02 +00:00
Boris Brezillon
bdd1335e4f pan/cs: Fix buffer overflow in cs_block_end()
If cs_alloc_ins() fails, it returns a dummy instruction slot, which can
only hold one instruction. Make sure we skip the memcpy() if the CS
is invalid to avoid a buffer overflow.

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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31205>
2024-09-20 07:25:02 +00:00
David Rosca
843608a9f4 radeonsi/vcn: Use ac_vcn_enc_init_cmds and AV1 defines from ac
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31113>
2024-09-20 06:58:29 +00:00
David Rosca
72ae8e25a8 ac: Add remaining VCN encode defines
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31113>
2024-09-20 06:58:29 +00:00
David Rosca
aed89d28d3 ac: Add ac_vcn_init_enc_cmds
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31113>
2024-09-20 06:58:29 +00:00
David Rosca
8ecad47695 ac: Fix typo RENCDOE -> RENCODE
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31113>
2024-09-20 06:58:29 +00:00
David Rosca
d6cf36b4d2 radeonsi/vcn: Add rc_per_pic_ex encode command
This makes it a bit cleaner as VCN5 goes back to using base rc_per_pic.

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31113>
2024-09-20 06:58:29 +00:00
Dylan Baker
3df03f100b meson: use add_project_arguments instead of global
The `add_global*_arguments` family of functions affect subprojects, and
are therefore generally discouraged from being used.

Fixes: a42c2293ab ("wsi: Metal support")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31267>
2024-09-20 05:08:41 +00:00
David Heidelberg
e1a53d41c9 ci/panfrost: update rock-5b from rc5 to rc7
Acked-by: Vignesh Raman <vignesh.raman@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31260>
2024-09-20 12:17:37 +09:00
David Heidelberg
22db4971d9 ci/panfrost: update furmark checksum for T860 traces
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31260>
2024-09-20 12:17:34 +09:00
David Heidelberg
bff63e1ed2 ci/panfrost: switch to 6.11 with timestamp patches for traces
Timestamp implementation is now available when switching to the Linux 6.11 + patches,
so traces requiring timestamp feature works again properly.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11912
Reviewed-by: Vignesh Raman <vignesh.raman@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31260>
2024-09-20 12:17:15 +09:00
Antonio Ospite
cebaa64ee3 android: fix build by removing references to dri-search-path
In commit 41e83b243c (meson: remove dri-search-path, 2024-09-18) the
`dri-search-path` meson option was removed but its usage in the Android
build files was left there, resulting in the following error when
building for Android:

-----------------------------------------------------------------------
FAILED: out/target/product/vsoc_x86_64/obj_x86/MESON_MESA3D/.build.timestamp
...

meson.build:4:0: ERROR: Unknown options: "dri-search-path"
-----------------------------------------------------------------------

Remove the usage of the option when building for Android, and while at
it remove also any mention of if in docs/drivers/llvmpipe.rst

Remove also the MESA3D_LIB_DIR variable which was used only for
dri-search-path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31266>
2024-09-19 23:42:13 +00:00
José Roberto de Souza
7c01cbda6f anv: Optimize vkQueueWaitIdle() on Xe KMD
vk_common_QueueWaitIdle() creates a syncobj, does a submit with no
batch buffers what translates to execute trivial_batch_bo and then
waits for syncobj to be signaled when trivial_batch_bo finishes.

On Xe KMD on other hand we can avoid the trivial_batch_bo submission
and instead use the special DRM_IOCTL_XE_EXEC with num_batch_buffer == 0
to get a syncobj to be signaled when the last exec finish execution.
This should free a bit GPU to execute more important workloads.

This will also optimize vkDeviceWaitIdle() that calls QueueWaitIdle().

It have to fallback to vk_common_QueueWaitIdle() when queue is in
VK_QUEUE_SUBMIT_MODE_THREADED mode because vkQueueWaitIdle()
could return but there still stuff in VK/CPU submission queue.
Also it could cause use after free when resources attached to
submission are freed before it is processed, example:

   vkCreateFence() or vkCreateSemaphore()
   vkQueueSubmit() // with Fence or Semaphore created above
   vkQueueWaitIdle() // with the race it returns
   vkDestroyFence() or vkDestroySemaphore()
   // vk_queue_submit_thread_func() start to process submission above...

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/30958>
2024-09-19 23:12:45 +00:00
José Roberto de Souza
2ccc9a5c40 iris: Use xe_queue_get_syncobj_for_idle()
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/30958>
2024-09-19 23:12:44 +00:00
José Roberto de Souza
2f7c9f906d intel: Split anv_xe_wait_exec_queue_idle() and move part of it to common/
Split anv_xe_wait_exec_queue_idle() into 2 functions, the first
function creates the syncobj and prepares it to be signaled when the
last workload in queue is completed.

And the second one that calls the first function, then waits for the
syncobj to be signaled and destroy the syncobj.

The main reason for that is that the first function can be reused in
Iris and a future patch will add another user, so lets share it.

No changes in behavior are expected here.

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/30958>
2024-09-19 23:12:44 +00:00
Tapani Pälli
b01d76027d blorp: assert that color depth is not 96 for Wa_16021021469
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/31263>
2024-09-19 22:44:49 +00:00
David Heidelberg
0fd96dcf17 ci/panfrost: Implement basic nightly OpenCL testing on T860
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30963>
2024-09-19 22:09:14 +00:00
David Heidelberg
de230c4c07 panfrost/midgard: Lower *hadd instructions
Fixes multiple piglit tests, except (u)long/char hadd,
which now fails instead of crashing.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30963>
2024-09-19 22:09:14 +00:00
David Heidelberg
45af8ddf91 panfrost/midgard: Lower fisnormal
Fixes piglit:
program@execute@builtin@builtin-float-isnormal-1.0.generated

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30963>
2024-09-19 22:09:14 +00:00
David Heidelberg
2137c62923 panfrost/midgard: Support 64bit pack/unpack
Needed for OpenCL support through Rusticl.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30963>
2024-09-19 22:09:14 +00:00
David Heidelberg
7a0838ebb1 panfrost/midgard: Implement nir_lower_mem_access_bit_sizes pass
Needed for OpenCL support through Rusticl.

Acked-by: Eric R. Smith <eric.smith@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30963>
2024-09-19 22:09:14 +00:00
Eric Engestrom
5977ed07dd v3dv/ci: drop skip of fixed test
We've been on a more recent CTS release for a long time now :)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31262>
2024-09-19 21:06:23 +00:00
Nanley Chery
290f3a9367 intel/isl: Disable 3D Ys/Yf miptails for CCS
We currently disable CCS if a 3D Ys/Yf surface uses miptails. However,
ISL generally configures surfaces to be compatible with compression. For
consistency, disable miptails on 3D Ys/Yf surfaces in order to allow
compression.

If drivers prefer to have a more compact layout, they can pass the
ISL_SURF_USAGE_DISABLE_AUX_BIT flag at surface creation time.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30081>
2024-09-19 20:39:59 +00:00
Nanley Chery
19ed0e1685 intel/isl: Reduce miptail slot usage to allow CCS
We currently disable CCS if a surface uses more than 11 slots in a
miptail. However, ISL generally configures surfaces to be compatible
with compression. For consistency, reduce the number of slots used in
miptails in order to allow compression.

If drivers prefer to have a more compact layout, they can pass the
ISL_SURF_USAGE_DISABLE_AUX_BIT flag at surface creation time.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30081>
2024-09-19 20:39:59 +00:00
Gurchetan Singh
5af81ed7c5 mesa: add gfxstream-experimental to -Dvulkan-drivers
This adds gfxstream-vk as a vulkan driver to Mesa.  It
will be used in the following places:

  - Android Emulator
  - Fuchsia Emulator
  - Cloud Android
  - AAOS reference hardware
  - [a few other places]

meson amd64-build/ -Dvulkan-drivers="gfxstream-experimental" -Dgallium-drivers="" -Dopengl=false

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:04 +00:00
Gurchetan Singh
889459e788 mesa: gfxstream: nuke vk_icd_*
These functions are now in the Mesa common
code.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:04 +00:00
Yahan Zhou
f6f7a5bfcc [Vulkan Snapshot] Add dependency graphics pipeline -> render pass
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:04 +00:00
Gurchetan Singh
6253c5b631 gfxstream: moar relicense
Moar relicense.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:04 +00:00
Serdar Kocdemir
a3c74c5a07 Add VK_EXT_external_memory_metal definitions
Partial update to vulkan headers and auto generated code to
include the new extension. It will be used to fix issues on
external memory implementation with MoltenVK later on.
References:
Khronos MR 6800
MoltenVK PR 2314

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:04 +00:00
Gurchetan Singh
94f641d120 gfxstream: simplify codegen
This simplifies the amount of code imported from Vulkan
docs.  It vendors the code to just a subset needed by
the cerealgenerator.  The files that are kept are:

    - generator.py
    - cgenerator.py
    - reg.py
    - genvk.py

Since these files originate with Khronos, they are
Apache licensed.

Long-term, there are various ideas on how to proceed
with codegen.  Probably the above files can be nuked
in the event some of those ideas come to pass.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:04 +00:00
Gurchetan Singh
13c4d98bc6 gfxstream: re-license cereal
While cereal implements an API provided by Khronos Apache 2.0
files, the files were started in AOSP, and can be relicensed to
MIT.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:04 +00:00
Gurchetan Singh
b834e151d4 gfxstream: re-license files
Re-license files to MIT, by popular demand.  These files are have
an origin in AOSP.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:04 +00:00
Gurchetan Singh
c95f4dcc93 gfxstream: build time guest autogeneration
By popular demand:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246#note_2565866

Only Soong/meson builds supported at the moment.  Bazel
or BUILD.gn can be added later.

This reduces the size of checked-in code by ~94 kLOC.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
56ef52e1b0 gfxstream: delete unneccessary code
genvk.py itself includes different types of generators:
spirvgenerator.py, rubygenerator.py, etc.  cerealgenerator.py
is an additional one.  A strategy to pare down the size of
the code would be modify genvk.py to remove unneeded generators,
and just import the cerealgenerator: i.e, importing the subset
of scripts useful to gfxstream.

The removes the notion of upstreaming to vulkan-docs, but does
imply more dedicated codegen strategy long-term.  

About 300kLoC can be removed, since previously we just a blanket
copy.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
ae2b79462c gfxstream: codegen: don't require clang-format
When auto-generating at build time, this causes
problems for AOSP:

https://android.googlesource.com/platform/build/+/main/Changes.md#PATH_Tools

Don't require via environment variable.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
58269cf5c5 gfxstream: move include outside of ANDROID
Works a little better with the guest Linux build..

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
eed366716e gfxstream: don't assert without host
When invoking the build in the guest, we don't need
to define this.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Yahan Zhou
64f67d379b Revert "Signal the fence after color buffer copying"
This reverts commit dd5c7b6aeb41270f0b457c18a2a31cf136562bf0.

Reason for revert: b/366153044

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Yahan Zhou
685432e7ab Signal the fence after color buffer copying
We move the fence signaling to after color buffer copying. This is done
by reusing the existing CPU CV object and wait on it before triggering
the GPU vkWaitForFences.

Also rewrite fenceInfo.status with std::future to simplify the code.

Design: go/emu-async-cb-copy
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Jason Macnak
ea2035e898 Add perfetto tracing to host renderer
... to aid debugging.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
8e02355e55 gfxstream: guest: Gralloc --> GfxStreamGralloc
By popular demand..

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Jason Macnak
7fb31361f4 Handle external fences in vkGetFenceStatus()
The vkGetFenceStatus() call can not be sent to the host for fences
that have imported an external payload (sync fd) because the sync
fd does not exist on the host. A fence used as part of a swapchain
present may be created in the unsignaled state. Then, during
vkQueuePresentKHR() on Android, vkQueueSignalReleaseImage() is used
to import a sync fd payload into the present fence. Prior to this
change, if the user (ANGLE) does vkGetFenceStatus() on this fence,
it would never appear as signaled because the sync fd fence is not
actuallly connected to the fence on the host and the host would just
always return the VK_NOT_READY from the fence's initial unsignaled
state.

This change also updates VkFence_Info to use a std::optional<int>
to make it possible to distinguish if a fence has an imported
already-signaled payload vs not having an imported payload.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
c89ad0968c gfxstream: move goldfish sync
Goldfish sync needs to be a directory, which is
easily acccesible by the Vulkan and EGL code.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
7508257d72 gfxstream: guest: nuke android_compat directory
With the requirement for the Android compatibility
layer lifted, we can nuke many things in "fuchsia"
directory (which was also used for guest Linux builds).

Things that might be useful later are kept, but should
probably be ported to Mesa's util layer.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
876202f90c gfxstream: guest: vulkan: don't assume Android
Multi-platform support (Linux, Fuchsia) for gfxstream-vk
has been built by providing a compatibility layer
with Android stubs.

We should get away from this model and isolate platform
specific dependencies to their own files.

With the mesa-ification, a lot of this has been done,
but a few Androidisms remain.  Remove them and don't
assume Android.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
b074bd7d4a gfxstream: guest: vulkan: use hardware/google/aemu
Removes use of android-emu/aemu/base from
libgfxsteam_vulkan.so.  Also removes duplicated code
entries that are known to VK-specific.  More code
can likely be deleted than currently is.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
16dcb6dd2a gfxstream: guest: remove unneeded dependencies in meson build
In the Fuchsia and meson builds, we can remove
dependencies on RenderControl and just replace
it with a stub.  That's because only Goldfish
needs RenderControl's "process pipe" logic to
initialize the VkDecoders.

The Fuchsia build may be migrated to Bazel over
GN, so that's why it's left unmodified.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
6f33f5c626 gfxstream: guest: remove unnecessary includes in VkEncoder
We probably want to recreate encoder logging, but
just delete it for now.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
6f0fff4634 gfxstream: guest: fully mesa-ify vulkan_enc
ALOGE(..) to mesa_loge(..), again

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
18b6c72cb0 gfxstream: guest: introduce QemuPipeStream stub
For non-Android builds, this stub can be used for
the QemuPipeStream.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
31ceda8bdc gfxstream: guest: vulkan: use connection manager
This adds the GfxStreamVulkanConnection, and makes
libgfxstream_vulkan.so use it.  All dependencies
to HostConnection are removed.

For Android builds, dependencies to renderControl
and libOpenGlCodecCommon remain.  In the future,
these will be isolated to Goldfish-based system
images.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
de7095ba5b gfxstream: guest: introduce GfxStreamConnectionManager
The HostConnection class pulls in:

  - GLES_v1 encoder
  - GLES_v2 encoder
  - renderControl encoder
  - vulkan encoder

Since HostConnection is required to talk the host, that
means the libgfxstream_vulkan.so has a GLES dependency.

This is unnecessary.  Ideally, libgfxstream_vulkan.so
only needs the Vulkan encoder dependency, and that is
the case for virtgpu.

For Goldfish, since it uses the "process pipe"
initialization logic is used, for Android builds
a renderControl encoder dependency is still required.

To increase the separation of these encoders, this
change adds a GfxStreamConnectionManager class.  It
has no explicit dependency on any API encoder, but
can store thread-local instances of them.

The HostConnection class may be implemented in terms
of the GfxStreamConnectionManager API.  For now, the
plan is just to convert libgfxstream_vulkan to use
the ConnectionManager.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
e7116abf90 gfxstream: guest: don't rely on HostConnection for platform helpers
For gfxstream-vk, these can go into the giant ResourceTracker
singleton, rather than the thread-local host connections.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
0f29e172fd gfxstream: delete duplicate virtgpu_drm.h
We have three versions of virtgpu_drm.h

In reality, we only need one. Update the version
in guest/mesa and use that.

clang-format went a little crazy here..

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
105923cd63 gfxstream: mesa-ify libgfxstream_android
ALOGE --> mesa_loge(..) essentially

Also, nuke the unused stubs.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
fcf73c0ed4 gfxstream: GrallocMinigbm uses platform_virtgpu
This removes the open-coding of virtgpu_drm access
and uses the platform_virtgpu layer.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
688f305cea gfxstream: guest: remove renderControl dependency from Gralloc
Easy to avoid this dependency, just by special-casing
createColorBuffer

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
2d967209ad gfxstream: guest: introduce Gralloc::getGrallocType()
This API tells the user whether the chosen
implementation is goldfish gralloc, cros_gralloc
(minigbm), or emulated gralloc.

Use with caution.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
999a9a3fb9 gfxstream: guest: fix timeout issues
This logic sequentially waits for each sync file
descriptor, followed by a vkWaitForFences, but keeps
track of total aggregate time spent inside the
function.

Previously, external fences were waited on for 3000ms
somewhat arbitrarily, while the timeout was respected
for non external fences.  Also multiple threads were
used, which is a more complex way.

One can also use sync_accumulate(..) for the external
fences, but that isn't done since an equivalent does
not yet exist for the Kumquat layer.  Proper solution
would be the new virtio-gpu fence passing protocol.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
26338a08ce Reapply "gfxstream: nuke mWorkPool"
Same as before.  Next commit has the fix for the accurate
timeout issue..

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Jason Macnak
7d92573ae6 Revert "gfxstream: nuke mWorkPool"
This reverts commit 40ffef41fb01bf01ed14c4ce20e89fb941c02e40.

Reason for revert: vkWaitForFences() no longer respects the timeout on externally backed sync fds

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
a73d1b2b01 gfxstream: add processPipeInit and connect to IOStream
This adds processPipeInit() and connect() functions
to the IOStream base class.  This will allow for better
abstraction of the pipe streams.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
b1882801b6 gfxstream: guest: remove dependency on EmulatorFeatureInfo
Missed a spot ..

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
eb9a17c7fe gfxstream: move EmulatorFeatureInfo and ExtendedRenderControl
renderControl_enc directory is a better place to put it.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
7bbf629782 gfxstream: sync command buffer api with Mesa upstream
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
2c5309bc6c gfxstream: guest: simplify Vulkan sequence number logic
EGL/GLES/RenderControl doesn't really use it.  It allows
VK to drop one more libOpenGlSystemCommon dependency,
and using global data rather than malloc'ed data is a bit
simpler.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
5f5bfcd466 gfxstream: guest: remove EmulatorFeatureInfo dependency in libgfxstream_vulkan.so
EmulatorFeatureInfo likes to bundle all the features
into one giant struct.  Newer variants like virtio-gpu
tend to separate feature versioning into separate
capabilites.

This provides a compat layer for the older style,
as we move towards the newer style of versioning.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
0d66bf3c83 gfxstream: guest: add virtgpu suffix
"libplatform" is too vague.

find ./ -type f -exec sed -i -e 's/lib_platform/libplatform_virtgpu/g' {} \
find ./ -type f -exec sed -i -e 's/inc_platform/inc_platform_virtgpu/g' {} \

essentially.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
409a40e099 gfxstream: guest: mesa-ify libplatform_virtgpu
find ./ -type f -exec sed -i -e 's/ALOGE/mesa_loge/g' {} \;
find ./ -type f -exec sed -i -e 's/ALOGV/mesa_logi/g' {} \;

essentially

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
38837335b5 gfxstream: guest: mesa-ify GoldfishAddressSpace
Mesa-ify Goldfish address space.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
b59b473422 gfxstream: guest: nuke goldfish_address_space_android.impl
CPP files are more standard than IMPL files.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
10fd9b1a97 gfxstream: guest: nuke unnecessary Android properties
__linux__ is also defined by Android's toolchain, so
these properties have been dead code for a while.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
6a5df83f02 gfxstream: guest: nuke Fuchsia Goldfish Address Space
The plan for Fuchsia emulators is Lavapipe and
virtio-gpu/gfxstream for acceleration.  Currently,
Fuchsia guest side is frozen in place for Goldfish,
so this has no effect.

This in contrast to Android, where Goldfish Address
Space is still projected to be used for another year.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
34b639623d gfxstream: guest: nuke vk_enum_string_helper.h
Not available via Mesa's VK headers and not needed
either.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
a331a51b57 gfxstream: nuke mWorkPool
Added via:

https://android-review.git.corp.google.com/q/topic:%22vulkan-android-external-fence-sync-fd%22

Ideally, we'd avoided complex thread pools in a VK driver.
Plus, virtio-gpu needs synchronization changes anyways.

      - dEQP-VK.api.external.semaphore.sync_fd*

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
4f76c3a0cb gfxstream: nuke AlignedBuf.h
Nuke it.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
e13526ca2b gfxstream: nuke ErrorLog.h
Another day, another code nuke.  ALOGE(..) or mesa_loge(..)
is better.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Gurchetan Singh
05dac426a7 gfxstream: simplify GLESv1/GLESv2/EGL/Vulkan builds
Certain libraries (libEGL_emulation, GLESv1/GLESv2, and
vulkan.ranchu) have duplicated variants due to two issues:

- whether to use the Kumquat and Linux VirtGpu backends
  is a build time decision.  This leads to "libplatform" and
  "libplatform_kumquat".

- virtgpu_kumquat_ffi pulls in librutabaga_gfx_gfxstream,
  which pulls in libgfxstream_backend -- which does not compile
  for glibc_x86 or android32.  This means "compile_multilib: 64"
  is needed for glibc_x86_64 and android64 builds.  The
  non-kumquat dependent Android build actually needs 32-bit
  libraries, while the kumquat dependent Android built does not.
  This leads to different libraries.

The follow changes are made:

- Kumquat and Linux backends are both built for
  host-builds.  An environment variable controls
  selection ("VIRTGPU_KUMQUAT").

- For Android builds, a stub Kumquat is built.  We can
  build a real Kumquat, but the use case does not exist.

These changes allow for a much simpler build.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:03 +00:00
Jason Macnak
089c5162b8 Fix vkAllocateCommandBuffers with failing allocation
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
8dbe8e0b1e gfxstream: end2end: nuke RutabagaLayer, use kumquat for testing
This change nukes the RutabagaLayer and makes the
end2end testing layer use Kumquat.

The benefit is not having two different testing
frameworks.  Compared to the RutabagaLayer, Kumquat
is more complex, but potentially has more features
in the long run.  Some advanatages:

  - virtgpu_kumquat_ffi is portable enough that
    non-gfxstream libraries (minigbm, others) can
    depend on it.  This would enable more accurate
    gralloc testing long-term.

  - multiple different context types can connect to
    Kumquat at the same time, rather than just one with
    the RutabagaLayer.

  - If anyone is bored, it should be pretty easy add
    v4l2 apis via an virtio-media like interface.

  - The kumquat server can actually call
    stream_renderer_teardown(..) when performing
    snapshot tests.

  - Kumquat relies on EventFd + VkExternalSync:
    this can eliminate the need to export the
    libplatform sync API outside VK, EGL over the
    long-term.

A point of complexity was Gralloc.  We have an external
Gralloc instance, but HostConnection also maintains a
thread-local Gralloc instances.  The thread-local gralloc
instances can potentially step on the kumquat connection
of the pipe or ASG stream.  The solution was for
GrallocEmulated to maintain it's own virtgpu_kumquat
instance.

The proper long-term solution is move gralloc out of
HostConnection entirely.

A prior version of this change relied on:

   - vkInitializeKumquat,
   - rcCreateDeviceKumquat
   - eglInitializeKumquat

since I read somewhere GoogleTest is necessarily
multi-threaded. That turned out to be fake news, so nuke
those functions as well.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Jason Macnak
3683fbcdee Handle null handles in vkFreeCommandBuffers
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
e64534bd64 gfxstream: guest: plumb the descriptor everywhere
This change does two things:
    - Makes sure the descriptor is passed through to
      EmulatedGralloc, where it makes a difference

    - Makes sure descriptor is always used when creating
      a VirtioGpuPipeStream.  The VirtioGpuPipeStream
      API where the descriptor is not passed in has
      been nuked.

GLES, VK, Gralloc, and RenderControl can all pass in
a descriptor via their APIs with this change.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Marcin Radomski
132ed7b81c Add mesa3d_platforms Soong config flag
It can be set to "none" to enable a "linux-like" build of gfxstream
guest code with Soong, providing support for DMA-BUF import extensions.

With the flag turned on, Android window system integration is disabled.

Tested with:

Comment out "FINISHME: support
VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT" check on vk_glow

Run vk_glow on a lunch target with the entire CL chain, and the
mesa3d_platforms Soong flag set to "none", see output

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Marcin Radomski
ebee8b8279 vkCreateInfo: support VkImageDrmFormatModifierListCreateInfoEXT
If the host supports it, forward. Otherwise, emulate
DRM_FORMAT_MOD_LINEAR if requested.

Tested by running vkcube-wayland against kumquat
(https://crosvm.dev/book/appendix/rutabaga_gfx.html#kumquat-media-server), on:
- Intel(R) UHD Graphics (CML GT2)
- AMD Radeon Pro W6400 (RADV NAVI24)

cd $(crosvm_dir)/rutabaga_gfx/kumquat/server/ && ./target/debug/kumquat

export MESA_LOADER_DRIVER_OVERRIDE=zink
export VK_ICD_FILENAMES=$(gfxstream_dir)/guest-build/guest/vulkan/gfxstream_vk_devenv_icd.x86_64.json
vkcube-wayland

Result: https://screenshot.googleplex.com/7X5DNPPou5XtWet

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Marcin Radomski
e137086383 vkGetPhysicalDeviceImageFormatProperties2: support drm modifiers
Passed via VkDrmFormatModifierPropertiesListEXT. When not supported by
the host, emulate DRM_FORMAT_MODIFIER_LINEAR with VK_IMAGE_TILING_LINEAR.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Marcin Radomski
19cbe451ce vkAllocateMemory: support DRM format modifiers for dmabuf memory
The only aspectMask values valid for vkGetImageSubresourceLayout with
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT are
VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Marcin Radomski
8847a50a04 Enable VK_EXT_image_drm_format_modifier on Linux guests
Do not force linear tiling for WSI in vkCreateImage. Allow creating WSI
images from DMABUFs with DRM format modifiers.

If the extension is supported by host, forward
VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT to
vkGetPhysicalDeviceImageFormatProperties2 and vkCreateImage.

If it's not supported, attempt to support DRM_FORMAT_MOD_LINEAR by
mapping it to VK_TILING_LINEAR.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Marcin Radomski
048037727f Enable VK_EXT_image_drm_format_modifier in cerealgenerator.py
Add the extension to list in cerealgenerator.py, rerun
scripts/generate-gfxstream-vulkan.sh

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Marcin Radomski
d9db1fe887 Add missing includes
Fixes build errors about missing ALOG*/EINVAL.

Those showed up when building following the kumquat instructions:
https://crosvm.dev/book/appendix/rutabaga_gfx.html#kumquat-media-server

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Yahan Zhou
db6cf33439 [Vulkan Snapshot] tryLock when an API might create extra handles
We acquire the lock when createExtraHandlecsForNextApi is called. But
depending on config, vkCreateDescriptorPool may or may not call
createExtraHandlesForNextApi, which results in inconsistency of the lock
state when calling snapshot()->vkCreateDescriptorPool.

We add a tryLock so that it always acquires the lock before modifying
mReconstruction.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Jason Macnak
3fca9f7123 Handle DEPTH_STENCIL_ATTACHMENT_BIT in VK -> AHB usage
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
2f161c31e3 gfxstream: guest: nuke Android HealthMonitor
The HealthMonitor is hang detection at the API Vulkan
encoder level.

It's actually not used in CF/AAOS/Emualtor.  The
plan for AOSP is actually to increase the amount
of Android CTS that are run against gfxstream to
increase health/stability, for example (b/347288539).

So if we consistently pass CTS on main with gfxstream
(as is the plan), HealthMonitoring would be somewhat
redundant.

Also, AndroidHealthMonitor is somewhat duplicated with
libaemu's HealthMonitor as well.

Also, nuke EncoderAutoLock while we're at it.  It also
is unused code.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
f42b3be1b5 gfxstream: guest: add vkInitializeKumquat
vkInitializeKumquat is a custom Vulkan API to allow
the user to specify the particular kumquat instance.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
d41987eaae gfxstream: connect to the specificied kumquat socket
An multi-threaded test might want:

 - launch multiple kumquats
 - connect each thread to a specific instance
   of kumquat.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
0f7101a5dc gfxstream: guest: plumb descriptor all the way through the HostConnection
A descriptor is an int32_t number.  Anything >= 0
is considered a valid descriptor.  It essentially like
a fd, but it will be used with kumquat testing.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
6785aae717 gfxstream: nuke libplatform stub
This was added for Fuchsia support, and now we have a
dedicated Fuchsia subdir.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
9356a87867 gfxstream: nuke set instance for testing
Not used.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Jean-Francois Thibert
669b530c83 Provided supported formats through gfxstream caps
Includes more complete support for depth formats.

Bug=b:352091996
Test=Ran CTS deqp test cases with cuttlefish

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Serdar Kocdemir
7f9783c8f5 Add error messages for unhandled extensions
Print missing structure information before calling abort.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
eb6124d6bf gfxstream: guest: kumquat: fixes in preparation for AOSP Kumquat testing
- API for virtgpu_kumquat_init will change with
  crrev.com/c/5747430
- Better error reporting
- Use paths prefered by AOSP
- Handle emulated sync files via eventfd

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
sergiuferentz
1befa2975c Adding support for VK_EXT_external_memory_host extension
Supports querying supported memory indexes for host allocations.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Jason Macnak
9164e91ad4 Ensure mesa struct is translated to gfxstream struct on Android
... to avoid aborts due to unbox failures on the host as the
mesa layer was turned back on for Android in aosp/3066068.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Jason Macnak
a883f65ab6 Disable device groups
... by silo'ing each physical device in its own device group.
This unblocks dEQP VK testing until the mesa layer has codegen
to fully translate structs in pNext chains.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
C Stout
90c80dc90a [guest] Fix Fuchsia build
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
c27e611dd9 gfxstream: guest: nuke more AEMU base stuff
Things that missed the last round of deletions.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
7da4dc42ca gfxstream: guest: use MESA_SCOPE_TRACE
- One less dependency on guest/android-emu/
- MESA_SCOPE_TRACE works on Linux guests or via Kumquat
  too, for better performance analysis

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
a194a09444 gfxstream: guest: add support VK_FORMAT_A2R10G10B10_UNORM_PACK32 Wayland buffers
vkcube-wayland uses this format on Intel/Linux.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
a3f888d089 gfxstream: host: don't abort when unbox fails
Unboxing fails if a NULL handle is passed in, triggering an abort.

However for vkCmdBeginTransformFeedbackEXT, this is perfectly
valid:

"For each element of pCounterBuffers that is VK_NULL_HANDLE,
transform feedback will start capturing vertex data to byte zero
in the corresponding bound transform feedback buffer."

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
b05f3f8e12 gfxstream: guest: vk_CmdBeginTransformFeedbackEXT fix
pCounterBuffers can be NULL, which crashes on the autogen path:

"For each element of pCounterBuffers that is VK_NULL_HANDLE,
transform feedback will start capturing vertex data to byte zero
in the corresponding bound transform feedback buffer."

Need to special case.

     Intel

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
96cceac511 gfxstream: guest: make sure signalSemaphoreValueCount is correct
From the Vulkan 1.3.204 spec:

VUID-VkSubmitInfo-pNext-03240

"If the pNext chain of this structure includes a
 VkTimelineSemaphoreSubmitInfo structure and any element of
 pSignalSemaphores was created with a VkSemaphoreType of
 VK_SEMAPHORE_TYPE_TIMELINE, then its signalSemaphoreValueCount
 member must equal signalSemaphoreCount"

Internally, Mesa WSI creates placeholder semaphores/fences (see
transformVkSemaphore functions in in gfxstream_vk_private.cpp).
We don't want to forward that to the host, since there is no host
side Vulkan object associated with the placeholder sync objects.

The way to test this behavior is Zink + glxgears, on Linux hosts.
It should fail without this check.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
97304dffdf gfxstream: guest: nuke unused functions
These functions are not used.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
84941bcbc5 gfxstream: guest: nuke aemu/base/Optional.h
Only seems to be used in the Fuchsia builds.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
109a7b8d54 gfxstream: guest: nuke AndroidLock
Removes dependency on gfxstream::guest's AEMU lock classes.

Mostly consists on Autolock<RecursiveMutex> to
std::lock_guard<std::recursive_mutex>.

There are some cases where the code does:

Autolock<RecursiveMutex> lock(mLock)
..
lock.unlock()
[ do something ]
lock.lock().
..

Those cases were replaced with std::unique_lock.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
5cb32d45a8 gfxstream: vulkan: fix issue with GCC
With newer versions of libstdc++, debug builds of gfxstream
hit this assert:

 0x00007ffff6ed2d60 in std::__glibcxx_assert_fail
(file=<optimized out>, line=<optimized out>, function=<optimized out>,
condition=<optimized out>)
    at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/assert_fail.cc:41
std::allocator<VkDescriptorBufferInfo> >::operator[]
(this=0x555555609380, __n=0)
    at /usr/include/c++/14.1.1/bits/stl_vector.h:1130
(pDescriptorSets=0x7fffffffcc30, descriptorSetCount=2,
bufferInfos=std::vector of length 1, capacity 1 = {...})
    at ../guest/vulkan/gfxstream_vk_device.cpp:718
(device=0x55555562f400, descriptorWriteCount=2,
pDescriptorWrites=0x7fffffffcc30, descriptorCopyCount=0,
pDescriptorCopies=0x0)
    at ../guest/vulkan/gfxstream_vk_device.cpp:746

Use resize instead of reserve + memset.

"That way the vector size would be initialized, bounds checks would
be happy, and default-init would automatically zero out POD structs
for us." -- dextero@

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
435102e266 gfxstream: guest: fix kumquat build
... after aosp/3162720

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Jason Macnak
b5b592c861 Demote some logs to debug only
... to remove some logspam. Looks like some ALOGVs were converted
to mesa_logi() in aosp/3093240.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
aa4e85ab42 gfxstream: kumquat: unmap memory when needed
Forgot this.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Jason Macnak
f240f5677a Add YUV AHB import and sample end2end tests
... which triggers the device lost failures when aosp/3163776
is reverted.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Jason Macnak
02b45e7e99 Adds AHB import and sampling test
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Serdar Kocdemir
e3125c8d2e Add extensions used in test applications
Add VK_KHR_ray_tracing_pipeline and VK_KHR_pipeline_library
extensions support which are used by some test applications.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
3406a65950 gfxstream: guest: start using new vkGetSemaphoreGOOGLE apis
If gfxstream-vulkan host supports these features and
the virtgpu layer is new enough, use the apis.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
538af15956 gfxstream: guest: mBlobId -> mAtomicId
It's a rename so the same concept can be used with sync
descriptors.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
6c0ce98cb0 gfxstream: guest: add experimental fence passing APIs
This uses the new fence passing APIs provided by kumquat.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:02 +00:00
Gurchetan Singh
a1bdf71d8e gfxstream: guest: add GFXSTREAM_ACQUIRE_SYNC protocol
Guest side needs to check availability of new protocol.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
5524afa1df gfxstream: host: introduce vkGetSemaphoreGOOGLE
New protocol which instructs the host to share sync descriptor
with ExternalObjectManager.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Jason Macnak
7787569b96 Adds helper for tracking command buffers with device lost
... which was useful for debugging b/347288539.

 --gpu_mode=gfxstream_guest_angle \
 --gpu_renderer_features=VulkanCommandBufferCheckpoints:enabled

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Aaron Ruby
e5d96bdbac gfxstream: ResourceTracker: Fix bug in return-code check for blob wait
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
3478de8444 Handle all extensions for structure size calculation
Structure size is needed to parse incoming streams correctly.
This avoids emulator crashes when an unsupported extension structure is
used on the guest side.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
3fb873808a gfxstream: guest: simpler get param for kumquat
The real Linux kernel must copy the ioctl struct, while
virtgpu_kumquat does not have to.  For this reason, the
get_param implementations can be different.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
6e3a5a2334 Show missing extension's name in the abort message
Extensions known in the vulkan header will be displayed with their
names to make debugging easier and the missing feature more visible.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
bd30892775 Remove empty ifdef blocks after the codegen
Reduce clutter due to extensions related ifdef code block generation
and avoid changing many files when a new extension support is added
with partial functionality.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
dd639c700e gfxstream: guest: fix useless return statement
Oops.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
aed7f4c79c gfxstream: linux guest: support client-side blob allocations
This makes Linux guests create color buffers blobs and
buffer blobs, in response to dedicated image and buffer
requests from the guest.  This is only done in Linux guests
for now.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
303191b81e gfxstream: host + guest: bump up version of the protocol
This reports the new host side capabilities (the ability to
make exportable color buffer blobs) back to the guest.
This feature is only used with experimental Linux guest
support in gfxstream.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
a5788932c9 gfxstream: guest: enable virtio-gpu kumquat
This uses libvirtgpu_kumquat_ffi.so to send commands to the
Kumquat Media Server.  The implementation of Kumquat is found
at crrev.com/c/5645904.

This is a more complex, but more fully featured end-to-end testing
framework.  This biggest benefit it is can run complex apps (vkcube,
gfxbench + ANGLE/Zink) on Linux, without a VM or a full Android tree.
The rutabaga FFI path -- which relied on a nested Vulkan loader -- didn't
work for complex apps and funkiness was observed with the nested
Vulkan loader.

Plus, app 1 + app 2 could connect Kumquat at the same time.

This may also benefit snapshot tests, particular since end to end
flow relies on external blob.  For example, a snapshot save command
could actually call stream_renderer_teardown(..) on the host-side,
while the guest retains it's state (ASG mappings + vulkano mappings).

A snapshot restore would actually call stream_renderer_init(..)
+ stream_renderer_restore(..), which an actual upstream VMM would
do.

Another additional benefit is multi-context testing.  Since
libvirtgpu_kumquat_ffi.so is portable, other libraries (minigbm)
can also call it.  We can mimic the cross-domain context allocating
via libminigbm.so, while context libgfxstream_vulkan.so imports the
file descriptor.

This change only transitions the meson build since the main goal
is once again is Linux on Linux testing w/o an Android tree.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Yahan Zhou
d02b246fbc Revert^2 "Add snapshot support for vkBindImageMemory2"
This reverts commit e43734cb0fa4e938f6ca43a01ed82d5921ad3f0d.

Reason for revert: have a real fix in aosp/3151746

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Yahan Zhou
1c3c0886f1 Fix Vulkan snapshot with -guest-angle
We did a few things here.

1. Update VkBindImageMemoryInfo in vkBindImageMemory2 for snapshot. In
   its implementation, vkBindImageMemory2 sometimes replaces an unboxed
   VkImage handle with a new one, which breaks snapshot. We update its
   value so that it can map to the proper one when calling snapshot
   functions. Note that there is a const cast which we might want to fix
   later.
2. Lock it properly when calling createExtraHandlesForNextApi.
3. Add support for more VkImage format. Fix mipmap extend calculation.

Now it works with -guest-angle but fails with VVL, not sure why.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
9ec275e10b Revert "Add snapshot support for vkBindImageMemory2"
This reverts commit 58934c4400e20934ef3172aab1a5ebefaa08e786.

Reason for revert: Breaks meson build
Same issue has aosp/3141746

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
05371b2451 gfxstream: don't define hasDedicatedImage + hasDedicatedBuffer multiple times
Every guest OS uses it (Linux, Android, Fuchsia).  Probably we
should clean up/merge logic further.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Yahan Zhou
7b9c9a1b3c Add snapshot support for vkBindImageMemory2
The pattern of vkBindImageMemory2 doesn't really fit with what we have
in the auto-code generator. Thus we need to implement a special entry
for it in the code generator. In future we might want to split the code
and directly write c++ code for similar APIs.

Note that due to complexity we only support vkBindImageMemory2 with
bindInfoCount == 1, for now.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
96b42bdbee Remove direct usages of MoltenVK library functions
These APIs and the related extension are deprecated in favor of the new
metal_objects extension to make sure the loader can intercept them, so that the layers, such as VVL, would work fine.
Removes necessity to load functions directly from a separate dylib.
VK_MVK_moltenvk extension support is still passed to the guest side
due to the existing checks for enabling the AHB extension.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
a7fdf81103 gfxstream: guest: support blobCmd + blobCmdSize
This is useful for trying to hook into gfxstream's
ColorBuffer handlers, without creating shadow guest
memory associated with RESOURCE_CREATE_3D.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
7dca2000ad gfxstream: guest: add XCB Surface support
This is needed to run X11 apps via libvulkan_gfxstream.so

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
7406c49842 gfxstream: guest: add VK_EXT_color_write_enable
Zink uses this extension.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Jean-François Thibert
e62a33012b Add depth formats support to import/export
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
e7b736e8c6 gfxstream: ResourceTracker: fix mesa_loge(..)
Fixes Linux build.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
ead73173bf Revert "Revert "gfxstream: Add vkCmdPipelineBarrier2 implementat..."
Revert submission 3125001

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
5cb7bbce17 Add VK_EXT_debug_report extension support
This extension is enabled from the platform side via the Android
loader and the applications using the functions or structures of
it would crash even if they check the support of the extension.
Guest callback addresses within the structures of this extension
cannot be used and are already being removed when creating the
instances.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
a355544680 Revert "gfxstream: Add vkCmdPipelineBarrier2 implementation in VkDecoderGlobalState"
This reverts commit c4de357e4f0b256a246007982aacde2dedc10d15.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
afd2d7fd8d Revert^2 "gfxstream: add VK_EXT_vertex_attribute_divisor"
This reverts commit 626ca943a0426d7cd002aae18b31652e35153540.

Reason for revert:

- gfxstream isn't used this particular failing test infra
- unclear how graphics would affect networking

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
PODISHETTY KUMAR
8cd2380d89 Revert "gfxstream: add VK_EXT_vertex_attribute_divisor"
This reverts commit fccacb01ecc3e91236f006107b9e14b86cc490a9.

Reason for revert: <Likely culprit for b/346877632  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
e6cf3feeb5 gfxstream: add VK_EXT_vertex_attribute_divisor
Already supported via codegen.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Yahan Zhou
3c609a9bf9 Fix handle create mismatch for Vulkan snapshot
In our implementation, VkQueue is created in vkCreateDevice instead of
vkGetDeviceQueue. We will need to track their creation API properly,
otherwise there will be a name mismatch on snapshot load. This will
result in a crash during snapshot load with -guest-angle.

This commit marks their creation API properly.

Same thing applies for VkDescriptorSet.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Aaron Ruby
561b6773c2 gfxstream: Add vkCmdPipelineBarrier2 implementation in VkDecoderGlobalState
Useful for specializing this function.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
61706c9a67 gfxstream: valgrind fix
Some people have Valgrind on their system and may
need this.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Aaron Ruby
e6fa8819b0 gfxstream: Add linearPeerImage for Linux guests, to use for imageLayout queries
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Aaron Ruby
cf8e324fe5 gfxstream: Switch to using scanout path with native DRM images for Linux WSI
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Aaron Ruby
6b92e632da gfxstream: Change createResource to use stride instead of bpp
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Aaron Ruby
24cb362a9c gfxstream: Remove VkImage from functable handle translation
Not required for any Mesa object backings.
TODO: Investigate why VkBuffer still required (and crashing without
translation)

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Gurchetan Singh
f667ed01e7 gfxstream: convert some Vulkan to mesa_log(..)
There are still some places left in the libgfxstream_vulkan.so
dependencies. For example, guest/platform &
guest/OpenglSystemCommon.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Aaron Germuth
bad010e728 Add VK_EXT_host_query_reset to guest's allowed device extensions
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a6fa05a299d1cb7e299a00c7554331027ee0a874)

Merged-In: I47778e5b78852f896b41dcf900ae1cf595bb9a27
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Sergiu
694638d30c Tweaking YCBCR conversion to return correct VK Format
* Adding a drm format field in cb_handler
* Convert android->vulkan format mapping into drm->vulkan format mapping

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Yahan Zhou
85d52f5780 Add snapshot for command buffer
Record all vkCmd* commands. Also clear them on vkResetCommandBuffer.

Also use VK_IMAGE_ASPECT_STENCIL_BIT when snapshotting stencil
images.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Jason Macnak
26a0c8dd09 Support BGRA render target in CompositorVk
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Jason Macnak
5b9905b329 Remove extra semicolon in VkEncoder
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:01 +00:00
Serdar Kocdemir
d63edd44c3 Mark VK_MVK_moltenvk extension as supported on vulkan
MoltenVK extension code was not being generated because of the
missing "supported=vulkan" tag required by the code generator.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jean-Francois Thibert
0fe71cc5da gfxstream: move staging reset to end of reset command buffer
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
e4f720c955 Add VK_EXT_metal_objects support
Adding VK_EXT_metal_objects to the supported extensions
for the host side operations.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jean-Francois Thibert
2aad7d2b00 gfxstream: Fix usage of encoder after release in vkResetCommandBuffer
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Aaron Ruby
fcb2b62bfe gfxstream: Revert all unnecessary gfxstream_vk_* object types and corresponding translations in functable.
Original approach was to translate all possible handle types for complete
Mesa object equivalence. Practically, only a subset of these objects
actually need to be real Mesa objects for use with WSI. This simplifies
the translation and handwritten entries substantially, which is somewhat
brittle and bug-prone.

Clean up parts of functable.py that we don't need.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Aaron Ruby
a1920507dc gfxstream: Clean up VK_KHR_external_memory_fd support for Linux
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Aaron Ruby
07c232e3b3 gfxstream: Add "transformList" method for VkFences, in addition to VkSemaphores
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Aaron Ruby
9908be77c7 Revert "Reland "Partial revert of aosp/2858589 to avoid Mesa layer for Android""
In preparation for making the issue less likely to appear.

This reverts commit 696eaaa012e369157dd745d1bf083b4dc064deaf.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Gurchetan Singh
47b0536ba2 gfxstream: always advertise device memory extension guest side
memory report extension is present.  It's is filtered out when
sent host side, since for a virtual GPU this is quite difficult
to implement.

Mesa runtime is picky about physical device features.  So if
the test tries to enable device level extension without it
definitely existing, the test will fail.

The test can also be modified to check
VkPhysicalDeviceDeviceMemoryReportFeaturesEXT, but that's more
involved.  Work around this by always advertising the extension.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Aaron Ruby
4a95b71975 gfxstream: Use vk_find_struct for other struct searches in gfxstream_vk_CreateDevice
It turns out we can use vk_find_struct after all.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Aaron Ruby
9149038237 gfxstream: translate physicalDevices list in VkPhysicalDeviceGroupProperties to their gfxstream objects
In preparation to fix some end2end tests.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
b38b4a7169 Snapshot VkBuffer
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Aaron Ruby
7b215df12b gfxstream: Fix createResource call for Linux-guest VirtGpu layer
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
6d2dd9c22f Update vkMapMemory to not hold lock when calling into enc
... as this can lead to a deadlock with the following sequence:

Time1: guest-thread-1: vkDestroyBuffer() called
Time2:                 VkEncoder grabs seqno 1

Time3: guest-thread-2: vkMapMemory() called
Time4:                 ResourceTracker::on_vkMapMemory() locks mLock
                       for using `info_VkDeviceMemory`
Time5:                 ResourceTracker::on_vkMapMemory() calls
                       enc->vkGetBlobGOOGLE()
Time6:                 VkEncoder grabs seqno 2
Time7:                 VkEncoder sends the vkGetBlobGOOGLE with seqno
                       2 via ASG to host
Time8:                 VkEncoder waits for the `VkResult` from the
                       host via `stream->read()`

Time9: guest-thread-1: VkEncoder calls sResourceTracker->destroyMapping()
                       ->mapHandles_VkBuffer((VkBuffer*)&buffer);
                       which calls ResourceTracker::unregister_VkBuffer()

                       ResourceTracker::unregister_VkBuffer() tries to
                       locks mLock to erase the buffer's info struct
                       from `info_VkBuffer`

!!! DEADLOCKED HERE !!!

guest-thread-1 is stuck waiting on mLock (currently locked by
guest-thread-2) before it would `stream->flush();` to finishing
sending the vkDestroyBuffer() command to the host and potentially
ping its corresponding host-render-thread-1.

guest-thread-2 stuck waiting on the result from host-render-thread-2
but host-render-thread-2 won't progress until host-render-thread-1
finishes seqno 1 which needs guest-thread-1 to finish sending/pinging.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Hailin Zhang
8d4630549d Vulkan: fix dstArrayElement index wrap issue
See https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkWriteDescriptorSet.html

> If the dstBinding has fewer than descriptorCount array elements
> remaining starting from dstArrayElement, then the remainder will
> be used to update the subsequent binding - dstBinding+1 starting
> at array element zero. If a binding has a descriptorCount of zero,
> it is skipped. This behavior applies recursively, with the update
> affecting consecutive bindings as needed to update all
> descriptorCount descriptors.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
C Stout
8e708a6c45 [guest] Fuchsia: initialize queries
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
8ebd422fcd Reland "Partial revert of aosp/2858589 to avoid Mesa layer for Android"
This reverts commit 9eef6d0aefcf0aa1c07d42d9b307b1092a6deec9.

... as this does not yet have a way to generically convert Mesa
handles into Gfxstream handles in extension structs which causes
breakage in dEQP VK for many tests.

Moves the mesa based codegen to a separate `mesa_func_table`.

Reland fixes the end2end test guest vulkan ICD.

      cts -m CtsDeqpTestCases
          --module-arg CtsDeqpTestCases:include-filter:dEQP-VK.*

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
d6af74d9b0 Handle dependency by VkMemoryDedicatedAllocateInfo
We have a situation that if an image memory is created with
VkMemoryDedicatedAllocateInfo, the following commands that refer to the
same image  must happen in this exact order:

vkCreateImage
vkAllocateMemory (with dedicated image memory)
vkBindImageMemory
vkCreateImageView

Our previous dependency graph implementation uses Vulkan objects as
nodes and does not haven enough granularity to handle this situation.
vkCreateImageView can only be executed after an image is created and
bound to memory. Our previous dependency graph does not have the
notion of "bound to memory". We worked around it by adding
vkBindImageMemory as part of the image initialization steps.

To make sure we can bind image at initialization, we marked image to be
dependent on the memory it bounds to. When adding the new
vkAllocateMemory with dedicated image memory extension into the mix, it
introduced a circular dependency. vkAllocateMemory will say the memory
has dependency on the image. vkBindImageMemory will say the image has
dependency on the memory.

To properly resolve the issue, we will need to record the state of an
Vulkan object, and declare that vkCreateImageView not only depends on an
image, but also requires the image to be bound to memory. We do so by
introducing a "State" enum and use the pair <VkObjectHandle, State> as
the vertex in the deppendency graph. Currently State is an enum with 2
values: CREATED and BOUND_MEMORY. By default, after a VkCreate* command,
an object will be in CREATED state. When calling vkBindImageMemory or
vkBindBufferMemory it will transform the image or buffer into
BOUND_MEMORY state. Then vkCreateImageView will have dependency with
{VkImage, BOUND_MEMORY}.

Then we can create a dependency graph that looks like this:

VkImageView --> {VkImage,BOUND_MEMORY} --> VkMemory
                        |                       |
                        |   ┌-------------------⅃
                        v   v
                       VkImage

No more circular dependency.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
b57b7043f6 Revert "Partial revert of aosp/2858589 to avoid Mesa layer for Android"
This reverts commit d6e1b00029419b3ae52607967bbb950137bff848.

Reason for revert: broke end2end tests b/333885743

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
cc76ad2582 Partial revert of aosp/2858589 to avoid Mesa layer for Android
... as this does not yet have a way to generically convert Mesa
handles into Gfxstream handles in extension structs which causes
breakage in dEQP VK for many tests.

Moves the mesa based codegen to a separate `mesa_func_table`.

      cts -m CtsDeqpTestCases
          --module-arg CtsDeqpTestCases:include-filter:dEQP-VK.*

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
70c695550a Explicitly specify target/bind/bpp in resource creation
... instead of trying to guess it so that BLOB AHBs can be
distinguished from pipe buffers used for guest<->host communication
in VirtioGpuPipeStream.

Adds a test which allocates a BLOB AHB.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
d0a61f5813 Rename VirtGpuBlob -> VirtGpuResource
... as this is more generic and "VirglBlob" is not actually a blob.

find . -type f -name "*.cpp" -print0 | \
    xargs -0 sed -i '' -e 's/VirtGpuBlob/VirtGpuResource/g'
find . -type f -name "*.h" -print0 | \
    xargs -0 sed -i '' -e 's/VirtGpuBlob/VirtGpuResource/g'
find . -type f -name "*.cpp" -print0 | \
    xargs -0 sed -i '' -e 's/createVirglBlob/createResource/g'
find . -type f -name "*.h" -print0 | \
    xargs -0 sed -i '' -e 's/createVirglBlob/createResource/g'

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
d9518399dc Update emulated gralloc to use AHB format
... to match the existing real guest usage. This was okay since all of
the tests were using the drm format too but we should match.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
563c11a3a9 Fix corner cases where vk dependency graph breaks
There are 2 issues with the current implementation of VkReconstruct:

a. When deleting a child handle it does not erase itself from its
   parent. When doing snapshot we enumerate children handles and check
   if they are still "alive". But the handle pool is written in the way
   that it could reuse handles that have been previously destroyed,
   invalidating the "alive" check.
b. Previous dependency graph does not support one handle with multiple
   parents.

In this commit we fix (a) by making child<->parent pointer
bidirectional. When deleting a child it will be erased from its parents.

We fix (b) by rewriting a significant part of dependency graph logic on
snapshot save.

The commit also makes all destroy command to be recursive (except for
vkDestroyShaderModule), which will be handled in later commits.

Also add dependency VkFrameBuffer -> VkImageView.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
d0a4d3f3bc Add composition support to the end2end test framework
... so that we can start to test GL->VK->Host-Compositor flows.

Adds a fake render control lib that basically just exposes some of
the render control functions with scoped host connection inside of
a `RenderControlDevice`.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
c2d57b76be Ensure glProgramBinary initializes uniform and attrib info
Adds Scoped* helper classes to hopefully make writing tests easier.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
b1b8eb9301 Make it not crash during vk snapshot load
We are trying to make vk snapshot load the google Chrome home page
without crashing. With this CL it does not crash during load but would
crash with a device lost after submitting a queue (which is
unsurprising because everything is missing to snapshot vk queue).

Content of this commit includes:

 - Add dependencies for VkImageView, VkGraphicsPipelines, VkFramebuffer.
   They are necessary to tell the snapshot module the order of vk object
   creation.
 - Add vkBindImageMemory into the loading sequencey of VkImage, so that
   it would be executed before vkCreateImageView.
 - Delay the destruction of VkShaderModule. This is because other
   objects can still refer to it after it is destroyed.
 - Initialize VK backend for color buffer properly on snapshot load.
 - Save and load vk images in the same order by sorting them according
   to their boxed handle.
 - Record all the placeholder handles for vkCreateDescriptorPool. For
   performance purpose this function creates a lot of extra handles
   without real contents. We need to snapshot those handles as well.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Bo Hu
2f958ad3f8 goldfish: handle null handle
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Erwin Jansen
677b398ea4 Enable GFXStream bazel build
This builds the "standalone" GFXStream library that can be consumed by
Qemu 8.2

The bazel build allows us to transition rutabaga to a bazel based
build, which will unify the Qemu 8.2 build as used by the emulator.

It also opens up the path to migrate this to g3 if we decide to do this.

This change forces a few header changes, as bazel is more strict about
the relationship between headers and packages, and doesn't easily give
you fine grained control over the include paths.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
0deb66fcae Add support for VK_EXT_robustness2
This extension is required to get Vulkan Capabilities
Viewer working correctly in the emulator.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
C Stout
36d09f70ce [guest] Fuchsia: open magma device
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
a7b61ee151 Introduce Gfxstream Features to decouple Gfxstream from AEMU
... which will allow building Gfxstream from a fixed version of
AEMU for the purposes of packaging.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Gurchetan Singh
f1392431e0 gfxstream: generate development ICD for meson build
An user is now able to do:

export VK_ICD_FILENAMES=./amd64-build/guest/vulkan/gfxstream_vk_devenv_icd.x86_64.json

that allows vulkan apps without install the ICD.

If built with option `-Dgfxstream-build=guest-test`, that would go
into the gfxstream VK ICD and the test layer.  Unfortunately,
the test layer hangs right now since I believe the gfxstream_backend's
vulkan loading logic is also affected by the environment variable.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
876844ddd6 Add VK_EXT_validation_features to host modules
This is another extension used for vulkan validation.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
fe6accba65 Better track color buffer usage in Vulkan
Sometimes guest renders to an AHB without calling
vkQueueSignalReleaseImageANDROIDAsyncGOOGLE. This would result in the
color buffer not being updated from Vulkan.

This commit tracks the situation that AHB is rendered to, and copies its
content to color buffer.

Note that it adds extra wait, which could hurt performance.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
ae8d2c2907 Add VK_EXT_debug_utils to host modules for codegen
Fixes emulator crashes when the validation layers
are enabled on the guest side.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
C Stout
9fbbdf87b6 [guest] Fix Fuchsia build, add missing header
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
C Stout
220d0ffb79 [guest] Remove Fuchsia syslog_static dependency
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
272db6ebc4 Use append to chain memory pointer info
Append importHostInfo rather than directly assigning
to pNext for VkMemoryAllocateInfo struct.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
C Stout
2daad5f609 [guest] Fuchsia: include missing Vulkan entry points
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
bb2e9be160 Reduce heap pressure on getPacketContents
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
092dbc32ab Make RutabagaLayer shared between "guest impls"
... so that "guest gralloc", "guest egl", "guest vulkan", etc are
all using the same underlying emulation layer (RutabagaLayer).

This moves Gralloc and ANativeWindow into platform as these should
be hidden from GfxstreamEnd2EndTests.

Note: we still want to static-ify a lot of the guest libraries.

      meson setup \
          -Ddefault_library=static \
          -Dgfxstream-build=both \
          build
      meson compile -C build

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
bfac7ab65e Handle AHB R8 format conversions
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Lars Harrison
fe4a621c7b Fix coherent memory allocation to use device
When allocating coherent memory (generally, suballocations) and looking
up existing VkDeviceMemory entries, the device is critical to finding
valid allocation blocks, otherwise allocations from other devices might
be chosen, which invalidate things.

This happens only in situations where a single process has multiple
VkDevices, so it was rare enough not to be caught until now.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Gurchetan Singh
ef4d6d8fb4 gfxstream: build the test layer via Meson
Useful for host driver in guest efforts.

     ninja -C amd64-build/

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
362ffb5f81 Snapshot vk image content in common situation
This commit snapshots vk image content by allocating a staging buffer
and copying the bytes on snapshot. It only works in the simplest setup.
Many situations are not considered in this commit, they include:

(1) the image does not support VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
layout;
(2) the image does not support VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
layout;
(3) the queue is dirty.

Also there is no performance optimization.

Implementation-wise, snapshot happens in VkDecoderGlobalState after
recording / playing back all create / bind commands. It borrows an
existing queue to run the extra vk copy commands. A temporary staging
buffer is also created for copying. Later we could optimize the code
by reusing most of the temporary objects.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
67203e1574 Add snasphot support for vk coherent memory
This commit tracks more functions related to coherent memory snapshot
and saves the memory content.

At this point we are not sure if we need to manually copy the memory
content, because they are supposed to be cloned in RAM snapshot. We
could revert that part if they turn out to be unnecessary in future.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Mitchell Kember
6af6eb87c6 [fxbug.dev] Migrate bug numbers
This changes fxbug.dev/ URLs from Monorail bug numbers to the new
Fuchsia Issue Tracker numbers.

The migration to the new issue tracker was announced here:
https://groups.google.com/a/fuchsia.dev/g/announce/c/GOYfJozEqmk/m/qsGsaJ7UAAAJ

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
C Stout
db16144c89 [guest] Build fixes for Fuchsia
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Aaron Ruby
c3f327db2f gfxstream: logging on Linux guests
- Downgrade some logging messages to verbose

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jean-Francois Thibert
cdc3c521fd Add vkUpdateDescriptorSetWithTemplateKHR to resource tracker
The call has to be processed using the internal descriptor logic.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
1050781c4e gfxstream: always initialize rcEncoder and other things
Similiar solution to aosp/2925036, but perhaps simpler.

- Creates the rcEncoder(..) when a new thread-local encoder
  is initialized.
- keeps SetupInstanceForProcess improvement
- Always use kCapsetGfxStreamVulkan.  This should make no
  difference, since goldfish doesn't advertise
  kCapsetGfxstreamVulkan and HostConnection::get(..) defaults
  to kCapsetGfxstreamVulkan anyways to get ASG ring parameters.
- Move additional static global variables before functions

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
2dbbeca869 gfxstream: add REQUIRED_TYPES list
This makes the checks into a list.  It also adds support for
uint16_t, which are hit with newer versions of vk.xml.

I'm not sure exactly why we need the list, only that codegen
errors occur if we don't don't generate a type here.

Maybe as we try to upstream the cerealgenerator, we can figure
out why and fix it.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
a1ac0bedfc gfxstream: add GFXSTREAM_ENABLE_GUEST_GOLDFISH
Reduces the need for goldfish sync headers in guest Linux VK build.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
c5ced9e430 gfxstream: nuke HOST_BUILD
The host build has been deprecated in favor of end2end tests.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
7d85b542e8 gfxstream: nuke VIRTIO_GPU flag
It's always set.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Lars Harrison
f44b1e5523 Always initialize gfxstream vulkan
This change splits SetupInstance on the gfxstream vulkan layer into
SetupInstanceForProcess and SetupInstanceForThread, then forces
SetupInstanceForThread if the HostConnection for the current thread
hasn't been initialized when getConnection is called. Currently, this
will create an rcEncoder and include the PUID, which - when missing -
causes the host to get very confused.

This path is triggered by ANGLE, where a separate thread runs through
vulkan initialization than which ultimately uses the vulkan
components. In this case, none of the vulkan initialization code will
have independently called SetupInstanceForProcess on the current thread.

The semantics of SetupInstanceForProcess and SetupInstanceForThread are
somewhat muddled, because the sequence number pointer is a per-process
concept, but only set when initializing the rcEncoder per thread.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
4eadf2b2a7 gfxstream: don't forward declare ProcessResources
This avoids compilation errors when codegen'ing at build
time.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
afe32a932a gfxstream: PLATFORM_SDK_VERSION --> ANDROID_API_LEVEL
Name change.  Previosuly, the code keyed on the level was not
compiled?

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
833850c606 gfxstream: reduce use of PLATFORM_SDK_VERSION
It's way past API-level 26 now.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jason Macnak
5dc2d5f5c5 Fix "-Werror=conversion" errors for RanchuHwc
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Merged-In: I371b357e8e4400a58d0010dd20a8da285d4602b0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Yahan Zhou
1de3238758 Add VK_EXT_fragment_density_map for Chrome
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
ab348d8429 gfxstream: guest: cpp_args --> guest_cpp_args
This is more descriptive..

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Aaron Ruby
15897b4eeb gfxstream: Advertise VK_KHR_external_semaphore_fd always on Linux/Android guests.
Lack of host support is only an issue for non-sync, opaque FDs,
in which case an appropriate VK_ERROR should be returned in the
corresponding host calls.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Igor Chernyshev
10ba22db00 Do not copy invalid descriptor set image view handles
Also do the same filtering for descriptor and texel buffers

Spec defines what types must have valid handles,
e.g. VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, etc

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Igor Chernyshev
fa12aebec9 Move vkUpdateDescriptorSets to hand-written mode
Do the same with vkQueueCommitDescriptorSetUpdatesGOOGLE

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Igor Chernyshev
6d2f549ccf Enable VK_KHR_create_renderpass2 in Guest
This is a part of the spec, and controls should be done on the host,
where special handling is actually [not yet] done

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
1b33515a08 gfxstream: codegen: allow generating host/guest autogen separately
This allows codgen the guest encoders and host decoders are
separate steps, based on environment variables.  This is useful
since genRule (Android.bp) and custom_target (meson) both the
output files to explicitly listed.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Tom Cherry
6bb76947ae Do not pass std::shared_ptr when not transfering ownership
This goes against Google's C++ primer [1] and the Core C++ guidelines
[2]. It incurs additional runtime overhead to increase and
subsequently decrease the reference count without providing value,
since the parent function maintains the a reference to the object
through the duration of the function.

1: go/cpp-primer#unique_ptr - "In general, if you find yourself
wanting to use a pointer or reference to a unique_ptr, you're probably
not transferring ownership, so you should usually just pass a raw
pointer or reference to the underlying object, and keep unique_ptr out
of it."
2: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f7-for-general-use-take-t-or-t-arguments-rather-than-smart-pointers

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Yahan Zhou
8d8540772e Declare AHB blob unsupported in Vulkan
It diverged between old gralloc and minigbm.

Merged-In: If0c1896c6acef97db9ec3ae3abfe88eea333b42f
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
5781ca340a genvk: options.filename --> args.target
Previously, for gfxstream the filename was "CMakeLists.txt",
but that was changed with the prior commit.  Not having a
filename doesn't affect codegen, but does throw an error
afterwards when timing statistics are thrown out.

Luckily, args.target and options.filename are more or less
synonymous in genvk.py, so use that.  This should be fairly
upstreamable too if we choose to do so.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
1e49af4f71 gfxstream: use absolute path for some code
Some code may be auto-generated, some may not be.

Eventually we want to move autogenerated code into specialized
directories, so it be generated but not necessarily checked
in [for certain cases].

Also, nuke codegen for CMakeLists.txt: we have multiple other
build systems now (Blueprint, meson), and it doesn't make
sense codegen one anymore.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
bfacad0e96 gfxstream: nuke goldfish_vk_handlemap
Not used.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
7b50e62179 gfxstream: mega-change to support guest Linux WSI with gfxstream
This is a mega-change to support Linux guest WSI with gfxstream.
We tried to do a branch where every commit was buildable and
runnable, but that quickly proved unworkable. So we squashed
the branch into a mega-change.

Zink provides the GL implementation for Linux guests, so we just
needed to implement the proper Vulkan Wayland/X11 WSI
entrypoints.

The overall strategy to support this is to use Mesa's WSI
functions.  The Vulkan WSI layer was also considered:

https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer

But it was less maintained compared to Mesa.  The way Mesa common
layers communicate with drivers is the through base objects
embedded in driver and a common dispatch layer:

https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/vulkan/dispatch.rst
https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/docs/vulkan/base-objs.rst

Our objects are defined in gfxstream_vk_private.h.  Currently,
Mesa-derived Vulkan objects just serve as shim to gfxstream
Vulkan’s internal handle mapping. Long-term, we can use
Mesa-derived objects inside gfxstream guest Vulkan exclusively.

The flow is typically inside a Vulkan entrypoint is:

- VK_FROM_HANDLE(vk-object) to convert to a gfxstream_vk_obj
  object
- Call ResourceTracker::func(gfxstream_vk_obj->internal) or
  VkEncoder::func(gfxstream_vk_obj>internal)
- Return result

A good follow-up cleanup would be to delete older gfxstream
objects.  For example, we now have struct gfxstream_vk_device
and info_VkDevice in ResourceTracker.

Most of this logic was auto-generated and included in
func_table.cpp. Some vulkan functions were too difficult to
auto-generate or required special logic, and these are included
in gfxstream_vk_device.cpp.  For example, anything that needs to
setup the HostConnection requires special handling.

Android Blueprint support is added to the parts of Mesa needed
to build the Vulkan runtime.  One thing to call out it's
required to build the guest/vulkan_enc and guest/vulkan files
in the same shared library now, when previously have
libvulkan_enc.so and libvulkan_ranchu.so was sufficient
[otherwise, some weak pointer logic wouldn't work].

A side effect of this is libOpenglSystem must also be a static
lib, and so should libandroid_aemu too.  That conceptually makes
sense and the Meson build had been doing this all a long.  We
can probably transition everything besides libGLESv1_emulation.so,
libGLESv2_emulation.so and libvulkan_ranchu.so to be static.

This requires changes in the end2end tests, because since each
HostConnection is separate and internal to it's constituent
library. Lifetimes need to be managed separately: for example
the HostConnection instance created by the end2end tests would
not be visible inside libvulkan_ranchu.so anymore. Probably the
best solution would be improve the testing facade so a
HostConnection represents one virtio-gpu context, while some
other entity represents a virtio-gpu device (client-server
would work).

vk.xml was modified, but change sent to Khronos:

https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6325

Fuchsia builds still need to be migrated, but they already have
Fuchsia Mesa with all the build rules so that shouldn't be too
bad. Just need to copy them over the gfxstream/Mesa hybrid.

The new command for building Linux guests is:

meson amd64-build/ -Dvulkan-drivers="gfxstream" -Dgallium-drivers="" -Dvk-no-nir=true -Dopengl=false

Big shout-out to Aaron Ruby, who did most of the gnarly codegen
needed to get the function table logic to work.

     * Run Weston/vkcube on Linux and automotive platform
     * launch_cvd --gpu_mode=gfxstream vkcube
     * launch_cvd --gpu_mod=gfxstream_guest_angle
     * vkcube + 3D Mark Slingshot extreme work with guest ANGLE and
       GL-VK interop
     * GfxstreamEnd2EndTests
     * Some select dEQP tests

Aaron Ruby (46):
  gfxstream: function table: remove entry points that are hand-written.
  gfxstream: function table: more changes
  gfxstream: function table: scope internal_arrays to encoder
  gfxstream: function table: autogenerate compoundType params
  gfxstream: add handwritten EnumeratePhysicalDeviceGroup entrypoint.
  gfxstream: function table: handle nested handle arrays
  gfxstream: function table: adding some handwritten implementations
  gfxstream: revert some unnecessary changes
  gfxstream: use vk_object_zalloc/free instead of vk_zalloc/free.
  gfxstream: revert most gfxstream objects to use vk_object_base
  gfxstream: function table: handwritten commmand-buffers/pools
  gfxstream: codegen functionality to handle special param
  gfxstream: function table: random fixes
  gfxstream: add vk_command_buffer_ops handlers
  gfxstream: func_table.py: Codegen support for nested compound type
  gfxstream: remove handwritten/add autogen entry points
  gfxstream: add gfxstream_vk_device.cpp
  gfxstream: query device and instance extensions early
  gfxstream: func_table: explicit allocation for nested arrays/compound
    types
  gfxstream: goldfish_vulkan: fix commandBuffer allocation.
  gfxstream: meson: Raise api_version in ICD config to 1.1.
  gfxstream: function table: add more handwritten entries
  gfxstream: goldfish_vulkan: update VkDescriptorSetAllocateInfo logic
  gfxstream: function table: NULL check on internal_object dereference
  gfxstream: function table: Remove POSTPROCESSES handling from
    functable
  gfxstream: mesa: Add 'gfxstream' as a -Dvulkan-drivers
  gfxstream: ResourceTracker: add some allowedExtensions
  gfxstream: gfxstream_vk_device: add wsi_common_entrypoints
  gfxstream: Move instance handling into gfxstream_vk_device.cpp
  gfxstream: ResourceTracker: Enable Linux WSI-related extensions
  gfxstream: wsi: add wsi_device initialization
  gfxstream: gfxstream_vk_device: use Mesa common physical device
    management
  gfxstream: ResourceTracker: translate mesa objects in user buffer
  gfxstream: exclude VkSampler and VkDescriptorSet objects from
    translation
  gfxstream: Add guest-side external memory support with colorBuffers.
  gfxstream: function table: Modify semaphoreList inputs to no-op
    semaphores
  gfxstream: function table: Allow VK_NULL_HANDLE for free/destroy APIs.
  gfxstream: cereal: Add VK_EXT_depth_clip_enable as supported feature.
  gfxstream: vulkan_enc: un-namespace vk_util.h and vk_struct_id.h
  gfxstream: gfxstream_vk_device.cpp: Support VK_KHR_surface and
    VK_*_surface
  gfxstream: vulkan_enc: Add support for Mesa-only extensions.
  gfxstream: ResourceTracker: Use DEVICE_TYPE_VIRTUAL_GPU always
  gfxstream: platform: add dma-buf export support with dedicatedBuffer.
  gfxstream: ResourceTracker: add VK_EXT_depth_clip_enable allowed
    extension
  gfxstream: ResourceTracker: external memory via QNX_screen_buffer
    extension
  gfxstream: Add VK_QNX_external_memory_screen_buffer to VulkanDispatch

Gurchetan Singh (18):
  gfxstream: mesa: write Android.bp files
  gfxstream: generate gfxstream_vk_entrypoints.{c, h}
  gfxstream: vulkan_enc: add gfxstream_vk_private.h (objects)
  gfxstream: function table: modify function table to use gfxstream_vk_*
  gfxstream: compiles
  gfxstream: build system improvements
  gfxstream: ResourceTracker: don't crash without
    VkBindImageMemorySwapchainInfoKHR
  gfxstream: vk.xml: make some vkAcquireImageANDROID params optional
  gfxstream_vk_device: filter out swapchain maintenance guest side
  gfxstream: end2end: fixes for End2End tests
  gfxstream: func_table: custom vkEnumerateInstanceLayerProperties
  gfxstream: add VK_EXT_DEBUG_UTILS_EXTENSION_NAME into Mesa list
  gfxstream: clang-format guest code
  gfxstream: libandroid AEMU static
  gfxstream: vkEnumerateInstanceVersion
  gfxstream: vkCreateComputePipeLines
  gfxstream: make end2end tests happy
  gfxstream: delete prior vk.xml, vk_icd_gen.py

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
2354b8ce20 gfxstream: mesa: import Mesa
Mesa has Linux WSI implementations that can be used for
gfxstream.  We have to first import the parts of Mesa that
we find useful.

Just modified

- guest/src/mesa/meson.build

to remove extra project args.

- guest/src/mesa/src/meson.build

to not automatically call subdir in all directories.

This also requires the VK_NO_NIR and Android build patches, which
are fairly upstreamable.  The strategy would be to merge all changes
required in the source code.

Generally, if you want to modify the Mesa subdir, you generally
will want to have a plan for upstreaming the change.
For example, here's the Mesa VK_NIR patches.

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26574

[not upstreamed yet; but do have a plan ;-)]

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Lars Harrison
3104712e99 Provide error message on unhandled VK structs
This change provides more explicit error messages and a proper abort in
situations where an unhandled VK structure is attempting to be used,
based purely on calls to the size functions. This should enable better
capture and debugging of these failures in the future (rather than
hitting a segfault and having to diagnose).

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Igor Chernyshev
a45560cd5a Add VK_EXT_debug_utils and VK_EXT_scalar_block_layout
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Yahan Zhou
8dfaa0d08c Add VK_EXT_vertex_attribute_divisor support for guest ANGLE
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jason Macnak
b62b11d3e2 Sort and dedup physical device extensions
... to avoid issues when running dEQP. The Vulkan Loader's trampoline
functions will remove duplicates as well but this can lead to lead
errors if Gfxstream's function returns VK_SUCCESS with N elements
(including a duplicate) but the Vulkan Loader's trampoline function
returns N-1 when querying the extension count. Then, Gfxstream will
return VK_INCOMPLETE the second time the application queries for
the actual structs with an array sized N-1.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jason Macnak
a04902c837 Wrap some classes in "namespace gfxstream::guest {}"
... to avoid more duplicate symbol definitions when
building Gfxstream VK ICD.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jason Macnak
e492b4aa53 Add dispatch magic for Gfxstream linux ICD
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
1d560c1ee8 gfxstream: codegen EXT_swapchain_maintenance1 + KHR_swapchain host only
We really shouldn't be encoding/decoding EXT_swapchain_maintenance1
or KHR_swapchain at all, for Android.  The driver needs to expose
VK_ANDROID_native_buffer and Android's libvulkan implements swapchain
in terms of that.

However, Android's libvulkan doesn't filter out structs or definitions
related to those extensions, and for U, niether does gfxstream. That
means older images pass down the extensions.

Newer versions of gfxstream guest should do filtering and in fact
we have some host side filtering logic too.  So isolate the
extensions host side for now.

This also removes an abort(..) in unwrap_VkBindImageMemorySwapchainInfoKHR.
Since were aren't auto-generating KHR_swapchain anymore, so things don't
get copied, and the abort(..) gets triggered.

However, as gfxstream is not a validation layer, removing the abort is
harmless.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
6d7c47d3cd gfxstream: cereal: SUPPORTED_WRAPPERS --> SUPPORTED_MODULES
Wrappers are used to generate host and guest variants of
modules.  Thus, modules allow differentiation between guest
and host codegen, which wrappers do not.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
9193759bd3 gfxstream: cereal: [moduleType] --> [(moduleType, moduleName)]
It would be great if we could get the moduleName from
a moduleType, but couldn't determine how it's done.
So just create a tuple.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Yahan Zhou
d9a71239b2 Use old en/decoding for vkQueueSignalReleaseImage
We accidentially changed the xml definition for
vkQueueSignalReleaseImageANDROID. As a result it changed its encoding
and decoding, which breaks Android emulator when launching old system
images (API level 29~32).

To fix this, we overwrite it with the old definition so that it keeps
using the old encoding/decoding.

Note that API 33+ uses vkQueueSignalReleaseImageANDROIDAsyncGOOGLE which
does not have this problem.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
C Stout
7ff621cf19 [guest] Add skeleton Fuchsia VirtGpu implementation
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jason Macnak
cb5e7213d5 Use libbase's property getting functions
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
C Stout
c80f355101 [guest] Fix Fuchsia build
Major changes:
- remove QemuPipeStreamFuchsia
- reinstate processPipeDoInit() for initSeqno(), but skip the rest
- revamp the .gn build file

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jason Macnak
6227db5ad8 Promote testing framework to a proper platform backend
... which helps to enable building a Gfxstream VK ICD which runs
the host server in-process and can be used for testing with
regular apps (so things outside of the End2End tests). This also
helps to minimize the amount of the things that the End2End tests
are configuring.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
C Stout
cecd8abbdd Exclude Android entry points on Fuchsia
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
C Stout
aa3fdb3ebf Fix dispatchable object layout on Fuchsia
Partial revert of 650c0c033aceede8f1eb6088c9fe7fbceba1c34b.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
07d7882a80 gfxstream: look for common/opengl headers
Probably "Make GL header lib and update libs to explicitly
depend on it" broke the meson build.

In file included from ../renderControl_enc/renderControl_types.h:19,
                 from ../renderControl_enc/renderControl_client_proc.h:8,
                 from ../renderControl_enc/renderControl_client_context.h:6,
                 from ../renderControl_enc/renderControl_enc.h:9,
                 from ../vulkan_enc/../OpenglSystemCommon/HostConnection.h:25,
                 from ../vulkan_enc/ResourceTracker.cpp:19:
../OpenglCodecCommon/glUtils.h:46:10: fatal error: GLES/gl.h: No such file or directory

Long term, we should nuke renderControl and GL dependencies through
compile options (GOLDFISH_NO_GL) for example.

     ninja -C amd64-build

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jason Macnak
ff6d914b9b Move info maps into ResourceTracker
... to avoid more globals.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
8a43302850 gfxstream: use standard Vulkan headers and new auto-gen flow
This modifies gfxstream to use standard Vulkan headers,
and updates to 1.3.269.

Previously, the headers were mostly standard, but added in
vk_android_native_buffer into vulkan_core.h.  That breaks down
when using auto-gen scripts from outside gfxstream, which will
happen in a subsequent patchset.

For vk_native_buffer_android, we can simply provide a
vk_android_native_buffer_gfxstream.h.

Long-term, vk_native_buffer_android.h should be deprecated in
favor of VK_ANDROID_external_memory_android_hardware_buffer, in
Android's libvulkan and elsewhere.

For the Vulkan headers, the new procedure is generate them in the
directions found here in the following repos:

https://github.com/KhronosGroup/Vulkan-Headers
https://github.com/KhronosGroup/Vulkan-Hpp

Those headers can be copied over using cp.  For gfxstream encoder
+ decoders, that's still generated via ./generate-gfxstream-vulkan.sh

The only catch is you must use the same vk.xml for Vulkan-Headers,
Vulkan-Hpp, and for the cereal generator.  The recommended flow
is use whatever the xml is in Vulkan-Headers ToT and copy to
Vulkan-Hpp and cerealgenerator.py before running those scripts.

The End2End tests that relied on vk_android_native_buffer were
also modified.  Long-term, the AHB extension could be used
instead of ANB for tests.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
c26f73317b gfxstream: add support for VK_KHR_maintenance5 + VK_EXT_host_image_copy
In newer versions of vk.xml, VK_EXT_host_image_copy also
provides vkGetImageSubresourceLayout2EXT.  Autogen for
VK_EXT_host_image_copy fails without VK_KHR_maintainance5.

For some reason, onGenCmd(..) for vkGetImageSubresourceLayout2EXT
is requires VK_EXT_host_image_copy.  This goes back into reg.py
in vulkan-docs.

Interestingly, the Android's libvulkan doesn't use
vkGetImageSubresourceLayout2EXT, nor does it check for
VK_EXT_image_compression_control before using it.

https://android-review.googlesource.com/c/platform/frameworks/native/+/2016419

Thus, we can have VK_EXT_host_image_copy provide the function.

Maybe we can revert this if the function isn't used by libvulkan
aswell.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
1b8e1d100e gfxstream: add generate-gfxstream-vulkan.sh
Simpler version of the generate-vulkan-sources.sh
script.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
3ec593d9cd gfxstream: vulkan-docs: don't auto-generate vk_android_native_buffer
We shouldn't autogenerate this header, since it's a forked header
specific to gfxstream.

Plus, this particular extension is disabled in the Vulkan anyways,
and used between Android libvulkan <--> ICD only.

We should just call it "vk_android_native_buffer_gfxstream.h" to
avoid namespace conflicts.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
c1887f0dbf gfxstream: genvk: add support for vk_gfxstream.xml
Custom XML file specific to gfxstream.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
f0fc91acff gfxstream: vulkan-docs: add cereal generator
This adds custom the cereal generator as an option to genvk.py
gfxstream specific options like "-registryGfxstream" are also
added.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
bd8eb080ff gfxstream: vulkan-docs: track feature type
The newest version of Vulkan docs doesn't have this, and it
needs to be patched in.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
82ff5f769f gfxstream: vulkan-Docs: import the cerealgenerator
This imports the cereal generator into the next gen
Vulkan docs.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
c10d78e61e gfxstream: import Vulkan-docs from 463f8c
This is based on 463f8c ("Change log for October
20, 2023 Vulkan 1.3.269 spec update").

Right now, the current version of vulkan-docs seems to
be 2021.  Need to update.  Import here without
modifications so we can track the changes that were
needed to support cereal.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
C Stout
21b028e0c9 Reapply "[guest] Check that the singleton VirtGpuDevice matches desired capset"
This reverts commit e5040938cd3947d0efaa287b2a509b879bee56bb.

Add special handling for kCapsetNone: return a device that was created
with any capset.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
b0d19974f5 Revert "[guest] Check that the singleton VirtGpuDevice matches desired capset"
This reverts commit e08334cde39bbb8142caf42e716a5e11f772ce1a.

Reason for revert: breaks dEQP testing b/309836674

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
C Stout
ade1fcea63 [guest] Check that the singleton VirtGpuDevice matches desired capset
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Yahan Zhou
822c88f173 VkImageCreateInfo should ignore queeu family indices in some situation
The spec says indices pointer should be ignored when sharingMode is not
VK_SHARING_MODE_CONCURRENT.

We need to explicitly set index count to 0 and index pointer to null,
otherwise encoder will still try to encode it.

Spec:

https://registry.khronos.org/vulkan/specs/1.3/html/vkspec.html#VUID-VkBufferCreateInfo-sharingMode-00913

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
00d26a31fa gfxstream/guest: pass through Android process names
This allows complex process names such as "com.android.systemui"
and "android.hardware.graphics.composer3-service.ranchu" to be
be the debug name via the virtio-gpu interface.

This uses the CONTEXT_INIT ioctl to pass through the name.  Due
to TASK_COMM_LEN and the fact we initialize many times using
"RenderThread", the process name wasn't always propagated through
before.

This is useful for debugging and a host composition flow as well.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Yahan Zhou
28d5e2d777 Fix dEQP-VK.wsi.android.maintenance1
- There is a bug in the wait implementation.
 - We should not send VK_IMAGE_LAYOUT_MAX_ENUM to host.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Yahan Zhou
c5a8e9bee4 Disable compatible handle types for semaphore timeline
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Andrew Woloszyn
66d9bf1a8c Fix for dynamic rendering.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Yahan Zhou
a43de793fc Parse more ext structs in vkAllocateMemory and vkCreateBuffer
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Yahan Zhou
ba5cb9b65c Create sync device before calling goldfish_sync_queue_work
dEQP-VK.wsi.android.maintenance1.* becomes flaky (instead of hard
failure) after the fix.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Andrew Woloszyn
1019e5d4d8 Added some fixes for zircon tests in the Android CTS.
We shouldn't have been trying to run the tests in the first place
but vkGetPhysicalDevice*Properties was returning true for these
handles even on Android.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Yahan Zhou
d9e47cb1e0 Add some vk 1.3 extension strings
Note: nVidia has a driver bug with vkGetPrivateData. But swiftshader
works fine.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
8d7e6cbf6e gfxstream: fix meson build system issues
- Fix aemu_logging pkg-config dependency after
  aosp/2754786

- Fix path to virtio-gpu-gfxstream-renderer.h after
  aosp/2755688

- Fix dependencies on <GL/gl.h> in both guest and host
  builds.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
df2b17c4b8 gfxstream: nuke ResourceTracker::Impl
The big giant Vulkan singleton might have an underlying
implementation.  However, it's unlikely we'll have more than
impl since it it's pretty giant.  Nuke ResourceTracker::Impl
to reduce the number of layers one must traverse to modify
things.

Since this was mega-change, clang-format was also applied.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
0e8582d6da Move SyncHelper to platform
... upcoming changes will add promote the emulated virtio gpu
stack as a proper platform backend which will include the
SyncHelper.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
f321c3e997 gfxstream: don't use renderControlEnc for Vulkan
Based on host caps.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
280eef5b65 gfxstream: simplify VK_HOST_CONNECTION macro
Try to do most of the work in SetupInstance.

     vulkaninfo Linux guest

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
22eba755ad gfxstream: nuke unused functions
These functions are unused.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
a026b5d20f gfxstream/guest: use GetRingParamsFromCapset
Use the previously mentioned GetRingParamsFromCapset function.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
13946ba27b gfxstream/guest: add GetRingParamsFromCapset function
Every capset provides ASG ring metadata.  Have a function for
that.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
7bfcb8d0e0 gfxstream: query non-Vulkan caps from the guest
In case the guest starts asking for them.  Will likely be added in
the future.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
a4ff4b058d gfxstream: gfxstreamCapset --> vulkanCapset
We couple everything as one giant gfxstream capset, and also have
a renderControl path for versioning.

Long term, it makes sense to nuke renderControl path (which controls
many legacy GLES bits) and rely on a virtgpu-style versioning scheme
[each context type gets it's one capset].

Some capability sets are experimental.  For example, GFXSTREAM_COMPOSER.
However, Fuchsia for example does rip out parts of HostConnection
and use in it's display controller.  Probably have a cross-platform
API that performs that functions would a long-term clean solution.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Joshua Duong
a5c7ce4dda For goldfish pipe, compute colorBufferMemoryIndex the same as host.
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Yahan Zhou
5856a73b99 Implement vkQueueSubmit2 in the same way as vkQueueSubmit
This commit rewrites vkQueueSubmit as a template so that the
implementation can be used by vkQueueSubmit and vkQueueSubmit2.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
89c74a010b Update VirtioGpuPipeStream to use VirtGpu abstraction
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
02283f7bf0 Wrap AHardwareBuffer_* interactions into Gralloc interface
... so that upcoming end2end tests can mock out AHBs.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
72d2f698fc Enable building guest Gfxstream components on host
... so that upcoming end2end tests can use the GL/VK ICDs.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
8d72255062 Update iostream namespace to gfxstream::guest
... to avoid conflicts with
hardware/google/gfxstream/include/render-utils/IOStream.h
when the guest is built for the host
for end2end tests.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
43732bb54c Update namespace in libandroidemu to gfxstream::guest
... to avoid conflicts when the guest is built for the host
for end2end tests.

In the future, the differences between libandroidemu and
hardware/google/aemu/base/ should be consolidated and there
should be a single shared library as there isn't really
anything guest/host specific about either of these copies.

      cvd start --gpu_mode=gfxstream_guest_angle_host_swiftshader

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
7acf5eaa88 Wrap interactions with sync fds in an interface
... so that upcoming end2end tests can set up a mock impl for
emulating sync fds in single process tests.

      cvd start --gpu_mode=gfxstream_guest_angle_host_swiftshader

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
fec8e296a3 Make VirtGpu* interfaces
... so that upcoming end2end tests can set up a mock impl that
interacts with the host within-process.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Yahan Zhou
a133a31a7b Add support for descriptor with inline uniform block
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Gurchetan Singh
985b412ece gfxstream: use ASG for Vulkan streams only
Audio glitches are observed with gfxstream GLES if ASG is used.
ASG is a Vulkan thing anyways, so use pipe steams for Ranchu
HWC or gfxstream GLES.

Note this caused clang-format to over-format in a few places.

     launch_cvd --gpu_mode=gfxstream_guest_angle

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Yahan Zhou
728fbfb62b Fix testAndroidBaselineProfile2021Support for host swiftshader
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:58 +00:00
Jason Macnak
c9ef93e498 Add error logging to aid debugging
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:57 +00:00
Yahan Zhou
a8f4a62650 Update vk.xml and code generator
This commit updates vk.xml and code generator to make them backward
compatible. The updates in code generator includes:

 1. Parse "protect" properly.
 2. Ignore "optional" if the "optional" was added in newer vk.xml.
    - This is done by having an extra table for related fields.
 3. Parse latexmath properly.
 4. Parse "supported" properly.
 5. Skip parameters and members if they are not for Vulkan API.
 6. VkNativeBufferANDROID diverged from upstream, keep the old one.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:57 +00:00
Gurchetan Singh
38673c5537 gfxstream-guest: add precise virtio-gpu capabilities
We need separate virtio-gpu capabilities for this features, for
separate versioning.  As of right now, versioning is done via
rcGetHostExtensionsString, which calls rcGetGLString host side.

We should probably aim for separate versioning for GLES, Vulkan,
Magma -- with the possibilty of a common decoder agnostic values
for ASG.

The benefit of the virtio-gpu capabilities is they are also cached
per VM instance, so probably a bit faster than the
rcGetHostExtensionsString method.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:57 +00:00
Gurchetan Singh
680820af95 gfxstream: fix Linux guest build
After the move, various fixes are needed.

- Need to re-order directories in top-level meson file
- Need to add certain include dirs
- Use internal Vulkan headers.  These unforunately define
  Android extensions even on Linux guests, so we need a
  (LINUX_GUEST_BUILD) guard until we can fix that.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:57 +00:00
Jason Macnak
66562d7c79 Move guest/shared/* to guest/*
python android/build/python/cmake.py --feature no-rust
      python android/build/python/cmake.py --feature no-rust --gfxstream

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:57 +00:00
Jason Macnak
a19ef0a2eb Move platform into guest
... as this is currently only used in the guest.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:57 +00:00
Jason Macnak
0fa40cfc7c Handle AHB and swapchain info in VkBindImageMemoryInfo
... in order to help handle deferred AHB binding.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Merged-In: I3d5e65be8331980ce544078f81f1937cfbcf520f
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:57 +00:00
Jason Macnak
9106e8c3c5 Rename imported system directory to guest
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:57 +00:00
Job Noorman
757d38a682 ir3/legalize: resolve WAR hazards for stc
Just like scalar ALU, stc writes to the local buffer and needs (ss) to
resolve WAR hazards on its sources.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31257>
2024-09-19 19:30:05 +00:00
Jose Maria Casanova Crespo
6c46890325 v3d: avoid load/store of tile buffer on invalidated framebuffer
With the information of the invalidated framebuffer we avoid the stores
of the results of tile buffer rendering that are not going to be used
again or the loads of the tile buffer when the buffer data can be ignored
as it would be never read.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30341>
2024-09-19 18:57:19 +00:00
José Roberto de Souza
89c6fa1883 anv: Fix condition to clear query pool with blorp
The comment above says it all, only when queue is not protected that
it is possible to clear query pool with blorp but it was checking
the opposite.

Fixes: d5b0526507 ("anv: propagate protected information for blorp operations")
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/31239>
2024-09-19 17:54:24 +00:00
José Roberto de Souza
0ced5663e2 anv: Improve readbility of khr_perf_query_availability_offset() and khr_perf_query_data_offset()
No changes in behavior expected here.

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/31239>
2024-09-19 17:54:24 +00:00
José Roberto de Souza
3d09ffde46 anv/query: Fix batch end value
This were not causing any issues but better set end to the correct
value.

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/31239>
2024-09-19 17:54:24 +00:00
José Roberto de Souza
ac95745dc4 anv: Add documentation to some fields in anv_query_pool
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/31239>
2024-09-19 17:54:24 +00:00
Georg Lehmann
96b9f695d4 aco/isel: use upper bound for v_mul_u32_u24
The optimizer can use this.

Foz-DB Navi31:
Totals from 577 (0.73% of 79395) affected shaders:
Instrs: 4209237 -> 4206859 (-0.06%); split: -0.06%, +0.00%
CodeSize: 21511192 -> 21511984 (+0.00%); split: -0.02%, +0.02%
SpillSGPRs: 679 -> 671 (-1.18%)
Latency: 28448559 -> 28443863 (-0.02%); split: -0.04%, +0.03%
InvThroughput: 5221932 -> 5218443 (-0.07%); split: -0.09%, +0.02%
Copies: 297965 -> 298076 (+0.04%); split: -0.01%, +0.05%
VALU: 2385304 -> 2383500 (-0.08%)
SALU: 485553 -> 485533 (-0.00%); split: -0.01%, +0.00%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31245>
2024-09-19 17:08:47 +00:00
Georg Lehmann
e1b280a85f aco: use ac_nir_opt_shared_append
Foz-DB Navi21:
Totals from 46 (0.06% of 79395) affected shaders:
Instrs: 85383 -> 84759 (-0.73%)
CodeSize: 449840 -> 447064 (-0.62%)
Latency: 570585 -> 566983 (-0.63%); split: -0.63%, +0.00%
InvThroughput: 133619 -> 132777 (-0.63%)
VClause: 1769 -> 1771 (+0.11%)
SClause: 2524 -> 2525 (+0.04%)
Copies: 6347 -> 6139 (-3.28%)
Branches: 4246 -> 4170 (-1.79%)
PreSGPRs: 2109 -> 2091 (-0.85%)
VALU: 50968 -> 50758 (-0.41%)
SALU: 14473 -> 14129 (-2.38%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31075>
2024-09-19 16:21:48 +00:00
Georg Lehmann
45e935800a aco: implement nir_shared_append/consume_amd
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31075>
2024-09-19 16:21:48 +00:00
Georg Lehmann
970503a0b9 aco/assembler: support ds_append/ds_*_addtid
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31075>
2024-09-19 16:21:48 +00:00
Georg Lehmann
2789cee0c0 amd/nir: add ac_nir_opt_shared_append
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31075>
2024-09-19 16:21:47 +00:00
Georg Lehmann
e0bcab953d nir: add amd shared append/consume
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31075>
2024-09-19 16:21:47 +00:00
Sergi Blanch Torne
213f5e9152 Uprev Piglit to e9ab30aeaed97b69868cf4d6d6a3f70f3b53c362
93b4bd2e0a...e9ab30aeae

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31058>
2024-09-19 15:41:32 +00:00
Mike Blumenkrantz
0a5d09eaba lavapipe: bump mipmapPrecisionBits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31254>
2024-09-19 14:22:25 +00:00
Samuel Pitoiset
822139aefa radv/ci: stop skipping dEQP-VK.api.command_buffers.many_indirect_disps_on_secondary
It no longer hangs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31247>
2024-09-19 13:53:08 +00:00
Mike Blumenkrantz
f57d8028bd egl/x11: fix dri3 connect conditional for kopper without modifiers
kopper_without_modifiers is set by dri2_load_driver(), which depends
on dri3_x11_connect(), so this flag can't be used here

this is just cosmetic and fixes error spam

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31255>
2024-09-19 13:00:59 +00:00
Eric Engestrom
b8782c783c intel/ci: track changes to the global driver *-skips.txt files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31253>
2024-09-19 12:20:36 +00:00
Eric Engestrom
905b660ed7 lavapipe/ci: track changes to the global driver *-skips.txt files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31253>
2024-09-19 12:20:36 +00:00
Eric Engestrom
282a94ad1e llvmpipe/ci: track changes to the global driver *-skips.txt files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31253>
2024-09-19 12:20:36 +00:00
Eric Engestrom
0b505e34c7 broadcom/ci: track changes to the global driver *-skips.txt files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31253>
2024-09-19 12:20:36 +00:00
Eric Engestrom
656ba4c6aa amd/ci: track changes to the global driver *-skips.txt files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31253>
2024-09-19 12:20:36 +00:00
Mike Blumenkrantz
8f482cc67c llvmpipe: bump max point size to 256
in theory this should be fine

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31233>
2024-09-19 11:10:21 +00:00
Mike Blumenkrantz
d6d33843d9 egl: replace fd check with swrast check for dri2
Fixes: 93aea6df07 ("egl/x11: replace DRI_DRI2 check with fd check")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31234>
2024-09-19 10:29:21 +00:00
Thomas Debesse
a8f95d9d06 meson: fix linking gallium with xcb-xfixes when using x11
Commit 8f6fca89aa from !30952 by @zmike
renamed with_dri3 as with_dri in many places, but mistakenly deleted it
there, instead of renaming it. This causes the linking of gallium to fail
because of missing xcb_xfixes_destroy_region symbol from xcb-fixes.

This is basically replaying commit cf17d62516
from !7164 by @duncan.hopkins but with the new syntax.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31246>
2024-09-19 09:51:02 +00:00
Lucas Fryzek
32af15384d egl/dri/wl: Move swrast damage region from put to swap
Pass application provided damage region to the compositor instead
of damaging the entire display. This also gives us the possibility
in the future to have put image only copy the parts of the framebuffer
that were modified.

Fixes: fa465e34ca
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31210>
2024-09-19 09:00:33 +00:00
Lucas Fryzek
755e795e4c drisw: Copy entire buffer ignoring damage regions
swapping buffers with damage is supposed to swap the entire buffer
and only pass the damage region as a hint to compositor as to what
updated. This change forces drisw to copy the entire buffer as there
is no method right now to check what was updated.

Fixes: cda627eb48
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31210>
2024-09-19 09:00:32 +00:00
Konstantin Seurer
60c53f5e63 radv: Initialize sqtt state before meta state
Sqtt needs to be initialized before BVH build pipelines are compiled to
avoid crashes on startup.

Fixes: 5fa22f9 ("radv: regroup all tools initialization in one helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31207>
2024-09-19 08:27:08 +00:00
Samuel Pitoiset
28ed064a01 amd/addrlib: remove bogus assert in HwlComputeSlicePipeBankXor()
For some reasons, this triggers only on VanGogh with some tests that
copy layered BCn images but they all pass in release build.

Suggested-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31226>
2024-09-19 07:52:36 +00:00
Samuel Pitoiset
1d7b7b36a8 radv: stop reporting VKCTS conformance on GFX11+
Only GFX10.3 is conformant against VKCTS 1.3.x but we never submitted
any packages for GFX11+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31219>
2024-09-19 07:14:22 +00:00
Valentine Burley
6485a2d1fa freedreno/ci: Uprev kernel for a630 runner
Uprev the kernel for the a630_vk_full manual job to avoid some hangs.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31237>
2024-09-19 06:34:46 +00:00
K900
395cd8643f meson/gbm: fix meson devenv for GBM backends
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31223>
2024-09-19 05:06:50 +00:00
K900
41e83b243c meson: remove dri-search-path
It's not actually used anywhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31223>
2024-09-19 05:06:50 +00:00
K900
03a4e857fd meson/gbm: clean up dependencies
- move everything that's actually only used by the DRI backend to the backend
- remove some things that aren't used at all

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31223>
2024-09-19 05:06:50 +00:00
K900
3f2e831446 meson: require libdrm when building gbm
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31223>
2024-09-19 05:06:50 +00:00
David Heidelberg
f044756732 ci/freedreno: mark a530_piglit as postmerge job
Fixes: dfc4a68b0a ("ci/freedreno: re-enable piglit tests for Adreno 530 in nightly runs")
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31244>
2024-09-19 12:35:47 +09:00
Lionel Landwerlin
ed64eccab0 brw: fix virtual register splitting to not go below physical register size
Otherwise we can end up generating invalid assembly not following
destination/source alignments requirements.

Fixes the following tests:

dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_4.tan_frag
dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_2.tan_frag
dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_1.tan_frag
dEQP-VK.spirv_assembly.instruction.graphics.float16.arithmetic_3.tan_frag

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31206>
2024-09-18 23:26:34 +00:00
Aleksi Sapon
6967f59906 wsi: Fix Metal WSI CAMetalDrawable leak
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31238>
2024-09-18 22:55:28 +00:00
Mike Blumenkrantz
55260d7729 lavapipe: VK_KHR_global_priority
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31232>
2024-09-18 22:32:20 +00:00
Mike Blumenkrantz
0c33257251 lavapipe: VK_EXT_pipeline_protected_access
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31232>
2024-09-18 22:32:20 +00:00
Eric Engestrom
5378bdc5fd docs: add sha sum for 24.2.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31236>
2024-09-18 22:25:17 +00:00
Eric Engestrom
45cf19f0f0 docs: update calendar for 24.2.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31236>
2024-09-18 22:25:17 +00:00
Eric Engestrom
2a6e0e45cd docs: add release notes for 24.2.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31236>
2024-09-18 22:25:17 +00:00
Georg Lehmann
bc3b8c3a13 radv: advertise VK_KHR_shader_float_controls2
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
2024-09-18 20:46:17 +00:00
Georg Lehmann
b20d793774 aco/tests: fix omod signed zero tests
If we keep denorms, omod won't be used no matter what.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
2024-09-18 20:46:17 +00:00
Georg Lehmann
27cf11dc8a aco: remove per block inf/nan/sz control
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
2024-09-18 20:46:17 +00:00
Georg Lehmann
f1a09d1f40 aco/optimizer: use new per definition float control flags
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
2024-09-18 20:46:17 +00:00
Georg Lehmann
5c3ea47793 aco/tests: use new float control flags
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
2024-09-18 20:46:17 +00:00
Georg Lehmann
9850f759dd aco/isel: set per instruction float control modes
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
2024-09-18 20:46:17 +00:00
Georg Lehmann
9f1ad7d2f3 aco/vn: handle sz/inf/nan preserve
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
2024-09-18 20:46:17 +00:00
Georg Lehmann
8912f16464 aco/ir: add float control definition flags
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
2024-09-18 20:46:17 +00:00
Georg Lehmann
fc4b23130c aco/isel: add function to create builder for alu
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31172>
2024-09-18 20:46:17 +00:00
Dylan Baker
ec66109c1d intel/perf: delete dead code.
The inner loop with p is dead, because n_passes_written is no longer
updated as of 56bd81ee21, so it is always
comparing a uint32_t < 0, which is never true. Since the inner loop is
dead code, the pass array is dead code, as it simply keeps writing to
element 0, and but never reads or uses it, along with all of the pass
count information.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31213>
2024-09-18 19:56:04 +00:00
Eric Engestrom
96a9ea57d9 zink+nvk/ci: add flakes seen recently
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31231>
2024-09-18 19:26:13 +00:00
Eric Engestrom
258768b41e zink+nvk/ci: mark test as fixed
Fixed by a commit in the range d3429a7e...5b7e4f6a

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31231>
2024-09-18 19:26:13 +00:00
Erik Faye-Lund
cdef6cfa8c panvk: error-check get_fb_descs calls
These calls were missing error-handling, but all the pieces to do so are
already in place. Let's report the errors as appropriate.

Fixes: 5544d39f44 ("panvk: Add a CSF backend for panvk_queue/cmd_buffer")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31216>
2024-09-18 18:53:25 +00:00
Erik Faye-Lund
1cc4a23a46 panvk: drop unused define
This is unused since ac34183ec3 ("panvk: Move the VkPhysicalDevice logic
to panvk_physical_device.{c,h}"), let's remove the define.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31216>
2024-09-18 18:53:25 +00:00
Erik Faye-Lund
bd18ea5fcb panvk: remove out-of-date detail
This is no longer r62, it's r90. But we don't need to be explicit about
it, so let's be a bit more vague in the comment here.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31216>
2024-09-18 18:53:25 +00:00
Aleksi Sapon
a42c2293ab wsi: Metal support
Lavapipe can render to a Metal surface now.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31208>
2024-09-18 17:54:02 +00:00
Lars-Ivar Hesselberg Simonsen
d63da63f3f panvk: Fix use of cs_sync64_wait in cmd_wait_event
The sync objects used by events are of type panvk_cs_sync32, making this
mismatch hit an assert in cs_to_reg_tuple.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11886
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31221>
2024-09-18 17:08:48 +00:00
Boris Brezillon
8f053e10de panvk/csf: Unconditionally clean L2 and LS caches when closing a CS
We need a clean because descriptor/CS memory can be returned to the
command pool where they get recycled. If we don't clean dirty cache
lines, those cache lines might get evicted asynchronously and their
content pushed back to main memory after the CPU has written new stuff
there.

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>
Tested-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/31225>
2024-09-18 16:34:54 +00:00
José Roberto de Souza
dec5a624e9 anv: Check if vkCreateQueryPool() is being created in a supported queue
Turns out not even VK CTS was calling
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR()
to check if queue supports query.
So here adding a explicity check in our implementation of
vkCreateQueryPool().

https://github.com/KhronosGroup/VK-GL-CTS/pull/482

Cc: 24.2 <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/30652>
2024-09-18 15:29:16 +00:00
José Roberto de Souza
141e7eaca7 anv: Make sure all previous vm binds are done before execute perf query pool
The query pool batch buffer or other bos could not be bound when
exec starts.

Cc: 24.2 <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/30652>
2024-09-18 15:29:16 +00:00
José Roberto de Souza
0a19d92ca5 anv: Add warning about mismatch between query queues
Cc: 24.2 <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/30652>
2024-09-18 15:29:16 +00:00
José Roberto de Souza
c5d79d533a anv: Fix context id or exec queue used to open perf stream
It was always using device->context_id what is not valid in i915 when
has_vm_control is true or when running with Xe KMD.

But anv_AcquireProfilingLockKHR() don't have the queue information so
at least for now we will only support queries in a single queue.

And for consistency doing the same in
anv_QueueSetPerformanceConfigurationINTEL() although here we have the
queue parameter but queries are only supported in render engine
so it would only expose other queues if user set some parameters.

Cc: 24.2 <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/30652>
2024-09-18 15:29:16 +00:00
Boris Brezillon
c97f79ac0c pan/va: Optimize SSBO lowering on Valhall
For reads, we use the LD_PKA (AKA LD_BUFFER) so we can directly
pass the buffer index. For writes, we still convert the SSBO index
into a global address before doing a global load/store/atomic
operation, but we do that with an LEA_PKA instruction that takes
care of bounds checking.

Signed-off-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/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
3be204afbb panfrost: Pass the architecture to panfrost_nir_lower_sysvals()
pan_nir_lower_sysvals.c is not a per-gen file. Pass the architecture
to panfrost_nir_lower_sysvals() to replace the existing #if PAN_ARCH <= 9
section.

Fixes: 9d981a4c5b ("panfrost: properly lower DrawID sysval on v9")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
eeb3512498 nir/lower_ssbo: Extend the load_ssbo_address intrinsic to pass an offset
On Mali(Valhall), the bounds checking can be done when in hardware, but
for this to work properly, we need to pass the offset to the
nir_load_ssbo_address() intrinsic.

Add an offset source to the intrinsic, and adjust the lowering pass
to conditionally lower the offset addition.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
adadb097a3 nir/lower_ssbo: Add an option to conditionally lower loads
On Mali(Valhall), we have a way to load SSBO data without going through
an SSBO index -> global address translation, so let's provide a way
to tell nir_lower_ssbo() when it shouldn't lower loads.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
bd3ed09bb7 panfrost: Emit an SSBO table on v9+
If we want to be able to replace the SW-based <SSBO,offset> -> global
address logic by something that uses LEA_PKA to do the bounds check,
we need to emit the SSBO table and lower SSBO indices like we do
for other resources.

This should stay unused until we toggle the native SSBO switch.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164>
2024-09-18 13:45:57 +00:00
Mary Guillemard
431c1d77d6 pan/va: Define the LEA_BUFFER instruction
Will be used for SSBO loads/stores on Valhall.

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/31164>
2024-09-18 13:45:57 +00:00
Boris Brezillon
339a136ce7 panvk: Fix valhall_pack_buf_idx() for SSBO store/atomic operations
We're not patching indices of store/atomic operations, which trips out
nir_lower_ssbo().

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31164
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/31164>
2024-09-18 13:45:57 +00:00
Mike Blumenkrantz
bb47308264 docs: OVR_multiview features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Mike Blumenkrantz
dbf9b9ee6b zink: support OVR_multiview2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Mike Blumenkrantz
3b99f9bc0e mesa: support OVR_multiview2
this reuses the same pipe cap to indicate that
both extensions are supported

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Mike Blumenkrantz
1491ce46e4 zink: support GL_OVR_multiview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Mike Blumenkrantz
5c5763f6a8 gallium: add PIPE_CAP_MULTIVIEW
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Marek Olšák
328c29d600 mesa,glsl,gallium: add GL_OVR_multiview
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31128>
2024-09-18 13:07:41 +00:00
Samuel Pitoiset
a5a2f82149 radv/ci: stop skipping few tests that hang only with LLVM
LLVM testing in CI is useless and these tests shouldn't be skipped
for ACO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31217>
2024-09-18 10:11:26 +00:00
Juan A. Suarez Romero
bbe23f2bc1 v3d/ci: add new flake for rpi5
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31220>
2024-09-18 09:44:12 +00:00
Lars-Ivar Hesselberg Simonsen
589a7ac5a2 panvk: Fix paths that assume a fragment shader
A few places in PanVK assumes the fragment shader pointer is nonzero,
which is not true for some VulkanCTS tests (*nocolor*), causing
segfaults when dereferencing the pointer.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11881
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31203>
2024-09-18 08:37:55 +00:00
Samuel Pitoiset
71e9572e72 radv: update the stencil layout for DRLR feedback loops
HTILE decompresses both aspects.

Fixes: 3af0f0129c ("radv: fix DRLR with subpass input attachments and feedback loops")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31200>
2024-09-18 08:05:32 +00:00
Samuel Pitoiset
231688ad57 radv: add missing cache flushes for DRLR feedback loops
We should make sure the attachment is readable after the transition.

Fixes: 3af0f0129c ("radv: fix DRLR with subpass input attachments and feedback loops")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31200>
2024-09-18 08:05:32 +00:00
Samuel Pitoiset
ad3e6bb06a radv: fix lowering VS inputs when offset >= stride on GFX6-7
This was supposed to be >=.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31209>
2024-09-18 07:21:28 +00:00
Samuel Pitoiset
15b1790a1e radv,aco: fix legacy vertex attributes when offset >= stride on GFX6-7
The indexing needs to be adjusted and the best solution seems to
use soffset instead of const_offset, it's simpler and generate less
prologs than passing the vertex binding strides to the prolog.

Fixes dEQP-VK.pipeline.*.vertex_input.legacy_vertex_attributes.*stride_1*.

Fixes: 38cbc3c605 ("radv: advertise VK_EXT_legacy_vertex_attributes")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31209>
2024-09-18 07:21:28 +00:00
Christian Gmeiner
b11296bd3e broadcom/simulator: Add support for asahi based systems
Dumb buffers do not work with the asahi kernel driver. So use asahi ioctl to create
proper buffers.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31169>
2024-09-18 06:48:17 +00:00
K900
514df444eb gbm: split the DRI backend into a separate library and unify backend handling
This does a few things:
1. Applications linked against a non-matching GBM can load the right version of the backend
   from the environment, avoiding GBM/Mesa version mismatches in many cases
2. Distros that want to split off libgbm into a separate package from the actual drivers
   get to not ship 40MB of libgallium_dri
3. The loader logic becomes way less complex

See also: https://github.com/NixOS/nixpkgs/pull/338109 for original rationale.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31074>
2024-09-17 22:17:10 +00:00
Dylan Baker
67bcdbf4a1 hasvk: remove useless uint >= 0 check
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31214>
2024-09-17 21:16:36 +00:00
Dylan Baker
27dd9fd677 anv: remove useless uint >= 0 check
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31214>
2024-09-17 21:16:36 +00:00
Marek Olšák
31a6a96370 radeonsi: merge the CB/DB conditional blocks in gfx10_emit_barrier
They use the same condition.

This also skips CS_PARTIAL_FLUSH when CB/DB is flushed because that also
waits for compute shaders.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
0e1b7aa8cb radeonsi: deduplicate how GLM flush flags are set for gfx10-11
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
3794496994 radeonsi: skip CB_META/DB_META events when they are redundant on gfx10-11
If we use CACHE_FLUSH_AND_INV_TS_EVENT, then DB_META and CB_META events
are redundant.

So determine the event first, and then determine whether to flush
DB/CB_META.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
2642d93ddd radeonsi: remove an obsolete comment about SMEM stores
We don't use SMEM store instructions (only supported by gfx10).

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
0adea53a6a radeonsi: consolidate code around unsetting barrier_flags in emit_barrier
Some of this code was duplicated and prepare_cb_db_flushes was called
in the wrong place in gfx6_emit_barrier where it didn't do anything.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
ce72376641 radeonsi: rename SI_CONTEXT_* flags to SI_BARRIER_* flags
some of the definition names are changed completely

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
6f25ace87e radeonsi: add si_fb_barrier_before_rendering
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
0be3900b8d radeonsi: move DB synchronization into si_fb_barrier_after_rendering
Now these workarounds are applied everywhere.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
75d98f1db4 radeonsi: move CB synchronization into si_fb_barrier_after_rendering
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
dad0e0131b radeonsi: restructure fb_barrier code in si_launch_grid
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
895226e3ab radeonsi: move initial framebuffer barrier code into si_barrier.c
The new function si_fb_barrier_after_rendering will flag cache flushes and
waits in future commits. This is the beginning of unifying all framebuffer
barrier code.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
834aa812ea radeonsi: rename si_context::flags -> barrier_flags
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
ba53b57731 radeonsi: rewrite si_memory_barrier to generate fewer barrier flags
This is more optimal.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
03aec81290 radeonsi: check sctx->flags inside si_emit_barrier_direct
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
7cc2fee378 radeonsi: rename TC_L2_dirty -> L2_cache_dirty
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
0f063ed1e7 radeonsi: update remaining comments related to the L2 cache, use "L2", not "TC"
"GL2" is also OK. "TC-compatible" is also OK.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
311fafccef radeonsi: move most barrier code into a new file si_barrier.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
dac99e75af radeonsi: rename "cache_flush" -> "barrier"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
214b4a119d radeonsi: remove unused buffer_subdata fallback from si_clear_buffer
It's never used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
e1cfac91eb radeonsi: remove SI_CP_DMA_CLEAR_METHOD, call si_cp_dma_clear_buffer directly
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
47f6e05c6a radeonsi: replace SI_OP_CS_RENDER_COND_ENABLE with bool render_condition_enable
and the parameter is moved to the end in some cases, or second from the end.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
fc489d1855 radeonsi: enable conditional rendering for si_compute_shorten_ubyte_buffer
If the draw is conditional, the lowering should also be conditional.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
df6b5e3c05 radeonsi: remove unused flags and user_flags params from clear/copy functions
Remove the params from these:
- si_copy_buffer
- si_cp_dma_prepare
- si_cp_dma_clear_buffer
- si_cp_dma_realign_engine
- si_cp_dma_copy_buffer

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
2f4a9e65a7 radeonsi: change the flags parameter of si_compute_blit to bool fail_if_slow
That's the only flag we pass to it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
7432d2f19c radeonsi: remove SI_OP_SYNC_BEFORE* flags
We always pass SI_OP_SYNC_BEFORE to barriers, which makes it redundant.
If we don't want to sync "before", we just won't call
si_barrier_before_internal_op.

This makes the flags parameter unused in si_barrier_before_internal_op.
It might be used for something else in the future. All places now pass 0
to it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
0923bd1c5f radeonsi: remove unused SI_OP_IS_NESTED
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
c2d8cba0b4 radeonsi: always wait for idle before get_query_result_resource
The shader busy-waits until the query results are written, but that only
synchronizes for src. The destination buffer might also be used by previous
shaders, so we should wait until all shaders are idle. This might fix some
issues.

The missing si_mark_atom_dirty fix should have no effect, but all flags
changes should call it to be consistent.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
e8b474c921 radeonsi: always pass flags=0 into si_barrier_after_internal_op/simple_buffer_op
because the parameter is unused. It might be used differently in the future.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
eb6c098cd1 radeonsi: remove SI_OP_SYNC_AFTER
All places that call si_barrier_after_internal_op also set SI_OP_SYNC_AFTER,
so we can do the sync unconditionally.

If we want to skip the "after" sync in the future, we just won't call
si_barrier_after_internal_op.

CP DMA is the only one that will sync even without
si_barrier_after_internal_op, but CP DMA ops are usually small and almost
never used on GFX10+.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
d225fb3025 radeonsi: remove SI_OP_SKIP_CACHE_INV_BEFORE
The only remaining use had no effect because it doesn't call
si_barrier_before_internal_op at all and instead implements its own
barrier.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
67593f0c51 radeonsi: move barriers out of si_compute_shorten_ubyte_buffer
It turns out the barrier "before" didn't do anything.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
e805c35986 radeonsi: move barriers out of si_copy_buffer
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:58 +00:00
Marek Olšák
1ee394c34d radeonsi: move barriers out of si_clear_buffer
Some places need no barriers, while other places only need the barrier
after.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:57 +00:00
Marek Olšák
80a6f568e2 radeonsi: move barriers out of si_compute_clear_copy_buffer & si_cp_dma_*
Some places don't need si_barrier_before_simple_buffer_op.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:57 +00:00
Marek Olšák
5d607348a3 radeonsi: add barrier helpers for simple internal buffer ops
These just take dst and src parameters instead of lists of buffers and
images.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:57 +00:00
Marek Olšák
999b254ca8 radeonsi: remove unnecessary barriers from clear_buffer_rmw and clear_dcc_msaa
These didn't do anything because the caller implements its own barriers.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:57 +00:00
Marek Olšák
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/31193>
2024-09-17 20:44:57 +00:00
Marek Olšák
7d55f4d6d2 radeonsi: inline si_launch_grid_internal_images without the barriers
It has only one use. The barriers didn't do anything because the caller
doesn't set any flags and implements its own barrier.

This is part of trying to push the barrier logic outside the functions
that implement internal ops.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:57 +00:00
Marek Olšák
35727d2e9c radeonsi: remove SI_OP_CS_IMAGE
it's redundant now

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:57 +00:00
Marek Olšák
58d22e41af radeonsi: fix broken tessellation in Unigine Heaven
Test suites even with AMD_DEBUG=mono didn't catch this.

Fixes: b7136d0890 - radeonsi: pass TCS inputs_read mask to LS output lowering on GFX9 + monolithic

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
2024-09-17 20:44:57 +00:00
Georg Lehmann
a3d6a770c0 nir/instr_set: fix fp_fast_math
We can't just ignore the flags of the match, we need the union.

Fixes: 666647acae ("nir: track some float controls bits per instruction")

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31195>
2024-09-17 20:00:03 +00:00
Marek Olšák
0d8fe2d03b ac/nir/meta: tune clear/copy_buffer performance for gfx6-10.3
Finally, old GPUs have optimal clear/copy_buffer performance, but only
the top dGPU of each generation gets the best behavior.

Other dGPUs might need slightly different conditions.
APUs likely need very different conditions.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31082>
2024-09-17 15:19:32 -04:00
Marek Olšák
34bd8427f8 radeonsi/gfx12: fix shader uploads via CP DMA
It was incorrectly assumed that CP DMA is never used.

Fixes: c90d4e0d57 - radeonsi/gfx12: remove CP DMA workarounds because CP DMA is never used on gfx12

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31082>
2024-09-17 15:19:30 -04:00
Marek Olšák
e0f8993336 radeonsi: fix waiting for PS to finish if there are no CB/DB bindings on gfx6-8
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31082>
2024-09-17 15:19:26 -04:00
Pavel Ondračka
495e88eab5 r300: move HyperZ blacklist to driconf
Framework mostly copied from radeonsi...

The only change is the firefox override, which was not working anyway,
since firefox seems to no longer load mesa in the main process, so just
remove 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/30860>
2024-09-17 15:43:08 +00:00
David Rosca
009017c33c radeonsi: Disable EFC on VCN 2.2
VCN 2.2 doesn't support EFC.

Cc: mesa-stable

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31198>
2024-09-17 14:51:03 +00:00
Lionel Landwerlin
45377dc5c4 brw: fix vecN rebuilds
When loading a 64bit address from the push constants, we'll load a
vec2, so we need to allocate 2 GRFs and MOV each component.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11831
Fixes: 339630ab05 ("brw: enable A64 loads source rematerialization")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31010>
2024-09-17 14:22:23 +00:00
Lionel Landwerlin
c16b27f66f brw: use a builder of the size of the physical register for uniforms
Should avoid any partial write non-sense on Xe2+.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 339630ab05 ("brw: enable A64 loads source rematerialization")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31010>
2024-09-17 14:22:23 +00:00
Mike Blumenkrantz
31168bdbaa va/vl: add kopper support
requires LIBVA_DRIVER_NAME=zink

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30984>
2024-09-17 13:45:38 +00:00
Mike Blumenkrantz
55341689c8 vl/winsys: move dri3_get_screen_for_root to common
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30984>
2024-09-17 13:45:38 +00:00
Mike Blumenkrantz
3d79e51726 va: flush_resource before presentation
drivers require this to ensure presentation resources are present-able

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30984>
2024-09-17 13:45:38 +00:00
Boris Brezillon
b40ec57e36 panvk: Temporarily disable VK_FORMAT_D32_SFLOAT_S8_UINT on Valhall
Valhall doesn't support interleaved D32_S8X24 so let's not advertise
this format for now. Ultimately, we want to support it as a
multi-plane D32 + S8 format, and we probably want to switch Bifrost
to this layout too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Tested-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Tested-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31165>
2024-09-17 13:13:58 +00:00
Boris Brezillon
7dc350ad76 pan/va: Accept DIM_SUBPASS[_MS] in valhall_tex_dimension()
We don't merge subpasses, so we can't turn subpass attachment
loads into tile buffer reads yet. Let's just treat those as
regular 2D textures for now (as we do on Bifrost).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11875
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Tested-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/31166>
2024-09-17 12:51:27 +00:00
Lionel Landwerlin
0f6fa4679d clc: find opencl headers from the installed llvm/clang location
A number of people report the headers not being found when running
intel-clc. I've run into the same issue but only on the most recent
Ubuntu version.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30711>
2024-09-17 14:29:19 +03:00
Tapani Pälli
0e02de5a50 iris: fix issues with memory object updates via glBufferSubData
Disable aysnc mapping in case we are updating a external memobj.

Fixes following Piglit tests:
   spec@ext_external_objects@vk-pix-buf-update-errors
   spec@ext_external_objects@vk-vert-buf-update-errors

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/29303>
2024-09-17 10:06:58 +00:00
Lionel Landwerlin
02b124846f brw: fix TGM messages to use cmask lsc opcodes
This is a restriction for TGM.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b55f7716 ("intel/brw: Switch to emitting MEMORY_*_LOGICAL opcodes")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31199>
2024-09-17 09:28:58 +00:00
Lionel Landwerlin
2159e17da0 brw: remove (load|store)_raw_intel
Those are Elk specific intrinsics.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b8f264cfe4 ("intel/brw: Handle load/stores in lsc_op_for_nir_intrinsic()")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31199>
2024-09-17 09:28:58 +00:00
Pavel Ondračka
b3b09db951 r300/ci: update fails list with a recent fix
Since the atan NIR improvements in 8579375777 we can now fit into
the cruel 64 ALU instruction limit on RV370.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31197>
2024-09-17 09:03:09 +00:00
Samuel Pitoiset
656d7e887a radv: fix lowering the view index to an input varying for FS
When multiview is used and the FS is compiled separately with GPL, the
view index still needs to be lowered, otherwise it's crashing later.

The lowering doesn't need to know the previous stage because ViewIndex
is a global thing (ie. it's neither a per-vertex or a per-primitive
varying).

This fixes recent
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.other.view_index_from_device_index_*_pre_rasterization

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31192>
2024-09-17 06:36:08 +00:00
Samuel Pitoiset
fb3b563d1f radv: enable more properties with VK_KHR_maintenance5
They are all supported by the hw and this matches AMD drivers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31129>
2024-09-17 06:10:54 +00:00
Jesse Natalie
5b7e4f6ae7 driconf: Disable dzn for bg3.exe
The app selects dzn over native drivers in some instances and dzn
doesn't handle this app (yet), so disable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31157>
2024-09-17 00:12:22 +00:00
Jesse Natalie
28db11d2f3 winsys/d3d12: Implement the latency control option
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31157>
2024-09-17 00:12:22 +00:00
Jesse Natalie
e9ce526714 wgl: Add driconf options for controlling latency and swap interval
Latency is hooked up to a new winsys framebuffer interface method. Swap
interval replaces the previous environment variable. This does make the
environment variable lowercase but that seems worth the break to be able
to set it from driconf.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31157>
2024-09-17 00:12:22 +00:00
Jesse Natalie
64885821c2 winsys/d3d12: Use the waitable object to decrease latency
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31157>
2024-09-17 00:12:22 +00:00
Dylan Baker
2b8a980240 util/fossilize_db: don't use check_files_opened_successfully for foz_prepare
The check function will free the db or the file if the other is NULL,
however, in this case db and the file are passed to foz_destroy, which
will also free them. This results in a double free. Instead, check that
either is NULL, and then goto the error case to ensure proper cleanup.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29881>
2024-09-16 23:32:56 +00:00
Faith Ekstrand
112481d576 nil: Assert array_len == 0 in Extent4D<Bytes>::size_B()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31191>
2024-09-16 21:51:29 +00:00
Faith Ekstrand
7527b22fd6 nil: Return a more accurate size in level_size_B
This gives us the tightest bounds we can while still taking into account
all of the array and other strides.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31191>
2024-09-16 21:51:29 +00:00
Faith Ekstrand
1a50108e52 nil: Rework calculations of the sizes of miplevels
What we actually want here is the size of the 1/2/3D part of the level,
not the array part.  This means a little more code duplication but the
result is also way more clear.  This shouldn't be a functional change as
Extent4D<units::Bytes>::size_B() doesn't take array_len into account.

This means we no longer call Image::level_size_B() for layout. Instead,
Image::level_size_B() should mirror this code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31191>
2024-09-16 21:51:29 +00:00
Dylan Baker
99f1b7d732 compiler/glsl: explicitly delete copy constructor and copy-assign
Most of our visitors have custom destructors because they wrap C types,
and need to manually call destructors for those types. Because of this,
the implicitly generated copy constructors and copy-assignment operators
are not safe due copying pointers rather than data. Since we don't need
these features just delete them, so any attempt to use them would be a
compilation error. This doesn't fix any existing issue except stopping
coverity from complaining, but it does prevent new issues in the future.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29662>
2024-09-16 21:08:04 +00:00
Dylan Baker
3f3cb1e2fa intel/elk: delete copy constructor and copy-assignment-operator
To keep the rule-of-three. This points out that the implicit copy
operations would be dangerous when there is an explicit constructor and
destructor, since the class is holding un-managed memory.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29667>
2024-09-16 20:31:45 +00:00
Dylan Baker
5809209316 anv: enforce state->cmd_buffer is never null in emit_Simpler_shader_init_fragment
We have a couple of checks where we allow this to be NULL, but later we
unconditionally and unavoidably dereference the pointer, which means
there's no way that it ever could have been NULL. Change the assert at
the top to not allow NULL, and remove checks for it being NULL

CID: 1616544
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31156>
2024-09-16 19:16:58 +00:00
Dylan Baker
5ebdfc8813 anv: assert we don't write past the end of an array
Our array has a fixed size of 32, and we know at the start of the block
that our type_count is < 32, but in the loop we grow the block, in
theory up to 31 times. Coverity notes that, and points out we could
write off the end of the array. Add an assert in the loop to ensure we
don't, and to help Coverity out.

CID: 1615171
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31173>
2024-09-16 17:42:40 +00:00
Dylan Baker
7556521417 intel: replace (uint64_t - uint64_t) > 0 with uint64_t > uint64_t
As coverity points out, if the second uint64_t was greater than the
first (I don't think it actually can be), then the overflow would result
in the check succeeding when it shouldn't. We could cast this to an
integer type, but since we have uint64_t, we'd need int128_t for that.
Instead, replace the comparison to 0 with a direct comparison, since
that would give the correct result without potential to overflow.

CID: 1604833
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31175>
2024-09-16 17:12:17 +00:00
David Heidelberg
dfc4a68b0a ci/freedreno: re-enable piglit tests for Adreno 530 in nightly runs
Also, document recent Adreno 530 improvements and failures.

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31183>
2024-09-16 16:30:33 +00:00
Rohan Garg
8b272c8d8c docs: update feature matrix for VK_KHR_shader_relaxed_extended_instruction
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30791>
2024-09-16 15:58:35 +00:00
Rohan Garg
854865a059 lvp: enable VK_KHR_shader_relaxed_extended_instruction
The extension only affects non semantic instructions that need no
handling in the backend compiler.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30791>
2024-09-16 15:58:35 +00:00
Rohan Garg
97f41bc819 v3dv: enable VK_KHR_shader_relaxed_extended_instruction
The extension only affects non semantic instructions that need no
handling in the backend compiler.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30791>
2024-09-16 15:58:35 +00:00
Rohan Garg
a03b307eea tu: enable VK_KHR_shader_relaxed_extended_instruction
The extension only affects non semantic instructions that need no
handling in the backend compiler.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Connor Abbott <cwabbott0@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30791>
2024-09-16 15:58:35 +00:00
Rohan Garg
85b8579bf6 radv: enable VK_KHR_shader_relaxed_extended_instruction
The extension only affects non semantic instructions that need no
handling in the backend compiler.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30791>
2024-09-16 15:58:35 +00:00
Rohan Garg
630656827f nvk: enable VK_KHR_shader_relaxed_extended_instruction
The extension only affects non semantic instructions that need no
handling in the backend compiler.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30791>
2024-09-16 15:58:35 +00:00
Rohan Garg
2a4fbce27a hk: enable VK_KHR_shader_relaxed_extended_instruction
The extension only affects non semantic instructions that need no
handling in the backend compiler.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30791>
2024-09-16 15:58:35 +00:00
Rohan Garg
daea7e1651 intel/compiler: use the correct cache enum for loads and stores
Fixes: 74efde7 ('intel/brw/xehp+: Drop redundant arguments of lsc_msg_desc*()')

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/30742>
2024-09-16 15:18:31 +00:00
Rohan Garg
b99fd944e8 intel/compiler: version can never be above 11 due to the previous check
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/30742>
2024-09-16 15:18:31 +00:00
Samuel Pitoiset
32567f6a2a radv: compute shader hash for shaders created without internal cache
VK_KHR_pipeline_binary allows the application to take full control on
the cache and internal caches (disk or in-memory) can be disabled.

Though the shader hash should still be computed, otherwise all pipeline
binaries have a key with all zeroes.

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/31163>
2024-09-16 13:53:36 +00:00
Samuel Pitoiset
ad68c83f92 radv: fix copying the pipeline binary key
Only the first byte was copied.

Fixes: be06bfcbed ("radv: add initial support for pipeline binaries")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31163>
2024-09-16 13:53:36 +00:00
Samuel Pitoiset
f88cf56087 radv/rt: skip shaders cache for pipelines created with the capture/replay flag
Otherwise, if a pipeline is found in cache it will use a different
shader arena for allocation and the capture replay shader group handles
won't match.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31188>
2024-09-16 12:29:49 +00:00
Hans-Kristian Arntzen
f3c6bbdd8d radv: Always make sure to write the pipeline binary key.
There's nothing in spec that says that key is only written
if data is also written.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: be06bfcbed ("radv: add initial support for pipeline binaries")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31162>
2024-09-16 11:38:07 +00:00
Ganesh Belgur Ramachandra
9aa9f7211e radeonsi: fix decode corruptions with AMD_IMAGE_OPCODES=false on non-CDNA based chips
This fix doesn't concern CDNA based chips such as gfx940 directly
but it fixes corruptions on other chips that use emulated image
loads and stores using buffers when AMD_IMAGE_OPCODES=false.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30891>
2024-09-16 09:31:49 +00:00
Ganesh Belgur Ramachandra
62592674e0 amd: fix incorrect PIPE_INTERLEAVE_BYTES size for CDNA chips
The expected PIPE_INTERLEAVE_BYTES size is ADDR_PIPEINTERLEAVE_256B on
gfx940 (or other CDNA based chips). Since CDNA based chips like gfx940
doesn't support image opcodes, it gets gibberish value from the kernel.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30891>
2024-09-16 09:31:49 +00:00
Pierre-Eric Pelloux-Prayer
ca41fa6a09 radeonsi/sqtt: don't store pipeline->bo in shader->bo
This is useless and causes hangs (eg: with Firefox).

Instead use a custom emit function for the sqtt state, and
add the pipeline BO to the buffer list at this point.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31171>
2024-09-16 08:50:33 +00:00
Pierre-Eric Pelloux-Prayer
a1408e9ad3 radeonsi/sqtt: don't leak the pipeline bo
Pass the reference from si_aligned_buffer_create directly
to pipeline instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31171>
2024-09-16 08:50:33 +00:00
Pierre-Eric Pelloux-Prayer
721ccd0292 radeonsi/sqtt: use XXH64_update
No functional change, but this is the way the XXH API is meant
to be used.

Also avoid setting the pipeline_code_hash twice.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31171>
2024-09-16 08:50:32 +00:00
Pierre-Eric Pelloux-Prayer
3ab34c5ffe radeonsi/sqtt: don't store the offsets in the pipeline
We can pass them to si_sqtt_register_pipeline / si_sqtt_add_code_object
directly instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31171>
2024-09-16 08:50:32 +00:00
Pierre-Eric Pelloux-Prayer
bda9e1f856 radeonsi: check the pointer before adding an offset
Otherwise callers can't detect errors.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31171>
2024-09-16 08:50:32 +00:00
Pierre-Eric Pelloux-Prayer
7fedd7e178 radeonsi: include the shader key in the sqtt pipeline hash
Otherwise we'll use the wrong shader if the key changed.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31171>
2024-09-16 08:50:32 +00:00
Pierre-Eric Pelloux-Prayer
27644af79b radeonsi/tests: allow to run radeonsi-run-tests.py with AMD_DEBUG
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31171>
2024-09-16 08:50:32 +00:00
Samuel Pitoiset
ba7e3be425 radv: merge radv_emit_epilog() with radv_emit_ps_epilog_state()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31150>
2024-09-16 07:53:00 +00:00
Samuel Pitoiset
26d8f1a306 aco,radv,radeonsi: move has_epilog to the fragment shader info
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31150>
2024-09-16 07:53:00 +00:00
Samuel Pitoiset
b377ddfd04 radv,radeonsi: remove remaining occurrences of TCS epilog
TCS epilog has been removed few months ago.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31150>
2024-09-16 07:53:00 +00:00
David Rosca
e27eeff95d frontends/va: Remove fallback if app doesn't enable packed headers
This was only a best effort fallback and it doesn't always work.
Driver is expected to only output slice NALs when packed headers
are not enabled, so let's just do that.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31126>
2024-09-16 06:35:32 +00:00
David Rosca
d3429a7e00 radeonsi: Fix reported minimum width for video encode
Some apps would default to smaller resolutions than we currently report
as supported, despite the hardware being able to encode it. It's also
common for test apps/suites to use small resolutions.
libva-utils/h264encode uses 176x144 resolution by default and vulkan cts
have video clips with the same resolution too which would previously
fail to encode.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31109>
2024-09-15 14:22:29 +00:00
Marek Olšák
46b561b7cd radeonsi: fold si_improve_sync_flags logic into si_barrier_before_internal_op
This also implements the same thing for images.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
961c72d666 radeonsi: remove SI_OP_SYNC_CPDMA_BEFORE, always sync CP DMA
We want barriers to only consider compute as a possibility, and CP DMA
has to work with that, which means barriers can't have code specific
to CP DMA.

Always executing the CP DMA sync seems acceptable because CP DMA operations
are usually small, and CP DMA is almost never used on GFX10+.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
88eb1be2fc radeonsi: use si_barrier_{before,after}_internal_op for CP DMA
This makes the CP DMA code simpler and reuses the logic we use for internal
compute shaders.

The only thing that can't be handled in the barrier functions is
"!cp_dma_has_L2 -> SI_CONTEXT_INV_L2" because the barrier functions should
assume that only compute shader coherency is required to make them usable
everywhere, and the CP DMA code has to deal with it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
0526ea067d radeonsi: remove CP DMA code for GDS & L2 prefetch in the clear/copy_buffer path
We don't need to access GDS with CP DMA, and L2 prefetches don't use this
codepath.

Some local variables are also moved closer to their use.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
0124527569 radeonsi: don't flag both VS and PS partial flush in si_barrier_before_internal_op
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
b73ba7b710 radeonsi: do init/deinit for multi-dispatch compute blits only once
Do it outside the loop, which is more optimal.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
4d6a90ddac radeonsi: split image saving/binding/restoring from si_launch_grid_internal_images
Since the compute blit can execute multiple dispatches in a loop,
we shouldn't save/bind/restore images for every single dispatch.
This will help move that out of the loop.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
69ad0fc61e radeonsi: only set need_check_render_feedback if binding textures for PS
Other shader stages can't realistically read and render to the same
pixel of the same texture simultaneously.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
d4178e58f7 radeonsi: skip no-op si_compute_blit()
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
ef136ab94e radeonsi: move barrier code out of si_launch_grid_internal_ssbos/images
and into the new si_barrier functions.

The new barrier function parameters might be excessive for now, but they
will be used later, hopefully.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
fd04919f4e radeonsi: move compute barrier calls up one level
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
797112d1e2 radeonsi: split si_launch_grid_internal to start preparing for barrier rework
This moves code from si_launch_grid_internal into 4 new functions:
- si_barrier_before_internal_op
- si_barrier_after_internal_op
- si_compute_begin_internal
- si_compute_end_internal

The goal is to move setting the flush flags into callers, which will
eventually become proper memory barriers.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
465f42e907 radeonsi: inline si_get_flush_flags
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
bf77786b79 radeonsi: replace enum si_cache_policy with cp_dma_has_L2()
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
1ce9729cce radeonsi: remove L2_STREAM enum
never used

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
9ed0530413 radeonsi: move enum si_cache_policy and si_get_flush_flags into si_cp_dma.c
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
b0ee7b0b8f radeonsi: don't use si_get_flush_flags in si_launch_grid_internal_ssbos
It didn't do anything. It only set INV_SCACHE and INV_VCACHE, which are
already set optimally by si_launch_grid_internal.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
cfe1f2b841 radeonsi: remove enum si_coherency
SI_COHERENCY_SHADER is the only one that's used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:45 -04:00
Marek Olšák
a009aa7365 radeonsi: remove all SI_COHERENCY_* flags except SI_COHERENCY_SHADER
it will be simplified 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/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
eb52b774e1 radeonsi: don't use SI_COHERENCY_CP
It only skips flushing SMEM and VMEM caches.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
d9bfe075a5 radeonsi: don't use SI_COHERENCY_CB_META
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
413bdcd7c3 radeonsi: don't use SI_COHERENCY_NONE in si_compute_shorten_ubyte_buffer
This removes the last non-AMD_TEST use of SI_COHERENCY_NONE.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
68adac4d28 radeonsi: move get_cache_policy into si_cp_dma.c
it's the only user

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
8c872d46a8 radeonsi: don't use get_cache_policy in si_launch_grid_internal_ssbos
This is more correct.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
d04150965b radeonsi: remove unused size parameter from get_cache_policy
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
fe18c09703 radeonsi: add si_cp_pfp_sync_me
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
2d64e8d333 radeonsi: use the correct cs for SQTT barriers for gfx9
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
862a5f7abe radeonsi: add gfx10+ support into si_cp_acquire_mem
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
a42d9db1b6 radeonsi: add si_cp_acquire_mem helper and clean up its usage for gfx6-9
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
1d5ffb13d6 radeonsi: add ACQUIRE_MEM, RELEASE_MEM PWS packet helpers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
9690481535 radeonsi: remove SI_CONTEXT_VGT_STREAMOUT_SYNC, emit it directly
It has only 1 use.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
1a1138817c radeonsi: add a new PM4 helper radeon_event_write
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
434eddd422 radeonsi: tweak si_test_dma_perf for better experience
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
05353cfd4f radeonsi: use better OREO_MODE programming
We have been told to do this instead.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
0c734722a1 radeonsi/gfx11: disable RB+ when blending
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
3de719045a radeonsi/gfx12: disallow DCC for protected content
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
Marek Olšák
c90d4e0d57 radeonsi/gfx12: remove CP DMA workarounds because CP DMA is never used on gfx12
except for cache prefetches.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31168>
2024-09-14 11:03:44 -04:00
David Heidelberg
c5ee7ca4d6 ci/freedreno: mark jobs to be retested with patched 6.11 kernel
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31177>
2024-09-14 15:24:04 +09:00
David Heidelberg
52c014a453 ci/freedreno: move disabled a530 entries back to main gitlab-ci.yml
Fixes: 9442571664 ("ci: separate hiden jobs to -inc.yml files")
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31177>
2024-09-14 15:20:47 +09:00
Jami Kettunen
849a496b33 nouveau/headers: Fix build without rustfmt
This is optional elsewhere and seemingly the intention was already to
ignore failures, but it didn't catch FileNotFoundError when rustfmt
isn't even available.

Fixes: 591b5da49b ("nouveau/headers: Run rustfmt on generated files")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30970>
2024-09-14 04:34:46 +00:00
llyyr
5450306a36 vulkan/wsi/wayland: fix suboptimal flag being ignored with explicit sync
Signed-off-by: llyyr <llyyr.public@gmail.com>
Fixes: 5f7a5a27ef ("wsi: Implement linux-drm-syncobj-v1")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31122>
2024-09-13 20:48:05 +00:00
Dylan Baker
ed8d1d3c9b anv: if queue is NULL in vm_bind return early
In the error handling path we end up creating a vk_sync and then later
we vk_sync_wait() on it. If that wait fails somehow we'll end up calling
vk_queue_set_lost(&queue->vk, ...) which would segfault if queue is
NULL.

If we end up in this situation (no queue), return directly whatever the
backend's vm_bind function returned, propagating the error up if
necessary.

Fixes: dd5362c78a ("anv/xe: try harder when the vm_bind ioctl fails")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31048>
2024-09-13 20:17:40 +00:00
Dylan Baker
0422eed255 iris: Run checks that do not require resources before creating them
This avoids the need to free the resource if we decide to return early.

Fixes: c8df09ebd4 ("iris: More gracefully fail in resource_from_user_memory")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30306>
2024-09-13 19:26:57 +00:00
Faith Ekstrand
3a9fe645d7 vulkan: Handle variable-length property arrays more generically
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31119>
2024-09-13 18:33:11 +00:00
Lucas Stach
5f6ab7dcdf etnaviv: limit number of varyings to fit into VS outputs
One of the VS output slots is always occupied by the position
output. Limit the number of user visible varyings to fit into
the remaining slots.

This reduces GL_MAX_VARYING_COMPONENTS to 60 on <halti5 GPUs,
which is still enough to meet the GLES3 minimum requirements.

Fixes piglit shaders@glsl-max-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/31032>
2024-09-13 15:25:07 +00:00
Lucas Stach
dcb61d3da5 etnaviv: validate number of VS outputs against GPU limit
All user defined varyings, the position output and possibly the
point size output need to fit into the GPU specific maximum
number of VS outputs. Check this limitation.

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/31032>
2024-09-13 15:25:07 +00:00
Lucas Stach
21a5370f9c etnaviv: fix total varying count assertion
We can support up to ETNA_NUM_INPUTS varyings. Make sure the assert
allows up to this number.

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/31032>
2024-09-13 15:25:07 +00:00
Lucas Stach
ea34c7972b etnaviv: support more VS outputs on halti5 GPUs
Halti5 GPUs doubled the number of available VS outputs, as documented
in rnndb. Double the size of the driver structure and use the size
defines generated by rnndb to emit the correct number of VS output
states, depending on GPU generation.

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/31032>
2024-09-13 15:25:06 +00:00
Lucas Stach
a71003b1b8 etnaviv: emit all PA shader attributes
While the rnndb fix increased the size of the driver internal
structures to be able to hold all data for the currently supported
number of varyings, it didn't change the state emission, so only
a subset of the PA shader attribute states was emitted.

Use the define from rnndb to avoid such inconsistencies.

Fixes: 11ffb20b70 ("etnaviv: Update headers from rnndb")
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/31032>
2024-09-13 15:25:06 +00:00
Daniel Stone
f07bfe0b1d ci: Use new arguments to ci-kdl to avoid child management
Instead of using a tee to the log, step the verbosity down - we already
know by this point that it's working pretty well. Passing --output-file
directly also lets us avoid a messy 'mv'.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:13:06 +01:00
Daniel Stone
c96ee18086 ci: Upgrade ci-kdl
https://gitlab.freedesktop.org/gfx-ci/ci-kdl/-/merge_requests/2 brought
a bunch of improvements.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:13:05 +01:00
Daniel Stone
71c77e0d00 ci/kdl: Fix KDL install location
Make sure that ci-kdl is built directly into the destination path; the
venv documentation explicitly states that venvs cannot be relocated.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
f46d022c4b ci/xorg: Capture Xorg log in results artifacts
Because it's really infuriating trying to figure out why it hasn't
started without that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
7fb2fa0e4b ci/devcoredump: Use common $RESULTS_DIR
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
cf482a4563 ci/kdl: Use common $RESULTS_DIR
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
f890d41d46 ci/gtest: Use common $RESULTS_DIR
This means that GTEST_RESULTS_DIR no longer works.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
8b3a49d1ec ci/trace: Move trace cleanup to Piglit runner
No sense in polluting our common init code with this.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
75c4f447bd ci/piglit: Use common $RESULTS_DIR
This means that $PIGLIT_RESULTS_DIR no longer works.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
b8c9bbabcf ci/dxvk: Use common results dir
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
476a5aab34 ci/deqp: Use common $RESULTS_DIR
This means that setting $DEQP_RESULTS_DIR no longer works, but it does
clean up the CI setup.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
4143199be7 ci/android: Use common $RESULTS_DIR for cuttlefish
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
9b6d14aed1 ci: Always create results dir from init
During init-stage2 (used for hardware jobs) and setup-test-env (used
for running directly on shared runners), make sure we always create a
results directory.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:09 +01:00
Daniel Stone
111c15ae4a ci/bare-metal: Don't move structured log file
Just create it in the right place to begin with.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:08 +01:00
Daniel Stone
2dbadf8109 ci: Avoid subshell for executing HWCI_TEST_SCRIPT
Ensure that $HWCI_TEST_SCRIPT is an executable we can run ourselves, and
run that directly instead of invoking a subshell.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:08 +01:00
Daniel Stone
275727add0 ci/virgl: Special-case llvmpipe parallelisation
When we're running VirGL/Venus, we sometimes want to invert our
parallelism. As some commands can serialise at the host level, we don't
always want to launch as many test clients as we have CPU cores.
Instead, we want to use our parallelism for llvmpipe's rendering, and
launch only a single test at a time.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
2024-09-13 10:12:08 +01:00
Konstantin Seurer
bacf9752f4 radv: Work around broken terrain in Warhammer III
Hiding storage support for depth formats forces the game to take a
different, working path for terrain height map initialization.

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31152>
2024-09-13 07:48:02 +00:00
Martin Roukala (né Peres)
82946dc152 freedreno/ci: fix the stage of the a750 jobs
We were accidentally overriding the job stage in .b2c-freedreno-vk-test,
which ended up moving the a750 jobs to the `freedreno` stage instead of
`freedreno-postmerge`.

Fixes: 25c70888a5 ("ci/broadcom: Move manual/nightly jobs to postmerge stage")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31142>
2024-09-13 01:51:45 +00:00
Caio Oliveira
5e47c5f94a intel/executor: Fix a couple of memory leaks in the tool
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31120>
2024-09-13 01:21:24 +00:00
Ian Romanick
3b13a0018f radv: Use nir_opt_generate_bfi to generate bitfield_select
v2: Move to radv_optimize_nir_algebraic. Suggested by Georg.

Tested-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31006>
2024-09-13 00:21:00 +00:00
Ian Romanick
55448cf43a radeonsi: Use nir_opt_generate_bfi to generate bitfield_select
Not tested.

v2: Move after nir_opt_algebraic. Suggested by Georg.

v3: has_bitfield_select is always enabled on GCN+. Suggested by Georg.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31006>
2024-09-13 00:21:00 +00:00
Ian Romanick
79bc1da203 r600: Use nir_opt_generate_bfi to generate bitfield_select
Not tested.

v2: Move after nir_opt_algebraic. Suggested by Georg.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31006>
2024-09-13 00:21:00 +00:00
Ian Romanick
447dae7c13 intel/brw: Use nir_opt_generate_bfi
No shader-db changes on any Intel platform.

The "regression" in SEND messages occurs because a loop containing a
SEND is unrolled.

v2: Move after nir_opt_algebraic. Suggested by Georg.

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19787034 -> 19785933 (<.01%)
instructions in affected programs: 373573 -> 372472 (-0.29%)
helped: 541 / HURT: 6

total cycles in shared programs: 906012612 -> 905626304 (-0.04%)
cycles in affected programs: 58456516 -> 58070208 (-0.66%)
helped: 382 / HURT: 180

fossil-db:

Lunar Lake
Totals:
Instrs: 140671401 -> 140670495 (-0.00%); split: -0.00%, +0.00%
Send messages: 12891430822 -> 12891430834 (+0.00%)
Loop count: 46905 -> 46904 (-0.00%)
Cycle count: 21527511599 -> 21530278999 (+0.01%); split: -0.00%, +0.02%
Spill count: 70728 -> 70766 (+0.05%)
Fill count: 139397 -> 139254 (-0.10%); split: -0.13%, +0.02%
Max live registers: 47512432 -> 47512500 (+0.00%)

Totals from 355 (0.06% of 549270) affected shaders:
Instrs: 878953 -> 878047 (-0.10%); split: -0.18%, +0.08%
Send messages: 19289 -> 19301 (+0.06%)
Loop count: 1243 -> 1242 (-0.08%)
Cycle count: 1434664642 -> 1437432042 (+0.19%); split: -0.06%, +0.25%
Spill count: 15826 -> 15864 (+0.24%)
Fill count: 38454 -> 38311 (-0.37%); split: -0.46%, +0.08%
Max live registers: 52530 -> 52598 (+0.13%)

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 152516575 -> 152516147 (-0.00%); split: -0.00%, +0.00%
Send messages: 7491001 -> 7491013 (+0.00%)
Loop count: 47588 -> 47587 (-0.00%)
Cycle count: 17124433133 -> 17126147156 (+0.01%); split: -0.01%, +0.02%
Max live registers: 31854704 -> 31854764 (+0.00%)

Totals from 402 (0.06% of 633223) affected shaders:
Instrs: 839338 -> 838910 (-0.05%); split: -0.09%, +0.04%
Send messages: 20203 -> 20215 (+0.06%)
Loop count: 1243 -> 1242 (-0.08%)
Cycle count: 1327042160 -> 1328756183 (+0.13%); split: -0.11%, +0.24%
Max live registers: 33237 -> 33297 (+0.18%)

Tiger Lake
*** Shaders only in 'before' results are ignored:
fossil-db/steam-native/wolfenstein_youngblood/b8cefe7f700304c4/fs.32/0
from 1 apps: fossil-db/steam-native/wolfenstein_youngblood

Totals:
Instrs: 150549467 -> 150548952 (-0.00%); split: -0.00%, +0.00%
Send messages: 7495582 -> 7495594 (+0.00%)
Loop count: 46605 -> 46604 (-0.00%)
Cycle count: 15472381586 -> 15472247085 (-0.00%); split: -0.00%, +0.00%
Spill count: 59776 -> 59775 (-0.00%)
Fill count: 103475 -> 103464 (-0.01%)
Scratch Memory Size: 2384896 -> 2383872 (-0.04%)
Max live registers: 31760724 -> 31760787 (+0.00%)
Max dispatch width: 5569928 -> 5569912 (-0.00%)

Totals from 525 (0.08% of 632443) affected shaders:
Instrs: 349074 -> 348559 (-0.15%); split: -0.25%, +0.11%
Send messages: 24355 -> 24367 (+0.05%)
Loop count: 849 -> 848 (-0.12%)
Cycle count: 187080291 -> 186945790 (-0.07%); split: -0.19%, +0.12%
Spill count: 483 -> 482 (-0.21%)
Fill count: 1372 -> 1361 (-0.80%)
Scratch Memory Size: 22528 -> 21504 (-4.55%)
Max live registers: 36705 -> 36768 (+0.17%)
Max dispatch width: 6272 -> 6256 (-0.26%)

Ice Lake
Totals:
Instrs: 151804923 -> 151804396 (-0.00%); split: -0.00%, +0.00%
Send messages: 7553216 -> 7553228 (+0.00%)
Loop count: 46196 -> 46195 (-0.00%)
Cycle count: 15099805668 -> 15099533898 (-0.00%); split: -0.00%, +0.00%
Fill count: 103978 -> 103979 (+0.00%)
Max live registers: 32168254 -> 32168323 (+0.00%)

Totals from 527 (0.08% of 637191) affected shaders:
Instrs: 347482 -> 346955 (-0.15%); split: -0.25%, +0.10%
Send messages: 24586 -> 24598 (+0.05%)
Loop count: 849 -> 848 (-0.12%)
Cycle count: 191147758 -> 190875988 (-0.14%); split: -0.16%, +0.02%
Fill count: 1392 -> 1393 (+0.07%)
Max live registers: 37379 -> 37448 (+0.18%)

Skylake
Totals:
Instrs: 140981504 -> 140980647 (-0.00%); split: -0.00%, +0.00%
Cycle count: 14653477192 -> 14653249734 (-0.00%); split: -0.00%, +0.00%
Fill count: 99636 -> 99637 (+0.00%)
Max live registers: 31472062 -> 31472126 (+0.00%)

Totals from 523 (0.08% of 626432) affected shaders:
Instrs: 335551 -> 334694 (-0.26%); split: -0.26%, +0.01%
Cycle count: 178047284 -> 177819826 (-0.13%); split: -0.14%, +0.02%
Fill count: 1100 -> 1101 (+0.09%)
Max live registers: 36734 -> 36798 (+0.17%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31006>
2024-09-13 00:21:00 +00:00
Ian Romanick
6a09d33549 nir: Add a pass to generate BFI instructions from logical operations
Inspired by a commit message in !30934, I set about optimizing the code
generated for nir_copysign. It would be possible to just implement an
opt_algebraic pattern for the specific values used by nir_copysign, but
this casts a slightly larger net.

As noted in a comment in the code, there may be variations of the
pattern that this pass misses. The opt_algebraic pattern would miss them
too.

v2: Use nir_def_replace. Suggested by Alyssa. Allow more "root"
instruction types. Suggested by Georg.

v3: Treat extract_u16(x, 0) as (x & 0x0000ffff), and treat extract_u8(x,
0) as (x & 0x000000ff).

v4: Use nir_scalar. Suggested by Georg.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31006>
2024-09-13 00:21:00 +00:00
Ian Romanick
057c7c9f53 nir/algebraic: Recognize open-coded bitfield_reverse in XCOM 2
The XCOM 2 shaders in my shader-db use iadd instead of ior.

No fossil-db changes on any Intel platform.

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19787210 -> 19787034 (<.01%)
instructions in affected programs: 1187 -> 1011 (-14.83%)
helped: 6 / HURT: 0

total cycles in shared programs: 906024436 -> 906012612 (<.01%)
cycles in affected programs: 72978 -> 61154 (-16.20%)
helped: 6 / HURT: 0

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31006>
2024-09-13 00:21:00 +00:00
Rhys Perry
97f4250a7c nir: skip opt_loop_peel_initial_break if continue block only has phis
Doing that optimization wouldn't do anything useful in this case.

nir_block_has_non_copy() is used by opt_loop_peel_initial_break().

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/31002>
2024-09-12 23:36:58 +00:00
Rhys Perry
8410b4cdd6 nir/tests: add some loop peeling tests
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/31002>
2024-09-12 23:36:58 +00:00
Rhys Perry
64ac601049 nir/opt_loop: skip peeling if the loop ends with any kind of jump
Any kind of jump prevents us from moving it to the top of the loop, not
just breaks.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31002>
2024-09-12 23:36:58 +00:00
Rhys Perry
af3b099e0a nir/opt_loop: skip peeling if the break is non-trivial
If this nir_if contains continues or other breaks, we can't move it
outside the loop.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31002>
2024-09-12 23:36:57 +00:00
Rhys Perry
4f44a944bb nir/opt_if: fix fighting between split_alu_of_phi and peel_initial_break
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11822
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31002>
2024-09-12 23:36:57 +00:00
David Rosca
b89d03838e frontends/va: Reset intra refresh in beginPicture
If app doesn't send updated intra refresh parameters, intra refresh
should be disabled instead of using values from old frame.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:21 +00:00
David Rosca
379dd3ff52 pipe: Remove unused fields in video rate control
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:21 +00:00
David Rosca
0818ed770d frontends/va: Create encoder at context creation
Instead of creating it when handling sequence parameter buffer. Drivers
don't use the max_references value (and it was only somewhat correct for
H264) and level is also available from sequence parameters.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:20 +00:00
David Rosca
5632a6e24f Revert "frontends/va: Process VAEncSequenceParameterBufferType first in
vaRenderPicture"

We now set default parameters at context creation, so this is not needed
anymore.

This reverts commit c970a9b663.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:20 +00:00
David Rosca
4e38b56d80 frontends/va: Set default encoding parameters at context creation
Instead of doing it when handling sequence parameter buffer, which could
overwrite previously set values.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:20 +00:00
David Rosca
77d5e8ab19 d3d12: Stop using base.level for H264 level_idc
Instead use the value from sequence parameters.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:20 +00:00
David Rosca
bebda07718 radeonsi/vcn: Stop using base.level for H264 level_idc
Instead use the value from sequence parameters.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:20 +00:00
David Rosca
bfc36b0aef radeonsi/uvd_enc: Stop using base.level
Instead use the value from sequence parameters.
This needs to move the context buffer allocation to first frame
which also allows to remove the temporary surface allocation.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:20 +00:00
David Rosca
e891717936 radeonsi/vce: Stop using base.level and base.max_references
Instead use the values from sequence parameters.
This needs to move the context buffer allocation to first frame
which also allows to remove the temporary surface allocation.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:20 +00:00
David Rosca
96975bc32f radeonsi/vce,uvd_enc: Stop using obsolete rate control params
Other drivers don't use these and the values can be derived from other
fields.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30992>
2024-09-12 22:50:20 +00:00
Georg Lehmann
7fa7812219 nir: merge out of loop decision with nir_can_move_instr logic
One place to modify instead of two when adding new intrinsics here.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30906>
2024-09-12 21:49:34 +00:00
Georg Lehmann
91f8e32a85 nir/opt_sink: do not sink inverse_ballot out of loops
Inverse_ballot result is undefined if the input is not dynamically uniform.
And sinking out of loops might make the input divergent.

Fixes: 18a0ff137f ("nir: sink/move inverse_ballot like moves")

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30906>
2024-09-12 21:49:34 +00:00
Georg Lehmann
1ec3cc2aed nir/opt_sink: do not sink load_ubo_vec4 out of loops
Same reason as for load_ubo.

Fixes: d199d65c3a ("nir/nir_opt_move,sink: Include load_ubo_vec4 as a load_ubo instr.")

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30906>
2024-09-12 21:49:34 +00:00
Kenneth Graunke
02482604e5 intel/brw: Delete old-style surface and A64 message opcodes
These have now been replaced by the MEMORY_*_LOGICAL opcodes.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
7090578c35 intel/brw: Switch load_ubo_uniform_block_intel over to memory intrinsics
While there are many cases that turn into the *_PULL_CONSTANT_LOAD ops
or push constants, this one piece was emitting surface block loads.
Switch it over to use the new intrinsics to delete a bunch of code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
b55f77161d intel/brw: Switch to emitting MEMORY_*_LOGICAL opcodes
We introduce a new fs_nir_emit_memory_access() helper that can handle
image, bindless image, SSBO, shared, global, and scratch memory, and
handles loads, stores, atomics, and block loads.  It translates each
of these NIR intrinsics into the new MEMORY_*_LOGICAL intrinsics.

As a result, we delete a lot of similar surface access emitter code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
3ba97176d6 intel/brw: Switch load_num_workgroups to the new memory intrinsic
A simple case we handle directly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Acked-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
dc4770b005 intel/brw: Lower MEMORY_OPCODE_*_LOGICAL to HDC messages
This is more complicated.  We map the MEMORY_*_LOGICAL opcodes to the
older HDC messages: typed and untyped surface read/write/atomic (whether
float or integer), DWord and Byte scattered messages, OWord block, and
both A64, BTI, and stateless messages.

- MEMORY_MODE_* is used to select stateless-scratch, typed, or untyped.
- MEMORY_FLAG_TRANSPOSE is used to select block access.
- MEMORY_BINDING_TYPE = FLAT and 64-bit address size selects A64.
- Alignment and data type size select between byte/dword scattered or
  surface messages.

While we may not be able to handle the full generality of message
possibilities, we can handle everything we generate currently.  The plan
here is to assert/validate that we don't generate MEMORY_*_LOGICAL ops
on HDC-based platforms which can't support those particular messages.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
3255c9cc49 intel/brw: Lower MEMORY_OPCODE_*_LOGICAL to LSC messages
This is pretty straightforward, as the new MEMORY_*_LOGICAL opcodes
are designed to match the new LSC's capabilities.  The main part is
constructing the message payload.

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/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
a82e8b1c6b intel/brw: Pretty-print memory logical opcodes
The new MEMORY_*_LOGICAL intrinsics have a lot of control sources with
a bunch of LSC_* enums (opcode, memory type, address type, address and
data sizes), as well as flags, coordinate components vs. components...
they unfortunately are nigh-unreadable with the default printing since
there's just a string of unreadable UD immediates in some order.

To fix this, we add some basic pretty-printing.  If a control source is
simply an enum whose value communicates the entire purpose, we print it.
If it has a numeric value (i.e. alignment, or data), we add a label.

For example:

   memory_store(16) (null):UD store shared flat addr: %2:UD coord_comps:1u align:16u d32 comps:2u data0: %3:UD

   memory_store(16) (null):UD store typed bti:%2+0.0<0>:UD addr: %3+0.0:D coord_comps:2u align:0u d32 comps:4u data0: %4:UD

This make them much easier to read.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@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/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
2c67729386 intel/brw: Expose functions to convert LSC enums to strings
We had tables for these in the disassembler already, but I'd like to use
them in brw_print.cpp as well.  Just wrap the tables in convenience
functions we can use there.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@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/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
d5f38be713 intel/brw: Introduce new MEMORY_*_LOGICAL opcodes
This is a new unified set of opcodes for memory access loosely patterned
after the new LSC-style data port messages introduced on Alchemist GPUs.

Rather than creating an opcode for every type of memory access, it has
only three opcodes: load, store, and atomic.  It has various sources to
indicate the rest:

- Binding type (raw pointer, pointer to surface state, or BT index)
- Address size (A64, A32, A16)
- Data size (bit size, number of components)
- Opcode (atomic opcode, or LOAD/STORE vs. LOAD_CMASK/STORE_CMASK)
- Mode (typed vs. untyped vs. shared-local vs. scratch)
- Address (and its dimensionality)
- Data (0 for loads, 1 for stores, 2 for atomics)
- Whether we want block access

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@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/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
b8f264cfe4 intel/brw: Handle load/stores in lsc_op_for_nir_intrinsic()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@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/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
8a6903e50d intel/brw: Rename lsc_aop_for_nir_intrinsic to "op" instead of "aop"
This is going to handle more than atomics shortly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@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/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
e8883bd40b intel/brw: Use size_written for NoMask instructions in is_partial_write
The intention of inst->is_partial_write() is that it should return true
when any REG_SIZE (32B) chunk of inst's destination is written but not
fully overwritten.  This can be used to tell whether inst combines new
data with existing data, or screens off any previous writes, so the old
values are no longer required.

The existing (exec_size * brw_type_size_bytes(this->dst.type) < 32)
check doesn't work in a number of cases.  For example, LSC block loads
have exec_size == 1 and force_writemask_all set, but may write multiple
full registers of data.  (Currently, we only see them with exec_size 1
after logical-send-lowering, so our SHADER_OPCODE_SEND special case
was covering those.)  We had also special cased UNDEF.

Instead, we can simply check:

   1. Predication
   2. !inst->dst.contiguous()
   3. inst->dst.offset % REG_SIZE != 0
   4. inst->size_written % REG_SIZE != 0

We had the first three already, but #4 is new.  If either #3 or #4
are true, then that implies there is a REG_SIZE chunk of the destination
which is written, but not entirely written, so it's a partial write.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@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/30828>
2024-09-12 20:54:36 +00:00
Kenneth Graunke
ab0b9b6792 intel/brw: Use NUM_BRW_OPCODES in can_omit_write() check
The intention here is to detect ALU hardware instructions, but not
virtual instructions that haven't been explicitly whitelisted.

For some reason we had arbitrarily hardcoded 128 here, but our virtual
opcodes don't start at 128.  They start at NUM_BRW_OPCODES.  So, use
that instead.

This prevents regressions later when we delete some opcodes, shifting
some virtual opcodes into the 72-128 range.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@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/30828>
2024-09-12 20:54:36 +00:00
Lars-Ivar Hesselberg Simonsen
0c18aa996b panfrost: Enable support for depth clamping
Depth clamping was not enabled in panfrost, leading to the fixed range
[0.0, 1.0] always being used.

This commit sets the bits to enable depth clamp to near/far plane
depending on the passed rasterizer state.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11506
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31041>
2024-09-12 20:04:58 +00:00
Lars-Ivar Hesselberg Simonsen
f5dab1b77e panfrost: Fix near/far depth clip
Near/far depth clip was implemented by setting the low/high_depth_clamp
to -/+INFINITY, which is invalid on Mali.

This commit removes the modification of the depth clamp values and
enables depth clipping by setting the depth_cull_enable state in the ZS
descriptor for v9+ (the equivalent pre-v9 RSD state is already set
correctly) and setting the primitive cull flags correctly for both.

Finally, it disables PIPE_CAP_DEPTH_CLIP_DISABLE_SEPARATE for v9+, as
both plane clips are controlled by a single value.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11506
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31041>
2024-09-12 20:04:58 +00:00
Lars-Ivar Hesselberg Simonsen
5fd523fafb pan/genxml: Add pan_pack_nodefaults()
The new packing macro will not default initialize fields, which is
useful for structures used as override flags or in pan_merge().

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11506
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31041>
2024-09-12 20:04:58 +00:00
Lars-Ivar Hesselberg Simonsen
03c470d2ab panfrost: Move ForEachMacros into panfrost
This change moves panfrost specific ForEachMacros from the top level
.clang-format to the panfrost specific .clang-format.

This is done to avoid triggering CI for all drivers when making changes
to this list.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11506
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31041>
2024-09-12 20:04:58 +00:00
Boris Brezillon
387e6323f8 panvk/csf: Fix inverted address/destination register in CmdSetEvent2()
cs_load32_to() takes the destination register first, and the address
one next.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31147>
2024-09-12 19:29:08 +00:00
Boris Brezillon
a5c660d78a panvk/csf: Fix missing TSD pointer initialization on RUN_IDVS
The global thread storage descriptor can be allocated in the dispatch
path, which means the test on tsd != NULL might be true when the first
RUN_IDVS() happens, and we never set r24 to the TSD address.

Fix that by keeping a tsd field in panvk_cmd_graphics_state that's only
set in the draw path.

Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
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>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Alexandre ARNOUD <aarnoud@me.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31147>
2024-09-12 19:29:08 +00:00
Daniel Stone
d8645aa03a ci/svga: Only run half the Piglit tests
The current runtime is quite a bit too long, so cut it in half.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31111>
2024-09-12 19:07:45 +00:00
Daniel Stone
8953c9b96f ci/svga: Add two Piglit flakes seen in the wild
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31111>
2024-09-12 19:07:45 +00:00
Daniel Stone
9c7cb49508 ci/windows: Increase dozen-deqp fraction
It takes far too long to run: bring it back down to something more
manageable.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31111>
2024-09-12 19:07:45 +00:00
Daniel Stone
0f6be273f1 doc/vc4: Remove reference to old shader-db
Piglit has the traces now.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31111>
2024-09-12 19:07:45 +00:00
Daniel Stone
d8839b2548 doc/linkcheck: Exclude cgit.fd.o
It's no more.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31111>
2024-09-12 19:07:44 +00:00
Daniel Stone
ebd45f0e64 docs/gallium: Fix broken GL extension link
The :ext: macro doesn't know that astc_ldr is actually defined in the
astc_hdr spec doc.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31111>
2024-09-12 19:07:44 +00:00
Daniel Stone
3b2d85d213 doc/llvmpipe: Fix broken link syntax
Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 13a2805325 ("llvmpipe: FlameGraph profiling support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31111>
2024-09-12 19:07:44 +00:00
Daniel Stone
dd5d737e6c ci/lava: Use new pyutils container
Instead of unpacking the x86_64_build container and its billion build
dependencies every time, switch to using only what's in the minimal
pyutils container, and the Python scripts we get as an artifact from the
python-test job. Pulling the artifacts from S3 rather than using GitLab
is also much more efficient.

This should substantially reduce the runtime required to get to testing.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31151>
2024-09-12 18:17:52 +00:00
Daniel Stone
4ee55568b7 ci/python: Allow empty PYTHONPATH
$PYTHONPATH doesn't have to be set, so let it expand to nothing if
there's nothing there.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31151>
2024-09-12 18:17:52 +00:00
Daniel Stone
51c2707b8e ci: Add pyutils container
Currently, our jobs which only want to run a little bit of python -
python-test and the LAVA jobs - pull the entire x86_64-build image,
which is both massive, and massively unnecessary.

Create a separate image which only carries what we need to run our
Python tests and utilities, and switch python-test to using that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31151>
2024-09-12 18:17:52 +00:00
Daniel Stone
4ad94366c3 ci: Add Python requirements include
Make it so we can install everything we need with just
pip3 -r bin/ci/test/requirements.txt.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31151>
2024-09-12 18:17:52 +00:00
Daniel Stone
3a59398fad ci/lima: Temporarily disable
The caching proxy is returning 404 for the job overlay.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31154>
2024-09-12 18:14:00 +00:00
David Heidelberg
e4b247ec9b ci/intel: Officially switch intel-adl-cl to pre-merge
It has proven to be useful.

Due to the .rusticl-rules reference, job was already running in pre-merge,
so let's make it official.

Reviewed-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31144>
2024-09-12 15:40:03 +00:00
Sil Vilerino
0c8fa50dfa d3d12: Support create_dpb_buffer for non-opaque allocations when decoder/encoder supports it
Note that D3D12_VIDEO_ENCODER_SUPPORT_FLAG_READABLE_RECONSTRUCTED_PICTURE_LAYOUT_AVAILABLE
was added in DirectX-Headers v1.614.1

Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31092>
2024-09-12 15:01:18 +00:00
Sil Vilerino
702bd657cc ci: Bump DirectX-Headers and Agility SDK dependencies to 1.614.1
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31092>
2024-09-12 15:01:18 +00:00
Juan A. Suarez Romero
8338e2082e v3d: do not rebind a sampler view already rebound
As sampler view can be used multiple times, do not attempt to rebind if
it was already bound.

This fixes a crash when replaying half-life-2-v2.trace.

Backport-to: 24.2
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/31049>
2024-09-12 14:36:56 +00:00
Juan A. Suarez Romero
c84be162a1 Revert "v3d: never replace a mapped bo"
This reverts commit 0b85476d86.

When mapping a BO in v3d, the map keeps forever until freeing the BO. If
later the map is required again, we reuse the map instead of doing the
map from scratch.

This saves calling map/unmap continuously, as well as a mechanism to
keep control of the map usage, like a reference count.

Thus, when reallocating a BO, if it is mapped it just means the map was
used in the past, but not necessarily it is in use right now.

The reverted commit was causing performance regressions in multiple
applications, reducing from 60fps to 5fps.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11783
Backport-to: 24.2
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/31049>
2024-09-12 14:36:56 +00:00
Juan A. Suarez Romero
fed73edf16 v3d/ci: add new flake for rpi5
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31146>
2024-09-12 13:03:06 +02:00
Samuel Pitoiset
e1df6cf499 radv: use radv_get_user_sgpr_loc() more
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31115>
2024-09-12 07:01:36 +00:00
Samuel Pitoiset
190d46b65d radv: precompute more PGM registers for all stages
Less error prone and easier to update for new hardware.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31115>
2024-09-12 07:01:36 +00:00
Samuel Pitoiset
c7a509f55c radv: update PGM register for TES+GS compiled separately with ESO
Not sure why 0xB210 works on GFX10+ because it's supposed to be
0xB320 with/without NGG...

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31115>
2024-09-12 07:01:36 +00:00
Martin Roukala (né Peres)
97624f99a1 radv/ci: run vkcts-navi31-valve pre-merge
We currently have 3 runners with 7950X3D CPUs and 7900XT GPUs which
can rip through VKCTS in ~16 minutes.

Since this is over the 15 minutes threshold, we parallelize the job to
get under 15 minutes, which nets up ~10 minutes total runtime.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31085>
2024-09-12 03:37:18 +00:00
Martin Roukala (né Peres)
09892aec09 zink/ci: document more flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31085>
2024-09-12 03:37:18 +00:00
Martin Roukala (né Peres)
7bb80e184c radv/ci: document more vkcts flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31085>
2024-09-12 03:37:18 +00:00
Dave Airlie
7c6e3c70b6 radv/video/enc: report pps overrides in feedback for h265
radv does change h265 usually so report in feedback info.

Fixes: 967e4e09de ("radv/video: add h265 encode support")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31135>
2024-09-12 10:58:02 +10:00
Dave Airlie
8d08e92199 radv/video: fix encode reference slot counting
This needs the max of slot indices.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31135>
2024-09-12 10:57:58 +10:00
Dave Airlie
e89f4a48fd radv: Fix radeon_enc_code_ue with values over 2^16
This ports this fixes from radeonsi:

138ba42a87 ("radeonsi/vcn: Fix radeon_enc_code_ue with values over 2^16")

Cc: mesa-stable
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31135>
2024-09-12 10:57:18 +10:00
Nanley Chery
e0157abec6 anv,iris: Pack depth pixels into initialized arrays
Coverity alerts that the uint32_t pointer I was passing into
isl_color_value_pack() could possibly be used as an array. The value is
being used as such, but only the first element of that array should be
accessed. That's because the depth buffer formats I'm also passing into
the function only have a single channel, R. Nonetheless, let's update
the code to avoid the warning.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31123>
2024-09-11 22:04:30 +00:00
Mike Blumenkrantz
bb16203a8d zink: fix sparse bo deallocation
this loop was not correctly iterating the dynarray

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31124>
2024-09-11 21:07:45 +00:00
Mike Blumenkrantz
d72f7cbc5a zink: stop leaking inferred resolve surfaces
this is tricky since the ownership model here works the other
way around from normal: the resolve surface's lifetime is
determined by the resource's lifetime, meaning that
the surface should be destroyed by the resource instead
of the resource being destroyed by the surface

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31124>
2024-09-11 21:07:45 +00:00
Mike Blumenkrantz
a3c2be8f85 zink: set resolve layout when inferring scanout resolves
this is otherwise broken

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31124>
2024-09-11 21:07:45 +00:00
Eric R. Smith
db371633e6 panfrost: improve swizzle inversion
panfrost_invert_swizzle produces a (one-sided) inverse, that is a
function g such that g(f(x)) = x. However, it is actually used in
some cases where we want a two-sided inverse, where we also have
f(g(x)) = x. An example is its use to pre-swizzle border color
values so that a later pass will un-swizzle them. If the swizzle
is not one-to-one this two sided inverse does not exist. However,
we can do better than the original code, e.g. for an RRR1 swizzle
inverse produced was originally B000, which when applied on the wrong
side results in BBB1 as output, whereas R000 would produce the
desired RRR1 output. Using the first valid component we see, rather
than the last one, is thus usually better.

The "correct" solution is to re-write all the code that uses
an inverse to handle non-unique inverses. But frankly these uses only
crop up in fairly niche cases like tests, and it's probably not worth
spending a lot of effort to deal with these edge cases when this
patch fixes most of them.

Fixes some failing piglit ext_framebuffer_multisample tests.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31060>
2024-09-11 19:29:16 +00:00
David Heidelberg
78a121b8cf freedreno/ir3: Use nir_lower_mem_access_bit_sizes instead custom lowering
- More robust.
 - Handles properly UBO cases, needed for proper OpenCL support (rusticl).
 - Resolved KHR-GL46.gpu_shader_fp64.fp64.max_uniform_components failure.

Fixes: f5ce806ed7 ("freedreno/ir3: Add wide load/store lowering")
Reviewed-by: Rob Clark <robdclark@freedesktop.org>
Co-authored-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30961>
2024-09-12 01:04:58 +09:00
Boris Brezillon
5db135f66a panvk: Advertize v10 support
Patch panvk_macros.h to add a case for v10 and accept v10 devices.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Rebecca Mckeever
f8598e599e panvk: Add VkEvent support to the CSF backend
With its sync object primitive, CSF allows native event support.

Reviewed-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>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
5544d39f44 panvk: Add a CSF backend for panvk_queue/cmd_buffer
With those two components implemented, we can now compile all common
per-arch source files.

Co-developed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
7049d31676 panvk: Add a read-write non-cached memory pool for CSF events
Events cross the device boundary and can be read/written by the host.
We could add the necessary cache flush and made those GPU-cached, but
it's way simpler to allocate non-cached memory.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
53fb1d99ca panvk: Transition to explicit VA assignment on v10+
Panthor allows us to control the GPU virtual address space,
which, among other things, will allow us to support sparse
bindings.

Let's tweak the device initialization and BO mapping to
takes this explicit VA management mode into account.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
ca79fc99cd panvk: Don't pretend we can compile for v9
The JM backend is not ready for v9 yet, so let's just drop it from the
list of architecture to build for.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
db1073357a panvk: Be robust against allocation failures in a command buffer context
When an allocation failure happens, the command buffer should be
flagged as invalid, and anything using this memory from the CPU side should
be skipped to avoid segfaults.

For allocations going through memory pools owned by a command buffer
we automate that with panvk_cmd_alloc_xx() macros.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
eb0b1c36f2 panvk: Move CmdPushConstants2KHR to panvk_vX_cmd_push_constant.c
Turns out the panvk_cmd_buffer structures for CSF/JM are similar enough
to make CmdPushConstants2KHR() generic. Let's move this function out
of the JM specific code.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
173939ed9b panvk: Move cmd_bind_shaders() to panvk_vX_shader.c
We had planned for a CSF specialization, but it turns out the CSF/JM
are almost the same and we can have something generic implemented in
panvk_vX_shader.c

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
0426c14c7a panvk: Move Cmd{Bind,Push}DescriptorSets implementation to cmd_desc_state.c
Turns out the panvk_cmd_buffer for CSF/JM have enough similarities to
make it possible to have a generic implementation in
panvk_vX_cmd_desc_state.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
aedb00ca08 panvk: Set the submit mode to THREADED_ON_DEMAND
It's needed for wait-before-submit, which drm_syncobjs don't
support.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
0429cc10d8 panvk: Prepare the panvk_device logic for CSF
The tiler heap is handled differently on CSF hardware, and we don't need
to allocate the tiler_heap buffer there.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
be96213634 panvk: Make sure push sets are reset when picked from the CommandPool
If we don't do that, we might end up with data from the previous user
of this set.

Fixes: 598a8d9d11 ("panvk: Collect allocated push sets at the command level")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
7f7e772bdf panvk: Don't make panvk_device size gen dependent
The panvk_device is used in gen-agnostic path, and which means we can't
make its size dependent on PAN_ARCH.

Fixes: 5067921349 ("panvk: Switch to vk_meta")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
6527cb742e panvk: Don't open-code vk_index_type_to_bytes()
While at it, store the index_size in bytes instead of bits.

Suggested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
9f094cdeaf panvk: Fix valhall_pack_buf_idx()
The descriptor lowering pass can add UBO loads to read descriptors, and
these loads already assume a nir_address_format_32bit_index_offset
format.

Bail out if we detect that case in valhall_pack_buf_idx().

Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 27beadcbdb ("panvk: Extend the shader logic to support Valhall")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
343bff7903 panvk: Drop the NO_MMAP flag when PANVK_DEBUG=trace
We have buffers that are not supposed to be CPU-mapped but are useful to
check when tracing is enabled.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
bae5235405 panvk: Kill the set_dirty() macro
It's unused and we're not supposed to manually set the dirty bits
anyway.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
a651826b80 panvk: Fix the varying pool label
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
2805804dce pan/desc: Make vertex_count a Midgard field
We don't need to pass the vertex count around on Bifrost/Valhall, since
the tiler descriptor is generated outside of emit_fbd() on those gens.

Let's move vertex_count under the midgard struct to make that clear.
This implies maintaining a vertex_count at the panfrost_batch level
in the gallium driver, but that's fine.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:56 +00:00
Boris Brezillon
11fcb23f74 pan/desc: Add a struct for valhall/bifrost to the union in pan_tiler_context
Valhall has extra tiler parameters for multilayer rendering that we will
need for the framebuffer descriptor emission. Let's add proper struct
for Valhall and Bifrost instead of assuming a mali_ptr is all we'll ever
need.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
2149a04de3 pan/kmod: Don't cap VM bind operations to one
Looks like some leftovers from a debugging session.

Fixes: 97f6a62f7e ("pan/kmod: Add a backend for panthor")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
07b31b2204 pan/cs: Add a facility to restrict register access
If the CS register file is used in a stateful mode, some of the registers
will survive the RUN_xxx boundary, and even serve as a context for
subsequent RUN_xxx calls.

Having a way to restrict register access outside specific sections of
code is a handy debug feature, so let's expose the necessary bits to
allow that.

It takes the form of a reg permission callback that gets called every
time a register serves are a source or destination, to make sure this
is allowed in this context.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
07c463d06b pan/cs: Add inline specifiers to a bunch of cs_ helpers
Just to make things consistent with the rest of the file, the compiler
was probably already inlining those anyway.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
a87c43def7 pan/cs: Add an optional load/store tracker to make sure we don't omit waits
With load/store operations being asynchronous, it's pretty easy to omit
a WAIT(LS) and end up with inconsistent register values or corrupted
stores.

Add an optional load/store tracker to detect such cases early on.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
b1934057cb pan/cs: Allow sparse register set passed to loads/stores
When it comes to copying stuff around, it becomes handy to be able
to have a discontiguous range of register to load to/store from so
we don't have to move stuff around to make things contiguous in the
register file.

Allow that by making register count the last bit in the mask rather
than counting bits.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
1a5ce4a96e pan/cs: Add helpers to emit match (AKA switch-case) blocks
We need for the dynamic scoreboard assignment we will do in panvk.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
8f825a51a8 pan/cs: Accept val=undef when cs_branch_label() condition is ALWAYS
The register is not used in that case anyway, so we can pick r0 and
call it a day.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Boris Brezillon
f6c3fb11ea pan/cs: Make sure we're not passed cs_now() to asynchronous instructions
FLUSH_CACHE2 is both deferrable and asynchronous. That means we should
always pass an explicit slot to signal instead of picking zero as we do
in cs_now().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
2024-09-11 12:58:55 +00:00
Daniel Schürmann
07b1fd64b7 aco/live_var_analysis: don't set lateKill for p_interp_gfx11 m0 operand
There is no danger of overwriting m0 anymore.

Fixes: dfc13fcf9f ('aco: introduce Operand flag 'CopyKill'')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31127>
2024-09-11 10:36:34 +00:00
Sviatoslav Peleshko
1aa7218a1f mesa: Reset vbo attributes after flushing them to Current in glPopAttrib
Fixes: 2fe771f4 ("vbo: use FlushVertices flags properly and clear NeedFlush correctly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11498
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31107>
2024-09-11 09:58:52 +00:00
Daniel Schürmann
a9d64fa1bd radv: promote VK_NV_compute_shader_derivatives -> VK_KHR_compute_shader_derivatives
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30972>
2024-09-11 08:37:46 +00:00
David Rosca
b6faf586e6 targets/vdpau: Build vdpau driver into libgallium when building with dri
Currently vdpau driver and dri driver are two separate libraries, when
radeonsi is enabled both libraries contain amdgpu winsys. radeonsi
needs shared winsys to ensure sync between OpenGL and VDPAU works.
Build vdpau driver into libgallium to avoid having two instances of amdgpu
winsys.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31079>
2024-09-11 08:07:21 +00:00
David Rosca
212d57f7e6 targets/va: Build va driver into libgallium when building with dri
Currently va driver and dri driver are two separate libraries, when
radeonsi is enabled both libraries contain amdgpu winsys. radeonsi
needs shared winsys to ensure sync between OpenGL and VAAPI works.
Build va driver into libgallium to avoid having two instances of amdgpu
winsys.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11598
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31079>
2024-09-11 08:07:20 +00:00
David Rosca
39f7ed5412 meson/megadriver: Add megadriver_libdir argument
To be able to install symlinks to megadriver in different directory.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31079>
2024-09-11 08:07:20 +00:00
Faith Ekstrand
7ebb2d1dc8 nvk: Only advertise compute_shader_derivatives when NAK is used
Fixes: e0e7d8d910 ("nvk: Advertise VK_NV/KHR_compute_shader_derivatives")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31125>
2024-09-10 19:27:10 -05:00
Sil Vilerino
6f82b1ea18 d3d12: Add support for HEVC range extension header parameters
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31117>
2024-09-10 23:06:34 +00:00
Sil Vilerino
92d6989fdc d3d12: Add support for HEVC 4:4:4 video encode using AYUV format
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31117>
2024-09-10 23:06:34 +00:00
Sil Vilerino
0161b98955 pipe: Add HEVC encode range extension caps, SPS and PPS params
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31117>
2024-09-10 23:06:34 +00:00
Christian Gmeiner
ec59a1d1b2 etnaviv: Drop assignment of get_timestamp
This hook is only called when PIPE_CAP_QUERY_TIMESTAMP is supported. Let's
drop it as it could confuse other mesa hackers.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Christopher Michael <cmichael@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31094>
2024-09-10 22:37:13 +00:00
Iván Briano
e4ee0a2ce1 anv: be consistent about aux usage with modifiers
In c1a7d520f3, we disabled AUX usage for imported images when they are
using an explicit modifier that doesn't support it.
We need to do the same when the modifier is picked by the driver,
otherwise the memory requirements reported for an exported image don't
match those we report for import.

Fixes: c1a7d520f3 ("anv: Disable aux if the explicit modifier lacks it")

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31051>
2024-09-10 22:09:41 +00:00
Mike Blumenkrantz
3db1a91bfe zink: delete erroneous kopper assert
certain present modes aren't supported by zink,
but that doesn't mean the driver needs to crash if
the driver supports them

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31121>
2024-09-10 21:38:41 +00:00
Faith Ekstrand
e0e7d8d910 nvk: Advertise VK_NV/KHR_compute_shader_derivatives
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31105>
2024-09-10 20:13:32 +00:00
Faith Ekstrand
b5ac20f13f nak: Shuffle gl_LocalInvocationID for quad derivatives
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31105>
2024-09-10 20:13:32 +00:00
Faith Ekstrand
9c4fa79e00 nak: Move subgroup_id and num_subgroups to lower_system_values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31105>
2024-09-10 20:13:32 +00:00
Faith Ekstrand
4602b52a1c nak: Add a NAK_SUBGROUP_SIZE #define
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31105>
2024-09-10 20:13:32 +00:00
Sil Vilerino
26a02b7df7 d3d12: Add HEVC support for on demand AUD NALUS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31114>
2024-09-10 19:16:15 +00:00
Sil Vilerino
1c490a79f2 pipe: Remove renew_headers_on_idr, insert_aud_nalu unused params
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31114>
2024-09-10 19:16:15 +00:00
Sil Vilerino
7df39b802d d3d12: Support for on demand vps, sps, pps, aud headers requests from frontend
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31114>
2024-09-10 19:16:15 +00:00
Caio Oliveira
eb68e6e84c anv: Advertise VK_KHR_compute_shader_derivatives
This was promoted from VK_NV_compute_shader_derivatives.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
eae637d83c spirv: Allow Mesh/Task to use derivative execution modes
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
1e7f1c2039 nir: Allow Mesh/Task to use implicit LOD when DERIVATIVE_GROUP is set
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
1cece2691f spirv: Prefer symbols from Khronos extension for compute shader derivatives
The extension was promoted, start using the KHR instead of
vendor-specific symbols.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
155c614c52 spirv: Update headers and metadata from latest Khronos commit
This corresponds to 2a9b6f951c7d6b04b6c21fe1bf3f475b68b84801
("Add Capability and Execution mode SPV_KHR_compute_shader_derivatives (#446)")
in https://github.com/KhronosGroup/SPIRV-Headers.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Caio Oliveira
807aa97a12 vulkan: Update XML and headers to 1.3.295
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30956>
2024-09-10 18:22:42 +00:00
Bernhard Rosenkränzer
397adfd453 dril: Fix return types of peglInitialize and peglTerminate
Fix return types of peglInitialize and peglTerminate to match
eglInitialize and eglTerminate

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31106>
2024-09-10 17:36:41 +00:00
Samuel Pitoiset
b4ae6eb5fc radv: use radv_upload_indirect_descriptor_sets() in DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
7be965bf17 radv: stop allocating upload space for indirect descriptors with DGC
The indirect descriptors are uploaded from the CPU and nothing needs
to be allocated in the DGC buffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
31875e92aa radv: make the helper that uploads indirect descriptors non-static
It will be used by DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
3deebeb20a radv: unify emitting non-indirect/indirect descriptor sets
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
bac5ad9f8d radv: rename radv_emit_descriptor_pointers() to radv_emit_descriptors_per_stage()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
2c2735083b radv: store the indirect descriptor sets VA to the descriptor state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Samuel Pitoiset
529d7ebdcc radv: cleanup some functions that emit shader user SGPRs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31096>
2024-09-10 15:07:04 +00:00
Pierre-Eric Pelloux-Prayer
ed781c7403 frontends/va: honor DRI_PRIME for VA_DISPLAY_WAYLAND
This matches the X11 behavior. Other display types are unaffected.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8069
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31012>
2024-09-10 14:32:23 +00:00
Pavel Ondračka
286bac97ad r300: remove nir_opt_load_store_vectorize
This is another remnant from ntt times, and at this point we have
everything as ubo_vec4 so this had zero effect anyway (and there was a
bug in the callback function as a bonus, but it got never called luckily).

No shader-db changes.

Fixes the r300 part of https://gitlab.freedesktop.org/mesa/mesa/-/issues/11350

Reviewed-by: Filip Gawin <filip@gawin.net>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30890>
2024-09-10 13:33:58 +00:00
Pavel Ondračka
c8c1cec1f7 ttn: unconditionally call nir_shader_gather_info
Mesa st always calls this and thus some drivers expect to have the
info. This fixes assertions in NineTests on iris.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6946
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Tested-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27460>
2024-09-10 12:38:46 +00:00
Pavel Ondračka
3b73c80280 ttn: use nir_shader_get_entrypoint in nir_shader_gather_info
To fix crash with serialized NIR in some circumstances.

Acked-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27460>
2024-09-10 12:38:46 +00:00
David Rosca
69c18607a9 pipe: Remove video enc header_flags
This is now replaced with raw headers.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927>
2024-09-10 11:58:26 +00:00
David Rosca
a308360fd4 radeonsi/vcn: Don't copy the pipe enc structs
There is no need to copy them, frontend calls begin_frame immediately
followed by encode_bitstream so we can use it directly.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927>
2024-09-10 11:58:26 +00:00
David Rosca
96f3daeaeb radeonsi: Remove unused radeon_temporal.h
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927>
2024-09-10 11:58:26 +00:00
David Rosca
c43f8cb0b9 radeonsi/vcn: Support raw packed headers for H264 and HEVC
This works by copying the input headers at the beginning of the output
bitstream buffer. VPS/SPS/PPS are still written by driver and slice
headers are written by FW, but all other headers are directly copied
from application input.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927>
2024-09-10 11:58:26 +00:00
David Rosca
12f60c1cd1 frontends/va: Allow multiple NALUs in coded buffer segments
Add PIPE_VIDEO_CODEC_UNIT_LOCATION_FLAG_SINGLE_NALU to set
VA_CODED_BUF_STATUS_SINGLE_NALU for each segment.
Always set this flag in d3d12 to keep the old behavior.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927>
2024-09-10 11:58:26 +00:00
David Rosca
1866f4d899 frontends/va: Support raw packed headers for H264 and HEVC
Make all packed headers received from application available
to drivers. Add emulation prevention bytes if the packed header
was sent without them, so the driver will always get the headers
with emulation prevention bytes and is able to directly copy them
to output bitstream as is.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927>
2024-09-10 11:58:25 +00:00
David Rosca
20f9418478 pipe: Add pipe_h264_nal_unit_type and pipe_h265_nal_unit_type enums
This will also be useful for drivers.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30927>
2024-09-10 11:58:25 +00:00
David Heidelberg
6bf7b5bcd8 nir_lower_mem_access_bit_sizes: Assert when 0 components or bits are requested
Prevent the accidental passing of 0 components or bits, as it makes no sense.

Cc: mesa-stable
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Suggested-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31103>
2024-09-10 11:17:48 +00:00
Karol Herbst
45b531fdfc rusticl: add nir debugging option
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
f098620c21 rusticl/kernel: add optimized Kernel variant
By default we have to take into account that the application could set
offsets, or that one kernel launch won't fit into a single hw dispatch.

In order to mitigate the overhead it causes at kernel runtime, and because
those things are in most cases irrelevant, we compile an optimized kernel
making a few assumptions.

We also make use of the the workgroup_size_hint as an additional
optimization.

This should speed up relatively small kernels significantly as it can cut
the instruction count in half for those.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
59f63381d4 rusticl/kernel: add CompilationResult to hold compilation artifacts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
41100e3743 rusticl/kernel: track if arg is dead inside CompiledKernelArg
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
6cf74419fe rusticl/kernel: split up nir compilation into various steps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
36550d9da3 rusticl/kernel: move assign_locations into CompiledKernelArg
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
76b2236834 rusticl/mesa: implement Clone for NirShader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
89b2c3927e rusticl/mesa: add more workgroup_Size functions to NirShader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
8383c727b2 rusticl/platform: add env variable to disable kernel variants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Karol Herbst
634366e1dc rusticl/kernel: move dead_var options into constant space
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30152>
2024-09-10 10:54:41 +00:00
Erik Faye-Lund
b59b2d4bfa mesa/main: tighten gl-version checks
If we allow this whenever the extension is supported by the driver, we
end up allowing out-of-spec behavior for instance on GLES 1.x.

So let's tighten these checks to consider the current API, by using the
new helpers.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31039>
2024-09-10 10:10:44 +00:00
Erik Faye-Lund
9068e4415a mesa/main: tighten glsl-version checks
We don't want to expose GLSL versions above what should be exposed for
the current API, otherwise we allow out-of-spec behavior.

This is unlikely to have any real-world effect, because most of the
time, the version is the highest supported. It's only if the version is
artificially limited that this should matter.

But it's also a bit cleaner this way.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31039>
2024-09-10 10:10:44 +00:00
Erik Faye-Lund
97b8febf3d mesa/main: add gles-compatible check helpers
We need to perform these checks fairly often; let's create helpers for
them.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31039>
2024-09-10 10:10:44 +00:00
Daniel Schürmann
dfc13fcf9f aco: introduce Operand flag 'CopyKill'
This flag indicates that the Operand must be copied in order to satisfy register
constraints. The copy is immediately killed by the instruction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30299>
2024-09-10 09:44:53 +00:00
Daniel Schürmann
91f65d5935 aco/live_var_analysis: use Clobbered flag to calculate additional operand demand
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30299>
2024-09-10 09:44:53 +00:00
Daniel Schürmann
5a6fa8a8eb aco: introduce new Operand flag 'Clobbered'
This flag indicates that the Operand's register gets clobbered by the instruction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30299>
2024-09-10 09:44:53 +00:00
Daniel Schürmann
1c14013b9e aco/live_var_analysis: Don't attempt to re-insert the same temporary twice into live set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30299>
2024-09-10 09:44:53 +00:00
Samuel Pitoiset
e621f0c173 radv: rework emitting indirect compute pipelines with DGC
Instead of recreating the packets in the DGC prepare shader, the best
solution is to emit them to a temporary CS object at pipeline creation
time. Then in the DGC prepare shader, the driver just needs to copy
the packets.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31101>
2024-09-10 09:13:44 +00:00
Samuel Pitoiset
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/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
b4d6d88c6b radv: add support for importing pipeline binaries
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
96a300a3f0 radv: add support for capturing pipeline binaries
When VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR is set, implementations
shouldn't store pipeline data to an internal cache.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
be06bfcbed radv: add initial support for pipeline binaries
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
32a4c9e117 radv: disable the in-memory cache when disableInternalCache is true
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
af76f48fc2 radv: make pipeline hashing functions non-static
They will be used to generate pipeline hashes from pCreateInfo.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
3423facbd1 radv: store whether a RT pipeline is a library to the shaders cache
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
0a15dcf95c radv: store the number of RT stages per pipeline to the shaders cache
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
42b1c728b2 radv: store the SHA1 RT stage to the shaders cache
When pipeline binaries are imported, that SHA1 would also need to be
imported in order to deduplicate shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
3d2cd4687c radv: rework helpers for serialize/deserialize shaders
They will be used to serialize/deserialize shaders for pipeline
binaries.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
279b5ca10c vulkan: skip the disk cache when disableInternalCache is true
The Vulkan spec says:
    "disableInternalCache can be used to disable the driver’s internal
     cache, allowing an application to take full control of both memory
     and disk usage."

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
60474c9d69 vulkan: Update XML and headers to 1.3.294
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30812>
2024-09-10 08:19:52 +00:00
Samuel Pitoiset
0c7896deef Revert "radv: specialize push constant stages with DGC"
This change was wrong but there is nothing testing this. For example,
if we have a pipeline with VS+GS+FS and DGC only updates push constants
for VS. On GFX9+, VS is merged to GS, so the VS push constants info
would be zero and nothing would be emitted.

This reverts commit 45319cb253.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31099>
2024-09-10 07:39:54 +00:00
David Rosca
656a03e583 glx: Destroy base screen after deinitScreen
Instead of destroying it before deinitScreen to match the original order.

Fixes: 407a9094f7 ("glx: move base screen destroy to glx_screen_cleanup")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31087>
2024-09-10 08:55:58 +02:00
Dave Airlie
7531f6fd9c radv/anv/video: handling encoding both sps and pps in same buffer
This API should allow encoding these back to back into the same
buffer, so handle it properly.

Cc: mesa-stable
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31086>
2024-09-10 06:03:15 +00:00
Dave Airlie
62320232de vl/bitstream: use an int32_t for se encoding.
This seems to fix a bug found with radv and ffmpeg encoding

Fixes: 1782ab4d8b ("util: add a bitstream encoder for video stream headers.")
Acked-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31086>
2024-09-10 06:03:15 +00:00
Jiale Zhao
a9e1ecf6f0 llvmpipe: add loongarch util_get_cpu_caps function
When use LA464(3A5000 pc), LLVM18 and kernel(which not supports lsx/lasx),
it will get a illegal instruction error. LA464 will return LA464 and
LA664 will return a generic when calling getHostCPUName(). Return LA464
name will add all feature(+f,+d,+lsx,+lasx,lvz) by default and generate
vector instruction, generic will add null. Hence we use util_get_cpu_caps
to judge if kernel supports lsx/lasx or not.

Set lsx and lasx by util_get_cpu_caps. Only LLVM 18 on loongarch
supports lsx and lasx completely. LLVM 16 isn't supported and
LLVM 17's LSX support is incomplete.

Signed-off-by: Jiale Zhao <zhaojiale@loongson.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30220>
2024-09-10 05:11:57 +00:00
Ian Romanick
a780305818 nir/algebraic: Optimize more comparisons with b2f
shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19781108 -> 19772614 (-0.04%)
instructions in affected programs: 372638 -> 364144 (-2.28%)
helped: 2915 / HURT: 0

total cycles in shared programs: 905907644 -> 905822682 (<.01%)
cycles in affected programs: 5573453 -> 5488491 (-1.52%)
helped: 2363 / HURT: 234

LOST:   42
GAINED: 16

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 152519634 -> 152519610 (-0.00%)
Cycle count: 17122707642 -> 17122710974 (+0.00%); split: -0.00%, +0.00%

Totals from 5 (0.00% of 633222) affected shaders:
Instrs: 2827 -> 2803 (-0.85%)
Cycle count: 83089 -> 86421 (+4.01%); split: -0.12%, +4.13%

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31068>
2024-09-10 04:15:58 +00:00
Jordan Justen
c5c349a690 intel/dev: Fix warning for max_threads_per_psd when devinfo->verx10 == 120
Although we don't want to rely on hwconfig for devinfo->verx10 == 120,
due to the dependence on closed source software, we do check to see if
hwconfig reports different values in the DEVINFO_HWCONFIG macro.

Matt was seeing this warning on 8086:a7a0:

> MESA: warning: INTEL_HWCONFIG_TOTAL_PS_THREADS (128) != devinfo->max_threads_per_psd (64)

Reported-by: Matt Turner <mattst88@gmail.com>
Fixes: 3e4f73b3a0 ("intel/dev: Update hwconfig => max_threads_per_psd for Xe2")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31077>
2024-09-10 03:21:12 +00:00
Sid Pranjale
27c09eacb7 glx: add a missing nullptr check
This caused GLX applications to segfault under zink.
This technically also fixes cleanup when any driver fails init

Signed-off-by: Sid Pranjale <mail@sidonthe.net>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31072>
2024-09-10 01:29:48 +00:00
Caio Oliveira
c20552678a spirv: Rename vtn_pointer::ptr_type to vtn_pointer::type
Now there's a single vtn_type associated with a vtn_pointer, so
discard the qualifier.

After this and previous changes, here's a summary of where/what types
are:

```
struct vtn_pointer *p;
p->type;           // type of this pointer
p->deref;          // NIR deref of this pointer (unchanged)
p->type->pointed;  // type of the object pointed by this pointer
```

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31069>
2024-09-10 00:46:20 +00:00
Caio Oliveira
e9ba715710 spirv: Remove (pointed) type from vtn_pointer
This can be obtained by the pointer type (currently at ptr_type).  For
the cases where there wasn't an user provided type for that, now create
an internal vtn_type.  This can happen when creating intermediate
vtn_pointer for complex loads/stores/copies.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31069>
2024-09-10 00:46:20 +00:00
Caio Oliveira
95d08643ed spirv: Rename vtn_type::deref to vtn_type::pointed
To avoid confusion with the vtn_pointer::deref that is a NIR deref.  New
name comes from description of OpTypePointer, where is described as the
"type of the object pointed to".

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31069>
2024-09-10 00:46:19 +00:00
Nanley Chery
c92e49e8f4 intel/isl: Always set EnableUnormPathInColorPipe
The TGL PRM says,

   This bit should never be programmed to 0

So, set it to true. I chose not to use the MBO attribute in genxml
because the field lacks the "Format: MBO" line in the PRM.

We previously made this programming conditional with commit 2e1be771e4
because of tests failing in
dEQP-GLES3.functional.texture.specification.tex*depth*. However, those
failures were fixed when we started using gl_FragDepth for depth buffer
copies in commit 6cec618e82.

Note: when bisecting this, I cherry-picked commit 7a68045b5d in order
to get past build failures related to a deprecated python function.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31066>
2024-09-09 23:48:31 +00:00
Sviatoslav Peleshko
fa51595c7f brw: Fix mov cmod propagation when there's int signedness mismatch
If there's difference between scan_inst dest type and inst src type we
should be more careful, because difference in signedness can cause
incorrect results after the propagation.

Updated ror-default.trace hash, as the change fixes misrendering there.

Fixes: b23432c5 ("intel/fs: Fix a cmod prop bug when the source type of a mov doesn't match the dest type of scan_inst")
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30998>
2024-09-09 22:13:08 +00:00
Sil Vilerino
eb920af780 d3d12: Set HEVC GOP state before calling d3d12_video_encoder_negotiate_requested_features_and_d3d12_driver_caps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31097>
2024-09-09 21:46:10 +00:00
Sil Vilerino
ef381a1e7b d3d12: Plumb constrained_intra_pred_flag and transform_8x8_mode_flag from pipe_h264_enc_pic_control
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31097>
2024-09-09 21:46:10 +00:00
Sil Vilerino
e5714059e1 d3d12: Fix setting of direct_8x8_inference_flag in the SPS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31097>
2024-09-09 21:46:10 +00:00
Jesse Natalie
0ae4afe034 d3d12: Fix shader selector hash to hash array instead of pointer-to-array
Fixes: 116d0bf7 ("d3d12: Set fractional var masks")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31083>
2024-09-09 21:17:25 +00:00
Lionel Landwerlin
05dc524c75 anv: selectively disable binding table usage on Gfx20
Workaround broken Gfx20 dynamic BTI.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e9f63df2f2 ("intel/dev: Enable LNL PCI IDs without INTEL_FORCE_PROBE")
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30931>
2024-09-09 20:33:25 +00:00
Georg Lehmann
8a43b1e7da aco/ra: do not reuse killed vcc
VCC should only be used if nessecary, to keep it free for instructions
that need/prefer it.

Foz-DB Navi31:
Totals from 132 (0.17% of 79395) affected shaders:
Instrs: 832538 -> 832608 (+0.01%); split: -0.03%, +0.04%
CodeSize: 4310888 -> 4301792 (-0.21%); split: -0.22%, +0.01%
Latency: 6238465 -> 6239198 (+0.01%); split: -0.04%, +0.05%
InvThroughput: 5332353 -> 5336363 (+0.08%); split: -0.03%, +0.10%
Copies: 59420 -> 59392 (-0.05%); split: -0.11%, +0.06%
VALU: 459318 -> 459187 (-0.03%); split: -0.03%, +0.00%
SALU: 109208 -> 109081 (-0.12%); split: -0.14%, +0.03%
VOPD: 6426 -> 6557 (+2.04%); split: +2.10%, -0.06%

Foz-DB Navi21:
Totals from 386 (0.49% of 79395) affected shaders:
Instrs: 3254046 -> 3252423 (-0.05%); split: -0.05%, +0.00%
CodeSize: 17839104 -> 17680580 (-0.89%); split: -0.89%, +0.00%
Latency: 24424322 -> 24426242 (+0.01%); split: -0.01%, +0.01%
InvThroughput: 10140681 -> 10143882 (+0.03%); split: -0.01%, +0.04%
SClause: 80731 -> 80738 (+0.01%); split: -0.01%, +0.02%
Copies: 293719 -> 293593 (-0.04%); split: -0.27%, +0.23%
Branches: 126625 -> 126626 (+0.00%); split: -0.00%, +0.00%
VALU: 2086026 -> 2086029 (+0.00%)
SALU: 502641 -> 501012 (-0.32%); split: -0.33%, +0.00%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30902>
2024-09-09 19:48:22 +00:00
Danylo Piliaiev
127f67a66a ir3: Respect aligment of required consts when allocating ubo,preamble
Optional const allocations (preamble, UBO, etc.) may shift the required
consts (e.g. driver params) more than they expect.
The free space for optional allocations should respect the aligment of
required consts that come after them.

Example: there are maximum 100 vec4 consts, driver params take 4 units,
something else takes 1 unit. Now premable thinks that there is 95 free
units, however driver params cannot start at offset=95 it has higher
aligment.

Fixes some d3d12 games.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31027>
2024-09-09 19:11:40 +00:00
David Rosca
1d71557397 docs: Remove OMX frontend
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30865>
2024-09-09 18:14:49 +00:00
David Rosca
9b6c27a320 Remove OMX
The API has been abandoned for some time now and there are no more users.
FFmpeg only supports encoding, but it never worked with Mesa.
GStreamer completely removed OMX support in 1.24 release.

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30865>
2024-09-09 18:14:49 +00:00
David Rosca
dba3454717 ci: Disable building OMX driver
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30865>
2024-09-09 18:14:49 +00:00
Rohan Garg
7f65035078 hasvk: enable VK_KHR_shader_relaxed_extended_instruction
The extension only affects non semantic instructions that need no
handling in the backend compiler.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31098>
2024-09-09 17:46:32 +00:00
Rohan Garg
5f3339e44a anv: enable the VK_KHR_shader_relaxed_extended_instruction feature
Fixes: 29a2e5 ('anv: enable KHR_shader_relaxed_extended_instruction')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31098>
2024-09-09 17:46:32 +00:00
Yinjie Yao
cce14abc5a radeonsi/vcn: Add support for QVBR rate control mode for VCN5
Bump up firmware version number to enable this mode.

Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31063>
2024-09-09 17:10:23 +00:00
Daniel Stone
ed4dc4261e ci/vulkan: Backport dEQP commit to make it less OOMy
It looks like the compute reconvergence tests are slamming us into OOM
on stoney at least; backport a commit which makes this less horrible.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
b943f42ef5 ci/intel-gpu-freq: Fix shellcheck warning
SC2319 is actually helpful! It's telling us that in:
    foo="$(bar)"
    [ -n "$foo" ] && ret=$?
ret actually gets us the return code from [ which is by definition zero,
instead of the return code from bar that we wanted.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
37c22dd403 ci: Bring back shader-db and drop LTO
This was the only thing running shellcheck and pytest. Unsurprisingly,
tons of them regressed whilst it was gone. Since these have now been
moved to other jobs, we can just bring back debian-build-testing in the
non-critical-path stage if we drop LTO, so let's do that as there hasn't
been any movement towards fixing it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
cc4db4bc36 ci: Run pytest once for both LAVA and bin/ci
There's no need for these to be totally separate, and also for the LAVA
tests to have been disabled for months.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
28aafcfaef ci: Bring back yamllint and shellcheck
These have been disabled for a while, but shouldn't have been.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
5aea59c37e ci: Fix shellcheck warnings in firmware download
Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 0441202d6b ("ci: add firmware files to rootfs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
9937ea5c1c ci/alpine: Fix shellcheck errors
Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 34753cefd8 ("ci/alpine: use llvm variables")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
873622e4ac ci/lava: Fix fastboot tests
We changed the args without changing the tests.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
6608b5ee46 ci/lava: Fix pytest not passing farm value
This was throwing an exception as a required argument was missing.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
1a87439518 ci/lava: Allow passing more args to pytest
Using -v or -vv is really helpful to debug failing tests.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
0a2606cf84 ci/lava: Don't dump venv into .venv
We could have a lot of venvs around. Pick a slightly more isolated one
for LAVA's pytest.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
3fd72266cd ci/lava: Make it easier to run pytest locally
If we don't have ${CI_PROJECT_DIR} set, just find it from where we're
running the script.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Daniel Stone
eae6e122ab ci/lava: Fix path to structured logger
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30978>
2024-09-09 16:27:07 +00:00
Mary Guillemard
ee73094957 mr-label-maker: Add panvk
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/31089>
2024-09-09 15:59:52 +00:00
Mary Guillemard
e47e94f9f2 panvk: Ensure to clear dirty dynamic state in panvk_cmd_draw
This was missing and causing dynamic state to remain dirty once set.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 1f57aae4e4 ("panvk: Move vkCmdDraw* functions to their own file")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31089>
2024-09-09 15:59:52 +00:00
Mary Guillemard
6b7f2fe25e panvk: Include new failures from VKCTS 1.3.9.1
Found with a full run, fraction runs seems to not trigger it so far.

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/31089>
2024-09-09 15:59:52 +00:00
Mary Guillemard
8bcabd8fb7 pan/lib: Simplify pan_blitter
now that we use vk_meta, we can remove a good chunk there.

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/31089>
2024-09-09 15:59:52 +00:00
Mary Guillemard
d8a9a5db32 panvk: Return proper buffer format feature flags
This fixes "dEQP-VK.api.buffer.invalid_buffer_features.*".

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/31089>
2024-09-09 15:59:52 +00:00
Mary Guillemard
569032a47d panvk: Reject SNORM only for color attachment and blend
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/31089>
2024-09-09 15:59:52 +00:00
Mary Guillemard
98bec56f2f panvk: Add atomic modifiers for r32 based formats
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/31089>
2024-09-09 15:59:52 +00:00
Konstantin Seurer
a53f11261f lavapipe: Do not adjust imageGranularity for different block sizes
Fixes: d747c4a ("lavapipe: Implement sparse buffers and images")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31038>
2024-09-09 13:41:35 +00:00
Konstantin Seurer
1ad1b356fc lavapipe: Implement VK_EXT_image_2d_view_of_3d with sparse textures
The following things needed to be fixed:
- lp_build_tiled_sample_offset has to use the block size of the
  underlying 3D texture. Remaining calculations use the dimensions of
  the view since the z-coordinate is undefined and has to be ignored.
- The layer offset must be calculated using llvmpipe_get_texel_offset.

Fixes: d747c4a ("lavapipe: Implement sparse buffers and images")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31038>
2024-09-09 13:41:35 +00:00
Konstantin Seurer
aa072b137b gallium,st/mesa: Add and set pipe_image_view::is_2d_view_of_3d
This will be useful for lavapipe since the Z-coordinate has to be
ignored for 2D view accesses.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31038>
2024-09-09 13:41:35 +00:00
Daniel Stone
f5b0699efa ci/angle: Clean up stray open-coded path
Somehow the sed seemed to miss this.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31059>
2024-09-09 12:54:34 +00:00
Daniel Stone
ad6907fb07 util/tests: Reduce load from sparse-array test
Only create 8 threads rather than 16, since otherwise that can hammer
fork a bit too much. Since it creates a bunch of threads, don't try to
run it in parallel with other tests either.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31059>
2024-09-09 12:54:34 +00:00
Daniel Stone
a78539e704 intel/tests: Reduce load from anv_tests
anv_tests tries to create a large number of threads, all of which wait
to be able to execute simultaneously, then launch a reasonable-size
workload.

Under load, cloning each of the 16 threads takes 15ms serially, for a
delay of 240ms before the tests start running; running the test 64
times gives us 15.36s for a single testcase in isolation, assuming that
the bits which aren't forking are free.

To give it the best shot at completing in time, mark it as a
non-parallelisable test (since Meson will also try to parallelise it
out), and also halve the number of runs it attempts. And then give it a
longer timeout so it doesn't fail even in extremis.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31059>
2024-09-09 12:54:34 +00:00
Eric Engestrom
10bc4cc480 docs: Fix linkcheck failures
This job has been failing for a while. Make it not fail.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31059>
2024-09-09 12:54:34 +00:00
Samuel Pitoiset
868272c2e9 radv: disable shaders linking with ESO when nextStage of VS/TES isn't present
For example, if the application wants to create linked shaders with
VS/TCS/TES but the next stage of TES isn't present, the driver would
have to compile shader variants (ie. nextStage could be NONE,TES,GS).

This isn't supported by RADV without re-compiling all shaders twice,
and it's also likely less optimal than compiling unlinked shaders.

This fixes recent CTS
dEQP-VK.shader_object.link.linked_linked_linked_unlinked_unlinked.*

Fixes: 37d7c2172b ("radv: add support for creating/destroying shader objects")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31062>
2024-09-09 11:00:52 +00:00
Pierre-Eric Pelloux-Prayer
316bf3bd8a kopper, dri: remove trace_screen_unwrap
pipe_screen::get_driver_pipe_screen can be used to achieve the same
thing.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30587>
2024-09-09 09:13:51 +00:00
Pierre-Eric Pelloux-Prayer
b7b10b971a radeonsi: add si_screen helper
Add a si_screen cast helper, with 2 purposes:
* correctly cast from pipe_screen to si_screen using get_driver_pipe_screen
* check that the result's type is correct

It's only useful when intending to use pipe_resource::screen as a si_screen.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30587>
2024-09-09 09:13:51 +00:00
Pierre-Eric Pelloux-Prayer
c9806b3595 gallium: add pipe_screen::get_driver_pipe_screen
pipe_resource has a screen pointer, and some drivers expect to be able
to cast it to their specialized version.
This works fine until one of the debug driver is used, because in this
case the driver's pipe_screen subclass can't be obtained with a simple
cast.
To overcome this limitation, this commit introduce a new function with
a default implementation to get the real driver pipe_screen from the
generic interface.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30587>
2024-09-09 09:13:51 +00:00
Pierre-Eric Pelloux-Prayer
06d903920e gallium/ddebug: fix sampler_states handling
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30587>
2024-09-09 09:13:51 +00:00
Pierre-Eric Pelloux-Prayer
4e362f738f gallium/ddebug: implement set_inlinable_constants
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30587>
2024-09-09 09:13:51 +00:00
Pierre-Eric Pelloux-Prayer
746e283fc3 gallium/ddebug: implement modifiers function
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30587>
2024-09-09 09:13:51 +00:00
Vignesh Raman
c6a9a9c3bc ci/deqp-runner: pass EXTRA_CARGO_ARGS
Without EXTRA_CARGO_ARGS='--target armv7-unknown-linux-gnueabihf',
deqp-runner binary was built for aarch64 architecture for arm32
builds and causing below failures on arm32 target,
/usr/bin/deqp-runner: cannot execute binary file: Exec format error

So pass EXTRA_CARGO_ARGS to cargo to fix this.

Fixes: 83d9cfa5 ("ci/deqp-runner: build from git checkout even on linux")
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31071>
2024-09-09 08:26:47 +00:00
Mary Guillemard
51157e7440 docs: Mark timer queries as done on panfrost
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30553>
2024-09-09 09:26:42 +02:00
Mary Guillemard
8ffda8093e panfrost: Implement timer queries
This implement PIPE_CAP_QUERY_TIMESTAMP, PIPE_CAP_QUERY_TIME_ELAPSED and
PIPE_CAP_TIMER_RESOLUTION by using the new uAPI in place.

Effectively, this expose ARB_timer_query, EXT_disjoint_timer_query and
OpenCL profiling on rusticl.

Co-authored-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30553>
2024-09-09 09:16:03 +02:00
Mary Guillemard
dee5223262 panfrost: Move occlusion query allocation to create_query
Also ensure to check if resource allocation failed.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30553>
2024-09-09 09:15:59 +02:00
Mary Guillemard
302127fe9d pan/kmod: Add timestamp uapi support
This adds support for timestamp in kmod based on new uAPI changes.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30553>
2024-09-09 09:15:47 +02:00
Mary Guillemard
76aae6c3da panfrost: Update panthor_drm.h
Update to sync with uAPI changes.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30553>
2024-09-09 09:15:44 +02:00
Mary Guillemard
80fe936be9 panfrost: Update panfrost_drm.h
Update to sync with uAPI changes.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30553>
2024-09-09 09:15:20 +02:00
David Rosca
95d15406c4 radv/video: Don't use multiple tasks for one encode operation
The begin op was sent as one task and encode op as another one.
This doesn't work on VCN2 and older, so just send both ops in same task.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31078>
2024-09-09 06:55:03 +10:00
David Rosca
60c38b9886 radv/video: Don't use op_close in encode
This should only be used on video session destroy, but at that point
we don't have command buffer. RENCODE_IB_OP_CLOSE_SESSION is optional,
so it's okay not using it at all.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31078>
2024-09-09 06:54:47 +10:00
Caio Oliveira
2a5a12cb71 intel/executor: Small fixes to the help message
Add missing @eot to the example.
Reword INTEL_DEBUG=color description.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31076>
2024-09-07 16:32:50 +00:00
Mike Blumenkrantz
1e17f49baf ci: add --pipeline-url to trace update script
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31070>
2024-09-07 12:15:35 +00:00
Mike Blumenkrantz
f944c18fad ci: fix trace update script
this was broken by various things

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31070>
2024-09-07 12:15:35 +00:00
David Rosca
e509139f61 radeonsi/vcn: Add support for H264 8x8 transform on VCN5
Enabling this gives slight increase in quality.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31020>
2024-09-07 04:48:18 +00:00
David Rosca
22d98e35cd radeonsi/vcn: Stop hardcoding values in VCN version overrides
It only makes it more likely to forget updating all functions when
implementing these features and cause issues.
Also fixes H264 constrained_intra_pred on VCN5.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31020>
2024-09-07 04:48:18 +00:00
David Rosca
cd2562117a frontends/va: Parse more H264 PPS for transform_8x8_mode_flag
Also use constrained_intra_pred_flag from pic params.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31020>
2024-09-07 04:48:18 +00:00
Marek Olšák
1537b9355a ac,radeonsi: update comments related to the L2 cache, use "L2", not "TC"
"GL2" is also OK. "TC-compatible" is also OK.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30869>
2024-09-07 01:51:23 +00:00
Marek Olšák
1b94137039 ac/nir/meta: move the "skip compute if no DCC image stores" condition to common
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30869>
2024-09-07 01:51:23 +00:00
Marek Olšák
5250128c6a ac: fix WAVES_PER_SH value for gfx12
not a serious issue because we only use it for PRIME without SDMA IIRC

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30869>
2024-09-07 01:51:23 +00:00
Alyssa Rosenzweig
1753bf599c ci: update traces
🤕

thanks Mike

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
b7542c4390 nir: CSE comparisons in atan2
Same code generated on AGX but simplified NIR.

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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
7546ae96a7 nir: drop NaN fixup for atan
this existed due to the min/max, per the comment. now that we don't do min/max,
the whole routine is NaN correct so the fixup is pointless.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Suggested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
ab8547a002 nir: push up abs in atan2 calculation
everybody has abs on fmul, not everyone has abs on bcsel. should help agx and
bifrost.

Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
398e1ad46c nir: fuse ffma for atan range fixup
Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
47e7cd268c nir: negate an expression in atan
we're going to fix up the sign immediately anyway.

Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
5318b8868b nir: simplify atan range reduction fixup
the original version sure is creative.

Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
87b99d5797 nir: use copysign for atan
this does two things:

* ignores sign of negative numbers which let us play fast and loose later in th
  series
* avoids an expensive fsign instruction in favour of a cheap bitwise op

Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
95215a094a nir: extend copysign for no-integer hw
Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
0a4a0df283 nir: push down fabs for atan
worse in terms of NIR instruction count but lets the fabs fold easier. (on agx,
which has fabs on comparisons and fmul but not on bcsel. should be no worse if
ISA has fabs on all 3.)

Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
8579375777 nir: simplify atan range reduction
just implement what the comment says, don't be clever. the clever thing is worse
on all architectures i'm familiar with, because the fdiv will turn into
fmul+frcp.

Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
a32b1a975d nir: correct comment for atan range reduction
the code did not match the comment, blew a sign.

Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
4fc3e34f2f nir: use Horner's method for atan
Signed-off-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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
0c81a29db6 virgl: set no_integers
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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
a52f606647 svga: set no_integers
for vgpu9 but not 10

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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
4b95fb2988 freedreno/a2xx: set no_integers
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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
531538f678 etnaviv: set no_integers
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/30934>
2024-09-07 00:54:35 +00:00
Alyssa Rosenzweig
f79f63f8b8 lima: set no_integers
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/30934>
2024-09-07 00:54:35 +00:00
Boyuan Zhang
8bf7562416 radeonsi/vcn: fix loop filter across slices
PPS header should use pps_loop_filter_across_slices_enabled_flag instead
of slice_loop_filter_across_slices_enabled_flag according to HEVC SPEC.

Slice header should also use pps_loop_filter_across_slices_enabled_flag
as one of the condition to determine if slice flag needs to be present.

V2: Apply pps_loop_filter_across_slices_enabled_flag to loop_filter as well
So modify loop_filter_across_slices_enabled value to be pps one instead

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31064>
2024-09-06 22:48:17 +00:00
Mohamed Ahmed
af15cceff4 nvk: Use stride in the explicit modifier case for linear images
Fixes: f1fdffa1b2 (nvk: Support image creation with modifiers)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31045>
2024-09-06 19:37:09 +00:00
Sil Vilerino
fed08a4ac8 Fix definitions of PIPE_BIND_VIDEO_DECODE/ENCODE_DPB as they conflict with PIPE_BIND_SCANOUT and PIPE_BIND_SHARED
Fixes: f8145fe691 ("pipe: Add PIPE_BIND_VIDEO_DECODE_DPB/PIPE_BIND_VIDEO_ENCODE_DPB")

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31067>
2024-09-06 18:53:11 +00:00
Samuel Pitoiset
eab5b453cd radv: fix allocating sparse descriptor buffers in the 32-bit addr space
There are two bugs:
- VK_KHR_maintenance5 added VkBufferUsageFlags2CreateInfoKHR, so
checking for pCreateInfo->usage is incomplete
- this was also missing the usage flag for descriptor buffer with samplers

This fixes recent VKCTS coverage in
dEQP-VK.binding_model.descriptor_buffer.*.

Fixes: 059391b631 ("radv: use 32bit va range for sparse descriptor buffers")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31054>
2024-09-06 18:27:37 +00:00
Dylan Baker
a089d8e89b docs: update sha sums for 24.2.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31065>
2024-09-06 18:19:24 +00:00
Dylan Baker
d6c1bda9eb docs: update sha sums for 24.2.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31065>
2024-09-06 18:19:24 +00:00
Dylan Baker
b489dc4918 docs: add release notes for 24.2.2
Conflicts:
	docs/relnotes.rst

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31065>
2024-09-06 18:19:24 +00:00
Mike Blumenkrantz
b6f201b173 meson: require dri3 modifiers
the year is 2024 and we have the technology

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31044>
2024-09-06 17:34:17 +00:00
Tapani Pälli
0489df9a51 glsl: set a version to standalone compiler context
Upcoming more strict context vs glsl version checks will fail otherwise.
Since standalone compiler requires ARB_ES3_2_compatibility that requires
GL 4.5 we simply set that as the context version.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31061>
2024-09-06 14:32:33 +00:00
Tapani Pälli
62799fcdd5 iris: initialize pixel struct to zero when setting clear color
Otherwise we can end up with uninitialized values, this fixes following
valgrind warning:

==71705== Uninitialised byte(s) found during client check request
==71705==    at 0x73B6DB8: util_bitpack_uint (bitpack_helpers.h:55)
==71705==    by 0x73B6DB8: GFX11_PIPE_CONTROL_pack (gen11_pack.h:19885)
==71705==    by 0x73B6DB8: iris_emit_raw_pipe_control (iris_state.c:10022)
==71705==    by 0x6F93386: iris_emit_pipe_control_write (iris_pipe_control.c:97)
==71705==    by 0x6FBCCAA: iris_resource_update_indirect_color (iris_resolve.c:1241)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30990>
2024-09-06 13:19:04 +00:00
Tapani Pälli
39a1f53890 anv: initialize pixel struct to zero when setting clear color
Otherwise we can end up with uninitialized values, this fixes following
valgrind warning:

==31283== Uninitialised byte(s) found during client check request
==31283==    at 0x503E4DE: anv_batch_bo_finish (anv_batch_chain.c:345)
==31283==    by 0x504220A: anv_cmd_buffer_end_batch_buffer (anv_batch_chain.c:1103)
==31283==    by 0x55A0E4F: end_command_buffer (genX_cmd_buffer.c:3455)
==31283==    by 0x55A0E82: gfx11_EndCommandBuffer (genX_cmd_buffer.c:3466)
==31283==    by 0x11233A: ??? (in /usr/bin/vkcube)
==31283==    by 0x10BDEE: ??? (in /usr/bin/vkcube)
==31283==    by 0x49B5149: (below main) (in /usr/lib64/libc.so.6)
==31283==  Address 0xc10c4d8 is 1,240 bytes inside a block of size 8,192 client-defined
==31283==    at 0x5036EF6: anv_bo_pool_alloc (anv_allocator.c:1284)
==31283==    by 0x503E0E1: anv_batch_bo_create (anv_batch_chain.c:262)
==31283==    by 0x5040D3F: anv_cmd_buffer_init_batch_bo_chain (anv_batch_chain.c:868)
==31283==    by 0x504F9C1: anv_create_cmd_buffer (anv_cmd_buffer.c:147)
==31283==    by 0x6B718C4: vk_common_AllocateCommandBuffers (vk_command_pool.c:206)
==31283==    by 0x4FB06B2: vkAllocateCommandBuffers (trampoline.c:1996)
==31283==    by 0x111E6B: ??? (in /usr/bin/vkcube)
==31283==    by 0x10BDEE: ??? (in /usr/bin/vkcube)
==31283==    by 0x49B5149: (below main) (in /usr/lib64/libc.so.6)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30990>
2024-09-06 13:19:04 +00:00
Danylo Piliaiev
3886a3014d tu: Fix ZPASS_DONE having stale value with generic clear+early frag test
If the next renderpass uses the same depth attachment, clears it
with generic clear - ZPASS_DONE may somehow read stale values that
are apparently invalidated by CCU_INVALIDATE_DEPTH.

Fixes:
 dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_alpha_to_coverage_samples_2_maintenance5
 dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_alpha_to_coverage_samples_4_maintenance5
 dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_samples_2_maintenance5
 dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_samples_4_maintenance5

When running them with TU_DEBUG=sysmem

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30858>
2024-09-06 10:01:49 +00:00
Georg Lehmann
6ac576ceb0 radv/ci: update trace checksums
Single pixel differences that are indistinguishable to my eyes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28676>
2024-09-06 09:16:21 +00:00
Timur Kristóf
6e000d2817 radv: Determine linked I/O info after nir_opt_varyings.
This makes it possible to not allocate I/O space
(such as LDS or VRAM) for I/O slots that were eliminated
by nir_opt_varyings.

Fossil DB stats on Rembrandt:

Totals from 896 (1.13% of 79395) affected shaders:
MaxWaves: 19452 -> 19488 (+0.19%)
Instrs: 443693 -> 443711 (+0.00%); split: -0.01%, +0.01%
CodeSize: 2331788 -> 2330904 (-0.04%); split: -0.04%, +0.01%
VGPRs: 43088 -> 42992 (-0.22%)
Inputs: 10344 -> 9198 (-11.08%)
Outputs: 7991 -> 6845 (-14.34%)
LDS: 3537408 -> 3184128 (-9.99%)
Latency: 1636786 -> 1636899 (+0.01%); split: -0.01%, +0.01%
InvThroughput: 359066 -> 358825 (-0.07%); split: -0.08%, +0.01%
VClause: 12106 -> 12109 (+0.02%); split: -0.02%, +0.05%
SClause: 6770 -> 6766 (-0.06%); split: -0.07%, +0.01%
Copies: 26532 -> 26540 (+0.03%); split: -0.02%, +0.05%
PreVGPRs: 32345 -> 32342 (-0.01%); split: -0.01%, +0.00%
VALU: 288476 -> 288501 (+0.01%); split: -0.00%, +0.01%
SALU: 44527 -> 44530 (+0.01%); split: -0.00%, +0.01%

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/28676>
2024-09-06 09:16:21 +00:00
Timur Kristóf
17f6ab28cc radv: Add new linking step and use nir_opt_varyings.
The nir_opt_varyings pass is the new NIR solution for shader
linking, with new features including better I/O compaction,
packing 16-bit I/O, inter-stage code motion and more.

Fossil DB stats on Rembrandt:

Totals from 34585 (43.56% of 79395) affected shaders:
MaxWaves: 873362 -> 873260 (-0.01%); split: +0.11%, -0.12%
Instrs: 21543639 -> 21526956 (-0.08%); split: -0.27%, +0.19%
CodeSize: 115077568 -> 115015536 (-0.05%); split: -0.25%, +0.20%
VGPRs: 1465152 -> 1464192 (-0.07%); split: -0.29%, +0.22%
Inputs: 161776 -> 158711 (-1.89%); split: -1.90%, +0.00%
Outputs: 46532551993 -> 46532548680 (-0.00%); split: -0.00%, +0.00%
LDS: 70597120 -> 70794752 (+0.28%); split: -0.04%, +0.32%
Latency: 162963576 -> 162785055 (-0.11%); split: -0.25%, +0.14%
InvThroughput: 37356298 -> 37261700 (-0.25%); split: -0.37%, +0.12%
VClause: 427827 -> 427105 (-0.17%); split: -0.35%, +0.18%
SClause: 669989 -> 668623 (-0.20%); split: -0.36%, +0.15%
Copies: 1582166 -> 1582592 (+0.03%); split: -0.36%, +0.39%
Branches: 523203 -> 523789 (+0.11%); split: -0.04%, +0.15%
PreSGPRs: 1272992 -> 1273228 (+0.02%); split: -0.05%, +0.07%
PreVGPRs: 1164295 -> 1161623 (-0.23%); split: -0.43%, +0.20%
VALU: 13733432 -> 13714109 (-0.14%); split: -0.35%, +0.21%
SALU: 2828974 -> 2831841 (+0.10%); split: -0.12%, +0.22%
VMEM: 748396 -> 748500 (+0.01%); split: -0.16%, +0.18%
SMEM: 1263487 -> 1263329 (-0.01%); split: -0.03%, +0.02%

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/28676>
2024-09-06 09:16:21 +00:00
Timur Kristóf
fcb2c62b63 radv: Add NIR XFB IO intrinsic info to legacy stages not just NGG.
Some NIR passes (such as nir_opt_varyings) rely on having the
XFB info in explicit I/O intrinsics. If we want to use those,
we need to add this 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/28676>
2024-09-06 09:16:21 +00:00
Timur Kristóf
79df320463 ac/nir: Move varying cost functions from radeonsi to common code.
This code will be shared between RADV and RadeonSI.

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/28676>
2024-09-06 09:16:21 +00:00
Samuel Pitoiset
5fd3be6f1b radv: stop relying on the VS for emitting VBO descriptors in DGC
This is required for experimenting indirect graphics pipelines with DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31040>
2024-09-06 07:04:59 +00:00
Samuel Pitoiset
53c760c388 radv: pass vb_desc_usage_mask in radv_dgc_params
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31040>
2024-09-06 07:04:59 +00:00
Samuel Pitoiset
4bd4f037b5 radv: emit all VBO descriptors in the prepare DGC shader
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31040>
2024-09-06 07:04:59 +00:00
Samuel Pitoiset
8397e15019 radv: use radv_vbo_info for emitting descriptors with DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31040>
2024-09-06 07:04:59 +00:00
Samuel Pitoiset
a1646f468d radv: compute rsrc3 for VBO descriptors in NIR for DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31040>
2024-09-06 07:04:59 +00:00
Samuel Pitoiset
91fdce3f5a radv: add a helper to get VBO info for emitting descriptors
This will be used to rework VBO in DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31040>
2024-09-06 07:04:59 +00:00
Caio Oliveira
ce9e2dbc62 vk/runtime: Allow "require full subgroups" for Mesh/Task
Per description of VkPipelineShaderStageCreateFlags

```
  VK_PIPELINE_SHADER_STAGE_CREATE_REQUIRE_FULL_SUBGROUPS_BIT specifies
  that the subgroup sizes must be launched with all invocations active in
  the task, mesh, or compute stage.
```

Future CTS tests will use that.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31023>
2024-09-06 05:49:07 +00:00
Gurchetan Singh
1e84588887 vulkan/android: change vk_enum_defines.h path
To match everything else in vulkan/runtime.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31030>
2024-09-05 22:59:58 +00:00
Gurchetan Singh
bcc1950886 vulkan: fix glibc AOSP build
Certain AOSP targets feature a glibc or musl-based build,
where (__ANDROID__) isn't defined, but:

- ANDROID is defined
- the relevant headers are present.

For such builds, buffer_handle_t shouldn't be defined
internally.

Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31030>
2024-09-05 22:59:58 +00:00
Georg Lehmann
6378bbaa82 nir/opt_algebraic: reassociate constants in ior(iand) chains
Mostly affects one F1_23 shader that packs bitfields bit by bit.

Totals from 3 (0.00% of 79395) affected shaders:
Instrs: 5004 -> 4202 (-16.03%)
CodeSize: 30992 -> 23952 (-22.72%)
Latency: 28894 -> 28464 (-1.49%)
InvThroughput: 4095 -> 3934 (-3.93%)
Copies: 363 -> 376 (+3.58%)
PreVGPRs: 110 -> 109 (-0.91%)
VALU: 3035 -> 2504 (-17.50%)
SALU: 463 -> 459 (-0.86%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31009>
2024-09-05 22:04:05 +00:00
Rob Clark
0adaf92014 freedreno/drm: Fix ring_heap flags
RING_FLAGS has FD_BO_HINT_COMMAND so we can't mask out the _FD_BO_HINTS.

Fixes: a3fb2b07aa ("freedreno: Add bo usage hints")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31050>
2024-09-05 21:25:34 +00:00
Timur Kristóf
4d5bc893b4 ac/nir/tess: Remove no_inputs_in_lds.
When there are no VS outputs, we expect that the drivers set
the LS-HS vertex stride to zero, which will produce the
same result as no_inputs_in_lds did.

Remove the unnecessary code path from the output lowering.

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/30962>
2024-09-05 19:54:29 +00:00
Marek Olšák
b7136d0890 radeonsi: pass TCS inputs_read mask to LS output lowering on GFX9 + monolithic
This will allocate less LDS for LS outputs if there are holes between
varyings when we have monolithic merged LS+TCS. (it removes the holes)

There are 2 steps to this:
- add helper si_shader_lshs_vertex_stride and use it everywhere
- pass the TCS inputs_read bitmask instead of the "map" callback
  to si_lower_ls_outputs_mem

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30962>
2024-09-05 19:54:29 +00:00
Marek Olšák
52c41f25de ac/nir/tess: don't allocate LDS for HS inputs that are passed via VGPRs
Right now we don't allocate LDS for HS inputs when all HS inputs are passed
via VGPRs.

This changes it to skip allocating exactly the HS inputs passed via VGPRs
by reducing the inputs_read mask to remove holes.

radeonsi changes to the LDS allocation will be in a different MR.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30962>
2024-09-05 19:54:29 +00:00
Yiwei Zhang
0767f91c8a venus: avoid over-caching sfb cmds
For most runtime usages, e.g. apitrace via zink on venus, the sfb cmds
normally don't exceed 3. So a limit of 5 cmds would be enough. This
would avoid that dEQP-VK.synchronization.basic.timeline_semaphore.chain
can easily leave 700+ free cmds in the cache.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31035>
2024-09-05 19:17:22 +00:00
Faith Ekstrand
4aa1259eb4 nvk: Adverties VK_KHR_dynamic_rendering_local_read
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
2024-09-05 17:55:21 +00:00
Faith Ekstrand
84de6c12b2 nvk: Emit SET_CT_SELECT based on the dynamic color location map
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
2024-09-05 17:55:21 +00:00
Faith Ekstrand
b1abf771c7 nvk: Reset rendering attachment locations in BeginCommandBuffer/Rendering
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
2024-09-05 17:55:21 +00:00
Faith Ekstrand
9ba70bb1ed vulkan: Expose a vk_cmd_set_rendering_attachment_locations() helper
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
2024-09-05 17:55:21 +00:00
Faith Ekstrand
ea783a96b8 vulkan: Allow pColorAttachmentLocations == NULL in CmdSetRenderingAttachmentLocationsKHR()
Fixes: fe19405c46 ("vulkan/runtime: handle new dynamic states for attachment remapping")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
2024-09-05 17:55:21 +00:00
Faith Ekstrand
c626be82f4 vulkan: Add a helper for getting VkRenderingAttachmentLocaiontInfoKHR
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
2024-09-05 17:55:21 +00:00
Faith Ekstrand
0fd0437993 nvk: Add all_linear to nvk_rendering_state
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
2024-09-05 17:55:21 +00:00
Faith Ekstrand
e533484d06 nvk: Take depth image layer counts from the VkRenderingInfo
Otherwise OOB layers may render to the wrong layer in the depth image.
While we're here, add the same layer count asserts for color images.

Fixes: 9345b95346 ("nvk: Bind 3D depth/stencil images as 2D arrays")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
2024-09-05 17:55:21 +00:00
Faith Ekstrand
d7d0287237 nvk: Don't do linear<->tiled copies for rendering suspend/resume
This also fixes a bug where we were potentially emitting copy commands
after we'd called nvk_cmd_buffer_push() but before finishing the current
push.  Rust would have caught this...

Fixes: bca2f13dd8 ("nvk: enable rendering to DRM_FORMAT_MOD_LINEAR images")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31033>
2024-09-05 17:55:21 +00:00
Erico Nunes
6f3c003433 v3dv: unconditionally expose VK_EXT_queue_family_foreign
Zink currently requires VK_EXT_queue_family_foreign to set
PIPE_CAP_DMABUF, which is one of the requirements to create a
gbm context.
v3dv already conditionally supported this extension for Android.
As it is now required for Zink in Mesa, move it to the driver's
common set.
This allows v3dv to create gbm contexts with Zink again since
this was made a stricter requirement as a side effect of
ab08b79ef7 ("gbm: use driver check for dmabuf export").

Tested with Zink on a gbm EGL application as well as sway with
the wlroots Vulkan backend, which also requires this extension.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30938>
2024-09-05 15:44:01 +00:00
Boyuan Zhang
d756966a28 radeonsi/vcn/enc:enable hevc cu_qp_delta for vcn2+
Set cu_qp_delta based on value passed in, remove hardcoded values.
Only enable this for vcn2+.

V2: diff_cu_qp_delta_depth has to be 0 due to hw limitation
cu_qp_delta needs to be enabled for qp map and rc to work properly.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31007>
2024-09-05 14:55:12 +00:00
Boyuan Zhang
5330ba8d37 frontends/va: get cu_qp_delta from vaapi
Get cu_qp_delta_enabled_flag and diff_cu_qp_delta_depth from vaapi interface

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31007>
2024-09-05 14:55:12 +00:00
Aleksi Sapon
13a2805325 llvmpipe: FlameGraph profiling support
For use outside Linux.

Enable dumping JIT address mappings and assembly
using an environment variable. Add a script to map
JIT addresses in collapsed stacks, and annotate
assembly dumps with sample counts.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30626>
2024-09-05 14:19:20 +00:00
Aleksi Sapon
6a3234ee3b llvmpipe: improvements to JIT assembly dump
Fix disassembly off-by-one instruction bug, add
Aarch64 support, add addresses to symbol names,
cleanup iostream usage.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30626>
2024-09-05 14:19:20 +00:00
David Rosca
af8c680087 vulkan/wsi: Fix stack-use-after-scope in x11_surface_create_swapchain
drm_image_params and num_modifiers are used outside the if-scope as
wsi_swapchain_init argument.

Fixes: 8f6fca89aa ("meson: delete dri3 build option")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31036>
2024-09-05 13:18:57 +00:00
David Heidelberg
63781071db panfrost: drop leftover definition after pan_nir_lower_64bit_intrin removal
Fixes: bd0d3c7b1c ("panfrost: drop pan_nir_lower_64bit_intrin")
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30994>
2024-09-05 11:02:29 +00:00
Samuel Pitoiset
165c026161 radv: add a helper to write a single vertex descriptor with DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31018>
2024-09-05 10:29:55 +00:00
Samuel Pitoiset
374abea26b radv: pass use_per_attribute_vb_descs in radv_dgc_params
This is more like a shader metadata parameter.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31018>
2024-09-05 10:29:55 +00:00
Samuel Pitoiset
955f148db1 radv: specialize one more VBO parameter with DGC
This covers the case when unused VBO bindings are defined with DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31018>
2024-09-05 10:29:55 +00:00
Samuel Pitoiset
e99ea580f7 radv: fix missing attribute offset with dynamic VS inputs and DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31018>
2024-09-05 10:29:55 +00:00
Karol Herbst
14ebecd787 clc: fix compilation error with llvm-20
LLVM commit:
924a7d83b4

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11814
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30980>
2024-09-05 09:44:03 +00:00
David Heidelberg
d16581652f ci/iris: implement nightly CL testing using piglit on ADL
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/29516>
2024-09-05 08:57:51 +00:00
David Heidelberg
aaa332a751 ci/freedreno: add Adreno 306/307 occasional timeout
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31037>
2024-09-05 17:13:58 +09:00
Zan Dobersek
4c359eae01 tu: use instance indices in RD dump filenames
Until now the RD dumps were stored in files on a per-device basis, using
the device index but assuming only one Vulkan instance is active. With
multiple active instances, different devices separated across those
instances could end up storing RD dumps into files with the same name.

tu_instance struct now has an index member variable that's assigned upon
creation with an incrementally-increasing global counter value. RD dump
output name now also contains this instance index, avoiding the described
naming collisions.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Fixes: f9c4e25483 ("freedreno: add fd_rd_output facilities for gzip-compressed RD dumps")
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30977>
2024-09-05 08:47:27 +02:00
Lionel Landwerlin
aa494cbacf brw: align spilling offsets to physical register sizes
In commit fe3d90aedf ("intel/fs/xe2+: Fix calculation of spill message
width for Xe2 regs.") we aligned the width of scratch messages to
physical register sizes (32B prior to Xe2, 64B for Xe2+).

But our spilling offsets are computed using the register allocations
sizes which are in units of 32B. That means on Xe2, you can end up
spilling a virtual register allocated at 32B (which we use for surface
state computations with exec_all) and then the spilling of that
register will be emitted in SIMD16, having the upper 8 lanes
overwriting the next spilled register.

We could potentially limit spills to SIMD8 messages on Xe2 (only
writing 32B of data), but we're also unlikely to have all 32B virtual
register spilled next to one another. And if not tightly packed, we
would have 64B registers stored on 2 different cachelines which sounds
inefficient.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: fe3d90aedf ("intel/fs/xe2+: Fix calculation of spill message width for Xe2 regs.")
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30983>
2024-09-04 23:05:31 +00:00
Erico Nunes
4f99e84367 docs/ci: pass -D platforms=[] to avoid dependencies
Since commit 8f6fca89aa ("meson: delete dri3 build option"),
the docs build attempts to find dependencies like xshmfence which
are not found in the current docs image.
Avoid checking for those dependencies by not enabling any platforms,
which will skip the check overall.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31025>
2024-09-04 22:57:25 +00:00
Sil Vilerino
0190523021 d3d12: Use pipe_h264_enc_seq_param.max_num_ref_frames instead of pipe_video_codec.max_references in SPS
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31017>
2024-09-04 22:07:33 +00:00
Sil Vilerino
22bb1d4a94 d3d12: Use d3d12_video_encoder_get_current_max_dpb_capacity in tex array pool instead of separate constant
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31017>
2024-09-04 22:07:33 +00:00
Sil Vilerino
6e745073dc d3d12: Fix d3d12_video_encoder_get_current_max_dpb_capacity to report actual max slots number in DPB
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31017>
2024-09-04 22:07:33 +00:00
Sil Vilerino
72f4b7f01b d3d12: Remove max_references usage from frontend to reserve barriers array
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31017>
2024-09-04 22:07:33 +00:00
Sil Vilerino
7c8ffc34aa pipe: Add PIPE_H26X_MAX_REFERENCES
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31017>
2024-09-04 22:07:33 +00:00
Jordan Justen
f817870aa9 anv: Don't warn about unsupported devices if INTEL_FORCE_PROBE was used
The user must have used INTEL_FORCE_PROBE to force the device to be
loaded, so they specifically opted-in to enabled unsupported device
support.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31011>
2024-09-04 12:09:12 -07:00
Jordan Justen
ee727d7b66 intel/dev: Add devinfo::probe_forced based on INTEL_FORCE_PROBE
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31011>
2024-09-04 12:09:08 -07:00
Jordan Justen
aaaf9a3b87 anv: Do hasvk devices check first
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31011>
2024-09-04 12:09:05 -07:00
Jordan Justen
16a835ed3d anv: Drop "not yet supported" warning for Xe2
Backport-to: 24.2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31011>
2024-09-04 12:09:01 -07:00
José Roberto de Souza
ca13e35304 anv: Add anv_device_perf_close()
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/31026>
2024-09-04 10:04:38 -07:00
José Roberto de Souza
2d216c12fa anv: Drop useless '>= 0' check over a unsigned
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/31026>
2024-09-04 10:04:38 -07:00
José Roberto de Souza
023120d1fc intel/perf: Fix intel_gem.h include
The intention here was to get include the common intel_gem.h to
get the intel_ioctl() signature.

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/31026>
2024-09-04 10:04:38 -07:00
José Roberto de Souza
5d4e319aec anv: Nuke perf_metric
This is not used.

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/31026>
2024-09-04 10:04:37 -07:00
Mike Blumenkrantz
8f6fca89aa meson: delete dri3 build option
this existed for historical reasons, but realistically now it should
be possible to build mesa with dri3 always enabled. additionally,
this check was often used as a substitute for having drm functionality,
which is sort of similar but also not really a direct match

this simplifies a bunch of conditionals and prevents users from footgunnning
themselves into orbit

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30952>
2024-09-04 14:48:17 +00:00
Mike Blumenkrantz
56ac378454 dril: also create double-buffered configs in swrast fallback
Fixes: 06d417af80 ("dril: use the super fallback path for software fallback")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31013>
2024-09-04 14:02:52 +00:00
Mike Blumenkrantz
68a631947f tc: optimize out tracked winsys resolves
drivers using renderpass tracking can rely on having
pipe_framebuffer_state::resolve + tc_info::has_resolve to indicate
a winsys blit, which means they don't actually need the blit call

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30772>
2024-09-04 13:06:36 +00:00
Mike Blumenkrantz
3b198d5392 tc: break out blit enqueue to separate function
no functional changes

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30772>
2024-09-04 13:06:36 +00:00
Mike Blumenkrantz
5e319b0a3d zink: use tc renderpass optimizing to inline resolves with dynamic render
this also permits invalidating cubfs that use inlined resolves

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30772>
2024-09-04 13:06:36 +00:00
Mike Blumenkrantz
2c700bb842 zink: create a surface for resolve resources
this can be reused since the state tracker doesn't give a surface

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30772>
2024-09-04 13:06:36 +00:00
Mike Blumenkrantz
cd7ad7bd7e vk: rename DGC feature to DGC-NV
this is an NV extension, so it should have NV suffix

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31015>
2024-09-04 12:27:21 +00:00
Tapani Pälli
d5916cb3ca mesa: check for ARB_ES3_compatibility in format checks
Fixes regressions seen with following tests:

 dEQP-GL45-ES3.functional.negative_api.buffer.read_pixels
 dEQP-GL45-ES3.functional.negative_api.buffer.read_pixels_format_mismatch
 dEQP-GL45-ES31.functional.debug.negative_coverage.get_error.buffer.read_pixels
 dEQP-GL45-ES31.functional.debug.negative_coverage.get_error.buffer.readn_pixels
 dEQP-GL45-ES31.functional.debug.negative_coverage.get_error.buffer.read_pixels_format_mismatch

Fixes: e8226bda60 ("mesa/main: validate desktop gl format/types")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31008>
2024-09-04 11:54:22 +00:00
Lucas Stach
e6c2bf38b1 etnaviv: singlethread shader variant compiles when dumping shaders
When more than one instance of the shader compiler is running at
once, the output of ETNA_MESA_DEBUG=dump_shaders is almost useless
as output from multiple instances will get interleaved, making it
very hard to parse.

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/30604>
2024-09-04 09:13:33 +00:00
Lucas Stach
d29dfc180e etnaviv: allow shader machine code dumps in release builds
There is no reason to hide the shader machine code on release
builds when ETNA_MESA_DEBUG=dump_shaders is specified. This
debug option will dump lots of NIR already, so the machine
code is in good company.

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/30604>
2024-09-04 09:13:33 +00:00
Lucas Stach
447ac6d6c6 etnaviv: wire up missing gl_VertexID bits
While some bits for gl_VertexID were already present in the
compiler, it was still missing in lots of cases. Wire those
up to make gl_VertexID usable.

Fixes piglit spec@!opengl es 3.0@gl_vertexid.

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/30604>
2024-09-04 09:13:33 +00:00
Samuel Pitoiset
63112e79ac radv: use compute pipeline metadata for non-indirect DGC pipelines
The idea is to better abstract loading shader metadata parameters by
using the same layout for indirect/non-indirect compute pipelines.

Graphics support will added later.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30987>
2024-09-04 06:50:38 +00:00
Samuel Pitoiset
9a07b8fa1c radv: store the indirect compute pipeline VA to dgc_cmdbuf
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30987>
2024-09-04 06:50:38 +00:00
Samuel Pitoiset
81ec193e1b radv: specialize dispatch initiator for compute/task shaders with DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30987>
2024-09-04 06:50:38 +00:00
Samuel Pitoiset
fbb1ed66e4 radv: stop storing DGC info as part of the VBO descriptors
This is no longer needed and it's possible to just load&store the
bindings that aren't updated by DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30918>
2024-09-04 06:17:37 +00:00
Samuel Pitoiset
57aa34a30d radv: pass more VBO info as parameters to the DGC prepare shader
Instead of storing the stride/rsrc_word3 as part of the VBO descriptors,
pass them as parameters. This is cleaner and this will allow us
to simplify VBO in DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30918>
2024-09-04 06:17:37 +00:00
Tapani Pälli
a5dbd62267 iris: use correct enum for aux state on depth fast clear
Fixes: 5e86087940 ("intel: Move depth clear value writes to drivers")
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/30845>
2024-09-04 04:08:09 +00:00
Robert Mader
90d91f739f egl: Stop requiring EXT_create_context_robustness for EGL 1.5
For the similar commit c738cfe8 a review comment was:
> The EGL 1.5 changelog says that it incorporates the 3D texture
> extension's methods, but does not seem to require that they succeed.

The same could be said for Reset Notification Strategy and Robust Buffer
Access as implementations seem to be explicitely allowed to not succeed.
The EGL 1.5 spec says:
> "An EGL_BAD_MATCH error is generated if an OpenGL or OpenGL ES
> context is requested with robust buffer access and with a
> specified reset notification behavior, and the implementation
> does not support that behavior."

As we do return these errors accordingly during context creation, stop
requiring drivers to implement successfull creation of robust contexts,
as indicated by the extension.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30764>
2024-09-04 02:36:54 +00:00
Faith Ekstrand
cb91ed8872 nvk/nvkmd: Reference count internal mappings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31004>
2024-09-03 23:11:59 +00:00
Faith Ekstrand
134dfbe524 nvk/nvkmd: Split client and internal mappings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31004>
2024-09-03 23:11:59 +00:00
Faith Ekstrand
a2c813a6d3 nvk/nvkmd: Don't inline nvkmd_mem_[un]map()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31004>
2024-09-03 23:11:59 +00:00
Faith Ekstrand
37bbb47e86 nvk/nvkmd: Plumb map_flags through to unmap/overmap
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31004>
2024-09-03 23:11:59 +00:00
Faith Ekstrand
6c782b8a12 nvk/nvkmd: Plumb map pointers through to back-end unmap funcs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31004>
2024-09-03 23:11:59 +00:00
Faith Ekstrand
b130c6dae4 nvk/nvkmd: Plumb map_out through to the back-end nvkmd_mem_ops::map
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31004>
2024-09-03 23:11:59 +00:00
Faith Ekstrand
3123bdbc66 nvk/nvkmd: Add an nvkmd_mem_init() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31004>
2024-09-03 23:11:59 +00:00
Jesse Natalie
44cc67e659 microsoft/compiler: Move nir_lower_undef_to_zero out of the optimization loop
Otherwise after https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7710
I'm getting fighting between this pass and nir_opt_if.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31003>
2024-09-03 21:53:24 +00:00
Rhys Perry
192ef947a9 aco: fix printing of d16 MIMG dmask
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/30761>
2024-09-03 21:14:27 +00:00
Rhys Perry
999362f895 aco: have get_subdword_definition_info update DefInfo
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/30761>
2024-09-03 21:14:27 +00:00
Rhys Perry
16ff51bb37 aco/ra: use DefInfo for get_reg_specified
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/30761>
2024-09-03 21:14:27 +00:00
Rhys Perry
1e6741bf6b aco/ra: fix sub-dword get_reg_specified in some cases
For example, v6b MIMG can have sdw_def_info={4, 6}. This now has similar
behaviour as the DefInfo constructor.

fossil-db (navi31):
Totals from 5 (0.01% of 79395) affected shaders:
CodeSize: 29460 -> 29408 (-0.18%); split: -0.29%, +0.11%
Latency: 22133 -> 21934 (-0.90%); split: -2.51%, +1.61%
InvThroughput: 2953 -> 2963 (+0.34%); split: -0.03%, +0.37%
Copies: 410 -> 409 (-0.24%); split: -1.95%, +1.71%
VALU: 3242 -> 3241 (-0.03%); split: -0.25%, +0.22%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 56345b8c61 ("aco: allow reading/writing upper halves/bytes when possible")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30761>
2024-09-03 21:14:27 +00:00
Sil Vilerino
f2bb4e0743 d3d12: Video Encode H264 - Workaround for D3D12 validation bug requiring pRefPicMarkingOperationsCommands for IDR frames
Fixes: 0249f2e652 ("d3d12: Video Encode H264 - Support direct mmco operations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31000>
2024-09-03 20:48:18 +00:00
Caio Oliveira
74be809237 compiler: Allow derivative_group to be used for all stages in shader_info
These will now also be used by stages that have workgroups.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30950>
2024-09-03 20:03:18 +00:00
Vignesh Raman
1eb98bc457 ci: move mtl-fw.json to .gitlab-ci directory
Placing mtl-fw.json in src/intel/ci/mtl-fw.json works for the
mesa build, but it fails to fetch in drm-ci. Move it to the
.gitlab-ci directory so it is included in the artifacts used
for building the kernel/rootfs in drm-ci.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30947>
2024-09-03 19:25:49 +00:00
Daniel Stone
31aa56ab4a ci/{lvp,venus}: Skip massive-alloc tests
Don't try to allocate gigantic amounts of memory on shared runners. It's
just not a good idea.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30993>
2024-09-03 18:41:50 +00:00
Daniel Stone
e833589acf ci/windows: Don't upload shader cache to artifacts
We don't need to keep this, and it only makes the upload slower.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30993>
2024-09-03 18:41:50 +00:00
Daniel Stone
d7680bb284 ci/dozen: Add a couple more skips
One takes almost exactly 60 seconds these days, so it sometimes fails.
The other takes 43 seconds, which is too close for comfort; allocating
as much memory as possible is also not a great thing to do on shared
runners.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30993>
2024-09-03 18:41:50 +00:00
Daniel Stone
2ff28dae94 ci/fdno: Add some flaky tests for a618
It looks like unvanquished is flaky on all freedreno, so just ignore it
for now. One of the SKQP tests equally seems to be pretty enthusiastic
about flipping its status.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30993>
2024-09-03 18:41:49 +00:00
Sil Vilerino
539698b589 d3d12: Video Encode H264 - Store L0/L1 active nums at time to encode them in the headers
Fixes: da2cbfe3bf ("d3d12: Video Encode H264 to use direct DPB from frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30997>
2024-09-03 18:23:34 +00:00
Sil Vilerino
de4e25da46 d3d12: Video Encode HEVC - Store L0/L1 active nums at time to encode them in the headers
Fixes: e268ed0613 ("d3d12: Video Encode HEVC to use direct DPB from frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30997>
2024-09-03 18:23:34 +00:00
Sil Vilerino
1b39a519ca d3d12: Remove usage of WindowFromDC when building without d3d12 graphics
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30996>
2024-09-03 17:21:05 +00:00
Sil Vilerino
3d6280c3c5 vl/null_sw_winsys: Add extern declaration for C++ usage
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30996>
2024-09-03 17:21:05 +00:00
Sil Vilerino
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/30996>
2024-09-03 17:21:05 +00:00
Sil Vilerino
fe98f32af3 d3d12: H264, HEVC, AV1 Store multiple rate control states for multiple temporal layers
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30945>
2024-09-03 16:31:03 +00:00
Sil Vilerino
9c0b36eef2 pipe: Add pipe_h264_enc_pic_control.temporal_id
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30945>
2024-09-03 16:31:02 +00:00
Sil Vilerino
895f528e0c d3d12: Rename d3d12_video_encoder_config_dirty_flag_sequence_info to d3d12_video_encoder_config_dirty_flag_sequence_header
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30945>
2024-09-03 16:31:02 +00:00
Rohit Athavale
1fb5131c2e d3d12: Fix typo in copyright comments
Signed-off-by: Rohit Athavale <rathavale@microsoft.com>
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30945>
2024-09-03 16:31:02 +00:00
Patrick Lerda
6ac3beeb85 iris: fix indirect draw refcnt imbalance
Indeed, the object ring_bo was not freed.

For instance, this issue is triggered with:
"piglit/bin/arb_shader_image_load_store-host-mem-barrier -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 5438b19104 ("iris: enable generated indirect draws")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30975>
2024-09-03 16:06:09 +00:00
Mike Blumenkrantz
06d417af80 dril: use the super fallback path for software fallback
just in case gbm init fails somehow, swrast should still be able to
return some kind of fbconfigs

Fixes: ef88af8467 ("dril: always take the egl init path")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30979>
2024-09-03 15:31:48 +00:00
David Rosca
93a749c449 frontends/va: Fix locking in vlVaQueryVideoProcPipelineCaps
The mutex needs to be locked before accessing the handle table.

Cc: mesa-stable
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30935>
2024-09-03 15:12:51 +00:00
David Rosca
fccf31c231 frontends/va: Fix locking in vlVaDeriveImage
The mutex needs to be locked before accessing the handle table.
After 64ca0fd2f2 ("frontends/va: Allocate surface buffers on demand")
the issue is now much more likely to happen and can be reproduced when
transcoding using ffmpeg.

Cc: mesa-stable
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30935>
2024-09-03 15:12:51 +00:00
Connor Abbott
5879eaac18 ir3: Increase compute const size on a7xx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30995>
2024-09-03 14:44:04 +00:00
Martin Roukala (né Peres)
e27a07de59 zink/ci: update the flakes list for ga106
Reviewed-by: Valentine Burley <valentine.burley@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30973>
2024-09-03 12:50:01 +00:00
Martin Roukala (né Peres)
9b4e46e8fc radv/ci: update the flakes lists
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/30973>
2024-09-03 12:50:01 +00:00
Samuel Pitoiset
0dc2a5bfee radv: pass the vertex shader to radv_write_vertex_descriptors()
Mostly for DGC.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30916>
2024-09-03 11:39:47 +00:00
Samuel Pitoiset
bd5dca3e81 radv: rename radv_vs_input_state to radv_vertex_input_state
"vs_state" is confusing because it could be "Vertex Shader state" but
it's not.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30916>
2024-09-03 11:39:47 +00:00
Samuel Pitoiset
b3834b7dcd radv: bind the static vertex input state from the pipeline
This removes one more pipeline dependency when writing VBO descriptors.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30916>
2024-09-03 11:39:47 +00:00
Samuel Pitoiset
aea6cec434 radv: add radv_vs_input_state::attrib_index_offset
This is only used with static strides and it will allow us to bind
the static vertex input state from the pipeline.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30916>
2024-09-03 11:39:47 +00:00
Samuel Pitoiset
dd673269e4 radv: only initialize per-attribute vertex input state when needed
The vertex shader uses per attribute VBO descriptors only when it uses
a prolog or when robustness is enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30916>
2024-09-03 11:39:47 +00:00
Samuel Pitoiset
4c181c33cc radv: return early when the vertex input state is dynamic
state->vi is set to NULL by the vulkan runtime when the state is
dynamic.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30916>
2024-09-03 11:39:47 +00:00
Lucas Stach
8fc977cb29 etnaviv: emit SAMPLER_LOG_SIZE on sampler state changes
The int filter enable bit in that state depends on both sampler view
and sampler state, so the state need to be re-evaluated and emitted
not only on sampler view changes, but also when the sampler state
changes.

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/30605>
2024-09-03 11:21:02 +00:00
Pierre-Eric Pelloux-Prayer
bfcee149ed radeonsi: don't always update shader coherency draw call counter
The bug report has a sequence that looks like this:
* set tex as framebuffer
* dispatch a compute shader that doesn't use tex
* dispatch a compute shader that uses it

Since we were updating the counters at step 2, step 3 failed to realize
that calling si_make_CB_shader_coherent was needed.

While at it, this commit splits the draw call tracking counter in 2: one
for CB, one for DB.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11638
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30591>
2024-09-03 09:21:17 +02:00
Alyssa Rosenzweig
9fa324c24c hk: wire up compression
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
347c6e5405 hk: disable submission merging
this is causing rare CTS flakes. with this fused off, CTS is rock solid.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
b5899a2bf9 hk: shrink cmd bo
less wasteful

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
6e967ca811 hk: drop irrelevant comments
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
22347eb0e9 hk: lock device-wide scratch access
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
505fd350bc hk: handle compressed eMRT
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
48d4c5b489 hk: fix bg key with eMRT
fixes dEQP-VK.multiview.draw_indexed.no_queries.1_2_4_8 with emrt forced.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
64495653eb hk: remove texel buffers from meta
use AGX formatted load/store instead

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
70ec84e622 hk: prep for block based blitter
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
a76a2edfde hk: rework meta for compression
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
50527475be hk: be stricter about formats in copies
do something compression compatible.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
d19ac31fa7 asahi: add missing upcast for eMRT MSAA
fixes crash with eMRT in dEQP-VK.fragment_operations.early_fragment.samplemask_early_fragment_tests_depth_samples_4

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
a6c5f7dc20 asahi: handle cross-process eMRT
decompress in place, just in time.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
591bf066ba asahi: add agx_fill_decompress_push helper
easy share between gl and vk

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
cd1c7ff776 asahi: fix fbfetch with eMRT
fall out from epilogs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
bf910ce825 asahi: allow compute blitter to handle rgb9e5 blits
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
93695ceb48 asahi: factor out agx_usc_shared_non_fragment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
4541688a85 asahi: allow rgb9e5 rendering internally
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
bcddf041eb asahi: optimize aligned blits
we can optimize out a lot of logic in this (common) case.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
93785ae2fb asahi: skip unmapped bo in fault dbg
segfault

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
1e2dcae4da asahi,hk: deduplicate txf sampler settings
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
1f45aa37e0 asahi,ail: pull texture view logic into ail
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
ed08fe94d2 libagx: add in-place decompression kernel
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
3497cd2ed2 asahi/clc: add bindless image intrinsics
for decomp.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
b4b4c1908c ail: add enums/queries for AGX compression modes
r/e'd black box by trying stuff and seeing what dEQP tests pass (:

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:15 +00:00
Alyssa Rosenzweig
942dd5aa66 ail: add metadata width/height in tile helpers
for decompress kernels

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:14 +00:00
Alyssa Rosenzweig
9f1e2e5053 ail: clarify metadata buffer calculation
there's a very good reason that the calculation is what it is.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:14 +00:00
Alyssa Rosenzweig
b0a8e623f9 ail: consider format for compressability
share the query

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:14 +00:00
Alyssa Rosenzweig
f977c52b84 ail: swallow up formats
ail is a more sensible place for the format tables to live. this does create a
bit of dependency soup but hey.

nfc

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:14 +00:00
Alyssa Rosenzweig
06a48375c8 agx: fix wait_pix scheduling with eMRT
unclear how this didn't blow up before.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:14 +00:00
Alyssa Rosenzweig
05d535cb87 agx: support bindless block image store
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:14 +00:00
Alyssa Rosenzweig
afc7557cb6 nir,agx: make block image store an image() intrinsic
so we can do a bindless version

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:14 +00:00
Alyssa Rosenzweig
4941d71846 nir/divergence_analysis: handle load_agx
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
2024-09-02 23:27:14 +00:00
Jordan Justen
e32989a698 intel/dev: Enable BMG PCI IDs (without INTEL_FORCE_PROBE)
Tested with upstream drm-next kernel:

commit 6d0ebb3904853d18eeec7af5e8b4ca351b6f9025
Merge: 8bdb468dd7a5 b5d4657e192b
Author: Dave Airlie <airlied@redhat.com>

    Merge tag 'drm-intel-next-2024-08-29' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next

Ref: drm-next 3adcf970dc7e ("drm/xe/bmg: Drop force_probe requirement")
Backport-to: 24.2
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/30056>
2024-09-02 22:34:12 +00:00
Robert Mader
ec0c103b32 egl: Add more errors cases during context creation
In 9cc3e842bb an explicit check whether drivers support
PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR was added to
EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT. Add respective checks in similar
places as well.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30728>
2024-09-02 21:59:09 +00:00
Dave Airlie
af425a63f7 vulkan/video: fix vui encoding
This is a single bit field.

Fixes: d46162981a ("vulkan/video: add h264 headers encode")
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Tested-by: Bernhard C. Schrenk <clemy@clemy.org>
Reviewed-by: Bernhard C. Schrenk <clemy@clemy.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30968>
2024-09-02 21:15:13 +00:00
Georg Lehmann
9bb10b58f3 aco: use v_cvt_pk_u8_f32 for f2u8
Foz-DB Navi31:
Totals from 42 (0.05% of 79395) affected shaders:
Instrs: 3253747 -> 3248867 (-0.15%); split: -0.15%, +0.00%
CodeSize: 16690136 -> 16661772 (-0.17%); split: -0.17%, +0.00%
VGPRs: 4176 -> 4128 (-1.15%)
Latency: 18485157 -> 18479752 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 3659404 -> 3658222 (-0.03%); split: -0.03%, +0.00%
Copies: 231891 -> 228145 (-1.62%)
VALU: 1785800 -> 1782054 (-0.21%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29532>
2024-09-02 19:49:20 +00:00
Connor Abbott
46ad5a01a8 freedreno: Rename CP_SET_CTXSWITCH_IB to CP_SET_AMBLE
To match kgsl. Also make KMD_AMBLE_TYPE match the kgsl name, and invent
some names for the other types to be consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30942>
2024-09-02 18:36:47 +00:00
Caio Oliveira
5be6f3b089 intel/executor: Fix SWSB for sync.nop
Surfaced after recent improvements on SWSB handling, the previous
assembly code was gracefully lowering the $1 into $1.dst.

Fixes: 37674196221 ("intel: Add executor tool")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30960>
2024-09-02 16:07:55 +00:00
Daniel Schürmann
6ada0170c4 aco/ra: use arena allocator for hash maps
Also change Key types to uint32_t instead of unsigned.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30898>
2024-09-02 15:31:52 +00:00
Daniel Schürmann
709f60e71d aco/ra: use auto for std container iterators
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30898>
2024-09-02 15:31:52 +00:00
Daniel Schürmann
534031761a aco/ra: avoid rename map lookups in most cases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30898>
2024-09-02 15:31:52 +00:00
Daniel Schürmann
72464e24b4 aco/ra: add add_rename() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30898>
2024-09-02 15:31:51 +00:00
David Rosca
c447c6fe17 egl/wayland: Fix flush after blit in swap buffers multi-GPU case
dri2_wl_swap_buffers_with_damage is not used by swrast, so the swrast
condition there is wrong and instead it should always flush.

Fixes: fd17c018e9 ("egl/wayland: replace a couple DRI2_FLUSH checks with non-kms_swrast checks")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30964>
2024-09-02 13:22:30 +00:00
Georg Lehmann
8f3bb1fb2e aco/ra: always reuse def register for literal copy
Foz-DB Vega10:
Totals from 4056 (6.43% of 63053) affected shaders:
Instrs: 5540797 -> 5540760 (-0.00%); split: -0.00%, +0.00%
CodeSize: 29680912 -> 29680812 (-0.00%); split: -0.00%, +0.00%
SGPRs: 307808 -> 307680 (-0.04%)
Latency: 82483179 -> 82484437 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 45546645 -> 45547091 (+0.00%); split: -0.00%, +0.00%
SClause: 185641 -> 185648 (+0.00%); split: -0.00%, +0.01%
Copies: 642229 -> 642214 (-0.00%); split: -0.01%, +0.01%
SALU: 643132 -> 643107 (-0.00%); split: -0.01%, +0.01%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30932>
2024-09-02 11:09:55 +00:00
Georg Lehmann
5fb54d1fde aco/ra: fix copying 64bit literal to sgprs
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30932>
2024-09-02 11:09:55 +00:00
Georg Lehmann
364764356c aco/ra: use parallelcopy to copy literal instead of s_mov
This can result in smaller code size.

Foz-DB Vega10:
Totals from 4745 (7.53% of 63053) affected shaders:
CodeSize: 33014176 -> 33007088 (-0.02%); split: -0.02%, +0.00%
Copies: 690055 -> 704738 (+2.13%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30932>
2024-09-02 11:09:55 +00:00
Georg Lehmann
607cf5a8e9 aco/ra: unconditionally replace literal with sgpr when promoting to VOP3
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30932>
2024-09-02 11:09:55 +00:00
Samuel Pitoiset
8873382703 radv: fix emitting DGC indirect draws with drawid/base_instance
This fixes test_execute_indirect_state_vbo_offsets, a new vkd3d-proton
test.

The drawid/base_instance bits were cleared by mistake.

Fixes: e59a16bbb8 ("radv: use an indirect draw when IBO isn't updated as part of DGC")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30971>
2024-09-02 09:58:32 +00:00
Juan A. Suarez Romero
1536b7e9a8 v3d/v3dv: build simulator references conditionally
Instead of checking on run time if simulator is available or not, do it
at build time.

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/30900>
2024-09-02 09:34:10 +00:00
Juan A. Suarez Romero
bf37bd7e26 vc4: build simulator references conditionally
Instead of checking on run time if simulator is available or not, do it
at build time.

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/30900>
2024-09-02 09:34:10 +00:00
Samuel Pitoiset
e4e789ce10 radv: allow VK_EXT_legacy_vertex_attributes with DGC
Dynamic vertex input state is supported with DGC but it wasn't at the
time this extension has been introduced.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30957>
2024-09-02 09:09:07 +00:00
Collabora's Gfx CI Team
b32b15f0df Uprev Piglit to 93b4bd2e0aaab1c22ae3e1a23f9e057a8f7451b2
a3826de3c2...93b4bd2e0a

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30863>
2024-09-02 08:30:51 +00:00
Jose Maria Casanova Crespo
5fed6bee19 v3d: v3d_resource Use LINEAR layout for importing with INVALID modifier
v3d_resource_from_handle when importing a DRM_FORMAT_MOD_INVALID
considered that if we had a render-only device the resource layout was
linear and if we didn't have render-only the resource layout was tiled.

This change honors the resource creation with the SCANOUT flag
independently of the availability of the render-only for the
DRM_FORMAT_MOD_INVALID modifier.

It also fixes most of the failing piglit text for:

spec@ext_image_dma_buf_import@ext_image_dma_buf_import.*

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11594
Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30946>
2024-09-02 10:01:12 +02:00
Pavel Ondračka
9a213b882e r300/ci: add more flakes
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30966>
2024-09-01 17:34:43 +02:00
Juan A. Suarez Romero
86c5298cdf vc4/ci: update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30965>
2024-09-01 16:36:34 +02:00
Eric Engestrom
2d10233f2f ci: add virgl & venus to the s390 build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30954>
2024-08-31 18:55:15 +00:00
Georg Lehmann
b78a3d4de9 zink: switch to derivative intrinsics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30941>
2024-08-31 07:38:23 +00:00
Caio Oliveira
3f6b5ea27a intel/brw: Use linear walk when shader requires DERIVATIVE_GROUP_LINEAR
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30955>
2024-08-30 20:24:42 +00:00
Mike Blumenkrantz
898012ba11 egl: use more precise conditional for passing fd through to dri screen create
kms_swrast is included in the swrast conditional and needs a fd,
and there is a flag which indicates pure swrast which can be used to
ensure this case is detected

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30951>
2024-08-30 18:42:27 +00:00
Samuel Pitoiset
45319cb253 radv: specialize push constant stages with DGC
Even if the layout declares using push constant for more stages than
needed, upload_sgpr/inline_sgpr will prevent the DGC prepare shader to
emit them because it's initialized to 0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30924>
2024-08-30 18:02:23 +00:00
Samuel Pitoiset
8c5358040d radv: move emitting VBOs with DGC
Only for graphics.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30924>
2024-08-30 18:02:22 +00:00
Samuel Pitoiset
2234e6d75a radv: add a helper to store data to the DGC upload space
The offset is automatically incremented when something is stored.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30924>
2024-08-30 18:02:22 +00:00
Samuel Pitoiset
330d6e0951 radv: stop passing the upload offset to dgc_emit_bind_pipeline()
This doesn't do anything.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30924>
2024-08-30 18:02:22 +00:00
Samuel Pitoiset
e96be348f2 radv: move emitting the compute pipeline with DGC
Only compute is supported.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30924>
2024-08-30 18:02:22 +00:00
Mike Blumenkrantz
ecb788624b revert part of 94e470a32d
accidentally added during rebase

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30949>
2024-08-30 17:08:33 +00:00
Louis-Francis Ratté-Boulianne
9d981a4c5b panfrost: properly lower DrawID sysval on v9 GPUs
We only use special DrawID register on v10 GPUs so we still need to
lower to sysval on any earlier generation.

Fixes commit f390835074

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/30933>
2024-08-30 16:30:40 +00:00
Sai Teja
05f6e9f11e ci: Disable angle jobs for GL changes
Mesa's GL stack changes doesn't affect angle in any
way for now. Thus, drop angle jobs for GL changes from
intel and amd CI.

Signed-off-by: Sai Teja <saiteja13427@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30943>
2024-08-30 15:09:15 +00:00
Ali Homafar
3b581ed1f8 zink: Optimize descriptor buffers struct filling
Improve buffer descriptor filling for UBOs and SSBOs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30390>
2024-08-30 14:20:19 +00:00
Mike Blumenkrantz
94e470a32d zink: update profile with missing extensions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30944>
2024-08-30 13:37:25 +00:00
Daniel Stone
2e97d7b35c doc/llvmpipe: Update URL to fix linkcheck
linkcheck-docs has been failing for a little while now.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30939>
2024-08-30 13:26:41 +00:00
Christian Gmeiner
42f5b99a34 etnaviv: Switch to etna_core_has_feature(..) for has_halti2_instructions
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
2978d10203 etnaviv: Switch to etna_core_has_feature(..) for npot_tex_any_wrap
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
61d0ec5aec etnaviv: Switch to stream_count from etna_core_info
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
8b0a409431 etnaviv: Switch to max_registers from etna_core_info
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
89e286892d etnaviv: Switch to num_constants from etna_core_info
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
f34bf16114 etnaviv: npu: Drop not used spec values
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
92a6f697d5 etnaviv: npu: Switch to use etna_core_info
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
226e7d952f etnaviv: Switch to vertex_output_buffer_size from etna_core_info
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
d5b4758417 etnaviv: Switch to vertex_cache_size from etna_core_info
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
0a6baea787 etnaviv: Switch to shader_core_count from etna_core_info
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/30806>
2024-08-30 12:45:58 +00:00
Christian Gmeiner
f304dc57ae etnaviv: Drop has_sin_cos_sqrt and has_sign_floor_ceil
They are not read anywhere.

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/30806>
2024-08-30 12:45:58 +00:00
Jordan Justen
3e4f73b3a0 intel/dev: Update hwconfig => max_threads_per_psd for Xe2
Backport-to: 24.2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30887>
2024-08-30 01:53:55 -07:00
Qiang Yu
588a65f29a ac: do not lower some ops in nir_lower_packing
AMD does not implement nir_op_pack_32_4x8_split, others
are implemented, so don't lower them.

Fixes: 0f937426cc ("radeonsi: lower subgroup ops after wave size is known")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11781
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30885>
2024-08-30 05:46:51 +00:00
Qiang Yu
d43c5003fc nir: add skip_lower_packing_ops shader compile option
Drivers like radeonsi and radv prefer to not lowering
some packing ops.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30885>
2024-08-30 05:46:51 +00:00
Eric Engestrom
6c1d0b82fb turnip/ci: add vkd3d job on the a750
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29845>
2024-08-30 05:10:53 +00:00
Caio Oliveira
e4f090d3a6 intel/brw: Remove special treatment for 2-src in emit() helper
For Gfx9+ no 2-src instructions need sources to fixed up.  Special
treatment remains for 3-src instructions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30911>
2024-08-30 04:33:47 +00:00
Ian Romanick
73f365e208 intel/brw: load_offset cannot be constant on this path
Literally inside an if-statement (about 26 lines before this hunk)
that checks for !nir_src_is_const(instr->src[1]).

No shader-db or fossil-db changes on any Intel platform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30251>
2024-08-30 03:39:31 +00:00
Ian Romanick
fef175de09 intel/brw: Enable constant propagation for a couple more logical sends
This prevents some regressions later in the MR. Once load_const
operations are marked as is_scalar, they will cesase to get the
automatic constant propagation that occurs in try_rebuild_source.

No shader-db or fossil-db changes on any Intel platform.

v2: Slightly relax source restrictions on
SHADER_OPCODE_UNALIGNED_OWORD_BLOCK_READ_LOGICAL. Add a comment
explaining the restriction.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30251>
2024-08-30 03:39:31 +00:00
Ian Romanick
c6a8b382fd intel/brw: Relax is_partial_write check in cmod propagation
The is_partial_write check is too strict because it tests two separate
things. It tests whether or not the instruction always writes a value
(i.e., is it predicated), and it tests whether or not the instruction
writes a complete register. This latter check is problematic as it
perevents cmod propagation in SIMD1, and it prevents cmod propagation in
SIMD8 when the destination size is 16 bits.

This check is unnecessary. Cmod propagation already checks that the
region written and region read overlap. It also already checks that the
execution sizes of the instructions match. Further restriction based on
the specific parts of the register written only generates false
negatives.

v2: Relax all of the calls to is_partial_write. Suggested by Caio.

No shader-db changes on any Intel platform.

fossil-db:

Meteor Lake
Totals:
Instrs: 151505520 -> 151502923 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17201385104 -> 17194901423 (-0.04%); split: -0.06%, +0.02%
Spill count: 80827 -> 80837 (+0.01%)
Fill count: 152693 -> 152692 (-0.00%); split: -0.01%, +0.01%

Totals from 346 (0.05% of 630198) affected shaders:
Instrs: 1257205 -> 1254608 (-0.21%); split: -0.21%, +0.00%
Cycle count: 5532845647 -> 5526361966 (-0.12%); split: -0.18%, +0.06%
Spill count: 32903 -> 32913 (+0.03%)
Fill count: 64338 -> 64337 (-0.00%); split: -0.03%, +0.03%

DG2
Totals:
Instrs: 151531440 -> 151528055 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17200238927 -> 17197996676 (-0.01%); split: -0.03%, +0.02%
Spill count: 81003 -> 80971 (-0.04%); split: -0.04%, +0.00%
Fill count: 152975 -> 152912 (-0.04%); split: -0.05%, +0.01%

Totals from 346 (0.05% of 630198) affected shaders:
Instrs: 1260363 -> 1256978 (-0.27%); split: -0.27%, +0.00%
Cycle count: 5532019670 -> 5529777419 (-0.04%); split: -0.09%, +0.05%
Spill count: 33046 -> 33014 (-0.10%); split: -0.11%, +0.01%
Fill count: 64581 -> 64518 (-0.10%); split: -0.13%, +0.03%

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
Totals:
Instrs: 149972324 -> 149972289 (-0.00%)
Cycle count: 15566495293 -> 15565151171 (-0.01%); split: -0.01%, +0.00%

Totals from 16 (0.00% of 629912) affected shaders:
Instrs: 351194 -> 351159 (-0.01%)
Cycle count: 3922227030 -> 3920882908 (-0.03%); split: -0.04%, +0.00%

Skylake
Totals:
Instrs: 140787999 -> 140787983 (-0.00%); split: -0.00%, +0.00%
Cycle count: 14665614947 -> 14665515855 (-0.00%); split: -0.00%, +0.00%
Spill count: 58500 -> 58501 (+0.00%)
Fill count: 102097 -> 102100 (+0.00%)

Totals from 16 (0.00% of 625685) affected shaders:
Instrs: 343560 -> 343544 (-0.00%); split: -0.01%, +0.01%
Cycle count: 3354997898 -> 3354898806 (-0.00%); split: -0.01%, +0.01%
Spill count: 16864 -> 16865 (+0.01%)
Fill count: 27479 -> 27482 (+0.01%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30251>
2024-08-30 03:39:31 +00:00
Ian Romanick
13332c236b intel/brw: Unconditionally run optimizations after nir_opt_uniform_subgroup
I observed some ray tracing shaders where a resource_intel inside a
loop was non-uniform, and some code was lowered to account for
that. Eventually the loop containing the resource_intel was unrolled,
and the resource_intel became uniform.

For example, nir_opt_uniform_subgroup can transform something like

    con loop {
        con block b5:        // preds: b4 b8
        con 32    %330 = @read_first_invocation (%329)
        con 1     %331 = ieq %330, %329
                         // succs: b6 b7
        if %331 {
            con block b6:        // preds: b5
            con 32    %332 = iadd %120.b, %330
            con 32    %333 = @resource_intel (%125 (0xdeaddeed), %332, %125 (0xdeaddeed), %3 (0x0)) (desc_set=1, binding=2, resource_intel=bindless|non-uniform, resource_block_intel=-1)
            div 32x4  %334 = (float32)txl %333 (texture_handle), %130 (sampler_handle), %327 (coord), %275 (lod), 0 (texture), 0 (sampler)
                             break
                             // succs: b9
        } else {
            con block b7:  // preds: b5, succs: b8
        }
        con block b8:  // preds: b7, succs: b5
    }

into

    con loop {
        con block b5:        // preds: b4 b8
        con 1     %331 = ieq %329, %329
                         // succs: b6 b7
        if %331 {
            con block b6:        // preds: b5
            con 32    %332 = iadd %120.b, %329
            con 32    %333 = @resource_intel (%125 (0xdeaddeed), %332, %125 (0xdeaddeed), %3 (0x0)) (desc_set=1, binding=2, resource_intel=bindless|non-uniform, resource_block_intel=-1)
            div 32x4  %334 = (float32)txl %333 (texture_handle), %130 (sampler_handle), %327 (coord), %275 (lod), 0 (texture), 0 (sampler)
                             break
                             // succs: b9
        } else {
            con block b7:  // preds: b5, succs: b8
        }
        con block b8:  // preds: b7, succs: b5
    }

Notice that %331 is now a tautology. Running brw_nir_optimize again
eliminates the loop.

v2: Add a comment in the code explaining the rationale. Suggested by
Ken. Update the commit message. Suggested by Caio.

shader-db:

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
total instructions in shared programs: 19733448 -> 19733330 (<.01%)
instructions in affected programs: 14120 -> 14002 (-0.84%)
helped: 32 / HURT: 3

total cycles in shared programs: 916254496 -> 916226288 (<.01%)
cycles in affected programs: 2035116 -> 2006908 (-1.39%)
helped: 19 / HURT: 13

total spills in shared programs: 5807 -> 5807 (0.00%)
spills in affected programs: 26 -> 26 (0.00%)
helped: 1 / HURT: 1

total fills in shared programs: 6794 -> 6792 (-0.03%)
fills in affected programs: 84 -> 82 (-2.38%)
helped: 1 / HURT: 1

LOST:   1
GAINED: 1

Ice Lake and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs: 20393084 -> 20392971 (<.01%)
instructions in affected programs: 21750 -> 21637 (-0.52%)
helped: 31 / HURT: 4

total cycles in shared programs: 880273065 -> 880247818 (<.01%)
cycles in affected programs: 2546748 -> 2521501 (-0.99%)
helped: 18 / HURT: 9

total spills in shared programs: 4628 -> 4630 (0.04%)
spills in affected programs: 287 -> 289 (0.70%)
helped: 1 / HURT: 2

total fills in shared programs: 5381 -> 5376 (-0.09%)
fills in affected programs: 711 -> 706 (-0.70%)
helped: 2 / HURT: 2

LOST:   1
GAINED: 1

fossil-db:

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 151513669 -> 151505520 (-0.01%); split: -0.01%, +0.00%
Send messages: 7459339 -> 7459396 (+0.00%)
Loop count: 49111 -> 47588 (-3.10%)
Cycle count: 17208178205 -> 17201385104 (-0.04%); split: -0.05%, +0.01%
Spill count: 80830 -> 80827 (-0.00%); split: -0.02%, +0.01%
Fill count: 152754 -> 152693 (-0.04%); split: -0.04%, +0.00%
Scratch Memory Size: 4136960 -> 4130816 (-0.15%)
Max live registers: 32016493 -> 32015955 (-0.00%); split: -0.00%, +0.00%

Totals from 672 (0.11% of 630198) affected shaders:
Instrs: 1352428 -> 1344279 (-0.60%); split: -0.78%, +0.17%
Send messages: 54302 -> 54359 (+0.10%)
Loop count: 6124 -> 4601 (-24.87%)
Cycle count: 1260266379 -> 1253473278 (-0.54%); split: -0.69%, +0.16%
Spill count: 15967 -> 15964 (-0.02%); split: -0.09%, +0.08%
Fill count: 36245 -> 36184 (-0.17%); split: -0.18%, +0.01%
Scratch Memory Size: 740352 -> 734208 (-0.83%)
Max live registers: 50699 -> 50161 (-1.06%); split: -1.45%, +0.39%

Tiger Lake, Ice Lake, and Skylake had similar results. (Tiger Lake shown)
Totals:
Instrs: 149976046 -> 149971100 (-0.00%); split: -0.00%, +0.00%
Subgroup size: 7685264 -> 7685256 (-0.00%)
Cycle count: 15566401168 -> 15566405478 (+0.00%); split: -0.00%, +0.00%
Spill count: 61238 -> 61240 (+0.00%)
Fill count: 107301 -> 107289 (-0.01%)
Max live registers: 31992969 -> 31993857 (+0.00%); split: -0.00%, +0.00%

Totals from 553 (0.09% of 629912) affected shaders:
Instrs: 557027 -> 552081 (-0.89%); split: -0.90%, +0.01%
Subgroup size: 8648 -> 8640 (-0.09%)
Cycle count: 150154496 -> 150158806 (+0.00%); split: -0.23%, +0.24%
Spill count: 181 -> 183 (+1.10%)
Fill count: 440 -> 428 (-2.73%)
Max live registers: 33698 -> 34586 (+2.64%); split: -0.02%, +2.65%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30251>
2024-08-30 03:39:31 +00:00
Ian Romanick
65eb7ed5fc intel/brw: Run intel_nir_lower_conversions only after brw_nir_optimize
Without this, the next commit tiggers assertions.

v2: Unconditionally do the lowering after brw_nir_optimize. Suggested by
Caio.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> [v1]
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30251>
2024-08-30 03:39:31 +00:00
Ian Romanick
572e00dd66 intel/brw: Copy prop from raw integer moves with mismatched types
The specific pattern from the unit test was observed in ray tracing
trampoline shaders.

v2: Refactor the is_raw_move tests out to a utility function. Suggested
by Ken.

v3: Fix a regression caused by being too picky about source
modifiers. This was introduced somewhere between when I did initial
shader-db runs an v2.

v4: Fix typo in comment. Noticed by Caio.

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19734086 -> 19733997 (<.01%)
instructions in affected programs: 135388 -> 135299 (-0.07%)
helped: 76 / HURT: 2

total cycles in shared programs: 916290451 -> 916264968 (<.01%)
cycles in affected programs: 41046002 -> 41020519 (-0.06%)
helped: 32 / HURT: 29

fossil-db:

Meteor Lake, DG2, and Skylake had similar results. (Meteor Lake shown)
Totals:
Instrs: 151531355 -> 151513669 (-0.01%); split: -0.01%, +0.00%
Cycle count: 17209372399 -> 17208178205 (-0.01%); split: -0.01%, +0.00%
Max live registers: 32016490 -> 32016493 (+0.00%)

Totals from 17361 (2.75% of 630198) affected shaders:
Instrs: 2642048 -> 2624362 (-0.67%); split: -0.67%, +0.00%
Cycle count: 79803066 -> 78608872 (-1.50%); split: -1.75%, +0.25%
Max live registers: 421668 -> 421671 (+0.00%)

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
Totals:
Instrs: 149995644 -> 149977326 (-0.01%); split: -0.01%, +0.00%
Cycle count: 15567293770 -> 15566524840 (-0.00%); split: -0.02%, +0.01%
Spill count: 61241 -> 61238 (-0.00%)
Fill count: 107304 -> 107301 (-0.00%)
Max live registers: 31993109 -> 31993112 (+0.00%)

Totals from 17813 (2.83% of 629912) affected shaders:
Instrs: 3738236 -> 3719918 (-0.49%); split: -0.49%, +0.00%
Cycle count: 4251157049 -> 4250388119 (-0.02%); split: -0.06%, +0.04%
Spill count: 28268 -> 28265 (-0.01%)
Fill count: 50377 -> 50374 (-0.01%)
Max live registers: 470648 -> 470651 (+0.00%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30251>
2024-08-30 03:39:31 +00:00
Ian Romanick
c160ed212e nir/divergence: resource_intel is less divergent than you thought
When the non_uniform flag is not set, the result is never divergent.

v2: Remove redundant assignment to is_divergent. Suggested by Caio.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30251>
2024-08-30 03:39:30 +00:00
Casey Bowman
eda55c7c2f vulkan/screenshot-layer: Add Vulkan screenshot layer
This change adds a Vulkan screenshot layer that allows users to take
screenshots from a Vulkan application, but has an emphasis on
performance, decreasing the performance impact on the application
involved. This allows for automated setups to use this layer to take
screenshots for navigating various in-application menus.

This layer works by hooking into various common Vulkan setup functions, until
it enters the vkQueuePresentKHR function, and from there it copies the current
frame's image from the swapchain as an RGB image to host-cached memory, where
we will receive the information as a framebuffer pointer. From there, we copy
the framebuffer contents to a thread that will detach from the main process
so it can write the image to a PNG file without holding back the main thread.

This layer was created from using the existing overlay layer as a template,
then adding portions of LunarG's VulkanTools screenshot layer:
https://github.com/LunarG/VulkanTools/blob/main/layersvt/screenshot.cpp

More specifically, there were usages of functions, along with modifications of
various functions from screenshot.cpp in the VulkanTools project, used in
screenshot.cpp.

There are some sections of the screenshotting functionality that remain
unmodified from the original screenshot.cpp file in VulkanTools, including the
global locking structures and the writeFile() function, which takes care of
obtaining the images from the swapchain. There were various areas in which
modifications were made, including how images are written to a file (using PNG
instead of PPM, introducing threading, added fences/semaphores, etc), along
with many smaller changes.

v2: Fix segfault upon application exit

v3: Fix filename issue with concatenation, along with some leftover
memory handling that wasn't cleaned up.

v4: Fix some error handling and nits

v5: Fix output directory handling

Reviewed-by: Ivan Briano <ivan.briano@intel.com

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30527>
2024-08-30 02:56:02 +00:00
Sil Vilerino
7530487e60 d3d12: Video Encode HEVC - Use VPS information from frontend, specifically for vps_max_dec_pic_buffering_minus1
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Sil Vilerino
e268ed0613 d3d12: Video Encode HEVC to use direct DPB from frontend
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Sil Vilerino
0249f2e652 d3d12: Video Encode H264 - Support direct mmco operations
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Sil Vilerino
da2cbfe3bf d3d12: Video Encode H264 to use direct DPB from frontend
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Sil Vilerino
bb1bbe51df d3d12: Implement get_feedback_fence
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Sil Vilerino
067f881435 frontend/va: VaSyncSurface encoder check for surface feedback
Currently VaSyncBuffer clears the feedback of the buffer's associated encode surface
to avoid a subsequent call to VaSyncSurface for the same encoded frame to retrieve feedback twice.
Add a check to VaSyncSurface to don't perform the feedback retrieval if surf->feedback already cleared.
Otherwise it results in the second call to VaSyncSurface to pass a null feedback
after waiting for the non-null fence.

Fixes: 96fe9fde3f ("frontends/va: Implement sync buffer/surface timeout for encode feedback")

Reviewed-by: David Rosca <david.rosca@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Sil Vilerino
dad58e0cd3 d3d12: Implement pipe_video_codec.create_dpb_buffer for texture array resources
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Sil Vilerino
06a8b8c7e9 d3d12: Allow passing custom pipe_resource creation template/placed resource to d3d12_video_buffer_create_impl
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Sil Vilerino
4070d02524 d3d12: Implement pipe_video_codec.create_dpb_buffer for AOT resources
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Sil Vilerino
f8145fe691 pipe: Add PIPE_BIND_VIDEO_DECODE_DPB/PIPE_BIND_VIDEO_ENCODE_DPB
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
David Rosca
e751cb074a frontends/va: Allow drivers to allocate and use encode DPB surface buffers
Drivers can now allocate these buffers and use them directly.

(cherry picked from commit a4ef6eccb5c78c8080a944d8dd08f829902afc60)
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30843#note_2544865
for more details about discussion/cherry-picking.

Signed-off-by: David Rosca <david.rosca@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30908>
2024-08-30 02:12:28 +00:00
Christian Gmeiner
bab6f2a1ec etnaviv: isa: Add conv instruction
This instruction is used to implement float type conversion. The source type
is defined via src1 immed (0: f32, 1: f16) and the dest type is defined via
the instruction type.

Blob generates such conv's for piglit's tests/cl/program/execute/mad-mix.cl

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30797>
2024-08-30 01:53:18 +00:00
Yinjie Yao
7f1c0fbe61 radeonsi/vcn: Rename transform_skip_disabled and remove hardcoded value for VCN5
This fix the HEVC encode corruption caused by mismatch between PPS
header and IB setting, the fix only apply for VCN5.
Rename from transform_skip_dicarded to transform_skip_disabled.

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/30930>
2024-08-30 01:17:22 +00:00
Valentine Burley
419885e280 tu: Simplify VK_EXT_sample_locations SampleCounts assignment
Use the existing sample_counts variable.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30730>
2024-08-30 00:34:54 +00:00
Valentine Burley
98d52cf292 tu: Fix VK_EXT_extended_dynamic_state3 feature
Don't claim to support extendedDynamicState3SampleLocationsEnable on pre-A650 GPUs,
which can't advertise VK_EXT_sample_locations.

Fixes dEQP-VK.info.device_mandatory_features on A6xx Gen 1 and Gen 2.

Fixes: 84726da2f4 ("tu: Implement extendedDynamicState3SampleLocationsEnable")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30730>
2024-08-30 00:34:54 +00:00
Connor Abbott
630d6d1f2e tu: Add a750 flush workaround and re-enable UBWC for storage images
This is closer to what the blob does.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30896>
2024-08-29 23:52:00 +00:00
Faith Ekstrand
4442d61b16 nvk: Advertise VK_KHR_maintenance7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30925>
2024-08-29 23:33:05 +00:00
Eric Engestrom
ace54cc998 zink+turnip/ci: fix .zink-turnip-valve-manual-rules
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30929>
2024-08-29 22:59:49 +00:00
Ian Romanick
f11a414645 nir/algebraic: Remove incorrect bfi of iand pattern
The comment says, "This expands to (b & 3) & ~0xc which is (b & 3) &
3." This is not correct. ~0xc is actually 0xfffffff3.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: #11695
Fixes: 1c7e35d4e0 ("nir/algebraic: Optimize some bit operation nonsense observed in some shaders")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30913>
2024-08-29 22:21:55 +00:00
Vignesh Raman
0b010b357d ci: use v6.11-rc5 kernel for Mali V10 testing
Set FORCE_KERNEL_TAG to v6.11-rc5 for Mali V10 testing.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30883>
2024-08-29 20:45:56 +00:00
Vignesh Raman
0d90f48b4f ci: enable Mali V10 testing
Panthor support was added in Linux 6.10 and Panfrost V10
in Mesa, enabling new GPUs on Rockchip's RK3588. Add CI
jobs to test Mali V10.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30883>
2024-08-29 20:45:56 +00:00
Lionel Landwerlin
91b3ae71d7 iris: fix utrace compute end timestamp reads on Gfx20
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30923>
2024-08-29 20:10:12 +00:00
Lionel Landwerlin
14d772d678 anv: fix utrace compute timestamp reads on Gfx20
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30923>
2024-08-29 20:10:11 +00:00
Eric Engestrom
08ecfe8fa4 zink+nvk/ci: mark a ton of tests as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Eric Engestrom
f668b17da6 zink+nvk/ci: bump zink-nvk-ga106-valve timeout as more tests are being run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Eric Engestrom
0cbd5bbb47 venus/ci: add flake and skip timing out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Eric Engestrom
71dbe29537 venus/ci: drop redundant flakes definitions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Eric Engestrom
66bae75d47 radeonsi/ci: mark a bunch of subgroups tests as failing
Fixes: 48a49c4e04 ("radeonsi: enable KHR_shader_subgroup")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Eric Engestrom
f05887a359 freedreno/ci: fix test timeout for a306_piglit
Two issues:
1. this is a baremetal/fastboot job, not a lava job, so JOB_TIMEOUT does
   nothing and TEST_PHASE_TIMEOUT_MINUTES was erroneously removed
   instead.
2. the test timeout needs to be smaller than the job timeout, otherwise
   it can't do anything. 5min is the margin almost every job uses, so
   let's use that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Eric Engestrom
8bfd2c083e Revert "freedreno/ci: drop TEST_PHASE_TIMEOUT_MINUTES that match the default value"
This reverts commit 71787885e3.

The last version of the MR, the one that got merged, dropped the
bm/fastboot changes as they were causing issues; I should have dropped
this commit too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Eric Engestrom
39d6251141 radeonsi/ci: bump timeout for nightly job glcts-vangogh-valve
It now takes ~45min (likely due to new failures being retried, itself
caused by KHR_shader_subgroup being added), but let's bump the timeout
a bit higher to avoid having to do this again soon.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Eric Engestrom
8ffb44a633 nvk/ci: mark -dEQP-VK.drm_format_modifiers.export_import* as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30928>
2024-08-29 19:21:52 +00:00
Job Noorman
b967677d4e ir3/postsched: take WAR ss-delay into account
Waiting for WAR hazards needs (ss) just like waiting for ss-producers.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30611>
2024-08-29 18:44:14 +00:00
Job Noorman
bb13f30db2 ir3: add is_war_hazard_producer helper
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30611>
2024-08-29 18:44:14 +00:00
Job Noorman
ce5c0c21c4 ir3/legalize: don't add (ss) for WAR hazards synced with (sy)
(ss) can be used to resolve all tex/sfu/mem WAR hazards. However, when
the reader is a sy-producer, they can also be resolved using (sy). Track
those cases separately and make sure we don't add (ss) when the reader
has already been synced using (sy).

For example, take a sequence like this:
sam rd, rs, ...
(sy)...
(ss)write rs

Before this commit, we would add the (ss) to resolve the WAR hazard
between the consumer (sam) and the writer of rs. However, the consumer
of rs has already been synced using (sy) so has definitely consumed rs.
This commit ensures the unnecessary (ss) for the write is not added
anymore.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30611>
2024-08-29 18:44:14 +00:00
Job Noorman
6a19274e3d ir3/legalize: add needs_ss_war helper
The condition was getting unwieldy and we will need to add more to it in
the next commit.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30611>
2024-08-29 18:44:14 +00:00
Job Noorman
6e16dc60a1 ir3: add assert to detect getting reg file of const/imm
ir3_reg_file_offset should only be called for actual registers, not for
const or immediate values. However, this did happens accidentally for
tracking WAR hazards in ir3_legalize. While that case has been fixed,
better to prevent such cases in the future.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30611>
2024-08-29 18:44:14 +00:00
Job Noorman
523a0e2e39 ir3/legalize: don't add WAR dependencies for const/imm regs
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30611>
2024-08-29 18:44:14 +00:00
Job Noorman
7cc24aa506 ir3: fix recognizing const/imm registers as a0
Fixes: 72bb4d79dc ("ir3/legalize: handle scalar ALU WAR hazards for a0.x")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30611>
2024-08-29 18:44:14 +00:00
Daniel Stone
43d65e0ff0 ci: Make per-build dependencies optional
Sometimes not all of the jobs execute. For instance, Windows build jobs
will not trigger on AMD-only MRs. Use the 'optional' keyword to ignore
jobs which don't exist in our pipeline.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 310e3bb026 ("ci: do not start build-only jobs until the critical build-for-tests jobs are done")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30926>
2024-08-29 17:50:16 +00:00
Roland Scheidegger
9b717596b2 llvmpipe: Fix type mismatch when storing residency info
The storage allocated was always the same for both the ordinary texture
result data as well as the residency info. However, the former can be
float vector, whereas the latter is always int vector.
At least some llvm versions/builds will assert on this mismatch when
storing the data.
While here, also cut unnecessary zero initialization (lp_build_alloca()
already explicitly does this).

Fixes: 6168317b84 (lavapipe: Implement shaderResourceResidency)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30878>
2024-08-29 16:53:45 +00:00
Valentine Burley
7fb7fa794c util: Remove Vulkan-only formats from get_plane_width/height
This reverts commit 3316bc3e88.

These formats were only used by RADV and are no longer needed as we can get the plane dimensions
from the YCbCr table.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30899>
2024-08-29 15:57:52 +00:00
Valentine Burley
1ae09c4e79 tu: Use vk_format_get_plane_count for tu6_plane_count
This change simplifies the code by avoiding special casing, making it easier to add support
for formats like P010 with minimal changes.

Inline it on one place where where the difference for VK_FORMAT_D32_SFLOAT_S8_UINT doesn't matter.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30899>
2024-08-29 15:57:51 +00:00
Valentine Burley
29d1cd6e8b tu: Use vk_format_get_plane_width/height to get the plane dimensions
This change simplifies the code by avoiding special casing, making it easier to add support
for formats like P010 with minimal changes.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30899>
2024-08-29 15:57:51 +00:00
Valentine Burley
b37e06fd58 vulkan, radv: Add new common vk_format_get_plane_width/height helpers
Add new vk_format_get_plane_width/height helpers using ycbcr_info and use it to
replace RADV's ones which relied on util_format_get_plane_width/height.

We already have this data in the YCbCr table, so this avoids having the maintain the list
of pipe formats in util_format_get_plane_width/height.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30899>
2024-08-29 15:57:51 +00:00
Mike Blumenkrantz
7d0a631f20 llvmpipe: export dmabuf caps for kms_swrast
kms_swrast can import and export dumb buffers, so this cap must be
exported in order for frontends to correctly detect support

Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30893>
2024-08-29 15:27:56 +00:00
Eric Engestrom
310e3bb026 ci: do not start build-only jobs until the critical build-for-tests jobs are done
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30808>
2024-08-29 14:33:15 +00:00
Eric Engestrom
27fba5ccdf ci: merge build-x86_64 & build-misc
The split doesn't really make sense anymore, and with the next commit,
the build-misc jobs would get delayed until the build-x86_64 jobs are
done, which is undesirable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30808>
2024-08-29 14:33:15 +00:00
Eric Engestrom
c9e847e51f ci: move build jobs that are used by tests to an earlier stage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30808>
2024-08-29 14:33:15 +00:00
Tapani Pälli
096acf8c0c anv: change existing ICL workaround to depend on BLEND_STATE
Commit f900b763b1 we started to dirty MS as WM changes. However
later on things changed with eebb6cd236, we need to dirty with
BLEND_STATE now.

Fixes: eebb6cd236 ("anv: stop using 3DSTATE_WM::ForceThreadDispatchEnable")
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/30920>
2024-08-29 13:58:08 +00:00
Rohan Garg
51e05c2844 iris,anv: simplify and inline sampler count calculations
Use the CLAMP macro to clamp the value and simplify the sampler count
encoding.

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/30922>
2024-08-29 11:49:56 +00:00
Rohan Garg
32f606486f anv: prefetch samplers when dispatching compute shaders
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30922>
2024-08-29 11:49:56 +00:00
Timothy Arceri
bb426b7f3c nir/tests: add basic terminator merge test
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30862>
2024-08-29 10:26:30 +00:00
Timothy Arceri
85741c6a15 nir/tests: make add_loop_terminators more flexible
Here we update the helper to have an option to add the break to the else
blocks of the terminators.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30862>
2024-08-29 10:26:30 +00:00
Daniel Schürmann
51bb0e68b3 nir/opt_if: merge IFs which have phis between them
The phi-uses are rewritten on each side of the following if-stmt,
so that register pressure is kept the same.

Totals from 719 (0.91% of 79395) affected shaders: (Navi31)
MaxWaves: 18531 -> 18527 (-0.02%); split: +0.02%, -0.04%
Instrs: 4683616 -> 4621920 (-1.32%); split: -1.32%, +0.00%
CodeSize: 24154608 -> 23811472 (-1.42%); split: -1.42%, +0.00%
VGPRs: 46020 -> 46140 (+0.26%); split: -0.05%, +0.31%
SpillSGPRs: 1134 -> 1107 (-2.38%)
SpillVGPRs: 2221 -> 2202 (-0.86%)
Scratch: 603648 -> 602624 (-0.17%)
Latency: 30355976 -> 29516199 (-2.77%); split: -2.77%, +0.01%
InvThroughput: 7017283 -> 6878583 (-1.98%); split: -2.00%, +0.03%
VClause: 119826 -> 113392 (-5.37%); split: -5.37%, +0.00%
SClause: 100380 -> 93516 (-6.84%); split: -6.85%, +0.01%
Copies: 360589 -> 359154 (-0.40%); split: -1.13%, +0.73%
Branches: 146438 -> 138623 (-5.34%); split: -5.37%, +0.03%
PreSGPRs: 38237 -> 38317 (+0.21%); split: -0.52%, +0.72%
PreVGPRs: 37745 -> 37742 (-0.01%); split: -0.05%, +0.04%
VALU: 2594909 -> 2593667 (-0.05%); split: -0.12%, +0.07%
SALU: 572636 -> 554587 (-3.15%); split: -3.19%, +0.04%
VMEM: 203188 -> 201030 (-1.06%)
SMEM: 135731 -> 128683 (-5.19%)
VOPD: 1978 -> 1982 (+0.20%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7710>
2024-08-29 09:42:55 +00:00
Daniel Schürmann
37881801c1 nir/opt_if: optimize phis between similar IFs
This small optimization targets phis between two IF statements with
the same condition. If the phi dst is only used on one branch leg,
the 'unused' phi source gets replaced with undef.

Totals from 1773 (2.23% of 79395) affected shaders: (Navi31)
Instrs: 6546338 -> 6539039 (-0.11%); split: -0.11%, +0.00%
CodeSize: 34819124 -> 34780660 (-0.11%); split: -0.11%, +0.00%
VGPRs: 92100 -> 92052 (-0.05%); split: -0.07%, +0.01%
SpillVGPRs: 2211 -> 2206 (-0.23%)
Latency: 51621404 -> 51620966 (-0.00%); split: -0.03%, +0.03%
InvThroughput: 7907110 -> 7905382 (-0.02%); split: -0.05%, +0.03%
VClause: 159268 -> 159273 (+0.00%); split: -0.00%, +0.01%
SClause: 180166 -> 180155 (-0.01%)
Copies: 559867 -> 553966 (-1.05%); split: -1.07%, +0.01%
Branches: 237327 -> 236366 (-0.40%); split: -0.41%, +0.00%
PreSGPRs: 81128 -> 81116 (-0.01%); split: -0.02%, +0.01%
PreVGPRs: 74264 -> 74245 (-0.03%)
VALU: 3547408 -> 3541257 (-0.17%); split: -0.18%, +0.00%
SALU: 824426 -> 824104 (-0.04%); split: -0.04%, +0.00%
VMEM: 265009 -> 265003 (-0.00%)
SMEM: 235766 -> 235760 (-0.00%)
VOPD: 1853 -> 1839 (-0.76%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7710>
2024-08-29 09:42:55 +00:00
Daniel Schürmann
50d416fe89 nir: add nir_block *nir_src_get_block(src) helper
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7710>
2024-08-29 09:42:55 +00:00
Juan A. Suarez Romero
12ff1b683e Revert "ci: take igalia farm offline"
This reverts commit 4246c88c5e.

Farm is back again.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30917>
2024-08-29 09:13:26 +00:00
Konstantin
893c93a27a meson: Allow building lavapipe without specifying llvmpipe
Avoids compiling glsl/opengl/... support when testing only lavapipe.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30423>
2024-08-29 10:17:52 +02:00
Konstantin Seurer
0fc3c52e43 nir/opt_loop: Fix handling else-breaks in merge_terminators
If both breaks are in the else branch, we have to use iand.

Fixes: 9995f33 ("nir: add merge loop terminators optimisation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11726
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30850>
2024-08-29 05:49:35 +00:00
Tapani Pälli
44e1cf2748 anv: set correct miplevel for anv_image_hiz_op
Fixes: 5efecc9782 ("anv: Enable HiZ on multi-LOD depth buffers.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11787
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/30892>
2024-08-29 04:50:44 +00:00
Faith Ekstrand
5f402f3aae nvk: Hash minSampleShading in nvk_hash_graphics_state()
We put minSampleShading in the nvk_shader and [de]serialize that to/from
the binary so it also needs to go in the hash.  We could also plumb the
pipeline state through to the deserialize callback but that's quite a
stretch and this literally only affects minSampleShading which is a
rarely used feature.

Fixes: 813b253939 ("nvk: Switch to shader objects")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30914>
2024-08-29 04:27:43 +00:00
Faith Ekstrand
5b69215ec2 nvk: Use 4 bits per value for the anti alias values
They should always fit in 3 bits but the masks we use set 4 bits at a
time so it's probably good to be consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30914>
2024-08-29 04:27:43 +00:00
Faith Ekstrand
6e63a79267 nvk: Fix a typo in a comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30914>
2024-08-29 04:27:43 +00:00
Eric Engestrom
615d6b0e1a docs: add sha sum for 24.1.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30910>
2024-08-29 04:20:30 +00:00
Eric Engestrom
8503dbd0d2 docs: update calendar for 24.1.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30910>
2024-08-29 04:20:30 +00:00
Eric Engestrom
e78ecfc9a4 docs: add release notes for 24.1.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30910>
2024-08-29 04:20:30 +00:00
Faith Ekstrand
42114aa723 vulkan: Handle VIEW_INDEX_FROM_DEVICE_INDEX_BIT in the runtime
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
2024-08-29 03:30:31 +00:00
Faith Ekstrand
8c60f1461b vulkan: Take a VkPipelineCreateFlags2KHR in vk_pipeline_*shader_stage*()
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
2024-08-29 03:30:31 +00:00
Jesse Natalie
81a00a48bc microsoft/compiler: Handle subgroup size 4 as a required wave size
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
2024-08-29 03:30:31 +00:00
Jesse Natalie
15f13f3c45 dzn: Drop custom subgroup size handling
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
2024-08-29 03:30:31 +00:00
Faith Ekstrand
faf27a5989 dzn: Use vk_pipeline_shader_stage_to_nir()
Dozen is the last user so we can delete it now.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
2024-08-29 03:30:31 +00:00
Faith Ekstrand
4365d0d769 lvp: Stash the PipelineCreateFlags2KHR in the pipeline
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
2024-08-29 03:30:31 +00:00
Faith Ekstrand
c0191b20de vulkan/pipeline: Handle VIEW_INDEX_FROM_DEVICE_INDEX_BIT
The rehash we're doing here is a bit of a hack but it's a back-portable
hack.  We'll fix it properly in following commits.

Fixes: 9308e8d90d ("vulkan: Add generic graphics and compute VkPipeline implementations")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
2024-08-29 03:30:31 +00:00
Jesse Natalie
03655dfda1 compiler, vk: Support subgroup size of 4
Relax the assert and assign it an enum value

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30876>
2024-08-29 03:30:31 +00:00
Jesse Natalie
9f88b6025b ci/windows: Bump image tags to rebuild deps with v143 build tools
Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30877>
2024-08-29 01:46:01 +00:00
Jesse Natalie
1a93b1e217 ci/windows: Update VK-GL-CTS to d48899f85b486a70d090af59a1453763458611d9
This is needed to work around an MSVC compiler bug which causes test failures

Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30877>
2024-08-29 01:46:01 +00:00
Jesse Natalie
5053ac02ed ci/windows: Use MSVC v143 build tools
MSVC finally gained support for __typeof__ and we want to start requiring
it. Let's bump the version of the build tools we use to v143.

Acked-by: David Heidelberg <david@ixit.cz>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30877>
2024-08-29 01:46:01 +00:00
Eric Engestrom
2e389b949b freedreno/ci: add a630 flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
74f7b370ea ci/build: untangle debian-s390x from debian-ppc64el
The only thing inherited and not overridden was the `BUILDTYPE: debug`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
b39e34ba92 nouveau/ci: drop TEST_PHASE_TIMEOUT_MINUTES that match the default value
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
71787885e3 freedreno/ci: drop TEST_PHASE_TIMEOUT_MINUTES that match the default value
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
83d3c35eff etnaviv/ci: drop TEST_PHASE_TIMEOUT_MINUTES that match the default value
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
812fb1d276 broadcom/ci: use TEST_SETUP_AND_UPLOAD_MARGIN_MINUTES
Instead of manually keeping the job's `timeout:` and
`TEST_PHASE_TIMEOUT_MINUTES:` in sync.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
fc3701bb5c broadcom/ci: drop TEST_PHASE_TIMEOUT_MINUTES that match the default value
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
f01825569e ci/bare-metal/poe: change the default TEST_PHASE_TIMEOUT_MINUTES to CI_JOB_TIMEOUT - 5min
The 5min margin is configurable as `TEST_SETUP_AND_UPLOAD_MARGIN_MINUTES`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
fe075df8d9 freedreno/ci: drop unused TEST_PHASE_TIMEOUT_MINUTES in LAVA jobs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
033818fdd9 nouveau/ci: fix gk20a-gles test timeout
Setting it to the same value as (or higher than) the job timeout
effectively bypasses the safety mechanism.

Let's change it to `job timeout - 5min`.

Fixes: c8207158b5 ("ci/nouveau: fix up Jetson Nano")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
4888d39f29 freedreno/ci: fix a630_*_full tests timeout
Setting it to the same value as (or higher than) the job timeout
effectively bypasses the safety mechanism.

Let's change it to `job timeout - 5min`.

Fixes: e61b423074 ("ci/turnip: Extend a630 vk full timeout to 3 hours.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
b978d3eb54 etnaviv/ci: fix gc2000_piglit test timeout
Setting it to the same value as (or higher than) the job timeout
effectively bypasses the safety mechanism.

Let's change it to `job timeout - 5min`.

Fixes: f39ffc6911 ("ci/etnaviv: Get the gc2000_piglit manual job mostly working.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
aac9c74a83 v3dv/ci: fix test timeout for v3dv-rpi5-vk-full:arm64
It was set to 170min, which made sense when the job timeout was 3h, but
then 4bb564f40d ("broadcom/ci: add more jobs to test with rpi5")
lowered the job timeout to 2h without lowering the test timeout to match.

Fixes: 4bb564f40d ("broadcom/ci: add more jobs to test with rpi5")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800>
2024-08-29 01:03:45 +00:00
Eric Engestrom
e5852bd41f ci/vkd3d: check for tests listed in fails but not actually failing
Meaning either it is not executed or passes.

Catches typos, which I would've merged without this check.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24739>
2024-08-29 00:18:54 +00:00
Eric Engestrom
5434aa79f5 ci: run only one vkd3d test at a time
Both radv and nvk seem to be having a lot of random failures when there
are several tests running in parallel.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24739>
2024-08-29 00:18:54 +00:00
Eric Engestrom
23e9cbc623 ci/vkd3d: use upstream test-runner.sh for process isolation
Once again, making sure the input (*-vkd3d-*.txt) have the same format
as deqp-runner so that users don't have to care which one they're using,
and the output is also in the same format so that tools automatically
handle everything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24739>
2024-08-29 00:18:54 +00:00
Eric Engestrom
2019ccfc49 ci/vkd3d: make the job output less spammy, focus on what is useful to print
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24739>
2024-08-29 00:18:54 +00:00
Eric Engestrom
4a629f20a1 nvk/ci: drop skip of fixed vkd3d test
Having to stop testing any test that fails is not sustainable...
Oh, look at that next commit!

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24739>
2024-08-29 00:18:53 +00:00
Jesse Natalie
dac44e02f7 d3d12: Don't use a vertex re-ordering GS for line primitives
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30903>
2024-08-28 23:54:11 +00:00
Eric Engestrom
5b7a642941 docs: update calendar for 24.2.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30907>
2024-08-28 23:45:42 +00:00
Eric Engestrom
59fa27e1da docs: add sha sum for 24.2.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30907>
2024-08-28 23:45:42 +00:00
Eric Engestrom
beb6f3f121 docs: add release notes for 24.2.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30907>
2024-08-28 23:45:42 +00:00
Eric Engestrom
4246c88c5e ci: take igalia farm offline
There seems to be an issue although I can't investigate now (I need to
sleep ^^), so just marking the farm as offline for now.
2024-08-29 01:35:28 +02:00
Faith Ekstrand
3e1d847d37 radv: Use the SPIR-V printer in spirv_to_nir
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30875>
2024-08-28 21:52:59 +00:00
Faith Ekstrand
6e3938f45b v3dv: Drop the SPIR-V dumper
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30875>
2024-08-28 21:52:59 +00:00
Faith Ekstrand
c60a421f0c vtn: Add a debug flag to dump SPIR-V assembly
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30875>
2024-08-28 21:52:59 +00:00
Faith Ekstrand
9520fb8ecc vtn: Allow SPIR-V debug options in release builds
As long as no one sets any flags, they cost us virtually nothing.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30875>
2024-08-28 21:52:58 +00:00
Faith Ekstrand
ee7b596abc vtn: Move initialization of mesa_spirv_debug to a helper
Importantly, this gives us a single once_flag instead of two so we
actually only initialize it once.  This race will probably never matter
in practice because it's just a debug var but this is cleaner.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30875>
2024-08-28 21:52:58 +00:00
Faith Ekstrand
d8644a533e v3dv: Update a debug message
v3dv switched to vk_pipeline_shader_stage_to_nir a while ago.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30875>
2024-08-28 21:52:58 +00:00
Kenneth Graunke
da395e6985 intel/brw: Fix extract_imm for subregion reads of 64-bit immediates
We could be trying to extract a D/UD from a Q/UQ, for example.  We were
ignoring the top 32-bits, which is incorrect.

Fixes: 580e1c592d ("intel/brw: Introduce a new SSA-based copy propagation pass")
Reviewed-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/30884>
2024-08-28 12:33:26 -07:00
Kenneth Graunke
51c85e0363 intel/brw: Drop misguided sign extension attempts in extract_imm()
This function never expands a type - it only narrows it.  As such, we
don't need to ever sign extend to fill additional new bits.  I think
this code was left over from earlier versions of my optimization pass
that was buggy and trying to handle cases it should not have.

Fixes: 580e1c592d ("intel/brw: Introduce a new SSA-based copy propagation pass")
Reviewed-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/30884>
2024-08-28 12:33:26 -07:00
Karol Herbst
53869ae45b rusticl/mesa: Return CStr for device and vendor names.
This allows us to skip converting between Rust and C strings when fetching
those.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30888>
2024-08-28 18:24:04 +00:00
Karol Herbst
6b43c5c552 zink: cache generated vendor and device name inside zink_screen
get_name and get_device_vendor are supposed to return immutable strings.

This prevents the CL_DEVICE_NAME and CL_DEVICE_VENDOR queries from
randomly failing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30888>
2024-08-28 18:24:04 +00:00
Karol Herbst
73c8e2c3cd rusticl: reuse PipeContext
Gallium drivers are likely to leak CPU and GPU resources as with OpenGL
they rarely have to create more than a single pipe_context.

This also reduces the cost of creating CL queues.

In order to debug drivers leaking memory a new debug option is added to
disable the reuse of PipeContexts

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30888>
2024-08-28 18:24:04 +00:00
David Rosca
64ca0fd2f2 frontends/va: Allocate surface buffers on demand
This saves memory by not allocating encode DPB surface buffers which
are currently not used by drivers.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30843>
2024-08-28 15:37:10 +00:00
David Rosca
de61cb72fe pipe: Use correct struct for h264/h265 dpb entry
Fixes: cc14724d73 ("frontends/va: Implement DPB management for H264/5 encode")
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30843>
2024-08-28 15:37:10 +00:00
David Heidelberg
83b74bfc6d bin/gen_release_notes: adjust checksums section
We currently provide SHA256 and SHA512, differenciated by length.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30897>
2024-08-28 15:25:27 +00:00
David Rosca
2aa373aee5 radeonsi/vcn: Implement get_feedback_fence
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30780>
2024-08-28 13:38:52 +00:00
David Rosca
49596f70ee frontends/va: Check for errors from end_frame in vlVaEndPicture
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30780>
2024-08-28 13:38:52 +00:00
David Rosca
db45d16dfe pipe: Add int return value to video end_frame
Make it possible to report errors to frontend.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30780>
2024-08-28 13:38:52 +00:00
David Rosca
96fe9fde3f frontends/va: Implement sync buffer/surface timeout for encode feedback
Same as processing/decode, the driver will assign fence to
pipe_picture_desc::fence and frontend will wait on it with
get_feedback_fence.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30780>
2024-08-28 13:38:52 +00:00
David Rosca
6d69748542 d3d12: Remove get_feedback_fence implementation
The function signature and semantics will be changed in next commit.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30780>
2024-08-28 13:38:52 +00:00
Maíra Canal
ef4c41d7fd v3d, vc4: remove unused functions
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30889>
2024-08-28 13:15:45 +00:00
Faith Ekstrand
518b2d548f nir: Preserve fp_fast_math in nir_opt_vectorize()
Fixes the following CTS tests on NVK:

dEQP-VK.spirv_assembly.instruction.*.float_controls.fp16.generated_args.signed_zero_sub_var_preserve*

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30859>
2024-08-28 12:29:06 +00:00
Samuel Pitoiset
7392e3306e radv: remove useless check about non-indexed draws and DGC
The index buffer is only emitted inside the indexed draw path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
0e1e5264b5 radv: specialize indirect command layout stride for DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
8edbfbfe68 radv: specialize push constant DGC token
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
7d0972711c radv: simplify allocating push constants with DGC
Using a condition will allow to specialize it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
545949d12f radv: specialize VBO DGC token
Can't really specialize more without rewriting VBO completely.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
64076c652c radv: specialize pipeline DGC token
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
7270bf7aa3 radv: specialize index buffer DGC token
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
3128eca2d0 radv: specialize draw DGC token
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
ccd55b55da radv: specialize dispatch DGC token
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
b4793400f3 radv: add a pointer to the DGC layout in dgc_cmdbuf
Will be useful.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
Samuel Pitoiset
c7540d3fd6 radv: prepare for specialized DGC shaders
The DGC prepare shader is getting crazy and it takes a non-trivial
amount of time. Using specialized DGC shaders is cleaner and it's
faster than a pile of conditional SALU instructions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30852>
2024-08-28 11:03:36 +00:00
David Heidelberg
0dc791ed57 freedreno: use unicode © instead of DOS-like (C) copyright sign
Acked-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30721>
2024-08-28 08:54:00 +00:00
David Heidelberg
89366ff523 freedreno: Convert to SPDX-License-Identifier instead of pasting whole license
SPDX is ISO standard now, let's leverage it to cleanup our code.

Acked-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30721>
2024-08-28 08:54:00 +00:00
Georg Lehmann
ef970c5a9d nir: optimize pack_uint_2x16 of pack_half(a, 0)
Foz-DB Navi31:
Totals from 31 (0.04% of 79395) affected shaders:
Instrs: 6157 -> 6065 (-1.49%)
CodeSize: 35676 -> 34936 (-2.07%)
Latency: 23979 -> 23805 (-0.73%); split: -0.79%, +0.07%
InvThroughput: 5248 -> 5124 (-2.36%)
VALU: 3224 -> 3162 (-1.92%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30855>
2024-08-28 07:16:55 +00:00
David Rosca
79637d5942 radeonsi/vcn: Support H264 constrained intra prediction
We now get this flag from PPS, so it can be enabled when requested.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30842>
2024-08-28 06:48:32 +00:00
David Rosca
c53641f810 radeonsi: Implement buf_ofst_info in si_video_resize_buffer GPU copy path
This is used when resizing VP9 Tier1 DPB.

Fixes: 322240fcff ("radeonsi: Add GPU copy path to si_video_resize_buffer")
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30842>
2024-08-28 06:48:32 +00:00
David Rosca
134e95cdb1 radeonsi: Enable transform_skip HEVC feature support
This used to be hardcoded in PPS, but now it can be selected by apps.
However, we were not reporting this feature as supported in HEVC feature
flags and apps would always disable it.

Fixes: af849516f0 ("radeonsi/vcn: Use pipe header params in HEVC header encoder")
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30842>
2024-08-28 06:48:32 +00:00
Deborah Brouwer
18f15da94d ci/intel: add i915/MTL firmware to rootfs
Add Meteor Lake firmware directly to rootfs since it is not available
from debian package.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30770>
2024-08-28 04:31:10 +00:00
Deborah Brouwer
0441202d6b ci: add firmware files to rootfs
Currently only package versions of firmware files are available in the
rootfs.

This commit allows firmware files to be pulled directly from a specific
git hash of a remote repository.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30770>
2024-08-28 04:31:10 +00:00
Caio Oliveira
695f5314d6 intel/brw: Simplify fs_inst annotation
When INTEL_DEBUG=ann is also set, the disassembler would annotate the
output with either a string or the string verison of a NIR instruction.
This was done by keeping two pointers (but only using one at a time).

Change the code to print the instruction into a string instead of
keeping it pointer around (peg the string to the shader).  That way,
only one pointer is needed for annotations.  Because that serialization
is not free, only do that when the environment variable is set.

Since we are here, move the annotation string field to the end, moving
it to the least commonly used cacheline.  Further packing might allow
the entire fs_inst to fit in two cachelines.

For release builds, don't even add the debug annotation to the struct.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30822>
2024-08-28 03:59:50 +00:00
Caio Oliveira
ec15cdfa2a intel/brw: Pack brw_reg struct
The alignment required for the second union (has 64-bit size) causes
a hole between the first and second union.  Move the remaining data
there.

In 64-bit build, shrinks brw_reg from 24 bytes to 16 bytes.  And by
consequence, shirnks fs_inst from 200 bytes to 160 bytes, making it
use one less cacheline.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30822>
2024-08-28 03:59:50 +00:00
Iván Briano
2261b298d1 anv: fix adding to wa_addr
Fixes: 6336e0fe7f ("anv: order data in wa_bo to leave wa_addr last")

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30881>
2024-08-27 18:10:58 -07:00
Yiwei Zhang
7941d705c3 venus: workaround cacheline overflush issue on Intel JSL
We observed that Venus on ANV on JSL platform has some cacheline flush
issue. The overflush shows up as:
1. There're 2 threads venus bliting the feedback buffers suballocated
   from the same backing device memory, back to back.
2. On thread A, flushing the feedback buffer for cpu read is placed
   behind flushing a shader storage buffer for cpu read.
3. On thread B, flushing a different feedback buffer with the same
   backing device memory (different offset bound to) can kick the
   feedback buffer flush in (2) earlier than it should be flushed.
4. As a result, CPU polling thread for thread B results would see venus
   feedback buffer update earlier than shader storage buffer results
   being updated, breaking Venus sync primitives optimization.

During investigation, a solid workaround for JSL platform is to force
Venus to align up to 128 bytes for feedback buffer suballocation while
the default is at 64 bytes.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30879>
2024-08-28 00:43:59 +00:00
Eric Engestrom
c0762e88f3 ci/build: fix ppc64le and s390x jobs rules
I think these were written with the idea of making it "(build rules) &&
(any relevant driver), but instead the driver rules are bypassing the
build rules because
1) it's not an AND, it's an OR; any line that matches applies, and
2) the driver rules are `when: on_success` when these need to be `when:
   manual` like the rest of the build jobs.

Let's stop trying to be special and simply behave like all the other
build jobs.

We can always try making complex rules later, but once we're on a base
that works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30871>
2024-08-28 00:11:26 +00:00
Eric Engestrom
f6eeb3c6d1 ci/image-tags: re-generate all the images building deqp-runner
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30866>
2024-08-27 22:26:17 +00:00
Eric Engestrom
8a95129aee ci/deqp-runner: add infra to apply patches
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30866>
2024-08-27 22:26:17 +00:00
Eric Engestrom
83d9cfa58d ci/deqp-runner: build from git checkout even on linux
This allows things like patching deqp-runner, and unifies linux and
android.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30866>
2024-08-27 22:26:17 +00:00
Eric Engestrom
03e50318ff ci/deqp-runner: be less verbose in the loop printing the deqp builds info
The bash stuff printed in the middle makes it unnecessarily hard to read
the useful part of the output.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30866>
2024-08-27 22:26:17 +00:00
Eric Engestrom
3b0c527b56 ci/deqp: simplify command to list local deqp patches
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30866>
2024-08-27 22:26:17 +00:00
Eric Engestrom
ca7fde8761 ci/deqp-runner: restore CC after temporarily overriding it
Fixes: 6edfb09dda ("ci/deqp-runner: unset CC for arm32 cross-compilation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30866>
2024-08-27 22:26:17 +00:00
Sagar Ghuge
17f97a69c1 iris: Reduce clear color state alignment to 64B
Closes https://gitlab.freedesktop.org/mesa/mesa/-/issues/10067

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/26793>
2024-08-27 21:13:30 +00:00
Sagar Ghuge
063715ed45 anv: Reduce clear color state alignment to 64B
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/26793>
2024-08-27 21:13:30 +00:00
Georg Lehmann
246e22ff4f aco/tests: do not use mul with constant to tests neg modifier
The neg can be moved to the constant operand, which defeats the point
of the test.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30781>
2024-08-27 20:41:10 +00:00
Georg Lehmann
bf67ac30fe aco/tests: allow literals with resolved swizzles in vop3p test
My new optimizer code will resolve swizzles for constants.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30781>
2024-08-27 20:41:09 +00:00
Georg Lehmann
6a18eb6afc aco/tests: parse neg(constant) in vop3p test
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30781>
2024-08-27 20:41:09 +00:00
Georg Lehmann
52465956ca aco/print_ir: use neg() for constants
Otherwise, it's not clear if -1 is 0xffffffff or 0x80000001.
LLVM uses a similar logic.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30781>
2024-08-27 20:41:09 +00:00
Georg Lehmann
fb8e730d9b aco/tests: do not use add to tests neg modifer
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30781>
2024-08-27 20:41:09 +00:00
Georg Lehmann
f71522e5cf aco/tests: don't test dpp constant propagation with row shift
With bc=1, removing DPP for shifts is invalid.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30781>
2024-08-27 20:41:09 +00:00
Jesse Natalie
f990322597 wgl: Add missing idep_mesautilformat
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30874>
2024-08-27 20:16:21 +00:00
bbhtt
284ad7da39 pipe_loader_drm: Fix virtgpu_drm header path
Fixes: 2ea4a59ab7 ("loader: Add better
support for virtgpu nctx driver loading")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30673>
2024-08-27 19:36:24 +00:00
Eric Engestrom
25ba90fd88 vc4/meson: simplify neon build now that the android build system doesn't exist anymore
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30854>
2024-08-27 18:32:01 +00:00
Mike Blumenkrantz
9777f016c7 egl/x11: pretend kopper is software with LIBGL_KOPPER_DRI2
there's no render device fd here, so take the sw path on startup

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30872>
2024-08-27 17:41:37 +00:00
Mike Blumenkrantz
aae62e5d29 egl: unify LIBGL_KOPPER_DRI2 checks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30872>
2024-08-27 17:41:37 +00:00
Konrad Dybcio
d94d152498 freedreno: Add initial A621 support
Baby A650 found in some peculiar SoCs

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30253>
2024-08-27 17:06:55 +00:00
Karol Herbst
b77eca8a95 vtn: mark ImageMipmap as supported
The SPIRV-LLVM-Translator seems to also set that cap for MSAA cl images,
but it looks like it works just fine in regards to LODs as well.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30834>
2024-08-27 15:06:17 +00:00
Karol Herbst
fc88f04ba1 vtn, nir: handle OpImageQueryLevels on images
This is needed for cl_khr_mipmap_image, specifically the OpenCL C
function get_image_num_mip_levels.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30834>
2024-08-27 15:06:17 +00:00
Karol Herbst
260a50add5 nir: Support multisampled images in lower_read_only_images_to_tex()
This is needed for cl_khr_gl_msaa_sharing

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30834>
2024-08-27 15:06:16 +00:00
Karol Herbst
c5e38d5cb8 compiler/types: Add multisample vimage/vtexture types
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30834>
2024-08-27 15:06:16 +00:00
Karol Herbst
9982568fa8 clc: add support for more image related extensions
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30834>
2024-08-27 15:06:16 +00:00
Samuel Pitoiset
2fda0db66f ac,radeonsi,radv: add common GFX preambles
RADV and RadeonSI have a few differences.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30789>
2024-08-27 14:14:57 +00:00
Samuel Pitoiset
80e8e18cc6 ac: add ac_gfx103_get_cu_mask_ps()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30789>
2024-08-27 14:14:57 +00:00
Lionel Landwerlin
e97b968aeb brw: add a comment what Gfx12.5 URB fences
Signed-off-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/30849>
2024-08-27 13:38:14 +00:00
Lionel Landwerlin
93fba40389 brw: switch mesh/task URB fence prior to EOT to GPU
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30849>
2024-08-27 13:38:14 +00:00
Eric Engestrom
fda6f8638a vc4: Add missing libvc4_neon build dependencies
Duplicates the libvc4 dependencies.

Fixes: ebcb4c2156 ("meson: Enable VC4's NEON assembly support.")
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Co-authored-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30819>
2024-08-27 13:10:28 +00:00
Samuel Pitoiset
9bfb23b252 radv: rework computing the DGC cmdbuf layout
This is much better and less error prone because the offset/size are
computed in only one place now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30868>
2024-08-27 12:36:36 +00:00
Sergi Blanch Torne
156c1b0547 New testing jobs zink-anv-adl{,-full}
Introduce testing coverage for Zink in ANV driver in ADL generation. One job
in the pre-merge fraction, and 2 for the full coverage on the nightly runs.
Introduced the initial expectation files with fails, flakes, and skips.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26831>
2024-08-27 12:49:31 +02:00
Sergi Blanch Torne
1b51e24b0a New testing jobs intel-adl-skqp
Introduce skqp testing on ADL generation. Only one job on the pre-merge, and
no fraction needed, so not required to set up a job for nightly runs.
Introduced the initial expectation files with fails, flakes, and skips.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26831>
2024-08-27 12:49:28 +02:00
Sergi Blanch Torne
c653e98748 New testing jobs anv-adl-angle{,-full}
Introduce testing coverage for Angle in ANV driver on ADL generation. One job
in the pre-merge fraction, and another for the full coverage on the nightly
runs. Introduced the initial expectation files with fails, flakes, and skips.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26831>
2024-08-27 12:49:24 +02:00
Sergi Blanch Torne
6c9138f86a New testing jobs anv-adl{,-full}
Introduce testing coverage for ANV driver on ADL generation. Sharded in 4 jobs
the pre-merge fraction, and with 5 jobs the full coverage on the nightly runs.
Introduced the initial expectation files with fails, flakes, and skips.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26831>
2024-08-27 12:49:21 +02:00
Sergi Blanch Torne
fce5e77604 New DUT for Alder Lake
Introduce a new runner tag from a hidden job for ADL (Alder Lake Intel
generation), known as brya.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26831>
2024-08-27 12:49:16 +02:00
Kenneth Graunke
437bda3013 intel/brw: Get rid of the lsc_msg_desc_wcmask helper
The LOAD/STORE opcodes take a vector size, while the LOAD/STORE_CMASK
opcodes take a channel mask.  The two are mutually exclusive.  So we
can just have the lsc_msg_desc() helper take one or the other in the
same parameter.  This more closely matches the actual descriptor.

We couldn't do this until the previous commit, since we were previously
relying on the lsc_msg_desc() function to calculate a cmask out of the
number of vector components.  But now we don't need it to do that.

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/30632>
2024-08-27 09:25:59 +00:00
Kenneth Graunke
55f193a105 intel/brw: Switch from LSC CMASK opcodes to regular LOAD/STORE
The LOAD/STORE opcodes take a vector size (number of components), while
the LOAD/STORE_CMASK opcodes take a channel mask.  For some reason, we
were passing a number of channels to lsc_msg_desc(), then using it to
construct a channel mask with all channels enabled, and always using the
CMASK message variants.

Considering we don't actually want to mask off any channels, we should
probably just use the regular LOAD/STORE opcodes, as they're more
flexible anyway.

One exception is that typed messages on Xe2 apparently only support
LOAD_CMASK/STORE_CMASK and not regular LOAD/STORE.  So we keep using
those there.  (Thanks to Sagar Ghuge for catching this!)

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/30632>
2024-08-27 09:25:58 +00:00
Sviatoslav Peleshko
7e52b67801 anv: Add full subgroups WA for the shaders with barriers in Breaking Limit
When barriers are used in invalid shaders with non-uniform control flow
we might get a hang. Forcing 32-wide group can help by making it more
probable that barrier instruction is executed by at least one channel
in each thread, and thus hang will be avoided. This shouldn't affect
Xe2+, where active-thread-only barriers are used anyway.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11497
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30581>
2024-08-27 08:26:08 +00:00
Sviatoslav Peleshko
1904fe1186 anv: Release correct BO in anv_cmd_buffer_set_ray_query_buffer
If p_atomic_cmpxchg doesn't set the ray_query_shadow_bos[bucket] to new_bo
allocated by this thread, it returns the bucket BO allocated by the other
thread and we use it. But due to a mistake, we also release that BO, not
the candidate just allocated by this thread and never used again.

Fixes: 5d3e4193 ("anv: enable ray queries")
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/30581>
2024-08-27 08:26:08 +00:00
Sviatoslav Peleshko
09122e2be0 brw,elk: Fix opening flags on dumping shader binaries
Truncation is needed for overwriting correctly in cases when old file is
bigger than the one we want to dump (e.g. when the old one was edited
inplace). Also, creation permissions are way too broad.

Fixes: 4f41c44d ("intel/compiler: Add variable to dump binaries of all compiled shaders")
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/30581>
2024-08-27 08:26:08 +00:00
Sviatoslav Peleshko
442cc7996e anv: Assert ray query BO actually exists
The crash will happen if the client tries to use ray queries without
enabling the KHR_ray_query extension. Add an assert to be able to catch
this sooner.

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/30581>
2024-08-27 08:26:08 +00:00
Samuel Pitoiset
4c1a912372 radv: remove RADV_DEBUG=nogsfastlaunch2
It's been two Mesa releases since this fast-launch mode2 has been fixed
on GFX11 and everything works as expected. The option is no longer
needed, note that GFX12 only has mode2 apparently.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30815>
2024-08-27 07:51:33 +00:00
Nanley Chery
4a8f3181ba intel: Support any depth fast-clear value on Xe2
Remove the restriction that a depth fast-clear must have a clear value
which matches an image-dependent heuristic.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30767>
2024-08-27 06:15:36 +00:00
Nanley Chery
4a9e45061a anv: Add and use anv_image_hiz_clear_value()
The benchmarks we're tracking tend to prefer clearing depth buffers to
0.0f when the depth buffers are part of images with multiple aspects.
Otherwise, they tend to prefer clearing depth buffers to 1.0f.

Replace the ANV_HZ_FC_VAL constant with a function which implements this
heuristic.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30767>
2024-08-27 06:15:36 +00:00
Nanley Chery
9fd79dc49e anv: Pass the VkClearDepthStencilValue for clears
Xe2 can easily support fast-clearing depth buffers to multiple clear
values. Instead of assuming a hard-coded value in various parts of the
driver, pass the clear value down the expected paths.

For consistency, also adjust the slow depth clear function to have a
matching parameter.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30767>
2024-08-27 06:15:36 +00:00
Paulo Zanoni
f3c7e14f09 isl: don't assert(num_elements > (1ull << 27))
Some games such as Marvel's Spider-Man Remastered and Assassin's
Creed: Valhalla don't work in debug mode because they hit this
assertion. In Release mode, they appear to work (although in some
platforms there may be visual corruption or GPU hangs). There's
nothing we can do about this error (see below), so in this patch we
replace the assertion with an error message, because it allows us to
(i) test the rest of the game in debug mode so we may catch other
issues; and (ii) warn users of release mode that the issue is
happening.

The unsupported num_elements comes from vkGetDescriptorEXT() and
appears to be violating VUID-VkDescriptorGetInfoEXT-type-09427. This
function cannot return errors, but we can disable
VK_EXT_descriptor_buffer.

If we do disable the extension, then vkCreateBufferView() will start
triggering the assertion, and we can see that
VkBufferViewCreateInfo-range-00930 is being violated. If we change Anv
to return errors on these vkCreateBufferView() cases, then the games
won't work at all.

I reported this to vkd3d-proton, but according to the vkd3d-proton
developer Philip Rebohle:

 "There's also the problematic case of games using typed descriptors
  but passing non-typed buffer descriptors, which is an extremely
  common app bug that works on all D3D12 drivers that we need to work
  around by creating typed views. If that's what's happening here then
  the best we can do is to just not create the typed view and have the
  game be broken entirely, or create a smaller view and most likely
  still completely break the game, but at least that way it wouldn't
  trigger Vulkan validation. Emulating larger views via multiple
  smaller views is not possible for us."

 "Confirmed that it's the app itself creating these views."

 "D3D12 does not have runtime validation for this or any sort of query
  for the app, so we really can't do much here."

Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9963
Link: https://github.com/HansKristian-Work/vkd3d-proton/issues/2071
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/30775>
2024-08-27 05:47:50 +00:00
Faith Ekstrand
b78a691ce2 nil,nvk: Disable modifiers for B10G11R11_UFLOAT and E5B9G9R9_UFLOAT
The CTS tests fail due to precision issues (arguably a CTS bug) but it
also doesn't make a lot of sense to advertise modifiers on them at all.

Fixes: cd428e01d7 ("nvk: Advertise VK_EXT_image_drm_format_modifier")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30861>
2024-08-27 05:33:10 +00:00
Lionel Landwerlin
2158fe2ae2 nir/divergence: add missing load_constant_base_ptr
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30712>
2024-08-27 01:33:52 +00:00
Lionel Landwerlin
6336e0fe7f anv: order data in wa_bo to leave wa_addr last
We want to make sure the workaround_address is the last item in the BO
so that we don't have to care about the size of the writes going
there, we'll be sure they won't overwrite other items in that BO.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7b9400b7f7 ("intel/blorp: Don't use clear color conversion on gfx12")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11775
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30844>
2024-08-27 00:51:03 +00:00
Lionel Landwerlin
d8ec8acede anv: always use workaround_address, not workaround_bo
The workaround BO has some debug information at the beginning. The
workaround address is placed after that.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30844>
2024-08-27 00:51:03 +00:00
Nanley Chery
9b98cebe9a intel: Drop BLORP_BATCH_NO_UPDATE_CLEAR_COLOR
All drivers update the clear color themselves. So, drop the
functionality from BLORP as well as the flag controlling it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30824>
2024-08-26 23:57:12 +00:00
Nanley Chery
64d861b700 iris: Skip some fast-clears even on color changes
Previously, we only skipped fast-clearing if the aux state was CLEAR and
the clear color hadn't changed. That was because we relied on
blorp_fast_clear() to update the clear color for us. Now that we update
the clear color outside of blorp_fast_clear(), also skip fast-clearing
when the clear color changes while in the CLEAR state.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30824>
2024-08-26 23:57:12 +00:00
Nanley Chery
2886851a8e iris: Always use BLORP_BATCH_NO_UPDATE_CLEAR_COLOR
Update the clear color with iris rather than with BLORP. This enables an
optimization in the next patch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30824>
2024-08-26 23:57:12 +00:00
Nanley Chery
721d0c3e77 anv,hasvk: Always use BLORP_BATCH_NO_UPDATE_CLEAR_COLOR
Store the clear color from within the drivers, rather than from BLORP.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30824>
2024-08-26 23:57:11 +00:00
Nanley Chery
5fd42500cf anv,hasvk: Add and use set_image_clear_color()
We're going to be storing clear colors from the drivers rather than
BLORP. Add a function for this purpose.

For now, the first use replaces init_fast_clear_color(). One change in
behavior is that the clear color initialization is now done without
write-checking on gfx12. This actually matches what anv does to other
writes to the image's fast-clear tracking state. We can fix this later
if and when we address the larger issue.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30824>
2024-08-26 23:57:11 +00:00
Yunhyeok "Yune" Choi
27014df366 glx: Getting rid of the double assignment in __glXWireToEvent.
Previously the field `event_type` in `GLXPbufferClobberEvent`
was assigned twice in succession with different values.
Removing the first assignment and retaining only the second one.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30836>
2024-08-26 23:19:56 +00:00
Dave Airlie
4bf257a18f llvmpipe: make sure to duplicate the fd handle before giving out
This handle is given to the user to close, so make sure to dup it
first.

Fixes: d74ea2c117 ("llvmpipe: Implement dmabuf handling")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30839>
2024-08-26 22:53:12 +00:00
Dave Airlie
521dc42e6c llvmpipe: handle stride properly on lvp udmabuf imports
The import data comes in via the fd import, but we need to make
sure to store the row stride value here.

Fixes: c44d65a467 ("lp: only map dt buffer on import from dmabuf")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30839>
2024-08-26 22:53:12 +00:00
Dave Airlie
7db16e7cdd radv: turn video decode/encode on for VCN4 with latest fw
With the latest fw in the linux-firmware repo, navi3x passes
all the CTS tests.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30837>
2024-08-26 22:19:09 +00:00
Dave Airlie
4255bbd958 radv: move video decode enable test into a flag
This makes it easier to start conditionalising this on fw releases.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30837>
2024-08-26 22:19:09 +00:00
Benjamin Cheng
95a980b61f radv/video: add event support for VCN4
This was the main missing piece for passing vulkan video CTS
as the video firmwares couldn't do proper vulkan events.

With new enough firmware this is now possible.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30837>
2024-08-26 22:19:09 +00:00
Víctor Manuel Jáquez Leal
c340862555 frontends/va: Don't return P010/P016 as surface formats when encoding
This is almost a complete revert of 0eccd158 (!3285), since it was a
driver fix for a client bug. vaapih265enc should be fixed rather adding
a workaround that breaks the logic of API, since vaQuerySurfaceAttributes
depends only on config parameter, which defines the rt format.

You can verify it with vadumpcap https://github.com/fhvwy/vadumpcaps

Signed-off-by: Victor Jaquez <vjaquez@igalia.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19443>
2024-08-26 22:01:46 +00:00
Mike Blumenkrantz
786be05df3 dril: add zink stub
ironically this was the only driver left out

Fixes: 3de62b2f9a ("gallium/dril: Compatibility stub for the legacy DRI loader interface")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30851>
2024-08-26 21:08:58 +00:00
Mike Blumenkrantz
7255c5e108 ci: add a660 flake
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/62739168

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30857>
2024-08-26 20:42:22 +00:00
Assadian, Navid
cb32bcd3fe amd/vpelib: Add 420 semi-planar 12bit handling
Adds semi-Planar 420 12 bits formats.

Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:15 +00:00
Brendan
fcad791d07 amd/vpelib: Create virtual stream concept
[Why]
Need to create streams that don't come from input params (ex. for bg
gen) to prepare for future concepts.

[How]
Add enum for stream type, create helper functions to populate virtual
streams, and add custom functions where virtual stream function varies
from input stream function.

Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Brendan Leder <brendansteve.leder@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Lin, Ricky
b670701b65 amd/vpelib: Increase the CD field in vpe descriptor programming
Introduce the vpe desc writer hook.

Co-authored-by: Roy Chan <roy.chan@amd.com>
Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Ricky Lin <ricky.lin@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Shih, Jude
cb9175a7af amd/vpelib: Update Plane Descriptor Writer
Refactor to support new plane descriptor hook, and update enum
vpe_scan_direction.

Co-authored-by: Jesse Agate <jesse.agate@amd.com>
Co-authored-by: Roy Chan <roy.chan@amd.com>
Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Jude Shih <shenshih@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Patel, Utpal
18dae30b17 amd/vpelib: Add resource function hooks for checking support
Add function hooks for checking support including rotation, background
color, DCC capability and input/output support check.

Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Utpal Patel <utpal.patel@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Alan Liu
06097ad64d amd/vpelib: Remove unused structs
Remove the definition of unused structs:
- struct x_axis_config
- struct point_config
- struct curve_points32
- struct lut_point
- struct pwl_parameter2

Reviewed-by: Krunoslav Kovac <krunoslav.kovac@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Chang, Tomson
6483c2c786 amd/vpelib: Add and fix collaborate sync data
[Why&How]
The original implementation always have sync data == 1.
Make it increasing with some 4 bits in random to help debugging
collaborate sync issues across multiple contexts.

Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Tomson Chang <tomson.chang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Lin, Ricky
015b1b52c8 amd/vpelib: Remove extra collaborate sync commands in IB
Remove extra collaborate sync commands and fix coding format.

Co-authored-by: Roy Chan <roy.chan@amd.com>
Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Ricky Lin <ricky.lin@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Lin, Ricky
e9e2fe389f amd/vpelib: Use VPE_IP_LEVEL_1_0 for VPE IP 6.1.3
Use VPE_IP_LEVEL_1_0 for VPE IP version 6.1.0 and 6.1.3.

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Ricky Lin <ricky.lin@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Patel, Utpal
73d112f372 amd/vpelib: Add input pixel format support
Add input pixel format support for VPE.

Signed-off-by: Utpal Patel <utpal.patel@amd.com>
Reviewed-by: Jesse Agate <jesse.agate@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Hsieh, Mike
0164bfda65 amd/vpelib: Add cache mechanism for 3D Lut command
[WHY & HOW]
Converting 3D Lut parameters into vpe command takes time.
3D Lut will not change every frame, by adding cache mechanism can improve effeciency.

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Mike Hsieh <mike.hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Kovac, Krunoslav
9817793cd9 amd/vpelib: Reuse existing float to reg format conversion
Remove vpe_fixpt_from_float and use existing conversion
for double(float)->reg custom 1.6.12 format.

Reviewed-by: Roy Chan <roy.chan@amd.com>
Acked-by: Alan Liu <haoping.liu@amd.com>
Signed-off-by: Krunoslav Kovac <krunoslav.kovac@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30715>
2024-08-26 19:57:14 +00:00
Eric Engestrom
f79c80e6d6 turnip/ci: document all the a750 flakes seen in the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30856>
2024-08-26 19:41:12 +00:00
Eric Engestrom
22bd67a16d zink+nvk/ci: document all the flakes seen in the last week
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30856>
2024-08-26 19:41:12 +00:00
Eric Engestrom
6ab8e089bd zink+nvk/ci: document new variant of test failing
Failing since a commit in the fef77e1d...7b32df69 range

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30856>
2024-08-26 19:41:12 +00:00
Rhys Perry
dea1fedf51 aco/tests: add more VALUMaskWriteHazard tests
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/30818>
2024-08-26 19:16:34 +00:00
Rhys Perry
11262a01ce aco: preserve bitsets after a lane mask is written
fossil-db (navi31):
Totals from 4840 (6.10% of 79395) affected shaders:
Instrs: 13733449 -> 13761177 (+0.20%); split: -0.00%, +0.21%
CodeSize: 71997868 -> 72102520 (+0.15%); split: -0.00%, +0.15%
Latency: 128385177 -> 128408780 (+0.02%); split: -0.00%, +0.02%
InvThroughput: 21105847 -> 21109475 (+0.02%); split: -0.00%, +0.02%
VALU: 7741209 -> 7741210 (+0.00%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
2024-08-26 19:16:34 +00:00
Rhys Perry
61e73c2323 aco: check SALU writing lanemask later for VALUMaskWriteHazard
This should be done after reads are checked and
sgpr_read_by_valu_as_lanemask_then_wr_by_salu is reset. The old version
also skipped checking the reads if the write check passed.

fossil-db (navi31):
Totals from 193 (0.24% of 79395) affected shaders:
Instrs: 3212435 -> 3212735 (+0.01%)
CodeSize: 16462868 -> 16463848 (+0.01%); split: -0.00%, +0.01%
Latency: 19492377 -> 19492462 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 4419705 -> 4419718 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
2024-08-26 19:16:34 +00:00
Rhys Perry
b1ba7d1b99 aco: don't consider sa_sdst=0 before SALU write to fix VALUMaskWriteHazard
LLVM does but that's probably a bug.

fossil-db (navi31):
Totals from 311 (0.39% of 79395) affected shaders:
Instrs: 380453 -> 381075 (+0.16%)
CodeSize: 1961012 -> 1964744 (+0.19%)
Latency: 4799095 -> 4800313 (+0.03%)
InvThroughput: 958358 -> 958904 (+0.06%)
VALU: 242322 -> 242633 (+0.13%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
2024-08-26 19:16:34 +00:00
Rhys Perry
8f5ee70d85 aco: also consider VALU reads for VALUMaskWriteHazard
fossil-db (navi31):
Totals from 9776 (12.31% of 79395) affected shaders:
Instrs: 19348258 -> 19383680 (+0.18%); split: -0.00%, +0.19%
CodeSize: 101223460 -> 101366964 (+0.14%); split: -0.01%, +0.15%
Latency: 172853115 -> 172866070 (+0.01%); split: -0.01%, +0.01%
InvThroughput: 27590468 -> 27592390 (+0.01%); split: -0.00%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11550
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11436
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11337
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11738
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11741
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
2024-08-26 19:16:34 +00:00
Rhys Perry
ee648326d9 aco: ignore exec and literals when mitigating VALUMaskWriteHazard
LLVM ignores exec and literals don't seem to work in some cases.

fossil-db (navi31):
Totals from 2676 (3.37% of 79395) affected shaders:
Instrs: 10638979 -> 10646019 (+0.07%); split: -0.00%, +0.07%
CodeSize: 55929640 -> 55959416 (+0.05%); split: -0.00%, +0.06%
Latency: 107707408 -> 107712893 (+0.01%); split: -0.00%, +0.01%
InvThroughput: 18119843 -> 18120442 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30818>
2024-08-26 19:16:34 +00:00
Eric Engestrom
75ab02068e kopper: only include loader_dri3_helper.h when xcb is enabled
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11779
Fixes: f14ef0ee0a ("kopper: reuse dri3 functions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30848>
2024-08-26 18:34:31 +00:00
Valentine Burley
4cfaf10c10 llvmpipe: Only use udmabuf with libdrm
It's possible to have the linux/udmabuf.h header but not libdrm in some setups, like under Termux.

Fixes: 112063a060 ("llvmpipe: Only use udmabuf if header is found")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30853>
2024-08-26 17:57:44 +00:00
Alyssa Rosenzweig
4fa1709eaf asahi/clc: drop caps list
I'll use whatever caps I dang well please.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30792>
2024-08-26 15:04:00 +00:00
Alyssa Rosenzweig
fc28ebcfa1 vtn: infer SpvCapabilityLinkage
It is always implemented by vtn, and it is available to the shader
depending on the create_library option. Either way, no reason for the backend to
worry about this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30792>
2024-08-26 15:04:00 +00:00
Mary Guillemard
694e68f359 nak: Fix wrong encoding for F2FP cbuf and immediate forms
F2FP.PACK_AB always uses src0 and src1, only F2FP.MERGE_C uses src1 and
src2.

This fixes "f32tof16" instruction test regression on vk3d.

Fixes: e19871bd6a ("nak: Use F2FP for nir_op_pack_half_2x16_split on SM86+")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30804>
2024-08-26 13:55:00 +00:00
Daniel Schürmann
14de650d58 aco: call nir_copy_prop() and nir_opt_dce() before instruction selection
Totals from 1037 (1.31% of 79395) affected shaders: (Navi21)

MaxWaves: 18760 -> 18960 (+1.07%)
Instrs: 4865258 -> 4860063 (-0.11%); split: -0.11%, +0.00%
CodeSize: 27094112 -> 27089224 (-0.02%); split: -0.06%, +0.04%
VGPRs: 68816 -> 68000 (-1.19%)
SpillVGPRs: 2140 -> 2105 (-1.64%)
Scratch: 4237312 -> 4234240 (-0.07%)
Latency: 55894512 -> 55748035 (-0.26%); split: -0.31%, +0.05%
InvThroughput: 11611286 -> 11372897 (-2.05%); split: -2.09%, +0.03%
VClause: 145331 -> 145285 (-0.03%); split: -0.04%, +0.01%
SClause: 150339 -> 150338 (-0.00%)
Copies: 472476 -> 468470 (-0.85%); split: -0.88%, +0.03%
Branches: 206562 -> 206067 (-0.24%); split: -0.24%, +0.00%
PreVGPRs: 61747 -> 61361 (-0.63%)
VALU: 3116434 -> 3112660 (-0.12%); split: -0.13%, +0.00%
SALU: 723154 -> 722887 (-0.04%); split: -0.04%, +0.01%
VMEM: 238656 -> 238586 (-0.03%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30786>
2024-08-26 12:59:00 +00:00
Juan A. Suarez Romero
e030ab4bf2 vc4/ci: update expected results
Add some regressions in vc4.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30847>
2024-08-26 12:41:10 +00:00
Eric Engestrom
07202111a6 ci/rules: make every job exist as manual in fork pipelines
In forks, every job exists, but no job is automatically run.

Should help with the problem of users clicking on that tempting "play"
button GitLab offers and that has been causing a lot of issues with
wasted resources.

Downside is, users now have to use the `bin/ci/ci_run_n_monitor.sh`
script to be able to run a bunch of jobs at once.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25252>
2024-08-26 11:49:34 +00:00
Collabora's Gfx CI Team
e54440d15e Uprev Piglit to a3826de3c26a279599d15b018a9a3e75ca46f4f8
6533b66878...a3826de3c2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30825>
2024-08-26 11:01:58 +00:00
Lionel Landwerlin
1f9c40a8d1 anv: explicitly disable BT pool allocations at device init
The default state doesn't seem well defined (or kernel driver bug
maybe?). Let's just set it to disabled on platforms where we're not
using it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Found-by: Chuansheng Liu <chuansheng.liu@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30841>
2024-08-26 10:34:31 +00:00
Erico Nunes
749d7e96bf lima/ppir: switch to derivative intrinsics
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30661>
2024-08-26 09:53:35 +00:00
Samuel Pitoiset
cc5d481f41 radv/ci: enable RADV_PERFTEST=transfer_queue on GFX9+
To avoid breaking this because it's not enabled by default.

There is a couple of failures because MSAA is still broken with SDMA.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30778>
2024-08-26 09:26:52 +00:00
Samuel Pitoiset
731523a10b radv/ci: update flakes lists for NAVI21/VANGOGH
Found these when I did a stress test with RADV_PERFTEST=transfer_queue
enabled but they are existing flakes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30778>
2024-08-26 09:26:52 +00:00
Dave Airlie
68cd36d9b4 radv/video: fix reporting video format props for encode.
When encode isn't enabled, refuse the image usage, also use
the correct error on the decode check.

Fixes: 05cd42417f ("radv/video: enable video encoding behind perftest flag")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30838>
2024-08-26 08:49:54 +00:00
Samuel Pitoiset
7f7ecaf08c radv: optimize NOPs padding with DGC
There is two different alignment requirements:
a) IB VA must be aligned to ib_alignment
b) IB size must be aligned to ib_pad_dw_mask

Though RADV was aligning DGC cmdbuf to ib_alignment always, but this is
unnecessary. Using the optimal padding size for DGC cmdbuf removes a
bunch of useless NOPs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30768>
2024-08-26 08:22:06 +00:00
Samuel Pitoiset
a7547a9781 radv/amdgpu: assert that the DGC IB VA is correctly aligned
It must be aligned to what the kernel returns.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30768>
2024-08-26 08:22:06 +00:00
David Heidelberg
8f8a51ac5c etnaviv: build dependency for the etnaviv tests
Resolves failures as:
... -o src/etnaviv/isa/tests/etnaviv_disasm.p/disasm.cpp.o -c ../src/etnaviv/isa/tests/disasm.cpp
In file included from ../src/etnaviv/isa/tests/disasm.cpp:12:
../src/etnaviv/isa/asm.h:15:10: fatal error: etnaviv/isa/enums.h: No such file or directory
   15 | #include "etnaviv/isa/enums.h"
      |          ^~~~~~~~~~~~~~~~~~~~~

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11740
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30829>
2024-08-26 08:09:15 +00:00
David Heidelberg
43bff3b9eb etnaviv: rename enums_h appropriately
Needed for the follow-up change.

Cc: mesa-stable
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30829>
2024-08-26 08:09:14 +00:00
Qiang Yu
48a49c4e04 radeonsi: enable KHR_shader_subgroup
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:21 +08:00
Qiang Yu
1ee612e1ac radeonsi: use wave64 for KHR_shader_subgroup enabled shader
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:20 +08:00
Qiang Yu
a78d1d49e6 radeonsi: consider both stages to determine merged shader wave_size
Previously we determine wave_size of merged shader stages separately,
and ignore the condition which may cause them to be different.

Now we determine the wave_size of the TCS/GS part first, then use the
wave_size for VS/TES part. So that we can condider the previous shader
stage's information when determine the wave_size of TCS/GS, and two
stages in the merged shader can affect each other's wave_size.

This requires si_shader_selector to have two kinds of main part for
wave32 and wave64 when part mode, to be combined with other shader
part with various wave size.

This also enables merged shader stages with different
si_shader_info->has_divergent_loop to use wave32. We'll add another
condition for KHR_shader_subgroup latter.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:20 +08:00
Qiang Yu
196d91ed78 radeonsi: remove NULL check in si_determine_wave_size
This function is always called with non-NULL shader now.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:20 +08:00
Qiang Yu
40fdd97de3 glsl: set shader_info.subgroup_size for KHR_shader_subgroup
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:20 +08:00
Qiang Yu
ea33876fbe glsl: remove unused fields in gl_shader
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:20 +08:00
Qiang Yu
7538edf706 glsl: add KHR_shader_subgroup_quad builtin functions
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:19 +08:00
Qiang Yu
72517a8be9 glsl: add KHR_shader_subgroup_clustered builtin functions
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:19 +08:00
Qiang Yu
db41c09e17 glsl: add KHR_shader_subgroup_arithmetic builtin functions
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:19 +08:00
Qiang Yu
ac0bbb5b3f glsl: add KHR_shader_subgroup_shuffle_relative builtin functions
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:19 +08:00
Qiang Yu
eee3091e3e glsl: add KHR_shader_subgroup_shuffle builtin functions
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:19 +08:00
Qiang Yu
a496d84ac8 glsl: add KHR_shader_subgroup_ballot builtin functions
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:18 +08:00
Qiang Yu
7113d3c6ba glsl: prepare ballot function args for subgroup usage
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:18 +08:00
Qiang Yu
5f212a190b glsl: add KHR_shader_subgroup_vote builtin functions
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:18 +08:00
Qiang Yu
2d71467ec3 glsl: prepare vote function args for subgroup usage
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:18 +08:00
Qiang Yu
f0c8520a90 glsl: add KHR_shader_subgroup_basic builtin functions
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:18 +08:00
Qiang Yu
6ae013a032 glsl: use generic convertion code for some intrinsics
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:18 +08:00
Qiang Yu
c631116644 glsl: remove unused builtin function macros
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:17 +08:00
Qiang Yu
e2b07f9329 glsl: add builtin variables for KHR_shader_subgroup
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:17 +08:00
Qiang Yu
19e4549944 glsl: add KHR_shader_subgroup extensions
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:17 +08:00
Qiang Yu
72823354dd mesa: add spirv GroupNonUniform* capbilities support
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:17 +08:00
Qiang Yu
d5bc014493 mesa: implement KHR_shader_subgroup Get* values
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:17 +08:00
Qiang Yu
34f4b5e0ea mesa: add KHR_shader_subgroup extension
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:16 +08:00
Qiang Yu
661b9061d4 gallium: add caps for KHR_shader_subgroup
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:16 +08:00
Qiang Yu
58e412014a ac,radv,radeonsi: stop using quad vote any/all when llvm
ClustedAnd with bool argument and cluster_size==4 will be lowered
to quad_vote_all. So does ALU nir_iand/ior op with bool src.

OpenGL and Vulkan subgroup clustered_and tests with bool argument
fail when using LLVM. It seems LLVM has bug when quad vote bool
is in complex control flow. So stop using it for now.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:15 +08:00
Qiang Yu
a37933b721 ac/llvm: build wqm for quad intrinsics only when fragment shader
Otherwise we get wrong result when non-fragment shader.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:46:11 +08:00
Qiang Yu
0f937426cc radeonsi: lower subgroup ops after wave size is known
We use wave 32 sometime so should not use static subgroup
size of 64.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30610>
2024-08-26 10:41:30 +08:00
Caio Oliveira
31dfb04fd3 intel/brw: Remove long register file names
The long names were originally meant to map to the HW encoding but
nowadays the actual encoding values depend on gfx version, whether
instruction is 3src, etc.

Suggested by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30704>
2024-08-25 22:08:14 +00:00
Caio Oliveira
6bdf2de4d2 intel/brw: Remove unused ARF values and helpers
These were used by old Gfx versions.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30704>
2024-08-25 22:08:14 +00:00
Caio Oliveira
72b687abb4 intel/brw: Make BAD_FILE the zero value for brw_reg_file
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30704>
2024-08-25 22:08:14 +00:00
Caio Oliveira
e8f921678a intel/brw: Explicitly map brw_reg_file into hardware values
For now this is a no-op, but will be useful when changing the enum
to values that don't match the hardware.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30704>
2024-08-25 22:08:14 +00:00
Caio Oliveira
e7179232c9 intel/brw: Move encoding of Gfx11 3-src inside the inst helpers
Create specific helper for register file encoding and handle it there.
Use ad-hoc structs to let the macro take optional named arguments.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30704>
2024-08-25 22:08:14 +00:00
Caio Oliveira
d31c8bfb6f intel/brw: Remove more uses of variable length arrays
In these cases there's a clear bound we can use.  In C++ this is a
compiler extension and not compatible with zero initializing a
regular struct -- which will happen in a later change.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30704>
2024-08-25 22:08:14 +00:00
Caio Oliveira
86c20e2910 intel/brw: Use a helper for common VEC pattern
In the helper, instead of using the Variable Length Array, use a
fixed size array to NIR_MAX_VEC_COMPONENTS.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30704>
2024-08-25 22:08:14 +00:00
Caio Oliveira
abc535a3b4 intel/brw: Remove unused variable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30704>
2024-08-25 22:08:13 +00:00
Lepton Wu
72506ac8c7 egl/android: Fix wrong pipe format for RGB_565
We were actually using PIPE_FORMAT_B5G6R5_UNORM for HAL_PIXEL_FORMAT_RGB_565
since Android support was added to Mesa. This restores the original behavior.

Fixes: 273e54391a ("egl/android: Remove hard-coded color-channel data")

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Signed-off-by: Lepton Wu <lepton@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30827>
2024-08-25 21:01:15 +00:00
Karol Herbst
e9d908206b vtn: ignore volatile on functions for now
Not sure if we have to do something about it here, but maybe at some point
we do?

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30739>
2024-08-25 14:11:32 +00:00
Karol Herbst
eef1af8128 rusticl/device: limit CL_DEVICE_IMAGE_MAX_BUFFER_SIZE more aggressively
We can't exceed c_int::MAX, because the CTS casts to ints in a few places.

We also need to take into account max pixel size when restricting to
max_mem_alloc as this cap is pixel based, not byte based.

Cc: mesa-stable

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30739>
2024-08-25 14:11:32 +00:00
Konstantin Seurer
81e3930ec0 nir/print: Add a helper for generating debug info
Prints the shader to a string and assigns source locations based on
that.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18903>
2024-08-25 10:26:33 +00:00
Konstantin Seurer
4423c50c1b spirv: Emit nir_debug_info_instr for OpLine
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18903>
2024-08-25 10:26:33 +00:00
Konstantin Seurer
ce24486ee4 nir: Introduce nir_debug_info_instr
Adds a new instruction type that stores metadata that might be useful
for debugging purposes. Passes must ignore these instructions when
making decisions.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18903>
2024-08-25 10:26:33 +00:00
David Heidelberg
a70968c62f freedreno: update night expectations
Acked-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30830>
2024-08-25 04:26:03 +00:00
Mauro Rossi
7b32df696e nvk: Fix regression observed on Kepler
vkcube, vkgears and vkmark are crashing with the following error/segfault:

$ NVK_I_WANT_A_BROKEN_VULKAN_DRIVER=1 vkcube
WARNING: NVK is not a conformant Vulkan implementation, testing use only.
Selected GPU 0: GeForce GT 640 (NVK GK107), type: DiscreteGpu
ERROR: couldn't get DataFile for op ldc_nv
Segmentation fault (core dumped)

Handling nir_intrinsic_ldc_nv as per nir_intrinsic_load_ubo in Converter::getFile()
allows to run vkcube, vkgears and vkmark on Nvidia GT640

Fixes: dc99d9b2 ("nvk,nak: Switch to nir_intrinsic_ldc_nv")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30832>
2024-08-24 22:15:45 +02:00
Karol Herbst
74dafa3c79 ac/llvm: fix umul_high
LLVM optimizes umul_hi with a constant to v_mul_hi_i32_i24_e32 which isn't
always what we need here. This causes miscalculations. To prevent LLVM to
apply this optimization, we insert a optimization barrier.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11761
Suggested-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30810>
2024-08-24 16:10:20 +00:00
Juan A. Suarez Romero
2162cf7476 v3d/ci: update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30823>
2024-08-24 14:54:23 +00:00
Valentine Burley
aeba937762 nvk: Advertise VK_EXT_legacy_vertex_attributes
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30817>
2024-08-24 03:55:37 +00:00
Faith Ekstrand
fef77e1d4c nvk: Treat NULL vertex/index buffer pointers as null descriptors
Previously, we trusted the caller to set the size to zero for null
descriptors.  However, device-generated commands allows specifying a
zero device address with a non-zero size.  We may as well handle this
case directly in the MME and keep our command emit shader simple.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30826>
2024-08-24 03:30:57 +00:00
Faith Ekstrand
f83e573c1a nvk: Use the new dispatch helper for queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30826>
2024-08-24 03:30:57 +00:00
Faith Ekstrand
105bdf2e36 nvk: Add a helper for dispatching compute shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30826>
2024-08-24 03:30:56 +00:00
Faith Ekstrand
83feed1d22 nvk: Refactor compute shader dispatch
This splits state flushing from QMD/root upload.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30826>
2024-08-24 03:30:56 +00:00
Faith Ekstrand
db0c2aa796 nvk: Expose a new nvk_compile_nir_shader() helper
This helper is intended for internal driver shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30826>
2024-08-24 03:30:56 +00:00
Faith Ekstrand
cdef36c422 nvk: Disable conditional rendering around CopyQueryPoolResults
Fixes: 57c38a5669 ("nvk: Implement CopyQueryPoolResults with a compute shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30826>
2024-08-24 03:30:56 +00:00
Dylan Baker
24d9cea5ff mesa/program: remove memcpy where src == dst
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30802>
2024-08-23 21:45:34 +00:00
Rob Clark
76e350671f freedreno/a6xx: Sysmem clear fixes
Handled signed/unsigned channel clamping.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11676
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30794>
2024-08-23 17:55:46 +00:00
Mike Lothian
2cf590dd60 Revert "device_select: shortcut EnumeratePhysicalDevice* for count-only calls"
This reverts commit 86bb1036e2.

This is causing crashes in the Vulkan backend of Chromium

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11769
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30820>
2024-08-23 17:22:54 +00:00
Eric R. Smith
9e04c0a818 panfrost: add support for image2DMSArray on bifrost
On bifrost we only can use 3 coordinates for images, but
image2DMSArray needs 4 (x, y, sample#, and array index).
We work around this by making the image nr_samples times
higher than the original image, using the Y coordinate to
address the sample plane. This limits the maximum image
height (to 4K pixels instead of 64K pixels in the 16 sample
case) but at least allows us to use the images.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
Eric R. Smith
3173b2c9b7 panfrost: implement image2dms support for valhall
On valhall, the sample index should go in the R component
of the image load/store/lea instruction. This provides a
straightforward way to implement image2DMS and
image2DMSArray image load and store for valhall.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
Eric R. Smith
657591728a panfrost: move lower_image_ms to after lower_atomics
The nir_lower_image_atomics_to_global pass can create some image
load/stores, so we need to do the multisample image load/store
lowering after this.

Also, the pass only actually works on bifrost and below, so skip it
for valhall.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
Eric R. Smith
346ec90fdd panfrost: move pan_arch definition out of genxml to pan_props.h
The pan_arch function is useful elsewhere, and doesn't rely on
anything else within genxml/gen_macros.h.

It's useful, for example, to find the architecture from the
GPU id in bifrost_compile.c, where before we were using ad-hoc
shifting.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
Eric R. Smith
1fd00e4270 panfrost: Add b2i16 conversion to table
This is needed by the newer image2dMS code.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
chyyran
8c68eeb890 spirv_to_dxil: add missing SPIR-V capabilities
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30776>
2024-08-23 16:36:59 +00:00
Mike Blumenkrantz
0e73926c20 device-select: block xserver+zink reordering via xcb
this is broken

Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30816>
2024-08-23 16:00:47 +00:00
Nanley Chery
23658920d1 anv,iris: Skip tex invalidate for clear conversion
The hardware's clear color conversion feature requires invalidating the
texture cache for every fast clear. We're no longer using the hardware
feature, so we longer need the invalidation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30646>
2024-08-23 15:28:34 +00:00
Nanley Chery
7b9400b7f7 intel/blorp: Don't use clear color conversion on gfx12
Instead of using the clear color conversion feature by the hardware, use
software to write out the converted clear color pixel.

When testing a patch which moves a state cache invalidate to occur after
fast clears instead of before, this prevents the following failures on
tgl/zink:

* piglit.spec.arb_texture_cube_map_array.arb_texture_cube_map_array-cubemap
* piglit.spec.ext_framebuffer_object.fbo-generatemipmap-formats

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30646>
2024-08-23 15:28:34 +00:00
Nanley Chery
b404ca0eb0 intel: Don't use HW clear color conversion on gfx11
The hardware's clear color conversion feature unfortunately requires
invalidating the texture cache for every fast clear. To avoid the
performance penalty that comes with the invalidation, avoid using the
hardware feature and write out the converted clear color pixel
ourselves.

When testing a patch which moves a state cache invalidate to occur after
fast clears instead of before, this prevents the following failures on
icl/zink:

* piglit.fast_color_clear.fcc-read-after-clear sample tex
* piglit.spec.arb_clear_texture.arb_clear_texture-cube

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30646>
2024-08-23 15:28:34 +00:00
Nanley Chery
dfcd93d12f intel/isl: Fix packing of SINT formats
Prevents the next patch from failing many multisampled, signed integer
rendering tests. For example:

 dEQP-VK.renderpass2.suballocation.multisample_resolve.r8_sint.samples_4

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30646>
2024-08-23 15:28:34 +00:00
Boris Brezillon
fba1c3c721 panvk: Prepare cmd_meta for Valhall
We don't have an RSD descriptor on Valhall, and the vertex
attributes are part of the driver descriptor set, which we
re-emit anyway.

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/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
713f5c3600 panvk: Prepare the cmd_desc_state logic for Valhall
Quite a few things are common to Valhall/Bifrost. Specialize what's
different, and move the move to the root driver directory.

We don't compile it on v10 as this requires the cmd_buffer bits
that are not yet defined.

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/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
c257bf5142 panvk: Conditionally register an host address when tracking user memory
When PANVK_DEBUG=dump, all internal buffers get dumped, but not the user
ones, because they don't have a host address attached to them. Let's
register one when mappings dump is enabled.

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/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
b7e0f14959 panvk: Move panvk_debug_adjust_bo_flags() to panvk_device.h
We will need it for the CSF backend.

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/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
b1db49d078 panvk: Allow more descriptor sets on Valhall
The hardware limit on Valhall is 16 descriptor tables, but we reserve
one for our internal descriptors (dummy sampler, vertex attributes and
dynamic buffers), which leaves us with 15 user descriptor sets.

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/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
5571a4cdaa panvk: Make panvk_queue_finish() a per-arch function
The JM implementation of queue_finish() is simple enough to be inlined,
but that won't be the case of the CSF implementation. So let's make
this function per-arch so we can move it to panvk_vX_queue.c.

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/30736>
2024-08-23 14:38:59 +00:00
Boris Brezillon
09682bc5b0 panvk: Prepare panvk_cmd_pool for CSF
We will have a new BO pool for CS buffers in the CSF backend.

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/30736>
2024-08-23 14:38:59 +00:00
Boris Brezillon
598a8d9d11 panvk: Collect allocated push sets at the command level
It makes the reset of command buffers a tad simpler, and it allows
re-cycling push sets.

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/30736>
2024-08-23 14:38:59 +00:00
Boris Brezillon
5b1cddf35f panvk: Prepare the blend logic for Valhall
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/30736>
2024-08-23 14:38:59 +00:00
Rebecca Mckeever
c1b3db966a panvk: Move the VkEvent logic to the jm folder and make it per-arch
The CSF implementation will be completely different.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:38:59 +00:00
Mary Guillemard
27beadcbdb panvk: Extend the shader logic to support Valhall
Co-developed-by: Boris Brezillon <boris.brezillon@collabora.com>
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/30736>
2024-08-23 14:38:59 +00:00
Mary Guillemard
e350c334b6 panvk: Extend the descriptor lowering pass to support Valhall
Co-developed-by: Boris Brezillon <boris.brezillon@collabora.com>
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/30736>
2024-08-23 14:38:59 +00:00
Mike Blumenkrantz
5984fc21a2 lavapipe: VK_EXT_pipeline_robustness
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30790>
2024-08-23 14:14:49 +00:00
Samuel Pitoiset
28c957409f radv/amdgpu: do not check that a CS is aligned if no padding is added
Some video queues don't require padding.

Fixes: d5efbc7f1c ("radv/amdgpu: fix CS padding for non-GFX/COMPUTE queues")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30795>
2024-08-23 13:48:51 +00:00
Collabora's Gfx CI Team
e3113ffcfd Uprev Piglit to 6533b66878c8cb9361c554b7ff940518ab12c816
Fix 038b3c24d70762071d5ed2a219fe1a99a4ba46c6 image build and some expectation files updated.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30687>
2024-08-23 12:48:30 +00:00
Samuel Pitoiset
3af0f0129c radv: fix DRLR with subpass input attachments and feedback loops
Dynamic rendering local read allows the application to use subpass input
attachments with feedback loops. But unless legacy RPs where it's
possible to determine feedback look at creation time, with dynamic
rendering it's not possible.

To fix that, the driver needs to determine at draw time if a feedback
loop is present, and it needs to decompress DCC/HTILE if necessary.

See https://gitlab.khronos.org/vulkan/vulkan/-/issues/3928 for more
information.

Note that VKCTS is still missing coverage but this has been reported.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11127
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30124>
2024-08-23 12:20:02 +00:00
Samuel Pitoiset
4a191e34c9 radv: add support for input attachment indices with DRLR
They will be used to detect feedback loops.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30124>
2024-08-23 12:20:02 +00:00
Samuel Pitoiset
ab2c8af634 radv: add radv_shader_info::ps::uses_fbfetch_output
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30124>
2024-08-23 12:20:02 +00:00
Samuel Pitoiset
541a204733 radv: use the Mesa-specifc dynamic rendering flag for meta operations
Meta operations never use subpass input attachments.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30124>
2024-08-23 12:20:02 +00:00
Samuel Pitoiset
e57d3551da vk/render_pass: add Mesa-specific flag for dynamic rendering
VK_KHR_dynamic_rendering_local_read allows the application to sample
from a subpass input attachment where this attachment is also the color
attachment (aka. feedback loop). With legacy RPs, it's easy to detect
that at RP creation time by looking at the input<->color indices but
with DRLR this needs to be determined dynamically.

This flag would help when legacy RPs are converted to dynamic rendering
because it's not possible to know if a subpass used input attachments.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30124>
2024-08-23 12:20:02 +00:00
Eric Engestrom
f5923fc2dc venus/ci: move postmerge jobs to -postmerge stage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30807>
2024-08-23 11:53:41 +00:00
Eric Engestrom
8190165a0a lavapipe/ci: move postmerge jobs to -postmerge stage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30807>
2024-08-23 11:53:41 +00:00
Eric Engestrom
f9fd30d62d r300/ci: move postmerge jobs to -postmerge stage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30807>
2024-08-23 11:53:41 +00:00
Erik Faye-Lund
b20eb7ba33 mesa/main: switch from deny-list to allow-list
Now that we are explicitly checking for all supported formats, start
rejecting anything that isn't supported. This should make it easier to
avoid accidentally support formats without enabling the right
extensions-bits first.

A few tests regress on Lima, because we (corretly) deny using GL_FLOAT
as a texture component type. This should be fixed in the Piglit case to
skip the test there instead, but for now let's just update and document
the change.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:27 +00:00
Erik Faye-Lund
71cc56e1f7 mesa/main: validate half-float types
Half-float textures got a bit strange in GLES2; they were added by the
OES_texture_float extension, but that added a *different* enum with a
*different* value than what ended up in ARB_half_float_pixel and GLES3.

So, we need to check separately for these. The former one is only
supported on GLES.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:27 +00:00
Erik Faye-Lund
63a2f94962 mesa/main: validate integer-formats
RG integer-textures are only supported on OpenGL if the combination
of EXT_texture_integer and ARB_texture_rg is supported. It's also
supported on GL3, but both of those extensions are required there
anyway. In addition GLES3 is supported.

BGR, BGRA and alpha integer-textures are only supported by
EXT_texture_integer.

Luminance and luminance-alpha integer-textures similarly, but are
unsupported in core contexts, because general luminance support is
removed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:27 +00:00
Erik Faye-Lund
dea1b68f73 mesa/main: validate abgr format
This one is fairly trivial; this format has only ever been added by the
EXT_abgr extension. We always support it on GL, but never on GLES.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:26 +00:00
Erik Faye-Lund
87edfee086 mesa/main: validate bgr formats
BGR and BGRA formats are either supported by desktop GL or by the
EXT_texture_format_BGRA8888 extension. Either of these should always be
supported, so let's just assert it and return true.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:26 +00:00
Erik Faye-Lund
e8226bda60 mesa/main: validate desktop gl format/types
Most of these are either always supported, or supported on GL
compatibilitry profile. There's a few exceptions, though.

Luminance, luminance-alpha and alpha formats were removed from core
profiles, but are supported in all versions of GLES.

Float formats were always supported on desktop, but on GLES it was
initially added as a GLES2 extension through OES_texture_float, and
finally promoted to core in GLES3. However, since we check for
OES_texture_float support to to enable GLES3 support, only checking
for the extension is sufficient.

The 16-bit BGRA formats are supported on GL from version 1.2, and on
GLES by the EXT_read_format_bgra extensions. Either of these should
always be supported, so let's just assert this and return true.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:26 +00:00
Erik Faye-Lund
ca2fbfdaa0 mesa/main: check depth/stencil formats
GL_DEPTH_COMPONENT is supported from OpenGL 1.4 and later, or using
OES_depth_texture on OpenGL ES.

GL_DEPTH_STENCIL is supported from OpenGL 3.0 on, or by
EXT_packed_depth_stencil. The latter is always supported in the first
place, so no need to test for the former.

In addition, there's an interaction between OES_depth_texture and
OES_packed_depth_stencil that allows this on OpenGL ES 2.0 and later.

The end result is that we alway support GL_DEPTH_STENCIL, with the
notable exception of OpenGL ES 1.x.

Similarly, we always support either EXT_packed_depth_stencil or the OES
variant, both of which adds support for the GL_UNSIGNED_INT_24_8 type.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:26 +00:00
Erik Faye-Lund
ea6f960ec8 mesa/main: validate GL_UNSIGNED_INT_10_10_10_2
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:26 +00:00
Erik Faye-Lund
9409113d26 mesa/main: validate GL_UNSIGNED_INT_2_10_10_10_REV
This type is allowed in OpenGL 1.2, which is guaranteed on desktop GL.
For OpenGL ES, it got introduced in EXT_texture_type_2_10_10_10_REV as
well as OpenGL ES 3.0. However, we already require
EXT_texture_type_2_10_10_10_REV for OpenGL ES 3.0 support, so just
checking for the extension should be enough.

We already have a helper that does all of the above, so let's use that
one.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:26 +00:00
Erik Faye-Lund
75cad45ab1 mesa/main: validate GL_UNSIGNED_INT_5_9_9_9_REV
Shared exponent only works if we have EXT_texture_shared_exponent (which
is required by GL 3.0 support), or GLES 3.

While we're at it, drop the needless and conservative check for GL 2.0
(which incorrectly lets through GLES2 as well).

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:26 +00:00
Erik Faye-Lund
7035a74d93 mesa/main: use extension-helper
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29835>
2024-08-23 11:21:26 +00:00
Lionel Landwerlin
778cb59086 anv: optimize STATE_BYTE_STRIDE emission
Signed-off-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/30803>
2024-08-23 10:52:19 +00:00
Lionel Landwerlin
195c5b68ba anv: don't miss workaround for indirect draws
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30803>
2024-08-23 10:52:19 +00:00
Lionel Landwerlin
f25b500af4 anv: move conditional render predicate after gfx_flush_state
Following up on f8c0a99d52 ("anv: emit conditional after gfx state
flushing"), this should have been applied everywhere.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0147908a89 ("anv: predicate emission of STATE_BASE_ADDRESS")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30803>
2024-08-23 10:52:19 +00:00
Eric Engestrom
913ec4e78f ci: fix toml-lint rules to not block nightly pipelines
We don't need to re-check the toml files in nightly pipelines, so let's
just exclude the job.

Fixes: 1ba84bc5ca ("ci: add check for misleading indentation in ci toml files")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30805>
2024-08-23 10:15:59 +00:00
Samuel Pitoiset
421c42170e radv: stop emitting DB_COUNT_CONTROL in the GFX preamble
This is already emitted as part of the occlusion query state and this
state is dirty when a cmdbuf begins.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30788>
2024-08-23 09:50:40 +00:00
Samuel Pitoiset
e3e28bb514 radv: stop emitting PA_SC_CLIPRECT_RULE in the GFX preamble
It's already emitted as part of the discard rectangle state and all
dynamic states are dirty when a cmdbuf begins

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30788>
2024-08-23 09:50:40 +00:00
Samuel Pitoiset
4662483535 radv: stop emitting DB_RENDER_OVERRIDE in the GFX preamble
It's already emitted as part of the depth clamp enable state and all
dynamic states are dirty when a cmdbuf begins.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30788>
2024-08-23 09:50:40 +00:00
Samuel Pitoiset
cd57411aaa radv: remove redundant PA_SU_PRIM_FILTER_CNTL in the GFX preamble
It's already emitted below.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30788>
2024-08-23 09:50:40 +00:00
David Rosca
6e2ae9c581 radeonsi/vcn: Use pipe header params in H264 header encoder
This now supports writing all fields as we get them on input from
packed headers.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 10:00:02 +02:00
David Rosca
af849516f0 radeonsi/vcn: Use pipe header params in HEVC header encoder
This now supports writing all fields as we get them on input from
packed headers.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 10:00:02 +02:00
David Rosca
138ba42a87 radeonsi/vcn: Fix radeon_enc_code_ue with values over 2^16
Values over 2^16 as ue(v) are encoded with more than 32 bits,
but radeon_enc_code_fixed_bits can only handle 32 bits at max.
Change radeon_enc_code_ue to code the leading zeros separately.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 10:00:02 +02:00
David Rosca
40d01175be radeonsi/vcn: Deduplicate header encoding functions
There is no need to separate these by VCN version.
For VCN < 3.0 transform skip must be disabled and for VCN < 2.0
SAO must be disabled.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 10:00:02 +02:00
David Rosca
32c6a61e2b radeonsi/vcn: Switch to app DPB management for H264 and HEVC encode
This removes the internal DPB management logic, which was unnecessary as
it was duplicating what applications already do, and it was also causing
issues when the internal DPB would de-sync from application DPB (eg.
driver removes reference that application still intends to use).

DPB is now dynamically resized instead of using fixed number of slots.
This also saves a lot of memory with HEVC encoding, as that was always
using the max_references which va frontend sets to 15.

Move reconstructed pictures to the end of the context and meta buffers
to ensure resizing works correctly.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 09:59:58 +02:00
David Rosca
322240fcff radeonsi: Add GPU copy path to si_video_resize_buffer
Use si_copy_buffer instead of map + memcpy for buffers in VRAM.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 06:54:07 +00:00
David Rosca
1de2cc648b frontends/omx: Adjust to encoding changes
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 06:54:07 +00:00
David Rosca
ef8ba75718 frontends/va: Parse HEVC slice packed header
This also adds additional fields from VPS, SPS and PPS.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 06:54:07 +00:00
David Rosca
c78ebe97c6 frontends/va: Parse H264 slice packed header
This also adds additional fields from SPS and PPS.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 06:54:07 +00:00
David Rosca
f5af70c6b8 frontends/va: Only use parameters for first slice in H264/5 encode
We don't store these params per slice, so we should only use the values
from first slice.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 06:54:06 +00:00
David Rosca
cc14724d73 frontends/va: Implement DPB management for H264/5 encode
In VAAPI applications already need to do DPB management, but for each
picture to encode we only get the reconstructed surfaces needed to
encode this picture instead of entire DPB. Drivers need to know the
current size and layout of DPB, so keep track of entire DPB contents
in frontend.

This allows drivers to directly get the DPB layout as used by
application instead of trying to re-build it from limited information
they have available (frame numbers), which only works in the basic cases
and otherwise will de-sync from application (driver may remove pictures from
DPB that the application still want to use).

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 06:54:06 +00:00
David Rosca
fc1ec3c5d4 util/rbsp: Fill bits again if reading more than 16 leading zeros
Same as 73d69ef1e6, this is also needed for vl_rbsp_ue.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30672>
2024-08-23 06:54:06 +00:00
Tapani Pälli
5bf6602d23 anv: check if RT writes are happening for HasWriteableRT
Fixes: eebb6cd236 ("anv: stop using 3DSTATE_WM::ForceThreadDispatchEnable")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11749
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/30785>
2024-08-23 06:28:00 +00:00
Mary Guillemard
a63277cc17 panvk: Remove unused vk_vertex_input_state in graphics_save_ctx
This is unused and duplicated in dyn_state::vi

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/30782>
2024-08-23 06:11:39 +00:00
Mary Guillemard
1710925282 panvk: Save and restore vertex buffer in gfx_meta
This was missing from the vk_meta switch.

This fixes
"dEQP-VK.draw.renderpass.multiple_clears_within_render_pass.*"

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f74dd596d5 ("panvk: Add helpers to save/restore the compute/graphics state for meta operations")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30782>
2024-08-23 06:11:39 +00:00
Mary Guillemard
a659cd3b03 panvk: Simplify meta ctx save/restore
As dynamic state is marked as dirty, there is no point to save the state
of related resources.

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/30782>
2024-08-23 06:11:39 +00:00
Mary Guillemard
ff24a8384c panvk: Manually copy dynamic state in meta_gfx
This fixes assertion for "dEQP-VK.dynamic_state.monolithic.image.*" when
the viewport state would have some dynamic state set before binding any
pipelines.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f74dd596d5 ("panvk: Add helpers to save/restore the compute/graphics state for meta operations")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30782>
2024-08-23 06:11:39 +00:00
Mary Guillemard
1d33aee197 panvk: Close batch in CmdBeginRendering if already open
Because of the current event implementation, we can end up with an open
batch when entering CmdBeginRendering. As a result, we now reopen a
batch in that situation for now.

This fix crashes various crash in
"dEQP-VK.synchronization.op.single_queue.event.*".

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/30782>
2024-08-23 06:11:39 +00:00
Lionel Landwerlin
a88898a28f anv: optimize CLIP::MaximumVPIndex setting
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11746
Fixes: 982106e676 ("anv: only set 3DSTATE_CLIP::MaximumVPIndex once")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30762>
2024-08-23 05:45:03 +00:00
Timothy Arceri
038b3c24d7 ci: bump piglit version
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30752>
2024-08-23 14:55:21 +10:00
Timothy Arceri
4c32709c74 glsl: fix function overload resolution at link time
Previously we didn't check if the glsl version supported overload resolution
at link time only compile time. Note with this change we just use the
has_implicit_int_to_uint_conversion bool as support for both is added under
the same conditions.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30752>
2024-08-23 12:14:22 +10:00
Timothy Arceri
8e4b14dcfd glsl: apply implicit matching rules when linking
Previously when linking i.e. when compiler state was NULL. We just
assumed all implicit matching was avaliable.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30752>
2024-08-23 12:14:22 +10:00
Timothy Arceri
018ebeca72 glsl: store has implicit conversions bools in gl_shader
We want to be able to use these at link time also.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30752>
2024-08-23 12:14:22 +10:00
Timothy Arceri
ac312e9548 glsl: drop double support checks in helper
If doubles are not supported by the shader the compiler will throw
an error if it sees one, there is no need to check if they are
supported in this helper for implicit conversions.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30752>
2024-08-23 12:14:22 +10:00
Kenneth Graunke
b97e10208c intel/brw: Add a file parameter to idom_tree::dump()
The other dump methods in this file also take a file parameter,
defaulting to stderr.  Dumping dot files to stdout is probably not
what anybody really wanted.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30530>
2024-08-22 22:54:45 +00:00
Kenneth Graunke
bb4f05005e intel/brw: Print blocks in brw_print_instructions_to_file()
Useful when examining the control flow graph.  For some reason,
we printed this for the final assembly but not the IR.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30530>
2024-08-22 22:54:45 +00:00
Kenneth Graunke
2d73e42333 intel/brw: Fix OOB reads when printing instructions post-reg-alloc
Post-register allocation, but before brw_fs_lower_vgrfs_to_fixed_grfs,
we have registers with the VGRF file but they are actually fixed GRFs.

brw_print_instructions_to_file() was seeing VGRFs and trying to access
their size, but using bogus register numbers that could be out-of-bound.

Detect when we're post-RA and avoid doing this.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30530>
2024-08-22 22:54:45 +00:00
antonino
9f5af68995 mesa/main: expose EXT_multi_draw_indirect
Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:22 +00:00
antonino
582eb2439c panfrost: advertise PIPE_CAP_MULTI_DRAW_INDIRECT
Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:22 +00:00
Louis-Francis Ratté-Boulianne
f390835074 panfrost: use special DrawID register on CSF-based GPUs
It allows easier support for multi indirect draws by updating the
draw ID value in each iteration of the loop.

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/30583>
2024-08-22 21:13:22 +00:00
Louis-Francis Ratté-Boulianne
ce76caf3ee pan/bi: implement nir_intrinsic_load_draw_id
Only valid on >= 9

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/30583>
2024-08-22 21:13:22 +00:00
antonino
676afca468 panfrost: implement multi draw indirect for CSF-based GPUs
Add a CSF loop to allow for multiple indirect draws in one call.
Same limitation applies than for single indirect draw, the call
will get emulated if transform feedback or a query is enabled.

Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:22 +00:00
antonino
7c1fe4bdbe pan/cs: add helpers to generate csf loop
Add support for loops where we continually check whether a
condition is met. Also add a `cs_while` pseudo-instruction to more
easily use that feature.

Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:22 +00:00
antonino
50d2396b7e pan/cs: add helpers to emit contiguous csf code blocks
Add support for block, a monolithic sequence of instruction that
must live in a virtually contiguous portion of code, and label, a
reference to a specific position in a block.

Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:21 +00:00
antonino
8b8de5ad9d panfrost: implement indirect draw for CSF-based GPUs
Implement indirect draw by reading the indirect buffer info in CSF
and triggering the IDVS operation just like for a normal direct
draw. If transform feedback or a query is enabled, we still emulate
the indirect draw on the CPU to properly update the XFB buffer
offset and primitives statistics.

Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:21 +00:00
antonino
3b871856d1 panfrost: refactor draw logic to support native draw indirect
Split the draw logic into multiple methods depending on whether
the draw is single direct, multiple direct or indirect. Indirect
draws are emulated for now by reading back the indirect buffer info,
but we can implement optimized version later for JM and CSF.

Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:21 +00:00
antonino
d8b6a59896 panfrost: rename PAN_GPU_INDIRECTS
Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:21 +00:00
Eric Engestrom
84d2401de3 ci: don't run hardware tests if the toml files don't pass validation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30442>
2024-08-22 20:25:32 +00:00
Eric Engestrom
1ba84bc5ca ci: add check for misleading indentation in ci toml files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30442>
2024-08-22 20:25:32 +00:00
Lionel Landwerlin
d9406658ed brw: remove unused prog_data field
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/30713>
2024-08-22 19:44:40 +00:00
Lionel Landwerlin
cf986dd589 nir: remove unused intel intrinsics
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/30713>
2024-08-22 19:44:40 +00:00
Lionel Landwerlin
3769b58272 anv: move lowering of descriptor intrinsics to apply_layout
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/30713>
2024-08-22 19:44:40 +00:00
Lionel Landwerlin
45117c0ed5 anv: simplify loading driver internal constants
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/30713>
2024-08-22 19:44:39 +00:00
Lionel Landwerlin
7a55a930f6 anv: reuse common pipeline state for compute push allocations
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/30713>
2024-08-22 19:44:39 +00:00
Denis
afb7b17fdd freedreno: Enable A505
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23630>
2024-08-22 19:11:52 +00:00
Robert Mader
70cdff1f23 perfetto: Add Panfrost data sources to system.cfg
Just like for msm and i915, so it works out-of-the-box.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28363>
2024-08-22 18:33:45 +00:00
Eric Engestrom
5a38361ba9 nvk/ci: document CTS bug
Thanks to @marysaka for identifying and reporting the bug:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/11736#note_2532965

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30793>
2024-08-22 18:20:55 +00:00
Connor Abbott
812c8f6abe tu: Treat partially-bound depth/stencil attachments as passthrough
Make sure to preserve the depth or stencil components of D24S8 using the
fixed codepath just added. While we're here, fix the detection of
whether an attachment is bound.

Fixes: cb0f414b ("tu: Add support for suspending and resuming renderpasses")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26154>
2024-08-22 17:43:58 +00:00
Connor Abbott
5377219ca0 tu: Fix passthrough D24S8 attachments
We need to make sure that we don't trash a passthrough depth/stencil
aspect if we need to store the whole attachment by loading it
beforehand.

Fixes: cb0f414b ("tu: Add support for suspending and resuming renderpasses")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26154>
2024-08-22 17:43:58 +00:00
Eric Engestrom
d7f7aede15 intel/ci: don't trigger anv-jsl-full & anv-tgl-full on GL changes
These are pure VK-CTS jobs, they don't run any GL tests.

It doesn't matter right now because these two jobs are disabled, but
when they get re-enabled, we'll want this to have been fixed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30677>
2024-08-22 16:24:24 +00:00
Daniel Stone
2a20cdfb31 ci/run_n_monitor: Add --dry-run argument
This will just print out the target jobs and their dependencies, then
exit.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:19 +00:00
Daniel Stone
ad5f4d0270 ci/run_n_monitor: Remove --force-manual
Now that we can exclude by stages instead, we don't need --force-manual.
Having mandatory arguments which also do the wrong thing is not great.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:19 +00:00
Daniel Stone
99cd56a684 ci/run_n_monitor: Add --exclude-stage filtering
Add an argument to ci_run_n_monitor specifying certain stages to be
excluded from consideration, defaulting to the one with post-merge and
performance jobs. This allows, e.g., to run all Panfrost pre-merge jobs:
./ci_run_n_monitor.py --target 'panfrost.*'

or to run all Freedreno pre-merge jobs:
./ci_run_n_monitor.py --target '.*' --include-stage freedreno

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:19 +00:00
Daniel Stone
3ffe733214 ci/run_n_monitor: Add --include-stage argument
Add basic filtering by stages, starting with stage inclusion.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
4e56472da2 ci/panfrost: Move manual/nightly jobs to postmerge stage
Create a new stage called arm-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
ca8f6b66a8 ci/etnaviv: Move manual/nightly jobs to postmerge stage
Create a new stage called etnaviv-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
b70ad23bb1 ci/nouveau: Move manual/nightly jobs to postmerge stage
Create a new stage called nouveau-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
337e00aa2d ci/llvmpipe: Move manual/nightly jobs to postmerge stage
Create a new stage called software-backends-postmerge and move the full
and manual jobs for both llvmpipe and lavapipe over there, to avoid
entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
4752ce7186 ci/zink: Move manual/nightly jobs to postmerge stage
Create a new stage called layered-backends-postmerge and move the full
and manual jobs over there, to avoid entanglement with the pre-merge
jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
25c70888a5 ci/broadcom: Move manual/nightly jobs to postmerge stage
Create new stages called broadcom-postmerge and freedreno-postmerge, and
move the full and manual jobs over there, to avoid entanglement with the
pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
cc507536db ci/intel: Move manual/nightly jobs to postmerge stage
Create a new stage called intel-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
4bcd57b0b5 ci/amd: Move manual/nightly jobs to postmerge stage
Create a new stage called amd-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Daniel Stone
f1aab081b5 ci: Create new 'performance' stage
Move all jobs doing performance testing to a separate stage.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Job Noorman
97d049504c ir3: use physical cfg in helper_sched
We used the logical cfg in helper_sched under the assumption that (eq)
only kills active helpers. This could lead to something like this:

br p0.x, else
sam
(eq)nop
jump end
else:
sam
end:

It turns out this is not correct: (eq) kills *all* helpers so the
snippet above could produce wrong results.

To fix this, simply switch from using the logical cfg in helper_sched to
using the physical cfg.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:14 +00:00
Job Noorman
1bbc36c5d2 ir3: recalculate reconvergence after opt_jump
opt_jump destroys the physical cfg but it turns out we need it
afterwards in helper_sched. Keeping it correctly up-to-date during
opt_jump turned out to be tricky and complex. Simply recalculate it
afterwards to keep things simple.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:14 +00:00
Job Noorman
c67381538d ir3: fix reconvergence of blocks with multiple divergent predecessors
When calling ir3_calc_reconvergence after opt_jump, it may happen that
there are multiple divergent branches to the same block. This was
handled incorrectly since first_divergent_pred was unconditionally
overwritten for successors of divergent branches. This patch fixes this
by only making sure only the earliest divergent predecessor is used.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:14 +00:00
Job Noorman
d9977a6176 ir3: fix adding physical edges multiple times
After opt_jump, we might end up with weird control flow likes this:

block0: br block2
[more blocks]
block1: br block3
block2: ...
block3: ...

Since block2 is a logical successor of block1 (due to the fall through),
a physical edge will be added. However, another one will be added
because the branch to block3 crosses block2 (which is a reconvergence
point due to the branch from block0). This currently results in an
assert. This commit fixes this by ignoring successors of the start block
of edges that cross reconvergence points.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:14 +00:00
Connor Abbott
f432eb691e ir3: Move reconvergence backedge handling
Instead of handling backedges after a physical edge is added that extends
the divergence range, handle it at the beginning of the loop. This
handles the TODO by making sure that we also check for backedges after a
block is added to the worklist at the beginning due to a divergent
branch. For example, this fixes cases where opt_jump optimizes
"if (foo) { break; }" to remove the break block and we have a divergent
branch across the loop backedge.

While we're here, also fix an off-by-one that meant we wouldn't handle
backedges that jumped to the immediate previous block (which is again
possible after opt_jump) or the same block.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:14 +00:00
Job Noorman
aee097ed21 ir3: fix reconvergence points for blocks with two terminators
Blocks with two terminators have branches to both successors (instead of
a fall through to one) and hence need to mark both successors as
reconvergence points.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:14 +00:00
Job Noorman
fba921bf49 ir3: preserve block divergence info in ir3_lower_subgroups
We will need this to recalculate reconvergence after opt_jump.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:14 +00:00
Job Noorman
053612b7cf ir3: remove unnecessary reconvergence point in scan_clusters lowering
The body of the while loop does not need a reconvergence point since it
only has an incoming backwards branch.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:13 +00:00
Job Noorman
a13394ad91 ir3: print block divergence info
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:13 +00:00
Job Noorman
ec19a354dc ir3: print predicate inversion for branches
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29409>
2024-08-22 14:58:13 +00:00
Mike Blumenkrantz
13066905d3 egl/android: call dri2_display_create() like every other driver
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30773>
2024-08-22 14:22:41 +00:00
Rhys Perry
7b92e11e16 aco: forget valu delays after certain s_waitcnt_depctr/LDSDIR
fossil-db (navi31):
Totals from 55242 (69.58% of 79395) affected shaders:
Instrs: 40507666 -> 40138006 (-0.91%); split: -0.91%, +0.00%
CodeSize: 212516104 -> 211025880 (-0.70%); split: -0.70%, +0.00%
Latency: 281643258 -> 281628053 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 46370668 -> 46369637 (-0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23337>
2024-08-22 13:57:01 +00:00
Rhys Perry
30396ba604 aco: move insert_delay_alu to after insert_NOPs
s_delay_alu doesn't affect any hazards, but hazard workarounds don't
update s_delay_alu and so can make the s_delay_alu affect the wrong
instructions.

fossil-db (navi31):
Totals from 55777 (70.25% of 79395) affected shaders:
Instrs: 40740011 -> 40765017 (+0.06%)
CodeSize: 213768484 -> 213870856 (+0.05%); split: -0.00%, +0.05%
Latency: 283713083 -> 283714959 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 46551791 -> 46551835 (+0.00%); split: -0.00%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23337>
2024-08-22 13:57:01 +00:00
Rhys Perry
807651561e aco: split insert_wait_states into two
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23337>
2024-08-22 13:57:00 +00:00
Sergi Blanch Torne
ac9b13ace5 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit c5156257d9.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30777>
2024-08-22 13:06:03 +00:00
David Rosca
1ebff2220d frontends/va: Fix leaks with multiple coded buffer segments
The buffers can be reused, so we must only allocate added segments
and free unused segments.

Fixes: be4287c3aa ("pipe: Extend get_feedback with additional metadata")
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30779>
2024-08-22 12:20:22 +00:00
Connor Abbott
70934f3015 freedreno, tu, ir3: Enable tiled workgroup item dispatch on a7xx
There is a 1.6% improvement in the Sacha Willems computeshader demo.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30758>
2024-08-22 11:55:57 +00:00
Connor Abbott
58ed1854c4 freedreno/a7xx: Document compute dispatch tiling registers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30758>
2024-08-22 11:55:57 +00:00
Connor Abbott
c56683a3e2 freedreno/computerator: Fix enabling wave128
When adding API size controls we didn't update the assembler path. Make
it behave like it did before.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30758>
2024-08-22 11:55:57 +00:00
Erik Faye-Lund
9724d29b23 docs/panfrost: mention that Mali-G610 is conformant
We're conformant on Mali-G610 also these days, so let's mention that in
the docs as well!

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30783>
2024-08-22 11:47:47 +00:00
Samuel Pitoiset
d5efbc7f1c radv/amdgpu: fix CS padding for non-GFX/COMPUTE queues
I forgot that SDMA and VIDEO existed somehow.

Fixes: d690f293c6 ("radv/winsys: pad gfx and compute IBs with only one NOP")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30769>
2024-08-22 11:10:29 +00:00
Sergi Blanch Torne
c5156257d9 ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2024-08-22 06:00 UTC
* End: 2024-08-22 12:00 UTC

Risk notice due to electrical maintenance in the building where the farm
is hosted:
* Start: 2024-08-19 07:00 UTC
* End: 2024-08-22 16:00 UTC

So, there is a time window when the farm will be disabled. But there is
a bigger window when there is a change for this commit to be merged.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30534>
2024-08-22 07:18:22 +02:00
Mary Guillemard
e19871bd6a nak: Use F2FP for nir_op_pack_half_2x16_split on SM86+
On Ampere and later, this instruction allows to handle packing of F32x2
to F16x2.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30765>
2024-08-21 21:38:57 +00:00
Kenneth Graunke
6a292c2699 intel: Fix bad align_offset on global_constant_uniform_block_intel
We were specifying align_offset = 64 and align_mul = 64, which is
invalid.  nir_combined_align() asserts that align_offset < align_mul.

Our intention here is to perform cacheline-aligned (64B-aligned) block
loads, so we should set align_mul = 64 and can leave align_offset = 0.

Fixes: fbafa9cabd ("intel/nir: remove load_global_const_block_intel intrinsic")
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30755>
2024-08-21 20:44:57 +00:00
Ian Romanick
c96ceb50d0 intel/brw/xe2: Allow int64 conversions
As far as I can tell from looking at the Bspec, MOV between integers
of all sizes appears to be supported.

shader-db:

total instructions in shared programs: 17480631 -> 17480535 (<.01%)
instructions in affected programs: 26284 -> 26188 (-0.37%)
helped: 21 / HURT: 13

total cycles in shared programs: 897601907 -> 897664293 (<.01%)
cycles in affected programs: 10929664 -> 10992050 (0.57%)
helped: 48 / HURT: 45

fossil-db:

Totals:
Instrs: 140686824 -> 140686155 (-0.00%); split: -0.00%, +0.00%
Cycle count: 21525129188 -> 21524717729 (-0.00%); split: -0.01%, +0.00%
Spill count: 70778 -> 70776 (-0.00%)
Fill count: 139172 -> 139168 (-0.00%)
Max live registers: 47513859 -> 47513795 (-0.00%)

Totals from 612 (0.11% of 549272) affected shaders:
Instrs: 964441 -> 963772 (-0.07%); split: -0.09%, +0.02%
Cycle count: 1215564312 -> 1215152853 (-0.03%); split: -0.09%, +0.06%
Spill count: 16172 -> 16170 (-0.01%)
Fill count: 37962 -> 37958 (-0.01%)
Max live registers: 70749 -> 70685 (-0.09%)

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30700>
2024-08-21 20:16:00 +00:00
Ian Romanick
09cf9fe8ab anv: Larger memory pools for huge shaders
At least one ray tracing shader in cp2077 is over 4MB on Xe2. There
isn't a memory pool large enough for the allocation, so the driver
crashes instead. This commit adds 8MB and 16MB pools.

I intend this as a stop gap fix. I would prefer to figure out why this
shader is so much larger than on previous platforms. The shader in
question has 3824 spills and 8625 fills. That is not good. I suspect
dealing with that will also solve the problem, but that will require a
bit more time.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11739
Suggested-by: Lionel Landwerlin
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30751>
2024-08-21 19:45:17 +00:00
Ian Romanick
0921dfa044 anv: Protect against OOB access to anv_state_pool::buckets
Suggested-by: Paulo Zanoni
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30751>
2024-08-21 19:45:17 +00:00
Mike Blumenkrantz
2fa52bf6e5 tc: set resolve on renderpass info if blit terminates the renderpass
this avoids a scenario where invalidate happens after a non-winsys blit
for a renderpass and the driver skips storing framebuffer contents
because the invalidate flag is set

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30750>
2024-08-21 19:09:39 +00:00
Mike Blumenkrantz
38f4501a5c zink: don't skip cbuf store ops if resolve is set
inlined resolve ops are still somehow slower than explicit ones,
so the data has to be written out for the resolve

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30750>
2024-08-21 19:09:39 +00:00
Mary Guillemard
a869237d50 panvk: Fix viewport calculation
This fix
"dEQP-VK.dynamic_state.*.general_state.{bind_order, state_persistence, state_switch}"

Fixes: 1f57aae4e4 ("panvk: Move vkCmdDraw* functions to their own file")
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/30754>
2024-08-21 18:47:03 +00:00
Mary Guillemard
5b129e6eb9 panvk: Expose trivial google extensions
Those three extensions are handled in common code.

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/30754>
2024-08-21 18:47:03 +00:00
Mary Guillemard
a6496e3a16 panvk: Properly propagate helper invocations requirement
Previous changes of the helper invocation pass fixed missing conditional
control flow tracking but this is not enough.

Propagation of the dependency chain also need to handle value outside of
direct predecessors.

This fix "dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners"
for real this time.

Fixes: 33fef27356 ("bi: Do not mark tex ops as skip when dest is used by control flow")
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/30754>
2024-08-21 18:47:02 +00:00
Samuel Pitoiset
322227ba17 radv: use a sized NOP packet for the DGC preamble
This is faster than a pile of 1-dword NOPs. Note that GFX6 actually
supports type-3 NOP as long as the size is more than the header which
is always the case for the DGC preamble.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30748>
2024-08-21 18:08:45 +00:00
Mike Blumenkrantz
fceb122a2e egl/wayland: do display gpu fd dance for non-sw zink init
Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647>
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
b38480d6c7 egl: pass real value for software to dri2_setup_device()
this was otherwise breaking zink

Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647>
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
7deb96a5f9 egl/wayland: split out dmabuf extension stuff for kopper
this allows deleting the fd check which is really what this was
intending to do (but is still broken because llvmpipe supports this)

Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647>
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
28b291446b egl: really fix kopper fd passing
for real this time.

Fixes: c8c46bf900 ("egl: fix fd passing on init with zink")

Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647>
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
b66743984c egl: add DRI_USE_INVALIDATE with non-sw kopper
Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647>
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
8bfbcd5b28 zink: delete hackaround for disabling wsi extensions
this was added to avoid deadlocking the device-select layer, but
the layer should just be disabled since it is already handled elsewhere

Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647>
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
b20c21a5a6 device_select: disable reordering with zink on xwayland
this is broken

Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647>
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
86bb1036e2 device_select: shortcut EnumeratePhysicalDevice* for count-only calls
Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647>
2024-08-21 16:51:19 +00:00
Mike Blumenkrantz
39ae6a891d device_select: reorder CreateInstance to have shorter failure paths
no functional changes

Fixes: 991cc686a5f (egl: really fix kopper fd passing)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30647>
2024-08-21 16:51:19 +00:00
Boris Brezillon
3b2de16fa5 panvk/ci: Enable clearing tests
After the transition to vk_meta, all clear tests seem to pass.

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/29451>
2024-08-21 16:14:36 +00:00
Boris Brezillon
a31a55d348 panvk: Lower var copies before lowering IOs
Variable copy lowering might generate new IOs, so let's make sure
those are lowered before the IOs.

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/29451>
2024-08-21 16:14:36 +00:00
Boris Brezillon
4ecfc45cd0 panvk: Allow ZS formats on 1D/3D images
There's no real blocker here, so let's just allow it.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
213e895da0 panvk: Allow compressed formats
Compressed formats were disabled because of the different layout for
u_interleaved(compressed), where the 16x16 texel tile model for
non-compressed is replaced by a 4x4 block tile. This prevents us from
creating RGBA views of compressed images, which break copies.

The simple option is to keep compressed images linear. The more complex
one would be to patch coordinates/frag-coords on the shader side when
we're dealing with a compressed texture/color-attachment, but given
we're using vk_meta for copies, it's not something we can easily do,
so let's go for the first option and see if we want to revisit it
later.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
4a30a28653 panvk: Fix depth-stencil AFBC support
When both the depth and stencil attachments are enabled, and the
underlying image is AFBC, it must be an combined Z24S8 format.

Make sure this is the case when initializing the fbinfo object.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
baf8570b28 panvk: Add support for render-pass resolve operations
Use vk_meta_resolve_rendering() to handle render-pass resolves.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
0b08826f7d panvk: Lower load_multisampled_pan
Needed if the fragment shader writes gl_SampleMask.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
5067921349 panvk: Switch to vk_meta
Replace our custom panvk_meta stuff by something based on vk_meta.
That's less gen-specific code to maintain which will help with v10
support.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
38258138ad panvk: Rework the modifier selection
We move the modifier selection after the panvk_image initialization
so we have less VkXxx objects to retrieve, and split the 3 cases
(explicit modifier, explicit modifier list ordered by preference and
driver auto-selection based on the image attributes) to make things
clearer.

We also check formats against the pan_best_modifiers array which is
sorted by GPU order of preference and serve as an is_valid_modifier()
too.

Finally, we add the following new constraints on u-tiled/AFBC:
- don't allow u-tiled on images with compressed formats that might have
  non-compressed views
- don't allow u-tiled or AFBC on 1D images

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
f74dd596d5 panvk: Add helpers to save/restore the compute/graphics state for meta operations
Those helpers will be used to save/restore the command buffer
state when calling vk_meta helpers.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
c912f80a08 panvk: Constify the shader pointers in the graphics state
The command buffer logic is not supposed to modify these objects.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
495b718b3f panvk: Rework the NULL test in panvk_buffer_{gpu_ptr,range}()
We are about to allow buffer memory allocation from the cmd_buffer
memory pool. In order to allow that, we need to tweak the NULL checks
done in panvk_buffer_{gpu_ptr,range}() to use the device address
instead of the bo field.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
1b16f9ec05 pan/texture: Allow uncompressed view of compressed image
Needed image copies in Vulkan, where we create RGBA views of
compressed images to do the copy.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
8eec3284e1 panvk: Add missing vk_device_finish() calls
We do free the device object, but never call vk_device_finish() on
it.

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/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
fd8700b793 panvk: Rename the error labels in create_device()
It's usually clearer to describe what the error unwinding entrypoint
does than which type of error it's supposed to handle, because some
entrypoints can be called from different error paths.

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/29451>
2024-08-21 16:14:35 +00:00
Eric Engestrom
91c9393da1 ci/build: add honeykrisp (asahi vk) to several builds
Specifically:
- `alpine-build-testing`
- `fedora-release`
- `.meson-arm` (inherited by all the arm build jobs)
- `debian-arm64` (because it overrides the inherited list)
- `debian-vulkan`

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30658>
2024-08-21 15:32:54 +00:00
Boris Brezillon
b3a2233f88 panvk: Don't spam the error output if the device is not for us
The Vulkan loader tries each driver until it finds one that's accepting
the device. Don't complain about panvk being non-conformant until we're
sure the device is for us.

Reported-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30756>
2024-08-21 15:18:49 +00:00
Samuel Pitoiset
6fa1bf3b88 radv: pad GFX preambles IBs with only one NOP
This is optimal.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30743>
2024-08-21 14:55:04 +00:00
Samuel Pitoiset
d690f293c6 radv/winsys: pad gfx and compute IBs with only one NOP
1-dword NOPs are slow and it's better to emit a sized NOP packet when
possible.

Based on RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30743>
2024-08-21 14:55:04 +00:00
Rohan Garg
29a2e5358d anv: enable KHR_shader_relaxed_extended_instruction
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30726>
2024-08-21 14:13:46 +00:00
Rohan Garg
52c8e6da69 vtn: handle SpvOpExtInstWithForwardRefsKHR for non semantic instructions
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30726>
2024-08-21 14:13:46 +00:00
Konstantin
19d633af0b radv: Handle repeated instructions when splitting disassembly
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30734>
2024-08-21 13:38:53 +00:00
Konstantin
1cf507b806 radv: Handle instruction encodings > 8 bytes when splitting disassembly
Choosing the wrong instruction length prevents
radv_dump_annotated_shader from matching waves.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30734>
2024-08-21 13:38:53 +00:00
Rhys Perry
db39685e31 aco: validate temporary reachability
These errors are nicer to read than the ones from live variable analysis.

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/30440>
2024-08-21 10:47:20 +00:00
Rhys Perry
39270a8be3 aco: preserve SSA in try_eliminate_scc_copy
Otherwise, there is no definition of this temporary. Fixes fail in future
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/30440>
2024-08-21 10:47:20 +00:00
Rhys Perry
d81d5b7d00 aco: use dominance helpers
This makes the passes slightly faster.

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/30440>
2024-08-21 10:47:20 +00:00
Rhys Perry
d91e634c13 aco: calculate indices from dominance tree
This lets us do fast dominance checks.

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/30440>
2024-08-21 10:47:20 +00:00
Eric Engestrom
b537c06db4 broadcom/ci: increase the timeout of the nightly job v3d-rpi4-gl:arm32 by 10min
+5min might be enough but let's have 5 more minutes of margin.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30694>
2024-08-21 08:52:41 +00:00
Eric Engestrom
dd694ac6e5 broadcom/ci: set default TEST_PHASE_TIMEOUT_MINUTES so that jobs never timeout without uploading results
The CI-wide default is 20min, so if we set a 20min job timeout here, we
can't get the results of our jobs when they timeout.

Instead of setting the test timeout to 15min, which would be too short
for some jobs, leave it at 20min (but be explicit about it and protect
against a future change of that default), and bump the job timeout by
5min to allow for results to be uploaded.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30694>
2024-08-21 08:52:41 +00:00
M Henning
47a2ab6f3f nv/codegen: Stop overaligning var_function_temp
This was a hack to work around MemoryOpt brokenness.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984>
2024-08-21 02:59:45 +00:00
M Henning
86fb61b6dc nv/codegen: Use nir_opt_load_store_vectorize
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984>
2024-08-21 02:59:45 +00:00
M Henning
8887f620b8 nv/codegen: Modify nir pass order
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984>
2024-08-21 02:59:45 +00:00
M Henning
3dbb28dc89 nv/codegen: Vector store ssbo/global/shared/scratc
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984>
2024-08-21 02:59:45 +00:00
M Henning
710f5703cd nv/codegen: Vector load ssbo/global/shared/scratch
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984>
2024-08-21 02:59:44 +00:00
M Henning
64e27b2af1 nv/codegen: Limit MemoryOpt to input/output/const
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984>
2024-08-21 02:59:44 +00:00
M Henning
672246f0fa nv/codegen: Use nir_lower_mem_access_bit_sizes
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984>
2024-08-21 02:59:44 +00:00
M Henning
73947493e2 nv50_ir_from_nir: Use getFile() more often
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984>
2024-08-21 02:59:44 +00:00
M Henning
879343839b nv50/peephole: merge/split can swap word order
and we would prevoisly incorrectly apply MergeSplits in this case

That is,
    a, b = split(x)
    y = merge(b, a)
could be incorrectly optimized to
    y = x
before this commit

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24984>
2024-08-21 02:59:44 +00:00
Francisco Jerez
71ca8529c5 intel/brw/gfx12.5+: Fix IR of sub-dword atomic LSC operations.
We were currently emitting logical atomic instructions with a packed
destination region for sub-dword LSC atomics, along the lines of:

> untyped_atomic_logical(32) dst<1>:HF, ...

However, these instructions use an LSC data size D16U32, which means
that the 16b data on the return payload is expanded to 32b by the LSC
shared function, so we were lying to the compiler about the location
of the individual channels on the return payload, its execution
masking, etc.  This is why the hacks that manually set the
'inst->size_written' of the instruction were required.

In some cases this worked, but any non-trivial manipulation of the
instruction destination by lowering or optimization passes could have
led to corruption, as has been reproduced in deqp-vk during
lower_simd_width() for shaders that use 16-bit atomics in SIMD32
dispatch mode.

Note that LSC sub-dword reads aren't affected by this because they use
raw UD destinations and specify the actual bit size of the operation
datatype as the immediate SURFACE_LOGICAL_SRC_IMM_ARG, which doesn't
work for atomic operations since that immediate specifies the atomic
opcode.

Instead, have the logical operation implement the behavior of 16-bit
destinations correctly instead of silently replacing the 16-bit region
with an inconsistent 32-bit region -- This is done by emitting the MOV
instructions used to pack the data from the UD temporary into the
packed destination from the lower_logical_sends() pass instead of from
the NIR translation pass.

Fixes: 43169dbbe5 ("intel/compiler: Support 16 bit float ops")
Reviewed-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/30683>
2024-08-21 02:33:12 +00:00
Scott Moreau
7cbe8c390d egl: hook up swap interval bits when using zink on wayland
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25358>
2024-08-20 16:19:17 -06:00
Scott Moreau
a641ca34fa egl: small refactor to avoid code duplication
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25358>
2024-08-20 16:18:04 -06:00
M Henning
8ee7f89641 nouveau/codegen: Switch to derivative intrinsics
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30747>
2024-08-20 21:59:54 +00:00
Nanley Chery
5e86087940 intel: Move depth clear value writes to drivers
This improves drivers in the following ways:

* iris_hiz_exec() and crocus_hiz_exec() gets rid of the narrowly-used
  update_clear_depth parameters.
* iris avoids fast-clearing if the aux state is CLEAR. crocus avoids
  this too, but didn't actually need it in the first place.
* iris updates the value once per fast_clear_depth() call instead of
  doing an update for each layer being cleared.
* anv now updates the clear value when transitioning from an undefined
  layout instead of doing so on every fast-clear. This should be safer
  because we don't perform state cache invalidates when changing the
  clear value. So, existing surface states won't have any stale values.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30520>
2024-08-20 21:29:43 +00:00
Nanley Chery
16f9b8e92c iris: Move a HIZ_CCS_WT fast-clear flush higher up
The next patch will be update the clear value. Move the stalling flush
to the top of fast_clear_depth() so that there are no users of the clear
value when it is replaced.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30520>
2024-08-20 21:29:43 +00:00
Nanley Chery
d7b0d32c28 intel/blorp: Simplify depth clear value updates
Use a single MI_STORE_DATA_IMM instead of five.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30520>
2024-08-20 21:29:43 +00:00
Nanley Chery
3294200098 intel: Add and use isl_get_sampler_clear_field_offset
Add and use a function which documents the sampler's behavior around
fast-clears on gfx11-12.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30520>
2024-08-20 21:29:43 +00:00
Nanley Chery
55dbc58bf4 iris: Invalidate state cache for some depth fast clears
We need to invalidate the state cache when updating the value in the
indirect clear color so that existing surface states can pick up the new
value.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30520>
2024-08-20 21:29:43 +00:00
Mike Blumenkrantz
c2dcecffc5 st/pbo: reject vs/fs pbo ops if rowstride < width
this pbo shader works by iterating over the framebuffer size
and storing a value to an offset for each source pixel. if the
number of pixels being written out does not correspond to fragcoord
to the extent that certain source pixels are not written at all, however,
then this method should not be used in order to avoid giving broken results

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30689>
2024-08-20 20:59:15 +00:00
Mike Blumenkrantz
a442f67d2f zink: bail on choose_pdev immediately if no devices are available
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30746>
2024-08-20 20:26:11 +00:00
Nanley Chery
07e0834774 intel: Use a simpler workaround for HiZ WT fast-clears
The new workaround tries to strike a balance between simplicity and
functionality (for testing purposes). Instead of checking for the
alignment of a specific LOD when fast-clearing, we take an
all-or-nothing approach for LOD1+.

I haven't found any app to clear LOD1+ except for a Dirt Rally trace
some time ago. If I remember correctly, that trace clears all LODs,
doesn't render to them, then clears again with a different color,
incurring resolves. So, skipping LOD1+ fast clears will avoid those
resolves. Other apps I tested include Synmark2, glmark2, GfxBench5, and
the Vulkan games in internal our benchmarking tool.

Now that we've added updated and simplified checks in the drivers
themselves, we delete blorp_can_hiz_clear_depth.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30250>
2024-08-20 19:43:15 +00:00
Nanley Chery
a28bd0abdf intel: Adjust partial depth fast clear checks
None of our tracked games use partial depth clears, so only allow it in
simple cases for testing purposes. This change also fixes an issue on
gfx8, where we had been accidentally disabling full surface clears if
the LOD was not 8x4 aligned.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30250>
2024-08-20 19:43:15 +00:00
Nanley Chery
dd384104b7 intel/blorp: Allow LOD0 fast-clears with HiZ WT
I did some more debugging of this feature, but this time with a modified
version of the piglit test, ./bin/depthstencil-render-miplevels.
I modified the test to:

* Control which LOD to stop populating/clearing
* Print out the results of readpixels to stderr

From there, I could see how different surface dimensions affected
fast-clears. Depending on the surface dimensions, fast-clearing an LOD
above the LOD0 could cause other LODs to be cleared and/or cause the
targeted LOD to be only partially cleared (for example, when the LOD0
dimension is 66x66 and the test doesn't clear LOD3+). This never happens
when fast-clearing LOD0 however.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5258
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30250>
2024-08-20 19:43:15 +00:00
Nanley Chery
6afdc9c5a6 intel: Enable more LOD0 HIZ+CCS fast clears
For correct fast-clearing with HiZ+CCS, we require roughly 16x8
alignment of LODs. The next patch will cause drivers to ignore the
alignment of LOD0, so align the qpitch to 8 to avoid breakage and so
that fast clears will be enabled more often.

Prevents failures with the piglit test case:

	./bin/fbo-depth-array depth-clear -fbo

in the next patch.

Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30250>
2024-08-20 19:43:15 +00:00
Kenneth Graunke
d22d6d814d intel/brw: Fix Xe2+ SWSB encoding/decoding for DPAS instructions
SBID SET can only be used on SEND, SENDC, or DPAS instructions.  The
existing code was handling SET for SEND/SENDC, but was using the wrong
encoding for DPAS.  Add a new case to handle that and make it clear that
the existing code is only for SEND/SENDC.

While here, rewrite the encoder to use 2-bit binary immediates shifted
up into the mode [9:8] field, rather than pre-shifted hex values.  This
matches the documentation better and is a little easier to follow.

On the decode side, we were incorrectly decoding MATH instructions.
Because they're marked is_unordered, we were hitting the SEND/SENDC
decoding, which is incorrect for MATH.

Fixes 22 cooperative matrix tests on Lunar Lake.

Huge thanks to Paulo Zanoni for bisecting failures to one of my commits,
then analyzing shaders and experimenting to discover that the failure
was really an unrelated bug, just being provoked by different choices of
registers.  His work narrowing the problem down made it much easier to
discover and fix this bug.

Backport-to: 24.2
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30705>
2024-08-20 19:09:37 +00:00
Kenneth Graunke
89f9a6e10b intel/brw: Pass opcode to brw_swsb_encode/decode
We're going to need to handle encoding/decoding differently for DPAS vs.
SEND/SENDC vs. other instructions.  Pass the opcode so we can figure out
the encodings for each type of instruction.

Backport-to: 24.2
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30705>
2024-08-20 19:09:37 +00:00
Eric Engestrom
a33ef21106 docs/envvars: fix reference
Fixes: 4999e4cd4c ("docs/anv: list environment variables")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30749>
2024-08-20 19:02:02 +00:00
Samuel Pitoiset
b66229ac64 radv: add a small comment describing the DGC implementation
It's quite complex.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30737>
2024-08-20 18:22:55 +00:00
Samuel Pitoiset
1048da8dd0 radv: refactor the DGC helpers to determine cmdbuf size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30737>
2024-08-20 18:22:55 +00:00
Samuel Pitoiset
ca447a7a7e radv: pass a dgc_cmdbuf parameter to more dgc helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30737>
2024-08-20 18:22:55 +00:00
Samuel Pitoiset
8027f98443 radv: add a small helper to determine the index type with DGC
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30737>
2024-08-20 18:22:55 +00:00
Eric Engestrom
acb40745f8 turnip/ci: add a750_vk flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30745>
2024-08-20 17:08:30 +00:00
Valentine Burley
0f81986e04 freedreno/ci: Wire up skips for a630_vk_full
I missed this when enabling the job.

Fixes: 679477d83b ("freedreno/ci: Re-enable Adreno 630 for Vulkan nightly jobs")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30744>
2024-08-20 16:29:47 +00:00
Valentine Burley
10c64ee63a tu: Expose VK_KHR_workgroup_memory_explicit_layout
It's all done for us in NIR.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29346>
2024-08-20 15:59:30 +00:00
Constantine Shablia
07c6459cd8 vk/meta: Add copy/fill/update helpers
Add buffer copy/fill/update helpers using compute shaders. The driver
can select the optimal per-workgroup copy/fill/update size by specifying
a non-zero vk_meta_device::buffer_access::optimal_size_per_wg size.
If zero, the core will assume a 64-byte size (the usual cache-line size).

Buffer accesses will be done through SSBOs unless
vk_meta_device::buffer_access::use_global_address is true, in which
case the core will the buffer address using GetBufferDeviceAddress()
and pass that address as a push constant to the compute shader.

Image to buffer copies are always done through a compute shader. The
optimal workgroup size will be chosen based on
vk_meta_copy_image_properties::tile_size: the copy logic picks a
workgroup size matching the tile size, and aligns accesses on a tile.
The view format is selected by the driver. To optimize things on the
shader side, pick UINT formats (usually less work to do to pack data).

Buffer to image copies can be done done through the graphics pipeline
if needed (use_gfx_pipeline passed to vk_meta_copy_buffer_to_image()),
which is useful for vendor-specific compressed formats that can't be
written outside of the graphics pipeline. Drivers should normally prefer
compute-based copies when that's an option. Just like for image to buffer
copies, the workgroup size of compute shaders is picked based on the
image tile size, and the view format must be selected by the driver.

Image to image copies is just a mix of the above, with the driver being
able to select the pipeline type, as well as define the tile size and
view format to use. When using a compute pipeline, the workgroup size
will be MAX2(src_tile_sz, dst_tile_sz), and accesses will be aligned
on the selected reference image.

For compressed formats, the caller should pick an RGBA format matching
the compressed block size.

Co-developed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29333>
2024-08-20 15:11:14 +00:00
Boris Brezillon
dad5c1184f vk/meta: Let meta users pass the color attachment write mask explicitly
Will be needed for partial interleaved depth/stencil copies where the
image is treated as a color image with some components assigned to the
depth and others assigned to the stencil. If only one aspect is copies
using a graphics pipeline, we need to preserve components assigned to
the other aspect, and an easy way to do that is to tweak the color
attachment write mask.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29333>
2024-08-20 15:11:14 +00:00
Boris Brezillon
8ddc527ba4 vk/image: Fix the view extent of uncompressed views of compressed images
The view extent needs to be divided by the block width/height/depth in
that case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29333>
2024-08-20 15:11:14 +00:00
Boris Brezillon
6ff9b8c36b vk/image: Add a vk_image_buffer_range() helper
vk_image_buffer_range() returns the buffer range needed for an
image <-> buffer copy, which will help us initialize storage buffer
descriptors.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29333>
2024-08-20 15:11:14 +00:00
Boris Brezillon
f8b2f967b4 vk/format: Add missing R10G10B10A2_SINT entry in the pipe -> vk table
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29333>
2024-08-20 15:11:14 +00:00
Boris Brezillon
ff2ebdc4d6 nir/format_convert: Promote input to 32-bit before packing integers
If we don't do that and the source is not 32-bit we end up with a
bit_size mismatch when doing the ior operation.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29333>
2024-08-20 15:11:14 +00:00
Boris Brezillon
2b2b66f497 vk/sync: Use the proper type in vk_filter_{src,dst}_access_flags2()
VkAccessFlags2 and VkPipelineStageFlags2 being both 64-bit bitmasks
the mistake is harmless, but let's fix that anyway to avoid any
confusion.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30735>
2024-08-20 14:33:52 +00:00
Boris Brezillon
62a63b69ec pan/tex: Allow format reinterpretation on v9+
Creating views of images using a different format should be possible
as long as the internal layout match. Pick the format of the view
rather than the original image format when creating texture planes
on v9.

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/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
6b49b1708e pan/bi: Support native layer_id store/load on Valhall
On Valhall, we can store the layer index in PositionFIFO attributes and
have the primitives dispatched to the appropriate list in the tiler
context, which means we no longer have to issue N IDVS jobs when doing
layered rendering.

On the fragment shader side, we can pass the layer index through the
frame_argument field, which can be preloaded in r62-r63, so do that to
save a push uniform slot.

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/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
fa24b3f4d0 pan/shader: Fix FS varyings.input_count initialization on v9+
There's no varying outputs on a fragment shader, but we need to
initialize the varying inputs.

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/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
65d86cc5df pan/cs: Provide cs_root_chunk_{gpu_addr,size}() and cs_is_empty() helpers
It's nicer/shorter than accessing cs_builder internals.

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/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
43dca3640d pan/cs: Allow lazy root chunk allocation
We don't necessarily want to allocate the root CS chunk upfront if we
don't know if there will be instructions emitted on the CS.

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/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
8b93d1dbbb pan/decode: Interpret LOAD_MULTIPLE opcode when decoding a command stream
This way we can support decoding of descriptors that are passed through
context registers, which we will need for panvk, where the tiler/FB
descriptors come from the VkQueue object, and are passed to command
buffers.

Of course, that means we can only see the latest version of such
indirectly passed data, but that's already the case for most descriptors
that are used several times in a command buffer anyway.

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/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
9e7091352c pan/decode: Select the right registers when dumping local storage descriptors
Leads to invalid mappings when the selected register is not matching the
one hardcoded in pandecode_run_idvs().

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/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
867aa82e6f pan/genxml: Fix Resource descriptor alignment
The resource table passed to the shaders needs to be aligned on 64-byte.

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/30695>
2024-08-20 13:20:51 +00:00
Eric Engestrom
aebebe5381 nvk/ci: mark a bunch of tests as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30741>
2024-08-20 13:04:30 +00:00
Eric R. Smith
0598fc4419 panfrost: fix crash when disassembling shader for trace
During disassembly triggered by PAN_MESA_DEBUG=trace,
the upper bits of the blend shader address are set from the passed
in frag_shader. However, this is 0 for some blend shaders. In this case,
skip the blend shader disassembly.

This fixes a failing assert at line 86 of panfrost/lib/genxml/decode.h.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30603>
2024-08-20 12:41:15 +00:00
Eric R. Smith
1ae8ac35c0 panfrost: split pseudo instructions from Bifrost and Valhall
Make pseudo instructions for the IR separate from real Bifrost and
Valhall instructions, which are kept in their own ISA.xml files.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30179>
2024-08-20 12:18:19 +00:00
Eric R. Smith
4cd09ce5e8 panfrost: refactor valhall ISA parser
Make the valhall ISA parser valhall.py have a functional interface
returning a tuple, rather than making users directly access variables
within it.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30179>
2024-08-20 12:18:19 +00:00
Eric R. Smith
c7308b19a0 panfrost: Update bifrost_isa.py to handle some Valhall constructs
Updates the ISA.xml parser to be able to handle some of the constructs
from the Valhall ISA.xml (which differs in significant ways from the
Bifrost ISA.xml). The eventual intent is to avoid duplicating instructions
in the two files, although that isn't enabled in this patch.

The new features aren't used yet, that will be in a future commit.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30179>
2024-08-20 12:18:19 +00:00
Eric R. Smith
470c2637fb panfrost: Make the unit to use for instructions explicit
We were using the first character of names to indicate the execution unit
('+' for add, '*' for fma). Change the ISA.xml file to have an explicit
`unit` attribute for instructions; this makes the XML more flexible
for future architectures and matches what the valhall ISA.xml does.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30179>
2024-08-20 12:18:19 +00:00
Boris Brezillon
f4bd99fb0d panvk: Make sure we emit blend descriptors even if no FS shader is provided
This way we avoid complaints from pandecode.

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/30740>
2024-08-20 13:30:29 +02:00
Mary Guillemard
ce8b07d726 panvk/ci: Update G52 fail list to represent current state
Forgot to remove those two entries when merging previous MR.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 091df61138 ("panvk: Skip blend descriptors when no fragment shader is present")
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30740>
2024-08-20 13:29:00 +02:00
Rohan Garg
1f06e70bdc anv: migrate indirect mesh draws to indirect draws on ARL+
Backport-to: 24.2
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/30690>
2024-08-20 09:41:51 +00:00
Rohan Garg
f69c74b6d5 anv: dispatch indirect draws with a count buffer through the XI hardware on ARL+
ARL+ can dispatch indirect draws through the hardware.

Backport-to: 24.2
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/30690>
2024-08-20 09:41:51 +00:00
Rohan Garg
74cd70841d anv: refactor indirect draw support into it's own function
ARL+ supports some form of indirect draws, instead of trying to mash
support for indirect draws across various generations, let's make things
cleaner by factoring out XI support into it's own function.

Backport-to: 24.2
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/30690>
2024-08-20 09:41:51 +00:00
Rohan Garg
c1af71c9c2 anv,iris: prefix the argument format with XI for a upcoming refactor
Backport-to: 24.2
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/30690>
2024-08-20 09:41:51 +00:00
Rohan Garg
dc23db2a0d anv: program a custom byte stride on Xe2 for indirect draws
Xe2 allows us to program in a custom byte stride for indirect draws

Backport-to: 24.2
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/30690>
2024-08-20 09:41:50 +00:00
Mary Guillemard
b6b6296519 bi: Rewrite dead code elimination
Apply the same optimisation as ACO and AGX.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30484>
2024-08-20 10:03:30 +02:00
Mary Guillemard
7c694d5342 bi: Add loop_header in bi_block
Will be used for some DCE changes

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/30484>
2024-08-20 10:03:23 +02:00
Mary Guillemard
71a01e33d4 bi: Use nir_opt_shrink_stores
This trim vector srcs to the appropriate component count
based on the write mask.

This also should help with image store as the vector srcs
will be trimed according to the format if its known.

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/30484>
2024-08-20 10:03:19 +02:00
Mary Guillemard
3904cfabd6 bi: Use nir_opt_load_store_vectorize
Ensure we vectorize load/store when possible.
Also move lower pack after loop optimization.

This drastically reduce the shader size of
"dEQP-VK.graphicsfuzz.spv-stable-maze-flatten-copy-composite" and allow
it to pass instead of timing out but it might greatly help others.

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/30484>
2024-08-20 10:03:06 +02:00
Mary Guillemard
33fef27356 bi: Do not mark tex ops as skip when dest is used by control flow
Previously, it was possible to have a texture operation marked as SKIP
while one of the dests was in use in conditional control flow.
If an helper thread was to execute that instruction, it would result
in an undefined value being used.

This fix
"dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners" where
helper threads would get stuck inside a loop depending on the result of
a TEXS_2D invocation.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30484>
2024-08-20 10:02:53 +02:00
Mary Guillemard
749287610d bi: Use bi_foreach_src in bi_foreach_ssa_src
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/30484>
2024-08-20 10:02:49 +02:00
Mary Guillemard
90d6457eba bi: Add bi_foreach_ssa_dest
Will be used for DCE and helper invocations pass changes.

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/30484>
2024-08-20 10:02:45 +02:00
Mary Guillemard
091df61138 panvk: Skip blend descriptors when no fragment shader is present
Fix "dEQP-VK.pipeline.*.empty_fs.*" tests crashes.

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/30484>
2024-08-20 09:53:15 +02:00
Tapani Pälli
d4e8c8f874 anv: move setting 3DSTATE_CLIP::MaximumVPIndex from loop
Loop iterates viewports but for MaximumVPIndex we only need viewport
count and last stage that writes viewport.

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/30732>
2024-08-20 06:48:50 +00:00
Louis-Francis Ratté-Boulianne
3967b4bf22 panfrost: add support for ASTC decode mode extension
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30560>
2024-08-20 05:36:15 +00:00
Louis-Francis Ratté-Boulianne
a4a51f22b1 gallium: add PIPE_CAP_ASTC_DECODE_MODE and expose extension
mesa will expose GL_EXT_texture_compression_astc_decode_mode
extension if the cap is enabled by the driver.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30560>
2024-08-20 05:36:15 +00:00
Tapani Pälli
35a6824e88 gbm: depend on libdrm indepedent of dri2 setting
Suggested-by: @stefan11111
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10585
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30716>
2024-08-20 04:55:58 +00:00
Valentine Burley
679477d83b freedreno/ci: Re-enable Adreno 630 for Vulkan nightly jobs
Currently these jobs take just over 2 hours, so they can be re-enabled for nightly
and manual jobs.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30708>
2024-08-20 01:55:05 +00:00
Valentine Burley
f98e91f9b3 freedreno/ci: Move and document last remaining failures
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30708>
2024-08-20 01:55:05 +00:00
Valentine Burley
0a15493429 freedreno/ci: Skip tests that might time out during pre-merge jobs
These tests that may hit the 60s timeout in pre-merge jobs. They pass during full runs
with longer timeouts, so only skip them here.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30708>
2024-08-20 01:55:05 +00:00
Valentine Burley
81c2581e4a freedreno/ci: Update expectations
These failures were previously fixed, but this was missed due to fractional runs.
The skips are no longer necessary either.
Add some flakes seen in various pipelines.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30708>
2024-08-20 01:55:05 +00:00
Valentine Burley
c73b22d4c5 ci: Backport two fixes tor the Vulkan CTS
These fix a good chunk of the failures on Turnip.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30708>
2024-08-20 01:55:05 +00:00
David Heidelberg
6d85cd6a3b freedreno: Implement get_compute_state_info for Adreno 6xx/7xx
Preparation for OpenCL (rusticl) support.

Based on freedreno/a6xx: implement get_compute_state_info from
Dmitry Baryshkov, but uses max_waves to determine the sizes.

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Co-authored-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30616>
2024-08-20 01:30:30 +00:00
Jianxun Zhang
72925f59e6 Revert "iris: Disable PAT-based compression on depth surfaces (xe2)"
This reverts commit b6f9702cf1.

With the progress on Xe2 platforms, we are not seeing many issues
caused by compression on depth buffers.

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

Backport-to: 24.2
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/30653>
2024-08-19 17:53:10 -07:00
Jianxun Zhang
8c623b6a7e Revert "anv: Disable PAT-based compression on depth images (xe2)"
This reverts commit 6073f091bb.

With the progress on Xe2 platforms, we are not seeing many issues
caused by compression on depth buffers.

Backport-to: 24.2
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/30653>
2024-08-19 17:50:10 -07:00
Timothy Arceri
d681cf96fb nir/glsl: set deref cast mode during function inlining
See code comment for details.

Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11535
Fixes: c6c150b4cd ("glsl_to_nir: support conversion of opaque function params")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30338>
2024-08-19 23:54:49 +00:00
Samuel Pitoiset
aad503ecfa aco: fix bogus assert in RT prolog on GFX11+
in_scratch_offset isn't defined on GFX11+ and only useful on < GFX9.

Fixes: bd525f4282 ("aco: Fix 1D->2D dispatch conversion on <gfx9")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30717>
2024-08-19 21:07:31 +00:00
José Roberto de Souza
48e46c71c0 iris/gfx20: Enable depth buffer write through for multi sampled images
BSpec: 56419
Backport-to: 24.2
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29615>
2024-08-19 20:04:36 +00:00
Nanley Chery
b78273c66c iris: Add and use want_hiz_wt_for_res
Backport-to: 24.2
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29615>
2024-08-19 20:04:36 +00:00
José Roberto de Souza
12656571fd anv/gfx20: Enable depth buffer write through for multi sampled images
BSpec: 56419
Backport-to: 24.2
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29615>
2024-08-19 20:04:36 +00:00
Nanley Chery
ebe3eabda6 anv: Add want_hiz_wt_for_image()
Backport-to: 24.2
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29615>
2024-08-19 20:04:36 +00:00
José Roberto de Souza
2553878fba intel/isl/gfx20: Alow hierarchial depth buffer write through for multi sampled surfaces
BSpec: 56419
Backport-to: 24.2
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29615>
2024-08-19 20:04:36 +00:00
Mike Blumenkrantz
7930fe5f01 glx: unify dri screen init
lot of duplication

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
520572eb25 glx: inline __GLXDRIscreen onto base glx_screen
this is much less awkward

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
2c50ee4398 glx: determine is_direct_capable from driver type
indirect contexts have no driver type

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
912090fa96 glx: unify more extension setup
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
0af723ea44 glx/dri3: delete driScreenRenderGPU
this is redundant

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
407a9094f7 glx: move base screen destroy to glx_screen_cleanup
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
b89cf3bbaa glx: rework screen destroy
all the destroy functions call free, but also the caller function calls
free anyway, so just change destroy -> deinit and let there be one free
call

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
39fe5a5dac glx: move driver_configs to base glx_screen
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
abe3bea574 glx: delete private DRIscreen pointers
these are all on the base glx_screen object now

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
5ece0a3b66 glx: unify bind_tex_image
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
19f38ba000 glx: unify dri screen vtable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
b06e861dc8 glx: unify dri get_driver_name
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
f717e67f0c glx/dri3: strdup existing driverName instead of fetching it again
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
046728f47a glx/dri2: strdup driver name
this is freed by the caller

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
5edfc64858 glx: unify renderer query hooks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
479f778a2c glx: unify dri create_context_attribs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
7efd6d8a8c glx: tweak some dri3 context create code
this better matches dri2/drisw create

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
d19c650c7e glx: tweak some drisw context create code
this better matches dri2/dri3 create

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
273efc92cf glx: unify dri destroy context
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
346fae55e7 glx: unify dri unbind context
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
b62601a716 glx: unify dri bind_context
these were all more or less the same

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
09eae187dd glx: use __GLXDRIdrawable more broadly instead of display type drawables
most of this usage was to get at the __DRIdrawable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
46c3bc3365 glx: move/add __DRIdrawable struct to __GLXDRIdrawable
this makes access simpler

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
476b4581d9 glx: flatten out getBufferAge a bit
more flattening to come

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
1908794023 glx: simplify kopper_get_buffer_age
these checks are pointless

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
9042e9a8c0 dri: rework drawable creation
this consolidates all the creation code into the dri frontend,
enabling a single caller from the loader

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
374f204e1e kopper: delete some redundant code
this is already done in the base dri_create_drawable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
d9027b9e7f kopper: call kopper_create_drawable directly
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
baae0940e3 dri: collapse some modifier/dmabuf checks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
140ebeaad4 dri: guard dmabuf support by loader's dmabuf support
this is sort of already implicit through checks elsewhere

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
764e17eb03 dri: further collapse dri_screen creation
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
af6d3fdf6e dri: pass has_multibuffers through from the loader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
576015f735 egl: check x11 multibuffer support before screen create
no functional changes

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
ac41da32b3 glx: always set swapInterval in drisw
this isn't (currently) used by pure sw, but guarding it in a conditional
is pointless

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
b5fa2d6448 kopper: reuse loader_dri3_get_pixmap_buffer
delete more code

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
00f810c31b dri: break out get_pixmap_buffer
no functional changes

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
7f8a60758e kopper: reuse dri_image_fence_sync
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
c5f55ee126 dri: rename and move handle_in_fence to dri_helpers
make this reusable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
f14ef0ee0a kopper: reuse dri3 functions
these were copied because of dependency hell and can now be consolidated

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
8cc95baf7b dri: merge in loader_dri3
this simplifies dependencies

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
8f29aa28a5 kopper: reuse drisw_update_tex_buffer to delete some code
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
af3df1133b egl: initialize dri error code variables
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Mike Blumenkrantz
a3de3a4501 dri: set __DRI_IMAGE_ERROR_BAD_PARAMETER if driver doesn't support dmabuf import
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619>
2024-08-19 17:43:58 +00:00
Eric Engestrom
69c9bf948e turnip/ci: document flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom
b200a38def turnip/ci: skip timing out tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom
b8358ee614 turnip/ci: document regressions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom
ef88cb643a nvk/ci: document regressions
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/11736

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom
6b460189f4 nvk+zink/ci: mark spec@arb_sample_shading@samplemask .*@0\..* partition as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Eric Engestrom
397bdb944d llvmpipe/ci: mark now-skipping test as no longer failing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30725>
2024-08-19 17:25:15 +00:00
Alyssa Rosenzweig
8c501a121f nak: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30573>
2024-08-19 16:35:49 +00:00
Faith Ekstrand
185379ba81 nvk: Stop leaking the descriptor table in-use set
Fixes: ef9d9b70a6 ("nvk/descriptor_table: Add support for requesting a specific index")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30724>
2024-08-19 16:17:13 +00:00
Valentine Burley
f984ff40fe tu: Remove redundant bits override from lower_tex_ycbcr
This isn't needed anymore, because vk_format_get_component_bits now accesses the proper
pipe formats and therefore returns the correct bit count since the following commit:

57c81bab04 ("vulkan/format: Translate two 420_UNORM formats properly")

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30493>
2024-08-19 15:36:49 +00:00
Mike Blumenkrantz
694478025d egl/glx: make detecting explicit modifier support more explicit
explicit modifier usage is different from general modifier capability

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11652, https://gitlab.freedesktop.org/mesa/mesa/-/issues/11663
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30662>
2024-08-19 15:00:51 +00:00
Mike Blumenkrantz
c20d6a9197 egl: make dmabuf/modifier display bools a bit more precise/intelligible
'has_modifiers' was misleading and not actually useful

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30662>
2024-08-19 15:00:51 +00:00
Konstantin Seurer
a77f1d04d2 llvmpipe: Use derivative intrinsics
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30584>
2024-08-19 14:09:11 +00:00
Adam Jackson
e497f81603 rusticl: Add clCreateSubDevices stub
unified-runtime tries to call this unconditionally. It handles errors
correctly, but calling None here isn't an error, it's a crash. Just
return CL_INVALID_VALUE so we don't crash.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30699>
2024-08-19 13:35:40 +00:00
Thomas H.P. Andersen
de0f226f84 nvk: do not overwrite test cases
without this the second test case was just overwritten by the following
cases

Fixes: 6a84d5439d ("nvk: Move the ANTI_ALIAS_CONTROL logic to the MME")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30719>
2024-08-19 13:20:30 +00:00
Konstantin Seurer
d3ff76d27b radv: Synchronize shader dumping
When RADV_DEBUG=shaders is set, printing e.g. different NIR shaders from
different threads at the same time makes the output unreadable. Use a mutex
to synchronize shader dumping so that all shaders get printed in once piece.

Since we're writing everything to a file or terminal anyway, the
performance impact of forcing singlethreaded compilation is negligible.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25215>
2024-08-19 12:29:59 +00:00
Boris Brezillon
d6d8bb8657 util/hexdump: Squeeze repeated patterns instead of zero-ed chunks
Our u_hexdump() squeezes 16-byte chunks filled of zeros, where the unix
hexdump squeezes repeated 16-byte chunks. Turns out panfrost/panvk dumps
can be pretty big when when VM dump is requested
(PANVK_DEBUG/PAN_MESA_DEBUG=dump) and memory regions are
filled with repeated non-zero patterns (like a Z16_UNORM buffer cleared
to 1.0, AKA 0xffff).

Avoiding the repetition of such non-zero patterns in dumps significantly
reduces the size of the dumps. It also clears any confusion for people
used to the original hexdump semantics where a star means the previous
line is repeated.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30692>
2024-08-19 11:28:18 +00:00
Lionel Landwerlin
e10cbb59a5 anv: add assert to detect problematic instruction merges
We stick to a rule in the driver that each field is only set in a
single place in the driver. Therefore when merging instructions, we
should never have any bit set to 1 from both sides.

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/30684>
2024-08-19 11:02:44 +00:00
Lionel Landwerlin
982106e676 anv: only set 3DSTATE_CLIP::MaximumVPIndex once
Currently we can end up merging 2 prepacked 3DSTATE_CLIP instructions
where 2 different places in the driver fill the MaximumVPIndex.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30684>
2024-08-19 11:02:44 +00:00
Lionel Landwerlin
7c73346549 anv: remove unused macro
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/30684>
2024-08-19 11:02:44 +00:00
Lionel Landwerlin
9eff285a46 anv: fix extended buffer flags usages
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: bcc0ec8e6c ("anv: enable KHR_maintenance5")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30714>
2024-08-19 10:13:09 +00:00
Lionel Landwerlin
eacb8f85a2 vulkan/runtime: fix GetBufferMemoryRequirements2 for maintenance4
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 2649ee0724 ("vulkan/runtime: implement vkGetBufferMemoryRequirements2()")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30714>
2024-08-19 10:13:09 +00:00
Job Noorman
e80c6d0f00 ir3: fix calling ir3_const_state_mut in the binning VS
lower_driver_param_to_ubo would call ir3_const_state_mut
unconditionally. However, since 850f2aab03 ("ir3, tu: Use a UBO for VS
primitive params on a750+"), it can be called for the binning VS,
causing an assert. This commit makes sure to only call
ir3_const_state_mut when it's really necessary to have mutable access to
the const state.

Fixes: 2c47ad7774 ("ir3: make ir3_const_state less error-prone to use")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30718>
2024-08-19 09:54:45 +02:00
GKraats
0311159bed i915g: fix count of buffers at i915_drm_batchbuffer_validate_buffers
This commit contains the fix with num_of_buffers at validation-call
at i915_drm_batchbuffer_validate_buffers.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769>
2024-08-18 20:19:44 +00:00
GKraats
ed2123158d i915g: Screen corruption with ENOBUFS caused by fence register shortage
This commit solves the shortage-problem at the blit-functions by
checking the number of fence-registers after updating the batch.
If too many registers are used,
the batch-entries and relocs for the current blit function are
removed by setting batch->ptr and reloc_count to value before
the blit call and calling drm_intel_gem_bo_clear_relocs.
This truncated batch is flushed,
and the batch is updated again for the current blit function.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769>
2024-08-18 20:19:44 +00:00
Karol Herbst
93e96da945 rusticl: do not use CL vector types in bindings and code
Bindgen seems to miscompile them and I kinda thought I've done this
already in the past, but apparently not.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11722
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30710>
2024-08-18 09:23:22 +00:00
Caio Oliveira
40f77b6936 intel/brw: Avoid modifying the shader in assign_curb_setup if not needed
If there are no uniforms to push, don't emit the AND or invalidate the
shader analysis.  This affects only compute shaders.

Not a significant impact since lots of shaders end up pushing
uniforms.  Fossil-db numbers (restricted to compute pipelines only) for DG2

```
Totals:
Instrs: 3071016 -> 3070894 (-0.00%)
Cycle count: 8320268863 -> 8320264519 (-0.00%)

Totals from 122 (2.70% of 4520) affected shaders:
Instrs: 10675 -> 10553 (-1.14%)
Cycle count: 2060003 -> 2055659 (-0.21%)
```

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30631>
2024-08-17 16:25:01 -07:00
Caio Oliveira
30ecaf6689 meson: Only use fallback for Lua if building freedreno tools
This keeps the allow_fallback behavior for Lua dependency when freedreno
tools are used, like it used to be.  But will disable the fallback
mechanism otherwise.

For Intel, the dependency is optional and the tool that uses is
skipped when Lua is not available, so it is fine we don't use fallback
there.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30693>
2024-08-17 22:04:53 +00:00
Valentine Burley
71a45e4e0f android: Extract version from llvm-project instead of hardcoding it
Stop hardcoding LLVM version as 12, instead read it from external/llvm-project.

In 81e20472a0
the location of the LLVM_VERSION_MAJOR definition was moved. This patch accounts for that
by extracting the version from the new location if it exists. If the new file is not present,
it falls back to the old location.

Backport-to: 24.2
Tested-by: Antonio Ospite <antonio.ospite@collabora.com>
Tested-by: Alessandro Astone <alessandro.astone@canonical.com>
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30598>
2024-08-17 21:11:08 +00:00
Faith Ekstrand
6a84d5439d nvk: Move the ANTI_ALIAS_CONTROL logic to the MME
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
574798a9a8 nvk: Add macros to sort out tess parameters
We need to flip trianges from CW to CCW based on the domain origin
specified as dynamic state.  Instead of tracking all this on the CPU,
add a scratch register and do the conversion in the MME.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
5a2e25db69 nvk/mme: Add helpers for masked scratch updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
954f274c19 nvk: Move setting VB enables and strides into macros
This effectively splits the two states apart so that we can set them
independently.  Inside the macros, we only update states that have
actually changed which should also be a bit more efficient.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
07d7652624 nvk: Move the guts of BindVertexBuffers2 into a macro
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
b47f928f4b nvk: Move the guts of BindIndexBuffer2KHR to a macro
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
5f29edff07 nvk: Increase the context init size
We're about to add a bunch more MMEs and we're going to blow past the
old limit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
00b6635407 nvk: Emit NVK_MME_SCRATCH_DRAW_BEGIN as part of flush_ia_state()
We're always storing it in a scratch register for register pressure
reasons anyway.  We may as well just stash it there as a state reg and
we can avoid emitting it all over the place.  This reduces each draw
call to nvk_flush_gfx_state() followed by the actual draw, which is now
independenty of any dynamic state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
7d6cc15ab8 nvk/mme: Add a unit test framework for driver macros
Also add tests for NVK_MME_CLEAR to demonstrate the framework.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
03f785083f nvk: Reserve MME scratch area for communicating with FALCON
mme_set_priv_reg() needs the first three registers to send data to/from
FALCON04.  If we don't reserve these in the register space, it may stomp
other things.  This only really matters pre-Volta where we need to use
privileged registers for conservative rasterization.  However, it's a
good idea to reserve the space none the less.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
50a030b02a nouveau/mme: Add a generic simulator function
This one takes a devinfo and decodes and simulates the shader with
whichever sim is appropriate.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
33315ce136 nouveau/mme/tu104: Properly handle mthd increment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
4f14349823 nouveau/mme: Add a pluggable state interface
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
4d2d7d6c15 nouveau/mme/fermi: Break the state simulator into a pluggable component
This is equivalent to the previous commit, but for Fermi.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
aabd7941ce nouveau/mme/tu104: Break the state simulator into a pluggable component
Instead of the state part of the simulator being baked in, it's now
broken out into a pluggable component that the simulator talks to via a
function pointer interface.  This will let us run the simulator without
the full state simulator under the hood.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
79e0b632a2 nouveau/mme: Use a designated initializer in mme_fermi_decode()
Otherwise some fields may not be initialized.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
7d4fafb0e9 nouveau/mme: Allow shifting immediates on Fermi
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
c218bd798f nouveau/mme: Add NOT and AND_NOT ops
Fermi has AND_NOT natively and NOT is just AND_NOT(0, x).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
da96084392 nouveau/mme: Disassemble MERGE more like the mme_merge()
In the builder helper, it's (dst_pos, bits, src_pos).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
8d20ade09b nouveau/mme: Don't allow PRMT and MTHD in the same op on Turing+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
f5507fb69b nouveau/mme: Better handle the too many immedaties case on Turing+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:27 +00:00
Faith Ekstrand
381be88473 nouveau/mme: Fix add64 of immediates on Fermi
Fixes: 162269f049 ("nouveau/mme: Add Fermi builder")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:26 +00:00
Faith Ekstrand
f2655b10c7 nouveau/winsys: Fix an undefined shift
It was an integer shift twhich sometimes overflowed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:26 +00:00
Faith Ekstrand
742364cc42 nouveau/headers: Add more nv_push asserts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30703>
2024-08-17 20:32:26 +00:00
Friedrich Vock
bd525f4282 aco: Fix 1D->2D dispatch conversion on <gfx9
out_args->scratch_offset and in_wg_id_x will alias on <gfx9.
To avoid the conversion code reading a garbage WG ID, move the
scratch/ring offset writing to the very end.

Fixes: 1e354172 ("radv,aco: Convert 1D ray launches to 2D")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30707>
2024-08-17 17:01:10 +00:00
Rob Clark
563ec4754a nir/opt_loop: Don't peel initial break if loop ends in break
A loop that looks like:

   loop {
      do_work_1();
      if (cond) {
         break;
      } else {
      }
      do_work_2();
      break;
   }

We can't pull that break ahead of do_work_1() after hoisting the initial
do_work_1() out of the loop.  So bail in this case.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11711
Fixes: 6b4b044739 ("nir/opt_loop: add loop peeling optimization")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30702>
2024-08-17 14:27:02 +00:00
Marek Olšák
665eae51ef amd: update addrlib
There are some changes in ac_surface.c to make this work.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30507>
2024-08-16 21:44:32 +00:00
Guilherme Gallo
8aa52ac666 ci/a618: Fix zink-tu-a618-full rules
We should use `.zink-turnip-collabora-manual-rules` instead of
`.collabora-turnip-manual-rules`, since the former correctly reacts to
the zink+turnip file changes.

Fixes: 69eac6dd15 ("ci/a618: Add zink-tu-a618-full")

Reported-by: Valentine Burley <valentine.burley@gmail.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30698>
2024-08-16 20:08:35 +00:00
José Roberto de Souza
38c989ada2 anv: Nuke anv_utrace_submit::trace_bo
There is no usage for this bo.

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/30676>
2024-08-16 19:38:19 +00:00
José Roberto de Souza
f7b386bd6d anv: Use batch_bo_pool in utrace anv_async_submit_init() calls
In pratical the only change here is that batch_bo_pool
are captured to error dumps.

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/30676>
2024-08-16 19:38:19 +00:00
José Roberto de Souza
168e26fc04 anv: Add trivial_batch and query-pool to the error capture
Those are batch buffers that are not allocated from batch_bo_pool,
so they were left out of error capture without the capture-all
parameter.

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/30676>
2024-08-16 19:38:18 +00:00
Sagar Ghuge
c4f2a8d984 intel/compiler: Fix indirect offset in GS input read for Xe2+
Make sure to take new GRF size into consideration and adjust the
indirect offset according to new size so that when we do the indirect
load with address register, we load right values.

This helps pass the following tests:
   - dEQP-VK.binding_model.descriptor_buffer.mutable_descriptor.*geom*
   - dEQP-VK.ray_query.*geometry_shader.*

Backport-to: 24.2
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30679>
2024-08-16 18:40:13 +00:00
Michael Catanzaro
46a8d5e7ef Disk cache should consistently create parent directories when needed
In !25925 I attempted to fix an error spam caused by the disk cache not
creating parent directories of the cache directory when needed,
resulting in failure to create the disk cache. Presumably that is bad
for performance.

Unfortunately I did a really bad job and only fixed the edge case where
the cache dir is given by $MESA_SHADER_CACHE_DIR rather than the general
case. Here I attempt to be more comprehensive.

Fixes #8294

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30160>
2024-08-16 16:39:37 +00:00
Connor Abbott
93b5e08886 ir3: Fix nir_op_vec8/vec16
For simplicity we create a large repeat group and then split it up
before RA.

Fixes: 58d18bc7a8 ("ir3: lower vectorized NIR instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30691>
2024-08-16 15:39:38 +00:00
Ian Romanick
198d8d9c03 nir/algebraic: Improve some find_lsb and ifind_msb patterns
These patterns were observed in shaders from parallel-rdp.

No shader-db changes on any Intel platform.

fossil-db:

Meteor Lake, DG2, Ice Lake had Skylake similar results. (Meteor Lake shown)
Totals:
Instrs: 152535883 -> 152535673 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17112406110 -> 17122827810 (+0.06%); split: -0.01%, +0.07%
Spill count: 78525 -> 78523 (-0.00%)
Fill count: 148132 -> 148127 (-0.00%); split: -0.01%, +0.00%
Max live registers: 31855320 -> 31855314 (-0.00%)

Totals from 206 (0.03% of 633223) affected shaders:
Instrs: 797124 -> 796914 (-0.03%); split: -0.03%, +0.00%
Cycle count: 4716743323 -> 4727165023 (+0.22%); split: -0.05%, +0.27%
Spill count: 18781 -> 18779 (-0.01%)
Fill count: 31381 -> 31376 (-0.02%); split: -0.03%, +0.01%
Max live registers: 31872 -> 31866 (-0.02%)

Tiger Lake
Totals:
Instrs: 150560465 -> 150560343 (-0.00%); split: -0.00%, +0.00%
Cycle count: 15482372893 -> 15479328542 (-0.02%); split: -0.02%, +0.00%
Fill count: 103509 -> 103512 (+0.00%)
Max live registers: 31760378 -> 31760374 (-0.00%)

Totals from 199 (0.03% of 632445) affected shaders:
Instrs: 679513 -> 679391 (-0.02%); split: -0.02%, +0.00%
Cycle count: 4258406125 -> 4255361774 (-0.07%); split: -0.09%, +0.02%
Fill count: 30609 -> 30612 (+0.01%)
Max live registers: 30502 -> 30498 (-0.01%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30650>
2024-08-16 14:52:04 +00:00
Ian Romanick
c8038643b8 intel/brw: Make ifind_msb SSA friendly
No shader-db changes on any Intel platform.

v2: Use negate(tmp) instead of creating a new temporary. Suggested by
Ken.

fossil-db:

Meteor Lake, DG2, and Skylake had similar results. (Meteor Lake shown)
Totals:
Instrs: 152535897 -> 152535883 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17112329592 -> 17112406110 (+0.00%); split: -0.06%, +0.06%

Totals from 40 (0.01% of 633223) affected shaders:
Instrs: 458813 -> 458799 (-0.00%); split: -0.01%, +0.00%
Cycle count: 4358016282 -> 4358092800 (+0.00%); split: -0.23%, +0.24%

Tiger Lake and Ice Lake had similar results. (Tiger Lake shown)
Totals:
Instrs: 150560511 -> 150560465 (-0.00%); split: -0.00%, +0.00%
Cycle count: 15484534441 -> 15482372893 (-0.01%); split: -0.12%, +0.11%
Spill count: 59795 -> 59794 (-0.00%)
Fill count: 103513 -> 103509 (-0.00%)

Totals from 40 (0.01% of 632445) affected shaders:
Instrs: 368877 -> 368831 (-0.01%); split: -0.01%, +0.00%
Cycle count: 3918398264 -> 3916236716 (-0.06%); split: -0.49%, +0.43%
Spill count: 16896 -> 16895 (-0.01%)
Fill count: 27819 -> 27815 (-0.01%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30650>
2024-08-16 14:52:04 +00:00
Ian Romanick
e9c151fde6 intel/brw: Make 16-bit ishl, ishr, and ushr SSA friendly
No shader-db changes on any Intel platform.

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 152536266 -> 152535897 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17124901233 -> 17112329592 (-0.07%); split: -0.07%, +0.00%
Spill count: 78571 -> 78525 (-0.06%)
Fill count: 148178 -> 148132 (-0.03%)

Totals from 210 (0.03% of 633223) affected shaders:
Instrs: 514525 -> 514156 (-0.07%); split: -0.16%, +0.08%
Cycle count: 4003540698 -> 3990969057 (-0.31%); split: -0.32%, +0.00%
Spill count: 15632 -> 15586 (-0.29%)
Fill count: 26241 -> 26195 (-0.18%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30650>
2024-08-16 14:52:04 +00:00
Job Noorman
2c47ad7774 ir3: make ir3_const_state less error-prone to use
ir3_const_state is shared between the binning and non-binning variants.
The non-binning variant is compiled first and sets up ir3_const_state
after which the binning variant is not supposed to modify it anymore. If
it would, things may go haywire since the layout of the constant state
will change after the non-binning variant already finished compiling.

Currently, the ir3_const_state() accessor takes care of the sharing
(i.e., it returns the non-binning const state for the binning variant)
but nothing would be prevent the binning variant from accidentally
modifying the state. This is handled by restraint from its users.

This commit tries to make it more difficult to accidentally modify the
const state by the binning shader by making the following changes:
- ir3_const_state(): the same logic as before but now returns a const
  pointer to prevent the binning variant from (accidentally) modifying
  the const state.
- ir3_const_state_mut(): returns a non-const pointer but asserts that it
  is not called by the binning variant.

As a corollary ir3_get_driver_ubo() also had to be split in two variants
(const and non-const) as it is called with a pointer to one of the
fields of ir3_const_state.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30256>
2024-08-16 14:14:29 +00:00
Job Noorman
7036d0fcf7 ir3: don't modify const state for the binning variant in ir3_cp
ir3_cp uses the const state to lower immediates. It doesn't take the
binning variant into account so in theory, it could add immediates to
the const state for the binning variant, modifying the state after its
layout had already been established for the non-binning variant.

In practice, this probably works fine as the immediates are the last
section of the const state so the layout wouldn't be changed by ir3_cp.
However, there is very little benefit in doing this (the chances for an
immediate being necessary in the binning variant but not in the
non-binning variant are small) so it's better to stick to the global
invariant of not changing the const state in the binning variant.

This commit makes sure that immediates are never added by ir3_cp for the
binning variant. Some refactoring was necessary, however, since the
lookup and modification of the const state were a bit intertwined. More
specifically, currently, the immediate storage in the const state would
always be enlarged by ir3_cp whenever its full, even when it might
actually contain the immediate. To fix this, the logic is split in two
functions: ir3_const_find_imm() for lookup (allowed to be called by the
binning variant), and ir3_const_add_imm for adding immediates (not
allowed to be called by the binning variant).

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30256>
2024-08-16 14:14:29 +00:00
Job Noorman
24b422dc3e ir3: remove unused outputs for binning pass in NIR
We used to remove the unused outputs for the binning pass in ir3. Even
though DCE would be able to clean up most of the mess, there could still
be some left: most notably, unused control flow would not be cleaned up
(leaving some weird branches to empty blocks). Instead of teaching ir3
how to clean this up, it makes more sense to do this at the NIR level,
where we can also benefit from other optimizations.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30256>
2024-08-16 14:14:29 +00:00
Job Noorman
bec7e79f33 freedreno: don't require binning and non-binning inputs to match
This shouldn't be necessary anymore since f6f7bc29 ("freedreno/a6xx:
Program VFD_DEST_CNTL from program stateobj").

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30256>
2024-08-16 14:14:29 +00:00
Robert Mader
c738cfe8dd egl: Stop requiring texture_3D_image for EGL 1.5
Neither VK-GL-CTS nor dri2_setup_screen() require it, unlike
texture_2D_image and texture_cubemap_image. Crucially, older etnaviv
generations and vc4 in general do not support 3d textures.

Thus drop the requirement in order to support EGL 1.5 across the board.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30680>
2024-08-16 13:36:47 +00:00
Karmjit Mahil
3c4fb8f7fa tu: Implement VK_EXT_legacy_dithering
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30536>
2024-08-16 13:05:56 +00:00
Karmjit Mahil
110201cfd8 freedreno: Define SP_DITHER_CNTL (0xA9AC)
Seems to be the same as RB_DITHER_CNTL. Both get set to 0x5555
when dithering is enabled on the proprietary gles driver.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30536>
2024-08-16 13:05:56 +00:00
Boris Brezillon
9241af23e5 panvk: Adjust RGB component order for fixed-function blending
Basically what 004e0eb3ab ("panfrost: use RGB1 component ordering
for R5G6B5 pixel formats") was doing in the gallium driver, but
applied to panvk this time.

Fixes: 004e0eb3ab ("panfrost: use RGB1 component ordering for R5G6B5 pixel formats")
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/30685>
2024-08-16 12:00:11 +00:00
Lionel Landwerlin
fbafa9cabd intel/nir: remove load_global_const_block_intel intrinsic
load_global_constant_uniform_block_intel is equivalent in terms of
loading, then for the predicate we just do a bcsel afterward in places
where that is required.

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/30659>
2024-08-16 11:12:39 +00:00
Danylo Piliaiev
a15466187c tu/a7xx: Use BLIT_EVENT_STORE_AND_CLEAR when appropriate
BLIT_EVENT_STORE_AND_CLEAR presumably swallows the BLIT_EVENT_CLEAR
at the start of the next bin. Should be faster than separate events.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30270>
2024-08-16 10:38:38 +00:00
Danylo Piliaiev
80a50269a2 tu/a7xx: Use generic clear for image clears
CP_BLIT is used only for VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 until we mark
it as renderable (on A7XX E5B9G9R9 is renderable format).

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30270>
2024-08-16 10:38:38 +00:00
Danylo Piliaiev
21511c02a3 tu/a7xx: Use generic clear for CmdClearAttachments
We don't handle conditional rendering or secondary cmdbuf,
it would require cs patching and seem to be rather rare case.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30270>
2024-08-16 10:38:38 +00:00
Danylo Piliaiev
b88b076870 tu/a7xx: Use generic clear for LOAD_OP_CLEAR
Aside from being just nicer it does UBWC fast-clear.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30270>
2024-08-16 10:38:37 +00:00
Danylo Piliaiev
49193771f6 freedreno: Clarify RB_BLIT_INFO::TYPE field
It's an enum, not two unconnected bits, with A7XX it's even more clear..

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30270>
2024-08-16 10:38:37 +00:00
Mary Guillemard
c95ef9e323 panvk: Fix NULL deref on model name when device isn't supported
Instead of reproting an VK_ERROR_INCOMPATIBLE_DRIVER we were crashing as
device->model was init after this error check.

Tested on G57 but should work the same on all unsupported arch.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f7f9b3d170 ("panvk: Move to vk_properties")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30686>
2024-08-16 10:28:04 +00:00
David Rosca
6150967888 frontends/va: Parse packed header slice for HEVC TemporalId
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30151>
2024-08-16 08:31:38 +00:00
David Rosca
987e3e0dd5 frontends/va: Get per temporal layer params for HEVC
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30151>
2024-08-16 08:31:38 +00:00
David Rosca
1283f43527 frontends/va: Assert maximum number of temporal layers
There is a hardcoded limit of 4 layers in all structs, so make sure
drivers will not return more.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30151>
2024-08-16 08:31:37 +00:00
David Rosca
384057076a gallium: Change pipe_h265_enc_rate_control to array
Same as other codecs, use 4 as max number of temporal layers.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30151>
2024-08-16 08:31:37 +00:00
Valentine Burley
77f783462a freedreno/ci: Re-enable Adreno 660 for Vulkan pre-merge jobs
This reverts commit 59ee87b606.

Adreno 660 is stable enough now to be re-enabled for pre-merge jobs.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30682>
2024-08-16 07:40:50 +00:00
Valentine Burley
fd631340e3 freedreno/ci: Update expectations for Adreno 660
A lof of these tests were previously fixed, but that was missed due to fractional runs.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30682>
2024-08-16 07:40:50 +00:00
Dave Airlie
b30462535b radv/video: add KHR_video_maintenance1 support
This just adds support for allowing worst case image sizing with no
specified profiles and for using inline queries.

Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30671>
2024-08-16 13:38:03 +10:00
Dave Airlie
fc137ecaca radv/video: handle inline queries for vulkan video encode.
This handles the new inlines queries for VK_KHR_video_maintenance1

(Decode doesn't do queries on AMD at the moment).

Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30671>
2024-08-16 13:35:22 +10:00
Dave Airlie
1b4ae3d7af vulkan/video: handle KHR_video_maintenance1 lack of profile list.
VK_KHR_video_maintenance1 allows no profile in which cases drivers
should just be pessimisitic.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30671>
2024-08-16 13:31:41 +10:00
David Rosca
b48bc87783 radv/video: Add support for 12-bit AV1 decode
Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30551>
2024-08-16 02:41:30 +00:00
David Rosca
4dbb9f5355 vulkan/format: Add VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16
Used for 12-bit AV1.

Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30551>
2024-08-16 02:41:30 +00:00
Timothy Arceri
08b93c841a nir: make static assert more flexible
The static assert used in encode deref modes used the fact there was
less than 16 modes that we wanted to compress as an opportunity to reuse
MODE_ENC_GENERIC_BIT as it just happened to represent 16. However if we
add more than 16 modes i.e need to compress to 6 bits not 5 bits then
MODE_ENC_GENERIC_BIT becomes 32 and the logic in the assert breaks.

Instead we more precisely make sure MODE_ENC_GENERIC_BIT is large
enough to fit all but the last 4 generic modes and that the last 4 modes
defined in the enum are in fact the 4 generic modes.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30654>
2024-08-15 23:02:20 +00:00
Faith Ekstrand
85a70bbc05 nvk: Enable shader bounds checking when nullDescriptor is enabled
Fixes: c9eac89da8 ("nvk: Advertise VK_EXT_robustness2")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30663>
2024-08-15 22:25:13 +00:00
Faith Ekstrand
8445190663 nvk: Plumb the whole vk_pipeline_robustness_state through to nvk_ubo/ssbo_addr_format
Fixes: c9eac89da8 ("nvk: Advertise VK_EXT_robustness2")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30663>
2024-08-15 22:25:13 +00:00
Faith Ekstrand
6ae401aa86 vulkan: Add null descriptor bits to vk_pipeline_robustness_state
Fixes: c9eac89da8 ("nvk: Advertise VK_EXT_robustness2")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30663>
2024-08-15 22:25:13 +00:00
Matt Turner
c437f2e79c nir/tests: Add tests for opt_if_merge
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30629>
2024-08-15 20:34:54 +00:00
Matt Turner
d2e6be94ae nir: Skip opt_if_merge when next_if has block ending in a jump
Similar to commit 6cef804067 ("nir/opt_if: fix opt_if_merge when
destination branch has a jump"), we shouldn't combine if statements when
the second if-then-else has a block that ends in a jump.

This fixes a case where opt_if_merge combines

    if (cond) {
        [then-block-1]
    } else {
        [else-block-1]
    }

    if (cond) {
        [then-block-2]
    } else {
        [else-block-2]
    }

where `then-block-2` or `else-block-2` ends in a jump. The phi nodes
following the control flow will be incorrectly updated to have an input
from a block that is not a predecessor.

Fixes: 4d3f6cb973 ("nir: merge some basic consecutive ifs")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30629>
2024-08-15 20:34:54 +00:00
Ruijing Dong
b9c1fcc59b radeonsi/vcn: qp map IB package sent by default
This is to support QP map enabled and disabled mixed case.
When qp map disabled, it still needs the IB package to tell
VCN engine qp map is not needed.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30665>
2024-08-15 18:16:06 +00:00
Ruijing Dong
ac45948136 frontends/va: reset roi number
reason:
   roi number is an indication to do qp_map in vcn encoder.
   if not resetting this number, the previous roi style
   will be used if not changed, or not used. In the case
   non roi case mixed with roi, the behavior will not be
   expected.

reset roi_num at the beginning of each frame, if application
doesn't send roi map, then roi will be stopped.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30665>
2024-08-15 18:16:06 +00:00
Gurchetan Singh
8485067541 tu: use os_get_total_physical_memory(..)
This is more OS-agnostic.  On Linux, os_get_total_physical_memory(..)
is based on __SC_PHYS_PAGES, which under the hood seems to call
sysinfo:

https://github.com/bminor/glibc/blob/master/sysdeps/unix/sysv/linux/getsysstats.c#L273

As an optimization, perhaps os_get_total_physical_memory(..)
should use sysinfo directly too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30678>
2024-08-15 17:46:37 +00:00
Pavel Ondračka
a1eced7819 mesa: implement GL_FRAMEBUFFER_BLEND query
Right now mesa always returns GL_FULL_SUPPORT, so use the
is_format_supported hook to get the actual info from drivers instead.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30612>
2024-08-15 16:36:17 +00:00
Rhys Perry
aafb49f56b aco: set prefer_remove for gfx9- too
This is a hint that the branch is worth removing. Assume that's the case,
regardless of the gfx level.

fossil-db (vega10):
Totals from 22 (0.03% of 63053) affected shaders:
Instrs: 23927 -> 23856 (-0.30%)
CodeSize: 125096 -> 124812 (-0.23%)
Latency: 138258 -> 137765 (-0.36%)
InvThroughput: 55900 -> 55884 (-0.03%)
Branches: 391 -> 320 (-18.16%)

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/30321>
2024-08-15 16:00:19 +00:00
Rhys Perry
9f1a5645cf aco: completely skip branches if they're never taken
fossil-db (navi21):
Totals from 196 (0.25% of 79395) affected shaders:
Instrs: 101902 -> 101706 (-0.19%)
CodeSize: 576988 -> 576232 (-0.13%)
Latency: 750344 -> 750280 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 119170 -> 119161 (-0.01%)
Branches: 3933 -> 3737 (-4.98%)

fossil-db (vega10):
Totals from 585 (0.93% of 63053) affected shaders:
Instrs: 346877 -> 346292 (-0.17%)
CodeSize: 1810600 -> 1808260 (-0.13%)
Latency: 1817743 -> 1814233 (-0.19%)
InvThroughput: 652142 -> 651944 (-0.03%)
Branches: 5087 -> 4502 (-11.50%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
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/30321>
2024-08-15 16:00:19 +00:00
Rhys Perry
c29d9f1184 aco: only remove branch jumping over SMEM/barrier if it's never taken
SMEM might be an invalid access, and barriers are probably expensive.

fossil-db (navi21):
Totals from 126 (0.16% of 79395) affected shaders:
Instrs: 2764965 -> 2765377 (+0.01%)
CodeSize: 15155348 -> 15156788 (+0.01%)
Latency: 17604293 -> 17604296 (+0.00%)
Branches: 105211 -> 105623 (+0.39%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30321>
2024-08-15 16:00:19 +00:00
Rhys Perry
b934255510 aco: split selection_control_remove into rarely_taken and never_taken
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.1
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30321>
2024-08-15 16:00:18 +00:00
Connor Abbott
c59be8516b Revert "tu/a750: Disable HW binning when there is GS"
This reverts commit 7eb6123e98. The root
cause was actually the bug fixed by the previous commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30675>
2024-08-15 15:27:08 +00:00
Connor Abbott
850f2aab03 ir3, tu: Use a UBO for VS primitive params on a750+
Before we were using direct CP_LOAD_STATE, which is broken with multiple
back-to-back draws. This caused regressions in some DX11 traces when
enabling early preamble. We still need to use indirect CP_LOAD_STATE for
VS params, which are sometimes written by the CP, however for everything
else we should use the new UBO path instead.

Fixes: 76e417ca59 ("turnip,ir3/a750: Implement consts loading via preamble")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30675>
2024-08-15 15:27:08 +00:00
Connor Abbott
4f2b5442a6 tu: Fix off-by-one in UBO CP_LOAD_STATE size
It's one header dword and 5 payload dwords. This was papered over by us
not actually using the UBO path for one of the loads, but that's changed
in the next commit.

Fixes: 76e417ca59 ("turnip,ir3/a750: Implement consts loading via preamble")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30675>
2024-08-15 15:27:08 +00:00
Eric Engestrom
4811632bfe nvk/ci: add vkd3d job on the ga106
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30430>
2024-08-15 15:07:54 +00:00
Eric Engestrom
55dcf66f25 ci/build: drop softpipe from s390x job
Suggested-by: @ajax
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30674>
2024-08-15 14:21:48 +00:00
Eric Engestrom
ef36da7726 ci/build: document @ajax as a stakeholder for s390x
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30674>
2024-08-15 14:21:48 +00:00
Eric Engestrom
a51ae80c19 ci/build: add comment to explain why s390x is useful
And disambiguate with s390 which is dead but is a different thing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30674>
2024-08-15 14:21:48 +00:00
Job Noorman
f448cf90c8 zink/ci: add a618 flake
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
72bb4d79dc ir3/legalize: handle scalar ALU WAR hazards for a0.x
It turns out that mova executes on the normal pipeline, which means that
users of a0.x on the scalar pipeline might cause a WAR hazard with mova.

Fixes: 876c5396a7 ("ir3: Add support for "scalar ALU"")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
dead168200 ir3: make fullsync sync after shared writes
fullsync would only sync after cat4/5/6 instructions. However, since the
introduction of scalar ALU, we also need to sync after writes to shared
registers. This commit fixes this by using the is_ss/sy_producer
helpers. This should also catch all cases where (ss) is need for WAR
hazards.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
2e40dda3cd ir3/ci: remove fixed tests from a307-fails
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
83b55a7d7c ir3: use correct bit size for bools in emit_alu
The special case for 32b bools on pre-a5xx gens was not taken into
account everywhere.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
cf395d1437 ir3: use rpt instructions for frag coord
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
6e6b338f33 ir3: add support for rpt bary.f/flat.b
These can be repeated like other instructions with one interesting
wrinkle: their immediate input location can also be repeated and its
value gets incremented by one for every repeat. They seem to be the only
instructions to support this.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
4a6d48cf4c ir3: enable load/store_const_ir3 vectorization
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
9998b65695 nir/load_store_vectorize: add load/store_const_ir3
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
db2859cb7f nir/load_store_vectorize: support stores without wrmask
Some store intrinsics (e.g., store_const_ir3) don't have a wrmask so
don't assume it always exists.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
97aefc4405 nir/load_store_vectorize: support non-byte offset
Some load/store intrinsics (e.g., load/store_const_ir3) use offsets in
units other than bytes. Currently, byte offsets were assumed in multiple
places.

This patch adds a new offset_scale field to intrinsic_info and uses it
were needed.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
fbd2c80671 ir3: rename @store_uniform_ir3 to @store_const_ir3
Uniforms are a legacy thing and this intrinsic was only used to store to
the const file so the new naming is less confusing.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
e0bad1dd20 ir3: replace @load_uniform by new @load_const_ir3 intrinsic
Uniforms are a legacy thing and this intrinsic was only used to load
from const registers so the new naming is less confusing.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
94c49b2cc3 ir3: add support for vectorized NIR phi nodes
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
6b611dbe79 nir/opt_vectorize: add support for phi nodes
Phi nodes are mostly handled the same way as ALU instructions: if all
sources point to the same def (which happens if they are scalar or have
been previously vectorized), combine them into a single vectorized phi
node.

There is one case where this doesn't work, however: sources that come
from a loop back-edge. Since their defs haven't been processed yet, they
are generally not the same. We could simply refuse to vectorize such
phi nodes but this could leave many values used in loops unnecessarily
scalarized.

Instead, this patch implements a simple heuristic: if all defs coming
from a back-edge have the same instructions type and, in case of ALU,
the same operation, assume they will be vectorized later. Since we
require that normal edges are vectorized already, chances are that the
back-edge can also be vectorized.

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/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
79eb57de93 nir/opt_vectorize: process blocks in source-code order
To handle phi nodes, it's important that all sources have been processed
before processing the phi node itself. The current traversal order
(depth-first on dom_children) does not guarantee this. This patch
rewrites the pass to visit blocks in source-code order.

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/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
b451575989 nir/opt_vectorize: prepare for multiple try_combine functions
Dispatch to different functions inside instr_try_combine. To prepare for
upcoming support for phi nodes.

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/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
e2cb646148 nir/opt_vectorize: move rewriting of uses to a function
Will be shared with upcoming support for phi nodes.

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/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
58d18bc7a8 ir3: lower vectorized NIR instructions
Use the new repeat group builders to lower vectorized NIR instructions.
Add NIR pass to vectorize NIR before lowering.

Support for repeated instruction is added over a number of different
commits. Here's how they all tie together:

ir3 is a scalar architecture and as such most instructions cannot be
vectorized. However, many instructions support the (rptN) modifier that
allows us to mimic vector instructions. Whenever an instruction has the
(rptN) modifier set it will execute N more times, incrementing its
destination register for each repetition. Additionally, source registers
with the (r) flag set will also be incremented.

For example:

(rpt1)add.f r0.x, (r)r1.x, r2.x

is the same as:

add.f r0.x, r1.x, r2.x
add.f r0.y, r1.y, r2.x

The main benefit of using repeated instructions is a reduction in code
size. Since every iteration is still executed as a scalar instruction,
there's no direct benefit in terms of runtime. The only exception seems
to be for 3-source instructions pre-a7xx: if one of the sources is
constant (i.e., without the (r) flag), a repeated instruction executes
faster than the equivalent expanded sequence. Presumably, this is
because the ALU only has 2 register read ports. I have not been able to
measure this difference on a7xx though.

Support for repeated instructions consists of two parts. First, we need
to make sure NIR is (mostly) vectorized when translating to ir3. I have
not been able to find a way to keep NIR vectorized all the way and still
generate decent code. Therefore, I have taken the approach of
vectorizing the (scalarized) NIR right before translating it to ir3.

Secondly, ir3 needs to be adapted to ingest vectorized NIR and translate
it to repeated instructions. To this end, I have introduced the concept
of "repeat groups" to ir3. A repeat group is a group of instructions
that were produced from a vectorized NIR operation and linked together.
They are, however, still separate scalar instructions until quite late.

More concretely:
1. Instruction emission: for every vectorized NIR operation, emit
   separate scalar instructions for its components and link them
   together in a repeat group. For every instruction builder ir3_X, a
   new repeat builder ir3_X_rpt has been added to facilitate this.
2. Optimization passes: for now, repeat groups are completely ignored by
   optimizations.
3. Pre-RA: clean up repeat groups that can never be merged into an
   actual rptN instruction (e.g., because their instructions are not
   consecutive anymore). This ensures no useless merge sets will be
   created in the next step.
4. RA: create merge sets for the sources and defs of the instructions in
   repeat groups. This way, RA will try to allocate consecutive
   registers for them. This will not be forced though because we prefer
   to split-up repeat groups over creating movs to reorder registers.
5. Post-RA: create actual rptN instructions for repeat groups where the
   allocated registers allow it.

The idea for step 2 is that we prefer that any potential optimizations
take precedence over creating rptN instructions as the latter will only
yield a code size benefit. However, it might be interesting to
investigate if we could make some optimizations repeat aware. For
example, the scheduler could try to schedule instructions of a repeat
group together.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
4c4366179b ir3: add post-RA pass to merge repeat groups into rptN instructions
For repeat groups where the register assignment allows it, merge them
into a single rptN instruction.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
c510b83a4d ir3: add pre-RA pass to clean up repeat groups
Clean up repeat groups that can never be merged into an actual rptN
instruction (e.g., because their instructions are not consecutive
anymore). This ensures no useless merge sets will be created for RA.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
4fcee235a6 ir3: make RA aware of repeat groups
Create merge sets for the sources and defs of the instructions in repeat
groups. This way, RA will try to allocate consecutive registers for
them. This will not be forced though because we prefer to split-up
repeat groups over creating movs to reorder registers.

When choosing a register for a repeat group's merge set, if its merge
set is unique (i.e., only used for these repeated instructions), try to
first allocate one of their sources (for the same reason as for ALU/SFU
instructions). This also prevents us from allocating a new register
range for this merge set when the one from a source could be reused.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
a5b03fc316 ir3: add builders for repeated instructions
For every instruction builder ir3_X, this patch adds new repeat builder
ir3_X_rpt to create a repeated version of an instruction.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
6aea957948 ir3: add backend support for repeated instructions
In order to represent repeated instructions (rptN) in ir3, this patch
introduces the concept of "repeat groups". A repeat group is a group of
instructions that were produced from a vectorized NIR operation and
linked together. They are, however, still separate scalar instructions.

Repeat groups are created by linking together multiple instructions
using a new rpt_node list. This patch adds this list as well as a number
of helper functions the can be used to create and manipulate repeat
groups.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
849005a471 ir3: print (sat) modifier of instructions
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
cd171964a6 ir3: add debug option to expand rpt instructions
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
ef162f9a6f ir3: correctly count vectorized instructions for tex prefetch
The tex prefetch heuristic simply counts the number of NIR instructions.
Since a vectorized NIR instruction expands to an ir3 instruction per
component, we have to take this into account while counting them.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
fe09ea29b9 ir3: fix counting of repeated registers
(r) registers also have their wrmask set so the instruction's rpt field
should not be taken into account.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:27 +00:00
Job Noorman
ddb0f5f4e6 ir3: fix wrong dstn used in postsched
Fixes: 750e6843c0 ("ir3: Rewrite postsched dependency handling")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:26 +00:00
Job Noorman
28d2a27030 ir3: fix clearing merge sets after shared RA
After spilling during regular RA, merge sets need to be fixed up. To
find all merge sets, fixup_merge_sets used ra_foreach_dst. However,
after shared RA has run, shared dsts wouldn't have the IR3_REG_SSA flag
set anymore leaving their merge sets lingering. This patch fixes this by
using foreach_dst instead.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:26 +00:00
Job Noorman
9013e11d8c ir3: update merge set affinity in shared RA
The preferred register for merge sets was not updated after allocating
one. This caused a new merge set to be allocated for every register it
contains. This patch fixes this by reusing the update function from the
standard RA.

Fixes: fa22b0901a ("ir3/ra: Add specialized shared register RA/spilling")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28341>
2024-08-15 12:07:26 +00:00
Connor Abbott
de1d36d054 ci: Uprev VK-CTS to 1.3.9.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29766>
2024-08-15 09:01:26 +00:00
Connor Abbott
bc1521e601 ci: Move two failing loader-related tests to all-skips.txt
There's no value testing these tests in CI until the loader is upgraded,
so don't force every driver to add them to their fails list.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29766>
2024-08-15 09:01:26 +00:00
Connor Abbott
f146c1d562 freedreno/ci: Combine and document failures due to test bug
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29766>
2024-08-15 09:01:26 +00:00
Pavel Ondračka
a1a06f386e r300: fix RGB10_A2 CONSTANT_COLOR blending
Just reverse the color order the same way we do for RGBA8.

Fixes: 910bac63df
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30656>
2024-08-15 07:02:44 +00:00
David Rosca
4b60918138 radeonsi: Don't allow DCC for encode in is_video_target_buffer_supported
This accidentally allowed DCC with format conversion, which is not supported.
Also disable EFC with VCN5 for now.

Fixes: 40c3a53fec ("radeonsi: Implement is_video_target_buffer_supported")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30562>
2024-08-15 06:26:16 +00:00
David Rosca
79ce0e3b2f frontends/va: Fix use after free with EFC
This happens when the source surface is destroyed before being used
in encoding operation. It also needs to disable EFC in this case.

Fixes: a7469a9ffd ("frontends/va: Rework EFC logic")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11653
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30562>
2024-08-15 06:26:16 +00:00
Eric Engestrom
1f34eb527c ci/build: reuse alpine llvm version to make sure it stays coherent
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30657>
2024-08-15 02:17:44 +00:00
Eric Engestrom
34aba675aa ci/container: define LLVM_VERSION in the alpine container job
Instead of allowing defining it in the job, but then not doing that.

The alternative being to delete only the dead `${LLVM_VERSION:=` and `}`
parts, but this way allows for the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30657>
2024-08-15 02:17:44 +00:00
Caio Oliveira
2150bc6d80 intel/brw: Use %td format for pointer difference
Fixes build for 32-bit, again.

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/30669>
2024-08-14 17:28:41 -07:00
Caio Oliveira
8a44b4812a intel/executor: Use PRIx64 to fix building in 32-bit
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/30668>
2024-08-14 21:41:28 +00:00
Eric Engestrom
ecad4eaeda docs: add sha256sum for 24.1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30667>
2024-08-14 20:48:19 +02:00
Eric Engestrom
3de0b1f7d7 docs: add release notes for 24.1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30667>
2024-08-14 20:30:29 +02:00
Eric Engestrom
409e4b09f7 docs: update calendar for 24.1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30667>
2024-08-14 20:29:56 +02:00
Eric Engestrom
3a0bb4c9fa docs: add sha256sum for 24.2.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30664>
2024-08-14 19:23:38 +02:00
Eric Engestrom
0b3a2a6285 docs: add release notes for 24.2.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30664>
2024-08-14 19:23:37 +02:00
Eric Engestrom
08c34b00df docs: update calendar for 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30664>
2024-08-14 19:09:02 +02:00
Karol Herbst
5d0c870c00 rusticl/mem: do not check against image base alignment for 1Dbuffer images
The CL cap in question is only valid for 2D images created from buffer.

Fixes: 20c90fed5a ("rusticl: added")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30655>
2024-08-14 15:33:01 +00:00
WANG Xuerui
cc2dbb8ea5 meson: Additionally probe -mtls-dialect=desc for TLSDESC support
Previously only `-mtls-dialect=gnu2` was probed, which was appropriate
for arm, x86 and x86_64, but not for newer architectures such as
aarch64, loongarch64 and riscv64 which all use `-mtls-dialect=desc`
instead. Because the driver option is not consistent across
architectures (and probably will not), try both variants and choose the
first one working.

While at it, rename "gnu2_*" variables to "tlsdesc_*" respectively, for
clarity.

Cc: mesa-stable
Reviewed-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Yukari Chiba <i@0x7f.cc>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: WANG Xuerui <git@xen0n.name>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30599>
2024-08-14 14:47:40 +00:00
WANG Xuerui
56f38672a2 meson: Force use of LLVM ORCJIT for hosts without MCJIT support
Although the ORCJIT codepath is fresh and relatively less tested, this
is still better than no llvmpipe at all for those newer architectures
that will not gain MCJIT support, such as LoongArch or RISC-V.

Fixes: 6f02ec5ed1 ("llvmpipe: add an implementation with llvm orcjit")
Reviewed-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Yukari Chiba <i@0x7f.cc>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: WANG Xuerui <git@xen0n.name>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30599>
2024-08-14 14:47:40 +00:00
Hans-Kristian Arntzen
5a97916fdc wsi/x11: Bump maximum number of outstanding COMPLETE events.
Fixes a "regression" where comically large FPS tests regressed.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 19dba854 ("wsi/x11: Rewrite implementation to always use threads.")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30638>
2024-08-14 14:00:03 +00:00
David Rosca
214b6c3040 radeonsi/vcn: Only insert headers when requested for H264/5
Currently sequence headers (VPS, SPS, PPS) are always inserted
on each IDR frame and AUD is inserted on every frame, but this
should be decided by application what headers it wants.
AUD is optional and is almost never needed, in some cases sequence
headers also are not needed each IDR frame and currently this only
wastes bits.
With FFmpeg/GStreamer this changes AUD to not be inserted by default,
there is no change to sequence headers as those are already requested
to be inserted on each IDR.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30585>
2024-08-14 13:26:03 +00:00
David Rosca
c9ccce5271 frontends/omx: Request SPS PPS for IDR pictures
Also request AUD every frame to match old behavior.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30585>
2024-08-14 13:26:03 +00:00
David Rosca
31f6fe1356 frontends/va: Keep track if VPS/SPS/PPS/AUD was sent
FFmpeg sends AUD as part of VA_ENC_PACKED_HEADER_SEQUENCE and
VA_ENC_PACKED_HEADER_SLICE.
GStreamer sends it separately as VA_ENC_PACKED_HEADER_RAW_DATA.

It's now also needed to keep track what packed headers were enabled
to include VPS/SPS/PPS with VAEncSequenceParameterBuffer when sequence
packed headers are disabled.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30585>
2024-08-14 13:26:02 +00:00
David Rosca
ba1bc7c495 frontends/va: Don't check header type for packed header buffers
Applications should not send types that were not enabled when creating
config and even if they do it will not cause any unexpected issues.
Remove the checks as it is another place that would need to be
updated when adding support for new packed header types.

Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30585>
2024-08-14 13:26:02 +00:00
David Rosca
f8dcf15ed2 gallium: Add header_flags to pipe_h2645_enc_picture_desc
Indicates what headers should be inserted.
Move pipe_h265_enc_picture_desc metadata_flags into header_flags

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30585>
2024-08-14 13:26:02 +00:00
Tapani Pälli
a43f18dd04 intel/dev: update mesa_defs.json from workaround database
Most importantly this enables 18038825448 for LNL.

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/30639>
2024-08-14 11:20:40 +00:00
Icenowy Zheng
e9fe18727e pvr: emit tpu_tag_cdm_ctrl in compute stream when present
An extra control register word, tpu_tag_cdm_ctrl, will be present when
TPU_DM_GLOBAL_REGISTERS feature is present.

Emit it when it's needed.

The document of this register is available, however I don't think any of
the bits are needed to be set for our current feature set, so just emit
0 now.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30552>
2024-08-14 18:07:41 +08:00
Icenowy Zheng
19bf1b661b pvr: add tpu_dm_global_registers feature
This corresponds to the RGX_FEATURE_TPU_DM_GLOBAL_REGISTERS in the DDK
kernel module source code, and will introduce one more control word to
compute command streams.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30552>
2024-08-14 18:07:24 +08:00
Icenowy Zheng
c6dafb5c1a pvr: enlarge transfer fw_stream buffer for multicore
The currently allocated transfer fw_stream buffer lacks the space for a
field that exists conditionally for multicore GPUs, frag_screen.

Enlarge the transfer fw_stream buffer for this field.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30543>
2024-08-14 09:48:38 +00:00
Antonio Ospite
2d2bc5b307 android: simplify building libgallium_dri on Android
The versioned libgallium library can be confusing on Android, and it is
probably not even needed there, so simplify the build on Android by
always build the unversioned `libgallium_dri.so` overriding the
`-Dunversion-libgallium=true` option added in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30579

Remove also all the bits that deal with the versioned library which are
not needed anymore.

Fixes: 9568976c52 ("android: fix build in multiple ways")
Acked-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30641>
2024-08-14 09:11:44 +00:00
Samuel Pitoiset
cf0884d161 radv/meta: create DGC prepare pipeline on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
3a4ce4a5a3 radv/meta: simplify initializing bufimage pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
586d6cb588 radv/meta: create cleari layouts on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
1dfb6e19d5 radv/meta: create itoi layouts on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
bd00446bb0 radv/meta: create btoi layouts on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
f1b8e7fa73 radv/meta: create itob layouts on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
db94ee1e64 radv/meta: create blit2d layouts on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
2352cb2244 radv/meta: remove unused parameter from some blit init functions
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
eabbd077cc radv/meta: simplify initializing DCC comp-to-single pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
9c591d0c27 radv/meta: rework creating blit pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:53 +00:00
Samuel Pitoiset
978599a052 radv/meta: simplify radv_meta_blit2d_normal_dst()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30640>
2024-08-14 08:48:52 +00:00
Lucas Stach
c90e2bccf7 etnaviv: properly set PIPE_CAP_GRAPHICS
Only advertise graphics capabilities if the GPU isn't compute only.

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/30606>
2024-08-14 08:35:36 +00:00
Lucas Stach
8725ec90a3 etnaviv: hwdb: add COMPUTE_ONLY cap
Used to tell if the GPU core includes a graphics pipeline.

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/30606>
2024-08-14 08:35:36 +00:00
Daniel Schürmann
1d0a12438d aco/cssa: short-cut some trivial case
If a phi-operand is not flagged as kill, it cannot be coalesced
because it interferes with the live-out variable.
Also do the regClass check earlier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
d3e9aef5a2 aco/cssa: update RegisterDemand and validate live variable information
instead of recomputing it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
5a39cbdef6 aco: change signature of get_live_changes() and get_temp_registers()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
d494c2a741 aco/cssa: fix kill flags during lowering to CSSA
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
541cfb21ba aco: don't attempt to spill dead phis
These don't affect register pressure.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
e5d920e0b9 aco/scheduler: enable live variables validation when ACO_DEBUG=validate-livevars is set
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
b0c8c5e42e aco: implement aco::validate_live_vars()
This is intended for passes which manually update live variables
and RegisterDemand, like e.g. the scheduler, and can be enabled
with ACO_DEBUG=validate-livevars.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:48 +00:00
Daniel Schürmann
c1a3330ac7 aco/reindex_ssa: free memory of previous live variable sets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30182>
2024-08-14 08:11:47 +00:00
Samuel Pitoiset
d776f3d3f9 radv: allow VK_EXT_vertex_input_dynamic_state with DGC
It should be supported now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29831>
2024-08-14 07:47:12 +00:00
Samuel Pitoiset
55b497ef19 radv: add support for dynamic vertex input state with DGC
DGC preprocessing is disabled for VBOs, so the dynamic vertex input
should always be initialized. Null VBO descriptors are slightly
different when used with dynamic VS inputs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29831>
2024-08-14 07:47:12 +00:00
Samuel Pitoiset
d8861d52a2 radv: add a helper to set shader stage key robustness info
For future work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30643>
2024-08-14 07:25:03 +00:00
Samuel Pitoiset
7a5b40a2ff radv: cleanup robustness with vk_pipeline_robustness_state_fill()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30643>
2024-08-14 07:25:03 +00:00
Samuel Pitoiset
cdf21c5ce5 radv: fix handling view index from device index
This feature is marginal but VKCTS recently got coverage and most of
the implementations were broken, including RADV.

Fixes recent tests
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.other.view_index_from_device_index_.*

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30642>
2024-08-14 06:54:03 +00:00
Faith Ekstrand
65f5364e47 ci: Add NVK to debian-arm64-build-test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30618>
2024-08-14 03:45:09 +00:00
Faith Ekstrand
aa44a211d3 nak: Pass -C default-linker-libraries when building tests
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11632
Fixes: 4392a5922c ("nak: Add a framework for running hardware tests")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30618>
2024-08-14 03:45:09 +00:00
Caio Oliveira
e72bf2d02f intel: Add executor tool
Add a tool that programs the hardware the minimum amount to be
able to execute compute shaders and then executes a script that
can perform data manipulation and dispatch execution of the shaders
(written in Xe assembly).

The goal is to have a tool to experiment directly with certain
assembly instructions and the shared units without having to
instrument the drivers.

To make more convenient to write assembly, a few macros (indicated by
the @-symbol) will be processed into the full instruction.

For example, the script

```
  local r = execute {
    data={ [42] = 0x100 },
    src=[[
      @mov     g1      42
      @read    g2      g1

      @id      g3

      add(8)   g4<1>UD  g2<8,8,1>UD  g3<8,8,1>UD  { align1 @1 1Q };

      @write   g3       g4
      @eot
    ]]
  }

  dump(r, 4)
```

produces

```
  [0x00000000] 0x00000100 0x00000101 0x00000102 0x00000103
```

There's a help message inside the code that describes the script
environment and the macros for assembly sources.

Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30062>
2024-08-14 03:03:46 +00:00
Caio Oliveira
6267585778 intel/brw: Also return the size of the assembled shader
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30062>
2024-08-14 03:03:46 +00:00
Caio Oliveira
f6e7d1dca2 meson: Update Lua dependency version to 5.3
Lua is used for unittests in Freedreno.  When this was added, 5.3 was too new,
now this version is available in debian stable (and oldstable). A notable
improvement in Lua 5.3 is better handling for integers. Note the wrap provided
in subprojects/ already uses 5.4.

Also move the dependency up so other tools/tests can use it.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30062>
2024-08-14 03:03:46 +00:00
Rob Clark
a5b103e4c1 freedreno/a6xx: Cleanup setup_slices()
We don't need to runtime dispatch btwn a6xx and a7xx versions of
setup_lrz().

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30649>
2024-08-14 02:19:55 +00:00
Rob Clark
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/30649>
2024-08-14 02:19:55 +00:00
Rob Clark
141466eb27 freedreno/a6xx: Fix LRZ
LRZ fastclear offset can be greater than 16b.

Fixes: b1937f76ff ("freedreno/a6xx: Allocate lrcfc when needed for direction tracking")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30649>
2024-08-14 02:19:55 +00:00
Rob Clark
4a59c319dc freedreno/decode: Dump register values on LRZ_CLEAR
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30649>
2024-08-14 02:19:55 +00:00
Alyssa Rosenzweig
639d69f7e6 pan/mdg: convert to derivative intrinsics
strictly I think there's a bug fix here. I don't see the old code handling
swizzles anywhere!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30567>
2024-08-14 01:34:54 +00:00
Alyssa Rosenzweig
749205fe06 pan/bi: switch to derivative intrinsics
rewrote most of the impl but shrug.

regresses code gen for mediump but I'm not too bothered given the lackluster
perf of fp16 on bifrost :(

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/30567>
2024-08-14 01:34:54 +00:00
Paulo Zanoni
20c19351b1 anv: be consistent regarding non-render engines on i915.ko
Today, on i915.ko, if Sparse Resources is disabled and the Kernel is
new enough to confirm to us that the GuC version is good, we'll expose
non-render engines, otherwise we don't.

Ever since we merged 5ca224aa0c ("anv/trtt: make all contexts have
the same TR-TT programming"), TR-TT is not anymore the reason why
we're not enabling non-render engines. Our performance team has
analyzed workloads and concluded enabling non-render engines is not
worth it on i915.ko today.

So here we adjust the code to do three things:
 - Stop blaming TR-TT
 - Unify the default behavior for i915.ko
 - Don't disable non-render engines when TR-TT is being used on xe.ko.

v2:
- Comments (José)

Acked-by: Felix DeGrood <felix.j.degrood@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30627>
2024-08-14 01:09:19 +00:00
Thomas H.P. Andersen
5f366bf822 docs: update for new extensions in nvk
Mark as implemented on nvk:
* VK_EXT_descriptor_buffer
* VK_EXT_post_depth_coverage

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30628>
2024-08-13 23:37:16 +00:00
Christian Gmeiner
e05962a4e7 etnaviv: Drop halti from etna_specs
Use the one from etna_core_info instead.

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/30394>
2024-08-13 22:15:22 +00:00
Christian Gmeiner
6e0a28db2e etnaviv: Extend shader structs with etna_core_info
Prep step to drop halti from etna_specs.

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/30394>
2024-08-13 22:15:22 +00:00
Christian Gmeiner
6d673a3ac7 etnaviv: Switch etna_compiler_create(..) to etna_core_info
Prep step to drop halti from etna_specs.

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/30394>
2024-08-13 22:15:22 +00:00
Christian Gmeiner
ce2fc866ec etnaviv: Move halti determination to drm
The ideal place to store the halti value is in struct etna_core_info.
Let's put it there and the determination of it into etna_gpu_new(..).
This makes it possible to reuse the halti level outside of gallium.

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/30394>
2024-08-13 22:15:22 +00:00
Michael Cheng
0324d4bcf5 anv: move trace logic to batch_emit_pipe_control_write
Move trace logic from cmd_buffer_apply_pipe_flushes down to
genX(batch_emit_pipe_control_write).

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30623>
2024-08-13 21:42:43 +00:00
José Roberto de Souza
d8597dce63 docs/anv: Remove documentation about INTEL_COMPUTE_CLASS and INTEL_COPY_CLASS
Those were renamed in commit fe2982278f and documentation was not
updated and new parameters were just removed, so lets drop it from
documentation.

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/30593>
2024-08-13 21:15:31 +00:00
José Roberto de Souza
600d88ab3c intel: Remove INTEL_ENGINE_CLASS_COMPUTE and INTEL_ENGINE_CLASS_COPY parameters
It has been a while that the GuC version with the compute engine fix
was released, same for the KMD uAPI to query the GuC firmware version.
So at this point this parameters do more harm than good.

Also just setting those don't enable the async compute and copy engines
this is not enabled by default on i915.

If user wants to disable or enable usage of those engines a better
approach would be use ANV_QUEUE_OVERRIDE.

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/30593>
2024-08-13 21:15:31 +00:00
José Roberto de Souza
61e3a680a4 anv: Extend ANV_QUEUE_OVERRIDE to blit count
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/30593>
2024-08-13 21:15:31 +00:00
José Roberto de Souza
2e4179b4a7 docs/anv: Document ANV_SPARSE and ANV_SPARSE_USE_TRTT
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/30593>
2024-08-13 21:15:31 +00:00
José Roberto de Souza
92f4008473 anv: Disable sparse even on Xe KMD with ANV_SPARSE
ANV_SPARSE had no effect on Xe KMD.

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/30593>
2024-08-13 21:15:31 +00:00
José Roberto de Souza
4f746ad26c docs: Move all ANV environment variables to a single section in envvars
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/30593>
2024-08-13 21:15:30 +00:00
Matt Turner
05dc4eb536 util: Force emission of stack frame in stack unit test
The `capture_not_overwritten` unit test captures and compares two
backtraces -- one from inside a call to `func_c` and one outside -- and
confirms that they are not identical. That is, that `func_c` is in the
backtrace.

On 32-bit x86, without `-fno-omit-frame-pointer`, the function will not
emit a stack frame. As a result, the unit test fails.

The fix is to compile `func_c` with the flag `-fno-omit-frame-pointer`
to prevent the compiler from optimizing out the stack frame which is
otherwise unneeded.

Bug: https://bugs.gentoo.org/823774
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091
Fixes: d0d14f3f64 ("util: Add unit test for stack backtrace caputure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30622>
2024-08-13 20:35:23 +00:00
Matt Turner
b3430a7bb8 util: Add ATTRIBUTE_OPTIMIZE(flags)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30622>
2024-08-13 20:35:23 +00:00
Sagar Ghuge
83c2524124 intel/compiler: Adjust trace ray control field on Xe2
Bspec 64643: Structure_TraceRayPayload::Trace Ray Control

Bit field moved from 9-8 to 10-8 on Xe2.

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/30600>
2024-08-13 20:02:24 +00:00
Sagar Ghuge
c3c62e493f intel/compiler: Ray query requires write-back register
Bspec 57508: Structure_SIMD16TraceRayMessage:: RayQuery Enable

   "When this bit is set in the header, Trace Ray Message behaves like a
   Ray Query. This message requires a write-back message indicating
   RayQuery for all valid Rays (SIMD lanes) have completed."

If we don't pass the write-back register, somehow it was stepping on
over R0 register and can mess up the scratch space accesses which could
potentially lead to GPU hang. It can be noticed while running it under
simulator trace.

send.rta (16|M0)         null     r124  r126:1  0x0            0x02000100           {$15} // wr:1+1, rd:0; simd16 trace ray
R0 = 00000001 00000000 00000000 00000001 00000000 00000000 00000001 00000000 00000000 00000001 00000000 00000000 00000001 00000000 00000000 00000001

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30600>
2024-08-13 20:02:24 +00:00
Collabora's Gfx CI Team
13a427a153 Uprev Piglit to 1d8fab9b49cc487ebcc949119eeb166fb3fa7591
f11abb664b...1d8fab9b49

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30635>
2024-08-13 16:56:36 +00:00
Mike Blumenkrantz
a7f64c6203 zink: fix partial update handling
* the damage region was not being used correctly (this is a normal rect)
* use_damage was never unset at frame boundary
* original renderArea was never re-set

Fixes: 3d38c9597f ("zink: hook up KHR_partial_update")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30625>
2024-08-13 15:26:27 +00:00
Job Noorman
2260a4bbba ir3: fix spill/reload split src/dst regs
When splitting spills/reloads into to multiple separate spills/reloads,
the src/dst registers where not adjusted. This caused the separate
instructions too all refer to the same register.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30613>
2024-08-13 14:59:23 +00:00
Samuel Pitoiset
092b0ecc2e ci: add GFX1150 support to radv-fossils
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30620>
2024-08-13 13:17:17 +00:00
Samuel Pitoiset
99b12b2a65 amd/drm-shim: add GFX1150 support
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30620>
2024-08-13 13:17:17 +00:00
Samuel Pitoiset
2b3cf188de amd/drm-shim: add missing GC_11_5_0 family
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30620>
2024-08-13 13:17:17 +00:00
Alyssa Rosenzweig
fd63356268 r300: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30572>
2024-08-13 12:45:12 +00:00
Alyssa Rosenzweig
772e6d61b9 ntt: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30572>
2024-08-13 12:45:12 +00:00
Pavel Ondračka
9966365fe0 ttn: switch to derivative intrinsics
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30572>
2024-08-13 12:45:12 +00:00
Alyssa Rosenzweig
5f437aa24d elk: fix compute shader derivatives
derivatives are not fs only so move to be with the rest of subgroup ops.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11674
Signed-off-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/30634>
2024-08-13 12:19:30 +00:00
Iago Toral Quiroga
ad9ff707ce broadcom: drop backend implementation of nir_op_ufind_msb
We can have NIR do this for us now that we have uclz.

Suggested by Georg Lehmann.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30614>
2024-08-13 13:16:18 +02:00
Iago Toral Quiroga
35a10f5d5a broadcom: implement nir_op_uclz
This enables some algebraic optimizations.

No changes in shader-db, but it does cause some CTS tests to
produce less instructions.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30614>
2024-08-13 13:16:11 +02:00
Lionel Landwerlin
aaff191356 brw/rt: fix ray_object_(direction|origin) for closest-hit shaders
When closest hit shader is called, the BVH object level
brw_nir_rt_load_mem_ray origin/direction is 0. What we should be using
is the ray origin/direction and apply the transform of the current
instance.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9ba7d459a3 ("intel/rt: Implement the new ray-tracing system values")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30578>
2024-08-13 10:28:50 +00:00
Karol Herbst
7935623126 rusticl/kernel: simplify adding internal kernel args
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
d72cc037f2 rusticl/kernel: move CompiledKernelArg decleration above the impl block
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
24ea5a756c rusticl/kernel: add KernelArgType::is_opaque
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
d26d17bbaf rusticl/kernel: big kernel arg rework
The main change here is that instead of having two vectors for API and
internal arguments, there is just one per built kernel.

Some of the API level information is still in its own structure and
referenced by the above mentioned merged vector, but with this change each
device and also each kernel variant can have arguments placed at different
locations or even have a different set of arguments.

This rework will be necessary to add kernel variants in a non messy way.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
0b98e47d83 rusticl/kernel: move serialization code of KernelArgType
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
2645ba6942 rusticl/kernel: rename InternalKernelArgType to CompiledKernelArgType
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
3cc3ba2e8f rusticl/kernel: make KernelArg::offset and KernelArg::binding proper u32 values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
b142bee150 rusticl/kernel: make CompiledKernelArg::offset a u32
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
e69ad5ff69 rusticl/kernel: remove CompiledKernelArg::size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
3ddc2b536d rusticl/kernel: rename InternalKernelArg to CompiledKernelArg
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
16a2808299 rusticl/kernel: move kernel size into Constant arg type
It's the only argument type with an actual size.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Karol Herbst
0cfcd2ff83 rusticl/memory: fix sampler argument size check
Not entirely sure why this hasn't caused any problems...

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30602>
2024-08-13 10:07:03 +00:00
Pavel Ondračka
1cad339409 r300: bias presubtract fix
We need to double check that the source is indeed constant before
looking at the constant type.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Fixes: 0508db9155
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29893>
2024-08-13 08:52:45 +00:00
Samuel Pitoiset
5d367aba7b radv: stop re-initializing HTILE for non-compressed to compressed transitions
Decompressing HTILE should also reset the HTILE metadata to initial
state which means that re-initializing it for non-compressed to
compressed transitions is redundant.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30122>
2024-08-13 06:16:03 +00:00
Alyssa Rosenzweig
f690592692 agx: lower exact frcp
the hardware is off by 1 ULP. fixes nir_lower_idiv brokenness.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 19:11:23 -04:00
Alyssa Rosenzweig
6405153a07 asahi: switch to block based compute blitter
This fixes the compute blitter with compression in the general case, and then
flips the switch since the compute blitter is faster / less buggy than the
traditional path.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 19:11:23 -04:00
Alyssa Rosenzweig
94cf7de88f asahi: pack imageblock words for compute
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 19:11:23 -04:00
Alyssa Rosenzweig
e3e82f7a6c agx: add a comment about an unknown bit
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 19:11:23 -04:00
Alyssa Rosenzweig
8b29f0a762 agx: handle explicit coordinate tib instructions
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 19:11:23 -04:00
Alyssa Rosenzweig
f706079dc5 agx: allow st_tile in compute shaders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 19:11:23 -04:00
Alyssa Rosenzweig
9b39c5427f agx: plumb imageblock stride
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 19:11:23 -04:00
Alyssa Rosenzweig
b9eff53daa nir: add image_block_size_per_thread_agx info
This is like shared_size but for spatial data instead, for compute shaders that
use the tilebuffer.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 19:11:23 -04:00
Alyssa Rosenzweig
e754e54f88 nir: model AGX explicit coordinate intrinsics
I don't know what Apple calls these, so we're using the name "explicit
coordinates".

AGX has instructions for loading/stores register <---> tilebuffer ---> storage
images. Usually these are used in the fragment shader and end-of-tile shader to
implement colour attachments, with implicitly specified coordinates based on the
shader stage. However they can also be used in compute shaders with explicitly
specified coordinates ("imageblocks" in Apple parlance). Model this in NIR.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
290820e8b0 agx: fix block_image_store indirect ts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
7de5d51f16 hk: advertise KHR_sampler_ycbcr_conversion
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
001a9e20c4 hk: denouveau
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
c50e0934e7 agx: let if-fusing opts interact
total instructions in shared programs: 2115031 -> 2114800 (-0.01%)
instructions in affected programs: 46937 -> 46706 (-0.49%)
helped: 147
HURT: 30
Instructions are helped.

total alu in shared programs: 1669893 -> 1669655 (-0.01%)
alu in affected programs: 38134 -> 37896 (-0.62%)
helped: 147
HURT: 28
Alu are helped.

total fscib in shared programs: 1666017 -> 1665779 (-0.01%)
fscib in affected programs: 38134 -> 37896 (-0.62%)
helped: 147
HURT: 28
Fscib are helped.

total bytes in shared programs: 14059380 -> 14057364 (-0.01%)
bytes in affected programs: 306294 -> 304278 (-0.66%)
helped: 147
HURT: 28
Bytes are helped.

total regs in shared programs: 656483 -> 656491 (<.01%)
regs in affected programs: 257 -> 265 (3.11%)
helped: 3
HURT: 4
Inconclusive result (value mean confidence interval includes 0).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
64239ac12c agx: fuse not into if
total instructions in shared programs: 2115466 -> 2115031 (-0.02%)
instructions in affected programs: 68776 -> 68341 (-0.63%)
helped: 222
HURT: 5
Instructions are helped.

total alu in shared programs: 1670328 -> 1669893 (-0.03%)
alu in affected programs: 54224 -> 53789 (-0.80%)
helped: 222
HURT: 5
Alu are helped.

total fscib in shared programs: 1666452 -> 1666017 (-0.03%)
fscib in affected programs: 54224 -> 53789 (-0.80%)
helped: 222
HURT: 5
Fscib are helped.

total bytes in shared programs: 14061990 -> 14059380 (-0.02%)
bytes in affected programs: 458702 -> 456092 (-0.57%)
helped: 222
HURT: 5
Bytes are helped.

total regs in shared programs: 656515 -> 656483 (<.01%)
regs in affected programs: 432 -> 400 (-7.41%)
helped: 7
HURT: 1
Inconclusive result (value mean confidence interval includes 0).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
2b1859cd06 agx: tweak jmp_exec_none heuristic
to make sure border colour code is skipped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
339a1a4d73 hk: advertise more eds features
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
d512709eea hk: advertise shaderResourceMinLod
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
907fe00da1 agx: handle min_lod sources
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
03830c9523 agx: optimize popcount(ballot(true))
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
431a176287 hk: fix vkd3d-proton descriptor-performance
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
1d5c2f56d8 hk: implement drawIndirectCount
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
a6d7991475 libagx: add drawIndirectCount clone&patch kernel
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:46:31 -04:00
Alyssa Rosenzweig
f04ae930d9 nir,agx: add "active threads in subgroup" intrinsic
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:58 -04:00
Alyssa Rosenzweig
4dbce4a6a3 hk: fix restart index overemit
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:58 -04:00
Alyssa Rosenzweig
765e6ad2fc asahi,hk: generalize bo_bind hook
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:58 -04:00
Alyssa Rosenzweig
01ac52f05c hk: fix BDA alignment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:57 -04:00
Alyssa Rosenzweig
f4cca9d600 asahi: introduce agx_va data structure
prep for sparse.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:45:57 -04:00
Alyssa Rosenzweig
5c7dd392d3 asahi: always pass align parameter for BOs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
7ff31a4bf8 asahi: drop iThing logic
wontfix.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
8dae4aacb4 asahi: stop fixing up USC addresses
use the real VA space.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
77ea124d7e asahi: drop agx_bo::type
macOS silliness.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
1899ea319f asahi: drop mprotect in decoding
now that genxml does our decoding it's not buying us much.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
91257a9bb8 asahi: drop segment list parsing
we're not targeting macOS so this is dead.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
df725d4f64 asahi: remove agx_bo::dev
track at call sites.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
c834758ba7 hk: optimize bounded loads with soft fault
glmark2 -bbuild frametime reduced 3%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
1fd66d3859 asahi: optimize out vbo clamp with soft fault
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
3d18f14328 hk,asahi: pass through soft fault to VBO lower
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
dc3288dcb1 agx: exploit soft fault info
for preambles and for peephole selection.

total instructions in shared programs: 2159359 -> 2114124 (-2.09%)
instructions in affected programs: 359763 -> 314528 (-12.57%)
helped: 814
HURT: 6
Instructions are helped.

total alu in shared programs: 1685059 -> 1670200 (-0.88%)
alu in affected programs: 217210 -> 202351 (-6.84%)
helped: 589
HURT: 45
Alu are helped.

total fscib in shared programs: 1681202 -> 1666324 (-0.88%)
fscib in affected programs: 217477 -> 202599 (-6.84%)
helped: 590
HURT: 45
Fscib are helped.

total ic in shared programs: 460856 -> 455502 (-1.16%)
ic in affected programs: 41350 -> 35996 (-12.95%)
helped: 174
HURT: 8
Ic are helped.

total bytes in shared programs: 14302484 -> 14053982 (-1.74%)
bytes in affected programs: 2380614 -> 2132112 (-10.44%)
helped: 814
HURT: 7
Bytes are helped.

total regs in shared programs: 662302 -> 656517 (-0.87%)
regs in affected programs: 26979 -> 21194 (-21.44%)
helped: 432
HURT: 9
Regs are helped.

total uniforms in shared programs: 1651909 -> 1687077 (2.13%)
uniforms in affected programs: 95383 -> 130551 (36.87%)
helped: 17
HURT: 783
Uniforms are HURT.

total threads in shared programs: 20324608 -> 20326592 (<.01%)
threads in affected programs: 16192 -> 18176 (12.25%)
helped: 17
HURT: 3
Threads are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
f0cd599913 agx: factor out agx_device_key
we will have other device-dependent key members soon.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Alyssa Rosenzweig
d654cc55b5 asahi: fix warning
../src/gallium/drivers/asahi/agx_uniforms.c:60:10: warning: taking address of packed member of ‘struct agx_draw_uniforms’ may result in an unaligned pointer value [-Waddress-of-packed-member]
   60 |          &batch->uniforms.attrib_base[i]);

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Asahi Lina
54cec6ae30 asahi: Do not sync against our own queue
We previously introduced cross-context sync points to make ordering work
with multiple queues. Unfortunately, that also adds a CPU round trip in
the kernel when a single context flushes and then keeps submitting,
since it introduces a sync against itself. That's pointless.

To fix this without introducing races, on flush, we check the previous sync
point. If it's foreign, we record it, and we also keep track of our last
local sync point. Then, when waiting, if we're about to wait on our last
flush sync point from our own queue, we instead wait for the foreign
one. A foreign sync after that will cause the equality check to fail and
future submits from this queue to sync against the most up to date
point, and the next flush will then record it as the last known foreign
sync point for this queue (and continue flushing against it until
another foreign queue flushes again).

Fixes glmark2 perf regression (particularly with `build` and similar
high-FPS tests).

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:36:26 -04:00
Asahi Lina
c7994a2955 asahi: Update to UAPI 10011
Incompatible changes:
- Make VM layout more flexible to allow for SVM with rusticl
  (eventually, hopefully)

Compatible changes:
- Expose soft fault state to userspace as a flag

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30633>
2024-08-12 18:35:47 -04:00
Mahmood - Zer0xFF
dd5cce4730 d3d12: Fix Xbox GDK Build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30615>
2024-08-12 22:16:41 +00:00
Sai Teja
9ce9675658 ci: Don't run vulkan jobs for gbm changes
Currently, vulkan doesn't use gbm. So, don't run vulkan
related jobs for gbm changes.

Signed-off-by: Sai Teja <saiteja13427@gmail.com>
Suggested-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30590>
2024-08-12 19:34:58 +00:00
Karol Herbst
4080269845 util/u_printf: do not double print format string with unused arugments
the CL CTS added a new test being printf("\n", "foo"), but we ended up
printing the new line twice. If we can't find a specifier anymore, ignore
the argument as after the loop processing all arguments we'll print the
remaining format string anyway.

Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30574>
2024-08-12 18:49:01 +00:00
Rob Clark
f7830e0c80 freedreno/a6xx: Fix arb_texture_view regression
In particular if src and dst have FD6_UBWC_UNKNOWN_COMPAT we shouldn't
treat them as compatible.

Fixes: beb5577e12 ("freedreno: Extract out common UBWC helper")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11676
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30621>
2024-08-12 17:31:27 +00:00
Valentine Burley
367191ff63 tu: Always report that we can present on kgsl
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8637
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9240
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9365
Fixes: 3e7f6c9aeb ("tu: implement wsi hook to decide if we can present directly on device")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29627>
2024-08-12 16:00:37 +00:00
Valentine Burley
47289ebc8d vulkan/wsi: Refactor can_present_on_device
Make wsi_device_matches_drm_fd() a default helper that PCI based GPUs plug in to
wsi_dev->can_present_on_device. This is needed for devices without libdrm, where
wsi_device_matches_drm_fd was still being called causing an "undefined reference"
build error.

Suggested-by: Rob Clark <robdclark@chromium.org>
Fixes: baa38c144f ("vulkan/wsi: Use VK_EXT_pci_bus_info for DRM fd matching")
Reviewed-by: Mark Collins <mark@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29627>
2024-08-12 16:00:37 +00:00
Thomas H.P. Andersen
37d0cdc36f nak: special case PhiDsts as not uniform
Fixes: ab72be6c5e ("nak,compiler: Move AsSlice to common code")

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30607>
2024-08-12 15:34:50 +00:00
Mike Blumenkrantz
c8c46bf900 egl: fix fd passing on init with zink
this should be passed with gbm but not for any other display type

Fixes: 5ab29555cf ("egl/x11: pass render fd to screen create for zink")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30588>
2024-08-12 14:58:05 +00:00
Mike Blumenkrantz
d120992e1a egl/wayland: bail on zink init in non-sw mode if extension check fails
cc: mesa-stable

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30479>
2024-08-12 13:02:20 +00:00
Icenowy Zheng
4e777bb19b zink: do not expose quad support when no geometry shader
The emulation of quads implemented in Zink utilizes geometry shaders,
but currently the enablement of it is only guarded by the support of
triangle strips.

Add geometry shaders to the condition to enable it either too.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30608>
2024-08-12 12:37:24 +00:00
Sergi Blanch Torne
e5291e1a22 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit 9d0491c12b.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30609>
2024-08-12 11:36:12 +00:00
Georg Lehmann
dedfff9dbf aco: only set latekill in live_var_analysis
Cleaner to have this all in one place, in my opinion.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30368>
2024-08-12 10:31:09 +00:00
Georg Lehmann
510f5e55be aco/gfx10+: set lateKill for sgprs used by wave64 VALU writing a mask
RDNA2 ISA doc, 6.2.4. Wave64 Destination Restrictions:
The first pass of a wave64 VALU instruction may not overwrite a scalar value
used by the second half.

Foz-DB Navi31:
Totals from 5221 (6.58% of 79395) affected shaders:
Instrs: 9751484 -> 9752179 (+0.01%); split: -0.01%, +0.01%
CodeSize: 50624072 -> 50626088 (+0.00%); split: -0.00%, +0.01%
Latency: 85646450 -> 85647419 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 15039160 -> 15039277 (+0.00%); split: -0.00%, +0.00%
VClause: 200275 -> 200204 (-0.04%)
SClause: 248645 -> 248607 (-0.02%); split: -0.03%, +0.01%
Copies: 640802 -> 641413 (+0.10%); split: -0.01%, +0.11%
PreSGPRs: 236297 -> 236735 (+0.19%)
VALU: 5666449 -> 5666440 (-0.00%)
SALU: 967482 -> 968111 (+0.07%); split: -0.01%, +0.07%

Cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30368>
2024-08-12 10:31:09 +00:00
Sergi Blanch Torne
9d0491c12b ci: disable Collabora's farm due to maintenance
Planned downtime in the farm:
* Start: 2024-08-12 07:00 UTC
* End: 2024-08-12 13:00 UTC

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30533>
2024-08-12 06:10:34 +00:00
Timothy Arceri
3da4b5eaa5 glsl: always copy bindless sampler packing constructors to a temp
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11648
Fixes: 3cdcc5f02f ("glsl: implement ARB_bindless_texture conversions")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30586>
2024-08-12 00:39:19 +00:00
Faith Ekstrand
c43d94a853 nvk: Invalidate MME data for descriptor buffers
Our cbuf optimization may pull UBO descriptors straight out of
client-owned descriptor buffers which may have been written from a
compute shader or similar.  We need to stall the command processor if we
ever get a barrier from anything to DESCRIPTOR_BUFFER_READ_BIT.

Fixes: c5b752cea0c9 ("nvk: Advertise VK_EXT_descriptor_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30601>
2024-08-11 09:49:01 -05:00
Konstantin Seurer
2808419f96 gallivm: Skip inactive branches
Improves performance of shaders with a lot of control flow.

Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30347>
2024-08-11 07:19:07 +00:00
Konstantin Seurer
b35ff07fc1 gallivm: Use variables for loop exec mask handling
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30347>
2024-08-11 07:19:07 +00:00
Rob Clark
5f8016f88a tu: Quiet vla warnings
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30452>
2024-08-10 16:25:30 +00:00
Rob Clark
c9fe3e189b freedreno/registers: Deprecate non-variant reg builders
For registers with variants, mark the legacy (non-variant) builders as
deprecated to help avoid using the wrong one.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30452>
2024-08-10 16:25:30 +00:00
Rob Clark
75e0290e42 tu: Use CHIP variant reg builders
Avoid using the non-variant builders for regs that differ btwn
generations.  This will become deprecated.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30452>
2024-08-10 16:25:30 +00:00
Rob Clark
47468554d9 tu: Add helper to calculate layer address
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30452>
2024-08-10 16:25:30 +00:00
Rob Clark
9f433a32cc freedreno/computerator: Use CHIP variant reg builders
Avoid using the non-variant builders for regs that differ btwn
generations.  This will become deprecated.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30452>
2024-08-10 16:25:30 +00:00
Alyssa Rosenzweig
16cadc04f3 nir/opt_reassociate_bfi: use alu_pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30582>
2024-08-10 13:40:21 +00:00
Alyssa Rosenzweig
2643b3cfbf nir/lower_packing: use alu_pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30582>
2024-08-10 13:40:21 +00:00
Alyssa Rosenzweig
6e39379183 nir/opt_idiv_const: use alu_pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30582>
2024-08-10 13:40:21 +00:00
Alyssa Rosenzweig
b6daa35d9d nir/scale_fdiv: use alu_pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30582>
2024-08-10 13:40:21 +00:00
Alyssa Rosenzweig
d2780d871b nir/lower_alu: use alu_pass
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30582>
2024-08-10 13:40:21 +00:00
Alyssa Rosenzweig
9b07550908 treewide: use nir_shader_alu_pass
@def@
        typedef bool;
        typedef nir_builder;
        typedef nir_instr;
        typedef nir_def;
        identifier fn, instr, intr, x, builder, data;
        @@

        static fn(nir_builder* builder,
        -nir_instr *instr,
        +nir_alu_instr *intr,
        ...)
        {
        (
        -   if (instr->type != nir_instr_type_alu)
        -      return false;
        -   nir_alu_instr *intr = nir_instr_as_alu(instr);
        |
        -   nir_alu_instr *intr = nir_instr_as_alu(instr);
        -   if (instr->type != nir_instr_type_alu)
        -      return false;
        )

        <...
        (
        -instr->x
        +intr->instr.x
        |
        -instr
        +&intr->instr
        )
        ...>

        }

        @pass depends on def@
        identifier def.fn;
        expression shader, progress;
        @@

        (
        -nir_shader_instructions_pass(shader, fn,
        +nir_shader_alu_pass(shader, fn,
        ...)
        |
        -NIR_PASS_V(shader, nir_shader_instructions_pass, fn,
        +NIR_PASS_V(shader, nir_shader_alu_pass, fn,
        ...)
        |
        -NIR_PASS(progress, shader, nir_shader_instructions_pass, fn,
        +NIR_PASS(progress, shader, nir_shader_alu_pass, fn,
        ...)
        )

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30582>
2024-08-10 13:40:21 +00:00
Alyssa Rosenzweig
cc1f092b62 nir: add nir_shader_alu_pass
after the smashing success of nir_shader_intrinsics_pass, let's add the ALU
version to help the odd non-algebraic ALU lowering pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30582>
2024-08-10 13:40:21 +00:00
Collabora's Gfx CI Team
d330870f9c Uprev Piglit to f11abb664bfcad09586f32f411b90331e23be2e5
0453436872...f11abb664b

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30597>
2024-08-10 07:39:41 +00:00
David Heidelberg
d0420c0990 ci/alpine: libclc on Alpine offering necessary targets spirv-mesa3d-;spirv64-mesa3d-
No need for any Debian specific hacks.

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/30482>
2024-08-10 15:13:33 +09:00
David Heidelberg
6d09671b67 ci/alpine: enable ORCJIT
Recommended for LLVM 18+, let's test it on Alpine builds.

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/30482>
2024-08-10 15:13:33 +09:00
David Heidelberg
9cec4aec09 ci/alpine: use packaged spirv-llvm-translator-dev
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/30482>
2024-08-10 15:13:33 +09:00
David Heidelberg
09f8df82c8 ci/alpine: build test with LLVM 18
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/30482>
2024-08-10 15:13:33 +09:00
David Heidelberg
34753cefd8 ci/alpine: use llvm variables
Fixes: da391650f5 ("ci: build a host version of mesa for cross builds")

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/30482>
2024-08-10 15:13:33 +09:00
David Heidelberg
bda1a0596e meson/addrlib: allow unintialized callbacks
Resolves:
[328/4125] Compiling C++ object src/amd/addrlib/libaddrlib.a.p/src_core_addrlib1.cpp.o
In static member function 'static VOID Addr::Object::ClientFree(VOID*, const Addr::Client*)',
    inlined from 'static VOID Addr::Object::operator delete(VOID*)' at ../src/amd/addrlib/src/core/addrobject.cpp:190:15,
    inlined from 'virtual Addr::Object::~Object()' at ../src/amd/addrlib/src/core/addrobject.cpp:71:1:
../src/amd/addrlib/src/core/addrobject.cpp:129:28: error: '*(const Addr::Client*)((char*)this + 8).Addr::Client::callbacks._ADDR_CALLBACKS::freeSysMem' is used uninitialized [-Werror=uninitialized]
  129 |     if (pClient->callbacks.freeSysMem != NULL)
      |         ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

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

Suggested-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30482>
2024-08-10 15:13:33 +09:00
David Heidelberg
9c8e75e256 llvmpipe: Silence "possibly uninitialized value" warning for ssbo_limit (cont)
Fixes: ce611935df ("llvmpipe: Silence "possibly uninitialized value" warning for ssbo_limit.")

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30482>
2024-08-10 15:13:32 +09:00
Marek Olšák
07554d32db ac/nir: adjust gfx11 tuning for the compute blit
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
db7823e8b9 ac/nir: adjust performance-related decisions for clear/copy_buffer shader
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
361266fec7 ac/nir: import the clear/copy_buffer compute shader from radeonsi
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
e41fec7812 radeonsi: align waves to 256B clear/copy area for the clear/copy_buffer shader
This is about 10% faster in certain unaligned cases.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
2f9201e91b radeonsi: implement optimized unaligned clear/copy_buffer compute shader
This totally beats CP DMA on Navi31.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
fa85b4b49e radeonsi: minor changes at the beginning of si_compute_clear_copy_buffer
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
4d78052321 radeonsi: add correctness tests for the clear/copy_buffer compute shader
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
a48a376bc5 radeonsi: test more alignment cases in si_test_dma_perf
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
fa53a23031 radeonsi: reject insert/extract opcodes in si_vectorize_callback
The vector variants are not implemented by ac_nir_to_llvm.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
d34a450098 util: move util_lower_clearsize_to_dword here
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Marek Olšák
1d66acf993 nir: add ACCESS_KEEP_SCALAR, preventing vectorization
The comment explains the reason.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30208>
2024-08-10 02:14:44 +00:00
Faith Ekstrand
3f1c3f04be nvk: Advertise VK_EXT_descriptor_buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
0f8f407e57 zink: Align descriptor buffers to descriptorBufferOffsetAlignment
Instead of aligning offsets, we just align the size every time we query
it.  This simplifies our offset and size calculations later since we can
always just add up descriptor buffer sizes and know that we'll be okay.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fixes: 7ab5c5d36d ("zink: use EXT_descriptor_buffer with ZINK_DESCRIPTORS=db")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
fdf580bf74 nvk: Add support for embedded immutable samplers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
832f67e187 nvk: Implement descriptor buffer binding
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
b6c862bed7 nvk: Rework descriptor set bindings
This switches from struct-of-array to array-of-struct and also addes a
new nvk_descriptor_set_type enum to make it more clear exactly what, if
anything, is bound at any give time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
6c54344f5b nvk: Properly indent a comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
f7638ff1dc nvk: Implement descriptor capture/replay
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
ef9d9b70a6 nvk/descriptor_table: Add support for requesting a specific index
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
77db71db7d nvk: Implement GetDescriptorEXT
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
237c5d505a nvk: Refactor some descriptor set helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
ad9a13a163 nvk: Implement GetDescriptorLayoutSize/BindingOffsetEXT()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
fc0f0725a4 nvk: Use the EDB buffer view path with NVK_DEBUG=edb_bview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
677f40383d nvk: Use nvk_edb_buffer_view_descriptor for EDB descriptor set layouts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
3b94c5c22a nvk: Lower descriptors for VK_EXT_descriptor_buffer buffer views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
8cafd2667f nvk: Refactor image intrinsic lowering a bit
This makes lower_msaa_image_intrin do all of the lowering for MSAA
images.  It's a tiny bit of duplicated code but it'll make more sense
when we work buffer views in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
93b30bb353 nvk: Add a VK_EXT_descriptor_buffer buffer view cache
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
0f65011157 nvk/nvkmd: Advertise the usable VA range
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
6db3609eaf nvk: s/device/dev/ in nvk_buffer_view.c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
1940c8e543 nvk: Move descrptor structs into a separate header
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
8244b87822 nvk: Support STORAGE_READ_WITHOUT_FORMAT on buffers
Fixes: fc19173014 ("nvk: Rework format features queries")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Faith Ekstrand
08f6066e87 nvk: Require color or depth/stencil attachment support for input attachments
Fixes: 20d8d1e239 ("nvk: Add a more competent GetPhysicalDeviceImageFormatProperties")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30580>
2024-08-10 00:42:59 +00:00
Ian Romanick
119801e647 intel/brw: Move fsat instructions closer to the source
Intel GPUs have a saturate destination modifier, and
brw_fs_opt_saturate_propagation tries to replace explicit saturate
operations with this destination modifier. That pass is limited in
several ways. If the source of the explicit saturate is in a different
block or if the source of the explicit saturate is live after the
explicit saturate, brw_fs_opt_saturate_propagation will be unable to
make progress.

This optimization exists to help brw_fs_opt_saturate_propagation make
more progress. It tries to move NIR fsat instructions to the same block
that contains the definition of its source. It does this only in cases
where it will not create additional live values. It also attempts to do
this only in cases where the explicit saturate will ultimiately be
converted to a destination modifier.

v2: Fix metadata_preserve when theres no progress and use
nir_metadata_control_flow when there is progress. All suggested by
Alyssa.

v3: Fix a typo in the file header comment. Noticed by Ken.  Don't
require nir_metadata_instr_index. Use nir_def_rewrite_uses_after instead
of open-coding something slightly more specific. Both suggested by Ken.

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19733645 -> 19733028 (<.01%)
instructions in affected programs: 193300 -> 192683 (-0.32%)
helped: 246
HURT: 1
helped stats (abs) min: 2 max: 48 x̄: 2.51 x̃: 2
helped stats (rel) min: 0.18% max: 0.39% x̄: 0.33% x̃: 0.34%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.31% max: 0.31% x̄: 0.31% x̃: 0.31%
95% mean confidence interval for instructions value: -2.87 -2.13
95% mean confidence interval for instructions %-change: -0.34% -0.32%
Instructions are helped.

total cycles in shared programs: 916180971 -> 916264656 (<.01%)
cycles in affected programs: 30197180 -> 30280865 (0.28%)
helped: 194
HURT: 142
helped stats (abs) min: 1 max: 21251 x̄: 872.75 x̃: 19
helped stats (rel) min: <.01% max: 23.17% x̄: 2.59% x̃: 0.23%
HURT stats (abs)   min: 1 max: 28058 x̄: 1781.68 x̃: 399
HURT stats (rel)   min: <.01% max: 37.21% x̄: 4.85% x̃: 1.63%
95% mean confidence interval for cycles value: -196.84 694.97
95% mean confidence interval for cycles %-change: -0.17% 1.27%
Inconclusive result (value mean confidence interval includes 0).

fossil-db:

Meteor Lake, DG2, and Tiger Lake had similar results. (Meteor Lake shown)
Totals:
Instrs: 151512021 -> 151511351 (-0.00%); split: -0.00%, +0.00%
Cycle count: 17209013596 -> 17209840995 (+0.00%); split: -0.02%, +0.02%
Max live registers: 32013312 -> 32013549 (+0.00%)
Max dispatch width: 5512304 -> 5512136 (-0.00%)

Totals from 774 (0.12% of 630172) affected shaders:
Instrs: 1559285 -> 1558615 (-0.04%); split: -0.05%, +0.01%
Cycle count: 1312656268 -> 1313483667 (+0.06%); split: -0.24%, +0.30%
Max live registers: 82195 -> 82432 (+0.29%)
Max dispatch width: 6664 -> 6496 (-2.52%)

Ice Lake
Totals:
Instrs: 151416791 -> 151416137 (-0.00%); split: -0.00%, +0.00%
Cycle count: 15162468885 -> 15163298824 (+0.01%); split: -0.00%, +0.01%
Max live registers: 32471367 -> 32471603 (+0.00%)
Max dispatch width: 5623752 -> 5623712 (-0.00%)

Totals from 733 (0.12% of 635598) affected shaders:
Instrs: 877965 -> 877311 (-0.07%); split: -0.09%, +0.01%
Cycle count: 190763628 -> 191593567 (+0.44%); split: -0.21%, +0.64%
Max live registers: 72067 -> 72303 (+0.33%)
Max dispatch width: 6216 -> 6176 (-0.64%)

Skylake
Totals:
Instrs: 140794845 -> 140794075 (-0.00%); split: -0.00%, +0.00%
Cycle count: 14665159301 -> 14665320514 (+0.00%); split: -0.00%, +0.01%
Max live registers: 31783341 -> 31783662 (+0.00%); split: -0.00%, +0.00%

Totals from 659 (0.11% of 625670) affected shaders:
Instrs: 829061 -> 828291 (-0.09%); split: -0.09%, +0.00%
Cycle count: 185478478 -> 185639691 (+0.09%); split: -0.33%, +0.41%
Max live registers: 67491 -> 67812 (+0.48%); split: -0.01%, +0.48%

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29774>
2024-08-09 14:26:10 -07:00
Ian Romanick
f5815a003e intel/brw: Use def analysis for simple cases of saturate propagation
I had hoped this would improve compilation performance too. I tried
several different long running fossils, and there was no difference.

Fossil-db results are all over the place from platform to platform.

All of the Tiger Lake shaders hurt for spills and fills are fragment
shaders in rdr2.

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19734088 -> 19733645 (<.01%)
instructions in affected programs: 71200 -> 70757 (-0.62%)
helped: 186
HURT: 0
helped stats (abs) min: 1 max: 7 x̄: 2.38 x̃: 1
helped stats (rel) min: 0.06% max: 2.79% x̄: 0.83% x̃: 0.48%
95% mean confidence interval for instructions value: -2.69 -2.07
95% mean confidence interval for instructions %-change: -0.93% -0.72%
Instructions are helped.

total cycles in shared programs: 916290473 -> 916180971 (-0.01%)
cycles in affected programs: 3403719 -> 3294217 (-3.22%)
helped: 89
HURT: 88
helped stats (abs) min: 1 max: 36685 x̄: 1424.13 x̃: 10
helped stats (rel) min: <.01% max: 26.75% x̄: 1.66% x̃: 0.46%
HURT stats (abs)   min: 1 max: 8750 x̄: 195.98 x̃: 7
HURT stats (rel)   min: <.01% max: 17.12% x̄: 1.57% x̃: 0.19%
95% mean confidence interval for cycles value: -1199.88 -37.43
95% mean confidence interval for cycles %-change: -0.66% 0.56%
Inconclusive result (%-change mean confidence interval includes 0).

fossil-db:

Meteor Lake and DG2 had similar results. (Meteor Lake shown)
Totals:
Instrs: 151458346 -> 151457413 (-0.00%)
Cycle count: 17202426472 -> 17202406469 (-0.00%); split: -0.00%, +0.00%
Max live registers: 31989626 -> 31989959 (+0.00%); split: -0.00%, +0.00%
Max dispatch width: 5500560 -> 5500384 (-0.00%)

Totals from 479 (0.08% of 628970) affected shaders:
Instrs: 398836 -> 397903 (-0.23%)
Cycle count: 18064565 -> 18044562 (-0.11%); split: -0.40%, +0.29%
Max live registers: 36663 -> 36996 (+0.91%); split: -0.02%, +0.92%
Max dispatch width: 4392 -> 4216 (-4.01%)

Tiger Lake
Totals:
Instrs: 149913036 -> 149912182 (-0.00%); split: -0.00%, +0.00%
Cycle count: 15560086488 -> 15560135139 (+0.00%); split: -0.00%, +0.00%
Spill count: 61241 -> 61251 (+0.02%)
Fill count: 107304 -> 107314 (+0.01%)
Max live registers: 31964752 -> 31965119 (+0.00%); split: -0.00%, +0.00%
Max dispatch width: 5517568 -> 5517248 (-0.01%)

Totals from 486 (0.08% of 628673) affected shaders:
Instrs: 396065 -> 395211 (-0.22%); split: -0.23%, +0.01%
Cycle count: 17677691 -> 17726342 (+0.28%); split: -0.23%, +0.51%
Spill count: 1302 -> 1312 (+0.77%)
Fill count: 3746 -> 3756 (+0.27%)
Max live registers: 37538 -> 37905 (+0.98%); split: -0.02%, +0.99%
Max dispatch width: 4576 -> 4256 (-6.99%)

Ice Lake
Totals:
Instrs: 151348422 -> 151347463 (-0.00%)
Cycle count: 15155678386 -> 15155691726 (+0.00%); split: -0.00%, +0.00%
Fill count: 108114 -> 108111 (-0.00%)
Max live registers: 32444479 -> 32444814 (+0.00%); split: -0.00%, +0.00%
Max dispatch width: 5611288 -> 5611256 (-0.00%)

Totals from 483 (0.08% of 634352) affected shaders:
Instrs: 393333 -> 392374 (-0.24%)
Cycle count: 16706439 -> 16719779 (+0.08%); split: -0.14%, +0.22%
Fill count: 3654 -> 3651 (-0.08%)
Max live registers: 37246 -> 37581 (+0.90%); split: -0.02%, +0.92%
Max dispatch width: 4312 -> 4280 (-0.74%)

Skylake
Totals:
Instrs: 140741190 -> 140734481 (-0.00%); split: -0.00%, +0.00%
Cycle count: 14659096516 -> 14659116346 (+0.00%); split: -0.00%, +0.00%
Max live registers: 31757558 -> 31757725 (+0.00%)
Max dispatch width: 5470040 -> 5469920 (-0.00%)

Totals from 3542 (0.57% of 624449) affected shaders:
Instrs: 3081309 -> 3074600 (-0.22%); split: -0.22%, +0.00%
Cycle count: 228843073 -> 228862903 (+0.01%); split: -0.11%, +0.12%
Max live registers: 304531 -> 304698 (+0.05%)
Max dispatch width: 31016 -> 30896 (-0.39%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29774>
2024-08-09 14:26:05 -07:00
Ian Romanick
adcce2bba4 intel/brw: Small code refactor in brw_fs_opt_saturate_propagation
This bit of code will have a second use in the next commit.

v2: Fix some broken indentation. Noticed by Ken.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29774>
2024-08-09 14:26:03 -07:00
Ian Romanick
9125b7c1b4 intel/elk: Don't propagate saturate to an instruction that writes flags
There are two problems.

1. This is not NaN safe. 'add.le.sat dst F, Inf F, -Inf F' has a
   different result than 'add dst F, Inf F, -Inf F; cmp.le null, dst F, 0F'.

2. Ignoring the first problem, this only produces the desired flags
   for LE and G. All other cases can produce the wrong result.

shader-db:

All Intel platforms had similar results. (Broadwell shown)
total instructions in shared programs: 18282314 -> 18282316 (<.01%)
instructions in affected programs: 78 -> 80 (2.56%)
helped: 0
HURT: 2

total cycles in shared programs: 952924234 -> 952924252 (<.01%)
cycles in affected programs: 584 -> 602 (3.08%)
helped: 0
HURT: 2

Fixes: e6022281f2 ("intel/elk: Rename files to use elk prefix")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29774>
2024-08-09 14:26:01 -07:00
Ian Romanick
3d8fea0e09 intel/brw: Don't propagate saturate to an instruction that writes flags
There are two problems.

1. This is not NaN safe. 'add.le.sat dst F, Inf F, -Inf F' has a
   different result than 'add dst F, Inf F, -Inf F; cmp.le null, dst F, 0F'.

2. Ignoring the first problem, this only produces the desired flags
   for LE and G. All other cases can produce the wrong result.

For example, batman_arkham_city_goty.foz 6a63c4caacaa0dae has the
following code:

    mad.ge.f0.0(8)  g51<1>F         g50<8,8,1>F     g46<8,8,1>F     g11<1,1,1>F
    mov.sat(8)      g52<1>F         g51<1,1,0>F
    ...
    (+f0.0) sel(8)  g54<1>UD        g53<8,8,1>UD    0x3f000000UD

Without this commit, the saturate is incorrectly propagated to the MAD.

A similar case exists in witcher_3_dxvk_g2.foz 5b03243be667a275.

There are even worse cases like total_war_warhammer3.dx12vk-g6.foz
78328466761ef7ab and ee920491573860fc. The former has the following
code (and the latter has very similar code):

    mad.l.f0.0(16)  g95<1>F         g93<8,8,1>F     g62<8,8,1>F     g68<1,1,1>F
    ...
    mov.sat(16)     g109<1>F        -g95<1,1,0>F
    ...
    (+f0.0) sel(16) g68<1>UD        g111<1,1,0>UD   g54<1,1,0>UD
    (+f0.0) sel(16) g70<1>UD        g113<1,1,0>UD   g56<1,1,0>UD
    (+f0.0) sel(16) g72<1>UD        g115<1,1,0>UD   g58<1,1,0>UD

Saturate propagation makes a hash of this code:

    mad.sat.l.f0.0(16) g106<1>F     -g93<8,8,1>F    -g62<8,8,1>F    g68<1,1,1>F
    ...
    (+f0.0) sel(16) g70<1>UD        g110<1,1,0>UD   g56<1,1,0>UD
    (+f0.0) sel(16) g72<1>UD        g112<1,1,0>UD   g58<1,1,0>UD
    (+f0.0) sel(16) g68<1>UD        g108<1,1,0>UD   g54<1,1,0>UD

Not only is the saturate incorrectly applied to the MAD, but the MAD
result is negated without changing the conditional modifier to G!

NOTE: Backports of this commit to stable branches may need to be more
like the following commit to elk.

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19729375 -> 19729377 (<.01%)
instructions in affected programs: 112 -> 114 (1.79%)
helped: 0
HURT: 2

total cycles in shared programs: 916234266 -> 916234288 (<.01%)
cycles in affected programs: 636 -> 658 (3.46%)
helped: 0
HURT: 2

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 151531594 -> 151531601 (+0.00%)
Cycle count: 17209107419 -> 17209107474 (+0.00%); split: -0.00%, +0.00%

Totals from 6 (0.00% of 630198) affected shaders:
Instrs: 4550 -> 4557 (+0.15%)
Cycle count: 194629 -> 194684 (+0.03%); split: -0.00%, +0.03%

Fixes: 947c828d5c ("i965/fs: Add a saturation propagation optimization pass.")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29774>
2024-08-09 14:25:57 -07:00
Ian Romanick
6da4649191 intel/brw: Eliminate dead flag writes
This prevents a couple small regressions in the next commit.

The only changes in shader-db or fossil-db were on Skylake. This seems
to eliminate an unused flags write that doesn't exist on other platforms.
With that flag write eliminated, a later CMP can be scheduled better.

I did not investigate this further.

v2: Clean up some unnecessary bits and add some comments to
can_elminate_conditional_mod. Suggested by Ken and Matt.

Skylake
Totals:
Cycle count: 14665454524 -> 14665454444 (-0.00%)

Totals from 10 (0.00% of 625685) affected shaders:
Cycle count: 38630 -> 38550 (-0.21%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29774>
2024-08-09 14:25:54 -07:00
Jesse Natalie
169f8ec227 meson: Add an error message for llvmpipe without llvm draw support
Fixes: 010b2f9497 ("gallium/meson: Deconflate swrast/softpipe/llvmpipe")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30577>
2024-08-09 18:45:11 +00:00
Friedrich Vock
70fc5987d4 radv/rt: Don't atomicAdd local prefix sums
This only gets written to by one invocation at a time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30483>
2024-08-09 18:12:52 +00:00
Friedrich Vock
a3df3ebab4 radv/rt: Only do ploc atomicCompSwap once per workgroup
There is no need to do this for every invocation in the wave.

Improves GravityMark scores by 5%.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30483>
2024-08-09 18:12:52 +00:00
Alyssa Rosenzweig
7983c6c14d ir3: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30569>
2024-08-09 17:36:57 +00:00
Alyssa Rosenzweig
bf9a17e2d5 elk: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30566>
2024-08-09 17:07:59 +00:00
Alyssa Rosenzweig
eec02246f8 brw: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30566>
2024-08-09 17:07:59 +00:00
Rob Clark
19ff16387a gallium: Add option to not add version to libgallium filename
This is unneeded in some environments, like ChromeOS and Android.  And
for CrOS it specifically causes problems with the gpu sandbox rules.. we
don't want to have to update the sandbox rules for each new mesa
version.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30579>
2024-08-09 16:14:43 +00:00
Rob Clark
19d44313a4 egl: Fix surfaceless + modifiers
Modifiers are not restricted to dri3.

Fixes: d86f39e7cf ("egl: swap DRI_IMAGE checks for dmabuf/modifier support for driver check")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30579>
2024-08-09 16:14:43 +00:00
Georg Lehmann
48acf9d358 nir/lower_int64: replace uadd_sat with ior for find_lsb64 and ufind_msb64
Using ior here is equivalent to using uadd_sat, but works for every driver
and shouldn't hurt anywhere.

I forgot to fix this up when fixing up some vvl errors with zink.

Fixes crashes with the integer_ctz CL CTS tests in zink.

Fixes: 39ec184db6 ("zink: lower 64 bit find_lsb, ufind_msb and bit_count")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30535>
2024-08-09 15:09:57 +00:00
Mike Blumenkrantz
fca2e0ff32 dri: delete a bunch of unused interfaces
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
80cc7d0c34 dri: massively prune the dri target
none of the loader stuff here does anything anymore

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
2cbb92d656 gbm: stop loading driver extensions
this is pointless now

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
a43eefa718 glx: stop loading driver extensions
this is pointless now

libGL still needs to be dlopen()ed on some systems tho

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
0b1c0f4193 egl: stop loading driver extensions
this is pointless now

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
44ec194217 kopper: inline DRI_IMAGE usage
not sure why I didn't do this originally

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
1de7c86bc1 dri: pass through a type enum for creating screen instead of driver_extensions
the caller always knows what type of screen this will be, which means
it's finally possible to kill off passing a vtable here

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
4246432c3e dri: delete more dead code
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
d6ac254c01 dri: fix kms_swrast screen fail
this should match all the other screen init functions

cc: mesa-stable

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
d4ab6e15aa dri: delete dri_screen::extensions
no longer used

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
1724716ed1 dri: delete dri_screen::extensions accessor
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
34dea2b38e glx: unify extension binding
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
02fdca7ffe glx: add a glx_screen member to indicate GLX_EXT_texture_from_pixmap
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
7ab02fdff5 glx: use glx_driver to determine drisw extension enablement
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
6a553a9cac glx: set drisw glx_driver more usefully
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
a1416eff96 glx: store the DRIscreen to the base glx_screen
frustratingly, there is already a driScreen member, but it's the wrong type

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
3f497c1667 glx: deduplicate and move driverName to base glx_screen struct
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
d491ec1bf9 glx: stop checking dri extensions
this was only used for robustness, which can be determined from the
pipe cap instead

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
83e53e3136 egl/dri: move some screen accessors back to dri frontend
this is so clunky rrrrrrrrahwefawiufhweofhaf

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
9f461400eb dri: delete all the extra dri2 extension handling
none of this is used anymore

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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
3216d2b03e dri: consolidate a bunch of dri_screen init code
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
899541c7bc dri: delete some dri_screen cruft
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
6db3dd8a04 dri: delete a couple unused functions
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/30524>
2024-08-09 14:23:28 +00:00
Mike Blumenkrantz
b53620b2b3 dri: delete __DRIdri2Extension interface
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/30524>
2024-08-09 14:23:27 +00:00
Mike Blumenkrantz
afe6309449 dri: delete unused DRI_MESA queryCompatibleRenderOnlyDeviceFd method
make it more obvious which members match other DRI_MESA interface members

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/30524>
2024-08-09 14:23:27 +00:00
Mike Blumenkrantz
c3c490f775 glx: replace a straggler DRI_CONFIG_OPTIONS usage
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/30524>
2024-08-09 14:23:27 +00:00
Alyssa Rosenzweig
3410161dc7 vc4: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30570>
2024-08-09 13:54:11 +00:00
Alyssa Rosenzweig
c3d999dec9 broadcom: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30570>
2024-08-09 13:54:11 +00:00
Mike Blumenkrantz
1a579552af egl: fix zink init
* close(fd) requires also resetting the fd=-1 or else boom
* checking just driver_name is broken because loader_get_driver_for_fd()
  uses MESA_LOADER_DRIVER_OVERRIDE, so there's no way to differentiate
  an inferred load

Fixes: b907eb4750 ("egl: don't bind zink under dri2/3")

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30556>
2024-08-09 08:46:39 -04:00
Erico Nunes
ad2e523817 lima/ppir: add support and folding trunc to a modifier
Previously ppir just inserted a mov for this, but it can also be folded
to a modifier in some cases. Now that we have lowering for dest
modifiers, we can just include trunc in the list so it is optimized when
possible.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30332>
2024-08-09 11:27:38 +00:00
Erico Nunes
3e2b2c3bdd lima/ppir: add support and folding for fclamp_pos
Now that ppir uses its own folding for dest modifiers, we can add
folding for fclamp_pos which was previously unused.
We borrow the nir optimization pass from Panfrost to create a
nir_op_fclamp_pos_mali when possible and reuse the dest modifier
lowering to optimize that to a modifier when possible.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30332>
2024-08-09 11:27:38 +00:00
Erico Nunes
0286585337 lima/ppir: remove nir_legacy
With modifiers lowering in place done by the backend, lima/ppir no
longer needs to use nir_legacy code.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30332>
2024-08-09 11:27:38 +00:00
Erico Nunes
c060013b03 lima/ppir: add folding lowering for dest modifiers
Lowering to fold dest modifiers to prepare for this being disabled
in nir.
This will allow ppir to drop nir_legacy usage.
Currently we only handle clamp modifiers which was the only supported
one in ppir, but we can reuse the same for the other hardware supported
modifiers as a follow-up.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30332>
2024-08-09 11:27:38 +00:00
Erico Nunes
7d5cb04125 lima/ppir: add folding lowering for src modifiers
Lowering to fold src modifiers to prepare for this being disabled
in nir.
This will allow ppir to drop nir_legacy usage.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30332>
2024-08-09 11:27:38 +00:00
Kenneth Graunke
b6f4f64b43 intel/brw: Drop image_{load,store}_raw_intel handling
Gfx8 required us to emulate image load store with untyped messages,
whereas Gfx9 just has typed message support for everything.  brw no
longer supports Gfx8, so all of this code is effectively dead.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30576>
2024-08-09 07:20:08 +00:00
Tapani Pälli
7a4020e129 anv: implement workaround for Wa_18038825448
Description states that we need to enable PS_EXTRA state
EnablePSdependencyonCPsizechange whenever PixelShaderIsPerCoarsePixel
state changes.

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/30475>
2024-08-09 07:30:03 +03:00
Tapani Pälli
9582de9ee3 anv: refactor cmd_buffer_flush_gfx_runtime_state for dirty state
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/30475>
2024-08-09 07:30:03 +03:00
Lionel Landwerlin
bbfafc71da anv: limit some state dirtying after blorp/simpler-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/30475>
2024-08-09 07:30:03 +03:00
Tapani Pälli
ff8953f666 anv: fix a cmd_buffer reference in simple shader
In utrace timestamp copy case cmd_buffer is NULL.

Fixes: dbbcd5c32c ("anv: factor out generation kernel dispatch into helper")
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/30475>
2024-08-09 07:30:03 +03:00
Tapani Pälli
8dbd38ae32 blorp: support new flag for setting cps dependency
This is used with Wa_18038825448 implementation.

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/30475>
2024-08-09 07:30:03 +03:00
Tapani Pälli
91f9da524e intel/dev: update mesa_defs.json from workaround database
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30475>
2024-08-09 07:30:03 +03:00
Alyssa Rosenzweig
50c0dbfd70 dxil: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30568>
2024-08-08 23:06:36 +00:00
Alyssa Rosenzweig
0d170a8128 r600: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30571>
2024-08-08 20:34:59 +00:00
Alyssa Rosenzweig
650a8f2094 r600: remove 64-bit ddx handling
doesn't exist in APIs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30571>
2024-08-08 20:34:59 +00:00
Karol Herbst
cd2dc4f70c rusticl/queue: add clSetCommandQueueProperty
The CL CTS started to call this API, luckily we don't have to actually
implement it, because we don't intent to support CL 1.0 only devices in
the first place (probably).

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30575>
2024-08-08 20:21:31 +00:00
Rob Clark
1d8283be36 subprojects: perfetto uprev to v47.0
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30555>
2024-08-08 19:29:00 +00:00
Romaric Jodin
f981cd8e01 perfetto: fix perfetto counter following perfetto v46.0
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30555>
2024-08-08 19:29:00 +00:00
Caio Oliveira
2e2b83f72d intel/brw: Use CSE for LOAD_SUBGROUP_INVOCATION
Instead of emitting a single one at the top, and making reference to it,
emit the virtual instruction as needed and let CSE do its job.

Since load_subgroup_invocation now can appear not at the start of the
shader, use UNDEF in all cases to ensure that the liveness of the
destination doesn't extend to the first partial write done here (it was
being used only for SIMD > 8 before).

Note this option was considered in the past
6132992cdb but at the time dismissed.  The
difference now is that the lowering of the virtual instruction happens
earlier than the scheduling.

The motivation for this change is to allow passes other than the NIR
conversion to use this value.  The alternative of storing a `brw_reg` in
the shader (instead of NIR state) gets complicated by passes like
compact_vgrfs, that move VGRFs around (and update the instructions).
This and maybe other passes would have to care about the brw_reg.

Fossil-db numbers, TGL

```
*** Shaders only in 'after' results are ignored:
steam-native/shadow_of_the_tomb_raider/c683ea5067ee157d/fs.32/0, steam-native/shadow_of_the_tomb_raider/f4df450c3cef40b4/fs.32/0, steam-native/shadow_of_the_tomb_raider/94b708fb8e3d9597/fs.32/0, steam-native/shadow_of_the_tomb_raider/19d44c328edabd30/fs.32/0, steam-native/shadow_of_the_tomb_raider/8a7dcbd5a74a19bf/fs.32/0, and 366 more
from 4 apps: steam-dxvk/alan_wake, steam-dxvk/batman_arkham_city_goty, steam-dxvk/batman_arkham_origins, steam-native/shadow_of_the_tomb_raider

*** Shaders only in 'before' results are ignored:
steam-dxvk/octopath_traveler/aaa3d10acb726906/fs.32/0, steam-dxvk/batman_arkham_origins/e6872ae23569c35f/fs.32/0, steam-dxvk/octopath_traveler/fd33a99fa5c271a8/fs.32/0, steam-dxvk/octopath_traveler/9a077cdc16f24520/fs.32/0, steam-dxvk/batman_arkham_city_goty/fac7b438ad52f622/fs.32/0, and 12 more
from 4 apps: steam-dxvk/batman_arkham_city_goty, steam-dxvk/batman_arkham_origins, steam-dxvk/octopath_traveler, steam-native/shadow_of_the_tomb_raider

Totals:
Instrs: 149752381 -> 149751337 (-0.00%); split: -0.00%, +0.00%
Cycle count: 11553609349 -> 11549970294 (-0.03%); split: -0.06%, +0.03%
Spill count: 42763 -> 42764 (+0.00%); split: -0.01%, +0.01%
Fill count: 75650 -> 75651 (+0.00%); split: -0.00%, +0.01%
Max live registers: 31725096 -> 31671792 (-0.17%)
Max dispatch width: 5546008 -> 5551672 (+0.10%); split: +0.11%, -0.00%

Totals from 52574 (8.34% of 630441) affected shaders:
Instrs: 9535159 -> 9534115 (-0.01%); split: -0.03%, +0.02%
Cycle count: 1006627109 -> 1002988054 (-0.36%); split: -0.65%, +0.29%
Spill count: 11588 -> 11589 (+0.01%); split: -0.03%, +0.03%
Fill count: 21057 -> 21058 (+0.00%); split: -0.01%, +0.02%
Max live registers: 1992493 -> 1939189 (-2.68%)
Max dispatch width: 559696 -> 565360 (+1.01%); split: +1.06%, -0.05%
```

and DG2

```
*** Shaders only in 'after' results are ignored:
steam-native/shadow_of_the_tomb_raider/1f95a9d3db21df85/fs.32/0, steam-native/shadow_of_the_tomb_raider/56b87c4a46613a2a/fs.32/0, steam-native/shadow_of_the_tomb_raider/a74b4137f85dbbd3/fs.32/0, steam-native/shadow_of_the_tomb_raider/e07e38d3f48e8402/fs.32/0, steam-native/shadow_of_the_tomb_raider/206336789c48996c/fs.32/0, and 268 more
from 4 apps: steam-dxvk/alan_wake, steam-dxvk/batman_arkham_city_goty, steam-dxvk/batman_arkham_origins, steam-native/shadow_of_the_tomb_raider

*** Shaders only in 'before' results are ignored:
steam-native/shadow_of_the_tomb_raider/0420d7c3a2ea99ec/fs.32/0, steam-native/shadow_of_the_tomb_raider/2ff39f8bf7d24abb/fs.32/0, steam-native/shadow_of_the_tomb_raider/92d7be2824bd9659/fs.32/0, steam-native/shadow_of_the_tomb_raider/f09ca6d2ecf18015/fs.32/0, steam-native/shadow_of_the_tomb_raider/490f8ffd59e52949/fs.32/0, and 205 more
from 3 apps: steam-dxvk/batman_arkham_city_goty, steam-dxvk/batman_arkham_origins, steam-native/shadow_of_the_tomb_raider

Totals:
Instrs: 151597619 -> 151599914 (+0.00%); split: -0.00%, +0.00%
Subgroup size: 7699776 -> 7699784 (+0.00%)
Cycle count: 12738501989 -> 12739841170 (+0.01%); split: -0.01%, +0.02%
Spill count: 61283 -> 61274 (-0.01%)
Fill count: 119886 -> 119849 (-0.03%)
Max live registers: 31810432 -> 31758920 (-0.16%)
Max dispatch width: 5540128 -> 5541136 (+0.02%); split: +0.08%, -0.06%

Totals from 49286 (7.81% of 631231) affected shaders:
Instrs: 8607753 -> 8610048 (+0.03%); split: -0.01%, +0.04%
Subgroup size: 857752 -> 857760 (+0.00%)
Cycle count: 305939495 -> 307278676 (+0.44%); split: -0.28%, +0.72%
Spill count: 6339 -> 6330 (-0.14%)
Fill count: 12571 -> 12534 (-0.29%)
Max live registers: 1788346 -> 1736834 (-2.88%)
Max dispatch width: 510920 -> 511928 (+0.20%); split: +0.85%, -0.66%
```

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30489>
2024-08-08 18:20:49 +00:00
Georg Lehmann
df16f47036 aco: optimize dd[xy]_fine if it's only used by abs
If we can ignore the sign of the derivative, we can swap the lanes
instead of broadcasting per direction. abs(a - b) = abs(b - a).
Shamelessly copied from bifrost.

Foz-DB Navi31:
Totals from 5 (0.01% of 79206) affected shaders:
Instrs: 6191 -> 6184 (-0.11%)
CodeSize: 31960 -> 31920 (-0.13%)
Latency: 111961 -> 111926 (-0.03%)
InvThroughput: 10390 -> 10372 (-0.17%)
VALU: 3286 -> 3279 (-0.21%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30557>
2024-08-08 17:39:55 +00:00
Timur Kristóf
f317311bad ac/nir: Shorten the name of ac_nir_calc_io_offset_mapped.
The other variant of this function doesn't
exist anymore, so there is no ambiguity.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
c9b5ef0e53 ac/nir/tess: Simplify calculation of HS output LDS offset.
No functional change, just make the code more readable.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
10dcf1fca6 nir: Remove unused nir_assign_linked_io_var_locations.
The only user of this pass was RADV.
Considering that driver locations are deprecated, nobody should
write new code relying on this pass.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
f917b81665 radv: Stop assigning linked driver locations.
The ac/nir passes are now able to map memory locations for the I/O
intrinsics without relying on driver location (intrinsic base).

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
d43466e917 ac/nir: Remove ac_nir_calc_io_offset function.
This function is not used anymore, because none of the callers
rely on driver locations (intrinsic base) anymore.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
7c009172e3 ac/nir/esgs: Map linked ES/GS I/O based on GS input mask.
With this change, ES/GS	linking	will not rely on driver	locations
anymore (driver locations are considered deprecated in NIR).

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
d758bea8dd ac/nir/tess: Map linked LS/HS I/O based on TCS input mask.
With this change, LS/HS linking will not rely on driver locations
anymore (driver locations are considered deprecated in NIR).

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
b162c7962f ac/nir: Add helper for I/O location mapping.
Map I/O locations based on a prefix sum (for linked shaders),
or based on the provided callback.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
ed6499db6b ac/nir/esgs: Don't emit ES outputs that aren't read by GS.
This is	necessary to prevent a regression from a future	commit,
in order to allow us to	map output locations differently.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
6d83389a39 ac/nir/esgs: Add gs_inputs_read to ES output lowering.
This commit just adds the field, it will be taken into use
in a following commit.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
9aa5c38e8d ac/nir/tess: Don't emit VS outputs that aren't read by TCS.
This is necessary to prevent a regression from a future commit,
in order to allow us to map output locations differently.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
b5f53fdf32 ac/nir/tess: Add tcs_inputs_read to LS output lowering.
This commit just adds the field, it will be taken into use
in a following commit.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Timur Kristóf
a8d78f889e radv: Add gs/hs_inputs_read field for linked LS and ES.
This will be used in the following commits to determine the
memory locations for LS/HS and ES/GS linking.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
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/29812>
2024-08-08 16:55:02 +00:00
Martin Krastev
5daf06e829 svga/ci: triage piglit tessellation failures
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30564>
2024-08-08 16:22:39 +00:00
Martin Krastev
dfd43fef6d svga/ci: enable vmware farm
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30564>
2024-08-08 16:22:39 +00:00
Alyssa Rosenzweig
5d06944665 agx: fix clang-format
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:08 +00:00
Alyssa Rosenzweig
2282abecec agx: convert to ddx intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
daa97bb41a amd: switch to derivative intrinsics
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/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
048173a55a radv: use glsl function name for dFdxfine
since fddx isn't a name used anywhere now

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/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
6338c49143 vtn: use new derivative builders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
530498cb83 treewide: use new-style derivative builders
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
09c61d0e4c nir/schedule: handle derivative intrinsics
load bearing for broadcom

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/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
038bb53456 nir/instr_set: allow derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
0566e9a51f nir/divergence_analysis: handle derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
66724e28ac nir/opt_constant_folding: handle derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
e0cc041674 nir/lower_wpos_ytransform: handle intrinsic ddx
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
9f9f96d2f9 nir/gather_info: handle derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
c7fbdc6b0c nir/opt_peephole_select: allow derivatives
match the old behaviour.

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/30565>
2024-08-08 15:26:07 +00:00
Alyssa Rosenzweig
24b722a692 nir: add derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30565>
2024-08-08 15:26:07 +00:00
Echo J
ec79f0c3cc compiler/rust: Force native build for the compiler_proc library
This should fix the 32-bit build of NVK (with NAK included)

Fixes: ab72be6c5e ("nak,compiler: Move AsSlice to common code")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30561>
2024-08-08 14:41:52 +00:00
Lionel Landwerlin
10533e7b4c anv/blorp: force CC_VIEWPORT reallocation when programming 3DSTATE_VIEWPORT_STATE_POINTERS_CC
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11647
Fixes: fe1baa6481 ("anv: reduce blorp dynamic state emissions")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30532>
2024-08-08 14:13:39 +00:00
Eric R. Smith
004e0eb3ab panfrost: use RGB1 component ordering for R5G6B5 pixel formats
For some purposes (e.g. advanced blending) we need a non-zero alpha
value returned from reads. This is only guaranteed on Bifrost if
we explicitly request RGB1 component ordering. The default is to use
RGBA component ordering, which for R5G6B5 causes 0 to be read for
alpha.

A complication is that the Mali fixed function hardware requires
four components (which implies RGBA rather than RGB1). If fixed
function blending is in use, we modify the pixel format back to
RGBA when building the blend descriptor.

Cc: mesa-stable
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/29606>
2024-08-08 13:42:34 +00:00
Connor Abbott
5ab29555cf egl/x11: pass render fd to screen create for zink
Fixes: f43883cf67 ("egl/gbm: rip out DRI_SWRAST")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30563>
2024-08-08 12:55:50 +00:00
Danylo Piliaiev
bfe5fa330b tu/u_trace: dispatch indirect dims and LRZ status as indirect params
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30513>
2024-08-08 12:25:25 +00:00
Danylo Piliaiev
762851e5d8 tu/u_trace: Add support for u_trace inidirect params
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30513>
2024-08-08 12:25:25 +00:00
Danylo Piliaiev
1fcbd720fc freedreno: Add enum for fd_lrzfc_layout::dir_track values
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30513>
2024-08-08 12:25:25 +00:00
Eric R. Smith
3135f76331 panfrost: fix texture.border_clamp regression for valhall
We have to swizzle the border color in order to offset the
automatic swizzling introduced to compensate for limited
component order support in AFBC/AFRC. However, the border color
format is only available if the `TEXTURE_BORDER_COLOR_QUIRK` is
enabled, so set that for v10 (it was already set for v7).

While testing, we uncovered another issue: valhall introduces a
swizzle for depth+stencil formats that isn't present for bifrost, and
also isn't needed (or wanted) for the border color. So ignore the
border color swizzle for depth+stencil on valhall (on bifrost the
swizzle is a no-op anyway).

Fixes: 87aad0a5e4 ("panfrost: encode component order as an inverted swizzle (v10)")
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30542>
2024-08-08 11:59:34 +00:00
Georg Lehmann
f36fccabf5 aco: optimize 64bit find_lsb/find_msb
No Foz-DB changes, but this should be better, especially for gfx6-7 where
uadd_sat is 2 instructions.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30549>
2024-08-08 11:15:55 +00:00
David Heidelberg
c2bbdda39b intel/genxml: fix length of HCP_FQM_STATE for gen20 and 125
Fixes: 7f280e1e93 ("intel/genxml: fix some length of HCP_FQM_STATE")
Acked-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30558>
2024-08-08 19:43:41 +09:00
Lucas Fryzek
cebb2bf266 lavapipe: Add AHB extension
Implement `VK_ANDROID_external_memory_android_hardware_buffer` on
lavapipe.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344>
2024-08-08 09:04:47 +00:00
Lucas Fryzek
a4de39c10d docs/android: Add llvmpipe instructions
Add instructions for how to build llvmpipe for android as well as
documentation to build an Android image that directly includes the
out-of-tree built libraries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344>
2024-08-08 09:04:47 +00:00
Lucas Fryzek
0dce939e6d lavapipe: Add android platform integration
Allow lavapipe to be loaded by the Android vulkan loader. Also provides
window system integration through the `VK_ANDROID_native_buffer`
extension.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344>
2024-08-08 09:04:47 +00:00
Lucas Fryzek
cfd897bae0 vulkan/runtime: Use DMA_BUF to import anb
Switch to using DMA_BUF to import android native buffers instead of
opaque FDs since more drivers (like lavapipe) can support dma bufs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344>
2024-08-08 09:04:47 +00:00
Lucas Fryzek
df96cac2cf llvmpipe: Add android platform integration
Allow llvmpipe to run on Android without any drm device present.
Previously llvmpipe would only run with kms_swrast, still requiring
a drm device driver to be present for the display.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344>
2024-08-08 09:04:47 +00:00
Lucas Fryzek
4009709bc3 egl/surfaceless: Add error checking to create image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344>
2024-08-08 09:04:47 +00:00
Collabora's Gfx CI Team
cf2b156f2e Uprev Piglit to 0453436872b6e4d502c2e87817addb95e0d77e3b
4a62c26721...0453436872

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30559>
2024-08-08 02:25:45 +00:00
Faith Ekstrand
ab72be6c5e nak,compiler: Move AsSlice to common code
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:19 +00:00
Faith Ekstrand
3ca448a549 nak: Replace the guts of Srcs/DstsAsSlice with a new AsSlice trait
This new trait is way more generic and shareable.  It does mean a bit of
gymnastics with traits to keep from retyping the whole compiler but the
result is something we can potentially share with other compilers.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:19 +00:00
Faith Ekstrand
bc58881b9f nak: Move DstsAsSlice::is_uniform() to its own trait
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:19 +00:00
Faith Ekstrand
35353a7368 nak: Switch to the common NIR wrappers
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:19 +00:00
Faith Ekstrand
2cb77cc0dc compiler/rust/nir: Add explicit lifetimes
This adds explicit lifetimes to any function which looks at a NIR
object, fishes a pointer out of it, and returns a reference.  The theory
of operation for these NIR wrappers is that everything holds an implicit
shared reference to the whole shader and so this is safe to do as long
as no one ever has a mut reference to anything.  However, since these
methods are turning pointers into references, it's a lot more obvious
what's going on if we have explicit lifetimes.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:18 +00:00
Faith Ekstrand
3ebeee9166 compiler/rust/nir: Implement NIR types directly
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:18 +00:00
Faith Ekstrand
d723ae9814 compiler/rust: Copy the Rust NIR wrappers from NAK
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:18 +00:00
Christian Gmeiner
ad4a7e32f3 nak: Move cfg to compiler crate
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:18 +00:00
Christian Gmeiner
05bf03c3db nak: Move bitset to compiler crate
This commit intorduces src/compiler/rust crate, which will have
different modules that help to write a backend compiler in Rust.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30443>
2024-08-07 21:08:18 +00:00
Marek Olšák
6bba7b685e radeonsi: strengthen the condition determining OREO_MODE
No change in behavior.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30525>
2024-08-07 20:35:18 +00:00
Marek Olšák
97d664b22f ac/surface/gfx12: turn off HiZ for pre-production samples
Fixes: f703dfd1bb - radeonsi: add gfx12

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30525>
2024-08-07 20:35:18 +00:00
Mike Blumenkrantz
b594d64464 llvmpipe: init fd=-1 to avoid closing fd=0 on failure
this otherwise breaks the universe

Fixes: d21aa86b54 ("llvmpipe: Implement EGL_ANDROID_native_fence_sync")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30554>
2024-08-07 20:08:11 +00:00
Iván Briano
90defc0087 anv: handle VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30329>
2024-08-07 19:09:55 +00:00
Iván Briano
7fce39484e nir: add pass to convert ViewIndex to DeviceIndex
Used to implement VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30329>
2024-08-07 19:09:55 +00:00
Georg Lehmann
b6d3f666ab nir/peephole_select: ignore masked/quad swizzle without fetch_inactive
Without fetch_inactive, these instructions need to return 0 for inactive lanes
and peephole_select changes which instructions are inactive.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30540>
2024-08-07 20:21:05 +02:00
Eric Engestrom
9568976c52 android: fix build in multiple ways
Includes the libgallium versioning, the megadriver hardlink -> symlink
change, and some fixes for things like abusing ls output.

backport-to: 24.2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30470>
2024-08-07 18:07:09 +00:00
Guilherme Gallo
ae15b656ef bin/ci: crnm: Use frozen set for statuses
Let's be defensive and use `frozenset` from Python to avoid changing
global variables during the runtime (or any static part of code).

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30526>
2024-08-07 17:25:46 +00:00
Guilherme Gallo
24d64102fe bin/ci: crnm: Don't overwrite the global sets
The skip_follow_statuses variable, used to check if we need to stay
monitoring the pipeline instead of jumping to the target job traces, is
based on COMPLETED_STATUSES set. But, in Python, we do shallow copies by
default, and changes on skip_follow_statuses reflected on
COMPLETED_STATUSES, which was making manual dependencies stop playing
when --force-manual was not given.

Fixes: 84d401aebf0832741716f947dd7e2e9aac1221ac

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30526>
2024-08-07 17:25:46 +00:00
Agate, Jesse
282ad9d864 amd/vpelib: Refactor frontend and backend config callback
Refactor and rename frontend and backend config callback.

Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Alan Liu
4886ee5caf amd/vpelib: Amend log for tone map support check
[Why & How]
Amend the log when failing to support tone mapping.

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Reviewed-by: Jude Shih <Jude.Shih@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Alan Liu <haoping.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Kovac, Krunoslav
c5e2c4feaf amd/vpelib: Refactor MPC registers
Refactor MPC registers.
3DLUT programming is largely the same but register are renamed to be in
VPMPC_RMCM (as opposed to VPMPCC_MCM). Note that they are still inside
MCM so governed by MCM control location.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Agate, Jesse
63d8fa3f28 amd/vpelib: Refactor structs for API change
Refactor structs for API change.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Jesse Agate <Jesse.Agate@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Hsieh, Mike
5e3b3ed8f7 amd/vpelib: Refactor OPP registers
Refactor OPP registers.

---------

Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Kovac, Krunoslav
914eb0a212 amd/vpelib: MPC refactoring HW registers
In order to be able to share HW registers, some refactoring
is needed.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Assadian, Navid
a76d1aa565 amd/vpelib: Fix whitepoint for geometric downscaling
Fix whitepoint for geometric down scaling.

---------

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Visan, Tiberiu
30a28b76c8 amd/vpelib: set the same range for clr adj
Change the range for color adjustments and also modify bright cap.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Tiberiu Visan <Tiberiu.Visan@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Assadian, Navid
e1ef91ac2a amd/vpelib: Fix CS translation for geometric downscaling
Geometric downscaling uses RGB10 as the intermediate format. The support for P601 and JFIF with RGB formats is added.

Co-authored-by: Roy Chan <roy.chan@amd.com>
Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Assadian, Navid
699f88f844 amd/vpelib: Add API function to get taps
A module to calculate the number of taps is added to the API.
Additionally, the get_optimal_taps module is moved from dpp to resource.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Assadian, Navid
4fc221524c amd/vpelib: Change Max DS support to 4:1
Since VPE can use upto 8 taps, for quality purpose vpelib cannot support
downscaling ratio more than 4:1. The caps value needed to be modified to
reject this case earlier.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Navid Assadian <navid.assadian@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Kovac, Krunoslav
e6dd0de4d9 amd/vpelib: DPP starting changes
Refactor DPP registers to split into common and version specific.

Gamut remap for DPP will likely move to MPC. For this, we need MPC changes
and refactor program_front_end/back_end so the correct block does it.

Reviewed-by: Roy Chan <Roy.Chan@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Lin, Ricky
54d1d41e10 amd/vpelib: Added JFIF format to RGB output side
Added JFIF format to RGB output side, due to geometric scaling will
change cs parameter to JFIF.

---------

Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: rickylin <ricky.lin@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Hsieh, Mike
746556d585 amd/vpelib: Remove deprecated update_3dlut flag
[WHY & HOW]
update_3dlut flag has been replaced by UID mechanism.
Remove update_3dlut flag and update related functions.

Reviewed-by: Jesse Agate <jesse.agate@amd.com>
Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
2024-08-07 16:46:25 +00:00
Paulo Zanoni
0e38b794e2 intel: fix compute SLM sizes on Xe2 and newer
Before the patch, intel_device_info_get_max_preferred_slm_size()
returns values in kilobytes, but then
intel_device_info_get_max_slm_size() is multiplying it by 1024.
As a result, LNL is reporting maxComputeSharedMemorySize to be
134217728, which is 128mb.

Fix this by making intel_device_info_get_max_slm_size() not multiply
it by 1024.

This should fix at least the following dEQP tests:
    dEQP-VK.compute.pipeline.zero_initialize_workgroup_memory.max_workgroup_memory.1
    dEQP-VK.compute.pipeline.zero_initialize_workgroup_memory.max_workgroup_memory.128
    dEQP-VK.compute.pipeline.zero_initialize_workgroup_memory.max_workgroup_memory.16
    dEQP-VK.compute.pipeline.zero_initialize_workgroup_memory.max_workgroup_memory.2
    dEQP-VK.compute.pipeline.zero_initialize_workgroup_memory.max_workgroup_memory.4
    dEQP-VK.compute.pipeline.zero_initialize_workgroup_memory.max_workgroup_memory.64

Some tests were failing with:
    deqp-vk: ../../src/intel/common/intel_compute_slm.c:24: slm_encode_lookup: Assertion `kbytes <= table[table_len - 1].size_in_kb' failed.
while other tests were triggering the OOM.

v2:
 - Make everybody return sizes in bytes (José).
v3:
 - Rename variable to bytes (José, Jordan).

Fixes: fd368f5521 ("anv: Set maxComputeSharedMemorySize value for Xe2 platforms")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30541>
2024-08-07 16:14:02 +00:00
Sil Vilerino
a0f1a708c4 Revert "d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported"
This reverts commit d6bb4ddc63.
Fixes: d6bb4ddc63 ("d3d12: Video Encode - Remove PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE as not supported")

PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE is necessary for some scenarios like the example below
described in https://github.com/microsoft/WSL/issues/11838

gst-launch-1.0 -v videotestsrc num-buffers=250 !
    video/x-raw,width=1920,height=1200 !
    vaapipostproc !
    vaapih264enc !
    filesink location=~/wsl_test.h264

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30548>
2024-08-07 15:51:19 +00:00
Nanley Chery
54631ebc68 anv: Batch MCS and CCS aux-op flushes
The PRMs suggest that certain classes of auxiliary surface operations
will automatically synchronize when performed back-to-back:

  Any transition from any value in {Clear, Render, Resolve} to a
  different value in {Clear, Render, Resolve} requires end of pipe
  synchronization.

Make use of this functionality by batching CCS and MCS flushes when
compatible auxiliary surface operations are performed within a command
buffer.

Ref: 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/29922>
2024-08-07 15:25:37 +00:00
Nanley Chery
f854161928 anv,iris: Use WriteImmediate instead of Z flush for WA
According to the HSD, this is an alternative option for Wa_14016712196.
Taking this option allows us to combine this workaround with a couple
other depth workarounds. Make sure to execute these workarounds before
the workaround for the depth register mode, so that the stalling flush
is not impacted.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29922>
2024-08-07 15:25:37 +00:00
Nanley Chery
db6ae41c65 intel/blorp: Use WA helpers for depth pipecontrol
Instead of unconditionally emitting a pipe control on gfx11+, use the
workaround helpers for workarounds 1408224581 and 14014097488. Also, add
a check for workaround 14016712196, which is also impacted.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29922>
2024-08-07 15:25:37 +00:00
Nanley Chery
77e4f9690d anv: Drop flush from unused depth workaround
This flush was introduced with the following commits:
8949d27bb8 ("anv: implement gen9 post sync pipe control workaround")
bcb611361b ("anv: implement gen12 post sync pipe control workaround")

The flush was unsued with the following commit:
e79e1ca304 ("intel: Drop Tigerlake revision 0 workarounds")

This prevents some extra pipecontrols caused by a following patch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29922>
2024-08-07 15:25:37 +00:00
Zan Dobersek
f58e1ef7ec tu: enable shaderInt8 support
Enable the shaderInt8 Vulkan feature for Turnip.

As final necessary changes, an assert for nir_op_imul is tweaked to also
allow 8-bit multiplication, and nir_op_bcsel's conversion of the
conditional value from 8 to 32 bits is applied through masking, like in the
general conversion case.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10675
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29875>
2024-08-07 14:32:28 +00:00
Zan Dobersek
e30c329026 ir3: improve validation, display for ldp instructions
During validation, an ldp instruction should have all its three source
registers validated. For display, the half-type register name should be
displayed when applicable.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29875>
2024-08-07 14:32:28 +00:00
Zan Dobersek
55ac28954e ir3: indicate possible dword straddle for any multi-component pvtmem access
When filling out ir3_info, any multi-component stp or ldp instruction
should indicate possible straddle across dword boundaries. This indirectly
prevents setting the PERWAVEMEMLAYOUT flag on the SP_VS_PVT_MEM_SIZE
register, enabling proper functioning of three-component 8-bit accesses
with natural alignment.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29875>
2024-08-07 14:32:28 +00:00
Zan Dobersek
9e0b77d5c3 ir3: use fully-functional dp4acc when available
a750 improves dp4acc to have support for all dot product variants. The
main difference with dp4acc of previous generations is that the signedness
and packed instruction fields have to be instead interpreted as signedness
of either side of the dot product.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29875>
2024-08-07 14:32:28 +00:00
Zan Dobersek
8aa2cad5df ir3: lower relevant 8-bit ALU ops in nir_lower_bit_size
The nir_lower_bit_size pass is used to properly adapt specific 8-bit ALU
operations for correct behavior. In those cases inputs are converted to
16 bits and the result is converted back down to 8 bits.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29875>
2024-08-07 14:32:28 +00:00
Zan Dobersek
7fd5f76393 nir/lower_vars_to_scratch: calculate threshold-limited variable size separately
ir3's lowering of variables to scratch memory has to treat 8-bit values as
16-bit ones when comparing such value's size against the given threshold
since those values are handled through 16-bit half-registers. But those
values can still use natural 8-bit size and alignment for storing inside
scratch memory.

nir_lower_vars_to_scratch now accepts two size-and-alignment functions,
one used for calculating the variable size and the other for calculating
the size and alignment needed for storing inside scratch memory. Non-ir3
uses of this pass can just duplicate the currently-used function. ir3
provides a separate variable-size function that special-cases 8-bit types.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29875>
2024-08-07 14:32:28 +00:00
Zan Dobersek
f8602612ed ir3: some 8-bit subgroup intrinsics must execute as 16-bit instructions
ir3 8-bit quad-broadcast, quad-swap, scan and reduce instructions only
work correctly when done in 16-bit space. A nir_lower_bit_size pass is
used to upcast the source value and then downcast the result back to 8
bits.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29875>
2024-08-07 14:32:28 +00:00
Danylo Piliaiev
8b7beca572 tu: Enable UBWC for D24S8 with USAGE_SAMPLED and formatless border color
DXVK and VKD3D-Proton use customBorderColorWithoutFormat and have most of
D24S8 images with USAGE_SAMPLED, in such case we disable UBWC for correctness.
However, games don't use border color for depth-stencil images. So we elect
to ignore this edge case and force UBWC to be enabled.

See also https://github.com/doitsujin/dxvk/issues/4191

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30545>
2024-08-07 13:51:20 +00:00
Karol Herbst
012323a1d1 rusticl/image: properly sync mappings content for 1Dbuffer images
This fixes clFillImage 1Dbuffer use_pitches CL CTS tests.

Fixes: 7b22bc617b ("rusticl/memory: complete rework on how mapping is implemented")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30528>
2024-08-07 13:38:06 +00:00
Karol Herbst
2484331e82 rusticl/image: take pitches into account when allocating memory for maps
This is more correct than the previous code and the CL CTS relies on edge
case behavior here, e.g. for 1Dbuffer images.

I think part of that is not actually required by the spec, but whatever.

Fixes: 7b22bc617b ("rusticl/memory: complete rework on how mapping is implemented")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30528>
2024-08-07 13:38:06 +00:00
Karol Herbst
1fa288b224 rusticl/memory: Fix memory unmaps after rework
An application could map and unmap a host ptr allocation multiple times,
but because how the refcounting works, we might never ended up syncing the
written data to the mapped region.

This moves the refcounting out of the event processing.

Fixes: 7b22bc617b ("rusticl/memory: complete rework on how mapping is implemented")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30528>
2024-08-07 13:38:05 +00:00
Eric Engestrom
b6d8459e3a ci: pass MESA_SPIRV_LOG_LEVEL from job to the test
Fixes: 4b8735cd4e ("ci: raise the log level threshold of spirv logs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30546>
2024-08-07 11:43:25 +02:00
Mike Blumenkrantz
ef88af8467 dril: always take the egl init path
using EGL_DEFAULT_DISPLAY will cover the swrast case, which
fixes generating all the correct configs

Fixes: ec7afd2c24 ("dril: rework config creation")

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30426>
2024-08-07 08:54:40 +00:00
Iago Toral Quiroga
086ed1e54b broadcom/compiler: emit instructions producing flags earlier
We usually emit flags right before consuming them but this is
suboptimal from the point of view of register pressure: if an
instruction is only used to generate flags then waiting to emit
it right before reading the flags extends the liveness of the
sources used to generate the flags for no gain. This pass will
check for such instructions and try to move them as early as
possible.

Shader-db results below show this is effective to reduce register
pressure, allowing a few shaders to increase thread counts and/or
reduce spilling:

total instructions in shared programs: 11057173 -> 11057076 (<.01%)
instructions in affected programs: 1955543 -> 1955446 (<.01%)
helped: 4214
HURT: 3905
Inconclusive result (value mean confidence interval includes 0).

total threads in shared programs: 425096 -> 425170 (0.02%)
threads in affected programs: 74 -> 148 (100.00%)
helped: 37
HURT: 0
Threads are helped.

total uniforms in shared programs: 3846275 -> 3845674 (-0.02%)
uniforms in affected programs: 23574 -> 22973 (-2.55%)
helped: 217
HURT: 30
Uniforms are helped.

total max-temps in shared programs: 2222910 -> 2220488 (-0.11%)
max-temps in affected programs: 61904 -> 59482 (-3.91%)
helped: 2145
HURT: 113
Max-temps are helped.

total spills in shared programs: 4294 -> 4280 (-0.33%)
spills in affected programs: 148 -> 134 (-9.46%)
helped: 8
HURT: 0

total fills in shared programs: 6497 -> 6468 (-0.45%)
fills in affected programs: 291 -> 262 (-9.97%)
helped: 8
HURT: 0

total sfu-stalls in shared programs: 14344 -> 14611 (1.86%)
sfu-stalls in affected programs: 1308 -> 1575 (20.41%)
helped: 217
HURT: 335
Inconclusive result (%-change mean confidence interval includes 0).

total inst-and-stalls in shared programs: 11071517 -> 11071687 (<.01%)
inst-and-stalls in affected programs: 1946767 -> 1946937 (<.01%)
helped: 4191
HURT: 3909
Inconclusive result (value mean confidence interval includes 0).

total nops in shared programs: 270628 -> 269829 (-0.30%)
nops in affected programs: 22032 -> 21233 (-3.63%)
helped: 1213
HURT: 571
Inconclusive result (%-change mean confidence interval includes 0).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30511>
2024-08-07 09:28:39 +02:00
Georg Lehmann
d9849ac466 aco: test xor swap16 path
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30515>
2024-08-06 20:40:12 +00:00
Georg Lehmann
e0818cb87b aco/gfx11+: don't use VOP3 v_swap_b16
v_swap_b16 is not offically supported as VOP3, so it can't be used with v128-255.
Tests show that VOP3 appears to work correctly, but according to AMD that should
not be relied on.

https://github.com/llvm/llvm-project/pull/100442#discussion_r1703929676

Foz-DB Navi31:
Totals from 6 (0.01% of 79395) affected shaders:
Instrs: 64799 -> 65932 (+1.75%)
CodeSize: 360180 -> 368440 (+2.29%)
Latency: 1364648 -> 1365922 (+0.09%)
InvThroughput: 635843 -> 636475 (+0.10%)
Copies: 14766 -> 15698 (+6.31%)
VALU: 38743 -> 39675 (+2.41%)

Fixes: 80b8bbf0c5 ("aco/gfx11: use v_swap_b16")

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30515>
2024-08-06 20:40:12 +00:00
Alyssa Rosenzweig
796b3ab23d nir/opt_peephole_select: allow speculatable load constant
this is useful on AGX when soft fault is enabled.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30501>
2024-08-06 20:01:37 +00:00
Aditya Swarup
ae85f59645 anv: Disable fast clear when surface height is 16k
As suggested in WA_16021232440: Disable fast clear when surface height
equals 16k.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29182>
2024-08-06 19:14:04 +00:00
Aditya Swarup
0f821c1e2f iris: Disable fast clear when surface height is 16k
If surface height during fast clear is 16k, as per bspec the height programmed
should be "value - 1" i.e. 0x3FFF. However, HW adds "1" to it but ignores
overflow bit[14]. HW performs OOB check based on bit[13:0] which is 0 and
drops failed transactions.

This patch passes the following failing test on LNL:
"PIGLIT_PLATFORM=gbm PIGLIT_DEFAULT_SIZE=16384x16384
shader_runner fast-slow-clear-interaction.shader_test -auto -fbo"

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29182>
2024-08-06 19:14:04 +00:00
Lionel Landwerlin
6145798022 intel/mi_builder: enable control flow API on Gfx9+
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/30539>
2024-08-06 17:55:19 +00:00
Lionel Landwerlin
8cc492cb26 genxml: unify some bits between Gfx8/Gfx11/Gfx12.5
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/30539>
2024-08-06 17:55:18 +00:00
Lionel Landwerlin
343e569ab7 anv: ensure max_plane_count is at least 1
This simplifies a bunch of checks throughout the driver.

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/30539>
2024-08-06 17:55:18 +00:00
Lionel Landwerlin
4f093b2e2b anv: add missing MEDIA_STATE_FLUSH for internal shaders
Replicating what we do in genX_cmd_compute.c

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7ca5c84804 ("anv: add support for simple internal compute shaders")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30539>
2024-08-06 17:55:18 +00:00
Lionel Landwerlin
0bd96e868c intel-clc: missing printf lowering
Useful for printf() debugging in our opencl shader snippets.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30539>
2024-08-06 17:55:18 +00:00
Lionel Landwerlin
398e6cf38b anv: reuse cs_prog_data pointer
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/30539>
2024-08-06 17:55:18 +00:00
Lionel Landwerlin
f4a812a229 anv: remove some unused includes
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/30539>
2024-08-06 17:55:18 +00:00
Lionel Landwerlin
cde72181b7 anv: prevent asserts with debug printf in internal 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/30539>
2024-08-06 17:55:18 +00:00
Kenneth Graunke
32cce2f397 intel/brw: Set appropriate types for 16-bit sampler trailing components
16-bit SIMD8 sampler writeback messages come with a bit of padding in
them, requiring us to emit a LOAD_PAYLOAD to reorganize the data into
the padding-free format expected by NIR.  Additionally, we may reduce
the response length on the sampler messages based on which components
of the (always vec4) NIR destination are actually in use.  When we do
that, dest_size > read_size, and the trailing components are all empty
BAD_FILE registers, indicating the contents are undefined.

Unfortunately, we can't ignore those trailing components entirely.
In the past, we left them default-initialized, giving us a BAD_FILE
register with UD type (which didn't matter, since all sampler returns
were 32-bit).  But with 16-bit, this was confusing the LOAD_PAYLOAD.
For example, writing RGB and skipping A (without sparse) would produce
read_size = 3 and dest_size = 4 and nir_dest[5] containing:

   nir_dest[] = <R:hf, G:hf, B:hf, blank-A:ud, blank-sparse:ud>

We'd then call LOAD_PAYLOAD on the first 4 sources, causing it to see
3 HF's and a UD, and try to copy the full 32-bit value at the end,
instead of 16-bits of pad like we intended.  This meant it would
overflow the destination register's size, triggering validation errors.

Thanks to Ian Romanick for noticing this, writing a test, and also
coming up with a nearly identical fix.

Fixes: 0116430d39 ("intel/brw: Handle 16-bit sampler return payloads")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11617
References: https://gitlab.freedesktop.org/mesa/crucible/-/merge_requests/152
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/30529>
2024-08-06 17:26:05 +00:00
Tatsuyuki Ishi
947a333ec3 util/u_queue: Replace relative time wait hack with u_cnd_monotonic
Remove the gross hack. The hack was broken too, because it incorrectly
added abs_time (a timestamp) to the now (another timestamp).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30491>
2024-08-06 16:37:59 +00:00
Alyssa Rosenzweig
c40c723336 agx: use opt_uniform_atomics
Apple does something similar.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30488>
2024-08-06 11:48:18 -04:00
Alyssa Rosenzweig
39e7d06eea agx: add some SRs
the subgroup one seen in metal uniform atomic code, the quad one is by
symmetry.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30488>
2024-08-06 11:48:18 -04:00
Alyssa Rosenzweig
340831dbcc nir/divergence_analysis: handle AGX stuff
bunch of vendor intrinsics, plus some standard intrinsics used in weird shader
stages.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30488>
2024-08-06 11:48:18 -04:00
Alyssa Rosenzweig
d99c2ef059 nir/opt_uniform_atomics: add fs atomics predicated? flag
on agx (and mali), we predicate atomics on "if (!helper)", so doing so again in
this pass is redundant. and would cause a problem since we'd then have to lower
the "is helper inv?" flag late. so just skip the extra lowering code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30488>
2024-08-06 11:48:17 -04:00
Alyssa Rosenzweig
fbbdc965aa asahi: don't count helper invs in pipeline stats query
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30488>
2024-08-06 11:48:04 -04:00
Alyssa Rosenzweig
75d07cc3d0 agx: fix ballot extend packing
hit with uniform atomic ops with tessellation.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30488>
2024-08-06 11:48:03 -04:00
Rhys Perry
810808b778 nir/opt_uniform_atomics: require block index metadata
is_atomic_already_optimized() uses this.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30518>
2024-08-06 15:04:21 +00:00
Rhys Perry
373851e7ee docs: update ACO_DEBUG documentation for perfwarn
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: cc404d45ff ("aco: remove perfwarn")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30519>
2024-08-06 14:58:44 +00:00
Rhys Perry
e45035c83a docs: update ACO_DEBUG documentation for scheduler options
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 48461c0d9e ("aco: enable VOPD scheduler")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30519>
2024-08-06 14:58:44 +00:00
David Rosca
0c024bbe64 radeonsi/vcn: Add decode DPB buffers as CS dependency
This is needed to ensure correct synchronization in kernel eg. when it
moves the buffers between VRAM and GTT.

Backport-to: 24.2
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3437
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11624
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30510>
2024-08-06 14:09:50 +00:00
Surafel Assefa
979dc41558 vulkan: MESA_VK_ENABLE_SUBMIT_THREAD=0 disables threaded submit
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30492>
2024-08-06 13:19:40 +00:00
Iago Toral Quiroga
d58f7a24d1 v3d: do not expose EXT_float_blend
This extension is all about exposing blending with 32-bit floating
point formats, which V3D doesn't support at all so we should not
be exposing it.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30512>
2024-08-06 10:33:10 +00:00
Alvin Wong
0413e1f7dc hasvk: Conditionally expose VK_KHR_present_wait
Gate it behind driconf query for now.

Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Acked-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30480>
2024-08-06 11:39:38 +08:00
Kenneth Graunke
c19e5a0a75 intel/brw: Replace predicated break optimization with a simple peephole
We can achieve most of what brw_fs_opt_predicated_break() does with
simple peepholes at NIR -> BRW conversion time.

For predicated break and continue, we can simply look at an IF ... ENDIF
sequence after emitting it.  If there's a single instruction between the
two, and it's a BREAK or CONTINUE, then we can move the predicate from
the IF onto the jump, and delete the IF/ENDIF.  Because we haven't built
the CFG at this stage, we only need to remove them from the linked list
of instructions, which is trivial to do.

For the predicated while optimization, we can rely on the fact that we
already did the predicated break optimization, and simply look for a
predicated BREAK just before the WHILE.  If so, we move the predicate
onto the WHILE, invert it, and remove the BREAK.

There are a few cases where this approach does a worse job than the old
one: nir_convert_from_ssa may introduce load_reg and store_reg in blocks
containing break, and nir_trivialize_registers may decide it needs to
insert movs into those blocks.  So, at NIR -> BRW time, we'll actually
emit some MOVs there, which might have been possible to copy propagate
out after later optimizations.

However, the fossil-db results show that it's still pretty competitive.
For instructions, 1017 shaders were helped (average -1.87 instructions),
while only 62 were hurt (average +2.19 instructions).  In affected
shaders, it was -0.08% for instructions.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30498>
2024-08-05 19:17:55 -07:00
Kenneth Graunke
fad63d6483 intel/brw: Delete the brw_fs_opt_dead_control_flow_eliminate() pass
With the select peephole gone, this no longer does much of anything.

No instruction changes in fossil-db on Alchemist.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30498>
2024-08-05 19:17:55 -07:00
Kenneth Graunke
06e8335e11 intel/brw: Delete the brw_fs_opt_peephole_select() pass
Now that we can handle load_ubo in NIR's peephole select pass, the
backend pass isn't really useful anymore.

fossil-db results on Alchemist show almost no impact:

   Totals:
   Instrs: 150646561 -> 150647106 (+0.00%); split: -0.00%, +0.00%
   Cycles: 12633748945 -> 12633760459 (+0.00%)

   Totals from 261 (0.04% of 630008) affected shaders:
   Instrs: 404946 -> 405491 (+0.13%); split: -0.00%, +0.14%
   Cycles: 23947172 -> 23958686 (+0.05%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30498>
2024-08-05 19:17:55 -07:00
Kenneth Graunke
7c579f448f intel/brw: Mark all UBO access with a direct buffer index as speculative
UBO loads with a non-indirect buffer index should be safe to perform
speculatively.  With a direct offset, we may sometimes turn them into
push constants, at which point it's just reading a register with no
cost at all.  Otherwise, we access them via messages that use surface
state, and automatically perform bounds checking.  So we shouldn't have
any issues with reading out of bounds and page faulting, for example.

This allows nir_opt_peephole_sel() to operate on load_ubo intrinsics,
so we can turn simple if's with loads on both sides to bcsels.  In some
cases this can collapse a surprising amount of control flow, allowing
other optimizations to work better.

The i965 OpenGL driver used load_uniform intrinsics, which are allowed
in NIR's peephole select pass.  But iris uses the Gallium NIR pass that
translates uniforms to loads from UBO 0, so we haven't been able to take
advantage of NIR's peephole select pass there.  The backend pass was
still able to handle this to some extent, however.

fossil-db results on Alchemist:

   Totals:
   Instrs: 150656329 -> 150645307 (-0.01%); split: -0.01%, +0.00%
   Cycles: 12635230179 -> 12633696811 (-0.01%); split: -0.02%, +0.00%
   Send messages: 7416330 -> 7416261 (-0.00%)
   Spill count: 52471 -> 52473 (+0.00%)
   Fill count: 100818 -> 100803 (-0.01%); split: -0.02%, +0.00%
   Scratch Memory Size: 3197952 -> 3198976 (+0.03%)

   Totals from 1848 (0.29% of 630003) affected shaders:
   Instrs: 1412300 -> 1401278 (-0.78%); split: -0.80%, +0.02%
   Cycles: 1809789567 -> 1808256199 (-0.08%); split: -0.11%, +0.03%
   Send messages: 59829 -> 59760 (-0.12%)
   Spill count: 3870 -> 3872 (+0.05%)
   Fill count: 9693 -> 9678 (-0.15%); split: -0.18%, +0.02%
   Scratch Memory Size: 174080 -> 175104 (+0.59%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30498>
2024-08-05 19:17:55 -07:00
Felix DeGrood
0eed818588 anv/measure: ignore events from reused command buffers
INTEL_MEASURE currently does not support measuring events in
parallel from reused command buffers. When this case is detected,
warn user and disallow. Fixes observed segfaults in such apps.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30523>
2024-08-05 23:45:41 +00:00
Timothy Arceri
140ca7e5d7 glsl: fix glsl to nir support for lower precision builtins
When we switch to the full nir based glsl linker in an upcomming merge
request this is required for existing tests from 8fcf8e7fd4 to
continue to pass, this is because they never exercised glsl to nir so
the missing support went unnoticed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11456
Fixes: 8fcf8e7fd4 ("glsl: lower builtins to mediump that ignore precision of certain parameters ")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30395>
2024-08-05 22:59:59 +00:00
Karol Herbst
50ce777edd rusticl/device: Make supported 1Dbuffer formats a strict subset of 1D
This works around a bug in the OpenCL CTS, which a few drivers here run
into.

Fixes a couple of tests with agx.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30514>
2024-08-05 22:17:43 +00:00
Iván Briano
f8553f56ac intel/rt: fix terminateOnFirstHit handling
If TraceRay() is called with the TerminateOnFirstHit flag, we need to
terminate the ray on the first confirmed intersection. This is handled
by the lowering of accept_ray_intersection and it's working fine for the
case of multiple instances of the intersection shader being called.

But if the shader calls reportIntersection() more than once, we were
handling them all and accepting the closest one regardless of the flag.

Check for the flag on every confirmed intersection and, if set, accept
it right there. The subsequent lowering will take care of terminating
handling the ray termination if necessary.

Fixes new test dEQP-VK.ray_tracing_pipeline.amber.flags-accept-first

Cc: mesa-stable

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30418>
2024-08-05 21:43:36 +00:00
Lionel Landwerlin
c6bf1f02c4 anv: reuse object string for RMV token
The current code is not handling the potential NULL pointer in
VkDebugUtilsObjectNameInfoEXT::pObjectName

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e1b9a6e4f3 ("anv: initial RMV support")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30516>
2024-08-05 21:12:59 +00:00
Lionel Landwerlin
ae9a249dfe vulkan/runtime: allow null/empty debug names
VkDebugUtilsObjectNameInfoEXT::pObjectName can be NULL [1] :

   "Applications may change the name associated with an object simply
    by calling vkSetDebugUtilsObjectNameEXT again with a new string. If
    pObjectName is either NULL or an empty string, then any previously
    set name is removed."

The current code will segfault.

[1] : https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap50.html#VkDebugUtilsObjectNameInfoEXT

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3b361b234a ("vulkan: Implement VK_EXT_debug_utils")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30516>
2024-08-05 21:12:59 +00:00
Mike Blumenkrantz
33a336309e egl: simplify multibuffers check
this is all x11 now, so all the extra checks are unnecessary

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
f5a340058d egl: move multibuffers check into platform_x11
there are no longer any extensions to bind, so this function has no
other purpose

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
8407e674cc egl: delete DRI_MUTABLE_RENDER_BUFFER_DRIVER remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
79b8ea9b76 egl/android: replace DRI_MUTABLE_RENDER_BUFFER_DRIVER check with non-kms_swrast check
this should be roughly equivalent

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
7452a1d853 egl: delete DRI2_BLOB remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
591bf3c153 egl: inline DRI2_BLOB
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
101e78152e dri: make DRI2_BLOB public
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
24a1651910 egl: delete DRI2_INTEROP remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
ccd0a4c1fe egl: always advertise MESA_gl_interop, inline calls
this matches GLX since the inner functions return support correctly

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
1d31a15b24 egl: delete DRI2_FENCE remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
3c692131ff egl: inline DRI2_FENCE
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
a19839e25d egl: don't check for create_fence_fd method when importing a fence
this is always supported

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
50b4be8d48 egl: simplify native fence check
this is the same conditional during init

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
b23acb801e egl: delete checks for DRI2_FENCE
this is supported everywhere

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
a19ba7d9f4 dri: make DRI2_FENCE public
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
c684a9b918 egl: delete DRI_TEX_BUFFER remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
f6c649a0ef egl: inline DRI_TEX_BUFFER
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
cb018b6883 egl: delete DRI_CONFIG_QUERY remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
d723991ded egl: inline DRI2_CONFIG_QUERY
this is always supported

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
197e4f2ae2 egl: delete DRI_FLUSH_CONTROL remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
6b7e6e3bdc egl: always advertise KHR_context_flush_control
this is supported by all dri interfaces

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
0ae2958452 egl: delete DRI_BUFFER_DAMAGE remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
591bc52e3e egl: inline DRI_BUFFER_DAMAGE
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
77e85377ae egl: use pipe_screen check for damage region, simplify buffer_damage checks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
e7b303c680 egl: add a util to get the pipe_screen
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
9d41f1f552 dri: make set_damage_region public
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
85d459fcec egl: simplify DRI_BUFFER_DAMAGE checks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:15 +00:00
Mike Blumenkrantz
f6afe277d3 dri: only add DRI_BUFFER_DAMAGE if the driver supports set_damage_region
100% of callers check both

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
f8fbec8e63 egl: delete DRI2_FLUSH remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
fd17c018e9 egl/wayland: replace a couple DRI2_FLUSH checks with non-kms_swrast checks
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
a98434d257 egl/drm: replace a DRI2_FLUSH check with a non-kms_swarst check
only (non-kms) swrast doesn't support this

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
b1f1046857 egl: replace a DRI2_FLUSH check with swrast check in x11_copy_buffers
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
1d41299109 egl: replace another DRI2_FLUSH check with a non-kms_swrast check in surface query
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
3b050af311 egl: inline DRI2_FLUSH usage
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
09b52c61bf egl: replace another DRI2_FLUSH check with non-kms_swrast check in dri2_wait_client
only (non-kms) swrast doesn't support this

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
e5f9d004bb egl: delete a DRI2_FLUSH check in dri2 swapbuffers
this is always true here

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
af3aefda04 egl: use a swrast check for a swapbuffers DRI2_FLUSH case
as the comment indicates, this is swrast. thus, check swrast

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
0ff37e7591 egl: use a non-kms_swrast check for swapbuffers DRI2_FLUSH
only swrast (non-kms) doesn't support this

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
a04f8cba53 gbm: delete DRI_FLUSH remnants
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
1ecb4c5cf7 gbm: inline DRI_FLUSH
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
484b50bd73 egl: add a bool to indicate swrast but not kms_swrast
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
3e7840ac37 egl: further simplify driver loading
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
a940f17ee1 egl: delete DRI_CONFIG_OPTIONS remnants
also simplify driver opening a little

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
7ea0091a19 egl: inline CONFIG_OPTIONS usage
this is always supported

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
0c220741e6 pipe-loader: fix driconf memory management
this had a number of issues:
* pipe_loader_get_driinfo_xml() frees driver_driconf immediately,
  except the driOptionCache struct string pointers are all just copied
  in merge_driconf instead of having the strings copied, which means any
  subsequent access of driver_driconf strings is invalid access
* pipe_loader_drm_get_driconf_by_name() is a disaster that only happened
  to work because the dlopen here is the same lib that gets opened elsewhere
  by mesa and not closed. if the lib here is actually closed, then all
  the statically allocated strings become invalid, which means they need to
  be manually copied

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Mike Blumenkrantz
390151bef2 gallium: make some sw screen create functions public
linkage fixes

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30494>
2024-08-05 20:33:14 +00:00
Juston Li
43cb986d9e anv/android: resolve ANB swapchain images on bind
Like AHB, we don't know the layout for an image backed by gralloc
swapchain memory until bind when gralloc information is passed by the
platform.

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29850>
2024-08-05 20:06:06 +00:00
Juston Li
bcb17acab9 anv/android: refactor out u_gralloc tiling query
Refactor out shared code for the u_gralloc tiling query so it can also
be used by ahw and later anb resolves.

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29850>
2024-08-05 20:06:06 +00:00
Marek Olšák
0e27df4521 radeonsi/gfx12: fix VS output corruption with streamout
We increased VS_EXPORT_COUNT to 8 for streamout in gfx10_shader_ngg,
but we forgot to increase the attribute ring stride, causing all waves
except the first one to get corrupted VS outputs.

Fixes: f703dfd1bb - radeonsi: add gfx12

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
2024-08-05 19:35:39 +00:00
Marek Olšák
8b3e02587e radeonsi: program OREO_MODE optimally on gfx11.x and gfx12
This fixes a rare performance regression since we stopped setting OREO_MODE.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
2024-08-05 19:35:39 +00:00
Marek Olšák
dd7e33d5b9 radeonsi/gfx11: prepare for CWSR
CWSR = compute wave save restore

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
2024-08-05 19:35:39 +00:00
Marek Olšák
07a0b5e2f2 radeonsi/gfx12: fix register programming to fix GPU hangs
Fixes: f703dfd1bb - radeonsi: add gfx12

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
2024-08-05 19:35:39 +00:00
Marek Olšák
83b88c54ba radeonsi: fix buffer coherency issues on gfx6-8,12 due to missing PFP->ME sync
This fixes random GPU hangs on gfx12 due to incoherent indirect buffer data,
causing random indirect vertex and instance counts, which timeouts if
the random numbers are large.

Fixes: a8abbbb172 - radeonsi: remove r600_pipe_common.h

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
2024-08-05 19:35:39 +00:00
Marek Olšák
72e6cefe00 radeonsi: don't set TC_L2_dirty in si_query_hw_get_result_resource
It's set automatically by 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/30503>
2024-08-05 19:35:39 +00:00
Marek Olšák
ebc5116e70 radeonsi: ensure TC_L2_dirty is set if we don't sync after internal SSBO blits
There was a case where if we don't sync, we wouldn't set TC_L2_dirty either,
which could cause problems later.

Fixes: f703dfd1bb - radeonsi: add gfx12

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
2024-08-05 19:35:39 +00:00
Marek Olšák
e4b3848fde radeonsi/gfx12: fix a GPU hang due to an invalid packet with window rectangles
I guess incorrect packet interrupts have been enabled, so this started hanging.

radeon_set_context_reg_seq shouldn't be used with gfx12_set_context_reg.

Fixes: f703dfd1bb - radeonsi: add gfx12

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
2024-08-05 19:35:39 +00:00
Marek Olšák
de83b5ef77 ac/surface/gfx12: fix setting tile_swizzle
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30503>
2024-08-05 19:35:39 +00:00
Thomas H.P. Andersen
0f665b8178 nvk: EXT_post_depth_coverage
EXT_post_depth_coverage was already wired up but the tests were
failing. Through experimentation I found that running them in
combination with SET_HYBRID_ANTI_ALIAS_CONTROL would cause the
tests to fail.

This patch simply skips SET_HYBRID_ANTI_ALIAS_CONTROL when post
depth coverage is in use

Test results for *post_depth_cover*:

Test run totals:
  Passed:        21/104 (20.2%)
  Failed:        0/104 (0.0%)
  Not supported: 83/104 (79.8%)
  Warnings:      0/104 (0.0%)
  Waived:        0/104 (0.0%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29194>
2024-08-05 19:26:04 +00:00
Faith Ekstrand
4090aa064f nvk: Set POST_PS_INITIAL_COVERAGE
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29194>
2024-08-05 19:26:04 +00:00
Faith Ekstrand
1ba4bc2ada nvk: Don't force sample shading when gl_SampleMaskIn[] is read
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29194>
2024-08-05 19:26:04 +00:00
Faith Ekstrand
b8d50542c0 nak,nir: Rework gl_SampleMaskIn[] handling
The pixld.covmask instruction returns the coverage mask for the entire
pixel being shaded, not the set of samples covered by the current FS
invocation as required by GL/Vulkan.  In order to get the GL/Vulkan
behavior, we have to mask off samples not covered by the current FS
invocation.

Previously, we handled this by masking by 1 << gl_SampleID.  This
required us to force full sample shading whenever gl_SampleMaskIn[] was
used.  Otherwise, we didn't know what to mask.  Instead, this commit
switches us to using an array in CB0 which has a sample mask for each
sample, representing the set of samples in that sample's pass.  Masking
by this allows us to get the full range of variability provided by
NVIDIA's multi-pass MSAA hardware.  It also allows us to eliminate the
workaround that forced per-sample shading for gl_SampleMaskIn[] because
we can adjust the masks from the API side as needed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29194>
2024-08-05 19:26:04 +00:00
Faith Ekstrand
761874ea85 nak: Sample locations are byte-aligned
Fixes: cc33cafcac ("nak/nir: Use an indirect load for sample locations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29194>
2024-08-05 19:26:03 +00:00
Faith Ekstrand
315b788c7b nvk: Move nvk_sample_location to NAK
It's part of the NAK compiler interface so that's where it should live.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29194>
2024-08-05 19:26:03 +00:00
Paulo Zanoni
644dcc0337 anv: disable CCS for Source2 games on Xe2
Dota 2 and Counter-Strike 2 really want to be able to allocate memory
for both VkImages and VkBuffers from the same memory type. Xe2's
special compression-only memory type does not support buffers, which
makes these games crash. Disable CCS on these games as a workaround.

This is a temporary workaround as we're still working towards a
long-term solution (either by fixing the engine or finding a way
better expose our memory types).

Backport-to: 24.2
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11520
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11521
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30481>
2024-08-05 18:36:46 +00:00
Paulo Zanoni
b4f5a04223 anv: don't expose the compressed memory types when DEBUG_NO_CCS
These memory types are useless when CCS is disabled, don't leave them
there so they don't confuse applications.

Backport-to: 24.2
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30481>
2024-08-05 18:36:46 +00:00
Caio Oliveira
ba3fd5dc57 intel/brw: Don't retype load_subgroup_invocation result to signed
The values are small unsigned integers, so their signed representation
will be the same -- the sign conversion is not needed.  As a result the
extra MOV can be elided by the optimizations.

Fossil-db results for DG2

```
Totals:
Instrs: 151779000 -> 151761591 (-0.01%)
Cycle count: 12743968649 -> 12742826024 (-0.01%); split: -0.01%, +0.00%
Max live registers: 31834993 -> 31834996 (+0.00%)

Totals from 17018 (2.70% of 631450) affected shaders:
Instrs: 2381740 -> 2364331 (-0.73%)
Cycle count: 76798588 -> 75655963 (-1.49%); split: -1.70%, +0.22%
Max live registers: 378921 -> 378924 (+0.00%)
```

and TGL

```
Totals:
Instrs: 149812033 -> 149794080 (-0.01%); split: -0.01%, +0.00%
Cycle count: 11534727002 -> 11534929834 (+0.00%); split: -0.01%, +0.01%
Spill count: 42510 -> 42511 (+0.00%); split: -0.00%, +0.01%
Fill count: 75100 -> 75101 (+0.00%); split: -0.00%, +0.00%
Max live registers: 31727318 -> 31727321 (+0.00%)

Totals from 17421 (2.76% of 630458) affected shaders:
Instrs: 3092614 -> 3074661 (-0.58%); split: -0.58%, +0.00%
Cycle count: 286061417 -> 286264249 (+0.07%); split: -0.32%, +0.39%
Spill count: 11538 -> 11539 (+0.01%); split: -0.02%, +0.03%
Fill count: 21359 -> 21360 (+0.00%); split: -0.01%, +0.01%
Max live registers: 418954 -> 418957 (+0.00%)
```

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30508>
2024-08-05 18:05:45 +00:00
Felix DeGrood
86c4e89aa2 anv: fix src_hash dumping for compute shaders
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30495>
2024-08-05 16:46:42 +00:00
Alejandro Piñeiro
28df772935 v3dv: expose Vulkan 1.3
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10896

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29476>
2024-08-05 15:10:24 +00:00
Alejandro Piñeiro
3ae4da4ea7 v3dv: update conformanceVersion to 1.3.8.3
As we used as reference to check if we fully pass Vulkan 1.3

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29476>
2024-08-05 15:10:24 +00:00
Alejandro Piñeiro
781622ba5b v3dv/device: set value for maxInlineUniformTotalSize
Fixes the following test, as far as you enable Vulkan 1.3 (if not it
is skipped):

dEQP-VK.api.info.vulkan1p3_limits_validation.max_inline_uniform_total_size

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29476>
2024-08-05 15:10:24 +00:00
José Roberto de Souza
132c5cdeb9 intel/dev: Support new topology type with SIMD16 EUs
Xe KMD will now report the different topology mask types based on the
type of the EU of running platform.
With this we don't need to divide the EU count by 2 in intel_perf.

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/30127>
2024-08-05 07:01:47 -07:00
José Roberto de Souza
3da911b092 intel: Sync xe_drm.h
Sync xe_drm.h with f2881dfdaaa9 ("drm/xe/oa/uapi: Make bit masks unsigned").

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/30127>
2024-08-05 07:00:10 -07:00
Job Noorman
3a26925cc7 ir3/postched: don't prioritize instructions with soft delays
Before resorting to scheduling instructions based on max_delay only,
postsched would prioritize instructions that have no hard delay (i.e.,
delays for which nops should be inserted) but might still have soft
delays (for which ss/sy needs to be inserted). Removing this has a
slight negative effect on nops but improves sstall/systall. This seems
to improve actual render pass time.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30437>
2024-08-05 12:20:03 +00:00
Job Noorman
c7de402ad5 ir3/postsched: include ss/sy delay in max_delay
max_delay is a measure for the maximum delay from a node to the end of a
block so it should include all types of delay.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30437>
2024-08-05 12:20:03 +00:00
Job Noorman
8f52f941ef ir3/postsched: remove unused delay field
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30437>
2024-08-05 12:20:03 +00:00
Job Noorman
8cc269a16f ir3/postsched: fix calculation of max_delay
max_delay is a measure for the maximum delay from a node to the end of a
block. However, the current calculation would include the delay of the
node itself (which is the maximum delay from the node's sources). At the
point a node is scheduled, this source delay might already be much
smaller (or even zero) because its sources have hopefully been scheduled
much earlier. This means the max_delay value would be an overestimate of
the actual delay from the node to the block's end.

This commit fixes this and makes sure max_delay is always the maximum
delay from a node to the end of the block from the point where the node
is scheduled.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30437>
2024-08-05 12:20:03 +00:00
Job Noorman
db21255d72 ir3/postsched: improve debug state dumping
- Print all different delay info per node.
- Allow the DAG to be dumped up to a customizable depth.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30437>
2024-08-05 12:20:03 +00:00
Collabora's Gfx CI Team
1d35b2f343 Uprev Piglit to 4a62c26721a47552a96416a134b789a813dd51a6
582f5490a1...4a62c26721

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30254>
2024-08-05 10:45:38 +00:00
Rhys Perry
8f3d0fbad7 aco: don't transform v_interp_p2_f32 with constant into fma
Since v_interp_p2_f32 with constant operands only happens on GFX11.5, this
should actually be fine in all cases where this is currently possible
(GFX11.5+ allows DPP with scalar src1). However, it does fail validation
because we haven't updated that yet.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: bee487df48 ("aco/gfx11.5+: use vinterp for fddx/fddy")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30477>
2024-08-05 09:32:24 +00:00
Rhys Perry
911fdce0b6 aco: fix validation of v_s_ opcodes
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 284b9965e8 ("aco/gfx11.5+: allow sgpr dst for trans ops and use pseudo scalar ops on gfx12")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30477>
2024-08-05 09:32:24 +00:00
Karol Herbst
b3e925a21b rusticl/kernel: properly respect device thread limits per dimension
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30504>
2024-08-04 23:00:08 +00:00
Karol Herbst
b2225b9437 zink: lower 8/16 bit alu ops vk spirv doesn't allow
Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30504>
2024-08-04 23:00:08 +00:00
Karol Herbst
39ec184db6 zink: lower 64 bit find_lsb, ufind_msb and bit_count
Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30504>
2024-08-04 23:00:08 +00:00
Eric Engestrom
9155e0a887 ci/deqp-runner: fix --fraction-start in non-parallel jobs
`CI_NODE_INDEX` is only defined in `parallel:` jobs.

Without this, we end up with `--fraction-start --fraction 1`, which is
obviously invalid but somehow it hasn't blown up (yet).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30462>
2024-08-04 20:40:26 +00:00
David Heidelberg
366e7e2ddc freedreno: drop dEQP hacks
Not necessary since ceece45b2b ("freedreno: drop hack for old dEQP").

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30497>
2024-08-04 05:27:30 +09:00
Lionel Landwerlin
97f6a296e3 anv: better signal new frames to utrace
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29944>
2024-08-03 16:03:15 +03:00
Lionel Landwerlin
bc523e8949 util/debug: update parse_enable_string to deal with +all/-all
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29944>
2024-08-03 16:03:13 +03:00
Lionel Landwerlin
4b1e3b8515 u_trace: add csv output
Some of my colleagues have scripts using CSV format for measuring
frame timing.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29944>
2024-08-03 16:03:07 +03:00
Lionel Landwerlin
78ae7ab856 anv/hasvk: add indirect tracepoint arguments
Gives visibility on some indirect parameter dispatches :
  - draw count
  - compute dispatch size

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29944>
2024-08-03 16:03:04 +03:00
Lionel Landwerlin
0a17035b5c u_trace: add support for indirect data
Allows a driver to declare indirect arguments for its tracepoints and
pass an address. u_trace will request a copy of the data which should
be implemented on the command processor.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Co-Authored-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29944>
2024-08-03 16:03:00 +03:00
Lionel Landwerlin
cb27b9541b u_trace: remove timestamp reference in allocations
We want to reduce the buffer allocations for other type of data than
timestamps.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29944>
2024-08-03 16:02:56 +03:00
Lionel Landwerlin
4347ccbe57 u_trace: rework tracepoint argument declaration
We're about to add indirect arguments, having a better way to describe
arguments (as capture/storage) will be useful.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29944>
2024-08-03 16:02:53 +03:00
Lionel Landwerlin
29bf1547c0 u_trace: add mako exception printouts
Useful for debug

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29944>
2024-08-03 16:02:19 +03:00
Echo J
e14d1f5bc0 util: Fix the integer addition in os_time_get_absolute_timeout()
This should fix glClientWaitSync() timing out too early with a INT64_MAX
timeout on radeonsi

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11615
Fixes: 7316cc92f3 ("gallium/os: add conversion and wait functions for absolute timeouts")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30476>
2024-08-03 04:19:28 +00:00
David Heidelberg
dafc4476f7 freedreno: Implement fast clear_buffer for Adreno 6xx and 7xx
Increase performance of
 - OpenGL ARB_clear_buffer_object impl.
 - OpenCL clEnqueueFillBuffer implementation

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30284>
2024-08-03 12:44:32 +09:00
David Heidelberg
ddfb8ebf8c freedreno: introduce color format parameter to emit_blit_buffer_dst
Useful for followup clear_buffer implementation.

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30284>
2024-08-03 12:32:10 +09:00
David Heidelberg
635a40cc5c freedreno: Introduce emit_blit_fini
De-duplicate the code a bit and prepare for using this in clear_buffer function.

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30284>
2024-08-03 12:32:10 +09:00
Echo J
b2f919eaaf d3d10umd: Use pipe_resource_usage enum in translate_resource_usage()
This should fix a build error with MSVC

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11461
Fixes: 40785d9a52 ("gallium: properly type pipe_resource.usage with the enum")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Max Ramanouski <max8rr8@gmail.com>
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30172>
2024-08-02 22:57:19 +00:00
Jordan Justen
58469620d3 intel/brw/validate: Convert access mask to be grf based
Our validation code doesn't need to know which bytes are accessed. It
only needs to know which grfs were accessed by an element. This also
helps to easily handle the Xe2 register size change.

Backport-to: 24.2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28479>
2024-08-02 22:18:51 +00:00
Jordan Justen
e62606b2ec intel/brw/validate: Update dst grf crossing check for Xe2
Rework:
 * Update grf_size_shift calculation (s-b Ken)

Backport-to: 24.2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28479>
2024-08-02 22:18:51 +00:00
Jordan Justen
f2800deacb intel/brw/validate: Simplify grf span validation check by not using a mask
Previously this check would create a mask of the bytes used in the
grf, and then shift the mask. This worked well when there was 32 bytes
in the register because a 64-bit uint64_t could easily detect that
bytes were used in the next regiter. (The next register was the high
32-bits of the `access_mask` variable.)

With Xe2, the register size becomes 64 bytes, meaning this strategy
doesn't work. Instead of a mask, we can just check to see if more than
1 grfs are used during each loop iteration. (Suggested by Ken.) This
will make it easier to extend for Xe2 in a follow on commit.

Verified this with
dEQP-VK.subgroups.arithmetic.compute.subgroupexclusivemul_u64vec4_requiredsubgroupsize
on Xe2, which otherwise would cause the program to fail to validate
because it assumed a grf was 32 bytes.

Backport-to: 24.2
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28479>
2024-08-02 22:18:51 +00:00
Mike Blumenkrantz
f4b51e0d8e egl: delete DRI_DRI2 remnants
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
93aea6df07 egl/x11: replace DRI_DRI2 check with fd check
only swrast (not kms_swrast) doesn't support this interface, so this
check should be equivalent

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
920f085dea egl: delete local_buffers
there's lots of calls to free these, but they are never allocated

thus they can be deleted entirely

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
f09e81636c egl: delete DRI_IMAGE remnants
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
18361e1a6e egl: delete last DRI_IMAGE check
DRI_IMAGE always exists, so this is always supported

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
54e0a90fbf egl: move some extension enablement out DRI_IMAGE conditional
this is functionally identical

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
9eccbe3a81 gbm: delete DRI_IMAGE remnants
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
ab08b79ef7 gbm: use driver check for dmabuf export
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
9ec286b037 gbm: check for compression modifiers on device create
remove the last DRI_IMAGE check

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
8364f2e571 gbm: always pass through images to unmap
this should be fine?

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
4a0a39245d gbm: use new dmabuf import flag to replace DRI_IMAGE checks
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
d26d2603cc gbm: check for dmabuf import on device creation
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
9907166c42 egl: always check dri caps for EGL_WL_bind_wayland_display support
this should be functionally the same

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
455219979e egl: replace display_name checks with swrast checks
the only time when display_name isn't set is with true swrast

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
fc510ca674 egl: inline DRI_IMAGE compression modifier handling
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
60d81e2865 egl/wayland: delete check for DRI_IMAGE blitImage in drm init
this is always supported

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
c38b9aba0e egl/android: check PIPE_CAP_NATIVE_FENCE_FD directly
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
d86f39e7cf egl: swap DRI_IMAGE checks for dmabuf/modifier support for driver check
this probably also enables usage on swrast when available

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
20d3e1ad14 gbm: inline simple DRI_IMAGE usage
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
89c6c150cc egl: inline simple DRI_IMAGE usage
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
caa44dffbe dri: make a few more functions public
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
75a08f6b00 egl: simplify MESA_drm_image enablement
the caps function here will always be accurate

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
59e4d558ba gbm: inline dri2_from_dma_bufs and delete now-redundant check in dmabuf import
dri will check this

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
9362ae7ecd dri: check for dmabuf_import at top of dri2_from_dma_bufs
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
a7d8892f0e dri: store dmabuf import caps to dri_screen on create
this is valid for all drivers

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
027de039a3 egl/gbm: delete DRI_IMAGE_DRIVER remnants
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
ea1855caba gbm: inline DRI_IMAGE_DRIVER
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
703261c393 egl/drm: always expose EXT_buffer_age
this is implemented in swrast

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
03e88c0633 egl: simplify a non-swrast conditional
functionally identical

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
44b843b68a egl: collapse driCreateNewDrawable conditional
these are all the same case

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:32 +00:00
Mike Blumenkrantz
f43883cf67 egl/gbm: rip out DRI_SWRAST
the swrast struct member is now a bool for consistency

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
d9eae369e9 egl: inline DRI_SWRAST
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
b1b8ac6b34 dri: make driSWRastQueryBufferAge public
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
789df29fc3 egl/gbm: remove DRI_KOPPER remnants
kopper struct member is still useful as a check, so replace it accordingly

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
5f8dec8f7c egl: inline DRI_KOPPER
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
1d86bc8791 egl: delete DRI_MESA remnants
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
0d9f69de2c gbm: delete DRI_MESA remnants
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
0f8a85487b egl: inline DRI_MESA
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
f51857aac2 gbm: inline DRI_MESA
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
4105f0f001 dri: publicize dri_query_compatible_render_only_device_fd
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
0ae7349e06 egl/gbm: delete remnants of DRI_CORE
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
3698e10356 gbm: inline DRI_CORE usage
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
7732f1aa5d egl: inline DRI_CORE usage
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
85bf0892f6 egl/dri2: delete unused function
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
2024-08-02 20:49:31 +00:00
Mike Blumenkrantz
a6d97b0afe kopper: check swapchain size after possible loader image resize
previously the size was checked at the top of the function, but this
ignored cases where the loader might end up resizing the drawable,
resulting in an attempted 0x0 swapchain creation based on stale
geometry

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30487>
2024-08-02 20:16:42 +00:00
Karmjit Mahil
cf9588bae6 tu: Set TU_ACCESS_CCHE_READ for transfer ops with read access
Transfer ops also use CCHE since they use the same path as
texture access.

This addresses the flakiness seen in
KHR-GL46.shader_storage_buffer_object.advanced-usage-sync-cs
CCHE wasn't being invalidated between the compute op and transfer
op which would sometimes lead to old/invalid data to be copied
in the transfer op.

Fixes: fb1c3f7f5d ("tu: Implement CCHE invalidation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11458
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30490>
2024-08-02 16:31:07 +00:00
Mike Blumenkrantz
725d033cd0 dri: only link_whole once
Fixes: e678c4d2 ("dri: delete __DRI2_RENDERER_QUERY interface")

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30485>
2024-08-02 15:51:37 +00:00
Martin Krastev
a99fbb2b24 svga/ci: disable vmware farm
Disable vmware svga farm for yet more network maintenance

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30486>
2024-08-02 15:39:27 +00:00
Karol Herbst
168dc73fa9 nouveau: use nv_device_info directly for dumping push buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
1454347c85 nouveau: implement PIPE_PCI caps
and also use the already fetched device_id instead of refetching it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
eac61faf84 nouveau: remove nouveau_check_for_uma
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
8340f490bf nvk: use nv_device_uuid
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
43365502c4 nouveau: implement driver_uuid and device_uuid
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11592
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
826d00617c nouveau: add nv_device_uuid
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
9c15875d4d nouveau: use nv_devince_info and fill in PCI and type information
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
fb1763e93c nouveau/winsys: fix handling of NV_DEVICE_TYPE_IGP
It's a PCI device as well, just no discrete VRAM.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Karol Herbst
740cae64a1 mesa: check for enabled extensions for *UID enums
Applications might use them without checking if the extension is supported
and would run into a NULL pointer deref calling the callbacks.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30455>
2024-08-02 15:04:41 +00:00
Aleksi Sapon
66f48f2216 llvmpipe: half_to_float use LLVM fpext when fp16 is available
Generalize the use of LLVM's fpext for converting fp16 <-> fp32
to any target machine that supports fp16, instead of only checking
for a specific x86 extension. This enables the use of fcvtl on Aarch64.
More architectures could be supported by updating lp_has_fp16().

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30267>
2024-08-02 14:23:03 +00:00
Aleksi Sapon
2db280b208 llvmpipe: much faster sample function cache using RCU pointers
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30267>
2024-08-02 14:23:02 +00:00
Aleksi Sapon
7c6a8973bf util: const hash_table for some readonly operations
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30267>
2024-08-02 14:23:02 +00:00
Matt Turner
66243e6999 docs: Drop references to LIBGL_DRIVERS_PATH
Fixes: 93511c1c5c ("gbm: link directly with libgallium")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11556
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30456>
2024-08-02 14:08:42 +00:00
Konstantin
cbf07628bc vtn: Remove dead shader_call_data from all RT stages
Having multiple shader_call_data can cause incorrect behavior since the
compiler expects there to be only one shader_call_data variable.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11585
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30468>
2024-08-02 12:30:53 +00:00
Valentine Burley
fb03aed435 tu: Drop tu_vk_format_to_pipe_format helper function
All the fomats are properly handled in vk_format_to_pipe_format so this
is no longer needed.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30269>
2024-08-02 10:11:09 +00:00
Valentine Burley
7fe8033e8b tu, fdl: Drop custom mapping for 1-plane YCbCr formats
This workaround for VK_FORMAT_G8B8G8R8_422_UNORM and VK_FORMAT_B8G8R8G8_422_UNORM
is no longer needed after the formats in vk_format_to_pipe_format now return the
RGB formats since the following commits:

0c03d44093 ("util/format: Add G8B8_G8R8_422_UNORM and B8G8_R8G8_422_UNORM formats")

4accbb27a2 ("vulkan/format: Translate G8B8G8R8_422_UNORM and B8G8R8G8_422_UNORM properly")

Turnip's behavior is already aligned with the new PIPE_FORMAT names, not what the
old ones would suggest.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30269>
2024-08-02 10:11:09 +00:00
Daniel Stone
cd961a7e3f gbm/dri: Remove erroneous assert
The user is allowed to pass a list of modifiers including
DRM_FORMAT_MOD_INVALID, meaning that the user is OK with implicit
modifiers. Since merging the DRI interfaces, this assert that we are
never returning an implicit modifier is unnecessary and also wrong. It
was originally added to be super-safe, but we now know that our drivers
work very well with modifiers, so don't need it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 0b16d7ebb9 ("dri: Allow INVALID for modifier-less drivers")
Closes: mesa/mesa#11591
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30464>
2024-08-02 08:40:43 +00:00
Hyunjun Ko
78ff100a52 anv: support h265 encoding
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
eefa886b01 anv/video: initial support for h265 encoding
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
3bd46afac1 anv/query: consider codec when querying the encoding status.
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
22abbb84b7 vulkan/video: adds a bitstream writer of h265 slice header
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
52f678004f intel/decoder: Handle HCP_PAK_INSERT_OBJECT
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
46e02ee861 intel/genxml: adds a value of reference pic to HCP_SURFACE_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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
7f280e1e93 intel/genxml: fix some length of HCP_FQM_STATE
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
663f9eb740 intel/genxml: Adds more VDENC commands
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
3eb69b9577 intel/genxml: fix the length of VDENC_DS_REF_SURFACE_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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
e79cad5af0 intel/genxml: Add missing fields for HCP_SLICE_STATE
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
e28a299863 anv: enable VK_KHR_video_encode_queue and VK_KHR_video_encode_h264
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/27810>
2024-08-02 07:15:59 +00:00
Dave Airlie
3fbcd95b20 anv/video: add mode costs for h264 encoding
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
3ec8f7f995 anv/video: initial support for h264 encoding
Co-authored-by: Dave Airlie <airlied@redhat.com>

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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
f6c3e82201 anv/video: implemnt VkGetEncodedVideoSessionParametersKHR
Also add a stub for VkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR

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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
f25cf314b3 anv/video: remove unnecessary macros
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
a660bd9471 anv/query: handle VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR
Anv supports VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR
and VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR.

Also add to handle the VK_QUERY_RESULT_WITH_STATUS_BIT_KHR flag.

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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
ff8de61907 vulkan/video: adds a bitstream writer of h264 slice header
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
9425ba6f2b intel/genxml: update VDENC instructions
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/27810>
2024-08-02 07:15:59 +00:00
Hyunjun Ko
b97d440bc5 intel/genxml: change the length of MFX_QM_STATE
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/27810>
2024-08-02 07:15:58 +00:00
Hyunjun Ko
5057a33fe3 intel/genxml: add a missing value for MFX_SURFACE_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/27810>
2024-08-02 07:15:58 +00:00
dawnhan
6df5ace3a3 vulkan/android: Add missing AHB formats
Signed-off-by: dawnhan <dawnhan@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30310>
2024-08-02 04:23:44 +00:00
David Heidelberg
ceece45b2b freedreno: drop hack for old dEQP
Since ac7a167b56d7 ("Adjust out of surface verification for wide lines")
from 2017, this shouldn't be necessary anymore.

Acked-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30460>
2024-08-02 10:18:50 +09:00
Kenneth Graunke
8bca7e520c intel/brw: Only force g0's liveness to be the whole program if spilling
We don't actually need to extend g0's live range to the EOT message
generally - most messages that end a shader are headerless.  The main
implicit use of g0 is for constructing scratch headers.  With the last
two patches, we now consider scratch access that may exist in the IR
and already extend the liveness appropriately.

There is one remaining problem: spilling.  The register allocator will
create new scratch messages when spilling a register, which need to
create scratch headers, which need g0.  So, every new spill or fill
might extend the live range of g0, which would create new interference,
altering the graph.  This can be problematic.

However, when compiling SIMD16 or SIMD32 fragment shaders, we don't
allow spilling anyway.  So, why not use allow g0?  Also, when trying
various scheduling modes, we first try allocation without spilling.
If it works, great, if not, we try a (hopefully) less aggressive
schedule, and only allow spilling on the lowest-pressure schedule.

So, even for regular SIMD8 shaders, we can potentially gain the use
of g0 on the first few tries at scheduling+allocation.

Once we try to allocate with spilling, we go back to reserving g0
for the entire program, so that we can construct scratch headers at
any point.  We could possibly do better here, but this is simple and
reliable with some benefit.

Thanks to Ian Romanick for suggesting I try this approach.

fossil-db on Alchemist shows some more spill/fill improvements:

   Totals:
   Instrs: 149062395 -> 149053010 (-0.01%); split: -0.01%, +0.00%
   Cycles: 12609496913 -> 12611652181 (+0.02%); split: -0.45%, +0.47%
   Spill count: 52891 -> 52471 (-0.79%)
   Fill count: 101599 -> 100818 (-0.77%)
   Scratch Memory Size: 3292160 -> 3197952 (-2.86%)

   Totals from 416541 (66.59% of 625484) affected shaders:
   Instrs: 124058587 -> 124049202 (-0.01%); split: -0.01%, +0.01%
   Cycles: 3567164271 -> 3569319539 (+0.06%); split: -1.61%, +1.67%
   Spill count: 420 -> 0 (-inf%)
   Fill count: 781 -> 0 (-inf%)
   Scratch Memory Size: 94208 -> 0 (-inf%)

Witcher 3 shows a 33% reduction in scratch memory size, for example.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30319>
2024-08-01 16:37:34 -07:00
Kenneth Graunke
4ca4b064cf intel/brw: Record g0 as live for sends with send_ex_desc_scratch set
brw_send_indirect_split_message() implicitly reads g0 to construct the
extended message descriptor for certain send messages when this is set.

Record that liveness explicitly.

Thanks to Francisco Jerez for reminding me about this use of g0.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30319>
2024-08-01 16:37:32 -07:00
Kenneth Graunke
9200fb966c intel/brw: Record that SHADER_OPCODE_SCRATCH_HEADER uses g0
The generator code for emitting legacy scratch headers was implicitly
using g0 as a source.  But the IR wasn't indicating any usage of g0,
which means the liveness isn't properly tracked at the IR level.

It works because we reserve g0 as permanently live for the whole
program.  In order to stop doing that, we need to record it properly.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30319>
2024-08-01 16:37:31 -07:00
Kenneth Graunke
545f20419f intel/brw: Delete fs_reg_alloc::discard_interference_graph()
Unused since commit 50519598ff.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30319>
2024-08-01 16:37:28 -07:00
Eric Engestrom
f427c9fe23 rpi3/ci: remove {version,render}_check from [piglit.env]
v1 was moving it into the [[piglit]] section, but piglit-runner actually
doesn't support checking for this, so let's just remove it entirely.

Fixes: 3990463c48 ("v3d/vc4/ci: set full renderer version check")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30436>
2024-08-01 21:05:27 +00:00
Lucas Fryzek
c44d65a467 lp: only map dt buffer on import from dmabuf
Adjusts `resource_from_handle` to follow original execution path
in cases where we are not importing a dmabuf.

Fixes: db38a4913e

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30441>
2024-08-01 20:39:06 +00:00
Eric Engestrom
93f9afa1e0 ci: remove dead start-x.sh script
Fixes: 599e8bf921 ("ci/valve: remove the traces runner")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30465>
2024-08-01 19:57:17 +00:00
Faith Ekstrand
30888d1e5c vulkan: Update XML and headers to 1.3.292
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30473>
2024-08-01 18:59:33 +00:00
David Rosca
c0a9cdc4de radeonsi/vcn: Allow dynamic change of QVBR quality level
This was missed when QVBR was added.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30471>
2024-08-01 18:31:39 +00:00
Karol Herbst
0e05ae1a10 rusticl/kernel: handle load_global_size
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30467>
2024-08-01 17:43:42 +00:00
Karol Herbst
4ae9ee7a2c rusticl/kernel: emit system values with the correct device size
Those are sized according to the size_t on the device.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30467>
2024-08-01 17:43:42 +00:00
Karol Herbst
14ea102175 nir: add load_global_size intrinsic
There is no need to compute it in the shader as the result is known at
runtime already.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30467>
2024-08-01 17:43:42 +00:00
Juston Li
ef58f2408f anv/android: handle R8G8B8X8 as R8G8B8A8
Fall through to common vk_ahb_format_to_image_format() to handle
R8G8B8X8 as R8G8B8A8.

Fixes issues with querying for format feature support when its handled
as R8G8B8.

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30080>
2024-08-01 17:20:18 +00:00
Mike Blumenkrantz
827812912d dri: link with libloader
this has always called loader_bind_extensions, so it should have been
linking with the loader

cc: mesa-stable

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reported-by: Yurii Kolesnykov <root@yurikoles.com>
Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30449>
2024-08-01 16:01:17 +00:00
Mike Blumenkrantz
c5c0c1215b glx: include src/gallium for apple
Fixes: 91e1ea52c9 ("mesa_interface: Move out of GL/internal/")

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reported-by: Yurii Kolesnykov <root@yurikoles.com>
Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30449>
2024-08-01 16:01:17 +00:00
Mike Blumenkrantz
019cb3875d glx: move up glx_driver enum declaration
Fixes: 4e8740370a ("glx: rework __glXInitialize")

Acked-by: Eric Engestrom <eric@igalia.com>
Reported-by: Yurii Kolesnykov <root@yurikoles.com>
Tested-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30449>
2024-08-01 16:01:17 +00:00
Mike Blumenkrantz
1b6974095c loader/dri3: delete loader_dri3_extensions
no longer used

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
c23385c42c glx: delete DRI_IMAGE remnants
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
546d71044a loader/dri: delete DRI_IMAGE remnants
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
d703e7f289 loader/dri3: inline DRI_IMAGE usage
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
35d518fcde dri: use image loader function directly in dri_create_image_with_modifiers
it can't be anything else

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
2b042cb9c2 gallium: move loader_dri_create_image to dri frontend
this is another case of bad dependencies leaving dri the only place to
move something, which then exposes some other snags to be resolved later

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
10a80782e0 dri: make DRI_IMAGE public
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
7dded1ad88 glx: simplify DRI_IMAGE checks
this is guaranteed to be present and work and stuff

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
defe9e3585 glx: expose GLX_MESA_gl_interop for drisw
let the drivers determine support

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
4cd4b9f70d glx: stop binding DRI_INTEROP
no longer useful since innermost functions return errors correctly

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
410076af84 glx: call dri interop functions directly
removes pointless layers of abstraction and deletes a bunch of code

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
634dea8f70 glx: delete more DRI_INTEROP checks
inner functions should return support correctly

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
51a2755f4f glx: delete checks for interop support
the inner functions now return support correctly

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
b421abafbb glx: inline DRI_INTEROP
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
012d20c6a3 dri: make DRI_INTEROP public
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
ec3ad889da dri: delete DRI2_THROTTLE interface
unused

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
64a77a9017 glx: inline DRI2_THROTTLE
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
f2431a33d5 dri: make DRI2_THROTTLE public
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
d3ecf106e9 loader/dri3: delete DRI2_CONFIG_QUERY remnants
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
bcd63ffa9b glx: inline DRI2_CONFIG_QUERY
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
2932d021aa dri: remove __DRI2configQueryExtension param from swapinterval functions
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
0d83c570af dri: move swapinterval functions from loader to dri frontend
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
98b62ee57f dri: make DRI2_CONFIG_QUERY public
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
e8d4b0a253 dri: unify DRI2_CONFIG_QUERY interfaces
these should always be the same to check both option caches

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
b7c17a4f3b loader/dri3: delete DRI2_FLUSH remnants
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
53fd2eca4e glx: inline DRI2_FLUSH
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
326d7ae64a loader/dri3: inline DRI2_FLUSH
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
0741e824cf kopper: reuse dri2 invalidate
this should be fine

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
0c4813dd0b dri: make DRI_FLUSH public
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
18c25edb94 glx: always expose GLX_ARB_context_flush_control
this is always supported

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
e678c4d271 dri: delete __DRI2_RENDERER_QUERY interface
now requires link_whole for dri target to retain symbols

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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
b8ca3d9b20 glx: inline __DRI2_RENDERER_QUERY
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/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
ea0c9925b7 dri: make DRI2_RENDERER_QUERY interface PUBLIC
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/30450>
2024-08-01 15:28:03 +00:00
Eric Engestrom
89863a050b meson,ci: remove dead kmsro option in gallium-drivers
Fixes: 70813c1c13 ("meson: Remove kmsro from gallium-drivers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30463>
2024-08-01 14:16:28 +00:00
David Rosca
71c506a907 dri: Use --whole-archive when linking libdri
This is needed to include the kopper stubs when building without zink.

Fixes: 5c40d9bec1 ("dri: add kopper stubs to avoid build failures")

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30466>
2024-08-01 13:37:57 +00:00
Hans-Kristian Arntzen
369e3cc20a wsi/common: Do not update present mode with MESA_VK_WSI_PRESENT_MODE.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Fixes: ad71d584cf ("wsi/common: Add function to modify present mode.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30434>
2024-08-01 13:11:48 +00:00
Lionel Landwerlin
fafa0d5abb anv: fix check on pipeline mode to track buffer writes
We want to check the current mode of the pipeline, not the queue type
(since graphics can toggle between 3D & gpgpu modes).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 455a13fb7f ("anv: limit ANV_PIPE_RENDER_TARGET_BUFFER_WRITES to blorp operations using 3D")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11607
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30469>
2024-08-01 12:20:52 +00:00
Jordan Justen
58bf403e8b include/drm-uapi/README: Update README for drm uapi header files
This update:

 * Clarifies the information about the acceptable source trees for
   updating the include/drm-uapi Mesa directory

 * Includes information about the current drm tree location

 * Expands the explanation of the process for generating the
   drm-uapi files

 * Expands the explanation of how what information to include
   in the Mesa commit that updates the drm-uapi files.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29973>
2024-08-01 09:58:45 +00:00
Lucas Fryzek
0acdb82814 venus/ci: Update skip tests to prevent timeouts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28735>
2024-08-01 08:45:54 +00:00
Lucas Fryzek
9ccc3daaf8 lavapipe: Implement VK_KHR_external_*_fd
Implement external sync fd extensions by plumbing into llvmpipe's
implementation of `lp_create_fence_fd` and `lp_fence_get_fd`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28735>
2024-08-01 08:45:54 +00:00
Lucas Fryzek
d21aa86b54 llvmpipe: Implement EGL_ANDROID_native_fence_sync
Add support for the native fence extension through the use
of udmabuf's dmabuffers. Thanks to the fact that llvmpipe
is synchronous we can export a sync file from a dmabuf that
is always signalled and use this to implement the extension.
For importing sync files we can simply poll the sync file
to wait until it is signalled.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28735>
2024-08-01 08:45:54 +00:00
Valentine Burley
57c81bab04 vulkan/format: Translate two 420_UNORM formats properly
VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and VK_FORMAT_G8_B8R8_2PLANE_420_UNORM were being
translated to IYUV and NV12 formats which, in PIPE_FORMAT parlance, are auto-converted
formats, not raw data formats.
Use the raw data formats like everything else.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30459>
2024-08-01 07:44:18 +00:00
Valentine Burley
3bbb740f61 lavapipe: Block more formats from getting blit feature flags
This is needed for the new pipe formats.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30459>
2024-08-01 07:44:08 +00:00
Konstantin
3316bc3e88 util: Handle more formats in get_plane_(width|height)
Required by RADV to use PIPE_FORMAT_G8_B8R8_420_UNORM and
PIPE_FORMAT_G8_B8_R8_420_UNORM.

Reviewed-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30459>
2024-08-01 07:44:02 +00:00
Valentine Burley
fd1f798292 docs/features: Update features.txt for Turnip
These two extensions weren't marked as done on Turnip.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30453>
2024-08-01 06:14:11 +00:00
Eric Engestrom
73487c13ad nvk/ci: bump vkcts job timeout
It looks like the job is now taking roughly 20 more minutes than it was
when it was introduced, likely because of the new extensions enabling
more tests to run.

Adding 30min extra margin to avoid having to do this again in a couple
of months, and this is a nightly job anyway so we don't care about
risking having a hung machine for a few more minutes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30458>
2024-08-01 05:52:45 +00:00
Juan A. Suarez Romero
14c82207a4 broadcom/ci: use kernel8 for rpi5 full jobs
Test if using kernel8 instead of specific kernel_2712 fixes the issues
with rpi5.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30457>
2024-08-01 07:12:24 +02:00
Juan A. Suarez Romero
caab76d250 v3d: free dbuf
Fix a leak found with address sanitizer and
`dEQP-GLES31.functional.shaders.helper_invocation.derivate.wide_lines_max_samples_dfdx`.

Fixes: 9a9f281251 ("v3d: support blitting straight from tile buffer")
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/30444>
2024-08-01 04:02:03 +00:00
Timothy Arceri
298633e365 nir: set disallow_undef_to_nan for legacy ARB asm programs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11389
Fixes: 861d274453 ("nir: replace undef only used by ALU opcodes with 0 or NaN")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30419>
2024-08-01 02:28:24 +00:00
Mike Blumenkrantz
5c40d9bec1 dri: add kopper stubs to avoid build failures
Fixes: 62847d14b5 ("glx: delete DRI_KOPPER")

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30454>
2024-08-01 01:57:52 +00:00
Faith Ekstrand
9ac3e3a072 nvk: Fix indirect dispatch on Turing+
The refactor of the MME macros for Maxwell broke Turing.

Fixes: b8aeea806a ("nvk: implement vkCmdDispatchIndirect on pre-turing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30448>
2024-07-31 21:51:52 +00:00
Faith Ekstrand
d7e06c6e08 nak: Use nak_builder::fsetp() in op_fquantize2f16
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30448>
2024-07-31 21:51:52 +00:00
Faith Ekstrand
138910d898 nak/hw_tests: Use ptr::from_ref() and ptr::cast()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30448>
2024-07-31 21:51:52 +00:00
Faith Ekstrand
a34d72cbed nak/hw_runner: Use byte_offset()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30448>
2024-07-31 21:51:52 +00:00
Sushma Venkatesh Reddy
0116430d39 intel/brw: Handle 16-bit sampler return payloads
API requires samplers to return 32-bit even though hardware can handle
16-bit floating point, so we detect that case and make more efficient
use of memory BW. This is helping improve performance of encode and
decode tokens during LLM by at least 5% across multiple platforms.

Thank you Kenneth Graunke for suggesting and guiding me throughout
this implementation.

Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30447>
2024-07-31 21:26:46 +00:00
Sushma Venkatesh Reddy
ddd9e043dc intel/brw: Move get_nir_def() higher to avoid UNDEF
While extending our backend to handle 16-bit sampler return payloads, we
found that in piglit's arb_texture_view-rendering-formats, the SIMD8 FS
was missing the sampling operation altogether. This was because we were
first emitting the texturing instruction, and then calling
get_nir_def(), which adds an UNDEF instruction when the destination is
smaller than the 32-bit. So the texturing was dead code elimated. Fix
this by calling get_nir_def() earlier.

Thank you to Kenneth Graunke for suggesting and guiding me throughout
this implementation.

Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30447>
2024-07-31 21:26:46 +00:00
Caio Oliveira
52be72e676 intel: Let compiler set indirect_ubos_use_sampler
This option is used for Gfx < 12, elk already set it to true,
so set it in brw and change the drivers to not set it anymore.

Because the dual-compiler support in Iris, the helper function
there had to change to consult the right compiler value instead.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30393>
2024-07-31 19:26:20 +00:00
Mike Blumenkrantz
f1680c262c kopper: increment lastStamp during invalidate
this is functionally equivalent

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
76757c211d glx: delete DRI_TEX_BUFFER handling
this is always available

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
c4f7853131 loader/dri3: delete texBuffer struct member
unused

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
321d576f0c glx: inline DRI_TEX_BUFFER
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
9fdfebce06 glx: delete check for texbuffer extension
this is always available

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
032237c7ec dri: declare DRI_TEX_BUFFER functions public
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
ef6f874590 dri: delete __DRItexBufferExtension::setTexBuffer
no longer used

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
a09c8b577f glx: delete the only users of __DRItexBufferExtension::setTexBuffer
this is pointless since there's only one implementation of DRI_TEX_BUFFER

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
b0d0c1971c glx: delete releaseTexBuffer
this is always null, so none of the code is ever executed

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
0341623f39 dri: delete __DRI_COPY_SUB_BUFFER
bye-bye

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
945fe0ef4a glx: inline DRI_COPY_SUB_BUFFER
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
998d0e3993 drisw: declare DRI_COPY_SUB_BUFFER as PUBLIC
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
34912cc8d1 glx: rename driswCopySubBuffer
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
62847d14b5 glx: delete DRI_KOPPER
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
192febfbbf glx: switch kopper check for setting up swapinterval/bufferage functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
850b0694d6 glx: use local var for LIBGL_KOPPER_DISABLE check
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
2157108e11 dri: declare DRI_KOPPER as PUBLIC
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
38529171d6 dri: delete driCreateNewScreen2
unused

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
5d72058556 glx: inline DRI_DRI2
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
5019481a16 dri: delete __DRImesaCoreExtensionRec::createNewScreen
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
63937eca78 glx: inline DRI_SWRAST
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
f5dd5e4b44 glx: delete __DRImesaCoreExtension usage
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
5dba565ada glx: inline createNewScreen3
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
66e0d12627 glx: inline DRI_CORE functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
87720ab42b loader/dri3: inline DRI_CORE
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
029ec1a20b dri: declare DRI_CORE functions public
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
e95a462d1f glx: inline IMAGE_DRIVER functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
49c3814cd1 dri: declare IMAGE_DRIVER symbols PUBLIC
this is a temporary hackaround for a linker issue where dri frontend
functions need to be called directly by (glx/egl/gbm) but can't due
to linkage/visibility

eventually all of these frontends will be a single linkage into a single
library, which will avoid the intermediate linking and solve the problem

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
f9f8652445 loader: split out dri3 into subdir
this fixes dependency hell

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
36aaaa968a meson: move glx subdir after gallium build
more dependency hell

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
4095fac72b loader: move some common dri3 functions out of dri3 loader
fixing dependency hell

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Lionel Landwerlin
eebb6cd236 anv: stop using 3DSTATE_WM::ForceThreadDispatchEnable
Documentation says we should leave this field to the default value
(Normal). Instead we set 3DSTATE_PS_EXTRA::PixelShaderHasUAV when we
see that a fragment shader has side effects.

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/30408>
2024-07-31 18:18:14 +00:00
Rhys Perry
c818de7360 aco: combine DPP into v_cvt_f16_f32
The label_f2f16 was interfering with the label_dpp.

fossil-db (navi31):
Totals from 36 (0.05% of 79395) affected shaders:
Instrs: 70998 -> 70875 (-0.17%); split: -0.18%, +0.00%
CodeSize: 373184 -> 372244 (-0.25%)
Latency: 1266807 -> 1266752 (-0.00%); split: -0.01%, +0.01%
InvThroughput: 131618 -> 131566 (-0.04%); split: -0.04%, +0.00%
SClause: 1947 -> 1944 (-0.15%)
Copies: 5194 -> 5208 (+0.27%)
VALU: 41019 -> 40921 (-0.24%); split: -0.24%, +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/30425>
2024-07-31 17:26:05 +00:00
Eric Engestrom
39f045aaa6 docs: add sha256sum for 24.1.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30445>
2024-07-31 17:18:05 +00:00
Eric Engestrom
a6a7e00b36 docs: update calendar for 24.1.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30445>
2024-07-31 17:18:05 +00:00
Eric Engestrom
d0d0036fc9 docs: add release notes for 24.1.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30445>
2024-07-31 17:18:05 +00:00
Karol Herbst
f7f343796f meson: centralize checking for new enough meson for rust support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:43 +00:00
Karol Herbst
b3a9c91d9b meson: centralize bindgen version check
It's entirely duplicated and every rust user also wants to use bindgen
anyway. This way bindgen won't show up multiple times in the meson log
as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:43 +00:00
Karol Herbst
5290a09d2a docs: move rust update policy
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:43 +00:00
Karol Herbst
03ecda08de meson: centralize rust handling
This bumps the req for everything, but I think that's fine, because one
part restricting to a lower rust version doesn't make much sense as we are
also not doing it generally for C or C++.

This also makes it easier for packagers to know what requires rust.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:43 +00:00
Karol Herbst
7ff2513c28 rusticl/icd: use ptr::addr_eq
It got stabilized with 1.76

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:43 +00:00
Karol Herbst
19c66754df rusticl: use ptr::from_ref and ptr::from_mut
This is considered safer as it prevents changing the type the pointer
points to.

It got stabilized with 1.76

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:43 +00:00
Karol Herbst
11e4793b41 rusticl: replace some raw pointer casts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:42 +00:00
Karol Herbst
66f7e3a4b2 rusticl: use pointer byte offset API
It allows us to be more explicit about the intent here and avoids casting
to u8 or c_void pointers.

It got stabilized with 1.75

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:42 +00:00
Karol Herbst
40072f57b0 rusticl: use next_multiple_of
It got stabilized with 1.73

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:42 +00:00
Karol Herbst
fb82c253da rusticl: use div_ceil
It got stabilized with 1.73

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:42 +00:00
Karol Herbst
cc37ecc7ba rusticl: bump rust req to 1.76
Current FireFox ESR requires 1.76, so this is an update according to our
rust update policy.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:42 +00:00
Rob Clark
e2de72f71f tu: Random non-consequential fixes
Few whitespace and harmless , when ; was meant fixes

Reported-by: Steev Klimaszewski <steev@kali.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30431>
2024-07-31 15:11:48 +00:00
Rob Clark
87c889cd8a freedreno/drm/virtio: Fix issues with 16k (or larger) page sizes
Signed-off-by: Rob Clark <robdclark@chromium.org>
Fixes: e6b2785811 ("freedreno/drm/virtio: Use userspace IOVA allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30431>
2024-07-31 15:11:48 +00:00
Rob Clark
7fe3529715 tu: Fix issues with 16k (or larger) page sizes
The iova allocations need to be CPU page aligned.  (The GPU itself
always supports 4k mappings regardless of the smallest CPU page size,
but GEM buffer allocations must be an integer number of CPU pages.)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Fixes: 63904240f2 ("tu: Re-enable bufferDeviceAddressCaptureReplay")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30431>
2024-07-31 15:11:48 +00:00
Karmjit Mahil
745ad42bb0 freedreno: Enable the A735
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30379>
2024-07-31 13:38:52 +00:00
Juan A. Suarez Romero
52e7f2ca08 v3d/ci: update number of rpi5 available for testing
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30438>
2024-07-31 11:50:47 +00:00
Juan A. Suarez Romero
fa0a8b8d2c v3d/ci: add new flakes in rpi5
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30438>
2024-07-31 11:50:47 +00:00
Juan A. Suarez Romero
07cd860b52 broadcom/ci: annotate some of the failures
We already know the reason of some of the failures. Let's include the
reason.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30438>
2024-07-31 11:50:47 +00:00
Eric R. Smith
21ac210ab2 panfrost: make PAN_MESA_DEBUG=dump really show all GPU memory
The flag is advertised to dump all GPU memory, but really only dumps
mapped memory, so some significant pieces (like textures) are left out.
Change this by mapping as much as possible when the dump flag is given.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30411>
2024-07-31 11:25:09 +00:00
Karol Herbst
801078cbf8 nouveau: handle realloc failure inside cli_kref_set
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11477
Fixes: 821f4c8d99 ("nouveau: import libdrm_nouveau")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30374>
2024-07-31 11:01:09 +00:00
Konstantin Seurer
f8bf9f07b6 aco: print s_delay_alu INSTSKIP>3 correctly
INSTSKIP has 3 bits.

Fixes: 94958e6 ("aco: improve printing of s_delay_alu")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30401>
2024-07-31 08:09:52 +00:00
Eric Engestrom
38ede4334f rpi/ci: shorten the boot timeout to 90 seconds
5 minutes is too long and doesn't leave enough time after the retry to
still complete the job, especially if two boots fail in a row, removing
10 out of the worst-case 20 minutes allowed.

90 seconds is more than enough, the boot output normally starts after
~40-45 seconds.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30409>
2024-07-31 09:01:32 +02:00
Eric Engestrom
d76112bc48 ci/poe-powered: allow setting a different boot timeout than 5 minutes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30409>
2024-07-31 09:01:32 +02:00
Eric Engestrom
771e07ad93 ci/bare-metal: rename fastboot & cros-servo TEST_PHASE_TIMEOUT to TEST_PHASE_TIMEOUT_MINUTES to be coherent
Avoids the risk of accidentally copy/pasting the wrong variable name
from another baremetal job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30409>
2024-07-31 09:00:25 +02:00
Eric Engestrom
1e5fb15afa ci/poe-powered: rename --test-timeout to --test-timeout-minutes to be more explicit
Due to how python's argparse works, anyone anywhere else that would
continue passing `--test-timeout` would not see any change, it will
transparently work for them too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30409>
2024-07-31 08:58:20 +02:00
Dave Airlie
56ea4e4fa6 nvc0: fix null ptr deref on fermi due to debug changes.
Not everyone has a copy class, so don't dereference it if it's not
set.

Pointed out on irc by Armada

Fixes: 65092ab1a5 ("nouveau/nvc0: add support for using common pushbuf dumper")

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30421>
2024-07-31 05:41:54 +00:00
Eric Engestrom
deb1d1f9c3 pick-ui: move NominationType values around so that None is 0
This keeps tripping me up when reading the `.pick_status.json`, so let's
change it around so that starting in the next release cycle, `NONE = 0`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30427>
2024-07-30 21:54:01 +00:00
Eric Engestrom
057b77d2a3 ci/vkd3d: add support for *-flakes.txt list files
We still print them in the job log to not completely ignore them, but
they don't break the jobs anymore.

Additionally, we use the same format as deqp-runner for reporting
flakes, so that existing tools can pick up this new information without
requiring any change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:52 +00:00
Eric Engestrom
f54cb2476f ci/vkd3d: add support for *-skips.txt list files
Allows annotating the skips to document them, and avoids running the
entire CI for that driver when changing the skips for one device.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:52 +00:00
Eric Engestrom
ab1e99de62 ci/vkd3d: rename vkd3d expected failures list to be more explicit
And allow for something other than just "failures", such as...
skips and flakes (see next commits).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:52 +00:00
Eric Engestrom
642409bc19 ci/vkd3d: be more specific for what to grep
Sometimes, some other output gets added at the begining

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:52 +00:00
Eric Engestrom
1b8533a7f4 ci/vkd3d: move expectation file creation logic out of the test results handling
The next commit will add checks before we start running the tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:52 +00:00
Eric Engestrom
cfc8bb3b42 ci/vkd3d: move test expectations file to the results folder
Makes it easier to see after the fact what went wrong.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:52 +00:00
Eric Engestrom
50139426e2 ci/vkd3d: use GPU_VERSION to identify the list of failures, unifying with deqp-runner.sh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:52 +00:00
Eric Engestrom
aacef87848 ci/vkd3d: store vkd3d "errors" in the results file instead of spamming the job log
We have a limited number of bytes we can output (500 KiB) and still have
the job log visible in the web UI, so let's avoid a very spammy output
(vkd3d outputs a ton of information about each test in stderr) that
can't even be correlated with the regular output, and instead store it
together with the test results.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:51 +00:00
Eric Engestrom
af56a84616 ci/vkd3d: rename vkd3d runner script to vkd3d-runner.sh to match the other ones
Moving it out of an otherwise-empty folder.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:51 +00:00
Eric Engestrom
f90b10ab8f ci: drop dead VKD3D_CONFIG
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30413>
2024-07-30 18:47:51 +00:00
Jesse Natalie
d4faab9331 mr-label-maker: Add d3d10umd label rules
Reviewed-by: Max Ramanouski <max8rr8@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30371>
2024-07-30 17:46:47 +00:00
Juston Li
34031e3e3b anv/android: remove unneeded ANB implicit import flags
ANB is only used by Android WSI which uses explicit sync so these
flags can be dropped.

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29883>
2024-07-30 09:27:28 -07:00
Juan A. Suarez Romero
9b1302f80a v3d/ci: enable full run jobs for rpi5
Now that there are more rpi5 devices in the CI, run all the GL/GLES
tests and CL tests nightly.

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/30349>
2024-07-30 15:50:30 +00:00
Juan A. Suarez Romero
3c61489a3e v3d/vc4/ci: add address sanitizer jobs
This runs part of GL and Vulkan tests in vc4/v3d/v3dv with the address
sanitizer enabled to detect memory issues and leaks.

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/30349>
2024-07-30 15:50:30 +00:00
Georg Lehmann
bee487df48 aco/gfx11.5+: use vinterp for fddx/fddy
Since GFX11.5 VINTERP can be dual issued, DPP cannot.

Foz-DB GFX11.5:
Totals from 8401 (10.58% of 79395) affected shaders:
MaxWaves: 247880 -> 247848 (-0.01%)
Instrs: 6802675 -> 6815061 (+0.18%); split: -0.08%, +0.26%
CodeSize: 36539444 -> 36500948 (-0.11%); split: -0.22%, +0.11%
VGPRs: 444324 -> 445932 (+0.36%); split: -0.01%, +0.37%
SpillSGPRs: 1350 -> 1346 (-0.30%)
Latency: 63628380 -> 63523687 (-0.16%); split: -0.20%, +0.04%
InvThroughput: 10566750 -> 10486009 (-0.76%); split: -0.77%, +0.01%
VClause: 100171 -> 100248 (+0.08%); split: -0.08%, +0.16%
SClause: 175467 -> 176208 (+0.42%); split: -0.05%, +0.47%
Copies: 356817 -> 356935 (+0.03%); split: -0.17%, +0.20%
PreVGPRs: 283403 -> 283898 (+0.17%); split: -0.02%, +0.20%
VALU: 4217969 -> 4229831 (+0.28%); split: -0.03%, +0.31%
SALU: 479367 -> 479428 (+0.01%); split: -0.00%, +0.01%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30350>
2024-07-30 15:25:19 +00:00
Georg Lehmann
8c6e299141 aco: reorder dpp for ddx/ddy
Having the mov last allows us to fuse it with the use instruction.

Foz-DB Navi31:
Totals from 9400 (11.84% of 79395) affected shaders:
MaxWaves: 273998 -> 274030 (+0.01%)
Instrs: 8303778 -> 8282997 (-0.25%); split: -0.29%, +0.04%
CodeSize: 44428088 -> 44464860 (+0.08%); split: -0.09%, +0.18%
VGPRs: 506616 -> 504492 (-0.42%)
SpillSGPRs: 1389 -> 1393 (+0.29%)
Latency: 76923466 -> 76983332 (+0.08%); split: -0.06%, +0.14%
InvThroughput: 12386888 -> 12391262 (+0.04%); split: -0.04%, +0.07%
VClause: 125136 -> 125059 (-0.06%); split: -0.13%, +0.07%
SClause: 227361 -> 226615 (-0.33%); split: -0.43%, +0.10%
Copies: 440787 -> 440749 (-0.01%); split: -0.17%, +0.16%
PreVGPRs: 339783 -> 333343 (-1.90%); split: -1.92%, +0.02%
VALU: 5088362 -> 5069737 (-0.37%); split: -0.37%, +0.01%
SALU: 606596 -> 606609 (+0.00%); split: -0.01%, +0.01%

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30350>
2024-07-30 15:25:19 +00:00
Georg Lehmann
62fa5b9d6f aco/gfx11+: apply neg to vinterp
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30350>
2024-07-30 15:25:19 +00:00
Benjamin Lee
b8aeea806a nvk: implement vkCmdDispatchIndirect on pre-turing
This seems to be *just barely* within the capabilities of the fermi MME.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25167>
2024-07-30 15:00:25 +00:00
Faith Ekstrand
d43ed4445b nouveau/mme: Add support for multiplication on Fermi
Because of Fermi's extremely tight register file and the fact that we
have to modify x and y as we multiply, the only form of these we can
support as builder helpers is one which implicitly frees its sources.
Also, because we can't afford to just allocate extra stuff, we add
32x32_32, 32x32_64, and 32x64_64 forms.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25167>
2024-07-30 15:00:25 +00:00
Faith Ekstrand
cac4da4cab nouveau/mme: Add support for MUL on Fermi
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25167>
2024-07-30 15:00:25 +00:00
Faith Ekstrand
033cafc9fe mme/fermi: Don't try to access zero-size std::vector
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25167>
2024-07-30 15:00:25 +00:00
Faith Ekstrand
884c7bccc1 nak/qmd: Return the complete QMD dispatch size layout
Instead of returning a single offset, return a struct with three ranges,
one for X, Y, and Z.  This also communicates the sizes of each of the
fields to the driver in case that's relevant.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25167>
2024-07-30 15:00:25 +00:00
Faith Ekstrand
217c0a489b nak: Move the QMD code back into the main nak crate
I only ever pulled it out because I also pulled out the test runner.
Now that the test runner lives inside NAK, this can, too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25167>
2024-07-30 15:00:25 +00:00
Lucas Stach
241e1861da etnaviv: drm: use COARSE clock for timeouts when possible
COARSE clocks add a worst-case jitter of 10ms to the timing, as they
degrade the timing to Linux jiffy accuracy. However, they allow to skip
a syscall on platforms where the accurate version of the clock can not
be accelerated through the VDSO.

Switch to using the COARSE version of the clock when the timeout is
larger than 200ms, i.e. the accuracy of the timeout is degraded less
than 5% by the added worst-case jitter.

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/27079>
2024-07-30 14:35:19 +00:00
Lucas Stach
ea754657eb etnaviv: drm: use COARSE clock for BO cache timing
By using the the COARSE variant of the clock we can avoid a syscall
to fetch the current time on platforms where the more accurate
version of the clock can not be accelerated through the VDSO. The
most relevant platform with this restriction is ARM32 without the
architected timer extension, e.g. the NXP i.MX6.

The COARSE clock degrades the accuracy of the timing to Linux
jiffies, which means it adds a worst-case jitter of 10ms, which is
basically noise in relation to the 1sec holding time of the cache
and the irregular call pattern of etna_bo_cache_cleanup().

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/27079>
2024-07-30 14:35:19 +00:00
Eric Engestrom
235ce3df9b llvmpipe/ci: bump timeout for nightly job to 1h
Looking at recent jobs, the runtime has increased to ~40min, but since
it runs on a shared runner with other jobs at the same time, it can
randomly take much longer, and it has reached 45 minutes several times,
so bump up the timeout to leave enough margin.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30424>
2024-07-30 13:25:04 +02:00
Christian Gmeiner
aa9745427b ci: austriancoder farm maintenance
The farm moves into a new rack and gets prepped for ci-tron.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29901>
2024-07-30 09:30:15 +00:00
Christian Gmeiner
26474f8d4a nir_lower_mem_access_bit_sizes: Support load_kernel_input
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30407>
2024-07-30 06:51:22 +00:00
yinjiyao
50ff1e4f86 radeonsi/vcn: add HDR sei in hevc enc
Enable HDR sei in hevc encoder.

Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30388>
2024-07-29 21:48:04 +00:00
yinjiyao
0460ededda frontends/va: check hevc enc hdr sei
Decode packed header HDR sei for hevc encoding.

Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30388>
2024-07-29 21:48:04 +00:00
Georg Lehmann
b92134e088 aco: validate temp_rc
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30399>
2024-07-29 18:35:33 +00:00
Georg Lehmann
53155ba12d aco: add CompilationProgress::after_lower_to_hw
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30399>
2024-07-29 18:35:33 +00:00
Georg Lehmann
6da7bd842c aco/optimizer: update temp_rc when converting to uniform bool alu
Cc: mesa-stable

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30399>
2024-07-29 18:35:33 +00:00
Guilherme Gallo
0acc31a001 bin/ci: crnm: Reduce trace cluttering
Some recurrent messages are only cluttering the ci_run_n_monitor's logs,
so let's use the easily provided @cache decorator to print stuff that
the user will only needs to see once.

Also removes some junk that can happen during the pipeline monitoring
loop, like the "----" line break, and newlines.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30361>
2024-07-29 18:04:21 +00:00
Guilherme Gallo
ff18d1ec23 bin/ci: crnm: Fix pipeline monitoring skipping
We stop monitoring pipeline changes when we find out that the target job
is already running, or is in a complete state.

But when we `--force-manual` we should consider that the job is not
complete and we should iterate a little more in the monitor pipeline
stage until it gets ready for trace following.

Closes: #11552

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30361>
2024-07-29 18:04:21 +00:00
Guilherme Gallo
3975366a88 bin/ci: crnm: Deal with created status
Jobs that we want to run can get the `created` status when its
dependencies are still running.

So let's gather this information and ensure that we will wait these jobs
to reach the `manual` or `running` status before jumping to monitor
target jobs trace.

Closes: #11517

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30361>
2024-07-29 18:04:21 +00:00
Mike Blumenkrantz
87ce0ce0b1 Revert "vl/dri3: use loader's dri3 init code and delete everything else"
This reverts commit 586d0c4a9b.

Fixes: 586d0c4a9b ("vl/dri3: use loader's dri3 init code and delete everything else")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30415>
2024-07-29 12:33:03 -04:00
Karol Herbst
dc2755a4f8 rusticl/spirv: protect against 0 length in slice::from_raw_parts
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11584
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30410>
2024-07-29 13:38:29 +00:00
Karol Herbst
81f75e2a2d rusticl/api: protect against 0 length in slice::from_raw_parts
Fixes: 84d16045d0 ("rusticl/api: add param to query which contains application provided values")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30410>
2024-07-29 13:38:29 +00:00
Karol Herbst
ad6fb3406b rusticl/program: protect against 0 length in slice::from_raw_parts
Fixes: e028baa177 ("rusticl/program: implement clCreateProgramWithBinary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30410>
2024-07-29 13:38:28 +00:00
Karol Herbst
7a8b1dc6e5 rusticl: fix clippy lint having bounds defined in multiple places
Fixes: 734352ddfb ("rusticl/program: some boilerplate code for SPIR-V support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30410>
2024-07-29 13:38:28 +00:00
David Rosca
eb1f64a01e radeonsi/vcn: Fix MB/CTB calculation for slice encoding
We only support equal MB/CTB per slice (with last slice possibly
smaller) and this is not possible to fully describe with libva slice
structure constraints.
Report that we support arbitrary macroblocks per slice, verify if the
slice structure requested by application can be used, otherwise
divide the slices equally to achieve the requested number of slices.
Also stop reporting power of two structure support, as that implies
different size for each slice which cannot be supported.

This fixes issue where slice encoding is not available at all with some
applications (only supporting arbitrary macroblocks) or the number of slices
being different from the requested number.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30363>
2024-07-29 13:14:22 +00:00
Zan Dobersek
36a13d2b3b freedreno: fix a7xx perfcntr countables
During development of the freedreno's Perfetto producer for a7xx platforms
it was found that the lists of perfcntr countables that were initially
imported were not correct.

The lists are now updated, with the updated countables matching the
countables used in the official profiler tool's counters. While the
Perfetto producer work is still ongoing the fixed lists should already be
useful through fdperf.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30406>
2024-07-29 12:38:03 +00:00
Danylo Piliaiev
d60ae64527 tu/a750: Allow mutable images to have UBWC with all compatible formats
A750+ added a special flag that allows HW to correctly interpret UBWC, including
UBWC fast-clear when casting image to a different format permitted by Vulkan.
So it's possible to have UBWC enabled for image that has e.g. R32_UINT and
R8G8B8A8_UNORM in the mutable formats list.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30370>
2024-07-29 10:59:26 +00:00
Eric Engestrom
6a9676b79c ci/prepare-artifacts: check if we're about to overwrite ci config/expectations files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30384>
2024-07-29 10:11:31 +00:00
Eric Engestrom
197701b860 ci/prepare-artifacts: use find's -exec instead of iterating over its output with xargs
Also, split the `/ci/` part out to simplify the filename checks.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30384>
2024-07-29 10:11:31 +00:00
Eric Engestrom
1f70af7e9f bin/ci: update python-gitlab to 4.x
Quite a few fixes that we want were in the 4.x releases, so let's bump it.

See the list of breaking changes here:
https://python-gitlab.readthedocs.io/en/stable/changelog.html#v4-0-0-2023-10-17

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30019>
2024-07-29 10:08:01 +00:00
Eric Engestrom
d055edac11 docs/meson: add missing newline at the begining of code-block
Fixes: 324de97f48 ("docs: Add required dependencies to meson.rst")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30405>
2024-07-29 10:02:49 +00:00
Iago Toral Quiroga
66de8b4b5c v3d: add a faster TLB blit path
Our current TLB path would case a job writing to the blit source
to be flushed, causing the TLB store which we would then reload
from memory to do the blit, which is not optimal. With this path,
if the job that writes the blit source has not been flushed, we
will configure it to also do the blit to the destination. This will
avoid the expensive TLB load for the blit and, if glInvalidateFramebuffer
has been used on the blit source, possibly the TLB store as well for
the job writing the blit source.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30322>
2024-07-29 09:42:03 +00:00
Iago Toral Quiroga
9a9f281251 v3d: support blitting straight from tile buffer
This allows us to handle blitting (including MSAA resolve) directly
from the tile buffer to memory. We will use this soon to provide a
faster implementation of TLB blits.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30322>
2024-07-29 09:42:02 +00:00
Iago Toral Quiroga
9fbb11505a v3d: move TLB blit checks to a helper
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30322>
2024-07-29 09:42:02 +00:00
Eric Engestrom
ff58f0afbe rpi4/ci: mark fs variant of arb_texture_buffer_object as flaky too
See eg.:
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/61482695
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/61594844

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30404>
2024-07-29 10:06:10 +02:00
Jianxun Zhang
c5ee7e9bdc anv: Disable legacy CCS setup in binding (xe2)
The condition of flat ccs and vram_only checker causes different
aux usage at binding stage. The current design is reusing CCS_E
on Xe2, so we want both Xe2 integrated and discreted GPUs behave
the same way.

Xe2 shouldn't need any special setup of CCS in the loop.

Backport-to: 24.2
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/30111>
2024-07-29 01:42:27 +00:00
Jianxun Zhang
e054068787 anv: Disable compression on legacy modifiers (xe2)
On pre-Xe2 platforms, the compression on these modifiers that
don't support compression are enabled. The compressed will be
resolved when needed. On Xe2+ we haven't support explicit
resolve, so all the paths to resolves are prohibited now. But
the code is still doing it, causing an assertion failure:

Fixes: vkcube
src/intel/vulkan/anv_private.h:5467:
anv_image_get_fast_clear_type_addr: Assertion
`device->info->ver < 20' failed.

Backport-to: 24.2
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/30111>
2024-07-29 01:42:27 +00:00
Jianxun Zhang
6b4def143c iris: Fix an assertion failure with compressed format
Fixes: ext_texture_array-compressed teximage pbo -fbo -auto

src/gallium/drivers/iris/iris_state.c:3142: iris_create_surface:
Assertion `res->aux.usage == ISL_AUX_USAGE_NONE' failed

Suggested by Nanley Chery <nanley.g.chery@intel.com>

Backport-to: 24.2
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/30111>
2024-07-29 01:42:26 +00:00
Jianxun Zhang
49c91a4ea0 anv: Fix assertion failures on BMG (xe2)
Fixes: beb0ea2469 ("anv: Disable tracking fast clear and aux state (xe2)")

crucible run func.first

dEQP-VK.api.copy_and_blit.core.image_to_image.
all_formats.color.2d_to_2d.a1r5g5b5_unorm_pack16.
r16_uint.optimal_optimal

dEQP-VK.pipeline.monolithic.multisample.misc.clear_attachments.
r8g8b8a8_unorm_r16g16b16a16_sfloat_r16g16b16a16_sint_d32_sfloat_
s8_uint.16x.ds_resolve_sample_zero.whole_framebuffer

src/intel/vulkan/anv_private.h:5491:
anv_image_get_compression_state_addr: Assertion
`device->info->ver < 20' failed.

Backport-to: 24.2
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/30111>
2024-07-29 01:42:26 +00:00
Timothy Arceri
a629d829dc glsl: make use of new tex src deref intrinsic
The bindless spec has no language requiring functions params to be
defined as bindless so we need to be able to look at the values being
passed to functions to decide if they are bindless or not. This
intrinsic allows us to wait until function inlining is complete to make
this assessment.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11535
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30315>
2024-07-29 00:06:10 +00:00
Timothy Arceri
017770ff14 nir: add nir_tex_src_{sampler,texture}_deref_intrinsic
To be used as a placeholder until after function inlining so we can
replace function params with bindless handles if needed.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30315>
2024-07-29 00:06:10 +00:00
Timothy Arceri
ef13ff00d1 nir: create validate_tex_src_texture_deref() helper
Will be used in a following patch.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30315>
2024-07-29 00:06:10 +00:00
Faith Ekstrand
3631196414 nvk: Disable sparse D32S8 cubes pre-Turing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
ec7924ab90 nvk: Default to NAK on Maxwell+
We're now at parity with the old compiler and better.  We also support
way more features on NAK than with codegen.  No reason not to use NAK
by default at this point.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
13cc4e48d1 nak/sm50: Set f2f.high
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
7b84319ec4 nak: Manually flush denorms for nir_op_fquantize2f16 pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
315e8d6faa nak: Disallow isetp.x pre-Volta
Fixes: a33507d621 ("nak/sm50: Set the .x bit for isetp")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
c695fd7cd2 nak: Rework isetp64 on sm50 again
Unlike on Volta, isetp.x on Maxwell seems to take the accumulator into
account and I don't know exactly how.  Fortunately, we can avoid it by
emitting a different 3 instructions.  The result is actually a good bit
simpler.

Fixes: efd86d6daa ("nak/builder: Fix isetp64 for pre-Volta")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
3d4a4a68a0 nak: Non-constant offsets are allowed on patch loads
Fixes: 37a38f6744 ("nak/sm50: Add support for OpAL2P")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
72eb0b6c13 nak: Add tests for OpPSetP
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
29f909513b nak: Add a PredSetOp::eval() helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
76e66beb5a nak: pre-Volta uses r0 to output the final GS handle
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
63db105014 nak: Rename OpFSOut to OpRegOut
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
0b4bfefd6f nak/nir: Preserve rounding modes in split_64bit_conversions()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
ec84d7ce74 nak: Add tests for OpPopC and enable SrcMod::BNot
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
27ee9027da nak: Use OpFoldData::get_u32_bnot_src() more places
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
1a6ca8e601 nak/sm50: Set the not bit for OpLop2::srcs[0]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
61076b04a7 nak: Add tests for OpIAdd2 and OpIAdd2X
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
aa87c9c96d nak/hw_tests: Use better test values for iadd tests
This new helper makes sure we return some particularly interesting
numbers which may hit edge cases in the hardware and/or folding code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
6291440ee7 nak/hw_tests: Respect src_mod and src_swizzle in op auto-tests
Instead of replacing the whole source, just replace the src_ref so we
maintain the modifier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
f557423467 nak: Add source and destination types for carry values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
eb5f333606 nak: Assert no overflow when legalizing iadd with too many ineg modifiers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
96812f6b72 nak: Add tests for OpFlo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
10701ac331 nak/hw_tests: Explicitly test equal cases in test_isetp64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
957e7b3451 nak: Lower iadd64(x, -y) to isub64(x, y) in NIR
This is easier than optimizing in the back-end and lets us use 2
instructions for an isub64 rather than 4.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
8646ae7e23 nak/builder: Allow source modifiers in ineg64()
This lets us implement ineg64(x) as iadd64(0, -x, 0) and also reduces
the number of cases in iadd64() itself.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
7f0b8a82d0 nak: Add tests for nak_builder::ineg64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
73384c626d nak: SrcMod::INeg cannot be folded
The only reason why this hasn't been causing us problems before is
because the only use of ineg in an iadd with a carry-out is ineg64 and
that's basically guaranteed to be folded in NIR because it's unary.
However, if we want to be able to use SrcMod::INeg more, we need to be
more careful about it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
c2b5d7ca41 nak/sm50: Add execution delays for more ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
ce91e8875a nak: OpKill also needs a delay on Maxwell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:20 +00:00
Faith Ekstrand
c8eb8f946a nak: Add an optimization for CRS ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
1cf945a5d1 nak: Add target labels to CRS pop instructions
This makes them easier to read.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
9bbc692064 nak/nir: Rework CRS handling
THe new code tracks the whole call/return stack.  This means we know the
size of the stack at all times.  It also means that we can detect a
bunch of potential error cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
cb5e10d0aa nak/nir: Add a few more NIR helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
f66ca6edc3 nak/nir: Fix the reverse execlist iterator
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
d19ea8524b nvk: Take CRS into account when allocating the SLM area
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
b78f7d208b nak: Plumb through the call/return stack size
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Faith Ekstrand
3e935df2b0 nak: Move the runner into the main nak crate
This makes the meson a bit simpler since we can just conditionally build
it based on #[cfg(test)] instead of breaking it into a separate library.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30402>
2024-07-28 21:49:19 +00:00
Rob Clark
ad90bf0500 freedreno/a6xx: Initial a7xx support
Passing all of deqp-gles*

LRZ is still causing some artifacts in games so it is disabled for now.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
e6be78c703 freedreno/a6xx: Rework CCU_CNTL emit for a7xx
Regs are different, and a750+ gets new configuration for VPC cache in
GMEM.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
1f41d59059 freedreno/a6xx: Refactor CP_EVENT_WRITE emit
Consolidate the various uses of CP_EVENT_WRITE into helpers, and use use
fd_gpu_event to manage the differences between a6xx and a7xx.  This is a
bit churny as it spreading a fair bit of the CHIP template param around.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
b1937f76ff freedreno/a6xx: Allocate lrcfc when needed for direction tracking
On later GPUs this buffer is also used for direction tracking, etc.
Meaning that it is not optional.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
679e9093e1 freedreno: Extract out shared LRZFC layout helpers
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
beb5577e12 freedreno: Extract out common UBWC helper
And re-use in gallium driver.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
5c34a5e59a freedreno: Move GENX/CALLX magic to common
And re-use them in the gallium driver

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
a6c9f152cc freedreno/drm: Handle a7xx case
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:18 +00:00
Rob Clark
31302ca107 tu/drm/virtio: Add missing a7xx case
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:17 +00:00
Rob Clark
8ff33a756d freedreno/cffdec: Fix a7xx CP_EVENT_WRITE decoding
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:17 +00:00
Rob Clark
10eaf06e47 freedreno/a7xx: Fix GRAS_UNKNOWN_80F4 writes
If this is a 64b reg, we should write both halves.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:17 +00:00
Rob Clark
1a3f041cd8 freedreno/a6xx: Implement reg stomper support
Useful to track down issues related to uninitialized regs.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30304>
2024-07-28 18:25:17 +00:00
Mike Blumenkrantz
1242f3ed3a glx: unhackify inferring zink from dri3
this still needs to be broken up more

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
8994165e92 glx: consolidate some LIBGL_KOPPER_DISABLE checks
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
725875cdea glx: move drisw dri3 handling for zink out to glxInitialize
this is much cleaner

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
82955b48aa glx: use base screen has_multibuffer for drisw
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
e9aec758c6 glx: delete all driver-specific display handling
this no longer does anything

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
886af985f8 glx: move dri2 loader extensions to static vtable
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
d723438e0d glx: move dri2 init checks to separate function
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
5f55da01db glx: tweak dri2 init ordering
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
f79eb4730c glx: move dri2Hash to base glx_display
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
6be546764a glx: rework/simplify drisw zink handling
this pushes the logic further down so it's all in one place

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
08e2985e57 glx: move driwindows_display::event_base to driwindows_context
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
2126a48149 glx: move has_multibuffer to base glx_screen struct
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
54e234ee2b glx: delete dri3_display::loader_extensions
this is just a static value

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
4e8740370a glx: rework __glXInitialize
* add an enum of bits for determining which display connections to try
* collect bits and then do all setup in AllocAndFetchScreenConfigs()

in theory no functional changes

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
8078a938f5 glx: simplify zink init variables
no functional changes

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
0d78711cfb glx: delete __GLXDRIdisplay
this is useless now

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Mike Blumenkrantz
78abf0d145 glx: tabs -> spaces
this almost makes things readable but not quite

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30375>
2024-07-28 13:11:07 +00:00
Georg Lehmann
a7c8eab63d spirv: ignore more function param decorations
These caused log spam during vk-cts.

Fixes: 9b55dcca54 ("spirv: initial parsing of function parameter decorations")

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30391>
2024-07-28 12:20:49 +00:00
Eric Engestrom
c3b25dd357 ci: remove llvmpipe in the job that disables llvm
Instead of removing it from all the arm build jobs and only adding it
back on arm64.

Fixes: 35cb0c350e ("ci: replace gallium-drivers=swrast with gallium-drivers=llvmpipe,softpipe")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30366>
2024-07-28 06:34:39 +00:00
Eric Engestrom
5d84e6cf26 meson: improve wording of "incompatible llvm options" error
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30366>
2024-07-28 06:34:39 +00:00
Eric Engestrom
77b69cdbc3 meson: don't select the deprecated swrast option ourselves
Users get the deprecation warning but didn't do anything, they left
things to `auto` and we pick the deprecated `swrast`? Hardly seems fair!

(I forgot to do this when I added the deprecation warning to ajax's commit)

Fixes: 010b2f9497 ("gallium/meson: Deconflate swrast/softpipe/llvmpipe")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30366>
2024-07-28 06:34:39 +00:00
Konstantin Seurer
a211a51a4a lavapipe: Fix box sorting during ray traversal
Fixes performance a bit.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30348>
2024-07-27 20:38:13 +00:00
Konstantin Seurer
a6930640a9 llvmpipe: Improve PIPE_QUERY_PIPELINE_STATISTICS accuracy
arb_pipeline_statistics_query-frag expects the reported value to be
reasonably accurate (no 100% error).

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28227>
2024-07-27 22:13:48 +02:00
Sai Teja Pottumuttu
e7ee69b24d docs: Match README installation guide with meson.rst
Sync the build and install instructions in README.rst from
meson.rst

Signed-off-by: Sai Teja Pottumuttu <saiteja13427@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30294>
2024-07-27 11:53:53 +00:00
Sai Teja Pottumuttu
324de97f48 docs: Add required dependencies to meson.rst
Add the required dependencies to build and install mesa main
on linux.

Signed-off-by: Sai Teja Pottumuttu <saiteja13427@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30294>
2024-07-27 11:53:53 +00:00
X512
828c3cf002 egl/haiku: fix synchronization problems, add missing header
`st_context_invalidate_state` call is required when changing buffer attachments.

Including header with BBitmap class definition is required to properly
call C++ destructor.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30372>
2024-07-27 00:59:29 +00:00
Ian Romanick
fdb6afe71e intel/elk: Fix undefined left shift of negative value in elk_texture_offset
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/30333>
2024-07-26 17:18:08 -07:00
Ian Romanick
f3f4a057b9 intel/elk: Fix undefined left shift of large UW value in elk_imm_uw
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/30333>
2024-07-26 17:18:06 -07:00
Ian Romanick
0e5ac7d6b0 intel/elk: Fix undefined left shift of negative value in update_uip_jip
v2: Add comment and assertion to explain why the shift is
safe. 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/30333>
2024-07-26 17:18:04 -07:00
Ian Romanick
c2dda8c8e7 intel/elk: Fix undefined shift by 64 of uint64_t in elk_compute_first_urb_slot_required
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/30333>
2024-07-26 17:18:01 -07:00
Ian Romanick
e6669467b8 intel/brw: Fix undefined left shift of negative value in brw_texture_offset
When -fsanitize=shift is used, many instances of the following are
produced:

src/intel/compiler/brw_fs_nir.cpp:114:30: runtime error: left shift of negative value -1

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/30333>
2024-07-26 17:17:59 -07:00
Ian Romanick
4f24c2707f intel/brw: Fix undefined left shift of large UW value in brw_imm_uw
When -fsanitize=shift is used, 'ninja test' would fail in several
Intel assembly tests (mul.asm and and.asm) with:

src/intel/compiler/brw_reg.h:703:22: runtime error: left shift of 65532 by 16 places cannot be represented in type 'int'

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/30333>
2024-07-26 17:17:56 -07:00
Ian Romanick
abb7c012ff intel/brw: Fix undefined left shift of negative value in update_uip_jip
When -fsanitize=shift is used, many instances of the following are
produced:

src/intel/compiler/brw_eu_compact.c:2244:50: runtime error: left shift of negative value -306

v2: Add comment and assertion to explain why the shift is
safe. 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/30333>
2024-07-26 17:17:53 -07:00
Ian Romanick
228e049db6 intel/brw: Fix undefined shift by 64 of uint64_t in brw_compute_first_urb_slot_required
When -fsanitize=shift is used, many instances of the following are
produced:

src/intel/compiler/brw_compiler.h:1661:44: runtime error: shift exponent 64 is too large for 64-bit type 'long long unsigned int'

I think this is an actual bug. It should check the sentinel value, but
the sentinel value is 64. The shift by 64 is treated as a shift by
0. The varying 0 is explicitly filtered by the rest of the
if-test. How does this work?

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/30333>
2024-07-26 17:17:15 -07:00
Sushma Venkatesh Reddy
455deacbce intel/brw: Fix DEBUG_OPTIMIZER
Due to recent regression, adding INTEL_DEBUG=optimizer is dumping
shader optimization pass details to console rather than to respective
files.
Thank you, Kenneth W Graunke for helping me figure this out.

Fixes: 17b7e49089 ("intel/brw: Move out of fs_visitor and rename print instructions")

Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30389>
2024-07-26 22:22:58 +00:00
José Roberto de Souza
eb5a3617e2 anv: Handle internal shader compilation failure
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/30380>
2024-07-26 21:58:21 +00:00
José Roberto de Souza
196b3d7b5b anv: Improve error message when pipeline creation fails during shader compilation
Due the lack of SIMD8 in Xe2 platforms we are not able to compile
a shader for dEQP-VK.protected_memory.stack.stacksize_1024 that fits
into scratch space.

So before this patch when such failure happened it would return
VK_ERROR_OUT_OF_HOST_MEMORY error.
So here when available include the compiler error string to better
inform what the actual failure.

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/30380>
2024-07-26 21:58:21 +00:00
Daniel Stone
0b16d7ebb9 dri: Allow INVALID for modifier-less drivers
If the user passes in DRM_FORMAT_MOD_INVALID as an acceptable modifier,
we can progress with implicit modifiers. Add this to a more
comprehensive special case along with linear to make sure that we can
still allocate when users pass in a modifier list to a driver which
doesn't support modifiers.

Signed-off-by: Daniel Stone <daniels@collabora.com>

Fixes: 361f362258 ("dri: Unify createImage and createImageWithModifiers")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30383>
2024-07-26 21:28:01 +00:00
Jianxun Zhang
349e7a2919 intel/common: Remove blank lines in intel_set_ps_dispatch_state() (xe2)
Backport-to: 24.2
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29907>
2024-07-26 21:02:24 +00:00
Jianxun Zhang
cb7f816fc4 intel/common: Ensure SIMD16 for fast-clear kernel (xe2)
Add a restriction on SIMD mode for fast-clear pixel
shader according to the Bspec.

Backport-to: 24.2
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29907>
2024-07-26 21:02:24 +00:00
José Roberto de Souza
5fdacb56ed anv: Propagate protected information to blorp_batch_isl_copy_usage()
This fixes protected tests that uses vkCmdCopyBuffer().

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/30369>
2024-07-26 20:36:32 +00:00
José Roberto de Souza
79f95a3711 isl: Fix Xe2 protected mask
BSpec 71045 and 57023 still points that protected/encrypted bit is still
bit 0, bit 1 should not be set or undesired MOCS index could be set.

Fixes: 7be8bc2c97 ("isl: Add mocs for xe2")
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/30369>
2024-07-26 20:36:32 +00:00
Eric Engestrom
79389b9f6f v3d/ci: mark glx@glx-visuals-depth as flaky on rpi4, just like the -stencil variant
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30387>
2024-07-26 20:18:12 +00:00
Mike Blumenkrantz
40004219b1 dri: fix kmsro define
Fixes: 50fc7cc290 ("glx: directly link to gallium")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30376>
2024-07-26 19:41:37 +00:00
Alyssa Rosenzweig
5bc8284816 hk: add Vulkan driver for Apple GPUs
Honeykrisp is a Vulkan 1.3 driver for Apple GPUs. It currently support M1 and
M2, future hardware support is planned. It passed CTS a few months ago and with
two exceptions[1] should still pass now.

Compared to the May snapshot that passed conformance [1], this adds a bunch of
new features, most notably:

* Geometry shaders
* Tessellation shaders
* Transform feedback
* Pipeline statistics queries
* Robustness2
* Host image copy

Theoretically, we now support everything DXVK requires for D3D11 with full
FL11_1. To quote Rob Herring:

   How's performance? Great, because I haven't tested it.

This driver is NOT ready for end users... YET. Stay tuned, it won't be long now
:}

I would like to reiterate: Honeykrisp is not yet ready for end users. Please
read [3].

Regardless, as the kernel UAPI is not yet stable, this driver will refuse to
probe without out-of-tree Mesa patches. This is the same situation as our GL
driver.

On the Mesa side, the biggest todo before the release is improving
performance. Right now, I expect WineD3D with our GL4.6 driver to give better
performance. This isn't fundamental, just needs time ... our GL driver is 3
years old and honeykrisp is 3 months old.

On the non-Mesa side, there's still a lot of movement around krun and FEX
packaging before this becomes broadly useful for x86 games.

At any rate, now that I've finished up geometry and tessellation, I'm hopefully
done rewriting the whole driver every 2 weeks. So I think this is settled enough
that it makes sense to upstream this now instead of building up a gigantic
monster commit in a private branch.

[1] Pipeline robustness and pipeline statistics are included in this tree but
    need bug fixes in the CTS to pass. This is being handled internally in
    Khronos. These features may be disabled to get a conformant driver.

[2] https://rosenzweig.io/blog/vk13-on-the-m1-in-1-month.html

[3] https://dont-ship.it/

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
767280fd73 libagx: rework tess i/o
this simplifies state which hk wants.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
2bf01845d0 libagx: mask counters to 32-bit
possibly we should use real 64-bit counters, that's something for later though.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
16caad4038 libagx: add statistic increment kernel
for TCS

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
0708f92b37 ail: add ail_get_level_size_B helper
this will be useful for host_image_copy

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
633540c18a ail: constify more arguments
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
76e3bd56f6 asahi: offset buffer images in software
this is needed for honeykrisp to implement
uniformTexelBufferOffsetSingleTexelAlignment.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
735c63c75e libagx: hoist code out of loop
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
4e5ce7e759 asahi: split up agx_nir_lower_vs_before_gs
honeykrisp needs to preserve info for a little longer.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
d3e7a7b8c8 asahi: add TES->compute lowering
honeykrisp wants to do this explicitly so we don't need prologs for TES. the gl
driver uses TES prologs implicitly for the same effect, but that's ...
suboptimal.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
9595d79b89 asahi: make GS inputs explicit
we don't want to assume VS->GS, since we want to reuse the root uniforms across
the whole draw with honeykrisp tess+gs.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
f6e9e7d3ce libagx: fix prefix sum kernel
the calculation of workgroup reductions was wrong, giving nondeterministic
results when prefix summing >= 1024 items. fixes misrendering in
terraintessellation on honeykrisp.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
bdbd81ea40 asahi: drop #includes
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
21fa5faeec asahi: drop pointless conversion
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
96306a8b21 asahi: refactor prolog lowering
combine 2 passes and get something less silly as the result.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
0bd897989e asahi: drop unused patch index buffer lowering
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
3992a54dcf asahi: drop dead code
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Asahi Lina
8808441814 asahi: Relax cross-context flush
Instead of doing a full sync, we can use a screen-global timeline sync
object to globally serialize on the GPU side when one context flushes,
so we don't actually have to wait on the CPU.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Asahi Lina
1cd60fb2c7 asahi: Fix non-async flush
As far as I can tell, we're actually supposed to do a full sync here if
ASYNC or DEFERRED are not specified.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Asahi Lina
a0cdd9d5ed asahi: Add more batch debug
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Asahi Lina
ac4ba43c55 asahi: Print queue ID with batch debug
Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Asahi Lina
2c057cc4d9 asahi: Add 1queue debug option
This is a hacky implementation but it's for debug only anyway.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
d0424eb63b vk/meta: add VK_IMAGE_VIEW_CREATE_INTERNAL_MESA flag
honeykrisp to use, and hopefully common vk_meta will use this soon too

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Alyssa Rosenzweig
0d66ba6e5d vk/meta: add buffer view tracking
honeykrisp will use this, at least for now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Lionel Landwerlin
d5b0526507 anv: propagate protected information for blorp operations
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29982>
2024-07-26 18:15:43 +00:00
Lionel Landwerlin
8d9cc6aa23 anv: properly flag image/imageviews for ISL protection
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29982>
2024-07-26 18:15:43 +00:00
Lionel Landwerlin
4eab285d4a isl: account for protection in base usage checks
Only Cc stable because it's needed for the next patches.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29982>
2024-07-26 18:15:43 +00:00
Eric Engestrom
1337e00a89 v3d/ci: mark spec@amd_performance_monitor@api as flaky on rpi4
It's been failing a lot in the last few days, blocking a bunch of MRs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30385>
2024-07-26 19:31:56 +02:00
Faith Ekstrand
37a38f6744 nak/sm50: Add support for OpAL2P
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
cd176c8784 nvk: Fix zero-size vertex/index buffer bindings pre-Turing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
2439cb8450 nvk: Use nvk_buffer_addr_range() for index buffers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
c3682ccf60 nak: Implement depth clip control pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
e287ba95b0 nak/sm50: Fix the encoding of ffma with cbuf in src2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
3353374287 nak: Add tests for OpLop2 and OpLop3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
dc4ebfd562 nak/sm50: OpLop2 does not have .X
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
680ec0ec26 nak/sm50: OpIAdd2 only supports one negate modifier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
563b32c2c3 nak: Implement From<bool> for Pred
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
9badf675ad nvk: Don't push bound UBOs on Volta and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
16509db66b nak/nir: Don't emit CCtl for release barriers on Maxwell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
dee02cf220 nak: Fix OpCCtl encoding on Maxwell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
940e52ad15 nvk: Squash txq results to 0 for null descriptors
We don't have "real" null descriptors on Maxwell.  They return 0 okay
but they don't query right so we have to smash the result.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
efd86d6daa nak/builder: Fix isetp64 for pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
a33507d621 nak/sm50: Set the .x bit for isetp
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
b87bd4b608 nak/hw_tests: Add debug printing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
bfcb9995da nak: Add tests for OpISetP
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
6056bc4afa nak: Add tests for nak_builder::iadd64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
074ba214fe nak: Add tests for nak_builder::isetp64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
05bbfa7963 nak: Align shader data to the min CBuf alignment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
8050b57c28 nak/calc_instr_deps: Set a delay of 13 for flow ops pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Faith Ekstrand
c29980b218 nak: IMul and IMad are variable latency pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
2024-07-26 15:46:59 +00:00
Eric Engestrom
2bc82b7147 ci/baremetal: fix logic for retrying boot when it failed
Contrary to what the original commit said, this is actually still used
(see .gitlab-ci/bare-metal/poe-powered.sh:205), and the boot retry logic
has been broken ever since, exacerbating the rpi farm boot problems.

Fixes: 97b2afa16a ("ci/bare-metal: Drop the 2 vs 1 exit code from poe_run.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30340>
2024-07-26 14:29:56 +00:00
Adam Jackson
b919bdc6f6 gallium/video: Move DRI2 support behind legacy-x11
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29969>
2024-07-26 11:38:42 +00:00
Adam Jackson
ae51322d7b egl/x11: Move DRI2 client support behind legacy-x11
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29969>
2024-07-26 11:38:42 +00:00
Adam Jackson
6292dfb939 glx: Move DRI2 client support behind legacy-x11
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29969>
2024-07-26 11:38:42 +00:00
Adam Jackson
e8c1d966e5 meson: Introduce the legacy-x11 option
We're going to use this to hide support for excessively old or weird
xserver environments.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29969>
2024-07-26 11:38:42 +00:00
Rhys Perry
a8a15dc5b5 aco: add struct and helpers for exec potentially 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/30320>
2024-07-26 11:08:27 +00:00
Rhys Perry
39264a90c3 aco: consider exec empty after divergent continue then divergent break
For:
loop {
   if (divergent)
      continue
   if (divergent)
      break
   //exec is potentially empty here
   loop {
      if (divergent)
         break
   }
}
If a subset of invocations take the continue and then the rest take the
break, then exec will be empty after the break.

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/30320>
2024-07-26 11:08:27 +00:00
Mary Guillemard
e863acb318 panvk: Pass attrib_buf_idx_offset to desc_copy_info
This was missing from the original fix and was causing MMU falults on
"dEQP-VK.memory.pipeline_barrier.host_write_uniform_texel_buffer.*".

Fixes: cec45cac84 ("panvk: Fix image support in vertex jobs")
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/30378>
2024-07-26 08:55:26 +00:00
Mary Guillemard
4c1c169e54 panfrost: Add B8G8R8A8_SNORM in panfrost_pipe_format
Was missing and causing a DATA_INVALID_FAULT on panvk with
"dEQP-VK.texture.texel_buffer.uniform.snorm.b8g8r8a8-snorm" test.

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/30378>
2024-07-26 08:55:26 +00:00
Juan A. Suarez Romero
8f8b520c78 vc4: fix typo in simulator conditional declaration
Fixes: f1f8c465d5 ("vc4,v3d,v3dv: avoid compiling in unused `sim_file` field in the {vc4,v3d}_screen/v3dv_physical_device struct")
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/30357>
2024-07-26 07:33:00 +00:00
GKraats
ad02bfe41d i915g: fix max_lod at mipmap-sampling
At update_map at i915_state_sampler.c max_lod is no longer set to 1
for npots. This almost totally disabled mipmapping.
Max_lod should still be set to 1, but only if it is still 0,
because no mipmap-levels are present.
According to existing comment at update_map this is needed, to
avoid problems at sampling,
if MIN_FILTER and MAX_FILTER differ.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28638>
2024-07-26 04:26:54 +00:00
GKraats
bb95d744ca i915g: fix mipmap-layout for npots
Remove at i945_texture_layout_2d() call of  util_next_power_of_two(),
which oversized the npot-blocks for every level to get power of 2
for width and height. Hardware doesnot expect these oversized
npot-blocks, causing mangled mipmapping.
This also is done at i915_texture_layout_2d(), which is
used by older gen3-gpus.

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28638>
2024-07-26 04:26:54 +00:00
GKraats
a1a301488b i915g: fix generation of large mipmaps
Generation of mipmaps was failing for large heights.
If height > 1365 LEVEL 1 couldnot be generated because of
the max texture size limit (2048). This is solved by using an
offset at the texture-buffer at overflow situations.
The height of the offset must be multiple of 8.
This solves the problem mentioned at MR !27561 (closed).

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

Cc: mesa-stable

Signed-off-by: GKraats <vd.kraats@hccnet.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28638>
2024-07-26 04:26:53 +00:00
Mike Blumenkrantz
c71c1d2a01 st/interop: return unsupported without screen hooks
this will enable some refactoring

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30377>
2024-07-26 02:42:28 +00:00
Mike Blumenkrantz
ed2ec808b1 glx: delete tests
nobody needs these and they complicate glx interfaces by existing

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30365>
2024-07-26 02:11:33 +00:00
Mike Blumenkrantz
bb5145bcb8 llvmpipe: only use vma allocations on linux
this was broken on other platforms

Fixes: a062544d3d ("llvmpipe: Use an anonymous file for memory allocations")

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30229>
2024-07-25 21:24:36 +00:00
Mike Blumenkrantz
a8ff1bdc83 llvmpipe: handle vma allocation failure
Fixes: a062544d3d ("llvmpipe: Use an anonymous file for memory allocations")

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30229>
2024-07-25 21:24:36 +00:00
Dave Airlie
3e01422a16 gallivm/sample: fix sampling indirect from vertex shaders
When doing indirect sampling, we just fetch one value per lane,
but type.length == 1 caused num_quads to be 0 which caused things
to crash.

Fixes dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.uniform.vertex.sampler2d

Cc: mesa-stable
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/30358>
2024-07-25 20:45:58 +00:00
Georg Lehmann
97aa3464b9 radv/rt: remove one VALU from traversal loop
Not much, but something, I guess?

Foz-DB Navi31:
Totals from 93 (0.12% of 79395) affected shaders:
MaxWaves: 1338 -> 1354 (+1.20%)
Instrs: 3689907 -> 3689721 (-0.01%); split: -0.01%, +0.00%
CodeSize: 18921812 -> 18922920 (+0.01%); split: -0.00%, +0.01%
VGPRs: 9012 -> 8988 (-0.27%)
Latency: 23153748 -> 23167640 (+0.06%)
InvThroughput: 4490882 -> 4493136 (+0.05%)
Copies: 287888 -> 287728 (-0.06%)
VALU: 2022082 -> 2021916 (-0.01%)
SALU: 458904 -> 459064 (+0.03%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30342>
2024-07-25 20:24:23 +00:00
Yiwei Zhang
3e6b73a75a Revert "meson: disallow Venus debug + LTO build via GCC"
This reverts commit 423ba5d1c7.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30355>
2024-07-25 19:14:31 +00:00
Gurchetan Singh
7cc199502f vulkan/runtime: introduce vk_meta_object_list
Code movement: Move the object list + destroy_object
function to separate files.

This allows vk_command_buffer.{h, c} to not depend on all
of vk_meta, which depends on vk_pipeline, which depends on
NIR.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30355>
2024-07-25 19:14:31 +00:00
Renato Pereyra
97ed2e4d4b egl: Refactor init of CPU tracing in EGL for Android
eglGetPlatformDisplay is called by Android's Zygote when preloading
EGL at boot. When Perfetto is initialized by `util_cpu_trace_init`, it
launches side threads to handle tasks. Unfortunately, Zygote does not
tolerate unexpected threads created within its PID. As a result, Zygote
aborts and Android devices fail to boot.

Signed-off-by: Renato Pereyra <renatopereyra@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30360>
2024-07-25 18:37:37 +00:00
Yiwei Zhang
f788c87d02 venus: fix a race condition between gem close and gem handle tracking
After using sparse array to manager virtgpu bo, we set gem_handle to 0
to indicate that the bo is invalid. However, the gem handle gets closed
before that and can be reused by another newly created bo, leading to
the tracked gem handle being unexpectedly zero'ed out.

Fixes: 88f481dd74 ("venus: make sure gem_handle and vn_renderer_bo are 1:1")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30362>
2024-07-25 18:13:21 +00:00
Caio Oliveira
23b0798551 intel/brw: Move interp_reg and per_primitive_reg out of fs_visitor
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
a5cc8c4807 intel/brw: Move VARYING_PULL_CONSTANT_LOAD from fs_visitor to fs_builder
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
8a39231e4f intel/brw: Move calculate_cfg out of fs_visitor
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
b98930c770 intel/brw: Move regalloc and scheduling functions out of fs_visitor
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
5cb1f46fd1 intel/brw: Remove workgroup_size() helper from fs_visitor
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
17b7e49089 intel/brw: Move out of fs_visitor and rename print instructions
They use the brw_print prefix now.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
bb7f2db5a2 intel/brw: Move printing functions to its own file
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
cdbee4156e intel/brw: Reduce scope of some MESH specific functions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
67ead4edff intel/brw: Reduce scope of some TES specific functions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
f9ddf51b70 intel/brw: Reduce scope of some TCS specific functions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
47b9dc9070 intel/brw: Reduce scope of some GS specific functions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
28858b3ad1 intel/brw: Reduce scope of some FS specific functions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
a8b4b9dd51 intel/brw: Reduce scope of some VS specific functions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
fdb029fe1b intel/brw: Move and reduce scope of run_*() functions
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Caio Oliveira
c92b8a802e intel/brw: Move remaining compile stages to their own files
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30169>
2024-07-25 15:37:13 +00:00
Matt Turner
a3714b55f4 intel/elk: Use REG_CLASS_COUNT
Fixes: d44462c08d ("intel/elk: Fork Gfx8- compiler by copying existing code")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30314>
2024-07-25 14:55:09 +00:00
Matt Turner
5e24c21625 intel/brw: Use REG_CLASS_COUNT
Fixes: 5d87f41a54 ("intel/fs/ra: Define REG_CLASS_COUNT constant specifying the number of register classes.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30314>
2024-07-25 14:55:09 +00:00
X512
2e70757dc0 egl/haiku: fix double free of BBitmap
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30364>
2024-07-25 14:20:42 +00:00
Karol Herbst
80da990f22 rusticl/spirv: do not add additional new lines when joining logs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30029>
2024-07-25 13:25:02 +00:00
Karol Herbst
f283c38f9c clc: force linking of spirvs with mismatching pointer types in signatures
With LLVM-17 and opaque pointers, sometimes the compiled spirvs lose all
their information in regards to what specific pointer type a function
parameter has.

To workaround this, we can tell the spirv linker to insert casts to handle
those cases.

See https://github.com/KhronosGroup/SPIRV-Tools/pull/5534

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30029>
2024-07-25 13:25:02 +00:00
Karol Herbst
ec46d2a8f2 rusticl/kernel: move internal_args into NirKernelBuild
This let's us support different internel arugments between devices

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
d6b38605c8 rusticl/kernel: add type for the convert_spirv_to_nir return value
and also move all the (de)serialization into it

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
06902ec7d2 rusticl: remove unsued serialization helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
b58390bca2 rusticl: use blob for all serialization
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
dc896c31f9 rusticl/program: move attribute_str to the spirv module
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
fcdf27de6b rusticl/kernel: move setting of nir metadata into lower_and_optimize_nir
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
629d6fc124 rusticl/kernel: make some types and fields private
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Karol Herbst
3442db4106 rusticl: move more kernel related things into kernel.rs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30351>
2024-07-25 10:59:00 +00:00
Christian Gmeiner
c33d2db06a meson: Add missing inc's to idep_nir_headers
nir.h includes:
 - "compiler/glsl_types.h" -> inc_src is needed
 - "util/u_atomic.h" -> "no_extern_c.h" -> inc_include needed

This makes it possible to use rust's bindgen with only nir.h
as specified include.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30359>
2024-07-25 05:51:19 +00:00
David Heidelberg
5f7eb8cff6 freedreno: support lua pkgconfig variants
Distributions have different naming styles, detect all of them.

Example from Alpine / postmarketOS:
Run-time dependency lua54 found: NO (tried pkgconfig and cmake)
Run-time dependency lua5.4 found: YES 5.4.7

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30352>
2024-07-25 05:38:06 +00:00
Dave Airlie
76ae27efb3 llvmpipe/cs/orcjit: add stub function name for coro
This fixes some debug
JIT session error: Unexpected definitions in module : [ cs_co_variant ]
Failed to materialize symbols: { (cs0_variant0_3, { cs_variant }) }

Fixes: bb0efdd4d8 ("llvmpipe: add shader cache support for ORCJIT implementation")
Reviewed-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30335>
2024-07-25 00:26:46 +00:00
Dave Airlie
fcf9e33ec0 draw/orcjit: supply stub function for tcs coro
This fixes a crash with shader cache enabled:
JIT session error: Unexpected definitions in module : [ draw_llvm_tcs_coro_variant ]
Failed to materialize symbols: { (draw_llvm_tcs_variant0_7, { draw_llvm_tcs_variant }) }

Fixes: bb0efdd4d8 ("llvmpipe: add shader cache support for ORCJIT implementation")
Reviewed-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30335>
2024-07-25 00:26:46 +00:00
Mike Blumenkrantz
ec7afd2c24 dril: rework config creation
the original implementation of config selection had a number of flaws:
* using eglChooseConfigs with lots of loops, which was okay for filtering but
  also added considerable complexity and made it difficult to correctly
  get all the configs
* not adding enough configs; there were a lot more color and zs formats
  which weren't in the base config list
* double buffer configs were never created
* srgb configs were also never created

there will now be fewer configs than there were pre-DRIL, but this is only
because accum buffers are now gone and not because anything of value is
missing

Fixes: 3de62b2f9a ("gallium/dril: Compatibility stub for the legacy DRI loader interface")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30311>
2024-07-24 23:42:05 +00:00
Paulo Zanoni
dd5362c78a anv/xe: try harder when the vm_bind ioctl fails
From all the many possible errors returned by the vm_bind ioctl, some
can actually happen in the wild when the system is under memory
pressure. Thomas Hellström pointed to us that, due to its asynchronous
nature, the vm_bind ioctl itself has to pin some memory, so if the
number of bind operations passed is too big, there is a probability
that it may run out of memory.

Previously the Kernel would return ENOMEM when this condition
happened.  Since commit e8babb280b5e ("drm/xe: Convert multiple bind
ops into single job") the Kernel has started returning ENOBUFS when it
doesn't have enough memory to do what it wants but thinks we'd succeed
if we tried to do one bind operation at a time (instead of doing
multiple operations in the same ioctl), and ENOMEM in some other
situations. Still-uncommitted commit "drm/xe: Return -ENOBUFS if a
kmalloc fails which is tied to an array of binds" proposes converting
a few more ENOMEM cases no ENOBUFS.

Still, even ENOMEM situations could in theory be possible to recover
from, because if we wait some amount of time, resources that may have
been consuming memory could end up being freed by other threads or
processes, allowing the operations to succeed. So our main idea in
this patch is that we treat both ENOMEM and ENOBUFS in the same way,
so our implementation can work with any xe.ko driver regardless of
having or not having the commits mentioned above.

So in this patch, when we detect the system is under memory pressure
(i.e., the vm_bind() function returns VK_ERROR_OUT_OF_HOST_MEMORY), we
throw away our performance expectations and try to go slowly and
steady. First we wait everything we're supposed to wait (hoping that
this alone could also help to alleviate the memory pressure), and then
we synchronously bind one piece at a time (as this will ensure ENOBUFS
can't be returned), hoping that this won't cause the Kernel to try to
reserve too much memory. All this while also hoping that whatever
thing that may be eating all the memory goes away in the meantime. If
even this fails, we give up and hope the upper layer will be able to
figure out what to do.

This fixes a bunch of LNL failures and flaky tests (as LNL is our
first officially supported xe.ko platform). This can be seen in dEQP
but only if multiple tests are being run parallel. Happens in multiple
tests, some of which may include:

  - dEQP-VK.sparse_resources.image_sparse_binding.2d_array.rgba8_snorm.1024_128_8
  - dEQP-VK.sparse_resources.image_sparse_binding.3d.rgba16_snorm.1024_128_8
  - dEQP-VK.sparse_resources.image_sparse_binding.3d.rgba16ui.512_256_6

I don't ever see these errors when running Alchemist/DG2 with xe.ko.

Fixes: e9f63df2f2 ("intel/dev: Enable LNL PCI IDs without INTEL_FORCE_PROBE")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30276>
2024-07-24 23:18:36 +00:00
C Stout
8b86653da6 util: fix 32bit compiler error in fossilize_db
error: in call to 'fwrite', size * count is too large for the given buffer

sizeof(uint64_t) is used in the call to fwrite.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30154>
2024-07-24 22:43:17 +00:00
Yiwei Zhang
1af2f5e198 ci: re-enable venus ci
Skip dEQP-VK.binding_model.mutable_descriptor.multiple_arrays_mixed.*
because lavapipe behind venus can end up returning OODM for device
memory allocations.

The instability likely started from lavapipe gaining support of dma-buf
import/export. Then vkr renderer would no longer use the opaque fd
export with lavapipe, and we are hitting certain bottleneck of udmabuf.

Let's get venus ci re-enabled now and we can later flip vkr back to
prefer opaque fd export if seeing lavapipe for comparison.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Daniel Stone <daniel.stone@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30356>
2024-07-24 22:25:23 +00:00
Faith Ekstrand
71639eb837 nak: Use the RED path for atomics with unused destinations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30354>
2024-07-24 21:55:31 +00:00
Faith Ekstrand
c347c7cbd8 nak/sm50: Implement OpAtom with Dst::None as RED
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30354>
2024-07-24 21:55:31 +00:00
Faith Ekstrand
959ae0161b nak/sm70: Implement OpAtom with Dst::None as RED
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30354>
2024-07-24 21:55:31 +00:00
Martin Krastev
bcff324ef3 svga/ci: disable vmware-qemu-traces jobs
The vmware farm job vmware-qemu-traces is currently not runnable after
network restructuring (new firewall rules). Disable job for now.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
61a647ba4a svga/ci: triage unexpected piglit passes
Triage piglit unexpected passes
	spec@!opengl 1.1@clipflat
	spec@!opengl 1.0@gl-1.0-polygon-line-aa
	spec@arb_buffer_storage@bufferstorage-persistent
	spec@arb_copy_buffer
	spec@arb_sync@clientwaitsync-timeout
	spec@ext_direct_state_access@named-buffers

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
93005d20ee svga/ci: update FORCE_KERNEL_TAG
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
d0df53558e svga/ci: triage unexpected piglit pass
Triage unexpected pass
	shaders@glsl-bug-110796

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
8bcd18c90e svga/ci: change DNS server for vmware jobs
Previous vmware-specific DNS server no longer valid.

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Martin Krastev
c98f5d5eea svga/ci: enable vmware farm
Enable vmware svga farm after network maintenance

Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30344>
2024-07-24 21:26:26 +00:00
Matt Turner
aae82061af intel/clc: Free disk_cache
Fixes: c15bf88f01 ("intel: Add a little OpenCL C compiler binary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30313>
2024-07-24 20:46:28 +00:00
Matt Turner
1574372de4 intel/clc: Free parsed_spirv_data
This declaration shadowed a variable by the same type and name in an
outer scope. That variable is passed to clc_free_parsed_spirv().

Fixes: 4fd7495c69 ("intel/clc: add ability to output NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30313>
2024-07-24 20:46:28 +00:00
David Rosca
8b1a889e45 radeonsi/vcn: Add support for QVBR rate control mode
This rate control mode needs pre-encode enabled and currently is
supported for VCN3 and VCN4.
AV1 needs quality level scaled down from 255 to 51 range.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4024
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30221>
2024-07-24 20:18:49 +00:00
David Rosca
ae293d176b radeonsi/vcn: Bump enc FW interface version for VCN3 and VCN4
This is needed to enable QVBR support. Also adjust to changes in
spec_misc_av1.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30221>
2024-07-24 20:18:49 +00:00
David Rosca
e539f8ef5f radeonsi/vcn: Only enable filler data for CBR
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30221>
2024-07-24 20:18:49 +00:00
C Stout
b6d8dd6c9f util: fix fossilize_db compile error
Observed in Fuchsia build (with -Wwrite-strings):

error: passing 'const char[10]' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30334>
2024-07-24 19:32:08 +00:00
Eric Engestrom
f1f8c465d5 vc4,v3d,v3dv: avoid compiling in unused sim_file field in the {vc4,v3d}_screen/v3dv_physical_device struct
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30287>
2024-07-24 19:11:24 +00:00
Eric Engestrom
eae740f2e4 v3d,v3dv: simplify USE_V3D_SIMULATOR/using_v3d_simulator logic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30287>
2024-07-24 19:11:24 +00:00
Eric Engestrom
5577078ac1 v3d,v3dv: figure out whether we're using the simulator only once
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30287>
2024-07-24 19:11:23 +00:00
Eric Engestrom
f90d1182e0 v3d,v3dv: reuse dep_v3d_hw from simulator/meson.build
broadcom/simulator/ gets parsed before broadcom/vulkan/ or
gallium/drivers/v3d/ so this is safe.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30287>
2024-07-24 19:11:23 +00:00
Alessandro Astone
7949471716 egl/gbm: Walk device list to initialize DRM platform
We cannot always use /dev/dri/card0.
As a matter of fact, on systems with SimpleDRM enabled /dev/dri/card0
will be created by it and removed once a GPU driver has loaded.

In any case we shouldn't hard-code the device number and instead walk
the device list to find the first suitable device.

This issue is trivially reproducible with `eglinfo -B -p gbm` on
Ubuntu 24.04 or Fedora 40

Fixes: 32f4cf3808 ("egl/gbm: Fix EGL_DEFAULT_DISPLAY")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30325>
2024-07-24 17:35:40 +00:00
Dylan Baker
4ef0cbaf05 crocus: check for depth+stencil before creating resource
This avoid leaking memory if we return early.

Fixes: 5f7df5df0d ("crocus: disable depth and d+s formats with memory objects")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30305>
2024-07-24 17:21:26 +00:00
Dylan Baker
34145725ce crocus: properly free resources on BO allocation failure
Iris already has the same fix applied.

Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30305>
2024-07-24 17:21:26 +00:00
Dylan Baker
11bc95934f tgsi_to_nir: free disk cache value if the size is wrong
Fixes: 4db880d805 ("ttn: Implement disk cache")
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/30308>
2024-07-24 16:50:59 +00:00
José Roberto de Souza
945564e498 anv: Wait for Xe exec queue to be idle before destroying it
Paulo reported that Vulkan is also affected by the drop of permanent
exec queues in Xe KMD, Iris already have this handling.

So here using the special DRM_IOCTL_XE_EXEC with num_batch_buffer == 0
to get a syncobj signaled when the last DRM_IOCTL_XE_EXEC is completed.

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/30156>
2024-07-24 16:27:30 +00:00
Mike Blumenkrantz
6cd4372460 ci: prune dri from LD_LIBRARY_PATH
partial revert of 50fc7cc290

Fixes: 50fc7cc290 ("glx: directly link to gallium")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30346>
2024-07-24 15:53:12 +00:00
Christian Gmeiner
a885f91617 etnaviv: Rework uniform handling for UBO addresses
We are not using this 'feature'. Doing this in the
compiler would be lot of pain, as there is no backend
IR. The right way to do it would be nir address opt pass,
that does some offset and shift lowering. Lets see this
commit as prep change for a nir pass and/or backend IR.

Use the content to store the index of the UBO.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30331>
2024-07-24 12:52:22 +00:00
Mike Blumenkrantz
9b7bb6cc9f gallium: install gallium-$version.so to libdir
Installing this private library into the default library
search path avoids needing to rely on -Wl,-rpath,
which is inconsistently implemented as either DT_RUNPATH
or DT_RPATH on different distributions; in particular,
on distributions that implement it as DT_RPATH,
it interferes with use of LD_LIBRARY_PATH and has semantics
that are difficult to reason about, and is incompatible with
Steam's container runtime (which has the known limitation that
it only implements DT_RUNPATH and not DT_RPATH).

To avoid third-party developers being tempted to link to the
unstable libgallium, give it a name that varies with each Mesa release,
so that there is no obvious way for third-party software to link to it.
This is similar to the way the proprietary Nvidia driver sets up its similar
implementation-detail libraries such as libnvidia-glcore.so.535.183.01.

Fixes: 50fc7cc2 ("glx: directly link to gallium")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30328>
2024-07-24 12:15:55 +00:00
Karol Herbst
098e660a58 rusticl/memory: add a couple of performance warnings
It's mostly just GPU stalls for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30324>
2024-07-24 11:07:52 +00:00
Karol Herbst
ea0676d8ec rusticl/memory: remove stale TODOs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30324>
2024-07-24 11:07:52 +00:00
Karol Herbst
aae84eccfa rusticl/platform: add perf debug option
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30324>
2024-07-24 11:07:52 +00:00
Mary Guillemard
b3cd3b0ed4 panvk: Implement CmdBindDescriptorSets2KHR, CmdPushConstants2KHR and CmdPushDescriptorSet2KHR
Those are part of maintenance6.

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/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
0329070233 panvk: Emit viewport when state is NULL
When rasterizerDiscardEnable is active, it is allowed to have viewport
and scissor disabled.

In case we don't have any viewport defined we now define an empty one.

This is required for
"dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics"
as it never set any viewports and cause fault on IDVS jobs as a result.

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/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
cec45cac84 panvk: Fix image support in vertex jobs
There were various bugs causing images access to fault.

This fixes
"dEQP-VK.memory.pipeline_barrier.host_write_storage_buffer.*" and
possibly other tests.

Fixes: 7bea6f8612 ("panvk: Overhaul the Bifrost descriptor set implementation")
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/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
3b1b672849 panvk: Implement CmdPushDescriptorSetWithTemplate2KHR
We don't support maintenance6 yet but this is needed for
"dEQP-VK.binding_model.shader_access.secondary_cmd_buf.bind.with_push_template.*".

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/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
6b9db2108d docs: Add panvk in VK_EXT_private_data to features.txt
Was missing from the commit enabling it.

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/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
af998eb2bf panvk: Update CI fails
Found with a full run without fraction, seems to have been present for a
while.

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/30293>
2024-07-24 10:46:00 +00:00
Eric Engestrom
e634acaf88 docs: add stub header for u_format_gen.h
Warning, treated as error:
docs/isl/aux-surf-comp.rst:51:docs/../src/util/format/u_formats.h:33: 'util/format/u_format_gen.h' file not found

Fixes: e05415a82e ("format: Generate endian-independent format aliases")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30339>
2024-07-24 11:26:39 +02:00
Juan A. Suarez Romero
c30e5d44b1 v3d/ci: add new flakes
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30337>
2024-07-24 09:19:05 +02:00
Icenowy Zheng
e16a74c023 llvmpipe: add LoongArch support in ORCJIT
LoongArch is an architecture too new to have MCJIT support.

Add its support to ORCJIT code.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30197>
2024-07-24 00:59:23 +00:00
Icenowy Zheng
979c364018 gallivm: add LoongArch support to the mattrs setting code
Currently the mattrs is set according to the softdev convention, with
LSX explicitly disabled because it's troublesome at least on LLVM 17.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30197>
2024-07-24 00:59:23 +00:00
Icenowy Zheng
08425d9aaf util: detect LoongArch architecture
Only 64-bit is considered now because 32-bit LoongArch Linux support
doesn't exist in upstream yet.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30197>
2024-07-24 00:59:23 +00:00
Faith Ekstrand
fd83fc4bfb nak: Don't emit barrier ops for shared memory pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
25eb6c8206 nak: Disable opt_jump_thread pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
9acacccff7 nak/sm50: Emit sync instructions for control-flow
Whenever we can, we emit the sync instruction instead of a branch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
87fa8a788c nak: Add more NIR wrappers for walking the NIR CFG
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
97d2187f48 nak/sm50: Add control-flow sync ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
d6de61cb7e nak: Drop the old encode_sm*.rs files
I don't know how these didn't get dropped earlier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
8bf3213a54 nak/spill_values: Don't assume no trivial phis
Thanks to LCSSA, we can absolutely have phis with only one source and we
need to handle those in spilling.  Fortunately, there's nothing really
special about that case.  I was just prematurely optimizing.

Fixes: bcad2add47 ("nak: Add a spilling pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Christian Gmeiner
305bf503e7 dri: fix driver names
All the driver reports itself with a hyphen here, so they all stopped
loading completely after 50fc7cc290. Check each of them with the latest
kernel sources.

Fixes: 50fc7cc290 ("glx: directly link to gallium")

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30330>
2024-07-23 22:32:07 +02:00
Erico Nunes
0bdc2f180f dri: fix sun4i-drm driver name
The driver reports itself as sun4i-drm with a hyphen here, so
it stopped loading completely after 50fc7cc290.

Fixes: 50fc7cc290 ("glx: directly link to gallium")
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30326>
2024-07-23 19:27:25 +00:00
Karol Herbst
3b6867f53a nak: fix clippy::if_same_then_else error
Fixes: 9321a785cf ("nak: Implement Foldable for OpShf")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30323>
2024-07-23 18:21:18 +00:00
Karol Herbst
526a572233 nak: allow clippy::not_unsafe_ptr_arg_deref lints
Clippy errors on this, so just allow it here.

Fixes: b9c0e3c1ab ("nak: Add helpers for filling QMDs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30323>
2024-07-23 18:21:18 +00:00
Yiwei Zhang
6d0273f67a anv: improve vma usage for descriptor buffer
The dynamic visible memory type (or the prior descriptor buffer memory
type) doesn't need special aux-tt alignment or additional ccs space.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30317>
2024-07-23 17:56:20 +00:00
Ruijing Dong
8a5ef9413b radeonsi/vcn: add HDR metadata obu in av1enc
Enable HDR metadata obu in av1 encoder for
both vcn4/5.

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/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
fc4abbe27d frontends/va: rework VAConfigAttribEncPackedHeaders query
to make it easy to add new values.
enable av1 meta data as the input packed header

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-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/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
aa86c3a235 radeonsi/vcn: input av1 hdr metadata
get av1 hdr metadata from frontends.

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/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
8ea977ca5e frontends/va: check av1 enc hdr metadata
Decode packed header HDR metadata
for av1 encoding.

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/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
35e4d0db9c radeonsi/vcn: add new function for obu_header
add a function for av1_obu_header.

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/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
94d881e621 radeonsi/vcn: correct a typo in a variable
from spliting to splitting

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/30237>
2024-07-23 17:16:21 +00:00
Juan A. Suarez Romero
559eaaf0e6 v3d/ci: add failures from piglit all profile
While we don't run this profile in the CI, our expected lists already
have some tests from old days when we run the all profile.

So let's update the list with new failures from this all profile,
allowing us to have a more comprehensive list of failing tests for our
drivers.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30318>
2024-07-23 16:52:13 +00:00
Marek Olšák
d90080b51b nir/opt_vectorize_io: optionally don't vectorize IO with different types
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11443

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:17 +00:00
Marek Olšák
07ef1a8124 ac,radeonsi: set 16-bit flags in io_options optimally
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:17 +00:00
Marek Olšák
709ebd8293 amd: expose nir_io_mix_convergent_flat_with_interpolated
The drivers need to invert how they gather flat inputs.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:17 +00:00
Marek Olšák
9bfea3183a nir/opt_varyings: improve convergent input handling to fix data corruption
Backward inter-shader code motion can move any code into the previous
shader if it only uses convergent inputs. The problem is the final input
type can end up being integer or FP64, which is incompatible with
the assumption that convergent inputs can always be interpolated.

If such a case occurs and the type is integer or FP64, either don't
do any code motion, or if the driver exposes the new flag, rewrite
convergent  loads to use load_input.

If the new flag is supported, all convergent loads are rewritten to use
load_input, and flat varyings are allowed to be classified as convergent,
which means they are packed into interpolated vec4 slots if there are
unused components.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:16 +00:00
Marek Olšák
b2d32ae246 nir: add nir_intrinsic_load_per_primitive_input, split from io_semantics flag
Instead of having 1 bit in nir_io_semantics indicating a per-primitive
FS input, add a dedicated intrinsic for it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:16 +00:00
Marek Olšák
ecfefe823e nir/opt_algebraic: use fmulz for fpow lowering to fix incorrect rendering
The original implementation in all radeon drivers had this behavior.

Fixes: 9bc1fb4c07 - ac/llvm,radeonsi: lower nir_fpow for aco and llvm
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11464

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30069>
2024-07-23 15:23:27 +00:00
Ganesh Belgur Ramachandra
ec4e5ef0f7 amd/common: skip lane size determination for chips without image opcodes (e.g. gfx940)
This fixes VAAPI decode performance issues.

Fixes: 5b3e1a0532 ("radeonsi: change the compute blit to clear/blit multiple pixels per lane")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30273>
2024-07-23 14:50:37 +00:00
Ganesh Belgur Ramachandra
0cb3ace969 radeonsi: fix eptich on chips without image opcodes (e.g. gfx940)
This fixes VAAPI decode corruption issues.

Fixes: 26cd3a1718 ("ac,radv,radeonsi: add a helper to set mutable tex desc fields")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30273>
2024-07-23 14:50:37 +00:00
Rhys Perry
cccfbe6141 aco: move s_setprio to before NGG exec initialization
fossil-db (gfx1150):
Totals from 32 (0.04% of 79395) affected shaders:
Instrs: 17397 -> 17365 (-0.18%)
CodeSize: 83700 -> 83580 (-0.14%)
Latency: 59006 -> 58974 (-0.05%)

fossil-db (navi21):
Totals from 4 (0.01% of 79395) affected shaders:

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/30241>
2024-07-23 13:14:52 +00:00
Rhys Perry
4574cd9fae aco: form export clauses
This is useful for the export priority workaround. It also moves
copy/conversion instructions up from in-between exports.

fossil-db (gfx1150):
Totals from 9974 (12.56% of 79395) affected shaders:
Instrs: 7038168 -> 6949186 (-1.26%)
CodeSize: 37988148 -> 37632220 (-0.94%)
Latency: 44759046 -> 44324922 (-0.97%); split: -0.97%, +0.00%
InvThroughput: 8213681 -> 8201222 (-0.15%); split: -0.15%, +0.00%

fossil-db (navi21):
Totals from 16785 (21.14% of 79395) affected shaders:
Instrs: 9282414 -> 9282302 (-0.00%)
CodeSize: 50252480 -> 50252032 (-0.00%)
Latency: 59716988 -> 59610334 (-0.18%); split: -0.18%, +0.00%
InvThroughput: 12681965 -> 12680380 (-0.01%); split: -0.01%, +0.00%

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/30241>
2024-07-23 13:14:52 +00:00
Rhys Perry
08a4853ffd aco: add export instructions to should_form_clause
fossil-db (gfx1150):
Totals from 1 (0.00% of 79395) affected shaders:
Instrs: 906 -> 901 (-0.55%)
CodeSize: 4692 -> 4672 (-0.43%)
Latency: 1582 -> 1561 (-1.33%)

fossil-db (navi21):
Totals from 9917 (12.49% of 79395) affected shaders:
Instrs: 6120530 -> 6116252 (-0.07%)
CodeSize: 31808916 -> 31791804 (-0.05%)
Latency: 23854892 -> 23866438 (+0.05%); split: -0.01%, +0.06%
InvThroughput: 4655278 -> 4655490 (+0.00%); split: -0.00%, +0.01%

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/30241>
2024-07-23 13:14:52 +00:00
Rhys Perry
3b732340ec aco/gfx11.5: skip dealloc_vgprs for stages with exports
fossil-db (gfx1150):
Totals from 72997 (91.94% of 79395) affected shaders:
Instrs: 35047397 -> 34679136 (-1.05%)
CodeSize: 182414292 -> 180934440 (-0.81%)
Latency: 225452700 -> 225045411 (-0.18%)
InvThroughput: 40416910 -> 40395608 (-0.05%); split: -0.06%, +0.00%
Branches: 604968 -> 601660 (-0.55%)

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/30241>
2024-07-23 13:14:52 +00:00
Rhys Perry
492d99fc6a aco: add tests for export priority issue
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/30241>
2024-07-23 13:14:51 +00:00
Rhys Perry
0919ce1ac4 aco/gfx11.5: workaround export priority issue
https://github.com/llvm/llvm-project/pull/99273

fossil-db (gfx1150):
Totals from 73996 (93.20% of 79395) affected shaders:
Instrs: 36015357 -> 36807177 (+2.20%)
CodeSize: 189072544 -> 192238748 (+1.67%)
Latency: 245845181 -> 246790550 (+0.38%); split: -0.00%, +0.38%
InvThroughput: 45068018 -> 45116177 (+0.11%); split: -0.00%, +0.11%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30241>
2024-07-23 13:14:51 +00:00
Dylan Baker
55158bed7f util/glsl2spirv: only copy the input file if we're going to change it
Should make the build slightly faster by only copying when we actually
need to, and otherwise pointing at the original source

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30132>
2024-07-23 11:07:04 +00:00
Dylan Baker
36160c967c util/glsl2spirv: fixup the generated depfile when copying sources
So that the depfile contains a reference to the original source rather
than the copied one. This is necessary to avoid ninja not finding the
copy and causing spurious rebuilds when the copy has been removed, as
well as correctly tracking changes to the input files.

fixes: 46644ba371

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30132>
2024-07-23 11:07:03 +00:00
Vlad Schiller
848c7c9560 pvr: Handle VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO
This commit silences a debug message, which can get quite spammy.

Fixes: a2e0701 ("pvr: Enable KHR_image_format_list")
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30222>
2024-07-23 10:44:21 +00:00
Vlad Schiller
eda77bf79d pvr: Handle VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
This commit silences a debug message, which can get quite spammy.

Fixes: 8991e64 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30222>
2024-07-23 10:44:21 +00:00
Eric Engestrom
aed5a974e9 meson: xcb & xcb-randr are needed by the loader whenever x11 is built
Specifically, `src/loader/loader_dri_helper.c` needs them.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11536
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30292>
2024-07-23 09:16:55 +00:00
Vignesh Raman
65c92f0b82 ci: uprev deqp-runner from 0.18.0 to 0.20.0
This includes experimental support for running fluster tests
with fluster-runner and several other fixes.

 * Log PID in outputs.
 * Support loading zstd compressed caselist/baseline/skips/flakes
 * cargo: update repository url
 * deqp: Add a --vk-device-id argument
 * Add warnings for poor load balancing with --vk-device-id
 * config: fix typo in argument help string
 * Check for "DeviceLost" test status.
 * ci: update upstream repo
 * ci: drop duplicate key
 * ci: deduplicate deb jobs
 * ci: run merge pipelines in merge request instead of in fork
 * ci: only run tests *before* merging
 * ci: only run deb jobs *after* merging
 * parse: Add a FullTest ParserState
 * Add a fluster runner
 * tests: Add integration tests for fluster
 * readme: Add information on fluster-runner
 * lib: Add a --max-fails optional usize argument
 * piglit: Use a Box<Run> in the SubCommand enum
 * Bump version to 0.19.0 for release.
 * Escape dots for non-regexes lines
 * Add a .mailmap
 * Bump version to 0.20.0 for release.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29931>
2024-07-23 07:30:24 +00:00
Vignesh Raman
6edfb09dda ci/deqp-runner: unset CC for arm32 cross-compilation
When CC variable is set to /usr/lib/ccache/gcc, the rust
compiler uses this variable when cross-compiling for arm32,
which causes build failure for zstd-sys. So unset the CC
variable when cross-compiling for arm32.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29931>
2024-07-23 07:30:24 +00:00
Neha Bhende
8f9a157daa dri: fix macro name check to detect svga driver
svga driver is detected via HAVE_SVGA.

Since commit 50fc7cc290, svga driver was not loading at all

Fixes: 50fc7cc290 ("glx: directly link to gallium")

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30307>
2024-07-23 04:50:31 +00:00
Faith Ekstrand
74b4c91e7b meson/megadriver: Don't invoke the megadriver script with no drivers
Otherwise, the install will fail due to missing arguments to
install_megadrivers.py.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30277>
2024-07-23 03:26:00 +00:00
Faith Ekstrand
1006283732 nak: Fix shl64 for pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
e02dfb6a34 nak: Use .wrap for 64-bit shifts
If we set the shift up correctly, we can get the 64-bit wrapping
behavior to work for us instead of adding an instruction to wrap
manually.  While we're at it, set known-unused sources to 0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
08efc78a25 nak: Add tests for 64-bit shifts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
55901dc287 nak: Add 64-bit shift helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
e1f1af58d9 nak: Fix shf.l.high on Maxwell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
9321a785cf nak: Implement Foldable for OpShf
Also add an assert for an invalid combination on Maxwell.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
ebc1c052ab nak: Implement Foldable for OpPrmt
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
cac3ff011b nak: Add some opcode tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
4392a5922c nak: Add a framework for running hardware tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
c4938619f3 nak: Initialize DEBUG on-demand
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
3fed505eb0 nak: Implement Foldable for OpIAdd3 and OpIAdd3X
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
e09dd8e201 nak: Add a Foldable trait
This is for ops that we know how to constant-fold.  We'll use this to
generate unit tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
841737925f nak: Add dst_type decorations
This is similar to the src_type decorations we have scattered all over
the IR, only for destinations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
9e25b6c0ff nak: Add an implementation of the ACORN random number generator
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
cd7128c2e3 nak: Add a bare HW shader runner
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
7b9fdba602 nak/meson: Rename libnak_bindings_gen to _libnak_bindings_rs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
61e502b25c nak: Make ShaderBin a public struct
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
758f7a440d nak: Pull the QMD code out into its own crate
We want to use it in the runner which will be separate from NAK itself.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
d2b90d5647 nouveau/winsys: Uninline nouveau_ws_bo_unmap()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Yiwei Zhang
a27e3c5078 venus: clarify wsi image ownership
Fix to call vn_image_bind_wsi_memory as long as the image is a wsi
image. This is needed so that we track the wsi memory in the wsi image
so that creating from swapchain info works normally on x11/wayland
platforms. This change also make it clear that ANB image owns the wsi
memory

Fixes: c4b30b604f ("venus: support VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 8")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30278>
2024-07-23 02:58:41 +00:00
Kenneth Graunke
c429d5025e intel/brw: Don't force g1's live range to be the entire program
The idea here was that pixel shader framebuffer writes used the g0 and
g1 thread payload register values to construct the message header.
However, most messages are headerless and don't use either.  There's a
2012-era comment that the simulator at one point had a bug where certain
headerless messages would incorrectly take the values from the g0/g1
register contents rather than using sideband.  But, that was likely
fixed eons ago.  So we really don't need to do this.

Furthermore, there are many more shader stages these days:
- VS: r1 contains output URB handles
- TCS: r1 contains ICP handles
- TES: r1 contains gl_TessCoord.x (r4 contains output URB handles)
- GS: r1 contains output URB handles
- CS: r1 contains LocalID.X on DG2+ but nothing on older hardware
- Task/Mesh: r1 contains LocalID.X
- BS: r1 contains bindless stack handles

Vertex and geometry aren't likely to benefit here because r1 is needed
for their output messages, which are also what terminate the shader.
TES will definitely benefit because we were making a value pointlessly
live for the whole program.  Same for TCS, to a lesser extent.  Compute
prior to DG2 was the worst, as g1 literally has no meaningful content,
so there is no point to keeping it live.

fossil-db on Alchemist shows substantial spill/fill improvements:

   Totals:
   Instrs: 148782351 -> 148741996 (-0.03%); split: -0.03%, +0.01%
   Cycles: 12602907531 -> 12605795191 (+0.02%); split: -0.70%, +0.72%
   Subgroup size: 7518608 -> 7518632 (+0.00%)
   Send messages: 7341727 -> 7341762 (+0.00%)
   Spill count: 54633 -> 52575 (-3.77%)
   Fill count: 104694 -> 100680 (-3.83%)
   Scratch Memory Size: 3375104 -> 3287040 (-2.61%)

   Totals from 301172 (48.21% of 624670) affected shaders:
   Instrs: 95531927 -> 95491572 (-0.04%); split: -0.05%, +0.01%
   Cycles: 9643531593 -> 9646419253 (+0.03%); split: -0.91%, +0.94%
   Subgroup size: 4492512 -> 4492536 (+0.00%)
   Send messages: 4399737 -> 4399772 (+0.00%)
   Spill count: 20034 -> 17976 (-10.27%)
   Fill count: 41530 -> 37516 (-9.67%)
   Scratch Memory Size: 1522688 -> 1434624 (-5.78%)

Assassin's Creed Odyssey in particular has 20% fewer fills.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30146>
2024-07-23 02:26:52 +00:00
Michael Cheng
60c73e09c6 anv: Remove extra hdc_flush from Perfetto
Remove extra reporting of hdc_flush when viewing a Perfetto trace for
anv.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30312>
2024-07-23 01:57:59 +00:00
Faith Ekstrand
41d05737ec nvk: Call into NIL to populate the null descriptor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30303>
2024-07-23 01:35:11 +00:00
Faith Ekstrand
ff6577a000 nvk: Create the zero page earlier in device creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30303>
2024-07-23 01:35:11 +00:00
Faith Ekstrand
c8d8e2249a nil: Add a helper for populating the null descriptor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30303>
2024-07-23 01:35:11 +00:00
Faith Ekstrand
68d6cdfbc5 nvk: Reject sparse images on Maxwell A and earlier
Even though we don't advertise the sparseResidency feature, a bunch of
CTS tests just call GetPhysicalDeviceImageFormatProperties2() with
SPARSE_RESIDENCY_BIT and see if that fails.

Fixes: d2177f4764 ("nvk: Don't advertise sparse residency on Maxwell A")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30303>
2024-07-23 01:35:11 +00:00
Francisco Jerez
49b433d5e7 iris: Pin pixel hashing table BO from iris_batch submission instead of from iris_state.
This fixes sporadic rendering corruption reported on MTL with ChromeOS
in cases where multiple processes including Chrome were utilizing the
GPU concurrently, and one of the processes happened to submit a
BLORP-only batch buffer right after a switch from a different context.

In such a scenario we would fail to add the BO that holds the pixel
hashing tables to the execbuf IOCTL for the BLORP batch, because it
was being pinned from iris_restore_render_saved_bos() which isn't
called for BLORP operations, potentially causing it to use garbage as
pixel pipe hashing tables, which led to corruption of the BLORP
rendering.

Technically this could have affected DG2 as well, but it has only been
reported on MTL so far.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30274>
2024-07-23 00:40:24 +00:00
Dylan Baker
7513a0bf3a mesa: fix memory leak when using shader cache
Fixes: 656ccf4ef8 ("mesa: shader dump/read support for ARB programs")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30302>
2024-07-22 23:21:49 +00:00
Caio Oliveira
8ba8e33c39 intel/brw: Simplify @file annotations
Doxygen documentation says

> If the file name is omitted (i.e. the line after \file is left
> blank) then the documentation block that contains the \file command will
> belong to the file it is located in.

so we can omit the filename itself when using the annotation.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30168>
2024-07-22 22:48:03 +00:00
Maaz Mombasawala
1a8b232115 svga: Validate surface during copy check
Fixes piglit test arb_copy_buffer-data-sync.
The test fails inconsistently because svga_buffer_surface handle is sometimes
not present at time of copy check, so the copy does not happen.
Adding a validata_host_surface() call for the surface being copied ensures the
handle is present.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29949>
2024-07-22 22:33:47 +00:00
Dylan Baker
e5b53d9408 compilers/clc: Add missing break statements.
fixes: c0cf7f578a

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30301>
2024-07-22 21:55:49 +00:00
Karol Herbst
bad67ee77c spirv: handle function parameters passed by value
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
2024-07-22 21:16:58 +00:00
Karol Herbst
9b55dcca54 spirv: initial parsing of function parameter decorations
It doesn't do anything substantial yet, but it ignores enough so internal
shaders won't generate warnings.

I've also added ByVal parsing, because I need this one to actually fix a
correctness issue in a later patch.

Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
2024-07-22 21:16:58 +00:00
Karol Herbst
90db6c729d spirv: generate info for FunctionParameterAttribute
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
2024-07-22 21:16:58 +00:00
Jesse Natalie
f05b7225a3 microsoft/clc: Split struct copies before vars_to_ssa in pre-inline optimizations
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
2024-07-22 21:16:58 +00:00
Lionel Landwerlin
1908d2c171 anv: split image view from anv_image.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
eff01c46d8 anv: split buffer view from anv_image.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
f5af56528b anv: split sampler from anv_device.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
543c726781 anv: split buffer from anv_device.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
c59e8e814a anv: split events from anv_device.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
ca51a02e7b anv: split physical_device from anv_device.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
c7ecf10c20 anv: split instance from anv_device.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
José Roberto de Souza
69ee1c4b46 anv: Drop useless 'if (total_scratch > 0) {' block in cmd_buffer_ensure_cfe_state()
cmd_buffer_ensure_cfe_state() returns ealier if total_scratch == 0 here:

if (total_scratch <= comp_state->scratch_size)
      return;

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/30271>
2024-07-22 18:17:38 +00:00
José Roberto de Souza
de5d767f9a intel/brw: Add a maximum scratch size restriction
Gfx 12.5 moved scratch to a surface and SURFTYPE_SCRATCH has this pitch
restriction:

RENDER_SURFACE_STATE::Surface Pitch
   For surfaces of type SURFTYPE_SCRATCH, valid range of pitch is:
   [63,262143] -> [64B, 256KB]

The pitch of the surface is the scratch size per thread and the surface
should be large enough to accommodate every physical thread.

So here adding a new field to intel_device_info, setting it in
intel_device_info_init_common() so even offline tools can have it set.
And finally adding a check to fail shader compilation if needed
scratch is larger than supported.

This issue can be reproduced in debug builds when running
dEQP-VK.protected_memory.stack.stacksize_1024 on Gfx 12.5 or newer
platforms.

Ref: BSpec 43862 (r52666)
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/30271>
2024-07-22 18:17:38 +00:00
Paulo Zanoni
c65a76db85 anv/trtt: don't just crash when we can't find device->trtt.queue
Please refer to the big comment this patch introduces.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
2024-07-22 10:04:34 -07:00
Paulo Zanoni
3ab8ff99fa anv/trtt: fix the process of picking device->trtt.queue
We want to use actual sparse-capable queues as the default
trtt->queue, not copy queues that may have a companion_rcs_batch.
Before this patch, if we expose more than one queue *and* the
application creates a copy queue first, we'll end up setting
trtt->queue as the copy queue, which will GPU hang when we submit the
TR-TT batches as they don't support the pipe_control commands we
issue.

The trtt->queue queue is used for binding/unbinding buffers in code
paths where there's no specific queue coming from user space, such as
when we're creating or destroying a sparse resource.

This is not a problem yet on i915.ko since we are exposing
only a single queue, and it is not a problem for xe.ko since TR-TT is
not the default there. This is also not a problem in applications
that create the render or compute queue first. We plan to expose more
queues when using TR-TT, so this would become a problem without this
patch.

None of VK-GL-CTS seems to exercise that, and none of the Steam games
I tested exercise that as well. I was able to reproduce this issue
using our internal tracing tool.

v2: New implementation that doesn't break when we only have a compute
    queue (Lionel).

Fixes: 04bfe828db ("anv/sparse: allow sparse resouces to use TR-TT as its backend")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
2024-07-22 10:04:34 -07:00
Paulo Zanoni
5ca224aa0c anv/trtt: make all contexts have the same TR-TT programming
On Gen12 (the oldest we support on Mesa right now for TR-TT) we
started having per-engine TR-TT registers and we are supposed to make
all contexts share the same TR-TT programming.

On LNL+, this is documented in the BSpec page for the TRTT_CNTRL
register (68417), with more details in HSDs 14020454786 and
16022013154.

On Gen12 platforms this information is a little harder to find and
there's a whole trail of HSDs leading up to 1209977595, which links to
the documents that describe the programming. BSpec for TR-TT on Gen12
is very confusing as it still contains registers and other information
from Gen11 that were not removed.

Regarding the additional BLT and COMP registers, please notice that on
the BSpec pages for the TR-TT registers, the "Register Instance"
section only lists the GFX registers as non-privileged. However, the
"User Mode Privileged Commands" lists the other instances of the TR-TT
Regsiters as non-privileged, which matches what we see: there's no
need to put these addresses in the FORCE_TO_NONPRIV registers.

Notice that for now, when TR-TT is being used we only expose a single
queue, so this change effectively does nothing until we start exposing
extra queues. I left that part for later to help bisectability.

v2:
 - s/trtt_init_context_state/trtt_init_queues_state/ (José)
 - pass device as the argument to init_queues_state (José)
v3:
 - use async_submit_end (José)

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
2024-07-22 10:04:34 -07:00
Paulo Zanoni
6415027d85 anv/trtt: submit a separate batch in anv_trtt_init_context_state()
Having this as a separate batch was the normal behavior until
7da5b1caef ("anv: move trtt submissions over to the
anv_async_submit").

While it certainly sounds better to do everything related to TR-TT
initialization in one batch, we need to revert it back to be a
separate batch (but now using the new anv_async_submit infrastructure)
because we'll want to run this batch on every engine.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
2024-07-22 10:04:34 -07:00
Paulo Zanoni
abbb4b20f3 anv/trtt: check the return value of anv_trtt_init_context_state()
I haven't seen this happening anywhere, but let's have it for
correctness.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
2024-07-22 10:04:34 -07:00
Paulo Zanoni
fb9d94f4ed anv/trtt: make genX(init_trtt_context_state) a little more compact
In this series we're going to further change this function, adding a
lot more lines, so this patch should make the next diffs a little
easier to comprehend and review.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
2024-07-22 10:04:34 -07:00
Paulo Zanoni
6bc9a57173 intel/genxml: add the BLT and COMP_CTX0 versions of the TR-TT registers
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
2024-07-22 10:04:33 -07:00
Valentine Burley
0a6cbb3a97 tu/kgsl: Remove unused variable
The offset variable declaration at the beginning of the function was left over
after the variable was moved inside the if statement.

Fixes: 17c12a9924 ("turnip/kgsl: Support external memory via ION/DMABUF buffers")

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30300>
2024-07-22 14:53:14 +00:00
Valentine Burley
47de27cde1 tu: Implement VK_EXT_device_address_binding_report
This extension should be helpful for debugging.

Passes dEQP-VK.memory.address_binding_report.*

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30021>
2024-07-22 14:23:53 +00:00
Valentine Burley
dd10d2ef2f tu/rmv: Fix missing image bind logging for WSI images
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30021>
2024-07-22 14:23:53 +00:00
Rohan Garg
fe387e14b5 anv: use the WA infrastructure when emitting WA 16013994831
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/30295>
2024-07-22 13:43:39 +00:00
Rhys Perry
3aa29c47b9 nir/instr_set: hash tex sources commutatively
I'm not sure if two otherwise equal texture instructions ever have sources
in different orders, but they should be considered equal.

ministat of nir_opt_cse:
    N           Min           Max        Median           Avg        Stddev
x   9      6.586801      6.718673      6.682875     6.6621411   0.047817119
+   9      6.519098      6.609235      6.552997     6.5605604   0.028879587
Difference at 95.0% confidence
	-0.101581 +/- 0.0394755
	-1.52475% +/- 0.585928%
	(Student's t, pooled s = 0.0395)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30145>
2024-07-22 11:04:01 +00:00
Rhys Perry
b7ceb9d327 nir/instr_set: stop sorting phi sources
This is faster.

ministat of nir_opt_cse:
    N           Min           Max        Median           Avg        Stddev
x   9      6.724212       6.84511      6.788336     6.7873378   0.034363882
+   9      6.586801      6.718673      6.682875     6.6621411   0.047817119
Difference at 95.0% confidence
	-0.125197 +/- 0.0416115
	-1.84456% +/- 0.609248%
	(Student's t, pooled s = 0.0416374)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30145>
2024-07-22 11:04:01 +00:00
Rhys Perry
8b328443e3 nir/instr_set: combine XXH32 calls
ministat of nir_opt_cse:
    N           Min           Max        Median           Avg        Stddev
x   9      7.393408      7.490593      7.434056     7.4338972   0.028150325
+   9      6.724212       6.84511      6.788336     6.7873378   0.034363882
Difference at 95.0% confidence
	-0.646559 +/- 0.0313916
	-8.69745% +/- 0.407925%
	(Student's t, pooled s = 0.0314111)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30145>
2024-07-22 11:04:01 +00:00
Pierre-Eric Pelloux-Prayer
159a3edd80 egl,gbm,glx: fix log message spam
Based on the other similar logs we only want to log when extensions
is NULL.
Use this opportunity to indicate the source of the log and remove
the extra ')' at the end of each line.

Fixes: 50fc7cc290 ("glx: directly link to gallium")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30257>
2024-07-22 10:09:34 +00:00
Pierre-Eric Pelloux-Prayer
a55b9c0c60 radeonsi: consider DBG(NO_TILING) when filtering modifiers
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30257>
2024-07-22 10:09:34 +00:00
Pierre-Eric Pelloux-Prayer
94f2b3f7bc radeonsi: consider PIPE_BIND_LINEAR when filtering modifiers
If PIPE_BIND_LINEAR is set the only valid modifier we can use is
DRM_FORMAT_MOD_LINEAR.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30257>
2024-07-22 10:09:34 +00:00
Pierre-Eric Pelloux-Prayer
f12ccea6c7 radeonsi: reject modifiers with DCC when NO_EXPORTED_DCC is used
Otherwise AMD_DEBUG=noexporteddcc will be ignored when modifier are
used.
Similarly to AMD_DEBUG=nodcc handling, this makes the application
unable to import buffers with DCC as well - the alternative would be
to implement the filtering only in the texture creation path, so in
the si_modifier_supports_resource function.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30257>
2024-07-22 10:09:34 +00:00
Pierre-Eric Pelloux-Prayer
0c868aa94a amd: use a valid size for ac_pm4_state allocation
If max_dw is smaller than the pm4 array the allocation size would be
smaller than sizeof(ac_pm4_state).

Fixes: 428601095c ("ac,radeonsi import PM4 state from RadeonSI")
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/30257>
2024-07-22 10:09:34 +00:00
Eric Engestrom
547de1e928 v3d/ci: mark spec@amd_performance_monitor@vc4 tests as flaky
Turns out it was not fixed, it just happened to pass a bunch of times in
a row, but it actually fails randomly, so mark it as such.

Fixes: 4696e9c49b ("v3d/ci: mark spec@amd_performance_monitor@vc4 tests as fixed")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30290>
2024-07-22 10:56:09 +02:00
Juan A. Suarez Romero
4215d50384 v3d: add new clear blitter op
A specific clear_surface blitter operation is required, because in this
case we need to save framebuffer information, but not in standard clear,
as we are currently doing.

This fixes a leak in depthstencil surface, which happens because we were
storing saving it as part for the framebuffer information, but the
blitter clear wasn't restoring it because it wasn't required (only it
is required in clearing a surface).

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/30240>
2024-07-22 08:11:57 +00:00
Juan A. Suarez Romero
7158950a6f v3d: use operations to specify what to save in blitter
So far, in order to know what we need to save before using the blitter
utility, we use a boolean to know if we are going to do a blit or not,
and if we need to take in account conditional rendering or not.

In other to allow to specify more operations than blit or not, use an
enum to define what operation we would like to do, and based on that
what information we need to store.

This also merge the conditional rendering as part of these operations.

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/30240>
2024-07-22 08:11:57 +00:00
Christian Gmeiner
c83330cde0 etnaviv: isa: left shift is 3 bit long
Blob generates such a shift for piglit's
generated_tests/cl/builtin/int/builtin-int-abs-1.0.generated.cl

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30232>
2024-07-22 07:12:28 +00:00
Icenowy Zheng
5f22e152ad gallivm: orcjit: use atexit to release LPJit singleton at exit
Valgrind will report some memory possibly lost because of this singleton
(it's dynamically allocated when it is first accessed).

Use atexit() to register a handler that releases this singleton.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30216>
2024-07-21 23:17:17 +00:00
Icenowy Zheng
3423e73cec gallivm: orcjit: keep the ownership of tm for LPJit
The ownership of the TargetMachine object is released when LPJit
singleton is constructed, leads to a slight memory loss detectable.

Keep the ownership by saving the unique pointer as another class member
named tm_unique.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30216>
2024-07-21 23:17:17 +00:00
David Heidelberg
dc6e6d7a2b freedreno: Enable Adreno 306A
Enable the Adreno 306A that is found on the QM215 SoC (Qualcomm 215).

The GPU marketing name is Adreno 308.

Kernel patch: https://lore.kernel.org/linux-arm-msm/20240528-a306a-v1-1-03a66dacd8c7@gmail.com/

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29401>
2024-07-21 21:31:06 +00:00
Eric Engestrom
5c5df9376f venus: initialize bitset in CreateDescriptorPool()
Fixes: de5879447b ("Track bitset when create descriptor pool")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30286>
2024-07-21 17:44:05 +00:00
Eric Engestrom
324ccd7430 nak: fix meson typo
Fixes: 95bff5ca5b ("nak: Add minimum bindgen requirement")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30288>
2024-07-21 17:58:53 +02:00
Faith Ekstrand
0cc23b6524 nak: Move creation of nak_shader_info to ShaderBin::new()
This makes ShaderBin a bit more self-contained since it can now be
created from just a compiled shader and info.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30283>
2024-07-20 14:40:26 -05:00
Faith Ekstrand
618dfc73e6 nak: Move a few more things to VtgIoInfo
This moves clip/cull and XFB and uses the recorded attributes to figure
out writes_layer and writes_point_size.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30283>
2024-07-20 14:40:26 -05:00
Faith Ekstrand
f39b645c66 nak: Rework fragment shader stage info
This adds a FragmentShaderStageInfo, moves uses_kill and does_interlock
there, and adds fields for API depth test bits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30283>
2024-07-20 14:40:26 -05:00
Faith Ekstrand
d96fe18547 nak: Plumb tessellation parameters through ShaderStageInfo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30283>
2024-07-20 14:40:26 -05:00
Faith Ekstrand
c4c9bfdebd nak: Drop the nvfuzz binary
A much better version now exists as part of
https://gitlab.freedesktop.org/gfxstrand/nv-shader-tools

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30283>
2024-07-20 14:40:23 -05:00
Yiwei Zhang
bb7632128b venus: only request ring thread prio for TLS ring
Mainly to leave main ring thread prio to default.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30279>
2024-07-20 17:27:24 +00:00
Faith Ekstrand
cc82f80dcb nak/nir: Split 64-bit conversions pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
574239c948 nak/sm50: Implement OpCCtl
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
6fd427bf6e nak: Lower fsqrt in NIR on Maxwell A and earlier
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
9b4a005bf8 nak/sm50: Implement OpPixLd
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
69be07b191 nak/sm50: Various encoding fixes
Most of this is code clean-ups and unifications.  A few things were
missing proper legalization.  Some of it was just plain wrong.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
549fada593 nak/sm50: Improve encoding of OpFFma
OpFFma has another form that allows a cbuf in src2 which we weren't
taking into account.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
cfef5a9329 nak/sm50: Support AtomOp::CmpExch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
7d1b1f5d3a nak: Add an AtomCmpSrc to AtomOp::CmpExch
Pre-Volta, OpAtom works like OpSuAtom where the comparison value and the
data are packed into a vector.  We need some way of expressing this in
the IR.  We could have a separate OpAtom instruction but that seems
unnecessary.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
da4e368a6f nak: Implement ineg on sm50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
71d8126e1b nak/sm50: Split IAdd2 into IAdd2 and IAdd2X
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
d2177f4764 nvk: Don't advertise sparse residency on Maxwell A
Fixes: 48803ac53d ("nvk: enable sparse residency features")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Faith Ekstrand
a888e83c3a nvk: Fix indirect cbuf binds pre-Turing
nvk_cmd_buffer_push_indirect() takes bytes, not dwords.

Fixes: ee29a8d1cd ("nvk: Upload cbufs based on the cbuf_map")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30281>
2024-07-20 16:53:38 +00:00
Daniel Almeida
66954d997d nouveau/headers: Add an nv_push crate in Rust
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28255>
2024-07-20 16:36:30 +00:00
Daniel Almeida
63770a163a nouveau/headers: Add a Rust struct for each method
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28255>
2024-07-20 16:36:30 +00:00
Daniel Almeida
591b5da49b nouveau/headers: Run rustfmt on generated files
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28255>
2024-07-20 16:36:30 +00:00
Sushma Venkatesh Reddy
2f6919e6c2 intel/clflush: Utilize clflushopt in intel_invalidate_range
On MTL ChromeOS boards, during AI based video conference, we were
observing a lot of overhead from invalidations. Upon debug, it was found
that we were using clflush in this function and that isn't efficient.

With this change, while executing compute workloads like zoo models, we
are getting ~25% performance improvements in a best case scenario.

Rework:
 * Jordan: Call intel_clflushopt_range() rather than
   __builtin_ia32_clflushopt() because intel_mem.c is not compiled
   with -mclflushopt.

Backport-to: 24.1 24.2
Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30238>
2024-07-20 16:10:16 +00:00
Aleksi Sapon
fd0592afd3 gallivm: Fix LLVMPipe codegen issues discovered on Apple Silicon
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/30108>
2024-07-20 15:36:24 +00:00
M Henning
2f49284cfa nak: Rename num_barriers to num_control_barriers
Hopefully this is a little more clear.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30180>
2024-07-20 15:20:49 +00:00
M Henning
aac97b22ae nak: Don't mix up two types of barrier
This part of the shader header is used for control flow barriers (like
glsl barrier()), not reconvergence barriers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30180>
2024-07-20 15:20:49 +00:00
Icenowy Zheng
ca087e2027 zink: reject Imagination proprietary driver w/o geometryShader
On some low-end GPUs (e.g. BXE/BXM series), the Imagination proprietary
Vulkan driver do not implement geometryShader feature, which is required
by Zink currently to smoothen lines. In addition, these vulkan drivers
shipped are usually not robust enough to run Zink at all, and
frequently fail with crashes.

Reject these drivers.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30280>
2024-07-20 22:03:54 +08:00
Daniel Stone
bed6e0d691 build: Check for PyYAML in Meson build
Closes: #11540
Fixes: ccc6442d6f ("u_format: Rewrite format table to use YAML")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30272>
2024-07-20 08:05:44 +00:00
Jessica Clarke
149e8bff52 meson: egl: Build egl_dri2 driver even for plain DRI
Despite its name, egl_dri2 works under plain DRI without DRI2, and the
old autotools build system built it when $enable_dri = yes, with no
check for DRI2. This fixes the build for GNU/Hurd, which supports DRI,
but doesn't have DRM and thus no DRI2 support.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/587>
2024-07-20 06:53:43 +00:00
Jessica Clarke
ec55a6c329 Revert "meson: fix with_dri2 definition for GNU Hurd"
This reverts commit ad862c36e5.

This change does not work, because libdrm is required if with_dri2 is
true. Moreover, we don't want all of DRI2 on Hurd, we just want the
egl_dri2 driver, as done by autotools. So first revert this to stop
trying to build all of DRI2.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/587>
2024-07-20 06:53:42 +00:00
Jessica Clarke
8461776a09 Revert "meson: Do not require libdrm for DRI2 on hurd"
This reverts commit 2fd85105c6.

Despite its name, egl_dri2 works under plain DRI without DRI2, and the
old autotools build system built it when $enable_dri = yes, with no
check for DRI2. A future commit will adapt meson.build to follow that
approach rather than this hackier one.

Note that the case removed in the second hunk is already dead code,
since system_has_kms_drm is false on GNU/Hurd, and could have been
dropped as part of 66d2ae0386 ("meson: forcefully disable libdrm when
host doesn't have it").

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/587>
2024-07-20 06:53:42 +00:00
Francisco Jerez
49144ebcf9 iris/gfx12.5: Pass non-empty push constant data to PS stage for TBIMR workaround.
Note that this bug leading to GPU hangs hasn't been reproduced on GL
so far, workaround is mainly included for completeness.

Fixes: 57decad976 ("intel/xehp: Enable TBIMR by default.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
2024-07-20 01:13:19 +00:00
Francisco Jerez
ff3c3792b4 anv/gfx12.5: Pass non-empty push constant data to PS stage for TBIMR workaround.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10728
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11399
Fixes: 57decad976 ("intel/xehp: Enable TBIMR by default.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
2024-07-20 01:13:19 +00:00
Francisco Jerez
b98eebbcb2 intel/brw: Implement null push constant workaround.
This implements an undocumented workaround for a hardware bug that
affects draw calls with a pixel shader that has 0 push constant cycles
when TBIMR is enabled, which has been seen to lead to a hang with
Fallout 3 and Metal Gear Rising Revengeance.  This hardware bug has
been reported as HSDES#22020184996 which is still pending a resolution
by the hardware team.  However since this workaround found empirically
has been confirmed to fix the issue reliably and it's relatively
harmless it seems worth checking in already even though no final W/A
number is available nor has the W/A json file been updated.

To avoid the issue we simply pad the push constant payload to be at
least 1 register.  This is enabled via a brw_wm_prog_key since the
driver needs to be in agreement with the compiler on whether the dummy
push constant cycle is present, and it can be avoided in cases where
the driver knows that TBIMR will be disabled (e.g. for BLORP).

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10728
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11399
Fixes: 57decad976 ("intel/xehp: Enable TBIMR by default.")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
2024-07-20 01:13:19 +00:00
Francisco Jerez
bb2513918a intel/dev: Add devinfo flag for TBIMR push constant workaround.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30031>
2024-07-20 01:13:19 +00:00
Ian Romanick
faee9426ab nir/algebraic: Optimize some masking of extract_u8 operations
I observed this pattern in several Red Dead Redemption 2 shaders.

No shader-db changes on any Intel platform.

v2: Remove duplicated patterns. Noticed by Georg.

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 151519393 -> 151507192 (-0.01%); split: -0.01%, +0.00%
Cycle count: 17208246858 -> 17177437340 (-0.18%); split: -0.25%, +0.07%
Spill count: 80830 -> 80759 (-0.09%); split: -0.09%, +0.00%
Fill count: 152754 -> 152179 (-0.38%); split: -0.40%, +0.02%

Totals from 7531 (1.20% of 630198) affected shaders:
Instrs: 12606141 -> 12593940 (-0.10%); split: -0.10%, +0.00%
Cycle count: 5466605514 -> 5435795996 (-0.56%); split: -0.79%, +0.22%
Spill count: 25251 -> 25180 (-0.28%); split: -0.29%, +0.01%
Fill count: 45143 -> 44568 (-1.27%); split: -1.36%, +0.08%

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30158>
2024-07-20 00:19:05 +00:00
Ian Romanick
1c7e35d4e0 nir/algebraic: Optimize some bit operation nonsense observed in some shaders
In updates (not post at the time of this writing) to !29884, a change
caused many spill and fill regressions shader for OpenGL Tomb
Raider. While looking at that shader, I noticed some odd patterns. I
initially added these patterns to counteract the regressions caused by
the other change, but I had no luck. On Ice Lake... this cuts 99
instructions from the shader.

shader-db:

All Intel platforms had simliar results. (Meteor Lake shown)
total instructions in shared programs: 19732341 -> 19732295 (<.01%)
instructions in affected programs: 1744 -> 1698 (-2.64%)
helped: 1 / HURT: 0

total cycles in shared programs: 916273716 -> 916273068 (<.01%)
cycles in affected programs: 14266 -> 13618 (-4.54%)
helped: 1 / HURT: 0

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 151519575 -> 151519393 (-0.00%)
Cycle count: 17208402120 -> 17208246858 (-0.00%); split: -0.00%, +0.00%

Totals from 159 (0.03% of 630198) affected shaders:
Instrs: 51970 -> 51788 (-0.35%)
Cycle count: 11474176 -> 11318914 (-1.35%); split: -1.36%, +0.01%

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30158>
2024-07-20 00:19:05 +00:00
Ian Romanick
92befad89f nir/range_analysis: Fix errors in fmin and fmax tables
fmin(x, 0.0) must at least be le_zero, and fmax(x, 0.0) be at least be
ge_zero.

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19733226 -> 19731919 (<.01%)
instructions in affected programs: 196415 -> 195108 (-0.67%)
helped: 615 / HURT: 0

total cycles in shared programs: 916277979 -> 916265288 (<.01%)
cycles in affected programs: 2482535 -> 2469844 (-0.51%)
helped: 346 / HURT: 178

LOST:   2
GAINED: 1

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 151531355 -> 151519575 (-0.01%); split: -0.01%, +0.00%
Cycle count: 17209372399 -> 17208402120 (-0.01%); split: -0.01%, +0.01%
Max live registers: 32016490 -> 32016514 (+0.00%)

Totals from 4307 (0.68% of 630198) affected shaders:
Instrs: 4179418 -> 4167638 (-0.28%); split: -0.28%, +0.00%
Cycle count: 1063492212 -> 1062521933 (-0.09%); split: -0.24%, +0.15%
Max live registers: 359250 -> 359274 (+0.01%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30158>
2024-07-20 00:19:05 +00:00
Deborah Brouwer
72c182f873 ci/lava: Detect a6xx gpu recovery failures
Sporadically a6xx gpu will fail to recover causing the lava job
a660_vk_full to loop on error messages for three hours before timing
out.

A few sporadic error messages may still be recoverable, but when multiple
errors occur over a short period, successful recovery is unlikely. Parse
the logs to look for repeated error messages within a short time period.
If found, cancel the lava job and rerun it.

Also add unit tests for this behaviour.

cc: mesa-stable

Reported-by: Valentine Burley <valentine.burley@gmail.com>
Acked-by: Daniel Stone <daniel.stone@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30032>
2024-07-19 23:41:13 +00:00
Mike Blumenkrantz
53f249b921 zink: use blake3 instead of sha1 for program cache
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz
ce1236fe87 zink: use GENERAL layout for depth attachments on some drivers
this matches a vkd3d optimization

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz
991244dad4 zink: use local screen variable in zink_prep_fb_attachment
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz
cdc70013a2 zink: add lavapipe to can_do_invalid_linear_modifier list
lavapipe only has one modifier

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz
d8d53f72da zink: hash in some driver workaround flags to shader cache
these affect shader generation

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Mike Blumenkrantz
ec3eb87f91 zink: move some flags from driver_workarounds to separate struct
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30261>
2024-07-19 23:17:50 +00:00
Eric Engestrom
e2c90da560 venus/ci: skip timing out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom
e64adab9a0 anv+zink/ci: mark a couple of tests as flaky
Seen while trying to merge this series.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom
ebef31e4cf anv+zink/ci: document two tests, one failing and one crashing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom
2ed5d362a6 anv+zink/ci: mark some tests as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom
8fe147de57 freedreno/ci: document extra variants of failing tests on a618 and a630
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom
734823fe7d freedreno/ci: double job timeout for a306
Based on the predicted remaining time when it gets killed, it need just over 30min.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom
e1edf20a4d radeonsi/ci: skip timing out test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30264>
2024-07-19 21:26:16 +00:00
Eric Engestrom
dfd70bab4a loader: gc loader_get_extensions_name() and __DRI_DRIVER_{GET_,}EXTENSIONS defines
Leaving the defines in include/GL/internal/dri_interface.h because I'm
not sure if something needs it.

Fixes: fa541a887c ("loader: delete loader_open_driver()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30266>
2024-07-19 20:38:19 +00:00
Mark Burton
7dfb9ba023 gallivm: Fix compilation errors when using LLVM 13.
Adds missing header file and fixes local variable type.

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

Signed-off-by: Mark Burton <markb@smartavionics.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30058>
2024-07-19 19:19:24 +00:00
Eric Engestrom
f4b996b77a docs: reset new_features.txt
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30268>
2024-07-19 16:37:23 +00:00
Eric Engestrom
4b21e17979 VERSION: bump to 24.3
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30268>
2024-07-19 16:37:23 +00:00
3109 changed files with 344235 additions and 138230 deletions

View File

@@ -2,6 +2,7 @@
# enforcement in the CI.
src/gallium/drivers/i915
src/gallium/drivers/r300/compiler/*
src/gallium/targets/teflon/**/*
src/amd/vulkan/**/*
src/amd/compiler/**/*

View File

@@ -33,39 +33,33 @@ workflow:
# merge pipeline
- if: &is-merge-attempt $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${KERNEL_TAG}
MESA_CI_PERFORMANCE_ENABLED: 1
VALVE_INFRA_VANGOGH_JOB_PRIORITY: "" # Empty tags are ignored by gitlab
JOB_PRIORITY: 75
# fast-fail in merge pipelines: stop early if we get this many unexpected fails/crashes
DEQP_RUNNER_MAX_FAILS: 40
# post-merge pipeline
- if: &is-post-merge $GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "push"
# Pre-merge pipeline
- if: &is-pre-merge $CI_PIPELINE_SOURCE == "merge_request_event"
# Push to a branch on a fork
- if: &is-fork-push $CI_PROJECT_NAMESPACE != "mesa" && $CI_PIPELINE_SOURCE == "push"
# nightly pipeline
- if: &is-scheduled-pipeline $CI_PIPELINE_SOURCE == "schedule"
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${KERNEL_TAG}
JOB_PRIORITY: 50
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
# (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"
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${KERNEL_TAG}
JOB_PRIORITY: 40
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
# pre-merge or fork pipeline
- if: $FORCE_KERNEL_TAG != null
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${FORCE_KERNEL_TAG}
JOB_PRIORITY: 50
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
- if: $FORCE_KERNEL_TAG == null
variables:
KERNEL_IMAGE_BASE: https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${KERNEL_TAG}
JOB_PRIORITY: 50
VALVE_INFRA_VANGOGH_JOB_PRIORITY: priority:low
variables:
FDO_UPSTREAM_REPO: mesa/mesa
MESA_TEMPLATES_COMMIT: &ci-templates-commit d5aa3941aa03c2f716595116354fb81eb8012acb
MESA_TEMPLATES_COMMIT: &ci-templates-commit e195d80f35b45cc73668be3767b923fd76c70ed5
CI_PRE_CLONE_SCRIPT: |-
set -o xtrace
wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh
@@ -101,12 +95,19 @@ variables:
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
default:
id_tokens:
S3_JWT:
aud: https://s3.freedesktop.org
before_script:
- |
if [ -z "${KERNEL_IMAGE_BASE:-}" ]; then
export KERNEL_IMAGE_BASE="https://${S3_HOST}/${S3_KERNEL_BUCKET}/${KERNEL_REPO}/${EXTERNAL_KERNEL_TAG:-$KERNEL_TAG}"
fi
- >
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" &&
@@ -118,13 +119,6 @@ default:
# Work around https://gitlab.com/gitlab-org/gitlab/-/issues/20338
- find -name '*.log' -exec mv {} {}.txt \;
- >
set +x
test -e "${S3_JWT_FILE}" &&
export S3_JWT="$(<${S3_JWT_FILE})" &&
rm "${S3_JWT_FILE}"
# Retry when job fails. Failed jobs can be found in the Mesa CI Daily Reports:
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/?sort=created_date&state=opened&label_name%5B%5D=CI%20daily
retry:
@@ -144,18 +138,28 @@ stages:
- sanity
- container
- git-archive
- build-x86_64
- build-misc
- build-for-tests
- build-only
- code-validation
- amd
- amd-postmerge
- intel
- intel-postmerge
- nouveau
- nouveau-postmerge
- arm
- arm-postmerge
- broadcom
- broadcom-postmerge
- freedreno
- freedreno-postmerge
- etnaviv
- etnaviv-postmerge
- software-renderer
- software-renderer-postmerge
- layered-backends
- layered-backends-postmerge
- performance
- deploy
include:
@@ -180,12 +184,11 @@ include:
- local: 'src/**/ci/gitlab-ci.yml'
# YAML anchors for rule conditions
# --------------------------------
.rules-anchors:
# Pre-merge pipeline
- &is-pre-merge '$CI_PIPELINE_SOURCE == "merge_request_event"'
# Rules applied to every job in the pipeline
.common-rules:
rules:
- if: *is-fork-push
when: manual
.never-post-merge-rules:
rules:
@@ -195,6 +198,7 @@ include:
.container+build-rules:
rules:
- !reference [.common-rules, rules]
# Run when re-enabling a disabled farm, but not when disabling it
- !reference [.disable-farm-mr-rules, rules]
# Never run immediately after merging, as we just ran everything
@@ -295,19 +299,20 @@ sanity:
- |
set -eu
image_tags=(
ALPINE_X86_64_BUILD_TAG
ALPINE_X86_64_LAVA_SSH_TAG
DEBIAN_BASE_TAG
DEBIAN_BUILD_TAG
DEBIAN_PYUTILS_TAG
DEBIAN_TEST_ANDROID_TAG
DEBIAN_TEST_GL_TAG
DEBIAN_TEST_VK_TAG
ALPINE_X86_64_BUILD_TAG
ALPINE_X86_64_LAVA_SSH_TAG
FEDORA_X86_64_BUILD_TAG
KERNEL_ROOTFS_TAG
KERNEL_TAG
PKG_REPO_REV
WINDOWS_X64_MSVC_TAG
WINDOWS_X64_BUILD_TAG
WINDOWS_X64_MSVC_TAG
WINDOWS_X64_TEST_TAG
)
for var in "${image_tags[@]}"
@@ -349,3 +354,5 @@ mr-label-maker-test:
optional: true
- job: rustfmt
optional: true
- job: toml-lint
optional: true

View File

@@ -80,3 +80,8 @@ wayland-dEQP-EGL.functional.render.multi_context.gles2_gles3.other
wayland-dEQP-EGL.functional.render.multi_thread.gles2.other
wayland-dEQP-EGL.functional.render.multi_thread.gles3.other
wayland-dEQP-EGL.functional.render.multi_thread.gles2_gles3.other
# These test the loader more than the implementation and are broken because the
# Vulkan loader in Debian is too old
dEQP-VK.api.get_device_proc_addr.non_enabled
dEQP-VK.api.version_check.unavailable_entry_points

View File

@@ -60,9 +60,11 @@ deployment:
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.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 }}"
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('"', '\\\"') }}"
kernel:
{% if kernel_url %}
url: '{{ kernel_url }}'
{% endif %}
# NOTE: b2c.cache_device should not be here, but this works around
# a limitation of b2c which will be removed in the next release
@@ -75,10 +77,12 @@ deployment:
{{ kernel_cmdline_extras }}
{% endif %}
{% if initramfs_url %}
initramfs:
url: '{{ initramfs_url }}'
{% endif %}
{% if dtb_url is defined %}
{% if dtb_url %}
dtb:
url: '{{ dtb_url }}'
{% endif %}

View File

@@ -5,6 +5,8 @@
# First stage: very basic setup to bring up network and /dev etc
/init-stage1.sh
export CURRENT_SECTION=dut_boot
# Second stage: run jobs
test $? -eq 0 && /init-stage2.sh

View File

@@ -50,6 +50,10 @@ if [ -z "$BM_CMDLINE" ]; then
exit 1
fi
. "${SCRIPTS_DIR}/setup-test-env.sh"
section_start prepare_rootfs "Preparing rootfs components"
set -ex
# Clear out any previous run's artifacts.
@@ -86,7 +90,7 @@ rm -rf /tftp/*
if echo "$BM_KERNEL" | grep -q http; then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
$BM_KERNEL -o /tftp/vmlinuz
elif [ -n "${FORCE_KERNEL_TAG}" ]; then
elif [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o /tftp/vmlinuz
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
@@ -99,16 +103,20 @@ fi
echo "$BM_CMDLINE" > /tftp/cmdline
set +e
STRUCTURED_LOG_FILE=job_detail.json
STRUCTURED_LOG_FILE=results/job_detail.json
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update dut_job_type "${DEVICE_TYPE}"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update farm "${FARM}"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --create-dut-job dut_name "${CI_RUNNER_DESCRIPTION}"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update-dut-time submit "${CI_JOB_STARTED_AT}"
section_end prepare_rootfs
python3 $BM/cros_servo_run.py \
--cpu $BM_SERIAL \
--ec $BM_SERIAL_EC \
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
--test-timeout ${TEST_PHASE_TIMEOUT_MINUTES:-20}
ret=$?
section_start dut_cleanup "Cleaning up after job"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close
set -e
@@ -116,9 +124,6 @@ set -e
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
# will look for them.
cp -Rp /nfs/results/. results/
if [ -f "${STRUCTURED_LOG_FILE}" ]; then
cp -p ${STRUCTURED_LOG_FILE} results/
echo "Structured log file is available at https://${CI_PROJECT_ROOT_NAMESPACE}.pages.freedesktop.org/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts/results/${STRUCTURED_LOG_FILE}"
fi
section_end dut_cleanup
exit $ret

View File

@@ -4,21 +4,29 @@
# SPDX-License-Identifier: MIT
import argparse
import datetime
import math
import os
import re
import sys
from custom_logger import CustomLogger
from serial_buffer import SerialBuffer
ANSI_ESCAPE="\x1b[0K"
ANSI_COLOUR="\x1b[0;36m"
ANSI_RESET="\x1b[0m"
SECTION_START="start"
SECTION_END="end"
class CrosServoRun:
def __init__(self, cpu, ec, test_timeout, logger):
self.cpu_ser = SerialBuffer(
cpu, "results/serial.txt", "R SERIAL-CPU> ")
cpu, "results/serial.txt", ": ")
# Merge the EC serial into the cpu_ser's line stream so that we can
# effectively poll on both at the same time and not have to worry about
self.ec_ser = SerialBuffer(
ec, "results/serial-ec.txt", "R SERIAL-EC> ", line_queue=self.cpu_ser.line_queue)
ec, "results/serial-ec.txt", " EC: ", line_queue=self.cpu_ser.line_queue)
self.test_timeout = test_timeout
self.logger = logger
@@ -27,11 +35,11 @@ class CrosServoRun:
self.cpu_ser.close()
def ec_write(self, s):
print("W SERIAL-EC> %s" % s)
print("EC> %s" % s)
self.ec_ser.serial.write(s.encode())
def cpu_write(self, s):
print("W SERIAL-CPU> %s" % s)
print("> %s" % s)
self.cpu_ser.serial.write(s.encode())
def print_error(self, message):
@@ -40,6 +48,31 @@ class CrosServoRun:
print(RED + message + NO_COLOR)
self.logger.update_status_fail(message)
def get_rel_timestamp(self):
now = datetime.datetime.now(tz=datetime.UTC)
then_env = os.getenv("CI_JOB_STARTED_AT")
if not then_env:
return ""
delta = now - datetime.datetime.fromisoformat(then_env)
return f"[{math.floor(delta.seconds / 60):02}:{(delta.seconds % 60):02}]"
def get_cur_timestamp(self):
return str(int(datetime.datetime.timestamp(datetime.datetime.now())))
def print_gitlab_section(self, action, name, description, collapse=True):
assert action in [SECTION_START, SECTION_END]
out = ANSI_ESCAPE + "section_" + action + ":"
out += self.get_cur_timestamp() + ":"
out += name
if action == "start" and collapse:
out += "[collapsed=true]"
out += "\r" + ANSI_ESCAPE + ANSI_COLOUR
out += self.get_rel_timestamp() + " " + description + ANSI_RESET
print(out)
def boot_section(self, action):
self.print_gitlab_section(action, "dut_boot", "Booting hardware device", True)
def run(self):
# Flush any partial commands in the EC's prompt, then ask for a reboot.
self.ec_write("\n")
@@ -47,6 +80,7 @@ class CrosServoRun:
bootloader_done = False
self.logger.create_job_phase("boot")
self.boot_section(SECTION_START)
tftp_failures = 0
# This is emitted right when the bootloader pauses to check for input.
# Emit a ^N character to request network boot, because we don't have a
@@ -127,14 +161,18 @@ class CrosServoRun:
self.print_error("Detected cheza MMU fail, abandoning run.")
return 1
result = re.search("hwci: mesa: (\S*)", line)
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
if result:
if result.group(1) == "pass":
status = result.group(1)
exit_code = int(result.group(2))
if status == "pass":
self.logger.update_dut_job("status", "pass")
return 0
else:
self.logger.update_status_fail("test fail")
return 1
self.logger.update_dut_job("exit_code", exit_code)
return exit_code
self.print_error(
"Reached the end of the CPU serial log without finding a result")
@@ -151,7 +189,7 @@ def main():
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
args = parser.parse_args()
logger = CustomLogger("job_detail.json")
logger = CustomLogger("results/job_detail.json")
logger.update_dut_time("start", None)
servo = CrosServoRun(args.cpu, args.ec, args.test_timeout * 60, logger)
retval = servo.run()

View File

@@ -55,6 +55,8 @@ if echo $BM_CMDLINE | grep -q "root=/dev/nfs"; then
BM_FASTBOOT_NFSROOT=1
fi
section_start prepare_rootfs "Preparing rootfs components"
set -ex
# Clear out any previous run's artifacts.
@@ -105,7 +107,7 @@ if echo "$BM_KERNEL $BM_DTB" | grep -q http; then
cat kernel dtb > Image.gz-dtb
elif [ -n "${FORCE_KERNEL_TAG}" ]; then
elif [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
"${FDO_HTTP_CACHE_URI:-}${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${BM_KERNEL}" -o kernel
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
@@ -148,10 +150,12 @@ if [ -n "$BM_SERIAL_SCRIPT" ]; then
done
fi
section_end prepare_rootfs
set +e
$BM/fastboot_run.py \
--dev="$BM_SERIAL" \
--test-timeout ${TEST_PHASE_TIMEOUT:-20} \
--test-timeout ${TEST_PHASE_TIMEOUT_MINUTES:-20} \
--fbserial="$BM_FASTBOOT_SERIAL" \
--powerup="$BM_POWERUP" \
--powerdown="$BM_POWERDOWN"

View File

@@ -119,12 +119,12 @@ class FastbootRun:
if print_more_lines == -1:
print_more_lines = 30
result = re.search("hwci: mesa: (\S*)", line)
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
if result:
if result.group(1) == "pass":
return 0
else:
return 1
status = result.group(1)
exit_code = int(result.group(2))
return exit_code
self.print_error(
"Reached the end of the CPU serial log without finding a result, abandoning run.")

View File

@@ -71,6 +71,8 @@ if [ -z "$BM_CMDLINE" ]; then
exit 1
fi
section_start prepare_rootfs "Preparing rootfs components"
set -ex
date +'%F %T'
@@ -102,7 +104,7 @@ if [ -f "${BM_BOOTFS}" ]; then
fi
# If BM_KERNEL and BM_DTS is present
if [ -n "${FORCE_KERNEL_TAG}" ]; then
if [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
if [ -z "${BM_KERNEL}" ] || [ -z "${BM_DTB}" ]; then
echo "This machine cannot be tested with external kernel since BM_KERNEL or BM_DTB missing!"
exit 1
@@ -120,7 +122,7 @@ date +'%F %T'
# Install kernel modules (it could be either in /lib/modules or
# /usr/lib/modules, but we want to install in the latter)
if [ -n "${FORCE_KERNEL_TAG}" ]; then
if [ -n "${EXTERNAL_KERNEL_TAG}" ]; then
tar --keep-directory-symlink --zstd -xf modules.tar.zst -C /nfs/
rm modules.tar.zst &
elif [ -n "${BM_BOOTFS}" ]; then
@@ -134,7 +136,7 @@ fi
date +'%F %T'
# Install kernel image + bootloader files
if [ -n "${FORCE_KERNEL_TAG}" ] || [ -z "$BM_BOOTFS" ]; then
if [ -n "${EXTERNAL_KERNEL_TAG}" ] || [ -z "$BM_BOOTFS" ]; then
mv "${BM_KERNEL}" "${BM_DTB}.dtb" /tftp/
else # BM_BOOTFS
rsync -aL --delete $BM_BOOTFS/boot/ /tftp/
@@ -181,13 +183,16 @@ if [ -n "$BM_BOOTCONFIG" ]; then
printf "$BM_BOOTCONFIG" >> /tftp/config.txt
fi
section_end prepare_rootfs
set +e
STRUCTURED_LOG_FILE=job_detail.json
STRUCTURED_LOG_FILE=results/job_detail.json
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update dut_job_type "${DEVICE_TYPE}"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --update farm "${FARM}"
ATTEMPTS=3
first_attempt=True
while [ $((ATTEMPTS--)) -gt 0 ]; do
section_start dut_boot "Booting hardware device ..."
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --create-dut-job dut_name "${CI_RUNNER_DESCRIPTION}"
# Update subtime time to CI_JOB_STARTED_AT only for the first run
if [ "$first_attempt" = "True" ]; then
@@ -199,17 +204,22 @@ while [ $((ATTEMPTS--)) -gt 0 ]; do
--dev="$BM_SERIAL" \
--powerup="$BM_POWERUP" \
--powerdown="$BM_POWERDOWN" \
--test-timeout ${TEST_PHASE_TIMEOUT:-20}
--boot-timeout-seconds ${BOOT_PHASE_TIMEOUT_SECONDS:-300} \
--test-timeout-minutes ${TEST_PHASE_TIMEOUT_MINUTES:-$((CI_JOB_TIMEOUT/60 - ${TEST_SETUP_AND_UPLOAD_MARGIN_MINUTES:-5}))}
ret=$?
if [ $ret -eq 2 ]; then
echo "Did not detect boot sequence, retrying..."
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
first_attempt=False
error "Device failed to boot; will retry"
else
# We're no longer in dut_boot by this point
unset CURRENT_SECTION
ATTEMPTS=0
fi
done
section_start dut_cleanup "Cleaning up after job"
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job
python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close
set -e
@@ -219,11 +229,8 @@ date +'%F %T'
# Bring artifacts back from the NFS dir to the build dir where gitlab-runner
# will look for them.
cp -Rp /nfs/results/. results/
if [ -f "${STRUCTURED_LOG_FILE}" ]; then
cp -p ${STRUCTURED_LOG_FILE} results/
echo "Structured log file is available at ${ARTIFACTS_BASE_URL}/results/${STRUCTURED_LOG_FILE}"
fi
date +'%F %T'
section_end dut_cleanup
exit $ret

View File

@@ -31,11 +31,12 @@ from custom_logger import CustomLogger
from serial_buffer import SerialBuffer
class PoERun:
def __init__(self, args, test_timeout, logger):
def __init__(self, args, boot_timeout, test_timeout, logger):
self.powerup = args.powerup
self.powerdown = args.powerdown
self.ser = SerialBuffer(
args.dev, "results/serial-output.txt", "")
args.dev, "results/serial-output.txt", ": ")
self.boot_timeout = boot_timeout
self.test_timeout = test_timeout
self.logger = logger
@@ -56,7 +57,7 @@ class PoERun:
boot_detected = False
self.logger.create_job_phase("boot")
for line in self.ser.lines(timeout=5 * 60, phase="bootloader"):
for line in self.ser.lines(timeout=self.boot_timeout, phase="bootloader"):
if re.search("Booting Linux", line):
boot_detected = True
break
@@ -64,7 +65,7 @@ class PoERun:
if not boot_detected:
self.print_error(
"Something wrong; couldn't detect the boot start up sequence")
return 1
return 2
self.logger.create_job_phase("test")
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
@@ -86,14 +87,18 @@ class PoERun:
self.print_error("nouveau jetson tk1 network fail, abandoning run.")
return 1
result = re.search("hwci: mesa: (\S*)", line)
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
if result:
if result.group(1) == "pass":
status = result.group(1)
exit_code = int(result.group(2))
if status == "pass":
self.logger.update_dut_job("status", "pass")
return 0
else:
self.logger.update_status_fail("test fail")
return 1
self.logger.update_dut_job("exit_code", exit_code)
return exit_code
self.print_error(
"Reached the end of the CPU serial log without finding a result")
@@ -109,12 +114,14 @@ def main():
parser.add_argument('--powerdown', type=str,
help='shell command for powering off', required=True)
parser.add_argument(
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
'--boot-timeout-seconds', type=int, help='Boot phase timeout (seconds)', required=True)
parser.add_argument(
'--test-timeout-minutes', type=int, help='Test phase timeout (minutes)', required=True)
args = parser.parse_args()
logger = CustomLogger("job_detail.json")
logger = CustomLogger("results/job_detail.json")
logger.update_dut_time("start", None)
poe = PoERun(args, args.test_timeout * 60, logger)
poe = PoERun(args, args.boot_timeout_seconds, args.test_timeout_minutes * 60, logger)
retval = poe.run()
poe.logged_system(args.powerdown)

View File

@@ -22,7 +22,7 @@
# IN THE SOFTWARE.
import argparse
from datetime import datetime, timezone
from datetime import datetime, UTC
import queue
import serial
import threading
@@ -130,9 +130,10 @@ class SerialBuffer:
if b == b'\n'[0]:
line = line.decode(errors="replace")
time = datetime.now().strftime('%y-%m-%d %H:%M:%S')
print("{endc}{time} {prefix}{line}".format(
time=time, prefix=self.prefix, line=line, endc='\033[0m'), flush=True, end='')
ts = datetime.now(tz=UTC)
ts_str = f"{ts.hour:02}:{ts.minute:02}:{ts.second:02}.{int(ts.microsecond / 1000):03}"
print("{endc}{time}{prefix}{line}".format(
time=ts_str, prefix=self.prefix, line=line, endc='\033[0m'), flush=True, end='')
self.line_queue.put(line)
line = bytearray()

View File

@@ -3,14 +3,17 @@
extends: .container+build-rules
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
# Build jobs don't take more than 1-3 minutes. 5-8 min max on a fresh runner
# without a populated ccache.
# These jobs are never slow, either they finish within reasonable time or
# something has gone wrong and the job will never terminate, so we should
# instead timeout so that the retry mechanism can kick in.
# A few exception are made, see `timeout:` overrides in the rest of this
# file.
timeout: 30m
variables:
# Build jobs don't take more than 1-3 minutes. 5-8 min max on a fresh runner
# without a populated ccache.
# These jobs are never slow, either they finish within reasonable time or
# something has gone wrong and the job will never terminate, so we should
# 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
timeout: 1h
# We don't want to download any previous job's artifacts
dependencies: []
artifacts:
name: "mesa_${CI_JOB_NAME}"
when: always
@@ -54,17 +57,46 @@
extends:
- .build-linux
- .use-debian/x86_64_build
stage: build-x86_64
stage: build-only
variables:
LLVM_VERSION: 15
script:
- .gitlab-ci/meson/build.sh
- &meson-build timeout --verbose ${BUILD_JOB_TIMEOUT_OVERRIDE:-$BUILD_JOB_TIMEOUT} .gitlab-ci/meson/build.sh
# Make sure this list stays the same as all the jobs with
# `stage: build-for-tests`, except for the windows job as
# explained below.
.build-for-tests-jobs:
- job: debian-testing
optional: true
- job: debian-testing-asan
optional: true
- job: debian-build-testing
optional: true
- job: debian-arm32
optional: true
- job: debian-arm32-asan
optional: true
- job: debian-arm64
optional: true
- job: debian-arm64-asan
optional: true
# Windows runners don't have more than one build right now, so there is
# no need to wait on the "first one" to be done.
# - job: windows-msvc
# optional: true
- job: python-test
optional: true
debian-testing:
extends:
- .meson-build
- .ci-deqp-artifacts
stage: build-for-tests
variables:
BUILD_JOB_TIMEOUT: 30m
UNWIND: "enabled"
DRI_LOADERS: >
-D glx=dri
@@ -73,7 +105,6 @@ debian-testing:
-D glvnd=disabled
-D platforms=x11,wayland
GALLIUM_ST: >
-D dri3=enabled
-D gallium-nine=true
-D gallium-va=enabled
-D gallium-rusticl=true
@@ -88,7 +119,7 @@ debian-testing:
S3_ARTIFACT_NAME: mesa-x86_64-default-${BUILDTYPE}
LLVM_VERSION: 15
script:
- .gitlab-ci/meson/build.sh
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
artifacts:
reports:
@@ -97,7 +128,9 @@ debian-testing:
debian-testing-asan:
extends:
- debian-testing
stage: build-for-tests
variables:
BUILD_JOB_TIMEOUT: 30m
C_ARGS: >
-Wno-error=stringop-truncation
EXTRA_OPTION: >
@@ -126,7 +159,9 @@ debian-testing-msan:
# msan cannot fully work until it's used together with msan libc
extends:
- debian-clang
# `needs:` inherited from debian-clang
variables:
BUILD_JOB_TIMEOUT: 30m
# l_undef is incompatible with msan
EXTRA_OPTION:
-D b_sanitize=memory
@@ -138,7 +173,7 @@ debian-testing-msan:
# GLSL has some issues in sexpression reading.
# gtest has issues in its test initialization.
MESON_TEST_ARGS: "--suite glcpp --suite format"
GALLIUM_DRIVERS: "freedreno,iris,nouveau,kmsro,r300,r600,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus"
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)
@@ -154,10 +189,9 @@ debian-testing-msan:
-D intel-clc=enabled
-D install-intel-clc=true
# Disabled because it is unacceptably slow and blocks too many MRs
# Should be re-enabled once this problem has been fixed.
.debian-build-testing:
debian-build-testing:
extends: .meson-build
stage: build-for-tests
variables:
BUILDTYPE: debug
UNWIND: "enabled"
@@ -168,43 +202,45 @@ debian-testing-msan:
-D glvnd=disabled
-D platforms=x11,wayland
GALLIUM_ST: >
-D dri3=enabled
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-omx=bellagio
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=false
-D gallium-rusticl=false
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
GALLIUM_DRIVERS: "iris,nouveau,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,asahi,crocus"
VULKAN_DRIVERS: swrast
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
-D b_lto=true
LLVM_VERSION: 15
S3_ARTIFACT_NAME: debian-build-testing
script: |
section_start lava-pytest "lava-pytest"
.gitlab-ci/lava/lava-pytest.sh
section_switch shellcheck "shellcheck"
.gitlab-ci/run-shellcheck.sh
section_switch yamllint "yamllint"
.gitlab-ci/run-yamllint.sh
section_end yamllint
.gitlab-ci/meson/build.sh
.gitlab-ci/prepare-artifacts.sh
timeout: 15m
script:
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
# Disabled because it currently needs debian-build-testing
.shader-db:
shader-db:
stage: code-validation
extends:
- .use-debian/x86_64_build
- .container+build-rules
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.core-rules, rules]
# Keep this list in sync with the drivers tested in run-shader-db.sh
- !reference [.freedreno-common-rules, rules]
- !reference [.intel-common-rules, rules]
- !reference [.lima-rules, rules]
- !reference [.v3d-rules, rules]
- !reference [.vc4-rules, rules]
- !reference [.nouveau-rules, rules]
- !reference [.r300-rules, rules]
# Also run if this job's own config or script changes
- changes:
- .gitlab-ci/build/gitlab-ci.yml
- .gitlab-ci/run-shader-db.sh
needs:
- .debian-build-testing
- debian-build-testing
variables:
S3_ARTIFACT_NAME: debian-build-testing
before_script:
@@ -219,6 +255,9 @@ debian-testing-msan:
# Test a release build with -Werror so new warnings don't sneak in.
debian-release:
extends: .meson-build
needs:
- !reference [.meson-build, needs]
- !reference [.build-for-tests-jobs]
variables:
LLVM_VERSION: 15
UNWIND: "enabled"
@@ -231,16 +270,14 @@ debian-release:
-D glvnd=disabled
-D platforms=x11,wayland
GALLIUM_ST: >
-D dri3=enabled
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-omx=disabled
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=false
-D gallium-rusticl=false
-D llvm=enabled
GALLIUM_DRIVERS: "i915,iris,nouveau,kmsro,freedreno,r300,svga,llvmpipe,softpipe,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,d3d12,crocus"
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"
EXTRA_OPTION: >
-D spirv-to-dxil=true
@@ -252,19 +289,23 @@ debian-release:
BUILDTYPE: "release"
S3_ARTIFACT_NAME: "mesa-x86_64-default-${BUILDTYPE}"
script:
- .gitlab-ci/meson/build.sh
- *meson-build
- 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
alpine-build-testing:
extends:
- .meson-build
- .use-alpine/x86_64_build
stage: build-x86_64
needs:
- !reference [.use-alpine/x86_64_build, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILD_JOB_TIMEOUT: 30m
BUILDTYPE: "release"
C_ARGS: >
-Wno-error=cpp
-Wno-error=array-bounds
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
DRI_LOADERS: >
-D glx=disabled
@@ -272,13 +313,10 @@ alpine-build-testing:
-D egl=enabled
-D glvnd=disabled
-D platforms=wayland
LLVM_VERSION: "16"
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,llvmpipe,softpipe,tegra,v3d,vc4,virgl,zink"
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,llvmpipe,softpipe,tegra,v3d,vc4,virgl,zink"
GALLIUM_ST: >
-D dri3=enabled
-D gallium-extra-hud=true
-D gallium-vdpau=disabled
-D gallium-omx=disabled
-D gallium-va=enabled
-D gallium-xa=disabled
-D gallium-nine=true
@@ -286,23 +324,32 @@ alpine-build-testing:
-D gles1=disabled
-D gles2=enabled
-D llvm=enabled
-D llvm-orcjit=true
-D microsoft-clc=disabled
-D shared-llvm=enabled
UNWIND: "disabled"
VULKAN_DRIVERS: "amd,broadcom,freedreno,intel,imagination-experimental"
VULKAN_DRIVERS: "amd,asahi,broadcom,freedreno,intel,imagination-experimental"
fedora-release:
extends:
- .meson-build
- .use-fedora/x86_64_build
needs:
- !reference [.use-fedora/x86_64_build, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILDTYPE: "release"
C_LINK_ARGS: >
# array-bounds are pure non-LTO gcc buggy warning, verify after bump to F39
C_ARGS: >
-Wno-error=stringop-overflow
-Wno-error=stringop-overread
-Wno-error=array-bounds
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
@@ -313,20 +360,16 @@ fedora-release:
-D glvnd=enabled
-D platforms=x11,wayland
EXTRA_OPTION: >
-D b_lto=true
-D osmesa=true
-D selinux=true
-D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination
-D vulkan-layers=device-select,overlay
-D intel-rt=enabled
-D imagination-srv=true
-D teflon=true
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,i915,iris,kmsro,lima,nouveau,panfrost,r300,r600,radeonsi,svga,llvmpipe,softpipe,tegra,v3d,vc4,virgl,zink"
GALLIUM_DRIVERS: "crocus,etnaviv,freedreno,i915,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,llvmpipe,softpipe,tegra,v3d,vc4,virgl,zink"
GALLIUM_ST: >
-D dri3=enabled
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-omx=disabled
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=false
@@ -338,13 +381,16 @@ fedora-release:
-D shared-llvm=enabled
LLVM_VERSION: ""
UNWIND: "disabled"
VULKAN_DRIVERS: "amd,broadcom,freedreno,imagination-experimental,intel,intel_hasvk"
VULKAN_DRIVERS: "amd,asahi,broadcom,freedreno,imagination-experimental,intel,intel_hasvk"
debian-android:
extends:
- .meson-cross
- .use-debian/android_build
- .ci-deqp-artifacts
needs:
- !reference [.use-debian/android_build, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILDTYPE: debug
UNWIND: "disabled"
@@ -373,9 +419,7 @@ debian-android:
-D android-libbacktrace=disabled
-D intel-clc=system
GALLIUM_ST: >
-D dri3=disabled
-D gallium-vdpau=disabled
-D gallium-omx=disabled
-D gallium-va=disabled
-D gallium-xa=disabled
-D gallium-nine=false
@@ -396,19 +440,24 @@ debian-android:
ARTIFACTS_DEBUG_SYMBOLS: 1
S3_ARTIFACT_NAME: mesa-x86_64-android-${BUILDTYPE}
script:
- CROSS=aarch64-linux-android GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d VULKAN_DRIVERS=freedreno,broadcom,virtio .gitlab-ci/meson/build.sh
- export CROSS=aarch64-linux-android
- export GALLIUM_DRIVERS=etnaviv,freedreno,lima,panfrost,vc4,v3d
- 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.
- CROSS=x86_64-linux-android GALLIUM_DRIVERS=iris,virgl VULKAN_DRIVERS=amd,intel .gitlab-ci/meson/build.sh
- export CROSS=x86_64-linux-android
- export GALLIUM_DRIVERS=iris,virgl
- export VULKAN_DRIVERS=amd,intel
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
.meson-cross:
extends:
- .meson-build
stage: build-misc
variables:
UNWIND: "disabled"
DRI_LOADERS: >
@@ -418,9 +467,7 @@ debian-android:
-D platforms=x11,wayland
-D osmesa=false
GALLIUM_ST: >
-D dri3=enabled
-D gallium-vdpau=disabled
-D gallium-omx=disabled
-D gallium-va=disabled
-D gallium-xa=disabled
-D gallium-nine=false
@@ -432,8 +479,8 @@ debian-android:
needs:
- debian/arm64_build
variables:
VULKAN_DRIVERS: freedreno,broadcom
GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,softpipe,tegra,v3d,vc4,zink"
VULKAN_DRIVERS: asahi,freedreno,broadcom
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,llvmpipe,softpipe,tegra,v3d,vc4,zink"
BUILDTYPE: "debugoptimized"
tags:
- aarch64
@@ -442,10 +489,14 @@ debian-arm32:
extends:
- .meson-arm
- .ci-deqp-artifacts
stage: build-for-tests
variables:
CROSS: armhf
DRI_LOADERS:
-D glvnd=disabled
# remove asahi & llvmpipe from the .meson-arm list because here we have llvm=disabled
VULKAN_DRIVERS: freedreno,broadcom
GALLIUM_DRIVERS: "etnaviv,freedreno,lima,nouveau,panfrost,softpipe,tegra,v3d,vc4,zink"
EXTRA_OPTION: >
-D llvm=disabled
-D valgrind=disabled
@@ -454,12 +505,13 @@ debian-arm32:
# tempfiles in our artifacts.
ARTIFACTS_DEBUG_SYMBOLS: 1
script:
- .gitlab-ci/meson/build.sh
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
debian-arm32-asan:
extends:
- debian-arm32
stage: build-for-tests
variables:
DRI_LOADERS:
-D glvnd=disabled
@@ -476,12 +528,12 @@ debian-arm64:
extends:
- .meson-arm
- .ci-deqp-artifacts
stage: build-for-tests
variables:
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-truncation
GALLIUM_DRIVERS: "etnaviv,freedreno,kmsro,lima,nouveau,panfrost,llvmpipe,softpipe,tegra,v3d,vc4,zink"
VULKAN_DRIVERS: "freedreno,broadcom,panfrost,imagination-experimental"
VULKAN_DRIVERS: "asahi,freedreno,broadcom,panfrost,imagination-experimental"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
@@ -494,12 +546,13 @@ debian-arm64:
-D gallium-rusticl=true
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
script:
- .gitlab-ci/meson/build.sh
- *meson-build
- .gitlab-ci/prepare-artifacts.sh
debian-arm64-asan:
extends:
- debian-arm64
stage: build-for-tests
variables:
DRI_LOADERS:
-D glvnd=disabled
@@ -515,8 +568,11 @@ debian-arm64-build-test:
extends:
- .meson-arm
- .ci-deqp-artifacts
needs:
- !reference [.meson-arm, needs]
- !reference [.build-for-tests-jobs]
variables:
VULKAN_DRIVERS: "amd"
VULKAN_DRIVERS: "amd,nouveau"
DRI_LOADERS:
-D glvnd=disabled
EXTRA_OPTION: >
@@ -525,6 +581,10 @@ debian-arm64-build-test:
debian-arm64-release:
extends:
- debian-arm64
stage: build-only
needs:
- !reference [debian-arm64, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILDTYPE: release
S3_ARTIFACT_NAME: mesa-arm64-default-${BUILDTYPE}
@@ -533,11 +593,35 @@ debian-arm64-release:
-Wno-error=stringop-truncation
-Wno-error=stringop-overread
script:
- .gitlab-ci/meson/build.sh
- *meson-build
- 'if [ -n "$MESA_CI_PERFORMANCE_ENABLED" ]; then .gitlab-ci/prepare-artifacts.sh; fi'
debian-no-libdrm:
extends:
- .meson-arm
stage: build-only
needs:
- !reference [.meson-arm, needs]
- !reference [.build-for-tests-jobs]
variables:
VULKAN_DRIVERS: freedreno
GALLIUM_DRIVERS: "zink,llvmpipe"
BUILDTYPE: release
C_ARGS: >
-Wno-error=array-bounds
-Wno-error=stringop-truncation
-Wno-error=stringop-overread
EXTRA_OPTION: >
-D freedreno-kmds=kgsl
-D glx=disabled
-D gbm=disabled
-D egl=disabled
debian-clang:
extends: .meson-build
needs:
- !reference [.meson-build, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILDTYPE: debug
LLVM_VERSION: 15
@@ -560,10 +644,8 @@ debian-clang:
-D glvnd=enabled
-D platforms=x11,wayland
GALLIUM_ST: >
-D dri3=enabled
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-omx=bellagio
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=true
@@ -574,7 +656,7 @@ debian-clang:
-D shared-llvm=enabled
-D opencl-spirv=true
-D shared-glapi=enabled
GALLIUM_DRIVERS: "iris,nouveau,kmsro,r300,r600,freedreno,llvmpipe,softpipe,svga,v3d,vc4,virgl,etnaviv,panfrost,lima,zink,radeonsi,tegra,d3d12,crocus,i915,asahi"
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
EXTRA_OPTION:
-D spirv-to-dxil=true
@@ -592,16 +674,16 @@ debian-clang:
debian-clang-release:
extends: debian-clang
# `needs:` inherited from debian-clang
variables:
BUILD_JOB_TIMEOUT: 30m
BUILDTYPE: "release"
DRI_LOADERS: >
-D glx=xlib
-D platforms=x11,wayland
GALLIUM_ST: >
-D dri3=enabled
-D gallium-extra-hud=true
-D gallium-vdpau=enabled
-D gallium-omx=bellagio
-D gallium-va=enabled
-D gallium-xa=enabled
-D gallium-nine=true
@@ -618,7 +700,7 @@ windows-msvc:
- .build-windows
- .use-windows_build_msvc
- .windows-build-rules
stage: build-misc
stage: build-for-tests
script:
- pwsh -ExecutionPolicy RemoteSigned .\.gitlab-ci\windows\mesa_build.ps1
artifacts:
@@ -628,7 +710,11 @@ windows-msvc:
debian-vulkan:
extends: .meson-build
needs:
- !reference [.meson-build, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILD_JOB_TIMEOUT: 30m
BUILDTYPE: debug
LLVM_VERSION: 15
UNWIND: "disabled"
@@ -643,9 +729,7 @@ debian-vulkan:
-D platforms=x11,wayland
-D osmesa=false
GALLIUM_ST: >
-D dri3=enabled
-D gallium-vdpau=disabled
-D gallium-omx=disabled
-D gallium-va=disabled
-D gallium-xa=disabled
-D gallium-nine=false
@@ -654,7 +738,7 @@ debian-vulkan:
-D c_args=-fno-sanitize-recover=all
-D cpp_args=-fno-sanitize-recover=all
UBSAN_OPTIONS: "print_stacktrace=1"
VULKAN_DRIVERS: amd,broadcom,freedreno,intel,intel_hasvk,panfrost,virtio,imagination-experimental,microsoft-experimental,nouveau
VULKAN_DRIVERS: amd,asahi,broadcom,freedreno,intel,intel_hasvk,panfrost,virtio,imagination-experimental,microsoft-experimental,nouveau
EXTRA_OPTION: >
-D vulkan-layers=device-select,overlay
-D build-aco-tests=true
@@ -665,6 +749,9 @@ debian-x86_32:
extends:
- .meson-cross
- .use-debian/x86_32_build
needs:
- !reference [.use-debian/x86_32_build, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILDTYPE: debug
CROSS: i386
@@ -688,18 +775,24 @@ debian-x86_32:
-D intel-clc=enabled
-D install-intel-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.
# In case of issues with this job, contact @ajax
debian-s390x:
extends:
- debian-ppc64el
- .meson-cross
- .use-debian/s390x_build
- .s390x-rules
needs:
- !reference [.use-debian/s390x_build, needs]
- !reference [.build-for-tests-jobs]
tags:
- kvm
variables:
BUILDTYPE: debug
CROSS: s390x
GALLIUM_DRIVERS: "llvmpipe,softpipe,zink"
GALLIUM_DRIVERS: "llvmpipe,virgl,zink"
LLVM_VERSION: 15
VULKAN_DRIVERS: "swrast"
VULKAN_DRIVERS: "swrast,virtio"
DRI_LOADERS:
-D glvnd=disabled
@@ -707,7 +800,9 @@ debian-ppc64el:
extends:
- .meson-cross
- .use-debian/ppc64el_build
- .ppc64el-rules
needs:
- !reference [.use-debian/ppc64el_build, needs]
- !reference [.build-for-tests-jobs]
variables:
BUILDTYPE: debug
CROSS: ppc64el
@@ -715,3 +810,18 @@ debian-ppc64el:
VULKAN_DRIVERS: "amd,swrast"
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:
stage: build-for-tests
extends:
- .use-debian/x86_64_pyutils
- .build-common
variables:
GIT_STRATEGY: fetch
S3_ARTIFACT_NAME: mesa-python-test
timeout: 10m
script:
- .gitlab-ci/run-pytest.sh
- .gitlab-ci/prepare-artifacts-python.sh

View File

@@ -7,7 +7,7 @@ while true; do
devcds=$(find /sys/devices/virtual/devcoredump/ -name data 2>/dev/null)
for i in $devcds; do
echo "Found a devcoredump at $i."
if cp $i /results/first.devcore; then
if cp $i $RESULTS_DIR/first.devcore; then
echo 1 > $i
echo "Saved to the job artifacts at /first.devcore"
exit 0
@@ -23,7 +23,7 @@ while true; do
rm "$tmpfile"
else
echo "Found an i915 error state at $i size=$filesize."
if cp "$tmpfile" /results/first.i915_error_state; then
if cp "$tmpfile" $RESULTS_DIR/first.i915_error_state; then
rm "$tmpfile"
echo 1 > "$i"
echo "Saved to the job artifacts at /first.i915_error_state"

View File

@@ -35,7 +35,7 @@ VARS=(
DEQP_EXPECTED_RENDERER
DEQP_FRACTION
DEQP_HEIGHT
DEQP_RESULTS_DIR
DEQP_RUNNER_MAX_FAILS
DEQP_RUNNER_OPTIONS
DEQP_SUITE
DEQP_TEMP_DIR
@@ -56,7 +56,6 @@ VARS=(
GTEST
GTEST_FAILS
GTEST_FRACTION
GTEST_RESULTS_DIR
GTEST_RUNNER_OPTIONS
GTEST_SKIPS
HWCI_FREQ_MAX
@@ -64,6 +63,7 @@ VARS=(
HWCI_KVM
HWCI_START_WESTON
HWCI_START_XORG
HWCI_TEST_ARGS
HWCI_TEST_SCRIPT
IR3_SHADER_DEBUG
JOB_ARTIFACTS_BASE
@@ -84,6 +84,7 @@ VARS=(
MESA_IMAGE_PATH
MESA_IMAGE_TAG
MESA_LOADER_DRIVER_OVERRIDE
MESA_SPIRV_LOG_LEVEL
MESA_TEMPLATES_COMMIT
MESA_VK_ABORT_ON_DEVICE_LOSS
MESA_VK_IGNORE_CONFORMANCE_WARNING
@@ -106,6 +107,7 @@ VARS=(
PIGLIT_REPLAY_REFERENCE_IMAGES_BASE
PIGLIT_REPLAY_SUBCOMMAND
PIGLIT_RESULTS
PIGLIT_RUNNER_OPTIONS
PIGLIT_TESTS
PIGLIT_TRACES_FILE
PIPELINE_ARTIFACTS_BASE
@@ -120,9 +122,6 @@ VARS=(
VIRGL_RENDER_SERVER
WAFFLE_PLATFORM
VK_DRIVER
VKD3D_PROTON_RESULTS
VKD3D_CONFIG
VKD3D_TEST_EXCLUDE
ZINK_DESCRIPTORS
ZINK_DEBUG
LVP_POISON_MEMORY

View File

@@ -47,6 +47,13 @@ for path in '/dut-env-vars.sh' '/set-job-env-vars.sh' './set-job-env-vars.sh'; d
done
. "$SCRIPTS_DIR"/setup-test-env.sh
# Flush out anything which might be stuck in a serial buffer
echo
echo
echo
section_switch init_stage2 "Pre-testing hardware setup"
set -ex
# Set up any devices required by the jobs
@@ -94,7 +101,7 @@ fi
# Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect
# it in /install
ln -sf $CI_PROJECT_DIR/install /install
export LD_LIBRARY_PATH=/install/lib:/install/lib/dri
export LD_LIBRARY_PATH=/install/lib
export LIBGL_DRIVERS_PATH=/install/lib/dri
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22495#note_1876691
@@ -113,7 +120,7 @@ export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))")
if [ -n "$MESA_LOADER_DRIVER_OVERRIDE" ]; then
rm /install/lib/dri/!($MESA_LOADER_DRIVER_OVERRIDE)_dri.so
fi
ls -1 /install/lib/dri/*.so || true
ls -1 /install/lib/dri/*_dri.so || true
if [ "$HWCI_FREQ_MAX" = "true" ]; then
# Ensure initialization of the DRM device (needed by MSM)
@@ -168,7 +175,7 @@ export VK_DRIVER_FILES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
if [ -n "$HWCI_START_XORG" ]; then
echo "touch /xorg-started; sleep 100000" > /xorg-script
env \
xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log &
xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile "$RESULTS_DIR/Xorg.0.log" &
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
# Wait for xorg to be ready for connections.
@@ -200,15 +207,18 @@ if [ -n "$HWCI_START_WESTON" ]; then
while [ ! -S "$WESTON_X11_SOCK" ]; do sleep 1; done
fi
set +x
section_end init_stage2
echo "Running ${HWCI_TEST_SCRIPT} ${HWCI_TEST_ARGS} ..."
set +e
bash -c ". $SCRIPTS_DIR/setup-test-env.sh && $HWCI_TEST_SCRIPT"
EXIT_CODE=$?
$HWCI_TEST_SCRIPT ${HWCI_TEST_ARGS:-}; EXIT_CODE=$?
set -e
# Let's make sure the results are always stored in current working directory
mv -f ${CI_PROJECT_DIR}/results ./ 2>/dev/null || true
[ ${EXIT_CODE} -ne 0 ] || rm -rf results/trace/"$PIGLIT_REPLAY_DEVICE_NAME"
section_start post_test_cleanup "Cleaning up after testing, uploading results"
set -x
# Make sure that capture-devcoredump is done before we start trying to tar up
# artifacts -- if it's writing while tar is reading, tar will throw an error and
@@ -226,11 +236,12 @@ fi
[ ${EXIT_CODE} -eq 0 ] && RESULT=pass || RESULT=fail
set +x
section_end post_test_cleanup
# Print the final result; both bare-metal and LAVA look for this string to get
# the result of our run, so try really hard to get it out rather than losing
# the run. The device gets shut down right at this point, and a630 seems to
# enjoy corrupting the last line of serial output before shutdown.
for _ in $(seq 0 3); do echo "hwci: mesa: $RESULT"; sleep 1; echo; done
for _ in $(seq 0 3); do echo "hwci: mesa: $RESULT, exit_code: $EXIT_CODE"; sleep 1; echo; done
exit $EXIT_CODE

View File

@@ -560,7 +560,8 @@ set_cpu_freq_max() {
read_cpu_freq_info ${cpu_index} n ${CAP_CPU_FREQ_INFO} || { res=$?; continue; }
target_freq=$(compute_cpu_freq_set "${CPU_SET_MAX_FREQ}")
[ -z "${target_freq}" ] && { res=$?; continue; }
tf_res=$?
[ -z "${target_freq}" ] && { res=$tf_res; continue; }
log INFO "Setting CPU%s max scaling freq to %s Hz" ${cpu_index} "${target_freq}"
[ -n "${DRY_RUN}" ] && continue

View File

@@ -1,24 +1,18 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091 # the path is created in build-kdl and
# here is check if exist
# shellcheck disable=SC2086 # we want the arguments to be expanded
terminate() {
echo "ci-kdl.sh caught SIGTERM signal! propagating to child processes"
for job in $(jobs -p)
do
kill -15 "$job"
done
}
trap terminate SIGTERM
if [ -f /ci-kdl.venv/bin/activate ]; then
source /ci-kdl.venv/bin/activate
/ci-kdl.venv/bin/python /ci-kdl.venv/bin/ci-kdl | tee -a /results/kdl.log &
child=$!
wait $child
mv kdl_*.json /results/kdl.json
else
echo -e "Not possible to activate ci-kdl virtual environment"
if ! [ -f /ci-kdl/bin/activate ]; then
echo -e "ci-kdl not installed; not monitoring temperature"
exit 0
fi
KDL_ARGS="
--output-file=${RESULTS_DIR}/kdl.json
--log-level=WARNING
--num-samples=-1
"
source /ci-kdl/bin/activate
exec /ci-kdl/bin/ci-kdl ${KDL_ARGS}

View File

@@ -1,21 +0,0 @@
#!/bin/sh
set -ex
_XORG_SCRIPT="/xorg-script"
_FLAG_FILE="/xorg-started"
echo "touch ${_FLAG_FILE}; sleep 100000" > "${_XORG_SCRIPT}"
if [ "x$1" != "x" ]; then
export LD_LIBRARY_PATH="${1}/lib:${1}/lib/dri"
export LIBGL_DRIVERS_PATH="${1}/lib/dri"
fi
xinit /bin/sh "${_XORG_SCRIPT}" -- /usr/bin/Xorg vt45 -noreset -s 0 -dpms -logfile /Xorg.0.log &
# Wait for xorg to be ready for connections.
for _ in 1 2 3 4 5; do
if [ -e "${_FLAG_FILE}" ]; then
break
fi
sleep 5
done

View File

@@ -8,8 +8,6 @@
set -e
set -o xtrace
export LLVM_VERSION="${LLVM_VERSION:=16}"
EPHEMERAL=(
)
@@ -18,7 +16,7 @@ DEPS=(
bash
bison
ccache
clang16-dev
"clang${LLVM_VERSION}-dev"
cmake
clang-dev
coreutils
@@ -31,15 +29,15 @@ DEPS=(
glslang
graphviz
linux-headers
llvm16-static
llvm16-dev
"llvm${LLVM_VERSION}-static"
"llvm${LLVM_VERSION}-dev"
meson
mold
musl-dev
expat-dev
elfutils-dev
libclc-dev
libdrm-dev
libselinux-dev
libva-dev
libpciaccess-dev
zlib-dev
@@ -53,6 +51,7 @@ DEPS=(
py3-yaml
vulkan-headers
spirv-tools-dev
spirv-llvm-translator-dev
util-macros
wayland-dev
wayland-protocols
@@ -62,15 +61,18 @@ apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
pip3 install --break-system-packages sphinx===5.1.1 hawkmoth===0.16.0
. .gitlab-ci/container/build-llvm-spirv.sh
. .gitlab-ci/container/build-libclc.sh
. .gitlab-ci/container/container_pre_build.sh
############### Uninstall the build software
# too many vendor binarise, just keep the ones we need
find /usr/share/clc \
\( -type f -o -type l \) \
! -name 'spirv-mesa3d-.spv' \
! -name 'spirv64-mesa3d-.spv' \
-delete
apk del "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh

View File

@@ -4,42 +4,78 @@
# .gitlab-ci/image-tags.yml tags:
# KERNEL_ROOTFS_TAG
set -ex
set -uex
ANGLE_REV="1409a05a81e3ccb279142433a2b987bc330f555b"
ANGLE_REV="76025caa1a059f464a2b0e8f879dbd4746f092b9"
SCRIPTS_DIR="$(pwd)/.gitlab-ci"
ANGLE_PATCH_DIR="${SCRIPTS_DIR}/container/patches"
# DEPOT tools
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
PWD=$(pwd)
export PATH=$PWD/depot_tools:$PATH
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot-tools
export PATH=/depot-tools:$PATH
export DEPOT_TOOLS_UPDATE=0
mkdir /angle-build
mkdir /angle
pushd /angle-build
git init
git remote add origin https://chromium.googlesource.com/angle/angle.git
git fetch --depth 1 origin "$ANGLE_REV"
git checkout FETCH_HEAD
# source preparation
python3 scripts/bootstrap.py
mkdir -p build/config
gclient sync
angle_patch_files=(
build-angle_deps_Make-more-sources-conditional.patch
)
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}"
done
sed -i "/catapult/d" testing/BUILD.gn
{
echo "ANGLE base version $ANGLE_REV"
echo "The following local patches are applied on top:"
git log --reverse --oneline $ANGLE_REV.. --format='- %s'
} > /angle/version
# source preparation
gclient config --name REPLACE-WITH-A-DOT --unmanaged \
--custom-var='angle_enable_cl=False' \
--custom-var='angle_enable_cl_testing=False' \
--custom-var='angle_enable_vulkan_validation_layers=False' \
--custom-var='angle_enable_wgpu=False' \
--custom-var='build_allow_regenerate=False' \
--custom-var='build_angle_deqp_tests=False' \
--custom-var='build_angle_perftests=False' \
--custom-var='build_with_catapult=False' \
--custom-var='build_with_swiftshader=False' \
https://chromium.googlesource.com/angle/angle.git
sed -e 's/REPLACE-WITH-A-DOT/./;' -i .gclient
gclient sync -j"${FDO_CI_CONCURRENT:-4}"
mkdir -p out/Release
echo '
is_debug = false
angle_enable_swiftshader = false
angle_enable_null = false
angle_enable_gl = false
angle_enable_vulkan = true
angle_has_histograms = false
build_angle_trace_perf_tests = false
build_angle_deqp_tests = false
angle_use_custom_libvulkan = false
angle_build_all=false
angle_build_tests=false
angle_enable_cl=false
angle_enable_cl_testing=false
angle_enable_gl=false
angle_enable_gl_desktop_backend=false
angle_enable_null=false
angle_enable_swiftshader=false
angle_enable_trace=false
angle_enable_wgpu=false
angle_enable_vulkan=true
angle_enable_vulkan_api_dump_layer=false
angle_enable_vulkan_validation_layers=false
angle_has_frame_capture=false
angle_has_histograms=false
angle_use_custom_libvulkan=false
angle_egl_extension="so.1"
angle_glesv2_extension="so.2"
build_angle_deqp_tests=false
dcheck_always_on=true
enable_expensive_dchecks=false
is_debug=false
' > out/Release/args.gn
if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
@@ -49,14 +85,15 @@ fi
gn gen out/Release
# depot_tools overrides ninja with a version that doesn't work. We want
# ninja with FDO_CI_CONCURRENT anyway.
/usr/local/bin/ninja -C out/Release/
/usr/local/bin/ninja -C out/Release/ libEGL libGLESv2
mkdir /angle
cp out/Release/lib*GL*.so /angle/
ln -s libEGL.so /angle/libEGL.so.1
ln -s libGLESv2.so /angle/libGLESv2.so.2
rm -f out/Release/libvulkan.so* out/Release/*.so.TOC
cp out/Release/lib*.so* /angle/
ln -s libEGL.so.1 /angle/libEGL.so
ln -s libGLESv2.so.2 /angle/libGLESv2.so
rm -rf out
popd
rm -rf ./depot_tools
rm -rf /depot-tools
rm -rf /angle-build

View File

@@ -7,7 +7,7 @@
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex
set -uex
APITRACE_VERSION="0a6506433e1f9f7b69757b4e5730326970c4321a"
@@ -15,7 +15,7 @@ git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout
pushd /apitrace
git checkout "$APITRACE_VERSION"
git submodule update --init --depth 1 --recursive
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on $EXTRA_CMAKE_ARGS
cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on ${EXTRA_CMAKE_ARGS:-}
cmake --build _build --parallel --target apitrace eglretrace
mkdir build
cp _build/apitrace build

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
set -ex
set -uex
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
@@ -17,7 +17,7 @@ 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
git checkout "$VIRGLRENDERER_VERSION"
meson setup build/ -D libdir=lib -D render-server-worker=process -D venus=true $EXTRA_MESON_ARGS
meson setup build/ -D libdir=lib -D render-server-worker=process -D venus=true ${EXTRA_MESON_ARGS:-}
meson install -C build
popd
@@ -29,7 +29,7 @@ RUSTFLAGS='-L native=/usr/local/lib' cargo install \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local \
--version 0.65.1 \
$EXTRA_CARGO_ARGS
${EXTRA_CARGO_ARGS:-}
CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L native=/usr/local/lib' cargo install \
-j ${FDO_CI_CONCURRENT:-4} \
@@ -37,7 +37,7 @@ CROSVM_USE_SYSTEM_MINIGBM=1 CROSVM_USE_SYSTEM_VIRGLRENDERER=1 RUSTFLAGS='-L nati
--features 'default-no-sandbox gpu x virgl_renderer' \
--path . \
--root /usr/local \
$EXTRA_CARGO_ARGS
${EXTRA_CARGO_ARGS:-}
popd

View File

@@ -4,46 +4,72 @@
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_TEST_ANDROID_TAG
# DEBIAN_TEST_GL_TAG
# DEBIAN_TEST_VK_TAG
# DEBIAN_BASE_TAG
# KERNEL_ROOTFS_TAG
set -ex
set -uex
DEQP_RUNNER_VERSION=0.18.0
DEQP_RUNNER_VERSION=0.20.2
commits_to_backport=(
)
patch_files=(
)
DEQP_RUNNER_GIT_URL="${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/mesa/deqp-runner.git}"
if [ -n "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
# Build and install from source
DEQP_RUNNER_CARGO_ARGS="--git $DEQP_RUNNER_GIT_URL"
if [ -n "${DEQP_RUNNER_GIT_TAG}" ]; then
DEQP_RUNNER_CARGO_ARGS="--tag ${DEQP_RUNNER_GIT_TAG} ${DEQP_RUNNER_CARGO_ARGS}"
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_TAG"
else
DEQP_RUNNER_CARGO_ARGS="--rev ${DEQP_RUNNER_GIT_REV} ${DEQP_RUNNER_CARGO_ARGS}"
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_REV"
fi
DEQP_RUNNER_CARGO_ARGS="${DEQP_RUNNER_CARGO_ARGS} ${EXTRA_CARGO_ARGS}"
if [ -n "${DEQP_RUNNER_GIT_TAG:-}" ]; then
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_TAG"
elif [ -n "${DEQP_RUNNER_GIT_REV:-}" ]; then
DEQP_RUNNER_GIT_CHECKOUT="$DEQP_RUNNER_GIT_REV"
else
# Install from package registry
DEQP_RUNNER_CARGO_ARGS="--version ${DEQP_RUNNER_VERSION} ${EXTRA_CARGO_ARGS} -- deqp-runner"
DEQP_RUNNER_GIT_CHECKOUT="v$DEQP_RUNNER_VERSION"
fi
BASE_PWD=$PWD
mkdir -p /deqp-runner
pushd /deqp-runner
mkdir deqp-runner-git
pushd deqp-runner-git
git init
git remote add origin "$DEQP_RUNNER_GIT_URL"
git fetch --depth 1 origin "$DEQP_RUNNER_GIT_CHECKOUT"
git checkout FETCH_HEAD
for commit in "${commits_to_backport[@]}"
do
PATCH_URL="https://gitlab.freedesktop.org/mesa/deqp-runner/-/commit/$commit.patch"
echo "Backport deqp-runner commit $commit from $PATCH_URL"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 $PATCH_URL | git am
done
for patch in "${patch_files[@]}"
do
echo "Apply patch to deqp-runner from $patch"
git am "$BASE_PWD/.gitlab-ci/container/patches/$patch"
done
if [ -z "${RUST_TARGET:-}" ]; then
RUST_TARGET=""
fi
if [[ "$RUST_TARGET" != *-android ]]; then
# When CC (/usr/lib/ccache/gcc) variable is set, the rust compiler uses
# this variable when cross-compiling arm32 and build fails for zsys-sys.
# So unset the CC variable when cross-compiling for arm32.
SAVEDCC=${CC:-}
if [ "$RUST_TARGET" = "armv7-unknown-linux-gnueabihf" ]; then
unset CC
fi
cargo install --locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local \
${DEQP_RUNNER_CARGO_ARGS}
${EXTRA_CARGO_ARGS:-} \
--path .
CC=$SAVEDCC
else
mkdir -p /deqp-runner
pushd /deqp-runner
git clone --branch "$DEQP_RUNNER_GIT_CHECKOUT" --depth 1 "$DEQP_RUNNER_GIT_URL" deqp-runner-git
pushd deqp-runner-git
cargo install --locked \
-j ${FDO_CI_CONCURRENT:-4} \
--root /usr/local --version 2.10.0 \
@@ -57,14 +83,14 @@ else
cargo uninstall --locked \
--root /usr/local \
cargo-ndk
popd
rm -rf deqp-runner-git
popd
fi
popd
rm -rf deqp-runner-git
popd
# remove unused test runners to shrink images for the Mesa CI build (not kernel,
# which chooses its own deqp branch)
if [ -z "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
if [ -z "${DEQP_RUNNER_GIT_TAG:-}${DEQP_RUNNER_GIT_REV:-}" ]; then
rm -f /usr/local/bin/igt-runner
fi

View File

@@ -8,7 +8,7 @@
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
set -ex -o pipefail
set -uex -o pipefail
# See `deqp_build_targets` below for which release is used to produce which
# binary. Unless this comment has bitrotten:
@@ -16,9 +16,9 @@ set -ex -o pipefail
# - the GL release produces `glcts`, and
# - the GLES release produces `deqp-gles*` and `deqp-egl`
DEQP_VK_VERSION=1.3.8.2
DEQP_GL_VERSION=4.6.4.1
DEQP_GLES_VERSION=3.2.10.1
DEQP_VK_VERSION=1.3.10.0
DEQP_GL_VERSION=4.6.5.0
DEQP_GLES_VERSION=3.2.11.0
# Patches to VulkanCTS may come from commits in their repo (listed in
# cts_commits_to_backport) or patch files stored in our repo (in the patch
@@ -28,14 +28,8 @@ DEQP_GLES_VERSION=3.2.10.1
# shellcheck disable=SC2034
vk_cts_commits_to_backport=(
# Fix more ASAN errors due to missing virtual destructors
dd40bcfef1b4035ea55480b6fd4d884447120768
# Remove "unused shader stages" tests
7dac86c6bbd15dec91d7d9a98cd6dd57c11092a7
# Emit point size from "many indirect draws" test
771e56d1c4d03e073ddb7f1200ad6d57e0a0c979
# Remove multi-line test results in DRM format modifier tests
8c95af68a2a85cbdc7e1d9267ab029f73e9427d2
)
# shellcheck disable=SC2034
@@ -112,20 +106,20 @@ 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 am -
GIT_COMMITTER_DATE=$(date -d@0) git am -
done
cts_patch_files="${deqp_api}_cts_patch_files[@]"
for patch in "${!cts_patch_files}"
do
echo "Apply patch to ${DEQP_API} CTS from $patch"
git am < $OLDPWD/.gitlab-ci/container/patches/$patch
GIT_COMMITTER_DATE=$(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 | sed 's/^/- /'
git log --reverse --oneline $DEQP_VERSION.. --format='- %s'
} > /deqp/version-$deqp_api
# --insecure is due to SSL cert failures hitting sourceforge for zlib and
@@ -144,7 +138,7 @@ if [ "${DEQP_API}" = 'GLES' ]; then
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=android \
-DCMAKE_BUILD_TYPE=Release \
$EXTRA_CMAKE_ARGS
${EXTRA_CMAKE_ARGS:-}
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-android
else
@@ -153,14 +147,14 @@ if [ "${DEQP_API}" = 'GLES' ]; then
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=x11_egl_glx \
-DCMAKE_BUILD_TYPE=Release \
$EXTRA_CMAKE_ARGS
${EXTRA_CMAKE_ARGS:-}
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-x11
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=wayland \
-DCMAKE_BUILD_TYPE=Release \
$EXTRA_CMAKE_ARGS
${EXTRA_CMAKE_ARGS:-}
mold --run ninja modules/egl/deqp-egl
mv /deqp/modules/egl/deqp-egl /deqp/modules/egl/deqp-egl-wayland
fi
@@ -169,7 +163,7 @@ fi
cmake -S /VK-GL-CTS -B . -G Ninja \
-DDEQP_TARGET=${DEQP_TARGET} \
-DCMAKE_BUILD_TYPE=Release \
$EXTRA_CMAKE_ARGS
${EXTRA_CMAKE_ARGS:-}
# Make sure `default` doesn't silently stop detecting one of the platforms we care about
if [ "${DEQP_TARGET}" = 'default' ]; then
@@ -212,22 +206,22 @@ if [ "${DEQP_TARGET}" != 'android' ]; then
if [ "${DEQP_API}" = 'GL' ]; then
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/gl/khronos_mustpass/4.6.1.x/*-main.txt \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass/main/*-main.txt \
/deqp/mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/gl/khronos_mustpass_single/4.6.1.x/*-single.txt \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gl/khronos_mustpass_single/main/*-single.txt \
/deqp/mustpass/
fi
if [ "${DEQP_API}" = 'GLES' ]; then
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/gles/aosp_mustpass/3.2.6.x/*.txt \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/aosp_mustpass/main/*.txt \
/deqp/mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/egl/aosp_mustpass/3.2.6.x/egl-main.txt \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/egl/aosp_mustpass/main/egl-main.txt \
/deqp/mustpass/
cp \
/VK-GL-CTS/external/openglcts/data/mustpass/gles/khronos_mustpass/3.2.6.x/*-main.txt \
/VK-GL-CTS/external/openglcts/data/gl_cts/data/mustpass/gles/khronos_mustpass/main/*-main.txt \
/deqp/mustpass/
fi
@@ -239,6 +233,10 @@ if [ "${DEQP_TARGET}" != 'android' ]; then
mv /deqp/executor.save /deqp/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*

View File

@@ -5,11 +5,11 @@
# .gitlab-ci/image-tags.yml tags:
# DEBIAN_BUILD_TAG
set -ex
set -uex
git clone https://github.com/microsoft/DirectX-Headers -b v1.613.1 --depth 1
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 setup build --backend=ninja --buildtype=release -Dbuild-test=false ${EXTRA_MESON_ARGS:-}
meson install -C build
popd
rm -rf DirectX-Headers

View File

@@ -1,16 +0,0 @@
#!/bin/bash
set -ex
PARALLEL_DEQP_RUNNER_VERSION=fe557794b5dadd8dbf0eae403296625e03bda18a
git clone https://gitlab.freedesktop.org/mesa/parallel-deqp-runner --single-branch -b master --no-checkout /parallel-deqp-runner
pushd /parallel-deqp-runner
git checkout "$PARALLEL_DEQP_RUNNER_VERSION"
meson . _build
ninja -C _build hang-detection
mkdir -p build/bin
install _build/hang-detection build/bin
strip build/bin/*
find . -not -path './build' -not -path './build/*' -delete
popd

View File

@@ -3,21 +3,26 @@
set -ex
KDL_REVISION="5056f71b100a68b72b285c6fc845a66a2ed25985"
KDL_REVISION="cbbe5fd54505fd03ee34f35bfd16794f0c30074f"
KDL_CHECKOUT_DIR="/tmp/ci-kdl.git"
mkdir ci-kdl.git
pushd ci-kdl.git
mkdir -p ${KDL_CHECKOUT_DIR}
pushd ${KDL_CHECKOUT_DIR}
git init
git remote add origin https://gitlab.freedesktop.org/gfx-ci/ci-kdl.git
git fetch --depth 1 origin ${KDL_REVISION}
git checkout FETCH_HEAD
popd
python3 -m venv ci-kdl.venv
source ci-kdl.venv/bin/activate
pushd ci-kdl.git
pip install -r requirements.txt
pip install .
popd
# Run venv in a subshell, so we don't accidentally leak the venv state into
# calling scripts
(
python3 -m venv /ci-kdl
source /ci-kdl/bin/activate &&
pushd ${KDL_CHECKOUT_DIR} &&
pip install -r requirements.txt &&
pip install . &&
popd
)
rm -rf ci-kdl.git
rm -rf ${KDL_CHECKOUT_DIR}

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -ex
set -uex
export LLVM_CONFIG="llvm-config-${LLVM_VERSION:?"llvm unset!"}"
LLVM_TAG="llvmorg-15.0.7"

View File

@@ -3,7 +3,7 @@
# from https://gitlab.freedesktop.org/gfx-ci/ci-deb-repo - see PKG_REPO_REV)
# shellcheck disable=SC2086 # we want word splitting
set -ex
set -uex
export LIBDRM_VERSION=libdrm-2.4.122
@@ -11,7 +11,7 @@ curl -L -O --retry 4 -f --retry-all-errors --retry-delay 60 \
https://dri.freedesktop.org/libdrm/"$LIBDRM_VERSION".tar.xz
tar -xvf "$LIBDRM_VERSION".tar.xz && rm "$LIBDRM_VERSION".tar.xz
cd "$LIBDRM_VERSION"
meson setup build -D vc4=disabled -D freedreno=disabled -D etnaviv=disabled $EXTRA_MESON_ARGS
meson setup build -D vc4=disabled -D freedreno=disabled -D etnaviv=disabled ${EXTRA_MESON_ARGS:-}
meson install -C build
cd ..
rm -rf "$LIBDRM_VERSION"

View File

@@ -16,8 +16,8 @@ git clone -b v"$MOLD_VERSION" --single-branch --depth 1 https://github.com/rui31
pushd mold
cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_TESTING=OFF -D MOLD_LTO=ON
cmake --build . --parallel
cmake --install .
cmake --build . --parallel "${FDO_CI_CONCURRENT:-4}"
cmake --install . --strip
popd
rm -rf mold

View File

@@ -1,6 +1,6 @@
#!/bin/bash
# shellcheck disable=SC2086 # we want word splitting
set -ex
set -uex
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
@@ -8,17 +8,18 @@ set -ex
# DEBIAN_TEST_VK_TAG
# KERNEL_ROOTFS_TAG
REV="582f5490a124c27c26d3a452fee03a8c85fa9a5c"
REV="c2b31333926a6171c3c02d182b756efad7770410"
git clone https://gitlab.freedesktop.org/mesa/piglit.git --single-branch --no-checkout /piglit
pushd /piglit
git checkout "$REV"
patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS $EXTRA_CMAKE_ARGS
ninja $PIGLIT_BUILD_TARGETS
find . -depth \( -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' \) -exec rm -rf {} \;
cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS ${EXTRA_CMAKE_ARGS:-}
ninja ${PIGLIT_BUILD_TARGETS:-}
find . -depth \( -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' \) \
! -name 'include_test.h' -exec rm -rf {} \;
rm -rf target_api
if [ "$PIGLIT_BUILD_TARGETS" = "piglit_replayer" ]; then
if [ "${PIGLIT_BUILD_TARGETS:-}" = "piglit_replayer" ]; then
find . -depth \
! -regex "^\.$" \
! -regex "^\.\/piglit.*" \

View File

@@ -15,7 +15,7 @@ ln -s /usr/local/bin "$HOME"/.cargo/bin
#
# Also, pick a specific snapshot from rustup so the compiler doesn't drift on
# us.
RUST_VERSION=1.73.0-2023-10-05
RUST_VERSION=1.76.0-2024-02-08
# 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

View File

@@ -8,13 +8,31 @@
# .gitlab-ci/image-tags.yml tags:
# KERNEL_ROOTFS_TAG
set -uex
SKQP_BRANCH=android-cts-12.1_r5
# hack for skqp see the clang
pushd /usr/bin/
ln -s ../lib/llvm-15/bin/clang clang
ln -s ../lib/llvm-15/bin/clang++ clang++
popd
SCRIPT_DIR="$(pwd)/.gitlab-ci/container"
SKQP_PATCH_DIR="${SCRIPT_DIR}/patches"
BASE_ARGS_GN_FILE="${SCRIPT_DIR}/build-skqp_base.gn"
case "$DEBIAN_ARCH" in
amd64)
SKQP_ARCH=x64
;;
armhf)
SKQP_ARCH=arm
;;
arm64)
SKQP_ARCH=arm64
;;
esac
SKIA_DIR=${SKIA_DIR:-$(mktemp -d)}
SKQP_OUT_DIR=${SKIA_DIR}/out/${SKQP_ARCH}
SKQP_INSTALL_DIR=${SKQP_INSTALL_DIR:-/skqp}
SKQP_ASSETS_DIR="${SKQP_INSTALL_DIR}/assets"
SKQP_BINARIES=(skqp list_gpu_unit_tests list_gms)
create_gn_args() {
# gn can be configured to cross-compile skia and its tools
@@ -38,19 +56,6 @@ download_skia_source() {
git clone --branch "${SKQP_BRANCH}" --depth 1 "${SKQP_REPO}" "${SKIA_DIR}"
}
set -ex
SCRIPT_DIR=$(realpath "$(dirname "$0")")
SKQP_PATCH_DIR="${SCRIPT_DIR}/patches"
BASE_ARGS_GN_FILE="${SCRIPT_DIR}/build-skqp_base.gn"
SKQP_ARCH=${SKQP_ARCH:-x64}
SKIA_DIR=${SKIA_DIR:-$(mktemp -d)}
SKQP_OUT_DIR=${SKIA_DIR}/out/${SKQP_ARCH}
SKQP_INSTALL_DIR=${SKQP_INSTALL_DIR:-/skqp}
SKQP_ASSETS_DIR="${SKQP_INSTALL_DIR}/assets"
SKQP_BINARIES=(skqp list_gpu_unit_tests list_gms)
download_skia_source
pushd "${SKIA_DIR}"
@@ -59,6 +64,12 @@ pushd "${SKIA_DIR}"
cat "${SKQP_PATCH_DIR}"/build-skqp_*.patch |
patch -p1
# 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++
popd
# Fetch some needed build tools needed to build skia/skqp.
# Basically, it clones repositories with commits SHAs from ${SKIA_DIR}/DEPS
# directory.

View File

@@ -4,7 +4,7 @@
# .gitlab-ci/image-tags.yml tags:
# KERNEL_ROOTFS_TAG
set -ex
set -uex
git config --global user.email "mesa@example.com"
git config --global user.name "Mesa CI"
@@ -19,7 +19,7 @@ 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
meson setup build -D tests=true -Dprefix=/va $EXTRA_MESON_ARGS
meson setup build -D tests=true -Dprefix=/va ${EXTRA_MESON_ARGS:-}
meson install -C build
popd
rm -rf /va-utils

View File

@@ -6,17 +6,16 @@
# KERNEL_ROOTFS_TAG
set -ex
VKD3D_PROTON_COMMIT="3d46c082906c77544385d10801e4c0184f0385d9"
VKD3D_PROTON_COMMIT="59d6d4b5ed23766e69fe252408a3401d2fd52ce8"
VKD3D_PROTON_DST_DIR="/vkd3d-proton-tests"
VKD3D_PROTON_SRC_DIR="/vkd3d-proton-src"
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-$VKD3D_PROTON_VERSION"
VKD3D_PROTON_BUILD_DIR="/vkd3d-proton-build"
function build_arch {
local arch="$1"
shift
meson "$@" \
meson setup \
-Denable_tests=true \
--buildtype release \
--prefix "$VKD3D_PROTON_DST_DIR" \
@@ -37,6 +36,11 @@ git submodule update --init --recursive
git submodule update --recursive
build_arch 64
build_arch 86
mkdir "$VKD3D_PROTON_DST_DIR/tests"
cp \
"tests/test-runner.sh" \
"tests/d3d12_tests.h" \
"$VKD3D_PROTON_DST_DIR/tests/"
popd
rm -rf "$VKD3D_PROTON_BUILD_DIR"

View File

@@ -5,14 +5,15 @@
# DEBIAN_TEST_GL_TAG
# KERNEL_ROOTFS_TAG
set -ex
set -uex
VALIDATION_TAG="v1.3.289"
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 debug
python3 scripts/update_deps.py --dir external --config release --generator Ninja
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 install
ninja -C build
cmake --install build --strip
popd
rm -rf Vulkan-ValidationLayers

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
set -ex
set -uex
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
@@ -13,12 +13,12 @@ set -ex
# KERNEL_ROOTFS_TAG
export LIBWAYLAND_VERSION="1.21.0"
export WAYLAND_PROTOCOLS_VERSION="1.34"
export WAYLAND_PROTOCOLS_VERSION="1.38"
git clone https://gitlab.freedesktop.org/wayland/wayland
cd wayland
git checkout "$LIBWAYLAND_VERSION"
meson setup -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build $EXTRA_MESON_ARGS
meson setup -Ddocumentation=false -Ddtd_validation=false -Dlibraries=true _build ${EXTRA_MESON_ARGS:-}
meson install -C _build
cd ..
rm -rf wayland
@@ -26,7 +26,7 @@ rm -rf wayland
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols
cd wayland-protocols
git checkout "$WAYLAND_PROTOCOLS_VERSION"
meson setup _build $EXTRA_MESON_ARGS
meson setup -Dtests=false _build ${EXTRA_MESON_ARGS:-}
meson install -C _build
cd ..
rm -rf wayland-protocols

View File

@@ -13,8 +13,8 @@ if test -x /usr/bin/ccache; then
export CCACHE_COMPILERCHECK=content
export CCACHE_COMPRESS=true
export CCACHE_DIR=/cache/$CI_PROJECT_NAME/ccache
export PATH=$CCACHE_PATH:$PATH
export CCACHE_DIR="/cache/$CI_PROJECT_NAME/ccache"
export PATH="$CCACHE_PATH:$PATH"
# CMake ignores $PATH, so we have to force CC/GCC to the ccache versions.
export CC="${CCACHE_PATH}/gcc"
@@ -27,9 +27,14 @@ fi
# 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"
find /usr/bin -name \*-ld -o -name ld | \
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
{

View File

@@ -1,3 +1,5 @@
#!/usr/bin/env bash
. .gitlab-ci/container/debian/test-gl.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,3 +1,5 @@
#!/usr/bin/env bash
. .gitlab-ci/container/debian/test-vk.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -6,8 +6,13 @@
# DEBIAN_BASE_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
apt-get install -y ca-certificates gnupg2 software-properties-common
@@ -114,15 +119,6 @@ apt-get install -y --no-install-recommends "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_pre_build.sh
############### Download prebuilt kernel
if [ "$DEBIAN_ARCH" = amd64 ]; then
export KERNEL_IMAGE_NAME=bzImage
mkdir -p /lava-files/
. .gitlab-ci/container/download-prebuilt-kernel.sh
fi
# Needed for ci-fairy, this revision is able to upload files to MinIO
# and doesn't depend on git
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
@@ -130,28 +126,59 @@ pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedeskt
# Needed for manipulation with traces yaml files.
pip3 install --break-system-packages yq
############### Download prebuilt kernel
if [ "$DEBIAN_ARCH" = amd64 ]; then
uncollapsed_section_switch kernel "Downloading kernel"
export KERNEL_IMAGE_NAME=bzImage
mkdir -p /lava-files/
. .gitlab-ci/container/download-prebuilt-kernel.sh
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
. .gitlab-ci/container/build-rust.sh
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
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"

View File

@@ -2,8 +2,13 @@
# shellcheck disable=SC2086 # we want word splitting
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
@@ -79,6 +84,8 @@ apt-get install -y --no-remove "${DEPS[@]}" "${EPHEMERAL[@]}" \
############### Build piglit
uncollapsed_section_switch piglit "Building Piglit"
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
-DPIGLIT_USE_GBM=ON
-DPIGLIT_USE_WAYLAND=ON
@@ -97,10 +104,14 @@ PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
############### Build dEQP GL
uncollapsed_section_switch piglit_gl "Building dEQP for GL"
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
@@ -111,14 +122,20 @@ DEQP_TARGET=surfaceless \
############### 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
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh

View File

@@ -4,8 +4,13 @@
# shellcheck disable=SC2086 # we want word splitting
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
uncollapsed_section_start debian_setup "Base Debian system setup"
export DEBIAN_FRONTEND=noninteractive
apt-get install -y libelogind0 # this interfere with systemd deps, install separately
@@ -71,31 +76,14 @@ apt-get update
apt-get install -y --no-remove --no-install-recommends \
"${DEPS[@]}" "${EPHEMERAL[@]}"
############### Install DXVK
. .gitlab-ci/container/setup-wine.sh "/dxvk-wine64"
. .gitlab-ci/container/install-wine-dxvk.sh
############### Install apitrace binaries for wine
. .gitlab-ci/container/install-wine-apitrace.sh
# Add the apitrace path to the registry
wine \
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment" \
/v Path \
/t REG_EXPAND_SZ \
/d "C:\windows\system32;C:\windows;C:\windows\system32\wbem;Z:\apitrace-msvc-win64\bin" \
/f
############### Building ...
. .gitlab-ci/container/container_pre_build.sh
############### Build parallel-deqp-runner's hang-detection tool
. .gitlab-ci/container/build-hang-detection.sh
############### Build piglit replayer
uncollapsed_section_switch piglit "Building Piglit for Vulkan (traces only)"
# We don't run any _piglit_ Vulkan tests in the containers.
PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
-DPIGLIT_USE_GBM=OFF
@@ -114,32 +102,44 @@ PIGLIT_OPTS="-DPIGLIT_USE_WAFFLE=ON
PIGLIT_BUILD_TARGETS="piglit_replayer" \
. .gitlab-ci/container/build-piglit.sh
############### Build Fossilize
. .gitlab-ci/container/build-fossilize.sh
############### Build dEQP VK
uncollapsed_section_switch deqp "Building Vulkan CTS (dEQP)"
DEQP_API=VK \
DEQP_TARGET=default \
. .gitlab-ci/container/build-deqp.sh
############### Build apitrace
uncollapsed_section_switch apitrace "Building 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
############### Uninstall the build software
uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh

View File

@@ -47,7 +47,6 @@ DEPS=(
libflatbuffers-dev
libgtk-3-dev
"libllvm${LLVM_VERSION}"
libomxil-bellagio-dev
libpciaccess-dev
libunwind-dev
libva-dev
@@ -63,6 +62,7 @@ DEPS=(
libxtensor-dev
libxxf86vm-dev
libwayland-egl-backend-dev
"llvm-${LLVM_VERSION}-dev"
make
ninja-build
openssh-server

View File

@@ -83,7 +83,7 @@ rm -rf $XORGMACROS_VERSION
. .gitlab-ci/container/build-bindgen.sh
python3 -m pip install --break-system-packages -r .gitlab-ci/lava/requirements.txt
python3 -m pip install --break-system-packages -r bin/ci/requirements.txt
############### Uninstall the build software

View File

@@ -0,0 +1,64 @@
#!/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_PYUTILS_TAG
set -e
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
apt-get install -y ca-certificates
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
# Ephemeral packages (installed for this script and removed again at
# the end)
EPHEMERAL=(
binutils
build-essential
cpp
dpkg-dev
g++
gcc
libc6-dev
perl
python3-dev
)
DEPS=(
apt-utils
curl
file
findutils
git
python3-pil
python3-pip
python3-ply
python3-setuptools
python3-venv
python3-yaml
shellcheck
xz-utils
yamllint
zstd
)
apt-get update
apt-get install -y --no-remove --no-install-recommends "${DEPS[@]}" "${EPHEMERAL[@]}" \
"${EXTRA_LOCAL_PACKAGES:-}"
# Needed for ci-fairy, this revision is able to upload files to S3
pip3 install --break-system-packages git+http://gitlab.freedesktop.org/freedesktop/ci-templates@ffe4d1b10aab7534489f0c4bbc4c5899df17d3f2
pip3 install --break-system-packages -r bin/ci/test/requirements.txt
############### Uninstall ephemeral packages
apt-get purge -y "${EPHEMERAL[@]}"
apt-get autoremove --purge -y
. .gitlab-ci/container/container_post_build.sh

View File

@@ -108,3 +108,5 @@ rm -rf "/${ndk:?}"
apt-get purge -y "${EPHEMERAL[@]}"
. .gitlab-ci/container/container_post_build.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,3 +1,5 @@
#!/usr/bin/env bash
. .gitlab-ci/container/debian/test-gl.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -1,3 +1,5 @@
#!/usr/bin/env bash
. .gitlab-ci/container/debian/test-vk.sh
. .gitlab-ci/container/strip-rootfs.sh

View File

@@ -2,7 +2,7 @@
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC2153
set -ex
set -uex
mkdir -p kernel
pushd kernel
@@ -11,12 +11,12 @@ if [[ ${DEBIAN_ARCH} = "arm64" ]]; then
KERNEL_IMAGE_NAME+=" cheza-kernel"
fi
for image in ${KERNEL_IMAGE_NAME}; do
for image in ${KERNEL_IMAGE_NAME:-}; do
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/lava-files/${image}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${image}"
done
for dtb in ${DEVICE_TREES}; do
for dtb in ${DEVICE_TREES:-}; do
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-o "/lava-files/${dtb}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${dtb}"
done

View File

@@ -48,8 +48,6 @@ DEPS=(
"pkgconfig(libclc)"
"pkgconfig(libelf)"
"pkgconfig(libglvnd)"
"pkgconfig(libomxil-bellagio)"
"pkgconfig(libselinux)"
"pkgconfig(libva)"
"pkgconfig(pciaccess)"
"pkgconfig(vdpau)"

View File

@@ -0,0 +1,53 @@
#!/usr/bin/env bash
# shellcheck disable=SC2046 # we want to arg-split FIRMWARE_FILES
# shellcheck disable=SC2086 # as above
# shellcheck disable=SC2116 # as above
set -e
ROOTFS=$1
FIRMWARE_FILES=$2
if [ -n "${FIRMWARE_FILES:-}" ]; then
FIRMWARE=$(jq -s '.' $(echo "$FIRMWARE_FILES"))
else
FIRMWARE=""
fi
if ! echo "$FIRMWARE" | jq empty; then
echo "FIRMWARE contains invalid JSON."
fi
for item in $(echo "$FIRMWARE" | jq -c '.[]'); do
src=$(echo "$item" | jq -r '.src')
git_hash=$(echo "$item" | jq -r '.git_hash')
dst=$(echo "$item" | jq -r '.dst')
if [ "$src" = "null" ] || [ "$dst" = "null" ]; then
echo "Missing src or dst for $item."
continue
fi
# Remove any trailing slashes from src and dst
src=${src%/}
dst=${dst%/}
# Remove any leading slash
dst=${dst#/}
if [ "$(echo "$item" | jq '.files | length')" -eq 0 ]; then
echo "No files specified for $item."
continue
fi
for file in $(echo "$item" | jq -r '.files[]'); do
FIRMWARE_SRC_PATH="${src}/${file}"
if [ "$git_hash" != "null" ]; then
FIRMWARE_SRC_PATH="${FIRMWARE_SRC_PATH}?h=${git_hash}"
fi
FIRMWARE_DST_DIR="${ROOTFS}/${dst}"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 --create-dirs --output-dir "${FIRMWARE_DST_DIR}" -o "${file}" "${FIRMWARE_SRC_PATH}"
done
done

View File

@@ -72,10 +72,6 @@ debian/x86_64_build-base:
- .debian-container
variables:
MESA_IMAGE_TAG: &debian-x86_64_build-base "${DEBIAN_BASE_TAG}--${PKG_REPO_REV}"
rules:
# python-test requires debian/x86_64_build, which requires this job
- !reference [python-test, rules]
- !reference [.container, rules]
.use-debian/x86_64_build-base:
extends:
@@ -95,10 +91,6 @@ debian/x86_64_build:
- .use-debian/x86_64_build-base
variables:
MESA_IMAGE_TAG: &debian-x86_64_build ${DEBIAN_BUILD_TAG}
rules:
# python-test requires this job
- !reference [python-test, rules]
- !reference [.use-debian/x86_64_build-base, rules]
.use-debian/x86_64_build:
extends:
@@ -269,6 +261,28 @@ debian/x86_64_test-vk:
needs:
- debian/x86_64_test-android
# Debian-based x86_64 image to run Python utilities
debian/x86_64_pyutils:
extends:
- .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:
- .fdo.container-build@debian
- .debian-container-version
- .set-image
variables:
MESA_IMAGE_PATH: ${DEBIAN_PYUTILS_IMAGE}
MESA_IMAGE_TAG: *debian-x86_64_pyutils
needs:
- debian/x86_64_pyutils
# Debian based aarch64 test image for GL
debian/arm64_test-gl:
tags:
@@ -346,6 +360,7 @@ alpine/x86_64_build:
- .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`
@@ -361,6 +376,7 @@ alpine/x86_64_build:
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
@@ -389,6 +405,22 @@ 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/*
.firmware_x86_64:
variables:
FIRMWARE_FILES: |
.gitlab-ci/firmware/i915/mtl-fw.json
.firmware_arm64:
variables:
FIRMWARE_FILES: |
.gitlab-ci/firmware/arm/mali/arch10.8/mali-fw.json
.firmware_arm32:
variables:
FIRMWARE_FILES: |
.kernel+rootfs:
extends:
@@ -407,6 +439,7 @@ kernel+rootfs_x86_64:
extends:
- .use-debian/x86_64_build-base
- .kernel+rootfs
- .firmware_x86_64
image: "$FDO_BASE_IMAGE"
variables:
DEBIAN_ARCH: "amd64"
@@ -416,6 +449,7 @@ kernel+rootfs_arm64:
extends:
- .use-debian/arm64_build
- .kernel+rootfs
- .firmware_arm64
tags:
- aarch64
variables:
@@ -424,6 +458,7 @@ kernel+rootfs_arm64:
kernel+rootfs_arm32:
extends:
- kernel+rootfs_arm64
- .firmware_arm32
variables:
DEBIAN_ARCH: "armhf"
@@ -520,6 +555,7 @@ debian/baremetal_arm64_test:
- .windows-docker-msvc
- .windows-shell-tags
rules:
- !reference [.common-rules, rules]
- !reference [.microsoft-farm-container-rules, rules]
- !reference [.container+build-rules, rules]
variables:
@@ -545,6 +581,7 @@ windows_build_msvc:
extends:
- .windows_container_build
rules:
- !reference [.common-rules, rules]
- !reference [.microsoft-farm-rules, rules]
- !reference [.container+build-rules, rules]
variables:
@@ -563,6 +600,7 @@ windows_test_msvc:
extends:
- .windows_container_build
rules:
- !reference [.common-rules, rules]
- !reference [.microsoft-farm-rules, rules]
- !reference [.container+build-rules, rules]
variables:

View File

@@ -1,5 +1,7 @@
#!/bin/bash
set -ue
APITRACE_VERSION="11.1"
APITRACE_VERSION_DATE=""

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -e
set -ue
overrideDll() {
if ! wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v "$1" /d native /f; then

View File

@@ -2,15 +2,20 @@
# 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
# shellcheck disable=SC2016 # non-expanded variables are intentional
# When changing this file, you need to bump the following
# .gitlab-ci/image-tags.yml tags:
# KERNEL_ROOTFS_TAG
set -e
. .gitlab-ci/setup-test-env.sh
set -o xtrace
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION="${LLVM_VERSION:=15}"
export FIRMWARE_FILES="${FIRMWARE_FILES}"
check_minio()
{
@@ -35,7 +40,6 @@ if [[ "$DEBIAN_ARCH" = "arm64" ]]; then
BUILD_VK="ON"
GCC_ARCH="aarch64-linux-gnu"
KERNEL_ARCH="arm64"
SKQP_ARCH="arm64"
DEFCONFIG="arch/arm64/configs/defconfig"
DEVICE_TREES="rk3399-gru-kevin.dtb"
DEVICE_TREES+=" meson-g12b-a311d-khadas-vim3.dtb"
@@ -58,7 +62,6 @@ elif [[ "$DEBIAN_ARCH" = "armhf" ]]; then
BUILD_VK="OFF"
GCC_ARCH="arm-linux-gnueabihf"
KERNEL_ARCH="arm"
SKQP_ARCH="arm"
DEFCONFIG="arch/arm/configs/multi_v7_defconfig"
DEVICE_TREES="rk3288-veyron-jaq.dtb"
DEVICE_TREES+=" sun8i-h3-libretech-all-h3-cc.dtb"
@@ -84,7 +87,6 @@ else
BUILD_VK="ON"
GCC_ARCH="x86_64-linux-gnu"
KERNEL_ARCH="x86_64"
SKQP_ARCH="x64"
DEFCONFIG="arch/x86/configs/x86_64_defconfig"
DEVICE_TREES=""
KERNEL_IMAGE_NAME="bzImage"
@@ -112,6 +114,7 @@ fi
# no need to remove these at end, image isn't saved at the end
CONTAINER_EPHEMERAL=(
arch-test
automake
bc
"clang-${LLVM_VERSION}"
@@ -120,6 +123,7 @@ CONTAINER_EPHEMERAL=(
mmdebstrap
git
glslang-tools
jq
libdrm-dev
libegl1-mesa-dev
libxext-dev
@@ -168,7 +172,7 @@ apt-get install -y --no-remove \
"${CONTAINER_ARCH_PACKAGES[@]}" \
${EXTRA_LOCAL_PACKAGES}
ROOTFS=/lava-files/rootfs-${DEBIAN_ARCH}
export ROOTFS=/lava-files/rootfs-${DEBIAN_ARCH}
mkdir -p "$ROOTFS"
# rootfs packages
@@ -236,6 +240,7 @@ mmdebstrap \
--variant=apt \
--arch="${DEBIAN_ARCH}" \
--components main,contrib,non-free-firmware \
--customize-hook='.gitlab-ci/container/get-firmware-from-source.sh "$ROOTFS" "$FIRMWARE_FILES"' \
--include "${PKG_BASE[*]} ${PKG_CI[*]} ${PKG_DEP[*]} ${PKG_MESA_DEP[*]} ${PKG_ARCH[*]}" \
bookworm \
"$ROOTFS/" \
@@ -245,21 +250,6 @@ mmdebstrap \
############### Install mold
. .gitlab-ci/container/build-mold.sh
############### Setuping
if [ "$DEBIAN_ARCH" = "amd64" ]; then
. .gitlab-ci/container/setup-wine.sh "/dxvk-wine64"
. .gitlab-ci/container/install-wine-dxvk.sh
mv /dxvk-wine64 $ROOTFS
fi
############### Installing
if [ "$DEBIAN_ARCH" = "amd64" ]; then
. .gitlab-ci/container/install-wine-apitrace.sh
mkdir -p "$ROOTFS/apitrace-msvc-win64"
mv /apitrace-msvc-win64/bin "$ROOTFS/apitrace-msvc-win64"
rm -rf /apitrace-msvc-win64
fi
############### Building
STRIP_CMD="${GCC_ARCH}-strip"
mkdir -p $ROOTFS/usr/lib/$GCC_ARCH
@@ -292,7 +282,7 @@ rm -rf /apitrace
############### Build ANGLE
if [[ "$DEBIAN_ARCH" = "amd64" ]]; then
. .gitlab-ci/container/build-angle.sh
mv /angle /lava-files/rootfs-${DEBIAN_ARCH}/.
mv /angle $ROOTFS/.
rm -rf /angle
fi
@@ -361,7 +351,7 @@ fi
############### Build ci-kdl
section_start kdl "Prepare a venv for kdl"
. .gitlab-ci/container/build-kdl.sh
mv ci-kdl.venv $ROOTFS
mv /ci-kdl $ROOTFS/
section_end kdl
############### Build local stuff for use by igt and kernel testing, which

View File

@@ -0,0 +1,144 @@
From 2f4a38ecfde470abcd5d3c0ae7337bf780343469 Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Tue, 15 Oct 2024 16:02:26 +0100
Subject: [PATCH] deps: Make more sources conditional
Fetching all the dependent sources - including at least one copy of LLVM
- can take a surprising amount of time. Mesa needs to build ANGLE as
part of CI, and the cost of downloading all the sources all of the time
is not OK for the number of dependencies we don't need during the build.
---
DEPS | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
Submitted upstream at:
https://chromium-review.googlesource.com/c/angle/angle/+/5937820
diff --git a/DEPS b/DEPS
index 61263fb7af..0cff8c3126 100644
--- a/DEPS
+++ b/DEPS
@@ -17,6 +17,17 @@ gclient_gn_args = [
]
vars = {
+ 'angle_enable_cl': True,
+ 'angle_enable_cl_testing': False,
+ 'angle_enable_vulkan': True,
+ 'angle_enable_vulkan_validation_layers': True,
+ 'angle_enable_wgpu': True,
+ 'build_angle_deqp_tests': True,
+ 'build_angle_perftests': True,
+ 'build_with_swiftshader': True,
+ 'use_custom_libcxx': True,
+ 'export_libcxxapi_from_executables': True,
+
'android_git': 'https://android.googlesource.com',
'chromium_git': 'https://chromium.googlesource.com',
'chrome_internal_git': 'https://chrome-internal.googlesource.com',
@@ -673,7 +684,7 @@ deps = {
'third_party/catapult': {
'url': Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
- 'condition': 'not build_with_chromium',
+ 'condition': 'build_with_catapult and not build_with_chromium',
},
# Cherry is a dEQP/VK-GL-CTS management GUI written in Go. We use it for viewing test results.
@@ -689,7 +700,7 @@ deps = {
'third_party/clspv/src': {
'url': Var('chromium_git') + '/external/github.com/google/clspv@a173c052455434a422bcfe5c12ffe44d574fd6e1',
- 'condition': 'not build_with_chromium',
+ 'condition': 'angle_enable_cl and angle_enable_vulkan and not build_with_chromium',
},
'third_party/cpu_features/src': {
@@ -700,7 +711,7 @@ deps = {
'third_party/dawn': {
'url': Var('dawn_git') + '/dawn.git' + '@' + Var('dawn_revision'),
- 'condition': 'not build_with_chromium'
+ 'condition': 'angle_enable_wgpu and not build_with_chromium'
},
'third_party/depot_tools': {
@@ -745,6 +756,7 @@ deps = {
# glmark2 is a GPL3-licensed OpenGL ES 2.0 benchmark. We use it for testing.
'third_party/glmark2/src': {
'url': Var('chromium_git') + '/external/github.com/glmark2/glmark2@ca8de51fedb70bace5351c6b002eb952c747e889',
+ 'condition': 'build_angle_perftests',
},
'third_party/googletest': {
@@ -777,7 +789,7 @@ deps = {
# libjpeg_turbo is used by glmark2.
'third_party/libjpeg_turbo': {
'url': Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git@927aabfcd26897abb9776ecf2a6c38ea5bb52ab6',
- 'condition': 'not build_with_chromium',
+ 'condition': 'build_angle_perftests and not build_with_chromium',
},
'third_party/libpng/src': {
@@ -787,7 +799,7 @@ deps = {
'third_party/llvm/src': {
'url': Var('chromium_git') + '/external/github.com/llvm/llvm-project@d222fa4521531cc4ac14b8e157d231c108c003be',
- 'condition': 'not build_with_chromium',
+ 'condition': '(build_with_swiftshader or (angle_enable_cl and angle_enable_vulkan)) and not build_with_chromium',
},
'third_party/jdk': {
@@ -824,12 +836,12 @@ deps = {
'third_party/libc++/src': {
'url': Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git@6a68fd412b9aecd515a20a7cf84d11b598bfaf96',
- 'condition': 'not build_with_chromium',
+ 'condition': 'use_custom_libcxx and not build_with_chromium',
},
'third_party/libc++abi/src': {
'url': Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git@9a1d90c3b412d5ebeb97a6e33d98e1d0dd923221',
- 'condition': 'not build_with_chromium',
+ 'condition': 'export_libcxxapi_from_executables and not build_with_chromium',
},
'third_party/libunwind/src': {
@@ -872,7 +884,7 @@ deps = {
'third_party/OpenCL-CTS/src': {
'url': Var('chromium_git') + '/external/github.com/KhronosGroup/OpenCL-CTS@e0a31a03fc8f816d59fd8b3051ac6a61d3fa50c6',
- 'condition': 'not build_with_chromium',
+ 'condition': 'angle_enable_cl_testing and not build_with_chromium',
},
'third_party/OpenCL-Docs/src': {
@@ -968,7 +980,7 @@ deps = {
'third_party/SwiftShader': {
'url': Var('swiftshader_git') + '/SwiftShader@7a9a492a38b7c701f7c96a15a76046aed8f8c0c3',
- 'condition': 'not build_with_chromium',
+ 'condition': 'build_with_swiftshader and not build_with_chromium',
},
'third_party/turbine/cipd': {
@@ -984,6 +996,7 @@ deps = {
'third_party/VK-GL-CTS/src': {
'url': Var('chromium_git') + '/external/github.com/KhronosGroup/VK-GL-CTS' + '@' + Var('vk_gl_cts_revision'),
+ 'condition': 'build_angle_deqp_tests',
},
'third_party/vulkan-deps': {
@@ -1038,7 +1051,7 @@ deps = {
'third_party/vulkan-validation-layers/src': {
'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@b63e9bd51fbd7bf8fea161a4f7c06994abc24b75',
- 'condition': 'not build_with_chromium',
+ 'condition': 'angle_enable_vulkan_validation_layers and not build_with_chromium',
},
'third_party/vulkan_memory_allocator': {
--
2.46.2

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -u
export WINEPREFIX="$1"
export WINEDEBUG="-all"

View File

@@ -26,7 +26,7 @@ apt-get autoremove --yes || true
UNNEEDED_PACKAGES=(
apt libapt-pkg6.0
ncurses-bin ncurses-base libncursesw6 libncurses6
perl-base
perl-base libperl5.36 perl-modules-5.36
debconf libdebconfclient0
e2fsprogs e2fslibs libfdisk1
insserv
@@ -40,14 +40,8 @@ UNNEEDED_PACKAGES=(
hostname
adduser
debian-archive-keyring
libegl1-mesa-dev # mesa group
libegl-mesa0
libgl1-mesa-dev
libgl1-mesa-dri
libglapi-mesa
libgles2-mesa-dev
libglx-mesa0
mesa-common-dev
libgl1-mesa-dri mesa-vulkan-drivers mesa-va-drivers mesa-vdpau-drivers i965-va-driver
intel-media-va-driver
gnupg2
software-properties-common
)
@@ -91,6 +85,7 @@ directories=(
/var/lib/usbutils/usb.ids
/root/.pip # pip cache
/root/.cache
/root/.cargo
/etc/apt # configuration archives of apt and dpkg
/etc/dpkg
/var/* # drop non-ostree directories
@@ -114,6 +109,14 @@ directories=(
/usr/lib/*/libdb-5.3.so # libdb-5.3.so that is only used by this pam module ^
/usr/lib/*/libnss_hesiod* # remove NSS support for nis, nisplus and hesiod
/usr/lib/*/libnss_nis*
/usr/lib/*/wine # don't need Wine's implementation, using Proton instead
/usr/local/bin/mold
/usr/local/bin/bindgen
/usr/local/bin/cargo*
/usr/local/bin/clippy*
/usr/local/bin/rust*
/usr/local/bin/rls
/usr/lib/*/dri
)
for directory in "${directories[@]}"; do
@@ -131,3 +134,24 @@ files=(
for files in "${files[@]}"; do
find /usr /etc -name "$files" -prune -exec rm -r {} \;
done
# We purge apt and dpkg to save on space, which is great for runtime and
# bandwidth use etc, but less great for cbuild which wants to run apt-get clean
# when we're done. Install a stub which works for that and is apologetic for
# anyone else.
cat >/usr/bin/apt-get <<EOF
#!/bin/bash
if [ "\${1:-}" != "clean" ]; then
echo "Couldn't run '\$0 \$*', because apt has been cleaned from this container."
echo ""
echo "After .gitlab-ci/container/strip-rootfs.sh has run, you cannot install"
echo "new packages."
echo ""
echo "Sorry."
exit 1
fi
EOF
chmod +x /usr/bin/apt-get
ln -s /usr/bin/apt-get /usr/bin/apt

View File

@@ -1,6 +1,17 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
set -e
set -ue
# Instead of starting one dEQP instance per available CPU core, pour our
# concurrency at llvmpipe threads instead. This is mostly useful for VirGL and
# Venus, which serialise quite a bit at the host level. So instead of smashing
# it with a pile of concurrent jobs which don't actually parallelise very well,
# we use that concurrency for llvmpipe/lavapipe's render pipeline.
if [ -n "${PARALLELISE_VIA_LP_THREADS:-}" ]; then
export LP_NUM_THREADS="${FDO_CI_CONCURRENT:-4}"
export FDO_CI_CONCURRENT=1
fi
# If run outside of a deqp-runner invoction (e.g. piglit trace replay), then act
# the same as the first thread in its threadpool.
@@ -25,7 +36,7 @@ THREAD=${DEQP_RUNNER_THREAD:-0}
# context data towards the guest
#
set_vsock_context() {
[ -n "${CI_JOB_ID}" ] || {
[ -n "${CI_JOB_ID:-}" ] || {
echo "Missing or unset CI_JOB_ID env variable" >&2
exit 1
}
@@ -64,12 +75,13 @@ set_vsock_context || { echo "Could not generate crosvm vsock CID" >&2; exit 1; }
# Securely pass the current variables to the crosvm environment
echo "Variables passed through:"
SCRIPT_DIR=$(readlink -en "${0%/*}")
${SCRIPT_DIR}/common/generate-env.sh | tee ${VM_TEMP_DIR}/crosvm-env.sh
cp ${SCRIPT_DIR}/setup-test-env.sh ${VM_TEMP_DIR}/setup-test-env.sh
SCRIPTS_DIR=$(readlink -en "${0%/*}")
${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 ". ${VM_TEMP_DIR}/setup-test-env.sh" > ${VM_TEMP_DIR}/crosvm-script.sh
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
# Setup networking
@@ -85,20 +97,20 @@ unset DISPLAY
unset XDG_RUNTIME_DIR
CROSVM_KERN_ARGS="quiet console=null root=my_root rw rootfstype=virtiofs ip=192.168.30.2::192.168.30.1:255.255.255.0:crosvm:eth0"
CROSVM_KERN_ARGS="${CROSVM_KERN_ARGS} init=${SCRIPT_DIR}/crosvm-init.sh -- ${VSOCK_STDOUT} ${VSOCK_STDERR} ${VM_TEMP_DIR}"
CROSVM_KERN_ARGS="${CROSVM_KERN_ARGS} init=${SCRIPTS_DIR}/crosvm-init.sh -- ${VSOCK_STDOUT} ${VSOCK_STDERR} ${VM_TEMP_DIR}"
[ "${CROSVM_GALLIUM_DRIVER}" = "llvmpipe" ] && \
[ "${CROSVM_GALLIUM_DRIVER:-}" = "llvmpipe" ] && \
CROSVM_LIBGL_ALWAYS_SOFTWARE=true || CROSVM_LIBGL_ALWAYS_SOFTWARE=false
set +e -x
# We aren't testing the host driver here, so we don't need to validate NIR on the host
NIR_DEBUG="novalidate" \
LIBGL_ALWAYS_SOFTWARE=${CROSVM_LIBGL_ALWAYS_SOFTWARE} \
GALLIUM_DRIVER=${CROSVM_GALLIUM_DRIVER} \
VK_DRIVER_FILES=$CI_PROJECT_DIR/install/share/vulkan/icd.d/${CROSVM_VK_DRIVER}_icd.x86_64.json \
LIBGL_ALWAYS_SOFTWARE=${CROSVM_LIBGL_ALWAYS_SOFTWARE:-} \
GALLIUM_DRIVER=${CROSVM_GALLIUM_DRIVER:-} \
VK_DRIVER_FILES=$CI_PROJECT_DIR/install/share/vulkan/icd.d/${CROSVM_VK_DRIVER:-}_icd.x86_64.json \
crosvm --no-syslog run \
--gpu "${CROSVM_GPU_ARGS}" --gpu-render-server "path=${VIRGL_RENDER_SERVER:-/usr/local/libexec/virgl_render_server}" \
--gpu "${CROSVM_GPU_ARGS:-}" --gpu-render-server "path=${VIRGL_RENDER_SERVER:-/usr/local/libexec/virgl_render_server}" \
-m "${CROSVM_MEMORY:-4096}" -c "${CROSVM_CPU:-2}" --disable-sandbox \
--shared-dir /:my_root:type=fs:writeback=true:timeout=60:cache=always \
--net "host-ip=192.168.30.1,netmask=255.255.255.0,mac=AA:BB:CC:00:00:12" \

View File

@@ -1,12 +1,15 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
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/:${CI_PROJECT_DIR}/install/lib/dri:/cuttlefish/lib64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${CI_PROJECT_DIR}/install/lib/:/cuttlefish/lib64
export EGL_PLATFORM=surfaceless
syslogd
@@ -88,18 +91,18 @@ $ADB shell rm /vendor/lib64/egl/libGLESv2_angle.so
$ADB shell rm /vendor/lib64/egl/libGLESv2_emulation.so
RESULTS=/data/results
AOSP_RESULTS=/data/results
uncollapsed_section_switch cuttlefish_test "cuttlefish: testing"
set +e
$ADB shell "mkdir /data/results; cd /data; ./deqp-runner \
$ADB shell "mkdir ${AOSP_RESULTS}; cd ${AOSP_RESULTS}/..; ./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 \
--fraction-start $CI_NODE_INDEX \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $(( CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS"
@@ -108,11 +111,11 @@ EXIT_CODE=$?
set -e
section_switch cuttlefish_results "cuttlefish: gathering the results"
$ADB pull $RESULTS results
$ADB pull $RESULTS $RESULTS_DIR
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/logcat results
cp /cuttlefish/cuttlefish/instances/cvd-1/kernel.log results
cp /cuttlefish/cuttlefish/instances/cvd-1/logs/launcher.log results
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
section_end cuttlefish_results
exit $EXIT_CODE

View File

@@ -1,5 +1,8 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
section_start test_setup "deqp: preparing test setup"
@@ -16,7 +19,7 @@ fi
INSTALL=$(realpath -s "$PWD"/install)
# Set up the driver environment.
export LD_LIBRARY_PATH="$INSTALL"/lib/:"$INSTALL"/lib/dri:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$INSTALL"/lib/:$LD_LIBRARY_PATH
export EGL_PLATFORM=surfaceless
ARCH=$(uname -m)
export VK_DRIVER_FILES="$PWD"/install/share/vulkan/icd.d/"$VK_DRIVER"_icd."$ARCH".json
@@ -26,9 +29,6 @@ if [ -n "$USE_ANGLE" ]; then
export LD_LIBRARY_PATH=/angle:$LD_LIBRARY_PATH
fi
RESULTS="$PWD/${DEQP_RESULTS_DIR:-results}"
mkdir -p "$RESULTS"
# Ensure Mesa Shader Cache resides on tmpfs.
SHADER_CACHE_HOME=${XDG_CACHE_HOME:-${HOME}/.cache}
SHADER_CACHE_DIR=${MESA_SHADER_CACHE_DIR:-${SHADER_CACHE_HOME}/mesa_shader_cache}
@@ -60,33 +60,38 @@ if [ -z "$DEQP_SUITE" ]; then
# Generate test case list file.
if [ "$DEQP_VER" = "vk" ]; then
MUSTPASS=/deqp/mustpass/vk-main.txt
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
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
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt.zst
DEQP=/deqp/external/openglcts/modules/glcts
else
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt
MUSTPASS=/deqp/mustpass/$DEQP_VER-main.txt.zst
DEQP=/deqp/external/openglcts/modules/glcts
fi
cp $MUSTPASS /tmp/case-list.txt
[ -z "${DEQP_FRACTION:-}" ] && DEQP_FRACTION=1
[ -z "${CI_NODE_INDEX:-}" ] && CI_NODE_INDEX=1
[ -z "${CI_NODE_TOTAL:-}" ] && CI_NODE_TOTAL=1
# If the caselist is too long to run in a reasonable amount of time, let the job
# specify what fraction (1/n) of the caselist we should run. Note: N~M is a gnu
# sed extension to match every nth line (first line is #1).
if [ -n "$DEQP_FRACTION" ]; then
sed -ni 1~$DEQP_FRACTION"p" /tmp/case-list.txt
fi
# If the job is parallel at the gitab job level, take the corresponding fraction
# of the caselist.
if [ -n "$CI_NODE_INDEX" ]; then
sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" /tmp/case-list.txt
fi
# 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"
@@ -118,6 +123,10 @@ if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$GPU_VERSION-skips.txt"
fi
if [ -e "$INSTALL/$GPU_VERSION-slow-skips.txt" ] && [[ $CI_JOB_NAME != *full* ]]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/$GPU_VERSION-slow-skips.txt"
fi
if [ "$PIGLIT_PLATFORM" != "gbm" ] ; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/x11-skips.txt"
fi
@@ -126,11 +135,19 @@ if [ "$PIGLIT_PLATFORM" = "gbm" ]; then
DEQP_SKIPS="$DEQP_SKIPS $INSTALL/gbm-skips.txt"
fi
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.
@@ -152,7 +169,7 @@ if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
fi
GALLIUM_DRIVER=llvmpipe \
virgl_test_server $VTEST_ARGS >$RESULTS/vtest-log.txt 2>&1 &
virgl_test_server $VTEST_ARGS >$RESULTS_DIR/vtest-log.txt 2>&1 &
sleep 1
fi
@@ -170,19 +187,22 @@ 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
if [ -r "$deqp_version_log" ]; then
cat "$deqp_version_log"
fi
done
set -x
set +e
deqp-runner -V
if [ -z "$DEQP_SUITE" ]; then
deqp-runner \
run \
--deqp $DEQP \
--output $RESULTS \
--output $RESULTS_DIR \
--caselist /tmp/case-list.txt \
--skips $INSTALL/all-skips.txt $DEQP_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
@@ -190,7 +210,7 @@ if [ -z "$DEQP_SUITE" ]; then
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS \
-- \
$DEQP_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
@@ -199,42 +219,41 @@ else
deqp-runner \
suite \
--suite $INSTALL/deqp-$DEQP_SUITE.toml \
--output $RESULTS \
--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 \
--fraction-start ${CI_NODE_INDEX:-1} \
--fraction $((CI_NODE_TOTAL * ${DEQP_FRACTION:-1})) \
--jobs ${FDO_CI_CONCURRENT:-4} \
$DEQP_RUNNER_OPTIONS
$DEQP_RUNNER_OPTIONS; DEQP_EXITCODE=$?
fi
DEQP_EXITCODE=$?
{ set +x; } 2>/dev/null
set -e
set +x
report_load
section_switch test_post_process "deqp: post-processing test results"
set -x
report_load
# Remove all but the first 50 individual XML files uploaded as artifacts, to
# save fd.o space when you break everything.
find $RESULTS -name \*.xml | \
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 -name \*.xml \
-exec cp /deqp/testlog.css /deqp/testlog.xsl "$RESULTS/" ";" \
find $RESULTS_DIR -name \*.xml \
-exec cp /deqp/testlog.css /deqp/testlog.xsl "$RESULTS_DIR/" ";" \
-quit
deqp-runner junit \
--testsuite dEQP \
--results $RESULTS/failures.csv \
--output $RESULTS/junit.xml \
--results $RESULTS_DIR/failures.csv \
--output $RESULTS_DIR/junit.xml \
--limit 50 \
--template "See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml"
@@ -243,7 +262,7 @@ if [ -n "$FLAKES_CHANNEL" ]; then
python3 $INSTALL/report-flakes.py \
--host irc.oftc.net \
--port 6667 \
--results $RESULTS/results.csv \
--results $RESULTS_DIR/results.csv \
--known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
--channel "$FLAKES_CHANNEL" \
--runner "$CI_RUNNER_DESCRIPTION" \
@@ -256,8 +275,9 @@ fi
# Compress results.csv to save on bandwidth during the upload of artifacts to
# GitLab. This reduces the size in a VKCTS run from 135 to 7.6MB, and takes
# 0.17s on a Ryzen 5950X (16 threads, 0.95s when limited to 1 thread).
zstd --rm -T0 -8q "$RESULTS/results.csv" -o "$RESULTS/results.csv.zst"
zstd --quiet --rm --threads ${FDO_CI_CONCURRENT:-0} -8 "$RESULTS_DIR/results.csv" -o "$RESULTS_DIR/results.csv.zst"
set +x
section_end test_post_process
exit $DEQP_EXITCODE

View File

@@ -217,25 +217,25 @@
- !reference [.austriancoder-farm-rules, rules]
.freedreno-farm-rules:
.google-freedreno-farm-rules:
rules:
- exists: [ .ci-farms-disabled/freedreno ]
- exists: [ .ci-farms-disabled/google-freedreno ]
when: never
- changes: [ .ci-farms-disabled/freedreno ]
- changes: [ .ci-farms-disabled/google-freedreno ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: on_success
- changes: [ .ci-farms-disabled/* ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
.freedreno-farm-manual-rules:
.google-freedreno-farm-manual-rules:
rules:
- exists: [ .ci-farms-disabled/freedreno ]
- exists: [ .ci-farms-disabled/google-freedreno ]
when: never
- changes: [ .ci-farms-disabled/freedreno ]
- changes: [ .ci-farms-disabled/google-freedreno ]
if: '$CI_PIPELINE_SOURCE != "schedule"'
when: never
- !reference [.freedreno-farm-rules, rules]
- !reference [.google-freedreno-farm-rules, rules]
.vmware-farm-rules:
rules:
@@ -323,8 +323,8 @@
exists: [ .ci-farms-disabled/austriancoder ]
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/freedreno ]
exists: [ .ci-farms-disabled/freedreno ]
changes: [ .ci-farms-disabled/google-freedreno ]
exists: [ .ci-farms-disabled/google-freedreno ]
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: [ .ci-farms-disabled/ondracka ]

View File

@@ -0,0 +1,8 @@
{
"src": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/arm/mali/arch10.8/",
"git_hash": "ad8d5f76c429e5485764a9ecb7a2ce3fbc1386ae",
"files": [
"mali_csffw.bin"
],
"dst": "/lib/firmware/arm/mali/arch10.8/"
}

View File

@@ -0,0 +1,12 @@
{
"src": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/",
"git_hash": "ad8d5f76c429e5485764a9ecb7a2ce3fbc1386ae",
"files": [
"mtl_dmc.bin",
"mtl_dmc_ver2_10.bin",
"mtl_gsc_1.bin",
"mtl_guc_70.bin",
"mtl_huc_gsc.bin"
],
"dst": "/lib/firmware/i915/"
}

View File

@@ -10,7 +10,7 @@ fi
INSTALL=$PWD/install
# Set up the driver environment.
export LD_LIBRARY_PATH="$INSTALL/lib/:$INSTALL/lib/dri"
export LD_LIBRARY_PATH="$INSTALL/lib/"
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
# To store Fossilize logs on failure.

View File

@@ -1,15 +1,15 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
set -ex
INSTALL=$PWD/install
# Set up the driver environment.
export LD_LIBRARY_PATH=$INSTALL/lib/:$INSTALL/lib/dri
RESULTS="$PWD/${GTEST_RESULTS_DIR:-results}"
mkdir -p "$RESULTS"
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.
@@ -39,7 +39,7 @@ set +e
gtest-runner \
run \
--gtest $GTEST \
--output ${RESULTS} \
--output ${RESULTS_DIR} \
--jobs ${FDO_CI_CONCURRENT:-4} \
$GTEST_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
@@ -52,8 +52,8 @@ GTEST_EXITCODE=$?
deqp-runner junit \
--testsuite gtest \
--results $RESULTS/failures.csv \
--output $RESULTS/junit.xml \
--results $RESULTS_DIR/failures.csv \
--output $RESULTS_DIR/junit.xml \
--limit 50 \
--template "See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml"
@@ -62,7 +62,7 @@ if [ -n "$FLAKES_CHANNEL" ]; then
python3 $INSTALL/report-flakes.py \
--host irc.oftc.net \
--port 6667 \
--results $RESULTS/results.csv \
--results $RESULTS_DIR/results.csv \
--known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
--channel "$FLAKES_CHANNEL" \
--runner "$CI_RUNNER_DESCRIPTION" \

View File

@@ -13,10 +13,10 @@
variables:
DEBIAN_X86_64_BUILD_BASE_IMAGE: "debian/x86_64_build-base"
DEBIAN_BASE_TAG: "20240717-pyyaml-3"
DEBIAN_BASE_TAG: "20241106-wlproto2"
DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
DEBIAN_BUILD_TAG: "20240717-pyyaml-3"
DEBIAN_BUILD_TAG: "20241106-wlproto2"
DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base"
DEBIAN_ARM64_TEST_BASE_IMAGE: "debian/arm64_test-base"
@@ -27,23 +27,26 @@ 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: "20240423-deqp"
DEBIAN_TEST_GL_TAG: "20240713-piglit-58"
DEBIAN_TEST_VK_TAG: "20240713-piglit-58"
KERNEL_ROOTFS_TAG: "20240713-piglit-58"
DEBIAN_TEST_ANDROID_TAG: "20241106-wlproto2"
DEBIAN_TEST_GL_TAG: "20241106-wlproto2"
DEBIAN_TEST_VK_TAG: "20241107-setup"
KERNEL_ROOTFS_TAG: "20241107-setup"
ALPINE_X86_64_BUILD_TAG: "20240717-pyyaml"
ALPINE_X86_64_LAVA_SSH_TAG: "20240401-wlproto"
FEDORA_X86_64_BUILD_TAG: "20240717-pyyaml"
DEBIAN_PYUTILS_IMAGE: "debian/x86_64_pyutils"
DEBIAN_PYUTILS_TAG: "20241002-pyutils"
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"
KERNEL_REPO: "gfx-ci/linux"
PKG_REPO_REV: "bca9635d"
WINDOWS_X64_MSVC_PATH: "windows/x86_64_msvc"
WINDOWS_X64_MSVC_TAG: "20240717-pyyaml-3"
WINDOWS_X64_MSVC_TAG: "20240827-v143"
WINDOWS_X64_BUILD_PATH: "windows/x86_64_build"
WINDOWS_X64_BUILD_TAG: "20240717-pyyaml-3"
WINDOWS_X64_BUILD_TAG: "20241107-setup"
WINDOWS_X64_TEST_PATH: "windows/x86_64_test"
WINDOWS_X64_TEST_TAG: "20240717-pyyaml-3"
WINDOWS_X64_TEST_TAG: "20241107-setup"

View File

@@ -8,8 +8,8 @@ variables:
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
FDO_CI_CONCURRENT: 6 # should be replaced by per-machine definitions
# proxy used to cache data locally
FDO_HTTP_CACHE_URI: "http://caching-proxy/cache/?uri="
# the dispatchers use this to cache data locally
LAVA_HTTP_CACHE_URI: "http://caching-proxy/cache/?uri="
# base system generated by the container build job, shared between many pipelines
BASE_SYSTEM_HOST_PREFIX: "${S3_HOST}/${S3_KERNEL_BUCKET}"
BASE_SYSTEM_MAINLINE_HOST_PATH: "${BASE_SYSTEM_HOST_PREFIX}/${FDO_UPSTREAM_REPO}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH}"
@@ -17,11 +17,15 @@ variables:
# per-job build artifacts
JOB_ROOTFS_OVERLAY_PATH: "${JOB_ARTIFACTS_BASE}/job-rootfs-overlay.tar.gz"
JOB_RESULTS_PATH: "${JOB_ARTIFACTS_BASE}/results.tar.zst"
S3_ARTIFACT_NAME: "mesa-${ARCH}-default-debugoptimized"
LAVA_S3_ARTIFACT_NAME: "mesa-${ARCH}-default-debugoptimized"
S3_ARTIFACT_NAME: "mesa-python-test"
S3_RESULTS_UPLOAD: "${JOB_ARTIFACTS_BASE}"
PIGLIT_NO_WINDOW: 1
VISIBILITY_GROUP: "Collabora+fdo"
before_script:
- !reference [.download_s3, before_script]
script:
- . artifacts/setup-test-env.sh
- ./artifacts/lava/lava-submit.sh
artifacts:
name: "${CI_PROJECT_NAME}_${CI_JOB_NAME}"
@@ -35,10 +39,15 @@ variables:
tags:
- $RUNNER_TAG
after_script:
- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s "https://${JOB_RESULTS_PATH}" | tar --zstd -x
- curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s "https://${JOB_RESULTS_PATH}" | tar --warning=no-timestamp --zstd -x
needs:
- alpine/x86_64_lava_ssh_client
- !reference [.required-for-hardware-jobs, needs]
- job: alpine/x86_64_lava_ssh_client
artifacts: false
- job: debian/x86_64_pyutils
artifacts: false
- job: python-test
artifacts: false
.lava-test:arm32:
variables:
@@ -49,14 +58,15 @@ variables:
BOOT_METHOD: u-boot
extends:
- .use-debian/arm64_build # for same $MESA_ARTIFACTS_TAG as in kernel+rootfs_arm32
- .use-debian/x86_64_build
- .use-debian/x86_64_pyutils
- .lava-test
- .use-kernel+rootfs-arm
needs:
- !reference [.lava-test, needs]
- kernel+rootfs_arm32
- debian/x86_64_build
- debian-arm32
- job: kernel+rootfs_arm32
artifacts: false
- job: debian-arm32
artifacts: false
.lava-test-deqp:arm32:
extends:
@@ -73,16 +83,15 @@ variables:
BOOT_METHOD: u-boot
extends:
- .use-debian/arm64_build # for same $MESA_ARTIFACTS_TAG as in kernel+rootfs_arm64
- .use-debian/x86_64_build
- .use-debian/x86_64_pyutils
- .lava-test
- .use-kernel+rootfs-arm
dependencies:
- debian-arm64
needs:
- !reference [.lava-test, needs]
- kernel+rootfs_arm64
- debian/x86_64_build
- debian-arm64
- job: kernel+rootfs_arm64
artifacts: false
- job: debian-arm64
artifacts: false
.lava-test-deqp:arm64:
variables:
@@ -99,13 +108,15 @@ variables:
BOOT_METHOD: u-boot
extends:
- .use-debian/x86_64_build-base # for same $MESA_ARTIFACTS_BASE_TAG as in kernel+rootfs_x86_64
- .use-debian/x86_64_build
- .use-debian/x86_64_pyutils
- .lava-test
- .use-kernel+rootfs-x86_64
needs:
- !reference [.lava-test, needs]
- kernel+rootfs_x86_64
- debian-testing
- job: kernel+rootfs_x86_64
artifacts: false
- job: debian-testing
artifacts: false
.lava-test-deqp:x86_64:
variables:

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
# © Collabora Limited
# Author: Guilherme Gallo <guilherme.gallo@collabora.com>
# This script runs unit/integration tests related with LAVA CI tools
# shellcheck disable=SC1091 # The relative paths in this file only become valid at runtime.
set -ex
# Use this script in a python virtualenv for isolation
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install --break-system-packages -r "${CI_PROJECT_DIR}/.gitlab-ci/lava/requirements-test.txt"
TEST_DIR=${CI_PROJECT_DIR}/.gitlab-ci/tests
PYTHONPATH="${TEST_DIR}:${PYTHONPATH}" python3 -m \
pytest "${TEST_DIR}" \
-W ignore::DeprecationWarning \
--junitxml=artifacts/ci_scripts_report.xml \
-m 'not slow'

View File

@@ -1,64 +1,104 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
# If we run in the fork (not from mesa or Marge-bot), reuse mainline kernel and rootfs, if exist.
_check_artifact_path() {
_url="https://${1}/${2}"
if curl -s -o /dev/null -I -L -f --retry 4 --retry-delay 15 "${_url}"; then
echo -n "${_url}"
fi
}
get_path_to_artifact() {
_mainline_artifact="$(_check_artifact_path ${BASE_SYSTEM_MAINLINE_HOST_PATH} ${1})"
if [ -n "${_mainline_artifact}" ]; then
echo -n "${_mainline_artifact}"
return
fi
_fork_artifact="$(_check_artifact_path ${BASE_SYSTEM_FORK_HOST_PATH} ${1})"
if [ -n "${_fork_artifact}" ]; then
echo -n "${_fork_artifact}"
return
fi
set +x
error "Sorry, I couldn't find a viable built path for ${1} in either mainline or a fork." >&2
echo "" >&2
echo "If you're working on CI, this probably means that you're missing a dependency:" >&2
echo "this job ran ahead of the job which was supposed to upload that artifact." >&2
echo "" >&2
echo "If you aren't working on CI, please ping @mesa/ci-helpers to see if we can help." >&2
echo "" >&2
echo "This job is going to fail, because I can't find the resources I need. Sorry." >&2
set -x
exit 1
}
. "${SCRIPTS_DIR}/setup-test-env.sh"
section_start prepare_rootfs "Preparing root filesystem"
set -ex
# If we run in the fork (not from mesa or Marge-bot), reuse mainline kernel and rootfs, if exist.
BASE_SYSTEM_HOST_PATH="${BASE_SYSTEM_MAINLINE_HOST_PATH}"
if [ "$CI_PROJECT_PATH" != "$FDO_UPSTREAM_REPO" ]; then
if ! curl -s -X HEAD -L --retry 4 -f --retry-delay 60 \
"https://${BASE_SYSTEM_MAINLINE_HOST_PATH}/done"; then
echo "Using kernel and rootfs from the fork, cached from mainline is unavailable."
BASE_SYSTEM_HOST_PATH="${BASE_SYSTEM_FORK_HOST_PATH}"
else
echo "Using the cached mainline kernel and rootfs."
fi
fi
section_switch rootfs "Assembling root filesystem"
ROOTFS_URL="$(get_path_to_artifact lava-rootfs.tar.zst)"
[ $? != 1 ] || exit 1
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/
# Prepare env vars for upload.
section_start variables "Variables passed through:"
artifacts/ci-common/generate-env.sh | tee results/job-rootfs-overlay/set-job-env-vars.sh
section_end variables
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}"
ARTIFACT_URL="${FDO_HTTP_CACHE_URI:-}https://${PIPELINE_ARTIFACTS_BASE}/${S3_ARTIFACT_NAME:?}.tar.zst"
# Prepare env vars for upload.
section_switch variables "Environment variables passed through to device:"
cat results/job-rootfs-overlay/set-job-env-vars.sh
section_switch lava_submit "Submitting job for scheduling"
touch results/lava.log
tail -f results/lava.log &
PYTHONPATH=artifacts/ artifacts/lava/lava_job_submitter.py \
submit \
--farm "${FARM}" \
--device-type "${DEVICE_TYPE}" \
--boot-method "${BOOT_METHOD}" \
--job-timeout-min ${JOB_TIMEOUT:-30} \
--dump-yaml \
--pipeline-info "$CI_JOB_NAME: $CI_PIPELINE_URL on $CI_COMMIT_REF_NAME ${CI_NODE_INDEX}/${CI_NODE_TOTAL}" \
--rootfs-url-prefix "https://${BASE_SYSTEM_HOST_PATH}" \
--rootfs-url "${ROOTFS_URL}" \
--kernel-url-prefix "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}" \
--kernel-external "${FORCE_KERNEL_TAG}" \
--build-url "${ARTIFACT_URL}" \
--job-rootfs-overlay-url "${FDO_HTTP_CACHE_URI:-}https://${JOB_ROOTFS_OVERLAY_PATH}" \
--job-timeout-min ${JOB_TIMEOUT:-30} \
--kernel-external "${EXTERNAL_KERNEL_TAG}" \
--first-stage-init artifacts/ci-common/init-stage1.sh \
--ci-project-dir "${CI_PROJECT_DIR}" \
--device-type "${DEVICE_TYPE}" \
--farm "${FARM}" \
--dtb-filename "${DTB}" \
--jwt-file "${S3_JWT_FILE}" \
--kernel-image-name "${KERNEL_IMAGE_NAME}" \
--kernel-image-type "${KERNEL_IMAGE_TYPE}" \
--boot-method "${BOOT_METHOD}" \
--visibility-group "${VISIBILITY_GROUP}" \
--lava-tags "${LAVA_TAGS}" \
--mesa-job-name "$CI_JOB_NAME" \
--structured-log-file "results/lava_job_detail.json" \
--ssh-client-image "${LAVA_SSH_CLIENT_IMAGE}" \
--project-name "${CI_PROJECT_NAME}" \
--starting-section "${CURRENT_SECTION}" \
--job-submitted-at "${CI_JOB_STARTED_AT}" \
- append-overlay \
--name=mesa-build \
--url="https://${PIPELINE_ARTIFACTS_BASE}/${LAVA_S3_ARTIFACT_NAME:?}.tar.zst" \
--compression=zstd \
--path="${CI_PROJECT_DIR}" \
--format=tar \
- append-overlay \
--name=job-overlay \
--url="https://${JOB_ROOTFS_OVERLAY_PATH}" \
--compression=gz \
--path="/" \
--format=tar \
- submit \
>> results/lava.log

View File

@@ -15,10 +15,10 @@ import pathlib
import sys
import time
from collections import defaultdict
from dataclasses import dataclass, fields
from datetime import datetime, timedelta, timezone
from os import environ, getenv, path
from typing import Any, Optional
from dataclasses import dataclass, field, fields
from datetime import datetime, timedelta, UTC
from os import environ, getenv
from typing import Any, Optional, Self
import fire
from lavacli.utils import flow_yaml as lava_yaml
@@ -51,7 +51,7 @@ from lava.utils import DEFAULT_GITLAB_SECTION_TIMEOUTS as GL_SECTION_TIMEOUTS
STRUCTURAL_LOG = defaultdict(list)
try:
from ci.structured_logger import StructuredLogger
from structured_logger import StructuredLogger
except ImportError as e:
print_log(
f"Could not import StructuredLogger library: {e}. "
@@ -91,7 +91,7 @@ CI_JOB_STARTED_AT_RAW = getenv("CI_JOB_STARTED_AT", "")
CI_JOB_STARTED_AT: datetime = (
datetime.fromisoformat(CI_JOB_STARTED_AT_RAW)
if CI_JOB_STARTED_AT_RAW
else datetime.now(timezone.utc)
else datetime.now(tz=UTC)
)
@@ -136,36 +136,6 @@ def raise_lava_error(job) -> None:
job.status = "fail"
def show_final_job_data(job, colour=f"{CONSOLE_LOG['BOLD']}{CONSOLE_LOG['FG_GREEN']}"):
with GitlabSection(
"job_data",
"LAVA job info",
type=LogSectionType.LAVA_POST_PROCESSING,
start_collapsed=True,
colour=colour,
):
wait_post_processing_retries: int = WAIT_FOR_LAVA_POST_PROCESSING_RETRIES
while not job.is_post_processed() and wait_post_processing_retries > 0:
# Wait a little until LAVA finishes processing metadata
time.sleep(WAIT_FOR_LAVA_POST_PROCESSING_SEC)
wait_post_processing_retries -= 1
if not job.is_post_processed():
waited_for_sec: int = (
WAIT_FOR_LAVA_POST_PROCESSING_RETRIES
* WAIT_FOR_LAVA_POST_PROCESSING_SEC
)
print_log(
f"Waited for {waited_for_sec} seconds "
"for LAVA to post-process the job, it haven't finished yet. "
"Dumping it's info anyway"
)
details: dict[str, str] = job.show()
for field, value in details.items():
print(f"{field:<15}: {value}")
job.refresh_log()
def fetch_logs(job, max_idle_time, log_follower) -> None:
is_job_hanging(job, max_idle_time)
@@ -181,14 +151,13 @@ def fetch_logs(job, max_idle_time, log_follower) -> None:
def is_job_hanging(job, max_idle_time):
# Poll to check for new logs, assuming that a prolonged period of
# silence means that the device has died and we should try it again
if datetime.now() - job.last_log_time > max_idle_time:
if datetime.now(tz=UTC) - job.last_log_time > max_idle_time:
max_idle_time_min = max_idle_time.total_seconds() / 60
raise MesaCITimeoutError(
f"{CONSOLE_LOG['BOLD']}"
f"{CONSOLE_LOG['FG_YELLOW']}"
f"LAVA job {job.job_id} does not respond for {max_idle_time_min} "
"minutes. Retry."
f"{CONSOLE_LOG['FG_BOLD_YELLOW']}"
f"LAVA job {job.job_id} unresponsive for {max_idle_time_min} "
"minutes; retrying the job."
f"{CONSOLE_LOG['RESET']}",
timeout_duration=max_idle_time,
)
@@ -236,14 +205,13 @@ def wait_for_job_get_started(job, attempt_no):
print_log(f"Waiting for job {job.job_id} to start.")
while not job.is_started():
current_job_duration_sec: int = int(
(datetime.now(timezone.utc) - CI_JOB_STARTED_AT).total_seconds()
(datetime.now(tz=UTC) - CI_JOB_STARTED_AT).total_seconds()
)
remaining_time_sec: int = max(0, CI_JOB_TIMEOUT_SEC - current_job_duration_sec)
if remaining_time_sec < EXPECTED_JOB_DURATION_SEC:
job.cancel()
raise MesaCIFatalException(
f"{CONSOLE_LOG['BOLD']}"
f"{CONSOLE_LOG['FG_YELLOW']}"
f"{CONSOLE_LOG['FG_BOLD_YELLOW']}"
f"Job {job.job_id} only has {remaining_time_sec} seconds "
"remaining to run, but it is expected to take at least "
f"{EXPECTED_JOB_DURATION_SEC} seconds."
@@ -254,15 +222,21 @@ def wait_for_job_get_started(job, attempt_no):
print_log(f"Job {job.job_id} started.")
def bootstrap_log_follower() -> LogFollower:
gl = GitlabSection(
id="lava_boot",
header="LAVA boot",
def bootstrap_log_follower(main_test_case, timestamp_relative_to) -> LogFollower:
start_section = GitlabSection(
id="dut_boot",
header="Booting hardware device",
type=LogSectionType.LAVA_BOOT,
start_collapsed=True,
suppress_end=True, # init-stage2 prints the end for us
timestamp_relative_to=timestamp_relative_to,
)
print(start_section.start())
return LogFollower(
starting_section=start_section,
main_test_case=main_test_case,
timestamp_relative_to=timestamp_relative_to
)
print(gl.start())
return LogFollower(starting_section=gl)
def follow_job_execution(job, log_follower):
@@ -295,23 +269,46 @@ def structural_log_phases(job, log_follower):
job.log["dut_job_phases"] = phases
def print_job_final_status(job):
def print_job_final_status(job, timestamp_relative_to):
job.refresh_log()
if job.status == "running":
job.status = "hung"
color = LAVAJob.COLOR_STATUS_MAP.get(job.status, CONSOLE_LOG["FG_RED"])
print_log(
f"{color}"
f"LAVA Job finished with status: {job.status}"
f"{CONSOLE_LOG['RESET']}"
)
colour = LAVAJob.COLOR_STATUS_MAP.get(job.status, CONSOLE_LOG["FG_RED"])
with GitlabSection(
"job_data",
f"Hardware job info for {job.status} job",
type=LogSectionType.LAVA_POST_PROCESSING,
start_collapsed=True,
colour=colour,
timestamp_relative_to=timestamp_relative_to,
):
wait_post_processing_retries: int = WAIT_FOR_LAVA_POST_PROCESSING_RETRIES
while not job.is_post_processed() and wait_post_processing_retries > 0:
# Wait a little until LAVA finishes processing metadata
time.sleep(WAIT_FOR_LAVA_POST_PROCESSING_SEC)
wait_post_processing_retries -= 1
job.refresh_log()
show_final_job_data(job, colour=f"{CONSOLE_LOG['BOLD']}{color}")
if not job.is_post_processed():
waited_for_sec: int = (
WAIT_FOR_LAVA_POST_PROCESSING_RETRIES
* WAIT_FOR_LAVA_POST_PROCESSING_SEC
)
print_log(
"Timed out waiting for LAVA post-processing after "
f"{waited_for_sec} seconds. Printing incomplete information "
"anyway."
)
details: dict[str, str] = job.show()
for field, value in details.items():
print(f"{field:<15}: {value}")
job.refresh_log()
def execute_job_with_retries(
proxy, job_definition, retry_count, jobs_log
proxy, job_definition, retry_count, jobs_log, main_test_case,
timestamp_relative_to
) -> Optional[LAVAJob]:
last_failed_job = None
for attempt_no in range(1, retry_count + 2):
@@ -322,10 +319,20 @@ def execute_job_with_retries(
job = LAVAJob(proxy, job_definition, job_log)
STRUCTURAL_LOG["dut_attempt_counter"] = attempt_no
try:
job_log["submitter_start_time"] = datetime.now().isoformat()
job_log["submitter_start_time"] = datetime.now(tz=UTC).isoformat()
submit_job(job)
wait_for_job_get_started(job, attempt_no)
log_follower: LogFollower = bootstrap_log_follower()
queue_section = GitlabSection(
id="dut_queue",
header="Waiting for hardware device to become available",
type=LogSectionType.LAVA_QUEUE,
start_collapsed=False,
timestamp_relative_to=timestamp_relative_to
)
with queue_section as section:
wait_for_job_get_started(job, attempt_no)
log_follower: LogFollower = bootstrap_log_follower(
main_test_case, timestamp_relative_to
)
follow_job_execution(job, log_follower)
return job
@@ -333,10 +340,10 @@ def execute_job_with_retries(
job.handle_exception(exception)
finally:
print_job_final_status(job)
print_job_final_status(job, timestamp_relative_to)
# If LAVA takes too long to post process the job, the submitter
# gives up and proceeds.
job_log["submitter_end_time"] = datetime.now().isoformat()
job_log["submitter_end_time"] = datetime.now(tz=UTC).isoformat()
last_failed_job = job
print_log(
f"{CONSOLE_LOG['BOLD']}"
@@ -349,11 +356,14 @@ def execute_job_with_retries(
return last_failed_job
def retriable_follow_job(proxy, job_definition) -> LAVAJob:
def retriable_follow_job(
proxy, job_definition, main_test_case, timestamp_relative_to
) -> LAVAJob:
number_of_retries = NUMBER_OF_RETRIES_TIMEOUT_DETECTION
last_attempted_job = execute_job_with_retries(
proxy, job_definition, number_of_retries, STRUCTURAL_LOG["dut_jobs"]
proxy, job_definition, number_of_retries, STRUCTURAL_LOG["dut_jobs"],
main_test_case, timestamp_relative_to
)
if last_attempted_job.exception is not None:
@@ -386,11 +396,9 @@ class PathResolver:
@dataclass
class LAVAJobSubmitter(PathResolver):
boot_method: str
ci_project_dir: str
device_type: str
farm: str
job_timeout_min: int # The job timeout in minutes
build_url: str = None
dtb_filename: str = None
dump_yaml: bool = False # Whether to dump the YAML payload to stdout
first_stage_init: str = None
@@ -399,29 +407,68 @@ class LAVAJobSubmitter(PathResolver):
kernel_image_type: str = ""
kernel_url_prefix: str = None
kernel_external: str = None
lava_tags: str = "" # Comma-separated LAVA tags for the job
lava_tags: str | tuple[str, ...] = () # Comma-separated LAVA tags for the job
mesa_job_name: str = "mesa_ci_job"
pipeline_info: str = ""
rootfs_url_prefix: str = None
rootfs_url: str = None
validate_only: bool = False # Whether to only validate the job, not execute it
visibility_group: str = None # Only affects LAVA farm maintainers
job_rootfs_overlay_url: str = None
structured_log_file: pathlib.Path = None # Log file path with structured LAVA log
ssh_client_image: str = None # x86_64 SSH client image to follow the job's output
project_name: str = None # Project name to be used in the job name
starting_section: str = None # GitLab section used to start
job_submitted_at: [str | datetime] = None
__structured_log_context = contextlib.nullcontext() # Structured Logger context
_overlays: dict = field(default_factory=dict, init=False)
def __post_init__(self) -> None:
def __post_init__(self) -> Self:
super().__post_init__()
# Remove mesa job names with spaces, which breaks the lava-test-case command
self.mesa_job_name = self.mesa_job_name.split(" ")[0]
if not self.structured_log_file:
return
if self.structured_log_file:
self.__structured_log_context = StructuredLoggerWrapper(self).logger_context()
self.__structured_log_context = StructuredLoggerWrapper(self).logger_context()
if self.job_submitted_at:
self.job_submitted_at = datetime.fromisoformat(self.job_submitted_at)
self.proxy = setup_lava_proxy()
return self
def append_overlay(
self, compression: str, name: str, path: str, url: str, format: str = "tar"
) -> Self:
"""
Append an overlay to the LAVA job definition.
Args:
compression (str): The compression type of the overlay (e.g., "gz", "xz").
name (str): The name of the overlay.
path (str): The path where the overlay should be applied.
url (str): The URL from where the overlay can be downloaded.
format (str, optional): The format of the overlay (default is "tar").
Returns:
Self: The instance of LAVAJobSubmitter with the overlay appended.
"""
self._overlays[name] = {
"compression": compression,
"format": format,
"path": path,
"url": url,
}
return self
def print(self) -> Self:
"""
Prints the dictionary representation of the instance and returns the instance itself.
Returns:
Self: The instance of the class.
"""
print(self.__dict__)
return self
def __prepare_submission(self) -> str:
# Overwrite the timeout for the testcases with the value offered by the
# user. The testcase running time should be at least 4 times greater than
@@ -440,7 +487,6 @@ class LAVAJobSubmitter(PathResolver):
validation_job = LAVAJob(self.proxy, job_definition)
if errors := validation_job.validate():
fatal_err(f"Error in LAVA job definition: {errors}")
print_log("LAVA job definition validated successfully")
return job_definition
@@ -470,10 +516,24 @@ class LAVAJobSubmitter(PathResolver):
if self.validate_only:
return
if self.starting_section:
gl = GitlabSection(
id=self.starting_section,
header="Preparing to submit job for scheduling",
type=LogSectionType.LAVA_SUBMIT,
start_collapsed=True,
timestamp_relative_to=self.job_submitted_at,
)
gl.start()
print(gl.end())
with self.__structured_log_context:
last_attempt_job = None
try:
last_attempt_job = retriable_follow_job(self.proxy, job_definition)
last_attempt_job = retriable_follow_job(
self.proxy, job_definition,
f'{self.project_name}_{self.mesa_job_name}',
self.job_submitted_at)
except MesaCIRetryError as retry_exception:
last_attempt_job = retry_exception.last_job
@@ -485,17 +545,7 @@ class LAVAJobSubmitter(PathResolver):
finally:
self.finish_script(last_attempt_job)
def print_log_artifact_url(self):
relative_log_path = self.structured_log_file.relative_to(pathlib.Path.cwd())
full_path = f"$ARTIFACTS_BASE_URL/{relative_log_path}"
artifact_url = path.expandvars(full_path)
print_log(f"Structural Logging data available at: {artifact_url}")
def finish_script(self, last_attempt_job):
if self.is_under_ci() and self.structured_log_file:
self.print_log_artifact_url()
if not last_attempt_job:
# No job was run, something bad happened
STRUCTURAL_LOG["job_combined_status"] = "script_crash"
@@ -505,9 +555,10 @@ class LAVAJobSubmitter(PathResolver):
raise SystemExit(1)
STRUCTURAL_LOG["job_combined_status"] = last_attempt_job.status
STRUCTURAL_LOG["job_exit_code"] = last_attempt_job.exit_code
if last_attempt_job.status != "pass":
raise SystemExit(1)
raise SystemExit(last_attempt_job.exit_code)
class StructuredLoggerWrapper:
@@ -520,6 +571,7 @@ class StructuredLoggerWrapper:
STRUCTURAL_LOG["farm"] = self.__submitter.farm
STRUCTURAL_LOG["job_combined_fail_reason"] = None
STRUCTURAL_LOG["job_combined_status"] = "not_submitted"
STRUCTURAL_LOG["job_exit_code"] = None
STRUCTURAL_LOG["dut_attempt_counter"] = 0
# Initialize dut_jobs list to enable appends
@@ -556,11 +608,5 @@ if __name__ == "__main__":
# more buffering
sys.stdout.reconfigure(line_buffering=True)
sys.stderr.reconfigure(line_buffering=True)
# LAVA farm is giving datetime in UTC timezone, let's set it locally for the
# script run.
# Setting environ here will not affect the system time, as the os.environ
# lifetime follows the script one.
environ["TZ"] = "UTC"
time.tzset()
fire.Fire(LAVAJobSubmitter)

View File

@@ -1,6 +0,0 @@
-r requirements.txt
freezegun==1.1.0
hypothesis==6.67.1
pytest==7.2.1
pytest-cov==3.0.0
PyYAML==5.3.1

View File

@@ -1,2 +0,0 @@
lavacli==1.5.2
fire==0.5.0

View File

@@ -1,8 +1,13 @@
CONSOLE_LOG = {
"FG_GREEN": "\x1b[1;32;5;197m",
"FG_RED": "\x1b[1;38;5;197m",
"FG_YELLOW": "\x1b[1;33;5;197m",
"FG_MAGENTA": "\x1b[1;35;5;197m",
"FG_GREEN": "\x1b[0;32m",
"FG_BOLD_GREEN": "\x1b[0;1;32m",
"FG_RED": "\x1b[0;38;5;197m",
"FG_BOLD_RED": "\x1b[0;1;38;5;197m",
"FG_YELLOW": "\x1b[0;33m",
"FG_BOLD_YELLOW": "\x1b[0;1;33m",
"FG_MAGENTA": "\x1b[0;35m",
"FG_BOLD_MAGENTA": "\x1b[0;1;35m",
"FG_CYAN": "\x1b[0;36m",
"RESET": "\x1b[0m",
"UNDERLINED": "\x1b[3m",
"BOLD": "\x1b[1m",

View File

@@ -23,3 +23,10 @@ KNOWN_ISSUE_R8152_PATTERNS: tuple[str, ...] = (
# This is considered noise, since LAVA produces this log after receiving a package of feedback
# messages.
LOG_DEBUG_FEEDBACK_NOISE = "Listened to connection for namespace 'dut' done"
A6XX_GPU_RECOVERY_WATCH_PERIOD_MIN = 3
A6XX_GPU_RECOVERY_FAILURE_MAX_COUNT = 30
A6XX_GPU_RECOVERY_FAILURE_MESSAGE = (
"cx gdsc didn't collapse",
"Timeout waiting for GMU OOB",
)

View File

@@ -2,7 +2,8 @@ from __future__ import annotations
import re
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from datetime import datetime, timedelta, UTC
from math import floor
from typing import TYPE_CHECKING, Optional
from lava.utils.console_format import CONSOLE_LOG
@@ -18,8 +19,11 @@ class GitlabSection:
header: str
type: LogSectionType
start_collapsed: bool = False
suppress_end: bool = False
suppress_start: bool = False
timestamp_relative_to: Optional[datetime] = None
escape: str = "\x1b[0K"
colour: str = f"{CONSOLE_LOG['BOLD']}{CONSOLE_LOG['FG_GREEN']}"
colour: str = f"{CONSOLE_LOG['FG_CYAN']}"
__start_time: Optional[datetime] = field(default=None, init=False)
__end_time: Optional[datetime] = field(default=None, init=False)
@@ -58,7 +62,12 @@ class GitlabSection:
timestamp = self.get_timestamp(time)
before_header = ":".join([preamble, timestamp, section_id])
colored_header = f"{self.colour}{header}\x1b[0m" if header else ""
if self.timestamp_relative_to:
delta = self.start_time - self.timestamp_relative_to
reltime = f"[{floor(delta.seconds / 60):02}:{(delta.seconds % 60):02}] "
else:
reltime = ""
colored_header = f"{self.colour}{reltime}{header}\x1b[0m" if header else ""
header_wrapper = "\r" + f"{self.escape}{colored_header}"
return f"{before_header}{header_wrapper}"
@@ -82,15 +91,25 @@ class GitlabSection:
def start(self) -> str:
assert not self.has_finished, "Starting an already finished section"
self.__start_time = datetime.now()
self.__start_time = datetime.now(tz=UTC)
return self.print_start_section()
def print_start_section(self) -> str:
if self.suppress_start:
return ""
return self.section(marker="start", header=self.header, time=self.__start_time)
def end(self) -> str:
assert self.has_started, "Ending an uninitialized section"
self.__end_time = datetime.now()
self.__end_time = datetime.now(tz=UTC)
assert (
self.__end_time >= self.__start_time
), "Section execution time will be negative"
return self.print_end_section()
def print_end_section(self) -> str:
if self.suppress_end:
return ""
return self.section(marker="end", header="", time=self.__end_time)
def delta_time(self) -> Optional[timedelta]:
@@ -98,6 +117,6 @@ class GitlabSection:
return self.__end_time - self.__start_time
if self.has_started:
return datetime.now() - self.__start_time
return datetime.now(tz=UTC) - self.__start_time
return None

View File

@@ -1,7 +1,7 @@
import re
import xmlrpc
from collections import defaultdict
from datetime import datetime
from datetime import datetime, UTC
from typing import Any, Optional
from lava.exceptions import (
@@ -21,9 +21,9 @@ from .lava_proxy import call_proxy
class LAVAJob:
COLOR_STATUS_MAP: dict[str, str] = {
"pass": CONSOLE_LOG["FG_GREEN"],
"hung": CONSOLE_LOG["FG_YELLOW"],
"fail": CONSOLE_LOG["FG_RED"],
"canceled": CONSOLE_LOG["FG_MAGENTA"],
"hung": CONSOLE_LOG["FG_BOLD_YELLOW"],
"fail": CONSOLE_LOG["FG_BOLD_RED"],
"canceled": CONSOLE_LOG["FG_BOLD_MAGENTA"],
}
def __init__(self, proxy, definition, log=defaultdict(str)) -> None:
@@ -35,10 +35,11 @@ class LAVAJob:
self._is_finished = False
self.log: dict[str, Any] = log
self.status = "not_submitted"
self._exit_code = None
self.__exception: Optional[Exception] = None
def heartbeat(self) -> None:
self.last_log_time: datetime = datetime.now()
self.last_log_time: datetime = datetime.now(tz=UTC)
self.status = "running"
@property
@@ -50,6 +51,15 @@ class LAVAJob:
self._status = new_status
self.log["status"] = self._status
@property
def exit_code(self) -> int:
return self._exit_code
@exit_code.setter
def exit_code(self, code: int) -> None:
self._exit_code = code
self.log["exit_code"] = self._exit_code
@property
def job_id(self) -> int:
return self._job_id
@@ -158,11 +168,12 @@ class LAVAJob:
last_line = None # Print all lines. lines[:None] == lines[:]
for idx, line in enumerate(lava_lines):
if result := re.search(r"hwci: mesa: (pass|fail)", line):
if result := re.search(r"hwci: mesa: (pass|fail), exit_code: (\d+)", line):
self._is_finished = True
self.status = result[1]
self.status = result.group(1)
self.exit_code = int(result.group(2))
last_line = idx + 1
last_line = idx
# We reached the log end here. hwci script has finished.
break
return lava_lines[:last_line]
@@ -172,6 +183,9 @@ class LAVAJob:
self.cancel()
self.exception = exception
# Set the exit code to nonzero value
self.exit_code = 1
# Give more accurate status depending on exception
if isinstance(exception, MesaCIKnownIssueException):
self.status = "canceled"

View File

@@ -62,17 +62,19 @@ class LAVAJobDefinition:
"""
args = self.job_submitter
nfsrootfs = {
"url": f"{args.rootfs_url_prefix}/lava-rootfs.tar.zst",
"url": f"{args.rootfs_url}",
"compression": "zstd",
"format": "tar",
"overlays": args._overlays,
}
values = self.generate_metadata()
init_stage1_steps = self.init_stage1_steps()
artifact_download_steps = self.artifact_download_steps()
jwt_steps = self.jwt_steps()
deploy_actions = []
boot_action = []
test_actions = uart_test_actions(args, init_stage1_steps, artifact_download_steps)
test_actions = uart_test_actions(args, init_stage1_steps, jwt_steps)
if args.boot_method == "fastboot":
deploy_actions = fastboot_deploy_actions(self, nfsrootfs)
@@ -94,7 +96,7 @@ class LAVAJobDefinition:
wrap_boot_action(boot_action)
test_actions = (
generate_dut_test(args, init_stage1_steps),
generate_docker_test(args, artifact_download_steps),
generate_docker_test(args, jwt_steps),
)
values["actions"] = [
@@ -119,6 +121,22 @@ class LAVAJobDefinition:
yaml.dump(self.generate_lava_yaml_payload(), job_stream)
return job_stream.getvalue()
def consume_lava_tags_args(self, values: dict[str, Any]):
# python-fire parses --lava-tags without arguments as True
if isinstance(self.job_submitter.lava_tags, tuple):
values["tags"] = self.job_submitter.lava_tags
# python-fire parses "tag-1,tag2" as str and "tag1,tag2" as tuple
# even if the -- --separator is something other than '-'
elif isinstance(self.job_submitter.lava_tags, str):
# Split string tags by comma, removing any trailing commas
values["tags"] = self.job_submitter.lava_tags.rstrip(",").split(",")
# Ensure tags are always a list of non-empty strings
if "tags" in values:
values["tags"] = [tag for tag in values["tags"] if tag]
# Remove empty tags
if "tags" in values and not values["tags"]:
del values["tags"]
def generate_metadata(self) -> dict[str, Any]:
# General metadata and permissions
values = {
@@ -148,8 +166,7 @@ class LAVAJobDefinition:
},
}
if self.job_submitter.lava_tags:
values["tags"] = self.job_submitter.lava_tags.split(",")
self.consume_lava_tags_args(values)
# QEMU lava jobs mandate proper arch value in the context
if self.job_submitter.boot_method == "qemu-nfs":
@@ -173,39 +190,33 @@ class LAVAJobDefinition:
"compression": "zstd"
}
def artifact_download_steps(self):
def jwt_steps(self):
"""
This function is responsible for setting up the SSH server in the DUT and to
export the first boot environment to a file.
"""
# Putting JWT pre-processing and mesa download, within init-stage1.sh file,
# as we do with non-SSH version.
download_steps = [
"set -ex",
"curl -L --retry 4 -f --retry-all-errors --retry-delay 60 "
f"{self.job_submitter.job_rootfs_overlay_url} | tar -xz -C /",
f"mkdir -p {self.job_submitter.ci_project_dir}",
f"curl -L --retry 4 -f --retry-all-errors --retry-delay 60 {self.job_submitter.build_url} | "
f"tar --zstd -x -C {self.job_submitter.ci_project_dir}",
# Pre-process the JWT
jwt_steps = [
"set -e",
]
# If the JWT file is provided, we will use it to authenticate with the cloud
# storage provider and will hide it from the job output in Gitlab.
if self.job_submitter.jwt_file:
with open(self.job_submitter.jwt_file) as jwt_file:
download_steps += [
jwt_steps += [
"set +x # HIDE_START",
f'echo -n "{jwt_file.read()}" > "{self.job_submitter.jwt_file}"',
"set -x # HIDE_END",
f'echo "export S3_JWT_FILE={self.job_submitter.jwt_file}" >> /set-job-env-vars.sh',
]
else:
download_steps += [
jwt_steps += [
"echo Could not find jwt file, disabling S3 requests...",
"sed -i '/S3_RESULTS_UPLOAD/d' /set-job-env-vars.sh",
]
return download_steps
return jwt_steps
def init_stage1_steps(self) -> list[str]:
run_steps = []
@@ -219,7 +230,7 @@ class LAVAJobDefinition:
# For vmware farm, patch nameserver as 8.8.8.8 is off limit.
# This is temporary and will be reverted once the farm is moved.
if self.job_submitter.mesa_job_name.startswith("vmware-"):
run_steps += [x.rstrip().replace("nameserver 8.8.8.8", "nameserver 10.25.198.110") for x in init_sh if not x.startswith("#") and x.rstrip()]
run_steps += [x.rstrip().replace("nameserver 8.8.8.8", "nameserver 192.19.189.10") for x in init_sh if not x.startswith("#") and x.rstrip()]
else:
run_steps += [x.rstrip() for x in init_sh if not x.startswith("#") and x.rstrip()]
@@ -232,4 +243,6 @@ class LAVAJobDefinition:
+ '-o "/lib/firmware/qcom/sm8350/a660_zap.mbn"'
)
run_steps.append("export CURRENT_SECTION=dut_boot")
return run_steps

View File

@@ -1,8 +1,9 @@
from __future__ import annotations
import re
from datetime import datetime, timedelta
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any, Sequence
from typing import TYPE_CHECKING, Any, Optional, Sequence
if TYPE_CHECKING:
from lava.utils import LogFollower
@@ -13,6 +14,9 @@ from lava.utils.constants import (
KNOWN_ISSUE_R8152_MAX_CONSECUTIVE_COUNTER,
LOG_DEBUG_FEEDBACK_NOISE,
KNOWN_ISSUE_R8152_PATTERNS,
A6XX_GPU_RECOVERY_WATCH_PERIOD_MIN,
A6XX_GPU_RECOVERY_FAILURE_MESSAGE,
A6XX_GPU_RECOVERY_FAILURE_MAX_COUNT,
)
from lava.utils.log_section import LogSectionType
@@ -29,6 +33,8 @@ class LAVALogHints:
log_follower: LogFollower
r8152_issue_consecutive_counter: int = field(default=0, init=False)
reboot_counter: int = field(default=0, init=False)
a6xx_gpu_recovery_fail_counter: int = field(default=0, init=False)
a6xx_gpu_first_fail_time: Optional[datetime] = field(default=None, init=False)
def raise_known_issue(self, message) -> None:
raise MesaCIKnownIssueException(
@@ -44,6 +50,7 @@ class LAVALogHints:
continue
self.detect_r8152_issue(line)
self.detect_forced_reboot(line)
self.detect_a6xx_gpu_recovery_failure(line)
def detect_r8152_issue(self, line):
if self.log_follower.phase in (
@@ -77,3 +84,23 @@ class LAVALogHints:
self.raise_known_issue(
"Forced reboot detected during test phase, failing the job..."
)
# If the a6xx gpu repeatedly fails to recover over a short period of time,
# then successful recovery is unlikely so cancel the job preemptively.
def detect_a6xx_gpu_recovery_failure(self, line: dict[str, Any]) -> None:
if search_known_issue_patterns(A6XX_GPU_RECOVERY_FAILURE_MESSAGE, line["msg"]):
time_of_failure = datetime.fromisoformat(line["dt"])
self.a6xx_gpu_recovery_fail_counter += 1
if self.a6xx_gpu_first_fail_time is None:
self.a6xx_gpu_first_fail_time = time_of_failure
if self.a6xx_gpu_recovery_fail_counter == A6XX_GPU_RECOVERY_FAILURE_MAX_COUNT:
time_since_first_fail = time_of_failure - self.a6xx_gpu_first_fail_time
if time_since_first_fail <= timedelta(minutes=A6XX_GPU_RECOVERY_WATCH_PERIOD_MIN):
self.raise_known_issue(
"Repeated GPU recovery failure detected: cancelling the job"
)
else:
self.a6xx_gpu_first_fail_time = None
self.a6xx_gpu_recovery_fail_counter = 0

View File

@@ -23,8 +23,6 @@ def setup_lava_proxy():
)
proxy = xmlrpc.client.ServerProxy(uri_str, allow_none=True, transport=transport)
print_log(f'Proxy for {config["uri"]} created.')
return proxy

View File

@@ -14,7 +14,7 @@ import logging
import re
import sys
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from datetime import datetime, timedelta, UTC
from typing import Optional, Union
from lava.exceptions import MesaCITimeoutError
@@ -33,6 +33,8 @@ from lava.utils.log_section import (
@dataclass
class LogFollower:
starting_section: Optional[GitlabSection] = None
main_test_case: Optional[str] = None
timestamp_relative_to: Optional[datetime] = None
_current_section: Optional[GitlabSection] = None
section_history: list[GitlabSection] = field(default_factory=list, init=False)
timeout_durations: dict[LogSectionType, timedelta] = field(
@@ -122,7 +124,9 @@ class LogFollower:
return
for log_section in LOG_SECTIONS:
if new_section := log_section.from_log_line_to_section(line):
if new_section := log_section.from_log_line_to_section(
line, self.main_test_case, self.timestamp_relative_to
):
self.update_section(new_section)
break
@@ -252,7 +256,7 @@ class LogFollower:
if line["lvl"] in ["results", "feedback", "debug"]:
return
elif line["lvl"] in ["warning", "error"]:
prefix = CONSOLE_LOG["FG_RED"]
prefix = CONSOLE_LOG["FG_BOLD_RED"]
suffix = CONSOLE_LOG["RESET"]
elif line["lvl"] == "input":
prefix = "$ "
@@ -304,11 +308,13 @@ def fix_lava_gitlab_section_log():
def print_log(msg: str, *args) -> None:
# Reset color from timestamp, since `msg` can tint the terminal color
print(f"{CONSOLE_LOG['RESET']}{datetime.now()}: {msg}", *args)
ts = datetime.now(tz=UTC)
ts_str = f"{ts.hour:02}:{ts.minute:02}:{ts.second:02}.{int(ts.microsecond / 1000):03}"
print(f"{CONSOLE_LOG['RESET']}{ts_str}: {msg}", *args)
def fatal_err(msg, exception=None):
colored_msg = f"{CONSOLE_LOG['FG_RED']}"
colored_msg = f"{CONSOLE_LOG['FG_BOLD_RED']}"
print_log(colored_msg, f"{msg}", f"{CONSOLE_LOG['RESET']}")
if exception:
raise exception

View File

@@ -1,6 +1,6 @@
import re
from dataclasses import dataclass
from datetime import timedelta
from datetime import datetime, timedelta
from enum import Enum, auto
from os import getenv
from typing import Optional, Pattern, Union
@@ -10,12 +10,22 @@ from lava.utils.gitlab_section import GitlabSection
class LogSectionType(Enum):
UNKNOWN = auto()
LAVA_SUBMIT = auto()
LAVA_QUEUE = auto()
LAVA_BOOT = auto()
TEST_DUT_SUITE = auto()
TEST_SUITE = auto()
TEST_CASE = auto()
LAVA_POST_PROCESSING = auto()
# How long to wait whilst we try to submit a job; make it fairly short,
# since the job will be retried.
LAVA_SUBMIT_TIMEOUT = int(getenv("LAVA_SUBMIT_TIMEOUT", 5))
# How long should we wait for a device to become available?
# For post-merge jobs, this should be ~infinite, but we can fail more
# aggressively for pre-merge.
LAVA_QUEUE_TIMEOUT = int(getenv("LAVA_QUEUE_TIMEOUT", 60))
# Empirically, successful device boot in LAVA time takes less than 3
# minutes.
@@ -43,6 +53,8 @@ LAVA_POST_PROCESSING_TIMEOUT = int(getenv("LAVA_POST_PROCESSING_TIMEOUT", 5))
FALLBACK_GITLAB_SECTION_TIMEOUT = timedelta(minutes=10)
DEFAULT_GITLAB_SECTION_TIMEOUTS = {
LogSectionType.LAVA_SUBMIT: timedelta(minutes=LAVA_SUBMIT_TIMEOUT),
LogSectionType.LAVA_QUEUE: timedelta(minutes=LAVA_QUEUE_TIMEOUT),
LogSectionType.LAVA_BOOT: timedelta(minutes=LAVA_BOOT_TIMEOUT),
LogSectionType.TEST_DUT_SUITE: timedelta(minutes=LAVA_TEST_DUT_SUITE_TIMEOUT),
LogSectionType.TEST_SUITE: timedelta(minutes=LAVA_TEST_SUITE_TIMEOUT),
@@ -63,7 +75,8 @@ class LogSection:
collapsed: bool = False
def from_log_line_to_section(
self, lava_log_line: dict[str, str]
self, lava_log_line: dict[str, str], main_test_case: Optional[str],
timestamp_relative_to: Optional[datetime]
) -> Optional[GitlabSection]:
if lava_log_line["lvl"] not in self.levels:
return
@@ -71,12 +84,16 @@ class LogSection:
if match := re.search(self.regex, lava_log_line["msg"]):
section_id = self.section_id.format(*match.groups())
section_header = self.section_header.format(*match.groups())
is_main_test_case = section_id == main_test_case
timeout = DEFAULT_GITLAB_SECTION_TIMEOUTS[self.section_type]
return GitlabSection(
id=section_id,
header=f"{section_header} - Timeout: {timeout}",
type=self.section_type,
start_collapsed=self.collapsed,
suppress_start=is_main_test_case,
suppress_end=is_main_test_case,
timestamp_relative_to=timestamp_relative_to,
)

View File

@@ -102,7 +102,7 @@ def qemu_deploy_actions(job_definition: "LAVAJobDefinition", nfsrootfs) -> tuple
def uart_test_actions(
args: "LAVAJobSubmitter", init_stage1_steps: list[str], artifact_download_steps: list[str]
args: "LAVAJobSubmitter", init_stage1_steps: list[str], jwt_steps: list[str]
) -> tuple[dict[str, Any]]:
# skeleton test definition: only declaring each job as a single 'test'
# since LAVA's test parsing is not useful to us
@@ -131,11 +131,9 @@ def uart_test_actions(
}
run_steps += init_stage1_steps
run_steps += artifact_download_steps
run_steps += jwt_steps
run_steps += [
f"mkdir -p {args.ci_project_dir}",
f"curl {args.build_url} | tar --zstd -x -C {args.ci_project_dir}",
# Sleep a bit to give time for bash to dump shell xtrace messages into
# console which may cause interleaving with LAVA_SIGNAL_STARTTC in some
# devices like a618.

View File

@@ -1,6 +1,9 @@
#!/usr/bin/env bash
# shellcheck disable=SC1003 # works for us now...
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
section_switch meson-cross-file "meson: cross file generate"
@@ -98,6 +101,32 @@ case $CI_JOB_NAME in
;;
esac
# LTO handling
case $CI_PIPELINE_SOURCE in
schedule)
# run builds with LTO only for nightly
if [ "$CI_JOB_NAME" == "debian-ppc64el" ]; then
# /tmp/ccWlDCPV.s: Assembler messages:
# /tmp/ccWlDCPV.s:15250880: Error: operand out of range (0xfffffffffdd4e688 is not between 0xfffffffffe000000 and 0x1fffffc)
LTO=false
# enable one by one for now
elif [ "$CI_JOB_NAME" == "fedora-release" ] || [ "$CI_JOB_NAME" == "debian-build-testing" ]; then
LTO=true
else
LTO=false
fi
;;
*)
LTO=false
;;
esac
if [ "$LTO" == "true" ]; then
MAX_LD=2
else
MAX_LD=${FDO_CI_CONCURRENT:-4}
fi
section_switch meson-configure "meson: configure"
rm -rf _build
@@ -123,6 +152,8 @@ meson setup _build \
-D vulkan-drivers=${VULKAN_DRIVERS:-[]} \
-D video-codecs=all \
-D werror=true \
-D b_lto=${LTO} \
-D backend_max_links=${MAX_LD} \
${EXTRA_OPTION}
cd _build
meson configure

View File

@@ -1,5 +1,8 @@
#!/usr/bin/env bash
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
set -ex
@@ -11,14 +14,11 @@ fi
INSTALL="$PWD/install"
# Set up the driver environment.
export LD_LIBRARY_PATH="$INSTALL/lib/:$INSTALL/lib/dri"
export LD_LIBRARY_PATH="$INSTALL/lib/"
export EGL_PLATFORM=surfaceless
ARCH=$(uname -m)
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
RESULTS=$PWD/${PIGLIT_RESULTS_DIR:-results}
mkdir -p $RESULTS
# Ensure Mesa Shader Cache resides on tmpfs.
SHADER_CACHE_HOME=${XDG_CACHE_HOME:-${HOME}/.cache}
SHADER_CACHE_DIR=${MESA_SHADER_CACHE_DIR:-${SHADER_CACHE_HOME}/mesa_shader_cache}
@@ -39,7 +39,7 @@ if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
GALLIUM_DRIVER=llvmpipe \
GALLIVM_PERF="nopt" \
virgl_test_server $VTEST_ARGS >$RESULTS/vtest-log.txt 2>&1 &
virgl_test_server $VTEST_ARGS >$RESULTS_DIR/vtest-log.txt 2>&1 &
sleep 1
fi
@@ -78,6 +78,10 @@ if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$GPU_VERSION-skips.txt"
fi
if [ -e "$INSTALL/$GPU_VERSION-slow-skips.txt" ] && [[ $CI_JOB_NAME != *full* ]]; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/$GPU_VERSION-slow-skips.txt"
fi
if [ "$PIGLIT_PLATFORM" != "gbm" ] ; then
PIGLIT_SKIPS="$PIGLIT_SKIPS $INSTALL/x11-skips.txt"
fi
@@ -91,7 +95,7 @@ set +e
piglit-runner \
run \
--piglit-folder /piglit \
--output $RESULTS \
--output $RESULTS_DIR \
--jobs ${FDO_CI_CONCURRENT:-4} \
--skips $INSTALL/all-skips.txt $PIGLIT_SKIPS \
--flakes $INSTALL/$GPU_VERSION-flakes.txt \
@@ -104,8 +108,8 @@ PIGLIT_EXITCODE=$?
deqp-runner junit \
--testsuite $PIGLIT_PROFILES \
--results $RESULTS/failures.csv \
--output $RESULTS/junit.xml \
--results $RESULTS_DIR/failures.csv \
--output $RESULTS_DIR/junit.xml \
--limit 50 \
--template "See $ARTIFACTS_BASE_URL/results/{{testcase}}.xml"
@@ -114,7 +118,7 @@ if [ -n "$FLAKES_CHANNEL" ]; then
python3 $INSTALL/report-flakes.py \
--host irc.oftc.net \
--port 6667 \
--results $RESULTS/results.csv \
--results $RESULTS_DIR/results.csv \
--known-flakes $INSTALL/$GPU_VERSION-flakes.txt \
--channel "$FLAKES_CHANNEL" \
--runner "$CI_RUNNER_DESCRIPTION" \
@@ -127,6 +131,6 @@ fi
# Compress results.csv to save on bandwidth during the upload of artifacts to
# GitLab. This reduces a full piglit run to 550 KB, down from 6 MB, and takes
# 55ms on my Ryzen 5950X (with or without parallelism).
zstd --rm -T0 -8qc $RESULTS/results.csv -o $RESULTS/results.csv.zst
zstd --quiet --rm --threads ${FDO_CI_CONCURRENT:-0} -8 $RESULTS_DIR/results.csv -o $RESULTS_DIR/results.csv.zst
exit $PIGLIT_EXITCODE

View File

@@ -1,6 +1,11 @@
#!/usr/bin/env bash
# shellcheck disable=SC2035 # FIXME glob
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
section_start traces_prepare "traces: preparing test setup"
set -ex
@@ -10,9 +15,6 @@ export PAGER=cat # FIXME: export everywhere
INSTALL=$(realpath -s "$PWD"/install)
S3_ARGS="--token-file ${S3_JWT_FILE}"
RESULTS=$(realpath -s "$PWD"/results)
mkdir -p "$RESULTS"
export PIGLIT_REPLAY_DESCRIPTION_FILE="$INSTALL/$PIGLIT_TRACES_FILE"
# FIXME: guess why /usr/local/bin is not included in all runners PATH.
@@ -27,33 +29,12 @@ else
export PIGLIT_REPLAY_EXTRA_ARGS="--keep-image ${PIGLIT_REPLAY_EXTRA_ARGS}"
fi
# WINE
case "$PIGLIT_REPLAY_DEVICE_NAME" in
vk-*)
export WINEPREFIX="/dxvk-wine64"
;;
*)
export WINEPREFIX="/generic-wine64"
;;
esac
#PATH="/opt/wine-stable/bin/:$PATH" # WineHQ path
# Avoid asking about Gecko or Mono instalation
export WINEDLLOVERRIDES="mscoree=d;mshtml=d" # FIXME: drop, not needed anymore? (wine dir is already created)
# Set up the environment.
# Modifiying here directly LD_LIBRARY_PATH may cause problems when
# using a command wrapper. Hence, we will just set it when running the
# command.
export __LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/:$INSTALL/lib/dri"
export __LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/"
if [ -n "${VK_DRIVER}" ]; then
# Set environment for DXVK.
export DXVK_LOG_LEVEL="info"
export DXVK_LOG="$RESULTS/dxvk"
[ -d "$DXVK_LOG" ] || mkdir -pv "$DXVK_LOG"
export DXVK_STATE_CACHE=0
ARCH=$(uname -m)
export VK_DRIVER_FILES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json"
fi
@@ -71,9 +52,6 @@ quiet() {
# Set environment for apitrace executable.
export PATH="/apitrace/build:$PATH"
export PIGLIT_REPLAY_WINE_BINARY=wine
export PIGLIT_REPLAY_WINE_APITRACE_BINARY="/apitrace-msvc-win64/bin/apitrace.exe"
export PIGLIT_REPLAY_WINE_D3DRETRACE_BINARY="/apitrace-msvc-win64/bin/d3dretrace.exe"
echo "Version:"
apitrace version 2>/dev/null || echo "apitrace not found (Linux)"
@@ -98,7 +76,7 @@ if [ "$EGL_PLATFORM" = "surfaceless" ]; then
GALLIUM_DRIVER=llvmpipe \
VTEST_USE_EGL_SURFACELESS=1 \
VTEST_USE_GLES=1 \
virgl_test_server >"$RESULTS"/vtest-log.txt 2>&1 &
virgl_test_server >"$RESULTS_DIR"/vtest-log.txt 2>&1 &
sleep 1
fi
@@ -132,7 +110,7 @@ fi
# shellcheck disable=SC2317
replay_s3_upload_images() {
find "$RESULTS/$__PREFIX" -type f -name "*.png" -printf "%P\n" \
find "$RESULTS_DIR/$__PREFIX" -type f -name "*.png" -printf "%P\n" \
| while read -r line; do
__TRACE="${line%-*-*}"
@@ -150,16 +128,14 @@ replay_s3_upload_images() {
__DESTINATION_FILE_PATH="$__S3_TRACES_PREFIX/${line##*-}"
fi
ci-fairy s3cp $S3_ARGS "$RESULTS/$__PREFIX/$line" \
ci-fairy s3cp $S3_ARGS "$RESULTS_DIR/$__PREFIX/$line" \
"https://${__S3_PATH}/${__DESTINATION_FILE_PATH}"
done
}
SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\""
if [ -d results ]; then
cd results && rm -rf ..?* .[!.]* *
fi
cd $RESULTS_DIR && rm -rf ..?* .[!.]* *
cd /piglit
if [ -n "$USE_CASELIST" ]; then
@@ -178,7 +154,7 @@ PIGLIT_OPTIONS=$(printf "%s" "$PIGLIT_OPTIONS")
PIGLIT_TESTS=$(printf "%s" "$PIGLIT_TESTS")
PIGLIT_CMD="./piglit run -l verbose --timeout 300 -j${FDO_CI_CONCURRENT:-4} $PIGLIT_OPTIONS $PIGLIT_TESTS replay "$(/usr/bin/printf "%q" "$RESULTS")
PIGLIT_CMD="./piglit run -l verbose --timeout 300 -j${FDO_CI_CONCURRENT:-4} $PIGLIT_OPTIONS $PIGLIT_TESTS replay "$(/usr/bin/printf "%q" "$RESULTS_DIR")
RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $SANITY_MESA_VERSION_CMD && $HANG_DETECTION_CMD $PIGLIT_CMD"
@@ -198,44 +174,65 @@ if [ -n "$PIGLIT_REPLAY_ANGLE_TAG" ]; then
tar --zstd -xf ${FILE} -C replayer-db/angle/
fi
PIGLIT_RESULTS="${PIGLIT_RESULTS:-replay}"
RESULTSFILE="$RESULTS_DIR/$PIGLIT_RESULTS.txt"
mkdir -p .gitlab-ci/piglit
uncollapsed_section_switch traces "traces: run traces"
if ! eval $RUN_CMD;
then
printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION"
error "Found $(cat /tmp/version.txt), expected $MESA_VERSION"
fi
./piglit summary aggregate "$RESULTS" -o junit.xml
PIGLIT_RESULTS="${PIGLIT_RESULTS:-replay}"
RESULTSFILE="$RESULTS/$PIGLIT_RESULTS.txt"
mkdir -p .gitlab-ci/piglit
./piglit summary console "$RESULTS"/results.json.bz2 \
./piglit summary aggregate "$RESULTS_DIR" -o junit.xml
{ set +x; } 2>/dev/null
./piglit summary console "$RESULTS_DIR"/results.json.bz2 \
| tee ".gitlab-ci/piglit/$PIGLIT_RESULTS.txt.orig" \
| head -n -1 | grep -v ": pass" \
| sed '/^summary:/Q' \
> $RESULTSFILE
if [ -s $RESULTSFILE ]; then
error "Failures in traces:"
cat $RESULTSFILE
echo "Review the image changes and get the new checksums at: ${ARTIFACTS_BASE_URL}/results/summary/problems.html"
echo "If the new traces look correct to you, you can update the checksums"
echo "locally by running:"
echo " ./bin/ci/update_traces_checksum.sh"
echo "and resubmit this merge request."
fi
section_switch test_post_process "traces: post-processing test results"
__PREFIX="trace/$PIGLIT_REPLAY_DEVICE_NAME"
__S3_PATH="$PIGLIT_REPLAY_ARTIFACTS_BASE_URL"
__S3_TRACES_PREFIX="traces"
set -x
if [ "$PIGLIT_REPLAY_SUBCOMMAND" != "profile" ]; then
quiet replay_s3_upload_images
fi
if [ ! -s $RESULTSFILE ]; then
rm -rf "${RESULTS_DIR:?}/${__PREFIX}"
{ set +x; } 2>/dev/null
section_end test_post_process
exit 0
fi
./piglit summary html --exclude-details=pass \
"$RESULTS"/summary "$RESULTS"/results.json.bz2
"$RESULTS_DIR"/summary "$RESULTS_DIR"/results.json.bz2
find "$RESULTS"/summary -type f -name "*.html" -print0 \
find "$RESULTS_DIR"/summary -type f -name "*.html" -print0 \
| xargs -0 sed -i 's%<img src="file://'"${RESULTS}"'.*-\([0-9a-f]*\)\.png%<img src="https://'"${JOB_ARTIFACTS_BASE}"'/traces/\1.png%g'
find "$RESULTS"/summary -type f -name "*.html" -print0 \
find "$RESULTS_DIR"/summary -type f -name "*.html" -print0 \
| xargs -0 sed -i 's%<img src="file://%<img src="https://'"${PIGLIT_REPLAY_REFERENCE_IMAGES_BASE}"'/%g'
echo "Failures in traces:"
cat $RESULTSFILE
error echo "Review the image changes and get the new checksums at: ${ARTIFACTS_BASE_URL}/results/summary/problems.html "
section_end test_post_process
exit 1

View File

@@ -0,0 +1,60 @@
#!/usr/bin/env bash
# shellcheck disable=SC2038 # TODO: rewrite the find
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # relative paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
section_switch prepare-artifacts "artifacts: prepare"
set -e
set -o xtrace
mkdir -p artifacts/
# Test runs don't pull down the git tree, so put the dEQP helper
# script and associated bits there.
echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" > artifacts/VERSION
cp -Rp .gitlab-ci/report-flakes.py artifacts/
cp -Rp .gitlab-ci/setup-test-env.sh artifacts/
cp -Rp .gitlab-ci/common artifacts/ci-common
cp -Rp .gitlab-ci/b2c artifacts/
cp -Rp .gitlab-ci/bare-metal artifacts/
cp -Rp .gitlab-ci/lava artifacts/
cp -Rp .gitlab-ci/bin/*_logger.py artifacts/
mapfile -t duplicate_files < <(
find src/ -path '*/ci/*' \
\( \
-name '*.txt' \
-o -name '*.toml' \
-o -name '*traces*.yml' \
\) \
-exec basename -a {} + | sort | uniq -d
)
if [ ${#duplicate_files[@]} -gt 0 ]; then
echo 'Several files with the same name in various ci/ folders:'
printf -- ' %s\n' "${duplicate_files[@]}"
exit 1
fi
if [ -d "src/" ]; then
find src/ -path '*/ci/*' \
\( \
-name '*.txt' \
-o -name '*.toml' \
-o -name '*traces*.yml' \
\) \
-exec cp -p {} artifacts/ \;
fi
cp -Rp .gitlab-ci/*.txt artifacts/
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}"
rm "${S3_ARTIFACT_TAR}"
fi
section_end prepare-artifacts

View File

@@ -1,6 +1,9 @@
#!/usr/bin/env bash
# shellcheck disable=SC2038 # TODO: rewrite the find
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC1091 # paths only become valid at runtime
. "${SCRIPTS_DIR}/setup-test-env.sh"
section_switch prepare-artifacts "artifacts: prepare"
@@ -11,6 +14,7 @@ CROSS_FILE=/cross_file-"$CROSS".txt
# Delete unused bin and includes from artifacts to save space.
rm -rf install/bin install/include
rm -f install/lib/*.a
# Strip the drivers in the artifacts to cut 80% of the artifacts size.
if [ -n "$CROSS" ]; then
@@ -38,15 +42,33 @@ cp -Rp .gitlab-ci/fossilize-runner.sh install/
cp -Rp .gitlab-ci/crosvm-init.sh install/
cp -Rp .gitlab-ci/*.txt install/
cp -Rp .gitlab-ci/report-flakes.py install/
cp -Rp .gitlab-ci/vkd3d-proton install/
cp -Rp .gitlab-ci/setup-test-env.sh install/
cp -Rp .gitlab-ci/*-runner.sh install/
cp -Rp .gitlab-ci/bin/structured_logger.py install/
cp -Rp .gitlab-ci/bin/custom_logger.py install/
find . -path \*/ci/\*.txt \
-o -path \*/ci/\*.toml \
-o -path \*/ci/\*traces\*.yml \
| xargs -I '{}' cp -p '{}' install/
mapfile -t duplicate_files < <(
find src/ -path '*/ci/*' \
\( \
-name '*.txt' \
-o -name '*.toml' \
-o -name '*traces*.yml' \
\) \
-exec basename -a {} + | sort | uniq -d
)
if [ ${#duplicate_files[@]} -gt 0 ]; then
echo 'Several files with the same name in various ci/ folders:'
printf -- ' %s\n' "${duplicate_files[@]}"
exit 1
fi
find src/ -path '*/ci/*' \
\( \
-name '*.txt' \
-o -name '*.toml' \
-o -name '*traces*.yml' \
\) \
-exec cp -p {} install/ \;
# Tar up the install dir so that symlinks and hardlinks aren't each
# packed separately in the zip file.
@@ -55,11 +77,12 @@ tar -cf artifacts/install.tar install
cp -Rp .gitlab-ci/common artifacts/ci-common
cp -Rp .gitlab-ci/lava artifacts/
cp -Rp .gitlab-ci/b2c artifacts/
cp bin/ci/structured_logger.py artifacts/
if [ -n "$S3_ARTIFACT_NAME" ]; then
# Pass needed files to the test stage
S3_ARTIFACT_NAME="$S3_ARTIFACT_NAME.tar.zst"
zstd artifacts/install.tar -o ${S3_ARTIFACT_NAME}
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}
fi

43
.gitlab-ci/run-pytest.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
# © Collabora Limited
# Author: Guilherme Gallo <guilherme.gallo@collabora.com>
# This script runs unit/integration tests related with LAVA CI tools
# 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"
section_start pytest_setup "Setting up pytest environment"
set -exu
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"
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"
LIB_TEST_DIR=${CI_PROJECT_DIR}/.gitlab-ci/tests
SCRIPT_TEST_DIR=${CI_PROJECT_DIR}/bin/ci
uncollapsed_section_switch pytest "Running pytest"
PYTHONPATH="${LIB_TEST_DIR}:${SCRIPT_TEST_DIR}:${PYTHONPATH:-}" python3 -m \
pytest "${LIB_TEST_DIR}" "${SCRIPT_TEST_DIR}" \
-W ignore::DeprecationWarning \
--junitxml=artifacts/ci_scripts_report.xml \
-m 'not slow' \
${PYTEST_VERBOSE:-}
section_end pytest

View File

@@ -1,12 +1,16 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091 # paths only become valid at runtime
set -e
. "${SCRIPTS_DIR}/setup-test-env.sh"
ARTIFACTSDIR=$(pwd)/shader-db
mkdir -p "$ARTIFACTSDIR"
export DRM_SHIM_DEBUG=true
LIBDIR=$(pwd)/install/lib
export LD_LIBRARY_PATH=$LIBDIR:$LIBDIR/dri
export LD_LIBRARY_PATH=$LIBDIR
cd /usr/local/shader-db

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
CHECKPATH=".gitlab-ci"
SCRIPTS_DIR="$(realpath "$(dirname "$0")")"
is_bash() {
[[ $1 == *.sh ]] && return 0
@@ -9,15 +9,14 @@ is_bash() {
return 1
}
anyfailed=0
while IFS= read -r -d $'' file; do
if is_bash "$file" ; then
shellcheck -x -W0 -s bash "$file"
rc=$?
if [ "${rc}" -eq 0 ]
then
continue
else
exit 1
if ! shellcheck "$file"; then
anyfailed=1
fi
fi
done < <(find $CHECKPATH -type f \! -path "./.git/*" -print0)
done < <(find "$SCRIPTS_DIR" -type f \! -path "./.git/*" -print0)
exit "$anyfailed"

View File

@@ -3,16 +3,28 @@
# shellcheck disable=SC2086 # we want word splitting
# shellcheck disable=SC2155 # mktemp usually not failing
function x_off {
shopt -s expand_aliases
function _x_store_state {
if [[ "$-" == *"x"* ]]; then
state_x=1
set +x
previous_state_x=1
else
state_x=0
previous_state_x=0
fi
}
_x_store_state
alias x_store_state='{ _x_store_state; } >/dev/null 2>/dev/null'
# TODO: implement x_on !
function _x_off {
x_store_state
set +x
}
alias x_off='{ _x_off; } >/dev/null 2>/dev/null'
function _x_restore {
[ $previous_state_x -eq 0 ] || set -x
}
alias x_restore='{ _x_restore; } >/dev/null 2>/dev/null'
export JOB_START_S=$(date -u +"%s" -d "${CI_JOB_STARTED_AT:?}")
@@ -27,18 +39,20 @@ function error {
RED="\e[0;31m"
ENDCOLOR="\e[0m"
# we force the following to be not in a section
section_end $CURRENT_SECTION
if [ -n "${CURRENT_SECTION:-}" ]; then
_section_end $CURRENT_SECTION
fi
CURR_MINSEC=$(get_current_minsec)
echo -e "\n${RED}[${CURR_MINSEC}] ERROR: $*${ENDCOLOR}\n"
[ "$state_x" -eq 0 ] || set -x
x_restore
}
function trap_err {
error ${CURRENT_SECTION:-'unknown-section'}: ret code: $*
}
function build_section_start {
function _build_section_start {
local section_params=$1
shift
local section_name=$1
@@ -49,58 +63,78 @@ function build_section_start {
CURR_MINSEC=$(get_current_minsec)
echo -e "\n\e[0Ksection_start:$(date +%s):$section_name$section_params\r\e[0K${CYAN}[${CURR_MINSEC}] $*${ENDCOLOR}\n"
x_restore
}
alias build_section_start="x_off; _build_section_start"
function section_start {
x_off 2>/dev/null
build_section_start "[collapsed=true]" $*
[ "$state_x" -eq 0 ] || set -x
function _section_start {
_build_section_start "[collapsed=true]" $*
x_restore
}
alias section_start="x_off; _section_start"
function build_section_end {
function _uncollapsed_section_start {
_build_section_start "" $*
x_restore
}
alias uncollapsed_section_start="x_off; _uncollapsed_section_start"
function _build_section_end {
echo -e "\e[0Ksection_end:$(date +%s):$1\r\e[0K"
CURRENT_SECTION=""
x_restore
}
alias build_section_end="x_off; _build_section_end"
function section_end {
x_off >/dev/null
build_section_end $*
[ "$state_x" -eq 0 ] || set -x
function _section_end {
_build_section_end $*
x_restore
}
alias section_end="x_off; _section_end"
function section_switch {
x_off 2>/dev/null
function _section_switch {
if [ -n "$CURRENT_SECTION" ]
then
build_section_end $CURRENT_SECTION
_build_section_end $CURRENT_SECTION
fi
build_section_start "[collapsed=true]" $*
[ "$state_x" -eq 0 ] || set -x
_build_section_start "[collapsed=true]" $*
x_restore
}
alias section_switch="x_off; _section_switch"
function uncollapsed_section_switch {
x_off 2>/dev/null
function _uncollapsed_section_switch {
if [ -n "$CURRENT_SECTION" ]
then
build_section_end $CURRENT_SECTION
_build_section_end $CURRENT_SECTION
fi
build_section_start "" $*
[ "$state_x" -eq 0 ] || set -x
_build_section_start "" $*
x_restore
}
alias uncollapsed_section_switch="x_off; _uncollapsed_section_switch"
export -f x_off
export -f _x_store_state
export -f _x_off
export -f _x_restore
export -f get_current_minsec
export -f error
export -f trap_err
export -f build_section_start
export -f section_start
export -f build_section_end
export -f section_end
export -f section_switch
export -f uncollapsed_section_switch
export -f _build_section_start
export -f _section_start
export -f _build_section_end
export -f _section_end
export -f _section_switch
export -f _uncollapsed_section_switch
# Freedesktop requirement (needed for Wayland)
[ -n "${XDG_RUNTIME_DIR}" ] || export XDG_RUNTIME_DIR="$(mktemp -p "$PWD" -d xdg-runtime-XXXXXX)"
[ -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"
if [ -e "${RESULTS_DIR}" ]; then
rm -rf "${RESULTS_DIR}"
fi
mkdir -p "${RESULTS_DIR}"
fi
set -E
trap 'trap_err $?' ERR

View File

@@ -48,6 +48,7 @@
# ---------------------------------------------------------------
.core-rules:
rules:
- !reference [.common-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
- changes: &core_file_list
- .gitlab-ci.yml
@@ -61,7 +62,6 @@
- src/*
- src/compiler/**/*
- src/drm-shim/**/*
- src/gbm/**/*
- src/gtest/**/*
# Some src/util and src/compiler files use headers from mesa/ (e.g.
# mtypes.h). We should clean that up.
@@ -74,6 +74,7 @@
.core-manual-rules:
extends: .no-auto-retry
rules:
- !reference [.common-rules, rules]
# We only want manual jobs to show up when it's not marge's pre-merge CI
# run, otherwise she'll wait until her timeout. The exception is
# performance jobs, see below.
@@ -92,6 +93,7 @@
# Collabora triggers the manual job after merge to main. These "never" filters
# need to come before any paths with "manual".
.performance-rules:
stage: performance
rules:
- !reference [.no_scheduled_pipelines-rules, rules]
# Run only on pre-merge pipelines from Marge
@@ -119,7 +121,8 @@
# Always use the same device
LAVA_TAGS: "cbg-0"
# Ensure that we are using the release build artifact
S3_ARTIFACT_NAME: mesa-${ARCH}-default-release
LAVA_S3_ARTIFACT_NAME: mesa-${ARCH}-default-release
S3_ARTIFACT_NAME: mesa-python-test
# 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
@@ -161,6 +164,7 @@
- !reference [.core-rules, rules]
- changes: &mesa_core_file_list
- src/egl/**/*
- src/gbm/**/*
- src/glx/**/*
- src/loader/**/*
- src/mapi/**/*
@@ -205,29 +209,6 @@
*vulkan_file_list
when: manual
# Rules for unusual architectures that only build a subset of drivers
.ppc64el-rules:
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
- !reference [.zink-common-rules, rules]
- !reference [.softpipe-rules, rules]
- !reference [.llvmpipe-rules, rules]
- !reference [.lavapipe-rules, rules]
- !reference [.radv-rules, rules]
- !reference [.radeonsi-rules, rules]
- !reference [.virgl-rules, rules]
- !reference [.nouveau-rules, rules]
.s390x-rules:
rules:
- !reference [.never-post-merge-rules, rules]
- !reference [.no_scheduled_pipelines-rules, rules]
- !reference [.zink-common-rules, rules]
- !reference [.softpipe-rules, rules]
- !reference [.llvmpipe-rules, rules]
- !reference [.lavapipe-rules, rules]
# Rules for linters
.lint-rustfmt-rules:
rules:

View File

@@ -17,6 +17,7 @@
paths:
- results/
rules:
- !reference [.common-rules, rules]
- !reference [.never-post-merge-rules, rules]
.formatting-check:
@@ -41,35 +42,34 @@ rustfmt:
- shopt -s globstar
- rustfmt --version
- rustfmt --verbose src/**/lib.rs
- rustfmt --verbose src/**/main.rs
python-test:
# Cancel job if a newer commit is pushed to the same branch
interruptible: true
stage: code-validation
yaml-toml-shell-test:
extends:
- .use-debian/x86_64_build
variables:
GIT_STRATEGY: fetch
timeout: 10m
- python-test
- .no-auto-retry # this job can't be flaky
stage: code-validation
script:
- cd bin/ci
- pip install --break-system-packages -r test/requirements.txt
- PYTHONPATH=. pytest -v
- 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"
- .gitlab-ci/run-yamllint.sh
- uncollapsed_section_switch shellcheck "shellcheck"
- .gitlab-ci/run-shellcheck.sh
- section_end
rules:
- !reference [.disable-farm-mr-rules, rules]
- !reference [.never-post-merge-rules, rules]
- if: $CI_PIPELINE_SOURCE == "schedule"
when: on_success
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_NAMESPACE == "mesa" && $GITLAB_USER_LOGIN != "marge-bot"
when: on_success
- !reference [.no_scheduled_pipelines-rules, rules]
- if: $GITLAB_USER_LOGIN == "marge-bot"
changes: &bin_ci_files
- .gitlab-ci.yml
- .gitlab-ci/**/*
- bin/ci/**/*
changes: &toml_lint_files
- .gitlab-ci/test/gitlab-ci.yml
- .gitlab-ci/**/*.sh
- .shellcheckrc
- bin/toml_lint.py
- src/**/ci/*.toml
when: on_success
- changes: *bin_ci_files
- changes: *toml_lint_files
when: manual
.test-gl:
@@ -125,7 +125,7 @@ python-test:
.b2c-vkd3d-proton-test:
variables:
HWCI_TEST_SCRIPT: ./install/vkd3d-proton/run.sh
HWCI_TEST_SCRIPT: install/vkd3d-runner.sh
.piglit-traces-test:
artifacts:
@@ -231,9 +231,6 @@ python-test:
# ARM32/64 testing of bare-metal boards attached to an x86 gitlab-runner system, using an asan mesa build
.baremetal-arm32-asan-test:
extends:
- .baremetal-test
- .use-debian/baremetal_arm32_test
variables:
DEQP_RUNNER_OPTIONS: "--env LD_PRELOAD=libasan.so.8:/install/lib/libdlclose-skip.so"
S3_ARTIFACT_NAME: mesa-arm32-asan-debugoptimized
@@ -244,9 +241,6 @@ python-test:
- !reference [.required-for-hardware-jobs, needs]
.baremetal-arm64-asan-test:
extends:
- .baremetal-test
- .use-debian/baremetal_arm64_test
variables:
DEQP_RUNNER_OPTIONS: "--env LD_PRELOAD=libasan.so.8:/install/lib/libdlclose-skip.so"
S3_ARTIFACT_NAME: mesa-arm64-asan-debugoptimized
@@ -281,7 +275,7 @@ python-test:
# 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_JOB_SUCCESS_REGEX: 'hwci: mesa: pass\r$'
B2C_JOB_SUCCESS_REGEX: 'hwci: mesa: pass, exit_code: 0\r$'
B2C_LOG_LEVEL: 6
B2C_POWEROFF_DELAY: 15
B2C_SESSION_END_REGEX: '^.*It''s now safe to turn off your computer\r$'
@@ -315,6 +309,8 @@ python-test:
- |
set -eux
section_start b2c_kernel_boot "Booting hardware device"
# Useful as a hook point for runner admins. You may edit the
# config.toml for the Gitlab runner and use a bind-mount to
# populate the hook script with some executable commands. This

Some files were not shown because too many files have changed in this diff Show More