platform/upstream/mesa.git
3 years agoCI: Try really hard to get updated Windows TLS certs
Daniel Stone [Mon, 15 Mar 2021 20:41:30 +0000 (20:41 +0000)]
CI: Try really hard to get updated Windows TLS certs

Windows doesn't actually distribute a full TLS CA certificate store, but
pulls them in over time with Windows Update. Try to prime it by manually
pulling the certificates and installing them.

This bumps the Windows tag to force a rebuild.

Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9618>

3 years agozink: track resource_object usage instead of resource usage
Mike Blumenkrantz [Tue, 27 Oct 2020 16:07:36 +0000 (12:07 -0400)]
zink: track resource_object usage instead of resource usage

the resource object is now a state tracker for the inner resource_object,
so it can safely be destroyed even if the backing resource is still in use

this also requires updating various things to keep descriptor states/caches working

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

3 years agozink: split out backing resource object create/destroy
Mike Blumenkrantz [Tue, 27 Oct 2020 15:59:33 +0000 (11:59 -0400)]
zink: split out backing resource object create/destroy

moving towards these being able to exist semi-independently...

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

3 years agozink: move resource internals to a separate struct
Mike Blumenkrantz [Tue, 27 Oct 2020 15:38:16 +0000 (11:38 -0400)]
zink: move resource internals to a separate struct

this starts the path towards being able to replace the backing objects for
a resource

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

3 years agozink: break out batch id finding for resource usage into util function
Mike Blumenkrantz [Thu, 8 Oct 2020 18:16:40 +0000 (14:16 -0400)]
zink: break out batch id finding for resource usage into util function

this is generally helpful for figuring out the last batch a resource was
used for

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

3 years agozink: avoid looping for non-ubo descriptor updates based on set usage
Mike Blumenkrantz [Tue, 13 Oct 2020 17:45:50 +0000 (13:45 -0400)]
zink: avoid looping for non-ubo descriptor updates based on set usage

if we know that the descriptor set is cached and already in use by a given
batch, then we also know that all the resources in the set are tracked, which
means that we can skip over some looping  during descriptor updates which would
otherwise be used to add tracking for sampler/image views/states

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

3 years agozink: add batch usage flags for sampler views/states and desc sets
Mike Blumenkrantz [Tue, 13 Oct 2020 12:12:59 +0000 (08:12 -0400)]
zink: add batch usage flags for sampler views/states and desc sets

this massively cuts down cpu time for hashing and lookups, resulting in
a noticeable performance increase

the sampler_state batch usage for now is just being set for future use when
it will be leveraged to permit immediate deletion

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

3 years agoradv: Use correct DCC compressed block size for sampling.
Bas Nieuwenhuizen [Mon, 15 Mar 2021 21:15:39 +0000 (22:15 +0100)]
radv: Use correct DCC compressed block size for sampling.

Don't need to change the pre-GFX9 samplers because this option doesn't
vary there.

Fixes: f848f2adfae ("radv: Use ac_surface DCC settings for shareable images.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4455
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4425
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9611>

3 years agogenxml: Make 1-bit L3$ config register fields bool on Gen7
Jason Ekstrand [Mon, 15 Mar 2021 23:39:19 +0000 (18:39 -0500)]
genxml: Make 1-bit L3$ config register fields bool on Gen7

Otherwise, they look like booleans but, if you put a value other than
0/1 in them, the GenXML generator code will explode.

Fixes: b6875b0094c "anv: Drop has_slm in emit_l3_config for gen11+"
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9614>

3 years agoturnip: implement intrinsic_vulkan_resource_reindex
Danylo Piliaiev [Wed, 10 Mar 2021 12:29:31 +0000 (14:29 +0200)]
turnip: implement intrinsic_vulkan_resource_reindex

Descriptor arrays are continuous, so it's just an addition of offset.

Fixes test:
 dEQP-VK.spirv_assembly.instruction.compute.variable_pointers.dynamic_offset.select_descriptor_array

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9495>

3 years agoci/freedreno: Add three more a5xx flakes from the last day.
Eric Anholt [Thu, 11 Mar 2021 19:47:54 +0000 (11:47 -0800)]
ci/freedreno: Add three more a5xx flakes from the last day.

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

3 years agoandroid: i965: Rename files with "intel_" prefix to "brw_"
Mauro Rossi [Fri, 12 Mar 2021 23:08:37 +0000 (00:08 +0100)]
android: i965: Rename files with "intel_" prefix to "brw_"

The necessary changes for Android build were missing in Makefile.sources

Fixes: 9d95e1bd79a8 (i965: Rename files with "intel_" prefix to "brw_")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9576>

3 years agoanv: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:50:15 +0000 (17:50 -0500)]
anv: use common interfaces for shader modules

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

