Commit Graph

261 Commits

Author SHA1 Message Date
Dzmitry Malyshau
48e74e77d7 Add set_viewport 2019-05-14 12:57:03 -04:00
Dzmitry Malyshau
a6f3637c0c Debug labels 2019-05-14 12:49:10 -04:00
Dzmitry Malyshau
f024758e07 Track stencil reference 2019-05-14 11:58:10 -04:00
Dzmitry Malyshau
40ec1ac4c1 Fix command buffer and surface locking order 2019-05-14 11:13:08 -04:00
Dzmitry Malyshau
6a1dcb9565 API update with naming, formats, and extra fields 2019-05-14 10:31:25 -04:00
Dzmitry Malyshau
278016d711 Fix lock order on the identity manager 2019-05-13 11:55:19 -04:00
Dzmitry Malyshau
5597846018 Update to gfx-hal 0.2 2019-05-13 11:07:28 -04:00
Dzmitry Malyshau
540451a66d Fix cbindgen macro expansion and CI 2019-05-10 21:55:09 -04:00
Dzmitry Malyshau
6ce9cbd679 Remove Rust wrapper and examples 2019-05-10 20:40:42 -04:00
Dzmitry Malyshau
8c75f35948 Fix locking order in texture view creation and destruction 2019-05-10 15:57:25 -04:00
bors[bot]
0edf927e5b Merge #159
159: Add GPU timeout, fix active submission processing order r=kvark a=kvark

Fixes #156 

The timeouts are going to be configurable later down the road.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-05-10 12:00:47 +00:00
Dzmitry Malyshau
664fcdc1fa Add GPU timeout, fix active submission processing order 2019-05-09 14:59:28 -04:00
Dzmitry Malyshau
3f1e9ab03b Move callbacks out of the locking path 2019-05-07 11:07:55 -04:00
Rukai
16cc03be31 Update deps + upgrade examples to rust 2018 2019-05-07 22:38:41 +10:00
bors[bot]
6b92c37fa0 Merge #151
151: Assert on swapchain output usage before presenting r=grovesNL a=kvark

Fixes #148 

There is no "fix" for the case on our side. The PR brings stronger requirements on the swapchain outputs: they have to be used and submitted before dropped.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-05-06 11:40:18 +00:00
bors[bot]
b12b4c135e Merge #136
136: Use strongly typed Ids r=kvark a=psincf

fixes #61 

Co-authored-by: psincf <44228825+psincf@users.noreply.github.com>
2019-05-04 02:44:24 +00:00
psincf
64d1250bfa fixes hub.rs 2019-05-04 02:03:37 +02:00
psincf
2e30c611ae Make IdentityManager strongly typed 2019-05-04 01:20:56 +02:00
Dzmitry Malyshau
1c350cc4af Assert on swapchain output usage before presenting 2019-05-03 10:45:39 -04:00
Atul Bhosale
3330509678
Remove wgpu_buffer_set_sub_data function 2019-05-03 07:01:59 +05:30
psincf
10547b937f add serde into scope and fix wgpu-remote 2019-05-01 13:31:56 +02:00
psincf
565e5fdfeb make trait TypedId:From<Id> 2019-05-01 12:15:23 +02:00
psincf
f7794fd82b change PhantomData syntax 2019-05-01 12:11:20 +02:00
psincf
bbef2b7622 Put new_id! in define_id! 2019-05-01 11:55:28 +02:00
psincf
bfc983a8cc Clean code 2019-05-01 11:55:28 +02:00
psincf
44cf64495a Use strong type 2019-05-01 11:55:28 +02:00
Dzmitry Malyshau
6ac666a5aa Introduce ClientFactory 2019-04-30 15:37:46 -04:00
Dzmitry Malyshau
61fca00f34 Remove wgpu-bindings in favor of configuration scripts 2019-04-30 12:45:05 -04:00
Dzmitry Malyshau
0011d9f4ff Global manager for instance names on the remote client 2019-04-30 09:19:40 -04:00
Dzmitry Malyshau
52ee3e019c Remote example and improved header, tested on CI 2019-04-29 22:41:09 -04:00
bors[bot]
5ec6f35368 Merge #139
139: Scissors test r=kvark a=snuk182

Closes #138 

Co-authored-by: Serhii Plyhun <snuk188@gmail.com>
2019-04-28 02:28:16 +00:00
Serhii Plyhun
092bcc4afb Scissor test 2019-04-28 00:45:37 +02:00
Alexis Sellier
c468840eee
Support dynamic offsets
Closes #125

* Add support for dynamic offsets when setting a bind group.
* Add new binding types: `UniformBufferDynamic` and `StorageBufferDynamic`
2019-04-26 22:20:54 +02:00
Atul Bhosale
af38d79d79
Format code using 'cargo fmt' 2019-04-26 22:01:47 +05:30
bors[bot]
993293f709 Merge #127
127: Track async mapping properly r=grovesNL,swiftcoder a=kvark

Fixes #117, fixes #95, fixes #132 

