Commit Graph
8897 Commits
Author SHA1 Message Date
Aron Granberg 41a6425fb2 Improve drawing error messages 2020-04-15 02:29:37 +02:00
bors[bot]andDzmitry Malyshau 6de38a7792 Merge #584
584: Fix vertex format enum to match the native header r=kvark a=kvark

This was one of the problems to get wgpu-rs examples on the web.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-14 21:15:30 +00:00
Dzmitry Malyshau 82a7791763 Fix vertex format enum to match the native header 2020-04-14 17:14:17 -04:00
Aron Granberg 5f6accc206 Improve error messages when passing buffers with the wrong usage flags 2020-04-14 20:18:00 +02:00
bors[bot]andDzmitry Malyshau 729ecb1404 Merge #582
582: Track pipeline layout lifetime r=grovesNL a=kvark

Fixes #580
This one is interesting: it's not instantly destroyed when dropped, like bind group layouts. And it's not tracked for GPU usage like the resources. It's somewhat in-between. We have the following classes of tracking now:
  1. no tracking, destroyed on drop. Applies to: bind group layouts, adapters
  2. only CPU-side tracking. They go to "suspected" list on drop of self or anything that can point to them. Applies to: pipeline layouts
  3. full GPU tracking. They go to "suspected" list on drop, then get associated with active submission before destruction. Applies to: buffers, textures, views, bind groups, pipelines

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-14 13:08:29 +00:00
bors[bot]andDzmitry Malyshau 32cf9d22e7 [rs] Merge #256
256: Update wgpu for texture descriptor changes r=grovesNL a=kvark

Updates for https://github.com/gfx-rs/wgpu/pull/577
Detaches us from crates-io dependency (again).

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-14 11:30:02 +00:00
bors[bot]andDzmitry Malyshau 96a4a34b83 Merge #581
581: Fix buffer unmap warning r=kvark a=kvark

It's more consistent if neither map_buffer or unmap_buffer care about the status.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-14 11:24:19 +00:00
Dzmitry Malyshau 4537304571 [rs] Update wgpu for texture descriptor changes 2020-04-14 01:13:47 -04:00
Dzmitry Malyshau 3cc4fa51bc Track pipeline layout lifetime 2020-04-14 00:58:30 -04:00
Dzmitry Malyshau a0701b41cb Fix buffer unmap warning 2020-04-14 00:08:04 -04:00
bors[bot]andDzmitry Malyshau 49dbe08f37 Merge #578
578: Comment fixes, header update r=kvark a=kvark

Matches review fixes in https://phabricator.services.mozilla.com/D70707

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-13 22:49:11 +00:00
Dzmitry Malyshau 379ea37982 Comment fixes, header update 2020-04-13 18:48:08 -04:00
bors[bot]andDzmitry Malyshau 8d1185f3e9 Merge #577
577: Remove array layer count from texture descriptor r=grovesNL a=kvark

Matches https://github.com/gpuweb/gpuweb/pull/613

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-13 18:16:06 +00:00
Dzmitry Malyshau d9609ec269 Remove array layer count from texture descriptor 2020-04-13 11:44:10 -04:00
bors[bot]andAron Granberg f50dd7a299 Merge #570
570: Improve error message when bind group and bind group layout have different number of entries r=kvark a=HalfVoxel



Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2020-04-13 00:17:43 +00:00
bors[bot]andLachlan Sneff 18a80e735f [rs] Merge #254
254: Specify expected structure for draw_indirect and draw_indexed_indirect r=kvark a=lachlansneff

~~Based on https://www.khronos.org/opengl/wiki/Vertex_Rendering#Indirect_rendering.~~ Turns out the opengl docs are wrong. Based on https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDrawIndirectCommand.html.

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-04-12 16:14:15 +00:00
Lachlan Sneff 3d7bc8c528 [rs] Fix documentation based on vulkan docs 2020-04-12 10:56:15 -04:00
bors[bot]andHackpoetic c3ebf3b9a3 [rs] Merge #251
251: cargo fmt the code and tweak format rules r=kvark a=chao-mu

Ran cargo fmt after removing rules per @kvark, two of which were because they needed nightly to run.

Co-authored-by: Hackpoetic <chao-mu@hackpoetic.com>
2020-04-12 12:24:30 +00:00
Lachlan Sneff 5f8ab36938 [rs] Specified expected structure for draw_indirect and draw_indexed_indirect 2020-04-11 23:33:31 -04:00
bors[bot]andDzmitry Malyshau 312fa3da62 Merge #573
573: Fix read-only flags r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-12 00:51:26 +00:00
Dzmitry Malyshau 357ee9a447 Fix read-only flags 2020-04-11 20:50:20 -04:00
bors[bot]andMagnus Hoff 77aee875b3 [rs] Merge #252
252: Typo r=grovesNL a=maghoff