3 years agotu: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:50:15 +0000 (17:50 -0500)]
tu: use common interfaces for shader modules

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508>

3 years agov3dv: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:50:00 +0000 (17:50 -0500)]
v3dv: use common interfaces for shader modules

squashed changes from Alejandro Piñeiro <apinheiro@igalia.com>:

Add call to vk_object_base_init on internal shader_module: we have
some cases where internally we have some shader modules that we don't
create through CreateShaderModule, so in this case we need to manually
call base_init. Not sure why this wasn't needed before.

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

3 years agoradv: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:49:46 +0000 (17:49 -0500)]
radv: use common interfaces for shader modules

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

3 years agolavapipe: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:49:28 +0000 (17:49 -0500)]
lavapipe: use common interfaces for shader modules

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

3 years agovk/util: add a util macro for initializing stack vk_shader_module structs
Mike Blumenkrantz [Fri, 12 Mar 2021 12:30:39 +0000 (07:30 -0500)]
vk/util: add a util macro for initializing stack vk_shader_module structs

radv does a lot of this, so having a central dispatch point will be useful in
case changes are made to this struct in the future

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

3 years agovk/util: add unified shader module struct/functions
Mike Blumenkrantz [Wed, 10 Mar 2021 22:48:30 +0000 (17:48 -0500)]
vk/util: add unified shader module struct/functions

there's some extra logging stuff dumped into here to match functionality,
eventually that should also be consolidated into vk_util.c

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

3 years agolavapipe: add host query reset
Dave Airlie [Sun, 14 Mar 2021 22:10:36 +0000 (08:10 +1000)]
lavapipe: add host query reset

This just resets the queries on the host size.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9594>

3 years agolavapipe: fix writing availability for queries.
Dave Airlie [Mon, 15 Mar 2021 06:56:48 +0000 (16:56 +1000)]
lavapipe: fix writing availability for queries.

If the availability has to be written it needs to be written
 to the correct place.

The host query reset tests fall over this.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9594>

3 years agolavapipe: add missing break
Dave Airlie [Mon, 15 Mar 2021 01:49:33 +0000 (11:49 +1000)]
lavapipe: add missing break

No effect as-is but annoying later.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9594>

3 years agoanv: Set correct binding table entry count
Sagar Ghuge [Fri, 12 Mar 2021 03:03:17 +0000 (19:03 -0800)]
anv: Set correct binding table entry count

We can use surface_count as it is to set binding table entry count since
it's already in units.

On Felix's Tigerlake with the GPU at fixed frequency, this patch
improves performance of several games:

   - Shadow of the Tomb Raider: +1.5%
   - Dota2vk: +1%
   - Dark Souls: +1%

v2: (Ken)
- Remove get_binding_table_entry_count() and use surface_count directly.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9548>

3 years agoanv: Drop has_slm in emit_l3_config for gen11+
Jordan Justen [Sun, 14 Mar 2021 19:54:26 +0000 (12:54 -0700)]
anv: Drop has_slm in emit_l3_config for gen11+

For some gen12+ platforms, L3 config (cfg) can be NULL leading to a
seg-fault in emit_l3_config. But, we don't use has_slm for gen11+, so
we can just avoid declaring the variable.

Reworks:
 * Drop has_slm variable for all gens (suggested-by Jason)

Ref: 633dec7163e ("anv: Set L3 full way allocation at context init if L3 cfg is NULL")
Ref: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9534
Fixes: 581e68bc99b ("anv: move L3 config emission to genX_state.c")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9589>

3 years agoanv: Remove redundant #if checks
Anuj Phogat [Thu, 11 Mar 2021 20:30:41 +0000 (12:30 -0800)]
anv: Remove redundant #if checks

Patch removes redundant #if checks and unused code inside another #if
block.

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

3 years agoanv: Lower ViewIndex to zero when multiview is disabled
Caio Marcelo de Oliveira Filho [Fri, 12 Mar 2021 23:13:30 +0000 (15:13 -0800)]
anv: Lower ViewIndex to zero when multiview is disabled

Vulkan spec says

    If multiview is enabled in the render pass, this value will be one
    of the bits set in the view mask of the subpass the pipeline is
    compiled against. If multiview is not enabled in the render pass,
    this value will be zero.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4446
