Commit Graph

4156 Commits

Author SHA1 Message Date
David Heidelberg 84767a5160 ci/lava: every LAVA job doesn't want to run gles2 deqp, drop it
Very annoying when adding new job and not getting failure due to missing
`DEQP_VER: `

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21702>
2023-03-11 14:48:20 +00:00
Daniel Stone 50378f59a7 ci: Actually run Piglit on LAVA
At some point in a refactoring long ago, our 'Piglit' runs on arm64
started actually being dEQP-GLES2 runs. Oh dear.

Surprisingly, there are a number of expectation changes; added every
fail I saw from a long overnight stress test.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21851>
2023-03-11 11:58:30 +00:00
Daniel Stone 6f1aa8cfc1 ci/fdno: Add a618 Vulkan flakes
It looks like descriptors are generically a bit broken, which takes out
a massive number of tests periodically.

The pipeline-library tests also have some unknowable issues.

cf. #8219

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21740>
2023-03-09 14:47:57 +00:00
Alyssa Rosenzweig c8147e69d3 ir3: Drop non-scoped barrier handling
Now unreachable.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21634>
2023-03-07 00:41:13 +00:00
Mark Collins 66d2ae0386 meson: forcefully disable libdrm when host doesn't have it
Signed-off-by: Mark Collins <mark@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21724>
2023-03-06 22:40:55 +00:00
Alyssa Rosenzweig 4b6d98a40c ir3: Use lower_index_to_offset
Instead of doing the add ourselves.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21546>
2023-03-06 21:38:32 +00:00
Daniel Stone 34d45df8ff ci/fdno: Only run full tests on a limited subset of machines
Though not many people run full test runs, it occupies 2/7 a630 slots
for nearly 2 hours. If more than one person does this at a time, it can
be an effective DoS and make merges time out.

Limit full runs to a subset of the runners, such that at least some of
them will always be available for us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21737>
2023-03-06 19:56:39 +00:00
Rob Clark 399012a911 freedreno/common: Replace or_mask() with BitsetEnum<T>
Use template and operator overloading to make dealing with bitmask enums
shared between C and C++ easier.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21535>
2023-03-06 19:27:19 +00:00
Rob Clark 5f5ccf4bec turnip: Use libdrm shim
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21636>
2023-03-05 16:31:51 +00:00
David Heidelberg b73b701579 ci/freedreno: rare flake KHR-GL45.sample_variables.mask.rgba8i.samples_4.mask_3
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21718>
2023-03-05 14:34:33 +00:00
Eric Engestrom 6f654d532b tu: add linker script to fix android symbols
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21631>
2023-03-04 07:41:10 +00:00
Samuel Pitoiset f775873f81 ci: uprev CTS to 1.3.5.0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21390>
2023-03-03 08:23:21 +00:00
Timothy Arceri d75a36a9ee glsl: remove do_copy_propagation_elements() optimisation pass
Since 13b859de do_copy_propagation_elements() has a flaw where
the time it takes to complete grows exponentially slowers as the number
of nested loops increases. It can also hurt rather than help verses
just letting NIR optimise the code. So if the NIR linker is enabled we
let it handle it instead.

shader-db results Iris (BDW):

total instructions in shared programs: 11177181 -> 11199739 (0.20%)
instructions in affected programs: 119424 -> 141982 (18.89%)
helped: 109
HURT: 65
total cycles in shared programs: 368946819 -> 372277173 (0.90%)
cycles in affected programs: 116539428 -> 119869782 (2.86%)

total spills in shared programs: 3983 -> 8785 (120.56%)
spills in affected programs: 2072 -> 6874 (231.76%)
helped: 0
HURT: 6

total fills in shared programs: 2016 -> 6068 (200.99%)
fills in affected programs: 230 -> 4282 (1761.74%)
helped: 0
HURT: 6

LOST:   85
GAINED: 77

freedreno results:

total instructions in shared programs: 11011122 -> 11011620 (<.01%)
instructions in affected programs: 939829 -> 940327 (0.05%)
total full in shared programs: 762725 -> 762674 (<.01%)
full in affected programs: 1096 -> 1045 (-4.65%)
total constlen in shared programs: 1772092 -> 1771596 (-0.03%)
constlen in affected programs: 2780 -> 2284 (-17.84%)
total stp in shared programs: 4040 -> 4058 (0.45%)
stp in affected programs: 3656 -> 3674 (0.49%)
total ldp in shared programs: 2160 -> 2178 (0.83%)
ldp in affected programs: 1748 -> 1766 (1.03%)
stp HURT:   shaders/robclark-shaders/gfxbench5/gl_5_high_off/13.shader_test CL: 1231 -> 1234 (0.24%)
stp HURT:   shaders/robclark-shaders/gfxbench5/gl_5_normal_off/13.shader_test CL: 1231 -> 1234 (0.24%)
stp HURT:   shaders/robclark-shaders/gfxbench5/gl_5_high_off/15.shader_test CL: 453 -> 456 (0.66%)
stp HURT:   shaders/robclark-shaders/gfxbench5/gl_5_normal_off/15.shader_test CL: 453 -> 456 (0.66%)
stp HURT:   shaders/robclark-shaders/gfxbench5/gl_5_high_off/17.shader_test CL: 144 -> 147 (2.08%)
stp HURT:   shaders/robclark-shaders/gfxbench5/gl_5_normal_off/17.shader_test CL: 144 -> 147 (2.08%)

however, those stp counts are misleading -- gfxbench gl-5-normal actually
gets its scratch (ldp/stp) stored as 16 bits instead of 32 thanks to
better NIR copy prop, and the result is 2.64398% +/- 0.0991923% perf
improvement!

i915 results:

