Bump back wgpu to latest (#8179)

This commit is contained in:
Ahmed Harmouche
2024-12-12 09:40:52 +01:00
committed by GitHub
parent 97aaa50f3a
commit 1b94cc095a
2 changed files with 3 additions and 3 deletions

View File

@@ -58,8 +58,8 @@ class WebGpuAllocator(Allocator):
class WebGpuDevice(Compiled):
def __init__(self, device:str):
adapter = wgpu.gpu.request_adapter(power_preference="high-performance")
adapter = wgpu.gpu.request_adapter_sync(power_preference="high-performance")
timestamp_supported = wgpu.FeatureName.timestamp_query in adapter.features
wgpu_device = adapter.request_device(required_features=[wgpu.FeatureName.timestamp_query] if timestamp_supported else [])
wgpu_device = adapter.request_device_sync(required_features=[wgpu.FeatureName.timestamp_query] if timestamp_supported else [])
super().__init__(device, WebGpuAllocator(wgpu_device), WGSLRenderer(), Compiler(),
functools.partial(WebGPUProgram, (wgpu_device, timestamp_supported)))