Fixes: 0db70703300 ("anv/pipeline: Add shader lowering for multiview")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9574>

3 years agozink: stop leaking programs
Mike Blumenkrantz [Thu, 5 Nov 2020 01:50:08 +0000 (20:50 -0500)]
zink: stop leaking programs

gfx and compute programs both end up with an extra ref from creation,
so they both need to lose a ref during creation after they get their
shader refs

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

3 years agozink: unset ctx->program pointers when an unref destroys the object
Mike Blumenkrantz [Sun, 13 Dec 2020 22:47:26 +0000 (17:47 -0500)]
zink: unset ctx->program pointers when an unref destroys the object

if we destroy a program object which is currently the "active" program then
we need to unset the pointer to avoid invalid access

also unset injected tcs pointers where appropriate

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

3 years agozink: return true from program ref functions upon free
Mike Blumenkrantz [Mon, 14 Dec 2020 18:41:23 +0000 (13:41 -0500)]
zink: return true from program ref functions upon free

this lets us unset the context pointer accurately

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

3 years agozink: use internal api for first-frame fence
Mike Blumenkrantz [Tue, 2 Mar 2021 14:30:02 +0000 (09:30 -0500)]
zink: use internal api for first-frame fence

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

3 years agozink: force explicit fence only on first frame flush
Mike Blumenkrantz [Thu, 8 Oct 2020 18:56:37 +0000 (14:56 -0400)]
zink: force explicit fence only on first frame flush

we have implicit sync hooked up for drivers now so we don't need to worry
about drawing over our frontbuffer unexpectedly

still a weird issue remaining where we miss the first frame without an explicit
fence, but I expect that will get resolved eventually by wsi

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

3 years agozink: force mesa flush implicit fencing on ANV
Mike Blumenkrantz [Wed, 23 Dec 2020 16:17:21 +0000 (11:17 -0500)]
zink: force mesa flush implicit fencing on ANV

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

3 years agozink: determine whether the vulkan driver requires mesa flush wsi
Mike Blumenkrantz [Thu, 25 Feb 2021 15:22:09 +0000 (10:22 -0500)]
zink: determine whether the vulkan driver requires mesa flush wsi

this is used for ANV's implicit fencing (until we get wsi)

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

3 years agozink: use a safer iteration for fb surfaces during rp init
Mike Blumenkrantz [Thu, 29 Oct 2020 21:19:12 +0000 (17:19 -0400)]
zink: use a safer iteration for fb surfaces during rp init

doing a pointer iteration looks cool, but if the array is full, then it
goes out of bounds and we crash

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

3 years agozink: implement a surface cache
Mike Blumenkrantz [Tue, 9 Feb 2021 20:40:38 +0000 (15:40 -0500)]
zink: implement a surface cache

this is a global cache for all surface objects, enabling some memory
optimizations as well as improved reuse of cached descriptors

loosely based on patches from Antonio Caggiano

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

3 years agozink: ralloc screen objects
Mike Blumenkrantz [Tue, 9 Feb 2021 20:49:21 +0000 (15:49 -0500)]
zink: ralloc screen objects

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

3 years agoswr: fix array-bounds warning
Michel Zou [Thu, 11 Mar 2021 20:32:40 +0000 (21:32 +0100)]
swr: fix array-bounds warning

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>

3 years agoswr: fix deprecated llvm 11 declaration warning
Michel Zou [Wed, 10 Mar 2021 21:12:43 +0000 (22:12 +0100)]
swr: fix deprecated llvm 11 declaration warning

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>

3 years agoswr: fix unused SplitString warning
Michel Zou [Wed, 10 Mar 2021 20:42:25 +0000 (21:42 +0100)]
swr: fix unused SplitString warning

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>

3 years agoswr: Fix SWR_CONTEXT pre-declaration
Michel Zou [Wed, 10 Mar 2021 20:34:14 +0000 (21:34 +0100)]
swr: Fix SWR_CONTEXT pre-declaration

Silents a warning on msvc

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>

3 years agoswr: fix win32 intrinsics
Michel Zou [Wed, 10 Mar 2021 20:25:05 +0000 (21:25 +0100)]
swr: fix win32 intrinsics

The doc doesnt mention Index is altered when mask is null.
This is consistent with both llvm & migw implementations.

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>

3 years agoswr: extern declaration for win32 intrinsics
Michel Zou [Wed, 10 Mar 2021 20:19:20 +0000 (21:19 +0100)]
swr: extern declaration for win32 intrinsics

This fixes compilation on msvc because llvm redefines these too
Closes #4417

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9502>

