Mike Blumenkrantz
73528dd3b7
zink: don't use/update tc rp info while blitting
...
this is illegal
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21800 >
2023-03-17 14:37:59 +00:00
Mike Blumenkrantz
03c2bdda60
zink: use VK_EXT_multisampled_render_to_single_sampled for EXT_multisample_render_to_texture
...
this extension was added for the purpose of emulating the GL ext,
and using it is reasonably straightforward
the only (somewhat) invasive part is modifying the renderpass/dynamic hashes
to have samplecounts in the key, but this is also not too much work
now only fbfetch requires real renderpasses, and everything else is dynamic
fixes #7559
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20883 >
2023-02-01 10:08:57 +00:00
Sidney Just
6c80f7c555
zink: Fix non debug builds failing to compile on
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20917 >
2023-01-25 22:58:07 +00:00
Erik Faye-Lund
09a87d2171
zink: whitespace fixup
...
This just cleans up some indentation, no functional changes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20745 >
2023-01-18 09:11:54 +00:00
WebsterEndymion
53c4ce495c
zink: add a condition to needs_write_s
...
Previously missing check on the stencil write, condition added to needs_write_s using util_writes_stencil
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20245 >
2023-01-10 01:30:02 +00:00
Mike Blumenkrantz
0997a6272e
zink: re-clamp dynamic render area when doing swapchain fixups
...
this may catch another corner case if a late fixup changes fb size
fixes (lavapipe):
dEQP-EGL.functional.swap_buffers_with_damage.resize_before_swap.clear_render
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20584 >
2023-01-09 20:06:14 +00:00
Mike Blumenkrantz
a59dc9d157
zink: split out swapchain render update fixups into separate function
...
this needs to be more granular for corner cases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20584 >
2023-01-09 20:06:14 +00:00
Mike Blumenkrantz
79a4d22928
zink: only update framebuffer object during swapchain update if framebuffer exists
...
otherwise this might be randomly creating an unused framebuffer for dynamic render
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20584 >
2023-01-09 20:06:14 +00:00
Mike Blumenkrantz
8a439f89d4
zink: use tc renderpass tracking to optimize renderpasses
...
this massively improves performance on tiling gpus
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19077 >
2022-10-29 20:19:51 +00:00
Mike Blumenkrantz
58f09f5993
zink: add a context flag to indicate when blitter is running
...
...or blitter-like functionality
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19077 >
2022-10-29 20:19:51 +00:00
Emma Anholt
590f176327
zink: Lazily allocate the dummy surfaces.
...
glmark2 -b texture --fullscreen drops from 141MB of BOs to 85MB on turnip.
Still 29MB more than freedreno (due to a pile of extra fullscreen rgba8
images)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19126 >
2022-10-28 20:37:54 +00:00
Mike Blumenkrantz
1e63b24f88
zink: add some breadcrumbs for VK_EXT_multisampled_render_to_single_sampled
...
at some point someone should hook this extension up to simplify/optimize
the existing msrtt handling
see also #7559
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19307 >
2022-10-27 14:43:50 +00:00
Mike Blumenkrantz
1ae26de36f
zink: unset rp_changed after initializing renderpass attachments
...
if fbfetch is setup here, it will flag rp_changed
this is already inside renderpass setup, however, so just unset it
to avoid erroneously trigering the assert
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19065 >
2022-10-14 01:16:30 +00:00
Mike Blumenkrantz
56fb258064
zink: replace mixed_zs with zs feedback loops
...
this is the more technically correct way to handle such things
SoroushIMG <soroush.kashani@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18855 >
2022-09-29 15:29:51 +00:00
Mike Blumenkrantz
97c7eaf17f
zink: use feedback loop layout to correctly handle implicit feedback loops
...
an implicit feedback loop occurs when an app happens to bind the same image
as both a framebuffer attachment and a sampler for the same draw
an explicit feedback loop occurs when an app uses fbfetch to read data back
from the framebuffer using input attachments
fbfetch is already handled, but implicit feedback loops require more work:
* detecting them happens on-the-fly
* pipeline variants are required
this handles implicit feedback loops by detecting them at draw time during
barrier updates and then flagging pipeline state change to trigger variant creation.
the bits are then unset when the framebuffer/sampler binds are removed
fixes #7309
fixes (tu):
KHR-GL46.texture_barrier.disjoint-texels
KHR-GL46.texture_barrier.overlapping-texels
KHR-GL46.texture_barrier.same-texel-rw-multipass
KHR-GL46.texture_barrier_ARB.disjoint-texels
KHR-GL46.texture_barrier_ARB.overlapping-texels
KHR-GL46.texture_barrier_ARB.same-texel-rw-multipass
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18787 >
2022-09-27 17:32:56 +00:00
Mike Blumenkrantz
bc5ed17844
zink: remove zink_context::new_swapchain
...
this was my (feeble) attempt at tracking validity for swapchain images,
but it doesn't actually work right, and zink_resource::valid is better
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18787 >
2022-09-27 17:32:56 +00:00
Mike Blumenkrantz
a6cfb72010
zink: enable VK_ATTACHMENT_LOAD_OP_DONT_CARE for zs in renderpasses
...
dynamic render path already handled this
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18787 >
2022-09-27 17:32:56 +00:00
Mike Blumenkrantz
c4f78396d4
zink: support PIPE_CAP_FBFETCH_COHERENT
...
that's what VK_EXT_rasterization_order_attachment_access is for
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18133 >
2022-08-24 12:19:13 +00:00
Mike Blumenkrantz
b988b8c84b
zink: remove all pipe_shader_type usage
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18051 >
2022-08-14 18:38:05 -04:00
Mike Blumenkrantz
30c51abd0b
zink: move all types/enums into zink_types.h
...
this significantly untangles all the header includes and fixes an issue
where zink_descriptors.h couldn't be included by certain files due to
type conflicts
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18051 >
2022-08-14 18:38:04 -04:00
TSnake41
a02c026eb7
zink: print result code string on vulkan failure
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17726 >
2022-07-28 16:06:50 +00:00
Marek Olšák
3e94d498b3
gallium: add pipe_blit_info::dst_sample, update u_blitter to write that sample
...
A new radeonsi blit test will use it to upload different sample values
into MSAA textures.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17694 >
2022-07-23 18:21:31 +00:00
Mike Blumenkrantz
edab34f68d
zink: allow no-op renderpass updates in zink_batch_rp()
...
in some cases it becomes desirable to "maybe" stop and start the current
renderpass, such as when updates MAY result in layout changes for attachments
for such cases, avoid splitting the renderpass unless it actually needs to
be split
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
4aec761596
zink: improve granularity of renderpass switching
...
this should ensure that (future) renderpass recalcs will never split
a renderpass unnecessarily
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
13951385b3
zink: reuse rt layout functions to refactor zink_render_pass_attachment_get_barrier_info()
...
maybe slightly easier to read?
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
c602e877a3
zink: break out color rt layout calc
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
903060787e
zink: break out zs renderpass layout calc
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
1ff18f0879
zink: break out renderpass attachment load op calc
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
1bc9db6879
zink: split out rp_changed to be more granular for dynamic render
...
sometimes a state change MAY require a renderpass change, but this change
will not require splitting the current renderpass
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
d9a320b62c
zink: remove redundant renderpass update check for clears
...
this should be handled already in the clear code
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
ac38139c34
zink: simplify zink_framebuffer_clear_data union
...
no functional changes
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
b0e62adbcc
zink: delete zink_fb_clear_util_unpack_clear_color
...
no longer used
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
9d68684240
zink: always use storeOp=STORE for depth renderpass
...
it's unknown whether there may be clears to the depth attachment at the start of
a renderpass, so always assume there will be
Fixes: c132a28745
("zink: use store op NONE when necessary for depth usage")
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
8bb5a11503
zink: fix transient attachment rp assert
...
cc: mesa-stable
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366 >
2022-07-18 03:40:37 +00:00
Mike Blumenkrantz
b240be28e3
zink: check for pending clears to determine write status of zs attachments
...
as @Venemo discovered, zs layouts were being incorrectly set to readonly
in the case where the attachment was only used for an explicit clear,
so ensure that gets taken into account
cc: mesa-stable
fixes (radv):
dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_clear
dEQP-GLES31.functional.stencil_texturing.render.depth32f_stencil8_clear
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17033 >
2022-06-14 20:58:55 +00:00
Mike Blumenkrantz
d8877437d6
zink: avoid uninit values in renderpass state
...
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010 >
2022-06-14 19:21:15 +00:00
Mike Blumenkrantz
de1e67b39d
zink: hook up surface invalidation to LOAD_OP_DONT_CARE
...
this should improve perf for tilers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16877 >
2022-06-06 00:36:20 +00:00
Mike Blumenkrantz
e6ec9ca0ab
zink: rename renderpass attrib value
...
this never really meant "swapchain", it just meant that load isn't needed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16877 >
2022-06-06 00:36:20 +00:00
Mike Blumenkrantz
20427d01ac
zink: fix framebuffer attachment usage asserts for dummy attachments
...
dummy attachments never overwrite existing attachments,
so they must be explicitly compared like this to avoid
erroneous crashing
Fixes: 3892c13381
("zink: add an alternate path for EXT_color_write_enable usage")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16848 >
2022-06-03 04:04:46 +00:00
Mike Blumenkrantz
8fef8ed1b0
zink: add renderpass bits for color/depth r/w
...
these are different renderpasses according to compatibility rules
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16621 >
2022-05-26 01:49:43 +00:00
Mike Blumenkrantz
f4aa727e44
zink: use a zink_render_pass_pipeline_state bit for fbfetch
...
improve compatibility detection
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16621 >
2022-05-26 01:49:43 +00:00
Mike Blumenkrantz
b25b8027e5
zink: split out scissor flagging from framebuffer updating
...
this is kinda similar but not actually the same thing
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476 >
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
91a9676a0c
zink: lift some renderpass mechanics up a level in the api
...
(should be) no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476 >
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
b2a33d364e
zink: break out zs rt attrib analysis into util function
...
(should be) no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476 >
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
728fa3606a
zink: break out color rt attrib analysis into util function
...
(should be) no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476 >
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
69efe357b3
zink: pass rt attrib to zink_render_pass_attachment_get_barrier_info()
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476 >
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
079b95fc6a
zink: remove renderpass state flag for swapchain
...
this is redundant and can be merged onto the rt attrib
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476 >
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
e107fa386b
zink: break up swapchain renderpass update to util function
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476 >
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
190ccf3324
zink: break out sample location updating to separate function
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476 >
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
3ef8cdbab2
zink: use local variable for getting rt barrier info
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476 >
2022-05-20 16:42:21 +00:00