total instructions in shared programs: 510528 -> 510489 (<.01%)
instructions in affected programs: 3303 -> 3264 (-1.18%)
total tex_indirect in shared programs: 16708 -> 16717 (0.05%)
tex_indirect in affected programs: 134 -> 143 (6.72%)
total temps in shared programs: 30181 -> 30169 (-0.04%)
temps in affected programs: 1268 -> 1256 (-0.95%)
LOST:   0
GAINED: 1

i915 highlights:
instructions HURT:   shaders/closed/steam/legend-of-grimrock/47.shader_test FS: 141 -> 144 (2.13%)
instructions HURT:   shaders/closed/steam/steamworld-dig/22.shader_test FS: 84 -> 108 (28.57%)
temps HURT:   shaders/closed/steam/left-4-dead-2/medium/3682.shader_test FS: 7 -> 13 (85.71%)

r300 results:

total instructions in shared programs: 1340439 -> 1340845 (0.03%)
instructions in affected programs: 32354 -> 32760 (1.25%)
total temps in shared programs: 179394 -> 179329 (-0.04%)
temps in affected programs: 1505 -> 1440 (-4.32%)
total consts in shared programs: 1177742 -> 1177885 (0.01%)
consts in affected programs: 1107 -> 1250 (12.92%)
total lits in shared programs: 24992 -> 25019 (0.11%)
lits in affected programs: 138 -> 165 (19.57%)
instructions HURT:   shaders/closed/steam/legend-of-grimrock/26.shader_test FS: 47 -> 52 (10.64%)
instructions HURT:   shaders/closed/steam/sanctum-2/6072.shader_test FS: 43 -> 48 (11.63%)
instructions HURT:   shaders/closed/steam/champions-of-regnum/2378.shader_test VS: 35 -> 40 (14.29%)

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13288>
2023-03-01 16:09:25 +00:00
David Heidelberg 0912b14b3a ci/freedreno: add flaking KHR-GL45.buffer_storage.map_persistent_flush
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21598>
2023-02-28 17:28:06 +00:00
Mike Blumenkrantz 7c8a5f6e37 vulkan/wsi: switch to using an options struct for last param
this makes adding values easier since the drivers won't need to be updated

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21447>
2023-02-27 13:21:21 +00:00
Georg Lehmann a00b50d820 nir: change 16bit image dest folding option to per type
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21404>
2023-02-27 09:55:34 +00:00
Rob Clark 4c711460d4 tu/kgsl: Propagate tu_physical_device_init() errors
Should fix dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Rob Clark 6a28986eb4 tu+meson: Re-work KMD selection
Now that turnip can support multiple kernel-mode drivers in a single
build, re-work the meson option to have a single list of KMDs, rather
than special options to enable kgsl for turnip or virtio for gallium.

It is temporarily a bit awkward as gallium does not yet support kgsl
and turnip does not yet support virtio.  But both of those are planned
or in-progress, so long term a single list is the most sensible option.

TODO freedreno/drm support to build with only virtio support.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Rob Clark 407e4929de turnip: Refactor device loading
1) Allow the two different entrypoints for drm vs non-drm (kgsl) to
   coexist.
2) Split the generic drm related device initialization from the msm
   specifics.  This will simplify adding support for additional drm
   based kernel mode drivers (ie. virtgpu)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Rob Clark 3b3882d4c5 turnip: Handle kgsl vs drm specifics at runtime
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Rob Clark fc06e35a58 turnip: Move QueueWaitIdle entrypoint to kgsl
Handle in the same way as other kgsl specific entrypoints.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Rob Clark 1170efcf01 turnip: Allow knl backend specific entrypoints
Because kgsl sync primitives are not drm_syncobj, the kgsl kernel
support needs the ability to patch in it's own entrypoints related
to fences, etc.  The current entrypoint table magic using weak syms
won't work if we are building both kgsl and drm support into one
binary, so switch to runtime patching in the kgsl specific entry-
points.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Rob Clark fd2b014a12 turnip: Split out vfuncs for kernel interface
To allow support for multiple KMD's to coexist, split out vfuncs.  This
doesn't quite *yet* let us have kgsl and msm coexist, because of the
different vk entrypoints needed by the kgsl backend.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Rob Clark f84fce767d turnip: drm code-motion
Move a few functions around in prep for next commit.  Only code-motion.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Rob Clark 1cb702def4 turnip: Move things to prep for multi-kernel support
The end goal is a single build that supports kgsl (non-drm) as well
as msm and virtgpu (both drm).  First lets move around some files to
accomodate that.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Rob Clark 73dfcbf7e8 vk/runtime: Allow enumerate and try_create_for_drm to coexist
For drivers that can support both drm and non-drm kernel mode drivers it
is useful to be able to provide both entrypoints.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
David Heidelberg 08ba87481b ci/freedreno: add flaking KHR-GL45.buffer_storage.map_persistent_dispatch
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21531>
2023-02-25 16:21:18 +00:00
Faith Ekstrand 96c832c47e spirv: Always emit deref_buffer_array_length intrinsics
All the drivers have been converted to setting this option now except
imagination and they don't support SSBOs yet.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3993
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Faith Ekstrand 85634a70ec turnip: Set spirv_options::use_deref_buffer_array_length
It'll get lowered to get_ssbo_size by nir_lower_explicit_io() so the
driver should never notice this change.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21446>
2023-02-24 20:37:10 +00:00
Konrad Dybcio 6d93f4f867 freedreno: Add A2xx REG_A2XX_RBBM_PM_OVERRIDE2 bitfields
Required for good-looking kernel code

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21480>
2023-02-24 14:48:27 +00:00
Konrad Dybcio 891a8bfb2d freedreno: Add A2xx perf counter reg values
Required for good-looking kernel code

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
[rob: fixup CI expectations]

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21480>
2023-02-24 14:48:27 +00:00
Emma Anholt 0b976dee49 ci/zink+turnip: Disable flaky minetest trace.
random 1-pixel changes sometimes.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21366>
2023-02-24 07:31:36 +00:00
Emma Anholt 2a7debd1ca ci/turnip: Drop the #8219 xfail.
It hasn't showed up in the last couple runs, the other test is no longer
showing up in the caselist so the fail isn't triggered.  Bug is still
there, though.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21366>
2023-02-24 07:31:36 +00:00
Emma Anholt 0cc34b7bb9 ci/freedreno: Drop a530 piglit_gl coverage.
It hasn't worked in a long time -- the board gets wedged 20 minutes in and
then we reboot it and try again until failure.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21366>
2023-02-24 07:31:36 +00:00
Rob Clark 9e8450b65c freedreno/crashdec: Disable GALLIUM_DUMP_CPU
We don't want util_cpu to vomit cpu caps all over the test output.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Rob Clark 3f227957d6 freedreno/crashdec: Handle multi-IB prefetching
Add helper to scan the CP_INDIRECT_BUFFERs, and then work backwards
accounting for data buffered via ROQ prefetch to deduce the actual
SQE position at the time of the crash.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Rob Clark ddc4e87438 freedreno/crashdec: Add another prefetch test
Constructed with an invalid packet (0xdeadd00d) so there is no ambiguity
in the crash location.

