platform/upstream/mesa.git
2 years agozink: Replace the "optimal_tiling" flag with a "linear" flag instead.
Emma Anholt [Tue, 26 Jul 2022 23:52:20 +0000 (16:52 -0700)]
zink: Replace the "optimal_tiling" flag with a "linear" flag instead.

That's what it actually means now.

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

2 years agozink: Take the tiling path for resources with modifiers.
Emma Anholt [Wed, 27 Jul 2022 18:59:22 +0000 (11:59 -0700)]
zink: Take the tiling path for resources with modifiers.

transfer_map (the only consumer of the flag now) was doing direct mapping
on resources with modifiers (UBWC compressed images on turnip) and
accessing them as linear.  We definitely want the staging blit path
instead.

Fixes glReadPixels() from gbm surfaces on turnip.

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

2 years agoutil/memstream: insert null terminator on windows
Karol Herbst [Thu, 4 Aug 2022 11:13:16 +0000 (13:13 +0200)]
util/memstream: insert null terminator on windows

Libc's open_memstream is doing so on Unix systems already.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agogallium: mark the input data as const in pipe_grid_info
Karol Herbst [Fri, 1 Jul 2022 12:40:33 +0000 (14:40 +0200)]
gallium: mark the input data as const in pipe_grid_info

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agovtn: silence warning about linkage
Karol Herbst [Tue, 3 May 2022 23:08:58 +0000 (01:08 +0200)]
vtn: silence warning about linkage

For OpenCL kernels we simply link together SPIR-V files, so the only case
where we are left with linking shaders together is libclc and we handle
that just fine.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agoclc: undefine spirv defs to work around LLVMs headers
Karol Herbst [Thu, 12 May 2022 21:57:24 +0000 (23:57 +0200)]
clc: undefine spirv defs to work around LLVMs headers

Clang unconditionally adds those definitions if using a spirv LLVM target.

That's not a problem on its own, but clang's internal OpenCL header enable
a bunch of OpenCL extensions if those are set.

Lucky for us, we can simply undefine them and spare us the trouble of
finding an upstream solution to this problem :)

This fixes the OpenCL CTS' compiler features_macro test.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agomicrosoft/clc: drop inline sampler reordering
Karol Herbst [Wed, 3 Aug 2022 17:20:35 +0000 (19:20 +0200)]
microsoft/clc: drop inline sampler reordering

nir_dedup_inline_samplers is now taking care of it.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agonir: Clean up and improve nir_dedup_inline_samplers
Jason Ekstrand [Fri, 15 Jul 2022 14:35:55 +0000 (16:35 +0200)]
nir: Clean up and improve nir_dedup_inline_samplers

It now removes dead inline sampler variables and moves everything to the
end so we no longer need nir_move_inline_samplers_to_end().

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

2 years agonir: extract the clc inline sampler dedup pass from clc
Karol Herbst [Fri, 1 Jul 2022 12:38:11 +0000 (14:38 +0200)]
nir: extract the clc inline sampler dedup pass from clc

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agonir/lower_images: extract from clover
Karol Herbst [Sat, 2 Jul 2022 16:50:55 +0000 (18:50 +0200)]
nir/lower_images: extract from clover

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agonir: serialize printf metadata for CL kernels
Karol Herbst [Fri, 1 Jul 2022 12:35:23 +0000 (14:35 +0200)]
nir: serialize printf metadata for CL kernels

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agoprintf: add some unit tests
Karol Herbst [Tue, 2 Aug 2022 20:15:19 +0000 (22:15 +0200)]
printf: add some unit tests

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agoprintf: extract clovers printf impl
Karol Herbst [Sat, 16 Apr 2022 08:48:08 +0000 (10:48 +0200)]
printf: extract clovers printf impl

Also make the code cleaner and simplier.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

2 years agoci/bin: ignore Gitlab GQL cache
David Heidelberg [Thu, 4 Aug 2022 14:22:17 +0000 (16:22 +0200)]
ci/bin: ignore Gitlab GQL cache

Fixes: 266e3a627fbf ("ci/bin: Cache GQL queries")

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

2 years agoradv/nir_lower_abi: Use instructions_pass
Konstantin Seurer [Sat, 23 Jul 2022 21:23:55 +0000 (23:23 +0200)]
radv/nir_lower_abi: Use instructions_pass

nir_shader_instructions_pass is sufficient and it should be a bit faster
than nir_shader_lower_instructions.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17727>

