Commit Graph
823 Commits
Author SHA1 Message Date
Joshua Groves cf7fbe2b4d Update wasm-bindgen and web-sys to latest 2021-03-29 22:24:32 -02:30
bors[bot]andConnor Fitzgerald c5ee9cd983 Merge #815
815: Add missing re-exports r=kvark a=cwfitzgerald

Missed a couple wgt types.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-26 20:21:13 +00:00
Connor Fitzgerald 22d1041a67 Add missing re-exports 2021-03-26 15:51:11 -04:00
bors[bot]andGordon-F a964fed4bd Merge #814
814: Update to latest wgpu, naga, gfx. r=kvark a=Gordon-F

Update to latest wgpu, naga, gfx and enable `EXPERIMENTAL_TRANSLATION` with GL backend for `boids`, `cube` and `hello-compute`.

Co-authored-by: Gordon-F <ishaposhnik@icloud.com>
2021-03-25 23:54:46 +00:00
Gordon-F 53d92fa617 Enable EXPERIMENTAL_TRANSLATION with GL backend for some examples 2021-03-25 22:11:51 +03:00
Gordon-F 81f688de4b Update to latest wgpu, naga, gfx. 2021-03-25 21:46:35 +03:00
bors[bot]andDzmitry Malyshau ed84200a70 Merge #813
813: Fix dropping for command encoders r=grovesNL a=kvark

We weren't dropping them properly, and since the ID is just an obfuscated `Box<RealStuff>` that made the contents leak.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-25 03:29:02 +00:00
Dzmitry Malyshau 72b46e950c Fix dropping for command encoders 2021-03-24 22:34:00 -04:00
bors[bot]andJoshua Groves 67eb3cc4d1 Merge #811
811: Update to latest wgpu-{core,types} r=kvark a=grovesNL



Co-authored-by: Joshua Groves <josh@joshgroves.com>
2021-03-24 02:43:47 +00:00
Joshua Groves 761ce80947 Update to latest wgpu-{core,types} 2021-03-24 00:00:16 -02:30
Pâris DOUADY 2d01c07988 Passthrough cross feature to wgpu-core (#810)
* Passthrough cross feature to wgpu-core

Hopefully it can even be removed when `naga` is more mature. :-)

* remove unconditional cross for wgc
2021-03-23 13:01:01 -04:00
bors[bot]andDan Wilhelm afcb157272 Merge #809
809: Add overflow detection to hello-compute r=kvark a=danwilhelm

Description
The `hello-compute` example sometimes gives incorrect results if an intermediate Collatz value overflows. 

Proposed Solution
We can detect overflows before they occur, since the `3n+1` step is the only possible overflow. (WGSL only supports u32.)

Example
`cargo run --example hello-compute 77031 837799 8400511 63728127` 
> Incorrect Current Output: `[350, 524, 312, 346]`
> Correct Output: `[350, 524, 685, 949]`
> Proposed Solution: `[350, 524, OVERFLOW, OVERFLOW]`

