platform/upstream/mesa.git
16 months agofreedreno/cffdec: Add helper to parse CP_INDIRECT_BUFFER
Rob Clark [Tue, 25 Oct 2022 20:19:25 +0000 (13:19 -0700)]
freedreno/cffdec: Add helper to parse CP_INDIRECT_BUFFER

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>

16 months agofreedreno/cffdec: Add helper to find next pkt
Rob Clark [Fri, 4 Nov 2022 22:07:40 +0000 (15:07 -0700)]
freedreno/cffdec: Add helper to find next pkt

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>

16 months agofreedreno/cffdec: Fix unitialized count for pkt2
Rob Clark [Sat, 5 Nov 2022 19:03:33 +0000 (12:03 -0700)]
freedreno/cffdec: Fix unitialized count for pkt2

This was causing us to use the size of the previous packet.  Which just
happened to land on a valid packet because pkt2 only followed a
CP_INDIRECT_BUFFER.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>

16 months agofreedreno/crashdec: Fix apparent off-by-one with ROQ size
Connor Abbott [Mon, 17 Oct 2022 16:39:16 +0000 (18:39 +0200)]
freedreno/crashdec: Fix apparent off-by-one with ROQ size

I have multiple examples where this register is too large by one
when comparing to the ROQ read/write pointers in CP_ROQ_*_STAT and the
ROQ data itself, as if it includes the dword most recently read too. I
have an example where it's off by 2 compared to the read pointer, but
the read pointer is also off by 1 itself judging by the SQE program
counter, so that may just be them not getting synchronized. This
off-by-one was getting in the way of figuring out exactly IB2 was being
processed in the next commit.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>

16 months agofreedreno/a6xx: Fill in ROQ status registers
Connor Abbott [Mon, 17 Oct 2022 15:57:03 +0000 (17:57 +0200)]
freedreno/a6xx: Fill in ROQ status registers

We had a bunch of registers only defined for some parts of ROQ but now
that we know the pattern for ROQ-related registers it's easy to fill in
the rest.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>

16 months agofreedreno/a6xx: Fix CP_ROQ_THRESHOLDS_1
Connor Abbott [Mon, 17 Oct 2022 14:52:30 +0000 (16:52 +0200)]
freedreno/a6xx: Fix CP_ROQ_THRESHOLDS_1

Just by adding the ROQ_*_STAT registers following the previous pattern
it becomes obvious what these fields actually are.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>

16 months agofreedreno/a6xx: Add CP_ROQ_*_STAT
Connor Abbott [Mon, 17 Oct 2022 14:38:57 +0000 (16:38 +0200)]
freedreno/a6xx: Add CP_ROQ_*_STAT

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>

16 months agofreedreno/a6xx: Rename CP_CSQ_IB*_STAT
Connor Abbott [Mon, 17 Oct 2022 14:22:52 +0000 (16:22 +0200)]
freedreno/a6xx: Rename CP_CSQ_IB*_STAT

These don't correspond to the a3xx *_STAT registers, which we're about
to add so we need to rename them. The closest analogue is CP_CSQ_AVAIL,
although the sense is inverted (and we're not sure what the low 16 bits
are about). Also, the a3xx distinction between CSQ and STQ doesn't exist
anymore so don't use these outdated terms.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19551>

16 months agoanv: implement emission of 3DSTATE_HS for Wa_1306463417
Tapani Pälli [Thu, 9 Feb 2023 15:29:28 +0000 (17:29 +0200)]
anv: implement emission of 3DSTATE_HS for Wa_1306463417

We need to emit 3DSTATE_HS for each primitive with tessellation.

Signed-off-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/21308>

16 months agoanv: limit generated draws to pipelines without HS stage
Tapani Pälli [Thu, 9 Feb 2023 15:26:40 +0000 (17:26 +0200)]
anv: limit generated draws to pipelines without HS stage

This is done for gfx11 specific workaround.

Signed-off-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/21308>

16 months agoanv: emit 3DSTATE_HS in cmd_buffer_flush_gfx_state
Tapani Pälli [Thu, 9 Feb 2023 14:34:54 +0000 (16:34 +0200)]
anv: emit 3DSTATE_HS in cmd_buffer_flush_gfx_state

Patch packs 3DSTATE_HS state during pipeline creation but it
gets emitted only before 3DPRIMITIVE. We will later need this
to implement a workaround.

Signed-off-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/21308>

16 months agoiris: implement emission of 3DSTATE_HS for Wa_1306463417
Tapani Pälli [Tue, 14 Feb 2023 09:23:29 +0000 (11:23 +0200)]
iris: implement emission of 3DSTATE_HS for Wa_1306463417

We need to emit 3DSTATE_HS for each primitive with tessellation.

Signed-off-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/21308>

16 months agomeson: update flex/bison requirement to cover all usages
Mark Collins [Thu, 23 Feb 2023 12:49:05 +0000 (12:49 +0000)]
meson: update flex/bison requirement to cover all usages