2 years agomeson: Cleanup usage dri_drivers as it's a dead option
Yonggang Luo [Sat, 30 Jul 2022 19:13:52 +0000 (03:13 +0800)]
meson: Cleanup usage dri_drivers as it's a dead option

Initial value of with_dri have no relation with dri_drivers.length()
Do not show useless `DRI drivers:`

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

2 years agomeson: Place all pre_args about HAVE_DRI* into single place
Yonggang Luo [Sat, 30 Jul 2022 19:08:27 +0000 (03:08 +0800)]
meson: Place all pre_args about HAVE_DRI* into single place

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

2 years agodocs: update calendar for 22.2.0-rc1
Dylan Baker [Thu, 4 Aug 2022 17:34:36 +0000 (10:34 -0700)]
docs: update calendar for 22.2.0-rc1

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

2 years agodocs: update calendar and link releases notes for 22.1.5
Dylan Baker [Thu, 4 Aug 2022 17:34:05 +0000 (10:34 -0700)]
docs: update calendar and link releases notes for 22.1.5

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

2 years agodocs: update calendar and link releases notes for 22.1.4
Dylan Baker [Thu, 4 Aug 2022 17:34:03 +0000 (10:34 -0700)]
docs: update calendar and link releases notes for 22.1.4

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

2 years agodocs: Add sha256 sum for 22.1.4
Dylan Baker [Wed, 3 Aug 2022 21:07:57 +0000 (14:07 -0700)]
docs: Add sha256 sum for 22.1.4

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

2 years agodocs: add release notes for 22.1.4
Dylan Baker [Fri, 15 Jul 2022 17:42:47 +0000 (10:42 -0700)]
docs: add release notes for 22.1.4

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

2 years agodocs: Add sha256 sum for 22.1.5
Dylan Baker [Wed, 3 Aug 2022 21:44:59 +0000 (14:44 -0700)]
docs: Add sha256 sum for 22.1.5

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

2 years agodocs: add release notes for 22.1.5
Dylan Baker [Wed, 3 Aug 2022 21:13:26 +0000 (14:13 -0700)]
docs: add release notes for 22.1.5

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

2 years agoutil/disk_cache: Add new mesa-db cache type
Dmitry Osipenko [Mon, 13 Jun 2022 16:31:20 +0000 (19:31 +0300)]
util/disk_cache: Add new mesa-db cache type

Introduce new cache type, the Mesa-DB. This is a single-file read/write
cache that is based on the read-only Fossilize DB cache. Mesa-DB supports
cache size capping. It's a much more efficient cache than the multi-file
cache because Mesa-DB doesn't have the inode overhead. The plan is to make
Mesa-DB the default cache implementation once it will be deemed as stable
and well tested. For now users have to set the new MESA_DISK_CACHE_DATABASE
environment variable in order to active the Mesa-DB cache.

Mesa-DB cache is resilient to corrupted cache files and doesn't require
maintenance from users and developers. The size capping is implemented
by evicting least recently used cache items and compacting the cache
database files with the evicted entries. In order to prevent frequent
compaction of the cache, at minimum a half of cache is evicted when cache
is full.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Make disk_cache_os.h usable by C++ code
Dmitry Osipenko [Mon, 27 Jun 2022 17:00:56 +0000 (20:00 +0300)]
util/disk_cache: Make disk_cache_os.h usable by C++ code

The cache tests are written in C++ and the upcoming new Mese-DB cache
tests will need to include disk_cache_os.h that misses extern "C"
modifier required by C++ linkage. Add the modifier.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Move struct cache_entry_file_data to the disk_cache_os.h
Dmitry Osipenko [Mon, 27 Jun 2022 16:52:28 +0000 (19:52 +0300)]
util/disk_cache: Move struct cache_entry_file_data to the disk_cache_os.h

Relocate struct cache_entry_file_data to the header file, making it
accessible to the cache testing code. This is a preparatory step towards
addition of the new Mesa-DB cache type.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Append to disk_cache_load_cache_index() with _foz
Dmitry Osipenko [Mon, 27 Jun 2022 16:48:21 +0000 (19:48 +0300)]
util/disk_cache: Append to disk_cache_load_cache_index() with _foz

The disk_cache_load_cache_index() is solely about the foz-db cache and
we're going to add the new cache type. Append the function name with
_foz postfix to improve the naming, making clear what that function is
about.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Enable testing of uncompressed caches
Dmitry Osipenko [Mon, 27 Jun 2022 16:29:00 +0000 (19:29 +0300)]
util/disk_cache: Enable testing of uncompressed caches

Mesa caches are compressed by default and we just added option to disable
compression that will be needed by the new Mesa-DB cache. Let's enable
testing of uncompressed caches for the multi-file and foz-db caches in
addition to the compressed to increase test coverage of the new code.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoutil/disk_cache: Add option to disable compression
Dmitry Osipenko [Mon, 13 Jun 2022 15:59:57 +0000 (18:59 +0300)]
util/disk_cache: Add option to disable compression

The shader cache files produced by multi-file cache have a minimum size
limitation imposed by filesystem, usually it's 4KB. In order to make
cache tests suitable for a single file caches, we need to bypass the data
compression, making size of written out data determined for the eviction
testing.

The disk_cache_create() now checks whether driver_id name is set to
"make_check_uncompressed" in order to disable cache data compression.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16888>

2 years agoci: Add vulkan dEQP tests for venus
Omar Akkila [Mon, 25 Oct 2021 07:29:07 +0000 (09:29 +0200)]
ci: Add vulkan dEQP tests for venus

Co-authored-by: Corentin Noël <corentin.noel@collabora.com>
Signed-off-by: Omar Akkila <omar.akkila@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15692>

2 years agoci: Enable virtio-experimental in testing
Omar Akkila [Fri, 30 Jul 2021 12:48:43 +0000 (14:48 +0200)]
ci: Enable virtio-experimental in testing

Enable building the virtio vulkan (venus) driver.

Co-authored-by: Corentin Noël <corentin.noel@collabora.com>
Signed-off-by: Omar Akkila <omar.akkila@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15692>

2 years agoci: Build crosvm with opaque fd mapping support
Omar Akkila [Sat, 29 Jan 2022 22:19:55 +0000 (17:19 -0500)]
ci: Build crosvm with opaque fd mapping support

This enables crosvm to map opaque-fd-backed external memory
into the guest.

Signed-off-by: Omar Akkila <omar.akkila@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15692>

2 years agoci: Move crosvm to the base test image
Omar Akkila [Fri, 22 Oct 2021 12:34:59 +0000 (14:34 +0200)]
ci: Move crosvm to the base test image

This allows crosvm to be used in the test-gl and test-vk images

Co-authored-by: Corentin Noël <corentin.noel@collabora.com>
Signed-off-by: Omar Akkila <omar.akkila@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15692>

2 years agoci: Merge common builds in debian test jobs
Omar Akkila [Wed, 28 Jul 2021 15:42:33 +0000 (17:42 +0200)]
ci: Merge common builds in debian test jobs

Co-authored-by: Corentin Noël <corentin.noel@colabora.com>
Signed-off-by: Omar Akkila <omar.akkila@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15692>

2 years agotgsi_to_nir: handle compact arrays for clipdistance
Mike Blumenkrantz [Wed, 3 Aug 2022 21:12:32 +0000 (17:12 -0400)]
tgsi_to_nir: handle compact arrays for clipdistance

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

2 years agotgsi_to_nir: fix clipdistance store writemask
Mike Blumenkrantz [Wed, 27 Jul 2022 18:10:27 +0000 (14:10 -0400)]
tgsi_to_nir: fix clipdistance store writemask

this shouldn't be writing undefs to pad out the clipdistance vec4,
it should just be doing the writes using the mask of the array size

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

2 years agoci: replace gzip usage with zstd where posible
David Heidelberg [Wed, 27 Jul 2022 23:19:21 +0000 (01:19 +0200)]
ci: replace gzip usage with zstd where posible

v2: added missing zstd to arm_build.sh

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17776>

2 years agoci: compress LAVA rootfs with zstd instead of gzip
David Heidelberg [Wed, 27 Jul 2022 11:57:42 +0000 (13:57 +0200)]
ci: compress LAVA rootfs with zstd instead of gzip

Visible size reduction and minor performance improvement at no cost.

rootfs measure:

```
2022-07-27 11:15:16.235268: 475MB downloaded in 111.59s (4.26MB/s)
2022-07-27 15:07:40.984857: 425MB downloaded in 85.57s (4.97MB/s)
```

So let say approx. 95s vs 85s if we assume 5MB/s, which can bring us
10s speedup...

Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17776>