3 years agoradv: rework radv_use_dcc_for_image() a bit
Samuel Pitoiset [Thu, 11 Mar 2021 16:14:42 +0000 (17:14 +0100)]
radv: rework radv_use_dcc_for_image() a bit

To make it clear that only GFX8-9 have missing DCC features.

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

3 years agoradv: remove useless DCC disable check for 3D images on GFX10+
Samuel Pitoiset [Thu, 11 Mar 2021 15:59:11 +0000 (16:59 +0100)]
radv: remove useless DCC disable check for 3D images on GFX10+

addrlib uses the S swizzle mode which disables DCC completely.

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

3 years agoradv: add missing SQTT events for copy_commands2/create_renderpass2
Samuel Pitoiset [Fri, 12 Mar 2021 15:06:19 +0000 (16:06 +0100)]
radv: add missing SQTT events for copy_commands2/create_renderpass2

A bunch of entrypoints were missing.

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

3 years agoanv: fix memory allocation error handling
Marcin Ślusarz [Mon, 15 Mar 2021 09:35:06 +0000 (10:35 +0100)]
anv: fix memory allocation error handling

Reported by Coverity.

Fixes: 0a7224f3ff7 ("anv: group as many command buffers into a single execbuf")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9596>

3 years agointel: install intel_device_info
Lionel Landwerlin [Mon, 15 Mar 2021 09:09:00 +0000 (11:09 +0200)]
intel: install intel_device_info

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9595>

3 years agofrontends/va: fix protected slice data buffer read size
Pierre-Eric Pelloux-Prayer [Fri, 12 Mar 2021 08:19:57 +0000 (09:19 +0100)]
frontends/va: fix protected slice data buffer read size

Read vlVaBuffer->size bytes instead of an hardcoded value.

Fixes: deb7dc82f62 ("frontends/va: handle protected slice data buffer")
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9553>

3 years agoradeonsi/sqtt: fix user event max size
Pierre-Eric Pelloux-Prayer [Thu, 11 Mar 2021 20:54:36 +0000 (21:54 +0100)]
radeonsi/sqtt: fix user event max size

Larger strings can corrupt rgp files.

Fixes: 5dc823304b1 ("radeonsi/sqtt: forward string markers to sqtt")
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9553>

3 years agobroadcom/compiler: be more flexible scheduling TMU writes
Iago Toral Quiroga [Fri, 12 Mar 2021 08:54:49 +0000 (09:54 +0100)]
broadcom/compiler: be more flexible scheduling TMU writes

V3D 4.x allows more flexibility, so take advantage of that. Generally,
we can reorder any writes in the same sequence, so long as they are
not the sequence terminator (which must always be last, since it is
the one triggering the operation), and TMUD writes, since these must
be ordered with respect to each other.

total instructions in shared programs: 13735183 -> 13731927 (-0.02%)
instructions in affected programs: 903057 -> 899801 (-0.36%)
helped: 2358
HURT: 746
Instructions are helped.

total max-temps in shared programs: 2322020 -> 2322009 (<.01%)
max-temps in affected programs: 619 -> 608 (-1.78%)
helped: 19
HURT: 11
Inconclusive result (value mean confidence interval includes 0).

total sfu-stalls in shared programs: 31494 -> 31489 (-0.02%)
sfu-stalls in affected programs: 182 -> 177 (-2.75%)
helped: 40
HURT: 40
Inconclusive result (value mean confidence interval includes 0).

total inst-and-stalls in shared programs: 13766677 -> 13763416 (-0.02%)
inst-and-stalls in affected programs: 901343 -> 898082 (-0.36%)
helped: 2349
HURT: 746
Inst-and-stalls are helped.

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

3 years agobroadcom/compiler: flag wrtmuc with a read dependency on last_tmu_config
Iago Toral Quiroga [Fri, 12 Mar 2021 08:29:07 +0000 (09:29 +0100)]
broadcom/compiler: flag wrtmuc with a read dependency on last_tmu_config

Instead of using a write depdency. We use last_tmu_config to ensure ordering
of instructions participating in different TMU sequences. To this end,
all sequence terminators flag a write dependency on last_tmu_config, but
wrtmuc is not a sequence terminator, so we can be more flexible by flagging
it as a read depedency. This would prevent it to be moved into a previous
sequence (since it cannot be moved past the previous sequence terminator due
to the read depedency), but it allows it to be reordered with instructions in
the same sequence, which allows us to pair it up more effectively. Particularly,
it allows to pair up a wrtmuc with the sequence terminator of the same sequence,
turning code like this:

