Commit Graph
843 Commits
Author SHA1 Message Date
Dzmitry Malyshau e15d8eaa3c Update wgpu-core with SPIRV coordinate fix 2021-04-04 19:08:03 -04:00
bors[bot]andDzmitry Malyshau 14f7d7bcab Merge #839
839: Update naga to gfx-20 r=kvark a=kvark

See https://github.com/gfx-rs/wgpu/pull/1304

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-04 15:36:50 +00:00
Dzmitry Malyshau 2ea206d401 Update naga to gfx-20 2021-04-04 11:36:13 -04:00
bors[bot]andadamnemecek 82b7068498 Merge #835
835: frame capture r=kvark a=adamnemecek



Co-authored-by: adamnemecek <adamnemecek@gmail.com>
2021-04-01 20:28:21 +00:00
adamnemecek 312b3b6208 frame capture 2021-04-01 13:25:59 -07:00
bors[bot]andConnor Fitzgerald 7daf7bc7d2 Merge #829
829: Add Downlevel Infrastructure r=kvark a=cwfitzgerald

wgpu-rs frontend for https://github.com/gfx-rs/wgpu/pull/1297.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-04-01 15:59:54 +00:00
Connor Fitzgerald d2eecc807d Add downlevel infrastructure 2021-04-01 11:53:16 -04:00
bors[bot]andDzmitry Malyshau e835f2972d Merge #826
826: Disable SPIRV-Cross by default r=cwfitzgerald a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-31 12:23:28 +00:00
Dzmitry Malyshau 52cc52ad8e Disable SPIRV-Cross by default 2021-03-31 08:22:42 -04:00
bors[bot]andDy11on e6141bec95 Merge #827
827: Fixed water example file section in the README.md r=cwfitzgerald a=Dy11on

Fixed the file section in the README.md for the water example, since it now uses wgsl

Co-authored-by: Dy11on <26803229+Dy11on@users.noreply.github.com>
2021-03-31 03:32:05 +00:00
Dy11on 088eda606a Fixed water example file section in the README.md 2021-03-30 22:09:25 -04:00
bors[bot]andDzmitry Malyshau d44fc6ff85 Merge #763
763: Port the water example shaders to WGSL r=cwfitzgerald a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-31 01:39:05 +00:00
Dzmitry Malyshau 25d692227c Update to gfx-19, port the water example shaders to WGSL 2021-03-30 21:36:49 -04:00
bors[bot]andLuis Wirth 09d6be1590 Merge #824
824: make all labels use `wgpu::Label` r=kvark a=LU15W1R7H

This PR does a very minor change.

It replaces all occurences of `label: Option<'a str>` with `label: crate::Label`,
making the usage consistent all across the API.

This doesn't bring any benefit other than consistency.

I hope to have catched every occurance.


Co-authored-by: Luis Wirth <lwirth2000@gmail.com>
2021-03-30 18:48:24 +00:00
Luis Wirth f01b7f108f make all labels use wgpu::Label
replace all occurences of `label: Option<'a str>` with `label: crate::Label`
2021-03-30 18:16:08 +02:00
bors[bot]andDan Wilhelm 55d3aef00d Merge #823
823: Fix crash-on-resize in skybox example r=kvark a=danwilhelm

Problem: Skybox example currently crashes on resize. 
- Solution: Now, recreates depth texture on resize event.
---
Problem: Shadow example currently duplicates texture creation code on resize. 
- Solution: Now, shadow is refactored identically to skybox & water examples -- minimizes code duplication, makes examples more similar.

Co-authored-by: Dan Wilhelm <dan@danwilhelm.com>
2021-03-30 03:55:48 +00:00
Dan Wilhelm 59e3fb1c05 Refactor texture creation for shadow 2021-03-29 20:10:20 -07:00
841a610a6b Merge #819 #822
819: Boost texels alpha channel in cube example. r=kvark a=VincentFTS

Permits to have a good rendering for WebGL.

822: Update wasm-bindgen and web-sys to latest r=kvark a=grovesNL

#821 for `master`

On `master` it should be ok to update wasm-bindgen and web-sys, so we don't need to fix syn's version

Co-authored-by: VincentFTS <platforms@ftsoftware.fr>
Co-authored-by: Joshua Groves <josh@joshgroves.com>
2021-03-30 02:25:17 +00:00
Dan Wilhelm 3efbff48a3 Recreate texture on resize for skybox 2021-03-29 19:24:00 -07:00
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
VincentFTS f465de93f8 Boost texels alpha channel in cube example.
Permits to have a good rendering for WebGL.
2021-03-26 18:43:45 +01: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