platform/upstream/mesa.git
21 months agoac/llvm: fix mixing non-uniform/uniform sampler/texture descriptors
Rhys Perry [Wed, 19 Oct 2022 17:17:29 +0000 (18:17 +0100)]
ac/llvm: fix mixing non-uniform/uniform sampler/texture descriptors

Non-uniform descriptors are not loaded in NIR and instead the pointer is
passed to abi->load_sampler_desc. It can be the case that only the texture
or sampler uses this path.

For the descriptor which doesn't use the path, we would previously pass
NULL to abi->load_sampler_desc.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19198>

21 months agod3d12: Fix placed footprint of subresources
Damian Korczowski [Fri, 21 Oct 2022 11:00:09 +0000 (11:00 +0000)]
d3d12: Fix placed footprint of subresources

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

21 months agod3d12: HEVC Decode - Fix slice size and offsets translation from VA to DXVA
Sil Vilerino [Fri, 21 Oct 2022 13:58:35 +0000 (09:58 -0400)]
d3d12: HEVC Decode - Fix slice size and offsets translation from VA to DXVA

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

21 months agoradv: disable AMD_shader_explicit_vertex_parameter on GFX11
Samuel Pitoiset [Fri, 21 Oct 2022 14:05:42 +0000 (16:05 +0200)]
radv: disable AMD_shader_explicit_vertex_parameter on GFX11

Not supported by ACO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19230>

21 months agoradv: disable VK_AMD_texture_gather_bias_lod on GFX11
Samuel Pitoiset [Fri, 21 Oct 2022 14:04:48 +0000 (16:04 +0200)]
radv: disable VK_AMD_texture_gather_bias_lod on GFX11

image_gather4_b_o no longer exists apparently, so this is likely
broken.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19230>

21 months agoradv: advertise VK_EXT_extended_dynamic_state3
Samuel Pitoiset [Mon, 30 May 2022 13:51:31 +0000 (15:51 +0200)]
radv: advertise VK_EXT_extended_dynamic_state3

Some tricky dynamic states still need to be implemented for full ds3
support with Zink, I will implement them later.

Pass dEQP-VK.pipeline.*extended_dynamic_state* on NAVI21.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic depth clamp enable
Samuel Pitoiset [Wed, 24 Aug 2022 13:35:57 +0000 (15:35 +0200)]
radv: add support for dynamic depth clamp enable

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic provoking vertex mode
Samuel Pitoiset [Wed, 24 Aug 2022 12:41:56 +0000 (14:41 +0200)]
radv: add support for dynamic provoking vertex mode

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic depth clip negative one to one
Samuel Pitoiset [Wed, 24 Aug 2022 11:34:50 +0000 (13:34 +0200)]
radv: add support for dynamic depth clip negative one to one

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic conservative rasterization mode
Samuel Pitoiset [Wed, 24 Aug 2022 11:27:21 +0000 (13:27 +0200)]
radv: add support for dynamic conservative rasterization mode

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic depth clip enable
Samuel Pitoiset [Wed, 24 Aug 2022 11:21:46 +0000 (13:21 +0200)]
radv: add support for dynamic depth clip enable

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic sample mask
Samuel Pitoiset [Wed, 24 Aug 2022 09:03:12 +0000 (11:03 +0200)]
radv: add support for dynamic sample mask

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic alpha to coverage enable
Samuel Pitoiset [Wed, 24 Aug 2022 08:59:03 +0000 (10:59 +0200)]
radv: add support for dynamic alpha to coverage enable

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic line stipple enable
Samuel Pitoiset [Wed, 24 Aug 2022 08:58:31 +0000 (10:58 +0200)]
radv: add support for dynamic line stipple enable

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic logic op enable
Samuel Pitoiset [Tue, 31 May 2022 09:29:07 +0000 (11:29 +0200)]
radv: add support for dynamic logic op enable

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic tessellation domain origin
Samuel Pitoiset [Tue, 31 May 2022 09:04:49 +0000 (11:04 +0200)]
radv: add support for dynamic tessellation domain origin

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: add support for dynamic polygon mode
Samuel Pitoiset [Tue, 31 May 2022 09:04:19 +0000 (11:04 +0200)]
radv: add support for dynamic polygon mode

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoradv: declare new dynamic states
Samuel Pitoiset [Tue, 31 May 2022 09:04:07 +0000 (11:04 +0200)]
radv: declare new dynamic states

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18882>