nop                  ; mov  tmut, r0     ; thrsw; wrtmuc (tex[0].p0 | 0x3)
nop                  ; nop               ; wrtmuc (tex[0].p1 | 0x0)
nop                  ; mov  tmus, r1

Into this:

nop                  ; mov  tmut, r0     ; thrsw; wrtmuc (tex[0].p0 | 0x3)
nop                  ; mov  tmus, r1     ; wrtmuc (tex[0].p1 | 0x0)

total instructions in shared programs: 13755738 -> 13735183 (-0.15%)
instructions in affected programs: 2510921 -> 2490366 (-0.82%)
helped: 10963
HURT: 485
Instructions are helped.

total max-temps in shared programs: 2322828 -> 2322020 (-0.03%)
max-temps in affected programs: 11303 -> 10495 (-7.15%)
helped: 608
HURT: 19
Max-temps are helped.

total sfu-stalls in shared programs: 31545 -> 31494 (-0.16%)
sfu-stalls in affected programs: 235 -> 184 (-21.70%)
helped: 62
HURT: 11
Sfu-stalls are helped.

total inst-and-stalls in shared programs: 13787283 -> 13766677 (-0.15%)
inst-and-stalls in affected programs: 2525187 -> 2504581 (-0.82%)
helped: 10989
HURT: 477
Inst-and-stalls are helped.

v2: add a comment explaining the read depdency (Piñeiro).

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

3 years agoutil/fossilize_db: remove compression from foz db helper
Timothy Arceri [Sat, 6 Mar 2021 03:52:46 +0000 (14:52 +1100)]
util/fossilize_db: remove compression from foz db helper

We now handle compression in the shared cache item creation code.
Compressing the cache item header with the already compressed blob
doesn't help much so lets just remove it.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9593>

3 years agoutil/disk_cache: make use of the new compression helpers
Timothy Arceri [Thu, 4 Mar 2021 05:39:47 +0000 (16:39 +1100)]
util/disk_cache: make use of the new compression helpers

This makes compression use more consistent between the zstd and
zlib libraries. It also reduces the amount of code required for
zlib use.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9593>

3 years agoutil: create some standalone compression helpers
Timothy Arceri [Thu, 4 Mar 2021 05:34:34 +0000 (16:34 +1100)]
util: create some standalone compression helpers

This will be used by the following patch. It allows us to detangle
compression from the disk cache code, and abstract the underlying
compression libraries we use.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9593>

3 years agozink: use _mesa_set_search_and_add() for set management
Mike Blumenkrantz [Wed, 7 Oct 2020 18:32:16 +0000 (14:32 -0400)]
zink: use _mesa_set_search_and_add() for set management

this avoids extra hash lookups

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

3 years agozink: optimize resource usage tracking
Mike Blumenkrantz [Tue, 6 Oct 2020 20:59:02 +0000 (16:59 -0400)]
zink: optimize resource usage tracking

we already have the batch usage info here for the resource, so if we know
the resource is already used on the batch then we don't need to also perform
a hash lookup to double check that it's really there

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

3 years agolavapipe: enable EXT_scalar_block_layout
Dave Airlie [Sun, 14 Mar 2021 22:01:50 +0000 (08:01 +1000)]
lavapipe: enable EXT_scalar_block_layout

The frontend should handle this.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9590>

3 years agolavapipe: enable KHR_uniform_buffer_standard_layout
Dave Airlie [Sun, 14 Mar 2021 21:53:24 +0000 (07:53 +1000)]
lavapipe: enable KHR_uniform_buffer_standard_layout

I think the frontend should handle all of this fine.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9590>

3 years agoiris: Fix typos.
Vinson Lee [Thu, 25 Feb 2021 06:11:12 +0000 (22:11 -0800)]
iris: Fix typos.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9382>

3 years agonv50/ir: Add constructor for NV50LegalizePostRA.
Vinson Lee [Mon, 1 Mar 2021 02:44:27 +0000 (18:44 -0800)]
nv50/ir: Add constructor for NV50LegalizePostRA.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor
for this class does not initialize r63.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9326>

3 years agozink: ci updates
Mike Blumenkrantz [Sun, 14 Mar 2021 23:22:39 +0000 (19:22 -0400)]
zink: ci updates

disabling qbo piglit test for now due to lots of brokenness in zink which
makes them flaky, will be reenabled soon

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

