Commit Graph

102 Commits

Author SHA1 Message Date
Noah Hüsser
c5c7092d9c Make PresentMode configurable
Disable vsync

Revert accidential hardcode of num_frames

Make the PresentMode configurable

Adapt examples
+ adjust style according to @kvrak

Adher to @kvarks wishes for style.

Examples build.

Fix unnecessary ampersand.
2019-07-11 18:58:44 +02:00
bors[bot]
b1d9de0406 Merge #169
169: Add Windows/glfw3 to CI r=kvark a=grovesNL



Co-authored-by: Joshua Groves <josh@joshgroves.com>
2019-06-05 01:55:24 +00:00
Joshua Groves
7e7a88b831 Add Windows/glfw3 to CI 2019-06-04 22:09:58 -02:30
bors[bot]
85740873d0 Merge #212
212: More consistent descriptor passing r=kvark a=porky11

also use pointer for descriptor in `wgpu_command_encoder_begin_render_pass` for consistency reasons

Co-authored-by: Fabio Krapohl <fabio.u.krapohl@fau.de>
2019-06-04 20:20:10 +00:00
Fabio Krapohl
8abc1c2668 also use pointer for descriptor in wgpu_command_encoder_begin_render_pass for consistency reasons 2019-06-04 22:13:48 +00:00
Fabio Krapohl
488367ce30 More consistent naming of pointer-size-pairs:
* always plural form without _ptr suffix for pointers
* always same name as pointer for size, but with _length suffix
* special case: single size applies to multiple pointers => only use length as name
2019-06-04 21:41:39 +00:00
bors[bot]
c204199dc2 Merge #192
192: add necessary windows lib files for vulkan, dx12, dx11 r=kvark a=Napokue

Introduce new argument BACKEND to specify the back-end framework in the hello_triangle_c CMake script. I will update the other examples, hello_remote_c & hello_compute_c (working on this one) in a future PR.

fix #188 

Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
2019-05-27 14:41:11 +00:00
Timo de Kort
7bb528186f add DX11 support 2019-05-26 19:46:43 +02:00
Timo de Kort
9b0607973e resolve PR comments
- pass backends from the Makefile to the CMakeLists file
- add check to see if the BACKEND argument is set
- add dbghelp lib file
2019-05-26 18:23:19 +02:00
Timo de Kort
747defd01b add necessary windows lib files for vulkan/dx12
introduce new argument feature-native to specify the back-end framework
2019-05-25 18:42:59 +02:00
Joshua Groves
328e53852a Use required option for glfw3 2019-05-24 23:30:28 -02:30
Bruce Mitchener
b21a0c12af Remove unused variable on Metal code path. 2019-05-24 14:46:11 +07:00
Dzmitry Malyshau
a9063ce3eb Fix RenderPassColorAttachmentDescriptor 2019-05-15 22:38:59 -07:00
Dzmitry Malyshau
f024758e07 Track stencil reference 2019-05-14 11:58:10 -04:00
Dzmitry Malyshau
6a1dcb9565 API update with naming, formats, and extra fields 2019-05-14 10:31:25 -04:00
Rukai
637a0883e7 Handle resize in the triangle example 2019-05-13 20:57:49 +10:00
Dzmitry Malyshau
540451a66d Fix cbindgen macro expansion and CI 2019-05-10 21:55:09 -04:00
Dzmitry Malyshau
5eda162748 Readme update 2019-05-10 20:40:42 -04:00
Dzmitry Malyshau
6ce9cbd679 Remove Rust wrapper and examples 2019-05-10 20:40:42 -04:00
Rukai
16cc03be31 Update deps + upgrade examples to rust 2018 2019-05-07 22:38:41 +10: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
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
41141b1ae0 Wait for fences instead of device idle 2019-04-24 22:42:49 -04:00
psincf
e70b01ccc0
Fix winit event loop in the triangle example 2019-04-22 22:59:25 +02:00
Dzmitry Malyshau
1f4d67aeb2 Track async mapping properly 2019-04-22 13:57:35 -04:00
Dzmitry Malyshau
a3ffa7072a Fix the triangle examples 2019-03-31 20:03:24 -04:00
Dzmitry Malyshau
2ca7fd5077 Fix winit swapchain sizes in examples 2019-03-24 23:50:26 -04: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
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
Aaron Loucks
86e1249949 Add the static lifetime bound to async buffer mapping callbacks
These callbacks are executed outside of the mapping function and could
previously reference data that had been dropped. This fixes the
soundness issues described in #95, but not the buggy mapping
behavior.
2019-03-11 17:11:29 -04:00
Joshua Groves
5322f3c610 Reduce left indentation for nested structs 2019-03-08 07:15:36 -07:00
Joshua Groves
b2c58c7791 Add nested designated initialization 2019-03-07 20:48:37 -07:00
Joshua Groves
580e49f2cf Start rendering C example again 2019-03-07 20:15:12 -07:00
Joshua Groves
510865dd27 Restore GLFW for macOS 2019-03-07 19:19:10 -07:00
Joshua Groves
75ac875902 Start to update C example 2019-03-07 07:43:19 -07:00
Joshua Groves
fa2c2d7457 Combine Apple with other targets 2019-03-07 07:34:27 -07: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
bors[bot]
2d166d2155 Merge #80
80: Typed mapping of buffers r=kvark a=swiftcoder

Add a sprinkling of generics to remove the need for unsafe code to typecast slices resulting from mapping buffers.

Co-authored-by: Tristam MacDonald <tristam@trist.am>
2019-02-28 15:26:21 +00:00
Tristam MacDonald
524ff72fd3 Typed mapping of buffers
Add a sprinkling of generics to remove the need for unsafe
code to typecast slices resulting from mapping buffers.
2019-02-28 06:56:47 -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
b74b7fdd8c Update textureformats in examples 2019-02-28 06:36:45 +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
d631b2c6f2 Fix depth clamping semantics 2019-02-26 22:36:58 -05:00
Tristam MacDonald
8431da80ed Implement map read/write async 2019-02-26 06:45:07 -08:00