File tree Expand file tree Collapse file tree
editor/src/node_graph_executor
node-graph/libraries/wgpu-executor/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -348,13 +348,11 @@ impl NodeRuntime {
348348 // Configure the surface at physical resolution (for HiDPI displays)
349349 let surface_inner = & surface. surface . inner ;
350350 let surface_caps = surface_inner. get_capabilities ( & executor. context . adapter ) ;
351- // Use the surface's preferred format (Firefox WebGL prefers Bgra8Unorm, Chrome prefers Rgba8Unorm)
352- let surface_format = surface_caps. formats . iter ( ) . copied ( ) . find ( |f| f. is_srgb ( ) ) . unwrap_or ( surface_caps. formats [ 0 ] ) ;
353351 surface_inner. configure (
354352 & executor. context . device ,
355353 & vello:: wgpu:: SurfaceConfiguration {
356354 usage : vello:: wgpu:: TextureUsages :: RENDER_ATTACHMENT | vello:: wgpu:: TextureUsages :: COPY_DST ,
357- format : surface_format ,
355+ format : surface . surface . format ,
358356 width : physical_resolution. x ,
359357 height : physical_resolution. y ,
360358 present_mode : surface_caps. present_modes [ 0 ] ,
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ pub struct Surface {
4949 pub inner : wgpu:: Surface < ' static > ,
5050 pub target_texture : Mutex < Option < TargetTexture > > ,
5151 pub blitter : TextureBlitter ,
52+ pub format : wgpu:: TextureFormat ,
5253}
5354
5455#[ derive( Clone , Debug ) ]
@@ -183,6 +184,7 @@ impl WgpuExecutor {
183184 inner : surface,
184185 target_texture : Mutex :: new ( None ) ,
185186 blitter,
187+ format : surface_format,
186188 } ,
187189 } )
188190 }
You can’t perform that action at this time.
0 commit comments