3 years agozink: remove extraneous flush in transfer_map_region_flush
Mike Blumenkrantz [Thu, 8 Oct 2020 19:19:50 +0000 (15:19 -0400)]
zink: remove extraneous flush in transfer_map_region_flush

this was only needed to cover up some other bugs:
* missing barriers for buffer sampler/image descriptors
* weirdness with first frame handling

there's better ways of handling both cases, and now they're handled better

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

3 years agozink: move buffer<->image copying to pipe_context::resource_copy_region hook
Mike Blumenkrantz [Wed, 7 Oct 2020 19:55:16 +0000 (15:55 -0400)]
zink: move buffer<->image copying to pipe_context::resource_copy_region hook

that's a todo item off the list

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

3 years agodocs: update lavapipe features.txt
Dave Airlie [Sun, 14 Mar 2021 20:39:53 +0000 (06:39 +1000)]
docs: update lavapipe features.txt

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

3 years agolavapipe: add single ssbo variable pointer support.
Dave Airlie [Thu, 24 Dec 2020 01:33:18 +0000 (11:33 +1000)]
lavapipe: add single ssbo variable pointer support.

Multiple buffer seems to break with tess eval only,
something to investigate later.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8222>

3 years agolavapipe: move to common create render pass code
Dave Airlie [Fri, 12 Mar 2021 07:04:13 +0000 (17:04 +1000)]
lavapipe: move to common create render pass code

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550>

3 years agolavapipe: move to the common casting interfaces
Dave Airlie [Fri, 12 Mar 2021 07:03:07 +0000 (17:03 +1000)]
lavapipe: move to the common casting interfaces

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550>

3 years agolavapipe: move queue to base object
Dave Airlie [Fri, 12 Mar 2021 07:02:48 +0000 (17:02 +1000)]
lavapipe: move queue to base object

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550>

3 years agolavapipe: add support for VK_KHR_create_renderpass2
Dave Airlie [Thu, 24 Dec 2020 04:09:28 +0000 (14:09 +1000)]
lavapipe: add support for VK_KHR_create_renderpass2

Also move to the common code for create renderpass

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9550>

3 years agolima/ppir: don't use list_length() in loop in regalloc and liveness analysis
Vasily Khoruzhick [Fri, 12 Mar 2021 03:36:00 +0000 (19:36 -0800)]
lima/ppir: don't use list_length() in loop in regalloc and liveness analysis

list_length() complexity is O(n), so it's better to store number of regs
separately and use it instead of list_length().

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9570>

3 years agolima: add precompile debug flag
Vasily Khoruzhick [Sun, 14 Mar 2021 06:17:18 +0000 (22:17 -0800)]
lima: add precompile debug flag

This flag will be used by run from mesa-shader-db to trigger shader
compilation with default settings.

Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9583>

3 years agor600/sfn remove some leftover debug output
Gert Wollny [Sun, 14 Mar 2021 13:15:07 +0000 (14:15 +0100)]
r600/sfn remove some leftover debug output

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>

3 years agor600/sfn: lower idiv, imod, etc in nir
Gert Wollny [Sat, 6 Mar 2021 17:14:04 +0000 (18:14 +0100)]
r600/sfn: lower idiv, imod, etc in nir

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>

3 years agor600/sfn: lower bitfield_extract and bitfield_insert in NIR
Gert Wollny [Sat, 6 Mar 2021 15:21:09 +0000 (16:21 +0100)]
r600/sfn: lower bitfield_extract and bitfield_insert in NIR

