Commit Graph
8897 Commits
Author SHA1 Message Date
Dzmitry Malyshau 26657374f8 Update vertex layout naming 2020-03-14 12:44:04 -04:00
Dzmitry Malyshau 76eb307d35 Local variables, [wgsl] statement context 2020-03-14 09:36:26 -04:00
Dzmitry Malyshau 607b77899b [wgsl] add Lexer::skip() helper 2020-03-14 09:36:26 -04:00
Dzmitry Malyshau d6a4e05e05 [wgsl] add parse_block, use for if statements 2020-03-14 09:36:26 -04:00
Dzmitry Malyshau 095f320470 Wholesome spec update.
Biggest change is that buffer binding is done one by one. There is a number of renamings of the fields, also the binding types are expanded.
2020-03-13 23:59:05 -04:00
Dzmitry Malyshau 16f018046a [wgsl] make lexer Error-aware 2020-03-13 17:11:55 -04:00
Dzmitry Malyshau cb72a92bce [wgsl] improved decoration parsing 2020-03-12 14:13:42 -04:00
Dzmitry Malyshau ee325a6a67 Add imported function calls 2020-03-12 14:13:42 -04:00
Dzmitry Malyshau 0f8e3e4b9b Singular, intrinsic, and derivative expressions 2020-03-12 13:09:19 -04:00
Dzmitry Malyshau 5e78c71a44 Rename Token/Id to Handle and Storage to Arena consistently 2020-03-11 16:28:13 -04:00
Dzmitry Malyshau 7e0b004c16 [wgsl] refactor Token 2020-03-11 13:36:14 -04:00
Dzmitry Malyshau ee8e0699be [wgsl] remove Pest grammar 2020-03-11 13:36:14 -04:00
Dzmitry Malyshau 93d60ce8bf [wgsl] hand-written function parsing 2020-03-11 13:36:14 -04:00
Dzmitry Malyshau e6fe97f410 [wgsl] rewrite with our own parser 2020-03-11 13:36:14 -04:00
bors[bot]andJoshua Groves a74de20ac6 Merge #514
514: Move some types into shared wgpu-types crate r=kvark a=grovesNL

As we discussed a while ago, we need to be able to share some types between wgpu-core/wgpu-native/wgpu-remote/wgpu-rs.

