Commit Graph

139 Commits

Author SHA1 Message Date
bors[bot]
ab787e2b2c Merge #130
130: Export BIND_BUFFER_ALIGNMENT r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-11-22 20:50:54 +00:00
Dzmitry Malyshau
ae7cdfc094 Export BIND_BUFFER_ALIGNMENT 2019-11-22 15:50:01 -05:00
bors[bot]
d970183d66 Merge #120
120: prototype of futures for buffer mapping r=grovesNL a=swiftcoder

This is largely in request-for-comment state right now, although it does work.

As written the `GpuFuture` implementation only works with types that are `Copy`, which rules out using a destructor to unmap the buffer. I'm assume it's possible to write a future type that can produce a non-Copy result, but I haven't sufficiently internalised how `Pin` works to see how.

Co-authored-by: Tristam MacDonald <swiftcoder@gmail.com>
2019-11-22 12:38:33 +00:00
Tristam MacDonald
cc32408fa2 prototype of async/await for buffer mapping 2019-11-21 21:42:22 -08:00
bors[bot]
e82ac7a7f9 Merge #127
127: Use u8 for buffer mapping r=kvark a=Coder-256

cc @kvark @grovesNL

This is a temporary solution for #119, and a follow-up for #126.

Co-authored-by: Jacob Greenfield <jacob@jacobgreenfield.me>
2019-11-22 01:41:56 +00:00
Jacob Greenfield
0227c08ac8 Satisfy clippy 2019-11-21 20:35:19 -05:00
Jacob Greenfield
68c81df381 Update examples and tests 2019-11-21 20:35:16 -05:00
Jacob Greenfield
be4e62ccc9 Use u8 slices for buffer mapping 2019-11-21 20:34:39 -05:00
bors[bot]
a18b43bfa8 Merge #128
128: Small updates r=kvark a=Coder-256

