platform/upstream/mesa.git
3 years agoradv: move all game workarounds to drirc
Samuel Pitoiset [Tue, 25 May 2021 12:18:43 +0000 (14:18 +0200)]
radv: move all game workarounds to drirc

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

3 years agoutil/drirc: use application_name_match for the SotTR RADV workaround
Samuel Pitoiset [Tue, 25 May 2021 12:48:45 +0000 (14:48 +0200)]
util/drirc: use application_name_match for the SotTR RADV workaround

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

3 years agoradv: add few new drirc options
Samuel Pitoiset [Tue, 25 May 2021 12:09:15 +0000 (14:09 +0200)]
radv: add few new drirc options

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

3 years agoutil/drirc: make engine_versions an optional field
Samuel Pitoiset [Tue, 25 May 2021 12:32:14 +0000 (14:32 +0200)]
util/drirc: make engine_versions an optional field

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

3 years agoci/freedreno: Add spec@arb_copy_buffer@dlist flake on a530
Tomeu Vizoso [Wed, 26 May 2021 14:48:44 +0000 (16:48 +0200)]
ci/freedreno: Add spec@arb_copy_buffer@dlist flake on a530

Crashes occasionally, probably due to the same cause as
spec@arb_copy_buffer@intra-buffer-copy.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci/freedreno: Add new flake after "ci: Configure DUTs for max performance"
Tomeu Vizoso [Wed, 26 May 2021 14:47:56 +0000 (16:47 +0200)]
ci/freedreno: Add new flake after "ci: Configure DUTs for max performance"

Probably was made more probable since the cpufreq or devfreq changes. Or
maybe due to the lack of runtime PM?

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci/freedreno: Fix name of flake
Tomeu Vizoso [Wed, 26 May 2021 14:43:44 +0000 (16:43 +0200)]
ci/freedreno: Fix name of flake

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci/zink: Add nearest_linear_mirror_l8_pot flake
Tomeu Vizoso [Wed, 26 May 2021 10:50:16 +0000 (12:50 +0200)]
ci/zink: Add nearest_linear_mirror_l8_pot flake

Crashed once at https://gitlab.freedesktop.org/mesa/mesa/-/jobs/10116149

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci/freedreno: Add depth32f_stencil8 flakes
Tomeu Vizoso [Wed, 26 May 2021 10:26:08 +0000 (12:26 +0200)]
ci/freedreno: Add depth32f_stencil8 flakes

Started happening after disabling cpufreq, devfreq and runtime PM.

At least one of these fail in each run, so it's blocking MRs.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoradeonsi/ci: Add new Piglit failures
Tomeu Vizoso [Wed, 26 May 2021 07:42:59 +0000 (09:42 +0200)]
radeonsi/ci: Add new Piglit failures

These appeared after the execution order of tests changed after a Piglit
upgrade.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci: Add a manual job for tracking the performance of Freedreno
Antonio Caggiano [Wed, 28 Apr 2021 14:16:42 +0000 (16:16 +0200)]
ci: Add a manual job for tracking the performance of Freedreno

Use Piglit's replay profile to measure and store the time that frames
take to render in the GPU.

This job won't run automatically in regular pipelines, but will be
triggered automatically by a script for every successful pre-merge
pipeline.

This is because we want to generate performance data for every relevant
commit merged in main, but we don't want to keep a device busy during
the pre-merge run.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci: Uprev apitrace to 170424754bb4 "retrace: Get --loop to work without rewinding"
Tomeu Vizoso [Tue, 4 May 2021 06:26:55 +0000 (08:26 +0200)]
ci: Uprev apitrace to 170424754bb4 "retrace: Get --loop to work without rewinding"

Needed to be able to replay traces for performance tracking.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci: Uprev piglit to eee7d89611cf "tests: Replay profile frame times"
Tomeu Vizoso [Wed, 28 Apr 2021 14:16:32 +0000 (16:16 +0200)]
ci: Uprev piglit to eee7d89611cf "tests: Replay profile frame times"

