Skip to content

Make the Xenoblade Chronicles: Definitive Edition profile work on Android (1/3): raw uint views of packed formats, uncompressed - #640

Open
tapionallanaire wants to merge 1 commit into
igawa6:mainfrom
tapionallanaire:pr/packed-raw-views
Open

tapionallanaire wants to merge 1 commit into
igawa6:mainfrom
tapionallanaire:pr/packed-raw-views

Conversation

@tapionallanaire

@tapionallanaire tapionallanaire commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Android support: one of the two fixes that make the Xenoblade Chronicles: Definitive Edition (0100FF500E34A000, 1.1.2) profile work on Android (Colony 9 roads). The other is #641; the profile change is #642.

What

Two changes to how the Vulkan replay views packed 4-byte formats:

  1. class_twin gives packed 4-byte formats (B10G11R11, E5B9G9R9, A2B10G10R10, BGRA8, sRGB RGBA8) R32_UINT / R32_SINT twins. A shader that reads them as uint / int images gets the texel's raw 32-bit word, as Maxwell's raw image load does.
  2. An image whose format list holds a view of another texel layout (not its sRGB / raw UNORM twin) is made with VK_IMAGE_COMPRESSION_DISABLED_EXT, where the device has VK_EXT_image_compression_control. DM_VK_UBWC_RAWVIEW=0 turns it off.

Why

Xenoblade Chronicles: Definitive Edition reads its 1280x720 A2B10G10R10 targets (NVN format 0x3d) as uint shader images in four shaders (48b8ea8fad25398d, fe993ca274dfde1c, 5119ea2c4c0a2211, efa9a20a7f820920). Without a twin, the images read as unbound ([RED] ... has no view of shape 0x81 (storage)), so the roads in Colony 9 drew black.

With the view, the roads came out in black and grey blocks. Turnip on a7xx keeps UBWC on an image whatever its view formats (ubwc_all_formats_compatible), so the R32_UINT view read compressed data.

Tested

AYN Thor (Adreno 740, Turnip v27.0.0-R1), XCDE 1.1.2, Colony 9 Commercial District:

  • TU_DEBUG=noubwc drew the roads right.
  • TU_DEBUG=sysmem, TU_DEBUG=nolrz, DM_VK_UBWC=0 and DM_VK_ZSHARE=0 did not.
  • With this change, the roads are right with no TU_DEBUG, and the frame time is unchanged (33.6 ms).

The native build passes on this branch.

Proof (AYN Thor, Colony 9 Commercial District)

Uint view, UBWC on (blocks) With this PR

Xenoblade Chronicles: Definitive Edition reads its 1280x720 A2B10G10R10
targets as uint shader images (their raw 32-bit words). Packed 4-byte
formats had no class twin, so those images read as unbound: black roads
in Colony 9. class_twin now gives them R32_UINT / R32_SINT.

With the view, Turnip on a7xx kept UBWC on the image (it treats all
view formats as UBWC-compatible) and the R32_UINT view read compressed
blocks: the roads came out in black and grey blocks. An image whose
format list holds a view of another texel layout (not its sRGB / raw
UNORM twin) is now made with VK_IMAGE_COMPRESSION_DISABLED_EXT where
the device has VK_EXT_image_compression_control. DM_VK_UBWC_RAWVIEW=0
turns it off.

Tested on an AYN Thor (Adreno 740, Turnip v27.0.0-R1): TU_DEBUG=noubwc
drew the roads right; sysmem, nolrz, DM_VK_UBWC=0 and DM_VK_ZSHARE=0
did not. With the change the roads are right with no TU_DEBUG.
@tapionallanaire tapionallanaire changed the title vk_android: raw uint views of packed formats, made uncompressed (Xenoblade DE roads) Make the Xenoblade Chronicles: Definitive Edition profile work on Android (1/3): raw uint views of packed formats, uncompressed Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant