Skip to content

igl | vulkan | fix: Correct format conversion between AHARDWAREBUFFER_FORMAT and igl::TextureFormat for R5G6B5_UNorm#401

Closed
vinsentli wants to merge 1 commit into
facebook:mainfrom
vinsentli:AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM
Closed

igl | vulkan | fix: Correct format conversion between AHARDWAREBUFFER_FORMAT and igl::TextureFormat for R5G6B5_UNorm#401
vinsentli wants to merge 1 commit into
facebook:mainfrom
vinsentli:AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM

Conversation

@vinsentli

@vinsentli vinsentli commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Initially, IGL only supported the TextureFormat::B5G6R5_UNorm format, so AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM was mapped to TextureFormat::B5G6R5_UNorm.

Later, I introduced TextureFormat::R5G6B5_UNorm(#358), which introduced a mapping conflict: both TextureFormat::R5G6B5_UNorm and TextureFormat::B5G6R5_UNorm were forwarded to AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM, while the reverse mapping (from AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM back to an IGL texture format) could only resolve to TextureFormat::B5G6R5_UNorm.

To fix this, I’ve standardized the mapping to exclusively pair AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM with TextureFormat::R5G6B5_UNorm.

⚠️ This is a breaking change: It may require migration work for existing users who previously relied on TextureFormat::B5G6R5_UNorm for Android Hardware Buffer workflows. Please carefully assess whether to merge this PR.

@meta-cla meta-cla Bot added the cla signed label Jun 15, 2026
@meta-codesync

meta-codesync Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@corporateshark has imported this pull request. If you are a Meta employee, you can view this in D108577875.

@meta-codesync meta-codesync Bot closed this in 0429b2e Jun 15, 2026
@meta-codesync meta-codesync Bot added the Merged label Jun 15, 2026
@meta-codesync

meta-codesync Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@corporateshark merged this pull request in 0429b2e.

@vinsentli vinsentli deleted the AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM branch June 16, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant