Commit Graph
177 Commits
Author SHA1 Message Date
yanchith 141f4f71eb Validate resource usage flags when used 2019-09-09 15:44:15 +02:00
Dzmitry Malyshau 988d78435a Switch to use gfx-rs latest and greatest master 2019-09-06 10:05:53 -04:00
Dzmitry Malyshau d37ecdf248 Handle frame acquisition failure internally 2019-08-29 22:27:21 -04:00
Dzmitry Malyshau b414b9f373 Formatting pass 2019-08-27 21:11:07 -04:00
Dzmitry Malyshau e84ae4a4b2 Feature-less backend selection
This PR removes optional backend features in favor of run-time
selection at the `request_adapter` entry point. Adapters from all
supported gpu backends on the platform are reported.

It also makes gfx-rs dependency to be public (for now).
2019-08-27 20:55:49 -04:00
Layl 1995280dc9 Add cubemap hint to 2D multiple of 6 layers textures 2019-08-23 18:02:53 +02:00
Dzmitry Malyshau a9cfde1d9d Fixed pipeline barriers that are not transitions 2019-08-21 13:11:46 -04:00
Rukai 460c90e8e2 Fix sample_mask field 2019-08-17 23:51:25 +10:00
Dzmitry Malyshau f82ceba3c2 Minor renames to address the review comments 2019-08-16 22:36:30 -04:00
Dzmitry Malyshau 37afa0d98a Update API according to the upstream spec
Includes changes in texture view creation, enumeration mapping,
binding types, and more.
2019-08-15 23:24:35 -04:00
Rukai e61b16f7ed Update to gfx hal 0.3 2019-08-11 09:39:52 +10:00
Yanchi Toth 186fbeec36 Validate bind group buffer ranges (#268)
* Validate bind group buffer range

The bound buffer range must fit in the the buffer size.
2019-08-07 11:13:57 -04:00
Dzmitry Malyshau e42fb0ed44 Run-time lock protection against double root 2019-07-23 23:46:32 -04:00
bors[bot]andNoah Hüsser 32399cff8a Merge #245
245: Make `PresentMode` configurable. r=kvark a=Yatekii



Co-authored-by: Noah Hüsser <yatekii@yatekii.ch>
2019-07-17 00:47:08 +00:00
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]andDzmitry Malyshau 183058d618 Merge #237
237: Enforce the HUB lock order r=grovesNL a=kvark

Fixes #66
cc @jrmuizel @m4b

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-07-05 03:27:11 +00:00
Dzmitry Malyshau 1ed15f94dc Add some more comments about Access and Token' 2019-07-04 23:02:22 -04:00
John W. Bruce 25834b0312 Derive Debug for All Remaining Types
With gfx-hal 0.2.1 and the various backend releases on 2019-06-28, all
of the gfx-hal types that wgpu depends on implement Debug. Thus, some
types that could not derive Debug in #216 can now derive Debug.

This patch also adds Debug implementations for a few types that were
recently added to wgpu.

Fixes #76.
2019-07-04 17:49:21 -07:00
Dzmitry Malyshau 6085dcf33b Enforce the HUB lock order 2019-07-04 14:43:54 -04:00
Rukai 194943c12c Full MSAA handling 2019-06-23 22:17:42 +10:00
Rukai 45923755ba Implement sample_count field 2019-06-18 11:55:03 +10:00
Rukai 15488dfa1e Fix descriptor sets free validation error 2019-06-17 21:01:56 +10:00
Dzmitry Malyshau 917154a49d Debug tracking derives and regular optimization 2019-06-14 14:05:27 -04:00
Dzmitry Malyshau 3da6c9f65b Fix texture view extent, improve docs according to the review 2019-06-14 10:20:13 -04:00
Dzmitry Malyshau 86521abfc2 Document the tracking and adjust the API a bit to return less errors 2019-06-13 12:31:36 -04:00
Dzmitry Malyshau d92b623bd8 Remove the old tracking code, update local feature and the headers 2019-06-12 12:29:28 -04:00
Dzmitry Malyshau bc7b842f12 Moving the code to use the new tracker API 2019-06-12 12:27:53 -04:00
Dzmitry Malyshau 0dcd0c449d Parametrize Tracker by a state of a resource, add new plane tracker 2019-06-12 12:20:23 -04:00
bors[bot]andRukai d69955b612 Merge #220
220: Free descriptor sets r=kvark a=rukai

Tested on https://github.com/rukai/brawllib_rs, wgpu examples and wgpu-rs examples.
Closes: https://github.com/gfx-rs/wgpu/issues/217

My approach was to just implement descriptor set tracking the same way textures and buffers are implemented.

Co-authored-by: Rukai <rubickent@gmail.com>
2019-06-10 17:01:45 +00:00
Rukai 59388e329f Free descriptor sets 2019-06-10 16:02:46 +10:00
John W. Bruce 057719fdf5 Add Naïve Debug Derives Where Possible
This adds #[derive(Debug)] to all public structs and enums possible.
This also required adding it to some private types that they
transitively depend on. However, the following types depend on types
from external crates that do not implement Debug:

* device::Device
* hub::Hub
* swap_chain::Surface
* swap_chain::SwapChain

To support these types, we would need to use either custom Debug impls
or something like Derivative.

This helps improve the situation in #76.
2019-06-07 14:19:05 -07: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
Rukai 4ad3d418c2 Ensure wait_for_fences is never called on 0 fences 2019-06-03 23:07:42 +10:00
Bruce Mitchener 88463810dd Fix typos. 2019-06-03 14:31:17 +07:00
Alexis Sellier 6794333dba Expose and validate buffer offset alignment 2019-06-01 20:25:12 +02:00
Dzmitry Malyshau 97e630f320 Fix Rendy memory selection 2019-05-31 13:53:26 -04:00
Dzmitry Malyshau 351432aae2 hook up rendy-memory 2019-05-30 13:34:43 -04:00
Dzmitry Malyshau 9c408f919c Hook up rendy-descriptor 2019-05-30 08:35:34 -04:00
Dzmitry Malyshau d01509e9a2 Fix Storage textures/buffers support 2019-05-29 23:50:29 -04:00
Dzmitry Malyshau 2614efba7c Protect mapped buffers from early destruction 2019-05-29 23:50:29 -04:00
Dzmitry Malyshau 9621fb3021 Validate vertex/instance/index buffer ranges 2019-05-29 23:49:27 -04:00
Dzmitry Malyshau bd167f8fc5 Fix semaphore iteration on submit 2019-05-17 01:31:51 -04:00
bors[bot]andDzmitry Malyshau a056d2478a Merge #175
175: API update with naming, formats, and extra fields  r=grovesNL a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-05-15 07:31:42 +00:00
Dzmitry Malyshau 1875523a6a Rust formatting pass 2019-05-14 13:00:00 -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 5597846018 Update to gfx-hal 0.2 2019-05-13 11:07:28 -04:00
Dzmitry Malyshau 8c75f35948 Fix locking order in texture view creation and destruction 2019-05-10 15:57:25 -04:00
bors[bot]andDzmitry Malyshau 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