Remove extra word

Co-authored-by: Magnus Hoff <maghoff@gmail.com>
2020-04-11 12:59:28 +00:00
Magnus Hoff 61159e6831 [rs] Typo
Remove extra word
2020-04-11 13:09:45 +02:00
Aron Granberg 3db1e6c10d Improve error message when bind group and bind group layout have different number of entries 2020-04-11 11:22:40 +02:00
Hackpoetic fb87e4fa84 [rs] add missing rust format config 2020-04-11 00:05:18 -04:00
Hackpoetic 1927fe6586 [rs] cargo fmt the code and tweak format rules 2020-04-10 22:56:24 -04:00
Igor Shaposhnik 877e0016eb [rs] Migrate CI to GitHub Actions 2020-04-10 10:59:21 -04:00
bors[bot]andDzmitry Malyshau 6b627451bc Merge #565
565: Usage tracking fixes for swapchain and command buffers r=kvark a=kvark

Fixes #561 
see description in commit messages

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-10 04:40:15 +00:00
Dzmitry Malyshau 920c00931d 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:39:23 -04:00
Dzmitry Malyshau 74e9e89fe7 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:38:53 -04:00
bors[bot]andDzmitry Malyshau 65a0f4afa0 Merge #560
560: Update ffi for wgpu-remote r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-09 16:18:55 +00:00
bors[bot]andJoshua Groves bea1935c75 [rs] Merge #249
249: Derive `Default` for `CommandEncoderDescriptor` r=kvark a=grovesNL

Fixes #243

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-04-09 13:29:16 +00:00
bors[bot]andHéctor Ramón Jiménez 20ce74df41 [rs] Merge #245
245: Check `cargo doc` in CI r=kvark a=hecrj

This PR makes CI run `cargo doc` using the latest nightly.

It is currently panicking here:

https://github.com/rust-lang/rust/blob/6dee5f1126dfd5c9314ee5ae9d9eb010e35ef257/src/librustdoc/passes/mod.rs#L411

I thought it was an incorrect link causing it, but the issue seems to persist even after fixing the link.

__Update__: Issue opened upstream by @grovesNL (https://github.com/rust-lang/rust/issues/70874).

Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
2020-04-09 04:18:15 +00:00
Héctor Ramón Jiménez 546f9e31a5 [rs] Fix RenderPass::set_vertex_buffer doc link 2020-04-09 06:07:20 +02:00
Héctor Ramón Jiménez 359f80dec3 [rs] Check cargo doc in CI 2020-04-09 06:07:17 +02:00
Joshua Groves 0fb2e78651 [rs] Derive Default for CommandEncoderDescriptor 2020-04-09 00:55:45 -02:30
bors[bot]andAaron Loucks 0d5442d1c0 Merge #562
562: Increase default maximum vertex buffer inputs from 8 to 16 r=kvark a=aloucks

Additionally, the input states are now stored in a `SmallVec` to enable higher limits.

Fixes #558

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-04-08 13:49:35 +00:00
Dzmitry Malyshau ee2e56446c Update ffi for wgpu-remote 2020-04-07 22:16:46 -04:00
Aaron Loucks b6ec8440e9 Increase default maximum vertex buffer inputs from 8 to 16
Additionally, the input states are now stored in a `SmallVec` to
enable higher limits.

Fixes #558
2020-04-07 21:00:06 -04:00
bors[bot]andDzmitry Malyshau d1efc5d028 [rs] Merge #241
241: Version bump to 0.5 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-06 13:55:34 +00:00
Dzmitry Malyshau de89c89627 [rs] Version bump to 0.5 2020-04-06 09:10:28 -04:00
bors[bot]andDzmitry Malyshau 77d95f5ecd Merge #556
556: Preparations for wgpu-0.5 release r=grovesNL a=kvark

Based on #555 

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-06 12:57:11 +00:00
Dzmitry Malyshau 7dba052900 Version bump and CHANGELOG update wgpu-types-v0.5.0 wgpu-core-v0.5.0 2020-04-06 08:55:39 -04:00
Dzmitry Malyshau a3aefe2535 Rustfmt stable pass 2020-04-06 08:55:39 -04:00
bors[bot]andRukai 384606f2e2 Merge #555
555: Use crates.io release of peek-poke r=kvark a=kvark

Closes #549 

Co-authored-by: Rukai <rubickent@gmail.com>
2020-04-06 03:09:12 +00: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