Commit Graph

139368 Commits

Author SHA1 Message Date
Alyssa Rosenzweig 4055b99de4 pan/bi: Add "lanes per warp" accessor
Varies by architecture version.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022>
2021-05-07 18:20:30 +00:00
Alyssa Rosenzweig 7e4ee9bd2f pan/bi: Map load_subgroup_invocation to FAU
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022>
2021-05-07 18:20:30 +00:00
Alyssa Rosenzweig 754c192e04 pan/bi: Drop load_sampler_lod_parameters_pan
Only used for an erratum workaround on Mali T720.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022>
2021-05-07 18:20:30 +00:00
Alyssa Rosenzweig db2f6b87a3 nir/divergence_anlysis: Add intrinsics for Bifrost
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022>
2021-05-07 18:20:30 +00:00
Samuel Pitoiset 54b0cfb061 radv: fix extending the dirty bits to 64-bit
New dynamic states added for VK_EXT_extended_dynamic_state2 causes
GPU hangs with vkd3d-proton.

Fixes: 7bdd569d7e ("radv: extend the dirty bits to 64-bit")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10693>
2021-05-07 18:09:00 +00:00
Alyssa Rosenzweig e0419c29cc panfrost: Use common blend lowering
Contains a number of bugfixes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10601>
2021-05-07 17:25:21 +00:00
Alyssa Rosenzweig f3de2bd6c2 nir: Add blend lowering pass
This pass was originally developed for Panfrost, where it passes the
relevant dEQP tests. Upstreaming so it can be extended and then shared
with:

* Asahi, for blending
* Zink, for logic ops
* Lavapipe, for advanced blending

Note that using this with MRT in a fragment shader (as non-panfrost
drivers will) has not yet been tested. Logic ops with integer
framebuffers are probably todo. It's been enough for Panfrost, will
suffice for ES2 on Asahi, and provides an upstream base for kusma's work
on advanced blending, so overall the merge is a net benefit.

v2: Remove bogus assert that the format layout is PLAIN. We need to
render R11G11B10, which Mesa reports as layout OTHER. The code is still
correct.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10601>
2021-05-07 17:25:21 +00:00
Alyssa Rosenzweig 0cde5ddc79 pan/lower_framebuffer: Fix bitsize mismatch
No idea why this never manifested before.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10601>
2021-05-07 17:25:21 +00:00
Mike Blumenkrantz 91bd4fc613 zink: add a pipe_context::clear_buffer hook
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10679>
2021-05-07 17:00:30 +00:00
Gert Wollny f94f2e1223 mesa: add an extension MESA_bgra
This GLES extension allows to combine the formats BGR and BGRA
as host-side formatsto be combined with the  internal formats
RGB8/SRGB8 and RGBA8/SRGB8_ALPHA8 respectively.

This extension is of interest to support a subset of OpenGL in
virtualized environments where the host only supports GLES.

Initial mesa/glformat.c patch: rohan.garg@collabora.com

v2: - Correct names for ClearTexture calls
    - Add BGR(A)_EXT tokens
    - Add format check for BGR_EXT
      (All Adam Jackson)

