Commit Graph

192498 Commits

Author SHA1 Message Date
Rhys Perry
0919ce1ac4 aco/gfx11.5: workaround export priority issue
https://github.com/llvm/llvm-project/pull/99273

fossil-db (gfx1150):
Totals from 73996 (93.20% of 79395) affected shaders:
Instrs: 36015357 -> 36807177 (+2.20%)
CodeSize: 189072544 -> 192238748 (+1.67%)
Latency: 245845181 -> 246790550 (+0.38%); split: -0.00%, +0.38%
InvThroughput: 45068018 -> 45116177 (+0.11%); split: -0.00%, +0.11%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30241>
2024-07-23 13:14:51 +00:00
Dylan Baker
55158bed7f util/glsl2spirv: only copy the input file if we're going to change it
Should make the build slightly faster by only copying when we actually
need to, and otherwise pointing at the original source

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30132>
2024-07-23 11:07:04 +00:00
Dylan Baker
36160c967c util/glsl2spirv: fixup the generated depfile when copying sources
So that the depfile contains a reference to the original source rather
than the copied one. This is necessary to avoid ninja not finding the
copy and causing spurious rebuilds when the copy has been removed, as
well as correctly tracking changes to the input files.

fixes: 46644ba371

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30132>
2024-07-23 11:07:03 +00:00
Vlad Schiller
848c7c9560 pvr: Handle VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO
This commit silences a debug message, which can get quite spammy.

Fixes: a2e0701 ("pvr: Enable KHR_image_format_list")
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30222>
2024-07-23 10:44:21 +00:00
Vlad Schiller
eda77bf79d pvr: Handle VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
This commit silences a debug message, which can get quite spammy.

Fixes: 8991e64 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30222>
2024-07-23 10:44:21 +00:00
Eric Engestrom
aed5a974e9 meson: xcb & xcb-randr are needed by the loader whenever x11 is built
Specifically, `src/loader/loader_dri_helper.c` needs them.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11536
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30292>
2024-07-23 09:16:55 +00:00
Vignesh Raman
65c92f0b82 ci: uprev deqp-runner from 0.18.0 to 0.20.0
This includes experimental support for running fluster tests
with fluster-runner and several other fixes.

 * Log PID in outputs.
 * Support loading zstd compressed caselist/baseline/skips/flakes
 * cargo: update repository url
 * deqp: Add a --vk-device-id argument
 * Add warnings for poor load balancing with --vk-device-id
 * config: fix typo in argument help string
 * Check for "DeviceLost" test status.
 * ci: update upstream repo
 * ci: drop duplicate key
 * ci: deduplicate deb jobs
 * ci: run merge pipelines in merge request instead of in fork
 * ci: only run tests *before* merging
 * ci: only run deb jobs *after* merging
 * parse: Add a FullTest ParserState
 * Add a fluster runner
 * tests: Add integration tests for fluster
 * readme: Add information on fluster-runner
 * lib: Add a --max-fails optional usize argument
 * piglit: Use a Box<Run> in the SubCommand enum
 * Bump version to 0.19.0 for release.
 * Escape dots for non-regexes lines
 * Add a .mailmap
 * Bump version to 0.20.0 for release.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29931>
2024-07-23 07:30:24 +00:00
Vignesh Raman
6edfb09dda ci/deqp-runner: unset CC for arm32 cross-compilation
When CC variable is set to /usr/lib/ccache/gcc, the rust
compiler uses this variable when cross-compiling for arm32,
which causes build failure for zstd-sys. So unset the CC
variable when cross-compiling for arm32.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29931>
2024-07-23 07:30:24 +00:00
Neha Bhende
8f9a157daa dri: fix macro name check to detect svga driver
svga driver is detected via HAVE_SVGA.

Since commit 50fc7cc290, svga driver was not loading at all

