platform/upstream/mesa.git
20 months agoasahi: Stop aligning pool allocations to 4KiB
Alyssa Rosenzweig [Mon, 21 Nov 2022 03:02:16 +0000 (22:02 -0500)]
asahi: Stop aligning pool allocations to 4KiB

This defeats the point of specifying alignments and of packing allocations
together with the BO cache. We're a real driver now, let's allocate memory like
one.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>

20 months agoasahi: Label BOs internally
Alyssa Rosenzweig [Sun, 20 Nov 2022 23:35:18 +0000 (18:35 -0500)]
asahi: Label BOs internally

This will help debugging memory usage problems.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>

20 months agoci/alpine: bump to 3.17, new GCC 12 and LLVM 15
David Heidelberg [Tue, 22 Nov 2022 17:56:20 +0000 (18:56 +0100)]
ci/alpine: bump to 3.17, new GCC 12 and LLVM 15

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19959>

20 months agoci/alpine: enable Mold linker
David Heidelberg [Wed, 23 Nov 2022 16:38:49 +0000 (17:38 +0100)]
ci/alpine: enable Mold linker

Alpine has Mold 1.7.1 in the repository.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19959>

20 months agoradv/ci: do not create jobs that will fail outside of mesa's namespace
Martin Roukala (né Peres) [Thu, 24 Nov 2022 13:01:54 +0000 (15:01 +0200)]
radv/ci: do not create jobs that will fail outside of mesa's namespace

Mirror what is done for the freedreno project and do not allow manual
execution of jobs that require restricted access to a CI farm.

This fixes pushing new branches with non-radv-related changes.

Fixes: #7773
Reported-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19984>

20 months agohud: add GALLIUM_HUD_ROTATION option
Italo Nicola [Fri, 18 Nov 2022 17:38:12 +0000 (14:38 -0300)]
hud: add GALLIUM_HUD_ROTATION option

The user can use GALLIUM_HUD_ROTATION={0,90,180,270} to rotate the hud
by the specified amount.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19854>

20 months agoac/nir: Avoid data race with task shader payloads.
Timur Kristóf [Wed, 23 Nov 2022 23:22:37 +0000 (00:22 +0100)]
ac/nir: Avoid data race with task shader payloads.

Device memory scope is necessary because we need to ensure there is
always a waitcnt_vscnt instruction in order to avoid a race condition
between payload stores and their loads after mesh shaders launch.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19967>

20 months agodocs/zink: add missing required device-feature
Erik Faye-Lund [Wed, 16 Nov 2022 11:49:27 +0000 (12:49 +0100)]
docs/zink: add missing required device-feature

Seems I forgot to add this to the list of required features.

