Commit Graph
131 Commits
Author SHA1 Message Date
Dzmitry Malyshau b71bcc5349 Add is_power_of_two function (#603) 2020-04-25 00:17:50 -04:00
Aron Granberg 11a321131f Improve error messages for mismatched binding types (#593) 2020-04-25 00:17:50 -04:00
Dzmitry Malyshau 47336441e5 Version bump to 0.5.3 and changelog update 2020-04-18 17:02:54 -04:00
Dzmitry Malyshau 8dcaf05649 Fix host mapping buffer barriers 2020-04-18 17:02:54 -04:00
Dzmitry Malyshau 5235547a3a Enable READ access for texture storage 2020-04-18 14:19:53 -04:00
Dzmitry Malyshau acfa8ecb35 Derive swapchain layout off the load operation 2020-04-18 14:19:43 -04:00
Almar Klein 754b465818 Warn when binding a buffer that is still mapped 2020-04-18 14:19:33 -04:00
Dzmitry Malyshau 3cd7376abe Version bump to 0.5.2 and CHANGELOG update 2020-04-15 18:59:18 -04:00
Aron Granberg 78b4ccfb97 Improve drawing error messages 2020-04-15 18:56:25 -04:00
Aron Granberg b51162c2c6 Improve error messages when passing buffers with the wrong usage flags 2020-04-15 18:55:59 -04:00
Dzmitry Malyshau fe92b3fec9 Track pipeline layout lifetime 2020-04-15 18:54:50 -04:00
Dzmitry Malyshau 2a535d24c3 Fix buffer unmap warning 2020-04-15 18:54:29 -04:00
Dzmitry Malyshau be49ffae9c Comment fixes, header update 2020-04-15 18:54:14 -04:00
Dzmitry Malyshau 9c49a8c3d5 Fix read-only flags 2020-04-15 18:53:33 -04:00
Aron Granberg e0485b49ac Improve error message when bind group and bind group layout have different number of entries 2020-04-15 18:53:19 -04:00
Dzmitry Malyshau 1303d4907c Version bump to 0.5.1 2020-04-10 00:43:21 -04:00
Dzmitry Malyshau ee6ef901e5 Fix tracking of the initial state during replacement.
When multiple "replace" style transitions are happening,
we weren't properly retaining the "first" state, which
is required for proper stitching of command buffers.

This logic is fixed and fortified with a new set of
"change" and "merge" tests in the track module.
2020-04-10 00:40:49 -04:00
Dzmitry Malyshau 3e7682757d Refactor tracking of swapchain images as attachments
We were improperly detecting if a swapchain image has already
been used by a command buffer. In this case, we need to assume
that it's already in the PRESENT state.
2020-04-10 00:40:42 -04:00
Dzmitry Malyshau 7dba052900 Version bump and CHANGELOG update 2020-04-06 08:55:39 -04:00
Dzmitry Malyshau a3aefe2535 Rustfmt stable pass 2020-04-06 08:55:39 -04:00
Rukai 99161cbeb5 Use crates.io release of peek-poke 2020-04-05 23:06:02 -04:00
bors[bot]andDzmitry Malyshau d6d31695d3 Merge #553
553: Fix order of maintenace between submission tracking and buffer mapping. r=kvark a=kvark

Fixes https://github.com/gfx-rs/wgpu-rs/issues/237

Logic needs to have the following order:
  1. we first wait for the device to finish
  2. then we move some tracked resources from per-submission lists into the "ready to destroy" or "ready to map" lists.
  3. then we handle mapping, which goes through "ready to map" lists
  4. then we destroy everything for realz that needs to be

That order got broken with #547

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-05 21:54:16 +00:00
bors[bot]andKunal Mohan 8f9f13fc8c Merge #550
550: Add check for bound pipeline r=kvark a=kunalmohan

fix #456
Validate that a pipeline is bound before issuing any draw/dispatch call.

Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
2020-04-05 19:58:26 +00:00
Dzmitry Malyshau 00c98e7d5a Fix order of maintenace between submission tracking and buffer mapping. 2020-04-05 14:39:10 -04:00
Kunal Mohan aef0c7c2c4 Add check for bound pipeline
fix #456
Validate that a pipeline is bound before issuing
draw/dispatch call.
2020-04-05 11:16:50 +05:30
Dzmitry Malyshau f07943f2d8 Use NonZeroU64 for Id 2020-04-04 19:43:16 -04:00
Kunal Mohan fb1c448aa9 Add BufferMapState enum
fix #395
Add BufferMapState enum to track the state of buffer
mapping and store any mapping details in case one is
pending.
2020-04-03 07:55:23 +05:30
Dzmitry Malyshau f3eee020e6 Check surface compatibility 2020-03-30 23:31:24 -04:00
bors[bot]andHeroesGrave 306554600a Merge #540
540: Add serialization to more types r=kvark a=HeroesGrave

With these changes, pretty much everything in wgpu-types can be serialized with the exception of BufferDescriptor, CommandEncoderDescriptor, and TextureDescriptor which contain a `*const c_char`.

Options for dealing with those:
- Leave these types as not de/serializable
- Skip when serializing, deserialize as nullptr
- Serialize as a string, deserialize as nullptr

AFAICT there's not really a way to allow a full roundtrip for these fields because nul-terminated strings don't play nicely with serde. Maybe it could serialize as a byte array?

Co-authored-by: HeroesGrave <heroesgrave@gmail.com>
2020-03-28 14:44:08 +00:00
HeroesGrave 1702a54c5c Add Undefined variant to CompareFunction 2020-03-28 16:20:47 +13:00
Joshua Groves f3bb6eb230 Move more types to wgpu-types 2020-03-27 23:26:17 -02:30
Dzmitry Malyshau 2e9610e8c9 Request NDC_Y_FLIP feature 2020-03-27 00:54:01 -04:00
Dzmitry Malyshau 8aeeb8e318 Port to gfx-extras and gfx-hal-0.5 2020-03-27 00:54:01 -04:00
Lachlan Sneff bcd7744c5b Unbox unnecessarily boxed function 2020-03-26 22:38:50 -04:00
Aaron Loucks fdcf9e7067 Add inital debug labels
- bind group
- bind group layout
- command encoder
- texture
2020-03-24 19:43:11 -04:00
Aaron Loucks 2700d1cc15 Add buffer debug labels 2020-03-24 19:38:07 -04:00
aloucks e39aaa9cb3 Implement PartialEq, Eq, and Hash for more types (#535) 2020-03-24 19:29:18 -04:00
Dzmitry Malyshau 5e2f200223 Track GPU use of compute and render pipelines (#534) 2020-03-24 19:28:26 -04:00
Dzmitry Malyshau 0a30cf4b46 Recycled identity management (#533) 2020-03-24 19:18:42 -04:00
Dzmitry Malyshau 272e423a5c Improve shutdown cleanup (#532) 2020-03-24 18:03:25 -04:00
bors[bot]andDzmitry Malyshau d3e47fc5ae Merge #521
521: Texture component type r=kvark a=kvark

Matching the upstream spec...

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-17 16:58:34 +00:00
Joshua Groves b9259c0c8c Move more types into wgpu-types 2020-03-16 23:57:50 -02:30
Dzmitry Malyshau c4e3fb4d36 Add texture component type field to BGL entry 2020-03-16 12:02:26 -04:00
Dzmitry Malyshau 7f966be455 Update naming of bindings to entries 2020-03-16 10:06:54 -04:00
Joshua Groves b58c15815b Move more shared types into wgpu-types 2020-03-14 23:08:05 -02:30
Dzmitry Malyshau 26657374f8 Update vertex layout naming 2020-03-14 12:44:04 -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
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