Skip to content

Commit

Permalink
remove Bgr10a2, rename Rg11b10Float -> Rg11b10Ufloat
Browse files Browse the repository at this point in the history
  • Loading branch information
EriKWDev committed Dec 15, 2024
1 parent c895a16 commit cac73c3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
7 changes: 1 addition & 6 deletions blade-graphics/src/gles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,7 @@ fn describe_texture_format(format: crate::TextureFormat) -> FormatInfo {
glow::RGBA,
glow::UNSIGNED_INT_2_10_10_10_REV,
),
Tf::Bgr10a2Unorm => (
glow::RGB10_A2, // TODO: Unsupported?
glow::BGRA,
glow::UNSIGNED_INT_2_10_10_10_REV,
),
Tf::Rg11b10Float => (
Tf::Rg11b10Ufloat => (
glow::R11F_G11F_B10F,
glow::RGB,
glow::UNSIGNED_INT_10F_11F_11F_REV,
Expand Down
3 changes: 1 addition & 2 deletions blade-graphics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,7 @@ pub enum TextureFormat {
Bc7UnormSrgb,
// packed 32-bit
Rgb10a2Unorm,
Bgr10a2Unorm,
Rg11b10Float,
Rg11b10Ufloat,
Rgb9e5Ufloat,
}

Expand Down
3 changes: 1 addition & 2 deletions blade-graphics/src/metal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ fn map_texture_format(format: crate::TextureFormat) -> metal::MTLPixelFormat {
Tf::Bc7Unorm => BC7_RGBAUnorm,
Tf::Bc7UnormSrgb => BC7_RGBAUnorm_sRGB,
Tf::Rgb10a2Unorm => RGB10A2Unorm,
Tf::Bgr10a2Unorm => BGR10A2Unorm,
Tf::Rg11b10Float => RG11B10Float,
Tf::Rg11b10Ufloat => RG11B10Float,
Tf::Rgb9e5Ufloat => RGB9E5Float,
}
}
Expand Down
3 changes: 1 addition & 2 deletions blade-graphics/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ impl super::TextureFormat {
Self::Bc7Unorm => cx_bc(16),
Self::Bc7UnormSrgb => cx_bc(16),
Self::Rgb10a2Unorm => uncompressed(4),
Self::Bgr10a2Unorm => uncompressed(4),
Self::Rg11b10Float => uncompressed(4),
Self::Rg11b10Ufloat => uncompressed(4),
Self::Rgb9e5Ufloat => uncompressed(4),
}
}
Expand Down
5 changes: 2 additions & 3 deletions blade-graphics/src/vulkan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,8 @@ fn map_texture_format(format: crate::TextureFormat) -> vk::Format {
Tf::Bc6hFloat => 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::Rgb10a2Unorm => vk::Format::A2B10G10R10_UNORM_PACK32,
Tf::Rg11b10Ufloat => vk::Format::B10G11R11_UFLOAT_PACK32,
Tf::Rgb9e5Ufloat => vk::Format::E5B9G9R9_UFLOAT_PACK32,
}
}
Expand Down

0 comments on commit cac73c3

Please sign in to comment.