platform/upstream/mesa.git
16 months agoac/llvm: Fix ac_build_buffer_load to work with more than 4 channels.
Timur Kristóf [Mon, 13 Feb 2023 11:14:04 +0000 (12:14 +0100)]
ac/llvm: Fix ac_build_buffer_load to work with more than 4 channels.

LLVM is unable to select instructions for num_channels > 4, so we
workaround that by manually splitting larger buffer loads.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21358>

16 months agoac/llvm: Fix buffer_load_amd with larger than 32-bit channel sizes.
Timur Kristóf [Mon, 13 Feb 2023 09:56:37 +0000 (10:56 +0100)]
ac/llvm: Fix buffer_load_amd with larger than 32-bit channel sizes.

LLVM is unable to select instructions for larger than 32-bit channel types.
Workaround by using i32 and casting to the correct type later.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21358>

16 months agoac/llvm: Remove "structurized" argument and instead check vindex.
Timur Kristóf [Sat, 11 Feb 2023 00:32:50 +0000 (01:32 +0100)]
ac/llvm: Remove "structurized" argument and instead check vindex.

Change ac_build_buffer_load_common and ac_build_tbuffer_load so
the use structurized load when the vindex argument is not NULL.
Adjust callers to match the new behaviour.

This fixes the load_buffer_amd intrinsic with index source.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21358>

16 months agoac: Port ACO's get_fetch_format to ac_get_safe_fetch_size.
Timur Kristóf [Thu, 2 Feb 2023 16:10:25 +0000 (17:10 +0100)]
ac: Port ACO's get_fetch_format to ac_get_safe_fetch_size.

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

16 months agonir: Clarify comment above load_buffer_amd.
Timur Kristóf [Sun, 5 Feb 2023 16:52:23 +0000 (17:52 +0100)]
nir: Clarify comment above load_buffer_amd.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21358>

16 months agomesa/st: refactor st_destroy_texcompress_compute condition
Tapani Pälli [Tue, 14 Feb 2023 12:22:09 +0000 (14:22 +0200)]
mesa/st: refactor st_destroy_texcompress_compute condition

What happened is that we did not call init but still called dtor, this
makes us do some unnecessary work.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21309>

16 months agov3dv: fix stencil view aspect selection of depth/stencil image
Iago Toral Quiroga [Thu, 16 Feb 2023 08:21:38 +0000 (09:21 +0100)]
v3dv: fix stencil view aspect selection of depth/stencil image

Instead of fixing the swizzle to X001, we should compose this
swizzle with the image view's own swizzle.

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

16 months agoci/lava: Fix LAVA logs issues for Collabora jobs
Guilherme Gallo [Wed, 15 Feb 2023 01:42:40 +0000 (22:42 -0300)]
ci/lava: Fix LAVA logs issues for Collabora jobs

Since the Collabora LAVA update related to the downtime from
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21119, the
LAVA logs from Collabora continued to use the hack for older versions
which digested some control characters, such as carriage returns acting
as newlines, which made it necessary to recover from split lines to make
Gitlab sections work in job logs as expected.

Collabora's LAVA instance now gives a more raw log output. It is
necessary to pay attention to newlines at the end of each log message,
which may cause double newlines when printed with Python built-in
`print` function. I decided to remove the repeating `\n` from the
received log messages to make them transparent to LogFollower users.

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

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

16 months agoci/lava: Add LavaFarm class to find LAVA farm from runner tag
Guilherme Gallo [Wed, 15 Feb 2023 01:36:58 +0000 (22:36 -0300)]
ci/lava: Add LavaFarm class to find LAVA farm from runner tag

LavaFarm is a class created to handle the different types of LAVA farms
and their tags in Mesa CI. Since specific jobs may require different
types of LAVA farms to run on, it is essential to determine which farm
the runner is running on to configure the job correctly.

LavaFarm provides an easy-to-use interface for checking the runner tag
and returning the corresponding LAVA farm, making it simple for Mesa CI
to configure jobs appropriately. By adding tests for LavaFarm, the team
can ensure that this class is functioning as expected, allowing for the
smooth execution of Mesa CI jobs on the correct LAVA farm.

The tests ensure that get_lava_farm returns the correct LavaFarm value
when given invalid or valid tags and that it returns LavaFarm.UNKNOWN
when no tag is provided. The tests use Hypothesis strategies to generate
various labels and farms for testing.

Example of use:
```
from lava.utils.lava_farm import LavaFarm, get_lava_farm

lava_farm = get_lava_farm()
if lava_farm == LavaFarm.DUMMY:
    # Configure the job for the DUMMY farm
    ...
elif lava_farm == LavaFarm.COLLABORA:
    # Configure the job for the COLLABORA farm
    ...
elif lava_farm == LavaFarm.KERNELCI:
    # Configure the job for the KERNELCI farm
    ...
else:
    # Handle the case where the LAVA farm is unknown
    ...
```

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