This is expected to fail until the next commit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Rob Clark 643ee85103 freedreno/crashdec: Refactor crashdec tests
Simplify the process of adding additional tests.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Connor Abbott 7417432a28 freedreno/crashdec: Add prefetch test
Add a crash where this was seen "in the wild" on a CTS test in
!17943 which requires handling multi-IB prefetching to correctly
location the crash location.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Rob Clark 9ececfc6e6 freedreno/cffdec: Fix hang location detection
We were previously checking only every 8 dwords within the packet.  We
should instead just check if the hang location comes within the packet.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Rob Clark 924f264081 freedreno/cffdec: Add helper to parse CP_INDIRECT_BUFFER
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Rob Clark c01ac4b583 freedreno/cffdec: Add helper to find next pkt
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Rob Clark cb13e24758 freedreno/cffdec: Fix unitialized count for pkt2
This was causing us to use the size of the previous packet.  Which just
happened to land on a valid packet because pkt2 only followed a
CP_INDIRECT_BUFFER.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Connor Abbott 4060cf5772 freedreno/crashdec: Fix apparent off-by-one with ROQ size
I have multiple examples where this register is too large by one
when comparing to the ROQ read/write pointers in CP_ROQ_*_STAT and the
ROQ data itself, as if it includes the dword most recently read too. I
have an example where it's off by 2 compared to the read pointer, but
the read pointer is also off by 1 itself judging by the SQE program
counter, so that may just be them not getting synchronized. This
off-by-one was getting in the way of figuring out exactly IB2 was being
processed in the next commit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Connor Abbott ce7225c0f9 freedreno/a6xx: Fill in ROQ status registers
We had a bunch of registers only defined for some parts of ROQ but now
that we know the pattern for ROQ-related registers it's easy to fill in
the rest.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Connor Abbott 44054b1f3b freedreno/a6xx: Fix CP_ROQ_THRESHOLDS_1
Just by adding the ROQ_*_STAT registers following the previous pattern
it becomes obvious what these fields actually are.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Connor Abbott aba8aea2be freedreno/a6xx: Add CP_ROQ_*_STAT
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Connor Abbott 8c6d741e26 freedreno/a6xx: Rename CP_CSQ_IB*_STAT
These don't correspond to the a3xx *_STAT registers, which we're about
to add so we need to rename them. The closest analogue is CP_CSQ_AVAIL,
although the sense is inverted (and we're not sure what the low 16 bits
are about). Also, the a3xx distinction between CSQ and STQ doesn't exist
anymore so don't use these outdated terms.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>
2023-02-23 20:02:26 +00:00
Eric Engestrom fbd644c59d meson: replace vk_wsi_args with dependencies to let meson take care of transitivity
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19497>
2023-02-23 09:42:46 +00:00
Danylo Piliaiev e6f5480180 ir3: Add cat7 sleep instruction
Has short and long variants, long seem to be ~20 times longer.
The exact difference between it and a bunch of nops is unknown.

The emission of this instruction were not observed in the wild.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14419>
2023-02-21 19:59:14 +00:00
Danylo Piliaiev 121e4ca87d ir3: Add cat5/cat7 cache related instructions
- tcinv - Likely Texture Cache Invalidate (unverified)
- icinv - Mostly sure that it is Instruction Cache Invalidate
- dccln - Data Cache Clean
- dcinv - Data Cache Invalidate
- dcflu - Data Cache Flush

The emission of these instructions were not observed in the wild.

TODO: find out the difference between .shr and .all modes of
      dccln, dcinv, dcflu.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14419>
2023-02-21 19:59:14 +00:00
Daniel Schürmann 2bb369dd8d nir: add assertions that loops don't have a Continue Construct
Hoping that I didn't miss any, this *should* add assertions
to all functions and passes which explicitly handle 'nir_loop'.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13962>
2023-02-21 10:41:11 +00:00
Amber 919c5568bf freedreno: check for conditional rendering in launch_grid
fixes: KHR-GL45.compute_shader.conditional-dispatching