21 months agoci/freedreno: add Guilherme Gallo into restricted traces access list
David Heidelberg [Thu, 20 Oct 2022 23:05:34 +0000 (01:05 +0200)]
ci/freedreno: add Guilherme Gallo into restricted traces access list

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

21 months agoegl: fix error string for dri2_create_image_dma_buf()
Simon Ser [Wed, 19 Oct 2022 08:27:01 +0000 (10:27 +0200)]
egl: fix error string for dri2_create_image_dma_buf()

Using dri2_create_image_khr_texture_error() here prints an error
like so:

    command: eglCreateImageKHR, error: EGL_BAD_ALLOC (0x3003), message: "dri2_create_image_khr_texture"

This is confusing, because dri2_create_image_khr_texture() is
unrelated to this error.

Instead, print a more accurate error manually.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19156>

21 months agozink: handle f2f16_rtz
Karol Herbst [Mon, 17 Oct 2022 23:59:53 +0000 (01:59 +0200)]
zink: handle f2f16_rtz

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

21 months agozink: handle more opcodes for CL
Karol Herbst [Fri, 21 Oct 2022 01:14:26 +0000 (03:14 +0200)]
zink: handle more opcodes for CL

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

21 months agozink: update the RADV expectations
Martin Roukala (né Peres) [Thu, 20 Oct 2022 09:01:12 +0000 (12:01 +0300)]
zink: update the RADV expectations

We got 4 more tests passing, let's document that :)

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19190>

21 months agoci/llvmpipe: update to new RUSTICL_ENABLE var
Karol Herbst [Fri, 21 Oct 2022 00:26:04 +0000 (02:26 +0200)]
ci/llvmpipe: update to new RUSTICL_ENABLE var

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19149>

21 months agodocs: Add documentation for Rusticl's env variables
Karol Herbst [Tue, 18 Oct 2022 22:10:12 +0000 (00:10 +0200)]
docs: Add documentation for Rusticl's env variables

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19149>

21 months agorusticl: add RUSTICL_ENABLE to have a global way of enabling devices
Karol Herbst [Sat, 15 Oct 2022 14:22:17 +0000 (16:22 +0200)]
rusticl: add RUSTICL_ENABLE to have a global way of enabling devices

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19149>

21 months agovulkan/wsi/wayland: avoid useless re-allocations when receiving per-surface dma-buf...
Leandro Ribeiro [Sun, 16 Oct 2022 19:37:47 +0000 (16:37 -0300)]
vulkan/wsi/wayland: avoid useless re-allocations when receiving per-surface dma-buf feedback

It's not just because we received dma-buf feedback that we should
re-allocate, as sometimes it is useless.

We must compare the most recent allocation parameters used and the ones
that we have with the newest feedback. So do that.

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>

21 months agovulkan/wsi/wayland: add per-surface dma-buf feedback support
Leandro Ribeiro [Thu, 13 Oct 2022 21:16:37 +0000 (18:16 -0300)]
vulkan/wsi/wayland: add per-surface dma-buf feedback support

Follow up of "vulkan/wsi/wayland: add default dma-buf feedback support".

The surface feedback is dynamic, differently from the default feedback.
When we receive per-surface feedback, that means that we could be using
a better DRM format/modifier pair for the chain's buffers. So the next
time that the client calls vkAcquireNextImageKHR(), we return
VK_SUBOPTIMAL_KHR instead of VK_SUCCESS. Some clients will re-create the
swapchain when receiving SUBOPTIMAL, and for those we'll re-create the
chain. An optimal DRM format/modifier pair from the per-surface feedback
will be used to create the images of this swapchain.

Note that for now we won't be able to change the DRM format, only the
modifier. That's good enough for many cases in which direct scanout
would not be possible because of the modifier. In order to be able to
switch the format, we'll need a mechanism to negotiate preferred formats
with clients. Currently we can only expose a set of supported formats
all with the same preference.

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>

21 months agovulkan/wsi/wayland: add default dma-buf feedback support
Leandro Ribeiro [Thu, 13 Oct 2022 21:11:21 +0000 (18:11 -0300)]
vulkan/wsi/wayland: add default dma-buf feedback support

