Skip to content

Commit a52ce29

Browse files
committed
chore: updates
1 parent 854060b commit a52ce29

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+5763
-1650
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ strip = true
2727
[workspace.dependencies.wgt]
2828
package = "wgpu-types"
2929
git = "https://github.com/triniwiz/wgpu"
30-
rev = "bc52e9448087a79b78d2231f0ddd7409781551f7"
30+
rev = "6f163cdf622bd183fcfc20224294b797312550bb"
3131

3232
[workspace.dependencies]
3333
env_logger = "0.11.5"
@@ -41,7 +41,7 @@ gl-bindings = { path = "./crates/gl-bindings" }
4141
canvas-c = { path = "./crates/canvas-c" }
4242
skia-safe = { version = "0.80.0", features = ["textlayout"] }
4343
itertools = "0.13.0"
44-
wgpu-core = { git = "https://github.com/triniwiz/wgpu", rev = "bc52e9448087a79b78d2231f0ddd7409781551f7", features = ["wgsl", "vulkan", "metal", "raw-window-handle"] }
45-
wgpu-types = { git = "https://github.com/triniwiz/wgpu", rev = "bc52e9448087a79b78d2231f0ddd7409781551f7" }
44+
wgpu-core = { git = "https://github.com/triniwiz/wgpu", rev = "6f163cdf622bd183fcfc20224294b797312550bb", features = ["wgsl", "vulkan", "metal", "raw-window-handle"] }
45+
wgpu-types = { git = "https://github.com/triniwiz/wgpu", rev = "6f163cdf622bd183fcfc20224294b797312550bb" }
4646
ureq = "2.10.1"
4747
jni = "0.21.1"

crates/canvas-c/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ raw-window-handle.workspace = true
2727
wgpu-core = { workspace = true, features = ["wgsl", "vulkan", "metal", "raw-window-handle"] }
2828
infer = "0.16.0"
2929
image = { version = "0.25.5", optional = true }
30+
3031
[target.'cfg(target_os="ios")'.dependencies]
3132
display-link = { version = "0.2.0" }
3233
wgpu-core = { workspace = true, features = ["wgsl", "metal", "raw-window-handle"] }

crates/canvas-c/src/webgpu/enums.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pub enum SurfaceGetCurrentTextureStatus {
2121
OutOfMemory = 0x00000004,
2222
DeviceLost = 0x00000005,
2323
Force32 = 0x7FFFFFFF,
24+
Unknown = 0x00000006
2425
}
2526

2627
#[repr(C)]
@@ -1873,6 +1874,7 @@ impl Into<Option<wgt::FrontFace>> for CanvasOptionalFrontFace {
18731874
}
18741875

18751876
#[repr(C)]
1877+
#[derive(Debug)]
18761878
pub struct CanvasBufferBinding {
18771879
pub buffer: *const CanvasGPUBuffer,
18781880
pub offset: i64,
@@ -1898,13 +1900,15 @@ impl Into<BufferBinding> for CanvasBufferBinding {
18981900
}
18991901

19001902
#[repr(C)]
1903+
#[derive(Debug)]
19011904
pub enum CanvasBindGroupEntryResource {
19021905
Buffer(CanvasBufferBinding),
19031906
Sampler(*const CanvasGPUSampler),
19041907
TextureView(*const CanvasGPUTextureView),
19051908
}
19061909

19071910
#[repr(C)]
1911+
#[derive(Debug)]
19081912
pub struct CanvasBindGroupEntry {
19091913
pub binding: u32,
19101914
pub resource: CanvasBindGroupEntryResource,

crates/canvas-c/src/webgpu/gpu_adapter_info.rs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,28 @@ impl CanvasGPUAdapterInfo {
88
Self(types)
99
}
1010

11-
pub fn vendor(&self) -> String {
12-
self.0.vendor.to_string()
11+
pub fn vendor(&self) -> &str {
12+
self.0.driver.as_str()
1313
}
1414

1515
pub fn architecture(&self) -> &str {
1616
""
1717
}
18-
pub fn device(&self) -> String {
19-
self.0.device.to_string()
18+
pub fn device(&self) -> &str {
19+
self.0.name.as_str()
2020
}
2121

2222
pub fn description(&self) -> &str {
23-
self.0.name.as_str()
23+
self.0.driver_info.as_str()
24+
}
25+
pub fn vendor_id(&self) -> u32 {
26+
self.0.vendor
2427
}
25-
}
2628

29+
pub fn device_id(&self) -> u32 {
30+
self.0.device
31+
}
32+
}
2733

2834
#[no_mangle]
2935
pub extern "C" fn canvas_native_webgpu_adapter_info_vendor(
@@ -33,7 +39,7 @@ pub extern "C" fn canvas_native_webgpu_adapter_info_vendor(
3339
return std::ptr::null_mut();
3440
}
3541
let info = unsafe { &*info };
36-
CString::new(info.0.vendor.to_string()).unwrap().into_raw()
42+
CString::new(info.0.driver.clone()).unwrap().into_raw()
3743
}
3844

3945
#[no_mangle]
@@ -54,7 +60,7 @@ pub extern "C" fn canvas_native_webgpu_adapter_info_device(
5460
return std::ptr::null_mut();
5561
}
5662
let info = unsafe { &*info };
57-
CString::new(info.0.device.to_string()).unwrap().into_raw()
63+
CString::new(info.0.name.clone()).unwrap().into_raw()
5864
}
5965

6066
#[no_mangle]
@@ -65,7 +71,7 @@ pub extern "C" fn canvas_native_webgpu_adapter_info_description(
6571
return std::ptr::null_mut();
6672
}
6773
let info = unsafe { &*info };
68-
CString::new(info.0.name.clone()).unwrap().into_raw()
74+
CString::new(info.0.driver_info.clone()).unwrap().into_raw()
6975
}
7076

7177
#[no_mangle]

crates/canvas-c/src/webgpu/gpu_buffer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ impl From<wgpu_core::device::HostMap> for GPUMapMode {
3636
}
3737
}
3838

39+
#[derive(Debug)]
3940
pub struct CanvasGPUBuffer {
4041
pub(crate) instance: Arc<CanvasWebGPUInstance>,
4142
pub(crate) label: Option<Cow<'static, str>>,

0 commit comments

Comments
 (0)