Commit Graph
8897 Commits
Author SHA1 Message Date
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
Pelle Johnsen 7902bd54a8 [glsl-new] Fix expression ordering for compose (#130) 2020-08-16 09:38:07 -04:00
Lachlan Sneff fccefaccde Add support for initialization of local variables to glsl backend (#129)
* Add support for initialization of local variables to glsl backend

* Cleanup
2020-08-15 01:46:10 -04:00
bors[bot]andDzmitry Malyshau ca5ae98ad5 [rs] Merge #505
505: Update wgpu to 7e8b51b428 r=kvark a=kvark

Includes https://github.com/gfx-rs/wgpu/pull/876

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-08-13 21:42:27 +00:00
Dzmitry Malyshau 84cab2ef2f [rs] Update wgpu to 7e8b51b428 2020-08-13 17:41:05 -04:00
bors[bot]andDzmitry Malyshau 7e8b51b428 Merge #876
876: Fix support for d24unorm format r=kvark a=kvark

**Connections**
fixes https://github.com/kvark/vange-rs/pull/121 on some platforms

**Description**
We used to associate `D24Plus` with internal `D24S8`. This results in assuming that it has both DEPTH + STENCIL. Creating a binding from it then fails with the `All` aspect, since you can't view both. This is unexpected, since the user creates `D24Plus` with just a single aspect.

**Testing**
None needed

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-08-13 21:29:44 +00:00
Dzmitry Malyshau 44fdfb80d0 Fix support for d24unorm format 2020-08-13 17:26:44 -04:00
Pelle Johnsen 7f780e8efc [glsl-new] put validation errors behind featureUsing glsl-validate feature (#127) 2020-08-13 16:27:12 -04:00
Pelle Johnsen b4e1775b9e [glsl-new] Handle local vars scopes (#126)
* [glsl-new] Handle local vars scopes

* [glsl-new] scope fixes

- Check loacl vars before globals

- Rename add_scope > push_scope

- Remove unnecessary ref in lookup functions
2020-08-13 15:36:51 -04:00
bors[bot]andDzmitry Malyshau 49100c3fa5 [rs] Merge #504
504: Update wgpu with pipeline labels r=trivial a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-08-13 17:05:00 +00:00
Dzmitry Malyshau 45de9a5462 [rs] Update wgpu with pipeline labels 2020-08-13 13:04:23 -04:00
Lachlan Sneff 466cd1b728 Serialize and Deserialize Module (#125)
* Add serialize and deserialize features with examples

* Fix formatting

* Make some types (de)serialize transparently

* Fix more formatting

* Remove new examples and add (de)serialization support to the convert example

* Remove extraneous file

* Rename param file
2020-08-13 12:27:10 -04:00
bors[bot]andDzmitry Malyshau 92aaa2bba6 Merge #875
875: Add labels to pipelines r=trivial a=kvark

This isn't functional until gfx-hal-0.6 is published, but the API is there.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-08-13 16:16:17 +00:00
Dzmitry Malyshau d8341c5996 Add labels to pipelines 2020-08-13 12:14:24 -04:00
bors[bot]andDzmitry Malyshau 26ce126582 [rs] Merge #503
503: Update for the wgpu grand refactor r=kvark a=kvark

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

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-08-13 04:27:09 +00:00
Dzmitry Malyshau 5c5483a25e [rs] Update for the wgpu grand refactor 2020-08-13 00:26:40 -04:00
bors[bot]andDzmitry Malyshau 6e3e88dd10 Merge #873
873: Grand cleanup and refactor of the descriptors in the API r=cwfitzgerald,grovesNL a=kvark

**Connections**
Cleanup follows https://github.com/gfx-rs/wgpu-rs/pull/501
Fixes #871 
Fixes #848

**Description**
There is a lot of small and big things crumbled in here.

The major one is where descriptors live, and how they are parametrized. Logic is the following:
  - if something is useful by wgpu-rs's API leave it in `wgpu-types`
  - if *in addition* it's useful to `wgpu-native`(i.e. has `repr(C)`),  we possibly parametrize it (currently, only label is).
  - otherwise, the type is moved to `wgpu-core` and stripped of generics
  - remove all the builders

Some medium-sized things:
  - moves the subscriber out (#871)
  - moves the `RenderCommand` into the `draw` module (which is meant to contain shared things)
  - makes `TextureViewDescriptor` fields optional, but receives it directly now (#848)
  - moves stencil stuff out into `StencilStateDescriptor`, so that we can derive `Default` for it
  - stop accepting raw strings for labels in the `Device` API: neither the clients, or gfx-rs need that shape, and it can't be safe

Some smaller things:
  - using NonZeroU8 for anisotropy
  - using NonZeroU32 for descriptor count
  - putting sampler addressing modes into an array
  - add labels to command buffers and pipeline layouts
  - improves errors for exceeding binding limits

**Testing**
Tested on https://github.com/gfx-rs/wgpu-rs/pull/503


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-08-13 03:19:44 +00:00
Dzmitry Malyshau 2473c25971 Refactor the stencil state descriptor a bit 2020-08-12 20:04:47 -04:00
Dzmitry Malyshau d07d8503a0 Move the subscriber into a different crate 2020-08-12 15:00:15 -04:00
Dzmitry Malyshau a0711cf9b2 Move the RenderCommand into the shared draw module 2020-08-12 14:33:42 -04:00
Dzmitry Malyshau 9d8dc0b04d Grand cleanup and refactor of the descriptors in the API 2020-08-12 14:13:32 -04:00
bors[bot]andMarvin Löbel ecb91664e6 [rs] Merge #501
501: Fighting back the bovine forces r=kvark a=Kimundi

<img src="https://dcassetcdn.com/w1k/submissions/399000/399327_d0ba.jpg" width="300">
"Good work boys, we'll get 'em next time!"

Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-08-12 14:31:00 +00:00
Marvin Löbel 40ded76554 [rs] Udderly remove cows from the following APIs:
- BufferDescriptor
- CommandEncoderDescriptor
- RenderBundleDescriptor
- TextureDescriptor
- TextureViewDescriptor
- PipelineLayoutDescriptor
- SamplerDescriptor
- BindGroupDescriptor
- ProgrammableStageDescriptor
- RenderPassDescriptor
- RenderPipelineDescriptor
- BindGroupLayoutDescriptor
- VertexStateDescriptor
- VertexBufferDescriptor
- RenderBundleEncoderDescriptor
- ComputePipelineDescriptor

Also change anisotropy_clamp to use NonZeroU8
2020-08-12 10:21:38 +02:00
João Capucho a16204456e WIP: glsl 450 backend and common glsl module (#123)
* Initial backend implementation

* Refractored glsl450 backend to have a common module between further glsl backends
Implemented more missing functionality

* Error handling

* Implemented most of the suggestions

* Addresed all comments
Fixed some bugs

* Made code style consistent
2020-08-11 16:20:23 -04:00
bors[bot]andDzmitry Malyshau 5805a4b3e2 [rs] Merge #502
502: Expose get_bind_group_layout r=grovesNL a=kvark

Returning a new object is fine for BGLs specifically and for these cases in particular because we made sure the refcount is bumped (and BGL has a special kind of refcount) in https://github.com/gfx-rs/wgpu/commit/f164fd1f46390d6a51acc1c1082cc8e0c23dbb8c

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-08-11 12:39:23 +00:00
Dzmitry Malyshau 30f93e6f8d [rs] Expose get_bind_group_layout 2020-08-11 00:36:32 -04:00
bors[bot]andDzmitry Malyshau 041c5dea77 [rs] Merge #500
500: Update wgpu for optional layouts r=3rdtimeisthecharm a=kvark

Fixes #498
Includes https://github.com/gfx-rs/wgpu/pull/872 and https://github.com/gfx-rs/wgpu/pull/870

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-08-10 21:54:18 +00:00