Commit Graph

192236 Commits

Author SHA1 Message Date
Sergi Blanch Torne
e6de8e2533 ci: fix run_n_monitor single execution
When there is a single job as a target and, when it is triggered, it takes
more than one loop time in pending status, it confuses the script to fall in
a wrong return of the pipeline monitoring.

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

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30219>
2024-07-17 11:25:50 +00:00
Marek Olšák
15461dc62f mesa: switch ID allocation to util_idalloc_sparse to reduce virtual memory usage
If the max ID was allocated, it caused virtual memory usage to increase
to 512 MB. This commit reduced it to 512 KB.

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

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30106>
2024-07-17 10:29:12 +00:00
Marek Olšák
d4085aaf56 util: add util_idalloc_sparse, solving the excessive virtual memory usage
The code comment in the header file describes how it works.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30106>
2024-07-17 10:29:12 +00:00
Marek Olšák
ace7c32333 util: don't use variable names that can appear in args of idalloc foreach macros
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30106>
2024-07-17 10:29:12 +00:00
Marek Olšák
287ed620d0 util: make util_idalloc_exists private
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30106>
2024-07-17 10:29:12 +00:00
Faith Ekstrand
2d260314f1 nvk: Use the page size queried from NVKMD
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30138>
2024-07-17 08:17:57 +00:00
Faith Ekstrand
68c06558be nvk: Drop the sparse alignment back down to 4096
nouveau uses the OS page size which is almost always 4096.  The next
patch will make this properly queried but this version is back-portable.

Fixes: 58181b7bbc ("nvk: Bump the sparse alignment requirement on buffers to 64K")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30138>
2024-07-17 08:17:57 +00:00
Faith Ekstrand
bccb9fe091 nvk/nvkmd: nouveau uses the OS page size
It's the same, regardless of whether the memory comes from VRAM or
system RAM.

