Commit graph

59199 commits

Author SHA1 Message Date
Mike Blumenkrantz
270f9c0b06 zink: add ZINK_DEBUG=flushsync
this disables the submission thread

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22040>
2023-03-20 22:12:40 -04:00
Mike Blumenkrantz
6a45e0d991 zink: don't update fbfetch in db mode if inputAttachmentDescriptorSize==0
turnip gets away with this somehow, so silence harmless validation errors

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22040>
2023-03-20 22:12:22 -04:00
Mike Blumenkrantz
46212427f9 zink: rework handling of unordered->ordered write buffer barriers
this improves handling for barriers that originate from a write in the
unordered cmdbuf, adding tracking to resources to better determine access
in the unordered cmdbuf and then utilizing that to generate a single split
memory barrier added at the end of the unordered cmdbuf for all the buffers
written to on that cmdbuf

the next step will be to also merge the read access down onto the end-of-cmdbuf
barrier so that all stream upload-type functionality becomes a single barrier

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
e83513832b zink: always set sampler layouts when unbinding fb images while rp optimizing
this may or may not always be accurate, but in the cases where it is, it should
avoid some renderpass splitting, and in the cases where it isn't, there may
already be issues

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
c2b3c7b6be zink: only run post-fb-unbind layout stuff if the resource isn't being destroyed
if refcount==1, the resource won't be used any further, and all the code
in this block is only for resources that will be used as samplers,
so don't run any of it

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
b442ea4700 zink: add an assert to ensure zsbuf invalidation doesn't break rendering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
ad9a5c252a zink: force unordered_write=false when binding image descriptors
there's no way to link up image layouts between the unordered cmdbuf
and the main one, so if an op is promoted to unordered after an image
is used as a descriptor, the layout will be broken

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
eaeb1350be zink: fix unordered access for image descriptors
previously the unordered access flags would be set before the deferred
barrier was added, which would guarantee no descriptor barriers could
be deferred and thus terminate renderpasses any time a new descriptor
was bound that was both an image and needed a layout change

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
5018bc1358 zink: add batch refs for framebuffer surfaces on bind and ref update
if this scenario occurs:

* bind fb on ctx A
* draw
* flush + change context to B
* read fb on ctx B
* delete ctx A

then a dead batch write will be left on the fb bo

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
c2d2cb5e45 zink: flag some rp ends as unsafe
the only "safe" rp ends are:
* set_framebuffer_state (new rp)
* flush_resource (present)
* flush (end of rp)

any other rp end needs its rp info sanitized to avoid e.g., reapplying clears

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
7ca5656c49 zink: never split a renderpass for a loadop change
not sure if this was possible, but make sure it's not

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
61c236bc31 zink: delete unused barrier api
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
30d59c469a zink: simplify resource_check_defer_buffer_barrier()
this is a remnant of when the function was used for both images
and buffers

no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
ca43ecefa4 zink: handle swapchain creation failure less lazily
this is a real scenario

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22027>
2023-03-21 01:39:39 +00:00
Mike Blumenkrantz
efa6387a09 zink: convert luminance/alpha clear colors in dynamic texture clear
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22025>
2023-03-20 22:19:09 +00:00
Mike Blumenkrantz
600b8ba75c zink: split out luminance/alpha clear conversion code for reuse
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22025>
2023-03-20 22:19:08 +00:00
Mike Blumenkrantz
23cd81686c zink: further eliminate zs implicit feedback loops for read-only access
if all access is read-only then there is no feedback loop

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
Mike Blumenkrantz
a702e5038c zink: explicitly eliminate feedback loops for unused zsbufs
this avoids a GENERAL/FEEDBACK_LOOP layout transition where possible

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
Mike Blumenkrantz
618c3651ff zink: rename add_implicit_color_feedback_loop()
this is used for zs too

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
Mike Blumenkrantz
2d099c46cc zink: allow zink_is_zsbuf_used() without tc / rp optimizing
this info should be up-to-date and usable now in all cases

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
Mike Blumenkrantz
c900b9e35f zink: don't flag rp layout check on next draw when rp optimizing
this will always be a no-op, so save the cpu cycles

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
Mike Blumenkrantz
d6e40b7d54 zink: improve no-oping of write -> readonly zsbuf layouts
if descriptor binds exist this will have to change layouts anyway,
so allow readonly since it might be a more compatible layout

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
Mike Blumenkrantz
93d7bde9dc zink: add a fixup case for readonly zsbuf clears
this shouldn't currently be possible to hit, but in the future it may

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
Mike Blumenkrantz
e2e079eef4 zink: track whether the fb zsbuf is readonly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
Mike Blumenkrantz
1b9e9a54ab zink: fix dsa state parsing for tc info
stencil test implies zs write

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
Mike Blumenkrantz
d8bb8af4f5 zink: track zsbuf info even when rp optimizing is disabled
this should allow zsbuf elimination in some cases

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
2023-03-20 18:24:07 +00:00
José Roberto de Souza
2ab3d5f436 intel: Move memory aligment information to intel_device_info
This same information is also used in ANV, so intel_device_info is
a better place to have it.

