add feature RG11B10UFLOAT_RENDERABLE on webgpu (#3689)

* add feature RG11B10UFLOAT_RENDERABLE on web

* changelog
This commit is contained in:
François 2023-04-14 14:52:37 +02:00 committed by GitHub
parent 7c25c00f07
commit bf8e6fe371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 2 deletions

View File

@ -151,6 +151,7 @@ By @cwfitzgerald in [#3671](https://github.com/gfx-rs/wgpu/pull/3671).
- Implement the new checks for readonly stencils. By @JCapucho in [#3443](https://github.com/gfx-rs/wgpu/pull/3443)
- Reimplement `adapter|device_features`. By @jinleili in [#3428](https://github.com/gfx-rs/wgpu/pull/3428)
- Implement `command_encoder_resolve_query_set`. By @JolifantoBambla in [#3489](https://github.com/gfx-rs/wgpu/pull/3489)
- Add support for `Features::RG11B10UFLOAT_RENDERABLE`. By @mockersf in [#3689](https://github.com/gfx-rs/wgpu/pull/3689)
#### Vulkan

View File

@ -296,7 +296,16 @@ bitflags::bitflags! {
// ? const FLOAT32_BLENDABLE = 1 << 20; (https://github.com/gpuweb/gpuweb/issues/3556)
// ? const 32BIT_FORMAT_MULTISAMPLE = 1 << 21; (https://github.com/gpuweb/gpuweb/issues/3844)
// ? const 32BIT_FORMAT_RESOLVE = 1 << 22; (https://github.com/gpuweb/gpuweb/issues/3844)
// TODO const RG11B10UFLOAT_RENDERABLE = 1 << 23;
/// Allows for usage of textures of format [`TextureFormat::Rg11b10Float`] as a render target
///
/// Supported platforms:
/// - Vulkan
/// - DX12
/// - Metal
///
/// This is a web and native feature.
const RG11B10UFLOAT_RENDERABLE = 1 << 23;
/// Allows for explicit creation of textures of format [`TextureFormat::Depth32FloatStencil8`]
///

View File

@ -621,7 +621,7 @@ fn map_map_mode(mode: crate::MapMode) -> u32 {
}
}
const FEATURES_MAPPING: [(wgt::Features, web_sys::GpuFeatureName); 8] = [
const FEATURES_MAPPING: [(wgt::Features, web_sys::GpuFeatureName); 9] = [
//TODO: update the name
(
wgt::Features::DEPTH_CLIP_CONTROL,
@ -655,6 +655,10 @@ const FEATURES_MAPPING: [(wgt::Features, web_sys::GpuFeatureName); 8] = [
wgt::Features::SHADER_F16,
web_sys::GpuFeatureName::ShaderF16,
),
(
wgt::Features::RG11B10UFLOAT_RENDERABLE,
web_sys::GpuFeatureName::Rg11b10ufloatRenderable,
),
];
fn map_wgt_features(supported_features: web_sys::GpuSupportedFeatures) -> wgt::Features {