platform/upstream/mesa.git
22 months agofreedreno/a6xx: Improve LRZ test for stencil write
Rob Clark [Sat, 12 Nov 2022 20:49:15 +0000 (12:49 -0800)]
freedreno/a6xx: Improve LRZ test for stencil write

If all the ops are KEEP, we don't actually write the stencil, and can
avoid falling off the LRZ fastpath.

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

22 months agofreedreno/a6xx: Use same LRZ state for draw and binning
Rob Clark [Sat, 12 Nov 2022 20:24:51 +0000 (12:24 -0800)]
freedreno/a6xx: Use same LRZ state for draw and binning

Originally these where split as that is what the blob GL driver did (at
least at the time).  But that turns out to be unnecessary, so simplify
things and combine them into a single LRZ state object like tu does.

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

22 months agofreedreno/a6xx: Handle additional depth test funcs
Rob Clark [Sat, 12 Nov 2022 19:48:52 +0000 (11:48 -0800)]
freedreno/a6xx: Handle additional depth test funcs

These were left as a TODO, and we forgot to revisit.

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

22 months agofreedreno/drm: Fix suballoc alignment
Rob Clark [Sat, 12 Nov 2022 23:34:08 +0000 (15:34 -0800)]
freedreno/drm: Fix suballoc alignment

IBO/etc descriptors need to be aligned to 64.. this was handled
correctly in the stateobj case (for tex descriptors) but not in
the streaming case (for IBO).

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

22 months agopanfrost: Don't set job_barrier on vertex jobs
Alyssa Rosenzweig [Sat, 29 Oct 2022 20:41:05 +0000 (16:41 -0400)]
panfrost: Don't set job_barrier on vertex jobs

This was a hack needed for the old transform feedback code. This barrier
is handled by the explicit XFB emulation that we're using on Midgard
now, so we don't need the barrier in the general case.

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

22 months agor300: tweak nir loop unrolling hint for r500 vertex shaders
Pavel Ondračka [Sat, 12 Nov 2022 19:48:47 +0000 (20:48 +0100)]
r300: tweak nir loop unrolling hint for r500 vertex shaders

This should prevent some cxbx-r shaders from unrolling above the
instruction limit and results in 3 gained cxbx-r shaders on RV530
with no other changes in shader-db.

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

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19702>

22 months agofreedreno: Add one flake
Yonggang Luo [Tue, 15 Nov 2022 19:40:34 +0000 (03:40 +0800)]
freedreno: Add one flake

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

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19759>

22 months agoglsl: Drop borrow/carry lowerings in favor of nir
M Henning [Sat, 12 Nov 2022 20:53:30 +0000 (15:53 -0500)]
glsl: Drop borrow/carry lowerings in favor of nir

Unconditionally lowering prevents GL drivers from natively
implementing these ops. Drivers that need lowering should set
lower_uadd_carry and lower_usub_borrow on nir_shader_compiler_options to
get the nir lowerings.

Tested with dEQP-GLES31.functional.shaders.builtin_functions.integer.*

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19704>

22 months agopps: make pps-producer RT only on freedreno
Chia-I Wu [Fri, 11 Nov 2022 01:45:28 +0000 (17:45 -0800)]
pps: make pps-producer RT only on freedreno

Calling sched_setscheduler twice every sample period has high CPU
overhead.  For intel and panfrost, their dump_perfcnt is preemptible and
they don't need the scheduler change.

For freedreno, simply makes the main thread RT at all time.  This solves
most of the cpu overhead issue.

v2: removed pthread_t param and just change the scheduler for the
    calling thread

Acked-by: Rob Clark <robdclark@chromium.org> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19668>

22 months agoutil: Include the needed util/detect*.h headers in multiple files
Yonggang Luo [Fri, 11 Nov 2022 11:40:28 +0000 (19:40 +0800)]
util: Include the needed util/detect*.h headers in multiple files

This is discovered either by manually or -W-no-def option

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

22 months agoutil: Remove the unused PIPE_(ARCH|OS|CC) macro defines from src/util/detect_arch...
Yonggang Luo [Fri, 11 Nov 2022 11:15:27 +0000 (19:15 +0800)]
util: Remove the unused PIPE_(ARCH|OS|CC) macro defines from src/util/detect_arch.h and src/util/detect_cc.h

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

22 months agotree-wide: Convert all usage of PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC)_* by use...
Yonggang Luo [Fri, 11 Nov 2022 11:04:14 +0000 (19:04 +0800)]
tree-wide: Convert all usage of PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC)_* by use grep

