upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-24 20:46:02 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-24 20:46:02 -0500
commit22171d092ff028f23e9201aa4fcd9b812ff272d9 (patch)
tree24fc72007470383e5b20669547488184e8e735d1 /runtime/src
parent22f2a04afdc81c594988e3fecb511802bc1c0e46 (diff)
B4G4R4A4 targets stored as RGBA8 carry #939's flag: clears quantised, footprint copies still made
The base's early return for such a target came before #939's lines, so Format::rgba4_render_fallback was never set: #939's pixel-shader quantisation ran (it keys on the pipeline), its clear quantisation and its refusal of footprint copies did not. The flag is set now, so a clear stores what a draw would. The refusal of footprint copies is not taken as the default: the story-load boots of #984 ran with those copies made; LEONIDA_RGBA4_COPY_REFUSE=1 gives #939's refusal. Neither test device here lacks a 4444 colour attachment, so this path is exercised only on a GPU that does (NVIDIA). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src')
-rw-r--r--runtime/src/vulkan_replay.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/runtime/src/vulkan_replay.h b/runtime/src/vulkan_replay.h
index 1bea0ea33..2fef87194 100644
--- a/runtime/src/vulkan_replay.h
+++ b/runtime/src/vulkan_replay.h
@@ -3286,7 +3286,15 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3286 !detail::stage_unaligned_tile(vk, p, image, fmt, upload)) 3286 !detail::stage_unaligned_tile(vk, p, image, fmt, upload))
3287 return unsupported_at(__LINE__); 3287 return unsupported_at(__LINE__);
3288 } 3288 }
3289 if(result==ReplayResult::success && image.rgba4_render_fallback) return ReplayResult::unsupported; 3289 // A B4G4R4A4 target stored as RGBA8 moves 4-byte texels in a footprint copy, not packed 16-bit ones.
3290 // The copy is made all the same, as the retail boot was measured with it;
3291 // LEONIDA_RGBA4_COPY_REFUSE=1 refuses it instead.
3292 static const bool refuse_rgba4_copy = [] {
3293 const char* v = std::getenv("LEONIDA_RGBA4_COPY_REFUSE");
3294 return v && *v == '1';
3295 }();
3296 if (result == ReplayResult::success && image.rgba4_render_fallback && refuse_rgba4_copy)
3297 return ReplayResult::unsupported;
3290 if(result==ReplayResult::success && image.xbox_depth16_stencil8 && image.format!=VK_FORMAT_D16_UNORM_S8_UINT && 3298 if(result==ReplayResult::success && image.xbox_depth16_stencil8 && image.format!=VK_FORMAT_D16_UNORM_S8_UINT &&
3291 !p.buffer_image_copies.empty() && p.buffer_image_copies[0].imageSubresource.aspectMask==VK_IMAGE_ASPECT_DEPTH_BIT) return ReplayResult::unsupported; 3299 !p.buffer_image_copies.empty() && p.buffer_image_copies[0].imageSubresource.aspectMask==VK_IMAGE_ASPECT_DEPTH_BIT) return ReplayResult::unsupported;
3292 const bool depth24_footprint = result == ReplayResult::success && image.depth24_as_float && 3300 const bool depth24_footprint = result == ReplayResult::success && image.depth24_as_float &&