platform/upstream/mesa.git
23 months agoglx: Remove usage of pipe_tsd_set and pipe_tsd_get
Yonggang Luo [Tue, 21 Jun 2022 09:23:59 +0000 (17:23 +0800)]
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>

23 months agomeson: Remove pre_args += '-DUSE_ELF_TLS'
Yonggang Luo [Tue, 21 Jun 2022 09:52:21 +0000 (17:52 +0800)]
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>

23 months agoutil: Remove usage of USE_ELF_TLS in u_thread.h
Yonggang Luo [Sat, 25 Jun 2022 05:32:32 +0000 (13:32 +0800)]
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>

23 months agoglx: Remove usage of USE_ELF_TLS
Yonggang Luo [Sat, 25 Jun 2022 05:31:52 +0000 (13:31 +0800)]
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>

23 months agoloader: Remove usage of USE_ELF_TLS in loader.c
Yonggang Luo [Sat, 25 Jun 2022 05:29:18 +0000 (13:29 +0800)]
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>

23 months agomapi: Remove usage of USE_ELF_TLS
Yonggang Luo [Tue, 21 Jun 2022 09:21:50 +0000 (17:21 +0800)]
mapi: Remove usage of USE_ELF_TLS

After commit c47fd3dc006 ("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>

23 months agoegl: Remove usage of USE_ELF_TLS macro
Yonggang Luo [Tue, 21 Jun 2022 06:03:41 +0000 (14:03 +0800)]
egl: Remove usage of USE_ELF_TLS macro

After commit c47fd3dc006 ("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>

23 months agomeson: Remove usage of use_elf_tls
Yonggang Luo [Tue, 21 Jun 2022 07:33:07 +0000 (15:33 +0800)]
meson: Remove usage of use_elf_tls

After c47fd3dc006 ("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>

23 months agomapi: Trim trailing spaces in stub.c and u_current.c
Yonggang Luo [Tue, 21 Jun 2022 04:33:30 +0000 (12:33 +0800)]
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>

23 months agoanv: enable VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM for modifier support
Yiwei Zhang [Fri, 29 Jul 2022 18:58:15 +0000 (18:58 +0000)]
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>

23 months agoanv: assert inheritance_info is not NULL
Iván Briano [Fri, 29 Jul 2022 19:54:59 +0000 (12:54 -0700)]
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>

23 months agoutil: Disable tests/sparse_array_test.cpp on MacOS as it's too slow
Yonggang Luo [Thu, 28 Jul 2022 18:42:42 +0000 (02:42 +0800)]
util: Disable tests/sparse_array_test.cpp on MacOS as it's too slow

[----------] 1 test from SparseArrayTest
[ RUN      ] SparseArrayTest.Multithread
[       OK ] SparseArrayTest.Multithread (105624 ms)
[----------] 1 test from SparseArrayTest (105624 ms total)

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

23 months agointel/compiler: reorder shader cache keys to minimize padding
Mark Janes [Mon, 25 Jul 2022 23:48:28 +0000 (16:48 -0700)]
intel/compiler: reorder shader cache keys to minimize padding

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

23 months agointel/compiler: pad all data structures used by shader cache keys
Mark Janes [Mon, 25 Jul 2022 22:40:15 +0000 (15:40 -0700)]
intel/compiler: pad all data structures used by shader cache keys

When the compiler pads a data structure, the padded bytes will not be
initialized.  Shader keys are compared with memcmp and unitialized
bytes within the structure breaks this mechanism.

Explicitly pad the structures with members, so the compiler is forced
to initialize them.  Add a warning to indicate if a change to
alignment in any of the data structures requires additional padding.

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

23 months agoiris: reorder to minimize padding
Mark Janes [Mon, 25 Jul 2022 23:35:46 +0000 (16:35 -0700)]
iris: reorder to minimize padding

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

23 months agoiris: pad all structures used in a shader key
Mark Janes [Mon, 25 Jul 2022 22:10:19 +0000 (15:10 -0700)]
iris: pad all structures used in a shader key

When the compiler pads a data structure, the padded bytes will not be
initialized.  Shader keys are compared with memcmp and unitialized
bytes within the structure breaks this mechanism.

Explicitly pad the structures with members, so the compiler is forced
to initialize them.  Add a warning to indicate if a change to
alignment in any of the data structures requires additional padding.

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

23 months agoutil: define helpful macros for compiler diagnostic features
Mark Janes [Thu, 28 Jul 2022 22:49:36 +0000 (15:49 -0700)]
util: define helpful macros for compiler diagnostic features

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

23 months agonine: set view_mask=0
Mike Blumenkrantz [Thu, 28 Jul 2022 13:59:53 +0000 (09:59 -0400)]
nine: set view_mask=0

nine doesn't use viewids, and this breaks drivers that support it

cc: mesa-stable

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17792>

23 months agod3dadapter: fix sw pipe loading
Mike Blumenkrantz [Thu, 28 Jul 2022 13:08:27 +0000 (09:08 -0400)]
d3dadapter: fix sw pipe loading

this needs to check the env var in order to work correctly

cc: mesa-stable

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17792>

23 months agovirgl: more ci flakes
Mike Blumenkrantz [Fri, 29 Jul 2022 14:29:26 +0000 (10:29 -0400)]
virgl: more ci flakes

I guess nobody is watching these?

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

23 months agovc4/v3d: stop adding NORAST when SHADERDB debug option is used
Alejandro Piñeiro [Thu, 28 Jul 2022 11:39:56 +0000 (13:39 +0200)]
vc4/v3d: stop adding NORAST when SHADERDB debug option is used

Right now if we use the option SHADERDB, NORAST is added
automatically. There's no comment justifying it, neither a lot of info
on the commits that added that. But I guess that the purpose is that
SHADERDB option is assumed to be used only to gather shader-db stats,
so setting setting NORAST would allow to get those dumps faster.

But adding debug options automatically can be confusing, as we could
get a behaviour that we were not expecting. At least I needed to check
why using SHADERDB was getting a black screen. And if we want to get
this behaviour, we can easily add manually the NORAST.

Finally, v3dv doesn't support NORAST right now (and we don't have
immediate plans to implement it), so it is somewhat inconsistent to
get different behaviour from the same debug option from the two
drivers.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17788>

23 months agoturnip: shared_consts and push_consts are mutually exclusive
Chia-I Wu [Wed, 27 Jul 2022 23:48:36 +0000 (16:48 -0700)]
turnip: shared_consts and push_consts are mutually exclusive

Skip gather_push_constants when shared consts are enabled.  This makes
sure push_consts is only zero-initialized, and reserved_user_consts is
0.  This saves some space in the const file.

This change also adds a few asserts and a comment to
lower_load_push_constant.  Because shared consts share the same range
for all stages, we should not apply per-stage offsets in
lower_load_push_constant.  It worked because nir_lower_explicit_io
always sets base to 0 for nir_var_mem_push_const and
shader->push_consts.lo was always 0 for all stages.

Fixes: 0c787d57e66 ("tu: increase maxPushConstantsSize to 256.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17777>

23 months agoturnip: remove shared_consts from tu_compiled_shaders
Chia-I Wu [Thu, 28 Jul 2022 00:37:17 +0000 (17:37 -0700)]
turnip: remove shared_consts from tu_compiled_shaders

It is set but unused.  We also don't serialize/deserialize shared_consts
to/from the pipeline cache.

Fixes: e1f2cabc5e2 ("turnip: Change to use shared consts for PushConstants")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17777>

23 months agoci: Building osmesa on OSX
Yonggang Luo [Thu, 28 Jul 2022 09:43:18 +0000 (17:43 +0800)]
ci: Building osmesa on OSX

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

23 months agodri: Trim trailing space in dri/dri_util.*
Yonggang Luo [Thu, 28 Jul 2022 08:11:04 +0000 (16:11 +0800)]
dri: Trim trailing space in dri/dri_util.*

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

23 months agoglx: Convert tab to space in applegl_glx.c
Yonggang Luo [Thu, 28 Jul 2022 05:37:18 +0000 (13:37 +0800)]
glx: Convert tab to space in applegl_glx.c

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

23 months agoutil: thread_local doesn't support to be exported on OSX
Yonggang Luo [Wed, 27 Jul 2022 20:31:06 +0000 (04:31 +0800)]
util: thread_local doesn't support to be exported on OSX

The linkage error is:
Undefined symbols for architecture x86_64:
  "thread-local wrapper routine for _glapi_tls_Context", referenced from:
      __mesa_GetActiveUniform_impl in libmesa.a(main_uniform_query.cpp.o)

Fixes: a9e2c699aa3 ("util/c11: Update function u_thread_create to be c11 conformance")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6756

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

23 months agoglx: __glX_tls_Context should use __THREAD_INITIAL_EXEC
Yonggang Luo [Thu, 28 Jul 2022 08:23:37 +0000 (16:23 +0800)]
glx: __glX_tls_Context should use __THREAD_INITIAL_EXEC

Error message on OSX:
../src/glx/tests/fake_glx_screen.cpp:101:20: error: thread-local declaration of '__glX_tls_Context' with dynamic initialization follows declaration with static initialization
thread_local void *__glX_tls_Context = &dummyContext;
                   ^
../src/glx/glxclient.h:655:36: note: previous declaration is here
extern __THREAD_INITIAL_EXEC void *__glX_tls_Context;

Fixes: be00a7c8acf ("glx: using C++11 keyword thread_local")

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

23 months agogallium: Disable dri2 interface on OSX
Yonggang Luo [Thu, 28 Jul 2022 08:12:49 +0000 (16:12 +0800)]
gallium: Disable dri2 interface on OSX

Error message:
Undefined symbols for architecture x86_64:
  "_dri_kms_driver_extensions", referenced from:
      _swkmsCreateNewScreen in libdri.a(dri_util.c.o)
  "_galliumdrm_driver_extensions", referenced from:
      _dri2CreateNewScreen in libdri.a(dri_util.c.o)
ld: symbol(s) not found for architecture x86_64

Fixes: b6f7a4836ab ("dri: Fill in the driver extensions for the legacy createNewScreen paths")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6519

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

23 months agogallium: Rename macros HAVE_PIPE_LOADER*
Yonggang Luo [Thu, 28 Jul 2022 12:55:20 +0000 (20:55 +0800)]
gallium: Rename macros HAVE_PIPE_LOADER*

Rename macro HAVE_PIPE_LOADER_DRI to HAVE_DRI
Rename macro HAVE_PIPE_LOADER_KMS to HAVE_DRISW_KMS

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

23 months agogallium: Do not call to pipe_loader_sw_probe_kms when not present
Yonggang Luo [Thu, 28 Jul 2022 05:54:55 +0000 (13:54 +0800)]
gallium: Do not call to pipe_loader_sw_probe_kms when not present

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

23 months agogallium: Move -DHAVE_PIPE_LOADER_DRI and -DHAVE_PIPE_LOADER_KMS to be pre_args
Yonggang Luo [Thu, 28 Jul 2022 05:54:55 +0000 (13:54 +0800)]
gallium:  Move -DHAVE_PIPE_LOADER_DRI and -DHAVE_PIPE_LOADER_KMS to be pre_args

There is non pipe-loader source code depends on it.
After doing this, we found that shared library pipe_swrast depends on libswdri
The error message is:
src/gallium/targets/pipe-loader/pipe_swrast.so.p/pipe_swrast.c.o:pipe_swrast.c:swrast_driver_descriptor: error: undefined reference to 'dri_create_sw_winsys'
src/gallium/targets/pipe-loader/pipe_swrast.so.p/pipe_swrast.c.o:pipe_swrast.c:swrast_driver_descriptor: error: undefined reference to 'kms_dri_create_winsys'

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17784>

23 months agoci: add `--print-errorlogs` to `meson test`
Eric Engestrom [Fri, 29 Jul 2022 10:57:39 +0000 (11:57 +0100)]
ci: add `--print-errorlogs` to `meson test`

In order to avoid having to dig through artifacts to see what failed.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17804>

23 months agopvr: Fix cdm shared reg usage reported to fw.
Karmjit Mahil [Wed, 20 Jul 2022 09:48:21 +0000 (10:48 +0100)]
pvr: Fix cdm shared reg usage reported to fw.

For context switching we need to keep track of the max shared regs
used and report that to the fw.

Reported-by: Rajnesh Kanwal rajnesh.kanwal@imgtec.com
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17683>

23 months agopvr: Add compute pipeline barrier handling.
Karmjit Mahil [Fri, 4 Mar 2022 14:23:40 +0000 (14:23 +0000)]
pvr: Add compute pipeline barrier handling.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17683>

23 months agopvr: Add IDF/WDF program for compute pipeline barrier.
Karmjit Mahil [Fri, 24 Jun 2022 15:34:31 +0000 (16:34 +0100)]
pvr: Add IDF/WDF program for compute pipeline barrier.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17683>

23 months agopvr: Add initial vkCmdPipelineBarrier skeleton.
Karmjit Mahil [Fri, 4 Mar 2022 14:22:42 +0000 (14:22 +0000)]
pvr: Add initial vkCmdPipelineBarrier skeleton.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17683>

23 months agopvr: Add static consts to hard coding infra.
Karmjit Mahil [Tue, 14 Jun 2022 16:11:47 +0000 (17:11 +0100)]
pvr: Add static consts to hard coding infra.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17681>

23 months agopvr: Add static consts support in descriptor pds program.
Karmjit Mahil [Mon, 13 Jun 2022 13:42:47 +0000 (14:42 +0100)]
pvr: Add static consts support in descriptor pds program.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17681>

23 months agopvr: Rename uniform pds program to descriptor pds program.
Karmjit Mahil [Wed, 8 Jun 2022 08:51:25 +0000 (09:51 +0100)]
pvr: Rename uniform pds program to descriptor pds program.

The program will handle more than just DMAing uniforms so renaming
it. E.g. it will handle push constants and compile time static
constants.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17681>

23 months agoturnip: expose support for VK_EXT_acquire_drm_display
Eric Engestrom [Wed, 27 Jul 2022 13:59:57 +0000 (14:59 +0100)]
turnip: expose support for VK_EXT_acquire_drm_display

Turnip supports VK_EXT_direct_mode_display and can use the common
implementation of AcquireDrmDisplayEXT() & GetDrmDisplayEXT() (which use
wsi->can_present_on_device() that turnip implements).

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17768>

23 months agoiris|anv: gfx version 12.5 data cache flush is not a workaround
Dylan Baker [Thu, 28 Jul 2022 20:34:32 +0000 (13:34 -0700)]
iris|anv: gfx version 12.5 data cache flush is not a workaround

This was not a workaround, it was simply missing from the documentation.
So remove the workaround language.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17797>

23 months agoanv: add gfx version 12.5 flushes to CCS path
Dylan Baker [Thu, 28 Jul 2022 20:32:10 +0000 (13:32 -0700)]
anv: add gfx version 12.5 flushes to CCS path

This was already added to the MCS path in !17218, so this is just
adding it in the CCS path as well.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17797>

23 months agointel/eu: Mark header present in URB memory fences on XeHP
Kenneth Graunke [Mon, 18 Jul 2022 23:48:39 +0000 (16:48 -0700)]
intel/eu: Mark header present in URB memory fences on XeHP

Fixes the following EU validation error:

   ERROR: Header must be present for all URB messages.

The message header is ignored for URB fence messages, so I doubt that
this actually matters in practice.  But we should probably mark it as
present, because you have to send something, and according to the
documentation, there is a message header, it's just ignored.

Fixes: e6a9501aa27 ("intel/fs: Add the URB fence message")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17624>

23 months agointel/eu: Clarify spec citations for XeHP region restrictions
Kenneth Graunke [Tue, 19 Jul 2022 08:59:15 +0000 (01:59 -0700)]
intel/eu: Clarify spec citations for XeHP region restrictions

When this rule started causing issues, I looked it up in the
documentation, and found the rule for 64-bit destinations and
integer DWord multiplication, but there was no mention of floating
point destinations, as the text in brackets suggested.  The actual
restriction text had been updated, so this led to some confusion
where I thought the conditions had been changed in newer docs.

However, what's actually going on is that there are two separate
conditions, each listed in separate rows of the table.  One lists
64-bit destinations or integer DWord multiplication, and the other
mentions floating-point destinations.  In both cases, the actual
restrictions are identical, so we handle them together in the code.

Try to update the comment to avoid future confusion.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17624>

23 months agointel/eu: Fix XeHP register region validation for hstride == 0
Kenneth Graunke [Tue, 19 Jul 2022 08:21:06 +0000 (01:21 -0700)]
intel/eu: Fix XeHP register region validation for hstride == 0

Recently, we started using <1;1,0> register regions for consecutive
channels, rather than the <8;8,1> we've traditionally used, as the
<1;1,0> encoding can be compacted on XeHP.  Since then, one of the
EU validator rules has been flagging tons of instructions as errors:

   mov(16)   g114<1>F   g112<1,1,0>UD   { align1 1H I@2 compacted };
   ERROR: Register Regioning patterns where register data bit locations are changed between source and destination are not supported except for broadcast of a scalar.

Our code for this restriction checked three things:

   #1: vstride != width * hstride ||
   #2: src_stride != dst_stride ||
   #3: subreg != dst_subreg

Destination regions are always linear (no replicated values, nor
any overlapping components), as they only have hstride.  Rule #1 is
requiring that the source region be linear as well.  Rules #2-3 are
straightforward: the subregister must match (for the first channel to
line up), and the source/destination strides must match (for any
subsequent channels to line up).

Unfortunately, rules #1-2 weren't working when horizontal stride was 0.
In that case, regions are linear if width == 1, and the stride between
consecutive channels is given by vertical stride instead.

So we adjust our src_stride calculation from

   src_stride = hstride * type_size;

to:

   src_stride = (hstride ? hstride : vstride) * type_size;

and adjust rule #1 to allow hstride == 0 as long as width == 1.

While here, we also update the text of the rule to match the latest
documentation, which apparently clarifies that it's the location of
the LSB of the channel which matters.

Fixes: 3f50dde8b35 ("intel/eu: Teach EU validator about FP/DP pipeline regioning restrictions.")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17624>

23 months agointel/eu: Don't throw validation errors on float MOV_INDIRECT
Jason Ekstrand [Thu, 24 Sep 2020 21:27:43 +0000 (16:27 -0500)]
intel/eu: Don't throw validation errors on float MOV_INDIRECT

Fixes: 3f50dde8b35 ("intel/eu: Teach EU validator about FP/DP pipeline regioning restrictions.")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17624>

23 months agointel/eu: Handle compaction when inserting validation errors
Kenneth Graunke [Tue, 19 Jul 2022 07:27:29 +0000 (00:27 -0700)]
intel/eu: Handle compaction when inserting validation errors

When the EU validator encountered an error, it would add an annotation
to the disassembly.  Unfortunately, the code to insert an error assumed
that the next instruction would start at (offset + sizeof(brw_inst)),
which is not true if the instruction with an error is compacted.

This could lead to cascading disassembly errors, where we started trying
to decode the next instruction at the wrong offset, and getting lots of
scary looking output:

   ERROR: Register Regioning patterns where [...]
   (-f0.1.any16h) illegal(*** invalid execution size value 6 )      { align1 $7.src atomic };
   (+f0.1.any16h) illegal.sat(*** invalid execution size value 6 )  { align1 $9.src AccWrEnable };
   illegal(*** invalid execution size value 6 )                     { align1 $11.src };
   (+f0.1) illegal.sat(*** invalid execution size value 6 )         { align1 F@2 AccWrEnable };
   (+f0.1) illegal.sat(*** invalid execution size value 6 )         { align1 F@2 AccWrEnable };
   (+f0.1) illegal.sat(*** invalid execution size value 6 )         { align1 $15.src AccWrEnable };
   illegal(*** invalid execution size value 6 )                     { align1 $15.src };
   (+f0.1) illegal.sat.g.f0.1(*** invalid execution size value 6 )  { align1 $13.src AccWrEnable };

Only the first instruction was actually wrong - the rest are just a
result of starting the disassembler at the wrong offset.  Trash ensues!

To fix this, just pass the instruction size in a few layers so we can
record the next offset properly.

Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17624>

23 months agovirgL: lower fneg and fabs
Gert Wollny [Wed, 27 Jul 2022 13:13:12 +0000 (15:13 +0200)]
virgL: lower fneg and fabs

The host doesn't currently handle source mods on immediate values
correctly, so lower the ops that would create these source mods.

v2: update trace checksum

Fixes:  c5cc9ed29b50ada77f875ad0d999678021678922
    virgl: Switch to nir-to-tgsi by default.

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

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

23 months agoutil/reallocarray: add errno.h include.
Dave Airlie [Thu, 28 Jul 2022 03:25:23 +0000 (13:25 +1000)]
util/reallocarray: add errno.h include.

Might fix OSX

Fixes: 419b52f1de6fd ("util: add reallocarray wrapper for win32")
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17779>

23 months agodocs/ci: fix Emma's name
Eric Engestrom [Thu, 28 Jul 2022 16:39:40 +0000 (17:39 +0100)]
docs/ci: fix Emma's name

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17795>

23 months agozink: print result code string on vulkan failure
TSnake41 [Thu, 28 Jul 2022 16:05:21 +0000 (18:05 +0200)]
zink: print result code string on vulkan failure

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

23 months agor600: Don't set TES_EVAL UCP dirty when it is not supported
Gert Wollny [Thu, 28 Jul 2022 15:28:35 +0000 (17:28 +0200)]
r600: Don't set TES_EVAL UCP dirty when it is not supported

Fixes: 3340c7ce359252ad09b3e4d338837944482fb248
    r600/sfn: lower CLIPVERTEX to clip planes

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

23 months agov3dv: expose Vulkan 1.2
Iago Toral Quiroga [Wed, 11 May 2022 10:35:08 +0000 (12:35 +0200)]
v3dv: expose Vulkan 1.2

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

23 months agobroadcom/ci: update list of slow tests
Iago Toral Quiroga [Thu, 28 Jul 2022 10:49:59 +0000 (12:49 +0200)]
broadcom/ci: update list of slow tests

These showed up in some runs for me.

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

23 months agov3dv: enable missing mandatory Vulkan 1.2 features
Iago Toral Quiroga [Thu, 12 May 2022 06:25:05 +0000 (08:25 +0200)]
v3dv: enable missing mandatory Vulkan 1.2 features

For some reason the Vulkan spec required that these features must be
supported even though they only affect features that are optional
in Vulkan 1.2 and that we don't support, so enabling them doesn't
have any practical implications for us.

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

23 months agov3dv: enable missing Vulkan 1.2 features for supported extensions
Iago Toral Quiroga [Wed, 11 May 2022 12:01:28 +0000 (14:01 +0200)]
v3dv: enable missing Vulkan 1.2 features for supported extensions

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

23 months agov3dv: fill in Vulkan 1.2 missing device properties
Iago Toral Quiroga [Wed, 11 May 2022 12:11:39 +0000 (14:11 +0200)]
v3dv: fill in Vulkan 1.2 missing device properties

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

23 months agov3dv: explicitly set sampler min/max filter properties to false
Iago Toral Quiroga [Wed, 11 May 2022 10:33:11 +0000 (12:33 +0200)]
v3dv: explicitly set sampler min/max filter properties to false

Our hardware doesn't support min/max filtering.

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

23 months agodocs/features.txt: mark VK_ANDROID_native_buffer as supported on v3dv
Eric Engestrom [Wed, 27 Jul 2022 13:33:21 +0000 (14:33 +0100)]
docs/features.txt: mark VK_ANDROID_native_buffer as supported on v3dv

Fixes: 2686c5419d67aab365c8 ("v3dv: add Android support")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17767>

23 months agodocs/features.txt: mark VK_ANDROID_native_buffer as supported on turnip
Eric Engestrom [Wed, 27 Jul 2022 13:38:39 +0000 (14:38 +0100)]
docs/features.txt: mark VK_ANDROID_native_buffer as supported on turnip

Fixes: 5789505ab3b62e40fb30 ("turnip: Make Android platform build")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17767>

23 months agonouveau: use existing list_first_entry() macro instead of re-writing it
Eric Engestrom [Wed, 27 Jul 2022 15:49:18 +0000 (16:49 +0100)]
nouveau: use existing list_first_entry() macro instead of re-writing it

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

23 months agoutil/list: rename LIST_ENTRY() to list_entry()
Eric Engestrom [Wed, 27 Jul 2022 15:48:11 +0000 (16:48 +0100)]
util/list: rename LIST_ENTRY() to list_entry()

This follows the Linux kernel convention, and avoids collision with
macOS header macro.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6751
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6840
Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17772>

23 months agoturnip: Simple breadcrumbs implementation to debug hangs
Danylo Piliaiev [Fri, 18 Mar 2022 11:47:24 +0000 (13:47 +0200)]
turnip: Simple breadcrumbs implementation to debug hangs

A simple implementations of breadcrumbs tracking of GPU progress
intended to be the last resort when debugging unrecoverable hangs.
For best results use Vulkan traces to have a predictable place of hang.

Requires compilation with TU_BREADCRUMBS_ENABLED=1. See tu_cs_breadcrumbs.c
for details on how to use this feature.

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

23 months agoutil/u_threaded: fix a CPU storage crash due to an invalid codepath taken
Marek Olšák [Fri, 15 Jul 2022 11:31:49 +0000 (07:31 -0400)]
util/u_threaded: fix a CPU storage crash due to an invalid codepath taken

Fixes: 3df9d8ed807 - gallium/u_threaded: implement pipelined partial buffer uploads using CPU storage

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6837
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6594
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6613

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

23 months agolavapipe: enable VK_EXT_depth_range_unrestricted.
Dave Airlie [Mon, 18 Jul 2022 06:04:17 +0000 (16:04 +1000)]
lavapipe: enable VK_EXT_depth_range_unrestricted.

This passes all the VK CTS tests.

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

23 months agollvmpipe/fs: handle unrestricted depth values.
Dave Airlie [Tue, 19 Jul 2022 04:41:01 +0000 (14:41 +1000)]
llvmpipe/fs: handle unrestricted depth values.

It moves the explicit clamping of incoming Z from vertex stages
after interp, to the depth clamp function.

It adds support to the depth clamp function to restrict incoming
Z values to 0..1 range.

It fixes the depth test conversions to allow unrestricted depth
values.

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

23 months agoutil/pack_color: clamp depth values outside range for unorm formats.
Dave Airlie [Mon, 18 Jul 2022 01:30:31 +0000 (11:30 +1000)]
util/pack_color: clamp depth values outside range for unorm formats.

For unrestricted depth ranges, depth clear values for unorm buffers
need to be explicitly clamped. However this has to happen in the
driver when we know the depth buffer format, not at the API level.

Just add clamps to the non-f32 cases and separate it out.

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

23 months agomesa/st: disable unrestricted fragment depth values for GL/GLES
Dave Airlie [Tue, 19 Jul 2022 05:15:03 +0000 (15:15 +1000)]
mesa/st: disable unrestricted fragment depth values for GL/GLES

GLES always clamps for 32-bit float buffers, GL doesn't require
it but setting this per API causes virgl to fail some tests.

To fix is properly we'd need to introduce a CAP to expose
this between host/guest.

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

23 months agogallium: add a rasterizer state bit for unrestricted depth values.
Dave Airlie [Tue, 19 Jul 2022 05:14:06 +0000 (15:14 +1000)]
gallium: add a rasterizer state bit for unrestricted depth values.

This tells the drivers to expect depth values outside the 0..1 range.

This is used for support VK_EXT_depth_range_unrestricted, but could
also be used for GL_NV_depth_buffer_float in GL.

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

23 months agollvmpipe: Allocate scene tiles dynamically
Dave Airlie [Fri, 1 May 2020 03:31:57 +0000 (13:31 +1000)]
llvmpipe: Allocate scene tiles dynamically

If you allocate this statically it's 1.5MB because the framebuffer might
be 16k x 16k, that's excessive.

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

23 months agollvmpipe: Indentation fix
Adam Jackson [Tue, 26 Jul 2022 18:13:04 +0000 (14:13 -0400)]
llvmpipe: Indentation fix

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

23 months agoutil: add reallocarray wrapper for win32
Dave Airlie [Wed, 27 Jul 2022 21:00:07 +0000 (07:00 +1000)]
util: add reallocarray wrapper for win32

Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17746>

23 months agollvmpipe: add some const qualifiers in lp_rast_linear_fallback.c
Brian Paul [Tue, 21 Jun 2022 20:47:12 +0000 (14:47 -0600)]
llvmpipe: add some const qualifiers in lp_rast_linear_fallback.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: tighten up some code in lp_rast_linear_fallback.c
Brian Paul [Tue, 21 Jun 2022 20:45:58 +0000 (14:45 -0600)]
llvmpipe: tighten up some code in lp_rast_linear_fallback.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: consolidate code in lp_rast_linear_fallback.c
Brian Paul [Mon, 18 Jul 2022 16:12:50 +0000 (10:12 -0600)]
llvmpipe: consolidate code in lp_rast_linear_fallback.c

Combine shade_quads_all() and shade_quads_mask() into new
shade_quads() function which takes a mask parameter.  It calls either
jit_function[RAST_WHOLE] or jit_function[RAST_EDGE_TEST] depending on
the mask argument.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: remove unneeded casts in lp_rast_linear_fallback.c
Brian Paul [Mon, 18 Jul 2022 16:10:29 +0000 (10:10 -0600)]
llvmpipe: remove unneeded casts in lp_rast_linear_fallback.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: asst. clean-up in lp_rast_linear_fallback.c
Brian Paul [Mon, 20 Jun 2022 20:43:01 +0000 (14:43 -0600)]
llvmpipe: asst. clean-up in lp_rast_linear_fallback.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: pass frontfacing param to jit_function() call
Brian Paul [Mon, 20 Jun 2022 19:57:22 +0000 (13:57 -0600)]
llvmpipe: pass frontfacing param to jit_function() call

Instead of 1, in shade_quads_all() and shade_quads_mask().  This fixes
a VMware test (dx10-is-front-face)

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: minor whitespace clean-up in lp_state_fs.h
Brian Paul [Thu, 14 Jul 2022 03:40:00 +0000 (21:40 -0600)]
llvmpipe: minor whitespace clean-up in lp_state_fs.h

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: make opaque field a 1-bit field
Brian Paul [Fri, 15 Jul 2022 14:43:07 +0000 (08:43 -0600)]
llvmpipe: make opaque field a 1-bit field

Reduces sizeof(lp_fragment_shader_variant) from 296 to 288 bytes.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agogallivm: rename 'var' param in emit_store_reg(), emit_store_var().
Brian Paul [Thu, 7 Jul 2022 21:04:35 +0000 (15:04 -0600)]
gallivm: rename 'var' param in emit_store_reg(), emit_store_var().

Rename 'dst' param' to 'vals'.  This parameter contains the values
which we're storing.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agogallivm: fix incorrect memset() in SOA emit_load_const()
Brian Paul [Tue, 5 Jul 2022 22:42:20 +0000 (16:42 -0600)]
gallivm: fix incorrect memset() in SOA emit_load_const()

The memset() call to zero-out the unused elements of outval[] used
the wrong bytecount.  Just replace it with a simpler for loop.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agogallivm: simplify shuffling in emit_store_reg()
Brian Paul [Tue, 5 Jul 2022 22:34:39 +0000 (16:34 -0600)]
gallivm: simplify shuffling in emit_store_reg()

The writemask can be implemented with just one llvm vector shuffle.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agogallivm: asst. clean-ups in lp_bld_swizzle.c
Brian Paul [Thu, 23 Jun 2022 04:07:12 +0000 (22:07 -0600)]
gallivm: asst. clean-ups in lp_bld_swizzle.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: replace 'unsigned' with enum types
Brian Paul [Wed, 22 Jun 2022 18:42:38 +0000 (12:42 -0600)]
llvmpipe: replace 'unsigned' with enum types

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: remove unneeded casts
Brian Paul [Wed, 22 Jun 2022 18:41:59 +0000 (12:41 -0600)]
llvmpipe: remove unneeded casts

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: asst. clean-ups in lp_state_setup.c
Brian Paul [Wed, 22 Jun 2022 18:41:18 +0000 (12:41 -0600)]
llvmpipe: asst. clean-ups in lp_state_setup.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: minor optimization in lp_linear_init_interp()
Brian Paul [Wed, 22 Jun 2022 18:29:24 +0000 (12:29 -0600)]
llvmpipe: minor optimization in lp_linear_init_interp()

Skip multiplying by 1/w when it's 1.0.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: asst. clean-ups in lp_linear_interp.c
Brian Paul [Wed, 22 Jun 2022 18:27:44 +0000 (12:27 -0600)]
llvmpipe: asst. clean-ups in lp_linear_interp.c

Comments, move var decls, fix code formatting.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agogallivm: asst. clean-ups in lp_bld_const.c
Brian Paul [Wed, 22 Jun 2022 15:57:47 +0000 (09:57 -0600)]
gallivm: asst. clean-ups in lp_bld_const.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: asst. clean-ups in lp_setup_rect.c
Brian Paul [Tue, 21 Jun 2022 21:13:49 +0000 (15:13 -0600)]
llvmpipe: asst. clean-ups in lp_setup_rect.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: minor white-space clean-up in lp_setup.h
Brian Paul [Tue, 21 Jun 2022 21:07:45 +0000 (15:07 -0600)]
llvmpipe: minor white-space clean-up in lp_setup.h

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agollvmpipe: asst. clean-up in lp_bld_depth.c
Brian Paul [Mon, 20 Jun 2022 20:42:21 +0000 (14:42 -0600)]
llvmpipe: asst. clean-up in lp_bld_depth.c

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17561>

23 months agomailmap: fix order of emails for Axel Davy
David Heidelberg [Wed, 27 Jul 2022 20:12:07 +0000 (22:12 +0200)]
mailmap: fix order of emails for Axel Davy

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>

23 months agonine: char can be unsigned on non-x86 platforms
David Heidelberg [Thu, 21 Jul 2022 21:43:07 +0000 (23:43 +0200)]
nine: char can be unsigned on non-x86 platforms

Keep sign by using int8_t to get the same result on non-x86 machines.

Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17698>

23 months agonine: Only enable thread_submit by default on x86
Icecream95 [Thu, 15 Jul 2021 02:30:53 +0000 (14:30 +1200)]
nine: Only enable thread_submit by default on x86

Possibly the bug breaking this is in box86, but given that there
aren't a whole lot of other reasons to be using Nine with a non-x86
Mesa, disable the feature unless we are running on x86.

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

23 months agonine: Make vdecl_index_map always signed
Icecream95 [Sun, 18 Oct 2020 11:36:10 +0000 (00:36 +1300)]
nine: Make vdecl_index_map always signed

vdecl_index_map needs to be able to store negative values, but char is
not signed on all platforms, so change it to int8_t.

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

23 months agozink/llvmpipe/ci: skip broken CTS ballot test.
Dave Airlie [Mon, 18 Jul 2022 06:36:55 +0000 (16:36 +1000)]
zink/llvmpipe/ci: skip broken CTS ballot test.

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

23 months agozink: fixup subgroup vote/ballot enables.
Dave Airlie [Mon, 18 Jul 2022 04:15:41 +0000 (14:15 +1000)]
zink: fixup subgroup vote/ballot enables.

These are part of vulkan 1.1, but the ext are if you don't have 1.1.

This will enable some tests that break in CI

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