Commit Graph

7434 Commits

Author SHA1 Message Date
bors[bot]
aab47ae499 Merge #28
28: Dependencies/makefile update r=kvark a=grovesNL

- Update gfx and add `unwrap`s for now
- Because we're not actively the allocator yet, disable rendy-memory temporarily (until the latest gfx-hal feature is merged and we can start bumping its commit number)
- Use git dependency for cbindgen until the bitflags changes are ready
- Disable C examples in root Makefile until wgpu.h generation is complete

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2018-11-11 20:55:06 +00:00
Joshua Groves
d3f8c082f1 Skip C examples for now 2018-11-11 12:44:28 -07:00
Joshua Groves
0c1cf3621a Update gfx 2018-11-11 12:36:37 -07:00
Joshua Groves
d92f222078 Use git dependency for cbindgen 2018-11-11 12:32:19 -07:00
Joshua Groves
f4cd450687 Disable rendy temporarily 2018-11-11 12:02:40 -07:00
bors[bot]
ee0115462e Merge #6
6: Expose event internal and Event in root level r=msiglreith a=msiglreith



Co-authored-by: msiglreith <m.siglreith@gmail.com>
2018-11-08 17:14:38 +00:00
msiglreith
09d68b3cb9 Expose event internal and Event in root level 2018-11-08 18:13:37 +01:00
bors[bot]
7d8a7d3e15 Merge #5
5: Add rects length check for clears r=msiglreith a=dati91



Co-authored-by: Attila Dusnoki <attila.dusnoki@h-lab.eu>
2018-11-06 18:02:40 +00:00
Attila Dusnoki
4a938bd1d4 Add rects length check for clears 2018-11-06 14:39:38 +01:00
bors[bot]
cf2e62becb Merge #27
27: Resource lifetime tracking r=grovesNL a=kvark

Fixes #26

This change ends up being much more serious and intrusive, but hopefully manage-able. The idea is that the native layer would have explicit deletion calls exposed, but would still guarantee that resources live for as long as they are used by either CPU or GPU. The device, in order to guarantee that, keeps track of resources associated with fences and walks through them for clean up.

Maintaining the actual ref-counts per object up-to-date is one of the most challenging tasks. I choose to use the existing `Stored` structure to host it, so that we are forced to clone the refcounts, and it's difficult to screw up. I still had to provide the "old" semantics under the new name of `WeaklyStored` though, and we should be careful about it.

TODO:
  - [ ] review and test
  - [x] fix transition API once more, so that command buffers are stitched properly and resources are tracked by the device
  - [ ] update the Rust layer, using RAII
  - [ ] update the examples

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2018-11-04 22:53:04 +00:00
Dzmitry Malyshau
a04df23a10 Track resources used in commands by the device 2018-11-02 22:00:11 -04:00
Dzmitry Malyshau
d597e97db8 Rewrite the consume() to use the last usage properly 2018-11-02 21:44:17 -04:00
Dzmitry Malyshau
b03d7de335 Actual cleanup of resources on submission 2018-11-02 16:45:10 -04:00
Dzmitry Malyshau
39186c9c7b Add reference counting to objects 2018-11-02 16:45:10 -04:00
bors[bot]
c1eb437b25 Merge #25
25: Proper render pass support r=grovesNL a=kvark

This PR implements the API scheme of https://github.com/gpuweb/gpuweb/pull/102 and caches both render passes and framebuffers properly in the device.

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2018-10-31 12:56:54 +00:00
Dzmitry Malyshau
9aa5977c22 Bindings update with the new cbindgen 0.6.7 2018-10-30 22:02:07 -04:00
Dzmitry Malyshau
6b9be3c08e Fully adopt bitflags for ShaderStageFlags and ColorWriteFlags 2018-10-30 21:51:16 -04:00
Dzmitry Malyshau
4f07ce8248 Cache framebuffers by the Device 2018-10-30 21:23:22 -04:00
Dzmitry Malyshau
d206de2049 Use render pass cache at the begin_render_pass 2018-10-30 16:47:44 -04:00
Dzmitry Malyshau
fee276afa5 Cache render passes on Device level 2018-10-30 16:37:36 -04:00
bors[bot]
5dcfd2bd6e Merge #24
24: Actually begin render passes r=grovesNL a=kvark

For now, we create the render pass and the frame buffer in place. Of course, we'd need to cache it properly, but this is blocked on W3C discussions on the API side.