16 months agoci/lava: Move LAVA dependencies to pip
Guilherme Gallo [Wed, 15 Feb 2023 03:13:16 +0000 (00:13 -0300)]
ci/lava: Move LAVA dependencies to pip

Use requirements.txt and requirements-test.txt to organize better Python
dependencies related to LAVA.

Now LAVA tooling can use recent and fixed library versions.
And test-related libs will not trigger container rebuilding anymore.

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

16 months agoradv: Hash VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_* flags
Konstantin Seurer [Tue, 14 Feb 2023 19:43:46 +0000 (20:43 +0100)]
radv: Hash VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_* flags

Found by inspection.

Fixes: 687a82d ("radv/rt: Handle no-null shader flags")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21320>

16 months agofrontend/dri: Initialize callbacks in dri_swrast_kms_init_screen
Michel Dänzer [Wed, 15 Feb 2023 11:40:39 +0000 (12:40 +0100)]
frontend/dri: Initialize callbacks in dri_swrast_kms_init_screen

This was missed in the commit below.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8232
Fixes: 7d5b1cd02c4d ("frontend/dri: move callbacks from the VTable into dri_screen, dri_drawable")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21333>

16 months agogallium: Add MCJIT target triplet for Windows ARM64
GH Cao [Thu, 12 Jan 2023 17:04:42 +0000 (01:04 +0800)]
gallium: Add MCJIT target triplet for Windows ARM64

MCJIT on Windows requires a special LLVM target triplet with ELF object
format, add one for Windows ARM64.

Tested locally on real hardware.

Signed-off-by: GH Cao <driver1998.ms@outlook.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20675>

16 months agogallium: Use DETECT_OS_WINDOWS instead of 'WIN32'
driver1998 [Thu, 2 Feb 2023 04:45:19 +0000 (12:45 +0800)]
gallium: Use DETECT_OS_WINDOWS instead of 'WIN32'

Signed-off-by: GH Cao <driver1998.ms@outlook.com>
Acked-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20675>

16 months agoradv: revert Metro Exodus workaround which was moved to common code
Tapani Pälli [Wed, 15 Feb 2023 09:53:01 +0000 (11:53 +0200)]
radv: revert Metro Exodus workaround which was moved to common code

This reverts commit 4397c166c01b641c57348d9e0d881a4a1f351455.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21281>

16 months agospirv: add workaround for Metro Exodus in spirv_to_nir
Tapani Pälli [Mon, 13 Feb 2023 08:23:37 +0000 (10:23 +0200)]
spirv: add workaround for Metro Exodus in spirv_to_nir

This is commit 4397c166c01 for spirv_to_nir, otherwise we hit
the same assert with anv driver.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21281>

16 months agoasahi: Vectorize background colour load
Alyssa Rosenzweig [Wed, 15 Feb 2023 03:36:44 +0000 (22:36 -0500)]
asahi: Vectorize background colour load

No point to scalarizing this, the background can handle the vector load fine
since bfa7ec0aa0f ("agx: Don't scalarize preambles in NIR").

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21327>

17 months agoamd/surface: fix base_mip_width of subsampled formats
Pierre-Eric Pelloux-Prayer [Sat, 11 Feb 2023 00:38:33 +0000 (19:38 -0500)]
amd/surface: fix base_mip_width of subsampled formats

base_mip_width is used in si_compute_copy_image when the
SI_IMAGE_ACCESS_BLOCK_FORMAT_AS_UINT flag is used.

   width = tex->surface.u.gfx9.base_mip_width;

This will be incorrect if we don't adjust it. For instance,
with a 260x256 image, surf_pitch and base_mip_width are
320 before surf_pitch is updated to be 192.

Both need to match, or computing the width from base_mip_width
leads to incorrect result.

Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21253>

17 months agoturnip: avoid FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8 for event blits
Chia-I Wu [Wed, 1 Feb 2023 18:38:01 +0000 (10:38 -0800)]
turnip: avoid FMT6_Z24_UNORM_S8_UINT_AS_R8G8B8A8 for event blits

We don't need it for event blits.  It also does not support fast clears
which makes it slower.

For event blits, blob has

  VK_FORMAT_D16_UNORM           -> FMT6_16_UNORM
  VK_FORMAT_X8_D24_UNORM_PACK32 -> FMT6_Z24_UNORM_S8_UINT
  VK_FORMAT_D32_SFLOAT          -> FMT6_32_FLOAT
  VK_FORMAT_S8_UINT             -> FMT6_8_UINT
  VK_FORMAT_D24_UNORM_S8_UINT   -> FMT6_Z24_UNORM_S8_UINT
  VK_FORMAT_D32_SFLOAT_S8_UINT  -> FMT6_32_FLOAT + FMT6_8_UINT

and always sets RB_BLIT_INFO:DEPTH.  It is unclear what
RB_BLIT_INFO:DEPTH is for but we set it anyway.

Improves "glmark2 -b refract" on angle by 15-20% on a618/a635.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8218
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21116>

17 months agovenus: update venus-protocol headers to partially fix WA1
Ryan Neph [Sat, 11 Feb 2023 00:45:21 +0000 (16:45 -0800)]
venus: update venus-protocol headers to partially fix WA1

