Commit Graph
270 Commits
Author SHA1 Message Date
Dzmitry Malyshau 74eed253d8 Convert cube, skybox, msaa-line, and mipmap, to WGSL
Validate example shaders in tests

Support WGSL on the Web via Naga

Port the shadow WGSL partially

Convert hello-compute and boids to WGSL

Conver the shadow's fragment shader to WGSL

Shader entry point refactor
2021-01-30 01:02:04 -05:00
Dzmitry Malyshau 517ce3ef8d Update wgpu to the new render pipeline descriptor API 2021-01-29 00:51:44 -05:00
Dzmitry Malyshau c1225c42ac Fix the web backend in code and CI 2021-01-26 20:58:13 -05:00
Matt Keeter 2d16ade76c Bump wgpu-core and update texture_view_drop call 2021-01-23 12:12:42 -05:00
Dzmitry Malyshau ba99775974 Remove typed-arena dependency 2021-01-19 22:01:54 -05:00
Connor Fitzgerald 6d52bc5535 Add pipeline statistics and timeline queries 2021-01-16 01:05:03 -05:00
Andreas Reich 5ad4f19cea Exposed get_texture_format_features on adapter 2021-01-13 23:23:44 +01:00
Mikko Lehtonen a6cc17c12e Format PassErrorScope pipelines 2021-01-12 23:32:10 +02:00
Niklas Korz 0578cda7a6 Move get_swap_chain_preferred_format from device to adapter
Squashed commit of the following:

commit 260976b10e3a54b253768d71e5e47c51b976c25c
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 20:23:31 2021 +0100

    Formatting

commit e3f837e1b6a81c8c7a9566ba6a2c6dd8adfbbde7
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 20:20:37 2021 +0100

    Update examples

commit b0774c0aa56fbdfe741dd6c0e86d55b8c6b42de3
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 19:31:29 2021 +0100

    Use adapter.get_swap_chain_preferred_format
2021-01-11 20:32:03 +01:00
Jay Oster dae801baa0 Replace futures with pollster
This PR removes all of the `futures` dependencies. `std::future` does not contain a lot of useful helpers available in futures. The obvious ones are `join_all`, `FutureExt::map`, and `block_on`.

* `join_all` is replaced with a `Vec<T>` and async blocks.
* `FuturesExt::map` in the web backend is replaced by rolling the `map` function into the `MakeSendFuture` type.
* `block_on` is provided by `pollster`.

The original code using `join_all` ignored the result type yielded by the Future from `map_async`. This code does the same, but makes dropping the result a little more obvious.

These should not be troublesome. Figured I would call them out anyway.

