Commit Graph

170349 Commits

Author SHA1 Message Date
David Heidelberg 128e578c04 ci/mold: bump to 1.11.0
Fixes LTO issue.

Release notes: https://github.com/rui314/mold/releases/tag/v1.11.0

Acked-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22642>
2023-04-25 00:28:21 +00:00
Mike Blumenkrantz 6d5462658a llvmpipe: do late init for llvm builder
this avoids doing any llvm work during lavapipe enumeration which
might otherwise explode if lavapipe is not the actual driver that
gets used

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22600>
2023-04-25 00:04:08 +00:00
Mike Blumenkrantz 4a056807bc gallivm: break out native vector width calc for reuse
breaks dependency on lp_build_init()

cc: mesa-stable

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22600>
2023-04-25 00:04:08 +00:00
Juan A. Suarez Romero 78e448f4f9 v3d/ci: enable glsl 1.30 and 1.40 piglit tests
Now that we are exposing OpenGL 3.1, let's enable the proper supported
GLSL versions.

Acked-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22660>
2023-04-24 23:34:46 +00:00
Rob Clark 712daef3a8 freedreno: Add more tracepoint fields
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
2023-04-24 22:42:04 +00:00
Rob Clark dc4add8cdd freedreno/a6xx: Pass ring to __ONE_REG()
This happened to work before because the arg to OUT_REG() was also
called 'ring' (or there was a suitable local var in scope!!)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
2023-04-24 22:42:04 +00:00
Rob Clark daaa2917aa freedreno: Add dirty state logging
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
2023-04-24 22:42:04 +00:00
Rob Clark 6ea7d8e223 freedreno/perfetto: Add shader_id for compute stages
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
2023-04-24 22:42:04 +00:00
Rob Clark f136f89487 mesa/nir: Add some perfetto traces
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
2023-04-24 22:42:04 +00:00
Rob Clark 15499250f2 freedreno/ir3: More perfetto tracing
Some useful trace points that I had laying around.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
2023-04-24 22:42:04 +00:00
Rob Clark d36643bef5 util/log: Add missing "const"
Fixes warning:

  warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
2023-04-24 22:42:04 +00:00
Rob Clark 09f19672a0 freedreno/registers: C++ struct casting
Using C style `(struct foo){ ..args..}` at least confuses eclipse, so
for C++ code use `{ ..args.. }` instead.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
2023-04-24 22:42:04 +00:00
Rob Clark 827363f886 freedreno: Extra casting to make C++ happy
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
2023-04-24 22:42:03 +00:00
Emma Anholt 7f99cbf25e util/log: Fix log messages over 1024 characters.
The first attempt at the sprintf would have consumed part of va, so if
we're going to recurse on overflow to try again in a new allocation then
we have to do our work on a copy.

This was a common failure mode for MESA_GLSL=source, where it would just print:

  Mesa: info: GLSL source for fragment shader 1:
  Mesa: info: (null)

Fixes: 7a18a1712a ("util/log: improve logger_file newline handling")
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22618>
2023-04-24 21:56:05 +00:00
Iván Briano 4cfb4f7d12 anv: support fast color clears on vkCmdClearAttachments
As long as some conditions are met.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20175>
2023-04-24 21:33:49 +00:00
Iván Briano 5faf75dd74 anv: expose some helper functions
v2: (Rohan Garg)
- Make set_fast_clear_state take an image and format instead of an iview

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20175>
2023-04-24 21:33:49 +00:00
Iván Briano 9046319cc9 anv: factor out code for ccs_op and mcs_op
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20175>
2023-04-24 21:33:49 +00:00
Iván Briano 2a67a1f0c2 anv: make anv_can_fast_clear_color_view more generally available
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20175>
2023-04-24 21:33:49 +00:00
Iván Briano a2e02c4ba4 anv: Remove dead parameters from copy_fast_clear_dwords
There's only one caller of this function and always passes false.

v2: (Nanley Chery)
- Also remove the aspect parameter

v3: (Nanley Chery)
- Rename the function so it's more clear in which direction it works

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20175>
2023-04-24 21:33:49 +00:00
Sagar Ghuge e488773b29 anv: Fast clear depth/stencil surface in vkCmdClearAttachments
Instead of doing a slow depth clear, we can do depth fast clear in
vkClearAttachments.

Sascha Willems occlusionquery demo shows more than 2% perf boost with
this series.

On Felix's Tigerlake with the GPU at fixed frequency, this patch
improves performance of RoTR by +0.5%.

v2: (Nanley Chery)
- Clear stencil surface along with depth.
- Check for multilayer resources.
- Lookout for state.attachments.
- Fallback on slow clear for BDW and CHV if conditional rendering
  enabled.
- Keep flush in same function.

v3: (Nanley Chery)
- Return immediately after fast clearing.
- Remove unnecessary comment.