Fixes: eb0195358c4 ("zink: only inspect dual-src limit if feature enabled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>

20 months agozink: update textureCompressionBC requirement
Erik Faye-Lund [Wed, 16 Nov 2022 11:55:26 +0000 (12:55 +0100)]
zink: update textureCompressionBC requirement

The mesa state-tracker can now emulate all formats indicated by this
feature-flag, so we don't require this for OpenGL 4.2 any more.

It's however a good idea to support for power-usage and performance
reasons, saving on memory bandwidth. So let's move it to the
gl46_optimal block instead.

Fixes: e4ff42684b9 ("mesa/st: enable bptc extension with fallback")
Fixes: 2ea481b2f0a ("Zink: add Zink profiles file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>

20 months agozink: fix incorrect requirements
Erik Faye-Lund [Wed, 16 Nov 2022 11:53:57 +0000 (12:53 +0100)]
zink: fix incorrect requirements

These were in the wrong list all along.

Fixes: a466c2a7839 ("zink: check for stores and atomics features")
Fixes: 2644835f039 ("zink: add missing required feature")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>

20 months agozink: remove needless requirements
Erik Faye-Lund [Wed, 16 Nov 2022 11:41:07 +0000 (12:41 +0100)]
zink: remove needless requirements

We never required the uniform texel buffer bit for more than
bufferFeatures for a bunch of these formats.

Similarly, we *don't* need the uniform texel buffer bit for sampled
image access.

For the image-dimensions, the Mesa frontend doesn't validate the max 1D,
3D or Cube sizes, nor the max texture layers. So we'll expose GL 4.1
without these, even if that's not conformant.

Finally, we don't require robustImageAccess2 for OpenGL 4.3 at all. All
we need is the robustBufferAccess feature.

Fixes: 2ea481b2f0a ("Zink: add Zink profiles file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>

20 months agozink: fix json-errors in profile-file
Erik Faye-Lund [Wed, 16 Nov 2022 11:23:45 +0000 (12:23 +0100)]
zink: fix json-errors in profile-file

There's some stray commas here, let's get rid of them.

Fixes: 2ea481b2f0a ("Zink: add Zink profiles file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>

20 months agov3dv: specialize query copy pipelines
Iago Toral Quiroga [Mon, 21 Nov 2022 07:36:28 +0000 (08:36 +0100)]
v3dv: specialize query copy pipelines

Instead of having one shader that checks the various flags and emits
conditional code, create specialized pipelines for each relevant
combination of flags values so we can produce more optimized
pipelines with less conditional code for each scenario.

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

20 months agov3dv: allocate one BO for both occlusion results and availability
Iago Toral Quiroga [Tue, 15 Nov 2022 12:47:07 +0000 (13:47 +0100)]
v3dv: allocate one BO for both occlusion results and availability

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

20 months agov3dv: reimplement occlusion queries
Iago Toral Quiroga [Fri, 28 Oct 2022 10:07:07 +0000 (12:07 +0200)]
v3dv: reimplement occlusion queries

Our implementation was mostly CPU-based, with things such as query
resets and result copying handled in the CPU, as well as some aspects
of query availability tracking.

This new implementation handles all GPU-side query functions by
dispatching compute shaders to push the work to the GPU. This
involves query availability, reset and result copying.

For now, only occlusion queries are managed this way. Performance
queries can also be implemented in a similar fashion in the future
with some additional work, however, for timestamp queries our only
option to improve this would be to execute the actual timestamp in the
kernel, since we can't take a timestamp from a shader.

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

20 months agov3dv: add a helper to create compute pipelines from nir
Iago Toral Quiroga [Fri, 28 Oct 2022 10:29:06 +0000 (12:29 +0200)]
v3dv: add a helper to create compute pipelines from nir

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

20 months agov3dv: reset pending cpu job state once processed
Iago Toral Quiroga [Tue, 15 Nov 2022 13:20:31 +0000 (14:20 +0100)]
v3dv: reset pending cpu job state once processed

If we have any pending jobs queued in the command buffer state
to be emitted at the end of a given job, make sure we reset
that state once these have been processed.

cc: mesa-table

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

20 months agoApply 1 suggestion(s) to 1 file(s)
Erik Faye-Lund [Thu, 24 Nov 2022 08:55:20 +0000 (08:55 +0000)]
Apply 1 suggestion(s) to 1 file(s)

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

20 months agodocs/perfetto: update section about vulkan app tracing
Lionel Landwerlin [Thu, 24 Nov 2022 08:30:50 +0000 (10:30 +0200)]
docs/perfetto: update section about vulkan app tracing

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 18e820009d6 ("common/utrace: Refactor and combine all envvars into `GPU_TRACES`")
Fixes: 8370a0d6bfc ("common/utrace: Prefix all environment variables with `MESA_`")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19974>

20 months agor300: fix r300_max_vertex_count
Filip Gawin [Sat, 12 Nov 2022 13:33:59 +0000 (14:33 +0100)]
r300: fix r300_max_vertex_count

(seems like we counted size twice)

Helps with:
dEQP-GLES2.functional.draw.draw_elements.points.single_attribute
dEQP-GLES2.functional.draw.draw_elements.points.multiple_attributes

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

20 months agozink/ci: mark the two remaining GLES3 failures as CTS test bug
Samuel Pitoiset [Tue, 22 Nov 2022 16:11:41 +0000 (17:11 +0100)]
zink/ci: mark the two remaining GLES3 failures as CTS test bug

This means Zink/RADV could be conformant against GLES3!

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7395
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19932>

20 months agoradv/ci: don't download back the vkd3d-proton.cache files
Martin Roukala (né Peres) [Wed, 23 Nov 2022 11:58:28 +0000 (13:58 +0200)]
radv/ci: don't download back the vkd3d-proton.cache files

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>

20 months agoradv/ci: set B2C_JOB_VOLUME_EXCLUSIONS in all jobs
Martin Roukala (né Peres) [Wed, 23 Nov 2022 10:34:59 +0000 (12:34 +0200)]
radv/ci: set B2C_JOB_VOLUME_EXCLUSIONS in all jobs

This will also speed up the execution time of non-vkcts jobs.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>

20 months agoradv/ci: do not sync back the install folder
Martin Roukala (né Peres) [Tue, 22 Nov 2022 14:23:56 +0000 (16:23 +0200)]
radv/ci: do not sync back the install folder

When a job is over, we download back all the files generated by the
job. This however includes the mesa install/ folder which is close
to 1G in size.

This commit adds the install/ folder to the exclusion list for the
volume mirroring.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>

20 months agoradv/ci: run test automatically only for the mesa namespace
Martin Roukala (né Peres) [Tue, 22 Nov 2022 14:41:26 +0000 (16:41 +0200)]
radv/ci: run test automatically only for the mesa namespace

The Valve CI Farm uses allow lists for projects/users to prevent abuse,
so only enable automatic testing when running in the context of Mesa to
prevent failures in forks.

Suggested-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>

20 months agoutil: Remove unused WIN32 and MSVC related staff in p_compiler.h
Yonggang Luo [Fri, 18 Nov 2022 19:10:40 +0000 (03:10 +0800)]
util: Remove unused WIN32 and MSVC related staff in p_compiler.h

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

20 months agoutil: Rename PIPE_CDECL to UTIL_CDECL and moved into util/macros.h
Yonggang Luo [Fri, 18 Nov 2022 23:37:03 +0000 (07:37 +0800)]
util: Rename PIPE_CDECL to UTIL_CDECL and moved into util/macros.h

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

20 months agoutil: Move EXCLUSIVE_CACHELINE and CACHE_LINE_SIZE macros into u_memory.h
Yonggang Luo [Fri, 18 Nov 2022 23:34:59 +0000 (07:34 +0800)]
util: Move EXCLUSIVE_CACHELINE and CACHE_LINE_SIZE macros into u_memory.h

They are coupled with MALLOC_STRUCT_CL,  so  move them into a single place and accessed consistently

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

20 months agoutil: Remove the latest PIPE_ALIGN_VAR in p_compiler.h
Yonggang Luo [Tue, 22 Nov 2022 05:11:42 +0000 (13:11 +0800)]
util: Remove the latest PIPE_ALIGN_VAR in p_compiler.h

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

20 months agoclover: Fixes -Wundef in memory.cpp
Yonggang Luo [Tue, 22 Nov 2022 10:24:54 +0000 (18:24 +0800)]
clover: Fixes -Wundef in memory.cpp

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>

20 months agogallium: Fixes -Wundef in draw_gs.c
Yonggang Luo [Tue, 22 Nov 2022 10:24:26 +0000 (18:24 +0800)]
gallium: Fixes -Wundef in draw_gs.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>

20 months agoutil: Fixes -Wundef in u_debug_stack_test.cpp
Yonggang Luo [Tue, 22 Nov 2022 10:23:31 +0000 (18:23 +0800)]
util: Fixes -Wundef in u_debug_stack_test.cpp

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>

20 months agoutil: Fixes -Wundef in u_qsort.h
Yonggang Luo [Tue, 22 Nov 2022 10:23:01 +0000 (18:23 +0800)]
util: Fixes -Wundef in u_qsort.h

Partial of: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7680

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>

20 months agomesa: Fixes -Wundef in arbprogparse.c
Yonggang Luo [Tue, 22 Nov 2022 10:01:23 +0000 (18:01 +0800)]
mesa: Fixes -Wundef in arbprogparse.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>

20 months agoutil: Fixes -Wundef in util/compiler.h
Yonggang Luo [Tue, 22 Nov 2022 10:01:07 +0000 (18:01 +0800)]
util: Fixes -Wundef in util/compiler.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>

20 months agogallivm: use valid LLVM_VERSION_MAJOR instead of LLVM_VERSION
Yonggang Luo [Tue, 22 Nov 2022 09:46:12 +0000 (17:46 +0800)]
gallivm: use valid LLVM_VERSION_MAJOR instead of LLVM_VERSION

Partial of: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7680
Fixes: 203920d4c69 ("gallivm: add atomic 32-bit float support")

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19926>

20 months agor600: Fixes -Werror,-Wunused-but-set-variable for clang-15
Yonggang Luo [Fri, 4 Nov 2022 07:13:28 +0000 (15:13 +0800)]
r600: Fixes -Werror,-Wunused-but-set-variable for clang-15

one of the error messages:
../../src/gallium/drivers/r600/r600_asm.c:2528:8: error: variable 'o' set but not used [-Werror,-Wunused-but-set-variable]
                        int o = 0;
                            ^

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>

20 months agoaco: Fixes -Werror,-Wbitwise-instead-of-logical for clang-15 in aco_optimizer.cpp
Yonggang Luo [Fri, 4 Nov 2022 11:30:12 +0000 (19:30 +0800)]
aco: Fixes -Werror,-Wbitwise-instead-of-logical for clang-15 in aco_optimizer.cpp

error message:
error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>

20 months agomesa: fixes -Werror,-Wunused-but-set-variable for clang-15 in program_parse.y
Yonggang Luo [Fri, 4 Nov 2022 12:51:40 +0000 (20:51 +0800)]
mesa: fixes -Werror,-Wunused-but-set-variable for clang-15 in program_parse.y

error message:
src/mesa/program/program_parse.tab.c:1952:9: error: variable 'yynerrs' set but not used [-Werror,-Wunused-but-set-variable]
    int yynerrs = 0;
        ^

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

20 months agomesa: indent fixes after replace tab with 3 space by find and replace in program...
Yonggang Luo [Tue, 22 Nov 2022 13:00:01 +0000 (21:00 +0800)]
mesa: indent fixes after replace tab with 3 space by find and replace in program/program_parse.y

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

20 months agomesa: replace tab with 3 space in mesa/program/program_parse.y by tools
Yonggang Luo [Tue, 22 Nov 2022 16:04:14 +0000 (00:04 +0800)]
mesa: replace tab with 3 space in mesa/program/program_parse.y by tools

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

20 months agorusticl: print missing context features
Thomas Debesse [Thu, 3 Nov 2022 10:16:45 +0000 (11:16 +0100)]
rusticl: print missing context features

Signed-off-by: Thomas Debesse <dev@illwieckz.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19498>

20 months agomeson: Don't depend on expat for !use_xmlconfig
Alyssa Rosenzweig [Tue, 15 Nov 2022 19:12:06 +0000 (14:12 -0500)]
meson: Don't depend on expat for !use_xmlconfig

If we don't use xmlconfig, expat becomes an optional dependency on
Linux/BSD, which may be convenient for embedded systems that do not
otherwise need expat. (expat is so ubiquitous that this
probably doesn't matter a ton in practice, but fewer required Mesa deps
is probably nice anyway.)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>

20 months agoutil: Gate installing drirc on use_xmlconfig
Alyssa Rosenzweig [Wed, 9 Nov 2022 20:50:03 +0000 (15:50 -0500)]
util: Gate installing drirc on use_xmlconfig

Pointless otherwise. This should shrink the on-disk size of the Android and
Windows builds slightly, but I have not tested this.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>

20 months agoutil: Add xmlconfig build option
Alyssa Rosenzweig [Wed, 9 Nov 2022 19:30:31 +0000 (14:30 -0500)]
util: Add xmlconfig build option

On embedded Linux, we can hardcode the driconf file (00-mesa-defaults.conf) with
no possibility of the file changing after the build. The static driconf
implementation, used on Windows and Android, suffices for that use case. It is
undesireable for these platforms to depend on expat or to spend time during app
start-up parsing driconf XML.

We already have the static driconf implemented, all we need is a meson option to
opt-out of runtime xmlconfig on Linux and use the static version instead.

To opt-out of runtime xmlconfig, build Mesa with -Dxmlconfig=disabled.

v2: Expand out feature.require() since it was only added in meson 0.59.0.

v3: Use more concise Meson syntax (Dylan)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> [v2]
Reviewed-by: Eric Engestrom <eric@igalia.com> [v2]
Reviewed-by: Emma Anholt <emma@anholt.net>
Tested-by: Chris Healy <healych@amazon.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>

20 months agoutil: Define WITH_XMLCONFIG from Meson
Alyssa Rosenzweig [Wed, 9 Nov 2022 19:23:41 +0000 (14:23 -0500)]
util: Define WITH_XMLCONFIG from Meson

This will allow us to disable runtime xmlconfig even outside of Windows/Android.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>

20 months agozink: Don't check WITH_XMLCONFIG
Alyssa Rosenzweig [Wed, 9 Nov 2022 19:07:27 +0000 (14:07 -0500)]
zink: Don't check WITH_XMLCONFIG

It's not necessary -- no other driver does this despite most drivers having a
driconf check like Zink does -- and it adds a problematic cross-tree dependency.
This was been a relic from when xmlconfig didn't work at all on Windows, added
in commit 834b69d1ef4 ("zink: fix win32 build"). That has been replaced the
"static" xmlconfig only, which is good for almost everyone enough in practice.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>

20 months agodocs/features: Get Asahi on the board
Alyssa Rosenzweig [Wed, 23 Nov 2022 04:21:53 +0000 (23:21 -0500)]
docs/features: Get Asahi on the board

We support a good chunk of GL 3.x now ... let's get us on the board so that
Mesamatrix can get onto solving the challenging problem of deciding what colour
to use for Asahi ;-)

Table filled out to the best of my abilities, there may be inaccuracies or
omissions.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19944>

20 months agoetnaviv: Hide MSAA support behind debug flag
Christian Gmeiner [Sat, 19 Nov 2022 16:49:34 +0000 (17:49 +0100)]
etnaviv: Hide MSAA support behind debug flag

With the current level of MSAA support we have some real world rendering
problems in Chromium/Skia (issue #7678). Convert the MSAA support to an
explicit opt-in by settings ETNA_MESA_DEBUG=msaa.

Cc: 22.3 mesa-stable
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19870>

20 months agodocs: update calendar for 22.3.0-rc4
Eric Engestrom [Wed, 23 Nov 2022 19:15:23 +0000 (19:15 +0000)]
docs: update calendar for 22.3.0-rc4

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

20 months agost/mesa: only call st_manager_validate_framebuffers at FBO change or SwapBuffers
Marek Olšák [Wed, 16 Nov 2022 07:43:23 +0000 (02:43 -0500)]
st/mesa: only call st_manager_validate_framebuffers at FBO change or SwapBuffers

Hopefully this doesn't break anything.

There are a lot of places that invalidate drawables, but no place attempted
to call the context directly like this. A few places don't even have
the context.

Explanation:

The DRI frontend uses a global atomic counter per drawable that is
incremented when that drawable changed buffers.
st_manager_validate_framebuffers checks for that atomic counter and
updates the framebuffer state if there is any change. This was called at
every state update, so likely before almost every draw (!!!).

This commit changes that. Everything is the same except that the change
of buffers will not be noticed until the beginning of the next frame or
when the framebuffer state update is triggered by something else.

The effect is that we don't waste time calling
st_manager_validate_framebuffers a million times per frame.

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

20 months agopan/mdg: Fix out-of-order execution
Alyssa Rosenzweig [Sat, 29 Oct 2022 19:45:03 +0000 (15:45 -0400)]
pan/mdg: Fix out-of-order execution

We can go up to 15 instructions out of order (performance fix) but we
can't go past a branch (bug fix).

Fixes: 30a393f4581 ("pan/mdg: Enable out-of-order execution after texture ops")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19762>

20 months agofreedreno/replay: Add option to replay specific range of cmdstreams
Danylo Piliaiev [Tue, 8 Nov 2022 13:54:31 +0000 (14:54 +0100)]
freedreno/replay: Add option to replay specific range of cmdstreams

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

20 months agofreedreno/rddecompiler: Add shader disasm/asm support
Danylo Piliaiev [Thu, 3 Nov 2022 18:18:21 +0000 (19:18 +0100)]
freedreno/rddecompiler: Add shader disasm/asm support

Now rddecompiler outputs shaders in editable assembly form.

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

20 months agofreedreno/decode: Add 'rddecompiler' tool
Danylo Piliaiev [Tue, 1 Nov 2022 18:55:06 +0000 (19:55 +0100)]
freedreno/decode: Add 'rddecompiler' tool

Decompiles a single cmdstream from .rd into compilable C source.
Given the address space bounds the generated program creates
a new .rd which could be used to override cmdstream with 'replay'.
Generated .rd is not replayable on its own and depends on buffers
provided by the source .rd.

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

20 months agofreedreno/cffdec: Add type0/type4 vs type3/type7 pkt helpers
Rob Clark [Tue, 25 Oct 2022 16:53:41 +0000 (09:53 -0700)]
freedreno/cffdec: Add type0/type4 vs type3/type7 pkt helpers

The handling is the same, just the format differes for pre-a5xx vs later
gens, so split out some helpers to simplify this.

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

20 months agofreedreno/cffdec: Remove packet types
Rob Clark [Tue, 25 Oct 2022 16:35:06 +0000 (09:35 -0700)]
freedreno/cffdec: Remove packet types

These don't add any value.

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

20 months agofreedreno/cffdec: Remove dead code
Rob Clark [Tue, 25 Oct 2022 16:34:06 +0000 (09:34 -0700)]
freedreno/cffdec: Remove dead code

pkt2 is already handled further down the if/else ladder.

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

20 months agofreedreno/replay: Add option to override selected cmdstream
Danylo Piliaiev [Tue, 1 Nov 2022 16:16:36 +0000 (17:16 +0100)]
freedreno/replay: Add option to override selected cmdstream

This adds an option to override a single cmdstream while replaying
.rd capture. Cmdstream for override is stored in the same .rd format,
where there is only one RD_CMDSTREAM_ADDR section and any amount
of buffers.

Instead of using provided .rd file, 'replay' calls external program
to generate it first, in order to be able to pass the range of
GPU addresses available for the new buffers.

Usage example:
 ./replay --override=13 --generator=~/cmdstream_gen

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

20 months agofreedreno/decode: Print cmdstream idx
Danylo Piliaiev [Tue, 1 Nov 2022 14:20:10 +0000 (15:20 +0100)]
freedreno/decode: Print cmdstream idx

Will be useful later for cmdstream substitution.

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

20 months agofreedreno/decode: Move rd section parsing to a common header
Danylo Piliaiev [Thu, 27 Oct 2022 11:20:17 +0000 (13:20 +0200)]
freedreno/decode: Move rd section parsing to a common header

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

20 months agoi915g: fix typo in #if
Eric Engestrom [Thu, 27 Jun 2019 17:10:12 +0000 (18:10 +0100)]
i915g: fix typo in #if

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agoiris: s/#if/#ifdef/ to fix -Wundef
Eric Engestrom [Thu, 27 Jun 2019 16:51:10 +0000 (17:51 +0100)]
iris: s/#if/#ifdef/ to fix -Wundef

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agofreedredno: s/#if/#ifdef/ to fix -Wundef
Eric Engestrom [Thu, 27 Jun 2019 16:51:03 +0000 (17:51 +0100)]
freedredno: s/#if/#ifdef/ to fix -Wundef

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agofreedreno/ir3: fix -Wundef warning
Eric Engestrom [Tue, 25 Jun 2019 08:25:19 +0000 (09:25 +0100)]
freedreno/ir3: fix -Wundef warning

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agofreedreno: fix HAVE_FREEDRENO_KGSL check
Eric Engestrom [Tue, 25 Jun 2019 08:17:35 +0000 (09:17 +0100)]
freedreno: fix HAVE_FREEDRENO_KGSL check

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agodocs: Mark VK_KHR_present_wait as supported.
Hans-Kristian Arntzen [Fri, 18 Nov 2022 18:30:18 +0000 (19:30 +0100)]
docs: Mark VK_KHR_present_wait as supported.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/x11: Rewrite wait logic for ANI/WaitForPresentKHR.
Hans-Kristian Arntzen [Wed, 26 Oct 2022 12:17:22 +0000 (14:17 +0200)]
wsi/x11: Rewrite wait logic for ANI/WaitForPresentKHR.

When we need to poll the XCB connection with a non-trivial timeout,
be very careful to not hit an XCB bug where a poll() may hang for too
long even if an event is ready in the special event queue.

This is a pragmatic workaround, a wait_for_special_event_with_timeout()
is the only proper solution here.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/x11: Mention problems with xcb_wait_for_special_event().
Hans-Kristian Arntzen [Wed, 26 Oct 2022 10:57:56 +0000 (12:57 +0200)]
wsi/x11: Mention problems with xcb_wait_for_special_event().

There is no pragmatic solution for this.
Comment about the rationale for doing it like this until we have a more
robust solution in XCB.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agoturnip: Conditionally enable VK_KHR_present_wait on Turnip.
Hans-Kristian Arntzen [Tue, 25 Oct 2022 09:22:25 +0000 (11:22 +0200)]
turnip: Conditionally enable VK_KHR_present_wait on Turnip.

Hide behind driconf.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Tested-by: Gabe Rowe <gaberowe@gmail.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agoanv: Conditionally expose VK_KHR_present_wait on ANV.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 11:48:30 +0000 (13:48 +0200)]
anv: Conditionally expose VK_KHR_present_wait on ANV.

Gate it behind driconf query for now.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agoradv: Conditionally expose VK_KHR_present_wait on RADV.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 11:48:11 +0000 (13:48 +0200)]
radv: Conditionally expose VK_KHR_present_wait on RADV.

Gate it behind driconf query for now.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/common: Allow present-wait to be unconditionally enabled.
Hans-Kristian Arntzen [Mon, 31 Oct 2022 15:00:04 +0000 (16:00 +0100)]
wsi/common: Allow present-wait to be unconditionally enabled.

If all potentially supported surface types support present wait,
we can expose the extension.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agodriconf: Add DRI configuration for exposing VK_KHR_present_wait.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 11:43:37 +0000 (13:43 +0200)]
driconf: Add DRI configuration for exposing VK_KHR_present_wait.

These extensions are flawed and do not support the concept of
per-surface queries. For the time being we cannot guarantee that we are
able to implement it on all surfaces, but the feature is useful enough
to make available as an opt-in feature for the time being, so hide it
behind an driconf until we have a better mechanism in place.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/display: Implement VK_KHR_present_wait on KHR_display swapchain.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 14:10:01 +0000 (16:10 +0200)]
wsi/display: Implement VK_KHR_present_wait on KHR_display swapchain.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/x11: Implement VK_KHR_present_wait on X11.
Hans-Kristian Arntzen [Fri, 21 Oct 2022 13:04:13 +0000 (15:04 +0200)]
wsi/x11: Implement VK_KHR_present_wait on X11.

