diff --git a/ffi/wgpu.h b/ffi/wgpu.h index 14803ea1c..723367d71 100644 --- a/ffi/wgpu.h +++ b/ffi/wgpu.h @@ -8,6 +8,8 @@ #include #include +#define WGPUDESIRED_NUM_FRAMES 3 + #define WGPUMAX_BIND_GROUPS 4 #define WGPUMAX_COLOR_TARGETS 4 diff --git a/wgpu-native/src/binding_model.rs b/wgpu-native/src/binding_model.rs index 190a4e413..cc3e62a2d 100644 --- a/wgpu-native/src/binding_model.rs +++ b/wgpu-native/src/binding_model.rs @@ -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/. */ + use crate::{ resource::TextureViewDimension, track::TrackerSet, diff --git a/wgpu-native/src/command/allocator.rs b/wgpu-native/src/command/allocator.rs index a3096a158..555395c46 100644 --- a/wgpu-native/src/command/allocator.rs +++ b/wgpu-native/src/command/allocator.rs @@ -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/. */ + use super::CommandBuffer; use crate::{hub::GfxBackend, track::TrackerSet, DeviceId, Features, LifeGuard, Stored, SubmissionIndex}; diff --git a/wgpu-native/src/command/bind.rs b/wgpu-native/src/command/bind.rs index a07f0fef7..308051539 100644 --- a/wgpu-native/src/command/bind.rs +++ b/wgpu-native/src/command/bind.rs @@ -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/. */ + use crate::{ hub::GfxBackend, BindGroup, diff --git a/wgpu-native/src/command/compute.rs b/wgpu-native/src/command/compute.rs index 332d13c41..545344b7c 100644 --- a/wgpu-native/src/command/compute.rs +++ b/wgpu-native/src/command/compute.rs @@ -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/. */ + use crate::{ command::bind::{Binder, LayoutChange}, device::all_buffer_stages, diff --git a/wgpu-native/src/command/mod.rs b/wgpu-native/src/command/mod.rs index 10278fa3c..3e42a975f 100644 --- a/wgpu-native/src/command/mod.rs +++ b/wgpu-native/src/command/mod.rs @@ -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/. */ + mod allocator; mod bind; mod compute; diff --git a/wgpu-native/src/command/render.rs b/wgpu-native/src/command/render.rs index fc3213340..f3d5b804d 100644 --- a/wgpu-native/src/command/render.rs +++ b/wgpu-native/src/command/render.rs @@ -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/. */ + use crate::{ command::bind::{Binder, LayoutChange}, conv, diff --git a/wgpu-native/src/command/transfer.rs b/wgpu-native/src/command/transfer.rs index ec9696ea8..58a5cc54b 100644 --- a/wgpu-native/src/command/transfer.rs +++ b/wgpu-native/src/command/transfer.rs @@ -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/. */ + use crate::{ conv, device::{all_buffer_stages, all_image_stages}, diff --git a/wgpu-native/src/conv.rs b/wgpu-native/src/conv.rs index 914ef0220..4af1ab45e 100644 --- a/wgpu-native/src/conv.rs +++ b/wgpu-native/src/conv.rs @@ -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/. */ + use crate::{binding_model, command, pipeline, resource, Color, Extent3d, Features, Origin3d}; pub fn map_buffer_usage( diff --git a/wgpu-native/src/device.rs b/wgpu-native/src/device.rs index 3a6118fd5..722e5638b 100644 --- a/wgpu-native/src/device.rs +++ b/wgpu-native/src/device.rs @@ -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/. */ + #[cfg(not(feature = "remote"))] use crate::{ instance::Limits, diff --git a/wgpu-native/src/hub.rs b/wgpu-native/src/hub.rs index e88229493..c14893bec 100644 --- a/wgpu-native/src/hub.rs +++ b/wgpu-native/src/hub.rs @@ -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/. */ + use crate::{ backend, id::{Input, Output}, diff --git a/wgpu-native/src/id.rs b/wgpu-native/src/id.rs index 7acc1c252..16bd6be05 100644 --- a/wgpu-native/src/id.rs +++ b/wgpu-native/src/id.rs @@ -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/. */ + use crate::{Backend, Epoch, Index}; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; diff --git a/wgpu-native/src/instance.rs b/wgpu-native/src/instance.rs index 86fa7b229..e521a705b 100644 --- a/wgpu-native/src/instance.rs +++ b/wgpu-native/src/instance.rs @@ -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/. */ + use crate::{ backend, binding_model::MAX_BIND_GROUPS, diff --git a/wgpu-native/src/lib.rs b/wgpu-native/src/lib.rs index 2c477fb55..335c2106f 100644 --- a/wgpu-native/src/lib.rs +++ b/wgpu-native/src/lib.rs @@ -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/. */ + pub mod backend { #[cfg(windows)] pub use gfx_backend_dx11::Backend as Dx11; diff --git a/wgpu-native/src/pipeline.rs b/wgpu-native/src/pipeline.rs index 9c4a65189..177a165d2 100644 --- a/wgpu-native/src/pipeline.rs +++ b/wgpu-native/src/pipeline.rs @@ -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/. */ + use crate::{ device::RenderPassContext, resource, diff --git a/wgpu-native/src/resource.rs b/wgpu-native/src/resource.rs index a543a5244..f9795157e 100644 --- a/wgpu-native/src/resource.rs +++ b/wgpu-native/src/resource.rs @@ -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/. */ + use crate::{ BufferAddress, BufferMapReadCallback, diff --git a/wgpu-native/src/swap_chain.rs b/wgpu-native/src/swap_chain.rs index 5cd9a6dc6..3846869db 100644 --- a/wgpu-native/src/swap_chain.rs +++ b/wgpu-native/src/swap_chain.rs @@ -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/. */ + /*! Swap chain management. ## Lifecycle diff --git a/wgpu-native/src/track/buffer.rs b/wgpu-native/src/track/buffer.rs index b2db9ad02..2079b8b3a 100644 --- a/wgpu-native/src/track/buffer.rs +++ b/wgpu-native/src/track/buffer.rs @@ -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/. */ + use super::{PendingTransition, ResourceState, Stitch, Unit}; use crate::{conv, resource::BufferUsage, BufferId}; use std::ops::Range; diff --git a/wgpu-native/src/track/mod.rs b/wgpu-native/src/track/mod.rs index 105a35086..7c2c2edfd 100644 --- a/wgpu-native/src/track/mod.rs +++ b/wgpu-native/src/track/mod.rs @@ -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/. */ + mod buffer; mod range; mod texture; diff --git a/wgpu-native/src/track/range.rs b/wgpu-native/src/track/range.rs index c26df0d52..4eb0231fc 100644 --- a/wgpu-native/src/track/range.rs +++ b/wgpu-native/src/track/range.rs @@ -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/. */ + use std::{cmp::Ordering, fmt::Debug, iter::Peekable, ops::Range, slice::Iter}; /// Structure that keeps track of a I -> T mapping, diff --git a/wgpu-native/src/track/texture.rs b/wgpu-native/src/track/texture.rs index b7ea45ded..b845e1b25 100644 --- a/wgpu-native/src/track/texture.rs +++ b/wgpu-native/src/track/texture.rs @@ -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/. */ + use super::{range::RangedStates, PendingTransition, ResourceState, Stitch, Unit}; use crate::{conv, device::MAX_MIP_LEVELS, resource::TextureUsage, TextureId}; diff --git a/wgpu-remote/src/lib.rs b/wgpu-remote/src/lib.rs index a157677f3..67a42b8b9 100644 --- a/wgpu-remote/src/lib.rs +++ b/wgpu-remote/src/lib.rs @@ -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/. */ + //TODO: remove once `cbindgen` is smart enough extern crate wgpu_native as wgn; use wgn::{AdapterId, Backend, DeviceId, IdentityManager, SurfaceId}; diff --git a/wgpu-remote/src/server.rs b/wgpu-remote/src/server.rs index ee38de4c4..fe743de83 100644 --- a/wgpu-remote/src/server.rs +++ b/wgpu-remote/src/server.rs @@ -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/. */ + use crate::GlobalMessage; use ipc_channel::ipc::IpcReceiver;