Begin encoding/decoding
VkDrmFormatModifierPropertiesList2EXT::drmFormatModifierCount to fix a
workaround (WA1) in the venus-protocol.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21323>

17 months agohasvk: fix KHR_shader_float_controls reporting
Lionel Landwerlin [Wed, 15 Feb 2023 20:05:08 +0000 (22:05 +0200)]
hasvk: fix KHR_shader_float_controls reporting

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 13f68bcce1 ("hasvk: Tell spirv_to_nir float controls are always supported")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21349>

17 months agoanv: Move execute_simple_batch() and queue_exec_locked() to kmd backend
José Roberto de Souza [Thu, 9 Feb 2023 21:00:46 +0000 (13:00 -0800)]
anv: Move execute_simple_batch() and queue_exec_locked() to kmd backend

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21255>

17 months agoanv: Add gem_mmap to kmd backend
José Roberto de Souza [Thu, 9 Feb 2023 14:29:28 +0000 (06:29 -0800)]
anv: Add gem_mmap to kmd backend

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21255>

17 months agoanv: Add gem_close to kmd backend
José Roberto de Souza [Thu, 9 Feb 2023 14:05:54 +0000 (06:05 -0800)]
anv: Add gem_close to kmd backend

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21255>

17 months agoasahi: Drop agx_device.memctx
Asahi Lina [Wed, 15 Feb 2023 13:12:31 +0000 (22:12 +0900)]
asahi: Drop agx_device.memctx

No longer used.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21348>

17 months agoasahi: Do not use memctx for pools / meta cache
Asahi Lina [Wed, 15 Feb 2023 10:46:37 +0000 (19:46 +0900)]
asahi: Do not use memctx for pools / meta cache

ralloc is not thread-safe, so we can't use dev->memctx for allocating
context-specific things without locking. On top of that, we always
need to explicitly clean up pools anyway since we need to unref the BOs,
so there is no point to using a memctx.

And since pools need to be explicitly cleaned up, the meta cache code
needs explicit cleanup, so add that and drop memctx from there too.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21348>

17 months agoasahi: Fix shader key cloning overreads
Asahi Lina [Wed, 15 Feb 2023 08:58:18 +0000 (17:58 +0900)]
asahi: Fix shader key cloning overreads

We call agx_get_shader_variant through with casted inner shader key
types, so it has to make sure to only copy as much of the union as is
actually valid.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21348>

17 months agoturnip: fix a null descriptor set dereference
Chia-I Wu [Wed, 15 Feb 2023 05:51:55 +0000 (21:51 -0800)]
turnip: fix a null descriptor set dereference

Fixed
dEQP-VK.pipeline.pipeline_library.graphics_library.misc.other.null_descriptor_set_in_monolithic_pipeline.