So we can measure GPU times when replaying traces.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci: Configure DUTs for max performance
Tomeu Vizoso [Thu, 19 Nov 2020 16:01:41 +0000 (17:01 +0100)]
ci: Configure DUTs for max performance

Lock CPU and GPU frequency scaling on devices so to speed up test
execution and lower the variation of frame times from performance replay
jobs.

Also disable autosuspend of the GPU device.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agopanfrost: Expose PIPE_CAP_SHAREABLE_SHADERS
Alyssa Rosenzweig [Mon, 24 May 2021 21:31:00 +0000 (17:31 -0400)]
panfrost: Expose PIPE_CAP_SHAREABLE_SHADERS

Now that the compile entrypoints don't touch the context, it's clear
that we can support this. Note, even though the pools for shaders and
descriptors are referenced from particular contexts, they are unowned
pools -- once uploaded, any thread can use the results.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10976>

3 years agopanfrost: Don't take ctx in panfrost_shader_compile
Alyssa Rosenzweig [Mon, 24 May 2021 21:29:18 +0000 (17:29 -0400)]
panfrost: Don't take ctx in panfrost_shader_compile

Complicates validation of PIPE_CAP_SHAREABLE_SHADERS.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10976>

3 years agopanfrost: Inline pan_prepare_shader_descriptor
Alyssa Rosenzweig [Mon, 24 May 2021 21:24:52 +0000 (17:24 -0400)]
panfrost: Inline pan_prepare_shader_descriptor

Complicates the next patch.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10976>

3 years agointel/gfx12+: Add Wa_14013840143
Anuj Phogat [Mon, 24 May 2021 17:56:12 +0000 (10:56 -0700)]
intel/gfx12+: Add Wa_14013840143

Cc: mesa-stable
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10984>

3 years agoradv: remove DFSM
Samuel Pitoiset [Tue, 25 May 2021 06:26:23 +0000 (08:26 +0200)]
radv: remove DFSM

DFSM has never been enabled by default because it was slower.
RadeonSI is also dropping support for this because they discovered
that's actually not efficient in practice.

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

3 years agozink: ci updates
Mike Blumenkrantz [Wed, 26 May 2021 14:30:06 +0000 (10:30 -0400)]
zink: ci updates

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11007>

3 years agozink: remove weird lod hack for texturing
Mike Blumenkrantz [Wed, 26 May 2021 14:11:01 +0000 (10:11 -0400)]
zink: remove weird lod hack for texturing

this breaks texturing in non-fragment stages and is unnecessary
due to using nir_lower_tex

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11007>

3 years agoci: downgrade sphinx to v3.x
Erik Faye-Lund [Wed, 26 May 2021 13:27:27 +0000 (15:27 +0200)]
ci: downgrade sphinx to v3.x

Sphinx 4.0 was recently released, but sadly the theme we're using is not
yet compatible with Sphinx 4.0.

So let's limit the sphinx-version we're using to a version before Sphinx
4.0 for now.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4843
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11005>

3 years agoradv: stop reporting ACO from the device name
Samuel Pitoiset [Tue, 25 May 2021 11:18:24 +0000 (13:18 +0200)]
radv: stop reporting ACO from the device name

ACO is the default compiler for almost a year from now, so it should
be fine to replace RADV/ACO by just RADV. LLVM is still added
when RADV_DEBUG=llvm is used for convenience.

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

3 years agoradv: fix formatting of radv_dri_options
Rhys Perry [Mon, 24 May 2021 14:53:36 +0000 (15:53 +0100)]
radv: fix formatting of radv_dri_options

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

3 years agoradv: workaround incorrect depthBiasConstantFactor by Path of Exile
Rhys Perry [Mon, 24 May 2021 14:39:34 +0000 (15:39 +0100)]
radv: workaround incorrect depthBiasConstantFactor by Path of Exile

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4677
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10980>

3 years agoradv: add radv_absolute_depth_bias
Rhys Perry [Mon, 24 May 2021 15:23:59 +0000 (16:23 +0100)]
radv: add radv_absolute_depth_bias

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10980>