Meson silently drops outputs such as libvulkan-freedreno when
dependencies on flex/bison can't be satisfied rather than providing
an error which this commit fixes.

Signed-off-by: Mark Collins <mark@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21488>

16 months agogbm: drop unnecessary vulkan dependency
Eric Engestrom [Thu, 23 Feb 2023 13:24:16 +0000 (13:24 +0000)]
gbm: drop unnecessary vulkan dependency

gbm doesn't actually include vulkan headers

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21489>

16 months agoglx: include directly the useful vulkan header, instead of including everything
Eric Engestrom [Thu, 23 Feb 2023 13:21:56 +0000 (13:21 +0000)]
glx: include directly the useful vulkan header, instead of including everything

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21489>

16 months agoegl: include directly the useful vulkan header, instead of including everything
Eric Engestrom [Thu, 23 Feb 2023 13:21:22 +0000 (13:21 +0000)]
egl: include directly the useful vulkan header, instead of including everything

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21489>

16 months agoanv: process utrace payloads on queue submission
Chia-I Wu [Tue, 21 Feb 2023 22:56:39 +0000 (14:56 -0800)]
anv: process utrace payloads on queue submission

anv_QueuePresentKHR is not called by apps that do not use WSI.

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

16 months agopvr: Add support for dynamic buffers descriptors
Karmjit Mahil [Wed, 14 Dec 2022 17:32:51 +0000 (17:32 +0000)]
pvr: Add support for dynamic buffers descriptors

This is based on the new approach of having a descriptor set
addresses table in memory. To handle dynamic offsets provided on
vkCmdBindDescriptorSets() we duplicate the set with dynamic
descriptors, apply the offsets, and write the new bo's address
into the table. There are better ways of handling dynamic
descriptors but this implementation won't require many/if any
changes in the compiler code.

The descriptor set itself doesn't allocate and reserve space for
the dynamic descriptors since they would all be collected together
when creating the pipeline layout. While copying the descriptor
set we allocate extra space at the end for the dynamic primaries
and secondaries to account for that.

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

16 months agoci/intel: Update hasvk HSW xfails
Väinö Mäkelä [Thu, 23 Feb 2023 07:00:55 +0000 (09:00 +0200)]
ci/intel: Update hasvk HSW xfails

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

16 months agohasvk: Handle subpass self-dependencies for stencil shadow copies
Väinö Mäkelä [Sat, 19 Nov 2022 19:18:24 +0000 (21:18 +0200)]
hasvk: Handle subpass self-dependencies for stencil shadow copies

Always copying when dstAccessMask includes texture operations is not
optimal, but it's good enough.

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

16 months agohasvk: Mark VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL as stencil write optimal
Väinö Mäkelä [Sat, 19 Nov 2022 19:23:27 +0000 (21:23 +0200)]
hasvk: Mark VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL as stencil write optimal

VK_KHR_synchronization2 added VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL, which
was not previously recognized by vk_image_layout_stencil_write_optimal.

Would close https://gitlab.freedesktop.org/mesa/mesa/-/issues/5578 if it
wasn't already closed.

Fixes: b996fa8efaa ("anv: implement VK_KHR_synchronization2")

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

16 months agohasvk: Enable PixelShaderKillsPixel when omask is used
Väinö Mäkelä [Sat, 19 Nov 2022 19:06:20 +0000 (21:06 +0200)]
hasvk: Enable PixelShaderKillsPixel when omask is used

From the Haswell PRM Vol. 2b, 3DSTATE_WM::Pixel Shader Kill Pixel:
    "This bit is required to be ENABLED in the following situations:
     - The API pixel shader program contains "killpix" or "discard"
       instructions, or other code in the pixel shader kernel that can
       cause the final pixel mask to differ from the pixel mask received
       on dispatch.
     - A sampler with chroma key enabled with kill pixel mode is used by
       the pixel shader.
     - Any render target has Alpha Test Enable or AlphaToCoverage Enable
       enabled.
     - The pixel shader kernel generates and outputs oMask."

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

16 months agoaux/tc: add a 'has_resolve' member to tc_renderpass_info
Mike Blumenkrantz [Tue, 14 Feb 2023 18:10:28 +0000 (13:10 -0500)]
aux/tc: add a 'has_resolve' member to tc_renderpass_info

this indicates that the first color buffer gets resolved

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

16 months agoanv: fix invalid masking of 48bit address
Lionel Landwerlin [Thu, 23 Feb 2023 11:02:11 +0000 (13:02 +0200)]
anv: fix invalid masking of 48bit address

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4d05be49c253 ("anv: implement vkCmdTraceRaysIndirect2KHR")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21486>

16 months agointel/blorp: Allocate only necessary amount of VERTEX_BUFFER_STATE
José Roberto de Souza [Tue, 31 Jan 2023 18:57:35 +0000 (10:57 -0800)]
intel/blorp: Allocate only necessary amount of VERTEX_BUFFER_STATE

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21031>

