mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
gl: add Rgba16Float
format support for color attachments (#3045)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
parent
4992de5938
commit
b13bb468cb
@ -104,7 +104,7 @@ SurfaceConfiguration {
|
||||
- Fix bug where the Vulkan backend would panic when using a supported window and display handle but the
|
||||
dependent extensions are not available by @i509VCB in [#3054](https://github.com/gfx-rs/wgpu/pull/3054).
|
||||
|
||||
#### Gles
|
||||
#### GLES
|
||||
- Report vendor id for Mesa and Apple GPUs. By @i509VCB [#3036](https://github.com/gfx-rs/wgpu/pull/3036)
|
||||
- Report Apple M2 gpu as integrated. By @i509VCB [#3036](https://github.com/gfx-rs/wgpu/pull/3036)
|
||||
|
||||
@ -131,6 +131,7 @@ SurfaceConfiguration {
|
||||
is the actual version of the device. By @i509VCB in [#3011](https://github.com/gfx-rs/wgpu/pull/3011)
|
||||
|
||||
#### GLES
|
||||
- Add `Rgba16Float` format support for color attachments. By @jinleili in [#3045](https://github.com/gfx-rs/wgpu/pull/3045)
|
||||
- `TEXTURE_COMPRESSION_ASTC_HDR` feature detection by @jinleili in [#3042](https://github.com/gfx-rs/wgpu/pull/3042)
|
||||
|
||||
### Performance
|
||||
|
@ -785,21 +785,29 @@ impl crate::Adapter<super::Api> for super::Adapter {
|
||||
&self,
|
||||
surface: &super::Surface,
|
||||
) -> Option<crate::SurfaceCapabilities> {
|
||||
let mut formats = if surface.supports_srgb() {
|
||||
vec![
|
||||
wgt::TextureFormat::Rgba8UnormSrgb,
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
wgt::TextureFormat::Bgra8UnormSrgb,
|
||||
]
|
||||
} else {
|
||||
vec![
|
||||
wgt::TextureFormat::Rgba8Unorm,
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
wgt::TextureFormat::Bgra8Unorm,
|
||||
]
|
||||
};
|
||||
if self
|
||||
.shared
|
||||
.private_caps
|
||||
.contains(super::PrivateCapabilities::COLOR_BUFFER_HALF_FLOAT)
|
||||
{
|
||||
formats.push(wgt::TextureFormat::Rgba16Float)
|
||||
}
|
||||
if surface.presentable {
|
||||
Some(crate::SurfaceCapabilities {
|
||||
formats: if surface.supports_srgb() {
|
||||
vec![
|
||||
wgt::TextureFormat::Rgba8UnormSrgb,
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
wgt::TextureFormat::Bgra8UnormSrgb,
|
||||
]
|
||||
} else {
|
||||
vec![
|
||||
wgt::TextureFormat::Rgba8Unorm,
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
wgt::TextureFormat::Bgra8Unorm,
|
||||
]
|
||||
},
|
||||
formats,
|
||||
present_modes: vec![wgt::PresentMode::Fifo], //TODO
|
||||
composite_alpha_modes: vec![wgt::CompositeAlphaMode::Opaque], //TODO
|
||||
swap_chain_sizes: 2..=2,
|
||||
|
Loading…
Reference in New Issue
Block a user