Commit graph

129260 commits

Author SHA1 Message Date
Rhys Perry
7d23ea20a0 radv: don't allocate DCC predicate if the image doesn't use DCC
Fixes replay of RenderDoc captures created before a7c0cf500b.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10983>
2021-05-26 12:06:33 +00:00
Samuel Pitoiset
729ebe4b17 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>
2021-05-26 10:32:59 +00:00
Iago Toral Quiroga
5283c6d47b 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>
2021-05-26 10:17:53 +00:00
Erik Faye-Lund
ea003df98e 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>
2021-05-26 09:43:40 +00:00
Iago Toral Quiroga
6a847cbe1d 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>
2021-05-26 07:18:19 +00:00
Iago Toral Quiroga
f7ce44b6e5 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>
2021-05-26 07:18:19 +00:00
Samuel Pitoiset
9984ebf173 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>
2021-05-26 06:59:35 +00:00
Samuel Pitoiset
4631a52f8d 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>
2021-05-26 06:59:35 +00:00
Samuel Pitoiset
7af5a0c1b9 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>
2021-05-26 06:59:35 +00:00
Samuel Pitoiset
ff38e3aadd 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>
2021-05-26 06:59:35 +00:00
Samuel Pitoiset
75d7c752af 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>
2021-05-26 06:59:35 +00:00
Samuel Pitoiset
bdb9634151 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>
2021-05-26 06:59:35 +00:00
Emma Anholt
9cb06fca73 ci/freedreno: Add another a630 piglit flake.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10986>
2021-05-26 05:32:48 +00:00
Mike Blumenkrantz
f9ecbb1e1d 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>
2021-05-26 04:06:27 +00:00
Mike Blumenkrantz
360f1032d2 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>
2021-05-26 03:55:37 +00:00
Mike Blumenkrantz
7a5800af3d 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>
2021-05-26 03:55:37 +00:00
Mike Blumenkrantz
e4e20556d6 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>
2021-05-26 03:37:50 +00:00
Mike Blumenkrantz
e46b0e87f2 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>
2021-05-26 03:37:50 +00:00
Mike Blumenkrantz
4d62fca087 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>
2021-05-25 21:51:17 -04:00
Mike Blumenkrantz
0c1fe392e8 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>
2021-05-25 21:51:17 -04:00
Mike Blumenkrantz
517484ea89 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>
2021-05-25 21:51:17 -04:00
Mike Blumenkrantz
a29688a0d1 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>
2021-05-25 21:51:16 -04:00
Mike Blumenkrantz
6f5037c9de 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>
2021-05-25 21:50:50 -04:00
Mike Blumenkrantz
6766c983f0 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>
2021-05-25 21:50:50 -04:00
Mike Blumenkrantz
b27e729c0d 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>
2021-05-25 21:16:44 -04:00
Mike Blumenkrantz
be40886521 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>
2021-05-25 21:16:43 -04:00
Mike Blumenkrantz
6eb290341b 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>
2021-05-25 20:53:01 -04:00
Mike Blumenkrantz
425642bec1 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>
2021-05-25 20:53:00 -04:00
Mike Blumenkrantz
d54c21d279 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>
2021-05-25 20:52:38 -04:00
Mike Blumenkrantz
9d128e6aed 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>
2021-05-25 20:52:38 -04:00
Mike Blumenkrantz
6dcad430dd 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>
2021-05-25 20:52:38 -04:00
Mike Blumenkrantz
a98e11ce21 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>
2021-05-25 20:52:38 -04:00
Mike Blumenkrantz
02f8e860e5 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>
2021-05-25 20:52:38 -04:00
Mike Blumenkrantz
f20b3c5aa9 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>
2021-05-25 20:52:37 -04:00
Yiwei Zhang
f61337b549 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>
2021-05-26 00:05:33 +00:00
Yiwei Zhang
abec42c9a3 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>
2021-05-26 00:05:33 +00:00
Yiwei Zhang
fca4b6877a 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>
2021-05-26 00:05:33 +00:00
Nanley Chery
19a8bd4c63 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: 98dc7f56b7 ("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>
2021-05-25 22:24:36 +00:00
Nanley Chery
34dbbfdd14 anv,iris: Port the D16 workaround stalls to BLORP
Commit cd40110420 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>
2021-05-25 20:55:27 +00:00
Nanley Chery
afe3f373a4 intel: Limit the D16 workarounds to Gfx12.0
The workarounds introduced in cd40110420 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>
2021-05-25 20:55:27 +00:00
Andres Gomez
07b86e64a5 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>
2021-05-25 17:03:25 +00:00
Andres Gomez
537c9460fa 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>
2021-05-25 17:03:25 +00:00
Andres Gomez
a71ffa4592 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>
2021-05-25 17:03:25 +00:00
Andres Gomez
fa8ca10e27 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>
2021-05-25 17:03:25 +00:00
Andres Gomez
f0f812dbe7 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>
2021-05-25 17:03:25 +00:00
Chia-I Wu
62014aeccd 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>
2021-05-25 16:39:02 +00:00
Marek Olšák
7844bdadac 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>
2021-05-25 16:15:44 +00:00
Marek Olšák
56a450e984 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>
2021-05-25 16:15:44 +00:00
Marek Olšák
2fad90dc4a 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>
2021-05-25 16:15:44 +00:00
Marek Olšák
9ba17ec21a 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>
2021-05-25 16:15:44 +00:00