16 months agointel: Make gen12 URB space reservation dependent on compute engine presence
José Roberto de Souza [Tue, 31 Jan 2023 20:52:33 +0000 (12:52 -0800)]
intel: Make gen12 URB space reservation dependent on compute engine presence

Tigerlake PRM: Volume 2c: Command Reference: Registers Part 2 - Registers M through Z
RCU_MODE :: Compute Engine Enable

   This bit indicates if Compute Engine (a.k.a Dual Context or Multi
   Context) is enabled or not. This bit must be treated as global
   control for enabling and disabling of compute engine. Hardware
   allocates required resources for the compute engine based on this
   bit.
   ....
   HW reserves 4KB of URB space...

Right now no gen12 platform has Dual Context enabled in kernel side,
exposing a compute engine but that can change, so here adding
has_compute_engine to intel_device_info and only reserving URB space
if compute engine is available.

While at it also fixing the error path when pb_slabs_init() fails.

Bspec: 46034
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21031>

16 months agopvr: Add push consts support to descriptor program.
Karmjit Mahil [Mon, 12 Dec 2022 15:45:17 +0000 (15:45 +0000)]
pvr: Add push consts support to descriptor program.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21387>

16 months agomeson: replace vk_wsi_args with dependencies to let meson take care of transitivity
Eric Engestrom [Thu, 3 Nov 2022 10:13:16 +0000 (10:13 +0000)]
meson: replace vk_wsi_args with dependencies to let meson take care of transitivity

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19497>

16 months agomeson: reuse vulkan_wsi_list for defining vk_wsi_args
Eric Engestrom [Thu, 3 Nov 2022 10:13:16 +0000 (10:13 +0000)]
meson: reuse vulkan_wsi_list for defining vk_wsi_args

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19497>

16 months agodocs: mention `meson configure` and drop broken workaround script
Eric Engestrom [Wed, 22 Feb 2023 16:00:35 +0000 (16:00 +0000)]
docs: mention `meson configure` and drop broken workaround script

The script is broken, and nobody noticed so it wasn't used much.

Meson has had support for printing the options by pointing to the source
dir for a while (not sure the exact version though) so I think we can
just recommend users do that.

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

16 months agodocs: mention the meson summary
Eric Engestrom [Wed, 22 Feb 2023 15:59:48 +0000 (15:59 +0000)]
docs: mention the meson summary

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

16 months agointel/compiler: remove unused field from fs_thread_payload
Marcin Ślusarz [Fri, 27 Jan 2023 15:57:15 +0000 (16:57 +0100)]
intel/compiler: remove unused field from fs_thread_payload

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20957>

16 months agor600: fix shader blob memory leak
Patrick Lerda [Fri, 17 Feb 2023 19:47:29 +0000 (20:47 +0100)]
r600: fix shader blob memory leak

Fixes: 5b205ef41307406983ffac829ae423d08f7527bc
   r600: Store nir shaders serialized to save memory

Direct leak of 4096 byte(s) in 1 object(s) allocated from:
    #0 0x7faf89c3bb48 in __interceptor_realloc (/usr/lib64/libasan.so.6+0xb1b48)
    #1 0x7faf7be5981d in grow_to_fit ../src/util/blob.c:67
    #2 0x7faf7be5a538 in grow_to_fit ../src/util/blob.c:49
    #3 0x7faf7be5a538 in blob_reserve_bytes ../src/util/blob.c:177
    #4 0x7faf7be5a538 in blob_reserve_uint32 ../src/util/blob.c:190
    #5 0x7faf7d248a8c in nir_serialize ../src/compiler/nir/nir_serialize.c:2109
    #6 0x7faf7df4fdbb in r600_pipe_shader_create ../src/gallium/drivers/r600/r600_shader.c:401

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21443>

16 months agovenus: Add VkBuffer cache statistics for debug
Juston Li [Thu, 16 Feb 2023 22:32:26 +0000 (14:32 -0800)]
venus: Add VkBuffer cache statistics for debug

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21324>

16 months agovenus: add VN_DEBUG_CACHE flag
Juston Li [Thu, 16 Feb 2023 22:31:57 +0000 (14:31 -0800)]
venus: add VN_DEBUG_CACHE flag

General debug flag for dumping statistics for various caching done by
venus.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21324>

16 months agovenus: switch to lazy VkBuffer cache
Juston Li [Thu, 9 Feb 2023 01:01:31 +0000 (17:01 -0800)]
venus: switch to lazy VkBuffer cache

Instead of creating a static VkBuffer cache at init with hardcoded
CreateInfo's, lazily cache VkBuffers that the app requests.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21324>

16 months agonir/deref: don't replace casts with deref_struct if we'd lose the stride
Karol Herbst [Wed, 22 Feb 2023 03:40:24 +0000 (04:40 +0100)]
nir/deref: don't replace casts with deref_struct if we'd lose the stride