Fixes: 50fc7cc290 ("glx: directly link to gallium")

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30307>
2024-07-23 04:50:31 +00:00
Faith Ekstrand
74b4c91e7b meson/megadriver: Don't invoke the megadriver script with no drivers
Otherwise, the install will fail due to missing arguments to
install_megadrivers.py.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30277>
2024-07-23 03:26:00 +00:00
Faith Ekstrand
1006283732 nak: Fix shl64 for pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
e02dfb6a34 nak: Use .wrap for 64-bit shifts
If we set the shift up correctly, we can get the 64-bit wrapping
behavior to work for us instead of adding an instruction to wrap
manually.  While we're at it, set known-unused sources to 0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
08efc78a25 nak: Add tests for 64-bit shifts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
55901dc287 nak: Add 64-bit shift helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
e1f1af58d9 nak: Fix shf.l.high on Maxwell
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
9321a785cf nak: Implement Foldable for OpShf
Also add an assert for an invalid combination on Maxwell.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
ebc1c052ab nak: Implement Foldable for OpPrmt
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
cac3ff011b nak: Add some opcode tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
4392a5922c nak: Add a framework for running hardware tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
c4938619f3 nak: Initialize DEBUG on-demand
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
3fed505eb0 nak: Implement Foldable for OpIAdd3 and OpIAdd3X
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
e09dd8e201 nak: Add a Foldable trait
This is for ops that we know how to constant-fold.  We'll use this to
generate unit tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:49 +00:00
Faith Ekstrand
841737925f nak: Add dst_type decorations
This is similar to the src_type decorations we have scattered all over
the IR, only for destinations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
9e25b6c0ff nak: Add an implementation of the ACORN random number generator
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
cd7128c2e3 nak: Add a bare HW shader runner
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
7b9fdba602 nak/meson: Rename libnak_bindings_gen to _libnak_bindings_rs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
61e502b25c nak: Make ShaderBin a public struct
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
758f7a440d nak: Pull the QMD code out into its own crate
We want to use it in the runner which will be separate from NAK itself.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Faith Ekstrand
d2b90d5647 nouveau/winsys: Uninline nouveau_ws_bo_unmap()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
2024-07-23 03:15:48 +00:00
Yiwei Zhang
a27e3c5078 venus: clarify wsi image ownership
Fix to call vn_image_bind_wsi_memory as long as the image is a wsi
image. This is needed so that we track the wsi memory in the wsi image
so that creating from swapchain info works normally on x11/wayland
platforms. This change also make it clear that ANB image owns the wsi
memory

Fixes: c4b30b604f ("venus: support VK_ANDROID_NATIVE_BUFFER_SPEC_VERSION 8")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30278>
2024-07-23 02:58:41 +00:00
Kenneth Graunke
c429d5025e intel/brw: Don't force g1's live range to be the entire program
The idea here was that pixel shader framebuffer writes used the g0 and
g1 thread payload register values to construct the message header.
However, most messages are headerless and don't use either.  There's a
2012-era comment that the simulator at one point had a bug where certain
headerless messages would incorrectly take the values from the g0/g1
register contents rather than using sideband.  But, that was likely
fixed eons ago.  So we really don't need to do this.

Furthermore, there are many more shader stages these days:
- VS: r1 contains output URB handles
- TCS: r1 contains ICP handles
- TES: r1 contains gl_TessCoord.x (r4 contains output URB handles)
- GS: r1 contains output URB handles
- CS: r1 contains LocalID.X on DG2+ but nothing on older hardware
- Task/Mesh: r1 contains LocalID.X
- BS: r1 contains bindless stack handles

Vertex and geometry aren't likely to benefit here because r1 is needed
for their output messages, which are also what terminate the shader.
TES will definitely benefit because we were making a value pointlessly
live for the whole program.  Same for TCS, to a lesser extent.  Compute
prior to DG2 was the worst, as g1 literally has no meaningful content,
so there is no point to keeping it live.

fossil-db on Alchemist shows substantial spill/fill improvements:

   Totals:
   Instrs: 148782351 -> 148741996 (-0.03%); split: -0.03%, +0.01%
   Cycles: 12602907531 -> 12605795191 (+0.02%); split: -0.70%, +0.72%
   Subgroup size: 7518608 -> 7518632 (+0.00%)
   Send messages: 7341727 -> 7341762 (+0.00%)
   Spill count: 54633 -> 52575 (-3.77%)
   Fill count: 104694 -> 100680 (-3.83%)
   Scratch Memory Size: 3375104 -> 3287040 (-2.61%)

   Totals from 301172 (48.21% of 624670) affected shaders:
   Instrs: 95531927 -> 95491572 (-0.04%); split: -0.05%, +0.01%
   Cycles: 9643531593 -> 9646419253 (+0.03%); split: -0.91%, +0.94%
   Subgroup size: 4492512 -> 4492536 (+0.00%)
   Send messages: 4399737 -> 4399772 (+0.00%)
   Spill count: 20034 -> 17976 (-10.27%)
   Fill count: 41530 -> 37516 (-9.67%)
   Scratch Memory Size: 1522688 -> 1434624 (-5.78%)

