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
Mike Blumenkrantz
75068967ee
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 >
2021-05-07 01:50:11 +00:00
Mike Blumenkrantz
eb446af697
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 >
2021-05-07 01:50:11 +00:00
Mike Blumenkrantz
86047feac8
zink: abstract descriptor usage for programs
...
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
Mike Blumenkrantz
11b5c07771
zink: abstract descriptor init
...
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
Mike Blumenkrantz
2dfe9d8b7f
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 >
2021-05-07 01:50:11 +00:00
Mike Blumenkrantz
7d9b6b071a
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 >
2021-05-07 01:50:11 +00:00
Alyssa Rosenzweig
d4d3328b95
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
793d18b79b
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
d3ba26be37
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
ff36e40145
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
1049bb4374
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
0f6e45f8b2
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
646e03c451
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
8db4166c58
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
7793c9ab02
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
3d78cc5876
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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
b7a757b2f7
panfrost: Fix typo handling blend types
...
This was right in my head.
Fixes: 93a176b6cf ("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 >
2021-05-06 23:26:21 +00:00
Alyssa Rosenzweig
54046d61f8
pan/mdg: Model blend shader interference
...
Backport of 4439757db2 ("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 >
2021-05-06 23:26:21 +00:00
Adam Jackson
90cbab7cae
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 >
2021-05-06 21:25:47 +00:00
Adam Jackson
4770d6c01d
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 >
2021-05-06 21:25:47 +00:00
Samuel Pitoiset
d96507b73f
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 >
2021-05-06 20:58:59 +00:00
Samuel Pitoiset
dd19bf9d7d
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 >
2021-05-06 20:58:59 +00:00
Samuel Pitoiset
c40d7fadc3
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 >
2021-05-06 20:58:59 +00:00