This should be the last commit, and should be take care that can only in comment block or
version
Exclude files:
src/util/detect_*.h

From:
PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
DETECT_$1_$2

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

22 months agotree-wide: Convert all usage of #ifndef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH...
Yonggang Luo [Fri, 11 Nov 2022 11:01:06 +0000 (19:01 +0800)]
tree-wide: Convert all usage of #ifndef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH|CC)_* by use grep

From:
#ifndef[\s]+PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
#if !DETECT_$1_$2

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

22 months agotree-wide: Convert all usage of #ifdef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH...
Yonggang Luo [Fri, 11 Nov 2022 11:00:31 +0000 (19:00 +0800)]
tree-wide: Convert all usage of #ifdef PIPE_(OS|ARCH|CC)_* to #if DETECT_(OS|ARCH|CC)_* by use grep

From:
#ifdef[\s]+PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
#if DETECT_$1_$2

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

22 months agotree-wide: Convert all usage of defined PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC...
Yonggang Luo [Fri, 11 Nov 2022 10:59:55 +0000 (18:59 +0800)]
tree-wide: Convert all usage of defined PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC)_* by use grep

From:
defined[\s]*PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)
To:
DETECT_$1_$2

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

22 months agotree-wide: Convert all usage of defined(PIPE_(OS|ARCH|CC)_*) to DETECT_(OS|ARCH|CC...
Yonggang Luo [Fri, 11 Nov 2022 10:59:21 +0000 (18:59 +0800)]
tree-wide: Convert all usage of defined(PIPE_(OS|ARCH|CC)_*) to DETECT_(OS|ARCH|CC)_* by use grep

From:
defined[\s]*\([\s]*PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)[\s]*\)
To:
DETECT_$1_$2

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

22 months agoutil: Add DETECT_ARCH_* and DETECT_CC_* macros for latter usage
Yonggang Luo [Thu, 10 Nov 2022 17:06:36 +0000 (01:06 +0800)]
util: Add DETECT_ARCH_* and DETECT_CC_* macros for latter usage

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

22 months agoutil: Move compiler configuration defines from detect_arch.h into detect_cc.h
Yonggang Luo [Thu, 10 Nov 2022 06:14:10 +0000 (14:14 +0800)]
util: Move compiler configuration defines from detect_arch.h into detect_cc.h

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

22 months agoutil: Rename src/gallium/include/pipe/p_config.h to src/util/detect_arch.h
Yonggang Luo [Wed, 9 Nov 2022 07:00:37 +0000 (15:00 +0800)]
util: Rename src/gallium/include/pipe/p_config.h to src/util/detect_arch.h

Even though the defines in p_config.h are stared with PIPE_, they are indeed
are generic detecting mechanics, we will rename them to DETECT_* in latter MR

We rename src/gallium/include/pipe/p_config.h src/util/detect_arch.h because
the detect code in src/gallium/include/pipe/p_config.h are most about
processor architecture detecting.

The file util/detect.h is added to replace functional of src/gallium/include/pipe/p_config.h
So we replace of #include "pipe/p_config.h" with #include "util/detect.h"

The file util/detect_cc.h is added as a placeholder for moving compiler related macro defines
from p_config.h into it in following commits

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

22 months agoutil: Test __PPC64__ for getting PIPE_ARCH_PPC_64 respond to __PPC64__ take effect
Yonggang Luo [Sun, 6 Nov 2022 12:34:28 +0000 (20:34 +0800)]
util: Test __PPC64__ for getting PIPE_ARCH_PPC_64 respond to __PPC64__ take effect

Fixes: e737a99a6fb ("Fix PPC detection on darwin")

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

22 months agofrontend/va: Fix WIN32 VA_DRIVER_INIT_FUNC declaration. Remove declspec as it uses...
Sil Vilerino [Tue, 15 Nov 2022 17:04:19 +0000 (12:04 -0500)]
frontend/va: Fix WIN32 VA_DRIVER_INIT_FUNC declaration. Remove declspec as it uses .def file

Fixes: b557ceb7 ("frontends/va: Add windows VA frontend support via vl_winsys_win32 and libva-win32")
Closes: #7702

Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19754>

22 months agoutil: Add test for util_get_process_name_may_override
Yonggang Luo [Thu, 10 Nov 2022 16:16:52 +0000 (00:16 +0800)]
util: Add test for util_get_process_name_may_override

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

22 months agoutil: Add tests for os_mman.h and util_get_process_name_may_override
Yonggang Luo [Thu, 10 Nov 2022 12:06:14 +0000 (20:06 +0800)]
util: Add tests for os_mman.h and util_get_process_name_may_override

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

