Skip to content

vulkan: Map R4G4B4A4_UNORM to VK_FORMAT_R4G4B4A4_UNORM_PACK16#161

Merged
jmacnak merged 1 commit into
google:mainfrom
utzcoz:mapping-R4G4B4A4_UNORM
Jul 10, 2026
Merged

vulkan: Map R4G4B4A4_UNORM to VK_FORMAT_R4G4B4A4_UNORM_PACK16#161
jmacnak merged 1 commit into
google:mainfrom
utzcoz:mapping-R4G4B4A4_UNORM

Conversation

@utzcoz

@utzcoz utzcoz commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

ToVkFormat had no mapping for GfxstreamFormat::R4G4B4A4_UNORM, so creating an RGBA4 color buffer failed with "Unsupported internal format" on every driver except under the lavapipe ICD override, where the format is substituted with B4G4R4A4 before the lookup. The format is already listed in the image support queries and the linear format plane layouts; only the enum mapping (and its inverse) was missing.

With the mapping in place, RoundTripsRgba4ColorBufferContents exercises the native RGBA4 path instead of skipping.

Test: bazel test //host/vulkan:vk_common_operations_tests
Change-Id: I4b4e9fb042b8aa62cef851c8cb5a5eb270c91b9a

ToVkFormat had no mapping for GfxstreamFormat::R4G4B4A4_UNORM, so
creating an RGBA4 color buffer failed with "Unsupported internal
format" on every driver except under the lavapipe ICD override, where
the format is substituted with B4G4R4A4 before the lookup. The format
is already listed in the image support queries and the linear format
plane layouts; only the enum mapping (and its inverse) was missing.

With the mapping in place, RoundTripsRgba4ColorBufferContents
exercises the native RGBA4 path instead of skipping.

Test: bazel test //host/vulkan:vk_common_operations_tests
Change-Id: I4b4e9fb042b8aa62cef851c8cb5a5eb270c91b9a
@utzcoz

utzcoz commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @jmacnak , PTAL. Thanks.

@jmacnak jmacnak enabled auto-merge July 10, 2026 02:55
@jmacnak jmacnak added this pull request to the merge queue Jul 10, 2026
Merged via the queue into google:main with commit 977e37b Jul 10, 2026
15 checks passed
@utzcoz utzcoz deleted the mapping-R4G4B4A4_UNORM branch July 10, 2026 06:18
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.

3 participants