Fixes: cb3872f2cdc ("tu: Implement VK_EXT_descriptor_buffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21328>

17 months agoturnip: fix a major leak with GPL LTO
Chia-I Wu [Wed, 15 Feb 2023 05:22:48 +0000 (21:22 -0800)]
turnip: fix a major leak with GPL LTO

This allows dEQP-VK.pipeline.pipeline_library.* to run to finish.

Fixes: e9f5de11d40 ("tu: Initial implementation of VK_EXT_graphics_pipeline_library")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21328>

17 months agotu: Don't expose KHR_present_id,KHR_present_wait without KHR_swapchain
Danylo Piliaiev [Wed, 15 Feb 2023 18:09:29 +0000 (19:09 +0100)]
tu: Don't expose KHR_present_id,KHR_present_wait without KHR_swapchain

VK_KHR_present_id and VK_KHR_present_wait depend on VK_KHR_swapchain
being present, which is not present at least on Android/KGSL.

Fixes:
src/vulkan/util/vk_extensions.h:450: void assert_device_extensions_requirements(
 const struct vk_device_extension_table *, const struct vk_instance_extension_table *):
 assertion "!device_ext->KHR_present_id || device_ext->KHR_swapchain" failed

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

17 months agoanv,hasvk: flush what UNIFORM_READ flushes on SHADER_READ
Constantine Shablya [Tue, 14 Feb 2023 13:03:51 +0000 (15:03 +0200)]
anv,hasvk: flush what UNIFORM_READ flushes on SHADER_READ

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

17 months agoegl/kopper: Pass ancillary invalidate flush flags down to gallium.
Emma Anholt [Tue, 14 Feb 2023 18:32:57 +0000 (10:32 -0800)]
egl/kopper: Pass ancillary invalidate flush flags down to gallium.

We can just add the flags to the kopper interface, since it's private to
Mesa.  This gets us depth/stencil invalidation on swapbuffers, which is
critical for tiler performance.

glmark2-es2 -b texture (windowed) goes from 1650 to 1930 fps on
zink+turnip with ZINK_DEBUG=rp.

Part of #7321 (we're still a little behind freedreno's 2180 fps)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21317>

17 months agoegl/kopper: Use the kopper private interface for swapBuffers.
Emma Anholt [Tue, 14 Feb 2023 18:27:31 +0000 (10:27 -0800)]
egl/kopper: Use the kopper private interface for swapBuffers.

I'm going to be introducing an extra flag to indicate EGL vs GLX behavior
in the private interface.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21317>

17 months agoegl: Add a note explaining the swapBuffers badness in dri2_x11_copy_buffers().
Emma Anholt [Tue, 14 Feb 2023 22:48:32 +0000 (14:48 -0800)]
egl: Add a note explaining the swapBuffers badness in dri2_x11_copy_buffers().

I tried to drop the swapBuffers path, but it turns out it's being taken by
softpipe/llvmpipe, and the tests are passing.  The piglit egl-copy-buffers
test even passes on zink, but you end up with a bad display because of an
un-preserved back buffer.

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

17 months agoegl/kopper: Add assert for no kopper in dri2_copy_region.
Emma Anholt [Tue, 14 Feb 2023 18:24:25 +0000 (10:24 -0800)]
egl/kopper: Add assert for no kopper in dri2_copy_region.

This shouldn't be doing a swapBuffers, that's not what this function is
supposed to do.  But also, we shouldn't be doing this from zink, which the
swap was introduced for, because we don't implement the extension.  Cleans
up some strangeness from 3c4be122cc49 ("egl: implement more hooks for
swrast")

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21317>

17 months agoRevert "meson: Fix Asahi build on macOS"
Erik Faye-Lund [Wed, 8 Feb 2023 16:03:53 +0000 (17:03 +0100)]
Revert "meson: Fix Asahi build on macOS"

This reverts commit 4ca4a05627e40e8212a8ea957f8ef2f697e4e322.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Asahi Lina <lina@asahilina.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21185>

17 months agomeson: don't pass vk wsi args where they don't belong
Erik Faye-Lund [Wed, 8 Feb 2023 08:34:34 +0000 (09:34 +0100)]
meson: don't pass vk wsi args where they don't belong

Only code that cares about Vulkan WSI should get the corresponding
arguments passed. Otherwise, the Vulkan headers might end up including
other headers that we don't have the correct dependencies passed for.
So let's give those a dedicated variable, and only pass that where it's
actually needed.

Fixes: b39958a3a18 ("anv,nir: Move the ANV YCbCr lowering pass to common code")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8193
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21185>

17 months agovulkan: prefer vulkan_core.h over vulkan.h
Erik Faye-Lund [Wed, 8 Feb 2023 09:07:21 +0000 (10:07 +0100)]
vulkan: prefer vulkan_core.h over vulkan.h

If we include vulkan.h, we risk including the WSI bits as well, which we
don't need here. Only trouble can follow from including these where
they're not needed.

So let's include vulkan_core.h in these places instead.

Fixes: b39958a3a18 ("anv,nir: Move the ANV YCbCr lowering pass to common code")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21185>

17 months agogallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state
Mike Blumenkrantz [Mon, 19 Sep 2022 17:16:45 +0000 (13:16 -0400)]
gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state

some drivers may find this useful

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18695>

17 months agoradv/ci: add missing expected failures with RADV_PERFTEST=gpl on GFX1100
Samuel Pitoiset [Wed, 15 Feb 2023 11:04:18 +0000 (12:04 +0100)]
radv/ci: add missing expected failures with RADV_PERFTEST=gpl on GFX1100

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21334>

17 months agohasvk: use Vulkan runtime's robust buffer access
Constantine Shablya [Wed, 15 Feb 2023 16:35:37 +0000 (18:35 +0200)]
hasvk: use Vulkan runtime's robust buffer access

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21338>

17 months agoanv: use Vulkan runtime's robust buffer access
Constantine Shablya [Wed, 15 Feb 2023 16:35:14 +0000 (18:35 +0200)]
anv: use Vulkan runtime's robust buffer access

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21338>

17 months agofrontends/va: Map VAEncCodedBufferType buffer as PIPE_MAP_READ
David Rosca [Sun, 18 Dec 2022 17:01:37 +0000 (18:01 +0100)]
frontends/va: Map VAEncCodedBufferType buffer as PIPE_MAP_READ

VAEncCodedBufferType is used for reading back encoded data.
Mapping it for read instead of write speeds up reading
the data on CPU.

On radeonsi this will result in VRAM copy to staging buffer
in cached GTT, making the CPU read much faster.

Signed-off-by: David Rosca <nowrep@gmail.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20376>

17 months agofix: clover/llvm: replace llvm::None with std::nullopt for LLVM 17+
Kai Wasserbäch [Sun, 5 Feb 2023 11:09:52 +0000 (12:09 +0100)]
fix: clover/llvm: replace llvm::None with std::nullopt for LLVM 17+

llvm::None was deprecated and builds started failing with

  error: ‘None’ is not a member of ‘llvm’

Instead of using the temporarily available include in ADT which would
add a deprecation warning to the build, directly replace llvm::None with
the recommended std::nullopt

This change takes only effect with LLVM 17 or newer.

Reference: https://github.com/llvm/llvm-project/blob/d4f38ef288c3a4cf2318182c8585a5c7e760877a/llvm/include/llvm/ADT/None.h
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21125>

17 months agoir3: Consider dst type in ubo_vec4 to ldc lowering
Danylo Piliaiev [Tue, 14 Feb 2023 18:24:59 +0000 (19:24 +0100)]
ir3: Consider dst type in ubo_vec4 to ldc lowering

The dst type could be either 16b or 32b.

Fixes validation failure in dEQP-VK.subgroups.* tests which deal with
16b types.

 validation fail: (type_size(instr->cat6.type) <= 16) == !!((instr->dsts[0])->flags & IR3_REG_HALF)
   -> for instruction: MESA: info: 0023:0000:000:        ldc.offset0.base0 hssa_23 (wrmask=0x3), ssa_1, ssa_22

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

17 months agopvr: Add support for VK_ATTACHMENT_LOAD_OP_LOAD.
Karmjit Mahil [Fri, 27 Jan 2023 18:25:57 +0000 (18:25 +0000)]
pvr: Add support for VK_ATTACHMENT_LOAD_OP_LOAD.

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

17 months agopvr: Upload spm load programs to device.
Karmjit Mahil [Fri, 18 Nov 2022 14:51:37 +0000 (14:51 +0000)]
pvr: Upload spm load programs to device.

The programs are currently unused but will be needed for the spm
background object load op.

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

17 months agopvr: Add SPM load usc empty programs
Karmjit Mahil [Thu, 2 Feb 2023 16:34:34 +0000 (16:34 +0000)]
pvr: Add SPM load usc empty programs

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

17 months agoiris: Drop iris_cache_flush_for_render
Nanley Chery [Fri, 10 Feb 2023 22:28:41 +0000 (14:28 -0800)]
iris: Drop iris_cache_flush_for_render

Before dropping this function, handle the two callers of this function:

* The call in iris_blorp.c is redundant. The required cache flushes are
  already handled by the callers of blorp functions. Delete this.

* The call in iris_resolve.c is still providing a benefit because it
  calls iris_emit_buffer_barrier_for internally. Inline the needed
  barrier.

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

17 months agoiris: Flush caches for aux-mode changes more often
Nanley Chery [Tue, 14 Feb 2023 01:52:58 +0000 (17:52 -0800)]
iris: Flush caches for aux-mode changes more often

Memory accesses can get corrupted when there's a disagreement between:
* the aux-mode of existing cache lines for a surface and
* the aux-usage in that surface's RENDER_SURFACE_STATE object

We have already prevented hardware from seeing this conflict for
rendering operations, but due to how the L3 is shared among multiple
clients in gfx12 (e.g., sampler engine, render engine, etc.), we need to
expand the scope of the existing solution. Now, before any access of a
compressible resource, we make sure to flush the prior aux-mode from the
caches.

The majority of changes here refactor things for use in a new function,
flush_previous_aux_mode. The remaining change calls that function from
within iris_resource_prepare_access.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6558
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7625
Cc: 23.0 <mesa-stable>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21303>

17 months agoiris: Update comment in iris_cache_flush_for_render
Nanley Chery [Tue, 14 Feb 2023 00:45:02 +0000 (16:45 -0800)]
iris: Update comment in iris_cache_flush_for_render

Update the comment to reflect the fact that iris no longer switches
between CCS_E and CCS_D.

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

17 months agomeson: Combine duplicated c_args and cpp_args
Yonggang Luo [Wed, 28 Sep 2022 14:39:28 +0000 (22:39 +0800)]
meson: Combine duplicated c_args and cpp_args

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19185>

17 months agomeson: Split c_cpp_args from pre_args
Yonggang Luo [Sat, 11 Feb 2023 06:49:59 +0000 (14:49 +0800)]
meson: Split c_cpp_args from pre_args

pre_args should not include compiler options

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

17 months agomeson: drop `TODO: opengl`, it's done
Eric Engestrom [Sat, 21 Jan 2023 12:21:34 +0000 (12:21 +0000)]
meson: drop `TODO: opengl`, it's done

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

17 months agomeson: only build glsl when needed
Eric Engestrom [Tue, 17 Jan 2023 17:58:33 +0000 (17:58 +0000)]
meson: only build glsl when needed

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

17 months agomeson: only build libglsl_util when needed
Eric Engestrom [Tue, 17 Jan 2023 17:57:43 +0000 (17:57 +0000)]
meson: only build libglsl_util when needed

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

17 months agomeson: only build the loader when needed
Eric Engestrom [Sat, 5 Nov 2022 08:47:04 +0000 (08:47 +0000)]
meson: only build the loader when needed

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

17 months agomeson: only build mapi when needed
Eric Engestrom [Sat, 5 Nov 2022 08:47:04 +0000 (08:47 +0000)]
meson: only build mapi when needed

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

17 months agomeson: move float64_glsl_file one meson.build up
Eric Engestrom [Tue, 17 Jan 2023 17:56:22 +0000 (17:56 +0000)]
meson: move float64_glsl_file one meson.build up

anv uses it.

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

17 months agolavapipe: enable linear filtering for depth formats
Mike Blumenkrantz [Mon, 23 Jan 2023 15:53:29 +0000 (10:53 -0500)]
lavapipe: enable linear filtering for depth formats

this seems to work according to cts

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20859>

17 months agointel: Implement Wa_16011448509
Mark Janes [Fri, 10 Feb 2023 23:22:47 +0000 (15:22 -0800)]
intel: Implement Wa_16011448509

"Use 3DSTATE_CONST command for individual shaders instead of
3DSTATE_CONST_ALL COMMAND"

On gen 12.0 platforms, 3DSTATE_CONSTANT_ALL command is not processed
correctly in certain cases.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21301>

17 months agozink: block LINEAR filtered blits for zs formats
Mike Blumenkrantz [Tue, 14 Feb 2023 15:10:20 +0000 (10:10 -0500)]
zink: block LINEAR filtered blits for zs formats

this is illegal, and the u_blitter path has to be taken to guarantee
enough accuracy that the strictest piglit tests pass

cc: mesa-stable

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

17 months agoRevert "zink: always use NEAREST for zs blits"
Mike Blumenkrantz [Tue, 14 Feb 2023 15:08:22 +0000 (10:08 -0500)]
Revert "zink: always use NEAREST for zs blits"

This reverts commit 067545eb9af79414054e4bef3ab48af003758663.

this is good enough for CI but not enough for anholt's piglit tests

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

17 months agovk/runtime: turn vk.xml extension requirements into asserts
Eric Engestrom [Thu, 21 Jul 2022 21:38:27 +0000 (22:38 +0100)]
vk/runtime: turn vk.xml extension requirements into asserts

More specifically, turn
  <extension name="VK_KHR_foo" requires="VK_KHR_bar">
into
  assert(!ext->KHR_foo || ext->KHR_bar);

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21261>

17 months agovk/runtime: keep track of supported instance extensions
Eric Engestrom [Fri, 10 Feb 2023 17:56:36 +0000 (17:56 +0000)]
vk/runtime: keep track of supported instance extensions

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21261>

17 months agovk/util: keep track of extension requirements
Eric Engestrom [Thu, 21 Jul 2022 21:38:27 +0000 (22:38 +0100)]
vk/util: keep track of extension requirements

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21261>

17 months agodzn: Enable KHR_storage_buffer_storage_class
Jesse Natalie [Tue, 14 Feb 2023 00:56:19 +0000 (16:56 -0800)]
dzn: Enable KHR_storage_buffer_storage_class

It's required for VK1.1 and Mesa's SPIR-V parser handles it for us.

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

17 months agointel/fs: bound subgroup invocation read to dispatch size
Lionel Landwerlin [Wed, 8 Feb 2023 18:48:25 +0000 (20:48 +0200)]
intel/fs: bound subgroup invocation read to dispatch size

This is to avoid out of bound register accesses (potentially leading
to hangs) when the dispatch size is smaller than when is reported in
the NIR subgroup_size.

v2: Implement bounding with a mask (since workgroup sizes are powers of 2) (Faith)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 530de844ef4d ("intel,anv,iris,crocus: Drop subgroup size from the shader key")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21282>

17 months agozink: enable renderpass optimizations by default for selected drivers
Mike Blumenkrantz [Mon, 13 Feb 2023 22:15:57 +0000 (17:15 -0500)]
zink: enable renderpass optimizations by default for selected drivers

CI has been running this for months on turnip, so let's give it some
broader testing

also add a ZINK_DEBUG=norp for testing

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

17 months agoaco: Don't use vcmpx with DPP.
Georg Lehmann [Thu, 5 Jan 2023 16:20:42 +0000 (17:20 +0100)]
aco: Don't use vcmpx with DPP.

V_CMPX+DPP returns 0 with reads from disabled lanes, unlike V_CMP+DPP (RDNA3 ISA doc, 7.7)

Fixes: baab6f18c91 ("aco: Optimize branching sequence during SSA elimination.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20537>

17 months agonir/from_ssa: Use more helpers in resolve_parallel_copies
Faith Ekstrand [Mon, 13 Feb 2023 23:24:18 +0000 (17:24 -0600)]
nir/from_ssa: Use more helpers in resolve_parallel_copies

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

17 months agonir: Fix typos in the from-SSA pass comments
Kenneth Graunke [Fri, 10 Feb 2023 09:14:11 +0000 (01:14 -0800)]
nir: Fix typos in the from-SSA pass comments

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21299>

17 months agonir: Fix merge_set_dump() to compile again
Kenneth Graunke [Fri, 10 Feb 2023 07:47:38 +0000 (23:47 -0800)]
nir: Fix merge_set_dump() to compile again

This #if 0'd debug code has been broken since -Werror=vla was added.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21299>

17 months agonir: Print divergence information for registers as well as SSA defs
Kenneth Graunke [Thu, 9 Feb 2023 23:18:05 +0000 (15:18 -0800)]
nir: Print divergence information for registers as well as SSA defs

This patch causes us to print "con" and "div" for registers as well as
SSA defs.  We print it on both register declarations, and destinations.
The latter isn't strictly necessary, but it is handy to be able to see
e.g. a convergent value being assigned to a divergent register without
having to constantly refer back to definitions that might be much
earlier in the program.  I originally printed it for sources as well,
but that got to be a bit wordy, so I dropped that.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21299>

17 months agomeson: remove unused USE_FOO_ASM defines
Erik Faye-Lund [Thu, 9 Feb 2023 08:31:12 +0000 (09:31 +0100)]
meson: remove unused USE_FOO_ASM defines

The usage of these defines was removed, so let's remove the definitions
as well.

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

17 months agoanv/blorp: use existing function to convert the op to a string
Rohan Garg [Wed, 1 Feb 2023 17:46:47 +0000 (18:46 +0100)]
anv/blorp: use existing function to convert the op to a string

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21283>

17 months agoisl: fix some documentation
Rohan Garg [Wed, 1 Feb 2023 17:59:35 +0000 (18:59 +0100)]
isl: fix some documentation

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21283>

17 months agoanv: reuse the VK_IMAGE_ASPECT_PLANES_BITS_ANV macro
Rohan Garg [Fri, 3 Feb 2023 10:59:46 +0000 (11:59 +0100)]
anv: reuse the VK_IMAGE_ASPECT_PLANES_BITS_ANV macro

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21283>

17 months agoanv: drop unused headers
Rohan Garg [Fri, 10 Feb 2023 14:58:07 +0000 (15:58 +0100)]
anv: drop unused headers

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21283>

17 months agoaco: new 16bit VOP3 opcodes can use opsel
Georg Lehmann [Sat, 14 Jan 2023 10:38:25 +0000 (11:38 +0100)]
aco: new 16bit VOP3 opcodes can use opsel

No Foz-DB changes on gfx11.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20705>

17 months agoci/venus: Skip tests risking out of memory issues
Corentin Noël [Tue, 14 Feb 2023 09:48:18 +0000 (10:48 +0100)]
ci/venus: Skip tests risking out of memory issues

These two dEQP tests:
 * dEQP-VK.api.object_management.max_concurrent.graphics_pipeline
 * dEQP-VK.api.object_management.max_concurrent.compute_pipeline

Require a lot of memory and might kill crosvm or the renderer server because of EOM
issues. Skip them for now.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21306>

17 months agoradv: ignore registering pipeline libaries with SQTT
Samuel Pitoiset [Fri, 10 Feb 2023 09:33:28 +0000 (10:33 +0100)]
radv: ignore registering pipeline libaries with SQTT

They aren't executable pipelines and they might not contain all
shader stages.

This fixes a crash when generating RGP captures with GPL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21235>

17 months agozink: remove incorrect trailing comma
Erik Faye-Lund [Thu, 9 Feb 2023 08:06:53 +0000 (09:06 +0100)]
zink: remove incorrect trailing comma

A trailing comma in a list is not valid JSON. Let's drop it.

Fixes: f7b2dbb2bdc ("zink: relax bresenhamLines requirement for non-strictLine drivers")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21211>

17 months agozink: correct companies in requirements
Erik Faye-Lund [Tue, 1 Nov 2022 14:58:28 +0000 (15:58 +0100)]
zink: correct companies in requirements

These contributors don't work for Zink itself, but various companies
who's working on Zink. Add the correct ones.

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

17 months agoci: Enable the hasvk Vulkan driver in the fedora-release job
Michel Dänzer [Fri, 10 Feb 2023 10:56:45 +0000 (11:56 +0100)]
ci: Enable the hasvk Vulkan driver in the fedora-release job

To match the Fedora packaging.

While at it, sort the Vulkan drivers alphabetically.

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

17 months agoci: Enable i915 Gallium driver in fedora-release job
Michel Dänzer [Fri, 10 Feb 2023 10:55:43 +0000 (11:55 +0100)]
ci: Enable i915 Gallium driver in fedora-release job

To match the Fedora packaging.

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

17 months agoci: Re-enable intel-clc in fedora-release job
Michel Dänzer [Fri, 10 Feb 2023 10:54:04 +0000 (11:54 +0100)]
ci: Re-enable intel-clc in fedora-release job

Fedora 36 has new enough llvm-spirv-translator.

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

17 months agoci: Update Fedora image to 36
Michel Dänzer [Thu, 9 Feb 2023 16:41:25 +0000 (17:41 +0100)]
ci: Update Fedora image to 36

Fedora 34 is EOL.

With Fedora 37, ccache hangs in a futex syscall in CI for some reason,
so let's go with 36 for now.

v2:
* No need to add -Wno-error=stringop-overflow anymore.

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

17 months agoclover: Reserve vector memory in make_text_section
Michel Dänzer [Mon, 13 Feb 2023 11:54:12 +0000 (12:54 +0100)]
clover: Reserve vector memory in make_text_section

This isn't strictly required, but it works around
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366 , and it might
avoid a memory reallocation.

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

17 months agoanv/grl: Use union for reinterpreting integer as float
Michel Dänzer [Thu, 9 Feb 2023 17:27:23 +0000 (18:27 +0100)]
anv/grl: Use union for reinterpreting integer as float

Fixes strict aliasing violations flagged by GCC 12:

../src/intel/vulkan/grl/include/GRLOCLCompatibility.h: In function ‘float as_float(uint32_t)’:
../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:182:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  182 |     return *reinterpret_cast<float*>(&i);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/intel/vulkan/grl/include/GRLOCLCompatibility.h: In function ‘float3 as_float3(int3)’:
../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:187:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  187 |     return *reinterpret_cast<float3*>(&i3);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:187:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../src/intel/vulkan/grl/include/GRLOCLCompatibility.h: In function ‘float4 as_float4(int4)’:
../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:192:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  192 |     return *reinterpret_cast<float4*>(&i4);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/intel/vulkan/grl/include/GRLOCLCompatibility.h:192:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Fixes: 5f948503e40c ("anv: Import GRL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21236>

17 months agozink: set ZINK_DESCRIPTORS=db for radv jobs
Mike Blumenkrantz [Sat, 28 Jan 2023 12:50:42 +0000 (07:50 -0500)]
zink: set ZINK_DESCRIPTORS=db for radv jobs

there's no testing for this in ci, and radv has a unique heap/memory
setup which catches allocation regressions

Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20968>

17 months agoanv: enable task redistribution
Marcin Ślusarz [Mon, 30 Jan 2023 16:18:04 +0000 (17:18 +0100)]
anv: enable task redistribution

Disabling is no longer needed after "intel/compiler/mesh: use
slice id of task urb handles in mesh shaders".

This reverts commit 4eaecd79657f0cd99f6536fd55a7a14958d6624b.

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

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21007>

17 months agointel/compiler/mesh: use slice id of task urb handles in mesh shaders
Marcin Ślusarz [Mon, 30 Jan 2023 16:09:26 +0000 (17:09 +0100)]
intel/compiler/mesh: use slice id of task urb handles in mesh shaders

When mesh shader is spawned on a different slice than the originating
task shader, then input task urb handle can come from a different
slice, so masking this information off will load data from the current
slice, instead of the one where real data are.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21007>

17 months agoanv: implement VK_EXT_vertex_input_dynamic_state
Lionel Landwerlin [Tue, 31 Jan 2023 21:15:11 +0000 (22:15 +0100)]
anv: implement VK_EXT_vertex_input_dynamic_state

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21026>

17 months agoanv: move 3DSTATE_VERTEX_ELEMENT emission to dynamic path
Lionel Landwerlin [Tue, 31 Jan 2023 18:55:59 +0000 (19:55 +0100)]
anv: move 3DSTATE_VERTEX_ELEMENT emission to dynamic path

Prep work for VK_EXT_vertex_input_dynamic_state

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21026>

17 months agoanv: remove copied information from runtime graphics state
Lionel Landwerlin [Tue, 31 Jan 2023 19:09:36 +0000 (20:09 +0100)]
anv: remove copied information from runtime graphics state

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21026>

17 months agoanv: fix how unset gl_Viewport & gl_Layer are handled in mesh case
Marcin Ślusarz [Fri, 27 Jan 2023 14:58:35 +0000 (15:58 +0100)]
anv: fix how unset gl_Viewport & gl_Layer are handled in mesh case

See also: c6f69eea6ac ("anv/pipeline: Properly handle unset gl_Layer and gl_ViewportIndex")

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17620>

17 months agointel/compiler: replace gl_Layer & gl_ViewportIndex by 0 in fs if ms doesn't write it
Marcin Ślusarz [Fri, 15 Jul 2022 09:53:39 +0000 (11:53 +0200)]
intel/compiler: replace gl_Layer & gl_ViewportIndex by 0 in fs if ms doesn't write it

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17620>

17 months agoradv: disable DCC for mipmaps on GFX11
Samuel Pitoiset [Wed, 8 Feb 2023 10:38:25 +0000 (11:38 +0100)]
radv: disable DCC for mipmaps on GFX11

It seems broken but can't really figure out why and DCC levels aren't
interleaved on GFX11. Skipping DCC initialization for levels seems to
also fix it but seems safer to disable completely, as a hotfix.

Fixes DCC issues with Hi-Fi Rush, Sonic Frontiers, Hogwarts Legacy
and probably more.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8230
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21186>

17 months agoci/etnaviv: Update deqp xfails for gc2000.
Emma Anholt [Mon, 13 Feb 2023 21:10:40 +0000 (13:10 -0800)]
ci/etnaviv: Update deqp xfails for gc2000.

More of a mixed bag here than gc7000, but at least the status is stable
in the last 3 nightly runs.

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