Commit Graph

478 Commits

Author SHA1 Message Date
bors[bot]
2c62e86792 [rs] Merge #479
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>
2020-07-24 21:39:46 +00:00
Connor Fitzgerald
41cadccf3a [rs] Split framework limit situation into requested/required, enforcing correctness in the framework 2020-07-24 17:37:04 -04:00
bors[bot]
53fa5104f7 [rs] Merge #475
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>
2020-07-24 19:11:05 +00:00
bors[bot]
b98bf6da98 [rs] Merge #477
477: Add more cows r=cwfitzgerald,kvark a=Kimundi



Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-07-24 15:57:02 +00:00
Marvin Löbel
340f45200c [rs] Fix missing cows in some places 2020-07-24 17:24:30 +02:00
Andrea Nardi
9abd9f9449 [rs] Made RenderBundleEncoder derive Debug
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-24 14:59:40 +02:00
bors[bot]
04248d07a2 [rs] Merge #473
473: Update wgpu, use defaults for rasterizer states, use depth-clamping r=straightforward a=kvark

Includes https://github.com/gfx-rs/wgpu/pull/833 last

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-24 02:36:24 +00:00
Dzmitry Malyshau
e97bda20b2 [rs] Update wgpu, use defaults for rasterizer states, use depth-clamping 2020-07-23 22:35:13 -04:00
bors[bot]
4f4ac22fad [rs] Merge #472
472: Fix two missed renames in docs r=grovesNL a=Kimundi



Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-07-24 00:15:57 +00:00
Marvin Löbel
e6793edb3e [rs] Fix two missed renames in docs 2020-07-24 02:08:01 +02:00
Dzmitry Malyshau
803eb819d8 [rs] Use ACCESS_TOKEN for deployment 2020-07-23 18:24:40 -04:00
Dzmitry Malyshau
2bda45684f [rs] Change deployment target to wgpu-rs.github.io (#471) 2020-07-23 16:51:10 -04:00
bors[bot]
c9db56d380 [rs] Merge #460
460: Replace borrowed slices in Descriptor structs with copy on write slices r=kvark a=Kimundi

This is the other half of https://github.com/gfx-rs/wgpu/pull/822

Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-07-22 22:55:16 +00:00
Marvin Löbel
50935bf1d3 [rs] Update wgpu-rs for the Cow changes in wgpu 2020-07-23 00:48:13 +02:00
bors[bot]
3e8ab741fd [rs] 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
fb48ff51c3 [rs] made fields of direct::Context private 2020-07-22 21:53:13 +02:00
Andrea Nardi
050abe522f [rs] implement debug for public types
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-22 20:44:48 +02:00
bors[bot]
98fbdb4ea4 [rs] 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]
c2b6a6e74a [rs] 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
1bb52d8104 [rs] Fix Vulkan portability support on macOS 2020-07-21 12:39:40 -04:00
bors[bot]
fcb39a1de6 [rs] 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
44f04fb734 [rs] create_buffer_with_data automatically handles its own alignment requirements 2020-07-22 01:21:50 +10:00
bors[bot]
5001e86bdd [rs] 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
1f12ed2ca8 [rs] Fix typo 2020-07-20 17:41:24 -04:00
bors[bot]
6bdd7cd3d5 [rs] 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
36049884a5 [rs] 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]
86a3089551 [rs] 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
9f99d67a63 [rs] Update to latest wgpu 2020-07-21 01:51:55 +10:00
bors[bot]
417b01d1e5 [rs] 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
08182d14bf [rs] 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
ece80019f8 [rs] Move logger init earlier in the example framework 2020-07-19 22:41:27 +02:00
bors[bot]
d1dea85944 [rs] 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
d0bd56cb07 [rs] Remove Lifetimes from Push Constants 2020-07-17 14:52:33 -04:00
bors[bot]
0c74c0348e [rs] 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
88ab8aba86 [rs] added Display and Error implementation for SwapChainError, imported Display and Error more nicely 2020-07-16 23:46:10 +02:00
bootra-dev
3204f0e5fe [rs] replace vertex_format_size macro with VertexFormat size function 2020-07-16 14:25:22 -04:00
bors[bot]
9072c7ce48 [rs] 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]
80c5746b65 [rs] 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
90ebe377df [rs] Impl Error for Error types 2020-07-16 09:23:00 -04:00
Gabriel Majeri
8991e967fe [rs] Update to latest wgpu-core 2020-07-16 07:42:49 +03:00
bors[bot]
ee69f3c457 [rs] 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
857955483a [rs] Implement PUSH_CONSTANTS feature 2020-07-13 15:43:46 -04:00
bors[bot]
1066173a67 [rs] 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
f41e9ea5e2 [rs] Use common types from wgpu-types 2020-07-13 20:12:27 +03:00
bors[bot]
bcd4c6c33e [rs] 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
c4888c1873 [rs] Unwrap errors from transfer API 2020-07-13 14:13:23 +03:00
Dzmitry Malyshau
6fe2225880 [rs] Move out the friends list 2020-07-12 21:08:40 -04:00
bors[bot]
d4efbee10a [rs] 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
5a98c1427f [rs] recreate swapchain on framework.rs examples on resize, ref #352 2020-07-10 21:30:39 -07:00
bors[bot]
118f29fa36 [rs] 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