Commit Graph

183639 Commits

Author SHA1 Message Date
Frank Binns
7d67debc2e CODEOWNERS: update Imagination maintainers
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27145>
2024-01-19 10:26:15 +00:00
Eric Engestrom
7c4a797bc9 amd/ci: add flakes seen today
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27149>
2024-01-19 10:08:27 +00:00
Eric Engestrom
dcc8c8aa4a radv/ci: sort navi21 flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27149>
2024-01-19 10:08:27 +00:00
antonino
14345c4dd6 zink: plug leak in zink_create_quads_emulation_gs
When the shader is freed xfb info should be freed as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27093>
2024-01-19 09:10:29 +00:00
Alyssa Rosenzweig
3a72fc1cb7 nir/passthrough_gs: plug leak
freeing the nir shader should free the xfb info too. found with valgrind
leakcheck.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27093>
2024-01-19 09:10:29 +00:00
Pavel Ondračka
15e7c63272 r300: remove R3xx/R4xx backend absulute modifier lowering
This is done in NIR already.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26848>
2024-01-19 08:35:48 +00:00
Pavel Ondračka
78404cc57d r300: skip backend DCE for vertex shaders
Only mark the unused channels according to the writemask for now, but
this can go as well when we translate directly form NIR. Right now we
still need to do this separatelly as TGSI has no concept of unused
swizzle.

The old DCE pass was known to be buggy, so this also fixes at least
piglit glsl-vs-copy-propagation-1.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9279
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26848>
2024-01-19 08:35:48 +00:00
Pavel Ondračka
0e2e4688af r300: fix writemask for nir_intrinsic_load_ubo_vec4
load_ubo_vec4 has always 4 components, however when translating to TGSI
just set the writemask according to the channels that are actually used
later. This is now done by deadcode analysis, but that one is going away
soon.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26848>
2024-01-19 08:35:48 +00:00
Friedrich Vock
43bdfebbff radv: Fix shader replay allocation condition
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26891>
2024-01-19 08:15:12 +00:00
Joshua Ashton
86954c766f radv: Ensure vkGetQueryPoolResults returns in finite-time
When a device lost occured, we were not ensuring that
vkGetQueryPoolResults with VK_QUERY_RESULT_WAIT_BIT was returning.

We could have the caller stuck in our while(...) loop polling the query
atomics forever which violates the finite-time guarantees of this function.

This solves that by adding a timeout to this call to be double the
default TDR timeout for the potential queues relating to this query.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
907fe6ea62 radv: Add radv_get_tdr_timeout_for_ip helper
Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
ed4ef4dc65 radv/amdgpu: Remove ctx_query_reset_status
We don't use this anymore, it is all dead code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
f62bdde703 radv: Remove check_status
Following discussion on kernel mailing list[1], we are not gaining
anything from this right now, and it does not handle soft recovery.

We will hear about the context loss and rationale when we vkQueueSubmit
next.

We can come back to this if there is ever a Vulkan extension for
figuring out innocent vs guilty like GL_EXT_robustness.

This does mean however that we return VK_SUCCESS for cancelled semaphore
and fence waits, but this is legal per the Vulkan spec:

"Commands that wait indefinitely for device execution (namely
vkDeviceWaitIdle, vkQueueWaitIdle, vkWaitForFences with a maximum
timeout, and vkGetQueryPoolResults with the VK_QUERY_RESULT_WAIT_BIT
bit set in flags) must return in finite time even in the case of a lost
device, and return either VK_SUCCESS or VK_ERROR_DEVICE_LOST."

"If device loss occurs (see Lost Device) before the timeout has expired,
vkWaitSemaphores must return in finite time with either VK_SUCCESS or
VK_ERROR_DEVICE_LOST."

[1]: https://lists.freedesktop.org/archives/amd-gfx/2024-January/103337.html

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
b24a4b8949 radv: Mark device loss if QueueSubmit failed immediately
Otherwise we rely on check_status alone, and that's going away.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton
c58cff3ce4 radv/amdgpu: Handle -ENODATA and -ETIME from cs_submit
This can be sent in the event of a soft/hard recovery.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Samuel Pitoiset
7a0b343495 aco: silent checking if clrxdisasm is available
Otherwise, this is reported a ton of times and the CI output is
unusable.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27136>
2024-01-19 07:33:56 +00:00
Jesse Natalie
34a27ac3a7 d3d12: Set up spirv-as and fix expectations
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27127>
2024-01-19 05:16:23 +00:00
Jesse Natalie
13cc5afb35 ci/windows: Rev Vulkan SDK and piglit
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27127>
2024-01-19 05:16:23 +00:00
José Roberto de Souza
b571ae6e7a intel: Make memory heaps consistent between KMDs
Xe KMD reports SMEM size as half of RAM while i915 returns the whole
RAM size, so to keep it consistent here adjusting the values
returned by i915 KMD.

