platform/upstream/mesa.git
20 months agofreedreno/cffdec: Remove packet types
Rob Clark [Tue, 25 Oct 2022 16:35:06 +0000 (09:35 -0700)]
freedreno/cffdec: Remove packet types

These don't add any value.

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

20 months agofreedreno/cffdec: Remove dead code
Rob Clark [Tue, 25 Oct 2022 16:34:06 +0000 (09:34 -0700)]
freedreno/cffdec: Remove dead code

pkt2 is already handled further down the if/else ladder.

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

20 months agofreedreno/replay: Add option to override selected cmdstream
Danylo Piliaiev [Tue, 1 Nov 2022 16:16:36 +0000 (17:16 +0100)]
freedreno/replay: Add option to override selected cmdstream

This adds an option to override a single cmdstream while replaying
.rd capture. Cmdstream for override is stored in the same .rd format,
where there is only one RD_CMDSTREAM_ADDR section and any amount
of buffers.

Instead of using provided .rd file, 'replay' calls external program
to generate it first, in order to be able to pass the range of
GPU addresses available for the new buffers.

Usage example:
 ./replay --override=13 --generator=~/cmdstream_gen

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

20 months agofreedreno/decode: Print cmdstream idx
Danylo Piliaiev [Tue, 1 Nov 2022 14:20:10 +0000 (15:20 +0100)]
freedreno/decode: Print cmdstream idx

Will be useful later for cmdstream substitution.

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

20 months agofreedreno/decode: Move rd section parsing to a common header
Danylo Piliaiev [Thu, 27 Oct 2022 11:20:17 +0000 (13:20 +0200)]
freedreno/decode: Move rd section parsing to a common header

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

20 months agoi915g: fix typo in #if
Eric Engestrom [Thu, 27 Jun 2019 17:10:12 +0000 (18:10 +0100)]
i915g: fix typo in #if

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agoiris: s/#if/#ifdef/ to fix -Wundef
Eric Engestrom [Thu, 27 Jun 2019 16:51:10 +0000 (17:51 +0100)]
iris: s/#if/#ifdef/ to fix -Wundef

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agofreedredno: s/#if/#ifdef/ to fix -Wundef
Eric Engestrom [Thu, 27 Jun 2019 16:51:03 +0000 (17:51 +0100)]
freedredno: s/#if/#ifdef/ to fix -Wundef

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agofreedreno/ir3: fix -Wundef warning
Eric Engestrom [Tue, 25 Jun 2019 08:25:19 +0000 (09:25 +0100)]
freedreno/ir3: fix -Wundef warning

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agofreedreno: fix HAVE_FREEDRENO_KGSL check
Eric Engestrom [Tue, 25 Jun 2019 08:17:35 +0000 (09:17 +0100)]
freedreno: fix HAVE_FREEDRENO_KGSL check

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19963>

20 months agodocs: Mark VK_KHR_present_wait as supported.
Hans-Kristian Arntzen [Fri, 18 Nov 2022 18:30:18 +0000 (19:30 +0100)]
docs: Mark VK_KHR_present_wait as supported.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/x11: Rewrite wait logic for ANI/WaitForPresentKHR.
Hans-Kristian Arntzen [Wed, 26 Oct 2022 12:17:22 +0000 (14:17 +0200)]
wsi/x11: Rewrite wait logic for ANI/WaitForPresentKHR.

When we need to poll the XCB connection with a non-trivial timeout,
be very careful to not hit an XCB bug where a poll() may hang for too
long even if an event is ready in the special event queue.

This is a pragmatic workaround, a wait_for_special_event_with_timeout()
is the only proper solution here.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/x11: Mention problems with xcb_wait_for_special_event().
Hans-Kristian Arntzen [Wed, 26 Oct 2022 10:57:56 +0000 (12:57 +0200)]
wsi/x11: Mention problems with xcb_wait_for_special_event().

There is no pragmatic solution for this.
Comment about the rationale for doing it like this until we have a more
robust solution in XCB.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agoturnip: Conditionally enable VK_KHR_present_wait on Turnip.
Hans-Kristian Arntzen [Tue, 25 Oct 2022 09:22:25 +0000 (11:22 +0200)]
turnip: Conditionally enable VK_KHR_present_wait on Turnip.

Hide behind driconf.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Tested-by: Gabe Rowe <gaberowe@gmail.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agoanv: Conditionally expose VK_KHR_present_wait on ANV.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 11:48:30 +0000 (13:48 +0200)]
anv: Conditionally expose VK_KHR_present_wait on ANV.

Gate it behind driconf query for now.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agoradv: Conditionally expose VK_KHR_present_wait on RADV.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 11:48:11 +0000 (13:48 +0200)]
radv: Conditionally expose VK_KHR_present_wait on RADV.