22 months agoutil: Move src/gallium/auxiliary/os/os_mman.h to src/util/os_mman.h
Yonggang Luo [Thu, 10 Nov 2022 11:25:01 +0000 (19:25 +0800)]
util: Move src/gallium/auxiliary/os/os_mman.h to src/util/os_mman.h

Use "util/detect_os.h" instead of "pipe/p_config.h" and "pipe/p_compiler.h"
in src/util/os_mman.h

This is a prepare to implement os_mman on windows

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

22 months agoutil: Replace the usage of os_get_command_line with util_get_command_line
Yonggang Luo [Thu, 10 Nov 2022 15:40:11 +0000 (23:40 +0800)]
util: Replace the usage of os_get_command_line with util_get_command_line

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

22 months agoutil: Merge the code from os_process.c into u_process.c
Yonggang Luo [Thu, 10 Nov 2022 11:05:07 +0000 (19:05 +0800)]
util: Merge the code from os_process.c into u_process.c

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

22 months agoutil: Remove usage of boolean and duplicated code in os_process.*
Yonggang Luo [Thu, 10 Nov 2022 10:56:26 +0000 (18:56 +0800)]
util: Remove usage of boolean and duplicated code in os_process.*

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

22 months agoutil: Merge the __getProgramName code under HAIKU os
Yonggang Luo [Thu, 10 Nov 2022 10:31:42 +0000 (18:31 +0800)]
util: Merge the __getProgramName code under HAIKU os

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

22 months agoutil: cleanup cpuinfo.* and it's related files
Yonggang Luo [Mon, 7 Nov 2022 03:00:21 +0000 (11:00 +0800)]
util: cleanup cpuinfo.* and it's related files

_mesa_get_cpu_features is no more a needed thing as all it's usage are
replaced with util_get_cpu_caps in u_cpu_detect.h

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

22 months agomesa/vbo: Replace the usage of cpu_has_sse4_1 with util_get_cpu_caps()->has_sse4_1...
Yonggang Luo [Mon, 7 Nov 2022 02:44:39 +0000 (10:44 +0800)]
mesa/vbo: Replace the usage of cpu_has_sse4_1 with util_get_cpu_caps()->has_sse4_1 in vbo/vbo_minmax_index.c

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

22 months agoutil: Use util_get_cpu_caps instead cpu_has_sse4_1 macro
Yonggang Luo [Sat, 5 Nov 2022 13:35:29 +0000 (21:35 +0800)]
util: Use util_get_cpu_caps instead cpu_has_sse4_1 macro

cpu_has_sse4_1 doesn't belongs to src/util, so do not depends on it,
this is a follow up of that u_cpu_detect.* doesn't depends on
pipe/p_*.h anymore

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

22 months agoutil: Drop include "pipe/p_config.h" in src/util/u_cpu_detect.h
Yonggang Luo [Fri, 11 Nov 2022 12:55:22 +0000 (20:55 +0800)]
util: Drop include "pipe/p_config.h" in src/util/u_cpu_detect.h

It's comes from src/gallium/include/pipe/p_config.h and that getting
streaming-load-memcpy.c can not use of it

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

22 months agoci/nouveau: Add some recent flakes
Emma Anholt [Tue, 15 Nov 2022 18:42:41 +0000 (10:42 -0800)]
ci/nouveau: Add some recent flakes

Closes: #7708
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19757>

22 months agomicrosoft/compiler: Delete now-unused memcpy lowering pass
Jesse Natalie [Tue, 15 Nov 2022 17:00:21 +0000 (09:00 -0800)]
microsoft/compiler: Delete now-unused memcpy lowering pass

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

22 months agomicrosoft/clc: Optimize memcpys
Jesse Natalie [Tue, 15 Nov 2022 16:59:30 +0000 (08:59 -0800)]
microsoft/clc: Optimize memcpys

Use the optimization pass to try to remove them, and if that fails,
at least use the core nir lowering pass which is better about fixed-
size memcpys compared to the one we wrote for DXIL.

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

22 months agoaco: move statistics enum to aco_shader_info.h
Daniel Schürmann [Fri, 1 Jul 2022 09:19:19 +0000 (11:19 +0200)]
aco: move statistics enum to aco_shader_info.h

to make it accessible from the driver.

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

22 months agoradv: use radv_fill_nir_compiler_options() helper for prolog/epilog
Daniel Schürmann [Mon, 26 Sep 2022 13:04:00 +0000 (15:04 +0200)]
radv: use radv_fill_nir_compiler_options() helper for prolog/epilog

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