This bumps the supported dma-buf version up to 4 and adds default
dma-buf feedback support. It follows the changes in the dma-buf protocol
extension to include dma-buf feedback.

From version 4 onwards, the dma-buf modifier events are not sent by the
compositor anymore, so we use the default feedback to pick the set of
formats/modifiers supported by the compositor.

In the next commit we add support for per-surface feedback.

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>

21 months agovulkan/wsi/wayland: remove refcount from struct wsi_wl_display
Leandro Ribeiro [Wed, 5 Oct 2022 00:26:09 +0000 (21:26 -0300)]
vulkan/wsi/wayland: remove refcount from struct wsi_wl_display

After "vulkan/wsi/wayland: move wl_surface and wl_display from chain to
struct wsi_wl_surface", refcount is being unused. So remove it and its
associated functions.

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>

21 months agovulkan/wsi/wayland: move wl_surface and wl_display from chain to struct wsi_wl_surface
Leandro Ribeiro [Wed, 5 Oct 2022 00:22:01 +0000 (21:22 -0300)]
vulkan/wsi/wayland: move wl_surface and wl_display from chain to struct wsi_wl_surface

When a swapchain is re-created, if the old swapchain is not passed to
us, we need to re-create the wl_display and the Wayland objects. As
described in "vulkan/wsi/wayland: introduce struct wsi_wl_surface", this
gets in the way when adding the dma-buf feedback implementation.

With this change now the lifetime of the Wayland objects is tied to the
VkSurface. When the swapchain gets re-created, we won't have to
re-create the wl_display (and consequently the Wayland objects).

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>

21 months agovulkan/wsi/wayland: take ownership of wsi_wl_surface when creating chain
Leandro Ribeiro [Tue, 4 Oct 2022 20:55:50 +0000 (17:55 -0300)]
vulkan/wsi/wayland: take ownership of wsi_wl_surface when creating chain

When we create a swapchain, take ownership of a struct wsi_wl_surface.
When the chain gets destroyed, the ownership is dropped.

We can safely do that because only a single swapchain can be associated
with the surface at a time, according to vkCreateSwapchainKHR spec:

  "If pCreateInfo->oldSwapchain is VK_NULL_HANDLE, and the native
   window referred to by pCreateInfo->surface is already associated
   with a Vulkan swapchain, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR must
   be returned."

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>

21 months agovulkan/wsi/wayland: introduce struct wsi_wl_surface
Leandro Ribeiro [Tue, 4 Oct 2022 20:43:24 +0000 (17:43 -0300)]
vulkan/wsi/wayland: introduce struct wsi_wl_surface

In the following commits we add dma-buf feedback support. In order to do
that, we need to keep the feedback tied to the lifetime of the surface,
instead of tied to the lifetime of the chain.

Why do we need this change?

   The reason is per-surface feedback and swapchain re-creation. If we
   receive feedback and return SUBOPTIMAL to the client in the next
   acquireNextImage() call, it may re-create the swapchain. If it
   doesn't pass us the oldSwapchain, we won't have access to the surface
   feedback data (as it was tied to the oldSwapchain). We could bind
   again to the surface feedback, but compositors may have a transient
   state when we bind to surface feedback, and send a non-optimal batch
   of dma-buf feedback which is updated when the drawing loop starts. So
   we would re-create the chain with this non-optimal batch, and after a
   few moments receive new feedback. This could potentially lead into an
   allocation loop, so it is not safe.

   Tying the feedback to the lifetime of the VkSurface we don't have to
   re-bind to the surface dma-buf feedback every time that the swapchain
   is re-created, avoiding this dangerous allocation loop described
   above.

So add struct wsi_wl_surface in order to add support for dma-buf
feedback. For now it is just the stub, but in the next commits we start
making use of that.

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>

21 months agovulkan/wsi/wayland: remove unnecessary spaces in struct fields
Leandro Ribeiro [Wed, 19 Oct 2022 13:51:15 +0000 (10:51 -0300)]
vulkan/wsi/wayland: remove unnecessary spaces in struct fields

