560: Update ffi for wgpu-remote r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
bors[bot]
2020-04-09 16:18:55 +00:00
committed by GitHub
4 changed files with 1377 additions and 35 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -21,7 +21,6 @@ language = "C"
[export]
prefix = "WGPU"
#TODO: figure out why cbindgen even tries to export a private type...
exclude = ["Option_AdapterId", "Option_SurfaceId", "Option_TextureViewId"]
[parse]

View File

@@ -8,7 +8,10 @@ autogen_warning = """/* DO NOT MODIFY THIS MANUALLY! This file was generated usi
* 2. Run `rustup run nightly cbindgen toolkit/library/rust/ --lockfile Cargo.lock --crate wgpu-remote -o dom/webgpu/ffi/wgpu_ffi_generated.h`
*/
typedef void WGPUEmpty;
typedef uint64_t WGPUNonZeroU64;
typedef uint64_t WGPUOption_AdapterId;
typedef uint64_t WGPUOption_SurfaceId;
typedef uint64_t WGPUOption_TextureViewId;
"""
include_version = true
braces = "SameLine"
@@ -19,7 +22,7 @@ style = "tag"
[export]
prefix = "WGPU"
exclude = ["BufferMapResult"]
exclude = ["Option_AdapterId", "Option_SurfaceId", "Option_TextureViewId"]
[parse]
parse_deps = true

View File

@@ -129,6 +129,14 @@ pub extern "C" fn wgpu_server_buffer_map_read(
));
}
#[no_mangle]
pub extern "C" fn wgpu_server_buffer_unmap(
global: &Global,
buffer_id: id::BufferId,
) {
gfx_select!(buffer_id => global.buffer_unmap(buffer_id));
}
#[no_mangle]
pub extern "C" fn wgpu_server_buffer_destroy(global: &Global, self_id: id::BufferId) {
gfx_select!(self_id => global.buffer_destroy(self_id));