2 years agovc4/simulator: use i915/amd ioctls for BO
Juan A. Suarez Romero [Wed, 3 Aug 2022 11:07:56 +0000 (13:07 +0200)]
vc4/simulator: use i915/amd ioctls for BO

So far we create dumb buffers to emulate the ioctls in VC4, but these
doesn't work when using an Intel or AMD GPUs.

As in the case of V3D, let's use specific ioctls for these cases.

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

2 years agopvr: get free list min size from the runtime info
Frank Binns [Thu, 28 Jul 2022 09:23:54 +0000 (10:23 +0100)]
pvr: get free list min size from the runtime info

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17850>

2 years agogallium: use gl shader types as the basis for the gallium ones
Dave Airlie [Tue, 26 Jul 2022 03:39:00 +0000 (13:39 +1000)]
gallium: use gl shader types as the basis for the gallium ones

This should enable a rename transistion.

Trace needs to swap over to a non-generated version, but that should be fine.

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

2 years agogallium: fixup some inconsistent uses of enum pipe_shader_type.
Dave Airlie [Tue, 26 Jul 2022 04:10:30 +0000 (14:10 +1000)]
gallium: fixup some inconsistent uses of enum pipe_shader_type.

These should be the enum not unsigned.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> (panfrost)
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com> (v3d)
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17747>

2 years agogallium/iris/crocus: collapse a bunch of conversion functions.
Dave Airlie [Mon, 25 Jul 2022 22:33:50 +0000 (08:33 +1000)]
gallium/iris/crocus: collapse a bunch of conversion functions.

Add some static asserts.

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

2 years agogallium/tgsi: reorder pipe shader type defines.
Dave Airlie [Mon, 25 Jul 2022 22:16:00 +0000 (08:16 +1000)]
gallium/tgsi: reorder pipe shader type defines.

Line these up with Mesa, prepare for fallout.

zink: the one where Mike gets overfriendly with enum layouts.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17747>

2 years agosvga: compare shader type against compute not tess eval.
Dave Airlie [Mon, 25 Jul 2022 22:51:20 +0000 (08:51 +1000)]
svga: compare shader type against compute not tess eval.

To get all graphics stages compare < COMPUTE not <= TESS_EVAL
should make it more robust against reordering.

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

2 years agovirgl: abstract virgl shader stages from pipe shader stages.
Dave Airlie [Mon, 25 Jul 2022 22:13:06 +0000 (08:13 +1000)]
virgl: abstract virgl shader stages from pipe shader stages.

If the gallium ones get reordered, add the abstraction to the virgl
wire types.

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

2 years agozink: add defines for the shader stage templates.
Dave Airlie [Mon, 25 Jul 2022 23:47:29 +0000 (09:47 +1000)]
zink: add defines for the shader stage templates.

This just allows fixing these up easier later.

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

2 years agollvmpipe/gallivm/draw: introduce a buffer type.
Dave Airlie [Thu, 28 Jul 2022 03:18:47 +0000 (13:18 +1000)]
llvmpipe/gallivm/draw: introduce a buffer type.

In order to do vulkan properly we need to move towards proper descriptor
based operations for the shader.

This is a bit of a precursor, this consolidates the ubo/ssbo stuff into
a buffer type and uses that in the backend.

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

2 years agodraw: fix up jit type creation for gs/tcs/tes
Dave Airlie [Fri, 29 Jul 2022 00:33:29 +0000 (10:33 +1000)]
draw: fix up jit type creation for gs/tcs/tes

These were using numbers instead of defines, which makes
reordering them harder.

This should have no functional differences.

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

2 years agolavapipe: enable shader clock
Dave Airlie [Tue, 6 Apr 2021 01:27:07 +0000 (11:27 +1000)]
lavapipe: enable shader clock

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

2 years agollvmpipe: add shader clock support
Dave Airlie [Tue, 6 Apr 2021 01:24:44 +0000 (11:24 +1000)]
llvmpipe: add shader clock support

Add support for calling out to the os time functions from the llvm side.

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

2 years agoMicrosoft clc: strip lib prefix
pal1000 [Tue, 2 Aug 2022 13:50:29 +0000 (16:50 +0300)]
Microsoft clc: strip lib prefix
Otherwise OpenCLon12 ICD can't load it

Ref: https://github.com/microsoft/OpenCLOn12/search?q=clon12compiler

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

