platform/upstream/mesa.git
3 years agopan/bi: Map load_subgroup_invocation to FAU
Alyssa Rosenzweig [Thu, 6 May 2021 20:48:31 +0000 (16:48 -0400)]
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>

3 years agopan/bi: Drop load_sampler_lod_parameters_pan
Alyssa Rosenzweig [Sat, 3 Apr 2021 20:05:32 +0000 (16:05 -0400)]
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>

3 years agonir/divergence_anlysis: Add intrinsics for Bifrost
Alyssa Rosenzweig [Sat, 3 Apr 2021 20:05:09 +0000 (16:05 -0400)]
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>

3 years agoradv: fix extending the dirty bits to 64-bit
Samuel Pitoiset [Fri, 7 May 2021 16:07:12 +0000 (18:07 +0200)]
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: 7bdd569d7e1 ("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>

3 years agopanfrost: Use common blend lowering
Alyssa Rosenzweig [Fri, 23 Apr 2021 13:42:02 +0000 (09:42 -0400)]
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>

3 years agonir: Add blend lowering pass
Alyssa Rosenzweig [Tue, 4 May 2021 18:11:12 +0000 (14:11 -0400)]
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>

3 years agopan/lower_framebuffer: Fix bitsize mismatch
Alyssa Rosenzweig [Fri, 7 May 2021 16:23:34 +0000 (12:23 -0400)]
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>

3 years agozink: add a pipe_context::clear_buffer hook
Mike Blumenkrantz [Thu, 6 May 2021 14:44:21 +0000 (10:44 -0400)]
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>

3 years agomesa: add an extension MESA_bgra
Gert Wollny [Tue, 4 May 2021 08:59:31 +0000 (10:59 +0200)]
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>

3 years agopanfrost: Use pan_blit() when PAN_MESA_DEBUG=panblit
Boris Brezillon [Wed, 28 Apr 2021 10:51:13 +0000 (12:51 +0200)]
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>

3 years agopanfrost: Extend pan_blitter to support blit/resolve operations
Boris Brezillon [Wed, 28 Apr 2021 10:49:15 +0000 (12:49 +0200)]
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>

3 years agopanfrost: Stop assuming the viewport will always cover the framebuffer
Boris Brezillon [Fri, 30 Apr 2021 13:24:01 +0000 (15:24 +0200)]
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>

3 years agopanfrost: Don't select the blit shader fragout type twice
Boris Brezillon [Fri, 30 Apr 2021 13:17:50 +0000 (15:17 +0200)]
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>

3 years agopanfrost: Shrink the number of args passed to prepare_{bifrost,midgard}_rsd()
Boris Brezillon [Fri, 30 Apr 2021 13:15:42 +0000 (15:15 +0200)]
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>

3 years agopanfrost: Rename pan_preload_emit_varying()
Boris Brezillon [Wed, 28 Apr 2021 11:31:44 +0000 (13:31 +0200)]
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>

3 years agopanfrost: Make pan_preload_emit_viewport() applicable to blits
Boris Brezillon [Wed, 28 Apr 2021 11:23:39 +0000 (13:23 +0200)]
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>

3 years agopanfrost: Make pan_preload_emit_*_textures() applicable to blits
Boris Brezillon [Wed, 28 Apr 2021 11:12:10 +0000 (13:12 +0200)]
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>

3 years agopanfrost: Stop assigning ->position in pan_preload_emit_varying()
Boris Brezillon [Wed, 28 Apr 2021 11:09:10 +0000 (13:09 +0200)]
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>

3 years agopanfrost: Make pan_preload_emit_*_sampler() applicable to blits
Boris Brezillon [Wed, 28 Apr 2021 11:06:37 +0000 (13:06 +0200)]
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>

3 years agopanfrost: Get rid of the vertex_count arg in pan_preload_emit_varying()
Boris Brezillon [Wed, 28 Apr 2021 10:52:57 +0000 (12:52 +0200)]
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>

3 years agopanfrost: Pack pan_blit_surface fields
Boris Brezillon [Wed, 28 Apr 2021 10:37:06 +0000 (12:37 +0200)]
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>

3 years agopanfrost: Fix blit shader names
Boris Brezillon [Wed, 28 Apr 2021 10:34:10 +0000 (12:34 +0200)]
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>

3 years agopanfrost: Pass an image view to panfrost_estimate_texture_payload_size()
Boris Brezillon [Wed, 28 Apr 2021 10:32:12 +0000 (12:32 +0200)]
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>

3 years agogallium/tools: add option to use Meld for diffing
Matti Hamalainen [Thu, 22 Apr 2021 11:05:46 +0000 (14:05 +0300)]
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>

3 years agogallium/tools: improve pointer type tracking in parse.py
Matti Hamalainen [Thu, 22 Apr 2021 09:49:58 +0000 (12:49 +0300)]
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>

3 years agogallium/tools: implement "high-level" overview mode option in dump scripts
Matti Hamalainen [Wed, 21 Apr 2021 14:12:26 +0000 (17:12 +0300)]
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>

3 years agogallium/tools: improve tracediff.sh argument handling
Matti Hamalainen [Wed, 21 Apr 2021 10:23:57 +0000 (13:23 +0300)]
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>

3 years agogallium/tools: use left-column output mode of sdiff in tracediff.sh
Matti Hamalainen [Tue, 20 Apr 2021 12:35:54 +0000 (15:35 +0300)]
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>

3 years agogallium/tools: implement 'named' pointers option in dump.py
Matti Hamalainen [Tue, 20 Apr 2021 12:32:20 +0000 (15:32 +0300)]
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>

3 years agogallium/tools: implement better suppression of variants
Matti Hamalainen [Tue, 20 Apr 2021 12:24:42 +0000 (15:24 +0300)]
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>

3 years agogallium/tools: improve option handling in dump_state.py
Matti Hamalainen [Tue, 20 Apr 2021 12:15:59 +0000 (15:15 +0300)]
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>

3 years agogallium/tools: clean up tracediff.sh a bit
Matti Hamalainen [Tue, 20 Apr 2021 12:10:48 +0000 (15:10 +0300)]
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>

3 years agopps: Documentation
Antonio Caggiano [Mon, 22 Mar 2021 15:37:27 +0000 (16:37 +0100)]
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>

3 years agopps: Gfx-pps config tool
Antonio Caggiano [Tue, 30 Mar 2021 16:03:33 +0000 (18:03 +0200)]
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>

3 years agopps: Gfx-pps v0.3.0
Antonio Caggiano [Thu, 18 Mar 2021 17:30:45 +0000 (18:30 +0100)]
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>

3 years agoutil: Perfetto SDK v15.0
Antonio Caggiano [Mon, 15 Mar 2021 15:07:39 +0000 (16:07 +0100)]
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>

3 years agoutil/hash_table: _mesa_hash_table_create_u32_keys()
Mike Blumenkrantz [Sat, 1 May 2021 19:08:31 +0000 (15:08 -0400)]
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>

3 years agov3d: re-enable GLSL loop unrolling
Iago Toral Quiroga [Fri, 7 May 2021 10:32:40 +0000 (12:32 +0200)]
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: ca9e0871fb294 ('v3d: enable NIR loop unrolling')

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10684>

3 years agor600/sfn: lower to scalar with filter applied
Gert Wollny [Wed, 31 Mar 2021 08:55:57 +0000 (10:55 +0200)]
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>

3 years agogallium: pass lower_to_scalar_filter to lower_to_scalar pass
Gert Wollny [Wed, 31 Mar 2021 08:55:18 +0000 (10:55 +0200)]
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>

3 years agonir: Add filter callback for lower_to_scalar to the options
Gert Wollny [Wed, 31 Mar 2021 08:54:47 +0000 (10:54 +0200)]
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>

3 years agogallivm: handle texture arrays in non-fragment shaders with lod.
Dave Airlie [Fri, 7 May 2021 01:26:35 +0000 (11:26 +1000)]
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: e168d148d76d ("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>

3 years agozink: start using dynamic front face state
Mike Blumenkrantz [Tue, 2 Mar 2021 16:21:58 +0000 (11:21 -0500)]
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>

3 years agozink: hook up dynamic dsa states
Mike Blumenkrantz [Tue, 2 Mar 2021 16:20:39 +0000 (11:20 -0500)]
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>

3 years agozink: return current pipeline object if state hasn't changed
Mike Blumenkrantz [Tue, 19 Jan 2021 16:43:03 +0000 (11:43 -0500)]
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>

3 years agozink: flag pipeline for change more often when vbos change without dynamic state
Mike Blumenkrantz [Thu, 1 Apr 2021 20:36:01 +0000 (16:36 -0400)]
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>

3 years agozink: split vertex state pipeline hashing into its own value
Mike Blumenkrantz [Thu, 1 Apr 2021 20:52:27 +0000 (16:52 -0400)]
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>

3 years agozink: move more vertex state stuff into the hw state
Mike Blumenkrantz [Thu, 1 Apr 2021 20:50:45 +0000 (16:50 -0400)]
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>

3 years agozink: check descriptor layout support before creating it
Mike Blumenkrantz [Fri, 8 Jan 2021 12:59:51 +0000 (07:59 -0500)]
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>

3 years agozink: use explicit types during descriptor updates
Mike Blumenkrantz [Fri, 1 Jan 2021 17:11:39 +0000 (12:11 -0500)]
zink: use explicit types during descriptor updates

less derefs

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9965>

3 years agozink: abstract descriptor pool usage for programs
Mike Blumenkrantz [Fri, 1 Jan 2021 16:20:43 +0000 (11:20 -0500)]
zink: abstract descriptor pool usage for programs

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9965>

3 years agozink: abstract descriptor usage for programs
Mike Blumenkrantz [Fri, 1 Jan 2021 16:06:25 +0000 (11:06 -0500)]
zink: abstract descriptor usage for programs

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9965>

3 years agozink: abstract descriptor init
Mike Blumenkrantz [Fri, 1 Jan 2021 15:57:30 +0000 (10:57 -0500)]
zink: abstract descriptor init

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9965>

3 years agozink: unify pipeline layout creation functions
Mike Blumenkrantz [Thu, 31 Dec 2020 15:38:09 +0000 (10:38 -0500)]
zink: unify pipeline layout creation functions

these codepaths are almost identical

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9965>

3 years agozink: split off descriptor layout from descriptor pools
Mike Blumenkrantz [Tue, 5 Jan 2021 19:36:22 +0000 (14:36 -0500)]
zink: split off descriptor layout from descriptor pools

in theory we could have multiple pools per layout, but really it just makes
more sense to make the layouts persistent since they're more likely to be
reused

32bit compile fixes by Witold Baryluk

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9965>

3 years agopanfrost: Enable 16-bit support on Bifrost
Alyssa Rosenzweig [Fri, 9 Apr 2021 19:44:34 +0000 (15:44 -0400)]
panfrost: Enable 16-bit support on Bifrost

Remove the PAN_MESA_DEBUG=fp16 flag that was hiding it.

Skip two buggy dEQP tests. See linked discussion. We'll need to make
sure this gets sorted out before submitting conformance, but I don't see
a test with a fix in the pipeline as valid reason to hold back valid
code.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/bi: Enable mediump BLEND lowering
Alyssa Rosenzweig [Tue, 4 May 2021 20:05:38 +0000 (16:05 -0400)]
pan/bi: Enable mediump BLEND lowering

Other lowerings will wait until we iron out various missing features.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/bi: Garbage collect bifrost_nir.h
Alyssa Rosenzweig [Tue, 4 May 2021 19:52:08 +0000 (15:52 -0400)]
pan/bi: Garbage collect bifrost_nir.h

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/bi: Copyprop constants
Alyssa Rosenzweig [Tue, 13 Apr 2021 22:54:31 +0000 (18:54 -0400)]
pan/bi: Copyprop constants

Needed for constant folding to be effective. But don't copyprop into
instructions already reading from FAU, that will just end up adding more
moves!

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/bi: Fix int<-->float size converts
Alyssa Rosenzweig [Tue, 13 Apr 2021 17:22:18 +0000 (13:22 -0400)]
pan/bi: Fix int<-->float size converts

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/bi: Enable NIR vectorization
Alyssa Rosenzweig [Thu, 31 Dec 2020 20:00:24 +0000 (15:00 -0500)]
pan/bi: Enable NIR vectorization

We don't vectorize transcendentals, since those are scalar only in
hardware. Also don't vectorize a few places where impedance mismatches
between NIR and the hardware make handling vectors infeasible for now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/bi: Temporarily switch back to 0/~0 bools
Alyssa Rosenzweig [Thu, 6 May 2021 22:43:00 +0000 (18:43 -0400)]
pan/bi: Temporarily switch back to 0/~0 bools

Keeps things simpler while debugging vectorization woes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/bi: Handle make_vec with 1-bit bools
Alyssa Rosenzweig [Thu, 6 May 2021 21:57:17 +0000 (17:57 -0400)]
pan/bi: Handle make_vec with 1-bit bools

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/bi: Adapt branching for 1-bit bools
Alyssa Rosenzweig [Wed, 5 May 2021 16:51:30 +0000 (12:51 -0400)]
pan/bi: Adapt branching for 1-bit bools

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/bi: Change swizzled scalars to identity
Alyssa Rosenzweig [Tue, 4 May 2021 16:01:06 +0000 (12:01 -0400)]
pan/bi: Change swizzled scalars to identity

Allows packing for things like IADD.v2s16

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopanfrost: Fix typo handling blend types
Alyssa Rosenzweig [Wed, 5 May 2021 15:27:32 +0000 (11:27 -0400)]
panfrost: Fix typo handling blend types

This was right in my head.

Fixes: 93a176b6cff ("panfrost: Key blend shaders to the input types")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agopan/mdg: Model blend shader interference
Alyssa Rosenzweig [Thu, 6 May 2021 23:16:33 +0000 (19:16 -0400)]
pan/mdg: Model blend shader interference

Backport of 4439757db23 ("pan/bi: Use the interference mechanism
to describe blend shader reg use") to Midgard.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239>

3 years agomesa: s/malloc/calloc/ to silence a warning
Adam Jackson [Thu, 6 May 2021 17:26:10 +0000 (13:26 -0400)]
mesa: s/malloc/calloc/ to silence a warning

gcc 11 warns:

[846/1506] Compiling C object src/mesa/libmesa_common.a.p/main_shaderapi.c.o
In function ‘shader_source’,
    inlined from ‘_mesa_ShaderSource_no_error’ at ../src/mesa/main/shaderapi.c:2137:4:
../src/mesa/main/shaderapi.c:2095:25: warning: ‘*offsets_10 + _130’ may be used uninitialized [-Wmaybe-uninitialized]
 2095 |    totalLength = offsets[count - 1] + 2;

I can't really see how it's getting to that conclusion, but allocating
`offsets` with calloc is both natural to do here and guarantees
initialization.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10671>

3 years agoformat/fxt1: Clean up fxt1_variance's argument list
Adam Jackson [Thu, 6 May 2021 16:04:33 +0000 (12:04 -0400)]
format/fxt1: Clean up fxt1_variance's argument list

gcc 11 warns:

../src/util/format/u_format_fxt1.c:940:22: warning: ‘fxt1_variance.constprop’ accessing 128 bytes in a region of size 64 [-Wstringop-overflow=]
  940 |    int32_t maxVarR = fxt1_variance(NULL, &input[N_TEXELS / 2], n_comp);

But, suspiciously, if you inline fxt1_variance the warning goes away.
What's happening is that the 2nd arg is uint8_t[N_TEXELS][MAX_COMP], so
it looks like we're passing too small of an array in since gcc knows
that `input` is also [N_TEXELS][MAX_COMP]. Fair enough. Fix the
signature to reflect what's actually going on, and remove some unused
arguments while we're at it.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10671>

3 years agoradv: advertise VK_EXT_extended_dynamic_state2
Samuel Pitoiset [Mon, 15 Mar 2021 17:56:02 +0000 (18:56 +0100)]
radv: advertise VK_EXT_extended_dynamic_state2

This only implements dynamic primitive restart enable, depth bias
enable and rasterizer discard enable. I leave logic op and patch
control points for later.

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/10340>

3 years agoradv: implement dynamic rasterizer discard enable
Samuel Pitoiset [Mon, 15 Mar 2021 18:38:50 +0000 (19:38 +0100)]
radv: implement dynamic rasterizer discard enable

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/10340>

3 years agoradv: implement dynamic primitive restart enable
Samuel Pitoiset [Mon, 15 Mar 2021 17:51:28 +0000 (18:51 +0100)]
radv: implement dynamic primitive restart enable

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/10340>

3 years agoradv: implement dynamic depth bias enable
Samuel Pitoiset [Mon, 15 Mar 2021 17:29:44 +0000 (18:29 +0100)]
radv: implement dynamic depth bias enable

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/10340>

3 years agoradv: declare new dynamic states for VK_EXT_extended_dynamic_state2
Samuel Pitoiset [Mon, 15 Mar 2021 16:42:46 +0000 (17:42 +0100)]
radv: declare new dynamic states for VK_EXT_extended_dynamic_state2

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/10340>

3 years agoradv: declare VK_EXT_extended_dynamic_state2 but leave it disabled
Samuel Pitoiset [Mon, 15 Mar 2021 17:10:54 +0000 (18:10 +0100)]
radv: declare VK_EXT_extended_dynamic_state2 but leave it disabled

To declare new prototypes.

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/10340>

3 years agoci/freedreno: Add another daily dose of a530 flakes.
Emma Anholt [Wed, 5 May 2021 21:01:06 +0000 (14:01 -0700)]
ci/freedreno: Add another daily dose of a530 flakes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10660>

3 years agopanfrost/blend: Inline blend constants
Alyssa Rosenzweig [Thu, 22 Apr 2021 19:31:16 +0000 (15:31 -0400)]
panfrost/blend: Inline blend constants

If we're going to key them in NIR, we might as well get the benefit of
constant folding them too.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10652>

3 years agopan/mdg: Enable nir_opt_{move, sink}
Alyssa Rosenzweig [Wed, 5 May 2021 14:34:53 +0000 (10:34 -0400)]
pan/mdg: Enable nir_opt_{move, sink}

I felt bad about the last patch regressing Midgard perf, so here's some
moar Midgard perf for you ^^

total instructions in shared programs: 97089 -> 97036 (-0.05%)
instructions in affected programs: 5230 -> 5177 (-1.01%)
helped: 53
HURT: 31
helped stats (abs) min: 1 max: 17 x̄: 4.40 x̃: 6
helped stats (rel) min: 0.61% max: 12.24% x̄: 7.74% x̃: 11.54%
HURT stats (abs)   min: 1 max: 8 x̄: 5.81 x̃: 8
HURT stats (rel)   min: 1.08% max: 13.79% x̄: 9.69% x̃: 11.11%
95% mean confidence interval for instructions value: -1.89 0.63
95% mean confidence interval for instructions %-change: -3.41% 0.80%
Inconclusive result (value mean confidence interval includes 0).

total bundles in shared programs: 45612 -> 45507 (-0.23%)
bundles in affected programs: 17331 -> 17226 (-0.61%)
helped: 139
HURT: 166
helped stats (abs) min: 1 max: 21 x̄: 3.76 x̃: 2
helped stats (rel) min: 0.85% max: 18.37% x̄: 6.38% x̃: 4.55%
HURT stats (abs)   min: 1 max: 10 x̄: 2.51 x̃: 1
HURT stats (rel)   min: 0.79% max: 31.25% x̄: 7.54% x̃: 4.55%
95% mean confidence interval for bundles value: -0.90 0.21
95% mean confidence interval for bundles %-change: 0.05% 2.34%
Inconclusive result (value mean confidence interval includes 0).

total quadwords in shared programs: 77275 -> 76952 (-0.42%)
quadwords in affected programs: 32314 -> 31991 (-1.00%)
helped: 142
HURT: 179
helped stats (abs) min: 1 max: 28 x̄: 4.38 x̃: 2
helped stats (rel) min: 0.34% max: 13.79% x̄: 4.29% x̃: 2.78%
HURT stats (abs)   min: 1 max: 6 x̄: 1.67 x̃: 2
HURT stats (rel)   min: 0.44% max: 16.67% x̄: 2.93% x̃: 2.63%
95% mean confidence interval for quadwords value: -1.56 -0.45
95% mean confidence interval for quadwords %-change: -0.78% 0.25%
Inconclusive result (%-change mean confidence interval includes 0).

total registers in shared programs: 7081 -> 6771 (-4.38%)
registers in affected programs: 2217 -> 1907 (-13.98%)
helped: 193
HURT: 75
helped stats (abs) min: 1 max: 6 x̄: 2.04 x̃: 1
helped stats (rel) min: 6.25% max: 62.50% x̄: 24.32% x̃: 20.00%
HURT stats (abs)   min: 1 max: 3 x̄: 1.11 x̃: 1
HURT stats (rel)   min: 7.14% max: 50.00% x̄: 17.17% x̃: 14.29%
95% mean confidence interval for registers value: -1.37 -0.94
95% mean confidence interval for registers %-change: -15.53% -9.89%
Registers are helped.

total threads in shared programs: 5036 -> 5152 (2.30%)
threads in affected programs: 185 -> 301 (62.70%)
helped: 93
HURT: 19
helped stats (abs) min: 1 max: 2 x̄: 1.49 x̃: 1
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
HURT stats (abs)   min: 1 max: 2 x̄: 1.21 x̃: 1
HURT stats (rel)   min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for threads value: 0.82 1.25
95% mean confidence interval for threads %-change: 63.96% 85.14%
Threads are helped.

total loops in shared programs: 19 -> 19 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 2 -> 0
spills in affected programs: 2 -> 0
helped: 1
HURT: 0

total fills in shared programs: 15 -> 0
fills in affected programs: 15 -> 0
helped: 1
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10652>

3 years agopan/mdg: Remove midgard_opt_copy_prop_reg
Alyssa Rosenzweig [Wed, 5 May 2021 14:28:44 +0000 (10:28 -0400)]
pan/mdg: Remove midgard_opt_copy_prop_reg

This is known broken code, and the fix is highly nontrivial. It isn't
doing terribly much for perf, so just rip off the band-aid. Prevents a
dEQP regression, and likely fixes bugs in real apps too.

total instructions in shared programs: 96640 -> 97089 (0.46%)
instructions in affected programs: 27831 -> 28280 (1.61%)
helped: 33
HURT: 301
helped stats (abs) min: 1 max: 6 x̄: 3.64 x̃: 5
helped stats (rel) min: 1.96% max: 10.00% x̄: 6.48% x̃: 7.94%
HURT stats (abs)   min: 1 max: 18 x̄: 1.89 x̃: 1
HURT stats (rel)   min: 0.46% max: 15.00% x̄: 3.17% x̃: 2.38%
95% mean confidence interval for instructions value: 1.09 1.59
95% mean confidence interval for instructions %-change: 1.80% 2.63%
Instructions are HURT.

total bundles in shared programs: 45615 -> 45612 (<.01%)
bundles in affected programs: 11257 -> 11254 (-0.03%)
helped: 121
HURT: 146
helped stats (abs) min: 1 max: 7 x̄: 2.34 x̃: 1
helped stats (rel) min: 1.22% max: 23.33% x̄: 7.85% x̃: 5.26%
HURT stats (abs)   min: 1 max: 17 x̄: 1.92 x̃: 2
HURT stats (rel)   min: 0.42% max: 25.00% x̄: 5.17% x̃: 3.85%
95% mean confidence interval for bundles value: -0.34 0.31
95% mean confidence interval for bundles %-change: -1.69% 0.23%
Inconclusive result (value mean confidence interval includes 0).

total quadwords in shared programs: 76662 -> 77275 (0.80%)
quadwords in affected programs: 20148 -> 20761 (3.04%)
helped: 28
HURT: 275
helped stats (abs) min: 1 max: 4 x̄: 1.54 x̃: 1
helped stats (rel) min: 0.43% max: 25.00% x̄: 4.89% x̃: 2.50%
HURT stats (abs)   min: 1 max: 12 x̄: 2.39 x̃: 2
HURT stats (rel)   min: 0.51% max: 28.57% x̄: 5.18% x̃: 4.26%
95% mean confidence interval for quadwords value: 1.80 2.25
95% mean confidence interval for quadwords %-change: 3.64% 4.86%
Quadwords are HURT.

total registers in shared programs: 7078 -> 7081 (0.04%)
registers in affected programs: 1028 -> 1031 (0.29%)
helped: 62
HURT: 70
helped stats (abs) min: 1 max: 2 x̄: 1.11 x̃: 1
helped stats (rel) min: 8.33% max: 50.00% x̄: 15.03% x̃: 12.50%
HURT stats (abs)   min: 1 max: 2 x̄: 1.03 x̃: 1
HURT stats (rel)   min: 8.33% max: 66.67% x̄: 20.13% x̃: 11.25%
95% mean confidence interval for registers value: -0.17 0.21
95% mean confidence interval for registers %-change: -0.14% 7.38%
Inconclusive result (value mean confidence interval includes 0).

total threads in shared programs: 5032 -> 5036 (0.08%)
threads in affected programs: 31 -> 35 (12.90%)
helped: 12
HURT: 6
helped stats (abs) min: 1 max: 2 x̄: 1.08 x̃: 1
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
HURT stats (abs)   min: 1 max: 2 x̄: 1.50 x̃: 1
HURT stats (rel)   min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for threads value: -0.43 0.87
95% mean confidence interval for threads %-change: 13.82% 86.18%
Inconclusive result (value mean confidence interval includes 0).

total loops in shared programs: 19 -> 19 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0

total spills in shared programs: 0 -> 2
spills in affected programs: 0 -> 2
helped: 0
HURT: 1

total fills in shared programs: 0 -> 15
fills in affected programs: 0 -> 15
helped: 0
HURT: 1

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10652>

3 years agopan/mdg: Use _output_ type for outmod printing
Alyssa Rosenzweig [Wed, 5 May 2021 14:13:36 +0000 (10:13 -0400)]
pan/mdg: Use _output_ type for outmod printing

Fixes incorrect outmods printed for conversions.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10652>

3 years agodocs: mark off VK_KHR_vulkan_memory_model for turnip
Danylo Piliaiev [Thu, 6 May 2021 13:54:44 +0000 (16:54 +0300)]
docs: mark off VK_KHR_vulkan_memory_model for turnip

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10669>

3 years agolavapipe: don't access pipeline blend state when it should be ignored
Mike Blumenkrantz [Wed, 5 May 2021 13:29:41 +0000 (09:29 -0400)]
lavapipe: don't access pipeline blend state when it should be ignored

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: don't access pipeline dsa state when it should be ignored
Mike Blumenkrantz [Wed, 5 May 2021 13:29:25 +0000 (09:29 -0400)]
lavapipe: don't access pipeline dsa state when it should be ignored

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: don't access pipeline viewport state when it should be ignored
Mike Blumenkrantz [Wed, 5 May 2021 13:28:41 +0000 (09:28 -0400)]
lavapipe: don't access pipeline viewport state when it should be ignored

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: ignore tess pipeline info if no tess shaders in pipeline
Mike Blumenkrantz [Sat, 24 Apr 2021 17:17:34 +0000 (13:17 -0400)]
lavapipe: ignore tess pipeline info if no tess shaders in pipeline

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: don't unnecessarily flag dsa states for updating
Mike Blumenkrantz [Wed, 5 May 2021 13:26:57 +0000 (09:26 -0400)]
lavapipe: don't unnecessarily flag dsa states for updating

these force a new dsa state to be created and bound, which isn't necessary
if the same value is being reset

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: zero out the blend state info and flag for updating on null blend state
Mike Blumenkrantz [Wed, 5 May 2021 13:25:50 +0000 (09:25 -0400)]
lavapipe: zero out the blend state info and flag for updating on null blend state

this still needs to be updated if there's no pipeline info available

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: zero out the dsa state info and flag for updating on null dsa state
Mike Blumenkrantz [Wed, 5 May 2021 13:25:50 +0000 (09:25 -0400)]
lavapipe: zero out the dsa state info and flag for updating on null dsa state

this still needs to be updated if there's no pipeline info available

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: update more states on null multisample pipeline info
Mike Blumenkrantz [Wed, 5 May 2021 13:25:01 +0000 (09:25 -0400)]
lavapipe: update more states on null multisample pipeline info

these all need to be unset to ensure expected functionality

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: flag renderpasses as having color/zs attachments
Mike Blumenkrantz [Tue, 4 May 2021 15:58:43 +0000 (11:58 -0400)]
lavapipe: flag renderpasses as having color/zs attachments

it's useful to track this info for reuse

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: set events to the unsignalled state on creation
Mike Blumenkrantz [Tue, 4 May 2021 15:58:09 +0000 (11:58 -0400)]
lavapipe: set events to the unsignalled state on creation

this is otherwise uninitialized and not compliant with spec

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: do not read sampler descriptor info during update if layout has immutables
Mike Blumenkrantz [Tue, 4 May 2021 15:57:41 +0000 (11:57 -0400)]
lavapipe: do not read sampler descriptor info during update if layout has immutables

this is illegal

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agolavapipe: handle buffer sizes better in CmdBindTransformFeedbackBuffersEXT
Mike Blumenkrantz [Tue, 4 May 2021 15:56:24 +0000 (11:56 -0400)]
lavapipe: handle buffer sizes better in CmdBindTransformFeedbackBuffersEXT

according to spec, the pSizes array member is only used if the array is non-null
and the value is not VK_WHOLE_SIZE, otherwise this value is calculated based
on the buffer size - the offset

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10625>

3 years agopan/bi: Add two tuples to a clause when needed with NOSCHED
Icecream95 [Wed, 5 May 2021 21:02:02 +0000 (09:02 +1200)]
pan/bi: Add two tuples to a clause when needed with NOSCHED

Fixes SuperTuxKart with BIFROST_MESA_DEBUG=nosched.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10661>

3 years agopanfrost: Always write reloaded tiles when making CRC data valid
Icecream95 [Sat, 1 May 2021 10:45:11 +0000 (22:45 +1200)]
panfrost: Always write reloaded tiles when making CRC data valid

If CRC data is currently invalid and the current batch will make it
valid, write even clean tiles to make sure CRC data is updated.

Fixes: 8ba2f9f6985 ("panfrost: Create a blitter library to replace the existing preload helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10566>

3 years agopanfrost: Make pan_select_crc_rt a non-static function
Icecream95 [Sat, 1 May 2021 10:44:45 +0000 (22:44 +1200)]
panfrost: Make pan_select_crc_rt a non-static function

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10566>

3 years agonir: add nir_isub_imm
Mike Blumenkrantz [Wed, 5 May 2021 18:14:13 +0000 (14:14 -0400)]
nir: add nir_isub_imm

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10654>

3 years agogallium/inlines: remove atomic set from pipe_reference_init()
Mike Blumenkrantz [Wed, 5 May 2021 13:43:46 +0000 (09:43 -0400)]
gallium/inlines: remove atomic set from pipe_reference_init()

when an object is initialized with this, it should not be visible to any
other threads or contexts, so there should be no need to use an atomic set here

at the time of this commit, there are only two callers in the tree which pass
values != 1:
* zink uses a calculated number for framebuffer refcount on init (this is fine)
* aux/pb passes 0 on init (this is fine)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10650>

3 years agoRevert "gallium/util: Fix depth/stencil blit shaders"
Boris Brezillon [Tue, 4 May 2021 06:31:38 +0000 (08:31 +0200)]
Revert "gallium/util: Fix depth/stencil blit shaders"

This reverts commit 7ca72f172678116d29d254b786a9422b864aef3d.
Unlike what's stated in this commit, the depth or stencil components
have to be replicated on all channels, as specified in the
"Texture Sampling and Texture Formats" section of the TGSI doc
(docs/gallium/tgsi.rst).

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10649>

3 years agozink: clamp zs samplers to XXXX swizzle for all non-zero/one swizzles
Mike Blumenkrantz [Wed, 5 May 2021 13:40:51 +0000 (09:40 -0400)]
zink: clamp zs samplers to XXXX swizzle for all non-zero/one swizzles

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10649>