Signed-off-by: Amber Amber <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21428>
2023-02-20 19:03:25 +00:00
Timothy Arceri 34e11963fa ci: enable dEQP-VK.ubo.random.all_shared_buffer.48
The previous commits fix the slow compile time, allowing us to
enable this test.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5152

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20381>
2023-02-16 23:31:59 +00:00
Rob Clark 9673502b3b freedreno/drm: Optimize stateobj re-emit
For long-lived stateobjs, it is common to re-emit to the same submit
multiple times.  By giving each submit a unique sequence # we can detect
this case and skip the extra append_bo().

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21274>
2023-02-16 19:57:13 +00:00
Rob Clark 6747d30155 freedreno: Add seqno helper
It is a pretty common pattern to allocate a non-zero sequence # for
lightweight checking if an object is the same, changed, for use in cache
keys, etc.  (And also pretty common to forget to handle the rollover
zero case.)  Add a helper for this.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21274>
2023-02-16 19:57:13 +00:00
Rob Clark 35fc1595b3 freedreno/a6xx: Pre-compute PROG related LRZ state
PROG state mostly just disables various LRZ related flags, which can
be handled as a simple mask.  The exception is ztest mode, which is
either overriden by PROG state, or we use the all 1's value (which
isn't valid from hw standpoint) to signal that it needs to be computed
at draw time, which fortunately fits in with the bitmask approach.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21274>
2023-02-16 19:57:13 +00:00
Rob Clark cfd4721ee0 freedreno/drm: Make rb refcnt non-atomic
Now that the one special case where multiple threads could race to
ref/unref, we can go back to using non-atomic refcnts.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21274>
2023-02-16 19:57:13 +00:00
Danylo Piliaiev be976e0aa6 ci/tu: Add 1/200 pass to test for stale reg usage
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21226>
2023-02-16 17:43:10 +00:00
Danylo Piliaiev 86f82d4224 docs/freedreno: Add info about stale reg stomper dbg option
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21226>
2023-02-16 17:43:10 +00:00
Danylo Piliaiev a66d9c815d turnip: Add debug option to find usage of stale reg values
MESA_VK_ABORT_ON_DEVICE_LOSS=1 \
TU_DEBUG_STALE_REGS_RANGE=0x00000c00,0x0000be01 \
TU_DEBUG_STALE_REGS_FLAGS=cmdbuf,renderpass \
./app

To pinpoint the reg causing a failure reducing regs range could be
used for bisection. Some failures may be caused by multi-reg combination,
in such case set 'inverse' flag which would change the meaning of reg
range to "do not stomp these regs".

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21226>
2023-02-16 17:43:10 +00:00
Chia-I Wu 28d0ddead0 turnip: avoid FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8 for event blits
We don't need it for event blits.  It also does not support fast clears
which makes it slower.

For event blits, blob has

  VK_FORMAT_D16_UNORM           -> FMT6_16_UNORM
  VK_FORMAT_X8_D24_UNORM_PACK32 -> FMT6_Z24_UNORM_S8_UINT
  VK_FORMAT_D32_SFLOAT          -> FMT6_32_FLOAT
  VK_FORMAT_S8_UINT             -> FMT6_8_UINT
  VK_FORMAT_D24_UNORM_S8_UINT   -> FMT6_Z24_UNORM_S8_UINT
  VK_FORMAT_D32_SFLOAT_S8_UINT  -> FMT6_32_FLOAT + FMT6_8_UINT

and always sets RB_BLIT_INFO:DEPTH.  It is unclear what
RB_BLIT_INFO:DEPTH is for but we set it anyway.

Improves "glmark2 -b refract" on angle by 15-20% on a618/a635.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8218
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21116>
2023-02-16 01:35:50 +00:00
Chia-I Wu bac6062d10 turnip: fix a null descriptor set dereference
Fixed
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.other.null_descriptor_set_in_monolithic_pipeline.