2 years agod3d12/dzn/spirv2dxil: Require version library
pal1000 [Mon, 1 Aug 2022 16:14:19 +0000 (19:14 +0300)]
d3d12/dzn/spirv2dxil: Require version library

Fixes: b8328c9 ("microsoft/compiler: Blacklist DXIL validator 1.6 from 20348 SDK")

Closes: #6952

Closes: #6959

v2: Always lookup version library on Windows

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17837>

2 years agoci/bare-metal: Re-open serial and everything after test phase timeout.
Emma Anholt [Thu, 21 Jul 2022 18:18:20 +0000 (11:18 -0700)]
ci/bare-metal: Re-open serial and everything after test phase timeout.

If we got a "Reached the end of the CPU serial log without finding a
result" because the test phase timed out, then the CPU serial would have
been closed as part of the timeout process, so we need to close the rest
and re-instantiate the servo run class.

fastboot and poe already re-instantiate the class on retry.

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

2 years agozink: Advertise PIPE_CAP_NATIVE_FENCE_FD
Julia Tatz [Mon, 11 Jul 2022 22:44:16 +0000 (18:44 -0400)]
zink: Advertise PIPE_CAP_NATIVE_FENCE_FD

Enables EGL_ANDROID_native_fence_sync

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

2 years agozink: add a graphics pipeline library implementation
Mike Blumenkrantz [Thu, 23 Jun 2022 21:07:12 +0000 (17:07 -0400)]
zink: add a graphics pipeline library implementation

this is only for driver debugging/validation and will not
activate unless ZINK_PIPELINE_LIBRARY_FORCE=1 is specified since it
can only ever add overhead and slow things down

...for now

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

2 years agozink: set program pipeline array idx earlier in zink_get_gfx_pipeline
Mike Blumenkrantz [Thu, 23 Jun 2022 21:02:59 +0000 (17:02 -0400)]
zink: set program pipeline array idx earlier in zink_get_gfx_pipeline

no functional changes

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

2 years agozink: reorganize zink_gfx_pipeline_state a little
Mike Blumenkrantz [Thu, 23 Jun 2022 21:02:15 +0000 (17:02 -0400)]
zink: reorganize zink_gfx_pipeline_state a little

this is more optimal for library-based hashing

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

2 years agozink: break out program primtype->idx conversion function
Mike Blumenkrantz [Thu, 23 Jun 2022 21:00:18 +0000 (17:00 -0400)]
zink: break out program primtype->idx conversion function

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

2 years agozink: change zink_create_gfx_program signature
Mike Blumenkrantz [Thu, 23 Jun 2022 20:59:13 +0000 (16:59 -0400)]
zink: change zink_create_gfx_program signature

no functional changes

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

2 years agozink: hook up pipeline_library extensions
Mike Blumenkrantz [Tue, 10 May 2022 16:15:41 +0000 (12:15 -0400)]
zink: hook up pipeline_library extensions

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

2 years agozink: always set vertex dynamic states
Mike Blumenkrantz [Thu, 23 Jun 2022 19:13:56 +0000 (15:13 -0400)]
zink: always set vertex dynamic states

even if there are no bindings, this should be set in order to further
deduplicate the number of pipelines needed

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

2 years agozink: init cache_put program fence on program creation
Mike Blumenkrantz [Wed, 22 Jun 2022 21:32:42 +0000 (17:32 -0400)]
zink: init cache_put program fence on program creation

re-initializing here might overwrite an existing cache_put job

cc: mesa-stable

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

2 years agogallivm: fix printf hook for cached shaders.
Dave Airlie [Wed, 3 Aug 2022 04:50:19 +0000 (14:50 +1000)]
gallivm: fix printf hook for cached shaders.

I've noticed this before but never tracked it down, but it's annoying.

The printf hooks would crash with debug shaders when they were loaded
from the cache. This was because nothing was initing the printf hook
in the cached path so the global was never set.

No problems just always creating this afaics.

Fixes: 333ee94285ac ("gallivm: rework debug printf hook to use global mapping.")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17867>

2 years agoturnip: use SPDX-License-Identifier
Chia-I Wu [Mon, 1 Aug 2022 21:19:08 +0000 (14:19 -0700)]
turnip: use SPDX-License-Identifier

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

2 years agoturnip: remove headers from libtu_files
Chia-I Wu [Mon, 1 Aug 2022 21:39:07 +0000 (14:39 -0700)]
turnip: remove headers from libtu_files