v2: lower bitfield insert to bitfield_select (Rhys Perry

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>

3 years agor600/sfn: Fix including/not including c++ parts of header
Gert Wollny [Sat, 6 Mar 2021 15:06:47 +0000 (16:06 +0100)]
r600/sfn: Fix including/not including c++ parts of header

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>

3 years agor600/sfn: fix buffer offset for ssbo writes
Gert Wollny [Fri, 5 Mar 2021 18:46:24 +0000 (19:46 +0100)]
r600/sfn: fix buffer offset for ssbo writes

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>

3 years agor600/sfn: remove unused code
Gert Wollny [Fri, 5 Mar 2021 18:45:50 +0000 (19:45 +0100)]
r600/sfn: remove unused code

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>

3 years agor600/sfn: sort alu opcodes in switch statememt
Gert Wollny [Sat, 6 Mar 2021 15:05:55 +0000 (16:05 +0100)]
r600/sfn: sort alu opcodes in switch statememt

This makes it easier to figure out which ops are already handled.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9584>

3 years ago.mailmap: add an alias for Eleni Maria Stea
Andres Gomez [Fri, 5 Mar 2021 16:22:44 +0000 (18:22 +0200)]
.mailmap: add an alias for Eleni Maria Stea

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eleni Maria Stea <elene.mst@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9435>

3 years agoradeonsi: Limit the size of the in-memory shader cache
Axel Davy [Sat, 13 Mar 2021 10:48:45 +0000 (11:48 +0100)]
radeonsi: Limit the size of the in-memory shader cache

The in-memory shader cache can get significantly
huge in some rare cases.
Limit its size to 64MB on 32 bits, and 1GB else.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9578>

3 years agost/nine: detect worker threads syncs for systemmem
Axel Davy [Sat, 13 Mar 2021 10:23:26 +0000 (11:23 +0100)]
st/nine: detect worker threads syncs for systemmem

If we detect too many syncs, use the stream_uploader,
which avoid syncs.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Use stream_uploader for bad cases of systemmem
Axel Davy [Sat, 13 Mar 2021 10:06:43 +0000 (11:06 +0100)]
st/nine: Use stream_uploader for bad cases of systemmem

Using stream_uploader in case we cannot use unsynchronized
improves performance.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Always use DYNAMIC with SYSTEMMEM
Axel Davy [Fri, 12 Mar 2021 10:48:48 +0000 (11:48 +0100)]
st/nine: Always use DYNAMIC with SYSTEMMEM

The disadvantages of the DYNAMIC path over the
non-dynamic path are minor.
The advantages are many.

As we don't know if bad behaving apps use
non-dynamic SYSTEMMEM in a dynamic fashion,
let's be safe and always be dynamic.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Force DYNAMIC SYSTEMMEM for sw vertex processing
Axel Davy [Fri, 12 Mar 2021 10:29:24 +0000 (11:29 +0100)]
st/nine: Force DYNAMIC SYSTEMMEM for sw vertex processing

SW vertex processing buffers are supposed to be sorted in RAM
and to be immediately idle after use (thus you can write at the
same location again immediately).

DYNAMIC SYSTEMMEM is by far the best fit for now for these kind
of buffers, though it can be improved further. Indeed the use
pattern will cause a lot of syncs with csmt actived.
Thus disable csmt when full sw vertex processing is requested.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Optimize dynamic systemmem buffers
Axel Davy [Sat, 6 Mar 2021 17:27:42 +0000 (18:27 +0100)]
st/nine: Optimize dynamic systemmem buffers

Some apps use DYNAMIC SYSTEMMEM buffers and fill them in a
dynamic fashion with discard and nooverwrite locking flags.

To prevent uploading the whole buffer every draw call,
track the region needed for the draw call, and
upload only that region (or a bit more in order
to ease valid region tracking).

Try to aggressively upload with discard/unsynchronized.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Track pending MANAGED buffer uploads
Axel Davy [Fri, 5 Mar 2021 17:23:22 +0000 (18:23 +0100)]
st/nine: Track pending MANAGED buffer uploads

The tracking enables to avoid flushing the csmt thread
when locking repeatedly the same buffer, as long
as the locks are non-overlapping.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agogallium/util: Add new u_box helpers
Axel Davy [Sat, 6 Mar 2021 16:34:22 +0000 (17:34 +0100)]
gallium/util: Add new u_box helpers

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Use correct bind flag at buffer creation
Axel Davy [Sat, 6 Mar 2021 16:16:55 +0000 (17:16 +0100)]
st/nine: Use correct bind flag at buffer creation

The buffer bind creation flag was incorrect for index buffers

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Optimize DrawPrimitiveUp
Axel Davy [Sat, 6 Mar 2021 13:53:18 +0000 (14:53 +0100)]
st/nine: Optimize DrawPrimitiveUp

Try to keep the same vertex buffer state when
having several consecutive DrawPrimitiveUp.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Nicer DrawPrimUp opt patch

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

3 years agost/nine: Refactor DrawPrimitiveUp
Axel Davy [Sat, 6 Mar 2021 16:14:46 +0000 (17:14 +0100)]
st/nine: Refactor DrawPrimitiveUp

. Use the same fonction as DrawPrimitive
. Drop the user vbuf path
. Avoid setting NULL vertexbuffer to the context

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Implement SYSTEMMEM buffers same as MANAGED
Axel Davy [Tue, 2 Mar 2021 21:48:56 +0000 (22:48 +0100)]
st/nine: Implement SYSTEMMEM buffers same as MANAGED

Use the MANAGED path for SYSTEMMEM buffers.

Tests point out the locking behaviour of SYSTEMEMM
buffers is very close to MANAGED.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Optimize EndScene
Axel Davy [Fri, 5 Mar 2021 17:23:08 +0000 (18:23 +0100)]
st/nine: Optimize EndScene

So far we did nothing on EndScene, but the API
doc says it flushes the GPU command queue.
The doc implies one can optimize CPU usage
by calling EndScene long before Present() is called.

Implementing the flush behaviour gives me +15-20%
on the CPU limited Halo. On the other hand, do limit
the flush to only once per frame.
3DMark03/3Mark05 get a 2% perf hit with the patch,
but 5% if I allow more flushes.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agodocs: Mark VK_KHR_maintenance1 as done on turnip
Matt Turner [Sat, 13 Mar 2021 17:01:04 +0000 (12:01 -0500)]
docs: Mark VK_KHR_maintenance1 as done on turnip

I think I messed this up when splitting the turnip and lavapipe patches
apart.

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

3 years agolavapipe: set more resource bind flags using image/buffer usage bits
Mike Blumenkrantz [Fri, 12 Mar 2021 21:03:35 +0000 (16:03 -0500)]
lavapipe: set more resource bind flags using image/buffer usage bits

we have this info available, so we can be more precise about it

stop the printf spam!

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

3 years agomesa: only report INCOMPLETE_FORMATS for GLES1 / desktop
Ilia Mirkin [Fri, 12 Mar 2021 19:25:09 +0000 (14:25 -0500)]
mesa: only report INCOMPLETE_FORMATS for GLES1 / desktop

The enum is defined in EXT_framebuffer_object (available on desktop),
and was copied to OES_framebuffer_object (available in GLES1). The ES2
spec has no mention of such an enum. If the underlying implementation
does not support this, it will set a generic incomplete error (as is
done in st_cb_fbo.c if mixed_formats == false).

This should fix the following dEQP tests on ES2 drivers:

    dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_tex_none_none
    dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_rbo_none_none

Fixes: fd017458bc84 (mesa: fix fbo attachment size check for RBs, make it trigger in ES2)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4444
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9572>

3 years agovirgl: Update GLES expectations.
Eric Anholt [Wed, 10 Mar 2021 22:58:41 +0000 (14:58 -0800)]
virgl: Update GLES expectations.

These are only used in manual runs, and I noticed in a recent run that
something on master had fixed them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9509>

3 years agomesa/st: Fix precompile misses on compat GL VSes writing to color outputs.
Eric Anholt [Wed, 10 Mar 2021 22:46:16 +0000 (14:46 -0800)]
mesa/st: Fix precompile misses on compat GL VSes writing to color outputs.

In compat GL, the gl_FrontColor/BackColor gets clamped unless you
explicitly turn it off with ARB_color_buffer_float, and most apps doing
floating point color rendering are going to be using non-compat varyings
anyway instead of hoping that ARB_color_buffer_float exists.  Thus, guess
that the app will get clamping on the color outputs to reduce draw-time
recompiles.

Saves 60 VS recompiles on half-life-2.trace on freedreno (and similarly for
many other compat GL apps).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9509>

3 years agomesa/st: Add perf debug for draw-time variant compiles.
Eric Anholt [Wed, 10 Mar 2021 22:27:31 +0000 (14:27 -0800)]
mesa/st: Add perf debug for draw-time variant compiles.

This ARB_debug_output is particularly useful in that default apitrace will
log it, so we can find when we're doing draw-time recompiles we shouldn't be.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9509>

3 years agomesa/st: Unify st_get_vp_variant() and st_get_common_variant().
Eric Anholt [Wed, 10 Mar 2021 21:53:55 +0000 (13:53 -0800)]
mesa/st: Unify st_get_vp_variant() and st_get_common_variant().

Fixes the following issues I can see:

- Non-VS NIR shaders not gathering info after ucp lowering
- Non-VS NIR shaders not doing GL_CLAMP lowering
- Non-VS TGSI shaders not setting up stream output state.
- Non-VS TGSI shaders leaking lower_depth_clamp lowering across variant
  compiles.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9509>

3 years agolavapipe: fix push descriptor set indexing
Mike Blumenkrantz [Fri, 12 Mar 2021 13:53:21 +0000 (08:53 -0500)]
lavapipe: fix push descriptor set indexing

the push set index isn't always 0, so the offsets need to be updated
in order to avoid clobbering other sets

Fixes: 6be19765cf2 ("lavapipe: add support for VK_KHR_push_descriptor")

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