-
Notifications
You must be signed in to change notification settings - Fork 974
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1729: Handle Multi-threaded EGL Context Access r=cwfitzgerald,kvark a=zicklag **Connections** #1630, bevyengine/bevy#841 **Description** Implements the synchronization necessary to use the GL backend from multiple threads. Accomplishes this by using a mutex around the GL context with extra wrapping to bind and unbind the EGL context when locking and unlocking. **Testing** Tested on Ubunty 20.04 with a fork of the Bevy game engine and the WGPU examples ( not that the examples test the multi-threading ). ## Remaining Issues There is only one Bevy example I cannot get to run yet and it's the `load_gltf` example. It fails with a shader translation error: ``` Jul 26 20:36:50.949 ERROR naga::back::glsl: Conflicting samplers for _group_3_binding_10 Jul 26 20:36:50.950 WARN wgpu::backend::direct: Shader translation error for stage FRAGMENT: A image was used with multiple samplers Jul 26 20:36:50.950 WARN wgpu::backend::direct: Please report it to https://github.com/gfx-rs/naga Jul 26 20:36:50.950 ERROR wgpu::backend::direct: wgpu error: Validation Error Caused by: In Device::create_render_pipeline Internal error in FRAGMENT shader: A image was used with multiple samplers ``` Interestingly, I think the shader in question doesn't have a `group(3), binding(10)` anywhere that I know of so I'm going to have to drill down a bit more and find out exactly which shader translation is failing more. This could potentially be fixed in a separate PR. I think the rest of this PR is rather straight-forward and the fix for the error above is probably mostly unrelated to the primary changes made in this PR. Co-authored-by: Zicklag <zicklag@katharostech.com>
- Loading branch information
Showing
6 changed files
with
181 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.