Gate it behind driconf query for now.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/common: Allow present-wait to be unconditionally enabled.
Hans-Kristian Arntzen [Mon, 31 Oct 2022 15:00:04 +0000 (16:00 +0100)]
wsi/common: Allow present-wait to be unconditionally enabled.

If all potentially supported surface types support present wait,
we can expose the extension.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agodriconf: Add DRI configuration for exposing VK_KHR_present_wait.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 11:43:37 +0000 (13:43 +0200)]
driconf: Add DRI configuration for exposing VK_KHR_present_wait.

These extensions are flawed and do not support the concept of
per-surface queries. For the time being we cannot guarantee that we are
able to implement it on all surfaces, but the feature is useful enough
to make available as an opt-in feature for the time being, so hide it
behind an driconf until we have a better mechanism in place.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/display: Implement VK_KHR_present_wait on KHR_display swapchain.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 14:10:01 +0000 (16:10 +0200)]
wsi/display: Implement VK_KHR_present_wait on KHR_display swapchain.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agowsi/x11: Implement VK_KHR_present_wait on X11.
Hans-Kristian Arntzen [Fri, 21 Oct 2022 13:04:13 +0000 (15:04 +0200)]
wsi/x11: Implement VK_KHR_present_wait on X11.

Based on original implementation by Keith Packard in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12086.

Also fixes the implementation to work on IMMEDIATE and MAILBOX
presentation modes and Xwayland.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agovulkan/wsi: Add mechanism to wait for WSI semaphore unsignal.
Hans-Kristian Arntzen [Mon, 24 Oct 2022 12:47:51 +0000 (14:47 +0200)]
vulkan/wsi: Add mechanism to wait for WSI semaphore unsignal.

When vkWaitForPresentKHR succeeds, we are guaranteed
that any dependent semaphores have been unsignalled.

In an explicit sync world, we are guaranteed this automatically by
having a present complete, since that event must follow a semaphore wait
completion.

However, if the swapchain image is implicitly
synchronized, the semaphore might technically not have been unsignaled
before the present complete event triggers.

Present IDs must be signalled in monotonic order, same as timeline
semaphores.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agovulkan/wsi: Refactor out wsi_init_pthread_cond_monotonic.
Hans-Kristian Arntzen [Fri, 21 Oct 2022 13:00:32 +0000 (15:00 +0200)]
vulkan/wsi: Refactor out wsi_init_pthread_cond_monotonic.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agovulkan/wsi: Add stub interface for VK_KHR_present_wait
Daniel Stone [Wed, 11 May 2022 18:13:48 +0000 (19:13 +0100)]
vulkan/wsi: Add stub interface for VK_KHR_present_wait

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>

20 months agointel/fs: Accept an unsigned int in fs_reg::fs_reg
LingMan [Mon, 31 Oct 2022 17:41:35 +0000 (18:41 +0100)]
intel/fs: Accept an unsigned int in fs_reg::fs_reg

The parameter `nr` is currenlty an `int` but it only gets assigned to an
`unsigned int`. Make it clear in the function signature what's actually
required.

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

20 months agointel/fs: Preserve unsignedness in fs_visitor::split_virtual_grfs
LingMan [Mon, 31 Oct 2022 13:22:09 +0000 (14:22 +0100)]
intel/fs: Preserve unsignedness in fs_visitor::split_virtual_grfs

GCC 12.2.0 warns:
../src/intel/compiler/brw_fs.cpp: In member function ‘bool fs_visitor::
split_virtual_grfs()’:
../src/intel/compiler/brw_fs.cpp:2199:10: warning: ‘void* memset(void*, int,
size_t)’ specified size between 18446744071562067968 and 18446744073709551615
exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
 2199 |    memset(vgrf_has_split, 0, num_vars * sizeof(*vgrf_has_split));

`num_vars` is an `int` but gets assigned the value of `this->alloc.count`,
which is an `unsigned int`. Thus, `num_vars` will be negative if
`this->alloc.count` is larger than int max value. Converting that negative
`int` to a `size_t`, which `memset` expects, then blows it up to a huge
positive value.

Simply turning `num_vars` into an `unsigned int` would be enough to fix this
specific problem, but there are many other instances where an `unsigned int`
gets assigned to an `int` for no good reason in this function. Some of which
the compiler warns about now, some of which it doesn't warn about.

This turns all variables in `fs_visitor::split_virtual_grfs`, which should
reasonably be unsigned, into `unsigned int`s. While at it, a few now pointless
casts are removed.

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

20 months agointel: Disable SSE2 instruction set if building for non x86 architectures
Philippe Lecluse [Tue, 22 Nov 2022 15:27:46 +0000 (07:27 -0800)]
intel: Disable SSE2 instruction set if building for non x86 architectures

Signed-off-by: Philippe Lecluse <philippe.lecluse@intel.com>
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/19812>

20 months agointel: Add SUPPORT_INTEL_INTEGRATED_GPUS build argument
Philippe Lecluse [Tue, 22 Nov 2022 15:26:58 +0000 (07:26 -0800)]
intel: Add SUPPORT_INTEL_INTEGRATED_GPUS build argument