The result might be used in a deref_ptr_as_array, which requires a proper
stride within lower_explicit_io. If we'd lose that information or end up
with a different stride don't execute this optimization.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8289
Fixes: b779baa9bf95 ("nir/deref: fix struct wrapper casts. (v3)")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21458>

16 months agoradeonsi/vcn: disable fence for JPEG decoding
Sajeesh Sidharthan [Tue, 21 Feb 2023 10:59:02 +0000 (16:29 +0530)]
radeonsi/vcn: disable fence for JPEG decoding

5e1bd07a is causing JPEG decoding regression issue.
Therefore, disable fence for JPEG decoding until fence issue is fixed.

Signed-off-by: Sajeesh Sidharthan <sajeesh.sidharthan@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21442>

16 months agov3d: update supertuxkart reference after 1c028a4d5b623e73bdf5
Eric Engestrom [Wed, 22 Feb 2023 11:07:48 +0000 (11:07 +0000)]
v3d: update supertuxkart reference after 1c028a4d5b623e73bdf5

The smoke effect now looks smoother instead of having hard steps, which
looks like a reasonable change given that 1c028a4d5b623e73bdf5 added
several float formats:
https://eric.pages.freedesktop.org/-/mesa/-/jobs/36691458/artifacts/results/summary/results/trace@broadcom-rpi4@supertuxkart@supertuxkart-mansion-egl-gles-v2.trace.html

Fixes: 1c028a4d5b623e73bdf5 ("v3d: support r{g,gba}16f formats for vertex buffers")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21462>

16 months agoiris: Avoid creating uncompressed view with unaligned tile offsets on BDW
Sviatoslav Peleshko [Mon, 6 Feb 2023 10:48:30 +0000 (12:48 +0200)]
iris: Avoid creating uncompressed view with unaligned tile offsets on BDW

Fixes: 60568d5d ("iris: Use isl_surf_get_uncompressed_surf")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7990
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21147>

16 months agodocs: update calendar for 22.3.6
Eric Engestrom [Wed, 22 Feb 2023 22:00:50 +0000 (22:00 +0000)]
docs: update calendar for 22.3.6

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

16 months agodocs/relnotes: add sha256sum for 22.3.6
Eric Engestrom [Wed, 22 Feb 2023 22:00:38 +0000 (22:00 +0000)]
docs/relnotes: add sha256sum for 22.3.6

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

16 months agodocs: add release notes for 22.3.6
Eric Engestrom [Wed, 22 Feb 2023 20:35:50 +0000 (20:35 +0000)]
docs: add release notes for 22.3.6

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

16 months agoglsl: Drop the (v.x + v.y + v.z + v.w) -> dot(v, 1.0) optimization.
Emma Anholt [Thu, 16 Feb 2023 01:11:24 +0000 (17:11 -0800)]
glsl: Drop the (v.x + v.y + v.z + v.w) -> dot(v, 1.0) optimization.

It's not connected up to anything at the moment, and even if I do enable
it for crocus HSW it only shaves 3 instructions off of one particular VS
in an old synthetic benchmark, not affecting anything else in shader-db.
I don't think anyone will care to ever fix or port this to NIR, let's just
retire it.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21353>

16 months agofreedreno/a6xx: Fix view_seqno in tex cache key
Rob Clark [Wed, 15 Feb 2023 22:06:17 +0000 (14:06 -0800)]
freedreno/a6xx: Fix view_seqno in tex cache key

If the view's seqno increments, it needs to happen *before* the tex cache
key is constructed.  Normally this happens when the sampler views are
bound.  But if the texture backing a current sampler view is rebound we
need to handle this before the cache lookup.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

16 months agofreedreno/a6xx: Static-ify sampler_view_update()
Rob Clark [Wed, 15 Feb 2023 22:01:03 +0000 (14:01 -0800)]
freedreno/a6xx: Static-ify sampler_view_update()

It doesn't need to be visible elsewhere since commit a93d3f14989
("freedreno/a6xx: Move tex state building")

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

16 months agofreedreno/a6xx: Small cleanup
Rob Clark [Wed, 15 Feb 2023 21:54:19 +0000 (13:54 -0800)]
freedreno/a6xx: Small cleanup

Move the rb allocation to the place where it is populated (ie. where we
know how large it must be).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

16 months agofreedreno/a6xx: Remove needs_invalidate flag
Rob Clark [Wed, 15 Feb 2023 20:03:01 +0000 (12:03 -0800)]
freedreno/a6xx: Remove needs_invalidate flag

Whether the rsc seqno has changed tells us whether we need to update.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

16 months agofreedreno/a6xx: Add a way to assert valid format
Rob Clark [Wed, 15 Feb 2023 19:48:44 +0000 (11:48 -0800)]
freedreno/a6xx: Add a way to assert valid format