The free i915 SMEM also needs to be ajusted but as this is needed by
both KMDs because KMD uAPIs only reports free memory for applications
running elevated privileges, so this was moved to
intel_device_info_ajust_memory() to be shared by both KMD backends.

sram.mappable.size asserts had to be removed from i915 code paths
because of this adjustment.

anv_compute_sys_heap_size() was dropped in ANV and reduce in HASVK
because adjustments are now done in intel/dev level.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26567>
2024-01-19 03:36:07 +00:00
José Roberto de Souza
ca94420d6d intel/dev: Reduce usage of intel_device_info_compute_system_memory()
This function should only be used when i915 versions that don't have
DRM_I915_QUERY_MEMORY_REGIONS.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26567>
2024-01-19 03:36:07 +00:00
Benjamin Lee
f05350899a nak: fix iabs on SM50 with an explicit i2i op
Fixes bug where we were not setting the src iabs modifier when lowering
an iabs op to i2i in the encoder.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27105>
2024-01-19 02:48:04 +00:00
Faith Ekstrand
7f332f4087 nak: Enable NIR fuse_ffmaN
This improves vkpeak perf by 40-50% on the Ada GPU in my laptop.  There
are probably more optimal things we can be doing (Intel's pass is pretty
clever) but this is already an improvement.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27157>
2024-01-19 02:34:41 +00:00
Caio Oliveira
4dbf9181cd intel/compiler: Fix rebuilding the CFG in fs_combine_constants
When building the CFG the instructions are taken of the list in
fs_visitor and added to the lists inside each block.  The single
"exec_node" in the instruction is used for those memberships.

In the case the pass rebuilt the CFG, it had no instructions, so
calculate_cfg() had nothing to work with.  For now fix the bug by
pulling all the instructions back to the original list.

We can do better here, but punting until upcoming work on
CFG itself.

Issue found in an unpublished CTS test.  Small reproduction in our
unit tests now enabled.

Fixes: 65237f8bbc ("intel/fs: Don't add MOV instructions to DO blocks in combine constants")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27131>
2024-01-19 01:59:36 +00:00
Caio Oliveira
e9bfdcf576 intel/compiler: Add couple of tests for fs_combine_constants
Add a simple test to kick off the infrastructure.   And also a test
(for now disabled) that fails because the code is returning an
empty shader.  Next patch will fix and enable it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27131>
2024-01-19 01:59:36 +00:00
Faith Ekstrand
280fe3f592 nvk: Wire up nir_opt_large_constants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Faith Ekstrand
0bc02eee4b nak: Refactor shader upload math
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Faith Ekstrand
148971f232 nvk/draw: Map cbuf slots to shaders, not cbuf_maps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27156>
2024-01-19 01:07:30 +00:00
Joshua Ashton
2b47e93c8a winsys/amdgpu: Limit usage of query_reset_state2
Following discussion on kernel mailing list[1], we are not gaining
anything from using this to figure out if we reset, and it does not
handle soft recovery.

We will hear about the context loss and rationale when we submit.

Instead, only use this for figuring out if the reset we already knew
about was completed.

[1]: https://lists.freedesktop.org/archives/amd-gfx/2024-January/103337.html

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27097>
2024-01-18 23:21:48 +00:00
Joshua Ashton
cf24d15503 winsys/amdgpu: Hook up guilt to amdgpu_ctx_set_sw_reset_status
Certain return values have certain meanings indicating context loss and
guilt. Hook those up here.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27097>
2024-01-18 23:21:48 +00:00
Konstantin Seurer
024f144165 lavapipe: Report the correct preprocess buffer size
There can be multiple sequences.

