File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -785,26 +785,6 @@ impl crate::Adapter<super::Api> for super::Adapter {
785
785
& self ,
786
786
surface : & super :: Surface ,
787
787
) -> Option < crate :: SurfaceCapabilities > {
788
- let mut formats = if surface. supports_srgb ( ) {
789
- vec ! [
790
- wgt:: TextureFormat :: Rgba8UnormSrgb ,
791
- #[ cfg( not( target_arch = "wasm32" ) ) ]
792
- wgt:: TextureFormat :: Bgra8UnormSrgb ,
793
- ]
794
- } else {
795
- vec ! [
796
- wgt:: TextureFormat :: Rgba8Unorm ,
797
- #[ cfg( not( target_arch = "wasm32" ) ) ]
798
- wgt:: TextureFormat :: Bgra8Unorm ,
799
- ]
800
- } ;
801
- if self
802
- . shared
803
- . private_caps
804
- . contains ( super :: PrivateCapabilities :: COLOR_BUFFER_HALF_FLOAT )
805
- {
806
- formats. push ( wgt:: TextureFormat :: Rgba16Float )
807
- }
808
788
if surface. presentable {
809
789
let mut formats = vec ! [
810
790
wgt:: TextureFormat :: Rgba8Unorm ,
@@ -818,6 +798,14 @@ impl crate::Adapter<super::Api> for super::Adapter {
818
798
wgt:: TextureFormat :: Bgra8UnormSrgb ,
819
799
] )
820
800
}
801
+ #[ cfg( not( target_arch = "wasm32" ) ) ]
802
+ if self
803
+ . shared
804
+ . private_caps
805
+ . contains ( super :: PrivateCapabilities :: COLOR_BUFFER_HALF_FLOAT )
806
+ {
807
+ formats. push ( wgt:: TextureFormat :: Rgba16Float )
808
+ }
821
809
822
810
Some ( crate :: SurfaceCapabilities {
823
811
formats,
You can’t perform that action at this time.
0 commit comments