The change can be logically split into 3 parts:
  1. when `ActiveSubmission` is retired, we now move the mapped buffers into the "ready to map" vector. This was the missing bit that caused mapping to not work previously.
  2. mapping callbacks in Rust wrapper are refactored and they `unmap()` automatically now on users behalf
  3. we wait for idle before destroying the device, which allows us to process all the pending callbacks. This fix gets rid of the dummy submission our compute example used to do.

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-04-25 13:36:59 +00:00
Dzmitry Malyshau
8578643f38 Rename DestroyedResources to PendingResources 2019-04-25 08:29:40 -04:00
Dzmitry Malyshau
41141b1ae0 Wait for fences instead of device idle 2019-04-24 22:42:49 -04:00
Dzmitry Malyshau
aa1f876de3 Assert on a mapping buffer being used 2019-04-23 17:26:31 -04:00
Dzmitry Malyshau
326af8cce6 Do mapping transitions earlier. 2019-04-23 17:22:53 -04:00
Dzmitry Malyshau
7200f727e2 Expose device polling 2019-04-23 16:56:17 -04:00
Dzmitry Malyshau
e2dcac91d2 Round up mappable buffer size to non-coherent atom, if needed 2019-04-23 16:27:39 -04:00
Dzmitry Malyshau
1f4d67aeb2 Track async mapping properly 2019-04-22 13:57:35 -04:00
Markus Ginthör
89c5564133 Configure Swapchain with supported composite_alpha 2019-04-12 17:44:44 +02:00
Joshua Groves
7f7bdd1ba1 Implement index formats 2019-04-07 08:15:05 -02:30
Dzmitry Malyshau
83a83f33e7 Track epochs of the frame semaphores to wait for 2019-04-03 17:48:26 -04:00
Dzmitry Malyshau
c283a8b115 Update changelog and versions 2019-03-31 20:04:39 -04:00
Dzmitry Malyshau
a8a6b45c9a Rename expectation to LayoutChange 2019-03-31 20:00:52 -04:00
Dzmitry Malyshau
5e041ab239 Validate resource types against the bind group layout 2019-03-31 19:59:34 -04:00
Dzmitry Malyshau
b96983a56b Fix submission tracking 2019-03-31 19:59:21 -04:00
Dzmitry Malyshau
006d40a4b5 Track bind group compatibility across the whole pipeline 2019-03-31 16:04:37 -04:00
Dzmitry Malyshau
5923deff6e Validate bind group compatibility 2019-03-31 16:03:08 -04:00
Dzmitry Malyshau
332305012c Blend color and the first bits of validation 2019-03-31 15:52:32 -04:00
bors[bot]
dfa126cf47 Merge #112
112: Correctness fixes from 0.2, plus a lot of goodies r=kvark a=kvark

These are changes from #110 back-ported to master.

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2019-03-24 00:56:28 +00:00
bors[bot]
cf521d6074 Merge #96
96: Add the static lifetime bound to async buffer mapping callbacks r=kvark a=aloucks

These callbacks are executed outside of the mapping function and could previously reference data that had been dropped. Related #95.

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2019-03-23 02:21:03 +00:00
Dzmitry Malyshau
0b51c8a9d2 Clean up use statements.
Use copyless::VecHelper and ArrayVec for some things.
Refactor map_buffer internals.
2019-03-21 12:05:53 -04:00
Dzmitry Malyshau
dc31e4bdd0 Fix descriptor size, bump versions 2019-03-20 14:52:59 -04:00
Dzmitry Malyshau
81114a8ca2 Bump the descriptor pool size 2019-03-20 14:52:38 -04:00
Dzmitry Malyshau
451489025c Validate uniform buffer alignments, enforce map alignment 2019-03-20 14:43:25 -04:00
Dzmitry Malyshau
485894ca81 Enable windows in Travis 2019-03-19 10:49:30 -04:00
Dzmitry Malyshau
508b724dd7 Helpful error message on empty backend 2019-03-19 09:20:34 -04:00
Aaron Loucks
e0811db8d4 Triage buffers prior to overwriting the submission index
This allows async buffer mapping to function when a renderpass
is also submitted on the queue. The state transition and fencing
still needs work, however.
2019-03-12 22:15:37 -04:00
Lain-dono
c0b84b3e15
Fix vertex format mapping 2019-03-11 04:44:54 +03:00
Joshua Groves
e921b59298 Use repr(C) for Id 2019-03-07 19:04:01 -07:00
Joshua Groves
a55502c1e2 Remove winit from bindings generation 2019-03-07 12:37:50 -07:00
Dzmitry Malyshau
0bb4daa696 Version bumps to 0.2.0 2019-03-06 10:02:43 -05:00
Tristam MacDonald
1fe59e71db run cargo fmt 2019-03-05 20:41:24 -08:00
Tristam MacDonald
6ef53d7705 Convert shadow sample to map_async 2019-03-05 19:04:21 -08:00
Dzmitry Malyshau
ecaacfa20e Force wait for GPU before releasing the old swapchain 2019-03-05 14:14:28 -05:00
Dzmitry Malyshau
650bbaeb42 Basic render pipeline compatibility check 2019-03-03 22:09:20 -05:00
bors[bot]
152fad43c3 Merge #84 #85
84: Create buffer mapped r=kvark a=swiftcoder