Based on original implementation by Keith Packard in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12086.

Also fixes the implementation to work on IMMEDIATE and MAILBOX
presentation modes and Xwayland.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agovulkan/wsi: Add mechanism to wait for WSI semaphore unsignal.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 12:47:51 +0000 (14:47 +0200)]
vulkan/wsi: Add mechanism to wait for WSI semaphore unsignal.

When vkWaitForPresentKHR succeeds, we are guaranteed
that any dependent semaphores have been unsignalled.

In an explicit sync world, we are guaranteed this automatically by
having a present complete, since that event must follow a semaphore wait
completion.

However, if the swapchain image is implicitly
synchronized, the semaphore might technically not have been unsignaled
before the present complete event triggers.

Present IDs must be signalled in monotonic order, same as timeline
semaphores.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agovulkan/wsi: Refactor out wsi_init_pthread_cond_monotonic.
Hans-Kristian Arntzen [Fri, 21 Oct 2022 13:00:32 +0000 (15:00 +0200)]
vulkan/wsi: Refactor out wsi_init_pthread_cond_monotonic.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agovulkan/wsi: Add stub interface for VK_KHR_present_wait
Daniel Stone [Wed, 11 May 2022 18:13:48 +0000 (19:13 +0100)]
vulkan/wsi: Add stub interface for VK_KHR_present_wait

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agointel/fs: Accept an unsigned int in fs_reg::fs_reg
LingMan [Mon, 31 Oct 2022 17:41:35 +0000 (18:41 +0100)]
intel/fs: Accept an unsigned int in fs_reg::fs_reg

