Commit graph

197777 commits

Author SHA1 Message Date
Karol Herbst
d0560f59ce vtn: handle struct kernel arguments passed by value
Due to LLVM ABI reasons the SPIRV-LLVM-Translator always uses pointers to
private memory for struct function parameters. This includes kernel entry
points.

However technically it's also legal to pass those parameters by value
according to the OpenCL SPIR-V Env spec.

One compiler making use of this is e.g. artic based on Thorin.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12149
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32141>
2024-11-18 12:12:21 +00:00
Marek Olšák
237ed6fd08 mesa: capture shaders to disk before invoking the linker
If there is an infinite loop in the GLSL linker, we want to write shaders
to disk before that.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
3179c65a5a st/mesa: add ST_DEBUG=xfb printing xfb info
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
89dad5618d gallium: add PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER
It's required by the latest IO refactoring.

screen.rst explains it and it's not pretty. It can be argued that
finalize_nir shouldn't exist.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
b8ee69f7fe st/mesa: call pipe_screen::finalize_nir outside of st_finalize_nir
This is easier to read.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
7717e458f1 gallium: use struct nir_shader * type in finalize_nir instead of void *
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Marek Olšák
6cd302dc39 glsl: add a helper for duplicated code calling nir_opt_varyings
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32175>
2024-11-18 11:25:18 +00:00
Collabora's Gfx CI Team
93c8a65dee Uprev Piglit to d04d6fff00849a2a8e29ef3251c6ca04a2f68dc7
eebe1b555f...d04d6fff00

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32085>
2024-11-18 10:05:34 +00:00
Erik Faye-Lund
5ced8b0ea2 glx: avoid null-deref
psc can be NULL here, so let's avoid dereferencing it.

Fixes: 34dea2b38e ("glx: unify extension binding")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32144>
2024-11-18 09:13:14 +00:00
Iago Toral Quiroga
d2fb489e0c v3dv: use the double buffer heuristic helpers
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
6d54a5514c v3d: use heuristic to enable double-buffer mode
This is still experimental and only enabled if V3D_DEBUG=db
is set.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
d81bcbe3de broadcom: add helpers for double-buffer heuristic
So we can share them between vulkan and gl.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
3355ceec3b v3d: store size of qpu program for compiled shaders
We will use this to inform heuristics about double-buffer.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
0ba8f65d44 v3d: drop blank line
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
234bea1bca v3dv: add missing support for double-buffer on V3D 7.x
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
f78d3833ef v3d: only enable double-buffer for jobs where it might make sense
Previously, double-buffer mode would apply to all jobs except msaa,
but this is not smart, since not all jobs can benefit from this. In
particular, if jobs load the tile buffer and don't store tiles
double buffer mode won't be effective and we would instead pay the
cost of the smaller tile size so we only want to enable in jobs
that meet these requirements.

In order to achieve this we need to postpone the decision about
double buffering until we know the loads and stores of the job,
which means we need to do this late after we have recorded draws.
This means that by default, we assume no double-buffer mode is
used and if we find we want to enable after emitting the draws
we need to re-compute tile sizes and rewrite the
TILE_BINNING_MODE_CFG packet accordingly.

Making the decison about double-buffer late will also enable us to
add heuristics to decide about double-buffer based on the draw calls
emitted in the job, but we will do this in a separate patch.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
c958dd4b6b v3d: do tile state BO allocation later
We don't need this until we are ready to emit the RCL for
the job and we want to do this late because double-buffering
will impact how big the allocations need to be.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
93ef28a134 v3d: save a pointer to the TILE_BINNING_MODE_CFG packet in the CL
We want to make the decision about double-buffer enablement much later
when we have enough information to make it. That means we might need
to rewrite this packet, so we need to save a pointer to its location
in the CL.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
3c0f84aa41 v3d: group tile spec into a struct inside the job
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
f0543d79aa broadcom: handle double buffer on V3D 7.1 tile size calculations
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Iago Toral Quiroga
87acd4cde5 v3d: add a V3D_DEBUG option to force synchronous execution of jobs
This is useful to debug sync issues and can also can be used to
instrument tooling for dumping job execution times in the future.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32111>
2024-11-18 08:45:04 +00:00
Mary Guillemard
e5d64ca69c bi: Execute nir_opt_algebraic after nir_lower_pack
nir_lower_pack can generate split operations, execute algebraic again
to handle them.

This fix an assert on
"dEQP-VK.spirv_assembly.instruction.compute.opphi.vartype_float16" and
probably others tests.