v4: (Nanley Chery)
- Add assertion for BLORP_BATCH_NO_EMIT_DEPTH_STENCIL.
- Remove unnecessary local variable.
- Add 3DSTATE_WM_HZ_OP comment.

v5: (Nanley Chery)
- Fix comments.
- Don't take fast depth clear path if BLORP_BATCH_PREDICATE_ENABLE set.
- Refactor code in can_hiz_clear_att.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20175>
2023-04-24 21:33:49 +00:00
Sagar Ghuge ee03b30e45 anv: Move and make anv_can_hiz_clear_ds_view non-static
v2:
- Pass const image view param. (Nanley)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20175>
2023-04-24 21:33:49 +00:00
Sagar Ghuge e04a414206 anv: Factor out code from anv_image_hiz_clear
Refactoring code from anv_image_hiz_clear which helps in future patches
to support fast depth clear in vkCmdClearAttachments.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20175>
2023-04-24 21:33:48 +00:00
Emma Anholt ae2784b832 blob: Don't valgrind assert for defined memory if we aren't writing.
The VK pipeline cache passes a NULL bytes with a nonzero size to a
NULL-data blob to set up the size of the blob.  In this case, we don't
actually execute the memcpy, so the non-existent "bytes" doesn't need to
have defined contents.  Avoids a valgrind warning:

==972858== Unaddressable byte(s) found during client check request
==972858==    at 0x147F4166: blob_write_bytes (blob.c:165)
==972858==    by 0x147F4166: blob_write_bytes (blob.c:158)
==972858==    by 0x14695FFF: vk_pipeline_cache_object_serialize (vk_pipeline_cache.c:240)
[...]
==972858==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Fixes: 591da98779 ("vulkan: Add a common VkPipelineCache implementation")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22617>
2023-04-24 20:48:33 +00:00
Emma Anholt c060b649c5 ci/zink: Enable the validation layer on the TGL GL46 run.
We recently had an issue where an anv merge failed due to a bug in zink,
which validation would have caught.  Get some coverage by default on the
main branch.

This increases runtime from 9:30 to 12:10.  I don't feel good about this,
but I've got https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/4398 in
flight to try to knock the time back down.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22459>
2023-04-24 19:21:50 +00:00
Emma Anholt 75a08b04d7 ci: Move zink's validation layer setup to deqp-runner.sh.
I want the path to be always set in case someone wants some
ZINK_DEBUG=validation, rather than having to do it per test job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22459>
2023-04-24 19:21:50 +00:00
Emma Anholt 5ae6a9bd70 ci/zink: Re-enable traces now that !20319 has landed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22459>
2023-04-24 19:21:50 +00:00
Emma Anholt c0f5f852ab ci: Add the Vulkan validation layer to amd64 rootfs builds.
We're going to want this for zink testing on actual HW drivers.  I haven't
sorted out the arm64 build yet, so no tu coverage.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22459>
2023-04-24 19:21:50 +00:00
Emma Anholt e38ca40082 ci: Make a variable for the repeated rootfs directory name.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22459>
2023-04-24 19:21:50 +00:00
Sathishkumar S 5307f6d03f frontends/va: return matching drm format for yuyv pipe format
return the matching drm format for YUYV pipe format in pipe_format_to_drm_format(), else
vlVaExportSurfaceHandle() fails to export a surface handle for YUYV surface.

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22497>
2023-04-24 19:06:30 +00:00
Mike Blumenkrantz edaf49160e zink: fix array copying in pv lowering
Fixes: 5a4083349f ("zink: add provoking vertex mode lowering")

Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22669>
2023-04-24 18:00:20 +00:00
Mike Blumenkrantz 99121c9b77 nir/gs: fix array type copying for passthrough gs
same mechanics as in zink passes

Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")

Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22669>
2023-04-24 18:00:20 +00:00
Jesse Natalie 796109cb08 dzn: Align-up heap sizes when allocating memory
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8895
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22666>
2023-04-24 17:40:47 +00:00
Samuel Pitoiset bdc4e3a5a6 radv: do not overallocate the CS array during submissions
Preambles/postambles are no longer added to the CS array.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22653>
2023-04-24 17:09:28 +00:00
André Almeida 41a3656149 radv: Search for guilty contexts at radv_check_status
When a GPU hung happens, all contexts are notified. They will receive
INNOCENT_CONTEXT if they are not the context that triggered the reset,
or GUILTY_CONTEXT otherwise.

At radv_check_status(), we return on the first context that was notified
as [GUILTY, INNOCENT]_CONTEXT, without further checks. This can make an
app think that it's innocent if the guilty context is not the first one
on the list of hw_ctx to be checked.

Check every context for a guilty one before returning CONTEXT_INNOCENT.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: André Almeida <andrealmeid@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22648>
2023-04-24 16:45:40 +00:00
Luca Weiss dc6f704566 freedreno: Enable A506
Enable the Adreno 506 that is found in SoCs such as Snapdragon 450,
Snapdragon 625 or Snapdragon 632 (msm8953 family).

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22647>
2023-04-24 16:01:24 +00:00
Mike Blumenkrantz 905264f27d zink: add a driver workaround to disable background compiles
it's stupid to do optimized background compiles if the driver is going
to create the exact same pipeline, so add a workaround to disable
this behavior