The parameter `nr` is currenlty an `int` but it only gets assigned to an
`unsigned int`. Make it clear in the function signature what's actually
required.

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

20 months agointel/fs: Preserve unsignedness in fs_visitor::split_virtual_grfs
LingMan [Mon, 31 Oct 2022 13:22:09 +0000 (14:22 +0100)]
intel/fs: Preserve unsignedness in fs_visitor::split_virtual_grfs

GCC 12.2.0 warns:
../src/intel/compiler/brw_fs.cpp: In member function ‘bool fs_visitor::
split_virtual_grfs()’:
../src/intel/compiler/brw_fs.cpp:2199:10: warning: ‘void* memset(void*, int,
size_t)’ specified size between 18446744071562067968 and 18446744073709551615
exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
 2199 |    memset(vgrf_has_split, 0, num_vars * sizeof(*vgrf_has_split));

`num_vars` is an `int` but gets assigned the value of `this->alloc.count`,
which is an `unsigned int`. Thus, `num_vars` will be negative if
`this->alloc.count` is larger than int max value. Converting that negative
`int` to a `size_t`, which `memset` expects, then blows it up to a huge
positive value.

Simply turning `num_vars` into an `unsigned int` would be enough to fix this
specific problem, but there are many other instances where an `unsigned int`
gets assigned to an `int` for no good reason in this function. Some of which
the compiler warns about now, some of which it doesn't warn about.

