platform/upstream/mesa.git
2 years agoisaspec: Remove unused leftovers
Rob Clark [Sat, 25 Sep 2021 16:16:16 +0000 (09:16 -0700)]
isaspec: Remove unused leftovers

These were never used, leftovers from an earlier iteration of isaspec
which used an RPN based thing for expressions.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049>

2 years agodocs: update calendar and link releases notes for 21.2.3
Dylan Baker [Wed, 29 Sep 2021 20:26:17 +0000 (13:26 -0700)]
docs: update calendar and link releases notes for 21.2.3

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

2 years agodocs" Add SHA256 sum for mesa 21.2.3
Dylan Baker [Wed, 29 Sep 2021 20:17:23 +0000 (13:17 -0700)]
docs" Add SHA256 sum for mesa 21.2.3

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

2 years agodocs: add release notes for 21.2.3
Dylan Baker [Wed, 29 Sep 2021 19:40:49 +0000 (12:40 -0700)]
docs: add release notes for 21.2.3

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

2 years agovenus: copy VkPhysicalDeviceImageDrmFormatModifierInfoEXT
Chia-I Wu [Tue, 28 Sep 2021 23:05:31 +0000 (16:05 -0700)]
venus: copy VkPhysicalDeviceImageDrmFormatModifierInfoEXT

We should not drop VkPhysicalDeviceImageDrmFormatModifierInfoEXT when it
is provided.

Fixes dEQP-VK.drm_format_modifiers.export_import.*.

Fixes: efa185ed5cd ("venus: rework external memory capability queries")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13094>

2 years agogallivm: use pmulhrsw to make aos sampling more accurate.
Dave Airlie [Tue, 28 Sep 2021 04:39:37 +0000 (14:39 +1000)]
gallivm: use pmulhrsw to make aos sampling more accurate.

This uses pmulhrsw avx2 and ssse3 variants. It fixes the
precision of texture filtering calculations.

However it does leave these paths inaccurate on platforms
that don't support it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13075>

2 years agoradv: workaround incorrect image format with World War Z
Rhys Perry [Tue, 28 Sep 2021 12:57:05 +0000 (13:57 +0100)]
radv: workaround incorrect image format with World War Z

The image format in a FSR-related shader is incorrect.

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

2 years agointel/fs: Emit URB fences when we have LSC
Jason Ekstrand [Wed, 15 Sep 2021 21:24:22 +0000 (16:24 -0500)]
intel/fs: Emit URB fences when we have LSC

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tested-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092>

2 years agointel/fs: Add the URB fence message
Jason Ekstrand [Wed, 15 Sep 2021 21:21:14 +0000 (16:21 -0500)]
intel/fs: Add the URB fence message

When they re-arranged all the dataport stuff and added the LSC, doing
URB fencing through the dataport no longer makes sense.  Instead, there
is now a fence message on the URB shared function.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tested-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092>

2 years agointel/fs: Ignore SLM fences if shared is unused
Jason Ekstrand [Fri, 17 Sep 2021 12:45:46 +0000 (07:45 -0500)]
intel/fs: Ignore SLM fences if shared is unused

Found this nugget while looking at the ACO driver.  It seems sensible to
avoid SLM fences if there is no SLM.  This also makes the check depend
on SLM usage rather than just shader stage which will be useful if we
ever implement task/mesh because task shaders also have SLM.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092>

2 years agointel/fs: Rework fence handling in brw_fs_nir.cpp
Jason Ekstrand [Wed, 15 Sep 2021 17:58:04 +0000 (12:58 -0500)]
intel/fs: Rework fence handling in brw_fs_nir.cpp

Start off making everything look like LSC where we have three types of
fences: TGM, UGM, and SLM.  Then, emit the actual code in a generation-
aware way.  There are three HW generation cases we care about:
XeHP+ (LSC), ICL-TGL, and IVB-SKL.  Even though it looks like there's a
lot to deduplicate, it only increases the number of ubld.emit() calls
from 5 to 7 and entirely gets rid of the SFID juggling and other
weirdness we've introduced along the way to make those cases "general".
While we're here, also clean up the code for stalling after fences and
clearly document every case where we insert a stall.

There are only three known functional changes from this commit:

 1. We now avoid the render cache fence on IVB if we don't need image
    barriers.

 2. On ICL+, we no longer unconditionally stall on barriers.  We still
    stall if we have more than one to help tie them together but
    independent barriers are independent.  Barrier instructions will
    still operate in write-commit mode and still be scheduling barriers
    but won't necessarily stall.

 3. We now assert-fail for URB fences on LSC platforms.  We'll be adding
    in the new URB fence message for those platforms in a follow-on
    commit.

It is a big enough refactor, however, that other minor changes may be
present.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092>

2 years agollvmpipe: overhaul fs/cs variant keys to be simpler.
Dave Airlie [Fri, 24 Sep 2021 03:01:16 +0000 (13:01 +1000)]
llvmpipe: overhaul fs/cs variant keys to be simpler.