The problem is that we want to avoid a dependency on wgpu-core and wgpu-native when building [wgpu-rs for the wasm32-unknown-unknown target](https://github.com/gfx-rs/wgpu-rs/issues/101). We can avoid this by moving all shared types into a separate crate which is exposed on all targets.

Let me know if we should use some other approach or organize the types somehow. This isn't complete yet, but it might be easier to integrate this over several PRs instead of diverging my branch too far.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-11 03:07:17 +00:00
Joshua Groves 24caf76765 Rename serde feature 2020-03-10 23:19:45 -02:30
Joshua Groves 9940aef599 Move some types into shared wgpu-types crate 2020-03-10 22:36:23 -02:30
bors[bot]andAaron Loucks 16855f6a7c [rs] Merge #192
192: Explicitly declare vertex attribute descriptors in cube example r=kvark a=aloucks

The new `vertex_attr_array!` macro is pretty wonderful, but it's nice to have at least one reference example of how `VertexAttributeDescriptor`s are constructed. 

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-03-08 23:37:25 +00:00
Aaron Loucks 738653d1fe [rs] Explicitly declare vertex attribute descriptors in cube example 2020-03-07 23:37:32 -05:00
Dzmitry Malyshau a332377222 [rs] Add grr-2d 2020-03-06 11:38:54 -05:00
bors[bot]andAaron Loucks 79e9ab748d Merge #512
512: Add PresentMode::Mailbox r=kvark a=aloucks

@kvark 

Would you be open to renaming the presents modes to match the vulkan/gfx-hal nomenclature? Considering these aren't part of the webgpu spec, I think it would make more sense to keep things consistent.

I can update this PR if you're good with it.

```rust
pub enum PresentMode {
    /// The presentation engine does **not** wait for a vertical blanking period and 
    /// the request is presented immediately. This is a low-latency presentation mode,
    /// but visible tearing may be observed. Will fallback to `Fifo` if unavailable on the
    /// selected  platform and backend. Not optimal for mobile. 
    Immediate = 0,
    /// The presentation engine waits for the next vertical blanking period to update
    /// the current image, but frames may be submitted without delay. This is a low-latency 
    /// presentation mode and visible tearing will **not** be observed. Will fallback to `Fifo`
    /// if unavailable on the selected platform and backend. Not optimal for mobile.
    Mailbox = 1,
    /// The presentation engine waits for the next vertical blanking period to update 
    /// the current image. The framerate will be capped at the display refresh rate, 
    /// corresponding to the `VSync`. Tearing cannot be observed. Optimal for mobile.
    Fifo = 2,
}
```

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-03-06 15:04:41 +00:00
Aaron Loucks fe95fddf5a Use vulkan nomenclature for PresentMode variants
https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPresentModeKHR.html
2020-03-06 00:48:45 -05:00
Dzmitry Malyshau ae045edcb6 [rs] Add nannou to the friends list 2020-03-05 23:45:24 -05:00
msiglreith 3066c3b558 Fix newline handling (#11)
Support also non-LF variants
2020-03-05 22:52:24 -05:00
Dzmitry Malyshau ee7882723a [wgsl] expect logical expressions, fix hex literals 2020-03-05 21:21:14 -05:00
Aaron Loucks 051d08424c Add PresentMode::Mailbox 2020-03-05 18:19:18 -05:00
Dzmitry Malyshau 330ce644d8 [wgsl] parse most binary expressions 2020-03-05 13:14:06 -05:00
Joshua Groves 279af921bc [wgsl] richer expression grammar 2020-03-05 11:22:50 -05:00
Dzmitry Malyshau 3bf1760d5b [ir] add SAMPLED image flag 2020-03-05 11:21:36 -05:00
bors[bot]andAaron Loucks 2388007d1a [rs] Merge #189
189: Reexport Backend and DeviceType from wgpu-core r=kvark a=aloucks

These types are exposed on the `AdaptorInfo` struct.

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-03-05 15:02:13 +00:00
Aaron Loucks b2e70cc3d3 [rs] Reexport Backend and DeviceType from wgpu-core
These types are exposed on the `AdaptorInfo` struct.
2020-03-04 22:22:26 -05:00
bors[bot]andDzmitry Malyshau 584c9d7554 Merge #509
509: Bug 1614703 - WebGPU render pipeline creation r=jgilbert,webidl,baku r=gecko a=kvark

Differential Revision: https://phabricator.services.mozilla.com/D64833

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/e01862df6ba32a18826fe6c2e38e4a57dad3e338

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-03-04 04:04:49 +00:00
Dzmitry Malyshau cfe000ce23 Bug 1614703 - WebGPU render pipeline creation r=jgilbert,webidl,baku
Differential Revision: https://phabricator.services.mozilla.com/D64833

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/e01862df6ba32a18826fe6c2e38e4a57dad3e338
2020-03-03 23:00:43 -05:00
Dzmitry Malyshau 13a4c41121 Include test WGSL shaders 2020-03-03 22:57:20 -05:00
Dzmitry Malyshau d4fb81a005 [wgsl] basic typed constructors 2020-03-03 22:56:11 -05:00
Dzmitry Malyshau b9ba223b6e [wgsl] basic parsing of entry points and global constants 2020-03-03 22:33:53 -05:00
Dzmitry Malyshau 78d5a73a2f [msl] support returning values 2020-03-03 16:25:56 -05:00
Dzmitry Malyshau ee987325a5 [wgsl] basic parsing of function body 2020-03-03 16:08:20 -05:00
Dzmitry Malyshau a9c476d58d Move out Void from the type enum 2020-03-03 14:09:41 -05:00
Dzmitry Malyshau 4a9f838208 [wgsl] first bits of function parsing 2020-03-03 13:52:47 -05:00
bors[bot]andJoshua Groves 40889df58f Merge #507
507: Update logo and move bindings section r=kvark a=grovesNL

- Adjust the logo slightly
- Move the bindings section up slightly to hopefully reduce confusion for users coming to gfx-rs/wgpu looking for the Rust bindings (gfx-rs/wgpu-rs)
  - Also added some experimental Julia bindings
  - Open to other ideas how we can improve the repository naming confusion, though long term I think we may want to adjust the naming somehow (like we talked about before the sync was setup)

[Rendered](https://github.com/grovesNL/wgpu-native/blob/8b19724364555c1855eda5349675d925ef0891f5/README.md)

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-03 17:37:32 +00:00
bors[bot]andJoshua Groves 3cfb78d372 [rs] Merge #185
185: Update readme r=kvark a=grovesNL

Add logo and update readme text a bit (link to WASM progress, reword examples section slightly, etc.)

[Rendered](https://github.com/grovesNL/wgpu-rs/blob/ea4bf79ff71f2089beace873a629072ebe233608/README.md)

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-03 17:36:51 +00:00
Dzmitry Malyshau c2265ca4c8 [wgsl] structure declarations, better array types 2020-03-03 11:14:15 -05:00
Joshua Groves 39072c80d4 [rs] Update readme 2020-03-03 00:34:24 -03:30
Joshua Groves 8b19724364 Update logo and move bindings section 2020-03-03 00:10:04 -03:30
Dzmitry Malyshau aba9e8a0f2 Fixup metal type exports 2020-03-02 16:56:15 -05:00
Dzmitry Malyshau 2f0540c6ab Flat type structure (#10) 2020-03-02 16:37:56 -05:00
bors[bot]andBrian Frazho e09b8d58a7 [rs] Merge #184
184: added test to hello-compute example r=kvark a=emmetthebarnraiser

I wasn't exactly sure of the proper way to test async stuff, but this is a strategy that seemed to work for me. Let me know if there is anything you would like me to change, or if this isn't something that you would like to add to the examples!

Co-authored-by: Brian Frazho <befrazho@gmail.com>
2020-03-01 02:43:59 +00:00
Brian Frazho 18b2ae1935 [rs] added test to hello-compute example 2020-02-28 20:50:28 -05:00
Dzmitry Malyshau 246ca018ef [tint] beginning of the front-end based on Pest (#9) 2020-02-28 13:05:24 -05:00