3 years agoradv: set maxVertexInputAttributeOffset to UINT32_MAX
Mike Blumenkrantz [Sun, 16 May 2021 18:17:38 +0000 (14:17 -0400)]
radv: set maxVertexInputAttributeOffset to UINT32_MAX

this is what amdvlk uses

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10827>

3 years agoradv: make radv_pipeline::attrib_ends 32bit
Mike Blumenkrantz [Fri, 21 May 2021 15:13:58 +0000 (11:13 -0400)]
radv: make radv_pipeline::attrib_ends 32bit

this is needed to support larger vertex attribute offsets

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10827>

3 years agoradv: don't allocate DCC predicate if the image doesn't use DCC
Rhys Perry [Tue, 25 May 2021 16:01:23 +0000 (17:01 +0100)]
radv: don't allocate DCC predicate if the image doesn't use DCC

Fixes replay of RenderDoc captures created before a7c0cf500b3.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10983>

3 years agoaco: fix emitting discard when the program just ends
Samuel Pitoiset [Mon, 24 May 2021 15:05:30 +0000 (17:05 +0200)]
aco: fix emitting discard when the program just ends

For fragment shaders that only contain a discard, the exec mask has
to be zero'd and everything discarded.

It seems unnecessary to emit an export here because if the FS has no
exports, the compiler already emits a null export at the end.

Fixes incorrect hair rendering in Detroit: Become Human.

fossil-db (Sienna Cichlid):
Totals from 3 (0.00% of 149839) affected shaders:
CodeSize: 2896 -> 2872 (-0.83%)
Instrs: 556 -> 553 (-0.54%)
Latency: 29266 -> 29214 (-0.18%)
InvThroughput: 3374 -> 3372 (-0.06%)

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10955>

3 years agov3dv: implement VK_KHR_bind_memory2
Iago Toral Quiroga [Tue, 25 May 2021 11:21:55 +0000 (13:21 +0200)]
v3dv: implement VK_KHR_bind_memory2

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11001>

3 years agov3d: use helper to simplify things
Erik Faye-Lund [Tue, 25 May 2021 14:03:27 +0000 (16:03 +0200)]
v3d: use helper to simplify things

We can use the util_prim_restart_index_from_size helper to avoid
open-coding the implicit index size here.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10981>

3 years agov3dv: implement VK_KHR_maintenance3
Iago Toral Quiroga [Tue, 25 May 2021 08:49:06 +0000 (10:49 +0200)]
v3dv: implement VK_KHR_maintenance3

We don't have any special restrictions associated with the number
of descriptors in a set other than maybe not exceeding what we can
put in a single memory allocation, so in practice, applications will
be limited by the per-stage contraints defined by other Vulkan limits.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10970>

3 years agov3dv: define V3D_MAX_BUFFER_RANGE
Iago Toral Quiroga [Tue, 25 May 2021 07:48:39 +0000 (09:48 +0200)]
v3dv: define V3D_MAX_BUFFER_RANGE

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10970>

3 years agoradv: use radv_dcc_enabled() for the FB mip flush workaround
Samuel Pitoiset [Thu, 6 May 2021 12:51:04 +0000 (14:51 +0200)]
radv: use radv_dcc_enabled() for the FB mip flush workaround

This has no effects because radv_image_has_CB_metadata() still
accounts for DCC which is incorrect. This should be changed.

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

3 years agoradv: do not decompress DCC for partial resolves if stores are supported
Samuel Pitoiset [Thu, 6 May 2021 12:38:56 +0000 (14:38 +0200)]
radv: do not decompress DCC for partial resolves if stores are supported

It seems unnecessary.

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

3 years agoradv: only init DCC if compressed in the HW resolve path
Samuel Pitoiset [Thu, 6 May 2021 12:30:19 +0000 (14:30 +0200)]
radv: only init DCC if compressed in the HW resolve path

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

3 years agoradv: only mark DCC as compressed when drawing if layout allows it
Samuel Pitoiset [Thu, 6 May 2021 12:18:40 +0000 (14:18 +0200)]
radv: only mark DCC as compressed when drawing if layout allows it

Just having DCC enabled on the base level doesn't mean we are
using compressed rendering.

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

3 years agoradv: remove redundant call to radv_dcc_enabled()
Samuel Pitoiset [Thu, 6 May 2021 12:06:05 +0000 (14:06 +0200)]
radv: remove redundant call to radv_dcc_enabled()

radv_layout_dcc_compressed() is now per level.

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

3 years agoradv: pass an image range to radv_layout_dcc_compressed()
Samuel Pitoiset [Thu, 6 May 2021 10:20:37 +0000 (12:20 +0200)]
radv: pass an image range to radv_layout_dcc_compressed()

With DCC and mipmaps, some mips can't be compressed and it makes
sense to check this here.

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

3 years agoci/freedreno: Add another a630 piglit flake.
Emma Anholt [Tue, 25 May 2021 18:37:00 +0000 (11:37 -0700)]
ci/freedreno: Add another a630 piglit flake.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10986>

3 years agoci: disentangle tags for containers and artifacts produced by them
Andres Gomez [Tue, 18 May 2021 11:14:35 +0000 (14:14 +0300)]
ci: disentangle tags for containers and artifacts produced by them

In order to reduce the amount of building work and network traffic, we
use docker caching. For that, we use the MESA_IMAGE_TAG and
MESA_BASE_TAG env variables which build the MESA_IMAGE variable to
identify different containers.

We are also using these tags to identify the cached artifacts produced
by other containers when those are part of the underlying OS to run
directly in DUTs through the DISTRIBUTION_TAG env variable.

The undesirable collateral effect is that we cannot combine a test job
using a container which would like to make use of some of the cached
artifacts created by another container. In other words, we cannot have
a job using a DISTRIBUTION_TAG and a MESA_IMAGE using a different
MESA_[IMAGE|BASE]_TAG variables.

Now, we split the usage in the DISTRIBUTION_TAG through the definition
of MESA_ARTIFACTS_TAG AND MESA_ARTIFACTS_BASE_TAG.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10977>

3 years agonir/builder: add nir_mask
Mike Blumenkrantz [Tue, 4 May 2021 14:24:03 +0000 (10:24 -0400)]
nir/builder: add nir_mask

it's handy to have functions for generating masks

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10620>

3 years agozink: disable push descriptors on amd
Mike Blumenkrantz [Tue, 26 Jan 2021 21:41:37 +0000 (16:41 -0500)]
zink: disable push descriptors on amd

I'm told this is bad for perf

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10998>

3 years agozink: hook up push descriptor and descriptor template extensions
Mike Blumenkrantz [Tue, 23 Mar 2021 15:11:00 +0000 (11:11 -0400)]
zink: hook up push descriptor and descriptor template extensions

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10998>

3 years agozink: switch to memory barriers instead of actual buffer barriers
Mike Blumenkrantz [Thu, 21 Jan 2021 19:40:26 +0000 (14:40 -0500)]
zink: switch to memory barriers instead of actual buffer barriers

drivers don't seem to actually use the buffer part of the info, so this is
just wasting cycles initializing the values

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10996>

3 years agozink: mark some buffer barrier functions inline/static
Mike Blumenkrantz [Thu, 21 Jan 2021 19:40:09 +0000 (14:40 -0500)]
zink: mark some buffer barrier functions inline/static

minor optimization

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10996>

3 years agozink: call tc_driver_internal_flush_notify() on flush
Mike Blumenkrantz [Wed, 19 May 2021 13:59:31 +0000 (09:59 -0400)]
zink: call tc_driver_internal_flush_notify() on flush

I think this is right?

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10882>

3 years agozink: implement a tc is_resource_busy hook
Mike Blumenkrantz [Wed, 19 May 2021 13:51:17 +0000 (09:51 -0400)]
zink: implement a tc is_resource_busy hook

this is kinda gross for now, but it gets the job done

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10882>