These currently always had one sampler state embedded, but got messy
when images was 1 and samplers was 0.

This should fix some undefined reads seen

Fixes: e639e311a1a7 ("llvmpipe/cs: overhaul cs variant key state.")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13012>

2 years agoradv: Define extern "C" linkage if C++
Joshua Ashton [Tue, 7 Sep 2021 12:39:17 +0000 (13:39 +0100)]
radv: Define extern "C" linkage if C++

I am working on a project that uses radv_private.h from C++ code which needs this.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13103>

2 years agoradv: Rename radv_subpass_barrier function to radv_emit_subpass_barrier
Joshua Ashton [Tue, 7 Sep 2021 12:40:58 +0000 (13:40 +0100)]
radv: Rename radv_subpass_barrier function to radv_emit_subpass_barrier

Otherwise this shadows the name of the structure, which is problematic for C++ code due to constructors.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13103>

2 years agovulkan/util: Cast vk_alloc pointers
Joshua Ashton [Wed, 29 Sep 2021 16:01:41 +0000 (17:01 +0100)]
vulkan/util: Cast vk_alloc pointers

Fixes errors when trying to use vk_alloc.h from C++ code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13103>

2 years agospirv: switch Groups capability to non AMD specific field
Lionel Landwerlin [Tue, 28 Sep 2021 10:01:53 +0000 (13:01 +0300)]
spirv: switch Groups capability to non AMD specific field

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13081>

2 years agoaco: Don't write m0 register for LDS instructions on GFX9+.
Timur Kristóf [Wed, 1 Sep 2021 10:47:47 +0000 (12:47 +0200)]
aco: Don't write m0 register for LDS instructions on GFX9+.

Fossil DB stats on Sienna Cichlid:

Totals from 2691 (2.09% of 128647) affected shaders:
VGPRs: 124392 -> 124376 (-0.01%)
CodeSize: 8192352 -> 8174620 (-0.22%); split: -0.22%, +0.00%
MaxWaves: 61516 -> 61524 (+0.01%)
Instrs: 1519774 -> 1514958 (-0.32%); split: -0.32%, +0.00%
Latency: 14767555 -> 14766145 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 3394282 -> 3394173 (-0.00%); split: -0.01%, +0.00%
VClause: 31985 -> 32002 (+0.05%); split: -0.02%, +0.07%
SClause: 47581 -> 47539 (-0.09%); split: -0.14%, +0.05%
Copies: 127533 -> 122709 (-3.78%); split: -3.80%, +0.02%
Branches: 39395 -> 39390 (-0.01%)
PreSGPRs: 84389 -> 82702 (-2.00%)
PreVGPRs: 87520 -> 87519 (-0.00%)

Fossil DB stats on Sienna Cichlid with NGGC on:

