Commit Graph

157565 Commits

Author SHA1 Message Date
Jason Ekstrand
c5c90e6ea4 lima: Lower undefs to zero and run DCE after from_ssa
Undefs can happen even in real GLSL shaders so it's best to handle them.
Lowering to zero is a perfectly valid implementation.  Also, run DCE
because some of the undefs may be dead after from_ssa and there's no
point in processing those in the back-end.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16817>
2022-08-01 22:13:24 +00:00
Dave Airlie
6f873dd267 lavapipe: enable VK_FORMAT_R5G5B5A1_UNORM_PACK16
Doesn't cause any cts regressions here.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17826>
2022-08-02 07:13:04 +10:00
Adam Jackson
097653e3d2 gallium/dri2: Enable {GLX_ARB,EGL_KHR}_context_flush_control
This was disabled ages ago because it provoked bugs between us and
xserver about context creation attributes, hopefully those servers are
out of circulation by now, let's find out.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17756>
2022-08-01 19:04:18 +00:00
Gert Wollny
33ca04eb63 r600/sfn: remove leftover debug output
Fixes: 3c7368de56
   r600/sfn: Handle slot differences between pre-EG and EG

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17839>
2022-08-01 18:57:05 +00:00
Alyssa Rosenzweig
ac5c1039a2 pan/bi: Rename CLPER_V6.i32 to CLPER_OLD.i32
To reflect that it is the CLPER of choice on Mali-G31 which is a v7 target.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17754>
2022-08-01 18:42:57 +00:00
Alyssa Rosenzweig
d8bd80afeb pan/bi: Assert that we use the correct CLPER
Add an assert at pack time that would have caught the bug fixed in 7535362204
("pan/bi: Fix clper_xor on Mali-G31").

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17754>
2022-08-01 18:42:57 +00:00
Alyssa Rosenzweig
8066ef9d30 agx: Port minifloat tests to GTest
These tests predate using GTest in the compiler. Now that we do, we'd like to
have the tests together so they run regularly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17824>
2022-08-01 18:34:11 +00:00
Emma Anholt
31b9b04880 nir: Use nir_foreach_phi_src consistently.
I copy-and-pasted one of these and people noted that we had a better tool,
so make sure nobody else copy and pastes it.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17664>
2022-08-01 17:39:30 +00:00
Emma Anholt
a4bfe11a49 glsl: Remove opt_conditional_discard().
The nir_opt_conditional_discard pass is called anyway and covers
discard/demote/terminate.

iris shader-db:

total instructions in shared programs: 8933422 -> 8933426 (<.01%)
instructions in affected programs: 48 -> 52 (8.33%)
helped: 0
HURT: 4

which is a synmark shader going from 12 to 13 instrs.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17664>
2022-08-01 17:39:30 +00:00
Emma Anholt
3714c89d0e nir: Add an opt pass for phis after if choosing between true/false.
This pattern almost always gets peephole-selected out anyway, but I
noticed it once I removed glsl opt_conditional_discard.

iris shader-db:
total instructions in shared programs: 8933934 -> 8933158 (<.01%)
instructions in affected programs: 75575 -> 74799 (-1.03%)
helped: 179
HURT: 15

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17664>
2022-08-01 17:39:30 +00:00
Juan A. Suarez Romero
a2397e6378 v3d/ci: enable ARB_texture_cube_map piglit tests
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17836>
2022-08-01 16:53:46 +00:00
Juan A. Suarez Romero
0cb1689ca9 v3d/vc4/ci: Fix typo in skipped list
The skipped piglit tests should be those about arb_gpu_shader5, not
arb_gpu_shader_gpu5.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17836>
2022-08-01 16:53:46 +00:00
Juan A. Suarez Romero
899759be6a v3dv/ci: Update expected list
Add some tests in the skip list that takes too much time to be executed.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17836>
2022-08-01 16:53:46 +00:00
Erik Faye-Lund
e22cadbed6 zink: more accurately set ImageQuery cap
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17734>
2022-08-01 15:37:17 +00:00
Erik Faye-Lund
f55a4407ef zink: more accurately set {Sampled,Image}Buffer caps
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17734>
2022-08-01 15:37:17 +00:00
Erik Faye-Lund
6aeb93d555 zink: more accurately set {Sampled,Image}1D caps
We don't really need to set this for every shader that uses textures,
only the ones that use 1D textures.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17734>
2022-08-01 15:37:17 +00:00
Erik Faye-Lund
a923b1636d zink: set dynamic indexing caps
If we're not using uniform indexing, we need to emit caps to enable
dynamic indexing.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17734>
2022-08-01 15:37:17 +00:00
Erik Faye-Lund
e85a710a2a zink: clean up extension emitting
do not emit SPV_KHR_storage_buffer_storage_class if we have vulkan 1.1

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17734>
2022-08-01 15:37:17 +00:00
Sviatoslav Peleshko
cb99365403 intel/nullhw: Use correct macro to fix build regression
Fixes: b510ee0d ("Use vk_foreach_struct_const where needed")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6950

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Tested-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/17789>
2022-08-01 10:54:38 +00:00
Alejandro Piñeiro
c3f5d27631 vc4/v3d: restore calling debug_get_option_vc4/v3d_debug
As it is needed to have V3D_DEBUG defined. For the v3d case, I did it
restoring v3d_process_debug_variable, as it is at v3d_debug.c that
DEBUG_GET_ONCE_FLAGS_OPTION is called.