Layout transitions caused by access as a various format must happen at
state bind time, before batch_draw_tracking().  Add a helper to assert
this fact.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

16 months agofreedreno/a6xx: Fix sampler view rsc_seqno for X32_S8X24
Rob Clark [Sun, 12 Feb 2023 17:57:50 +0000 (09:57 -0800)]
freedreno/a6xx: Fix sampler view rsc_seqno for X32_S8X24

Elsewhere we are comparing it against the seqno for the "primary" z32
buffer, so be consistent.  Otherwise we'll think we need to re-validate
every time the sampler view is bound.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

16 months agofreedreno/a6xx: Drop unneed fd6_texture_state() arg
Rob Clark [Sun, 12 Feb 2023 16:38:52 +0000 (08:38 -0800)]
freedreno/a6xx: Drop unneed fd6_texture_state() arg

It is redundant with shader type (stage).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

16 months agofreedreno/a6xx: Fix set_sampler_views(start != 0)
Rob Clark [Sat, 11 Feb 2023 20:36:25 +0000 (12:36 -0800)]
freedreno/a6xx: Fix set_sampler_views(start != 0)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

16 months agofreedreno/a6xx: Move rsc seqno out of tex cache key
Rob Clark [Sat, 11 Feb 2023 20:28:52 +0000 (12:28 -0800)]
freedreno/a6xx: Move rsc seqno out of tex cache key

Since we invalidate tex cache entries if an associated pipe_resource is
rebound, we don't rely on the rsc_seqno being part of the tex cache key.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21408>

16 months agoaco: fix pathological case in LdsDirectVALUHazard
Rhys Perry [Mon, 20 Feb 2023 14:37:33 +0000 (14:37 +0000)]
aco: fix pathological case in LdsDirectVALUHazard

Similar to bfd4ac4581bae0d36b2c58524131f91c7c0d27ce.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 296b4d95a3e ("aco/gfx11: workaround LdsDirectVALUHazard")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21423>

16 months agoamd,nir: remove byte_permute_amd intrinsic
Georg Lehmann [Tue, 21 Feb 2023 13:06:46 +0000 (14:06 +0100)]
amd,nir: remove byte_permute_amd intrinsic

It's unused and if we ever want to use it again we should make it an alu
opcode instead.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21445>

16 months agodocs: include explicit `setup` in instructions
Eric Engestrom [Wed, 22 Feb 2023 15:43:57 +0000 (15:43 +0000)]
docs: include explicit `setup` in instructions

The implicit `meson builddir/` is deprecated, and while we have fixed
our scripts, we forgot to update the docs we give our users ^^'

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21468>

16 months agoradeonsi/video: use specific PIPE_BIND_ value for video buffers
Pierre-Eric Pelloux-Prayer [Wed, 15 Feb 2023 14:18:52 +0000 (15:18 +0100)]
radeonsi/video: use specific PIPE_BIND_ value for video buffers

Since 13cb41f6662 PIPE_BIND_SHARED was used to allocate driver internal
video buffers. These buffers are never shared, but the intent was to
get non-suballocated buffers and SHARED was used as an indirect flag.

This commit switches to PIPE_BIND_CUSTOM which isn't used anywhere else,
and is now translated as "no suballocation".

The main benefit here is that this allows these buffers to set
use_reusable_pool to true reducing the CPU overhead a lot.

For instance, running the following command on my system:

   ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi \
       -i tears_of_steel_1080p.mov -an -c:v h264_vaapi output.mp4

takes 35 sec with this commit vs 45 sec without.

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

16 months agomesa: use mesa_log from output_if_debug
Chia-I Wu [Sat, 18 Feb 2023 02:15:45 +0000 (18:15 -0800)]
mesa: use mesa_log from output_if_debug

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21454>

16 months agomesa: add missing newlines for _mesa_debug/_mesa_log callers
Chia-I Wu [Sat, 18 Feb 2023 02:27:20 +0000 (18:27 -0800)]
mesa: add missing newlines for _mesa_debug/_mesa_log callers

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21454>

16 months agoutil/log: add logger_windbg
Chia-I Wu [Sat, 18 Feb 2023 01:44:29 +0000 (17:44 -0800)]
util/log: add logger_windbg

Because output_if_debug has it.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21454>

16 months agoutil/log: add support for MESA_LOG_FILE
Chia-I Wu [Sat, 18 Feb 2023 01:37:27 +0000 (17:37 -0800)]
util/log: add support for MESA_LOG_FILE

It allows logger_file to log to any file.

v2: check "geteuid() == getuid()"

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21454>

16 months agoutil/log: add logger_syslog
Chia-I Wu [Sat, 18 Feb 2023 00:15:21 +0000 (16:15 -0800)]
util/log: add logger_syslog

This is useful when the app is a daemon.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21454>

16 months agoutil/log: improve logger_android
Chia-I Wu [Fri, 17 Feb 2023 23:22:17 +0000 (15:22 -0800)]
util/log: improve logger_android

