Commit graph

58968 commits

Author SHA1 Message Date
Emma Anholt
fef6e6588b ci: Update traces expectations for gutting glsl opt_algebraic.
All look like harmless changes.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21475>
2023-02-28 03:36:09 +00:00
Mike Blumenkrantz
36a916f3f4 zink: use tc renderpass optimizing to more optimally start queries
if tc has determined that no queries are ended inside a renderpass,
it becomes possible to start queries outside of a renderpass, which
is more performant on some hw

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
7c96e98975 zink: always start/stop/resume queries inside renderpasses
this avoids potentially splitting renderpasses by ensuring that
all (non-cs) query operations always occur inside renderpasses

zink_query_update_gs_states() now has to be called inside renderpass
to catch the active queries

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
cbbc7c98c4 zink: pull 'was_line_loop' into ctx for query updating
make this a bit more flexible

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
5492e927e7 zink: use more consistent check for deleting zink_query::stats_list links
the linkage of this may vary depending on the query's active state,
so avoid issues by just checking the linkage directly

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
b4deaf7b2c zink: break out query suspend functionality for reuse
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
53c9f60ce4 zink: track whether queries were started in a renderpass
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
e5d517f362 zink: rework query pool overflow
now when a query pool is full, a new query pool can be created and the
previous one can be dropped from reuse to be freed at a later time

this has the added benefit of avoiding yet another place where a renderpass
might get split

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
7da78ffb69 zink: create/use query pools dynamically
this fits the concept of "pools are shared between queries" a bit
better and leaves the pool ownership/destruction to their users

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
e56d4f9264 zink: rework find_or_allocate_qp()
this and its caller are now a bit more streamlined with regards to
functionality of the surrounding code

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
bf782503e1 zink: reorder some query code
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
8fdbf81ff0 zink: try updating qbos on query resume if !in_rp
this is another logical place to do the update since it won't split
a renderpass

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
49deb9cbe7 zink: only update qbo for TIME_ELAPSED on start if !in_rp
this otherwise splits the current renderpass for no reason

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
93a7187f34 zink: handle null query results for conditional render
this just needs to have a zero blasted into the buffer

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
cf60c7fbfa zink: handle null query results
it's possible that a query may have no results at all, so shortcut
everything and return zero as fast as possible for those cases

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
6bcf4721dc zink: only try doing qbo updates on query suspend if !in_rp
this otherwise creates infinite recursion trying to end a currently
ending renderpass

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
2440c98b3b zink: refuse to start cs invocation queries in renderpass
these can't produce data in renderpasses, so ensure they aren't accidentally
started inside a renderpass where they'll have to later be restarted outside
of one

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
74a65363ea zink: don't double suspend queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:42 +00:00
Mike Blumenkrantz
9d0c3d3fb1 zink: un-suspend queries if they end while suspended
ensure they don't accidentally resume themselves after suspend

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
34e2d2ec58 zink: add zink_query::suspended to indicate suspended state of queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
74af46230c zink: don't auto-sync qbos on query end
these can now be synced later all at once

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
c870c7c942 zink: handle multiple query starts in qbo update
this still isn't used due to how queries are started/stopped, but it should
be a bit more robust

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
d60c864c45 zink: delete zink_query::last_start_idx
this was always zero

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
c46d68235e zink: make zink_vk_query unref consistent
the no-check free seems suspicious

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
eb5e0f5ab5 zink: fix possible query destroy leak
if the starts array has been reset, then the counter will be inaccurate,
and some of the members will leak, so this needs to iterate over the capacity
of the array instead of the contents

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
10389698a0 zink: fix zink_query_start initialization
not sure if this was a bug, but it would have fully zeroed the struct
and prevented previous zink_vk_query members from being unrefed

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
2a938c3e22 zink: rewrite zink_query_start struct
making the non-pool members easier to zero

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
ed9909e3a0 zink: reset queries on the promoted cmdbuf when possible
this avoids splitting renderpasses just to reset queries

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
96f7fe7191 zink: remove suspended queries from list before resuming
this avoids double-starting primgen queries from recursion when
needs_rast_discard_workaround is true

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Mike Blumenkrantz
4f53997574 zink: move zink_batch_no_rp call for query reset
this could otherwise pointlessly terminate a renderpass

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21534>
2023-02-28 03:15:41 +00:00
Giancarlo Devich
e7c5a8b3f8 d3d12: Don't loop in update_draw_indirect_with_sysvals
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21567>
2023-02-27 23:00:41 +00:00
Giancarlo Devich
bf6c214b25 d3d12: Create varying structures as necessary, reference them
This changes instances of d3d12_varying_info to d3d12_varying_info*,
significantly reducing the size of the d3d12_shader_key,
d3d12_gs_variant_key, and d3d12_tcs_variant_key.

Associated changes to key fill, compare, hashing, and gs and tcs variant
maps significantly reduce the amount of time spent clearing and
comparing memory.

The biggest win here is not having to re-zero _or_ re-fill varyings in
d3d12_fill_shader_key, validate_geometry_shader_variant, and
validate_tess_ctrl_shader_variant.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21527>
2023-02-27 22:05:34 +00:00
Giancarlo Devich
41d5e76f2c d3d12: Don't memcmp gs/tcs keys
This is unnecessary and incomplete. Not only is it covered by the hash
map lookup, but also does not consider the other key members.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21527>
2023-02-27 22:05:34 +00:00
Giancarlo Devich
30883c0145 d3d12: Don't unnecessarily zero out gs/tcs keys
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21527>
2023-02-27 22:05:34 +00:00
Giancarlo Devich
56d30bf591 d3d12: Track max varying slot, set and compare less bytes
Often, the full range of available slots don't need to participate in
the comparison or be zeroed out.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21527>
2023-02-27 22:05:34 +00:00
Giancarlo Devich
9a3820fe11 d3d12: Don't recompute has_flat_varyings or missing_dual_src_outputs
Per shader selection, these two flags can be expensive to compute.
Instead, recompute their values as neccessary, and save them in the
context.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21527>
2023-02-27 22:05:34 +00:00
Mike Blumenkrantz
6992aa951d aux/tc: only call tc_parse_draw() when parsing renderpass info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21533>
2023-02-27 21:04:56 +00:00
Mike Blumenkrantz
ad0d5a24aa aux/tc: track whether queries have been terminated in a renderpass
on tilers it's important to know whether a query is ended mid-renderpass
so that the query begin can occur inside/outside of the renderpass

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21533>
2023-02-27 21:04:56 +00:00
Caio Oliveira
2178a8da51 gallivm: Fix handling of nir_intrinsic_scoped_barrier
A scoped barrier only has a control barrier behavior if there's
an execution scope.

Fixes: 13d900de0d ("llvmpipe: set nir_shader_compiler_options::use_scoped_barrier")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339>
2023-02-27 20:24:01 +00:00
Rob Clark
e45bbcf649 Revert "freedreno: Account for multi-draw in num_draws"
autotune already divides draw-cost by # of draws, but only increments
the draw-cost once per multi-draw.  We could either _also_ account for
draw-cost by multiply by # of draws for treat multi-draw as a single
draw.  The latter saves an integer multiply per draw.

Fixes a performance regression triggered by transition from GMEM to
sysmem rendering.

This reverts commit 6bfee9e669.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21543>
2023-02-27 18:30:09 +00:00
Emma Anholt
cc55a2e77d ci/crocus: Mark unvanquished as flaky.
It's started rendering something different again, with a similar sort of
bad rendering to what's linked in the bug report (though this time it's a
'P' that became a white square).  Commit range 65b62db0..964323fe has
nothing particularly likely in it, so I expect this is some sort of cache
flushing fail or something.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21565>
2023-02-27 18:16:07 +00:00
Emma Anholt
eac875a78e ci/crocus: Add new tess xfails and a link to the regression bug report.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21565>
2023-02-27 18:16:07 +00:00
Samuel Pitoiset
ca2d2ea60b zink/ci: skip one more test that timeout with RADV
It usually takes more than 60s to run.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21564>
2023-02-27 18:23:38 +01:00
Karol Herbst
4fb0adc43c ci/zink: move threading tests to flakes
We have some failed CI jobs where some of those tests randomly pass.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21561>
2023-02-27 17:05:20 +00:00
Yonggang Luo
669a68489d meson: Use sse2_arg and sse2_args to replace usage of c and c_sse2_args
And now c_sse2_arg and c_sse2_args are remvoed

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21375>
2023-02-27 13:50:11 +00:00
Mike Blumenkrantz
7c8a5f6e37 vulkan/wsi: switch to using an options struct for last param
this makes adding values easier since the drivers won't need to be updated

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21447>
2023-02-27 13:21:21 +00:00
Georg Lehmann
9f155c21c3 amd: d16 uses rtz conversion for 32bit float
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21404>
2023-02-27 09:55:34 +00:00
Georg Lehmann
77252687fa amd: don't use d16 for integer loads
D16 saturates to min/max instead of just truncating.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21404>
2023-02-27 09:55:34 +00:00
Georg Lehmann
a00b50d820 nir: change 16bit image dest folding option to per type
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21404>
2023-02-27 09:55:34 +00:00
Mike Blumenkrantz
34e7c17cfe lavapipe: EXT_image_sliced_view_of_3d
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21514>
2023-02-27 07:49:48 +00:00