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