should improve ci runtimes on lavapipe by some amount

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22613>
2023-04-24 15:37:30 +00:00
Juan A. Suarez Romero b346c019d5 v3d: add support for ARB_texture_cube_map_array
This implements support for texture cubemap arrays.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22482>
2023-04-24 15:07:32 +00:00
Mike Blumenkrantz 1bc9efc10c zink: add z32s8 as mandatory GL3.0 profile attachment format
fixes #8616

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22608>
2023-04-24 14:33:58 +00:00
Mike Blumenkrantz e4c4fca16e zink: don't pin flush queue threads if no threads exist
Fixes: 270f9c0b06 ("zink: add ZINK_DEBUG=flushsync")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22611>
2023-04-24 14:10:45 +00:00
Karol Herbst a9cce40dab rusticl: don't set size_t-is-usize for >=bindgen-0.65
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8827
Fixes: 20c90fed5a ("rusticl: added")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22484>
2023-04-24 12:59:41 +00:00
Martin Roukala (né Peres) 62dd0370be zink/ci: mark 77 multisample-related tests as fixed
Reference: #6302
Fixes: a004825266 ("zink: don't render with multisampling when it is disabled")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22650>
2023-04-24 12:15:52 +00:00
Karol Herbst 9d7ba38013 ac/llvm: support shifts on 16 bit vec2
In OpenCL we can actually end up with those.

Fixes `basic astype` and those `integer_ops` OpenCL CTS tests:
integer_hadd
integer_rhadd
integer_upsample
quick_short_shift
quick_ushort_shift

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22597>
2023-04-24 13:17:05 +02:00
Karol Herbst 037b56bf0f radeonsi: lower mul_high
Fixes `integer_mad_hi` and `integer_mul_hi` `integer_ops` tests

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22597>
2023-04-24 13:17:00 +02:00
Sergi Blanch Torne d8253efe99 Revert "ci: disable Collabora's LAVA lab for maintance"
This reverts commit def1d097c9

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22182>
2023-04-24 10:27:41 +00:00
Eric Engestrom 8b791c24ea v3d: document that `V3D_DEBUG=shaderdb` is *not* for shader-db
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22659>
2023-04-24 10:01:00 +00:00
Iago Toral Quiroga 18a3a0d915 broadcom/compiler: fix incorrect check for SFU op
Before testing the waddr for SFU we should first validate this
is indeed a valid (not NOP) magic write. Use the helper we have for
this which gets this right.

total instructions in shared programs: 12898957 -> 12850958 (-0.37%)
instructions in affected programs: 4328937 -> 4280938 (-1.11%)
helped: 19974
HURT: 439
Instructions are helped.

total max-temps in shared programs: 2211503 -> 2210893 (-0.03%)
max-temps in affected programs: 12924 -> 12314 (-4.72%)
helped: 509
HURT: 20
Max-temps are helped.

total sfu-stalls in shared programs: 22233 -> 21975 (-1.16%)
sfu-stalls in affected programs: 722 -> 464 (-35.73%)
helped: 297
HURT: 54
Sfu-stalls are helped.

total inst-and-stalls in shared programs: 12921190 -> 12872933 (-0.37%)
inst-and-stalls in affected programs: 4337977 -> 4289720 (-1.11%)
helped: 20015
HURT: 404
Inst-and-stalls are helped.

total nops in shared programs: 333743 -> 305911 (-8.34%)
nops in affected programs: 86902 -> 59070 (-32.03%)
helped: 14545
HURT: 76
Nops are helped.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22593>
2023-04-24 09:34:20 +00:00
Iago Toral Quiroga b3ac456eb1 broadcom/compiler: add a v3d_qpu_instr_is_legacy_sfu helper
This checks for the deprecated, old-style SFU instructions triggered by
magic writes.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22593>
2023-04-24 09:34:20 +00:00
Iago Toral Quiroga 4a3be610d5 broadcom/compiler: fix v3d_qpu_uses_sfu
We should check that the alu op is valid before testing the
write address.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22593>
2023-04-24 09:34:20 +00:00
antonino ee4e7b9d4d zink: fix line strip offsets in pv mode emulation
Offsets for line strips don't need to alternate like they do for
triangle strips.

Fixes: 5a4083349f ("zink: add provoking vertex mode lowering")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22599>
2023-04-24 08:59:20 +00:00
antonino bdb3daab7c zink: fix exit condition on pv emulation loop
The exit condition was not correct causing the pv emulation lowering
pass to emit garbage for incomplete primitives.

Fixes: 5a4083349f ("zink: add provoking vertex mode lowering")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22599>
2023-04-24 08:59:20 +00:00