Commit Graph

653 Commits

Author SHA1 Message Date
Dzmitry Malyshau
6832ad1513 [rs] Update wgpu with the error model changes 2020-08-04 17:09:21 -04:00
bors[bot]
d846081d36 [rs] Merge #495
495: Update a documentation to refer to create_buffer_init() instead of create_buffer_with_data() r=kvark a=yutannihilation

A followup of #482

Co-authored-by: Hiroaki Yutani <yutani.ini@gmail.com>
2020-08-02 00:26:48 +00:00
Hiroaki Yutani
3c823e24c0 [rs] Update a doc's reference to create_buffer_init() 2020-08-01 17:57:13 +09:00
bors[bot]
6183e205a0 [rs] Merge #493
493: Use BCn textures if possible in skybox example r=kvark a=cwfitzgerald

This converts the skybox to using compressed textures if available. I have designed the code to be extensible to other compressed formats as they are added.

Additionally I added srgb to the texture types, as we were using a srgb framebuffer without properly converting into  linear on the texture reads.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-31 02:52:35 +00:00
Connor Fitzgerald
aeffeaf869 [rs] Use BCn textures if possible in skybox example 2020-07-30 20:55:40 -04:00
bors[bot]
c320599e20 [rs] Merge #492
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>
2020-07-30 17:41:55 +00:00
Kunal Mohan
eba4cd977b [rs] Replace NonZeroU32 with u32 in TextureViewDescriptor 2020-07-30 23:01:49 +05:30
bors[bot]
45df7b03ca [rs] Merge #482
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>
2020-07-30 02:08:24 +00:00
OptimisticPeach
208e3ec8a0 [rs] Combine create_buffer and create_buffer_with_dataCombines both by creating a new buffer descriptor which can deal with both of copying and allocating. 2020-07-29 21:35:21 -04:00
bors[bot]
a41b91b284 [rs] Merge #490
490: Panic using error Display rather than unwrapping r=kvark a=cormac-obrien

Fixes #489.

Co-authored-by: Mac O'Brien <cormac@c-obrien.org>
2020-07-29 20:01:03 +00:00
Mac O'Brien
71b2763159 [rs] Panic using error Display rather than unwrapping
Fixes #489
2020-07-29 14:01:50 -05:00
bors[bot]
378834336e [rs] Merge #484
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>
2020-07-29 16:59:20 +00:00
Connor Fitzgerald
3eda1c5990 [rs] Enable features in CI to prevent compiler errors 2020-07-29 12:58:08 -04:00
bors[bot]
db14d0f7ea [rs] Merge #488
488: Update wgpu with view descriptor changes r=kvark a=kvark

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

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-29 03:37:05 +00:00
Dzmitry Malyshau
8a32c7dbb8 [rs] Update wgpu with view descriptor changes 2020-07-28 23:35:59 -04:00
bors[bot]
de36997986 [rs] Merge #487
487: Update to latest `wgpu-core` r=kvark a=GabrielMajeri

Pulls in the latest changes from `wgpu-core`, follow up for https://github.com/gfx-rs/wgpu/pull/841

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-28 19:58:28 +00:00
Gabriel Majeri
04c1ff27ea [rs] Update to latest wgpu-core 2020-07-28 21:32:39 +03:00
bors[bot]
26eb6c0882 [rs] Merge #476
476: Convert to tracing for logging and add fmt logger r=kvark a=cwfitzgerald

wgpu-rs half of https://github.com/gfx-rs/wgpu/pull/835

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-26 04:46:37 +00:00
Connor Fitzgerald
927d80e0af [rs] Convert to tracing for logging and add fmt logger 2020-07-26 00:44:39 -04:00
bors[bot]
67cab07e46 [rs] Merge #469
469: Update to latest `wgpu-core` device error handling r=kvark a=GabrielMajeri

Corresponding PR for https://github.com/gfx-rs/wgpu/pull/832

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-25 14:39:38 +00:00
Gabriel Majeri
3eec74cd9c [rs] Unwrap errors from device functions 2020-07-25 07:46:32 +03:00
bors[bot]
da863bd5f9 [rs] Merge #481
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>
2020-07-25 03:52:41 +00:00
Dzmitry Malyshau
0ebc8adc58 [rs] Remove screenshots from README 2020-07-24 23:37:10 -04:00
bors[bot]
be70c758bb [rs] Merge #480
480: Fix the link to friend applications in the readme r=kvark a=memoryruins

The current link <sup> [1] </sup> brings one to a "Create new page" form for the wiki instead of the intended page <sup> [2] </sup>.
[1] https://github.com/gfx-rs/wgpu-rs/wiki/Applications
[2] https://github.com/gfx-rs/wgpu-rs/wiki/Applications-and-Libraries

Co-authored-by: memoryruins <memoryruinsmusic@gmail.com>
2020-07-25 00:42:55 +00:00
memoryruins
6dbbc0bd7a [rs] Fix the link to friend apllications in the readme
The current link brings one to a "Create new page" form for the wiki instead of the intended page.
2020-07-24 18:45:05 -04:00
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