Avoid __android_log_vprint which can truncate messages.  Also add
MESA_LOG=wait to lower the chance of logger_android dropping messages.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21454>

16 months agoutil/log: improve logger_file newline handling
Chia-I Wu [Tue, 21 Feb 2023 18:02:35 +0000 (10:02 -0800)]
util/log: improve logger_file newline handling

Add logger_vasnprintf that will be used by other loggers.  For
logger_file, it improves newline handling for

  mesa_logd("%s", "hello\n");

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21454>

16 months agoutil/log: allow multiple loggers
Chia-I Wu [Fri, 17 Feb 2023 23:17:26 +0000 (15:17 -0800)]
util/log: allow multiple loggers

It still logs to logcat on Android and stderr otherwise by default.
MESA_LOG is introduced to override the loggers.

v2: add va_copy

Reviewed-by: Emma Anholt <emma@anholt.net> (v1)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21454>

16 months agoutil/log: refactor mesa_log
Chia-I Wu [Fri, 17 Feb 2023 22:58:02 +0000 (14:58 -0800)]
util/log: refactor mesa_log

Add logger_file and logger_android.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21454>

16 months agov3dv: handle ASPECT_MEMORY_PLANE aspect flags when getting plane number
Alejandro Piñeiro [Mon, 20 Feb 2023 22:40:12 +0000 (23:40 +0100)]
v3dv: handle ASPECT_MEMORY_PLANE aspect flags when getting plane number

As we support VK_EXT_image_drm_format_modifier, we could receive
VK_IMAGE_ASPECT_MEMORY_PLANE_0/1/2_BIT_EXT flags.

Fixes several tests like this:
dEQP-VK.drm_format_modifiers.create_explicit_modifier.*

when using CTS 1.3.5.0

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

16 months agoloader: do not check the mesa DRI_Mesa version if it was not found
Sebastian Wick [Mon, 20 Feb 2023 18:28:02 +0000 (19:28 +0100)]
loader: do not check the mesa DRI_Mesa version if it was not found

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Fixes: 1026d2934419 ("dri: Introduce internal Mesa DRI driver loader extension.")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21429>

16 months agonir: Skip samplers and textures in lower_explicit_io
Karol Herbst [Wed, 15 Feb 2023 21:34:46 +0000 (22:34 +0100)]
nir: Skip samplers and textures in lower_explicit_io

We have specialized lowering passes dealing with most of that already:
1. gl_nir_lower_samplers_as_deref
2. nir_lower_samplers
3. nir_lower_cl_images

If we need more than that, those passes can deal with following deref
chains as well.

We _might_ need to improve nir_lower_cl_images a bit for more complex
kernels, but CL also doesn't allow indirect images, so we are always able
to optimize the entire deref chain away.

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

16 months agorusticl: allocate printf buffer as staging
Karol Herbst [Wed, 16 Nov 2022 17:13:12 +0000 (18:13 +0100)]
rusticl: allocate printf buffer as staging

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

16 months agorusticl: no compute only
Karol Herbst [Fri, 30 Sep 2022 00:29:49 +0000 (02:29 +0200)]
rusticl: no compute only

This might be a good optimization, but we should figure first what drivers
should be able to disable and what not first.

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

16 months agorusticl/device: limit CL_DEVICE_MAX_CONSTANT_ARGS
Karol Herbst [Thu, 16 Feb 2023 14:46:30 +0000 (15:46 +0100)]
rusticl/device: limit CL_DEVICE_MAX_CONSTANT_ARGS

At the moment we implement constant memory as normal global memory, but
we still should limit to the actual constant buffer cap once we properly
use UBOs for that.

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

16 months agorusticl/device: fix some device limits
Karol Herbst [Thu, 29 Sep 2022 01:03:26 +0000 (03:03 +0200)]
rusticl/device: fix some device limits

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

16 months agollvmpipe/ci: increase deqp-runner timeout
Karol Herbst [Mon, 20 Feb 2023 13:34:46 +0000 (14:34 +0100)]
llvmpipe/ci: increase deqp-runner timeout

Some of the OpenCL tests are flaky, because they just take that long.
Builtins can generated really complex code and if we are unlucky they can
timeout.

Proper support for functions would also solve the issue, probably, but for
now increase the deqp-runner timeout so it's less of an annoyence.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20161>

16 months agoradv/ci: cleanup CI lists for dEQP-VK.memory.* tests that timeout
Samuel Pitoiset [Wed, 22 Feb 2023 11:44:33 +0000 (12:44 +0100)]
radv/ci: cleanup CI lists for dEQP-VK.memory.* tests that timeout

These tests usually take more than 30s to complete, so exclude them
completely instead. This should also make runs slightly faster.

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

16 months agobroadcom/ci: re-enable egl on wayland
Eric Engestrom [Mon, 13 Feb 2023 15:25:06 +0000 (15:25 +0000)]
broadcom/ci: re-enable egl on wayland