meson can work out the dependencies.

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

2 years agoturnip: remove tu_private.h
Chia-I Wu [Sat, 30 Jul 2022 01:39:01 +0000 (18:39 -0700)]
turnip: remove tu_private.h

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

2 years agoturnip: move away from tu_private.h
Chia-I Wu [Sat, 30 Jul 2022 01:07:23 +0000 (18:07 -0700)]
turnip: move away from tu_private.h

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

2 years agoturnip: update tu_util.h
Chia-I Wu [Sat, 30 Jul 2022 01:02:08 +0000 (18:02 -0700)]
turnip: update tu_util.h

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

2 years agoturnip: add tu_android.h
Chia-I Wu [Sat, 30 Jul 2022 00:59:08 +0000 (17:59 -0700)]
turnip: add tu_android.h

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

2 years agoturnip: add tu_cmd_buffer.h
Chia-I Wu [Fri, 29 Jul 2022 21:06:04 +0000 (14:06 -0700)]
turnip: add tu_cmd_buffer.h

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

2 years agoturnip: add tu_device.h
Chia-I Wu [Fri, 29 Jul 2022 23:58:09 +0000 (16:58 -0700)]
turnip: add tu_device.h

Also drop unused

 - tu_instance_extension_supported
 - tu_physical_device_api_version
 - tu_physical_device_extension_supported
 - tu_device_submit_deferred_locked
 - tu_get_perftest_option_name

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

2 years agoturnip: update tu_autotune.h
Chia-I Wu [Sat, 30 Jul 2022 00:13:56 +0000 (17:13 -0700)]
turnip: update tu_autotune.h

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

2 years agoturnip: add tu_wsi.h
Chia-I Wu [Sat, 30 Jul 2022 00:05:23 +0000 (17:05 -0700)]
turnip: add tu_wsi.h

Also drop unused x11 and wayland type definitions.

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

2 years agoturnip: add tu_pass.h
Chia-I Wu [Fri, 29 Jul 2022 23:37:19 +0000 (16:37 -0700)]
turnip: add tu_pass.h

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

2 years agoturnip: add tu_lrz.h
Chia-I Wu [Fri, 29 Jul 2022 23:20:31 +0000 (16:20 -0700)]
turnip: add tu_lrz.h

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

2 years agoturnip: add tu_dynamic_rendering.h
Chia-I Wu [Fri, 29 Jul 2022 23:12:33 +0000 (16:12 -0700)]
turnip: add tu_dynamic_rendering.h

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

2 years agoturnip: add tu_clear_blit.h
Chia-I Wu [Fri, 29 Jul 2022 21:01:59 +0000 (14:01 -0700)]
turnip: add tu_clear_blit.h

Also drop unused tu_emit_load_gmem_attachment.

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

2 years agoturnip: add tu_pipeline.h
Chia-I Wu [Fri, 29 Jul 2022 21:51:25 +0000 (14:51 -0700)]
turnip: add tu_pipeline.h

Also drop unused tu_pipeline_key.

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

2 years agoturnip: add tu_shader.h
Chia-I Wu [Fri, 29 Jul 2022 21:54:20 +0000 (14:54 -0700)]
turnip: add tu_shader.h

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

2 years agoturnip: update tu_descriptor_set.h
Chia-I Wu [Fri, 29 Jul 2022 21:23:37 +0000 (14:23 -0700)]
turnip: update tu_descriptor_set.h

Also drop unused tu_descriptor_range.

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

2 years agoturnip: add tu_formats.h
Chia-I Wu [Fri, 29 Jul 2022 23:14:03 +0000 (16:14 -0700)]
turnip: add tu_formats.h

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

2 years agoturnip: add tu_image.h
Chia-I Wu [Fri, 29 Jul 2022 20:09:48 +0000 (13:09 -0700)]
turnip: add tu_image.h

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

2 years agoturnip: add tu_query.h
Chia-I Wu [Fri, 29 Jul 2022 20:04:31 +0000 (13:04 -0700)]
turnip: add tu_query.h

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

2 years agoturnip: update tu_cs.h
Chia-I Wu [Fri, 29 Jul 2022 22:22:30 +0000 (15:22 -0700)]
turnip: update tu_cs.h

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

2 years agoturnip: add tu_suballoc.h
Chia-I Wu [Fri, 29 Jul 2022 21:45:20 +0000 (14:45 -0700)]
turnip: add tu_suballoc.h

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

