Skip to content

Commit

Permalink
vulkan: support new texture formats
Browse files Browse the repository at this point in the history
  • Loading branch information
EriKWDev committed Dec 15, 2024
1 parent 3e381b7 commit d7244e2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions blade-graphics/src/vulkan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ fn map_texture_format(format: crate::TextureFormat) -> vk::Format {
Tf::Bgra8UnormSrgb => vk::Format::B8G8R8A8_SRGB,
Tf::Rgba8Snorm => vk::Format::R8G8B8A8_SNORM,
Tf::R16Float => vk::Format::R16_SFLOAT,
Tf::Rg16Float => vk::Format::R16G16_SFLOAT,
Tf::Rgba16Float => vk::Format::R16G16B16A16_SFLOAT,
Tf::R32Float => vk::Format::R32_SFLOAT,
Tf::Rg32Float => vk::Format::R32G32_SFLOAT,
Expand All @@ -556,6 +557,14 @@ fn map_texture_format(format: crate::TextureFormat) -> vk::Format {
Tf::Bc4Snorm => vk::Format::BC4_SNORM_BLOCK,
Tf::Bc5Unorm => vk::Format::BC5_UNORM_BLOCK,
Tf::Bc5Snorm => vk::Format::BC5_SNORM_BLOCK,
Tf::Bc6UFloat => vk::Format::BC6H_UFLOAT_BLOCK,
Tf::Bc6SFloat => vk::Format::BC6H_SFLOAT_BLOCK,
Tf::Bc7Unorm => vk::Format::BC7_UNORM_BLOCK,
Tf::Bc7UnormSrgb => vk::Format::BC7_SRGB_BLOCK,
Tf::Rgb10a2Unorm => vk::Format::A2R10G10B10_UNORM_PACK32,
Tf::Bgr10a2Unorm => vk::Format::A2B10G10R10_UNORM_PACK32,
Tf::Rg11b10Float => vk::Format::B10G11R11_UFLOAT_PACK32,
Tf::Rgb9e5Float => vk::Format::E5B9G9R9_UFLOAT_PACK32,
}
}

Expand Down

0 comments on commit d7244e2

Please sign in to comment.