Commit graph

207613 commits

Author SHA1 Message Date
Mike Blumenkrantz
ed325d9309 zink: directly use imageview format for image descriptors for depth clamping
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
21fbe0f893 zink: track whether fb has swapchain bound on context
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
defc3dfa79 zink: use a better check for current fb zsbuf in zink_clear_depth_stencil()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
76e2b61a2f zink: delete/simplify some bindless descriptor resource accesss
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
8805afd291 zink: delete zink_surface::ivci
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
a9c928954e zink: allocate keys for surface cache to stop using zink_surface::ivci
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
b3c02d2bca zink: store/use fb attachment formats directly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
b177136c56 zink: tweak zink_create_transient_surface to stop using zink_surface::ivci
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
35cd9f663b zink: break out fb ivci init
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
25441082d9 zink: big resource view rework
* move/unify the cache onto zink_resource_object to streamline rebinds
* delete refcounts from surfaces and bufferviews
* only delete surfaces and bufferviews when owner object is destroyed
* cache swapchain surfaces onto the swapchain image

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
8eb5f272f2 zink: remove some usage of zink_surface::ivci
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
b030b20d72 zink: unify some z24 sampler clamping code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
74cf4f4efc zink: remove random format check in surface create
not sure why this was here

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
efcd6c11d9 zink: delete some redundant flagging of ctx->rp_changed
this already happens during unbind

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
635f0c5f4f zink: delete transient attachments instead of leaking them
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
07cc25d968 zink: always directly create surfaces
no need to defer this anymore

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
a7bfa37c6a zink: unify zink_resource_object_init_mutable() calling
this all goes through surface creation the same way

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
2ac0f97921 zink: delete surface handling of blockTexelViewCompatibleMultipleLayers
this is a pipe cap now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
e7a2268ca2 zink: simplify code surrounding prep_fb_attachment()
there's no need to pass a surface here since no part
of the surface is actually used besides the resource

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
9a1f5e82ee zink: clean up null surface case in prep_fb_attachment()
this is already checking for non-null surface in the caller,
and usage must be set after swapchain acquire to handle barriers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
78cd7f17af zink: move zink_prep_fb_attachment up and make static
no longer used externally

also move update_res_sampler_layouts() as a dependency

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
0f58227324 zink: remove pipe_resource ref from bufferviews
this was only ever needed for shader images and bindless, which both
now take their own refs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
3da0853867 zink: make pipe_resource refs for image views more consistent
now they always get a ref on bind and lose the ref on unbind

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
6658533ad5 zink: add a pipe_resource ref to bindless descriptors
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
f385b87963 zink: delete zink_surface::usage_info
not needed, just regenerated on creation

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
37bb3af312 zink: remove resource param from apply_view_usage_for_format()
not actually needed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
a4d4fee9d3 zink: delete zink_surface::hash
this is barely used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Mike Blumenkrantz
0a2c395394 zink: require nullDescriptor feature
this simplifies a huge amount of code and enables a lot of refactoring

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35722>
2025-06-26 10:10:28 -04:00
Valentine Burley
bac51d2931 virtio/ci: Add nightly Android Venus jobs on Intel TGL and ADL
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Introduce nightly Cuttlefish jobs on Intel Tiger Lake and Alder Lake.

Like `android-angle-venus-anv-cml`, these jobs run dEQP with the Android
guest using Venus + ANGLE, and the host using the ANV Vulkan driver.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35737>
2025-06-26 12:51:54 +00:00
Valentine Burley
bf98db1c45 virtio/ci: Split android-angle-venus-anv into reusable template
Move shared variables and configuration for the android-angle-venus-anv
job into a new template so that it can be reused by other jobs.

This follows the structure used everywhere else.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35737>
2025-06-26 12:51:54 +00:00
Valentine Burley
32264e7a00 virtio/ci: Increase timeout for AHB tests
Some of the tests occasionally time out on Tiger Lake.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35737>
2025-06-26 12:51:54 +00:00
Valentine Burley
e2ac66efdd ci: Uprev kernel to enable Multi-Gen LRU
Update the kernel to enable CONFIG_LRU_GEN.
This is the only change from the previous kernel build.

Mutli-gen LRU improves how Linux handles high memory pressure, which
allows Cuttlefish to boot on devices with limited RAM.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35737>
2025-06-26 12:51:54 +00:00
Lucas Stach
29eb30c747 etnaviv/ci: drop fails due to ignored stencil valuemask
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Now that the workaround for stencil valuemask 0 is gone on more
recent cores, we can drop the failures that were caused by this
workaround.

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/35704>
2025-06-26 12:17:06 +00:00
Lucas Stach
41b08a2040 etnaviv: allow 0 back stencil valuemask on new cores
Older cores have a hardware bug where the stencil test misbehaves when
the valuemask is 0 in the back stencil. The workaround is to effectively
switch to single sided stencil and hope for the best. This seems to be
okay for most actual use-cases and tests, as a 0 valuemask is quite rare.