This turns all variables in `fs_visitor::split_virtual_grfs`, which should
reasonably be unsigned, into `unsigned int`s. While at it, a few now pointless
casts are removed.

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

20 months agointel: Disable SSE2 instruction set if building for non x86 architectures
Philippe Lecluse [Tue, 22 Nov 2022 15:27:46 +0000 (07:27 -0800)]
intel: Disable SSE2 instruction set if building for non x86 architectures

Signed-off-by: Philippe Lecluse <philippe.lecluse@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19812>

20 months agointel: Add SUPPORT_INTEL_INTEGRATED_GPUS build argument
Philippe Lecluse [Tue, 22 Nov 2022 15:26:58 +0000 (07:26 -0800)]
intel: Add SUPPORT_INTEL_INTEGRATED_GPUS build argument

This is meant to remove any integrated GPU only code paths that can't
be compiled in CPU architectures different than x86.

Discrete GPUS don't have need_clflush set to true so it was just
matter of remove some code blocks around need_clflush but was left a
check in anv_physical_device_init_heaps() to fail physical device
initialization if it ever became false.

Signed-off-by: Philippe Lecluse <philippe.lecluse@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19812>

20 months agovk/runtime: Fix narrowing of timeline signal and wait value to u32.
Hans-Kristian Arntzen [Wed, 23 Nov 2022 11:40:00 +0000 (12:40 +0100)]
vk/runtime: Fix narrowing of timeline signal and wait value to u32.

