platform/upstream/mesa.git
23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months 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>

23 months agoci/lava: Customise sections timeouts via envvars
Guilherme Gallo [Wed, 20 Jul 2022 22:51:48 +0000 (19:51 -0300)]
ci/lava: Customise sections timeouts via envvars

Refer to environment variables before falling back to the default
timeouts for each Gitlab section.

This makes more explicit in the job definition that there is a
particular case where the job may obey different timeouts.

Closes: #6908

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

23 months agovulkan: extend ALLOWED_ANDROID_VERSION up to api level 31
Chia-I Wu [Wed, 13 Jul 2022 18:02:26 +0000 (11:02 -0700)]
vulkan: extend ALLOWED_ANDROID_VERSION up to api level 31

Compiled from the extension lists on android11-tests-release and
android12-tests-release branches.

v2: remove VK_EXT_color_write_enable that slipped in

Reviewed-by: Emma Anholt <emma@anholt.net> (v1)
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17526>

23 months agovulkan: fix ALLOWED_ANDROID_VERSION up to api level 29
Chia-I Wu [Wed, 13 Jul 2022 17:50:38 +0000 (10:50 -0700)]
vulkan: fix ALLOWED_ANDROID_VERSION up to api level 29

Compiled from the extension lists on oreo-mr1-cts-release,
pie-cts-release, and android10-tests-release branches.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17526>

23 months agovulkan: fix ALLOWED_ANDROID_VERSION for api level 26
Chia-I Wu [Wed, 13 Jul 2022 17:44:49 +0000 (10:44 -0700)]
vulkan: fix ALLOWED_ANDROID_VERSION for api level 26

I mainly wanted to document that the list is compiled from
dEQP-VK.info.device_extensions and
dEQP-VK.api.info.android.no_unknown_extensions on various Android CTS
release branches.  But then I noticed that some extensions should have
api level 26.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17526>

23 months agovulkan: sort ALLOWED_ANDROID_VERSION by api levels
Chia-I Wu [Wed, 13 Jul 2022 17:39:35 +0000 (10:39 -0700)]
vulkan: sort ALLOWED_ANDROID_VERSION by api levels

v2: fix ordering of VK_KHR_driver_properties

Reviewed-by: Emma Anholt <emma@anholt.net> (v1)
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17526>

23 months agobin/gen_release_notes.py: bump advertised vulkan version to 1.3
Eric Engestrom [Tue, 26 Jul 2022 21:16:42 +0000 (22:16 +0100)]
bin/gen_release_notes.py: bump advertised vulkan version to 1.3

Fixes: df8ac77af8093c87d5d5 ("anv: Advertise Vulkan 1.3")
Fixes: 08c6f437cf63234f4a5d ("radv: advertise Vulkan 1.3")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17759>

23 months agoradeonsi: implement a non-scaled compute blit+resolve and use it on gfx11
Marek Olšák [Tue, 19 Jul 2022 09:08:23 +0000 (05:08 -0400)]
radeonsi: implement a non-scaled compute blit+resolve and use it on gfx11

This was written from scratch. Only a few pieces were taken from Indrajit's
code. This is also much simpler, and hopefully easier to review. For example,
out-of-bounds coordinates are handled trivially.

The new blit test proves that this is identical to u_blitter except for
a few precision differences (NaNs, sRGB) where the compute blit should be
more precise.

This is only enabled on gfx11 because it's slower than the gfx blit on gfx10.

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

23 months agoac/llvm: remove all resinfo code now that it's lowered
Marek Olšák [Sun, 17 Jul 2022 16:35:42 +0000 (12:35 -0400)]
ac/llvm: remove all resinfo code now that it's lowered

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

23 months agoradeonsi,radv: run ac_nir_lower_resinfo
Marek Olšák [Thu, 21 Jul 2022 13:48:29 +0000 (09:48 -0400)]
radeonsi,radv: run ac_nir_lower_resinfo

Emulating image_get_resinfo should be faster than using the hw.

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

23 months agoac/nir: add ac_nir_lower_resinfo
Marek Olšák [Wed, 20 Jul 2022 15:23:26 +0000 (11:23 -0400)]
ac/nir: add ac_nir_lower_resinfo

Emulating image_get_resinfo should be faster than using the hw.

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

23 months agoac/llvm: implement nir_texop_descriptor_amd
Marek Olšák [Thu, 21 Jul 2022 02:56:23 +0000 (22:56 -0400)]
ac/llvm: implement nir_texop_descriptor_amd

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