v3: Fix ordering in extension table (Marge)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com> (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10613>
2021-05-07 16:35:15 +00:00
Boris Brezillon 0ab2336f3f panfrost: Use pan_blit() when PAN_MESA_DEBUG=panblit
Hook-up support for native blits. We keep using u_blitter by default
for now.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon 6197c3afd1 panfrost: Extend pan_blitter to support blit/resolve operations
Right now the lib is just used for TB preloads. Let's make it generic
to support actual blits.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon c1df85ded5 panfrost: Stop assuming the viewport will always cover the framebuffer
That's not necessarily true for actual blits, so let's pass the min/max
coords to pan_blitter_emit_viewport().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon 09e65df92e panfrost: Don't select the blit shader fragout type twice
The type has already been selected when forging the key, no need to do
it again pan_blitter_emit_bifrost_blend().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon 666072c91f panfrost: Shrink the number of args passed to prepare_{bifrost,midgard}_rsd()
There's clearly no need to pass RTs/ZS views around, pass only what we
really need.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon 7d9d32d17d panfrost: Rename pan_preload_emit_varying()
This function will be used for blits too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon db92509bf6 panfrost: Make pan_preload_emit_viewport() applicable to blits
We will emit one viewport and attach it to several DCDs for multi-layer
blits. Make that possible by adjusting the prototype and rename the
function along the way.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon 7f3ea517f7 panfrost: Make pan_preload_emit_*_textures() applicable to blits
The texture descriptors will be emitted once and re-used in several
DCDs when blitting more than one layer. Rename the functions and make
them return a GPU pointer instead of filling the DCD directly.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon 1f86dd95ca panfrost: Stop assigning ->position in pan_preload_emit_varying()
It doesn't make sense to have it done in pan_preload_emit_varying().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon f149e2cdd8 panfrost: Make pan_preload_emit_*_sampler() applicable to blits
The sampler descriptors will be emitted once and re-used in
several DCDs for the multi-layer blit case. We will also need
to select the filter. Let's adjust the pan_preload_emit_*_sampler()
functions to support that and rename them along the way.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon 117e08d77c panfrost: Get rid of the vertex_count arg in pan_preload_emit_varying()
We always pass 4 anyway.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon 45c615fd05 panfrost: Pack pan_blit_surface fields
It should speed up a bit hash calculation and allow us to add extra
info without changing the structure size.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon bf0f96f893 panfrost: Fix blit shader names
first should be initialized to true if we want to get rid of the leading
';' in the shader name.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Boris Brezillon e2b8f3d036 panfrost: Pass an image view to panfrost_estimate_texture_payload_size()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10548>
2021-05-07 15:58:56 +00:00
Matti Hamalainen fefd853a56 gallium/tools: add option to use Meld for diffing
Add option -m/--meld to tracediff.sh to use Meld
<https://meldmerge.org/> instead of sdiff for comparing
traces.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10648>
2021-05-07 15:48:03 +00:00
Matti Hamalainen 118e8a505a gallium/tools: improve pointer type tracking in parse.py
In our simplistic model of assigning types to pointer, we treat
return values specially because their "type" can't be known
easily before their first use. Improve the "ret" handling by
removing one from their count when we reassign the type to
something else.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10648>
2021-05-07 15:48:03 +00:00
Matti Hamalainen 7ef828b563 gallium/tools: implement "high-level" overview mode option in dump scripts
As per the suggestion in #4609, implement mode/option -M/--method-only
which only prints call method names, for quick overview of what is
happening in the trace. The same option can be used with both
dump.py and tracediff.sh.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10648>
2021-05-07 15:48:03 +00:00
Matti Hamalainen 0112e3c7ea gallium/tools: improve tracediff.sh argument handling
Implement better argument parsing/handling in tracediff.sh
so that the options passed to dump.py and sdiff are not required
to be positional.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10648>
2021-05-07 15:48:03 +00:00
Matti Hamalainen 3369a132c4 gallium/tools: use left-column output mode of sdiff in tracediff.sh
Enabling --left-column option for sdiff inside tracediff.sh we
get output that only shows the differing lines on the right column.

This, when used with the -N/--named option should make many
trace diffs more understandable.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10648>
2021-05-07 15:48:03 +00:00
Matti Hamalainen d730c18bdb gallium/tools: implement 'named' pointers option in dump.py
As suggested by zmike in issue #4609, raw pointer values in
are problematic for diffing state dumps. In attempt to remedy
this, we implement an option --named/-N in dump.py that
generates symbolic names for all pointers based on the context.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10648>
2021-05-07 15:48:03 +00:00
Matti Hamalainen 054b2afcb9 gallium/tools: implement better suppression of variants
Previously some variants (such as execution time and call number
were suppressed in tracediff.sh via a sed script. It makes sense
to implement an option to leave out such variants to begin with
in dump.py, so let's do so and use it.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10648>
2021-05-07 15:48:03 +00:00
Matti Hamalainen 0834a42773 gallium/tools: improve option handling in dump_state.py
Previously we inherited some options from parse.py, but
that made no sense for some of the options that are not
needed for dump_state.py (such as --plain, as we output
only JSON format text.)

So, remove the inherit and implement filename argument
here independantly.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10648>
2021-05-07 15:48:03 +00:00
Matti Hamalainen a6765412fe gallium/tools: clean up tracediff.sh a bit
Clean up tracediff.sh shellscript slightly, partially in preparation
for upcoming changes. Also add a signal handler for removing the
created temporary directory and files if we are interrupted.

Also, use the new --plain option of dump.py to suppress output
of ANSI color/formatting codes, so we do not have to post-filter
them later.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10648>
2021-05-07 15:48:03 +00:00
Antonio Caggiano f6be64ef66 pps: Documentation
Add documentation for Perfetto and Gfx-pps, together with some perfetto
config files to use as a starting point.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9652>
2021-05-07 13:41:38 +00:00
Antonio Caggiano 948f780915 pps: Gfx-pps config tool
Add helpful tool to query pps capabilites such as supported devices,
counters and counter groups, and to dump counter values to stdout.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9652>
2021-05-07 13:41:38 +00:00
Antonio Caggiano 1cc72b2aef pps: Gfx-pps v0.3.0
Add the gfx-pps backbone in `src/pps`.

v2: Simplify supported drivers creation.
v3: No default getter is provided for counters.
v4: Open DRM device in read/write mode.
v5: Wait for datasource to be started.
v6: Set FIFO scheduler while sampling counters.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9652>
2021-05-07 13:41:38 +00:00
Antonio Caggiano a0738525ed util: Perfetto SDK v15.0
Add Perfetto SDK v15.0 as a dependency using a meson wrap.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9652>
2021-05-07 13:41:38 +00:00
Mike Blumenkrantz c449a8a2c1 util/hash_table: _mesa_hash_table_create_u32_keys()
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10673>
2021-05-07 13:14:08 +00:00
Iago Toral Quiroga e5fc2064fc v3d: re-enable GLSL loop unrolling
Disabling it that made us start to fail register allocation for a
few tests. Re-enable it until we figure out what is causing that.

Fixes: ca9e0871fb ('v3d: enable NIR loop unrolling')

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10684>
2021-05-07 12:34:36 +00:00
Gert Wollny c80877b535 r600/sfn: lower to scalar with filter applied
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9943>
2021-05-07 12:09:03 +00:00
Gert Wollny e36d5c5f6e gallium: pass lower_to_scalar_filter to lower_to_scalar pass
v2: Fix the callback name

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9943>
2021-05-07 12:09:03 +00:00
Gert Wollny b4600d9352 nir: Add filter callback for lower_to_scalar to the options
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9943>
2021-05-07 12:09:03 +00:00
Dave Airlie 83a05caaf2 gallivm: handle texture arrays in non-fragment shaders with lod.
We have to unwind the lod into the scalar path correctly.

Fixes a crash with renderdoc demo

Fixes: e168d148d7 ("gallivm/nir: handle non-uniform texture offsets")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10676>
2021-05-07 02:41:29 +00:00
Mike Blumenkrantz cca9201922 zink: start using dynamic front face state
this doesn't actually do anything other than test the codepath since
the hashed pipeline state will still change on every frontface change,
but it's a start

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10508>
2021-05-07 02:00:54 +00:00
Mike Blumenkrantz 27d1ecd54b zink: hook up dynamic dsa states
this is pretty straightforward, just adding some extra calls

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10508>
2021-05-07 02:00:54 +00:00
Mike Blumenkrantz e645f71c68 zink: return current pipeline object if state hasn't changed
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10508>
2021-05-07 02:00:54 +00:00
Mike Blumenkrantz ce31c840b6 zink: flag pipeline for change more often when vbos change without dynamic state
this is always going to be bad for perf, but we still need to force updates anytime
we know for sure they'll be needed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10508>
2021-05-07 02:00:54 +00:00
Mike Blumenkrantz ff1941aa08 zink: split vertex state pipeline hashing into its own value
by creating a separate hash value for vertex state, changes to the vbos and
bindings requires massively less overhead as it doesn't require the rest of
the pipeline state to be rehashed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10508>
2021-05-07 02:00:54 +00:00
Mike Blumenkrantz 7ca64c1c4d zink: move more vertex state stuff into the hw state
this simplifies a lot of the hashing since only the vertex state pointer
needs to be hashed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10508>
2021-05-07 02:00:54 +00:00
Mike Blumenkrantz d7a1bd94fb zink: check descriptor layout support before creating it
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9965>
2021-05-07 01:50:11 +00:00