I haven't really taken a swing at error handling here, posting it up early for feedback on the API.

85: Unpin nightly date for bindings generation r=kvark a=grovesNL

rust-lang/rust#57915 allows us to run bindings generation with nightly again, so we shouldn't have to pin to an older nightly date anymore (assuming everyone has a recent nightly).

Co-authored-by: Tristam MacDonald <tristam@trist.am>
Co-authored-by: Joshua Groves <josh@joshgroves.com>
2019-03-01 18:42:35 +00:00
Steven Wittens
cf3e1a5ac6 Add vertex formats 2019-03-01 10:48:12 +01:00
Tristam MacDonald
d179b5a85c Create buffer mapped 2019-02-28 20:11:29 -08:00
bors[bot]
370236330f Merge #82
82: Add updated texture formats r=kvark a=unconed

Adds the texture formats from:
https://github.com/gpuweb/gpuweb/blob/master/design/sketch.webidl


Co-authored-by: Steven Wittens <steven@acko.net>
2019-02-28 14:50:35 +00:00
Steven Wittens
9151510b24 Add updated texture formats 2019-02-28 06:32:26 +01:00
Tristam MacDonald
0f85eb86a1 Buffer tracking and unmapping
Adds preliminary transitioning of buffers to mapped state.
Adds buffer unmapping to the cube sample.
Modifies wgpu_queue_submit to not hold a write lock on the device during callbacks.
2019-02-27 21:15:47 -08:00
Dzmitry Malyshau
8ad1476872 Fix tracking of the set_sub_data service command buffer 2019-02-27 08:31:38 -05:00
Dzmitry Malyshau
76473bb38a Stitch mode for insert_barriers 2019-02-26 23:56:38 -05:00
Dzmitry Malyshau
cc5900b160 Refactor the view tracker 2019-02-26 23:05:36 -05:00
Dzmitry Malyshau
0d59c16f16 Refactor insert_barriers 2019-02-26 22:55:04 -05:00
Dzmitry Malyshau
d631b2c6f2 Fix depth clamping semantics 2019-02-26 22:36:58 -05:00
Dzmitry Malyshau
cdc9d65395 Free memory objects 2019-02-26 15:10:43 -05:00
Dzmitry Malyshau
f0e245e4dc Cleanup unused framebuffers 2019-02-26 11:21:31 -05:00
Dzmitry Malyshau
f2365ea71e Unify the texture view creation 2019-02-26 10:28:08 -05:00
Dzmitry Malyshau
5b129704a0 Storage indexing 2019-02-26 10:27:51 -05:00
Dzmitry Malyshau
ce08429729 Make Id serializable 2019-02-26 10:12:11 -05:00
Dzmitry Malyshau
e16ceafb81 Epoch tracking of indices 2019-02-26 10:12:11 -05:00
Dzmitry Malyshau
bd0de53f8e First bits of wgpu-remote 2019-02-26 10:10:07 -05:00
Tristam MacDonald
8431da80ed Implement map read/write async 2019-02-26 06:45:07 -08:00
Dzmitry Malyshau
616a3dd849 Fix leaking swapchain textures 2019-02-22 22:23:52 -05:00
Dzmitry Malyshau
cfe3da1c6f Remove the outdated frame concept in favor of aggressive swapchain re-creation 2019-02-22 18:43:19 -05:00
Dzmitry Malyshau
5ada8d9943 Fix full_range of arrays 2019-02-22 13:53:28 -05:00
Dzmitry Malyshau
c21420399a Refactored tracking, now includes the views 2019-02-22 12:59:29 -05:00
Dzmitry Malyshau
957a5b57dd Rust side of the shadow example 2019-02-22 12:59:29 -05:00
Dzmitry Malyshau
14ee80f463 Update the trackers on resource destruction 2019-02-21 15:59:24 -05:00
Dzmitry Malyshau
28551103c2 Fix old outdated frame cleanup 2019-02-21 15:59:24 -05:00
Dzmitry Malyshau
f2a0e6fe15 Swapchain resize, merged with the surface 2019-02-21 15:59:24 -05:00
Dzmitry Malyshau
5b509692d1 Outdated frame for the swapchain 2019-02-21 15:59:24 -05:00
Dzmitry Malyshau
855bcfe176 Resource destruction refactoring, hook up to rust 2019-02-21 08:42:57 -05:00
Dzmitry Malyshau
00e0347b8c Renamed the impl methods, switched structure argumetns from references to contained items 2019-02-15 10:13:04 -05:00
Dzmitry Malyshau
2e21285434 Separate object identity from storage 2019-02-14 14:28:55 -05:00