Fixes: 976dd26 ("lavapipe: NV_device_generated_commands")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
cc94ff081c lavapipe: Mark vertex elements dirty if the stride changed
Fixes: 7672545 ("gallium: move vertex stride to CSO")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
6d98142eda gallivm: Use saturating fpto*i conversions
Matches what vkd3d-proton expects and how other hardware (AMD) behaves.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
6d88c1bb6c lavapipe: Fix DGC vertex buffer handling
Fixes: 976dd26 ("lavapipe: NV_device_generated_commands")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27019>
2024-01-18 22:50:00 +00:00
Konstantin Seurer
e83ef27ba6 radv: Vectorize load_global_constant
Totals from 325 (0.38% of 84845) affected shaders:
Instrs: 2883767 -> 2880939 (-0.10%); split: -0.10%, +0.00%
CodeSize: 15388396 -> 15364976 (-0.15%); split: -0.16%, +0.00%
Latency: 20212583 -> 20197719 (-0.07%); split: -0.20%, +0.13%
InvThroughput: 5489738 -> 5489551 (-0.00%); split: -0.14%, +0.14%
VClause: 104225 -> 103944 (-0.27%); split: -0.30%, +0.03%
SClause: 71616 -> 71612 (-0.01%); split: -0.01%, +0.01%
Copies: 252143 -> 252284 (+0.06%); split: -0.10%, +0.15%
Branches: 117826 -> 117821 (-0.00%); split: -0.01%, +0.00%
PreVGPRs: 23502 -> 23506 (+0.02%)

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27084>
2024-01-18 21:30:39 +00:00
Konstantin Seurer
220c912080 ac/llvm: Enable helper invocations for quad OPs
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9239
cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27110>
2024-01-18 21:00:06 +00:00
Faith Ekstrand
5b1afb0482 nvk: Advertise VK_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Faith Ekstrand
a55b2996ab nak: Add support for SPV_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Faith Ekstrand
82fe981e35 nir,spirv: Add support for SPV_NV_shader_sm_builtins
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27154>
2024-01-18 20:20:06 +00:00
Tapani Pälli
02d7f5e4ff anv: expand pre-hiz data cache flush to gfx >= 125
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27132>
2024-01-18 19:45:04 +00:00
Tapani Pälli
93706d5c2f iris: expand pre-hiz data cache flush to gfx >= 125
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27132>
2024-01-18 19:45:04 +00:00
Ian Romanick
7481d61a5d intel/compiler: Track mue_compaction and mue_header_packing flags in brw_get_compiler_config_value
v2: Use u_foreach_bit64. Suggested by Lionel.

Fixes: 48885c7fe3 ("intel/compiler: load debug mesh compaction options once")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Ian Romanick
6f237a23c7 intel/compiler: Track lower_dpas flag in brw_get_compiler_config_value
This user-settable flag affects compiler output, so it should be tracked
in the cache hash.

Fixes: 3756f60558 ("intel/fs: DPAS lowering")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel Landwerlin
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Ian Romanick
2741c6464c intel/compiler: Use u_foreach_bit64 in brw_get_compiler_config_value
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Lionel Landwerlin
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Ian Romanick
951e08fc18 intel/compiler: Disable DPAS instructions on MTL
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3756f60558 ("intel/fs: DPAS lowering")
Closes: #10376
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26993>
2024-01-18 19:20:12 +00:00
Gurchetan Singh
a1e67b3933 mesa/vulkan: use DETECT_OS_ANDROID
This uses DETECT_OS_ANDROID instead of defined(ANDROID).
This better supports glibc based host builds in the Soong
build system.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
c27cd96f31 mesa/vulkan: use a simpler path for header in trampoline gen
This works better if vk_dispatch_table.h is inside some "genDir",
and not generated "src/vulkan/util" directory.  This is the
case for the AOSP Soong build system.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
c860935501 mesa/util: use DETECT_OS_ANDROID in anon_file.c
glibc based Android build define ANDROID, but don't have
memfd headers.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
1b133ad446 mesa/util: add <linux/fcntl.h>
F_ADD_SEALS + F_SEAL_* are defined in <linux/fcntl.h> on Android.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Gurchetan Singh
e08add9164 mesa/util: Check __ANDROID__ when for detecting for Android
"__ANDROID__ is defined by the compiler. It is defined for
all Android targets."

"ANDROID is set by some build systems, and not in any reliable
 manner (in AOSP it actually just means that you're in AOSP; it's
 set even when you're building host code for Windows, so it
 doesn't mean much of anything)."

https://github.com/android/ndk/issues/407
https://github.com/android/ndk/issues/807

Since the toolchain provides __ANDROID__ for actual Android
targets, standalone NDK and Soong builds should work.

The Mesa CI uses a combination of the NDK toolchain, internal
Android stubs and a Debian sysroot when compile testing Android.

Long-term, it should be possible to remove ANDROID and use
DETECT_OS_ANDROID everywhere.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874>
2024-01-18 18:45:40 +00:00
Eric Engestrom
155b2b9555 CODEOWNERS: remove myself as a person of contact for a few things
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27151>
2024-01-18 18:42:23 +00:00