2 years agoturnip: add tu_drm.h
Chia-I Wu [Fri, 29 Jul 2022 21:34:13 +0000 (14:34 -0700)]
turnip: add tu_drm.h

Also define tu_syncobj_from_handle only when TU_USE_KGSL.

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

2 years agoturnip: remove includes that are already in tu_common.h
Chia-I Wu [Mon, 1 Aug 2022 20:03:30 +0000 (13:03 -0700)]
turnip: remove includes that are already in tu_common.h

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

2 years agoturnip: add tu_common.h as the common header
Chia-I Wu [Fri, 29 Jul 2022 19:08:38 +0000 (12:08 -0700)]
turnip: add tu_common.h as the common header

Move most includes and defines in tu_private.h to the new tu_common.h.

tu_common.h is a header that all other files include, mostly indirectly
through tu_private.h.  The only exceptions are tu_perfetto.h and
tu_tracepoints.h, because ir3 headers are not compatible with C++.

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

2 years agoanv: use nir_opt_uniform_access
Constantine Shablya [Sat, 16 Jul 2022 09:19:28 +0000 (12:19 +0300)]
anv: use nir_opt_uniform_access

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17558>

2 years agoradv: use nir_opt_uniform_access
Constantine Shablya [Fri, 15 Jul 2022 14:01:34 +0000 (17:01 +0300)]
radv: use nir_opt_uniform_access

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17558>

2 years agonir: add a pass to remove non-uniform access qualifier when the operands are uniform
Constantine Shablya [Fri, 15 Jul 2022 14:00:22 +0000 (17:00 +0300)]
nir: add a pass to remove non-uniform access qualifier when the operands are uniform

Signed-off-by: Constantine Shablya <constantine.shablya@collabora.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17558>

2 years agoci/bin: Print job needs DAG in ci_run_n_monitor
Guilherme Gallo [Tue, 2 Aug 2022 22:01:32 +0000 (19:01 -0300)]
ci/bin: Print job needs DAG in ci_run_n_monitor

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17791>

2 years agoci/bin: Cache GQL queries
Guilherme Gallo [Tue, 2 Aug 2022 21:06:34 +0000 (18:06 -0300)]
ci/bin: Cache GQL queries

To avoid abusing fd.o Gitlab instance, let's cache API queries that
should have the same response. This will speedup the use of the client
tools as well.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17791>

2 years agoci/bin: Add script to expand jobs manifest
Guilherme Gallo [Thu, 28 Jul 2022 13:36:38 +0000 (10:36 -0300)]
ci/bin: Add script to expand jobs manifest

Normally, Mesa devs bump into CI errors and need to replicate the CI job
environment locally, but that is not an easy task, since one needs to
find the merged YAML CI file from Gitlab interface.

As it can happen often, here is a script that use Gitlab's GraphQL and
finds all the variables set by it, alongside with the container image
used to run it and the script that it will run.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17791>

2 years agoci/bin: Make ci_run_n_monitor finds dependencies automatically
Guilherme Gallo [Fri, 15 Jul 2022 21:17:02 +0000 (18:17 -0300)]
ci/bin: Make ci_run_n_monitor finds dependencies automatically

Use the GraphQL util to find dependencies accurately saving up time for
both developers and runners.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17791>

2 years agoci/bin: Sort imports from ci_run_n_monitor.py
Guilherme Gallo [Fri, 15 Jul 2022 21:15:52 +0000 (18:15 -0300)]
ci/bin: Sort imports from ci_run_n_monitor.py

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17791>

2 years agoci/bin: Add utility to find jobs dependencies
Guilherme Gallo [Fri, 15 Jul 2022 21:13:00 +0000 (18:13 -0300)]
ci/bin: Add utility to find jobs dependencies

Use GraphQL API from Gitlab to find jobs dependencies in a pipeline.
E.g: Find all dependencies for jobs starting with "iris-"

```sh
.gitlab-ci/bin/gitlab_gql.py --sha $(git -C ../mesa-fast-fix rev-parse HEAD) --print-dag --regex "iris-.*"
```

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17791>

2 years agoci/lava: Add timeout header info for LAVA GL Sections
Guilherme Gallo [Wed, 20 Jul 2022 23:00:08 +0000 (20:00 -0300)]
ci/lava: Add timeout header info for LAVA GL Sections

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17703>