They are u64. Fixes deadlock in
dEQP-VK.wsi.xcb.present_id_wait.wait.past_no_timeout.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 9bffd81f1cb7 ("vulkan: Add common implementations of vkQueueSubmit
and vkQueueWaitIdle")

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19951>

20 months agor600/sb: Fix initialization order in sb_shader
Gert Wollny [Wed, 23 Nov 2022 14:41:40 +0000 (15:41 +0100)]
r600/sb: Fix initialization order in sb_shader

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

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

20 months agonir/divergence: add missing btd_shader_type_intel
Lionel Landwerlin [Wed, 23 Nov 2022 08:56:49 +0000 (10:56 +0200)]
nir/divergence: add missing btd_shader_type_intel

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6d9ae6ec1eaa ("intel: add a new intrinsic to get the shader stage from bindless shaders")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19948>

20 months agoanv: generate correct addresses for state pool offsets
Lionel Landwerlin [Wed, 23 Nov 2022 07:21:36 +0000 (09:21 +0200)]
anv: generate correct addresses for state pool offsets

Fixes a number of CTS patterns on DG2 :

   - dEQP-VK.dynamic_rendering.primary_cmd_buff.random*
   - dEQP-VK.draw.*secondary_cmd*
   - dEQP-VK.dynamic_rendering.*secondary_cmd*
   - dEQP-VK.geometry.*secondary_cmd_buffer
   - dEQP-VK.multiview.*secondary_cmd*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9c1c1888d989 ("intel/fs: put scratch surface in the surface state heap")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19946>

20 months agoblorp: support negative offsets in addresses
Lionel Landwerlin [Wed, 23 Nov 2022 07:26:42 +0000 (09:26 +0200)]
blorp: support negative offsets in addresses

Similar to anv_address

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9c1c1888d989 ("intel/fs: put scratch surface in the surface state heap")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19946>

20 months agovulkan/device-select-layer: drop wayland-protocols dep
Simon Ser [Mon, 21 Nov 2022 10:41:47 +0000 (11:41 +0100)]
vulkan/device-select-layer: drop wayland-protocols dep

wayland-protocols is not a library, it just contains a bunch of
XML files. No need to try to link to it.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19894>

20 months agopanfrost: drop wayland-protocols dep
Simon Ser [Mon, 21 Nov 2022 10:41:26 +0000 (11:41 +0100)]
panfrost: drop wayland-protocols dep

wayland-protocols is not a library, it just contains a bunch of
XML files. No need to try to link to it.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19894>

20 months agov3dv: drop wayland-protocols dep
Simon Ser [Mon, 21 Nov 2022 10:40:39 +0000 (11:40 +0100)]
v3dv: drop wayland-protocols dep

wayland-protocols is not a library, it just contains a bunch of
XML files. No need to try to link to it.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19894>

20 months agogallium/draw: do not use trig to compute tangent
Erik Faye-Lund [Tue, 22 Nov 2022 08:40:12 +0000 (09:40 +0100)]
gallium/draw: do not use trig to compute tangent

We've already done the expensive part of computing this without
trigenometry, e.g computing the length. So let's finish it off.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19899>

20 months agogallium/draw: properly fix short aalines
Erik Faye-Lund [Mon, 21 Nov 2022 12:28:00 +0000 (13:28 +0100)]
gallium/draw: properly fix short aalines

The fix we used to have for short smooth lines were incorrect, and
here's the real fix:

For lines shorter than one pixel, we need to clamp the length-wise
coverage to the line-length. That produces results that are consistent
with our approximation for longer lines.

Because we pass (length / 2) + 0.5 to the fragment shader instead of
the unmodified length, we need to spend a few instructions to
reconstruct the original width.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19899>

20 months agoaux/draw: vectorize aaline computations
Erik Faye-Lund [Mon, 21 Nov 2022 12:53:04 +0000 (13:53 +0100)]
aux/draw: vectorize aaline computations

This makes it a bit more similar to the TGSI version, which makes
modifying them easier to review.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19899>

20 months agodriconf: disable glthread for FINAL FANTASY XI
Jimi Huotari [Tue, 22 Nov 2022 16:59:14 +0000 (18:59 +0200)]
driconf: disable glthread for FINAL FANTASY XI

Enabling 'glthread' here causes textures to be missing/invisible.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7562
Signed-off-by: Jimi Huotari <chiitoo@gentoo.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19935>

20 months agoradv: fix number of PS samples with VK_AMD_mixed_attachment_samples
Samuel Pitoiset [Mon, 21 Nov 2022 17:40:56 +0000 (18:40 +0100)]
radv: fix number of PS samples with VK_AMD_mixed_attachment_samples

From the Vulkan spec:
    "If the VK_AMD_mixed_attachment_samples extension is enabled and
     the subpass uses color attachments, the samples value used to
     create each color attachment is used instead of
     rasterizationSamples."

Found by inspection, though I don't think this extension is widely
used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19907>

20 months agoradv/ci: make use of the new VanGogh runners
Martin Roukala (né Peres) [Tue, 22 Nov 2022 13:38:42 +0000 (15:38 +0200)]
radv/ci: make use of the new VanGogh runners

I just added 3 new Steam Decks at my home CI, bringing the total count
to 5. Let's make use of 2 of these to reduce execution time in Mesa CI
and leave the last one available for DXVK-CI.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19929>

20 months agogenxml: forbid usage of L1CC_WBP/L1CC_UC for stateless messages
Lionel Landwerlin [Fri, 28 Oct 2022 22:39:04 +0000 (01:39 +0300)]
genxml: forbid usage of L1CC_WBP/L1CC_UC for stateless messages

We want to avoid those settings so that we do not have to emit a tile
fence to implement Wa_22013689345.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19322>

20 months agointel/fs: improve Wa_22013689345 workaround
Lionel Landwerlin [Tue, 16 Aug 2022 08:08:43 +0000 (08:08 +0000)]
intel/fs: improve Wa_22013689345 workaround

The initial implementation is a pretty big hammer. Implement the HW
recommendation to minimize cases in which we need a fence.

This improves by 10FPS on some of the Sascha Willems RT demos.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6031ad4bf690 ("intel/fs: Add Wa_22013689345")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19322>

20 months agointel/perf: Fix memory leak.
Vinson Lee [Sun, 20 Nov 2022 21:53:06 +0000 (13:53 -0800)]
intel/perf: Fix memory leak.

Fix defect with Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable pass_array going out of scope leaks the storage it points to.

Fixes: d4cbb665067 ("intel/perf: support more than 64 queries")
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/19888>