From 13467f9bca2a4d0ae09d0284b208751a7021e6f3 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Tue, 10 Nov 2026 00:22:12 -0800 Subject: [PATCH] Probe: padded targets without Metal's optimized layout Blits moved only some texels of a private padded target in Metal's optimized (compressed) layout: a write mask of no channel stored the uploaded word in 36% of an R10Unorm_X6 target, in blocks. The targets now set allowGPUOptimizedContents to NO, which changes the memory layout alone. (cherry picked from commit 8e418e5df5a36114ad13b30c86d85efa913a2b3a) --- .../metal2vulkan-conformance/probes/padded_and_bfloat_blends.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/metal2vulkan-conformance/probes/padded_and_bfloat_blends.m b/crates/metal2vulkan-conformance/probes/padded_and_bfloat_blends.m index 7be02e88f..c243aa603 100644 --- a/crates/metal2vulkan-conformance/probes/padded_and_bfloat_blends.m +++ b/crates/metal2vulkan-conformance/probes/padded_and_bfloat_blends.m @@ -246,6 +246,9 @@ static id target(const Format *f) { td.height = H; td.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead; td.storageMode = MTLStorageModePrivate; + // Blits move only some of a padded texture's texels where Metal keeps it in its optimized + // (compressed) layout. + td.allowGPUOptimizedContents = NO; return [gDevice newTextureWithDescriptor:td]; }