This is meant to remove any integrated GPU only code paths that can't
be compiled in CPU architectures different than x86.

Discrete GPUS don't have need_clflush set to true so it was just
matter of remove some code blocks around need_clflush but was left a
check in anv_physical_device_init_heaps() to fail physical device
initialization if it ever became false.

Signed-off-by: Philippe Lecluse <philippe.lecluse@intel.com>
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/19812>

20 months agovk/runtime: Fix narrowing of timeline signal and wait value to u32.
Hans-Kristian Arntzen [Wed, 23 Nov 2022 11:40:00 +0000 (12:40 +0100)]
vk/runtime: Fix narrowing of timeline signal and wait value to u32.

They are u64. Fixes deadlock in
dEQP-VK.wsi.xcb.present_id_wait.wait.past_no_timeout.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 9bffd81f1cb7 ("vulkan: Add common implementations of vkQueueSubmit
and vkQueueWaitIdle")

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19951>

20 months agor600/sb: Fix initialization order in sb_shader
Gert Wollny [Wed, 23 Nov 2022 14:41:40 +0000 (15:41 +0100)]
r600/sb: Fix initialization order in sb_shader

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

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19955>

20 months agonir/divergence: add missing btd_shader_type_intel
Lionel Landwerlin [Wed, 23 Nov 2022 08:56:49 +0000 (10:56 +0200)]
nir/divergence: add missing btd_shader_type_intel

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6d9ae6ec1eaa ("intel: add a new intrinsic to get the shader stage from bindless shaders")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19948>

20 months agoanv: generate correct addresses for state pool offsets
Lionel Landwerlin [Wed, 23 Nov 2022 07:21:36 +0000 (09:21 +0200)]
anv: generate correct addresses for state pool offsets

Fixes a number of CTS patterns on DG2 :

   - dEQP-VK.dynamic_rendering.primary_cmd_buff.random*
   - dEQP-VK.draw.*secondary_cmd*
   - dEQP-VK.dynamic_rendering.*secondary_cmd*
   - dEQP-VK.geometry.*secondary_cmd_buffer
   - dEQP-VK.multiview.*secondary_cmd*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9c1c1888d989 ("intel/fs: put scratch surface in the surface state heap")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19946>

20 months agoblorp: support negative offsets in addresses
Lionel Landwerlin [Wed, 23 Nov 2022 07:26:42 +0000 (09:26 +0200)]
blorp: support negative offsets in addresses

Similar to anv_address

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 9c1c1888d989 ("intel/fs: put scratch surface in the surface state heap")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19946>

20 months agovulkan/device-select-layer: drop wayland-protocols dep
Simon Ser [Mon, 21 Nov 2022 10:41:47 +0000 (11:41 +0100)]
vulkan/device-select-layer: drop wayland-protocols dep

wayland-protocols is not a library, it just contains a bunch of
XML files. No need to try to link to it.

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

20 months agopanfrost: drop wayland-protocols dep
Simon Ser [Mon, 21 Nov 2022 10:41:26 +0000 (11:41 +0100)]
panfrost: drop wayland-protocols dep

wayland-protocols is not a library, it just contains a bunch of
XML files. No need to try to link to it.

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

20 months agov3dv: drop wayland-protocols dep
Simon Ser [Mon, 21 Nov 2022 10:40:39 +0000 (11:40 +0100)]
v3dv: drop wayland-protocols dep

wayland-protocols is not a library, it just contains a bunch of
XML files. No need to try to link to it.

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

20 months agogallium/draw: do not use trig to compute tangent
Erik Faye-Lund [Tue, 22 Nov 2022 08:40:12 +0000 (09:40 +0100)]
gallium/draw: do not use trig to compute tangent

We've already done the expensive part of computing this without
trigenometry, e.g computing the length. So let's finish it off.

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

20 months agogallium/draw: properly fix short aalines
Erik Faye-Lund [Mon, 21 Nov 2022 12:28:00 +0000 (13:28 +0100)]
gallium/draw: properly fix short aalines

The fix we used to have for short smooth lines were incorrect, and
here's the real fix:

For lines shorter than one pixel, we need to clamp the length-wise
coverage to the line-length. That produces results that are consistent
with our approximation for longer lines.

Because we pass (length / 2) + 0.5 to the fragment shader instead of
the unmodified length, we need to spend a few instructions to
reconstruct the original width.

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

20 months agoaux/draw: vectorize aaline computations
Erik Faye-Lund [Mon, 21 Nov 2022 12:53:04 +0000 (13:53 +0100)]
aux/draw: vectorize aaline computations

This makes it a bit more similar to the TGSI version, which makes
modifying them easier to review.

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

20 months agodriconf: disable glthread for FINAL FANTASY XI
Jimi Huotari [Tue, 22 Nov 2022 16:59:14 +0000 (18:59 +0200)]
driconf: disable glthread for FINAL FANTASY XI

Enabling 'glthread' here causes textures to be missing/invisible.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7562
Signed-off-by: Jimi Huotari <chiitoo@gentoo.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19935>

20 months agoradv: fix number of PS samples with VK_AMD_mixed_attachment_samples
Samuel Pitoiset [Mon, 21 Nov 2022 17:40:56 +0000 (18:40 +0100)]
radv: fix number of PS samples with VK_AMD_mixed_attachment_samples

From the Vulkan spec:
    "If the VK_AMD_mixed_attachment_samples extension is enabled and
     the subpass uses color attachments, the samples value used to
     create each color attachment is used instead of
     rasterizationSamples."

Found by inspection, though I don't think this extension is widely
used.

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

20 months agoradv/ci: make use of the new VanGogh runners
Martin Roukala (né Peres) [Tue, 22 Nov 2022 13:38:42 +0000 (15:38 +0200)]
radv/ci: make use of the new VanGogh runners

I just added 3 new Steam Decks at my home CI, bringing the total count
to 5. Let's make use of 2 of these to reduce execution time in Mesa CI
and leave the last one available for DXVK-CI.

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

20 months agogenxml: forbid usage of L1CC_WBP/L1CC_UC for stateless messages
Lionel Landwerlin [Fri, 28 Oct 2022 22:39:04 +0000 (01:39 +0300)]
genxml: forbid usage of L1CC_WBP/L1CC_UC for stateless messages

We want to avoid those settings so that we do not have to emit a tile
fence to implement Wa_22013689345.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19322>

20 months agointel/fs: improve Wa_22013689345 workaround
Lionel Landwerlin [Tue, 16 Aug 2022 08:08:43 +0000 (08:08 +0000)]
intel/fs: improve Wa_22013689345 workaround

The initial implementation is a pretty big hammer. Implement the HW
recommendation to minimize cases in which we need a fence.

This improves by 10FPS on some of the Sascha Willems RT demos.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 6031ad4bf690 ("intel/fs: Add Wa_22013689345")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19322>

20 months agointel/perf: Fix memory leak.
Vinson Lee [Sun, 20 Nov 2022 21:53:06 +0000 (13:53 -0800)]
intel/perf: Fix memory leak.

Fix defect with Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable pass_array going out of scope leaks the storage it points to.

Fixes: d4cbb665067 ("intel/perf: support more than 64 queries")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19888>

20 months agoanv: Set 3DSTATE_RASTER API mode as recomended
José Roberto de Souza [Tue, 22 Nov 2022 16:04:58 +0000 (08:04 -0800)]
anv: Set 3DSTATE_RASTER API mode as recomended

TGL+ specification ask the API mode to be set to DX10.1 for Vulkan API.

BSpec: 46947
Reference: TGL PRMs, Volume 2d: Command Reference: Structures: 3DSTATE_RASTER_BODY
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19934>

20 months agovenus: enable VK_KHR_push_descriptor
Dawn Han [Wed, 5 Oct 2022 21:46:12 +0000 (21:46 +0000)]
venus: enable VK_KHR_push_descriptor

Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18988>

20 months agovenus: implement vkCmdPushDescriptorSetWithTemplateKHR
Dawn Han [Mon, 31 Oct 2022 21:19:42 +0000 (21:19 +0000)]
venus: implement vkCmdPushDescriptorSetWithTemplateKHR

Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18988>

20 months agovenus: extend VkPipelineLayout lifetime for batched VkCmdPushConstants()
Dawn Han [Tue, 22 Nov 2022 20:52:56 +0000 (20:52 +0000)]
venus: extend VkPipelineLayout lifetime for batched VkCmdPushConstants()

Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18988>

20 months agovenus: extend lifetime of push descriptor set layout
Dawn Han [Mon, 31 Oct 2022 21:15:31 +0000 (21:15 +0000)]
venus: extend lifetime of push descriptor set layout

Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18988>

20 months agoradeonsi/ci: update stoney fail -> flakes
David Heidelberg [Tue, 22 Nov 2022 23:29:53 +0000 (00:29 +0100)]
radeonsi/ci: update stoney fail -> flakes

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

20 months agoci: split arm_test into arm{hf,64}_test
David Heidelberg [Sat, 5 Nov 2022 13:36:43 +0000 (14:36 +0100)]
ci: split arm_test into arm{hf,64}_test

Every barebone arm or aarch64 job depends on these.
When experimenting with CI, this job drags both kernel+rootfs_arm64 and armhf,
even when the latter is not used.

This should speed up development and relieve one instance for about 30 minutes
and overlap between finishing kernel+rootfs_arm64 and armhf jobs per change.

Here are some size stats:
old arm_test   904M (32+64)
new arm64_test 579M (64bit)
new armhf_test 402M (32bit)
---
both     ~ 981M (overhead is 81M overall, but never used together so it's only cost "at rest")

Runtime of the arm*_test jobs is ~ 2 minutes.

Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: "Sergi Blanch Torné" <sergi.blanch.torne@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19550>

20 months agoci/iris: Drop EGL copyteximage2d.12 xfail.
Emma Anholt [Tue, 22 Nov 2022 19:39:24 +0000 (11:39 -0800)]
ci/iris: Drop EGL copyteximage2d.12 xfail.

It is still marked as a flake (along with other copyteximage cases) on all
these boards, so this will reduce the CI IRC channel noise given that we
actually expect a Pass.  I haven't found where exactly in history we went
from generally-fail to generally-pass, but it looks like around Feb 2022.

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

20 months agoci/llvmpipe: Add headless Wayland testing using weston.
Emma Anholt [Fri, 18 Nov 2022 01:16:06 +0000 (17:16 -0800)]
ci/llvmpipe: Add headless Wayland testing using weston.

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

20 months agoci/llvmpipe: Drop NIR stress testing from deqp-egl.
Emma Anholt [Fri, 18 Nov 2022 01:15:31 +0000 (17:15 -0800)]
ci/llvmpipe: Drop NIR stress testing from deqp-egl.

This was a pasteo from deqp-gles31.

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

20 months agoci/vc4,v3d: Add headless wayland testing using weston.
Emma Anholt [Fri, 18 Nov 2022 00:55:34 +0000 (16:55 -0800)]
ci/vc4,v3d: Add headless wayland testing using weston.

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

20 months agoci/iris: Add headless Wayland testing using weston.
Emma Anholt [Fri, 18 Nov 2022 00:53:14 +0000 (16:53 -0800)]
ci/iris: Add headless Wayland testing using weston.

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

20 months agoci/freedreno: Add wayland testing using weston.
Emma Anholt [Thu, 17 Nov 2022 22:53:33 +0000 (14:53 -0800)]
ci/freedreno: Add wayland testing using weston.

Take the old EGL job and make it a suite, stop segregating the reset tests
now that we assign reset blame appropriately, and add a variant using
headless weston.  This catches two failures we weren't covering before.

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

20 months agoci/freedreno: Drop EGL wide_color and create_context flakes.
Emma Anholt [Tue, 22 Nov 2022 18:57:16 +0000 (10:57 -0800)]
ci/freedreno: Drop EGL wide_color and create_context flakes.

Haven't seen them since May 2021, when my current set of IRC logs start.
The color_clears, render, and sharing.gles2 flakes are definitely still
there.

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

20 months agoci/freedreno: Expire an old robustness flake.
Emma Anholt [Tue, 22 Nov 2022 18:55:28 +0000 (10:55 -0800)]
ci/freedreno: Expire an old robustness flake.

Last happened in January, and Rob made great strides in reset stability
since then so I think it's gone.

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

20 months agoci/deqp-runner: Drop dead code for DEQP_CASELIST_FILTER.
Emma Anholt [Fri, 18 Nov 2022 00:46:39 +0000 (16:46 -0800)]
ci/deqp-runner: Drop dead code for DEQP_CASELIST_FILTER.

The last user is now gone.

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

20 months agoci/freedreno: Stop segregating reset tests from non-reset tests in EGL.
Emma Anholt [Fri, 18 Nov 2022 00:43:33 +0000 (16:43 -0800)]
ci/freedreno: Stop segregating reset tests from non-reset tests in EGL.

Now that we assign reset blame appropriately, they're safe to run
together, and no single-threading.  I put these in a .toml because I'm
about to add another window system.

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

20 months agoci: Add weston to our rootfses for wayland testing.
Emma Anholt [Thu, 17 Nov 2022 19:13:42 +0000 (11:13 -0800)]
ci: Add weston to our rootfses for wayland testing.

We want to be able to test the wayland EGL platform code in Mesa, which
has had no coverage yet.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19912>

20 months agoci/softpipe: Add another blit flake.
Emma Anholt [Tue, 22 Nov 2022 18:41:53 +0000 (10:41 -0800)]
ci/softpipe: Add another blit flake.

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

20 months agoci/llvmpipe: Update some flakes/skips from IRC logs.
Emma Anholt [Fri, 18 Nov 2022 22:58:44 +0000 (14:58 -0800)]
ci/llvmpipe: Update some flakes/skips from IRC logs.

Acked-by: David Heidelberg <david.heidelberg@collabora.com> (prev version)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19912>

20 months agor600/sfn: allow building with clang 6 (Android 9)
Mauro Rossi [Mon, 7 Nov 2022 00:57:02 +0000 (01:57 +0100)]
r600/sfn: allow building with clang 6 (Android 9)

static constexpr const 'value' is replaced by static function
in all type_char template specializations
to avoid the following building errors happening with clang 6

/home/utente/pie-x86_kernel/prebuilts/clang/host/linux-x86/clang-4691093/bin/ld.lld: error: undefined symbol: r600::type_char<r600::ExportInstr>::value
>>> referenced by sfn_scheduler.cpp
>>>               sfn_sfn_scheduler.cpp.o:(bool r600::BlockSheduler::collect_ready_type<r600::ExportInstr>(std::__1::list<r600::ExportInstr*, std::__1::allocator<r600::ExportInstr*> >&, std::__1::list<r600::ExportInstr*, std::__1::allocator<r600::ExportInstr*> >&)) in archive src/gallium/drivers/r600/libr600.a
...
/home/utente/pie-x86_kernel/prebuilts/clang/host/linux-x86/clang-4691093/bin/ld.lld: error: undefined symbol: r600::type_char<r600::RatInstr>::value
>>> referenced by sfn_scheduler.cpp
>>>               sfn_sfn_scheduler.cpp.o:(bool r600::BlockSheduler::collect_ready_type<r600::RatInstr>(std::__1::list<r600::RatInstr*, std::__1::allocator<r600::RatInstr*> >&, std::__1::list<r600::RatInstr*, std::__1::allocator<r600::RatInstr*> >&)) in archive src/gallium/drivers/r600/libr600.a
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)

Cc: "22.2" "22.3" mesa-stable
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19873>

20 months agoaco: fix emitting DEALLOC_VGPRS in the discard block
Samuel Pitoiset [Tue, 22 Nov 2022 15:49:13 +0000 (16:49 +0100)]
aco: fix emitting DEALLOC_VGPRS in the discard block

It should be emitted right before s_endpgm.

Cc: 22.3 mesa-stable
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/19931>

20 months agoradv: fix possible hangs with NGG streamout and secondary cmdbuf
Samuel Pitoiset [Thu, 17 Nov 2022 04:43:33 +0000 (04:43 +0000)]
radv: fix possible hangs with NGG streamout and secondary cmdbuf

This was missing but it might hang if streamout is used only in
secondary command buffers.
Found by inspection.

Cc: 22.3 mesa-stable
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/19801>

20 months agoradv: fix NGG streamout when it's never enabled in runtime
Samuel Pitoiset [Thu, 17 Nov 2022 04:46:43 +0000 (04:46 +0000)]
radv: fix NGG streamout when it's never enabled in runtime

If a shader has XFB outputs but the application never enables
streamout in runtime (no buffers bound and no begin/end pair), we
have to disable it in the shader by emitting buffer size as 0. It's
also still needed to remember that the cmdbuf needs GDS/GDS OA BOs,
so move this at pipeline bind time instead.

Cc: 22.3 mesa-stable
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/19801>

20 months agoradv: re-mit streamout buffers to unbind them when NGG streamout is disabled
Samuel Pitoiset [Thu, 17 Nov 2022 09:43:21 +0000 (10:43 +0100)]
radv: re-mit streamout buffers to unbind them when NGG streamout is disabled

A buffer size as 0 acts like if streamout is disabled with NGG.

Cc: 22.3 mesa-stable
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/19801>

20 months agoradv: enable NGG XFB queries only if streamout is enabled
Samuel Pitoiset [Thu, 17 Nov 2022 09:40:01 +0000 (10:40 +0100)]
radv: enable NGG XFB queries only if streamout is enabled

Otherwise, it's possible to increase counters if a shader has XFB but
the application paused it.

Cc: 22.3 mesa-stable
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/19801>

20 months agoradv: fix computing the pervertex LDS size with NGG streamout
Samuel Pitoiset [Thu, 17 Nov 2022 07:07:25 +0000 (08:07 +0100)]
radv: fix computing the pervertex LDS size with NGG streamout

The NGG streamout lowering pass allocates space for all outputs which
means we have to align our computation. Otherwise, the maximum number
of vertices is incorrect and we end up by reaching the maximum allowed
LDS size. This code could be shared instead of being duplicated but
that's for later.

Fixes some transform feedback tests with Zink and
RADV_PERFTEST=ngg_streamout on GFX10.3.

Cc: 22.3 mesa-stable
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/19801>

20 months agoradv: stop overallocating LDS for VS/TES when NGG streamout is enabled
Samuel Pitoiset [Thu, 17 Nov 2022 06:53:24 +0000 (07:53 +0100)]
radv: stop overallocating LDS for VS/TES when NGG streamout is enabled

The number of shader outputs should only be considered when the
shader has XFB, otherwise we are overallocating LDS.

fossils-db (GFX1100):
Totals from 16602 (12.31% of 134913) affected shaders:
LDS: 17000448 -> 8500224 (-50.00%)

Cc: 22.3 mesa-stable
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/19801>

20 months agoadd zink to macos ci
noasakurajin [Fri, 4 Nov 2022 16:39:10 +0000 (16:39 +0000)]
add zink to macos ci

 This commit causes zink to be build in the macos ci on every commit.
 In addition to that meson will now error if there is no moltenvk-dir
 given on macos since the build would fail anyways.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19531>

20 months agoetnaviv: nir: lower extract byte/word
Christian Gmeiner [Tue, 15 Nov 2022 12:14:15 +0000 (13:14 +0100)]
etnaviv: nir: lower extract byte/word

Fixes e.g. 'Unhandled ALU op: extract_u16' seen with deqp on gc7000.

Cc: 22.3 mesa-stable
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19776>

20 months agoetnaviv: Support negative float inline immediates
Christian Gmeiner [Fri, 11 Nov 2022 18:05:24 +0000 (19:05 +0100)]
etnaviv: Support negative float inline immediates

Closes: #7652
Fixes: 45a111c21c2 ("nir/opt_algebraic: Fuse c - a * b to FMA")
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19776>

20 months agoetnaviv: fix NULL pointer dereference in TS allocation
Lucas Stach [Tue, 22 Nov 2022 09:21:43 +0000 (10:21 +0100)]
etnaviv: fix NULL pointer dereference in TS allocation

Commit c2b06e1a3820 ("etnaviv: add support for sharing the TS buffer")
introduced a problem similar to the one fixed in 3b3cd5128672 ("etnaviv:
fix renderonly check in etna_resource_alloc") in a different code path.
This causes a NULL pointer dereference when the screen is instanciated
on the render node. Fix it in the same way by just checking for a valid
pointer.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19923>

20 months agoanv: enable sample location enable dynamic state
Lionel Landwerlin [Tue, 22 Nov 2022 10:22:06 +0000 (12:22 +0200)]
anv: enable sample location enable dynamic state

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

20 months agomicrosoft/nir_to_dxil: Avoid emitting SampleCmpLevel prior to SM 6.7 if possible
Pedro J. Estébanez [Mon, 21 Nov 2022 11:56:37 +0000 (12:56 +0100)]
microsoft/nir_to_dxil: Avoid emitting SampleCmpLevel prior to SM 6.7 if possible

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

20 months agorusticl: Emit build-id in libRusticlOpenCL
Tomeu Vizoso [Tue, 22 Nov 2022 11:39:53 +0000 (12:39 +0100)]
rusticl: Emit build-id in libRusticlOpenCL

Drivers may need it for their on-disk shader caches.

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

20 months agov3d: make format/modifier logic easier to read
Eric Engestrom [Mon, 21 Nov 2022 15:37:54 +0000 (15:37 +0000)]
v3d: make format/modifier logic easier to read

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19900>

20 months agonir: convert nir_opt_idiv_const to nir_shader_instructions_pass
Constantine Shablya [Sun, 20 Nov 2022 11:06:17 +0000 (13:06 +0200)]
nir: convert nir_opt_idiv_const to nir_shader_instructions_pass

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19881>

20 months agoetnaviv: remove use of flush_seqno as trigger for texture cache invalidate
Lucas Stach [Wed, 16 Nov 2022 16:15:07 +0000 (17:15 +0100)]
etnaviv: remove use of flush_seqno as trigger for texture cache invalidate

The flush_seqno is only to be used/updated when a dirty tile status has
been written back to the resource. Using it as a marker to trigger a
texture cache invalidation is bogus and not actually needed. When the
texture resource is updated via a mapping or blit the texture cache
invalidation is already triggered by marking the caches as dirty. If the
resource is updated by fragment output, OpenGL explicitly defines the
result of a later texture read as undefined unless a TextureBarrier is
inserted, which also properly triggers the texture cache invalidate.

Also the current check is bogus as it doesn't handle seqno wraparound.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19800>

20 months agoetnaviv: mark texture caches as dirty when blitting into a sampler resource
Lucas Stach [Wed, 16 Nov 2022 16:27:38 +0000 (17:27 +0100)]
etnaviv: mark texture caches as dirty when blitting into a sampler resource

Same as with resource mappings the blit can target a resource that may be
cached in the texture cache. Mark the cache as dirty to make sure it is
invalidated before the next draw.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19800>

20 months agoetnaviv: drop useless ts_for_sampler_view pointer check
Lucas Stach [Wed, 16 Nov 2022 15:24:54 +0000 (16:24 +0100)]
etnaviv: drop useless ts_for_sampler_view pointer check

Both state and desc texture implementations set this function pointer,
so there is no point in guarding against its absence.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19800>

20 months agost/mesa: suppress async glthread flushing for GLX_EXT_texture_from_pixmap
Marek Olšák [Thu, 17 Nov 2022 13:31:33 +0000 (08:31 -0500)]
st/mesa: suppress async glthread flushing for GLX_EXT_texture_from_pixmap

This might fix some window system issues.

Fixes: 3da170faaec - glthread: change when glFlush flushes asynchronously

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

20 months agoutil/glsl2spirv: don't store preprocessed files in source tree
Lionel Landwerlin [Sun, 20 Nov 2022 22:00:22 +0000 (00:00 +0200)]
util/glsl2spirv: don't store preprocessed files in source tree

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19893>

20 months agofreedreno,tu,ir3: DCE ij_pix
Danylo Piliaiev [Thu, 10 Nov 2022 14:40:48 +0000 (15:40 +0100)]
freedreno,tu,ir3: DCE ij_pix

SP_FS_PREFETCH_CNTL.IJ_WRITE_DISABLE allows disabling ij write, so
now we could DCE it.

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

20 months agofreedreno,tu: Update SP_FS_PREFETCH,SP_FS_PREFETCH_CNTL regs definition
Danylo Piliaiev [Thu, 10 Nov 2022 14:38:28 +0000 (15:38 +0100)]
freedreno,tu: Update SP_FS_PREFETCH,SP_FS_PREFETCH_CNTL regs definition

Reverse engineer more fields of these regs.

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

20 months agomesa: add unlikely() and adjust error handling in BindBuffer
Marek Olšák [Fri, 18 Nov 2022 10:13:42 +0000 (05:13 -0500)]
mesa: add unlikely() and adjust error handling in BindBuffer

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19844>

20 months agomesa: add no_error support into get_buffer_target()
Marek Olšák [Thu, 17 Nov 2022 17:02:16 +0000 (12:02 -0500)]
mesa: add no_error support into get_buffer_target()

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19844>

20 months agomesa: remove ctx->Extensions.EXT_pixel_buffer_object capability flag
Marek Olšák [Thu, 17 Nov 2022 16:15:56 +0000 (11:15 -0500)]
mesa: remove ctx->Extensions.EXT_pixel_buffer_object capability flag

to get rid of the fail path in get_buffer_target.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19844>

20 months agoetnaviv: fix tile status interaction with write mappings
Lucas Stach [Fri, 18 Nov 2022 11:24:58 +0000 (12:24 +0100)]
etnaviv: fix tile status interaction with write mappings

This fixes a longstanding bug in the interaction between TS and a write
mapping. The write does not update TS regardless of the way the update
is done. Update via etna_copy_resource would just set the target ts_valid
to false without actually writing back any dirty TS to the resource.
Writes via the CPU would update the resource, but keep ts_valid at true
even if the tile status may now not match the actually written tiles of
the resource anymore.

Fix this by writing back a dirty TS to the target resource if needed
before updating the level with the write data. Always invalidate TS,
even when the update is done by the CPU.

Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19846>

20 months agoanv: fixup context initialization on DG2
Lionel Landwerlin [Tue, 22 Nov 2022 08:47:58 +0000 (10:47 +0200)]
anv: fixup context initialization on DG2

Fixing a typo :(

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 507a86e131d6 ("anv: ensure CPS is initialized when KHR_fragment_shading_rate is disabled")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19922>

20 months agoCODEOWNERS: add MTCoster as an Imagination maintainer
Frank Binns [Thu, 17 Nov 2022 11:36:53 +0000 (11:36 +0000)]
CODEOWNERS: add MTCoster as an Imagination maintainer

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19845>

20 months agoutil: Remove EXPLICIT_CONVERSION macro and use c++11 explicit directly
Yonggang Luo [Mon, 21 Nov 2022 11:01:50 +0000 (19:01 +0800)]
util: Remove EXPLICIT_CONVERSION macro and use c++11 explicit directly

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

20 months agotree-wide: Fixes multi-line macro width after replace to __func__
Yonggang Luo [Sun, 20 Nov 2022 04:50:41 +0000 (12:50 +0800)]
tree-wide: Fixes multi-line macro width after replace to __func__

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19861>

20 months agogallium: __FUNCTION__ now never be used, remove it
Yonggang Luo [Thu, 17 Nov 2022 21:40:21 +0000 (05:40 +0800)]
gallium: __FUNCTION__ now never be used, remove it

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19861>

20 months agogallium: Replace the usage of __FUNCTION__ with __func__ in all gallium code
Yonggang Luo [Thu, 17 Nov 2022 21:39:49 +0000 (05:39 +0800)]
gallium: Replace the usage of __FUNCTION__ with __func__ in all gallium code

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19861>

20 months agotree-wide: Use __func__ instead of __FUNCTION__ in non-gallium code
Yonggang Luo [Thu, 17 Nov 2022 21:38:36 +0000 (05:38 +0800)]
tree-wide: Use __func__ instead of __FUNCTION__ in non-gallium code

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19861>

20 months agomeson: do not use source_root() when possible
Danylo Piliaiev [Tue, 1 Nov 2022 16:42:08 +0000 (17:42 +0100)]
meson: do not use source_root() when possible

source_root() function is deprecated in Meson version 0.56.0 because
it returns the source root of the parent project if called from a
subproject.

Why would anyone need Mesa as a meson subproject?
It would be used as subproject in a project generated by command buffer
"decompiler" for Freedreno.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19901>