Commit graph

201327 commits

Author SHA1 Message Date
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