choose first adapter (#251)

Related to hexops/mach#216

Co-authored-by: d3m1gd <mach+d3m1gd@users.noreply.github.com>
This commit is contained in:
d3m1gd 2022-04-23 08:50:42 +07:00 committed by GitHub
parent c535e041bd
commit ce1aeafa84
Failed to generate hash of commit

View file

@ -142,6 +142,7 @@ pub fn App(comptime Context: type, comptime config: AppConfig) type {
const found_backend_type = @intToEnum(gpu.Adapter.BackendType, c.machDawnNativeAdapterProperties_getBackendType(properties)); const found_backend_type = @intToEnum(gpu.Adapter.BackendType, c.machDawnNativeAdapterProperties_getBackendType(properties));
if (found_backend_type == backend_type) { if (found_backend_type == backend_type) {
dawn_adapter = adapter; dawn_adapter = adapter;
break;
} }
} }
if (dawn_adapter == null) { if (dawn_adapter == null) {