With this PR, the Rust example is able to create a texture and run a render pass on it, all without a single Vulkan validation error 🎉 

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2018-10-28 22:22:49 +00:00
Dzmitry Malyshau
f3cfd2e09c Transition between command buffers 2018-10-26 22:15:48 -04:00
Dzmitry Malyshau
879cd64b30 Texture view creation in Rust and the example 2018-10-26 12:04:20 -04:00
Dzmitry Malyshau
1137ad2f70 native: Texture view creation 2018-10-26 11:47:01 -04:00
Dzmitry Malyshau
ef4ee9c29d Expose create_texture in Rust 2018-10-25 22:35:52 -04:00
Dzmitry Malyshau
de4f2b70eb Framebuffer creation and actual begin_render_pass 2018-10-25 22:29:27 -04:00
Dzmitry Malyshau
08a1bd4bc7 Render pass creation 2018-10-25 17:32:57 -04:00
bors[bot]
23e32b41a0 Merge #23
23: State transitions for a render pass r=grovesNL a=kvark

This PR introduces a simple resource tracker, which is used to build the pipeline barriers gluing the main command buffer with the one composed for the render pass contents. Render passes are still not started properly, blocked on the W3C discussion about the parameters.

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2018-10-23 14:54:10 +00:00
Dzmitry Malyshau
32b92afa5c Root Makefile 2018-10-22 12:01:42 -04:00
Dzmitry Malyshau
0cad1f5d56 Basic texture transitions 2018-10-19 12:31:36 -04:00
Dzmitry Malyshau
b27650bfcd Buffer transitions for a render pass 2018-10-19 12:07:07 -04:00
Dzmitry Malyshau
f9cd55ed59 Share use_xxx implementations in the tracker 2018-10-19 10:50:59 -04:00
Dzmitry Malyshau
0fca6930d9 Basic resource tracking 2018-10-19 10:34:19 -04:00
Dzmitry Malyshau
5462690c4a Chain multiple native command buffers per logical one 2018-10-18 16:27:35 -04:00
bors[bot]
bcf51a60c6 Merge #21
21: Use pointers for descriptors r=kvark a=grovesNL

(Mostly) fixes #20

I didn't try to handle the remote case yet, but it will need serialization as we mentioned.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2018-10-12 14:20:17 +00:00
Joshua Groves
277bef37c7 Minor refactor 2018-10-11 23:56:56 -06:00
Joshua Groves
90e04cbe75 c: Update signatures 2018-10-11 23:45:24 -06:00
Joshua Groves
7575652545 rust: Update signatures 2018-10-11 23:45:00 -06:00
Joshua Groves
4126241fff Use references for descriptors 2018-10-11 23:34:00 -06:00
bors[bot]
230cf01ae2 Merge #19
19: Texture creation r=kvark a=grovesNL



Co-authored-by: Joshua Groves <josh@joshgroves.com>
2018-10-08 22:47:42 +00:00
Joshua Groves
897c5b9e86 Add texture creation to C example 2018-10-07 09:22:24 -06:00
Joshua Groves
b2ec3233b0 Update header 2018-10-06 22:37:36 -06:00
Joshua Groves
6fb3b06303 Add rendy and create textures 2018-10-06 22:27:02 -06:00
Joshua Groves
45c5709b1d Map usage flags 2018-10-06 22:26:28 -06:00
Joshua Groves
beac74c481 Map texture dimension and size 2018-10-06 22:26:28 -06:00
bors[bot]
1855e22d0c Merge #18
18: Compute resource binding r=grovesNL a=kvark

Again, this isn't complete/usable yet, blocked by https://github.com/gpuweb/gpuweb/pull/93
But we can merge and move forward.

Co-authored-by: Dzmitry Malyshau <kvark@mozilla.com>
2018-10-03 11:29:47 +00:00
Dzmitry Malyshau
744a64f7fd Regenerated C header 2018-10-03 07:29:18 -04:00
Dzmitry Malyshau
444da40484 rust: compute resource binding 2018-10-02 21:41:10 -04:00
Dzmitry Malyshau
45def95763 native: basic compute resource binding 2018-10-02 21:41:10 -04:00
Dzmitry Malyshau
c7bb1b453e native: use iterators for descriptor set layouts 2018-10-02 21:41:10 -04:00