Fixes: 7f45d20d2b ("nvk/nvkmd: Be more specific about memory alignments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30138>
2024-07-17 08:17:56 +00:00
Iago Toral Quiroga
78c00fbc2c v3d: rename job->clear to job->clear_tlb
This is more specific as to the type of clear it represents.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30205>
2024-07-17 06:03:12 +00:00
Iago Toral Quiroga
4e19c139de v3d: skip tlb loads when emitting clears with a draw call
We skip loading the tile buffer from memory if the job has flagged
a clear (job->clears) for the buffer, however, this only tracks
clears emitted via the TLB. In some cases we may need to fallback
to clearing with a draw call, in which case we also want to skip
the load.

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30205>
2024-07-17 06:03:12 +00:00
Timothy Arceri
c9f26a9995 glsl: fix cross validate globals
We want to skip the validation of compiler added global temps.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30199>
2024-07-17 05:19:03 +00:00
Timothy Arceri
dde1a69929 glsl: set how_declared to hidden for compiler temps
This will be useful for the nir linker that otherwise cant detect these
compiler temps created in glsl ir.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30199>
2024-07-17 05:19:03 +00:00
Icenowy Zheng
bb0efdd4d8 llvmpipe: add shader cache support for ORCJIT implementation
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30036>
2024-07-17 04:39:19 +00:00
Timothy Arceri
60292b714c mesa: add unreachable to _mesa_shader_stage_to_subroutine_prefix()
All the other subroutine functions in this file use an unreachable for
the equivalent switch.

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

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30202>
2024-07-17 02:02:03 +00:00
Paulo Zanoni
22fe73a86a iris: fix iris_xe_wait_exec_queue_idle() on release builds
We need to call iris_wait_syncobj() on both release and debug builds,
so take it out of the assert() call. Only assert the result.

With this patch, gnome-session finally works for me. Also steam.

Fixes: 665d30b544 ("iris: Wait for drm_xe_exec_queue to be idle before destroying it")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30195>
2024-07-17 01:31:50 +00:00
José Roberto de Souza
4fd7cad05d intel: Rename XE_PERF to XE_OBSERVATION
Xe KMD renamed XE_PERF to XE_OBSERVATION to better match with Intel
specification and avoid confusion.
This uAPI rename will land in the same kernel version that added
the uAPI being renamed.

There is no uAPI change, just renames.

Sync xe_drm.h with 63347fe031e3 ("drm/xe/uapi: Rename xe perf layer as xe observation layer").

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30027>
2024-07-17 01:00:34 +00:00
Lucas Fryzek
40dbb6e8e8 egl/x11: Remove force software check for exporting SBWD
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29910>
2024-07-17 00:20:54 +00:00
Lucas Fryzek
ba1a6a7e38 egl/x11/sw: Implement shm support
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29910>
2024-07-17 00:20:54 +00:00
Lucas Fryzek
71a97b2047 vulkan/wsi: Update sw x11 wsi to only copy damage regions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29910>
2024-07-17 00:20:54 +00:00
Lucas Fryzek
be050e34a7 egl/x11/sw: Implement swapbuffers with damage
Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29910>
2024-07-17 00:20:54 +00:00
Mike Blumenkrantz
fb5afd804e egl/x11/sw: plug in swap_buffers_with_damage handling
just some plumbing

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29910>
2024-07-17 00:20:54 +00:00
Mike Blumenkrantz
6088a0bf51 egl/x11/sw: fix partial image uploads
* swrast allocates images aligned to 64x64 tiles, which results in images
  that are larger than the window. PutImage requests must be clamped on
  the y-axis to avoid uploading/damaging out-of-bounds regions
* winsys coords are y-inverted

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29910>
2024-07-17 00:20:54 +00:00
Caio Oliveira
e3e712e74e intel/elk: Convert missing uses of ralloc to linear in fs_live_variables
And use the non-zeroing variant in cases we are filling the data
immediately.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30201>
2024-07-16 23:53:45 +00:00
Caio Oliveira
3700e49fff intel/brw: Convert missing uses of ralloc to linear in fs_live_variables
And use the non-zeroing variant in cases we are filling the data
immediately.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30201>
2024-07-16 23:53:45 +00:00
Samuel Pitoiset
117a93a550 zink/ci: remove redundant arb_shader_image_load_store skips on POLARIS10
This subset is already skipped at the end of the file.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30210>
2024-07-16 23:35:01 +00:00
Samuel Pitoiset
78aab2db80 zink/ci: skip arb_shader_image_load_store also on NAVI31/VANGOGH
This subset hangs the GPU on NAVI10/POLARIS10 and I got a hang locally
on VANGOGH.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30210>
2024-07-16 23:35:01 +00:00
Alyssa Rosenzweig
6690343e10 zink: match shader-db report.py format
this way we can use shader-db report.py to analyze shader-db changes for zink
with the vk driver of our choosing. requires corresponding report.py relaxations
to be useful, the idea was to change zink a bit and change report.py a bit and
meet in the middle with something useful for arbitrary vulkan drivers.

the output isn't too pretty but it works,
synthetic example on nvk:

   Instruction count HURT:   shaders/glmark/1-1.shader_test vertex:            42 -> 43 (2.38%)

   total Instruction count in shared programs: 7135 -> 7136 (0.01%)
   Instruction count in affected programs: 42 -> 43 (2.38%)
   helped: 0
   HURT: 1

   total Code Size in shared programs: 114160 -> 114160 (0.00%)
   Code Size in affected programs: 0 -> 0
   helped: 0
   HURT: 0

   total Number of GPRs in shared programs: 2677 -> 2677 (0.00%)
   Number of GPRs in affected programs: 0 -> 0
   helped: 0
   HURT: 0

   total SLM Size in shared programs: 0 -> 0
   SLM Size in affected programs: 0 -> 0
   helped: 0
   HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30194>
2024-07-16 22:57:01 +00:00
Alyssa Rosenzweig
d45e2f3f15 zink: remove extraneous \n with shaderdb
the newline is implicit for util debug messages. this fixes shaderdb output
being half blank lines and brings zink in line with hardware mesa drivers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30194>
2024-07-16 22:57:01 +00:00
David (Ming Qiang) Wu
8177a4f72a radeonsi/vcn: support DPB_MAX_RES on VCN5
Use common db_alignment to calculate dpb_size for DPB_MAX_RES,
DPB_DYNAMIC_TIER_1 and DPB_DYNAMIC_TIER_2. This makes the db_pitch
in sync with all DPB types.

Remove the VCN5 hack of using 256 for H264 as 64 works.
Remove redundant codes for width and height as they were calculated
at the beginning in calc_dpb_size().

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30186>
2024-07-16 22:26:05 +00:00
David Rosca
e040ee1098 frontends/va: Support frame rate per temporal layer for AV1
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30149>
2024-07-16 22:08:31 +00:00
C Stout
f6099903c1 vulkan/runtime: add spirv_info_h to vulkan_lite_runtime_header_gen_deps
spirv_info_h was added to idep_vulkan_lite_runtime_headers but it's also
needed for building libvulkan_lite_runtime.  Without this patch, from
a clean meson setup (tested with: -Dvulkan-drivers=freedreno -Dgallium-drivers= -Dplatforms=wayland)

ninja -C build src/vulkan/runtime/libvulkan_lite_runtime.a

In file included from ../src/vulkan/runtime/vk_physical_device.c:24:
../src/vulkan/runtime/vk_physical_device.h:32:10: fatal error: compiler/spirv/spirv_info.h: No such file or directory

Fixes: 1759c0eba7 ("vulkan: add helper to fill out spirv caps automatically")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30189>
2024-07-16 21:43:13 +00:00
Paulo Zanoni
241585667f anv: reimplement the anv_fake_nonlocal_memory workaround
Commit 94989b45a5 ("anv,driconf: Add fake non device local memory WA
for Total War: Warhammer 3") implemented a workaround to make
Warhammer 3 work on ADL, but the game still doesn't work on LNL, which
uses xe.ko, and MTL, which uses i915.ko: it still fails at launch
claiming it couldn't allocate memory.

So in this implementation, instead of clearing DEVICE_LOCAL_BIT we
just duplicate our memory types, one having the bit and one not
having.

v2:
 - Check for VK_MAX_MEMORY_TYPES (José)
 - Invert the order of the memory types (José)
 - Fix white space issue (José)
v3:
 - Comment our non-spec-compliance (José)
 - Remove useless lines (José)

Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8721
Fixes: 94989b45a5 ("anv,driconf: Add fake non device local memory WA for Total War: Warhammer 3")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30162>
2024-07-16 20:43:02 +00:00
Collabora's Gfx CI Team
cdf646dbc3 Uprev Piglit to 582f5490a124c27c26d3a452fee03a8c85fa9a5c
647d072502...582f5490a1

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30167>
2024-07-16 20:05:32 +00:00
Caio Oliveira
d202f24698 spirv: Don't warn about FPFastMathMode if not OpenCL
This decoration can now be used in Vulkan with
VK_KHR_shader_float_controls2.

Acked-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30191>
2024-07-16 19:14:21 +00:00
Valentine Burley
b3842f9f41 tu: Don't disable 2 10-bit formats
VK_FORMAT_R10X6_UNORM_PACK16 and VK_FORMAT_R10X6G10X6_UNORM_2PACK16
were previously disabled because they were failing some CTS tests.
Re-enable them now as they are no longer causing crashes.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30157>
2024-07-16 18:51:50 +00:00
Alyssa Rosenzweig
9f1d1c4fc8 nir/opt_constant_folding: fix array size define, pt 2
In practice these are equal but the old code was semantically wrong: that
dimension is "sources" not "components". Use the correct #define.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Suggested-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30214>
2024-07-16 17:38:16 +00:00
Rob Clark
bda47e29de freedreno/a6xx: Allow blit based transfers
Some apps (like firefox and chromium) seem to like to create textures
with internal format GL_RGBA8 but then upload GL_BGRA to them.  If the
app were a bit more clever it could hit the memcpy path.  But fallback
sw conversion (convert_ubytes()) is slow.  If we are going to have to
make this extra copy, do it on the gpu.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
30dbfc87cd freedreno/a6xx: Add more format swizzles
Ass missing R8G8B8X8_SNORM as well as various ABGR and ARGB.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
89dd8d101b freedreno/a6xx: Skip blitter for L/A conversions
The blitter cannot do the needed swizzle gymnastics for blitting to
luminance and/or alpha formats.  So fallback to the 3d path.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
3bb393e7b9 freedreno/a6xx: Tweak blitter traces
Make things easier to read when there are a lot of blits.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
7e250033ee freedreno/bc: Rework flush order
A sequence like:

1) set_framebuffer_state(A)
2) clears and/or draws
3) set_framebuffer_state(B)
4) context_flush(ASYNC)

