Skip to content

Commit

Permalink
update wgpu to v0.17.0 (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajveermalviya authored Jul 24, 2023
1 parent 44e1f3a commit 07728a3
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 60 deletions.
98 changes: 57 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,45 +30,45 @@ trace = ["wgc/trace"]
[dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "6c84d438a5335b18234c47830f9eb5a810ae8c21"
version = "0.16"
rev = "21098cdaceee49c22a7e3a9648ce019b4e74beec"
version = "0.17"
features = ["raw-window-handle", "gles"]

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "6c84d438a5335b18234c47830f9eb5a810ae8c21"
version = "0.16"
rev = "21098cdaceee49c22a7e3a9648ce019b4e74beec"
version = "0.17"
features = ["metal"]

[target.'cfg(windows)'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "6c84d438a5335b18234c47830f9eb5a810ae8c21"
version = "0.16"
rev = "21098cdaceee49c22a7e3a9648ce019b4e74beec"
version = "0.17"
features = ["dx11", "dx12"]

[target.'cfg(any(windows, all(unix, not(target_arch = "emscripten"), not(target_os = "ios"), not(target_os = "macos"))))'.dependencies.wgc]
package = "wgpu-core"
git = "https://github.com/gfx-rs/wgpu"
rev = "6c84d438a5335b18234c47830f9eb5a810ae8c21"
version = "0.16"
rev = "21098cdaceee49c22a7e3a9648ce019b4e74beec"
version = "0.17"
features = ["vulkan"]

[dependencies.wgt]
package = "wgpu-types"
git = "https://github.com/gfx-rs/wgpu"
rev = "6c84d438a5335b18234c47830f9eb5a810ae8c21"
version = "0.16"
rev = "21098cdaceee49c22a7e3a9648ce019b4e74beec"
version = "0.17"

[dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "b99d58ea435090e561377949f428bce2c18451bb"
version = "0.12.0"
rev = "bac2d82a430fbfcf100ee22b7c3bc12f3d593079"
version = "0.13.0"

[dependencies]
raw-window-handle = "0.5"
paste = "1.0"
paste = "1"
log = "0.4"
thiserror = "1"
parking_lot = "0.12"
Expand Down
4 changes: 2 additions & 2 deletions src/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ pub fn map_primitive_state(
}

#[inline]
pub fn map_storage_report(report: wgc::hub::StorageReport) -> native::WGPUStorageReport {
pub fn map_storage_report(report: wgc::storage::StorageReport) -> native::WGPUStorageReport {
native::WGPUStorageReport {
numOccupied: report.num_occupied,
numVacant: report.num_error,
Expand Down Expand Up @@ -935,7 +935,7 @@ pub fn map_hub_report(report: wgc::hub::HubReport) -> native::WGPUHubReport {
#[inline]
pub fn write_global_report(
native_report: &mut native::WGPUGlobalReport,
report: wgc::hub::GlobalReport,
report: wgc::global::GlobalReport,
) {
native_report.surfaces = map_storage_report(report.surfaces);

Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub mod native {

const LABEL: &str = "label";

pub type Context = wgc::hub::Global<wgc::hub::IdentityManagerFactory>;
pub type Context = wgc::global::Global<wgc::identity::IdentityManagerFactory>;

struct AdapterProperties {
vendor_id: u32,
Expand Down Expand Up @@ -553,7 +553,7 @@ pub unsafe extern "C" fn wgpuCreateInstance(
Arc::into_raw(Arc::new(WGPUInstanceImpl {
context: Arc::new(Context::new(
"wgpu",
wgc::hub::IdentityManagerFactory,
wgc::identity::IdentityManagerFactory,
instance_desc,
)),
}))
Expand Down Expand Up @@ -617,10 +617,10 @@ pub unsafe extern "C" fn wgpuAdapterGetProperties(
let props = adapter.properties.get_or_init(|| {
match gfx_select!(adapter_id => context.adapter_get_info(adapter_id)) {
Ok(info) => AdapterProperties {
vendor_id: info.vendor as u32,
vendor_id: info.vendor,
vendor_name: CString::new(info.driver).unwrap(),
architecture: CString::default(), // TODO
device_id: info.device as u32,
device_id: info.device,
name: CString::new(info.name).unwrap(),
driver_description: CString::new(info.driver_info).unwrap(),
adapter_type: match info.device_type {
Expand Down

0 comments on commit 07728a3

Please sign in to comment.