We have arbitrary amount of spaces between structs fields types and
their names. That doesn't improve legibility and get in the way when
adding new fields/structs. So remove these spaces.

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>

21 months agovulkan/wsi/wayland: move some structs to beginning of code
Leandro Ribeiro [Wed, 19 Oct 2022 13:51:01 +0000 (10:51 -0300)]
vulkan/wsi/wayland: move some structs to beginning of code

There are some structs defined in the middle of the code. Move them
closer to where the other structs are defined.

This makes the code easier to read and also will help us in the next
commits, in which we add dma-buf feedback support.

Reviewed-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12226>

21 months agoRevert "ac: use LLVMContextSetOpaquePointers if available"
Pierre-Eric Pelloux-Prayer [Tue, 11 Oct 2022 08:33:19 +0000 (10:33 +0200)]
Revert "ac: use LLVMContextSetOpaquePointers if available"

This reverts commit 940734630de229d98630e4398fd68e95c105177a.

radeonsi and radv now support opaque pointers.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: pass ac_llvm_ptr instead of separate type/ptr
Pierre-Eric Pelloux-Prayer [Thu, 13 Oct 2022 09:40:52 +0000 (11:40 +0200)]
ac/llvm: pass ac_llvm_ptr instead of separate type/ptr

This simplifies the API.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: add ac_get_ptr_arg
Pierre-Eric Pelloux-Prayer [Fri, 14 Oct 2022 13:08:12 +0000 (15:08 +0200)]
ac/llvm: add ac_get_ptr_arg

For argument of type AC_AR_..._PTR, this returns a ac_llvm_pointer.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoradv/llvm: replace LLVMBuildLoad by LLVMBuildLoad2
Pierre-Eric Pelloux-Prayer [Tue, 11 Oct 2022 08:48:01 +0000 (10:48 +0200)]
radv/llvm: replace LLVMBuildLoad by LLVMBuildLoad2

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: remove gep_2 and others temporary functions
Pierre-Eric Pelloux-Prayer [Tue, 11 Oct 2022 08:39:18 +0000 (10:39 +0200)]
ac/llvm: remove gep_2 and others temporary functions

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoradeonsi: port the remaining code to opaque pointers
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 15:40:45 +0000 (17:40 +0200)]
radeonsi: port the remaining code to opaque pointers

Mechanical changes (= use ac_llvm_pointer and adapt the callers/callees)

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoradeonsi: make ngg_gs_get_vertex_storage return a ac_llvm_pointer
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 12:39:50 +0000 (14:39 +0200)]
radeonsi: make ngg_gs_get_vertex_storage return a ac_llvm_pointer

gs_ngg_emit is declared as a 0-size array so we can't store it as a
ac_llvm_pointer.

Instead, we simply modify the ngg_gs_get_vertex_storage to return
a properly typed pointer, when num_outputs is known.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoradeonsi: use LLVMBuildGEP2 in si_build_gep_i8_var
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:33:06 +0000 (12:33 +0200)]
radeonsi: use LLVMBuildGEP2 in si_build_gep_i8_var

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoradeonsi: use ac_get_arg_pointee_type to get the right type
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:32:31 +0000 (12:32 +0200)]
radeonsi: use ac_get_arg_pointee_type to get the right type

And switch to the xxx2 versions of the ac/llvm functions.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoradv/llvm: use ac_build_gep0_type to get args types
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:30:26 +0000 (12:30 +0200)]
radv/llvm: use ac_build_gep0_type to get args types

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: remove unneeded casts
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:28:49 +0000 (12:28 +0200)]
ac/llvm: remove unneeded casts

The only useful information in pointer types is the address space and these
casts don't change it.
The type information is explicitely passed by the caller of GEP2 and similar
functions.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: store constant_data and scratch as ac_llvm_pointer
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:27:13 +0000 (12:27 +0200)]
ac/llvm: store constant_data and scratch as ac_llvm_pointer

This way we can pass the type information to LLVM when needed.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: store lds as ac_llvm_pointer
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:21:33 +0000 (12:21 +0200)]
ac/llvm: store lds as ac_llvm_pointer