22 months agoradv: create radv_fill_nir_compiler_options() helper function
Daniel Schürmann [Thu, 30 Jun 2022 14:34:18 +0000 (16:34 +0200)]
radv: create radv_fill_nir_compiler_options() helper function

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

22 months agoaco: fix p_interp_gfx11 to not overwrite SCC
Samuel Pitoiset [Tue, 15 Nov 2022 05:51:24 +0000 (05:51 +0000)]
aco: fix p_interp_gfx11 to not overwrite SCC

s_wqm_b64 clobbers SCC.
Found this while working on dual source blending.

Fixes: 6113ee650a2 ("aco/gfx11: fix FS input loads in quad-divergent control flow")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19747>

22 months agoci/alpine: build Mesa on top of Alpine 3.16
David Heidelberg [Fri, 14 Oct 2022 02:19:31 +0000 (21:19 -0500)]
ci/alpine: build Mesa on top of Alpine 3.16

Alpine is lightweight distribution with musl-libc. We currently testing
with Debian and Fedora, which are both Glibc based distro, so this
option should be able give us chance to catch more build-system bugs.

Acked-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/19588>

22 months agoci/freedreno: add missing traces
David Heidelberg [Mon, 5 Sep 2022 12:05:13 +0000 (14:05 +0200)]
ci/freedreno: add missing traces

Tested with:
```
.gitlab-ci/bin/ci_run_n_monitor.py --rev $(git rev-parse HEAD) --target ".*a[0-9]*-traces$" --force-manual
```

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19503>

22 months agoclover: empty soversion when on win32
Yonggang Luo [Thu, 10 Nov 2022 16:45:56 +0000 (00:45 +0800)]
clover: empty soversion when on win32

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7675
Cc: mesa-stable
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19653>

22 months agointel: Use common CONCAT/PASTE macros
Matt Coster [Thu, 9 Jun 2022 14:03:01 +0000 (15:03 +0100)]
intel: Use common CONCAT/PASTE macros

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16945>

22 months agoglx: Use common CONCAT/PASTE macros
Matt Coster [Wed, 8 Jun 2022 10:44:55 +0000 (11:44 +0100)]
glx: Use common CONCAT/PASTE macros

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16945>

22 months agogallium: Use common CONCAT/PASTE macros
Matt Coster [Wed, 8 Jun 2022 10:44:49 +0000 (11:44 +0100)]
gallium: Use common CONCAT/PASTE macros

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16945>

22 months agoamd: Use common CONCAT/PASTE macros
Matt Coster [Wed, 8 Jun 2022 10:44:40 +0000 (11:44 +0100)]
amd: Use common CONCAT/PASTE macros

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16945>

22 months agoutil: Add common CONCAT/PASTE macros
Matt Coster [Wed, 8 Jun 2022 10:39:45 +0000 (11:39 +0100)]
util: Add common CONCAT/PASTE macros

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16945>

22 months agointel: Unify naming of CONCAT/PASTE macros
Matt Coster [Thu, 9 Jun 2022 13:57:30 +0000 (14:57 +0100)]
intel: Unify naming of CONCAT/PASTE macros

In isl/isl_priv.h:
 - __PASTE2 => PASTE2
 - __PASTE => CONCAT2

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Lionel Landwerlin <lionel.g.landwerlin@intel.com>

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16945>

22 months agoglx: Unify naming of CONCAT/PASTE macros
Matt Coster [Thu, 9 Jun 2022 13:56:05 +0000 (14:56 +0100)]
glx: Unify naming of CONCAT/PASTE macros

In glxextensions.c:
 - CONCAT => PASTE2

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16945>

22 months agogallium: Unify naming of CONCAT/PASTE macros
Matt Coster [Thu, 9 Jun 2022 13:55:13 +0000 (14:55 +0100)]
gallium: Unify naming of CONCAT/PASTE macros

In auxiliary/draw/draw_pt_vsplit_tmp.h:
 - CONCAT2 => PASTE2
 - CONCAT => CONCAT2

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16945>

22 months agoamd: Unify naming of CONCAT/PASTE macros
Matt Coster [Thu, 9 Jun 2022 13:52:37 +0000 (14:52 +0100)]
amd: Unify naming of CONCAT/PASTE macros

In compiler/tests/framework.h:
 - _PASTE => PASTE2
 - PASTE => CONCAT2

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16945>

22 months agodocs: move generic gallium envvars to root doc
Erik Faye-Lund [Tue, 8 Nov 2022 10:10:45 +0000 (11:10 +0100)]
docs: move generic gallium envvars to root doc