Signed-off-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/21972>
2023-03-20 17:18:03 +00:00
Collabora's Gfx CI Team
10622ccc73 Uprev Piglit to 60e7f0586bac0cfcfcb5871046e31ca2057a5117
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21640>
2023-03-20 12:17:20 +00:00
Eric Engestrom
a7c051b5ac v3d: fix dirty bitset being too small to accept V3D_DIRTY_SSBO
Many of the `V3D_DIRTY_*` flags are above 32 bits, but for now the only
one used here is V3D_DIRTY_SSBO.

`shader->uniform_dirty_bits`, where `dirty` ends up, is already 64 bits.

Fixes: 45bb8f2957 ("broadcom: Add V3D 3.3 gallium driver called "vc5", for BCM7268.")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22019>
2023-03-20 09:29:40 +00:00
Brian Paul
5e039dbf8e gallium/xlib: call fence_finish() in XMesaSwapBuffers()
Before we can present the buffer we need to wait for the fence to
finish.  This fixes severe flickering of unfinished rendering in
many demos/tests.  This has been broken for a while, I think.

Note, this is for the non-DRI / Xlib-based GLX.

Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21993>
2023-03-20 06:05:47 +00:00
Oleksii Bozhenko
bbde684ca0 ci: Uprev Piglit
Signed-off-by: Oleksii Bozhenko <oleksii.bozhenko@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21810>
2023-03-20 04:19:23 +00:00
Mike Blumenkrantz
ec31535ce0 zink: add debug markers for draws
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21962>
2023-03-20 03:57:32 +00:00
Mike Blumenkrantz
af9bffd07d zink: catch zs u_blitter ops for draw markers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21962>
2023-03-20 03:57:32 +00:00
Mike Blumenkrantz
c56b46638c zink: round geometry for u_blitter debug markers
this otherwise gets weird values

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21962>
2023-03-20 03:57:32 +00:00
Mike Blumenkrantz
3a9f7d7038 zink: implement unordered u_blitter calls
as long as a few bits of state are swapped around and none of the "main"
cmdbuf state is applied, it becomes possible to promote the entire
u_blitter operation to the unordered cmdbuf and execute it there as
a "transfer" operation that can continue to enable further reordering

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:20 +00:00
Mike Blumenkrantz
4593f335f6 zink: add zink_context::unordered_blitting to preserve unordered flags
not currently used but will be used to wrap u_blitter

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:20 +00:00
Mike Blumenkrantz
887f72990e zink: split out pipeline rp info update function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:20 +00:00
Mike Blumenkrantz
9746e7253e zink: manually apply barriers whenever zink_context::blitting is set
this simplifies some codepaths at runtime by short-circuiting some
of the more complex operations since it's already known in advance
exactly which images will be used for which purpose

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:20 +00:00
Mike Blumenkrantz
07a5ede65a zink: reset fb clears using the clears_enabled mask
iterating was fine before, but it will become problematic to reset
all the clears once they start being stashed for unordered ops

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:20 +00:00
Mike Blumenkrantz
7411264ca6 zink: add a dynamic render version of clear_texture hook
this avoids the (sizable) overhead of going through the previous path
with set_frame_buffer state et al, instead just firing off a quick
begin+end rendering with a clear

it's also easily reorderable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:20 +00:00
Mike Blumenkrantz
e1621d3e6d zink: add a function for applying u_blitter barriers
this handles transitions for a sampler_view src -> framebuffer dst
operation

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:20 +00:00
Mike Blumenkrantz
22fb4578a0 zink: end rp earlier in set_framebuffer_state
this way any barriers occuring from unbinds won't have to do rp calc

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:20 +00:00
Mike Blumenkrantz
63f425c7d2 zink: double check layouts for possible feedback loop images
if a feedback loop hasn't yet been added for an image with both
descriptor and fb binds, queue a check for that to avoid mismatch

affects godot-tps-gles3-high.trace

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:19 +00:00
Mike Blumenkrantz
7812f3844b zink: add some asserts for zs layout in dynamic render
assert all the things

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21906>
2023-03-20 02:26:19 +00:00
David Heidelberg
afb82e553b ci: disable weston session timeout for llvmpipe
Fixes: d57a4b57df ("ci: disable weston session timeout")

Cc: mesa-stable
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22004>
2023-03-19 15:39:31 +01:00
David Heidelberg
fb3632d24f ci: distribute XDG_RUNTIME_DIR with setup-test-env script
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8615
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8646

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22004>
2023-03-19 15:39:12 +01:00
Rob Clark
b012a4a9cd freedreno+tu: Big GMEM support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21573>
2023-03-18 18:21:53 +00:00
Rob Clark
60bc7c0e22 freedreno: Specify GMEM tile alignment per GPU
They differ presumably based on # of CCU/SP and DDR bus topology.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21573>
2023-03-18 18:21:53 +00:00
David Heidelberg
9e6c88c96b ci/freedreno: add recent occasional flakes
Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21990>
2023-03-18 14:20:21 +01:00
Mike Blumenkrantz
9ed6487ba0 zink: expand ZINK_DEBUG=sync to cover copy ops
useful for debugging

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21999>
2023-03-18 11:44:38 +00:00