Commit graph

189224 commits

Author SHA1 Message Date
Caio Oliveira
fd6045cca9 brw: Track total_instructions in a shader
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
7224b653b5 brw: Use block's num_instructions in scoreboard tests
Stop using the start_ip / end_ip, these are not really important for
those tests.  What the test care was the number of instructions in the
block to check for changes and ensure we can peek at them by index.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
1139ede508 brw: Track num_instructions in a block
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Caio Oliveira
abe8d35cb8 brw: Remove brw_cfg::dump()
It was used by the pass tests to verify output with TEST_DEBUG=1,
replace it with brw_print_instructions().

The output is slightly different (not printing IP, not reordering the
blocks), we can add those features as we need, but given the usage was
already very reduced, don't bother with that until need arises.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34012>
2025-03-29 00:25:50 +00:00
Faith Ekstrand
e980123293 venus: Set wsi_device::supports_scanout = false
This will cause venus to take the prime blit path if modifiers are not
supported.  This has been an outstanding TODO in venus for a while.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
11ba89097f venus: Only claim modifiers in WSI if the host driver supports it
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
de7cae705d venus: Don't report global priorities if globalPriorityQuery is unsupported
Drivers are expected to ignore unknown structs in pNext chains.  Venus
is a bit weird because we advertise features based on the host driver
and so we have code for all sorts of things which may not be supported
by the host driver.  When globalPriorityQuery is unsupported, we
shouldn't even attempt to return anything.  Currently, we just crash in
this case because vn_physical_device::global_priority_properties is an
uninitialized pointer.  While we're here, initialize it to NULL if it's
invalid.

Fixes: e488b5e45e ("venus: support VK_KHR_global_priority")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
e7bb6df7cb venus: Assume wsi_mem->base_bo != NULL
Now that the WSI code is signaling the correct BO, we don't need this
workaround in venus.

Fixes: a315a64291 ("venus: relax 2 assertions for prime blit path")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Faith Ekstrand
cf23ffcbae vulkan/wsi: Signal buffer memory object when blitting
When we're using the PRIME path and using vkCmdCopyImageToBuffer to copy
to a linear image, the buffer memory is what's shared with the window
system.  For legacy drivers that depend on memory signaling via
wsi_memory_signal_submit_info, we need to tell the driver to signal the
buffer memory, not the image memory or else the window system may wait
on a driver-internal buffer and not wait for the copy to complete.

Cc: mesa-stable
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34218>
2025-03-28 23:54:51 +00:00
Natalie Vock
8b0271050a vulkan/bvh: Move first PLOC task_count fetch inside PHASE
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise, the memory fetch is not protected by the global sync and
memory barriers and there is a chance to read a stale (or just wrong)
task count.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34178>
2025-03-28 23:07:17 +00:00
Natalie Vock
c1e1d86bd1 radv/rt: Flush CP writes from the common BVH framework with INV_L2 on GFX12
a1b05991 ("radv/rt: Flush L2 after writing internal node offset on GFX12")
did this for radv-internal CP writes - we also need to do this for PLOC
sync data initialization which is done in the common framework.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34178>
2025-03-28 23:07:17 +00:00
David Rosca
51292976fe frontends/va: Don't ignore rotation and mirror for conversions to RGB
Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
2025-03-28 22:31:34 +00:00
David Rosca
962c33cbca gallium/vl: Fix mirror with rotation for compute shaders
The mirror needs to be reversed because the rotation is applied
before the mirroring.

VAAPI docs:
  Mirroring of an image can be performed either along the
  horizontal or vertical axis. It is assumed that the rotation
  operation is always performed before the mirroring operation.

Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
2025-03-28 22:31:34 +00:00
David Rosca
c8a2f0b248 gallium/vl: Fix rotation with scaling for compute shaders
Cc: mesa-stable
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34140>
2025-03-28 22:31:34 +00:00
Robert Mader
2034c901cc llvmpipe: Free dummy_dmabuf on shutdown
In order to stop ASAN from complaining.