It makes little sense to document the gallium envvars in multiple
places. Let's merge them all into the root envvar document.

This also moves GALLIUM_OVERRIDE_CPU_CAPS to toe root envvars doc, as
it's more generic than just LLVMpipe.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>

22 months agodocs: remove duplicate envvars
Erik Faye-Lund [Tue, 8 Nov 2022 10:02:24 +0000 (11:02 +0100)]
docs: remove duplicate envvars

These envvars are also documented in the "envvars" document, which is
more prominent. Let's just drop these duplicate definitions to avoid
confusion.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>

22 months agodocs: fix badly encoded envvar-roles
Erik Faye-Lund [Tue, 8 Nov 2022 09:52:17 +0000 (10:52 +0100)]
docs: fix badly encoded envvar-roles

Sphinx thinks the equals sign and the stuff that follows are parts of
the role, leading to warnings in nit-picky mode, as well as missing
links in the rendered result. Let's fix that by inserting some
whitespace.

While we're at it, fixup an incorrectly quoted literal.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>

22 months agodocs: use envvar directive
Erik Faye-Lund [Tue, 8 Nov 2022 07:50:34 +0000 (08:50 +0100)]
docs: use envvar directive

When declaring an envvar, we should use the envvar directive, not the
envvar role. The latter is meant to reference the declaration, not the
other way around.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>

22 months agodocs: remove stale envvar-reference
Erik Faye-Lund [Tue, 8 Nov 2022 09:37:10 +0000 (10:37 +0100)]
docs: remove stale envvar-reference

This reference was left over when the envvar was removed.

Fixes: 231ccb6100e ("docs: Remove no-longer-accurate text about the xlib driver")

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>

22 months agodocs: drop custom envvar directive
Erik Faye-Lund [Tue, 8 Nov 2022 09:24:07 +0000 (10:24 +0100)]
docs: drop custom envvar directive

The custom envvar directive is strange. It overloads the global
namespace, where there's already a well-known envvar directive, but the
envvar role won't resolve to envvars defined using the custom directive.

It's not really critical to declare the type and default value here, and
many descriptions already include this. Let's just use the plain one,
and let the description take care of the details where needed.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>

22 months agodocs: properly nest envvar descriptions
Erik Faye-Lund [Tue, 8 Nov 2022 09:18:02 +0000 (10:18 +0100)]
docs: properly nest envvar descriptions

These were not nested properly, making the definitions not part of the
definition lists.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>

22 months agodocs: remove rogue "the"
Erik Faye-Lund [Mon, 14 Nov 2022 10:18:40 +0000 (11:18 +0100)]
docs: remove rogue "the"

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs: add missing extension-link
Erik Faye-Lund [Mon, 14 Nov 2022 10:57:50 +0000 (11:57 +0100)]
docs: add missing extension-link

Not sure why I missed this one during the last round, but it seems I
did. Let's add the link!

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs: do not mention EGL_MESA_drm_display
Erik Faye-Lund [Mon, 14 Nov 2022 10:49:24 +0000 (11:49 +0100)]
docs: do not mention EGL_MESA_drm_display

This extension was removed back in 2016, but it seems we left a mention
of it in the docs.

The entire section with this extension seems kinda pointless now, so
let's drop it entirely.

Fixes: f3e23ead536 ("egl: remove remnants of MESA_drm_display")
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs/tgsi: xDArray -> xD_ARRAY
Erik Faye-Lund [Fri, 11 Nov 2022 07:58:24 +0000 (08:58 +0100)]
docs/tgsi: xDArray -> xD_ARRAY

This matches what we have in tgsi_strings.c, as well as the non-constant
part of the corresponding enum tgsi_texture_type values.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs/gallium: move period out of quotes
Erik Faye-Lund [Tue, 8 Nov 2022 06:58:55 +0000 (07:58 +0100)]
docs/gallium: move period out of quotes

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs: lifecycle -> life cycle
Erik Faye-Lund [Mon, 7 Nov 2022 20:03:01 +0000 (21:03 +0100)]
docs: lifecycle -> life cycle

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs: dll -> DLL
Erik Faye-Lund [Mon, 7 Nov 2022 19:59:29 +0000 (20:59 +0100)]
docs: dll -> DLL

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs: un-committed -> uncommitted
Erik Faye-Lund [Mon, 7 Nov 2022 19:53:26 +0000 (20:53 +0100)]
docs: un-committed -> uncommitted

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs: IPE -> PIPE
Erik Faye-Lund [Mon, 7 Nov 2022 19:27:41 +0000 (20:27 +0100)]
docs: IPE -> PIPE

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs/asahi: use console blocks for console commands
Erik Faye-Lund [Mon, 7 Nov 2022 19:35:31 +0000 (20:35 +0100)]
docs/asahi: use console blocks for console commands

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs/asahi: use literal-block for build-options
Erik Faye-Lund [Mon, 7 Nov 2022 19:32:52 +0000 (20:32 +0100)]
docs/asahi: use literal-block for build-options

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agodocs/asahi: fix indent
Erik Faye-Lund [Mon, 7 Nov 2022 19:31:01 +0000 (20:31 +0100)]
docs/asahi: fix indent

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19719>

