Timur Kristóf [Fri, 3 Sep 2021 10:21:47 +0000 (12:21 +0200)]
ac/nir: Fix match_mask to work correctly for VS outputs.
match_mask checks the intrinsic type and decides whether it's
per-patch or not. VS don't have per-patch outputs,
so this causes wrong behaviour there.
Found using the GCC undefined behavior sanitizer.
Fixes the following error:
runtime error:
shift exponent
18446744073709551584 is too large
for 64-bit type 'long unsigned int'
Closes: #5319
Fixes:
bf966d1c1dd968116b8b547ca2739f5113caccb5
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12719>
Emma Anholt [Fri, 17 Sep 2021 17:50:32 +0000 (10:50 -0700)]
mesa/st: Allow loops in GLSL when NIR is enabled, even if the HW can't.
The jump lowering enabled by EmitNoLoops breaks GLSL's loop unrolling on
various obviously unrollable loops, resulting in a lot of deqp-gles2 and
piglit failures. NIR will help unroll whatever GLSL doesn't, so we can
trust the driver to apply that after GLSL's unrolling, so no need to ask
GLSL to lower all loops.
Fixes: #4979
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12917>
Emma Anholt [Fri, 17 Sep 2021 00:13:48 +0000 (17:13 -0700)]
ci/i915g: Clarify failure happening in fbo-fragcoord2.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12917>
Philipp Zabel [Thu, 16 Sep 2021 16:33:51 +0000 (18:33 +0200)]
etnaviv: fix dirty bit check for baselod emission
Since baselod is stored in sampler state, not sampler view, we should
check the ETNA_DIRTY_SAMPLERS bit instead of ETNA_DIRTY_SAMPLER_VIEWS.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12916>
Zachary Michaels [Wed, 8 Sep 2021 23:34:17 +0000 (16:34 -0700)]
X11: Ensure that VK_SUBOPTIMAL_KHR propagates to user code
Commit
0245b825 switched from returning the error code VK_ERROR_OUT_OF_DATE_KHR
to returning the success code VK_SUBOPTIMAL_KHR. Prior to that commit, the error
code caused all code paths to fail immediately, but the success code does not.
Currently the success code is not recorded in some scenarios, resulting in a
result of VK_SUCCESS instead. This breaks applications that rely on the
result (per the spec) to trigger resizes.
This commit ensures that the proper VK_SUBOPTIMAL_KHR success code is set as a
sticky status (as comments indicate was intended), ensuring that it is
propagated to user code.
Fixes #5331
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12782>
Samuel Pitoiset [Wed, 18 Aug 2021 15:25:22 +0000 (17:25 +0200)]
radv: keep depth/stencil images compressed for TRANSFER_DST on compute
Only if the image is TC-compat HTILE because it can be decompressed
on compute for partial copies.
This should remove few depth/stencil decompressions for RAGE2 and Red
Dead Redemption 2 because they declare all images as concurrent but
never use the compute queue for them.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12452>
Samuel Pitoiset [Wed, 18 Aug 2021 15:22:07 +0000 (17:22 +0200)]
radv: add support for copying compressed depth/stencil images on compute
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12452>
Samuel Pitoiset [Wed, 18 Aug 2021 15:02:09 +0000 (17:02 +0200)]
radv: implement depth/stencil expand on compute
This works as long as the image is TC-compatible HTILE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12452>
Samuel Pitoiset [Wed, 18 Aug 2021 14:48:31 +0000 (16:48 +0200)]
radv: rename radv_decompress_depth_stencil()
To radv_expand_depth_stencil() for consistency.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12452>
Boris Brezillon [Mon, 20 Sep 2021 12:43:05 +0000 (14:43 +0200)]
panfrost/ci: Skip the indirect_draw+XFB tests
We lack a dependency between the vertex job filling the indirect draw
buffers and the indirect draw compute job reading from these buffers,
leading to unreliable results (the tests pass if the vertex job is
done before the compute job starts, and fail otherwise). Let's disable
those tests until we sort it out.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12589>
Boris Brezillon [Mon, 20 Sep 2021 11:51:10 +0000 (13:51 +0200)]
panfrost: Fix collision in the indirect draw shader table
Min/max index search shaders are different for the !primitive_restart
and primitive_restart. We need to add entries for the primitive restart
cases otherwise we might retrieve a wrong shader from the cache.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12589>
Boris Brezillon [Tue, 24 Aug 2021 08:48:40 +0000 (10:48 +0200)]
panfrost: Fix indirect draws when vertex or instance count is 0
In that case we should just skip the vertex/tiler jobs as done in the
direct draw path.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12589>
Italo Nicola [Mon, 20 Sep 2021 07:18:56 +0000 (07:18 +0000)]
panfrost: fix null deref when no color buffer is attached
Do not dereference color buffer #0 in the SFBD code path if no color buffer is
attached, as with depth-only attachments. Fixes a crash running glmark2 -b
shadow on Mali T720.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Fixes:
c746747cb82 ("panfrost: fix GL_EXT_multisampled_render_to_texture regression")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12927>
Boris Brezillon [Wed, 4 Aug 2021 11:45:47 +0000 (13:45 +0200)]
panfrost: Prepare shader helpers to per-gen XML
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/12935>
Boris Brezillon [Fri, 6 Aug 2021 12:24:31 +0000 (14:24 +0200)]
panfrost: Prepare texture helpers to per-gen XML
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/12935>
Boris Brezillon [Fri, 6 Aug 2021 12:09:43 +0000 (14:09 +0200)]
panfrost: Prepare pan_encoder.h to per-gen XML
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/12935>
Boris Brezillon [Fri, 6 Aug 2021 12:03:25 +0000 (14:03 +0200)]
panfrost: Prepare scoreboard helpers to per-gen XML
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/12935>
Boris Brezillon [Fri, 6 Aug 2021 08:22:28 +0000 (10:22 +0200)]
panfrost: Prepare pandecode to per-gen XML
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/12935>
Boris Brezillon [Fri, 6 Aug 2021 08:12:31 +0000 (10:12 +0200)]
panfrost: Move panfrost_major_version() to gen_macros.h
So we can use this function in decode_common.c when transitioning to
per-gen XML. While at it rename the function pan_arch().
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/12935>
Boris Brezillon [Fri, 6 Aug 2021 11:31:47 +0000 (13:31 +0200)]
panfrost: Prepare pan_cs helpers to per-gen XML
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/12935>
Boris Brezillon [Fri, 6 Aug 2021 09:46:20 +0000 (11:46 +0200)]
panfrost: Prepare blend helpers to per-gen XML
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/12935>
Boris Brezillon [Fri, 6 Aug 2021 09:33:17 +0000 (11:33 +0200)]
panfrost: Prepare blitter helpers to per-gen XML
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/12935>
Boris Brezillon [Mon, 20 Sep 2021 09:53:23 +0000 (11:53 +0200)]
panfrost: RGB332_UNORM is not a valid texture format on v6+
Cc: mesa-stable
Fixes:
c6bdd976e611 ("panfrost: Split out v6/v7 format tables")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12508>
Boris Brezillon [Tue, 7 Sep 2021 12:22:59 +0000 (14:22 +0200)]
panfrost: Drop the R and T flags on SCALED formats
Sampling from SCALED textures / rendering to SCALED FBOs is a bit tricky
(requires extra int <-> float conversions in a few places).
mesa/st only use SCALED formats as vertex formats, and those formats
are optional in Vulkan, so let's drop the RENDER/TEXTURE flags to keep
things simple.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12508>
Boris Brezillon [Tue, 7 Sep 2021 09:16:50 +0000 (11:16 +0200)]
panfrost: RGB10_A2_SNORM is not a valid texture format on v6+
Cc: mesa-stable
Fixes:
c6bdd976e611 ("panfrost: Split out v6/v7 format tables")
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/12508>
Boris Brezillon [Wed, 19 May 2021 09:38:14 +0000 (11:38 +0200)]
panfrost: Fix the Z32_S8X24 and X32_S8X24 definitions
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/12508>
Boris Brezillon [Mon, 23 Aug 2021 15:46:18 +0000 (17:46 +0200)]
panfrost: Patch Z32_S8X24 format when creating a sampler view
The gallium driver always stores Z32_S8X24 textures on 2 different
planes. Let's fix the create_sampler_view() logic so we can support
single-planar Z32_S8X24 in the vulkan driver.
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/12508>
Timur Kristóf [Thu, 9 Sep 2021 08:33:50 +0000 (10:33 +0200)]
ac/nir: Remove byte permute from prefix sum of the repack sequence.
The byte-permute instruction v_perm_b32 is not exposed by older
LLVM releases (only available on LLVM 13 and later), therefore a new
sequence is needed which we can use with these LLVM versions too.
The prefix sum is replaced by two alternatives:
1. For GPUs that support v_dot, we shift 0x01 to the wanted byte
positions and then use v_dot to sum the results.
2. For older GPUs (Navi 10), we simply shift out the unwanted bytes
and use v_sad_u8 to produce the sum.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12786>
Timur Kristóf [Thu, 9 Sep 2021 06:27:21 +0000 (08:27 +0200)]
aco/isel: Fix emit_vop2_instruction to apply 16/24-bit flags properly.
Previously it used a builder function but didn't use the return
value from that function, so the flags were not applied.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12786>
Timur Kristóf [Thu, 9 Sep 2021 06:38:41 +0000 (08:38 +0200)]
aco: Add ability to optimize v_lshl + v_sub into v_mad_i32_i24.
Also change combine_add_lshl to use check_vop3_operands instead
of its own checks of the operands.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12786>
Tapani Pälli [Thu, 16 Sep 2021 05:48:52 +0000 (08:48 +0300)]
mesa: fix timestamp enum with EXT_disjoint_timer_query
Extension implementation missed GL_TIMESTAMP_EXT for Get* functions,
commit
5d58fea660c added GetInteger64vEXT support but obviously we need
to support the enum as well ...
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5361
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12890>
Eric Engestrom [Wed, 15 Sep 2021 21:07:11 +0000 (22:07 +0100)]
bin/khronos-update.py: add upstream for vulkan_directfb.h & vulkan_screen.h
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12877>
Eric Engestrom [Wed, 15 Sep 2021 21:04:12 +0000 (22:04 +0100)]
bin/khronos-update.py: update the branch name (s/master/main/)
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12877>
Qiang Yu [Sat, 18 Sep 2021 06:41:22 +0000 (14:41 +0800)]
radeonsi: fix ps SI_PARAM_LINE_STIPPLE_TEX arg
This arg size should be 1 instead of 3. It does not affect functionality
because we does not enable it in SPI_PS_INPUT_ADDR. But it does affect
the VGPR number that LLVM produce when LLVM still count with all PS
function arguments.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12922>
Rob Clark [Sat, 18 Sep 2021 16:39:01 +0000 (09:39 -0700)]
freedreno/computerator/a4xx: Fix enum mismatch warning
Fixes:
fb5deb2b4a0 ("a4xx/computerator: add initial backend")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12923>
Rob Clark [Sat, 18 Sep 2021 16:35:37 +0000 (09:35 -0700)]
freedreno/ir3: Fix generation check
Fixes:
fb5deb2b4a0 ("a4xx/computerator: add initial backend")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12923>
Rob Clark [Sat, 18 Sep 2021 16:32:21 +0000 (09:32 -0700)]
freedreno/ir3: Cleanup liveness lifetime
I'm going to want to use this in other passes, so lets let the
allocation hang off the pass's context. Also, while we're at it,
fix the error path leak in ir3_ra().
Fixes:
0ffcb19b9d9 ("ir3: Rewrite register allocation")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12923>
Rob Clark [Tue, 31 Aug 2021 20:52:22 +0000 (13:52 -0700)]
freedreno/ir3: Fix sched debug msgs
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12923>
Daniel Stone [Fri, 27 Aug 2021 15:52:31 +0000 (16:52 +0100)]
fdno/resource: Rewrite layout selection for allocation
The previous code had a number of errors, the most glaring of which was
forcing linear when it was one of the possible layouts requested.
When modifiers are being used, a list of _acceptable_ modifiers is
supplied; it's up to the driver to then make a decision as to which it
thinks is most optimal.
Normally we would select between linear/tiled/UBWC in ascending order of
preference according to what's possible, however we can't use a tiled
layout with explicit modifiers as there is no modifier token defined for
it.
Rewrite the layout-selection mechanism to always try to do the most
optimal thing. If the use flags force us to, or we have a shared
resource without explicit modifiers, we use linear. Failing that, we use
UBWC wherever possible; if this is not possible, we use tiled for
internal resources only or linear for shared resources.
v2 (Rob): respect FD_FORMAT_MOD_QCOM_TILED; do not print perf warning on
user choice of disabling UBWC;
v3: fix several issues breaking CI tests: revert removal of using
MOD_INVALID in various places, and assume implicit modifiers if present;
do not attempt to set UBWC flags when screen->tile_mode(prsc) falls back
to LINEAR (e.g. for small mip-maps levels); use TILED for implicit
modifier case with non-shared resources
v4: fix unintended demotion of UBWC, i.e. only check QCOM_COMPRESSED
modifier and demote UBWC to less optimal format when using explicit
modifiers
Signed-off-by: Daniel Stone <daniels@collabora.com>
Tested-by: Heinrich Fink <hfink@snap.com>
Signed-off-by: Heinrich Fink <hfink@snap.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12595>
Christian Gmeiner [Thu, 16 Sep 2021 16:52:39 +0000 (18:52 +0200)]
lima: fix leak of the screen hash table
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12902>
Alyssa Rosenzweig [Fri, 17 Sep 2021 15:08:42 +0000 (11:08 -0400)]
docs/panfrost: Remove obsolete note on Android.mk
Android.mk was removed, so remove a reference to it from Panfrost
documentation. We should document building for Android, but it'll be
through meson. This note as-is adds more confusion than note.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12914>
Filip Gawin [Thu, 16 Sep 2021 18:50:29 +0000 (20:50 +0200)]
aco: cleanup assignment of unique_ptrs
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12903>
Joshua Ashton [Tue, 14 Sep 2021 03:07:35 +0000 (04:07 +0100)]
radv: Expose modifiers that support DCC image stores with STORAGE_IMAGE_BIT
Some games, ie. Doom Eternal, present from compute following compute post-fx and would benefit from having DCC image stores available.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12862>
Joshua Ashton [Tue, 14 Sep 2021 03:00:34 +0000 (04:00 +0100)]
ac/surface: Add ac_modifier_supports_dcc_image_stores helper
Helper function to check if a modifier supports DCC image stores.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12862>
Joshua Ashton [Fri, 10 Sep 2021 21:34:35 +0000 (22:34 +0100)]
ac/surface: Add modifiers capable of DCC image stores
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12862>
Ian Romanick [Tue, 7 Sep 2021 20:52:05 +0000 (13:52 -0700)]
iris: Add finalize_nir
Improves performance of SynMark OglDrvShComp by +241.879%±1.01366% (n=5)
on a random KBL desktop that I have. That seems to put it at about the
same performance as i965, but I did not test that in a statistically
sound way.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858>
Ian Romanick [Tue, 7 Sep 2021 20:50:27 +0000 (13:50 -0700)]
iris: Move iris_set_max_shader_compiler_threads and iris_is_parallel_shader_compilation_finished
There's going to be at least one more shader function set in
pipe_screen, so it makes more sense to do it in iris_program.c.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858>
Ian Romanick [Thu, 12 Aug 2021 22:48:10 +0000 (15:48 -0700)]
iris: Eliminate iris_uncompiled_shader::needs_edge_flag
Use the flag that was set by nir_lower_passthrough_edgeflags. The
lowering passes will soon be moved to a finalize_nir hook, so there
won't be any choice. Ideally we'd like to eliminate iris_fix_edge_flags
completely, and this is a first step.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858>
Ian Romanick [Tue, 24 Aug 2021 22:34:13 +0000 (15:34 -0700)]
nir/edgeflags: Add a flag to indicate the edge flag input is needed
Most modern hardware needs the edge flag added as a hidden vertex input
and needs code added to the vertex shader to copy the input to an
output. Intel hardware is a little different. Gfx4 and Gfx5 hardware
works in the previously described mannter. Gfx6+ hardware needs the
edge flag as a specific vertex shader input, and that input is magically
processed by fixed-function hardware without need for extra shader code.
This flag signals only that the vertex shader input is needed. It would
be nice if we could decouple adding the vertex shader input from
generating the copy-to-output code, but that has proven to be
challenging. Not having that code causes other passes to want to
eliminate that shader input.
v2: Convert conditional to assertion. This pass is only called for
vertex shaders. Suggested by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858>
Ian Romanick [Wed, 11 Aug 2021 00:30:13 +0000 (17:30 -0700)]
iris: Calculate uses_atomic_load_store after all lowering
The lowering passes will soon be moved to another function, so there
won't be any choice.
As a side benefit, this allows eliminating the uses_atomic_load_store
**pointer** parameter from brw_nir_lower_storage_image. For some reason
crocus was passing false instead of NULL.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858>
Ian Romanick [Tue, 10 Aug 2021 23:46:09 +0000 (16:46 -0700)]
iris: crocus: Use shader_info::is_arb_asm flag
...instead of looking for "ARB" in the name of the shader. This matches
the behavior of i965. Using "ARB" was added in
a1ebac3750e ("iris:
Implement ALT mode for ARB_{vertex,fragment}_shader"), but there's no
explanation of why that method was used.
v2: Just use shader_info::is_arb_asm everywhere instead of
iris_uncompiled_shader::use_alt_mode. Suggested by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12858>
Rob Clark [Fri, 17 Sep 2021 19:22:30 +0000 (12:22 -0700)]
freedreno/a6xx: Pre-bake SO-disable stateobj
No need to re-create this every time we transition from stream-out
enabled to disabled.
Creation of streamout_disable_stateobj is deferred until we create
a program state using streamout to avoid creating it unnecessarily
and because fd6_prog_init() is called before ctx->pipe is created.
(Changing that ordering is complicated by the fact that u_blitter
copies pctx->bind_fs_state(), and friends.)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12918>
Mike Blumenkrantz [Fri, 17 Sep 2021 12:22:48 +0000 (08:22 -0400)]
zink: don't leak drm fd on drmPrimeFDToHandle failure
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12911>
Rob Clark [Fri, 18 Jun 2021 18:37:11 +0000 (11:37 -0700)]
freedreno: Add perf warning for WC readback
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
Rob Clark [Fri, 18 Jun 2021 17:59:40 +0000 (10:59 -0700)]
freedreno: Used cached coherent for staging resources
These are really only accessed by the GPU once, so CPU access speed is
more important. Especially for PIPE_MAP_READ.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
Rob Clark [Sun, 6 Jun 2021 19:31:36 +0000 (12:31 -0700)]
freedreno/drm: Use cached-coherent for control bo
Userspace frequently reads the elapsed fence, but the GPU only writes it
once per submit. So this should be another useful place for cached-
coherent.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
Rob Clark [Wed, 2 Jun 2021 18:45:29 +0000 (11:45 -0700)]
freedreno/drm: Use cached-coherent cmdstream buffers
Some more extreme examples, like gl_driver2_off, can be bottlenecked on
writes to cmdstream. OTOH the CP is pretty pipelined in how it slurps
in memory, so the penalty of using coherent buffers should not be so
much.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
Rob Clark [Wed, 2 Jun 2021 18:44:54 +0000 (11:44 -0700)]
freedreno/drm: Add cached-coherent bo support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
Rob Clark [Wed, 15 Sep 2021 22:16:48 +0000 (15:16 -0700)]
freedreno/drm: Don't return shared/control bo's to cache
They can never be allocated from the cache, as fd_bo_state() would
return FD_BO_STATE_UNKNOWN
Fixes:
7dabd624649 ("freedreno/drm: Userspace fences")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
Rob Clark [Fri, 18 Jun 2021 16:58:11 +0000 (09:58 -0700)]
freedreno/drm: Consider allocation flags in bo-cache
It hasn't really mattered until now, as we keep a separate cache for
cmdstream (which is FD_BO_GPU_READONLY), and the only other flag so
far is FD_BO_SCANOUT (which the bo cache probably messes up, but it
does not matter on most hw, and on hw where it does the scanout buffer
will be imported (and therefore won't end up in the bo cache).
But when we add cached-coherent (or if we wanted to use GPU_READONLY
more) it starts to matter.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
Rob Clark [Fri, 18 Jun 2021 16:53:22 +0000 (09:53 -0700)]
freedreno/drm: Rename bo->flags to bo->reloc_flags
Next patch adds alloc_flags, lets rename bo->flags first to make it
clear *which* flags these are.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
Rob Clark [Sun, 6 Jun 2021 19:11:28 +0000 (12:11 -0700)]
freedreno/drm: Garbage collect unused bo_cache
The ring_cache that is actually used is in fd_device.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
Christian Gmeiner [Fri, 12 Jun 2020 11:23:44 +0000 (13:23 +0200)]
ci/bare-metal: add etnaviv
Add deqp gles2 CI run for GC2000.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852>
Christian Gmeiner [Mon, 6 Apr 2020 19:59:14 +0000 (21:59 +0200)]
ci/bare-metal: add support for eth008 power relay
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852>
Christian Gmeiner [Sat, 9 May 2020 19:53:24 +0000 (21:53 +0200)]
ci/bare-metal: add telnet based serial
Makes it possible to use e.g. a ser2net server in the lan.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852>
Christian Gmeiner [Tue, 14 Sep 2021 08:39:24 +0000 (10:39 +0200)]
ci: update kernel
Switch to v5.13-rc5-for-mesa-ci-
2bb5d9ffd79c branch, which includes
etnaviv MMU patches.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852>
Christian Gmeiner [Mon, 21 Dec 2020 12:37:38 +0000 (13:37 +0100)]
ci: include etnaviv support in ARMHF container.
Build the kernel with CONFIG_DRM_ETNAVIV=y and include
imx6q-cubox-i.dtb.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12852>
Rhys Perry [Thu, 5 Nov 2020 13:18:08 +0000 (13:18 +0000)]
nir/algebraic: distribute fmul(fadd(a, b), c) when b and c are constants
This allows for more MAD/FMA instructions to be created.
fossil-db (Sienna Cichlid):
Totals from 50134 (33.46% of 149839) affected shaders:
VGPRs: 2436536 -> 2436000 (-0.02%); split: -0.05%, +0.03%
SpillSGPRs: 13136 -> 13135 (-0.01%); split: -0.02%, +0.02%
CodeSize:
206621424 ->
206278292 (-0.17%); split: -0.23%, +0.07%
MaxWaves: 1116804 -> 1117448 (+0.06%); split: +0.07%, -0.01%
Instrs:
38977460 ->
38862886 (-0.29%); split: -0.33%, +0.04%
Latency:
832425389 ->
827432260 (-0.60%); split: -0.63%, +0.03%
InvThroughput:
184193457 ->
183563350 (-0.34%); split: -0.37%, +0.03%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7458>
Emma Anholt [Thu, 9 Sep 2021 23:50:33 +0000 (16:50 -0700)]
freedreno: Remove dead fd_batch_reset().
Unused since
58f5605124a7 ("freedreno: Handle full blit discards by
invalidating the resource.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511>
Emma Anholt [Wed, 30 Jun 2021 23:33:22 +0000 (16:33 -0700)]
freedreno: Use a BO bitset for faster checks for resource referenced.
When moving the batch cache to the context, I added hash table lookups
from batch to rsc for "is this resource in use" because we could no longer
store data in the rsc bo under the batch cache's lock.
We can save that cost by tracking a bitfield of resources referenced by
the batch, which gives us very cheap checks in the draw path at a minor
cost in memory. We can just use the GEM BO handle, since it's a nice
small integer already (we can't use the TC buffer ID, because the frontend
changes that, and we're in the driver thread).
This required moving the !pending() assert up in resource shadowing, since
the BO swap meant we were checking pending on the wrong resource.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511>
Emma Anholt [Mon, 25 Jan 2021 20:04:48 +0000 (12:04 -0800)]
freedreno: Remove the submit lock locking.
I think the whole submit lock thing should be possible to remove now, but
just getting rid of the lock since we're no longer sharing batches between
ctxes means another several percent draw overhead improvement.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511>
Emma Anholt [Tue, 15 Jun 2021 20:44:27 +0000 (13:44 -0700)]
freedreno: Move the batch cache to the context.
Our draw call rate was significantly limited by the atomics we had to do
to manage access to the batch cache.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511>
Emma Anholt [Thu, 16 Sep 2021 18:46:27 +0000 (11:46 -0700)]
freedreno: Use TC's flag for whether get_query is in the driver thread.
In moving batch cache to the context, the check for whether there's
pending work being done to this resources ends up accessing the context,
so we can't do it outside of the fd_context_access_begin(). This flag
lets us do the driver-thread asserts before we've decided whether we need
to flush.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511>
Emma Anholt [Thu, 17 Jun 2021 03:34:37 +0000 (20:34 -0700)]
freedreno: Precompute resource pointer hash values.
It was around half a percent of the CPU in the fd-bc-ctx branch, and adds
4b to our 472b struct.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11511>
Rhys Perry [Fri, 3 Sep 2021 14:33:22 +0000 (15:33 +0100)]
aco/nops: fix handle_raw_hazard_internal when visiting the current block
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12720>
Rhys Perry [Fri, 3 Sep 2021 14:29:08 +0000 (15:29 +0100)]
aco/nops: add State
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12720>
Rhys Perry [Mon, 2 Aug 2021 14:44:47 +0000 (15:44 +0100)]
aco/nops: create handle_raw_hazard_instr helper
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12720>
Rhys Perry [Mon, 2 Aug 2021 15:13:16 +0000 (16:13 +0100)]
aco/nops: use up-to-date mask_size
fossil-db (Pitcairn):
Totals from 6 (0.00% of 129702) affected shaders:
CodeSize: 8760 -> 8736 (-0.27%)
Instrs: 1714 -> 1708 (-0.35%)
Latency: 12325 -> 12302 (-0.19%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12720>
Connor Abbott [Fri, 17 Sep 2021 13:37:49 +0000 (15:37 +0200)]
ir3: Make trig replacement expression exact
This prevents other optimizations from associating the inner multiply,
which can add inaccuracies that can lead to discontinuities around the
boundary of the ffract. We should use exactly the sequence that the blob
uses to avoid problems.
Since fadd + fmul cannot be combined to ffma when exact is specified, we
have to use ffma ourselves.
Fixes artifacts in PixMark Volplosion with !7458.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12912>
Rhys Perry [Wed, 9 Jun 2021 13:33:24 +0000 (14:33 +0100)]
aco: allow live-range splits of linear vgprs in top-level blocks
Fixes dEQP-VK.ssbo.phys.layout.random.8bit.all_per_block_buffers.46 on
GFX8.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172>
Rhys Perry [Wed, 16 Jun 2021 16:19:36 +0000 (17:19 +0100)]
aco: implement linear vgpr copies
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172>
Rhys Perry [Wed, 16 Jun 2021 14:35:36 +0000 (15:35 +0100)]
aco/tests: add regalloc.scratch_sgpr.create_vector
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172>
Rhys Perry [Wed, 16 Jun 2021 14:31:24 +0000 (15:31 +0100)]
aco/tests: fix finish_ra_test()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172>
Rhys Perry [Thu, 17 Jun 2021 13:15:09 +0000 (14:15 +0100)]
aco: find scratch reg for sub-dword psuedo instructions which read sgprs
If there's a sgpr operand before a sub-dword operand, a scratch register
will not be found on GFX6/7.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172>
Rhys Perry [Fri, 11 Jun 2021 13:43:50 +0000 (14:43 +0100)]
aco: find a scratch register for sub-dword copies on GFX7 if scc is empty
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172>
Rhys Perry [Fri, 11 Jun 2021 12:08:51 +0000 (13:08 +0100)]
aco: rewrite print_reg_class()
Make it work for any regclass, and print linear VGPRs differently from
logical ones.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172>
Rhys Perry [Fri, 11 Jun 2021 12:05:18 +0000 (13:05 +0100)]
aco: add and use RegClass::resize helper
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172>
Rhys Perry [Fri, 11 Jun 2021 12:11:20 +0000 (13:11 +0100)]
aco: add RegClass::is_linear_vgpr helper
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12172>
Rhys Perry [Thu, 16 Sep 2021 14:02:20 +0000 (15:02 +0100)]
radv: fix pipeline caching with robust buffer access
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12900>
Mike Blumenkrantz [Thu, 16 Sep 2021 15:18:49 +0000 (11:18 -0400)]
util/tc: rename tc_replace_buffer_storage_func::num_rebinds and document
this parameter is only a hint, as tc provides no method for tracking cases
when a buffer is bound multiple times to the same site (e.g., multiple vertex
buffer slots will be counted as 1 bind), so rename to "minimum" to be more clear
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12898>
Mike Blumenkrantz [Fri, 17 Sep 2021 03:29:41 +0000 (23:29 -0400)]
features: fix listing for GL_ARB_parallel_shader_compile
this isn't actually all drivers
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12909>
Samuel Pitoiset [Thu, 16 Sep 2021 11:15:10 +0000 (13:15 +0200)]
ac/rgp, radv: report wave size for shaders
Fills the "Wave mode" in "Pipelines" for GPUs that supports Wave32.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12896>
Samuel Pitoiset [Thu, 16 Sep 2021 10:59:42 +0000 (12:59 +0200)]
ac/rgp, radv: report scratch memory size for shaders
Fills the "Scatch Mem" with "Yes/No" in "Pipelines", this requires
instruction timing to be enabled.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12896>
Pierre-Eric Pelloux-Prayer [Thu, 16 Sep 2021 13:24:51 +0000 (15:24 +0200)]
Revert "ci/v3d: add piglit flake"
This reverts commit
7d5aea9edf358bcfc43dd1517bbebe658dce10c8.
The test isn't flaky: now that the regression is fixed we can
remove it from the flakes list.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12849>
Pierre-Eric Pelloux-Prayer [Tue, 14 Sep 2021 08:14:04 +0000 (10:14 +0200)]
vbo/dlist: reallocate the vertex buffer on vertex upgrade
upgrade_vertex copies save->copied.nr vertices to the vertex buffer,
so we need to make sure it has enough space to accomodate them.
This commit also drops the usage of COPY_CLEAN_4V_TYPE_AS_UNION in
this function because it always writes 4-components for all attributes,
but our buffer might be smaller. Instead, only write the needed
components.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5353
Fixes:
cc57156dce0 ("vbo/dlist: rework vertex_store management")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12849>
Filip Gawin [Wed, 15 Sep 2021 22:32:03 +0000 (00:32 +0200)]
r300: assert that array in translate_vertex_program is initialized
Problematic usage is in case RC_OPCODE_ENDLOOP, at line
ret_addr = loops[--loop_depth];
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12880>
Timothy Arceri [Tue, 7 Sep 2021 05:00:58 +0000 (15:00 +1000)]
util/cache: run basic cache tests on the single file cache
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12745>
Marek Vasut [Wed, 15 Sep 2021 22:31:44 +0000 (00:31 +0200)]
freedreno: Handle timeout == PIPE_TIMEOUT_INFINITE and rollover
The fd_fence_finish() may be passed a special timeout value PIPE_TIMEOUT_INFINITE.
This gets propagated all the way to get_abs_timeout(), where it gets converted to
a huge timeout value and passed down to the kernel. At least on iMX53, the kernel
may complain about this value being too large and emit a backtrace. The relevant
piece of information there is the following:
schedule_timeout: wrong timeout value
bf94984b
Per suggestion by Rob Clark, fix this in get_abs_timeout() by picking the same
rollover implementation present in etnaviv. This fixes one part of the problem
where the tv_nsec becomes larger than NSEC_PER_SEC, which is invalid.
However, the PIPE_TIMEOUT_INFINITE is sufficiently large to make tv_secs larger
than KTIME_SEC_MAX, which makes kernel-side ktime_set() return KTIME_MAX and
that in turn triggers the above "wrong timeout value N" message. Fix this by
setting the timeout to large enough value in case of PIPE_TIMEOUT_INFINITE.
While the timeout is not truly infinite, the timeout is long enough as anything
longer than a few seconds means the GPU got hung.
The "util/timespec.h" is added so we can use NSEC_PER_SEC instead of ad-hoc
constant
1000000000 . The "pipe/p_defines.h" is needed for PIPE_TIMEOUT_INFINITE.
This problem can be reliably triggered on iMX53 using Qt5 with EGLFS support,
using the qtbase examples, as follows:
/usr/share/examples/opengl/qopenglwidget/qopenglwidget -platform eglfs
Fixes:
f3cc0d27475 ("freedreno: import libdrm_freedreno + redesign submit")
Signed-off-by: Marek Vasut <marex@denx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12886>
Mike Blumenkrantz [Thu, 16 Sep 2021 13:57:47 +0000 (09:57 -0400)]
zink: zero VkImageCreateInfo::queueFamilyIndexCount on creation
this explodes gfxreconstruct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12905>
Emma Anholt [Thu, 16 Sep 2021 22:35:38 +0000 (15:35 -0700)]
ci/freedreno: Drop minetest from a3xx trace testing.
It's been flaking approximately weekly since the end of June.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12906>