492: Replace NonZeroU32 with u32 in TextureViewDescriptor r=kvark a=kunalmohan
Includes https://github.com/gfx-rs/wgpu/pull/854
(rustfmt seems to have introduced a number of other changes. I can revert them if they are undesired)
r?@kvark
Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
482: Add label parameter to `create_buffer_with_data` r=kvark a=OptimisticPeach
Improves QOL by allowing you to attach a label to a buffer when created with predetermined data:
```
let uniform_buf = device.create_buffer_with_data(
bytemuck::cast_slice(my_data),
wgpu::BufferUsage::UNIFORM,
Some(Cow::Borrowed("My Uniforms")),
);
```
Co-authored-by: OptimisticPeach <patrikbuhring@yahoo.com>
484: Enable features in CI to prevent compiler errors r=kvark a=cwfitzgerald
Simple change, this also builds features in CI.
I added trace and replay features to wasm, even though wasm doesn't support tracing as is, because people may enable them to get serde support for wgpu-types stuff.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
481: Remove screenshots from README r=grovesNL a=kvark
Screenshots cover a ton of space, and now we have a dedicated hosted gallery for them.
I'm open to the idea of having *some* smaller screenshots here. It's just difficult to draw the line. Maybe README should show a few screenshots of examples only, and the gallery would not have them?
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
479: Split framework limit situation into requested/required r=kvark a=cwfitzgerald
Requiring individual examples be responsible for panicing if their features aren't supported is a bit bug-prone, so this encodes requirements in the framework and enforces it in the framework.
Additionally made the verbs consistent.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
475: Made RenderBundleEncoder derive Debug r=kvark a=Andful
This is a continuation of the pull request #466 and should resolve the issue #458.
Co-authored-by: Andrea Nardi <buongiorno19972@gmail.com>
466: add debug trait for public types r=kvark a=Andful
This pull request is to resolve the issue #458.
This pull request is still incomplete. The only problematic trait is `RenderBundleEncoder`.
For the native version, `RenderBundleEncoder` does not implement `Debug`. This would have to be implemented in the wgpu project.
FYI, Context does not need to implement `Debug`. The type that implements `Context` is used directly, i.e. `Arc<C>` is used and not `Arc<dyn Context>`
Co-authored-by: Andrea Nardi <buongiorno19972@gmail.com>
442: replace vertex_format_size macro with VertexFormat size function r=kvark a=bootra-dev
This pull request depends on https://github.com/gfx-rs/wgpu/pull/802
I'm not sure if multiple pull requests is the right way to handle this - let me know if I need to use another workflow.
Co-authored-by: bootra-dev <bootragames@gmail.com>
453: Added Static Lifetime to Statically Loaded SPIR-V Modules r=kvark a=Andful
The commit enables `include_spirv!` to return a `ShaderModuleSource<'static>`.
This allows `ShaderModuleSource` to outlive the context in which `include_spirv!` was called in.
An example where this implementation would work but the previews would not is the following.
```rust
fn get_vertex_module<'a>() -> wgpu::ShaderModuleSource<'a> {
wgpu::include_spirv!("shader.vert.spv")
}
let vs_module = device.create_shader_module(get_vertex_module());
```
Also it makes logical sense for a statically loaded module to have a static lifetime.
The only downside that this change might bring is the redundant presence of the binary string (the non aligned binary string and the aligned binary string) but from the produced assembly I could only find one copy of the binary string so I don't think this is the case.
Co-authored-by: Andrea Nardi <buongiorno19972@gmail.com>
452: Update to latest wgpu r=kvark a=rukai
public API changes:
* get_next_frame -> get_current_frame to better reflect the name of webgpu api being called.
Co-authored-by: Rukai <rubickent@gmail.com>
455: Fix early logging in the examples r=kvark a=yzsolt
Fix early logging in the examples by moving logger initialization from `start` into `setup`.
Note: I haven't actually checked this on the WASM target, but it should probably be fine.
Co-authored-by: Zsolt Bölöny <bolony.zsolt@gmail.com>