Commit Graph
144 Commits
Author SHA1 Message Date
Rukai be388200dc Update to latest wgpu 2020-07-21 01:51:55 +10:00
Zsolt Bölöny 10538f8a9f Move logger init earlier in the example framework 2020-07-19 22:41:27 +02:00
Connor Fitzgerald 17a53cf003 Remove Lifetimes from Push Constants 2020-07-17 14:52:33 -04:00
Connor Fitzgerald a67047297c Implement PUSH_CONSTANTS feature 2020-07-13 15:43:46 -04:00
Gabriel Majeri e01e93a619 Use common types from wgpu-types 2020-07-13 20:12:27 +03:00
Gabriel Majeri 009d062482 Unwrap errors from transfer API 2020-07-13 14:13:23 +03:00
m4b 68754e6ca9 recreate swapchain on framework.rs examples on resize, ref #352 2020-07-10 21:30:39 -07:00
Gabriel Majeri eb91482d0b Update to new wgpu-core render pipeline API 2020-07-07 21:02:11 +03:00
Gabriel Majeri a801f64789 Improve hello-triangle docs 2020-06-27 21:25:22 +03:00
Connor Fitzgerald 5529b60da4 Convert Extensions + Capabilities into Features 2020-06-26 01:27:57 -04:00
b67d3f43e7 Merge #408
408: Staging belt r=kyren a=kvark

