Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bevy_render: Avoid creating multiple surfaces on Android
When looking for an adapter Bevy currently creates a one-shot surface that can be used to find a compatible adapter instead of referencing the surface that's associated with the primary window for rendering. This results in creating multiple render surfaces for a single window which may not be portable and may also result in large, redundant allocations (e.g. for a full swap chain) On Android VkAndroidSurfaceCreateInfoKHR (which is used by wgpu to create a surface) will throw a `VK_ERROR_NATIVE_WINDOW_IN_USE_KHR` error if we try to create multiple surfaces for a single window. As a workaround for now we don't request an adapter based on a surface on Android.
- Loading branch information