Rename Rg11b10UFloat to Rg11b10Ufloat (#6226)

This commit is contained in:
Valaphee The Meerkat 2024-09-06 11:46:49 +02:00 committed by GitHub
parent e6a2a86f2c
commit 07684d3623
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 38 additions and 38 deletions

View File

@ -106,7 +106,7 @@ By @teoxoy [#6134](https://github.com/gfx-rs/wgpu/pull/6134).
- `wgpu_hal::gles::Adapter::new_external` now requires the context to be current when dropping the adapter and related objects. By @Imberflur in [#6114](https://github.com/gfx-rs/wgpu/pull/6114).
- Reduce the amount of debug and trace logs emitted by wgpu-core and wgpu-hal. By @nical in [#6065](https://github.com/gfx-rs/wgpu/issues/6065)
- `Rg11b10Float` is renamed to `Rg11b10UFloat`. By @sagudev in [#6108](https://github.com/gfx-rs/wgpu/pull/6108)
- `Rg11b10Float` is renamed to `Rg11b10Ufloat`. By @sagudev in [#6108](https://github.com/gfx-rs/wgpu/pull/6108)
#### HAL

View File

@ -399,7 +399,7 @@ impl<'a, W> Writer<'a, W> {
| StorageFormat::Rg16Float
| StorageFormat::Rgb10a2Uint
| StorageFormat::Rgb10a2Unorm
| StorageFormat::Rg11b10UFloat
| StorageFormat::Rg11b10Ufloat
| StorageFormat::Rg32Uint
| StorageFormat::Rg32Sint
| StorageFormat::Rg32Float => {

View File

@ -4825,7 +4825,7 @@ fn glsl_storage_format(format: crate::StorageFormat) -> Result<&'static str, Err
Sf::Rgba8Sint => "rgba8i",
Sf::Rgb10a2Uint => "rgb10_a2ui",
Sf::Rgb10a2Unorm => "rgb10_a2",
Sf::Rg11b10UFloat => "r11f_g11f_b10f",
Sf::Rg11b10Ufloat => "r11f_g11f_b10f",
Sf::Rg32Uint => "rg32ui",
Sf::Rg32Sint => "rg32i",
Sf::Rg32Float => "rg32f",

View File

@ -132,7 +132,7 @@ impl crate::StorageFormat {
Self::Rg8Sint | Self::Rg16Sint | Self::Rg32Uint => "int2",
Self::Rg8Uint | Self::Rg16Uint | Self::Rg32Sint => "uint2",
Self::Rg11b10UFloat => "float3",
Self::Rg11b10Ufloat => "float3",
Self::Rgba16Float | Self::Rgba32Float => "float4",
Self::Rgba8Unorm | Self::Bgra8Unorm | Self::Rgba16Unorm | Self::Rgb10a2Unorm => {

View File

@ -1170,7 +1170,7 @@ impl From<crate::StorageFormat> for spirv::ImageFormat {
Sf::Bgra8Unorm => Self::Unknown,
Sf::Rgb10a2Uint => Self::Rgb10a2ui,
Sf::Rgb10a2Unorm => Self::Rgb10A2,
Sf::Rg11b10UFloat => Self::R11fG11fB10f,
Sf::Rg11b10Ufloat => Self::R11fG11fB10f,
Sf::Rg32Uint => Self::Rg32ui,
Sf::Rg32Sint => Self::Rg32i,
Sf::Rg32Float => Self::Rg32f,

View File

@ -2023,7 +2023,7 @@ const fn storage_format_str(format: crate::StorageFormat) -> &'static str {
Sf::Bgra8Unorm => "bgra8unorm",
Sf::Rgb10a2Uint => "rgb10a2uint",
Sf::Rgb10a2Unorm => "rgb10a2unorm",
Sf::Rg11b10UFloat => "rg11b10float",
Sf::Rg11b10Ufloat => "rg11b10float",
Sf::Rg32Uint => "rg32uint",
Sf::Rg32Sint => "rg32sint",
Sf::Rg32Float => "rg32float",

View File

@ -397,7 +397,7 @@ fn map_image_format(word: &str) -> Option<crate::StorageFormat> {
"rgba16f" => Sf::Rgba16Float,
"rg32f" => Sf::Rg32Float,
"rg16f" => Sf::Rg16Float,
"r11f_g11f_b10f" => Sf::Rg11b10UFloat,
"r11f_g11f_b10f" => Sf::Rg11b10Ufloat,
"r32f" => Sf::R32Float,
"r16f" => Sf::R16Float,
"rgba16" => Sf::Rgba16Unorm,

View File

@ -104,7 +104,7 @@ pub(super) fn map_image_format(word: spirv::Word) -> Result<crate::StorageFormat
Some(spirv::ImageFormat::Rgba8i) => Ok(crate::StorageFormat::Rgba8Sint),
Some(spirv::ImageFormat::Rgb10a2ui) => Ok(crate::StorageFormat::Rgb10a2Uint),
Some(spirv::ImageFormat::Rgb10A2) => Ok(crate::StorageFormat::Rgb10a2Unorm),
Some(spirv::ImageFormat::R11fG11fB10f) => Ok(crate::StorageFormat::Rg11b10UFloat),
Some(spirv::ImageFormat::R11fG11fB10f) => Ok(crate::StorageFormat::Rg11b10Ufloat),
Some(spirv::ImageFormat::Rg32ui) => Ok(crate::StorageFormat::Rg32Uint),
Some(spirv::ImageFormat::Rg32i) => Ok(crate::StorageFormat::Rg32Sint),
Some(spirv::ImageFormat::Rg32f) => Ok(crate::StorageFormat::Rg32Float),

View File

@ -94,7 +94,7 @@ pub fn map_storage_format(word: &str, span: Span) -> Result<crate::StorageFormat
"rgba8sint" => Sf::Rgba8Sint,
"rgb10a2uint" => Sf::Rgb10a2Uint,
"rgb10a2unorm" => Sf::Rgb10a2Unorm,
"rg11b10float" => Sf::Rg11b10UFloat,
"rg11b10float" => Sf::Rg11b10Ufloat,
"rg32uint" => Sf::Rg32Uint,
"rg32sint" => Sf::Rg32Sint,
"rg32float" => Sf::Rg32Float,

View File

@ -175,7 +175,7 @@ impl crate::StorageFormat {
Sf::Bgra8Unorm => "bgra8unorm",
Sf::Rgb10a2Uint => "rgb10a2uint",
Sf::Rgb10a2Unorm => "rgb10a2unorm",
Sf::Rg11b10UFloat => "rg11b10float",
Sf::Rg11b10Ufloat => "rg11b10float",
Sf::Rg32Uint => "rg32uint",
Sf::Rg32Sint => "rg32sint",
Sf::Rg32Float => "rg32float",

View File

@ -622,7 +622,7 @@ pub enum StorageFormat {
// Packed 32-bit formats
Rgb10a2Uint,
Rgb10a2Unorm,
Rg11b10UFloat,
Rg11b10Ufloat,
// 64-bit formats
Rg32Uint,

View File

@ -48,7 +48,7 @@ impl From<super::StorageFormat> for super::ScalarKind {
Sf::Bgra8Unorm => Sk::Float,
Sf::Rgb10a2Uint => Sk::Uint,
Sf::Rgb10a2Unorm => Sk::Float,
Sf::Rg11b10UFloat => Sk::Float,
Sf::Rg11b10Ufloat => Sk::Float,
Sf::Rg32Uint => Sk::Uint,
Sf::Rg32Sint => Sk::Sint,
Sf::Rg32Float => Sk::Float,

View File

@ -26,7 +26,7 @@ static TEXTURE_FORMATS_UNCOMPRESSED_GLES_COMPAT: &[wgpu::TextureFormat] = &[
wgpu::TextureFormat::Bgra8UnormSrgb,
wgpu::TextureFormat::Rgb10a2Uint,
wgpu::TextureFormat::Rgb10a2Unorm,
wgpu::TextureFormat::Rg11b10UFloat,
wgpu::TextureFormat::Rg11b10Ufloat,
wgpu::TextureFormat::Rg32Uint,
wgpu::TextureFormat::Rg32Sint,
wgpu::TextureFormat::Rg32Float,

View File

@ -275,7 +275,7 @@ fn map_storage_format_to_naga(format: wgt::TextureFormat) -> Option<naga::Storag
Tf::Rgb10a2Uint => Sf::Rgb10a2Uint,
Tf::Rgb10a2Unorm => Sf::Rgb10a2Unorm,
Tf::Rg11b10UFloat => Sf::Rg11b10UFloat,
Tf::Rg11b10Ufloat => Sf::Rg11b10Ufloat,
Tf::Rg32Uint => Sf::Rg32Uint,
Tf::Rg32Sint => Sf::Rg32Sint,
@ -331,7 +331,7 @@ fn map_storage_format_from_naga(format: naga::StorageFormat) -> wgt::TextureForm
Sf::Rgb10a2Uint => Tf::Rgb10a2Uint,
Sf::Rgb10a2Unorm => Tf::Rgb10a2Unorm,
Sf::Rg11b10UFloat => Tf::Rg11b10UFloat,
Sf::Rg11b10Ufloat => Tf::Rg11b10Ufloat,
Sf::Rg32Uint => Tf::Rg32Uint,
Sf::Rg32Sint => Tf::Rg32Sint,
@ -658,7 +658,7 @@ impl NumericType {
Tf::Rgba8Sint | Tf::Rgba16Sint | Tf::Rgba32Sint => {
(NumericDimension::Vector(Vs::Quad), Scalar::I32)
}
Tf::Rg11b10UFloat => (NumericDimension::Vector(Vs::Tri), Scalar::F32),
Tf::Rg11b10Ufloat => (NumericDimension::Vector(Vs::Tri), Scalar::F32),
Tf::Stencil8
| Tf::Depth16Unorm
| Tf::Depth32Float

View File

@ -47,7 +47,7 @@ pub fn map_texture_format_failable(
Tf::Rgb9e5Ufloat => DXGI_FORMAT_R9G9B9E5_SHAREDEXP,
Tf::Rgb10a2Uint => DXGI_FORMAT_R10G10B10A2_UINT,
Tf::Rgb10a2Unorm => DXGI_FORMAT_R10G10B10A2_UNORM,
Tf::Rg11b10UFloat => DXGI_FORMAT_R11G11B10_FLOAT,
Tf::Rg11b10Ufloat => DXGI_FORMAT_R11G11B10_FLOAT,
Tf::Rg32Uint => DXGI_FORMAT_R32G32_UINT,
Tf::Rg32Sint => DXGI_FORMAT_R32G32_SINT,
Tf::Rg32Float => DXGI_FORMAT_R32G32_FLOAT,

View File

@ -1107,7 +1107,7 @@ impl crate::Adapter for super::Adapter {
Tf::Rgba8Sint => renderable | storage,
Tf::Rgb10a2Uint => renderable,
Tf::Rgb10a2Unorm => filterable_renderable,
Tf::Rg11b10UFloat => filterable | float_renderable,
Tf::Rg11b10Ufloat => filterable | float_renderable,
Tf::Rg32Uint => renderable,
Tf::Rg32Sint => renderable,
Tf::Rg32Float => unfilterable | float_renderable | texture_float_linear,

View File

@ -45,7 +45,7 @@ impl super::AdapterShared {
glow::RGBA,
glow::UNSIGNED_INT_2_10_10_10_REV,
),
Tf::Rg11b10UFloat => (
Tf::Rg11b10Ufloat => (
glow::R11F_G11F_B10F,
glow::RGB,
glow::UNSIGNED_INT_10F_11F_11F_REV,

View File

@ -178,7 +178,7 @@ impl crate::Adapter for super::Adapter {
flags.set(Tfc::STORAGE, pc.format_rgb10a2_unorm_all);
flags
}
Tf::Rg11b10UFloat => {
Tf::Rg11b10Ufloat => {
let mut flags = all_caps;
flags.set(Tfc::STORAGE, pc.format_rg11b10_all);
flags
@ -1040,7 +1040,7 @@ impl super::PrivateCapabilities {
Tf::Rgba8Sint => RGBA8Sint,
Tf::Rgb10a2Uint => RGB10A2Uint,
Tf::Rgb10a2Unorm => RGB10A2Unorm,
Tf::Rg11b10UFloat => RG11B10Float,
Tf::Rg11b10Ufloat => RG11B10Float,
Tf::Rg32Uint => RG32Uint,
Tf::Rg32Sint => RG32Sint,
Tf::Rg32Float => RG32Float,

View File

@ -36,7 +36,7 @@ impl super::PrivateCapabilities {
Tf::Rgba8Sint => F::R8G8B8A8_SINT,
Tf::Rgb10a2Uint => F::A2B10G10R10_UINT_PACK32,
Tf::Rgb10a2Unorm => F::A2B10G10R10_UNORM_PACK32,
Tf::Rg11b10UFloat => F::B10G11R11_UFLOAT_PACK32,
Tf::Rg11b10Ufloat => F::B10G11R11_UFLOAT_PACK32,
Tf::Rg32Uint => F::R32G32_UINT,
Tf::Rg32Sint => F::R32G32_SINT,
Tf::Rg32Float => F::R32G32_SFLOAT,

View File

@ -32,7 +32,7 @@ pub const TEXTURE_FORMAT_LIST: [wgpu::TextureFormat; 116] = [
wgpu::TextureFormat::Rgb9e5Ufloat,
wgpu::TextureFormat::Rgb10a2Uint,
wgpu::TextureFormat::Rgb10a2Unorm,
wgpu::TextureFormat::Rg11b10UFloat,
wgpu::TextureFormat::Rg11b10Ufloat,
wgpu::TextureFormat::Rg32Uint,
wgpu::TextureFormat::Rg32Sint,
wgpu::TextureFormat::Rg32Float,

View File

@ -402,7 +402,7 @@ bitflags::bitflags! {
const SHADER_F16 = 1 << 8;
/// Allows for usage of textures of format [`TextureFormat::Rg11b10UFloat`] as a render target
/// Allows for usage of textures of format [`TextureFormat::Rg11b10Ufloat`] as a render target
///
/// Supported platforms:
/// - Vulkan
@ -2554,7 +2554,7 @@ pub enum TextureFormat {
/// Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. [0, 1023] ([0, 3] for alpha) converted to/from float [0, 1] in shader.
Rgb10a2Unorm,
/// Red, green, and blue channels. 11 bit float with no sign bit for RG channels. 10 bit float with no sign bit for blue channel. Float in shader.
Rg11b10UFloat,
Rg11b10Ufloat,
// Normal 64 bit formats
/// Red and green channels. 32 bit integer per channel. Unsigned in shader.
@ -2842,7 +2842,7 @@ impl<'de> Deserialize<'de> for TextureFormat {
"bgra8unorm-srgb" => TextureFormat::Bgra8UnormSrgb,
"rgb10a2uint" => TextureFormat::Rgb10a2Uint,
"rgb10a2unorm" => TextureFormat::Rgb10a2Unorm,
"rg11b10ufloat" => TextureFormat::Rg11b10UFloat,
"rg11b10ufloat" => TextureFormat::Rg11b10Ufloat,
"rg32uint" => TextureFormat::Rg32Uint,
"rg32sint" => TextureFormat::Rg32Sint,
"rg32float" => TextureFormat::Rg32Float,
@ -2970,7 +2970,7 @@ impl Serialize for TextureFormat {
TextureFormat::Bgra8UnormSrgb => "bgra8unorm-srgb",
TextureFormat::Rgb10a2Uint => "rgb10a2uint",
TextureFormat::Rgb10a2Unorm => "rgb10a2unorm",
TextureFormat::Rg11b10UFloat => "rg11b10ufloat",
TextureFormat::Rg11b10Ufloat => "rg11b10ufloat",
TextureFormat::Rg32Uint => "rg32uint",
TextureFormat::Rg32Sint => "rg32sint",
TextureFormat::Rg32Float => "rg32float",
@ -3212,7 +3212,7 @@ impl TextureFormat {
| Self::Rgb9e5Ufloat
| Self::Rgb10a2Uint
| Self::Rgb10a2Unorm
| Self::Rg11b10UFloat
| Self::Rg11b10Ufloat
| Self::Rg32Uint
| Self::Rg32Sint
| Self::Rg32Float
@ -3320,7 +3320,7 @@ impl TextureFormat {
| Self::Rgb9e5Ufloat
| Self::Rgb10a2Uint
| Self::Rgb10a2Unorm
| Self::Rg11b10UFloat
| Self::Rg11b10Ufloat
| Self::Rg32Uint
| Self::Rg32Sint
| Self::Rg32Float
@ -3439,7 +3439,7 @@ impl TextureFormat {
Self::Bgra8UnormSrgb => (msaa_resolve, attachment),
Self::Rgb10a2Uint => ( msaa, attachment),
Self::Rgb10a2Unorm => (msaa_resolve, attachment),
Self::Rg11b10UFloat => ( msaa, rg11b10f),
Self::Rg11b10Ufloat => ( msaa, rg11b10f),
Self::Rg32Uint => ( noaa, all_flags),
Self::Rg32Sint => ( noaa, all_flags),
Self::Rg32Float => ( noaa, all_flags),
@ -3550,7 +3550,7 @@ impl TextureFormat {
| Self::Rg16Float
| Self::Rgba16Float
| Self::Rgb10a2Unorm
| Self::Rg11b10UFloat => Some(float),
| Self::Rg11b10Ufloat => Some(float),
Self::R32Float | Self::Rg32Float | Self::Rgba32Float => Some(float32_sample_type),
@ -3682,7 +3682,7 @@ impl TextureFormat {
| Self::Rg16Sint
| Self::Rg16Float => Some(4),
Self::R32Uint | Self::R32Sint | Self::R32Float => Some(4),
Self::Rgb9e5Ufloat | Self::Rgb10a2Uint | Self::Rgb10a2Unorm | Self::Rg11b10UFloat => {
Self::Rgb9e5Ufloat | Self::Rgb10a2Uint | Self::Rgb10a2Unorm | Self::Rg11b10Ufloat => {
Some(4)
}
@ -3785,7 +3785,7 @@ impl TextureFormat {
| Self::Rg32Float
| Self::Rgb10a2Uint
| Self::Rgb10a2Unorm
| Self::Rg11b10UFloat => Some(8),
| Self::Rg11b10Ufloat => Some(8),
Self::Rgba32Uint | Self::Rgba32Sint | Self::Rgba32Float => Some(16),
Self::Stencil8
| Self::Depth16Unorm
@ -3868,7 +3868,7 @@ impl TextureFormat {
| Self::Rgba32Float
| Self::Rgb10a2Uint
| Self::Rgb10a2Unorm
| Self::Rg11b10UFloat => Some(4),
| Self::Rg11b10Ufloat => Some(4),
Self::Stencil8
| Self::Depth16Unorm
| Self::Depth24Plus
@ -3959,7 +3959,7 @@ impl TextureFormat {
| Self::Rgba32Sint
| Self::Rgba32Float => 4,
Self::Rgb9e5Ufloat | Self::Rg11b10UFloat => 3,
Self::Rgb9e5Ufloat | Self::Rg11b10Ufloat => 3,
Self::Rgb10a2Uint | Self::Rgb10a2Unorm => 4,
Self::Stencil8 | Self::Depth16Unorm | Self::Depth24Plus | Self::Depth32Float => 1,
@ -4177,7 +4177,7 @@ fn texture_format_serialize() {
"\"rgb10a2unorm\"".to_string()
);
assert_eq!(
serde_json::to_string(&TextureFormat::Rg11b10UFloat).unwrap(),
serde_json::to_string(&TextureFormat::Rg11b10Ufloat).unwrap(),
"\"rg11b10ufloat\"".to_string()
);
assert_eq!(
@ -4474,7 +4474,7 @@ fn texture_format_deserialize() {
);
assert_eq!(
serde_json::from_str::<TextureFormat>("\"rg11b10ufloat\"").unwrap(),
TextureFormat::Rg11b10UFloat
TextureFormat::Rg11b10Ufloat
);
assert_eq!(
serde_json::from_str::<TextureFormat>("\"rg32uint\"").unwrap(),

View File

@ -225,7 +225,7 @@ fn map_texture_format(texture_format: wgt::TextureFormat) -> webgpu_sys::GpuText
unimplemented!("Current version of web_sys is missing {texture_format:?}")
}
TextureFormat::Rgb10a2Unorm => tf::Rgb10a2unorm,
TextureFormat::Rg11b10UFloat => tf::Rg11b10ufloat,
TextureFormat::Rg11b10Ufloat => tf::Rg11b10ufloat,
// 64-bit formats
TextureFormat::Rg32Uint => tf::Rg32uint,
TextureFormat::Rg32Sint => tf::Rg32sint,