This way we can pass the type information to LLVM when needed.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: add xxxx2 functions to iteratively port to opaque pointers
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 10:13:02 +0000 (12:13 +0200)]
ac/llvm: add xxxx2 functions to iteratively port to opaque pointers

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: add type param to ac_build_load_invariant
Pierre-Eric Pelloux-Prayer [Mon, 10 Oct 2022 09:44:27 +0000 (11:44 +0200)]
ac/llvm: add type param to ac_build_load_invariant

And adapt the only user of this function.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: switch ac_build_pointer_add to LLVMBuildGEP2
Pierre-Eric Pelloux-Prayer [Thu, 6 Oct 2022 09:11:57 +0000 (11:11 +0200)]
ac/llvm: switch ac_build_pointer_add to LLVMBuildGEP2

The cast was superfluous: GEP2 return value is a pointer to
the given type.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: switch ac_build_gep_ptr to LLVMBuildGEP2
Pierre-Eric Pelloux-Prayer [Thu, 6 Oct 2022 09:03:14 +0000 (11:03 +0200)]
ac/llvm: switch ac_build_gep_ptr to LLVMBuildGEP2

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: port functions to use ac_llvm_pointer
Pierre-Eric Pelloux-Prayer [Tue, 4 Oct 2022 13:15:54 +0000 (15:15 +0200)]
ac/llvm: port functions to use ac_llvm_pointer

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: add a ac_llvm_pointer type
Pierre-Eric Pelloux-Prayer [Tue, 4 Oct 2022 13:00:41 +0000 (15:00 +0200)]
ac/llvm: add a ac_llvm_pointer type

This struct stores a pointer's value and the pointee type and
will be used everywhere LLVM requires us to pass the pointee
type.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: remove LLVMBuildGEP usages
Pierre-Eric Pelloux-Prayer [Tue, 5 Jul 2022 19:31:45 +0000 (21:31 +0200)]
ac/llvm: remove LLVMBuildGEP usages

Use LLVMBuildGEP2 instead.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: add helpers to get pointer types of ac_arg
Pierre-Eric Pelloux-Prayer [Wed, 5 Oct 2022 15:41:04 +0000 (17:41 +0200)]
ac/llvm: add helpers to get pointer types of ac_arg

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: simplify get_memory_ptr
Pierre-Eric Pelloux-Prayer [Tue, 5 Jul 2022 19:13:59 +0000 (21:13 +0200)]
ac/llvm: simplify get_memory_ptr

We actually don't need the type: lds is always treaded as
a "pointer to i8" in this function.

The caller will use the proper type when using the result.

For the same reason, we can get rid of the cast in setup_shared
because LLVM won't use this information anymore.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: drop visit_deref
Pierre-Eric Pelloux-Prayer [Wed, 5 Oct 2022 07:40:45 +0000 (09:40 +0200)]
ac/llvm: drop visit_deref

This functions processes mem_shared and nir_var_mem_global:
- mem_shared is lowered by radv and radeonsi.
- mem_global is lowered by radv and radonsi doesn't use it.

So we can safely drop this function.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoradeonsi: use nir_lower_explicit_io to get rid of mem_shared deref
Pierre-Eric Pelloux-Prayer [Wed, 5 Oct 2022 07:33:37 +0000 (09:33 +0200)]
radeonsi: use nir_lower_explicit_io to get rid of mem_shared deref

We can get them through GLSL compute or SPIR-V.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoradeonsi: remove USE_LDS_SYMBOLS
Pierre-Eric Pelloux-Prayer [Wed, 5 Oct 2022 08:55:53 +0000 (10:55 +0200)]
radeonsi: remove USE_LDS_SYMBOLS

This has been set to true for 3 years and radeonsi wants LLVM 11, so
we can remove the define and use true directly.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoac/llvm: remove unused vars hash table
Pierre-Eric Pelloux-Prayer [Wed, 6 Jul 2022 13:37:33 +0000 (15:37 +0200)]
ac/llvm: remove unused vars hash table

It's unused because variables are never dereferenced during the
NIR -> LLVM IR translation.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19035>

21 months agoaco: fix tcs_wave_id unpacking on GFX11
Samuel Pitoiset [Thu, 20 Oct 2022 01:41:51 +0000 (01:41 +0000)]
aco: fix tcs_wave_id unpacking on GFX11

Only the first 3 bits are useful.
Ported from ac/llvm.

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