Notes
- The `hello-compute` example appears to be [borrowed from naga](https://github.com/gfx-rs/naga/blob/master/tests/in/collatz.wgsl), so this would cause the implementations to differ.
- Hexadecimal literals are not yet implemented in naga for WGSL shaders, so the shader literals are not as pretty as they could be.
- Revised terminology `times` -> `steps` to be consistent with [Wikipedia](https://en.wikipedia.org/wiki/Collatz_conjecture).


Co-authored-by: Dan Wilhelm <dan@danwilhelm.com>
2021-03-23 14:32:47 +00:00
Dan Wilhelm e836c73a7c Add overflow detection to hello-compute 2021-03-23 01:49:39 -07:00
bors[bot]andJoshua Groves 1aeb1e5c47 Merge #785
785: Update to latest web-sys bindings r=kvark a=grovesNL

We can wait for https://github.com/rustwasm/wasm-bindgen/pull/2482 first

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2021-03-23 02:56:58 +00:00
Joshua Groves c532a5439d Update to latest web-sys bindings 2021-03-23 00:22:30 -02:30
bors[bot]andHiroaki Yutani 4d5072bdfa Merge #806
806: Remove "how to compile the shaders" section on README r=kvark a=yutannihilation

I believe all the examples now use WGSL, so this section is no longer needed.

Co-authored-by: Hiroaki Yutani <yutani.ini@gmail.com>
2021-03-21 02:29:25 +00:00
Hiroaki Yutani 11b5464205 Remove "how to compile the shaders" section on README
I believe all the examples now use WGSL, so this section is no longer needed.
2021-03-20 23:58:30 +09:00
bors[bot]andDzmitry Malyshau 645dc9040b Merge #805
805: Update naga to gfx-17 r=kvark a=kvark

Gets Naga validation, MSL fixes, GLSL varying fixes, and better pipeline creation errors.

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-03-19 20:37:42 +00:00
Dzmitry Malyshau 77240da9e2 Update naga to gfx-17 2021-03-19 16:36:30 -04:00
bors[bot]andDzmitry Malyshau aabcc44744 Merge #792
792: Use implicit layout for hello-compute r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-19 14:34:13 +00:00
bors[bot]andDzmitry Malyshau f7db718542 Merge #803
803: Shader fixes with binary expressions r=kvark a=kvark

Goes along with https://github.com/gfx-rs/naga/pull/599

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-03-19 05:36:54 +00:00
Dzmitry Malyshau 5aaca1cefe Shader fixes with binary expressions 2021-03-19 01:34:19 -04:00
bors[bot]andDzmitry Malyshau 0f1b290af9 Merge #800
800: Schedule event waits after redraw events are cleared r=kvark a=kvark

As @adamnemecek pointed out, our examples were busy waiting.
I investigated a bit and figured that our `WaitScheduled` was always interrupted by `RedrawEventsCleared`. So scheduling the wait in it works. Tested on Linux and macOS. CPU time of the cube example drops from 100% to single-digit.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-18 03:00:21 +00:00
Dzmitry Malyshau eeb6a698ae Schedule event waits after redraw events are cleared 2021-03-17 22:58:35 -04:00
bors[bot]andAron Granberg 5c249c4375 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 f78ccfe09e Fix all the clippy lints and add clippy/fmt CI 2021-03-17 14:40:25 +01:00
bors[bot]andDzmitry Malyshau 66b900bf8d Merge #799
799: Update naga to gfx-16 r=kvark a=kvark

Makes WGSL constants much more ergonomic to write, and fixes the issues we had with the water example.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-17 13:37:45 +00:00
Dzmitry Malyshau d16c7a1e5a Update naga to gfx-16 2021-03-17 09:35:54 -04:00
bors[bot]andConnor Fitzgerald a7e03546c1 Merge #797
797: Move from `tracing` to `log` + `profiling` r=kvark a=cwfitzgerald

Continuation of https://github.com/gfx-rs/wgpu/pull/1268 into wgpu-rs

This also includes the naga gfx-15 train.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-17 13:17:03 +00:00
Aron Granberg 50fdd1e599 Fix excessive buffer padding (#795)
* Fix excessive buffer padding

* Prettify

* cargo fmt

* Simplify code

* Style
2021-03-17 09:09:58 -04:00
Connor Fitzgerald 0b010163cc Move from tracing to log + profiling 2021-03-17 01:34:38 -04:00
Wumpf ea14d4067d Added example for conservative rasterization (#791)
* Example for conservative rasterization

* Update to wgpu-core/types 717c2d73e7

* conservative-raster example: fix wglsl const & readme

* conservative raster example: optional lines, no more interaction
2021-03-15 22:33:44 -04:00
Dzmitry Malyshau 33f1ac360e Use implicit layout for hello-compute 2021-03-15 11:21:42 -04:00
bors[bot]andDzmitry Malyshau 96ca1e41dd Merge #790
790: Update to naga-14 r=kvark a=kvark

Depends on https://github.com/gfx-rs/wgpu/pull/1262
Makes our shaders nicer, and the uniformity analysis less cranky :)

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-14 05:51:10 +00:00
Dzmitry Malyshau 0cccf9ccee Update to naga-14 2021-03-14 00:50:35 -05:00
bors[bot]andDzmitry Malyshau b3efd07b20 Merge #786
786: Update to naga-13 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 05:41:35 +00:00
Dzmitry Malyshau ebd1f8d32e Update to naga-13 2021-03-10 00:41:04 -05:00
bors[bot]andConnor Fitzgerald cadc2df8a1 Merge #781
781: Mark BufferMappedRange Send/Sync on native r=kvark a=cwfitzgerald

This fixes an issue reported on the matrix where this was causing things to unnecessarily be !Send. There's no reason I can see that this couldn't be Send/Sync as we only use it like one would a slice. We might also consider backporting this to 0.7.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-04 05:11:32 +00:00
Connor Fitzgerald bfeab73eeb Mark BufferMappedRange Send/Sync on native 2021-03-04 00:04:51 -05:00
bors[bot]andOleg Andreev ae7b47784b Merge #778
778: Return None from get_swap_chain_preferred_format if the adapter does not support the surface r=kvark a=OlegOAndreev

Fixes #777 

Almost every other method in wgpu panics on failure, so I decided to make the return value an `Option<TextureFormat>`, not a `Result<Option<TextureFormat>>`

Co-authored-by: Oleg Andreev <ooandreev@yandex-team.ru>
2021-03-02 04:36:08 +00:00
bors[bot]andDzmitry Malyshau 70d7850795 Merge #779
779: Update wgpu depth_or_array_layers r=kvark a=kvark

Based on https://github.com/gfx-rs/wgpu/pull/1241

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-02 04:26:42 +00:00
Dzmitry Malyshau d4ec1157f0 Update wgpu depth_or_array_layers 2021-03-01 23:26:08 -05:00
Oleg Andreev c9a7fe75d4 Return None from get_swap_chain_preferred_format if the adapter does not support the surface. 2021-03-01 18:15:01 +03:00
bors[bot]andDzmitry Malyshau fd4a992533 Merge #776
776: Update wgpu with the new vertex format r=kvark a=kvark

Based on https://github.com/gfx-rs/wgpu/pull/1235

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-28 03:57:40 +00:00
Dzmitry Malyshau 6d39d8f739 Update wgpu with the new vertex format 2021-02-27 22:56:47 -05:00
bors[bot]andAndreas Reich 1509128f6d Merge #773
773: Panic on empty buffer slices r=kvark a=Wumpf

Fixes #735 
Can't really pass through zero sizes, so panic it is.

I'm really just here to update to latest wgpu version to get my recent fix there in a more convenient manner, but doing a PR with just that felt a bit boring ;-). Now I'm of course guilty of conflating things 🤔 

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-02-25 15:59:36 +00:00
Andreas Reich b4859d3ecf panic on empty buffer slice
Fixes #735
2021-02-25 09:59:17 +01:00
bors[bot]andPatrick LaFontaine 3ec521c866 Merge #772
772: spelling error in skybox r=kvark a=Pat-Lafon



Co-authored-by: Patrick LaFontaine <32135464+Pat-Lafon@users.noreply.github.com>
2021-02-25 02:30:55 +00:00
Andreas Reich 1ebd9e2778 Upgrade to latest wgpu 2021-02-25 00:24:49 +01:00
Patrick LaFontaine 3bb7c94b9e spelling error in skybox 2021-02-24 17:29:13 -05:00