Totals from 60930 (47.36% of 128647) affected shaders:
VGPRs: 2180712 -> 2180696 (-0.00%)
CodeSize: 169122736 -> 167474304 (-0.97%); split: -0.97%, +0.00%
MaxWaves: 1703698 -> 1703706 (+0.00%)
Instrs: 32301234 -> 31888743 (-1.28%); split: -1.28%, +0.00%
Latency: 152526083 -> 152367301 (-0.10%); split: -0.10%, +0.00%
InvThroughput: 25090218 -> 25089812 (-0.00%); split: -0.00%, +0.00%
VClause: 577302 -> 577319 (+0.00%); split: -0.00%, +0.00%
SClause: 801614 -> 801572 (-0.01%); split: -0.01%, +0.00%
Copies: 3399700 -> 2987201 (-12.13%); split: -12.13%, +0.00%
Branches: 1262859 -> 1262854 (-0.00%)
PreSGPRs: 2175752 -> 2141331 (-1.58%)
PreVGPRs: 1785088 -> 1785087 (-0.00%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11224>

2 years agomesa: validate texture format against GL/ES ctx
mwezdeck [Mon, 27 Sep 2021 08:53:13 +0000 (10:53 +0200)]
mesa: validate texture format against GL/ES ctx

GL_ALPHA, GL_LUMINANCE and GL_LUMINANCE_ALPHA
texture formats are supported in:
1. GL Compatibility spec
2. GLES 1.0 - GLES 3.2 spec

However, these formats are not supported in:
1. GL Core spec

This patch changes a logic of validation
texture formats in calls like glTexImage2D.

If the context is CORE and these formats were
selected, then return "-1" and in upper layer
return GL_INVALID_ENUM.

If the context is not CORE, return appropriate
format.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13059>

2 years agoradv: remove radv_shader_variant_key completely
Samuel Pitoiset [Mon, 27 Sep 2021 13:17:59 +0000 (15:17 +0200)]
radv: remove radv_shader_variant_key completely

Die radv_shader_variant_key, die!

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>

2 years agoradv: stop using vs_common_out.{as_es/as_ls/as_ngg*} shader keys
Samuel Pitoiset [Fri, 24 Sep 2021 11:34:06 +0000 (13:34 +0200)]
radv: stop using vs_common_out.{as_es/as_ls/as_ngg*} shader keys

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>

2 years agoradv: use the pipeline key more when possible
Samuel Pitoiset [Mon, 27 Sep 2021 11:18:32 +0000 (13:18 +0200)]
radv: use the pipeline key more when possible

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>

2 years agoradv: pass the pipeline key to the shader info pass
Samuel Pitoiset [Mon, 27 Sep 2021 11:23:48 +0000 (13:23 +0200)]
radv: pass the pipeline key to the shader info pass

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>

2 years agoradv: remove vs_common_out:export_clip_dists
Samuel Pitoiset [Mon, 27 Sep 2021 13:11:15 +0000 (15:11 +0200)]
radv: remove vs_common_out:export_clip_dists

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>

2 years agoradeonsi: disable PIPE_CAP_PREFER_BACK_BUFFER_REUSE
Pierre-Eric Pelloux-Prayer [Tue, 14 Sep 2021 08:57:58 +0000 (10:57 +0200)]
radeonsi: disable PIPE_CAP_PREFER_BACK_BUFFER_REUSE

With https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763,
the DRI_PRIME dGPU -> iGPU copy will be done by the SDMA hw.
Since it's asynchronous, it's better to always use at least 2 back
buffers to get the next frame rendering started during the copy.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788>

2 years agoloader/dri3: avoid reusing the same back buffer with DRI_PRIME
Pierre-Eric Pelloux-Prayer [Wed, 8 Sep 2021 18:08:57 +0000 (20:08 +0200)]
loader/dri3: avoid reusing the same back buffer with DRI_PRIME

For DRI_PRIME setup where the dGPU -> iGPU copy can happen asynchronously,
we need to ensure that we're not continuously reusing the same back buffer.

The existing code relies on XCB_PRESENT_EVENT_IDLE_NOTIFY to decide if
a buffer is busy or idle. If this event is received before the hardware
is done using the buffer, then it will reuse the same buffer and introduce
a dependency between the copy and the next frame.

This commit mitigates this by trying to allocate a different back buffer
when called from dri3_get_buffer (not from dri3_find_back_alloc, because it
seems that it expects dri3_get_buffer - see 0cc4c7e33ed).

An alternative would be to query the busy-ness using is_resource_busy
but this complicates the code to achieve the same result.

One affected app is Unigine Superposition, and this change improves the
score by 0% - 5% depending on the settings.

This behavior is enabled if PIPE_CAP_PREFER_BACK_BUFFER_REUSE is 0.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788>

2 years agogallium: add PIPE_CAP_PREFER_BACK_BUFFER_REUSE
Pierre-Eric Pelloux-Prayer [Tue, 14 Sep 2021 08:57:39 +0000 (10:57 +0200)]
gallium: add PIPE_CAP_PREFER_BACK_BUFFER_REUSE

This will be used in the next commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788>

2 years agovirgl: Set GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION to 1
Corentin Noël [Tue, 14 Sep 2021 12:38:42 +0000 (14:38 +0200)]
virgl: Set GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION to 1

The resulting quads are actually already following the provoking vertex convention.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12851>

2 years agopps: Avoid duplicate elements in with_datasources array.
Vinson Lee [Sun, 15 Aug 2021 09:14:41 +0000 (02:14 -0700)]
pps: Avoid duplicate elements in with_datasources array.

Setting -Dperfetto=true and -Ddatasources=intel,panfrost to the
meson command line resulted in duplicate elements.

Fixes: 92180a43763 ("pps: Intel pps driver")
Fixes: 513d1baaea5 ("pps: Panfrost pps driver")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12379>

2 years agoci: Uprev deqp-runner to 0.9.0
Guilherme Gallo [Tue, 28 Sep 2021 15:46:05 +0000 (12:46 -0300)]
ci: Uprev deqp-runner to 0.9.0

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13088>

2 years agoradeonsi: don't set DX10_DIAMOND_TEST_ENA for better performance
Marek Olšák [Sun, 26 Sep 2021 14:18:28 +0000 (10:18 -0400)]
radeonsi: don't set DX10_DIAMOND_TEST_ENA for better performance

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

2 years agov3d/v3dv: add unlikely for any V3D_DEBUG check
Alejandro Piñeiro [Mon, 27 Sep 2021 22:37:49 +0000 (00:37 +0200)]
v3d/v3dv: add unlikely for any V3D_DEBUG check

We had some with unlikely, some without it. Let's just put unlikely to
all of them.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13071>

2 years agobroadcom/common: remove unused debug helper
Alejandro Piñeiro [Mon, 27 Sep 2021 22:33:59 +0000 (00:33 +0200)]
broadcom/common: remove unused debug helper

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13071>

2 years agolavapipe: fixup image binding flags.
Dave Airlie [Tue, 28 Sep 2021 21:31:54 +0000 (07:31 +1000)]
lavapipe: fixup image binding flags.

This removes a bunch of warnings in the debug logs on CI

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

2 years agolavapipe: cleanup image create function.
Dave Airlie [Tue, 28 Sep 2021 21:44:07 +0000 (07:44 +1000)]
lavapipe: cleanup image create function.

drop the wrapper as it's unused and make things static.

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

2 years agopanvk: Switch to common GetDeviceQueue and DeviceWaitIdle
Jason Ekstrand [Thu, 23 Sep 2021 17:49:09 +0000 (12:49 -0500)]
panvk: Switch to common GetDeviceQueue and DeviceWaitIdle

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>

2 years agolavapipe: Switch to common GetDeviceQueue and DeviceWaitIdle
Jason Ekstrand [Thu, 23 Sep 2021 17:46:28 +0000 (12:46 -0500)]
lavapipe: Switch to common GetDeviceQueue and DeviceWaitIdle

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

2 years agolavapipe: Simplify DeviceWaitIdle
Jason Ekstrand [Thu, 23 Sep 2021 17:52:12 +0000 (12:52 -0500)]
lavapipe: Simplify DeviceWaitIdle

No reason to duplicate the guts of QueueWaitIdle inside DeviceWaitIdle.

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

2 years agov3dv: Use the common GetDeviceQueue implementation
Jason Ekstrand [Thu, 23 Sep 2021 17:45:28 +0000 (12:45 -0500)]
v3dv: Use the common GetDeviceQueue implementation

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>

2 years agoturnip: Switch to common GetDeviceQueues2 and DeviceWaitIdle
Jason Ekstrand [Thu, 23 Sep 2021 17:44:31 +0000 (12:44 -0500)]
turnip: Switch to common GetDeviceQueues2 and DeviceWaitIdle

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>

2 years agoradv: Switch to common GetDeviceQueues2 and DeviceWaitIdle
Jason Ekstrand [Thu, 23 Sep 2021 17:43:12 +0000 (12:43 -0500)]
radv: Switch to common GetDeviceQueues2 and DeviceWaitIdle

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

2 years agoanv: Switch to common GetDeviceQueues2 and DeviceWaitIdle
Jason Ekstrand [Thu, 23 Sep 2021 17:41:06 +0000 (12:41 -0500)]
anv: Switch to common GetDeviceQueues2 and DeviceWaitIdle

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

2 years agovulkan/device: Add a common DeviceWaitIdle implementation
Jason Ekstrand [Thu, 23 Sep 2021 17:40:19 +0000 (12:40 -0500)]
vulkan/device: Add a common DeviceWaitIdle implementation

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

2 years agovulkan/device: Add a common GetDeviceQueue2 implementation
Jason Ekstrand [Thu, 23 Sep 2021 17:18:08 +0000 (12:18 -0500)]
vulkan/device: Add a common GetDeviceQueue2 implementation

If we store the queues in a linked list in the device as vk_queue_init
is called then we can handle enumeration in common code.

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

2 years agopanvk: Drop panvk_queue::flags/queue_family_index
Jason Ekstrand [Tue, 28 Sep 2021 15:11:42 +0000 (10:11 -0500)]
panvk: Drop panvk_queue::flags/queue_family_index

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>

2 years agov3dv: Drop v3dv_queue::flags
Jason Ekstrand [Thu, 23 Sep 2021 16:43:29 +0000 (11:43 -0500)]
v3dv: Drop v3dv_queue::flags

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>

2 years agoturnip: Drop tu_queue::flags/queue_family_index/queue_idx
Jason Ekstrand [Thu, 23 Sep 2021 16:39:53 +0000 (11:39 -0500)]
turnip: Drop tu_queue::flags/queue_family_index/queue_idx

They're now part of vk_queue.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>

2 years agolavapipe: Drop lvp_queue::flags
Jason Ekstrand [Thu, 23 Sep 2021 16:38:35 +0000 (11:38 -0500)]
lavapipe: Drop lvp_queue::flags

It's now part of vk_queue

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

2 years agoradv: Drop radv_queue::flags/queue_family_index/queue_idx
Jason Ekstrand [Thu, 23 Sep 2021 16:37:40 +0000 (11:37 -0500)]
radv: Drop radv_queue::flags/queue_family_index/queue_idx

They're now part of vk_queue.

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

2 years agoanv: Drop anv_queue::flags
Jason Ekstrand [Thu, 23 Sep 2021 16:34:15 +0000 (11:34 -0500)]
anv: Drop anv_queue::flags

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

2 years agovulkan: Add the pCreateInfo to vk_queue_init()
Jason Ekstrand [Thu, 23 Sep 2021 16:14:36 +0000 (11:14 -0500)]
vulkan: Add the pCreateInfo to vk_queue_init()

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

2 years agopanvk: Use vk_command_buffer
Jason Ekstrand [Thu, 23 Sep 2021 16:57:20 +0000 (11:57 -0500)]
panvk: Use vk_command_buffer

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>

2 years agopanvk: Use vk_queue
Jason Ekstrand [Thu, 23 Sep 2021 16:49:21 +0000 (11:49 -0500)]
panvk: Use vk_queue

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>

2 years agoiris: Return 1 for PIPE_COMPUTE_CAP_IMAGES_SUPPORTED
Jason Ekstrand [Mon, 27 Sep 2021 23:52:56 +0000 (18:52 -0500)]
iris: Return 1 for PIPE_COMPUTE_CAP_IMAGES_SUPPORTED

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13072>

2 years agoiris: Handle states=NULL in iris_bind_sampler_states
Jason Ekstrand [Mon, 27 Sep 2021 23:52:09 +0000 (18:52 -0500)]
iris: Handle states=NULL in iris_bind_sampler_states

Clover likes to do this to clear our a bunch of samplers without
actually passing an array of NULL pointers.  It's easy enough to
handle in iris.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13072>

2 years agovenus: properly check and fill ahb buffer properties
Yiwei Zhang [Tue, 28 Sep 2021 07:00:13 +0000 (07:00 +0000)]
venus: properly check and fill ahb buffer properties

When it comes to AHB, pExternalBufferInfo->handleType is already
overridden to the renderer handle type. Thus the AHB buffer prop path is
not used. However, this is not caught by cts, vvl or apps because the
host renderer memory features so far satisfy the ahb requirement.

Fixes: ebf0e455063 ("venus: add ahb image and buffer properties query support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13076>

2 years agodocs: Add documentation regarding INTEL_MEASURE to envvars doc.
Luis Felipe Strano Moraes [Fri, 24 Sep 2021 19:57:05 +0000 (12:57 -0700)]
docs: Add documentation regarding INTEL_MEASURE to envvars doc.

This was initially written by Mark Janes, and was part of MR 7354.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Mike Blumenkrantz <michael.b.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13043>

2 years agodocs: Clean up environment variable docs for Intel drivers.
Luis Felipe Strano Moraes [Fri, 24 Sep 2021 19:55:23 +0000 (12:55 -0700)]
docs: Clean up environment variable docs for Intel drivers.

- Change section name to be more general
- Remove INTEL_SCALAR_VS (dropped as part of release 20.3)
- Sort alphabetically

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Mike Blumenkrantz <michael.b.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13043>

2 years agoaco: clang-format
Daniel Schürmann [Tue, 28 Sep 2021 16:11:28 +0000 (17:11 +0100)]
aco: clang-format

No changes, just formatting.

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

2 years agopanfrost: Use an identity swizzle for RAW formats
Boris Brezillon [Mon, 20 Sep 2021 10:39:12 +0000 (12:39 +0200)]
panfrost: Use an identity swizzle for RAW formats

When the render target format is raw, the swizzle is ignored. Let's
set it to identity to avoid misleading the pandecode reader into
thinking the swizzle is applied.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>

2 years agopan/lower_fb: Add support for rgb10a2 _SINT variants
Boris Brezillon [Mon, 6 Sep 2021 12:27:01 +0000 (14:27 +0200)]
pan/lower_fb: Add support for rgb10a2 _SINT variants

It's just a matter of taking the sign bit into account in the
pack/unpack routines.

Needed for panvk rgb10a2_sint blits.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>

2 years agopan/lower_fb: Add support for B10G10R10A2_UINT variants
Boris Brezillon [Mon, 6 Sep 2021 12:19:28 +0000 (14:19 +0200)]
pan/lower_fb: Add support for B10G10R10A2_UINT variants

The components are re-ordered before packing/unpacking, so nothing to
do here except adding the missing case in the switch statements.

Needed for panvk bgr10a2_uint blits.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>

2 years agopan/lower_fb: Re-order components when dealing with raw formats
Boris Brezillon [Mon, 6 Sep 2021 12:16:58 +0000 (14:16 +0200)]
pan/lower_fb: Re-order components when dealing with raw formats

The output swizzle defined in the render-target descriptor is ignored
when the format is RAW. In that case, we have to swap the components
when lowering FB stores/loads if we want to get the right color.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>

2 years agopan/lower_fb: Support SNORM8 unpacking
Boris Brezillon [Mon, 17 May 2021 12:53:05 +0000 (14:53 +0200)]
pan/lower_fb: Support SNORM8 unpacking

Needed for panvk blend lowering.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>

2 years agopan/bi: Fix 1DArray image coordinate retrieval
Boris Brezillon [Fri, 24 Sep 2021 14:10:03 +0000 (16:10 +0200)]
pan/bi: Fix 1DArray image coordinate retrieval

In NIR image instructions, the array index always follows the last
image coordinate, meaning that array index is in coord.y for 1D
arrays. But the current panfrost ABI wants it in coord.z regardless of
the image dimension.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13078>

2 years agoaco: Omit p_extract after ds_read with matching bit size.
Timur Kristóf [Fri, 27 Aug 2021 13:45:59 +0000 (15:45 +0200)]
aco: Omit p_extract after ds_read with matching bit size.

Fossil DB stats on Sienna Cichlid:

Totals from 135 (0.10% of 128647) affected shaders:
CodeSize: 525184 -> 523704 (-0.28%)
Instrs: 92835 -> 92684 (-0.16%)
Latency: 311528 -> 311055 (-0.15%)
InvThroughput: 86572 -> 86455 (-0.14%)
Copies: 7666 -> 7650 (-0.21%)

Fossil DB stats on Sienna Cichlid with NGGC on:

Totals from 58374 (45.38% of 128647) affected shaders:
CodeSize: 160322912 -> 159622564 (-0.44%)
Instrs: 30755822 -> 30639193 (-0.38%)
Latency: 136713768 -> 136690360 (-0.02%)
InvThroughput: 21739219 -> 21658151 (-0.37%)
Copies: 3297969 -> 3297953 (-0.00%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560>

2 years agoaco: Implement integer conversions using p_extract.
Timur Kristóf [Wed, 23 Jun 2021 16:28:18 +0000 (18:28 +0200)]
aco: Implement integer conversions using p_extract.

Fossil DB stats on Sienna Cichlid:

Totals from 563 (0.44% of 128647) affected shaders:
SpillSGPRs: 1381 -> 1382 (+0.07%)
SpillVGPRs: 1606 -> 1552 (-3.36%)
CodeSize: 2474724 -> 2446612 (-1.14%); split: -1.15%, +0.02%
Scratch: 181248 -> 180224 (-0.56%)
Instrs: 440973 -> 435091 (-1.33%); split: -1.35%, +0.01%
Latency: 9123609 -> 8517830 (-6.64%); split: -6.66%, +0.02%
InvThroughput: 3685256 -> 3383293 (-8.19%); split: -8.22%, +0.02%
VClause: 8425 -> 8372 (-0.63%)
Copies: 66553 -> 66681 (+0.19%); split: -0.49%, +0.68%
Branches: 13824 -> 13825 (+0.01%); split: -0.01%, +0.01%
PreSGPRs: 21816 -> 21824 (+0.04%)

Fossil DB stats on Sienna Cichlid with NGGC on:

Totals from 58802 (45.71% of 128647) affected shaders:
SpillSGPRs: 6541 -> 6542 (+0.02%)
SpillVGPRs: 1606 -> 1552 (-3.36%)
CodeSize: 162976608 -> 162244340 (-0.45%); split: -0.45%, +0.00%
Scratch: 181248 -> 180224 (-0.56%)
Instrs: 31163521 -> 31098078 (-0.21%); split: -0.21%, +0.00%
Latency: 146893569 -> 144920070 (-1.34%); split: -1.34%, +0.00%
InvThroughput: 25384324 -> 25035940 (-1.37%); split: -1.38%, +0.00%
VClause: 552310 -> 552257 (-0.01%)
Copies: 3356856 -> 3356984 (+0.00%); split: -0.01%, +0.01%
Branches: 1237314 -> 1237315 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 2185339 -> 2185347 (+0.00%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560>

2 years agoaco: Allow p_extract to have different definition and operand sizes.
Timur Kristóf [Wed, 23 Jun 2021 16:27:19 +0000 (18:27 +0200)]
aco: Allow p_extract to have different definition and operand sizes.

Makes p_extract more flexible and prepares it to be usable
for other use cases.

No Fossil DB changes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560>

2 years agoradeonsi: implement shader-based culling for lines
Marek Olšák [Sun, 26 Sep 2021 18:18:45 +0000 (14:18 -0400)]
radeonsi: implement shader-based culling for lines

This helps some viewperf subtests.
Only view XY culling is done. Edgeflags are always disabled with lines.

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

2 years agoac/llvm: rename ac_cull_triangle -> ac_cull_primitive
Marek Olšák [Sun, 26 Sep 2021 19:21:34 +0000 (15:21 -0400)]
ac/llvm: rename ac_cull_triangle -> ac_cull_primitive

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

2 years agoradeonsi: add gfx10 helpers for determining whether edgeflags are enabled
Marek Olšák [Sun, 26 Sep 2021 16:49:00 +0000 (12:49 -0400)]
radeonsi: add gfx10 helpers for determining whether edgeflags are enabled

They will return false when culling lines.

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

2 years agoradeonsi: always use the correct number of vertices in NGG shader code
Marek Olšák [Sun, 26 Sep 2021 14:17:28 +0000 (10:17 -0400)]
radeonsi: always use the correct number of vertices in NGG shader code

This is always 3 now, but it will be 2 for lines.

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

2 years agoac/llvm: pass cull options into cull_bbox directly
Marek Olšák [Sun, 26 Sep 2021 16:06:19 +0000 (12:06 -0400)]
ac/llvm: pass cull options into cull_bbox directly

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

2 years agoradeonsi: disallow NGG fast launch on Navi1x because VGT_FLUSH makes it slower
Marek Olšák [Sun, 26 Sep 2021 12:45:19 +0000 (08:45 -0400)]
radeonsi: disallow NGG fast launch on Navi1x because VGT_FLUSH makes it slower

This improves viewperf performance on Navi1x.

All Navi1x fast launch workarounds are removed and all fast launch
codepaths are disabled.

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

2 years agoradeonsi: fix clearing index_size for NGG fast launch
Marek Olšák [Sun, 26 Sep 2021 12:40:18 +0000 (08:40 -0400)]
radeonsi: fix clearing index_size for NGG fast launch

Cc: 21.1 21.2 <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/13048>

2 years agoradeonsi: strenthen the ngg->legacy hw workaround, fix fast launch hangs too
Marek Olšák [Sun, 26 Sep 2021 08:29:57 +0000 (04:29 -0400)]
radeonsi: strenthen the ngg->legacy hw workaround, fix fast launch hangs too

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

2 years agoac/gpu_info: fix the comment for the NGG->legacy transition bug
Marek Olšák [Sun, 26 Sep 2021 08:29:07 +0000 (04:29 -0400)]
ac/gpu_info: fix the comment for the NGG->legacy transition bug

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

2 years agoradeonsi: don't check ngg_culling != 0 for fast launch because it's tautology
Marek Olšák [Sun, 26 Sep 2021 07:19:40 +0000 (03:19 -0400)]
radeonsi: don't check ngg_culling != 0 for fast launch because it's tautology

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

2 years agoradeonsi: clean prefer_mono for the blit VS
Marek Olšák [Sat, 25 Sep 2021 17:15:37 +0000 (13:15 -0400)]
radeonsi: clean prefer_mono for the blit VS

This was missed when I was reworking shader key updates.

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

2 years agoradeonsi: reduce NGG culling on/off transitions by keeping it enabled
Marek Olšák [Thu, 23 Sep 2021 12:06:34 +0000 (08:06 -0400)]
radeonsi: reduce NGG culling on/off transitions by keeping it enabled

When it's enabled, it stays enabled until the next shader change
or an incompatible primitive type, etc.

This improves performance for viewperf/snx.

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

2 years agoradeonsi: use the optimal draw packet sequence for VGT_FLUSH
Marek Olšák [Sun, 26 Sep 2021 06:20:52 +0000 (02:20 -0400)]
radeonsi: use the optimal draw packet sequence for VGT_FLUSH

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

2 years agoradeonsi: set vs_uses_base_instance using C++ template arguments
Marek Olšák [Thu, 23 Sep 2021 12:05:04 +0000 (08:05 -0400)]
radeonsi: set vs_uses_base_instance using C++ template arguments

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

2 years agoradeonsi: decrease vertex count threshold for shader culling to 128
Marek Olšák [Sat, 25 Sep 2021 16:47:28 +0000 (12:47 -0400)]
radeonsi: decrease vertex count threshold for shader culling to 128

to match radv

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

2 years agoradeonsi: change the units of oversub_pc_factor to integer multiples of 1/4
Marek Olšák [Mon, 20 Sep 2021 11:44:50 +0000 (07:44 -0400)]
radeonsi: change the units of oversub_pc_factor to integer multiples of 1/4

to match radv

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

2 years agoradeonsi: fix a depth texturing performance regression on gfx6-7
Marek Olšák [Sat, 25 Sep 2021 08:53:47 +0000 (04:53 -0400)]
radeonsi: fix a depth texturing performance regression on gfx6-7

Fixes: 0580d4c1 "radeonsi: enable HTILE with mipmapping on gfx9+"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5398

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

2 years agoradv: Add noatocdithering option to RADV_DEBUG
Joshua Ashton [Mon, 27 Sep 2021 21:41:23 +0000 (22:41 +0100)]
radv: Add noatocdithering option to RADV_DEBUG

Was useful in testing a difference between D3D and VK ATOC rendering earlier today, would be nice to check this more easily in future.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13069>

2 years agonir: fix opt_memcpy src/dst mixup
Lionel Landwerlin [Tue, 28 Sep 2021 09:17:07 +0000 (12:17 +0300)]
nir: fix opt_memcpy src/dst mixup

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: f6667cb0ce828a ("nir: Add a memcpy optimization pass")
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13079>

2 years agopanvk/ci: Trigger bifrost jobs on vulkan changes
Boris Brezillon [Tue, 28 Sep 2021 08:28:01 +0000 (10:28 +0200)]
panvk/ci: Trigger bifrost jobs on vulkan changes

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Split var copies before lowering them
Boris Brezillon [Tue, 28 Sep 2021 09:33:04 +0000 (11:33 +0200)]
panvk: Split var copies before lowering them

Otherwise we hit an assert() in the nir_lower_var_copies() path.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Handle VK_REMAINING_{MIP_LEVELS,ARRAY_LAYERS) when creating image views
Boris Brezillon [Tue, 28 Sep 2021 09:20:11 +0000 (11:20 +0200)]
panvk: Handle VK_REMAINING_{MIP_LEVELS,ARRAY_LAYERS) when creating image views

Othewise last_{layer,level} are out of bounds.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Fix stencil clear assignment in panvk_cmd_fb_info_set_subpass()
Boris Brezillon [Sun, 26 Sep 2021 14:12:11 +0000 (16:12 +0200)]
panvk: Fix stencil clear assignment in panvk_cmd_fb_info_set_subpass()

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Fix size overflow in GetBufferMemoryRequirements()
Boris Brezillon [Sun, 26 Sep 2021 14:11:37 +0000 (16:11 +0200)]
panvk: Fix size overflow in GetBufferMemoryRequirements()

align64() will overflow if buffer->size is bigger than UINT64_MAX - 63.

Fixes dEQP-VK.api.buffer.basic.size_max_uint64.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Fix 1DArray image to buffer copy
Boris Brezillon [Fri, 24 Sep 2021 14:01:27 +0000 (16:01 +0200)]
panvk: Fix 1DArray image to buffer copy

The img2buf shaders expect the array index to be placed in coord.y when
copying a 1D array. Adjust the compute job instantiation to match this
behavior.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Only prepare texture descriptors when the image is sampled
Boris Brezillon [Thu, 23 Sep 2021 14:17:32 +0000 (16:17 +0200)]
panvk: Only prepare texture descriptors when the image is sampled

Not that input attachments will be lowered to textures, so we need to
create a texture descriptor in that case too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Don't expect subpasses to use all RTs
Boris Brezillon [Thu, 23 Sep 2021 14:15:02 +0000 (16:15 +0200)]
panvk: Don't expect subpasses to use all RTs

Some might use a subset, and that's fine, we just need to disable unused
RTs when beginning a subpass, which we do.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Fix an overflow on cmdbuf->state.clear
Boris Brezillon [Thu, 23 Sep 2021 14:10:51 +0000 (16:10 +0200)]
panvk: Fix an overflow on cmdbuf->state.clear

We assume the cmdbuf->state.clear array will have one entry per
attachment, but clearValueCount might be smaller if some attachments
are not cleared.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Handle input varyings without previous writes
Boris Brezillon [Thu, 23 Sep 2021 11:10:28 +0000 (13:10 +0200)]
panvk: Handle input varyings without previous writes

Some input varyings might not be written by any of the active stages
preceding the stage reading the varying (e.g. gl_Layer should be set
to 0 when not written by vertex/geometry shaders). In this case, we can
insert a dummy varying attribute returning zero. This is actually what
the code intended to do, but 2 things were missing:

1. formats[NONE] is not mapping to the CONSTANT0 format
2. the offset and strides should always be set to 0 when using a
   CONSTANT0 attribute

All of this is needed to have the input attachments working. Indeed, we
use the nir_lower_input_attachments() pass which lowers input attachment
loads to texel fetches, and the txf operation is passed the layer_id
in its 3rd coordinate.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Avoid allocating sysvals UBOs when the pipeline has one
Boris Brezillon [Thu, 23 Sep 2021 07:58:41 +0000 (09:58 +0200)]
panvk: Avoid allocating sysvals UBOs when the pipeline has one

The static sysval UBO attached to the pipeline will be used anyway,
so let's not waste memory for sysvals if we can avoid it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Fix multisample image copies
Boris Brezillon [Thu, 23 Sep 2021 07:54:37 +0000 (09:54 +0200)]
panvk: Fix multisample image copies

panvk_meta_copy_img2img() was assuming single-sample images, but the
spec actually allows copying multisample images, as long as the source
and destination agree on the number of samples.

Let's extend the img2img copy logic to support that case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Fix panvk_pipeline_builder_upload_sysval()
Boris Brezillon [Thu, 23 Sep 2021 07:51:17 +0000 (09:51 +0200)]
panvk: Fix panvk_pipeline_builder_upload_sysval()

Call panvk_sysval_upload_viewport_offset() instead of
panvk_sysval_upload_viewport_scale() in the PAN_SYSVAL_VIEWPORT_OFFSET
case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>

2 years agopanvk: Fix the pipeline binding logic
Boris Brezillon [Thu, 16 Sep 2021 10:51:46 +0000 (12:51 +0200)]
panvk: Fix the pipeline binding logic

Right now, only one pipeline can be bound at any given time, instead of
one per bind-point. Fix the code so we can support compute operations.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>