Repository navigation
Conversation
Huawei Maleoon GPUs (Kirin SoCs, e.g. Maleoon 910/920) show two rendering bugs on their Vulkan driver: - Encoding a small render pass between EFB passes (the half-size EFB copies used by depth of field, format-converting EFB copies) corrupts the top-left region of the EFB. This shows up as a black or speckled box covering the top-left quarter of the screen. - Compressed render targets get corrupted by some draws, which shows up as black speckled blocks on water refraction, particles (dust, splashes) and the sun glare. When the adapter name contains "Maleoon": - EFB copies that need scaling or format conversion (color and depth) are encoded as compute passes writing to storage textures instead of render passes. The existing per-format conversion shaders are reused as plain functions. - The EFB render textures get StorageBinding usage, which keeps the driver from compressing them. Other adapters are unaffected.
|
It's not up to me, but fixing this in Aurora seems misguided. Ideally you fix the driver. If it's closed source, add the workaround in Dawn and see if they'd accept that patch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On devices with a Huawei Maleoon GPU (Kirin SoCs), Dusklight shows:
Reported in TwilitRealm/dusklight#954 (and the duplicate TwilitRealm/dusklight#1616).
Cause
Two separate driver bugs, narrowed down by toggling individual copy paths and texture usages at runtime on a device:
StorageBindingusage, which keeps the driver from compressing them, avoids it.Fix
Gated on the adapter name containing
Maleoon(webgpu::g_maleoonWorkarounds):tex_copy_conv: compute variants of the blit and all color/depth conversion copies. The existing fragment bodies are reused as functions, so the conversion math is shared with the render-pass path.encoding.cpp: EFB copies that need scaling or conversion use the compute path when it's supported (RGBA8 destination with storage usage).texture.cpp: copy/conversion destination textures getStorageBinding(RGBA8 only).gpu.cpp: the two EFB render textures getStorageBinding; adapter detection.Other adapters keep the existing render-pass path and texture usages.
Testing
Huawei MatePad Pro 2025 (Maleoon 920, driver B265 1010.279.708), Vulkan, 2800×1840:
Not tested on other Maleoon GPUs or driver versions.