21 months agoradv: advertise fragmentShadingRateWithShaderDepthStencilWrites on NAVI23+
Samuel Pitoiset [Thu, 20 Oct 2022 08:36:03 +0000 (08:36 +0000)]
radv: advertise fragmentShadingRateWithShaderDepthStencilWrites on NAVI23+

It should work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19195>

21 months agoac: add radeon_info::has_vrs_ds_export_bug
Samuel Pitoiset [Thu, 20 Oct 2022 08:26:20 +0000 (08:26 +0000)]
ac: add radeon_info::has_vrs_ds_export_bug

According to PAL, only NAVI21 and NAVI22 are affected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19195>

21 months agoradv: allocate more space for pipeline statistics query on GFX11
Samuel Pitoiset [Thu, 20 Oct 2022 09:06:42 +0000 (09:06 +0000)]
radv: allocate more space for pipeline statistics query on GFX11

There is 14 queries, including new queries for mesh/task shaders.
Ported from RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19199>

21 months agost/glsl_to_ir: remove stale include
Timothy Arceri [Thu, 20 Oct 2022 00:05:10 +0000 (11:05 +1100)]
st/glsl_to_ir: remove stale include

We now only link via nir so no need to include tgsi headers.

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

21 months agost/glsl_to_ir: remove stale comment
Timothy Arceri [Thu, 20 Oct 2022 00:01:52 +0000 (11:01 +1100)]
st/glsl_to_ir: remove stale comment

The function is now called directly.

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

21 months agoci: Trigger building visual studio docker image
Yonggang Luo [Thu, 20 Oct 2022 14:40:01 +0000 (22:40 +0800)]
ci: Trigger building visual studio docker image

Update Dozen fails for new deqp

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

21 months agoci/windows: Update vk-gl-cts to pick up new zlib dependency
Jesse Natalie [Wed, 19 Oct 2022 14:11:28 +0000 (07:11 -0700)]
ci/windows: Update vk-gl-cts to pick up new zlib dependency

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19187>

21 months agoci: Install the clang-cl compiler within mesa_deps_vs2019.ps1
Yonggang Luo [Thu, 20 Oct 2022 14:37:17 +0000 (22:37 +0800)]
ci: Install the clang-cl compiler within mesa_deps_vs2019.ps1

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

21 months agoci: Move building libva before clone llvm-project in mesa_deps_build.ps1
Yonggang Luo [Thu, 20 Oct 2022 14:36:10 +0000 (22:36 +0800)]
ci: Move building libva before clone llvm-project in mesa_deps_build.ps1

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

21 months agoci: Add Get-Date in each package build in mesa_deps_build.ps1
Yonggang Luo [Thu, 20 Oct 2022 14:35:27 +0000 (22:35 +0800)]
ci: Add Get-Date in each package build in mesa_deps_build.ps1

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

21 months agoci: upgrade zlib to 1.2.13 in mesa_deps_build.ps1
Yonggang Luo [Thu, 20 Oct 2022 14:34:07 +0000 (22:34 +0800)]
ci: upgrade zlib to 1.2.13 in mesa_deps_build.ps1

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

21 months agomeson: upgrade zlib wrap
Yonggang Luo [Thu, 20 Oct 2022 03:37:14 +0000 (11:37 +0800)]
meson: upgrade zlib wrap

Remove zlib.wrap first.
Then using "meson wrap install zlib" to add it back

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

21 months agoRevert "egl: Factor some common terminate cleanup up to common code"
Rob Clark [Tue, 18 Oct 2022 20:36:02 +0000 (13:36 -0700)]
Revert "egl: Factor some common terminate cleanup up to common code"

This reverts commit 04826cd9fc83365e99db3a491254a8d5a6eaac63.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7497
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19145>

21 months agovenus: drop duplicated YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT
Simon Fels [Thu, 20 Oct 2022 19:58:38 +0000 (21:58 +0200)]
venus: drop duplicated YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT

The extensions is added twice which will cause the encoder to run into a
stack overflow in vn_encode_VkPhysicalDeviceFeatures2_pnext_partial when
supported by the host driver.

Signed-off-by: Simon Fels <simon.fels@canonical.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19208>

21 months agoci: Fix kernel+rootfs.* jobs
Guilherme Gallo [Wed, 19 Oct 2022 20:00:45 +0000 (17:00 -0300)]
ci: Fix kernel+rootfs.* jobs

