[wire] Migrating from SwapChain to Surface configuration

13 views
Skip to first unread message

Rasmus Andersson

unread,
May 30, 2024, 9:16:40 PMMay 30
to Dawn Graphics
Hello! We've successfully migrated dawn native from explicit swap chain management to surfaceConfigure. However, dawn wire seems to not yet support using surfaces. Is adding support for surface configuration in the plans for dawn wire?

Austin Eng

unread,
May 30, 2024, 11:49:37 PMMay 30
to Rasmus Andersson, Dawn Graphics
Not planned in the near term, but also, I'm not sure what you would expect it to do. Currently making the surface requires using the native handle - the Metal layer, HWND handle, etc. You don't have access to these in a remote environment, so what would you want to pass instead? And, when you present, what does it present to?

Maybe we could have a fake Surface backed by normal textures - but then, Present as well will not actually present the image anywhere.

On Thu, May 30, 2024 at 6:16 PM Rasmus Andersson <rs...@playb.it> wrote:
Hello! We've successfully migrated dawn native from explicit swap chain management to surfaceConfigure. However, dawn wire seems to not yet support using surfaces. Is adding support for surface configuration in the plans for dawn wire?

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/85735c70-accc-4de9-ae8c-ff8918b3f4f4n%40googlegroups.com.

Corentin Wallez

unread,
May 31, 2024, 10:56:09 AMMay 31
to Austin Eng, Rasmus Andersson, Dawn Graphics
Hey Rasmus,

We've deprecated the wgpu::SwapChain but it won't be going away until wgpu::Surface is fully ready, including having an InjectSurface/ReserveSurface in dawn::wire for use cases like yours. There's a partial implementation in dawn::wire with appropriate TODOs on the wgpu::Surface issue so we'll get to it eventually! Unless you can't use wgpu::SwapChain anymore for some other reason?

Cheers,

Corentin

Rasmus Andersson

unread,
May 31, 2024, 11:42:54 AMMay 31
to Dawn Graphics
Hello hi Corentin!

That sounds lovely. I did see the TODOs in the surface impl. SwapChain works just fine for now! Thank you.

Hope you're doing great and enjoy the weekend
Reply all
Reply to author
Forward
0 new messages