3 years agozink: force streamout rebind when mapping a streamout buffer for writing
Mike Blumenkrantz [Wed, 19 May 2021 16:39:48 +0000 (12:39 -0400)]
zink: force streamout rebind when mapping a streamout buffer for writing

if the contents of the buffer change between uses, trigger the rebind path
next time a draw happens for synchronization

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10882>

3 years agozink: implement tc idalloc resource id stuff
Mike Blumenkrantz [Wed, 19 May 2021 14:08:22 +0000 (10:08 -0400)]
zink: implement tc idalloc resource id stuff

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10882>

3 years agozink: move timeline_wait() to screen function
Mike Blumenkrantz [Wed, 12 May 2021 15:08:04 +0000 (11:08 -0400)]
zink: move timeline_wait() to screen function

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10882>

3 years agozink: make timeline_wait use only a screen param
Mike Blumenkrantz [Wed, 12 May 2021 15:06:11 +0000 (11:06 -0400)]
zink: make timeline_wait use only a screen param

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10882>

3 years agozink: add vertex buffer barriers during bind
Mike Blumenkrantz [Tue, 19 Jan 2021 17:05:48 +0000 (12:05 -0500)]
zink: add vertex buffer barriers during bind

now we have tracking for vbo binds and can automatically reapply the correct
barrier just before draw if the resource is modified after bind

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agozink: emit descriptor barriers and references during bind
Mike Blumenkrantz [Fri, 15 Jan 2021 18:22:10 +0000 (13:22 -0500)]
zink: emit descriptor barriers and references during bind

there's not actually any reason to do these during draw other than wasting
cpu cycles, and it has the side benefit of providing a bunch more info for rebinds

image resources for gfx shaders need to have their barriers deferred until draw time,
however, as it's unknown what layout they'll require until that point due to potentially
being bound to multiple descriptor types

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agozink: improve samplerview update flagging
Mike Blumenkrantz [Mon, 18 Jan 2021 17:16:51 +0000 (12:16 -0500)]
zink: improve samplerview update flagging

we shouldn't actually need to use the hash value here now that the
surfaces and bufferviews have been deduplicated

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agozink: abstract descriptor functionality and make descriptor structs private
Mike Blumenkrantz [Thu, 1 Apr 2021 19:18:51 +0000 (15:18 -0400)]
zink: abstract descriptor functionality and make descriptor structs private

the first step to adding modular descriptor managers is to isolate the existing one
so that it can be easily swapped out

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agozink: replace has_descriptors program member with a util function
Mike Blumenkrantz [Thu, 1 Apr 2021 19:18:16 +0000 (15:18 -0400)]
zink: replace has_descriptors program member with a util function

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agozink: pass descriptor type to set layout create()
Mike Blumenkrantz [Thu, 1 Apr 2021 19:11:42 +0000 (15:11 -0400)]
zink: pass descriptor type to set layout create()

this will be useful in the future

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agozink: unify pipeline layout creation and move to descriptor_program_init
Mike Blumenkrantz [Thu, 1 Apr 2021 19:08:47 +0000 (15:08 -0400)]
zink: unify pipeline layout creation and move to descriptor_program_init

the descriptor layouts are the last component needed to create the pipeline
layout, so it makes sense to streamline setup by having the pipeline layout
created from a single place for both types of pipelines

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agozink: make a public util function for allocating descriptor sets
Mike Blumenkrantz [Thu, 1 Apr 2021 19:00:51 +0000 (15:00 -0400)]
zink: make a public util function for allocating descriptor sets

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agozink: make descriptor_layout_get a public util function
Mike Blumenkrantz [Thu, 1 Apr 2021 18:59:37 +0000 (14:59 -0400)]
zink: make descriptor_layout_get a public util function

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agozink: rename ptr_add_usage -> batch_ptr_add_usage
Mike Blumenkrantz [Thu, 1 Apr 2021 18:13:16 +0000 (14:13 -0400)]
zink: rename ptr_add_usage -> batch_ptr_add_usage

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>

3 years agoegl/android: check front rendering support for cros gralloc
Yiwei Zhang [Thu, 13 May 2021 22:57:44 +0000 (22:57 +0000)]
egl/android: check front rendering support for cros gralloc