Fixes: 106b33405e ("vc4/v3d: stop adding NORAST when SHADERDB debug option is used")

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17812>
2022-08-01 09:24:38 +00:00
pal1000
6643bfd3e4 ci/MinGW: LLD is not really used anywhere
Fixes: bbfd6dfe ("ci: Prepare the container for building all mesa components with mingw under linux")

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17766>
2022-08-01 08:52:08 +00:00
pal1000
65795e7658 ci/MSVC: LLD is not really used anywhere
Fixes: 0f46a319 ("CI: Windows: Build LLVM and llvmpipe")

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17766>
2022-08-01 08:52:08 +00:00
Gert Wollny
33765aa92a r600/sfn: Enable NIR for pre RG hardware
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
d7a3f17a79 r600/sfn: Advertise support for fmulz
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
14ab267c76 r600/sfn: Disable FP64 for pre-CEDAR
There is no point in trying to get the softfp to work here,
since these cards don't support tesselation shaders, they will
never get OpenGL 4.0.

v2: Fix formatting (Filip)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
13b1069a87 r600/sfn: Handle pre-EG buffer fetch
v2: Fix formatting (Filip)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
325eaf6479 r600/sfn: Set trans flag for flt_to_int on pre-EG
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
a2cb85800b r600/sfn: Handle non-compressed MS texel fetch
v2: Fix formatting (Filip)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
82437c69c4 r600/sfn: Handle primitive input handling for pre-EG
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
be7bd71a86 r600/sfn: Handle pre-EG GS input fetch
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
675348e65e r600/sfn: Handle buffer size query on pre-EG
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
42f2e82fe0 r600/sfn: Handle chipclass with kcache allocation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:28 +00:00
Gert Wollny
3c7368de56 r600/sfn: Handle slot differences between pre-EG and EG
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:27 +00:00
Gert Wollny
dac627f6e0 r600/sfn: Prepare StreamOut instruction for pre EG opcodes
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:27 +00:00
Gert Wollny
fbe997049d r600/sfn: Support pre-EG style FS input
v2: Fix formatting

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:27 +00:00
Gert Wollny
8f96cd4db0 r600/sfn: Factor out fragement shader class for EG
Pre-EG hardware handles the FS inputs differently, so we
need to prepare a different code path.

v2: Make m_interolators_used private (Filip)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
2022-08-01 08:44:27 +00:00
Gert Wollny
f9703ac34d virgl: honor host caps in shader cash sha evaluation
This is needed because when we switch between GLES and GL on the host,
we have to lower atomics to ssbo, and with that the shaders  can't be
pulled from the cache anymore. Likewise when we move the disk image with
a shader cache to a different host, other features might change that
will need lowering. To avoid using stale shaders in this case, merge the
caps into into the shader cache sha.

Fixes: d6db4d2e08
    virgl: Add simple disk cache

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17798>
2022-08-01 08:34:12 +00:00
Eli Schwartz
5780ea90c4 meson: add various generated header dependencies as order-only deps
https://mesonbuild.com/FAQ.html#how-do-i-tell-meson-that-my-sources-use-generated-headers

A few locations had underspecified deps on the header files, and this
caused builds to fail given sufficient parallelism.

Fixes #6531

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16659>
2022-07-31 18:10:15 +00:00
Yonggang Luo
df242a2c06 auxiliary: Remove pipe_tsd
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:12 +00:00
Yonggang Luo
af1fe5c2c8 glx: Remove usage of pipe_tsd_set and pipe_tsd_get
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:12 +00:00
Yonggang Luo
6af5cadef9 meson: Remove pre_args += '-DUSE_ELF_TLS'
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:12 +00:00
Yonggang Luo
365253605a util: Remove usage of USE_ELF_TLS in u_thread.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:12 +00:00
Yonggang Luo
aa0b857544 glx: Remove usage of USE_ELF_TLS
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:12 +00:00
Yonggang Luo
a055f285f5 loader: Remove usage of USE_ELF_TLS in loader.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:12 +00:00
Yonggang Luo
62a68481fa mapi: Remove usage of USE_ELF_TLS
After commit c47fd3dc00 ("windows: Use TLS context/dispatch with shared-glapi")
USE_ELF_TLS are always defined by
pre_args += '-DUSE_ELF_TLS'
So we can remove it safety

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:11 +00:00
Yonggang Luo
bf2cd50019 egl: Remove usage of USE_ELF_TLS macro
After commit c47fd3dc00 ("windows: Use TLS context/dispatch with shared-glapi")
USE_ELF_TLS are always defined by
pre_args += '-DUSE_ELF_TLS'
So we can remove it safety

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:11 +00:00
Yonggang Luo
c8d296ae4b meson: Remove usage of use_elf_tls
After c47fd3dc00 ("windows: Use TLS context/dispatch with shared-glapi")

use_elf_tls are always setting to true, so we can remove it safety

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:11 +00:00
Yonggang Luo
6bde428c0a mapi: Trim trailing spaces in stub.c and u_current.c
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17213>
2022-07-29 23:59:11 +00:00
Yiwei Zhang
71a0ae2796 anv: enable VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM for modifier support
This is a missed format to properly support media interop for Android.
Currently only used when layering GL atop Vulkan on Android, but will
be used directly with Vulkan when the platform default renderer has
switched to skiavk in modern Android.

Test: CtsMediaTestCases and CtsVideoTestCases with angle on venus on anv

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17808>
2022-07-29 23:24:15 +00:00
Iván Briano
a05fcc94c2 anv: assert inheritance_info is not NULL
Makes some static analysis tools happier.

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17809>
2022-07-29 22:50:21 +00:00