Lucas Stach [Fri, 12 Aug 2022 22:11:33 +0000 (00:11 +0200)]
etnaviv: don't use TS with multi-layer resources
Clear and render operations can target each layer of a multi-layer resource
separately, which means we would need to track TS valid and clear color
states for each layer separately to make TS work correctly. As multi-layer
resources are very likely not primarily used for rendering, they are unlikely
to profit much from TS, so instead of adding all this state, don't use TS for
such resources at all.
Fixes piglit spec@glsl-1.20@execution@tex-miplevel-selection 3d
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18045>
Lucas Stach [Thu, 11 Aug 2022 13:22:35 +0000 (15:22 +0200)]
etnaviv: fill alpha channel for DXT1_RGB textures
As the HW uses the same decompression scheme for both RGBA and RGB
DXT1 textures, it needs to be told to properly fill the alpha channel
for the plain RGB format.
Fixes piglit spec@ext_texture_compression_s3tc@s3tc-targeted.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18045>
Gert Wollny [Wed, 31 Aug 2022 11:38:21 +0000 (13:38 +0200)]
r600/sfn: Don't scalarize fdd instructions
These are handled by a vectorized texture op.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18343>
Gert Wollny [Wed, 31 Aug 2022 10:50:38 +0000 (12:50 +0200)]
r600/sfn: Override VPM if access in helpers is requested
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18343>
Gert Wollny [Wed, 31 Aug 2022 09:24:17 +0000 (11:24 +0200)]
r600/sfn: more peephole optimization with conditionals
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18343>
Gert Wollny [Wed, 31 Aug 2022 08:24:00 +0000 (10:24 +0200)]
r600/sfn: ACK all image stores, also at end of loop
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18343>
Gert Wollny [Wed, 31 Aug 2022 06:13:18 +0000 (08:13 +0200)]
r600/sfn: override register ID when it doesn't matter
When a vec4 register only uses constant value of ignore
swizzles then emit zero as register ID.
Optimizing the register use in instructions that support this type
of swizzle may lead to the situation that the RA doesn't see the
register ID, because it is actually irreleant, in this case return
zero as register ID to avoid that the assembler uselessly reports
a high requirement for registers based on a stale register ID.
Fixes:
79ca456b4837b3bc21cf9ef3c03c505c4b4909f6
r600/sfn: rewrite NIR backend
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18343>
Thomas H.P. Andersen [Wed, 31 Aug 2022 21:06:05 +0000 (23:06 +0200)]
radeonsi: avoid a use-after-free
Use of 'shader' after free was added in
ac6fb2467fefa78de12af53490b70ab04e73749a
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18356>
Iago Toral Quiroga [Wed, 31 Aug 2022 10:39:32 +0000 (12:39 +0200)]
v3dv: implement VK_KHR_workgroup_memory_explicit_layout
There is an issue with some Amber tests for this feature using
a larger number of workgroup invocations than supported without
checking the limit. I filed and issue [1] (and a CL with a fix), but
meanwhile we want to flag those as expected crashes for CI.
[1] https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/3913
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18337>
Yonggang Luo [Tue, 23 Aug 2022 04:56:26 +0000 (12:56 +0800)]
st: Fixes warning [-Wimplicit-fallthrough] in st_texture.c
Warning message:
../src/mesa/state_tracker/st_texture.c:190:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:18:31 +0000 (13:18 +0800)]
v3dv: Remove redundant unreachable in v3dvx_pipeline.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 04:47:51 +0000 (12:47 +0800)]
v3dv: Fixes warning [-Wimplicit-fallthrough] in v3dvx_pipeline.c
Warning message:
../src/broadcom/vulkan/v3dvx_pipeline.c:60:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 04:39:28 +0000 (12:39 +0800)]
vdpau: Fixes warning [-Wimplicit-fallthrough] in vdpau_private.h
Warning message:
../src/gallium/frontends/vdpau/vdpau_private.h:149:7: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-By: Sil Vilerino sivileri@microsoft.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:24:31 +0000 (13:24 +0800)]
freedreno: Fixes warning [-Wimplicit-fallthrough] in fd6_emit.c
Warning message:
../src/gallium/drivers/freedreno/a6xx/fd6_emit.c:177:13: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:23:39 +0000 (13:23 +0800)]
freedreno: Fixes warning [-Wimplicit-fallthrough] in fd5_emit.c
Warning message:
../src/gallium/drivers/freedreno/a5xx/fd5_emit.c:272:13: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:22:39 +0000 (13:22 +0800)]
freedreno: Fixes warning [-Wimplicit-fallthrough] in fd5_texture.h
Warning message:
../src/gallium/drivers/freedreno/a5xx/fd5_texture.h:71:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:20:09 +0000 (13:20 +0800)]
freedreno: Fixes warning [-Wimplicit-fallthrough] in fd3_texture.c
Warning message:
../src/gallium/drivers/freedreno/a3xx/fd3_texture.c:132:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:12:04 +0000 (13:12 +0800)]
freedreno: Fixes warning [-Wimplicit-fallthrough] in fd2_texture.c
Warning message:
../src/gallium/drivers/freedreno/a2xx/fd2_texture.c:150:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:00:31 +0000 (13:00 +0800)]
freedreno: Fixes warning [-Wimplicit-fallthrough] in fd4_texture.h
Warning message:
../src/gallium/drivers/freedreno/a4xx/fd4_texture.h:75:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 04:33:25 +0000 (12:33 +0800)]
freedreno: Fixes warning [-Wimplicit-fallthrough] in freedreno_util.h
Warning message:
../src/gallium/drivers/freedreno/freedreno_util.h:433:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:08:14 +0000 (13:08 +0800)]
radeonsi: Fixes warning [-Wimplicit-fallthrough] in si_descriptors.c
Warning messages:
../src/gallium/drivers/radeonsi/si_descriptors.c:1475:7: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
../src/gallium/drivers/radeonsi/si_descriptors.c:1493:7: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:05:53 +0000 (13:05 +0800)]
llvmpipe: Fixes warning [-Wimplicit-fallthrough] in lp_bld_sample_soa.c
Warning message:
../src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c:2676:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Yonggang Luo [Tue, 23 Aug 2022 05:03:10 +0000 (13:03 +0800)]
llvmpipe: Fixes warning [-Wimplicit-fallthrough] in lp_bld_swizzle.c
../src/gallium/auxiliary/gallivm/lp_bld_swizzle.c:399:13: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18204>
Dave Airlie [Thu, 1 Sep 2022 01:37:27 +0000 (11:37 +1000)]
llvmpipe: finish rendering before flushing frontbuffer resources.
Fixes misrendering on front with mesa demos
Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18360>
Renato Pereyra [Wed, 31 Aug 2022 21:14:36 +0000 (14:14 -0700)]
venus: Increase vn_relax sleep time
After the recent Venus changes to fence feedback, the performance drop from
increasing this setting are now negligible while DX games still experience a
sizable decrease in CPU utilization.
Signed-off-by: Renato Pereyra <renatopereyra@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18357>
Adrián Larumbe [Thu, 11 Aug 2022 20:35:22 +0000 (21:35 +0100)]
panfrost: Add userspace crash dump decoder and analyser
Introduces a binary dump analyser and BO decoder whose format was partially
borrowed from etnaviv's kernel driver. It leverages the pandecode library
to analyse BO's attached to the GPU job that caused the crash.
Binary dump should be generated by a component of Panfrost's kernel driver.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14034>
Adrián Larumbe [Thu, 11 Aug 2022 17:07:46 +0000 (18:07 +0100)]
panfrost: Sync panfrost_drm.h from drm-misc-next
Updated from changes in commit
730c2bf4ad39 ("drm/panfrost: Add support for
devcoredump").
From drm-misc/drm-misc-next.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14034>
Adrián Larumbe [Sat, 26 Mar 2022 02:48:52 +0000 (02:48 +0000)]
panfrost: Add compiler args option for building usermode tools
Binaries built under src/panfrost weren't passed this compiler switch,
so it would trigger pointer arithmetic errors when using
the inlined definitions in the pandecode library.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14034>
Adrián Larumbe [Tue, 10 May 2022 00:03:03 +0000 (01:03 +0100)]
panfrost: Remove documentation reference to deprecated parameter
'bifrost' parameter is no longer used by pandecode.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14034>
Adrián Larumbe [Sat, 26 Mar 2022 02:13:16 +0000 (02:13 +0000)]
panfrost: Handle Job VA cycles when decoding a dump file
When a job loop is submitted to the GPU, as in IGT
panfrost_submit@pan-reset, this will trigger a DRM scheduler timeout and
eventually a devcoredump. However, when pandecode traverses the list of
jobs in a submit BO, it will iterate forever.
Fix it by adding already-visited CPU VA's into a mesa pointer set and
checking that the current job's CPU VA hasn't already been handled.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14034>
Thomas H.P. Andersen [Sun, 26 Dec 2021 00:58:50 +0000 (01:58 +0100)]
nvc0: fix a warning -Wconstant-conversion
I do not understand the code here well enough to tell what the correct
behavior is. prog->num_gprs is a unit8_t, so my guess is that the MIN
is there to make sure we stay within the limit of that. However the
current logic is a bit strange. If info_out.bin.maxGPR + 5 is bellow
256 we use that. If not then we write 256 which converts to 0 in a
uint8_t...
The patch changes the upper value to 255.
Fixes a warning with clang
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14304>
Emma Anholt [Tue, 30 Aug 2022 19:14:01 +0000 (12:14 -0700)]
gallium,glsl: Delete PIPE_CAP_VERTEXID_NOBASE and lower_vertex_id.
Every driver uses the nir_lower_system_values path now.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18327>
Emma Anholt [Tue, 30 Aug 2022 19:12:54 +0000 (12:12 -0700)]
freedreno/ir3: Switch to NIR for a3xx/a4xx's vertex id lowering.
We already have the compiler pass, just need to set the flag. We were the
last consumer of glsl's lower_vertex_id.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18327>
Emma Anholt [Tue, 30 Aug 2022 19:02:07 +0000 (12:02 -0700)]
freedreno/ir3: Move chip-specific nir compiler options to C code.
We had a mix of common-macro-and-chip-overrides in static decls and plus
more overrides later in C code. It's way cleaner to just have a static
decl for the base options and chip overrides in C code.
This moves a few things (lower_cs_local_index_to_id, lower_wpos_pntc,
lower_int64_options) to the common static decl that had been pasted into
both a3xx-a5xx and a6xx.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18327>
Emma Anholt [Wed, 31 Aug 2022 18:41:01 +0000 (11:41 -0700)]
turnip: Make sure bandwidth config per pixel starts from 0.
We'd keep incrementing the costs in a cmd buffer's dynamic_pass on each
BeginRendering. This fixes the main renderpass of aztec ruins on zink to
use gmem, taking fps from ~8 to ~10.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18352>
Yiwei Zhang [Wed, 31 Aug 2022 21:05:51 +0000 (21:05 +0000)]
venus/ci: mark a test as flake
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18355>
Yonggang Luo [Wed, 31 Aug 2022 17:04:42 +0000 (01:04 +0800)]
meson/panfrost: Add dep_valgrind for libpanfrost_pixel_format to fixes the compiling error:
In file included from src/panfrost/lib/genxml/v9_pack.h:15,
from ../../src/panfrost/lib/genxml/gen_macros.h:95,
from ../../src/panfrost/lib/pan_format.c:27:
../../src/util/bitpack_helpers.h:34:10: fatal error: valgrind.h: No such file or directory
Fixes:
c52d5acf15d ("util,intel: Pull the bit packing helpers from genxml to a common header")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7169
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18350>
Emma Anholt [Wed, 13 Apr 2022 18:31:55 +0000 (11:31 -0700)]
nir_to_tgsi: Add support for bindless textures and images.
Tested on nouveau with the piglit tests.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15932>
Emma Anholt [Wed, 13 Apr 2022 17:39:05 +0000 (10:39 -0700)]
nir_to_tgsi: Use nir_lower_discard_if for demote_if.
TGSI doesn't have a DEMOTE_IF, so we want to lower it back to IF DEMOTE
ENDIF. Fixes a regression with nvc0 on nir-to-tgsi.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15932>
Emma Anholt [Wed, 13 Apr 2022 23:22:47 +0000 (16:22 -0700)]
nir: Make nir_lower_discard_if() handle demotes and terminates, too.
AGX and zink both want all of these lowered, but nir_to_tgsi will want
only demote (and terminate if it was possible from GLSL but it's not)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15932>
Emma Anholt [Wed, 13 Apr 2022 05:25:14 +0000 (22:25 -0700)]
nir_to_tgsi: Add support for demote, is_helper_invocation, and subgroup ops.
Found to be missing when testing on nvc0.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15932>
Emma Anholt [Wed, 13 Apr 2022 04:41:07 +0000 (21:41 -0700)]
nir_to_tgsi: Add support for 64-bit fsign/isign.
Found missing on nouveau.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15932>
Emma Anholt [Wed, 13 Apr 2022 04:19:14 +0000 (21:19 -0700)]
nir_to_tgsi: Add support for TG4 with explicit offsets.
Needed for nvidia.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15932>
Georg Lehmann [Wed, 17 Aug 2022 18:33:06 +0000 (20:33 +0200)]
ac/llvm: Fix image instructions with lod for 2d on GFX9.
If there's a lod parameter it matter if the image is 3d or 2d because
the hw reads either the fourth or third component as lod. So detect
3d images and place the lod at the third component otherwise.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18114>
Georg Lehmann [Wed, 17 Aug 2022 17:43:15 +0000 (19:43 +0200)]
aco: Fix image instructions with lod when 2d_view_of_3d is enabled on GFX9.
If there's a lod parameter it matter if the image is 3d or 2d because
the hw reads either the fourth or third component as lod. So detect
3d images and place the lod at the third component otherwise.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18114>
Georg Lehmann [Fri, 19 Aug 2022 15:47:43 +0000 (17:47 +0200)]
nir/opt_algebraic: Optimize d3d9 pow with fmulz.
Foz-DB Navi21:
Totals from 69 (0.05% of 134913) affected shaders:
CodeSize: 255684 -> 253788 (-0.74%); split: -0.74%, +0.00%
Instrs: 46307 -> 46052 (-0.55%); split: -0.55%, +0.00%
Latency: 533255 -> 530742 (-0.47%); split: -0.48%, +0.01%
InvThroughput: 110001 -> 109156 (-0.77%)
VClause: 839 -> 844 (+0.60%); split: -1.19%, +1.79%
SClause: 1411 -> 1395 (-1.13%)
Copies: 1828 -> 1816 (-0.66%); split: -1.09%, +0.44%
PreSGPRs: 2243 -> 2232 (-0.49%)
PreVGPRs: 2213 -> 2192 (-0.95%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18145>
Georg Lehmann [Fri, 8 Jul 2022 17:16:48 +0000 (19:16 +0200)]
nir/opt_algebraic: Optimize check for single bit.
Foz-DB Navi21:
Totals from 3239 (2.40% of 134913) affected shaders:
SpillSGPRs: 110 -> 102 (-7.27%)
CodeSize:
17426512 ->
17344808 (-0.47%); split: -0.48%, +0.01%
Instrs: 3194264 -> 3179366 (-0.47%)
Latency:
20498012 ->
20481419 (-0.08%); split: -0.08%, +0.00%
InvThroughput: 3311738 -> 3311282 (-0.01%); split: -0.02%, +0.00%
SClause: 145810 -> 145690 (-0.08%)
Copies: 171748 -> 169009 (-1.59%); split: -1.63%, +0.03%
Branches: 86610 -> 86370 (-0.28%)
PreSGPRs: 138036 -> 137104 (-0.68%)
PreVGPRs: 138540 -> 138545 (+0.00%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17429>
Yonggang Luo [Tue, 16 Aug 2022 17:42:52 +0000 (01:42 +0800)]
util: Remove the need of _MTX_INITIALIZER_NP in simple_mtx.h
The usage of _MTX_INITIALIZER_NP is a problem. Sure, the code builds on
Linux and Windows, and it even usually works, but is problematic.
It means that Windows lock debugging tools cannot be used with that code.
So we remove _MTX_INITIALIZER_NP to gain the following benefit:
Aligning to the C11 standard threads.h definitions.
Improving portability of the threading code to better support Windows.
This change removes one of the most prolific uses of _MTX_INITIALIZER_NP by
slightly increasing the cost of simple_mtx_lock when targeting platforms that
don't support futex, but it's cost are far less than the cost of syscall,
so the affect are negligible.
The futex code path are not affected. And Windows 8 and upper also
supports the futex codepath, so it's only affect the Windows version < 8, MacOS
or other platforms that doesn't support for futex.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17122>
Yonggang Luo [Mon, 22 Aug 2022 17:01:48 +0000 (01:01 +0800)]
util: Add extern "C" guard in simple_mtx.h
This is a header that can be accessed both in C/C++,
And when remove the usage of _MTX_INITIALIZER_NP in latter commits, it's need
implement simple_mtx_init in .c file, so for ABI consistence
Add the extern "C" for cpp files
Also add comment for #endif guard for code readability
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17122>
Yonggang Luo [Sat, 18 Jun 2022 15:55:49 +0000 (23:55 +0800)]
util: Add api util_call_once_with_context
This is used to remove the need of _MTX_INITIALIZER_NP in simple_mtx.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17122>
Jason Ekstrand [Tue, 30 Aug 2022 19:13:51 +0000 (14:13 -0500)]
pvr: Only destroy the physcial device if it exists
Without this, it segfaults on instance destruction which brings down the
Vulkan app if you have the driver installed on your system, even if you
have no PowerVR hardware.
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18330>
Alyssa Rosenzweig [Mon, 22 Aug 2022 17:38:16 +0000 (13:38 -0400)]
pan/mdg: Print 3 sources for CSEL
The third source exists logically but not architecturally. We still need to
print it. Caught by the assertion.
Fixes:
0ee24c46e0a ("pan/mdg: Only print 2 sources for ALU")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18338>
Alyssa Rosenzweig [Mon, 22 Aug 2022 17:27:55 +0000 (13:27 -0400)]
pan/mdg: Always write return address to r1.w
This might not be optimal but it matches our current behaviour and is much more
justified than the "accidental" code before. Caught by the gcc warning:
../src/panfrost/midgard/midgard_schedule.c:1227:48: warning: the comparison will
always evaluate as ‘true’ for the address of ‘writeout_branch’ will never be
NULL [-Waddress]
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18338>
Pierre-Eric Pelloux-Prayer [Thu, 11 Aug 2022 13:05:18 +0000 (15:05 +0200)]
radeonsi/sqtt: set stable pstate if possible
This avoids the need to manually change the power profile.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18009>
Eric Engestrom [Wed, 31 Aug 2022 09:08:32 +0000 (10:08 +0100)]
wayland: avoid writing interface names as free-form strings
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18335>
Karmjit Mahil [Mon, 22 Aug 2022 13:22:32 +0000 (14:22 +0100)]
pvr: Change indentation from tab to spaces for xml files.
This is done to match other drivers and to use spaces for
indentation throughout the whole of the powervr driver.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18319>
Frank Binns [Wed, 20 Jul 2022 22:35:57 +0000 (23:35 +0100)]
pvr: Implement vkResetCommandBuffer
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18317>
Frank Binns [Tue, 26 Jul 2022 23:07:58 +0000 (00:07 +0100)]
pvr: reset all command buffer state in pvr_cmd_buffer_reset()
Command buffers were only being partially reset. Fix this by factoring out the
common parts of pvr_cmd_buffer_reset() and pvr_cmd_buffer_reset() into a common
function, so there's now only a single place to free command buffer state, and
zeroing out parts of the command buffer that were missed.
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18317>
Gert Wollny [Thu, 25 Aug 2022 10:49:18 +0000 (12:49 +0200)]
virgl/ci: remove some flakes
With the better synchronization we can now remove some flakes.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18243>
Gert Wollny [Thu, 25 Aug 2022 06:30:53 +0000 (08:30 +0200)]
virgl: when reading back wait first, then do the transfer
Otherwise the transfer from the host might not be finished
when we try to read the data.
v2: always wait before readback, but also keep the wait after
a possible readback, Itherwise TF fails in the CI.
Fixes:
e87186fc679c146c5d521139bb79c8eafa0a22f0
virgl: add virgl_resource_transfer_prepare
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18243>
Iago Toral Quiroga [Fri, 26 Aug 2022 07:29:37 +0000 (09:29 +0200)]
v3dv: expose VK_KHR_synchronization2
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18290>
Iago Toral Quiroga [Fri, 26 Aug 2022 11:09:38 +0000 (13:09 +0200)]
v3dv: use VkPipelineStageFlagBits2 when checking semaphore wait stage
This adds extra stages, some of which involve geometry stages that are
relevant to the check we do to check for binning sync.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18290>
Iago Toral Quiroga [Fri, 26 Aug 2022 07:44:53 +0000 (09:44 +0200)]
v3dv: port remaining entry points to KHR_synchronization2
The common code in Mesa will rewrite the old entry points to these
if available.
Since we implement events and timestamps queries in the driver the
API changes don't quite affect us.
vkQueueSubmit2 is already implemented in the common synchronization
framework and the driver works in terms of a submit hook that is
independent of the actual entry point used by the application.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18290>
Iago Toral Quiroga [Fri, 26 Aug 2022 07:26:41 +0000 (09:26 +0200)]
v3dv: implement vkCmdPipelineBarrier2
Added with KHR_synchronization2. The common code in Mesa will
rewrite vkCmdPipelineBarrier to vkCmdPipelineBarrier2.
With synchronization2 barriers now have a per-barrier stage
and access flags (previously these were shared by all the barriers
in a vkCmdPipelineBarrier commands), so we need to rewrite a bit
the logic to account for this.
Also, stage and access flag bits have been expanded and renamed.
Particularly, some new flags have been added that we need to account
for.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18290>
Iago Toral Quiroga [Tue, 30 Aug 2022 06:00:45 +0000 (08:00 +0200)]
v3dv: also check GS stage on image access for binning barriers
For some reason we were only checking the binning VS stage, but we
should also check the GS, like we do for other access types.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18290>
Erik Faye-Lund [Mon, 29 Aug 2022 09:15:59 +0000 (11:15 +0200)]
zink: request forcing of fp32-samplers to nearest when needed
Setting a linear filtering mode when not supported isn't legal, and can
lead to bad things in the VK driver. Let's ask the state-tracker to fix
this for us!
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18292>
Erik Faye-Lund [Mon, 29 Aug 2022 08:38:59 +0000 (10:38 +0200)]
mesa/st: force nearest-filtering for fp32 textures
OpenGL 3.0 requires ARB_texture_float, which technically speaking
requires linear-filtering support for FP32 textures. However, because a
lot of early implementations just ignore this and does nearest filtering
instead due to lack of hardware features for this, this functionality
was never added to the OpenGL CTS.
The result is that FP32 is a feature that is required on paper, but
is unreliable to be used by applications in practice. This is mostly
fine; for most filterable use-cases (e.g colors), FP16 is fine and saves
a bunch of bandwidth, and for cases where you really need the extra bits
(depth-reads etc), filtering is usually not what's wanted.
To save drivers that doesn't support filtering of FP32 filtering from
having to manually whack the state, and get needless CSOs in the CSO
caches, let's force this in early, where we already do the same for
integer textures.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18292>
Erik Faye-Lund [Tue, 30 Aug 2022 06:47:57 +0000 (08:47 +0200)]
mesa/st: always force integer filtering to nearest
There's no need to re-check the DRI-config setting here; we either
already got nearest filtering already, or the we applied a work-around
to avoid incomplete textures. In either case, these should be nearest,
no need to check for it again.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18292>
Erik Faye-Lund [Tue, 30 Aug 2022 06:42:24 +0000 (08:42 +0200)]
mesa/st: also override mip filter for integer textures
If not, drivers may attempt interpolating these values, which isn't
going to do anything good.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18292>
Samuel Pitoiset [Fri, 26 Aug 2022 15:36:02 +0000 (17:36 +0200)]
radv: determine if the topology uses adjacency from the shaders on GFX9+
From the Vulkan spec says:
"VUID-VkGraphicsPipelineCreateInfo-pStages-00738
If the pipeline is being created with pre-rasterization shader
state and pStages includes a geometry shader stage, and does not
include any tessellation shader stages, its shader code must
contain an OpExecutionMode instruction specifying an input
primitive type that is compatible with the primitive topology
specified in pInputAssembly"
In other words, the GS input primitive and the topology must match, so
it's possible to get this information directly from the GS instead of
from the pipeline key. Main benefit is that the driver can compile all
pre-rasterization stages without knowing the primitive topology.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18282>
Samuel Pitoiset [Tue, 30 Aug 2022 08:25:44 +0000 (10:25 +0200)]
radv: allow null descriptor set layouts in pipeline layouts
This is allowed by the Vulkan spec when GPL is used.
Fixes dEQP-VK.pipeline.pipeline_library.graphics_library.misc.other.null_descriptor_set_in_monolithic_pipeline
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18313>
Iago Toral Quiroga [Tue, 30 Aug 2022 07:12:30 +0000 (09:12 +0200)]
v3dv: implement VK_KHR_zero_initialize_workgroup_memory
This only requires that we call the relevant lowering pass in NIR.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18312>
Iago Toral Quiroga [Tue, 30 Aug 2022 07:23:33 +0000 (09:23 +0200)]
nir/lower_variable_initializers: implement non-scoped barrier path
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18312>
Bas Nieuwenhuizen [Mon, 29 Aug 2022 11:21:59 +0000 (13:21 +0200)]
radv: Remove redundant radv_QueuePresentKHR.
Does the same thing as the wsi function.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18293>
Yiwei Zhang [Tue, 30 Aug 2022 23:20:19 +0000 (23:20 +0000)]
venus: allow no external memory handle when renderers lacks support
This is to make vtest happy.
Fixes:
9c5a7ffbd8a ("venus: fix external memory ext filtering")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18331>
Emma Anholt [Tue, 9 Aug 2022 20:56:50 +0000 (13:56 -0700)]
nir/lower_mediump: Lower FS outputs to 16-bit when the value was upconverted.
Take this real-world (trimmed) shader:
precision highp float;
in lowp vec4 var_varVertexColor;
layout(location = 0) out vec4 out_FragColor0;
void main() {
vec4 textureColor0 = vec4(1.000000e+00, 0.000000e+00, 0.000000e+00, 1.000000e+00);
vec3 color = vec3(1.000000e+00, 1.000000e+00, 1.000000e+00);
vec4 outColor = vec4(vec3((color).rgb), 1.000000e+00);
(outColor *= vec4(var_varVertexColor));
(out_FragColor0 = outColor);
}
After opts, it's just a store from input to output. If we decide to lower
the input to 16-bit, then as long as the driver can handle 16-bit outputs,
it would be a good idea to demote the output and save the conversions.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18003>
Jesse Natalie [Tue, 30 Aug 2022 18:58:06 +0000 (11:58 -0700)]
d3d12: Change displayable format logic
Instead of not reporting support for the pixel format at all, just
disable swapchain creation.
Some apps want to create off-screen contexts targeting these formats,
but since WGL doesn't really have "off-screen," the pixel format
enumeration should return support for these.
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18326>
Jason Ekstrand [Mon, 18 Jul 2022 16:34:59 +0000 (11:34 -0500)]
anv: Drop anv_pipeline::use_primitive_replication
Instead of this fragile use_primitive_replication bit which we set
differently depending on whether or not we pulled the shader out of the
cache, compute and use the information up-front during the compile and
then always fetch it from the vue_map after that. This way, regardless
of whether the shader comes from the cache or not, we have the same flow
and there are no inconsistencies.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17602>
Jason Ekstrand [Mon, 18 Jul 2022 16:22:54 +0000 (11:22 -0500)]
intel/compiler: Store the number of position slots in the VUE map
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17602>
Jason Ekstrand [Fri, 15 Jul 2022 20:36:33 +0000 (15:36 -0500)]
nir: Track per-view outputs in shader_info
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17602>
Jason Ekstrand [Mon, 18 Jul 2022 16:06:41 +0000 (11:06 -0500)]
anv: Stop looking at the pipeline in multiview lowering
Passing all the data we need in directly avoids issues where we might
forget what is and isn't set on the pipeline object at the time the
shader call happens. This will be especially important once we start
splitting things up for pipeline libraries.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17602>
Jason Ekstrand [Mon, 18 Jul 2022 15:45:53 +0000 (10:45 -0500)]
anv: Decouple primitive replication check from the fragment shader
Now that we're using nir_intrinsic_load_layer_id for ViewIndex, we can
use primitive replication even when the FS uses ViewIndex. Also, only
check that active_stages doesn't contain anything other than VS and FS,
not that it's exactly VS | FS. This both decouples things more and
allows primitive rplication in the depth-only case where we have no
fragment shader at all.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17602>
Jason Ekstrand [Mon, 18 Jul 2022 15:34:52 +0000 (10:34 -0500)]
anv: Use nir_intrinsic_load_layer_id for ViewId in fragment shaders
Now that fragment shaders are a special case handled up-front, we can
reduce the complexity of some of the logic elsewhere in the pass.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17602>
Kenneth Graunke [Wed, 27 Apr 2022 08:35:02 +0000 (01:35 -0700)]
crocus: Fix memory leaks on iris_resource_create failure paths
We've already allocated the pipe resource, so we ought to free it
before returning.
Fixes:
d8a38edc48e ("crocus: fail resource allocation properly.")
Fixes:
f3630548f1d ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18311>
Kenneth Graunke [Wed, 27 Apr 2022 08:38:10 +0000 (01:38 -0700)]
crocus: Fall back if iris_map_copy_region can't create a staging resource
If we can't create a staging resource, then fall back to direct CPU
mapping (possibly with a stall). This is a rare case, but it could
happen for very large staging buffers.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18311>
Kenneth Graunke [Wed, 27 Apr 2022 08:34:25 +0000 (01:34 -0700)]
crocus: Don't print out XXX messages if resource creation fails
Failing to create staging resources isn't necessarily a critical error,
and we probably don't want to be printing out XXX messages. I mostly
had this here when bringing up iris and resource creation was failing
because I'd done something wrong when writing the code. Then it got
copied over to crocus.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18311>
Kenneth Graunke [Wed, 27 Apr 2022 08:15:00 +0000 (01:15 -0700)]
iris: don't create staging resources larger than half the aperture
This is a port of crocus's
f1c1fcfd (crocus: don't create staging
resources > half aperture).
I chose to use the whole aperture here rather than 3/4 of it, mostly
to avoid adding another legacy field for aperture stuff. It's close
enough to work.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2104
Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Mark Janes markjanes@swizzler.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18311>
Kenneth Graunke [Wed, 27 Apr 2022 08:30:18 +0000 (01:30 -0700)]
iris: Fall back if iris_map_copy_region can't create a staging resource
If we can't create a staging resource, then fall back to direct CPU
mapping (possibly with a stall). This is a rare case, but it could
happen for very large staging buffers.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Mark Janes markjanes@swizzler.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18311>
Kenneth Graunke [Wed, 27 Apr 2022 08:32:47 +0000 (01:32 -0700)]
iris: Don't print out XXX messages if resource creation fails
Failing to create staging resources isn't necessarily a critical error,
and we probably don't want to be printing out XXX messages. I mostly
had this here when bringing up the driver and resource creation was
failing because I'd done something wrong when writing the code.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Mark Janes markjanes@swizzler.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18311>
Kenneth Graunke [Wed, 27 Apr 2022 09:08:48 +0000 (02:08 -0700)]
iris: Delete unused iris_screen::aperture_bytes field
This was effectively removed in
bb3545a6, but the field wasn't deleted,
leaving it there to troll people. screen->aperture_bytes is 0? What?
Fixes:
bb3545a6ee4 ("intel: Store the aperture size in devinfo.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Mark Janes markjanes@swizzler.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18311>
Pierre-Eric Pelloux-Prayer [Fri, 19 Aug 2022 13:04:19 +0000 (15:04 +0200)]
radeonsi: use nir_opt_large_constants earlier
Calling it before nir_convert_to_lcssa helps in some cases,
because the NIR is simpler and nir_opt_large_constants can
detect that a variable is constant.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7059
CC: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18147>
Pierre-Eric Pelloux-Prayer [Fri, 19 Aug 2022 13:02:29 +0000 (15:02 +0200)]
radv: deal with ac_nir_translate failures
Now that ac_nir_translate reports failures instead of aborting,
we need to deal with it in the driver.
For now, call abort to keep the existing behavior but this could
be improved.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18147>
Pierre-Eric Pelloux-Prayer [Fri, 19 Aug 2022 12:59:46 +0000 (14:59 +0200)]
radeonsi: deal with ac_nir_translate failures
ac_nir_translate can fail now so forward the translation result to
si_llvm_compile_shader. If it's a failure, it'll print something like:
radeonsi: can't compile a main shader part
And the shader won't be used.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18147>
Pierre-Eric Pelloux-Prayer [Fri, 19 Aug 2022 12:58:17 +0000 (14:58 +0200)]
ac/llvm: add a return value to ac_nir_translate
Return a boolean instead of aborting when the NIR->LLVM translation fails.
This way, we can deal with the error at the calling site instead of crashing
the whole application.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18147>
Georg Lehmann [Mon, 29 Aug 2022 15:18:56 +0000 (17:18 +0200)]
nir: Print selection control for nir_if.
It's useful to see this information now that aco is going to use it.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18297>
Karol Herbst [Sun, 15 May 2022 17:20:40 +0000 (19:20 +0200)]
nv50: race free state tracking
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10752>
Karol Herbst [Thu, 17 Jun 2021 16:56:24 +0000 (18:56 +0200)]
nvc0: make state handling race free
I am not entirely convinced that contexts can't mess up the state of other
contexts, but with this we at least turn down the amount of races on the
CPU side.
If we hit bugs later we can always look into it then and figure out what
to fix how.
I think we might need a better solution for it in the future as state
tracking might need to become more involved, but for now this should be
good enough.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10752>
Karol Herbst [Wed, 30 Jun 2021 08:26:35 +0000 (10:26 +0200)]
nouveau: make fencing race free
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10752>
Karol Herbst [Wed, 11 May 2022 00:32:52 +0000 (02:32 +0200)]
nouveau: per context client and pushbuf
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10752>
Karol Herbst [Wed, 9 Jun 2021 19:48:17 +0000 (21:48 +0200)]
nouveau/fence: per context fence
This doesn't add a fence list per pipe context, it simply makes us track
the current fence per context so we can safely modify the fence object
per thread.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10752>