platform/upstream/mesa.git
23 months agointel/compiler: Fixes [-Wdeprecated-declarations] in test_eu_validate.cpp
Yonggang Luo [Tue, 23 Aug 2022 03:57:51 +0000 (11:57 +0800)]
intel/compiler: Fixes [-Wdeprecated-declarations] in test_eu_validate.cpp

Warning message:
../src/intel/compiler/test_eu_validate.cpp:96:1: warning: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Wdeprecated-declarations]

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18203>

23 months agointel/compiler: Fixes [-Wdeprecated-declarations] in test_eu_compact.cpp
Yonggang Luo [Tue, 23 Aug 2022 03:56:08 +0000 (11:56 +0800)]
intel/compiler: Fixes [-Wdeprecated-declarations] in test_eu_compact.cpp

Warning messages:
../src/intel/compiler/test_eu_compact.cpp:238:1: warning: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Wdeprecated-declarations]

../src/intel/compiler/test_eu_compact.cpp:256:1: warning: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Wdeprecated-declarations]

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18203>

23 months agoglsl: Fixes [-Wdeprecated-declarations] in list_iterators.cpp
Yonggang Luo [Tue, 23 Aug 2022 03:53:31 +0000 (11:53 +0800)]
glsl: Fixes [-Wdeprecated-declarations] in list_iterators.cpp

Warning messages:
../src/compiler/glsl/tests/list_iterators.cpp:68:1: warning: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Wdeprecated-declarations]

../src/compiler/glsl/tests/list_iterators.cpp:187:1: warning: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Wdeprecated-declarations]

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18203>

23 months agoutil: Fix [-Wdeprecated-declarations] in mesa-sha1_test.cpp
Yonggang Luo [Tue, 23 Aug 2022 03:49:40 +0000 (11:49 +0800)]
util: Fix [-Wdeprecated-declarations] in mesa-sha1_test.cpp

Warning message:
../src/util/tests/mesa-sha1_test.cpp:42:1: warning: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Wdeprecated-declarations]

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18203>

23 months agonir: Fixes [-Wdeprecated-declarations] in serialize_tests.cpp
Yonggang Luo [Tue, 23 Aug 2022 03:51:39 +0000 (11:51 +0800)]
nir: Fixes [-Wdeprecated-declarations] in serialize_tests.cpp

Warning messages:
../src/compiler/nir/tests/serialize_tests.cpp:113:1: warning: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Wdeprecated-declarations]

../src/compiler/nir/tests/serialize_tests.cpp:119:1: warning: 'InstantiateTestCase_P_IsDeprecated' is deprecated: INSTANTIATE_TEST_CASE_P is deprecated, please use INSTANTIATE_TEST_SUITE_P [-Wdeprecated-declarations]

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18203>

23 months agointel/compiler: Get URB handle in emit_task/mesh_intrinsic functions
Caio Oliveira [Mon, 22 Aug 2022 05:21:37 +0000 (22:21 -0700)]
intel/compiler: Get URB handle in emit_task/mesh_intrinsic functions

This will make convenient later to keep track of the urb
handles directly in a Task thread payload struct (to be part of
fs_visitor).

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18188>

23 months agointel/compiler: Call get_mesh_urb_handle one level up in call-stack
Caio Oliveira [Mon, 22 Aug 2022 05:04:21 +0000 (22:04 -0700)]
intel/compiler: Call get_mesh_urb_handle one level up in call-stack

Call it now from a fs_visitor member functions instead of the static
ones.  This will make convenient later to keep track of the urb
handles directly in a Task thread payload struct (to be part of
fs_visitor).

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18188>

23 months agoamd/compiler: Fixes warning [-Wunused-variable] in test_optimizer_postRA.cpp
Yonggang Luo [Tue, 23 Aug 2022 04:24:03 +0000 (12:24 +0800)]
amd/compiler: Fixes warning [-Wunused-variable] in test_optimizer_postRA.cpp

Warning message:
../src/amd/compiler/tests/test_optimizer_postRA.cpp:137:13: warning: unused variable 'reg_s1' [-Wunused-variable]

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18205>

23 months agoamd/compiler: Fixes warning [-Wunused-variable] in test_to_hw_instr.cpp
Yonggang Luo [Tue, 23 Aug 2022 04:23:01 +0000 (12:23 +0800)]
amd/compiler: Fixes warning [-Wunused-variable] in test_to_hw_instr.cpp

Warning message:
../src/amd/compiler/tests/test_to_hw_instr.cpp:793:12: warning: unused variable 'reg_s1' [-Wunused-variable]

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18205>

23 months agoanv: fix assert to build with shader cache disabled
sjfricke [Mon, 22 Aug 2022 11:36:53 +0000 (20:36 +0900)]
anv: fix assert to build with shader cache disabled