Fixes: d21aa86b54 ("llvmpipe: Implement EGL_ANDROID_native_fence_sync")
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34258>
2025-03-28 22:01:29 +00:00
Dave Airlie
737d66379d anv: expose VK_KHR_video_maintenance2
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
dc8e21ce60 radv: expose VK_KHR_video_mainteance2
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
5d61e05e6c vulkan/video: add support for inline session paramters.
This is part of VK_KHR_video_maintenance2

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
af560cd680 anv/video: don't write to params if not set.
This should probably be done different, params should probably be considered immutable,
and this should be moved into the command buffer, also this gets set on decode paths as well
which might not make sense.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
e4981731be anv/video: convert to common parameters retrieval code
Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
feef12b2a8 radv/video: convert to using common parameter wrappers.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Dave Airlie
03f8425fd4 vulkan/video: add simple parameter retrieval wrappers
These are simple now but maintenance2 adds inline parameter sets,
so I will use them more then.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
2025-03-28 21:18:00 +00:00
Samuel Pitoiset
a7d8e5d4ca ac,radv,radeonsi: use PM4 for shadowed registers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34228>
2025-03-28 20:50:22 +00:00
David Rosca
1ba427c4fb radeonsi/video: Allow DCC 256B block size with drm minor >= 63
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34148>
2025-03-28 20:26:39 +00:00
David Rosca
a2b4617c00 radeonsi/vce: Support old VCE firmware
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12866
Fixes: 104f9c6654 ("radeonsi/vce: Remove support for FW 50 and older")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34152>
2025-03-28 20:03:27 +00:00
Samuel Pitoiset
250742519f radv: disable TC-compatible CMASK with {FMASK,DCC}_DECOMPRESS
Because if FMASK_COMPRESS_1FRAG_ONLY is set, the FMASK decompress
operation actually doesn't occur. Note that DCC_DECOMPRESS implicitly
decompresses FMASK.

This fixes an issue on GFX10-GFX10.3 which is uncovered by enabling
VK_EXT_sample_locations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
8c96b9e306 radv: make sure to always decompress FMASK before expanding it
This is actually required even for TC-compatible CMASK images.

VKCTS coverage is missing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
42b0df447c radv: inline radv_fast_clear_flush_image_inplace()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
09d91837e4 radv: rework radv_handle_color_image_transition()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:07 +00:00
Samuel Pitoiset
7bb3a2363d radv: add radv_fmask_color_expand()
Similar to radv_fmask_decompress()/radv_fast_clear_eliminate() helpers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:06 +00:00
Samuel Pitoiset
aaf634cc24 radv: rework radv_fast_clear_flush_image_inplace()
FMASK_DECOMPRESS also implies FAST_CLEAR_ELIMINATE, so it can run first.
The only exception is fast-clear for color images that have DCC and
FMASK but without comp-to-single (only GFX10) because FMASK_DECOMPRESS
can't eliminate DCC fast-clears.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:06 +00:00
Samuel Pitoiset
a452098791 radv: skip FCE for comp-to-single fast clears with DCC MSAA
comp-to-single supports MSAA since a while and it's useless to perform
a fast clear eliminate for these fast color clears.

Only GFX10-GFX10.3 are affected because these are the only GPUs that
support DCC with MSAA with FMASK.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33639>
2025-03-28 19:41:06 +00:00
Michael Cheng
169e7acee1 vulkan: add leaves and ir_leaves sizes to encode for utrace.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Expose number of leaves and ir_leaves to the debug marker for encode.

Signed-off-by: Michael Cheng <michael.cheng@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34200>
2025-03-28 18:25:40 +00:00
Daniel Stone
e3433489f8 ci: Move softpipe issue from fail to flake
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Seems to be caused by environmental differences between runners. Keep it
as a flake until Piglit gets properly fixed.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
51c67ad7cf brw: Avoid regioning restrictions for u2u16/i2i16 narrowing conversions
Cuts 0.83% of instructions on Alchemist in affected fossil-db shaders
(nearly all of which are in parallel-rdp).

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
86f8b8860e brw: Use a smaller type for masked sub-32-bit shift values
Cuts 0.14% of instructions on Alchemist in affected fossil-db shaders
(all of which are in parallel-rdp).

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
2e108afb8c brw: Skip unnecessary UNDEFs for comparisons
For example, SIMD16 W/UW fills an entire REG_SIZE so UNDEF isn't needed.

