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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Qiang Yu [Sat, 19 Nov 2022 09:48:22 +0000 (17:48 +0800)]
ac/nir/cull: fix culling for lines
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19868>
Qiang Yu [Thu, 17 Nov 2022 02:17:21 +0000 (10:17 +0800)]
ac/nir/ngg,radv: use intrinsic base for instance_rate_inputs check
radeonsi use packed location base while radv use un-packed location.
So we adjust instance_rate_inputs in each driver to hide the difference.
Note the attribute slot number is less than 16, so we can shift
instance_rate_inputs in radv by VERT_ATTRIB_GENERIC0 which is 16.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19868>
Jason Ekstrand [Thu, 17 Nov 2022 16:40:58 +0000 (10:40 -0600)]
vulkan: Add a dummy vk_common_CmdSetColorBlendAdvancedEXT()
The entrypoint needs to exist but we don't need to do anything with it.
Fixes:
13c422e1b2ed ("anv: toggle on EXT_extended_dynamic_state3")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19817>
Jason Ekstrand [Thu, 17 Nov 2022 16:39:05 +0000 (10:39 -0600)]
vulkan: Add a common implementation of CmdSetSampleLocationsEnableEXT
Fixes:
13c422e1b2ed ("anv: toggle on EXT_extended_dynamic_state3")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19817>
Jason Ekstrand [Thu, 17 Nov 2022 16:35:49 +0000 (10:35 -0600)]
vulkan: Add state for extraPrimitiveOverestimationSize
Fixes:
13c422e1b2ed ("anv: toggle on EXT_extended_dynamic_state3")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19817>
Karol Herbst [Sat, 12 Nov 2022 16:10:59 +0000 (17:10 +0100)]
rusticl: advertise conformance on 12th Intel iGPUs
Submission can be found here:
https://www.khronos.org/conformance/adopters/conformant-products/opencl#submission_405
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Hard-reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19699>
Lionel Landwerlin [Sat, 19 Nov 2022 01:35:27 +0000 (03:35 +0200)]
anv: ensure CPS is initialized when KHR_fragment_shading_rate is disabled
We need to set CPS_MODE_NONE when no per coarse pixel dispatch.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
231651fd89fb ("anv: implement VK_KHR_fragment_shading_rate")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19867>
Lionel Landwerlin [Sat, 19 Nov 2022 12:29:43 +0000 (14:29 +0200)]
anv: fix 3d state initialization
We missed a couple of restriction leading to inconsistent 3d pipeline
state. It is mostly noticeable when doing a multiple sample dispatch
as the verify first 3d operation.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7531
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19867>
Ian Romanick [Mon, 9 Aug 2021 22:05:33 +0000 (15:05 -0700)]
nir/loop_analyze: Fix get_iteration for nir_op_fneu
Consider the loop:
float i = 0.0;
while (true) {
if (i != 0.0)
break;
i = i + 1.0;
}
This loop clearly executes exactly one time.
Some trickery is necessary to handle cases where the initial loop value
is very large and the increment is, by comparison, very small. From the
fenu_once test case,
float i = -
604462909807314587353088.0;
while (true) {
if (i != -
604462909807314587353088.0)
break;
i = i +
36028797018963968.0;
}
This loop should also execute exactly once, but this is much more
challenging to calculate due to precision issues.
Going towards smaller magnitude (i.e., adding a small positive value to
a large negative value) requires a smaller delta to make a difference
than going towards a larger magnitude. For this reason,
-
604462909807314587353088.0 +
36028797018963968.0 !=
-
604462909807314587353088.0, but -
604462909807314587353088.0 +
-
36028797018963968.0 == -
604462909807314587353088.0. Math class is
tough.
No changes in shader-db or fossil-db.
v2: Fix major bug in checking result of the eval_const_binop(nir_op_feq,
...) discovered while developing fneu_once_easy unit test. Fix a typo in
the comment just above that. Add fneu_once_easy test.
v3: Skip the iteration count adjustment tests for nir_op_fenu and
nir_op_ine. Since the iteration count is either 1 or unknown, all this
function can do is add numerical error. Add fenu_once tests.
v4: Change the initial value in the fneu_once test from large positive
to large negative. Change check in get_iteration from nir_op_fsub to
nir_op_fadd. Both changes from discussion with M Henning. Also add some
more explanation in fneu_once.
v5: Rename test cases.
Fixes:
6772a17acc8 ("nir: Add a loop analysis pass")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19732>
Ian Romanick [Mon, 9 Aug 2021 22:05:33 +0000 (15:05 -0700)]
nir/loop_analyze: Fix get_iteration for nir_op_ine
I discovered this problem because adding an algebraic transformation to
convert some uge and ult to ieq or ine caused a couple loops to stop
unrolling. Consider the loop:
uint i = 0;
while (true) {
if (i >= 1)
break;
i++;
}
This loop clearly executes exactly one time. Note that uge(x, 1) is
equivalent to ine(x, 0). Changing the condition to 'if (i != 0)' will
also execute exactly one time.
In the added test cases, uge_once correctly get an exact loop trip count
of 1. Without the changes to nir_loop_analyze.c, the ine_once case
detects a maximum loop trip count of zero and does not get an exact loop
trip count.
No changes in shader-db or fossil-db.
v2: Move nir_op_fneu changes to a separate commit.
v3: Rename test cases.
Fixes:
6772a17acc8 ("nir: Add a loop analysis pass")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19732>
Ian Romanick [Tue, 15 Nov 2022 03:07:06 +0000 (19:07 -0800)]
nir/loop_analyze: Add basic unit test framework
This test comes from a comment in the loop analysis code.
The ine_zero test checks that zero iteration loops involving ine are
correctly identified.
v2: Add ine_zero test. Suggested by Tim.
v3: Rename test cases.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19732>
Karol Herbst [Sat, 19 Nov 2022 20:44:28 +0000 (21:44 +0100)]
rusticl/device: put space at the end of CL_DEVICE_VERSION
Apparently some software relies on that and the spec kind of says it's
there.
Fixes:
20c90fed5a0 ("rusticl: added")
Reported-by: sobkas
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19872>
Adam Jackson [Mon, 21 Nov 2022 20:46:03 +0000 (15:46 -0500)]
egl: Fix uninitialized variable warning
Fedora's gcc 12.2.1 says:
../src/egl/main/eglapi.c: In function ‘eglDupNativeFenceFDANDROID’:
../src/egl/main/eglapi.c:2268:11: warning: ‘ret’ may be used uninitialized [-Wmaybe-uninitialized]
2268 | EGLint ret;
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19913>
Pavel Ondračka [Wed, 16 Nov 2022 21:09:50 +0000 (22:09 +0100)]
r300: don't reuse destination registers when lowering
Regalloc can sort it out later. No significant change is shader-db, the
one instruction reduction is likely because some optimize pass can
actually work better when we are closer to ssa-like form.
RV530:
total instructions in shared programs: 133718 -> 133717 (<.01%)
instructions in affected programs: 47 -> 46 (-2.13%)
helped: 1
HURT: 0
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Tested-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19853>
Pavel Ondračka [Fri, 7 Oct 2022 20:02:40 +0000 (22:02 +0200)]
r300: simplify rc_find_free_temporary
Back when we had a stupid register allocator we did a lot of tricks to
optimize the register usage. The old version of rc_find_free_temporary
did a full program search each time it was called to find out what
registers and channels are actually used and than used that info to give
us the first free register to use.
Now that we have a proper register allocator both for vertex and
fragment shaders, this is no longer needed. Just scan the program when
called for the first time to find the first unused temporary index and
than increment by one everytime. Regalloc can sort it out later.
No change in shader-db confirms this assumption is sound.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Tested-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19853>
Rob Clark [Tue, 15 Nov 2022 17:19:19 +0000 (09:19 -0800)]
freedreno/a6xx: Remove unneeded MSAA clear fallback
This was added in commit
911ce374caf ("freedreno/a6xx: Fix MSAA clear"),
but the only case that can't handle fast-clear is sysmem blitter clear
path.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19884>