Commit Graph
465 Commits
Author SHA1 Message Date
Marvin Löbel eb9299d247 Update wgpu-rs for the Cow changes in wgpu 2020-07-23 00:48:13 +02:00
bors[bot]andAndrea Nardi f9c3cb91c0 Merge #466
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>
2020-07-22 20:18:29 +00:00
Andrea Nardi 019e7513b3 made fields of direct::Context private 2020-07-22 21:53:13 +02:00
Andrea Nardi f1fa1e884b implement debug for public types
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-22 20:44:48 +02:00
bors[bot]andDzmitry Malyshau 4e49a60804 Merge #465
465: Fix Vulkan portability support on macOS r=cwfitzgerald a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-22 14:40:09 +00:00
bors[bot]andbootra-dev 96f4dda756 Merge #442
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>
2020-07-21 20:31:45 +00:00
Dzmitry Malyshau 655828f88f Fix Vulkan portability support on macOS 2020-07-21 12:39:40 -04:00
bors[bot]andRukai e21bc3b9d6 Merge #462
462: create_buffer_with_data automatically handles its own alignment requirements r=kvark a=rukai

closes https://github.com/gfx-rs/wgpu-rs/issues/449

Does write_buffer/write_texture need similar handling?

Co-authored-by: Rukai <rubickent@gmail.com>
2020-07-21 15:36:00 +00:00
Rukai 87da83cb4f create_buffer_with_data automatically handles its own alignment requirements 2020-07-22 01:21:50 +10:00
bors[bot]andJMS55 d91d046c0a Merge #459
459: Fix typo r=cwfitzgerald a=JMS55



Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
2020-07-20 22:54:50 +00:00
JMS55 38167f73b8 Fix typo 2020-07-20 17:41:24 -04:00
bors[bot]andAndrea Nardi 8a07a09610 Merge #453
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>
2020-07-20 17:39:39 +00:00
Andrea Nardi dcd5b4675d Added Static Lifetime to Statically Loaded SPIR-V Modules
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-20 19:35:34 +02:00
bors[bot]andRukai 6956a215be Merge #452
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>
2020-07-20 16:23:40 +00:00
Rukai be388200dc Update to latest wgpu 2020-07-21 01:51:55 +10:00
bors[bot]andZsolt Bölöny b2016b18a7 Merge #455
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>
2020-07-20 00:24:44 +00:00
Gabriel Majeri f4fe83be77 Implement more derives for Operations (#450)
* Implement more derives for `Operations`

* Use `trace` / `replay` features for serialization

* Set `store` to default
2020-07-19 20:20:45 -04:00
Zsolt Bölöny 10538f8a9f Move logger init earlier in the example framework 2020-07-19 22:41:27 +02:00
bors[bot]andConnor Fitzgerald 8e4d001586 Merge #447
447: Remove Lifetimes from Push Constants r=kvark a=cwfitzgerald

This is sound because for render passes, compute passes, and render bundles we immediately copy the data into an internal buffer then refer to the data by offset into the buffer.

This also cleans up the example a bit as we don't need the array to outlive the statement.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-17 19:13:22 +00:00
Connor Fitzgerald 17a53cf003 Remove Lifetimes from Push Constants 2020-07-17 14:52:33 -04:00
bors[bot]andDasEtwas d0825a2195 Merge #443
443: Implement typical Error traits for SwapChainError r=kvark a=DasEtwas

Added Display and Error implementation for SwapChainError, imported Display and Error more nicely for the existing errors.

Co-authored-by: DasEtwas <18222134+DasEtwas@users.noreply.github.com>
2020-07-16 23:56:28 +00:00
DasEtwas db834c58ab added Display and Error implementation for SwapChainError, imported Display and Error more nicely 2020-07-16 23:46:10 +02:00
bootra-dev 80c9441027 replace vertex_format_size macro with VertexFormat size function 2020-07-16 14:25:22 -04:00
bors[bot]andGabriel Majeri 9f868cd2cb Merge #439
439: Update to latest `wgpu-core` r=kvark a=GabrielMajeri

Pull in some of the latest changes from the `wgpu` repo

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-16 14:27:16 +00:00
bors[bot]andConnor Fitzgerald 08497cee8c Merge #441
441: Impl Error for Error types r=kvark a=cwfitzgerald

I believe these are the only two results the api returns.

thiserror seems like a big hammer for such a small job, especially as all wgpu-core errors are unwrapped by wgpu-rs. Lets keep doing log + error as we are now for all the rest. Keep our dep on syn off.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-16 13:25:27 +00:00
Connor Fitzgerald 8bc91dc124 Impl Error for Error types 2020-07-16 09:23:00 -04:00
Gabriel Majeri ddf1d0c3ab Update to latest wgpu-core 2020-07-16 07:42:49 +03:00
bors[bot]andConnor Fitzgerald 32de700ef9 Merge #435
435: Implement PUSH_CONSTANTS feature r=kvark a=cwfitzgerald

The rust half of the push constant extensions, continuing from https://github.com/gfx-rs/wgpu/pull/777.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-13 19:44:51 +00:00
Connor Fitzgerald a67047297c Implement PUSH_CONSTANTS feature 2020-07-13 15:43:46 -04:00
bors[bot]andGabriel Majeri 5f4f35d2c3 Merge #437
437: Use common types from `wgpu-types` r=kvark a=GabrielMajeri

The `wgpu-rs` counterpart to https://github.com/gfx-rs/wgpu/pull/791

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-13 17:41:27 +00:00
Gabriel Majeri e01e93a619 Use common types from wgpu-types 2020-07-13 20:12:27 +03:00
bors[bot]andGabriel Majeri a8cc309c9b Merge #430
430: Unwrap errors from transfer API r=kvark a=GabrielMajeri

`wgpu-rs` part of https://github.com/gfx-rs/wgpu/pull/773

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-13 14:03:50 +00:00
Gabriel Majeri 009d062482 Unwrap errors from transfer API 2020-07-13 14:13:23 +03:00
Dzmitry Malyshau ad881319bb Move out the friends list 2020-07-12 21:08:40 -04:00
bors[bot]andm4b 6ca03f8354 Merge #434
434: recreate swapchain on framework.rs examples on resize, ref #352 r=kvark,cwfitzgerald a=m4b

There still seem to be residual race condition like errors w.r.t. resizing on at least x11, but this does fix the panic on x11.

Co-authored-by: m4b <m4b.github.io@gmail.com>
2020-07-11 14:17:31 +00:00
m4b 68754e6ca9 recreate swapchain on framework.rs examples on resize, ref #352 2020-07-10 21:30:39 -07:00
bors[bot]andCarter Anderson 8c4d814607 Merge #433
433: make env_logger a dev dependency r=kvark a=cart

env_logger is only used in examples and adds a good number of dependencies to the build tree that arent needed

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2020-07-11 02:27:02 +00:00
Carter Anderson 4b37fc0e5f make env_logger a dev dependency 2020-07-10 12:34:03 -07:00
bors[bot]andLachlan Sneff 344161feae Merge #428
428: Split render pass docs into multiple sections, divided by feature r=cwfitzgerald a=lachlansneff

This does not affect usage at all.

Here's what the docs look like:

<img width="1012" alt="Screen Shot 2020-07-09 at 11 11 30 AM" src="https://user-images.githubusercontent.com/31360811/87057532-fd974c00-c1d4-11ea-8c7f-913a893bcdef.png">


Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-07-09 19:01:07 +00:00
Lachlan Sneff 42a8c480a7 Split render pass docs into multiple sections, divided by feature 2020-07-09 11:06:09 -04:00
bors[bot]andDzmitry Malyshau 54f5478f40 Merge #426
426: wgpu dependency update with memory fixes r=trivial a=kvark

Fixes #423 (mostly!)

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-07-07 21:30:21 +00:00
Dzmitry Malyshau 38408939e9 wgpu dependency update with memory fixes 2020-07-07 17:29:03 -04:00
bors[bot]andGabriel Majeri 15f051dd77 Merge #425
425: Update to new `wgpu-core` render pipeline API r=kvark a=GabrielMajeri

Picks up the changes from https://github.com/gfx-rs/wgpu/pull/763

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-07 19:31:35 +00:00
Gabriel Majeri eb91482d0b Update to new wgpu-core render pipeline API 2020-07-07 21:02:11 +03:00
bors[bot]andgzp-crey 0c7c3afebb Merge #417
417: add replay feature r=kvark a=gzp-crey

Resolves #284 

Co-authored-by: gzp-crey <gzp@creygames.com>
2020-06-29 14:46:07 +00:00
gzp-crey a7cc7d14c8 add replay feature 2020-06-29 09:20:14 +02:00
bors[bot]andBen Frankel d272a69f67 Merge #416
416: Allow trailing comma in vertex_attr_array! r=cwfitzgerald a=benfrankel



Co-authored-by: Ben Frankel <ben.frankel7@gmail.com>
2020-06-28 21:24:54 +00:00
Ben Frankel 17b6982f49 Allow trailing comma in vertex_attr_array! 2020-06-28 14:23:23 -07:00
bors[bot]andConnor Fitzgerald 6309dc29b2 Merge #414
414: Implement MultiDrawIndirect Extensions r=kvark a=cwfitzgerald

The wgpu-rs component of https://github.com/gfx-rs/wgpu/pull/754.

I didn't include the modifications to the example as they are particularly awful and ugly. One of my next steps following this is to make an example of both binding indexing and these multi-draw extensions.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-06-28 15:12:32 +00:00
Connor Fitzgerald cc5ff8e992 Implement MultiDrawIndirect Extensions 2020-06-28 01:39:17 -04:00