Implementing the belt itself isn't too hard, but integrating it with the example framework and winit's event loop is somewhat challenging. Perhaps, there needs to be a `LocalSpawner` parameter to `render()` like I did [in vange-rs](https://github.com/kvark/vange-rs/blob/e7bc944ef5a5a47d04cedd1c4d299295a1693fd3/bin/boilerplate.rs#L26)?

Edit: code is all ready and shiny... but it does NOT work. Buffers don't come back from mapping for some reason.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Co-authored-by: kyren <kerriganw@gmail.com>
2020-06-25 17:44:04 +00:00
kyren e6ec327689 A different attempt at the example framework 2020-06-25 13:13:13 -04:00
kyren f05496fa59 Get event loop + futures working on native, untested on web 2020-06-25 13:13:13 -04:00
bors[bot]andBrian fb0f231045 Merge #400
400: Added test for "capture" example r=kvark a=bfrazho

I've added a test to validate the capture example. I was planning on using the existing "screenshot.png" that was in there for the assertion for the test, but apparently was slightly different from the one that I was generating. I ended up replacing the screenshot.png with what the test was generating.

I'm a little concerned that they were different from the start, but maybe the png generating library made some small changes over time. I did check to make sure that it generated the same png on Windows and Linux on the same computer.

Let me know if there is anything that you would like me to change!

Co-authored-by: Brian <brian@linux-ccip.lan>
2020-06-24 14:46:52 +00:00
Dzmitry Malyshau aef72d7fd7 Refactor examples API, improve belt documentation and logic 2020-06-23 23:51:47 -04:00
Dzmitry Malyshau 4aa7abdff8 Staging belt, use LocalSpawner for the framework 2020-06-23 23:15:47 -04:00
Brian b3381bc7e3 added test to validate that the capture example's png matches the screenshot.png that is in there
removed some warnings in the capture test about not handling results, and put expect messages around them

separated png logic from the rest of gpu logic in the capture example

refactored capture test to do assertion based on data rather than the output png

switched assertion for capture test to only check for red pixels instead of comparing to a raw buffer as a file

cleaned up capture example test to get rid of warnings
2020-06-23 20:24:48 -04:00
Connor Fitzgerald 741644d252 Add Tracing 2020-06-22 23:14:29 -04:00
6464852226 Merge #401 #402
401: Readme updates about the Gecko branch r=grovesNL a=kvark



402: Re-enable auto-deploy from gecko branch r=kvark a=grovesNL

As mentioned on Matrix, the `gecko` branch should be safe to use for auto-deployment to GitHub pages for the wgpu-rs examples on wasm.

We can use the `gecko` branch for now and eventually switch back to `master`.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-06-21 00:23:05 +00:00
Dzmitry Malyshau 4b97de0237 Readme updates about the Gecko branch 2020-06-20 19:14:39 -04:00
Dzmitry Malyshau 3f57811e7a Another refactor of RenderPassDescriptor API 2020-06-20 19:07:06 -04:00
Dzmitry Malyshau 330986bc66 Update wgpu without peek-poke 2020-06-20 17:20:20 -04:00
Marvin Löbel 693abce446 Move backends: BackendBit paramter to Instance::new() 2020-06-19 01:25:38 +02:00
Dzmitry Malyshau 262ac84f2c Example feature matrix 2020-06-18 13:15:41 -04:00
Dzmitry Malyshau 65718c1e25 Add include_spirv macro 2020-06-18 01:04:42 -04:00
Dzmitry Malyshau 3f0e11fe47 Remove interface blocks from the water shaders 2020-06-17 11:03:02 -04:00
bors[bot]andNikita Krupitskas ddfe8d67d2 Merge #374
374: Add debug markers and debug markers example r=kvark a=krupitskas

Depends on https://github.com/gfx-rs/wgpu/pull/719

Co-authored-by: Nikita Krupitskas <krupitskas@icloud.com>
2020-06-17 13:54:00 +00:00
Dzmitry Malyshau 47cbde6782 Update with minBufferBindingSize 2020-06-17 00:13:47 -04:00
Nikita Krupitskas f9ae9be70a Add debug markers and debug markers example 2020-06-16 11:13:03 +03:00
OptimisticPeach 2501a06cdd Add water example 2020-06-16 02:33:14 -04:00
Dzmitry Malyshau fe42169e2e Revert "API update for RODS2"
This reverts commit edb3610530.
2020-06-15 18:16:14 -04:00
Connor Fitzgerald 021419b15d Implement SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING 2020-06-15 15:09:06 -04:00
Rukai 364034bb52 add test case for empty buffer 2020-06-15 12:18:58 +10:00
Dzmitry Malyshau edb3610530 API update for RODS2 2020-06-14 09:25:13 -04:00
Dzmitry Malyshau 71cfb32342 Render bundle support, use in msaa-line example 2020-06-11 22:59:40 -04:00
bors[bot]andConnor Fitzgerald 7b887f12a3 Merge #360
360: Implement TEXTURE_BINDING_ARRAY extension r=kvark a=cwfitzgerald

This extends https://github.com/gfx-rs/wgpu/pull/711 into wgpu-rs.

Notable changes: 
- Added an example showing off both this extension and the future descriptor indexing extension.
- Changed the framework so there is a static function showing what extensions you need. This is provided by the trait,, which defaults to no extensions, so existing examples and new ones don't have to care about extensions.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-06-11 20:37:46 +00:00
Connor Fitzgerald f8be38cc01 Implement TEXTURE_BINDING_ARRAY extension 2020-06-11 16:36:53 -04:00
Lachlan Sneff d9ecab0cdc Fix buffer mapping examples 2020-06-11 12:07:47 -04:00
bors[bot]andLachlan Sneff b1f3fbaab0 Merge #356
356: Add generic ranges to buffer mapping api and make it safe. r=kvark a=lachlansneff

[Rendered](https://charted.space/notes/wgpu-rs/wgpu/struct.Buffer.html)

The safety issues with the current api (being able to unmap while still holding a slice to mapped data) are fixed by having `get_mapped_range` and `get_mapped_range_mut` return `BufferView` and `BufferViewMut`, which notify the buffer that those ranges are no longer being used when they're dropped. `Buffer.unmap` asserts that the list of mapped ranges is empty, therefore it is safe.

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-06-10 17:46:36 +00:00
Lachlan Sneff 35dd34b4ec Add BufferView and BufferViewMut and fix safety issues with mapped range. 2020-06-09 20:03:28 -04:00
Dzmitry Malyshau 9259d2e51d Update to wgpu with shader validation 2020-06-08 20:54:39 -04:00
Connor Fitzgerald b71c420f7a Implement extensions interface as described in wgpu#691 2020-06-08 01:20:00 -04:00
Rukai f6123e4fe8 Add aribitrary texture size handling to the capture example 2020-06-06 14:56:08 +10:00
Connor Fitzgerald cf9d9d6656 Rustify the example's use of Extensions and SamplerDescriptor 2020-06-02 21:44:07 -04:00
Dzmitry Malyshau 63219a5a85 Use the new map-async 2020-06-02 14:23:34 -04:00
Dzmitry Malyshau ac6f79cb72 Read-only depth-stencil support 2020-06-01 20:25:01 -04:00
Connor Fitzgerald c4819ccf7d Add Extension/Limit interface 2020-06-01 13:08:56 -04:00
AlphaModder 91d46ecc2b Rename SwapChain::get_next_texture to SwapChain::get_next_frame, and have it return errors to the user. 2020-05-30 18:41:31 -07:00
Dzmitry Malyshau 686b4f71a6 Update wgpu and use write_texture 2020-05-26 10:10:32 -04:00
Dzmitry Malyshau 1e722a557e Read WGPU_TRACE environment in the examples 2020-05-15 17:49:16 -04:00