The last big change is replacing `futures-executor` in the examples with `async-executor`. A new concrete `Spawner` type is used in the example framework instead of an implementation of `futures_task::LocalSpawn`.
2021-01-07 10:10:18 -08:00
Manuel Gil 80d8526c83 Fix cargo doc warnings due to unresolved links 2021-01-06 18:30:24 +00:00
Manuel Gil e00ef5d584 Expose get_swap_chain_preferred_format on Device
- Update examples to make use of the new method
2021-01-03 17:35:04 +00:00
0x182d4454fb211940 a7c87edaef Add set_push_constants to RenderEncoder 2020-12-25 14:01:04 +00:00
0x182d4454fb211940 fb5a449206 Remove unneeded cast from encoder.rs 2020-12-25 13:50:36 +00:00
0x182d4454fb211940 a99411c290 Move RenderEncoder to util 2020-12-25 13:47:38 +00:00
0x182d4454fb211940 1490d7be3a Add RenderEncoder 2020-12-24 17:37:06 +00:00
Vincent Jousse a717eeb54f First step for WebGL support. 2020-12-22 18:41:07 +01:00
Dzmitry Malyshau 0011ac4f26 Expose adapter.get_info() everywhere 2020-12-18 21:18:07 -05:00
Dzmitry Malyshau 3ffb82b7d3 Move DeviceExt into a separate module 2020-12-17 17:55:11 -05:00
Dzmitry Malyshau f3d6d242d7 Update wgpu with Naga fixes and OpenGL backend 2020-12-17 13:03:27 -05:00
Emanuele Dalla Longa bdd6edecd2 Require labels to match gfx-rs/wgpu#1088
Change-Id: I1acc45a3023dfc78b6694bd4a28a0131f07b7ba7
2020-12-16 00:15:05 +01:00
Zsolt Bölöny b7ea3f3b4a Update to latest wgpu master 2020-12-14 17:57:27 +01:00
Connor Fitzgerald a4202a4ff0 Add create_texture_with_data helper 2020-12-12 01:50:49 -05:00
Mikko Lehtonen 28931e34cc Add label to create_shader_module 2020-12-08 22:56:17 +02:00
Dzmitry Malyshau 7b06c4a3f7 Introduce ShaderModuleDescriptor 2020-12-05 18:53:37 -05:00
kejor 423c2489b8 API and examples update for index_format 2020-12-04 20:29:42 -05:00
Dzmitry Malyshau 41a1475b18 Fix map_extent_3d in the Web backend 2020-12-02 17:32:36 -05:00
Joshua Groves 7e1297efc0 Temporarily skip debug labels for web backend
Debug labels aren't currently supported by gecko
2020-12-02 00:32:55 -03:30
Dzmitry Malyshau 9c529b94f5 Adopt the updated bind group entry API 2020-11-30 22:31:31 -05:00
lordnoriyuki 8b2cf9949e Updating wgpu-rs dependency for backend-gl removal on macOS, including reference in direct.rs 2020-11-29 18:50:27 -08:00
Devin Hill 337612a49f make TextureViewArray take a slice of refs; fix texture-arrays example to match. 2020-11-24 21:09:00 -05:00
Greg V fe5b4c3317 Staging belt: do not panic by unwrapping send result in recall (fixes #634) 2020-11-24 19:46:32 +03:00
Joshua Groves bd23f803d7 Add get_bind_group_layout to web backend 2020-11-24 00:11:26 -03:30
Joshua Groves 069828d831 Add more labels and debug markers to web backend 2020-11-24 00:11:26 -03:30
Joshua Groves 38d0d37dbf Add render bundles to web backend 2020-11-24 00:11:26 -03:30
Joshua Groves d7b745e5af Update web bindings 2020-11-24 00:11:16 -03:30
Dzmitry Malyshau 2dc59ba2d9 Port to the updated wgpu error model 2020-11-23 17:59:21 -05:00
Mikko Lehtonen caa3320315 Handle PassErrorScope Ids 2020-11-23 08:23:43 +02:00
Mikko Lehtonen bcf8ef007f Add label for render pass context error
Also made the label key settable
2020-11-21 23:47:07 +02:00
Mikko Lehtonen 6f81f9f8ba Add labels for some error messages
This adds transforms for the ids in the errors to a label,
and adds them to the validation error message.

This changes the formatting of the validation error to happen when
constructing the error, rather than in the unhandled error handler.
It also requires some code for all the error variants for extracting the ids.
2020-11-20 00:36:29 +02:00
Mikko Lehtonen 665115768d Update wgpu-core
Pass label to error id creation methods.
2020-11-19 01:21:09 +02:00
Dzmitry Malyshau 9c638a2707 Update wgpu, work around surface validation 2020-11-18 10:05:20 -05:00
Dzmitry Malyshau 2a4ccc60fb Drop for surfaces and adapters 2020-11-16 16:47:21 -05:00
bors[bot]andMarvin Löbel 2563f20837 Merge #613
613: Add more context to errors originating in Passes and Encoders r=kvark a=Kimundi

**Description**
This adds some top-level error context information to indicate wether an error originated in a `{Render,Compute}Pass` or `{Command,RenderBundle}Encoder` to make error messages more clear.

Combined with https://github.com/gfx-rs/wgpu/pull/1018, errors in passes will look like this:
```
wgpu error: Validation error

Caused by:
    In a RenderPass
    In a draw command
    index 3600 extends beyond limit 38
```


Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-11-11 04:56:44 +00:00
Marvin Löbel d4da2684c3 Add more context to errors originating in Passes and Encoders 2020-11-09 23:49:19 +01:00
Alan Kemp 515909a999 Update create_buffer_init_polyfill for wasm32 2020-11-09 21:22:03 +00:00
Dzmitry Malyshau b6cabe16a2 Enable GL backend 2020-11-04 23:02:01 -05:00
Marvin Löbel 4e819d9c03 Clarify docs for Queue::write methods 2020-10-22 17:40:23 +02:00
Dzmitry Malyshau 503b61dc6c Update wgpu with another bind group fix, updated power preference 2020-10-13 16:57:52 -04:00
Dzmitry Malyshau 507770ad73 Immediate resource destruction 2020-10-11 23:17:37 -04:00