No change in fossil-db.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
771e65b0db brw: Emit UNDEF as needed in SSA-style builder helpers
Should prevent regressions in a future commit.
fossil-db does show small changes, but it ends up a wash at 0.0%.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Kenneth Graunke
b89e269a46 brw: Make a helper to emit UNDEF for temporaries containing small types
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31833>
2025-03-28 13:40:07 +00:00
Daniel Stone
f6f085f50a ci: Re-enable trace jobs with updated Piglit
mesa/piglit!996 fixed up Piglit to allow us to do trace downloads again,
so we can now bring these jobs back. The fdno trace jobs hosted at
Google are still disabled whilst we try to fix their nginx.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34245>
2025-03-28 13:00:14 +00:00
Mike Blumenkrantz
5d46e2bf3c zink: implement unsynchronized staging uploads for buffers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
similar to images, this comes from unsynchronized texture_subdata
serialization in tc

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34186>
2025-03-28 12:35:03 +00:00
Mike Blumenkrantz
c0b1a23e35 zink: block streaming cached uploads on unsynchronized/persistent maps
this is broken

Fixes: e63acdd2b7 ("zink: force cached mem for streaming uploads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34186>
2025-03-28 12:35:03 +00:00
Daniel Stone
d9dffd778a ci/zink: Flake out sparse tests
These were always-crash in CI, had a comment saying they passed locally,
and now seem to be passing in CI. Just hit it as flake until someone
actually looks into it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34256>
2025-03-28 12:06:08 +00:00
Daniel Stone
c8c427fb3d ci/amd: Add new radeonsi fail seen in the wild
Unsure how this slipped in, but it sure is failing consistently.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34256>
2025-03-28 12:06:08 +00:00
Daniel Stone
9d94e1ed0d etnaviv: Add missing build dependency on generated header
bindings.h pulls in enums.h, so anything using it needs to depend on
enums.h to avoid spurious build failures.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34256>
2025-03-28 12:06:08 +00:00
Connor Abbott
8864ee7b0f tu: Fix reported FDM fragment size with multiview
We were never setting has_multiview. It's not actually necessary anyway,
since we can just do the optimization we were trying to do whenever
num_views is 1 instead.

This doesn't affect the actual fragment size, which was already correct,
only gl_FragSizeEXT.

Fixes: 6f2be52487 ("tu, ir3: Handle FDM shader builtins")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33991>
2025-03-28 11:35:22 +00:00
Connor Abbott
122f2c422a tu: Fix size of frag_size_ir3 and frag_offset_ir3 driver params
They are an array, so we have to reserve extra space for extra views.
This bug was being masked by the bug fixed in the next commit.

Fixes: 76e417ca59 ("turnip,ir3/a750: Implement consts loading via preamble")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33991>
2025-03-28 11:35:22 +00:00
Connor Abbott
9775b33d0f tu: Enable GMEM with layered rendering
We accidentally forgot to enable it earlier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34082>
2025-03-28 11:07:38 +00:00
Connor Abbott
6cadc1baea tu: Fix GMEM offset for multisample layered separate stencil
Fixes a bug uncovered by CTS when enabling GMEM with layered rendering.

Fixes: def56b531c ("tu: Support GMEM with layered rendering and multiview")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34082>
2025-03-28 11:07:38 +00:00
Connor Abbott
b1dcc9a1d7 tu: Fix binning_possible detection with bin merging
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When bin merging we maximize instead of minimize the VSC pipe size,
which means that we fail when there are too many pipes instead of when
the pipes are too large. This means that we need to calculate
binning_possible differently, and we need to skip
tu_tiling_config_update_pipes() when binning is impossible because
otherwise we will write out-of-bounds.

Fixes: 3fdaad0948 ("tu: Implement bin merging for fragment density map")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34196>
2025-03-28 09:34:06 +00:00