Fixes: cb3872f2cd ("tu: Implement VK_EXT_descriptor_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21328>
2023-02-15 20:36:30 +00:00
Chia-I Wu bce8e7f2ae turnip: fix a major leak with GPL LTO
This allows dEQP-VK.pipeline.pipeline_library.* to run to finish.

Fixes: e9f5de11d4 ("tu: Initial implementation of VK_EXT_graphics_pipeline_library")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21328>
2023-02-15 20:36:30 +00:00
Danylo Piliaiev c7f18e4183 tu: Don't expose KHR_present_id,KHR_present_wait without KHR_swapchain
VK_KHR_present_id and VK_KHR_present_wait depend on VK_KHR_swapchain
being present, which is not present at least on Android/KGSL.

Fixes:
src/vulkan/util/vk_extensions.h:450: void assert_device_extensions_requirements(
 const struct vk_device_extension_table *, const struct vk_instance_extension_table *):
 assertion "!device_ext->KHR_present_id || device_ext->KHR_swapchain" failed

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21345>
2023-02-15 20:21:17 +00:00
Erik Faye-Lund 29ffc79410 meson: don't pass vk wsi args where they don't belong
Only code that cares about Vulkan WSI should get the corresponding
arguments passed. Otherwise, the Vulkan headers might end up including
other headers that we don't have the correct dependencies passed for.
So let's give those a dedicated variable, and only pass that where it's
actually needed.

Fixes: b39958a3a1 ("anv,nir: Move the ANV YCbCr lowering pass to common code")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8193
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21185>
2023-02-15 18:35:14 +00:00
Danylo Piliaiev b7ab83d59f ir3: Consider dst type in ubo_vec4 to ldc lowering
The dst type could be either 16b or 32b.

Fixes validation failure in dEQP-VK.subgroups.* tests which deal with
16b types.

 validation fail: (type_size(instr->cat6.type) <= 16) == !!((instr->dsts[0])->flags & IR3_REG_HALF)
   -> for instruction: MESA: info: 0023:0000:000:        ldc.offset0.base0 hssa_23 (wrmask=0x3), ssa_1, ssa_22

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21316>
2023-02-15 09:49:39 +00:00
Emma Anholt 5c246e21b7 Revert "freedreno/a5xx: Fix clip_mask"
This reverts commit 2dfebf3487.

It causes GPU hangs in piglit tests like
spec@glsl-1.20@execution@clipping@vs-clip-vertex-enables, for reasons I'm
totally unclear on.  The commit was not necessary, because the frontend
lowering already handles disabled clip planes by storing 0.0 to the
corresponding clipdist array element in that shader variant.  Add a note
to that effect.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21298>
2023-02-14 00:16:50 +00:00
Emma Anholt 509c1f9fea ci/freedreno: Update manual-run xfails for a530.
While I'm having a hard time stabilizing most of the test list on this HW
due to the clip-enable GPU hangs leaking into random other tests, these
have been consistent in the last 4 runs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21298>
2023-02-14 00:16:50 +00:00
Alyssa Rosenzweig 2854dca898 tu,vulkan: Add common Get*OpaqueCaptureDescriptorDataEXT
In both tu and radv, these are all trivial. Move the trivial implementation from
tu to common code to deduplicate the boilerplate.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by; Samuel Pitoiset <samuel.pitoiset@gmail.com>

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21230>
2023-02-13 07:43:11 +00:00
Jonathan Marek dda35e616b turnip: fix use of align() instead of util_align_npot() with tile_align_w
tile_align_w isn't always a power of two.

Fixes: aae679e221

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21251>
2023-02-11 04:56:52 +00:00
Danylo Piliaiev 2d20564a6a turnip: Disable draw states after dyn renderpass in all cases
Draw states were not disabled after a dynamic renderpass which
spans several command buffers, the next renderpass if started in
the same command buffer wouldn't emit the full draw state,
since TU_CMD_DIRTY_DRAW_STATE was not set by previous renderpass.

The issue could be observed when corrupting all regs at cmdbuf start in:
 dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed7_geometry

Fixes: cb0f414b2a
("tu: Add support for suspending and resuming renderpasses")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21148>
2023-02-10 20:29:40 +00:00
Danylo Piliaiev 855fa78866 turnip: Ensure that there is no renderpass rotation in binning
It appears that A6XX_GRAS_SC_CNTL::rotation applies to the binning,
so we should ensure there is no unexpected rotations and apply with
A6XX_GRAS_SC_CNTL during the binning pass.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21148>
2023-02-10 20:29:40 +00:00
Danylo Piliaiev 43ea1f2dfb freedreno: Document A6XX_GRAS_SC_CNTL::rotation field
Likely used for VK_QCOM_render_pass_transform.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21148>
2023-02-10 20:29:40 +00:00
Danylo Piliaiev 388e4ea733 tu: Prevent using stale value of GRAS_SC_CNTL in sysmem clear
cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21148>
2023-02-10 20:29:40 +00:00
Danylo Piliaiev 981f1d88a1 tu: Prevent using stale value of RB_UNKNOWN_88D0 on BLIT
Fixes: def56b531c
("tu: Support GMEM with layered rendering and multiview")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21148>
2023-02-10 20:29:40 +00:00
Amber 40bdd2bbf7 freedreno: use A6XX_GRAS_SC_CNTL_SINGLE_PRIM_MODE with fb readback
fixes:
dEQP-GLES31.functional.blend_equation_advanced.msaa.*

Signed-off-by: Amber Amber <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21161>
2023-02-10 20:01:43 +00:00
Yonggang Luo 09061e2fe9 vulkan: Use static_assert for check HWVULKAN_DISPATCH_MAGIC == ICD_LOADER_MAGIC
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21210>
2023-02-10 07:21:31 +00:00
Chia-I Wu 620baf9c42 freedreno/registers: document more bits of CP_REG_TEST
On gen3+, there are 32 predicate bits instead of 1.

I set out to see why CP_REG_TEST (and others commands that read
registers) is slower on gen1 but could not find anything.  Since the
blob seems to use multiple predicate bits, let's keep them documented.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21206>
2023-02-10 04:12:08 +00:00
Chia-I Wu 0278462575 turnip: skip unnecessary CP_REG_TEST for cond load/store
When no attachment allows conditional load/store, skip the unnecessary
CP_REG_TEST.

This is done to avoid a performance trap on a618 (gen1).  CP_REG_TEST or
any command that reads a register is slow on a618.

glmark2 score goes from 830 to 1001.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8162
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21206>
2023-02-10 04:12:08 +00:00
Chia-I Wu 37f6714fe7 turnip: add a comment to tu_render_pass_cond_config
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21206>
2023-02-10 04:12:08 +00:00
Emma Anholt ba73aaa0da ci/freedreno: Update a3xx piglit_shader xfails.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt e182970692 ci/freedreno: Add an xfail for a618 VK full run.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt a8a6be1641 ci/freedreno: Update a530 manual-run xfails.
A lot of this looks like fractional run test list updates.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt e267d72979 ci/freedreno: Disable the a306_piglit_gl job.
It's broken with recurring hangchecks.  Someone would need to restabilize
it, but turn it off for anyone to find until someone (me? :( ) cares.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21205>
2023-02-10 02:53:09 +00:00
Emma Anholt cc0b749890 ci/freedreno: Don't forget to report flakes on a618, too.
I just noticed that our flake reports are only coming from cheza, which is
a bummer because almost all the VK coverage is on a618 unless you're
kicking off a full run.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21092>
2023-02-09 02:13:39 +00:00
Amber 20d4c592c9 freedreno: make sure depth/stencil layouts are always tiled
Small depth/stencil textures were using linear tiling, but depth/stencil
attachments cannot use linear tiling for sysmem rendering.

Fixes:
 KHR-GL45.geometry_shader.layered_framebuffer.stencil_support
 KHR-GL45.geometry_shader.layered_framebuffer.depth_support

Signed-off-by: Amber Amber <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21046>
2023-02-08 22:55:52 +00:00
Rob Clark eaf272aa93 ir3: Quiet unused variable warning
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21195>
2023-02-08 18:27:55 +00:00
Rob Clark 2c8c151591 freedreno/drm/virtio: Limit guest handles passed to virtgpu
We only need to have virtgpu in the loop for shared buffers when
implicit sync is in play.  The rest of the time we can rely on userspace
fence waits.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21143>
2023-02-08 17:36:23 +00:00
Rob Clark 53ba7d8867 freedreno/drm: Move sa_cpu_prep() to core
Now that we can do a blocking wait on an fd_fence (which the suballoc
heap already depended on) we can just move the fence wait into core
leaving the backend cpu_prep() implementation only needing to care
about implicit sync on shared buffers.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21143>
2023-02-08 17:36:23 +00:00
Chia-I Wu d6fb4d8d7d freedreno/registers: correct WFM bit in CP_REG_TEST
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21151>
2023-02-08 06:17:12 +00:00
Chia-I Wu 4054b08f39 turnip: reorder tu6_format_*
This is cosmetic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:05 +00:00
Chia-I Wu 6a76bd8d4c turnip: handle ubwc in blit_base_format
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:05 +00:00
Chia-I Wu 3c4eea2aab turnip: add blit_format_color and blit_base_format
Similar to blit_format_texture but for blit dst.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:05 +00:00
Chia-I Wu 75f601279b turnip: add blit_format_texture
The use of FMT6_8_8_8_8_UNORM for z24s8/z24x8 is for blit src.  Make
that clear by moving the logic from fd6_texture_format to the newly
added blit_format_texture.  Add a comment on why this is simpler than in
fdl6_view_init.

This should have no functional change in practice.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:04 +00:00
Chia-I Wu 659b2e56bd turnip: let tu6_format_vtx* take pipe format
For consistency with other tu6_format_* functions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:04 +00:00
Chia-I Wu 41bf169a93 turnip: make tu6_format_*_supported static
They have no external user.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:04 +00:00
Chia-I Wu f710911f2f turnip: remove tu_native_format::tile_mode
It is dead code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:04 +00:00
Chia-I Wu de45fc8d80 turnip: move a comment about FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:04 +00:00
Chia-I Wu 273a01f43e turnip: add a comment to tu_format_for_aspect
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21117>
2023-02-08 03:26:04 +00:00
Rob Clark 284547af55 freedreno+ir3: Move storage_16bit to compiler options
This isn't a thing in gl.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21152>
2023-02-07 01:26:45 +00:00
Ian Romanick ea413e826b nir: Eliminate nir_op_f2b
Builds on the work of !15121.  This gets to delete even more code
because many drivers shared a lot of code for i2b and f2b.

No shader-db or fossil-db changes on any Intel platform.

v2: Rebase on 1a35acd8d9.

v3: Update a comment in nir_opcodes_c.py. Suggested by Konstantin.

v4: Another rebase. Remove f2b stuff from Midgard.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20509>
2023-02-03 22:39:57 +00:00
Emma Anholt fd28452631 turnip: Make the tiling-impossible case have an impossible tile layout.
This helped me catch inappropriate tiling work being done in this case.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21004>
2023-02-02 14:56:15 -08:00
Emma Anholt 3c3bd12af7 tu: Only emit the conditional gmem subpass resolves when gmem is possible.
No sense emitting this work when the subpass deps or attachment size
prevents gmem.  Noticed when I had uninit values in the tiling layout.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21004>
2023-02-02 14:56:15 -08:00
Emma Anholt aae679e221 turnip: Optimize tile sizes to reduce the number of bins.
We were aiming for very square tiles, but it's actually better for us to
reduce the number of different bins so you take fewer trips through the
geometry and keep the caches hotter.  Example changes to aztec ruins on
angle:

    3x3 tiles of 352x352 to 4x2 tiles of 256x512
    4x5 tiles of 256x224 to 5x4 tiles of 224x256
    17x11 tiles of 160x128 to 14x11 tiles of 192x128
    12x7 tiles of 224x224 to 7x11 tiles of 384x128
    12x8 tiles of 224x192 to 7x11 tiles of 384x128
    11x6 tiles of 256x256 to 12x5 tiles of 224x288
    11x7 tiles of 256x224 to 7x9 tiles of 384x160
    8x4 tiles of 352x352 to 6x5 tiles of 448x288

and minecraft:

    3x3 tiles of 352x352 to 4x2 tiles of 256x512
    12x6 tiles of 256x256 to 3x23 tiles of 1024x64
    12x7 tiles of 256x224 to 8x9 tiles of 384x160

FPS changes:
VK aztec ruins normal: 1.12478% +/- 0.213393% (n=67)
ANGLE manhattan_31:    +1.42813% +/- 0.893332% (n=7).
ANGLE minecraft:       no change (n=21)
ANGLE google_maps:     +6.80618% +/- 2.40857% (n=4)
ANGLE trex_200:        no change (n=11)
ANGLE pubg:            no change (n=21)

Fixes: #8160
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21004>
2023-02-02 14:56:13 -08:00
Emma Anholt e27f84c56e tu: Mark tiling impossible if we couldn't lay out gmem in the first place.
We were leaving the field undefined, which tripped me up later.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21004>
2023-02-02 14:55:59 -08:00
Emma Anholt 8839baee57 ci: Drop the itoral-gl-terrain demo from traces.
There's an app bug in the CSM rendering that causes undefined results.

Fixes: #8212
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21055>
2023-02-02 18:42:45 +00:00
Amber e8bfb71660 ir3: use lower_image_samples_to_one
This is necessary to properly support ARB_shader_texture_image_samples
fixes crash in KHR-GL45.shader_texture_image_samples_tests.image_functional_test

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Reviewer-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Amber Amber <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20813>
2023-02-01 19:52:49 +00:00
Rob Clark 13fe9c3e63 freedreno/ir3: Scalarize load_ssbo
The benefits of turning it into isam (which needs to be scalar as the
SSBO is sampled as a single component R32 texture) outweigh the benefits
of vectorizing.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20975>
2023-02-01 17:28:41 +00:00
Rob Clark 5eb85ef756 freedreno/decode: Increase size of offsets table
The offsets table stores offsets of a buffer (such as cmdstream) that
we've already dumped.  The suballoc pool results in more suballocated
cmdstream allocated from a single backing buffer, meaning that we need
to increase the size of this table.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20975>
2023-02-01 17:28:41 +00:00
Alyssa Rosenzweig 05d3238692 nir/opt_preamble: Treat *size as an input
Some backends may wish to reserve early uniforms for internal system values, and
use the remaining space for preamble storage. In this case, it's convenient to
teach nir_opt_preamble about a reserved offset. It's logical to treat the output
*size instead of an in/out variable that nir_opt_preamble adds to. This requires
a slight change to the consumers to zero the input.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by-(with-sparkles): Asahi Lina <lina@asahilina.net>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20562>
2023-01-31 17:02:34 +00:00
Rob Clark a192923f99 freedreno/drm: Restart import on zombie race
If we hit the race condition of looking up an already imported BO that
is in the process of being destroyed, the handle will be GEM_CLOSE'd,
meaning that the handle that we just got from the kernel is probably not
valid.  So in this case we should retry.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20961>
2023-01-30 15:48:41 +00:00
Rob Clark bb438c8dc7 freedreno/drm/virtio: Flush before CREATE_BLOB
The RESOURCE_CREATE_BLOB ioctl can carry a ccmd payload, similarly to
EXECBUF.  But we need to preserve the order of buffered execbuf cmds
which haven't been flushed to the guest kernel yet, rather than let the
CREATE_BLOB payload jump to the head of the queue.  Otherwise, for ex,
the host could see the guest requesting an iova that has not yet been
(from it's perspective) released.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20961>
2023-01-30 15:48:41 +00:00
Amber 17b610771d ir3: support texture and sampler index with offsets
"If this texture instruction has a nir_tex_src_texture_offset source,
then the texture index is given by texture_index + texture_offset."

This fixes the failures for:
spec@arb_arrays_of_arrays@execution@sampler@fs-nested-struct-arrays-nonconst-nested-array
spec@arb_gl_spirv@execution@uniform@sampler2d-nonconst-nested-array

Signed-off-by: Amber Amber <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20954>
2023-01-28 18:00:31 +00:00
Chia-I Wu d7ef1331b5 turnip: make debug_flags a global variable
Add tu_env as a global variable and add tu_env_init to initialize it.
Add TU_DEBUG macro to check debug flags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20946>
2023-01-27 21:23:18 +00:00
Chia-I Wu 511c42ef4e turnip: replace TU_DEBUG_DONT_CARE_AS_LOAD by a bool
Instead of using TU_DEBUG=dontcare_as_load, it can still be overriden
using vk_dont_care_as_load=true.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20946>
2023-01-27 21:23:18 +00:00
Erik Faye-Lund b6a344f4ba meson: do not reconstruct ICD paths
Meson will already construct these paths for us, so let's reuse them
instead of throwing away the result and recontstructing them.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20907>
2023-01-27 11:35:50 +00:00
Erik Faye-Lund fd72369b65 freedreno/meson: simplify script-path logic
When passing this to files(), there's no point in prepending
current_source_dir. Let's simplify this a bit.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20907>
2023-01-27 11:35:50 +00:00
Rob Clark 15e19d04f0 freedreno/drm: Synchronize handle close and lookup
Handle lookup (for example PRIME_FD_TO_HANDLE) must be synchronized with
GEM_CLOSE, otherwise re-import can race with bo_del path, resulting in
the handle of the newly (re)imported BO getting closed.  Now that the
finalize step has been decoupled, fixing this is mostly just deleting
code.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>
2023-01-26 22:21:47 +00:00
Rob Clark 444db624df freedreno/drm: Split out bo->finalize()
The complexity around batching up handle closing is simply to allow the
virtgpu to back up ccmd's to the host (because virtio/virtgpu is pretty
inefficient when it comes to lots of small msgs to the host, and it is
common that when we are deleting BOs, we delete a lot of them at the
same time.  But that will make the locking fix in the next commit
impossible (without nested locks).  So let's flip this around and do the
step that virtgpu wants to batch up first, before we get into closing
GEM handles, etc.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>
2023-01-26 22:21:47 +00:00
Rob Clark 5a46e884ea freedreno/drm: Remove bo_del_or_recycle()
In prep for the next patch, where locking is swapped around to cover the
whole bo_del() path, decouple handling of the recycle-to-BO-cache path.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>
2023-01-26 22:21:47 +00:00
Rob Clark 160137ccae freedreno/drm: Detect zombie BOs
When importing from a GEM name or dmabuf fd, we can race with the final
unref of the same BO, in which case we can get a hit in the handle
table for an fd_bo that another thread is about to free().  Detect and
handle this case.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>
2023-01-26 22:21:47 +00:00
Rob Clark 547f50c244 freedreno/drm: Add some ref/unref debugging
Helpful to catch common refcnt issues, like resurrecting a zombie
object.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20918>
2023-01-26 22:21:47 +00:00
Konrad Dybcio 50dee85b68 freedreno/registers: Add RBBM_GPR0_CNTL for non-GMU operation
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20925>
2023-01-26 15:45:50 +00:00
Rob Clark f9bcf19e52 freedreno/a6xx: Add a few kernel regs/etc
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20925>
2023-01-26 15:45:50 +00:00
Amber 228d812a0c ir3, isaspec: add raw instruction to assembler/disassembler.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20789>
2023-01-26 14:26:11 +00:00
Emma Anholt f6c06ef2f6 ci: Add manual rules variations to disable irrelevant driver jobs.
If you're only affecting one or a couple of drivers, it would be nice if
your pipeline buttons on the web UI weren't full of manual run buttons for
all the other drivers.

This is a bunch of duplicated lines, but less than it could have been now
that we have !references.

In some of these cases (i915g, nouveau, etnaviv), we have no non-manual
jobs for those drivers, so I could have just rewritten the original
"driver-rules" to "driver-manual-rules".  I decided to keep things
consistent between drivers, though, because this is all esoteric enough to
readers already without making different drivers' rules look different.

Fixes: #4891
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17445>
2023-01-26 00:48:19 +00:00
Emma Anholt 67547a04b6 ci: Move the performance jobs' allow_failure:true to the gl rules.
This helps clarify what's going on with these magic manual jobs.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17445>
2023-01-26 00:48:19 +00:00
Emma Anholt ab5dd2467f ci/freedreno: Mark max-texture-size as a flake.
It's been a popular spurious fail in merges in the last week.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20894>
2023-01-25 01:06:00 +00:00
Emma Anholt 849af68dbd ci/piglit: Add some common piglit skips for Mesa CI's testing of glx.
Since our X servers don't have a compositor, and we run tests in parallel,
various swap and frontbuffer tests won't ever be stable.  Rather than
having every driver have to track those flakes, make a general X11 skips
list as a known issue of our CI rather than pointing fingers at drivers.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>
2023-01-24 00:13:02 +00:00
Emma Anholt ac5b1df2b9 ci: Move PIGLIT_PLATFORM settings out of the .tomls.
I'm going to add some automatic platform-based skips lists shortly (like
all-skips but more targeted), and this avoids needing to add them to each
.toml.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>
2023-01-24 00:13:02 +00:00
Emma Anholt 83c2b26acf ci/freedreno: Switch the piglit job to using a deqp-runner suite.
This is one of the few remaining piglit-runner.sh users.

I think the notable change here is that we no longer set
EGL_PLATFORM=surfaceless like the piglit-runner.sh script did.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20798>
2023-01-24 00:13:02 +00:00
David Heidelberg 4c1544b38a ci: Sir trace has small invisible change in rendering
Unrelated to MR itself.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20819>
2023-01-22 23:25:24 +00:00
Rob Clark 1c82981bbe freedreno: Add driconf to disable conservative LRZ
The problematic sequence of draws is pretty rare.  But there are a small
handful of games which do not exhibit the problematic sequence and for
which invalidating LRZ on draws with blend plus depthwrite enabled hurts
performance slightly.  This driconf option enables opting in to the
previous behavior.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
2023-01-20 16:18:03 +00:00
Rob Clark 720c842c50 turnip: Invalidate LRZ on blend+depthwrite
See the previous commit for details.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
2023-01-20 16:18:03 +00:00
Rob Clark 899f2218fe turnip: Rename lrz force_disable_mask
Prep to use it to communicate more than just force-disable cases.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20708>
2023-01-20 16:18:03 +00:00
Danylo Piliaiev 926f626b95 tu/kgsl: do not use kgsl_command_object::offset
offset field in kgsl_command_object is NOT used by KGSL, so
we should offset directly to iova.

Fixes weird hangs on KGSL. E.g. fixes the hang in:
 dEQP-VK.memory.pipeline_barrier.transfer_dst_storage_texel_buffer.1024

cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20795>
2023-01-20 10:50:20 +00:00
David Heidelberg a8d2b288ee ci/piglit: 2023-01-19 uprev
Emergency uprev to get robustness against http 50x errors for traces.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20788>
2023-01-19 23:46:44 +00:00
Dylan Baker c31629ee78 meson: remove version checks for < 0.59
Which is now required, so these are useless

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
2023-01-19 23:06:07 +00:00
Amber ab9dd18b68 util/u_trace: pass utrace context to marker functions.
This is needed later by freedreno in order to get
more device information in trace functions.

Signed-off-by: amber@igalia.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20727>
2023-01-18 10:53:36 +00:00
Dave Airlie 589d4ff0cb vulkan/format: add a 10-bit video format
This adds support to the generic vulkan format code for
VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16
which is used for 10-bit H265.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
(Updated version acked by Lynne on irc)

v2: disable these for freedreno

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20389>
2023-01-18 06:36:27 +00:00
Rob Clark 0c30e0fa00 freedreno/a6xx: Expose SSBO/image for all shader stages
Now that we've removed the limitation of a single bindful IBO state, we
can expose IBO support on all shader stages.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20687>
2023-01-18 06:10:10 +00:00
Rob Clark 165de87f8e freedreno/ir3: Let driver specify fb-read descriptor
Let the driver control where the shader should look for fb-read
descriptor.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20687>
2023-01-18 06:10:10 +00:00
Rob Clark 4982adb4cf freedreno/ir3: Stop copying options
Just copy the entire ir3_compiler_options into ir3_compiler, to make it
easier to add new options.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20687>
2023-01-18 06:10:10 +00:00
Emma Anholt 64455dc32b freedreno/pps: Fix a signed/unsigned complaint.
../src/freedreno/ds/fd_pps_driver.cc:656:44: error: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'const unsigned int' [-Werror=sign-compare]
  656 |             assert(d->assigned_counters[i] < g->num_counters);
cc1plus: all warnings being treated as errors

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20660>
2023-01-18 05:04:46 +00:00
Emma Anholt 302858c48c ci/freedreno: Add glx-swap-event-async as a flake.
It's only happened a few times in the last year (used to be more popular),
but it just took out a merge.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20660>
2023-01-18 05:04:46 +00:00
Rob Clark ca2011d11c freedreno/drm: Remove assert
We can hit this scenario if there is a GPU hang before the userspace
fence writeback happens.  Since we have asserts enabled in CI, just
remove this assert.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20575>
2023-01-17 19:32:13 +00:00
Rob Clark aa7c83786d freedreno/ci: Add an a618 flake
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20749>
2023-01-17 16:33:29 +00:00
Rob Clark a7a46556ec Revert "freedreno/ci: Switch a630 jobs over to manual"
This reverts commit 0cc3701338.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20749>
2023-01-17 16:33:29 +00:00
Rob Clark 23e6d0ce79 Revert "freedreno/ci: Switch also performance a630 job to manual"
This reverts commit 3be7a28b24.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20749>
2023-01-17 16:33:29 +00:00