Enable EGL_KHR_mutable_render_buffer when below conditions are met:
1. Driver part implementation of this extension is available
2. Loader part implementation of this extension is available
3. ClientAPIs must be OpenGL ES bits (ES, ES2 or ES3)
4. Gralloc is cros gralloc and it supports front render usage query

(4) is optional as long as another gralloc supports similar query.

Upon window surface creation, if the surface type has mutable render
buffer, then append the cached front rendering usage to the existing
usage and properly set to the ANativeWindow.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10685>

3 years agogallium/dri: implement EGL_KHR_mutable_render_buffer
Yiwei Zhang [Thu, 13 May 2021 18:38:50 +0000 (18:38 +0000)]
gallium/dri: implement EGL_KHR_mutable_render_buffer

Tested with low-lantency stylus apps with this extension enabled, no
regression on the cts.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10685>

3 years agogallium/st: add a back buffer fallback for front rendering
Yiwei Zhang [Thu, 13 May 2021 06:15:10 +0000 (06:15 +0000)]
gallium/st: add a back buffer fallback for front rendering

Unlike front buffer used by big GL API for front rendering,
EGL_KHR_mutable_render_buffer together with ES redirects GL_BACK to the
front buffer.

This patch adds a fallback to use back buffer and ensures no behavior
change for unrelated frontends.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10685>

3 years agointel/isl: Fix HiZ+CCS comment about ambiguates
Nanley Chery [Wed, 17 Feb 2021 22:49:11 +0000 (14:49 -0800)]
intel/isl: Fix HiZ+CCS comment about ambiguates

Note that CCS isn't ambiguated during a HiZ ambiguate. Dumping the CCS
surface after a HiZ ambiguate shows that the CCS is unchanged.

Fixes: 98dc7f56b7d ("intel/isl: Add a separate ISL_AUX_USAGE_HIZ_CCS_WT")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9112>

3 years agoanv,iris: Port the D16 workaround stalls to BLORP
Nanley Chery [Fri, 21 May 2021 21:55:26 +0000 (14:55 -0700)]
anv,iris: Port the D16 workaround stalls to BLORP

Commit cd40110420b added stalls before register writes that occur when
drivers emit depth stencil packets. However, it only did so for
non-BLORP draw calls. Since those packets are sometimes emitted during
BLORP calls, add stalls there too.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4574
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10939>

3 years agointel: Limit the D16 workarounds to Gfx12.0
Nanley Chery [Fri, 21 May 2021 21:50:38 +0000 (14:50 -0700)]
intel: Limit the D16 workarounds to Gfx12.0

The workarounds introduced in cd40110420b are no longer needed on
Gfx12.5.

Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10939>

3 years agoci: add VKD3D-Proton testsuite job for radv's Navy Flounder
Andres Gomez [Tue, 18 May 2021 14:00:27 +0000 (17:00 +0300)]
ci: add VKD3D-Proton testsuite job for radv's Navy Flounder

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10870>

3 years agoci: add VKD3D-Proton testsuite runner
Andres Gomez [Tue, 18 May 2021 13:54:54 +0000 (16:54 +0300)]
ci: add VKD3D-Proton testsuite runner

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10870>

3 years agoci: include VKD3D-Proton tests into the VK test container
Andres Gomez [Wed, 10 Mar 2021 14:46:51 +0000 (16:46 +0200)]
ci: include VKD3D-Proton tests into the VK test container

Instead of installing the distribution package, build and install
locally, including the tests.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10870>

3 years agoci: add radv's trace job for Navy Flounder
Andres Gomez [Tue, 18 May 2021 12:22:18 +0000 (15:22 +0300)]
ci: add radv's trace job for Navy Flounder

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10870>

3 years agoci: uprev DXVK to 1.8.1
Andres Gomez [Tue, 18 May 2021 11:59:37 +0000 (14:59 +0300)]
ci: uprev DXVK to 1.8.1

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10870>

