mesa/src/broadcom
Jose Maria Casanova Crespo 31ea1923de v3d: reject fast TLB blit when RT formats don't match
v3d_tlb_blit_fast includes the blit onto a pending job that writes
to the source resource. The TLB data is already unpacked according to
the job's RT format, so storing it with a different RT format performs
a channel reinterpretation rather than a raw byte copy, corrupting the
data.

So when copying from RGB10_A2UI to RG16UI with glCopyImageSubData,
the copy_image path remaps both formats to R16G16_UNORM for a raw
32-bit copy. The fast TLB blit found the pending clear job
(RGB10_A2UI, 4 channels: 10-10-10-2) and stored its TLB data as RG16UI
(2 channels: 16-16), writing the unpacked 10-bit R and G channel values
into 16-bit fields instead of preserving the raw packed bits.

Previous internal_type/bpp check was insufficient: both RGB10_A2UI
and RG16UI share internal_type=16UI and the source bpp (64) exceeds
the destination bpp (32), but their channel layouts are different.

Add a check that the job's source surface RT format matches the blit
destination RT format before allowing the fast path.

Fixes: 66de8b4b5c ("v3d: add a faster TLB blit path")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit 5454221cfb)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
2026-03-11 23:21:09 +01:00
..
ci v3d: reject fast TLB blit when RT formats don't match 2026-03-11 23:21:09 +01:00
cle broadcom/cle: bump up gen version for v3d 2026-02-04 18:39:35 +01:00
clif build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
common v3d: Enable TFU blits with raster destinations on 7.1 HW (RPi5) 2025-12-15 11:57:51 +00:00
compiler nir/lower_blend: Move the format to nir_lower_blend_rt 2026-01-19 21:33:14 +00:00
drm-shim v3d/drm-shim: add support for multisync 2025-08-04 08:06:36 +02:00
ds mesa: replace most occurrences of getenv() with os_get_option() 2025-11-06 04:36:13 +00:00
perfcntrs broadcom: Add perfcount library 2024-12-02 14:13:24 +00:00
qpu broadcom/compiler: enable umul24 and imul24 ALU opcodes 2025-11-26 13:32:39 +00:00
simulator treewide: use UTIL_DYNARRAY_INIT 2025-11-04 13:39:48 +00:00
vulkan v3dv: improve barrier handling for secondary command buffers 2026-01-21 07:37:49 +00:00
.editorconfig
meson.build broadcom: Add perfetto data source 2024-12-13 12:29:11 +00:00