However, as 0 is a valid value for the mask the workaround breaks some
edge cases. Newer cores don't seem to require the workaround and operate
correctly with all stencil valuemasks, so drop the workaround for them.

I don't know which feature bit tells us about the bugfix. I made an
educated guess by checking behavior on multiple GPUs: GC880r5106 and
GC2000r5108 need the workaround, GC3000r5450, GC7000r6204 and GC600r4653
work fine without it. By comparing the set BugFixes feature bits between
the cores and the fact that BugFixes15 already fixes some PE issues, I
think this one is the most likely candidate.

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/35704>
2025-06-26 12:17:06 +00:00
Lucas Stach
2dc5db625b etnaviv: simplify stencil ref front/back selection condition
Drop the check for front stencil enable when selecting which stencil
ref value to put into the back stencil state. If the front stencil
isn't enabled then stencil operations as a whole aren't enabled and
we don't care which value ends up in the state.

While at it fix indentation.

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/35704>
2025-06-26 12:17:06 +00:00
Lucas Stach
a6e9061880 etnaviv: drop obsolete question about alpha/stencil test interaction
There's a few things that will prevent enabling the more efficient
PE_COLOR_FORMAT_OVERWRITE mode, but pixel dicard due to alpha or
stencil testing isn't one of those conditions, as this behaves the
same way as pixel discard due to a failed depth test.

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/35704>
2025-06-26 12:17:05 +00:00
Lucas Stach
277b9bba38 etnaviv: remove obsolete two-sided stencil comment
There is no question anymore: we need to swap front/back stencil
depending on the frontface winding order, as the hardware doesn't
have a front face configuration option. This is what is implemented
in the driver.

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/35704>
2025-06-26 12:17:05 +00:00
Natalie Vock
af86cc37d5 aco/spill: Don't spill scratch_rsrc-related temps
These temps are used to create the scratch_rsrc. Spilling them will
never benefit anything, because assign_spill_slots will insert code
that keeps them live. Since the spiller assumes all spilled variables
to be dead, this can cause more variables being live than intended and
spilling to fail.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
acf29e403a aco/spill: Add a null scratch offset if no scratch_offset arg exists
Function callees' scratch_rsrc comes with the scratch offset
pre-applied.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
630913e1b4 aco: Introduce static_scratch_rsrc program member
Function callees get their scratch resource as a parameter instead of
generating it on-the-fly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
e006f68b11 aco/isel: Don't add scratch offset as gfx8- soffset if no offsets exist
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
a5eba11657 aco/isel: Use stack pointer parameter in load/store_scratch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:53 +00:00
Natalie Vock
4a62b342f3 aco: Add common utility to load scratch descriptor
Also modifies the scratch descriptor to take the stack pointer into
account.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:52 +00:00
Natalie Vock
cd2caa5e2b aco/spill: Use scratch stack pointer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:52 +00:00
Natalie Vock
22624d6f12 aco: Add scratch stack pointer
Function callees shouldn't overwrite caller's stacks.
Track where to write scratch data with a stack pointer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:52 +00:00
Natalie Vock
be89c02be5 aco: Add pseudo instr to calculate a function callee's stack pointer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35031>
2025-06-26 11:02:52 +00:00
Job Noorman
54151cfb76 ir3/cf: add support for movs
movs supports the same conversions as cov which means that any cov of
its dst can be folded into the movs if all uses of its dst are the same
type of cov.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00
Job Noorman
bf203fbf20 ir3: add codegen for movs
movs is just nir_intrinsic_read_invocation so this is a matter of
disabling the current lowering to nir_intrinsic_read_invocation_cond_ir3
and adding lowering to movs.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00
Job Noorman
d94bea85b8 ir3: make backend aware of movs
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00
Job Noorman
4b3f58701c ir3/isa: add isaspec definition for movs
movs works like subgroupBroadcast/OpGroupNonUniformBroadcast. The fiber
id can either be an immediate or a value in a0.x. In the latter case,
the value has to be dynamically uniform or else the behavior is
undefined. The dst register has to be shared or else the behavior seems
to be equivalent to a normal mov (i.e., the fiber id is not taken into
account anymore).

movs can do a cov on the broadcasted value. It works exactly like a
normal cov except that using u8 as the src type does not seem to work at
all.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32624>
2025-06-26 10:22:09 +00:00