The rootfs generation is failing due to issues with the deqp and crosvm
build stages.

== crosvm ==

This week, crates.io released the bindgen cargo package at version
0.61.0, but this version could not be installed via `cargo install
bindgen ...`, setting the version to the previous one to avoid breaking
the Mesa rootfs builds.

See also related failed job:
https://gitlab.freedesktop.org/gallo/mesa/-/jobs/30046963

== deqp ==

The deqp build is failing due to the missing archive of an old zlib
release version, which was deleted due to a CVE, see zlib 1.2.13 release
notes.

As the deqp uprev to 1.3.4.0, which contains the fix, was not
straightforward, let's only apply the necessary patch to fix zlib
source code download link and then remove this indirection in an
eventual deqp uprev.

Example of a failed kernel+rootfs build job:
  https://gitlab.freedesktop.org/gallo/mesa/-/jobs/30045324

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19183>

21 months agoci: libxvmc-dev is not a dependence anymore
Yonggang Luo [Tue, 18 Oct 2022 05:34:03 +0000 (13:34 +0800)]
ci: libxvmc-dev is not a dependence anymore

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19183>

21 months agod3d12: Create d3d12_resource objects for video usage keeping their DXGI_..._UNORM...
Sil Vilerino [Thu, 20 Oct 2022 16:26:03 +0000 (12:26 -0400)]
d3d12: Create d3d12_resource objects for video usage keeping their DXGI_..._UNORM formats

Do not set D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS nor convert
new d3d12_resource objects to their DXGI typeless formats for video
usage flagged by the video driver with PIPE_BIND_CUSTOM

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

21 months agoaco: Optimize MUBUF 0 offset when idxen is also being used.
Timur Kristóf [Wed, 20 Apr 2022 15:21:11 +0000 (17:21 +0200)]
aco: Optimize MUBUF 0 offset when idxen is also being used.

Now that we added an index src to the NIR intrinsic, it can
happen that these generate MUBUF instructions which have both
an index and an offset.

Extend this ACO optimization to the case when idxen is used.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17551>

21 months agonir, ac, aco: Add index src to load_buffer_amd/store_buffer_amd.
Timur Kristóf [Wed, 20 Apr 2022 15:20:00 +0000 (17:20 +0200)]
nir, ac, aco: Add index src to load_buffer_amd/store_buffer_amd.

Also modify all existing uses to pass a zero to this new src.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> (nir)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17551>

21 months agoaco: Cleanup load_vmem_mubuf and store_vmem_mubuf functions.
Timur Kristóf [Wed, 20 Apr 2022 09:23:42 +0000 (11:23 +0200)]
aco: Cleanup load_vmem_mubuf and store_vmem_mubuf functions.

Remove unused arguments, clean up allow_combining vs. swizzled etc.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17551>

21 months agonir, ac, aco: Add ACCESS intrinsic index to load/store_buffer_amd.
Timur Kristóf [Tue, 19 Apr 2022 11:50:43 +0000 (13:50 +0200)]
nir, ac, aco: Add ACCESS intrinsic index to load/store_buffer_amd.

Previously, we always treated these as coherent, but now let's make
this configurable. Also set all current users to ACCESS_COHERENT.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> (nir)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17551>

21 months agost: Remove st_api_type because ST_API_OPENVG is not an option anymore
Yonggang Luo [Thu, 20 Oct 2022 02:50:24 +0000 (10:50 +0800)]
st: Remove st_api_type because ST_API_OPENVG is not an option anymore

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19186>

21 months agonir/algebraic: optimize b<<a + c<<a
Rhys Perry [Mon, 17 Oct 2022 19:24:23 +0000 (20:24 +0100)]
nir/algebraic: optimize b<<a + c<<a

