mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 23:41:01 +01:00
[wgpu] Use Arced resources instead of Global
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
1 parent
0a926cf134
commit
b40dbe66a9
2 files changed
+568
-907
No files matched your search
@@ -398,10 +398,10 @@ impl Instance {
|
||||
hal_adapter: hal::ExposedAdapter<A>,
|
||||
) -> Adapter {
|
||||
let core_instance = self.inner.as_core();
|
||||
let adapter = unsafe { core_instance.create_adapter_from_hal(hal_adapter) };
|
||||
let wgpu_adapter = unsafe { core_instance.create_adapter_from_hal(hal_adapter) };
|
||||
let core = backend::wgpu_core::CoreAdapter {
|
||||
context: core_instance.clone(),
|
||||
id: adapter,
|
||||
wgpu_adapter,
|
||||
};
|
||||
|
||||
Adapter { inner: core.into() }
|
||||
|
||||
+566
-905
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user