Should i use VK_FORMAT_R8G8B8_UNORM for backbuffer format in vulkan?

Hey, i noticed our game's opengles rhi uses r8g8b8_unorm format as backbuffer color. The vulkan rhi uses VK_FORMAT_R8G8B8A8_UNORM by default, should we use VK_FORMAT_R8G8B8_UNORM instead if supported to save bandwidth? Does uisng VK_FORMAT_R8G8B8_UNORM as backbuffer has any side effects?

Parents
  • In general most 3 component formats get padded to 4 components and are RGBX8, so I don't think it matters much.

    If you do use RGBA, make sure you write zero or one to alpha to get good compression.

    Things get padded to 4 components because hardware doesn't like formats that have pixels that can span multiple cache lines/memory pages :)

    Cheers,

    Pete

Reply
  • In general most 3 component formats get padded to 4 components and are RGBX8, so I don't think it matters much.

    If you do use RGBA, make sure you write zero or one to alpha to get good compression.

    Things get padded to 4 components because hardware doesn't like formats that have pixels that can span multiple cache lines/memory pages :)

    Cheers,

    Pete

Children
No data