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
Patrick Lerda
7e613d2a32
mesa/shaderapi: fix path memory leak
...
For instance, with "piglit/arb_shading_language_include-api -auto -fbo" or
"piglit/shader_runner tests/spec/arb_shading_language_include/execution/replacement.shader_test -auto -fbo":
Direct leak of 66 byte(s) in 6 object(s) allocated from:
#0 0x7fa4b59050 in __interceptor_strdup (/usr/lib64/libasan.so.6+0x59050)
#1 0x7f9a098fe0 in validate_and_tokenise_sh_incl ../src/mesa/main/shaderapi.c:3383
#2 0x7f9a0a43e8 in _mesa_NamedStringARB ../src/mesa/main/shaderapi.c:3547
Signed-off-by: Patrick Lerda <patrick9876@free.fr >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21553 >
2023-02-28 01:17:35 +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
Emma Anholt
d246948ce3
anv: Skip BTI RT flush if we're doing an op that doesn't use render targets.
...
rt_flushes emitted on zink sauer.trace --loop=500 -2.02118% +/- 1.15992% (n=8).
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21508 >
2023-02-27 21:44:56 +00:00
Emma Anholt
2bd304bc8f
anv: Skip the RT flush when doing depth-only rendering.
...
The spec citation says it's just for when the RT write message BTI might
point to a different RT, and if we don't have any color attachments then
we won't have one of those at all.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21508 >
2023-02-27 21:44:56 +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
91fa939763
panfrost: Use NIR scoped barriers instead of memory barriers
...
Now both GLSL and SPIR-V will produce the scoped barriers, so no
need to handle the old ones.
Control barriers are still present in some cases, so keep that
for now.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
901bc6d53c
pan/midgard: Handle nir_intrinsic_scoped_barrier in Midgard compiler
...
Behave the same as the existing more specific barrier intrinsics.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
64a0266260
pan/compiler: Fix handling of nir_intrinsic_scoped_barrier
...
Only emit anything if this is a control barrier, i.e. contains an
execution scope. Also change the assertion to look at that scope
instead of the memory scope.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
c80268a20d
intel/compiler: Mark various memory barriers intrinsics unreachable
...
Now that both SPIR-V and GLSL are using scoped barriers, we can stop
handling the specialized ones.
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
Caio Oliveira
fe908ffefa
glsl: Implement use_scoped_barrier option for lowering memory barriers
...
When the option is enabled, lower memory barriers to the
unified nir_intrinsic_scoped_barrier.
The translation of the following is based on
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gl_spirv.txt
- memoryBarrier()
- memoryBarrierBuffer()
- memoryBarrierImage()
- memoryBarrierShared()
- groupMemoryBarrier()
Also use scoped barrier for the memory counterparts of the GLSL
(control) barrier() when the option is enabled. The execution
part of a (control) barrier() remains using the old intrinsic.
For memoryBarrierAtomicCounter() there's no corresponding
nir_var_atomic_counter mode. Since atomic counters are lowered
to SSBOs, use the nir_var_mem_ssbo mode in the scoped barrier
instead.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Acked-by: Rob Clark <robclark@freedesktop.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +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
Caio Oliveira
e411e0afd3
microsoft/compiler: Handle scoped barrier in Tess splitting
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
1db7e6a261
nir: Support use_scoped_barrier in nir_lower_atomics_to_ssbo
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Acked-by: Rob Clark <robclark@freedesktop.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@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
Mike Blumenkrantz
afd5a95d61
docs: add pipeline library support for tu
...
Acked-by: Connor Abbott <cwabbott0@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21560 >
2023-02-27 17:00:12 +00:00
Ryan Neph
03ffbcb29a
Revert "venus: temporarily redirect VkDrmFormatModifierPropertiesListEXT to "2" variant"
...
No longer need to redirect, since the renderer should use the fixed
decoder for VkDrmFormatModifierPropertiesListEXT::drmFormatModifierCount
by now.
This reverts commit 525b8c582f .
Signed-off-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21395 >
2023-02-27 16:45:02 +00:00
Ryan Neph
1d12d7c33c
venus: update venus-protocol headers to fix WA1
...
Follow-up to previous commit, this time to fix encoding/decoding for
VkDrmFormatModifierPropertiesListEXT::drmFormatModifierCount. Fixes a
workaround (WA1) in the venus-protocol.
Signed-off-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21395 >
2023-02-27 16:45:02 +00:00
Alyssa Rosenzweig
4eabd6586b
nir/lower_blend: Don't dereference null
...
If a dual source blend colour is never written, src1 will be null and it will be
invalid to dereference it. src1 is dereferenced both for the f2fN instruction
but also if a dual blend factor is used... even if the latter isn't strictly
valid, segfaulting in the NIR pass seems a lot meaner than blending with zero.
The referenced commit hosed Asahi, causing anything that used blending to crash.
Panfrost is unaffected since it always supplies a dual colour due to our crude
construction of blend shaders.
Fixes: 8313016543 ("nir/lower_blend: Consume dual stores")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21544 >
2023-02-27 15:47:33 +00:00
Rhys Perry
75d9a4a6ce
aco: always update orig_names in get_reg_phi()
...
No idea why this wasn't done if pc.first was a renamed temporary.
Fixes navi10 RA validation error with
dEQP-VK.binding_model.descriptor_buffer.multiple.graphics_geom_buffers1_sets3_imm_samplers
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8349
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21501 >
2023-02-27 15:10:22 +00:00
Eric Engestrom
735df516e9
radv: split linker script for android since it requires different symbols
...
Fixes: 4956f6d0bf ("radv: Add Android module info to linker script.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8338
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21518 >
2023-02-27 14:34:16 +00:00