fossil-db (navi21):
Totals from 248 (0.18% of 135636) affected shaders:
Instrs: 85836 -> 85611 (-0.26%); split: -0.27%, +0.00%
CodeSize: 481304 -> 480332 (-0.20%); split: -0.21%, +0.00%
Latency: 9596559 -> 9596152 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 1423707 -> 1423670 (-0.00%)
SClause: 3872 -> 3874 (+0.05%)
PreSGPRs: 5034 -> 5038 (+0.08%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19137>

21 months agoturnip: Be sure we blit depth, not stencil, for Z32FS8 -> Z32F resolves.
Emma Anholt [Thu, 20 Oct 2022 00:02:26 +0000 (17:02 -0700)]
turnip: Be sure we blit depth, not stencil, for Z32FS8 -> Z32F resolves.

Fixes: #7143
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19181>

21 months agorusticl: remove blit code
Karol Herbst [Thu, 20 Oct 2022 03:10:21 +0000 (05:10 +0200)]
rusticl: remove blit code

I never ended up using it

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

21 months agoglx: Adot #ifdef GLX_USE_WINDOWSGL in #if defined(GLX_DIRECT_RENDERING) && !defined...
Yonggang Luo [Thu, 22 Sep 2022 09:49:34 +0000 (17:49 +0800)]
glx: Adot #ifdef GLX_USE_WINDOWSGL in #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)

glx_direct and glx_accel are guard by #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)

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

21 months agoglx: Adopt guard of glx_direct and glx_accel in #if defined(GLX_DIRECT_RENDERING...
Yonggang Luo [Thu, 22 Sep 2022 09:46:49 +0000 (17:46 +0800)]
glx: Adopt guard of glx_direct and glx_accel in #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)

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

21 months agoglx: Remove redundant #ifndef GLX_USE_APPLEGL in glx/glxext.c
Yonggang Luo [Thu, 22 Sep 2022 09:19:49 +0000 (17:19 +0800)]
glx: Remove redundant #ifndef GLX_USE_APPLEGL in glx/glxext.c

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

21 months agoglx: Trim trailing spaces in in glx/glxext.c
Yonggang Luo [Thu, 22 Sep 2022 09:22:40 +0000 (17:22 +0800)]
glx: Trim trailing spaces in in glx/glxext.c

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

21 months agoglx: Guard usage of infer_zink && !explicit_zink in glxext.c
Yonggang Luo [Thu, 22 Sep 2022 09:43:08 +0000 (17:43 +0800)]
glx: Guard usage of infer_zink && !explicit_zink in glxext.c

Fixes: 2569215f43f ("egl/glx: add fallback for zink loading")

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

21 months agozink: start on some type docs
Mike Blumenkrantz [Wed, 19 Oct 2022 12:32:15 +0000 (08:32 -0400)]
zink: start on some type docs

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19165>

21 months agozink: delete unused descriptor struct field
Mike Blumenkrantz [Wed, 19 Oct 2022 12:23:06 +0000 (08:23 -0400)]
zink: delete unused descriptor struct field

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19165>

21 months agozink: delete/cleanup some descriptor #defines
Mike Blumenkrantz [Wed, 19 Oct 2022 12:07:09 +0000 (08:07 -0400)]
zink: delete/cleanup some descriptor #defines

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19165>

21 months agozink: add docs for zink_batch.c
Mike Blumenkrantz [Wed, 19 Oct 2022 12:05:48 +0000 (08:05 -0400)]
zink: add docs for zink_batch.c

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19165>

21 months agoradv: add lowering for nir_intrinsic_load_ring_attr_{offset}_amd
Samuel Pitoiset [Wed, 11 May 2022 13:15:11 +0000 (15:15 +0200)]
radv: add lowering for nir_intrinsic_load_ring_attr_{offset}_amd

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19173>

21 months agonir: add nir_intrinsic_load_ring_attr_{offset}_amd
Samuel Pitoiset [Wed, 11 May 2022 13:14:36 +0000 (15:14 +0200)]
nir: add nir_intrinsic_load_ring_attr_{offset}_amd

These intrinsics will be used to lower NGG attributes to memory on
GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19173>

21 months agoradv: declare shader arguments for attributes via memory
Samuel Pitoiset [Wed, 11 May 2022 11:21:07 +0000 (13:21 +0200)]
radv: declare shader arguments for attributes via memory

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19173>

21 months agoradv: create and configure the ring BO for attributes
Samuel Pitoiset [Wed, 11 May 2022 11:50:01 +0000 (13:50 +0200)]
radv: create and configure the ring BO for attributes

It currently uses a pretty large size but it will be tweaked later.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19173>