Fixes: 3904cfabd6 ("bi: Use nir_opt_load_store_vectorize")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
98cff2e098 panvk: Implement VK_KHR_zero_initialize_workgroup_memory
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
f88ecf6bb1 panvk: Advertise VK_KHR_shader_relaxed_extended_instruction
Handled by common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
3478f01b0d panvk: Advertise VK_KHR_shader_non_semantic_info
Handled by common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Mary Guillemard
b13643f16e panvk: Advertise VK_EXT_tooling_info
Already implemented in common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: John Anthony <john.anthony@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32131>
2024-11-18 09:05:31 +01:00
Lionel Landwerlin
431f353bfe anv: fix incorrect aspect flag for depth/stencil formats
We're asking if compression is supported and
anv_formats_ccs_e_compatible() is assuming color aspect.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0317c44872 ("anv: add VK_EXT_host_image_copy support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12155
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32153>
2024-11-18 07:01:28 +00:00
Sagar Ghuge
e5776bcb39 blorp: Use the calculated execution mask
Instead of setting execution mask to 0xFFFFFFFF, use the previously
calculated execution mask.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30474>
2024-11-18 04:42:52 +00:00
Brad Smith
67333c2632 util: Support elf_aux_info() on OpenBSD arm and ppc
Signed-off-by: Brad Smith <brad@comstyle.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31102>
2024-11-18 01:03:28 +00:00
Jianxun Zhang
8db71c95e1 isl: Move a CCS restriction in GFX 12.x
3D+MSAA is not supported and depth-stencil formats are all
32bpp or less. Move this restriction into single-sample
case.

Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496>
2024-11-17 22:41:56 +00:00
Jianxun Zhang
ab56a9eecd isl: Allow CCS in more cases (xe2)
By restricting these limitations up to GFX 12, CCS support
can be present on these cases that we think Xe2+ platform
should support compression.

Noticeably, CCS is allowed on depth resources without HiZ,
multi-sampled resources without CCS, and multi-sampled
stencil resources.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496>
2024-11-17 22:41:56 +00:00
Jianxun Zhang
dc70e2d556 iris: Allow compression on multi-sampled stencil (xe2)
Two aux functions are updated to fix piglit test once CCS is enabled on
multi-sampled stencil resources in a following change. As reviewers
suggested, we don't see much value of the assertion.
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496#note_2601233

Piglit test:
fbo-depthstencil blit default_fb -samples=16 -auto

iris_resolve.c:972: iris_resource_get_aux_state: Assertion
`res->surf.samples == 1 || res->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY' failed.

iris_resolve.c:996: iris_resource_set_aux_state: Assertion
`res->surf.samples == 1 || res->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY' failed.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496>
2024-11-17 22:41:55 +00:00
Jianxun Zhang
705555b6b0 isl: Refactor WA 22015614752
Using intel_needs_workaround() within a block of GFX version
checker requires extra carefulness on the road because both
of them specify a range of applicable platforms. The WA block
can be unexpectedly skipped once the GFX version checker gets
updated later.

Moving the WA implementation out of the GFX block to decouple
them for more clarity and less chance of messing up next time.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31496>
2024-11-17 22:41:55 +00:00
Tomeu Vizoso
4d23156127 teflon/docs: Clarify smoke test instructions
Some improvements suggested by users.

Suggested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32168>
2024-11-17 09:47:41 +00:00
Tomeu Vizoso
778ca0824f teflon/docs: Add i.MX8MP to list of supported NPUs
It's working now!

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32168>
2024-11-17 09:47:41 +00:00
Tomeu Vizoso
5adb9d03ae teflon/docs: Update performance measurements on LibreComputer Alta
We got faster!

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32168>
2024-11-17 09:47:41 +00:00
Marek Olšák
a37c8b4e7c radeonsi/ci: update navi31 failures
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 22:01:06 -05:00
Marek Olšák
8deb32ac2e radeonsi: split outputs_written_before_tes_gs into ls_es_* and tcs_* masks
these will have different values later

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:29 -05:00
Marek Olšák
1d16d88e1e radeonsi: set *outputs_written in scan_io_usage instead of later
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:25 -05:00
Marek Olšák
3f6bc3e58d radeonsi: remove unused si_shader_info::output_readmask
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:21 -05:00
Marek Olšák
b10bb9f0ba radeonsi: don't set tess level outputs in patch_outputs_written unconditionally
It doesn't do anything. The tess level outputs that are actually written are
set just below that.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:17 -05:00
Marek Olšák
3a9e7e1e82 radeonsi: remove unused function si_get_tcs_out_patch_stride
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:13 -05:00
Marek Olšák
25ac573140 radeonsi: reduce si_shader_key_ge::tes_prim_mode size to 2 bits
enum tess_primitive_mode has only 4 values.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:10 -05:00
Marek Olšák
a00ed96585 radeonsi: replace are_tessfactors_def_in_all_invocs with nir_gather_tcs_info
This is now in common code.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:06 -05:00
Marek Olšák
702982d399 radeonsi: get the value for load_tcs_primitive_mode_amd from shader info
This is possible thanks to the commit:
    "st/mesa: copy some TES shader info fields to TCS".

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:59:00 -05:00
Marek Olšák
e28e05ffe4 radeonsi: don't overwrite info.tess._primitive mode when it can be correct
The linker now sets TCS info to match TES, and the key can contain 0
if it's not optimized.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:56 -05:00
Marek Olšák
3570edeae2 radeonsi: fix passing TCS wave ID from LS to HS for monolithic LS+HS
required by the new HS shader message code

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:34 -05:00
Marek Olšák
a7ba36f589 ac/nir: get pass_tessfactors_by_reg from nir_gather_tcs_info
If nir_tcs_info::all_invocations_define_tess_levels is true, the pass
doesn't have to insert a barrier and use output loads to get tess level
output values. It can just use the SSA defs that are being stored (or phis
thereof) to get the tess level output values.

The remaining tcs_info fields will be used by the HS shader message.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:29 -05:00
Marek Olšák
b258a9aa4e aco: remove unused TCS fields from aco_shader_info
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32171>
2024-11-16 21:58:26 -05:00
Eric Engestrom
985285f30a v3dv/ci: mark whole group as flaky
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32162>
2024-11-16 21:50:39 +00:00