Erik Faye-Lund
deb7fa10a2
st/mesa: do not take util_logbase2 of a negative size
...
It's possible to get all width, height and depth as negative here, and
if we take the util_logbase2 of that, we get a nonsense value that might
be outside of the range the driver supports. So let's clamp to zero here
to avoid having to make the drivers overly pessimistic about what the
state-tracker demands.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10689 >
2021-05-10 16:38:04 +00:00
Rob Clark
8ad7a7c7b3
docs/perfetto: Updates for freedreno and render-stages
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Rob Clark
1fadcfedb7
pps: Add a more interesting cfg example
...
Includes counters and renderstages, as well as CPU process/freq, vblank,
dma_fence, etc. This is a more reasonable starting point for system
level tracing.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Rob Clark
3a772be026
freedreno: Add perfetto renderpass support
...
Add a custom DataSource to provide trace events for render stages.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Rob Clark
27fe7d8fb4
freedreno: Moar header C++-proofing
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Rob Clark
133a3e4dd3
freedreno/pps: Detect GPU suspend on newer kernels
...
We can avoid re-sending the configuration cmdstream constantly if we
know the device has not suspended since the last sampling period.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Rob Clark
e63ef520fe
freedreno/drm: Add support to query device suspend count
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Rob Clark
3e4f1798d4
gallium/aux: Add perfetto support to u_trace
...
Not really direct perfetto support, but add a way that tracepoints can
be associated with a driver provided callback which can generate
perfetto events using the timestamps collected on the GPU.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Rob Clark
3e13e45467
freedreno: Add freedreno pps driver
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Rob Clark
ecfb00fb09
util/perfetto: Add one-time init
...
Various places around mesa which might want to register a data-source,
etc, should call util_perfetto_init() first to ensure we connect to the
tracing service.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Rob Clark
7327c051d0
pps: Lower min sampling interval
...
A shorter interval lets us have more granularity to see counter changes
per tile pass.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Acked-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901 >
2021-05-10 15:34:07 +00:00
Simon Ser
0e94675494
radv: stop special-casing multi-planar formats in radv_get_modifier_flags
...
In radv_get_modifier_flags, we had a special case for multi-planar
formats. However ac_is_modifier_supported should already take care of
rejecting unsupported modifiers for multi-planar buffers.
Some time ago, ac_is_modifier_supported rejected any non-linear modifier
for multi-planar formats. 35e25ea1d0 ("ac/surface: allow non-DCC modifiers
for YUV on GFX9+") changed that to allow non-DCC modifiers with
multi-planar formats on GFX9+. Since then, the radv check has been out
of sync.
A similar patch was applied to radeonsi in 979e138695 ("radeonsi: stop
special-casing YUV formats in si_query_dmabuf_modifiers").
This fixes tiling artifacts with NV12 buffers.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10623 >
2021-05-10 14:31:21 +00:00
Karol Herbst
e9c6569227
nouveau/mm: remove unused nouveau_mm_allocation.next field
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8765 >
2021-05-10 12:20:21 +00:00
Karol Herbst
de0a0d2f02
nouveau/mm: pass mm_bucket to mm_slab_new
...
We relied on mm_slab_new choosing the same bucket the caller used, just
pass it in.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8765 >
2021-05-10 12:20:21 +00:00
Karol Herbst
b7d2add5e0
nouveau: fix race in nouveau_screen_get_name
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8765 >
2021-05-10 12:20:21 +00:00
Karol Herbst
98280e8348
clover/memory: fix data race in buffer subclasses
...
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8765 >
2021-05-10 12:20:21 +00:00
Rhys Perry
a54f111831
radv,aco: compact vertex buffer descriptors
...
It seems common for there to be holes.
fossil-db (GFX10.3, robustBufferAccess enabled):
Totals from 33791 (23.10% of 146267) affected shaders:
(no statistics changed)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7871 >
2021-05-10 12:09:14 +00:00
Rhys Perry
20a0744e22
Revert "radv,aco: don't use MUBUF for multi-channel loads on GFX8 with robustness2"
...
This reverts commit a8a6b9fb2fdcb1bea55707fa0c2b8e96f03c6b5b.
This is no longer necessary now that we fixup the size when creating the
descriptors.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7871 >
2021-05-10 12:09:14 +00:00
Rhys Perry
157c6b0f33
radv,aco: use per-attribute vertex descriptors for robustness
...
We have to use a different num_records for each attribute to correctly
implement robust buffer access.
fossil-db (GFX10.3, robustBufferAccess enabled):
Totals from 60059 (41.06% of 146267) affected shaders:
VGPRs: 2169040 -> 2169024 (-0.00%); split: -0.02%, +0.02%
CodeSize: 79473128 -> 81156016 (+2.12%); split: -0.00%, +2.12%
MaxWaves: 1635360 -> 1635258 (-0.01%); split: +0.00%, -0.01%
Instrs: 15559040 -> 15793205 (+1.51%); split: -0.01%, +1.52%
Latency: 90954792 -> 91308768 (+0.39%); split: -0.30%, +0.69%
InvThroughput: 14937873 -> 14958761 (+0.14%); split: -0.04%, +0.18%
VClause: 444280 -> 412074 (-7.25%); split: -9.22%, +1.97%
SClause: 588545 -> 644141 (+9.45%); split: -0.54%, +9.99%
Copies: 1010395 -> 1011232 (+0.08%); split: -0.44%, +0.53%
Branches: 274279 -> 274282 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1431171 -> 1405056 (-1.82%); split: -2.89%, +1.07%
PreVGPRs: 1575253 -> 1575259 (+0.00%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7871 >
2021-05-10 12:09:14 +00:00
Rhys Perry
dfa38fa0c7
aco: group loads from the same vertex binding into the same clause
...
In the future, we might have vertex attribute loads from the same binding
but with different descriptors. Since they will be loading from the same
buffer, we should continue grouping them into clauses.
No fossil-db changes.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7871 >
2021-05-10 12:09:14 +00:00
Timur Kristóf
4bb2e42fb4
radv: Properly enable Wave32 mode for NGG GS.
...
The condition for enabling it was incorrect, and was always false.
Therefore, it was never really enabled.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10683 >
2021-05-10 11:39:23 +00:00
Timur Kristóf
925bd5f990
radv: Ignore GS copy shader when determining NGG GS wave size.
...
The GS copy shader is not used with NGG GS.
This fixes a big bug when NGG GS is running in Wave32 mode.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10683 >
2021-05-10 11:39:23 +00:00
Juan A. Suarez Romero
ea463f9bff
ci/broadcom: update expected results
...
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10694 >
2021-05-10 10:11:09 +00:00
Tapani Pälli
181beece3c
nir: skip assert check with empty structs
...
Fixes issues with upcoming CTS test testing empty structs.
v2: decorate with UNUSED as only used in assert (Timothy)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10681 >
2021-05-10 08:07:29 +03:00
Alyssa Rosenzweig
15b5573194
agx: Set reads_tib appropriately
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
d0f566a90d
agx: Implement load_output
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
1b9b2f9046
agx: Condition writeout ops on already being emitted
...
There's a lot of r/e waiting here, but will be needed for ld_tile. Match
the Metal blob.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
41d8db33a2
agx: Assume lower_fragcolor has been called
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
1164c992cf
agx: Add ld_tile opcode
...
Variant of st_tile.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
07fdc0015e
agx: Rename blend -> st_tile
...
For symmetry.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
06fe6651b3
agx: Implement blend constant color sysvals
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
5fd489a6bd
agx: Return agx_instr* from emit_intrinsic
...
Aesthetically useful.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
dd64463d5f
asahi: Pass through "reads tilebuffer?" bit
...
To be determined if there's more to this, but it's the only bit I see
varying with Metal when blending is enabled.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
e2332dea05
asahi: Fix shader key hash function
...
Fixes: 080b05e29e ("asahi: Add Gallium driver")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
bedf1019be
asahi: Call nir_lower_fragcolor
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:19 -04:00
Alyssa Rosenzweig
d76ab2b5d6
asahi: Add blend constant system value
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:19 -04:00
Alyssa Rosenzweig
30d1223247
asahi: Implement set_blend_color
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:19 -04:00
Alyssa Rosenzweig
6b7cc1fa8f
asahi: Garbage collect bind_state
...
From noop.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:19 -04:00
Alyssa Rosenzweig
91b9839bf7
asahi: Call nir_lower_blend with selected key
...
Also need to key to pipe formats.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:11 -04:00
Alyssa Rosenzweig
f2179ed4f3
asahi: Augment Gallium key with blend state
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:17:50 -04:00
Alyssa Rosenzweig
77f1f12000
asahi: Translate blend CSO to lower_blend options
...
We'll just stick this in the key.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:17:49 -04:00
Mike Blumenkrantz
564519dc84
zink: rework memory_barrier hook again (third time's the charm)
...
this improves granularity for the barriers and is more in line with the
spec for glMemoryBarrier
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10706 >
2021-05-10 02:21:13 +00:00
Mike Blumenkrantz
25ab2347f8
zink: fix texture barriers for real this time
...
according to spec, this is supposed to handle fragment shader fetch
from previous draw output, not color output readback from previous
color output write
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10706 >
2021-05-10 02:21:13 +00:00
Mike Blumenkrantz
4ebae25e17
zink: break out draw dispatch into separate functions
...
this is much easier to read and is going to greatly simplify the eventual
multidraw implementation which will be dropped in
also it allows moving conditionals outside of loops to very slightly improve
drawoverhead performance (with multidraw)
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10701 >
2021-05-10 01:39:46 +00:00
Mike Blumenkrantz
9e5d927d22
zink: remove compute cruft from resource mapping
...
this used to sync the compute batch, now it does nothing
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10707 >
2021-05-10 01:12:36 +00:00
Mike Blumenkrantz
b0c51cdc9e
zink: add debug assert to verify that zink_clear_framebuffer() is accurate
...
this should never be called for buffers that don't have pending clears
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10705 >
2021-05-10 01:02:22 +00:00
Mike Blumenkrantz
5ac6c70214
zink: break zs clear loop once both bits are set when beginning renderpass
...
no point in looping this any more than we have to
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10705 >
2021-05-10 01:02:22 +00:00
Mike Blumenkrantz
94aeb1041f
zink: handle in-renderpass clears in fb_clears_apply_internal()
...
this isn't used yet, but it may as well be handled in case that changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10705 >
2021-05-10 01:02:22 +00:00
Mike Blumenkrantz
b715aaa5f1
zink: only set layer info for samplerviews if there are multiple layers
...
fixes a bunch of validation errors
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10703 >
2021-05-10 00:52:08 +00:00
Mike Blumenkrantz
3c1ecb93d3
zink: simplify samplerview surface creation
...
instead of manually creating the ivci, there's already a util function for
that which will handle everything
also only set layer info if there are multiple layers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10703 >
2021-05-10 00:52:08 +00:00