23 months agoac/llvm: implement nir_intrinsic_image_deref_descriptor_amd
Marek Olšák [Wed, 20 Jul 2022 11:55:11 +0000 (07:55 -0400)]
ac/llvm: implement nir_intrinsic_image_deref_descriptor_amd

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

23 months agoac/llvm: implement nir_intrinsic_image_deref_samples_identical
Marek Olšák [Tue, 19 Jul 2022 06:08:33 +0000 (02:08 -0400)]
ac/llvm: implement nir_intrinsic_image_deref_samples_identical

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

23 months agonir: add shader_info::uses_resource_info_query for txs, levels, samples, etc.
Marek Olšák [Thu, 21 Jul 2022 13:31:38 +0000 (09:31 -0400)]
nir: add shader_info::uses_resource_info_query for txs, levels, samples, etc.

AMD will use this to execute a lowering pass conditionally.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17693>

23 months agonir: add nir_texop_descriptor_amd
Marek Olšák [Thu, 21 Jul 2022 02:55:04 +0000 (22:55 -0400)]
nir: add nir_texop_descriptor_amd

AMD will use it to emulate resinfo.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17693>

23 months agonir: add nir_intrinsic_image_descriptor_amd
Marek Olšák [Wed, 20 Jul 2022 11:55:04 +0000 (07:55 -0400)]
nir: add nir_intrinsic_image_descriptor_amd

This returns the AMD shader resource descriptor.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17693>

23 months agonir: add nir_intrinsic_image_samples_identical
Marek Olšák [Tue, 19 Jul 2022 05:23:44 +0000 (01:23 -0400)]
nir: add nir_intrinsic_image_samples_identical

radeonsi will use it

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17693>

23 months agozink: use modifier feature flags during surface creation when necessary
Mike Blumenkrantz [Wed, 27 Jul 2022 19:13:06 +0000 (15:13 -0400)]
zink: use modifier feature flags during surface creation when necessary

cc: mesa-stable

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

23 months agozink: use stored format features for blit functionality
Mike Blumenkrantz [Wed, 27 Jul 2022 19:10:12 +0000 (15:10 -0400)]
zink: use stored format features for blit functionality

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

23 months agozink: store VkFormatFeatureFlags on creation
Mike Blumenkrantz [Wed, 27 Jul 2022 19:08:44 +0000 (15:08 -0400)]
zink: store VkFormatFeatureFlags on creation

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

23 months agozink: handle mutable swapchain images with dmabuf
Mike Blumenkrantz [Wed, 27 Jul 2022 18:57:06 +0000 (14:57 -0400)]
zink: handle mutable swapchain images with dmabuf

if a non-kopper swapchain image supports srgb, add a VkImageFormatListCreateInfo
to permit srgb mutability and avoid violating spec

cc: mesa-stable

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

23 months agodocs: reset new features
Dylan Baker [Wed, 3 Aug 2022 16:44:58 +0000 (09:44 -0700)]
docs: reset new features

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

23 months agoVERSION: bump 22.3.0-devel
Dylan Baker [Wed, 3 Aug 2022 16:43:58 +0000 (09:43 -0700)]
VERSION: bump 22.3.0-devel

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

23 months agoturnip: Use the GMEM CCU space for attachments when the stores won't.
Emma Anholt [Thu, 21 Jul 2022 22:42:18 +0000 (15:42 -0700)]
turnip: Use the GMEM CCU space for attachments when the stores won't.

Since the CCU only gets used for unaligned attachment stores or resolves
with the wrong formats, we can use that space for attachments in many
cases.

This gets two more of vk-5-normal's main renderpass's attachments to fit
in the next gmem_pixels increment, leaving 1 to go.  Other renderpasses do
get better gmem_pixels, and a few get better tile sizes as a result, but
the fps increase from those looks to be <.2% at least.

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

23 months agoturnip: Split the tiling config into separate layouts based on CCU usage.
Emma Anholt [Thu, 21 Jul 2022 21:58:04 +0000 (14:58 -0700)]
turnip: Split the tiling config into separate layouts based on CCU usage.

We now choose between two (equal as of this commit) layouts based on
whether the renderpass's stores will use the CCU space, and assert that we
always know the chosen layout when we go using the gmem offsets.

