Commit Graph

852 Commits

Author SHA1 Message Date
Dzmitry Malyshau
9bd4b34d5a [rs] Update naga to gfx-21 2021-04-11 01:25:42 -04:00
bors[bot]
b47b77798b [rs] Merge #847
847: Don't pin web-sys and wasm-bindgen versions r=grovesNL a=RichoDemus

Pinning them forces all downstream dependencies to use exactly this version

The latest release of wgpu has pinned an old version of wasm-bindgen, forcing users to downgrade wasm-bindgen-cli in order to build

Co-authored-by: Richard Tjerngren <git@richodemus.com>
Co-authored-by: RichoDemus <git@richodemus.com>
2021-04-09 02:22:20 +00:00
RichoDemus
46d4492b54 [rs] Use latest version of wasm-bindgen-cli 2021-04-07 18:21:26 +02:00
Richard Tjerngren
244460ed87 [rs] Don't pin web-sys and wasm-bindgen versions
Pinning them forces all downstream dependencies to use exactly this version

The latest release of wgpu has pinned an old version of wasm-bindgen, forcing users to downgrade wasm-bindgen-cli in order to build
2021-04-07 16:06:03 +02:00
bors[bot]
a8fc4a3d84 [rs] Merge #845
845: Update wgpu with depth clamping API changes r=kvark a=kvark

Picks up https://github.com/gfx-rs/wgpu/pull/1309

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-06 13:40:10 +00:00
Dzmitry Malyshau
756ea0e51f [rs] Update wgpu with depth clamping API changes 2021-04-05 23:27:53 -04:00
bors[bot]
2448307a25 [rs] Merge #844
844: Update wgpu to the cross feature fix r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-05 05:13:48 +00:00
Dzmitry Malyshau
4c6bce87d8 [rs] Update wgpu to the cross feature fix 2021-04-05 01:13:13 -04:00
bors[bot]
a474992b72 [rs] Merge #843
843: Update wgpu-core with SPIRV coordinate fix r=kvark a=kvark

See https://github.com/gfx-rs/wgpu/pull/1305
Fixes #842

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-04 23:08:31 +00:00
Dzmitry Malyshau
88524d2ff8 [rs] Update wgpu-core with SPIRV coordinate fix 2021-04-04 19:08:03 -04:00
bors[bot]
bb9f3ad990 [rs] 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
b1bbaf38a2 [rs] Update naga to gfx-20 2021-04-04 11:36:13 -04:00
bors[bot]
c45c56934f [rs] 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
99eccdff3d [rs] frame capture 2021-04-01 13:25:59 -07:00
bors[bot]
3b8da5d6c2 [rs] 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
4161cbb893 [rs] Add downlevel infrastructure 2021-04-01 11:53:16 -04:00
bors[bot]
f997e8f9d3 [rs] 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
84026d75ee [rs] Disable SPIRV-Cross by default 2021-03-31 08:22:42 -04:00
bors[bot]
4b7211a116 [rs] 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
79722cc395 [rs] Fixed water example file section in the README.md 2021-03-30 22:09:25 -04:00
bors[bot]
110efb8fe8 [rs] 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
49a741a0c6 [rs] Update to gfx-19, port the water example shaders to WGSL 2021-03-30 21:36:49 -04:00
bors[bot]
8d30098db8 [rs] 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
632f828eda [rs] 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]
b0bf790a17 [rs] 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
144bffb1a3 [rs] Refactor texture creation for shadow 2021-03-29 20:10:20 -07:00
bors[bot]
10dbb8746e [rs] 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
96d9a87817 [rs] Recreate texture on resize for skybox 2021-03-29 19:24:00 -07:00
Joshua Groves
aa3792a68f [rs] Update wasm-bindgen and web-sys to latest 2021-03-29 22:24:32 -02:30
bors[bot]
ae880cbb93 [rs] 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
2fd1047045 [rs] Add missing re-exports 2021-03-26 15:51:11 -04:00
VincentFTS
d81061eca8 [rs] 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]
e07a7cb539 [rs] 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
6485e81f4b [rs] Enable EXPERIMENTAL_TRANSLATION with GL backend for some examples 2021-03-25 22:11:51 +03:00
Gordon-F
6d62cc5bc3 [rs] Update to latest wgpu, naga, gfx. 2021-03-25 21:46:35 +03:00
bors[bot]
d8cbb8615a [rs] 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
17e95abfe0 [rs] Fix dropping for command encoders 2021-03-24 22:34:00 -04:00
bors[bot]
95aa26dc60 [rs] 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
e65ef710a5 [rs] Update to latest wgpu-{core,types} 2021-03-24 00:00:16 -02:30
Pâris DOUADY
39e1835f72 [rs] 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]
56465df92b [rs] 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
985c1feb4e [rs] Add overflow detection to hello-compute 2021-03-23 01:49:39 -07:00
bors[bot]
d18cc67131 [rs] 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
76f260c7c6 [rs] Update to latest web-sys bindings 2021-03-23 00:22:30 -02:30
bors[bot]
f11765de4d [rs] 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
20a903726a [rs] 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]
3add458e99 [rs] 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
332de311e0 [rs] Update naga to gfx-17 2021-03-19 16:36:30 -04:00
bors[bot]
a2d8e10c7d [rs] 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]
b3bc3d02e0 [rs] 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