Swap them, as suggested by @enunes, to avoid a ton of timeouts in
wayland if the x11 tests ran first.

Needs to be investigated, but at least like this we can get the CI
coverage back.

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

16 months agobroadcom/ci: add two known failures
Eric Engestrom [Sat, 18 Feb 2023 13:02:32 +0000 (13:02 +0000)]
broadcom/ci: add two known failures

The first one in a Pass on both the rpi and the simulator, while the second
one is skipped as NotSupported on both. No idea why it's failing on the
CI, but at least it's consistently failing...

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

16 months agobroadcom/ci: skip buffer_age.no_preserve and swap_buffers_with_damage on wayland
Eric Engestrom [Mon, 13 Feb 2023 22:07:23 +0000 (22:07 +0000)]
broadcom/ci: skip buffer_age.no_preserve and swap_buffers_with_damage on wayland

They hang the runner, but they all pass fine on my rpi.
Will need investigating, but for now skip them.

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

16 months agobroadcom/ci: drop create_pixmap_surface from the fails; it passes now
Eric Engestrom [Sat, 18 Feb 2023 11:34:17 +0000 (11:34 +0000)]
broadcom/ci: drop create_pixmap_surface from the fails; it passes now

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

16 months agobroadcom/ci: add x11- prefix to x11 EGL tests
Eric Engestrom [Mon, 13 Feb 2023 15:25:06 +0000 (15:25 +0000)]
broadcom/ci: add x11- prefix to x11 EGL tests

Makes things more obvious now that we're enabling wayland as well.

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

16 months agozink: get rid of needless dependency
Erik Faye-Lund [Tue, 21 Feb 2023 09:36:01 +0000 (10:36 +0100)]
zink: get rid of needless dependency

We haven't needed this header since 7f56fd96550 ("zink: it's kopperin'
time"), so let's get rid of it and the dependency that comes with it.

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

16 months agozink: prefer vulkan_core.h over vulkan.h
Erik Faye-Lund [Fri, 17 Feb 2023 15:29:58 +0000 (16:29 +0100)]
zink: prefer vulkan_core.h over vulkan.h

There's just two places where we need any of the WSI specific vulkan
includes, the rest of Zink should do just fine with vulkan_core.h. So
let's include the win32-specific header explicitly in those two places,
and reduce the need for WSI specifics inside zink itself. Kopper
handles the rest of the WSI integration.

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

16 months agoanv: Use vk_acceleration_structure
Konstantin Seurer [Wed, 22 Feb 2023 10:23:51 +0000 (11:23 +0100)]
anv: Use vk_acceleration_structure

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

16 months agoradv: Use vk_acceleration_structure
Konstantin Seurer [Wed, 1 Feb 2023 10:01:52 +0000 (11:01 +0100)]
radv: Use vk_acceleration_structure

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

16 months agovulkan: Add vk_acceleration_structure
Konstantin Seurer [Wed, 1 Feb 2023 09:59:46 +0000 (10:59 +0100)]
vulkan: Add vk_acceleration_structure

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21047>

16 months agomeson: add basic support for loongarch
Sui Jingfeng [Wed, 8 Feb 2023 01:36:24 +0000 (09:36 +0800)]
meson: add basic support for loongarch

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21182>

16 months agoradv: set VS_OUT_MISC_SIDE_BUS_ENA for clip distances on GFX10.3+
Samuel Pitoiset [Tue, 21 Feb 2023 08:12:24 +0000 (09:12 +0100)]
radv: set VS_OUT_MISC_SIDE_BUS_ENA for clip distances on GFX10.3+

On GFX10.3, all auxiliary position exports are optimized, so set it
for clip/cull distances. Both RadeonSI and llpc set it too.

Suggested by Marek.

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

16 months agodriconf: add zink glthread disable for a game
Mike Blumenkrantz [Mon, 20 Feb 2023 16:03:42 +0000 (11:03 -0500)]
driconf: add zink glthread disable for a game

ref #8333

fixes #8328

cc: mesa-stable

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

16 months agozink: make ZINK_DESCRIPTOR_MODE=db the default
Mike Blumenkrantz [Fri, 17 Feb 2023 22:32:50 +0000 (17:32 -0500)]
zink: make ZINK_DESCRIPTOR_MODE=db the default

this has been getting beat up a lot lately by radv ci (and me),
so it should be ready to turn on by default for even more testing
in advance of the 23.1 release

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

16 months agozink: move db input attachment size check to screen init
Mike Blumenkrantz [Mon, 20 Feb 2023 13:51:31 +0000 (08:51 -0500)]
zink: move db input attachment size check to screen init

it'd be weird to crash later on after allowing db mode to init

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

16 months agoir3: Add cat7 sleep instruction
Danylo Piliaiev [Thu, 6 Jan 2022 14:24:20 +0000 (16:24 +0200)]
ir3: Add cat7 sleep instruction

