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 @@ -786,26 +786,6 @@ impl crate::Adapter<super::Api> for super::Adapter {
786786 & self ,
787787 surface : & super :: Surface ,
788788 ) -> Option < crate :: SurfaceCapabilities > {
789- let mut formats = if surface. supports_srgb ( ) {
790- vec ! [
791- wgt:: TextureFormat :: Rgba8UnormSrgb ,
792- #[ cfg( not( target_arch = "wasm32" ) ) ]
793- wgt:: TextureFormat :: Bgra8UnormSrgb ,
794- ]
795- } else {
796- vec ! [
797- wgt:: TextureFormat :: Rgba8Unorm ,
798- #[ cfg( not( target_arch = "wasm32" ) ) ]
799- wgt:: TextureFormat :: Bgra8Unorm ,
800- ]
801- } ;
802- if self
803- . shared
804- . private_caps
805- . contains ( super :: PrivateCapabilities :: COLOR_BUFFER_HALF_FLOAT )
806- {
807- formats. push ( wgt:: TextureFormat :: Rgba16Float )
808- }
809789 if surface. presentable {
810790 let mut formats = vec ! [
811791 wgt:: TextureFormat :: Rgba8Unorm ,
@@ -819,6 +799,14 @@ impl crate::Adapter<super::Api> for super::Adapter {
819799 wgt:: TextureFormat :: Bgra8UnormSrgb ,
820800 ] )
821801 }
802+ #[ cfg( not( target_arch = "wasm32" ) ) ]
803+ if self
804+ . shared
805+ . private_caps
806+ . contains ( super :: PrivateCapabilities :: COLOR_BUFFER_HALF_FLOAT )
807+ {
808+ formats. push ( wgt:: TextureFormat :: Rgba16Float )
809+ }
822810
823811 Some ( crate :: SurfaceCapabilities {
824812 formats,
You can’t perform that action at this time.
0 commit comments