gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 547 forks source link

[Metal] Remove lazy_static #3579

Closed Gordon-F closed 3 years ago

Gordon-F commented 3 years ago

Fixes #3574 PR checklist:

bors[bot] commented 3 years ago

Build succeeded:

kvark commented 3 years ago

Strangely, I'm seeing this now when running wgpu-rs (patched to use latest gfx):

objc[3495]: Class GfxManagedMetalLayerDelegate is implemented in both ?? (0x7fa83f40ee00) and ?? (0x7fa83f504520). One of the two will be used. Which one is undefined. objc[3495]: Class GfxManagedMetalLayerDelegate is implemented in both ?? (0x7fa83f40ee00) and ?? (0x7fa83f5046c0). One of the two will be used. Which one is undefined.

kvark commented 3 years ago

Ah, snap, that may be a real issue here. If anybody creates multiple instances, we are in trouble :/ Perhaps, the instance code could check if there is an existing declaration somehow?

kvark commented 3 years ago

nvm, fixing this in #3585 :)