3 years agoci: uprev apitrace to 10.0
Andres Gomez [Tue, 18 May 2021 12:06:09 +0000 (15:06 +0300)]
ci: uprev apitrace to 10.0

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10870>

3 years agoci: remove radv's trace job for Polaris10
Andres Gomez [Tue, 18 May 2021 12:21:55 +0000 (15:21 +0300)]
ci: remove radv's trace job for Polaris10

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10870>

3 years agoci: update radv's trace job tag for Raven
Andres Gomez [Tue, 18 May 2021 12:20:37 +0000 (15:20 +0300)]
ci: update radv's trace job tag for Raven

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10870>

3 years agoutil/u_thread: fix u_thread_setname for long names
Chia-I Wu [Fri, 21 May 2021 20:41:40 +0000 (13:41 -0700)]
util/u_thread: fix u_thread_setname for long names

"WSI swapchain queue", set by vulkan/wsi/x11, is longer than 15
characters.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10935>

3 years agoradeonsi: remove DFSM after we discovered how bad it is
Marek Olšák [Thu, 20 May 2021 09:27:43 +0000 (05:27 -0400)]
radeonsi: remove DFSM after we discovered how bad it is

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: disable DFSM on gfx9 by default because it decreases performance a lot
Marek Olšák [Thu, 20 May 2021 09:05:15 +0000 (05:05 -0400)]
radeonsi: disable DFSM on gfx9 by default because it decreases performance a lot

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: implement threaded context callbacks for resource busy checking
Marek Olšák [Tue, 27 Apr 2021 01:33:24 +0000 (21:33 -0400)]
radeonsi: implement threaded context callbacks for resource busy checking

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: generate buffer_id_unique for u_threaded_context
Marek Olšák [Thu, 6 May 2021 00:16:31 +0000 (20:16 -0400)]
radeonsi: generate buffer_id_unique for u_threaded_context

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: allow changing the NGG subgroup size to 256 but don't change it yet
Marek Olšák [Sat, 8 May 2021 11:55:05 +0000 (07:55 -0400)]
radeonsi: allow changing the NGG subgroup size to 256 but don't change it yet

Currently, 128 seems to have the best performance.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: rewrite the prefix sum computation for shader culling
Marek Olšák [Sat, 8 May 2021 06:41:52 +0000 (02:41 -0400)]
radeonsi: rewrite the prefix sum computation for shader culling

Instead of storing the vertex mask per wave into LDS and then computing
the prefix sum, store 8-bit bitcounts (vertex counts) of the vertex masks
into LDS. This allows us to compute the sum using v_sad_u8, which computes
a sum of 4 i8vec4 components in one instruction.

Each i8vec4 of vertex counts is loaded in parallel threads (one dword
per thread) instead of all being loaded in thread 0, and readlane copies
them to SGPRs instead of readfirstlane.

LDS is no longer initialized before culling. Instead, the counts for
inactive waves are masked with AND later.

Incorrect old comments are also fixed.

This change removes 80 bytes from the code size, and it allows increasing
the workgroup size from 128 to 256. (which is the main motivation for this)

Now changing the workgroup size with wave64 has no effect on the code size.
Switching to wave32 with 8 waves even generates slightly smaller code than
wave64 with 4 waves.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: add missing threaded_resource_deinit calls in fail paths
Marek Olšák [Mon, 17 May 2021 15:02:54 +0000 (11:02 -0400)]
radeonsi: add missing threaded_resource_deinit calls in fail paths

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: add a gfx10 hw bug workaround with the barrier before gs_alloc_req
Marek Olšák [Thu, 13 May 2021 03:21:36 +0000 (23:21 -0400)]
radeonsi: add a gfx10 hw bug workaround with the barrier before gs_alloc_req