When setting -Dshader-cache=disabled the build fails due
no member named 'disk_cache' in 'struct anv_physical_device'

Signed-off-by: sjfricke <spencerfricke@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Fixes: 7f1e8230 ("anv: Switch to the new common pipeline cache")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18181>

23 months agoiris: Always initialize shader compilation queue ready fence
Sviatoslav Peleshko [Mon, 22 Aug 2022 10:48:40 +0000 (13:48 +0300)]
iris: Always initialize shader compilation queue ready fence

We use/delete this fence unconditionally, but it was initialized only
when screen->precompile is set. Move the util_queue_fence_init call
to the iris_create_uncompiled_shader to initialize it always.

Fixes: 42c34e1a ("iris: Enable threaded shader compilation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7074
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18182>

23 months agoanv: remove the LOCAL_MEM allocation bit
Lionel Landwerlin [Tue, 2 Aug 2022 13:17:31 +0000 (16:17 +0300)]
anv: remove the LOCAL_MEM allocation bit

We always want to use local memory if possible, we'll just add the
system memory heap if the buffer needs to be host visible.

v2: Drop some usages of ANV_BO_ALLOC_LOCAL_MEM_CPU_VISIBLE

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17873>

23 months agoanv: prevent trying to mmap non host visible memory
Lionel Landwerlin [Tue, 2 Aug 2022 10:09:44 +0000 (13:09 +0300)]
anv: prevent trying to mmap non host visible memory

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17873>

23 months agoglsl/tests: do not perform eol-conversion on windows
Erik Faye-Lund [Mon, 22 Aug 2022 09:43:52 +0000 (11:43 +0200)]
glsl/tests: do not perform eol-conversion on windows

These tests fail on Windows, because we open the expected files in
text-mode, performing EOL conversion. Instead, let's read them as binary
files, and manually UTF-8 decode them to get the expected result.

This fixes the tests on Windows for me.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18179>

23 months agoanv: fix assert in memory budget code when extension is not supported
Lionel Landwerlin [Fri, 19 Aug 2022 20:31:08 +0000 (23:31 +0300)]
anv: fix assert in memory budget code when extension is not supported

First we should only support the extension if we can support reporting
on all the heaps.

Second we should not run any query code if the extension is not
supported.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: fae88d8791b2 ("anv: make use of the new smallbar uAPI")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18153>

23 months agoanv: fixup assertions on lowered storage formats
Lionel Landwerlin [Sun, 14 Aug 2022 18:41:04 +0000 (21:41 +0300)]
anv: fixup assertions on lowered storage formats

With VK_FORMAT_B10G11R11_UFLOAT_PACK32 in particular, we're seeing
applications create image views with swizzle = R,G,B,0

But since the format has no alpha channel, the swizzle value for it
does not matter for the equivalence we're trying to verify.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a9edc268b9b1 ("anv: validate image view lowered storage formats for storage")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18081>

23 months agotu: Allocate private memory per-device instead of per-pipeline
Mark Collins [Wed, 17 Aug 2022 13:58:48 +0000 (19:28 +0530)]
tu: Allocate private memory per-device instead of per-pipeline

It was discovered that a substantial amount (several GiB) of
private memory was being used by Skyline Emulator as it used a
substantial amount of pipelines with private memory that were
never deleted throughout the lifetime of the application.

These private memory allocations are now pooled into per-device
BOs shared among several pipelines instead of a single BO for
every pipeline, this reduces the memory footprint of private
memory allocations from several GiB to 8 MiB in Skyline Emulator
on certain titles.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7033
Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18073>

23 months agoanv: fix GetPipelineExecutableStatistics for ray tracing pipelines
Lionel Landwerlin [Thu, 11 Aug 2022 13:33:04 +0000 (16:33 +0300)]
anv: fix GetPipelineExecutableStatistics for ray tracing pipelines

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e10455585115d5 ("anv: Compile ray-tracing shaders")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18013>

23 months agoRevert "anv: Do not copy garbage to batch_bo"
Mark Janes [Tue, 23 Aug 2022 00:48:45 +0000 (17:48 -0700)]
Revert "anv: Do not copy garbage to batch_bo"

This reverts commit 87b19c68d8bc33dfc2c61550e50fb6890b47656c.

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7109
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18202>

23 months agozink: ignore nir_texop_lod for tex dest matching
Mike Blumenkrantz [Mon, 22 Aug 2022 21:41:21 +0000 (17:41 -0400)]
zink: ignore nir_texop_lod for tex dest matching

this doesn't need fixing

Fixes: 3a475766876 ("zink: add a compiler pass to match up tex op dest types")

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

23 months agozink: handle nir_intrinsic_sparse_residency_code_and mechanics
Mike Blumenkrantz [Tue, 17 May 2022 17:37:10 +0000 (13:37 -0400)]
zink: handle nir_intrinsic_sparse_residency_code_and mechanics

without glsl array lowering, this intrinsic can creep in for tg4 ops,
which complicates everything. instead, rewrite these ops as residency+iand,
and then rewrite the existing residency ops to match

v2 (idr): Add missing size parameter to nir_is_sparse_texels_resident
calls.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16547>

23 months agoglsl: Remove lower_offset_arrays pass
Ian Romanick [Tue, 17 May 2022 17:29:25 +0000 (10:29 -0700)]
glsl: Remove lower_offset_arrays pass

It is no longer used.

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

23 months agoradeonsi: r600: d3d12: st: Use NIR lowering for tg4 offset arrays instead of GLSL...
Ian Romanick [Tue, 17 May 2022 15:18:26 +0000 (08:18 -0700)]
radeonsi: r600: d3d12: st: Use NIR lowering for tg4 offset arrays instead of GLSL lowering

I think I got all the drivers that need updating.  This is only
necessary in drivers that support GLSL 4.00 / GL_ARB_gpu_shader5 and
have PIPE_CAP_TEXTURE_GATHER_OFFSETS = 0.

v2: Don't (accidentally) condition tg4 offsets lowering on tex rect
lowering.  Noticed by Qiang.

v3: Add missing bool() cast.

v4: don't use designated initializers

Fixes: 640f9098621 ("glsl: add _texture related sparse texture builtin functions")
Closes: #6365
Tested-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16547>

23 months agonir: spirv: Allow 32-bit version of nir_intrinsic_is_sparse_texels_resident
Ian Romanick [Tue, 17 May 2022 01:37:17 +0000 (18:37 -0700)]
nir: spirv: Allow 32-bit version of nir_intrinsic_is_sparse_texels_resident

This intrinsic returns a Boolean.  Both 1-bit and 32-bit versions must
be allowed.  Otherwise, size mismatches will occur after lowering
1-bit Booleans to 32-bit.

Fixes: 4cbdf9ec4d4 ("nir,spirv: implement SpvOpImageSparseTexelsResident")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16547>

23 months agosvga: fix invalid component access of domain location
Charmaine Lee [Thu, 18 Aug 2022 19:38:38 +0000 (12:38 -0700)]
svga: fix invalid component access of domain location

Tesscoord is declared as vec3 in the incoming shader but the z component
of a tesscoord should only be referenced in the domain shader if the
tessellator domain is of triangle type.

Fixes vmx crash running GFXBench-Tessellation with MTL Renderer.

Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Min-Yu Huang <min-yuhuang@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18185>

23 months agomeson: add svga gallium driver to 'auto' group on arm/aarch64
Martin Krastev [Fri, 19 Aug 2022 07:25:17 +0000 (10:25 +0300)]
meson: add svga gallium driver to 'auto' group on arm/aarch64

svga gallium driver is a good citizen on arm/aarch64 linux targets.
Enable that driver for -Dgallium-drivers=auto builds.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18186>

23 months agofreedreno: Avoid deferred-flush dependency loops
Rob Clark [Mon, 22 Aug 2022 21:55:30 +0000 (14:55 -0700)]
freedreno: Avoid deferred-flush dependency loops

We can't blindly make every other batch a dependency of the current
batch, because it is possible they already have a dependency on the
current batch, which would result in a loop.

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

23 months agofreedreno: Simplify add_dep logic
Rob Clark [Mon, 22 Aug 2022 21:40:48 +0000 (14:40 -0700)]
freedreno: Simplify add_dep logic

These two cases never happen, guaranteed by the logic above that adds
to the batches[] table.

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

23 months agofreedreno: Extract helper to check for batch dependency
Rob Clark [Mon, 22 Aug 2022 21:14:14 +0000 (14:14 -0700)]
freedreno: Extract helper to check for batch dependency

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

23 months agotu: Disable userspace iova allocations
Danylo Piliaiev [Mon, 22 Aug 2022 22:19:48 +0000 (01:19 +0300)]
tu: Disable userspace iova allocations

If BO is freed while kernel considers it busy, our VMA state gets
desynchronized from kernel's VMA state because kernel waits
until BO stops being busy. And whether BO is busy kernel decides at
submission granularity.

On the other hand in Vulkan we may free resource as soon as we know
it won't be used.

Not completely reverting the changes in hope that proper resolution
would be found soon.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7106

Fixes: e23c4fbd9b6b95537ab00d19a034eaffe5fe86b0
("tu: Switch to userspace iova allocations if kernel supports it")

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

23 months agoaco: drop unused variable
Eric Engestrom [Mon, 22 Aug 2022 20:39:05 +0000 (21:39 +0100)]
aco: drop unused variable

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18193>

23 months agoaco: Use unreachable instead assert(false)
Yonggang Luo [Mon, 22 Aug 2022 20:45:17 +0000 (04:45 +0800)]
aco: Use unreachable instead assert(false)

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18194>

23 months agoci/tu: Add another cwe_after_bind fail that appeared in the reshuffle.
Emma Anholt [Mon, 8 Aug 2022 16:46:36 +0000 (09:46 -0700)]
ci/tu: Add another cwe_after_bind fail that appeared in the reshuffle.

gmem is a fractional run of the full caselist, and one of them showed up
crashing on a630_vk_full after the deqp-runner uprev.  Add all of them so
we don't fail on the next reshuffle either.

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

23 months agotu: Emit only as many VBs as we've ever seen bound on the command buffer.
Emma Anholt [Thu, 4 Aug 2022 20:02:57 +0000 (13:02 -0700)]
tu: Emit only as many VBs as we've ever seen bound on the command buffer.

A later CmdBindPipeline would shrink the two draw states' sizes to the
number of VBs the pipeline actually uses, but we can save some CPU
overhead and memory by not emitting all the unused VBs as well.

Improves zink drawoverhead throughput on test 5 (1 VB change) by 38.5178%
+/- 0.48738% (n=18).

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

23 months agotu: Only emit FS output regs for as many MRTs as we have (but at least 1).
Emma Anholt [Wed, 3 Aug 2022 22:17:50 +0000 (15:17 -0700)]
tu: Only emit FS output regs for as many MRTs as we have (but at least 1).

This seems to be what the blob does, should save a bit of CP overhead.
zink drawoverhead throughput on test 7 (shader change) +0.234668% +/-
0.148818% (n=25).

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

23 months agotu: Only emit as many VPC interp/repl regs as will be referenced.
Emma Anholt [Wed, 3 Aug 2022 23:33:28 +0000 (16:33 -0700)]
tu: Only emit as many VPC interp/repl regs as will be referenced.

Saves a bit of CP overhead on pipeline switch.  Improves zink drawoverhead
-test 7 (shader program change) throughput by 1.10825% +/- 0.131485%
(n=10).

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

23 months agotu: Only emit as many bindless regs as we have seen descriptor sets.
Emma Anholt [Wed, 3 Aug 2022 23:08:46 +0000 (16:08 -0700)]
tu: Only emit as many bindless regs as we have seen descriptor sets.

Cuts 12 dwords of CS per draw in vk-5-normal's main renderpass.

zink drawoverhead -test 9 (1 texture change) throughput +0.898636% +/-
0.212647% (n=30).

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

23 months agoanv: Group all context operations during device creation
José Roberto de Souza [Tue, 9 Aug 2022 20:37:13 +0000 (13:37 -0700)]
anv: Group all context operations during device creation

Move all the setup of context to one function making it easier
to read it.
There is no behavior changes here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>

23 months agoanv: Nuke anv_execbuf_init()
José Roberto de Souza [Wed, 10 Aug 2022 17:15:54 +0000 (10:15 -0700)]
anv: Nuke anv_execbuf_init()

We can do designated initialization to initialize needed values
and set the rest to zero.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>

23 months agoanv: Do not copy garbage to batch_bo
José Roberto de Souza [Wed, 10 Aug 2022 19:02:31 +0000 (12:02 -0700)]
anv: Do not copy garbage to batch_bo

batch_size is the aligned value so it is >= than the actual number
of bytes in anv_batch.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>

23 months agoanv: Only wait for queue sync if execbuf was properly executed
José Roberto de Souza [Tue, 16 Aug 2022 20:57:55 +0000 (13:57 -0700)]
anv: Only wait for queue sync if execbuf was properly executed

In case execbuf failed it would block execution until the maximum
timeout if DEBUG_SYNC is enabled.

While at it also removing the shadowing of result that would cause
the function result to not have its values updated in case
vk_sync_wait() returns a error.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>

23 months agomapi: Improve comment about _glapi_tls_Dispatch and _glapi_tls_Context
Yonggang Luo [Wed, 27 Jul 2022 08:30:55 +0000 (16:30 +0800)]
mapi: Improve comment about _glapi_tls_Dispatch and _glapi_tls_Context

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>

23 months agodocs: Remove document about USE_ELF_TLS
Yonggang Luo [Sat, 25 Jun 2022 05:34:37 +0000 (13:34 +0800)]
docs: Remove document about USE_ELF_TLS

Revise dispatch document

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>

23 months agomapi: Access _glapi_tls_Dispatch directly without need of macro
Yonggang Luo [Wed, 27 Jul 2022 08:48:47 +0000 (16:48 +0800)]
mapi: Access _glapi_tls_Dispatch directly without need of macro

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>

23 months agomapi: Move shared stub into u_current.c
Yonggang Luo [Wed, 27 Jul 2022 08:11:42 +0000 (16:11 +0800)]
mapi: Move shared stub into u_current.c

These stub are:
_glapi_Dispatch
_glapi_Context
_glapi_destroy_multithread
_glapi_check_multithread

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>

23 months agomapi: Move shared _glapi_set_context and _glapi_set_dispatch into u_current.c
Yonggang Luo [Wed, 27 Jul 2022 07:54:59 +0000 (15:54 +0800)]
mapi: Move shared _glapi_set_context and _glapi_set_dispatch into u_current.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>

23 months agomapi: Remove reference to unused _gl_DispatchTSD
Yonggang Luo [Wed, 27 Jul 2022 06:50:59 +0000 (14:50 +0800)]
mapi: Remove reference to unused _gl_DispatchTSD

The last usage of _gl_DispatchTSD is at commit:

df98423f24b ("mapi: Prefix functions in u_current.h by u_current.")

Wow it's 12 years ago

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>

23 months agomapi: Remove usage of _glapi_check_multithread and _glapi_destroy_multithread
Yonggang Luo [Wed, 27 Jul 2022 08:03:27 +0000 (16:03 +0800)]
mapi: Remove usage of _glapi_check_multithread and _glapi_destroy_multithread

They are empty stub functions now so have no need call to them

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>

23 months agomapi: Remove unused ENTRY_CURRENT_TABLE_GET
Yonggang Luo [Wed, 27 Jul 2022 06:24:12 +0000 (14:24 +0800)]
mapi: Remove unused ENTRY_CURRENT_TABLE_GET

The last commit that use ENTRY_CURRENT_TABLE_GET is:

62a68481fa9 ("mapi: Remove usage of USE_ELF_TLS")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17814>

23 months agoturnip: trim down bo size of tu_descriptor_pool
Chia-I Wu [Fri, 19 Aug 2022 18:38:16 +0000 (11:38 -0700)]
turnip: trim down bo size of tu_descriptor_pool

Dynamic descriptors does not take up bo space.

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

23 months agoturnip: trim down host size of tu_descriptor_pool
Chia-I Wu [Fri, 19 Aug 2022 18:38:16 +0000 (11:38 -0700)]
turnip: trim down host size of tu_descriptor_pool

There is no tu_bo array in tu_descriptor_set since bea6290ca09 ("turnip:
device global bo list").

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

23 months agoturnip: pCreateInfo->pPoolSizes[i] is wordy
Chia-I Wu [Fri, 19 Aug 2022 19:39:28 +0000 (12:39 -0700)]
turnip: pCreateInfo->pPoolSizes[i] is wordy

pool_size is shorter.

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

23 months agoir3/spill: Fix extracting from a vector at the end of a block
Connor Abbott [Tue, 16 Aug 2022 12:38:59 +0000 (14:38 +0200)]
ir3/spill: Fix extracting from a vector at the end of a block

If this happens then "after" is NULL, so we can't use it to get the
block, and the instruction is never moved at the end so we have to
create the split instructions before creating the collect to make sure
they are in the right order.

This happens when reloading a complex vector value that has been
coalesced at the end of a basic block, which apparently hasn't happened
until a gfxbench5 shader on zink hit this case. This fixes it.

Closes: #7054
Fixes: 613eaac7b53 ("ir3: Initial support for spilling non-shared registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18082>

23 months agoutil: Use literal instead call to list_inithead in u_queue.c
Yonggang Luo [Mon, 20 Jun 2022 10:35:06 +0000 (18:35 +0800)]
util: Use literal instead call to list_inithead in u_queue.c

This is a more convenient way to struct list_head variable.
And removed the need to call list_inithead in global_init

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18092>

23 months agoradeonsi/ci: make the running script easy to use
marek [Fri, 19 Aug 2022 22:33:56 +0000 (18:33 -0400)]
radeonsi/ci: make the running script easy to use

Changes:
- No path parameters are needed to run all tests.
- All test results are stored next to cloned repos instead of /tmp.
  This is a personal preference, though not necessary.

The new setup guide is going to be:
- mesa, piglit, deqp, and glcts directories must be next to each other.
- Add `PATH=$HOME/?/mesa/src/gallium/drivers/radeonsi/ci:$PATH` into
  `.bashrc`. Replace `?` with the proper path.
- Install Rust, which will include its package manager Cargo:
  https://www.rust-lang.org/tools/install
  - The installer will add the Cargo environment into `.bashrc`, which will
    add cargo into `PATH`.
- Restart bash to get the new `PATH`.
- Run: `cargo install deqp-runner`

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
The parameters setting the various paths won't be explained to keep
the guide short.

The path parameters and env vars can be removed if everybody stops using
them after this.

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

23 months agointel/compiler: Print more details when fs_visitor::validate() fails
Caio Oliveira [Tue, 16 Aug 2022 21:48:38 +0000 (14:48 -0700)]
intel/compiler: Print more details when fs_visitor::validate() fails

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18150>

23 months agowsi/x11: fix memleak in wsi_x11_connection_create()
Eric Engestrom [Mon, 22 Aug 2022 08:57:20 +0000 (09:57 +0100)]
wsi/x11: fix memleak in wsi_x11_connection_create()

Fixes: bbdf7e45b15f6345c5e5 ("wsi/x11: Hook up KHR_incremental_present")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18177>

23 months agogallium: Remove util_make_fragment_tex_shader_xrbias
Alyssa Rosenzweig [Fri, 19 Aug 2022 17:58:19 +0000 (13:58 -0400)]
gallium: Remove util_make_fragment_tex_shader_xrbias

Unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17918>

23 months agogallium: Inline away util_make_fragment_tex_shader interp_mode
Alyssa Rosenzweig [Fri, 5 Aug 2022 22:19:57 +0000 (18:19 -0400)]
gallium: Inline away util_make_fragment_tex_shader interp_mode

Everything sets it to linear.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17918>

23 months agogallium: Inline away util_make_fragment_tex_shader_writemask
Alyssa Rosenzweig [Fri, 5 Aug 2022 22:11:07 +0000 (18:11 -0400)]
gallium: Inline away util_make_fragment_tex_shader_writemask

Nothing actually uses writemasks, get rid of them.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17918>

23 months agotu: Enable bufferDeviceAddressCaptureReplay
Danylo Piliaiev [Thu, 18 Aug 2022 09:47:04 +0000 (12:47 +0300)]
tu: Enable bufferDeviceAddressCaptureReplay

Now that we are able to set iova from userspace we could support
the replay feature of BDA.

In order to prevent address clashing between ordinary allocations
and replayable ones we allocate:
- ordinary allocations - from the lowest address;
- replayable allocations - from the highest address.

Passes: dEQP-VK.binding_model.buffer_device_address.*replay*

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

23 months agotu: Switch to userspace iova allocations if kernel supports it
Danylo Piliaiev [Thu, 18 Aug 2022 09:15:35 +0000 (12:15 +0300)]
tu: Switch to userspace iova allocations if kernel supports it

With MSM_INFO_SET_IOVA it's now possible for userspace to manually
set iova instead of relying on kernel.

In preparation to support bufferDeviceAddressCaptureReplay.

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

23 months agoRevert "ci: disable unit tests"
Yonggang Luo [Tue, 9 Aug 2022 14:43:23 +0000 (22:43 +0800)]
Revert "ci: disable unit tests"

As we disabled the glsl tests by meson options always, so
we reverts commit 4dd8c143a9b76b340da868f7b5186e268073fc27.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6897

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>

23 months agoci: disable glcpp tests for now
Yonggang Luo [Tue, 9 Aug 2022 14:31:19 +0000 (22:31 +0800)]
ci: disable glcpp tests for now

these are too flaky to continue running for now

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>

23 months agomeson: add enable-glcpp-tests option
Yonggang Luo [Tue, 9 Aug 2022 14:29:13 +0000 (22:29 +0800)]
meson: add enable-glcpp-tests option

these are too intermittent to be left enabled on CI for now

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>

23 months agomeson: Use different STRACEDIR folder for intel_devinfo_override_test
Yonggang Luo [Sun, 7 Aug 2022 14:05:38 +0000 (22:05 +0800)]
meson: Use different STRACEDIR folder for intel_devinfo_override_test

Fixes
--- stderr ---
strace: Can't fopen 'meson-logs/strace/intel_device_info_override_test_120_/log.10613': No such file or directory

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>

23 months agoanv: Fixes struct anv_device::info is not initialized with struct anv_physical_device
Yonggang Luo [Mon, 22 Aug 2022 12:07:21 +0000 (20:07 +0800)]
anv: Fixes struct anv_device::info is not initialized with struct anv_physical_device

Refactoring the function anv_device_set_physical out, so that it's can be called in unittests

Fixes: 356a60bd6c5 ("anv: Do not duplicate intel_device_info memory in each logical device")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7092

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: José Roberto de Souza jose.souza@intel.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>

23 months agoradv: move lowering the view index to radv_pipeline_link_shaders()
Samuel Pitoiset [Fri, 19 Aug 2022 10:41:39 +0000 (12:41 +0200)]
radv: move lowering the view index to radv_pipeline_link_shaders()

This is a link step because it needs to know if the previous stage is
a mesh shader.

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

23 months agoradv: move lowering patch vertices to radv_pipeline_link_tcs()
Samuel Pitoiset [Fri, 19 Aug 2022 09:44:04 +0000 (11:44 +0200)]
radv: move lowering patch vertices to radv_pipeline_link_tcs()

This also moves merging the tess info.

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

23 months agoradv: move assigning driver locations to the new linking helpers
Samuel Pitoiset [Fri, 19 Aug 2022 09:40:51 +0000 (11:40 +0200)]
radv: move assigning driver locations to the new linking helpers

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

23 months agoradv: rework linking shaders in NIR
Samuel Pitoiset [Fri, 19 Aug 2022 08:36:18 +0000 (10:36 +0200)]
radv: rework linking shaders in NIR

Replace these ugly loops with something much cleaner and easier to
maintain.

There shouldn't be any functional changes.

No fossils-db changes (tested on NAVI21, VEGA10 and POLARIS10).

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

23 months agoradv: add radv_remove_point_size() linking helper
Samuel Pitoiset [Fri, 19 Aug 2022 08:36:03 +0000 (10:36 +0200)]
radv: add radv_remove_point_size() linking helper

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

23 months agoradv: remove useless parameter from radv_link_shaders()
Samuel Pitoiset [Thu, 18 Aug 2022 14:39:08 +0000 (16:39 +0200)]
radv: remove useless parameter from radv_link_shaders()

It can be accessed from the pipeline key instead.

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

23 months agoradv: use NIR_PASS with radv_export_implicit_primitive_id
Samuel Pitoiset [Thu, 18 Aug 2022 12:54:15 +0000 (14:54 +0200)]
radv: use NIR_PASS with radv_export_implicit_primitive_id

For consistency.

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

23 months agoradv: remove unused parameter in radv_lower_io_to_mem()
Samuel Pitoiset [Thu, 18 Aug 2022 08:01:54 +0000 (10:01 +0200)]
radv: remove unused parameter in radv_lower_io_to_mem()

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

23 months agoradv: move dumping NIR shaders to the previous similar loop
Samuel Pitoiset [Thu, 18 Aug 2022 07:32:55 +0000 (09:32 +0200)]
radv: move dumping NIR shaders to the previous similar loop

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

23 months agoradv: move lowering FS intrinsics to radv_postprocess_nir()
Samuel Pitoiset [Thu, 18 Aug 2022 07:31:19 +0000 (09:31 +0200)]
radv: move lowering FS intrinsics to radv_postprocess_nir()

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

23 months agoradv: add a radv_postprocess_nir() helper
Samuel Pitoiset [Thu, 18 Aug 2022 07:16:43 +0000 (09:16 +0200)]
radv: add a radv_postprocess_nir() helper

This looks cleaner.

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

23 months agoradv: copy the whole radv_shader_info struct for merged stages
Samuel Pitoiset [Thu, 18 Aug 2022 07:13:02 +0000 (09:13 +0200)]
radv: copy the whole radv_shader_info struct for merged stages

We do something similar for shader args and this allows to remove this
ugly hack when postprocessing NIR shaders.

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

23 months agoradv: copy linked I/O info for merged stages in radv_fill_shader_info
Samuel Pitoiset [Wed, 17 Aug 2022 14:57:33 +0000 (16:57 +0200)]
radv: copy linked I/O info for merged stages in radv_fill_shader_info

To copy info to merged stage at the same place.

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

23 months agoradv: remove useless check when creating the noop FS
Samuel Pitoiset [Wed, 17 Aug 2022 10:17:45 +0000 (12:17 +0200)]
radv: remove useless check when creating the noop FS

If the pipeline type is graphics, VK_PIPELINE_CREATE_LIBRARY_KHR
shouldn't never be set, so this was redundant.

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

23 months agor600/sfn: Don't use broken idiv lowering
Alyssa Rosenzweig [Fri, 19 Aug 2022 21:16:42 +0000 (17:16 -0400)]
r600/sfn: Don't use broken idiv lowering

NIR has two implementations of lower_idiv, keyed on the imprecise_32bit_lowering
flag. This flag is misleading: the results when setting this flag "imprecise",
they're completely wrong for some values. Non-constant highp integer division is
rare enough this shouldn't noticeably harm performance of real applications.

Address r600 portion of #6555.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18154>

23 months agor300: Set more shadow sampler lowering in precompiles.
Pavel Ondračka [Sun, 21 Aug 2022 08:37:47 +0000 (10:37 +0200)]
r300: Set more shadow sampler lowering in precompiles.

This extends the commit 17cea74b8cd3b1a56d923edeb40772b3e8b18ab2
also for rectangular textures. They are otherwise lowered to MOV
dst temp[0].0000 and deadcode elimitation goes crazy.

Fixes shader-db with tesseract shaders from https://gitlab.freedesktop.org/mesa/mesa/-/issues/6771

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18168>

23 months agoUpdate docs/drivers/llvmpipe.rst
Konrad Kleine [Thu, 13 Jan 2022 15:46:09 +0000 (15:46 +0000)]
Update docs/drivers/llvmpipe.rst

to include a link to the LLVM Snapshots for Fedora.

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

23 months agovc4: store tex sampler in proper register
Juan A. Suarez Romero [Thu, 18 Aug 2022 08:03:39 +0000 (10:03 +0200)]
vc4: store tex sampler in proper register

When unpacking the texture sample result ensure it is moved to the
proper expected dest register.

This fixes incorrect texturing in Chromium using PixiJS framework.

CC: mesa-stable
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18122>

23 months agoci: enable lima farm
Erico Nunes [Mon, 22 Aug 2022 08:03:41 +0000 (10:03 +0200)]
ci: enable lima farm

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

23 months agolavapipe: Set ss_dirty in emit_state
Konstantin Seurer [Sat, 20 Aug 2022 18:39:23 +0000 (20:39 +0200)]
lavapipe: Set ss_dirty in emit_state

Set ss_dirty to false when updating the samplers.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18161>

23 months agomeson: drop duplicate `lib` in lib name
Eric Engestrom [Sun, 21 Aug 2022 11:58:05 +0000 (12:58 +0100)]
meson: drop duplicate `lib` in lib name

The default lib prefix is `lib`, so adding `lib` to the lib name just
results in `liblibbroadcom_v3d.a` for instance.

Those are internal, build-temporary static libraries that end up being
linked into the real user-visible libraries, so it doesn't really
matter, but we might as well just clean up their names anyway.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18171>

23 months agovulkan/wsi/x11: detect Xwayland via the XWAYLAND extension
Simon Ser [Thu, 28 Jul 2022 12:54:56 +0000 (14:54 +0200)]
vulkan/wsi/x11: detect Xwayland via the XWAYLAND extension

This is more robust than checking for XRandR output names.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/954
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17790>

23 months agobin/perf-annotate-jit.py: Update to Python 3.
Vinson Lee [Mon, 20 Sep 2021 05:49:37 +0000 (22:49 -0700)]
bin/perf-annotate-jit.py: Update to Python 3.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12926>

23 months agost_pbo/compute: pre-clamp loaded geometry based on coord components
Mike Blumenkrantz [Wed, 17 Aug 2022 17:41:45 +0000 (13:41 -0400)]
st_pbo/compute: pre-clamp loaded geometry based on coord components

if only some of these components will be used, clamp the rest to enable
better shader optimizing

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

23 months agost_pbo/compute: pre-clamp shader geometry to 16bit
Mike Blumenkrantz [Wed, 17 Aug 2022 17:34:51 +0000 (13:34 -0400)]
st_pbo/compute: pre-clamp shader geometry to 16bit

no point doing this in the shader

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

23 months agost_pbo/compute: fix 1D coord dimension by pre-trimming vectors
Mike Blumenkrantz [Wed, 17 Aug 2022 15:50:22 +0000 (11:50 -0400)]
st_pbo/compute: fix 1D coord dimension by pre-trimming vectors

cc: mesa-stable

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

23 months agost_pbo/compute: fix 1D_ARRAY offsets
Mike Blumenkrantz [Wed, 17 Aug 2022 21:27:00 +0000 (17:27 -0400)]
st_pbo/compute: fix 1D_ARRAY offsets

these come in as yoffset, but the constant data must use 0 since the sampler
view is created with the offset

cc: mesa-stable

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

23 months agost_pbo/compute: handle download failures with fallback
Mike Blumenkrantz [Fri, 12 Aug 2022 16:37:22 +0000 (12:37 -0400)]
st_pbo/compute: handle download failures with fallback

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

23 months agopanfrost: Assert that blend shaders are nontrivial
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:57:55 +0000 (18:57 -0400)]
panfrost: Assert that blend shaders are nontrivial

Even if the driver doesn't *use* trivial blend shaders, building and compiling
blend shaders is expensive. We shouldn't be building blend shaders that should
never be used.

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

23 months agopanfrost: Include mask in replace blend shader name
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:57:53 +0000 (18:57 -0400)]
panfrost: Include mask in replace blend shader name

Helpful to disambiguate blend shaders with different colour masks used for the
same format/replace operation.

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

23 months agopanfrost: Simplify blitter blend shader creation
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:57:52 +0000 (18:57 -0400)]
panfrost: Simplify blitter blend shader creation

We don't need blending in the blitter. That means blend shaders are only needed
on Midgard. Simplify accordingly.

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

23 months agopanfrost: Invert no_colour to enabled
Alyssa Rosenzweig [Fri, 19 Aug 2022 19:14:03 +0000 (15:14 -0400)]
panfrost: Invert no_colour to enabled

This way, blend info that's left zeroed out defaults to disabled. Fixes an
assertion failure in KHR-GLES31.core.draw_buffers_indexed.color_masks due to
the blend CSO max_rt being set unreliably. This is also probably clearer.

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

23 months agopanfrost: Don't compile empty blend shaders
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:57:49 +0000 (18:57 -0400)]
panfrost: Don't compile empty blend shaders

This is silly. They'll be masked out later, but it's still pointless, and adds
noise when grepping BIFROST_MESA_DEBUG=shaders,internal for "pan_blend" when
debugging why an app is using blend shaders.

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