This required making vkCmdClearAttachments in a secondary take the 3D path
instead of gmem blits, since secondaries only have to be compatible with
the primary's renderpass, rather than equal.

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

23 months agoci/freedreno: Update a630 s8 resolve xfails.
Emma Anholt [Tue, 26 Jul 2022 17:51:15 +0000 (10:51 -0700)]
ci/freedreno: Update a630 s8 resolve xfails.

These tests are all only run in a full vk run.  These removed ones were
fixed in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17684
and I'm betting the bypass ones were pre-existing (we hadn't updated 630's
full vk run list for these new stencil tests, I belive -- my previous full
run update was just from one of the two jobs).

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

23 months agotu: Restore formatting of tu_clear_blit.c
Connor Abbott [Mon, 18 Jul 2022 10:30:59 +0000 (12:30 +0200)]
tu: Restore formatting of tu_clear_blit.c

Conflict resolution appears to have gone awry.  Use my previous resolution
of that rebase instead.

Fixes: 89263fde2057 ("tu: Use common vk_image struct")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16921>

23 months agoiris: Dedent enum iris_depth_reg_mode
Nanley Chery [Mon, 1 Aug 2022 21:20:53 +0000 (14:20 -0700)]
iris: Dedent enum iris_depth_reg_mode

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17859>

23 months agoiris: Make the D16 reg mode single-sampled
Nanley Chery [Mon, 1 Aug 2022 21:13:46 +0000 (14:13 -0700)]
iris: Make the D16 reg mode single-sampled

Wa_14010455700 is dependent on the format and sample count, but our
code to track whether or not it had been applied was only dependent on
the format.

As a result, we failed to enable the workaround when an app used a D16
2xMSAA buffer, then a D16 1xMSAA buffer right afterwards.

Make the workaround tracking code sample-dependent to fix this.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17859>

23 months agoanv: Make the D16 reg mode single-sampled
Nanley Chery [Mon, 1 Aug 2022 21:19:55 +0000 (14:19 -0700)]
anv: Make the D16 reg mode single-sampled

Wa_14010455700 is dependent on the format and sample count, but our
code to track whether or not it had been applied was only dependent on
the format.

As a result, we failed to enable the workaround when an app used a D16
2xMSAA buffer, then a D16 1xMSAA buffer right afterwards.

Make the workaround tracking code sample-dependent to fix this.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17859>

23 months agonir/lower_idiv: Be less creative about signs
Alyssa Rosenzweig [Mon, 1 Aug 2022 22:56:01 +0000 (18:56 -0400)]
nir/lower_idiv: Be less creative about signs

I'm sorry to whoever wrote this, but

   (x - (int) (x < 0)) ^ -((int) (x < 0))

is not an acceptable way to write iabs.

Shader-db results on Intel Tiger Lake with lower_idiv enabled:

    total instructions in shared programs: 21122548 -> 21122570 (<.01%)
    instructions in affected programs: 2369 -> 2391 (0.93%)
    helped: 2
    HURT: 8

    total cycles in shared programs: 791609360 -> 791608062 (<.01%)
    cycles in affected programs: 114106 -> 112808 (-1.14%)
    helped: 9
    HURT: 1

If we make the Intel back-end less stupid, we get to 9/1 helped/HURT for
instructions as well but that's for a different MR.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17845>

23 months agozink: combine loops for lazy descriptor program deinit
Mike Blumenkrantz [Tue, 2 Aug 2022 12:18:34 +0000 (08:18 -0400)]
zink: combine loops for lazy descriptor program deinit

the bindless and push sets don't have update templates stored to
the program, so merging these loops avoids trying to destroy them

cc: mesa-stable

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

23 months agozink: don't flag lazy push constant set dirty on batch change
Mike Blumenkrantz [Tue, 2 Aug 2022 12:11:29 +0000 (08:11 -0400)]
zink: don't flag lazy push constant set dirty on batch change

this has its own flag

cc: mesa-stable

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

23 months agozink: fix gfx program cache pruning with generated tcs
Mike Blumenkrantz [Mon, 1 Aug 2022 19:08:48 +0000 (15:08 -0400)]
zink: fix gfx program cache pruning with generated tcs

if the tcs was generated, then the prgram was added to the non-tcs cache,
which means deleting it from the tcs+tes cache will fail and then
context_destroy will explode

Fixes: 4123ee3c714 ("zink: invoke descriptor_program_deinit for programs on context destroy")

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