From cac73c3898ea53ac7b460a5aa6cec5d9ef97a0c9 Mon Sep 17 00:00:00 2001 From: ErikWDev Date: Sun, 15 Dec 2024 22:21:34 +0100 Subject: [PATCH] remove Bgr10a2, rename Rg11b10Float -> Rg11b10Ufloat --- blade-graphics/src/gles/mod.rs | 7 +------ blade-graphics/src/lib.rs | 3 +-- blade-graphics/src/metal/mod.rs | 3 +-- blade-graphics/src/util.rs | 3 +-- blade-graphics/src/vulkan/mod.rs | 5 ++--- 5 files changed, 6 insertions(+), 15 deletions(-) diff --git a/blade-graphics/src/gles/mod.rs b/blade-graphics/src/gles/mod.rs index 142cc9a..83a0f2e 100644 --- a/blade-graphics/src/gles/mod.rs +++ b/blade-graphics/src/gles/mod.rs @@ -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, diff --git a/blade-graphics/src/lib.rs b/blade-graphics/src/lib.rs index b41ff6c..417038d 100644 --- a/blade-graphics/src/lib.rs +++ b/blade-graphics/src/lib.rs @@ -314,8 +314,7 @@ pub enum TextureFormat { Bc7UnormSrgb, // packed 32-bit Rgb10a2Unorm, - Bgr10a2Unorm, - Rg11b10Float, + Rg11b10Ufloat, Rgb9e5Ufloat, } diff --git a/blade-graphics/src/metal/mod.rs b/blade-graphics/src/metal/mod.rs index 6cbf374..730110c 100644 --- a/blade-graphics/src/metal/mod.rs +++ b/blade-graphics/src/metal/mod.rs @@ -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, } } diff --git a/blade-graphics/src/util.rs b/blade-graphics/src/util.rs index 1eebb86..33c3a00 100644 --- a/blade-graphics/src/util.rs +++ b/blade-graphics/src/util.rs @@ -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), } } diff --git a/blade-graphics/src/vulkan/mod.rs b/blade-graphics/src/vulkan/mod.rs index 5c9b133..47e278b 100644 --- a/blade-graphics/src/vulkan/mod.rs +++ b/blade-graphics/src/vulkan/mod.rs @@ -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, } }