Has short and long variants, long seem to be ~20 times longer.
The exact difference between it and a bunch of nops is unknown.

The emission of this instruction were not observed in the wild.

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

16 months agoir3: Add cat5/cat7 cache related instructions
Danylo Piliaiev [Thu, 6 Jan 2022 14:14:39 +0000 (16:14 +0200)]
ir3: Add cat5/cat7 cache related instructions

- tcinv - Likely Texture Cache Invalidate (unverified)
- icinv - Mostly sure that it is Instruction Cache Invalidate
- dccln - Data Cache Clean
- dcinv - Data Cache Invalidate
- dcflu - Data Cache Flush

The emission of these instructions were not observed in the wild.

TODO: find out the difference between .shr and .all modes of
      dccln, dcinv, dcflu.

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

16 months agodriconf/anv: Apply limit_trig_input_range WA to Rise of the Tomb Raider
Sviatoslav Peleshko [Fri, 17 Feb 2023 21:08:36 +0000 (23:08 +0200)]
driconf/anv: Apply limit_trig_input_range WA to Rise of the Tomb Raider

During its Ambient Occlusion calculations the game ends up calculating
sin/cos of some pretty big values, for which HW produces completely bogus
results (e.g. cos(3929491.25) ~= -0.011, while correct would be ~0.923).

Limit the arguments to the reasonable (-2*Pi; 2*Pi) range with the
limit_trig_input_range WA.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8292
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21396>

16 months agokopper: fix loop iterating for msaa texture creation
Mike Blumenkrantz [Tue, 21 Feb 2023 14:41:37 +0000 (09:41 -0500)]
kopper: fix loop iterating for msaa texture creation

the pipe_resource template values need to always be initialized or
else texture creation fails and rendering is broken

fixes #8331

cc: mesa-stable

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

16 months agosvga: use upload buffer if texture has pending changes
Charmaine Lee [Tue, 14 Feb 2023 01:47:39 +0000 (03:47 +0200)]
svga: use upload buffer if texture has pending changes

When establishing a texture transfer map, if there is any pending changes on the
texture, instead of trying direct map with DONTBLOCK first, just
use the upload buffer path.

Fixes piglit tests gen-teximages, arb_copy_images-formats

Cc: mesa-stable
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21393>

16 months agosvga: fix compatible formats for shareable surfaces
Charmaine Lee [Sat, 4 Feb 2023 02:24:19 +0000 (21:24 -0500)]
svga: fix compatible formats for shareable surfaces

Add typeless format to the compatible format lists for shareable surfaces.

Fixes webgl benchmark crash in eglCreateImage running from firefox on Fedora 37.

Cc: mesa-stable
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21393>

16 months agosvga: fix resource_get_handle from resource created without SHARED bind flag
Charmaine Lee [Wed, 8 Feb 2023 19:01:14 +0000 (14:01 -0500)]
svga: fix resource_get_handle from resource created without SHARED bind flag

When an EGLImage is created from a 2D texture and used for texture sharing,
the texture surface might not have been created with the SHARED bind flag.
To allow these surfaces for sharing, this patch sets the USAGE SHARED bit
for surfaces that can be potentially used for sharing even when the SHARED
bind flag is not originally set. Instead of unconditionally enabling the
SHARED bind flag for all surfaces and unnecessarily bypass the surface cache
optimization, this patch only enables the USAGE SHARED bit for surfaces
that also have the RENDER TARGET bind flag.
When the surface handle is inquired and if the surface is currently
marked as cachable, we will need to unset the cachable bit so
the surface handle will not be recycled again.

This patch fixes an assertion in svga_resource_get_handle() when the
EGL_MESA_image_dma_buf_export extension is used in webgl benchamrk running
from firefox in Fedora 37.

Cc: mesa-stable
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21393>

16 months agollvmpipe: only use accurate_a0 hack if there are no textures bound
Roland Scheidegger [Sat, 18 Feb 2023 16:11:04 +0000 (17:11 +0100)]
llvmpipe: only use accurate_a0 hack if there are no textures bound

This hack caused problems with some dx9 tests before (due to mipgen
test using nearest filter sampling with tex coords exactly between two
texels hence being extremely sensitive to arithmetic inaccuracies),
and we can no longer distinguish this by using pixel_offset to not get
it enabled. But to pass other tests we don't really need the hack when
there's texture sampling involved anyway.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21407>

16 months agobroadcom/ci: use weston's xwayland instead of starting X as well
Eric Engestrom [Mon, 13 Feb 2023 15:33:49 +0000 (15:33 +0000)]
broadcom/ci: use weston's xwayland instead of starting X as well

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

16 months agobroadcom/ci: group x11 and wayland variant of the same test failing
Eric Engestrom [Sat, 18 Feb 2023 21:03:58 +0000 (21:03 +0000)]
broadcom/ci: group x11 and wayland variant of the same test failing

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