would result in the fence for batch B being returned, instead of batch A.
Resulting in a fence that signals too early.

Instead, in context_flush() find the most recently modified batch, so
that in the example above batch A would be flushed.

There is one wrinkle, that we want to avoid a dependency loop.  So the
'last_batch' can actually be a batch that depends on the most recently
modified batch.  But in either case, the batch that is used for the
returned fence is one that directly or indirectly depends on all other
batches associated with the context.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
57694b8944 freedreno/a6xx: Drop 16b packed image formats
See also commit f1c1b9687e ("tu: Do not expose storage image/buffer
features for PACK16 formats")

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
fb9d86299b freedreno: Use LINEAR for staging resources
These are for CPU access, so no point in having additional staging blit
to convert from/to linear.  Depth formats are an exception, as normally
they cannot be linear.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
5de33f3d3e freedreno: Implement stencil blit fallback
Now that there is a util_blitter_clear_depth_stencil() helper, we can
use that to implement stencil blits in the fallback path.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
8bc0cb8040 freedreno/a6xx: Implement S8 support
Basically z32+s8 mode but without the z32.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
5056f5b69c u_blitter+d3d12: Move stencil fallback clear to caller
The other callers were already doing the prepatory stencil clear before
calling util_blitter_stencil_fallback().  Doing the clear in the driver
avoids recursively entering u_blitter if the driver uses
util_blitter_clear_depth_stencil() to implement ->clear_depth_stencil().

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
9372875222 freedreno: Handle non-null cb with null buffer
u_blitter does this to restore constant state, so we need to handle both
cases.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Rob Clark
9123ee0f18 st/mesa/pbo: Set src type on image_store
Adreno/ir3 actually needs this information.

Pixes PBO brokenness with freedreno.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
2024-07-16 17:03:15 +00:00
Alex Deucher
dec4603a21 ac/surface: fix version check for gfx12 DCC
It's 58, not 59.  The original 58 feature was not
ready so it was dropped.

Fixes: 0bb83a4060 ("ac/surface: finish display DCC for gfx12")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30212>
2024-07-16 16:33:32 +00:00
Josh Simmons
2b99906e5b radv: Fix shader mask for SQ_WGP SPM counters
Signed-off-by: Josh Simmons <josh@nega.tv>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30200>
2024-07-16 16:10:11 +00:00