22 months agoetnaviv: don't always emit PE_DEPTH_CONFIG on shader changes
Lucas Stach [Fri, 11 Nov 2022 16:29:18 +0000 (17:29 +0100)]
etnaviv: don't always emit PE_DEPTH_CONFIG on shader changes

Since b29fe26d4387 ("etnaviv: rework ZSA into a derived state") the PE
depth config is adjusted by etna_update_zsa() when the shader is changed.
When the PE depth config is actually changing as a result of this
adjustment the ZSA state is dirtied, so there is no need to emit the
state unconditionally when the shader is changed.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19686>

22 months agoetnaviv: switch to late Z when linear PE is used
Lucas Stach [Fri, 11 Nov 2022 16:20:41 +0000 (17:20 +0100)]
etnaviv: switch to late Z when linear PE is used

In linear PE mode the early and late depth stage do not only disagree
about the cache layout, but they seem to fundamentally disagree about
the buffer layout. When Z was written via the late stage, early tests
always show spurious zfails, even if they are not in the same draw
call. Cache flushing and pipe stalls don't help in that case.

The only option to get reliable Z tests with linear render targets is
to move all Z handling into the PE stage. Even when early Z writes
are possible, we don't know if any other draw to the same surface
needs late Z handling, so we must never use the early stage.

Fixes: 53445284a427 ("etnaviv: add linear PE support")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19686>

22 months agoetnaviv: fix shader register control with MSAA
Lucas Stach [Mon, 7 Nov 2022 15:12:52 +0000 (16:12 +0100)]
etnaviv: fix shader register control with MSAA

Apparently MSAA doesn't only add another input, but it also increases
required temporaries by one. Simple programs where the register demand
is given by the number of inputs did work fine, while more complex ones,
where register demand is given by the number of temporaries exhibit
rendering issues without this fix.

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

22 months agogallium: Avoid nullptr-with-nonzero-offset
vabr-g [Wed, 19 Oct 2022 19:49:47 +0000 (19:49 +0000)]
gallium: Avoid nullptr-with-nonzero-offset

reserve() in rtasm_x86sse compares a pointer difference with some
integers to check if reallocation is needed.
It unfortunately groups the first pointer with an int, which makes it
possible to hit nullptr-with-nonzero-offset under Undefined Behavior
Sanitizer.
This patch suggests a reordering of the arithmetic expression so that
first the pointer difference is computed, and from that on it's just a
usual integer arithmetic, avoiding nullptr-with-nonzero-offset.

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

22 months agoci/update_traces_checksum.py: make output more clean and implement colors
David Heidelberg [Thu, 3 Nov 2022 16:47:26 +0000 (17:47 +0100)]
ci/update_traces_checksum.py: make output more clean and implement colors

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19510>

22 months agoci/update_traces_checksum.py: check if checksum is in the array, not it's value
David Heidelberg [Thu, 3 Nov 2022 16:48:26 +0000 (17:48 +0100)]
ci/update_traces_checksum.py: check if checksum is in the array, not it's value

Fixes: 45eda069531a ("ci: introduce update_traces_checksum.py")

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19510>

22 months agoac/llvm: fix gfx11 fs input load for 16bit varying
Qiang Yu [Thu, 10 Nov 2022 08:44:56 +0000 (16:44 +0800)]
ac/llvm: fix gfx11 fs input load for 16bit varying

Otherwise we get empty output.

Fixes: b07204d7804 ("radeonsi/gfx11: interp changes for 16bit")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19637>

22 months agoac/nir/ngg: remove nuw for negative value add
Qiang Yu [Mon, 14 Nov 2022 07:28:44 +0000 (15:28 +0800)]
ac/nir/ngg: remove nuw for negative value add

Add negative value is possible to wrap around. I haven't seen this
"nuw" causes any problem yet, but let's remove it for safe.