Assassin's Creed Odyssey in particular has 20% fewer fills.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30146>
2024-07-23 02:26:52 +00:00
Michael Cheng
60c73e09c6 anv: Remove extra hdc_flush from Perfetto
Remove extra reporting of hdc_flush when viewing a Perfetto trace for
anv.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30312>
2024-07-23 01:57:59 +00:00
Faith Ekstrand
41d05737ec nvk: Call into NIL to populate the null descriptor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30303>
2024-07-23 01:35:11 +00:00
Faith Ekstrand
ff6577a000 nvk: Create the zero page earlier in device creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30303>
2024-07-23 01:35:11 +00:00
Faith Ekstrand
c8d8e2249a nil: Add a helper for populating the null descriptor
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30303>
2024-07-23 01:35:11 +00:00
Faith Ekstrand
68d6cdfbc5 nvk: Reject sparse images on Maxwell A and earlier
Even though we don't advertise the sparseResidency feature, a bunch of
CTS tests just call GetPhysicalDeviceImageFormatProperties2() with
SPARSE_RESIDENCY_BIT and see if that fails.

Fixes: d2177f4764 ("nvk: Don't advertise sparse residency on Maxwell A")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30303>
2024-07-23 01:35:11 +00:00
Francisco Jerez
49b433d5e7 iris: Pin pixel hashing table BO from iris_batch submission instead of from iris_state.
This fixes sporadic rendering corruption reported on MTL with ChromeOS
in cases where multiple processes including Chrome were utilizing the
GPU concurrently, and one of the processes happened to submit a
BLORP-only batch buffer right after a switch from a different context.

In such a scenario we would fail to add the BO that holds the pixel
hashing tables to the execbuf IOCTL for the BLORP batch, because it
was being pinned from iris_restore_render_saved_bos() which isn't
called for BLORP operations, potentially causing it to use garbage as
pixel pipe hashing tables, which led to corruption of the BLORP
rendering.

Technically this could have affected DG2 as well, but it has only been
reported on MTL so far.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30274>
2024-07-23 00:40:24 +00:00
Dylan Baker
7513a0bf3a mesa: fix memory leak when using shader cache
Fixes: 656ccf4ef8 ("mesa: shader dump/read support for ARB programs")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30302>
2024-07-22 23:21:49 +00:00
Caio Oliveira
8ba8e33c39 intel/brw: Simplify @file annotations
Doxygen documentation says

> If the file name is omitted (i.e. the line after \file is left
> blank) then the documentation block that contains the \file command will
> belong to the file it is located in.

so we can omit the filename itself when using the annotation.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30168>
2024-07-22 22:48:03 +00:00
Maaz Mombasawala
1a8b232115 svga: Validate surface during copy check
Fixes piglit test arb_copy_buffer-data-sync.
The test fails inconsistently because svga_buffer_surface handle is sometimes
not present at time of copy check, so the copy does not happen.
Adding a validata_host_surface() call for the surface being copied ensures the
handle is present.

Signed-off-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Reviewed-by: Neha Bhende <neha.bhende@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29949>
2024-07-22 22:33:47 +00:00
Dylan Baker
e5b53d9408 compilers/clc: Add missing break statements.
fixes: c0cf7f578a

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30301>
2024-07-22 21:55:49 +00:00
Karol Herbst
bad67ee77c spirv: handle function parameters passed by value
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
2024-07-22 21:16:58 +00:00
Karol Herbst
9b55dcca54 spirv: initial parsing of function parameter decorations
It doesn't do anything substantial yet, but it ignores enough so internal
shaders won't generate warnings.

I've also added ByVal parsing, because I need this one to actually fix a
correctness issue in a later patch.

Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
2024-07-22 21:16:58 +00:00
Karol Herbst
90db6c729d spirv: generate info for FunctionParameterAttribute
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
2024-07-22 21:16:58 +00:00
Jesse Natalie
f05b7225a3 microsoft/clc: Split struct copies before vars_to_ssa in pre-inline optimizations
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29896>
2024-07-22 21:16:58 +00:00
Lionel Landwerlin
1908d2c171 anv: split image view from anv_image.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
eff01c46d8 anv: split buffer view from anv_image.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
f5af56528b anv: split sampler from anv_device.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
543c726781 anv: split buffer from anv_device.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00
Lionel Landwerlin
c59e8e814a anv: split events from anv_device.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30285>
2024-07-22 18:46:05 +00:00