Fixes: 8845a23698c - amd: add NAVI10 PCI IDs

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: remove 8 bytes from si_resource, turn other 4 bytes into padding
Marek Olšák [Thu, 22 Apr 2021 04:38:37 +0000 (00:38 -0400)]
radeonsi: remove 8 bytes from si_resource, turn other 4 bytes into padding

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: change si_resource::alignment to alignment_log2 for better packing
Marek Olšák [Thu, 22 Apr 2021 04:31:28 +0000 (00:31 -0400)]
radeonsi: change si_resource::alignment to alignment_log2 for better packing

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: improve generated culling code by adding optimization barriers
Marek Olšák [Sun, 9 May 2021 22:33:24 +0000 (18:33 -0400)]
radeonsi: improve generated culling code by adding optimization barriers

This removes a lot of instructions and 16 bytes from the code size.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: re-enable fast launch with indexed tri strips because it doesn't hang
Marek Olšák [Mon, 10 May 2021 11:44:42 +0000 (07:44 -0400)]
radeonsi: re-enable fast launch with indexed tri strips because it doesn't hang

I don't know which change fixed this, but I can't reproduce the hang anymore.

Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: remove a twice duplicated workaround for VERT_GRP_SIZE
Marek Olšák [Tue, 11 May 2021 00:31:19 +0000 (20:31 -0400)]
radeonsi: remove a twice duplicated workaround for VERT_GRP_SIZE

This enables better lane occupancy.

Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: fix the fast launch vert/prim thread counts if they are trimmed
Marek Olšák [Mon, 10 May 2021 10:53:46 +0000 (06:53 -0400)]
radeonsi: fix the fast launch vert/prim thread counts if they are trimmed

This fixes the case when the counts were out of sync because one of them
was decreased.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: don't use GS fast launch with small instances
Marek Olšák [Tue, 11 May 2021 13:11:34 +0000 (09:11 -0400)]
radeonsi: don't use GS fast launch with small instances

Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: don't disable L2 caching for staging textures
Marek Olšák [Sat, 8 May 2021 03:52:19 +0000 (23:52 -0400)]
radeonsi: don't disable L2 caching for staging textures

Uncached access can be slow if the box is not aligned nicely.
Also, caching in L2 might enable bigger PCIe bursts.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: always use the L2 LRU cache policy for faster clears and copies
Marek Olšák [Sat, 8 May 2021 03:47:23 +0000 (23:47 -0400)]
radeonsi: always use the L2 LRU cache policy for faster clears and copies

Waves and CP DMA can finish sooner if L2 doesn't do any evictions, which
is hard to predict.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: fix a coherency issue when VS memory stores are not visible in PS
Marek Olšák [Tue, 11 May 2021 00:03:04 +0000 (20:03 -0400)]
radeonsi: fix a coherency issue when VS memory stores are not visible in PS

If a shader has no param exports (no varyings), the pixel shader can start
after the VS position is written before the vertex shader finishes.
The fix is to wait for the memory stores before the position export.

The code needs to be restructured. First prepare param exports to get
nr_param_exports, then emit position exports with the wait, and then
emit param exports.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: add a gfx10 bug workaround for NOT_EOP
Marek Olšák [Sat, 8 May 2021 02:52:42 +0000 (22:52 -0400)]
radeonsi: add a gfx10 bug workaround for NOT_EOP

Fixes: cc24ec8c077 - radeonsi: set NOT_EOP for back-to-back draws on gfx10+

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: handle PIPE_CAP_MAX_VERTEX_BUFFERS
Marek Olšák [Thu, 22 Apr 2021 02:14:03 +0000 (22:14 -0400)]
radeonsi: handle PIPE_CAP_MAX_VERTEX_BUFFERS

no change in behavior because the value is the same as the default

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agoradeonsi: remove unused SI_IMAGE_ACCESS_AS_BUFFER
Marek Olšák [Thu, 6 May 2021 21:37:24 +0000 (17:37 -0400)]
radeonsi: remove unused SI_IMAGE_ACCESS_AS_BUFFER

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>

3 years agowinsys/amdgpu: don't hold a mutex while accessing is_shared
Marek Olšák [Fri, 7 May 2021 13:17:12 +0000 (09:17 -0400)]
winsys/amdgpu: don't hold a mutex while accessing is_shared

It adds overhead to amdgpu_bo_wait and I'm not sure whether the mutex
is even needed.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10813>