Skip to content

Commit

Permalink
Fix: Get correct adapter info consistent with `wgpuAdapterGetProperti…
Browse files Browse the repository at this point in the history
…es` (#418)
  • Loading branch information
lalitshankarchowdhury authored Sep 8, 2024
1 parent 8c44ec1 commit 5bd6da3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,14 +699,10 @@ pub unsafe extern "C" fn wgpuAdapterGetInfo(
Err(err) => handle_error_fatal(err, "wgpuAdapterGetInfo"),
};

info.vendor = CString::new(format!("{:#x}", result.vendor))
.unwrap()
.into_raw();
info.architecture = CString::default().into_raw();
info.device = CString::new(format!("{:#x}", result.device))
.unwrap()
.into_raw();
info.description = CString::new(result.name).unwrap().into_raw();
info.vendor = CString::new(result.driver).unwrap().into_raw();
info.architecture = CString::default().into_raw(); // TODO(webgpu.h)
info.device = CString::new(result.name).unwrap().into_raw();
info.description = CString::new(result.driver_info).unwrap().into_raw();
info.backendType = map_backend_type(result.backend);
info.adapterType = map_adapter_type(result.device_type);
info.vendorID = result.vendor;
Expand Down

0 comments on commit 5bd6da3

Please sign in to comment.