From b9aed69bed9eca3f21ddbce0bcbee0a17a74002f Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 15 Nov 2019 11:50:06 -0500 Subject: [PATCH] More licenses for Gecko --- examples/compute/main.c | 4 ++++ examples/framework.c | 4 ++++ examples/framework.h | 8 ++++++-- examples/remote/main.c | 4 ++++ examples/triangle/main.c | 4 ++++ ffi/wgpu.h | 15 +++++++++++++-- wgpu-native/Cargo.toml | 1 + wgpu-native/cbindgen.toml | 11 ++++++++++- wgpu-remote/Cargo.toml | 1 + 9 files changed, 47 insertions(+), 5 deletions(-) diff --git a/examples/compute/main.c b/examples/compute/main.c index f5ec63b8ed..5f6bfc665b 100644 --- a/examples/compute/main.c +++ b/examples/compute/main.c @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #ifndef WGPU_H #define WGPU_H #include "wgpu.h" diff --git a/examples/framework.c b/examples/framework.c index 9d1d0d8529..cc3976ccc0 100644 --- a/examples/framework.c +++ b/examples/framework.c @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #ifndef WGPU_H #define WGPU_H #include "wgpu.h" diff --git a/examples/framework.h b/examples/framework.h index 1332fbc5d4..106610c8e2 100644 --- a/examples/framework.h +++ b/examples/framework.h @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #ifndef WGPU_H #define WGPU_H #include "wgpu.h" @@ -6,6 +10,6 @@ WGPUU32Array read_file(const char *name); void read_buffer_map( - WGPUBufferMapAsyncStatus status, - const uint8_t *data, + WGPUBufferMapAsyncStatus status, + const uint8_t *data, uint8_t *userdata); diff --git a/examples/remote/main.c b/examples/remote/main.c index 15103b0ce2..22c6f4e734 100644 --- a/examples/remote/main.c +++ b/examples/remote/main.c @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #define WGPU_INLINE #define WGPU_FUNC diff --git a/examples/triangle/main.c b/examples/triangle/main.c index d1914b0388..8d18af2bf7 100644 --- a/examples/triangle/main.c +++ b/examples/triangle/main.c @@ -1,3 +1,7 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #ifndef WGPU_H #define WGPU_H #include "wgpu.h" diff --git a/ffi/wgpu.h b/ffi/wgpu.h index 3444896df7..2b9ad56259 100644 --- a/ffi/wgpu.h +++ b/ffi/wgpu.h @@ -1,8 +1,19 @@ -#define WGPU_LOCAL - +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Generated with cbindgen:0.9.1 */ +/* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen. + * To generate this file: + * 1. Get the latest cbindgen using `cargo install --force cbindgen` + * a. Alternatively, you can clone `https://github.com/eqrion/cbindgen` and use a tagged release + * 2. Run `rustup run nightly cbindgen toolkit/library/rust/ --lockfile Cargo.lock --crate wgpu-remote -o dom/webgpu/ffi/wgpu_ffi_generated.h` + */ + +#define WGPU_LOCAL + + #include #include #include diff --git a/wgpu-native/Cargo.toml b/wgpu-native/Cargo.toml index 46c094bff0..7409f29686 100644 --- a/wgpu-native/Cargo.toml +++ b/wgpu-native/Cargo.toml @@ -13,6 +13,7 @@ keywords = ["graphics"] license = "MPL-2.0" [lib] +# Enabling these targets makes our CI bots try to build them and fail atm crate-type = ["lib", "cdylib", "staticlib"] [features] diff --git a/wgpu-native/cbindgen.toml b/wgpu-native/cbindgen.toml index f111779e1e..511a50a3b8 100644 --- a/wgpu-native/cbindgen.toml +++ b/wgpu-native/cbindgen.toml @@ -1,4 +1,13 @@ -header = """ +header = """/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */""" +autogen_warning = """/* DO NOT MODIFY THIS MANUALLY! This file was generated using cbindgen. + * To generate this file: + * 1. Get the latest cbindgen using `cargo install --force cbindgen` + * a. Alternatively, you can clone `https://github.com/eqrion/cbindgen` and use a tagged release + * 2. Run `rustup run nightly cbindgen toolkit/library/rust/ --lockfile Cargo.lock --crate wgpu-remote -o dom/webgpu/ffi/wgpu_ffi_generated.h` + */ + #define WGPU_LOCAL """ include_version = true diff --git a/wgpu-remote/Cargo.toml b/wgpu-remote/Cargo.toml index 905850340e..a65264e7b7 100644 --- a/wgpu-remote/Cargo.toml +++ b/wgpu-remote/Cargo.toml @@ -8,6 +8,7 @@ authors = [ edition = "2018" [lib] +# Enabling these targets makes our CI bots try to build them and fail atm crate-type = ["lib", "cdylib", "staticlib"] [features]