Enable Travis CI cache, disable [deprecated container-based builds](https://docs.travis-ci.com/user/reference/trusty/#container-based-infrastructure), and add `red.png` to `.gitignore` (output from `cargo run --example capture`).

Co-authored-by: Jacob Greenfield <jacob@jacobgreenfield.me>
2019-11-22 01:14:52 +00:00
Jacob Greenfield
bb1acd9ec6 Add red.png to .gitignore 2019-11-21 18:04:09 -05:00
Jacob Greenfield
3371f2d793 Enable Travis cache 2019-11-21 18:02:44 -05:00
Jacob Greenfield
88e8269182 cargo fmt 2019-11-21 00:20:28 -05:00
bors[bot]
a5921daeb4 Merge #126
126: Fix generic bounds on buffer mapping r=grovesNL a=kvark

Smaller (and incomplete!) alternative to #119 while it's still discussed.
One missing piece here is alignment. cc @Coder-256

Also, importing `wgpu-core` as just "core" wasn't the best idea 😅 : it collides with the actual `core`.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-11-21 03:08:12 +00:00
Dzmitry Malyshau
3609e52bfd Fix generic bounds on buffer mapping 2019-11-20 21:25:46 -05:00
bors[bot]
95787f1546 Merge #125
125: Use count rather than size in map_read/write_async r=kvark a=cormac-obrien

Fixes #124.

Co-authored-by: Cormac O'Brien <cormac@c-obrien.org>
2019-11-20 15:00:15 +00:00
Cormac O'Brien
05e697831a Use count rather than size in map_read/write_async
Fixes #124
2019-11-20 04:29:09 -06:00
bors[bot]
c176e5d6e4 Merge #122
122: Wholesome update for the git master of wgpu-native r=grovesNL a=kvark

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

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2019-11-20 01:59:27 +00:00
Dzmitry Malyshau
b40bb71679 Wholesome update for the git master of wgpu-native 2019-11-19 20:58:32 -05:00
bors[bot]
cbdd74fb40 Merge #115
115: Handle error case for SwapChain::get_next_texture r=kvark a=antonok-edm

Updates `SwapChain::get_next_texture` to account for https://github.com/gfx-rs/wgpu/pull/369. Otherwise, an invalid `Id` is returned and may cause confusing errors.

Co-authored-by: Anton Lazarev <antonok35@gmail.com>
2019-11-06 03:48:03 +00:00
Anton Lazarev
dd23e8f015 Handle error case for SwapChain::get_next_texture 2019-11-05 14:46:25 -08:00
Dzmitry Malyshau
2c7d43ecc3 Version bump to 0.4 wgpu-v0.4.0 2019-11-03 21:40:55 -05:00
bors[bot]
d57b8cea29 Merge #114
114: skybox: log::debug and make rotation slower r=kvark a=m4b



Co-authored-by: m4b <m4b.github.io@gmail.com>
2019-11-04 00:21:36 +00:00
m4b
547c5eddda skybox: log::debug and make rotation slower 2019-11-03 16:19:43 -08:00
bors[bot]
a020564667 Merge #109
109: add initial skybox example, ref #93 r=m4b a=m4b

1. doesn't render the images at all
2. mip map stuff needs clarification
3. will update uniform with temporal rotation so we can see the skybox better

Co-authored-by: m4b <m4b.github.com@gmail.com>
2019-11-03 07:08:43 +00:00
m4b
ebd7adb72d docs: add skybox.gif to readme gallery 2019-11-03 00:05:10 -07:00
m4b
3972daf1fb examples: add skybox example, fixes #93
* Adds new skybox example for demonstrating cubemap uses
* Adds .png files for skybox
* Adds skybox vert and frag shaders
2019-11-02 19:42:25 -07:00
bors[bot]
ccc958e741 Merge #107
107: Update to wgpu-native b8d26c9186 r=trivial a=kvark



Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2019-10-31 02:27:35 +00:00
Dzmitry Malyshau
e0abf982e1 Update to wgpu-native b8d26c9186 2019-10-30 22:26:42 -04:00
bors[bot]
ed2c67f762 Merge #100
100: Fix shadow sampling r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-10-24 18:56:08 +00:00
Dzmitry Malyshau
5123a5b800 Fix shadow sampling outside of the positive hemisphere 2019-10-24 12:28:37 -04:00
Dzmitry Malyshau
239885401c Refactor log crate usage 2019-10-24 12:26:58 -04:00
bors[bot]
012d08d64d Merge #99
99: Update dependencies (including wgpu commit) r=kvark a=rukai



Co-authored-by: Rukai <rubickent@gmail.com>
2019-10-19 02:22:26 +00:00
Rukai
409d518cdf Update dependencies 2019-10-19 09:43:15 +11:00
bors[bot]
fdaeaba443 Merge #98
98: Add pixels to the friends list r=kvark a=parasyte

We're using `wgpu` to create the world's most powerful pixel frame buffer. 😂

The crate isn't published yet. Waiting for `wgpu` 0.4: https://github.com/parasyte/pixels/issues/16

Co-authored-by: Jay Oster <jay@kodewerx.org>
2019-10-16 13:09:20 +00:00
Jay Oster
8d726724da Add pixels to the friends list 2019-10-15 18:58:10 -07:00
bors[bot]
cb25914b95 Merge #92
92: Fix docs describing how to create a surface r=grovesNL a=parasyte

I noticed this issue as I was combing the source.

Co-authored-by: Jay Oster <jay@kodewerx.org>
2019-10-03 12:33:24 +00:00
Jay Oster
f336fb5825 Fix docs describing how to create a surface 2019-10-02 21:15:10 -07:00
bors[bot]
697393df47 Merge #89
89: Adapter::get_info r=kvark a=paulkernfeld

This more or less addresses #7.

If the example is too trivial, I'm happy to remove it.

Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2019-09-23 16:26:25 +00:00
Paul Kernfeld
9f221584d6 Adapter describe example 2019-09-21 21:10:58 -04:00
Paul Kernfeld
2a1c94f5e9 Add Adapter::get_info 2019-09-21 21:10:58 -04:00
bors[bot]
68df066469 Merge #87
87: Add indirect draw/dispatch methods r=kvark a=swiftcoder

It looks like the indirect draw/dispatch methods are present in wgpu-native, but not yet exposed in the wrapper.

Co-authored-by: Tristam MacDonald <swiftcoder@gmail.com>
2019-09-16 01:12:45 +00:00
Tristam MacDonald
3f0256bf4e Add indirect draw/dispatch methods 2019-09-15 12:57:22 -07:00
bors[bot]
0ef17c7fbd Merge #86
86: Update readme with Yatekii's fork of imgui-wgpu-rs r=kvark a=Yatekii



Co-authored-by: Noah Hüsser <yatekii@yatekii.ch>
2019-09-15 00:13:22 +00:00
Noah Hüsser
b229ac8cf9 Update readme with Yatekii's fork of imgui-wgpu-rs 2019-09-15 00:49:05 +02:00
Dzmitry Malyshau
17077f49b5 Update wgpu-native revision to latest 2019-09-11 22:15:58 -04:00
bors[bot]
5edb6ecf13 Merge #83
83: Propagate making Vulkan backend available to wgpu-rs r=kvark a=yanchith

`wgpu-native` has `gfx-backend-vulkan` feature which makes Vulkan available on macOS. This adds the feature to `wgpu-rs` also.

Co-authored-by: yanchith <yanchi.toth@gmail.com>
2019-09-10 14:05:43 +00:00
yanchith
6b5aa333b7 Propagate making Vulkan backend available to wgpu-rs 2019-09-10 15:27:22 +02:00
bors[bot]
ca2193201d Merge #82
82: Return Queue separately r=grovesNL a=kvark

What problem is this PR trying to solve? We want `Device` to be freely accessible from multiple threads/objects and internally synchronized. `Arc<Device>` seems like a natural choice of such a sharable object, especially since all except one methods are `&self`.

That one method is `get_queue()`, and it returns a temporary object `Queue<'a>`. If we turn it into `&self`, we'd end up with multiple instances of `Queue` created at any time, which contradicts the initial design (of this Rust wrapper). If it stays `&mut` and the user wraps the device into `Arc`, they'll never be able to submit any work...

So this PR solves this by moving the `Queue` completely outside of the device.

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2019-09-10 13:27:14 +00:00
Dzmitry Malyshau
00c6d97dce Return Queue separately 2019-09-10 09:26:18 -04:00
bors[bot]
f9bbfc7cf8 Merge #80
80: Update to the new swapchain model r=trivial a=kvark

Fixes #74 
Fixes https://github.com/gfx-rs/wgpu/issues/292

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2019-09-10 01:44:55 +00:00