Commit Graph
103 Commits
Author SHA1 Message Date
Connor Fitzgerald adcd708cf1 Fix example limits 2021-07-13 14:07:39 -04:00
Connor Fitzgerald 130ddcf561 Unify CI and testing 2021-07-04 15:22:51 -04:00
Connor Fitzgerald 26f3c03150 Add downlevel limit for vertex shader access to SSBO 2021-07-03 22:15:16 -04:00
Dzmitry Malyshau d2a4af35af Generation of memory reports for Hubs 2021-07-03 01:51:04 -04:00
Connor Fitzgerald a336c9e160 Spell tolerance right 2021-07-02 00:13:33 -04:00
Dzmitry Malyshau ba006cfaa7 Rename ColorWrite, TextureUsage, and BufferUsage 2021-06-30 14:57:38 -04:00
Dzmitry Malyshau 568ac3fa24 Switch all bitflag names to plural 2021-06-30 14:43:36 -04:00
Connor Fitzgerald b060bf1afe Assorted touchups 2021-06-23 20:23:19 -04:00
Connor Fitzgerald 3356f5f993 PR comments 2021-06-23 19:10:11 -04:00
Connor Fitzgerald c0664c2bb7 Begin robust exception system 2021-06-23 19:10:11 -04:00
Connor Fitzgerald ec74722d57 Add image comparison to all examples 2021-06-23 19:10:11 -04:00
Connor Fitzgerald ebbbf2216b Add image comparison to the mipmap example 2021-06-23 19:10:11 -04:00
Connor Fitzgerald 6432c4f6d8 Massively refactor testing infrastructure to better share code 2021-06-23 19:09:44 -04:00
Connor Fitzgerald 03c7f0097a Unify testing and examples and add useful external utilities 2021-06-23 19:09:44 -04:00
Frizi 07376d11e8 Handle winit exception in web to avoid breaking async executor 2021-06-03 13:02:56 +02:00
Dzmitry Malyshau e98f36245b [rs] Framework and README update 2021-06-01 09:54:44 -04:00
Dzmitry Malyshau 070688a84d [rs] Schedule event waits after redraw events are cleared 2021-03-17 22:58:35 -04:00
bors[bot]andAron Granberg 0542ad585a [rs] Merge #798
798: Fix all the clippy lints r=kvark a=HalfVoxel

Clippy is now happy

Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2021-03-17 14:02:03 +00:00
Aron Granberg 162fe18e7d [rs] Fix all the clippy lints and add clippy/fmt CI 2021-03-17 14:40:25 +01:00
Connor Fitzgerald 3a131f5f60 [rs] Move from tracing to log + profiling 2021-03-17 01:34:38 -04:00
Oleg Andreev 5adaa23de9 [rs] Return None from get_swap_chain_preferred_format if the adapter does not support the surface. 2021-03-01 18:15:01 +03:00
Tnze e9d68a332d [rs] Use the "max" function to ensure that the swapchain size is not less than 1. For better readability. 2021-02-09 14:20:22 +08:00
Connor Fitzgerald af61d9c917 [rs] Add pipeline statistics and timeline queries 2021-01-16 01:05:03 -05:00
Niklas Korz 4d2bec6cab [rs] 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 78f33bcf67 [rs] 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
Andreas Reich 070bceda31 [rs] Fixed inconsistent framerate in examples.
Does not affect web builds.
Previously, framerate would float between 30-40 fps depending on how many events would come in. Fast mouse movements over the window lead to higher framerates since request_redraw was called every 20ms (-> 50fps) AND all events were consumed, additionally the event loop would wake up only every 10ms, so actual rate of request_redraw depended on how often we'd wake up.
Fixed this by setting the max sleep time of the event loop to the remaining time until hitting the desired time interval since the last frame.

The difference is most visible on the spinning cubes in the shadow example since the cubes currently spin with a fixed angle per frame (independent of frame timings).
2021-01-05 22:58:28 +01:00
Manuel Gil d2844caaf0 [rs] Remove wgpu-subscriber -> subscriber alias in examples 2021-01-05 19:05:52 +00:00
Manuel Gil 81bcc72651 [rs] 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
Dzmitry Malyshau bafcc5ace5 [rs] Update wgpu with Naga fixes and OpenGL backend 2020-12-17 13:03:27 -05:00
Connor Fitzgerald 7e05bba6c4 [rs] Add create_texture_with_data helper 2020-12-12 01:50:49 -05:00
Diggory Blake b046340a57 [rs] Print chosen adapter when running examples 2020-11-30 18:33:51 +00:00
Dzmitry Malyshau 0adcfdd3ad [rs] Port to the updated wgpu error model 2020-11-23 17:59:21 -05:00
Zsolt Bölöny 7c290fdd8d [rs] Rename TextureUsage::OUTPUT_ATTACHMENT to RENDER_ATTACHMENT 2020-11-09 10:35:55 +01:00
Dzmitry Malyshau c115aed4cc [rs] Update wgpu with another bind group fix, updated power preference 2020-10-13 16:57:52 -04:00
Dzmitry Malyshau 5507e16718 [rs] Really fix the environment to WGPU_BACKEND this time 2020-10-11 23:43:39 -04:00
Dzmitry Malyshau f6858fa109 [rs] Support WGPU_BACKEND environment in the examples 2020-10-11 23:17:38 -04:00
Joshua Groves 90cdc32c0c [rs] Reorder framework window creation for web 2020-09-16 01:04:49 -02:30
crispweed 25aab2d6c5 [rs] Removed erroneous zero size check related conditional in water example resize() (#534)
* The conditional at the start of resize() already tests for and exits on the zero width and height condition.
The conditional removed here was then getting run on every other call to resize(), which doesn't seem logical, doesn't correspond to the comment, and seemed to be causing at least one issue with rendered viewport going black during resize.

Fixes #532
(probably) Fixes #519

* Defensive coding to prevent various issues when window size goes to zero, e.g. NaN being passed in cgmath::perspective() aspect ratio parameter.

Fixes #531
2020-08-25 13:25:50 -04:00
Dzmitry Malyshau 5c5483a25e [rs] Update for the wgpu grand refactor 2020-08-13 00:26:40 -04:00
Connor Fitzgerald 3eda1c5990 [rs] Enable features in CI to prevent compiler errors 2020-07-29 12:58:08 -04:00
Connor Fitzgerald 927d80e0af [rs] Convert to tracing for logging and add fmt logger 2020-07-26 00:44:39 -04: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
Rukai 9f99d67a63 [rs] Update to latest wgpu 2020-07-21 01:51:55 +10:00
Zsolt Bölöny ece80019f8 [rs] Move logger init earlier in the example framework 2020-07-19 22:41:27 +02:00
Connor Fitzgerald 857955483a [rs] Implement PUSH_CONSTANTS feature 2020-07-13 15:43:46 -04:00
m4b 5a98c1427f [rs] recreate swapchain on framework.rs examples on resize, ref #352 2020-07-10 21:30:39 -07:00
Gabriel Majeri 54d4532dae [rs] Update to new wgpu-core render pipeline API 2020-07-07 21:02:11 +03:00
Connor Fitzgerald cd4baab400 [rs] Convert Extensions + Capabilities into Features 2020-06-26 01:27:57 -04:00
kyren aae1f216e0 [rs] A different attempt at the example framework 2020-06-25 13:13:13 -04:00
kyren 6fb12c0537 [rs] Get event loop + futures working on native, untested on web 2020-06-25 13:13:13 -04:00