Commit Graph
8323 Commits
Author SHA1 Message Date
bors[bot]andDzmitry Malyshau 85b18562ce Merge #889
889: Fix swapchain preferred format r=kvark a=kvark

**Connections**

**Description**
The old API was wrong because the idea is to query the format *before* creating a swapchain, not after it:)

**Testing**
nah, should just work

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-08-21 16:33:56 +00:00
Dzmitry Malyshau 6f1d6145f5 Fix swapchain preferred format 2020-08-21 12:31:52 -04:00
Pelle Johnsen cf39a88f21 [glsl-new] match wgsl expression order (#147) 2020-08-21 10:13:36 -04:00
Dzmitry Malyshau 82866bac4a [rs] Change buffer binding to not take a slice.
Also switch the shadow example to use dynamic offsets.
Add the relevant feature to our example table.
2020-08-21 09:49:33 -04:00
Lachlan Sneff e9d00d38a4 Make "None" interpolation mean default or nothing, depending on context (#146)
* Make no interpolation mean default or nothing, depending on context

* Re-add Interpolation::Perspective
2020-08-21 00:41:14 -04:00
Lachlan Sneff 6026e57404 [wgsl] Add more complete function calling support (#144)
* Add function calling support to wgsl frontend

* Fix external namespace with multiple namespaces

* changes after code review

* Don't re-tokenize std_namespace every time
2020-08-21 00:13:25 -04:00
Lachlan Sneff 5035362ee6 Better floating point support for wgsl (#142)
* Add custom consume_number function for consuming numbers into tokens to wgsl frontend

* clippy
2020-08-20 01:41:24 -04:00
Lachlan Sneff bd276bf4a4 Add more builtins to wgsl frontend (#143) 2020-08-20 01:39:27 -04:00
Lachlan Sneff 88fb1bb22a [wgsl] Support for composite constant expressions. (#141)
* Add composite constant expression support to wgsl

* remove matching on reference

* Re-fix reference matching
2020-08-19 20:48:09 -04:00
Lachlan Sneff 8c0b1636ea Interpolation support for wgsl, glsl, glsl-new, spirv (front and back), and glsl-out (#140)
* Add interpolation support to naga core and wgsl

* Add glsl-new fragment shader support to examples/convert.rs

* Add interpolation support to glsl_new

* Add interpolation support to spirv frontend

* Add interpolation support to spirv backend

* Add interpolation support to glsl backend

* Add interpolation support to old glsl backend

* Fix interpolation field syntax in glsl backend

* Formatting fix

* thanks clippy

* Add wgsl struct interpolation decoration

* Change wgsl interpolation syntax

* Modify interpolation enum

* Changes responding to review

* Remove interpolation struct member qualifier

* code changes after review
2020-08-19 20:22:21 -04:00
Lachlan Sneff d6b172ddcb Add support for array stride to wgsl frontend (#137)
* Add support for array stride to wgsl frontend

* rename
2020-08-19 14:09:28 -04:00
Pelle Johnsen b0f1f6285a [glsl-new] set global_usgae on functions (#138) 2020-08-19 14:06:24 -04:00
Pelle Johnsen c5a302b769 [glsl-new] Use Empty statement (#139) 2020-08-19 14:05:24 -04:00
bors[bot]andJonathan Woollett-Light d2158d459a [rs] Merge #517
517: Added some explanatory comments to hello-compute example r=kvark a=JonathanWoollett-Light

Simply added some more comments explaing the basic compute example.

Also moved the lines:
```rust
let slice_size = numbers.len() * std::mem::size_of::<u32>();
let size = slice_size as wgpu::BufferAddress;
```
To be just before where they are used.

Co-authored-by: Jonathan Woollett-Light <jonathanwoollettlight@gmai.com>
2020-08-19 18:04:54 +00:00
Jonathan Woollett-Light cfb80cb1c9 [rs] Added some explanatory comments to hello-compute example 2020-08-19 18:16:10 +01:00
bors[bot]andConnor Fitzgerald 1d0e0ce37e Merge #885
885: Improve buffer and texture overrun error messages r=kvark a=cwfitzgerald

**Connections**

Closes #884.

**Description**

The previous errors about buffer and texture overruns didn't tell the user any information about which buffer, how long wgpu thought the copy was, or how long it thought the buffer was. This makes the error message much better.

Unfortunately a braking change, so can't backport :(

**Testing**

Tested on #884's issue.


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-08-19 15:45:49 +00:00
Connor Fitzgerald f9265bccd2 Improve buffer and texture overrun error messages 2020-08-19 11:44:54 -04:00
msiglreith 8ba8159f5b Merge pull request #26 from kvark/borrow
Add present flags
d3d12-v0.3.2
2020-08-19 09:11:46 +02:00
Dzmitry Malyshau 2fc7340731 Add present flags 2020-08-19 00:41:29 -04:00
bors[bot]andJMS55 cef978f8c5 [rs] Merge #516
516: Depend on less of futures r=cwfitzgerald a=JMS55



Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
2020-08-18 23:24:39 +00:00
JMS55 37ad1ff38b [rs] Shrink futures dependencies 2020-08-18 19:23:53 -04:00
bors[bot]andConnor Fitzgerald 945a85f1c0 [rs] Merge #515
515: Add logging information to README r=kvark a=cwfitzgerald



Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-08-18 15:11:41 +00:00
Connor Fitzgerald e8c300fcbd [rs] Add logging information 2020-08-18 11:08:15 -04:00
bors[bot]andDzmitry Malyshau 01a019f84a [rs] Merge #514
514: Release version 0.6 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-08-18 15:04:21 +00:00
bors[bot]andNoah Charlton 961140fb24 Merge #883
883: fix typo in vertex format documentation r=kvark a=DevOrc

**Connections**
None
**Description**
fix typo in vertex format documentation

**Testing**
Ran `cargo doc`


Co-authored-by: Noah Charlton <ncharlton002@gmail.com>
2020-08-18 14:59:05 +00:00
Dzmitry Malyshau 2610544993 [rs] Release version 0.6 2020-08-18 10:31:27 -04:00
Noah Charlton c58ee9c54e fix typo in vertex format documentation 2020-08-18 10:28:42 -04:00
bors[bot]andDzmitry Malyshau 1605044c05 Merge #882
882: Version bump to 0.6 and changelog update r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-08-18 14:10:10 +00:00
Timo de Kort 58dd54f938 [spirv-out] Refactor lookup (#88) 2020-08-17 18:16:31 -04:00
bors[bot]andConnor Fitzgerald c15a642498 [rs] Merge #513
513: Update parking-lot to 0.11 r=trivial a=cwfitzgerald



Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-08-17 22:00:50 +00:00
Connor Fitzgerald 833bca6146 [rs] Update parking-lot to 0.11 2020-08-17 17:59:58 -04:00
bors[bot]andConnor Fitzgerald 429aa6f1fd [rs] Merge #512
512: Convert to using independent subscriber implementation r=kvark a=cwfitzgerald

https://github.com/gfx-rs/wgpu/pull/881 but for wgpu-rs.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-08-17 21:39:45 +00:00
Dzmitry Malyshau 901b043b19 Version bump to 0.6 and changelog update wgpu-types-v0.6.0 wgpu-core-v0.6.0 2020-08-17 16:51:22 -04:00
bors[bot]andConnor Fitzgerald 2a31677872 Merge #881
881: Factor wgpu-subscriber into its own repo r=kvark a=cwfitzgerald

**Connections**

Closes #871 

**Description**

Removes wgpu-subscriber crate into its own repo.

**Testing**

Compile only change.


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-08-17 20:40:21 +00:00
Connor Fitzgerald 350637df40 Factor wgpu-subscriber into its own repo 2020-08-17 16:36:22 -04:00
Connor Fitzgerald 96a032d347 [rs] Convert to using independent subscriber implementation 2020-08-17 16:31:28 -04:00
Lachlan Sneff b03e874646 Make type handling more generic in glsl-new (#134)
* Make type handling more generic in glsl-new

* Remove commented-out code
2020-08-17 15:35:05 -04:00
Lachlan Sneff 4677b74928 Add more scalar and vector types to glsl-new (#133)
* Add more scalar and vector types to glsl-new

* Formatting
2020-08-17 13:35:18 -04:00
bors[bot]andDzmitry Malyshau 1a197c7f67 [rs] Merge #510
510: Update to hal-0.6 r=kvark a=kvark

Tested on macOS and Linux so far (examples)

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-08-17 15:42:33 +00:00
Dzmitry Malyshau 282130a70b [rs] Update to hal-0.6 2020-08-17 11:41:58 -04:00
bors[bot]andDzmitry Malyshau 096c57008f Merge #880
880: Port to gfx-hal-0.6 r=kvark a=kvark

This got a little more involved than I hoped, because of https://github.com/rust-lang/rust/issues/34433 which is unfortunately closed.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-08-17 14:57:03 +00:00
Dzmitry Malyshau d1da6d8106 Switch gfx-hal to 0.6 2020-08-17 10:34:50 -04:00
Pelle Johnsen 34cf97cb91 [glsl-new] disable constant expression (#131) 2020-08-17 09:37:11 -04:00
Dzmitry Malyshau 50cd2b1bc2 Bump version to 0.2, add changelog naga-v0.2.0 2020-08-16 23:49:48 -04:00
bors[bot]andJohn Mitchell f7ec6cc1fe Merge #877
877: Add image cube array feature. r=kvark a=StarArawn

**Connections**
None

**Description**
Enable `IMAGE_CUBE_ARRAY` in vulkan and dx12. Note: Currently this will cause metal to break as the `available_features` from the physical device will never include `IMAGE_CUBE_ARRAY`. Thus I'm opening this as a draft until gfx-hal metal can check and pass the feature on.

**Testing**
<!--
Non-trivial functional changes would need to be tested through:
  - [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples.
  - [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity.

Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications.
See https://github.com/gfx-rs/wgpu/pull/666 for an example.
If you can add a unit/integration test here in `wgpu`, that would be best.
-->
I can test this with my repo using wgpu-rs here which uses cube arrays:
https://github.com/StarArawn/harmony/


Co-authored-by: John Mitchell <toasterthegamer@gmail.com>
2020-08-17 03:29:15 +00:00
bors[bot]andConnor Fitzgerald 28b3a3273f [rs] Merge #509
509: Convert StagingBelt to take a &mut CommandEncoder r=kvark a=cwfitzgerald

This allows `StagingBelt` to be `Send`, very important for async/highly multithreaded applications. Also added a bit more documentation.

Tested on the skybox example.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-08-17 03:11:22 +00:00
Connor Fitzgerald 04ac773bc6 [rs] Convert StagingBelt to take a &mut CommandEncoder 2020-08-16 23:10:14 -04:00
John Mitchell 4cb50e8395 Added image cube array. 2020-08-16 23:10:06 -04:00
bors[bot]andConnor Fitzgerald 3146950cf7 Merge #879
879: Move push constant docs to correct feature r=kvark a=cwfitzgerald

**Connections**

Closes #878 

**Description**

Somehow put a push constant feature in the wrong place.

**Testing**

Docs only.


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-08-17 00:44:13 +00:00
Connor Fitzgerald abb3c2f8db Move push constant docs to correct feature 2020-08-16 19:52:53 -04:00