Fixes: 60ac5dda82e ("ac: Add NIR lowering for NGG GS.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19718>

22 months agoac/nir/ngg: fix nogs culling with nuw add
Qiang Yu [Mon, 14 Nov 2022 07:01:51 +0000 (15:01 +0800)]
ac/nir/ngg: fix nogs culling with nuw add

We should not use "nuw" here as negative add positive may wrap
around (negative is 0xffffff??).

This problem can be observed with LLVM15 (I can't see when LLVM14):
  %.neg = mul nsw i32 %31, -4
  %163 = add nuw nsw i32 %.neg, 16
  %164 = lshr i32 257, %.neg
  %165 = lshr i32 %164, %163

LLVM just assume %.neg is possitive, so pre-shift 0x01010101 by 16.
This get wrong value because we can't get back the shifted bits with
a negative shift right.

Fixes: 75dbb404393 ("ac/nir: Remove byte permute from prefix sum of the repack sequence.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19718>

22 months agoanv: Don't use REQUIRE_8 for Bindless Shaders
Caio Oliveira [Tue, 8 Nov 2022 13:25:48 +0000 (05:25 -0800)]
anv: Don't use REQUIRE_8 for Bindless Shaders

In 23c7142cd67 ("anv: disable SIMD16 for RT shaders") we were forcing the SIMD8
using the mechanism for subgroup size control, which is problematic since it has
other effects on the shader behavior.

The code was changed to select the SIMD in a different way in the previous patches,
so we can revert the behavior to the original semantics.

Fixes dEQP-VK.subgroups.builtin_var.ray_tracing.subgroupsize.

Reviewed-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/19601>

22 months agointel/compiler: Use SIMD selection helpers in compile_single_bs()
Caio Oliveira [Tue, 8 Nov 2022 00:21:17 +0000 (16:21 -0800)]
intel/compiler: Use SIMD selection helpers in compile_single_bs()

Reviewed-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/19601>

22 months agointel/compiler: Prepare SIMD selection helpers to handle different prog_datas
Caio Oliveira [Tue, 8 Nov 2022 12:34:55 +0000 (04:34 -0800)]
intel/compiler: Prepare SIMD selection helpers to handle different prog_datas

Reviewed-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/19601>

22 months agointel/compiler: Keep track of compiled/spilled in brw_simd_selection_state
Caio Oliveira [Tue, 8 Nov 2022 11:38:18 +0000 (03:38 -0800)]
intel/compiler: Keep track of compiled/spilled in brw_simd_selection_state

We still update the cs_prog_data, but don't rely on it for this state anymore.
This will allow use the SIMD selector with shaders that don't use cs_prog_data.

Reviewed-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/19601>

22 months agointel/compiler: Add a SIMD_COUNT constant
Caio Oliveira [Tue, 8 Nov 2022 10:30:08 +0000 (02:30 -0800)]
intel/compiler: Add a SIMD_COUNT constant

Reviewed-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/19601>

22 months agointel/compiler: Create a struct to hold SIMD selection state
Caio Oliveira [Tue, 8 Nov 2022 09:47:50 +0000 (01:47 -0800)]
intel/compiler: Create a struct to hold SIMD selection state

This is a preparation to decouple the storage of what SIMDs
compiled/spilled from the cs_prog_data.  This will allow reuse
of SIMD selection code by Bindless Shaders.

And since we have a struct now, move the error array there so
reduce the boilerplate of the users.

Reviewed-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/19601>

22 months agointel/compiler: Simplify usage of brw_simd_select_for_workgroup_size()
Caio Oliveira [Tue, 8 Nov 2022 09:24:36 +0000 (01:24 -0800)]
intel/compiler: Simplify usage of brw_simd_select_for_workgroup_size()

Reviewed-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/19601>

22 months agointel/compiler: Make brw_private.h and simd selector helpers C++
Caio Oliveira [Tue, 8 Nov 2022 01:35:16 +0000 (17:35 -0800)]
intel/compiler: Make brw_private.h and simd selector helpers C++

We don't intend to expose neither to drivers, so it is fine to be C++.

Reviewed-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/19601>

22 months agogallivm: add coro malloc hooks earlier and always.
Dave Airlie [Mon, 14 Nov 2022 03:47:02 +0000 (13:47 +1000)]
gallivm: add coro malloc hooks earlier and always.

This fixes GALLIVM_DEBUG=asm for compute shaders, changing
the hooks after dumping causes a segfault because the
memory has already been finalised. Just add the hooks always,
and before dumping anything.

Fixes: f511d2a55337 ("gallivm: rework coroutine malloc/free callouts.")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19714>

22 months agoglsl: remove unused intrinsics
Timothy Arceri [Wed, 2 Nov 2022 03:30:02 +0000 (14:30 +1100)]
glsl: remove unused intrinsics

Since everything now uses nir we can now drop these.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19713>

22 months agonir_scale_fdiv: Respect vector swizzles
Jesse Natalie [Sun, 13 Nov 2022 16:26:22 +0000 (08:26 -0800)]
nir_scale_fdiv: Respect vector swizzles

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19709>

22 months agoradeonsi: print the number of shader outputs for shader-db
Marek Olšák [Mon, 7 Nov 2022 07:12:51 +0000 (02:12 -0500)]
radeonsi: print the number of shader outputs for shader-db

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19567>

22 months agolavapipe: Prevent integer overflow adding index buffer offset and start index.
Jose Fonseca [Fri, 11 Nov 2022 16:06:34 +0000 (16:06 +0000)]
lavapipe: Prevent integer overflow adding index buffer offset and start index.

Direct3D and Vulkan's robustBufferAccess2 feature mandate that index
buffer out-of-bounds reads should return a zero index (ie, vertex at
index zero, not to be confused with a vertex with zero attributes, as
the kind resulting in vertex buffer out-of-bounds read.)

lavapipe was adding index_offset and start index together without
overflow checks, and if start index was sufficient large (as is the case
with WHCK wgf11draw which sets start index to (UINT)-5) it would cause
to wrap around causing fetches that should be out of bounds wrap around
and fetch inside bounds.

This change fixes this by doing a clamped add.  This ensures start index
is set to UINT32_MAX on overflow, which is sufficient in practice to
trigger draw index OOB code-paths, yield zero index to be returned.

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

22 months agodraw,util: Refactor draw_overflow_uadd into util.
Jose Fonseca [Fri, 11 Nov 2022 15:55:11 +0000 (15:55 +0000)]
draw,util: Refactor draw_overflow_uadd into util.

So it can be used outside draw.  Also drop  the overflow_value parameter,
as it wasn't meaningfully useful.

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

22 months agoutil/disk_cache: Prevent ‘sha1’ may be used uninitialized warnings.
Jose Fonseca [Fri, 11 Nov 2022 16:12:37 +0000 (16:12 +0000)]
util/disk_cache: Prevent ‘sha1’ may be used uninitialized warnings.

These happen when shader cache is disabled (ENABLE_SHADER_CACHE
undefined) due to a prototype mismatch.

Also remove redundant return statements.

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

22 months agoradeonsi/vcn: adding av1 decoding film grain block
Ruijing Dong [Wed, 9 Nov 2022 01:51:31 +0000 (20:51 -0500)]
radeonsi/vcn: adding av1 decoding film grain block

add the logic for calculating film grain related
coefficients for VCN to generate film grain output.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19660>

22 months agofrontends/va: fixed av1 decoding 10bit ffmpeg output YUV issue
Ruijing Dong [Sun, 6 Nov 2022 03:06:54 +0000 (23:06 -0400)]
frontends/va: fixed av1 decoding 10bit ffmpeg output YUV issue

av1 decoding supports NV12 and P010 output.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19660>

22 months agoci/llvmpipe: Switch rusticl and clover testing over to deqp-runner.
Emma Anholt [Tue, 8 Nov 2022 21:20:00 +0000 (13:20 -0800)]
ci/llvmpipe: Switch rusticl and clover testing over to deqp-runner.

The usual reasons: Flake handling, familiar skips/xfails handling, faster
parallelization.  This also sets us up for running a subset of the CL CTS
once we decide to build it in our containers.

Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19608>

22 months agoci: Update to deqp-runner v0.16.0 for SKQP and CL support.
Guilherme Gallo [Fri, 26 Aug 2022 11:46:01 +0000 (08:46 -0300)]
ci: Update to deqp-runner v0.16.0 for SKQP and CL support.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19608>

22 months agoradv/rt: Clone specialization infos
Konstantin Seurer [Sat, 12 Nov 2022 18:25:34 +0000 (19:25 +0100)]
radv/rt: Clone specialization infos

Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19700>

22 months agoradv/rt: Clone entrypoint names
Konstantin Seurer [Sat, 12 Nov 2022 18:01:52 +0000 (19:01 +0100)]
radv/rt: Clone entrypoint names

Fixes a vtn crash with
dEQP-VK.ray_tracing_pipeline.pipeline_library.configurations.singlethreaded_compilation.s0_l1
and validation enabled.

Closes: #7642
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19700>