Commit Graph
96 Commits
Author SHA1 Message Date
Dzmitry Malyshau 570ee3e864 Version bumps and changelog update 2020-09-02 16:44:01 -04:00
Nathan Adams 881e6c1415 Fix write-only stencil state descriptors from not working - fixes #911 2020-09-02 16:44:01 -04:00
Noah Charlton 10ed72d400 fix typo in vertex format documentation 2020-08-28 14:52:20 -04:00
Dzmitry Malyshau 901b043b19 Version bump to 0.6 and changelog update 2020-08-17 16:51:22 -04:00
Connor Fitzgerald abb3c2f8db Move push constant docs to correct feature 2020-08-16 19:52:53 -04:00
Dzmitry Malyshau 2473c25971 Refactor the stencil state descriptor a bit 2020-08-12 20:04:47 -04:00
Dzmitry Malyshau a0711cf9b2 Move the RenderCommand into the shared draw module 2020-08-12 14:33:42 -04:00
Dzmitry Malyshau 9d8dc0b04d Grand cleanup and refactor of the descriptors in the API 2020-08-12 14:13:32 -04:00
Dzmitry Malyshau 1f5622a0b3 Respect texture view aspect on creation 2020-08-10 16:14:20 -04:00
Dzmitry Malyshau 173c7c3dbf Create implicit layouts for render pipelines 2020-08-09 14:43:44 -04:00
Dzmitry Malyshau f18fa7ef9b Derive bind group layout entries in Naga validation 2020-08-08 01:09:41 -04:00
Kunal Mohan aa44969818 Replace u32 with NonZeroU32 in TextureView 2020-08-05 21:23:25 +05:30
Andrea Nardi acfbbb42b5 Implementation of the builder pattern
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-08-02 05:49:10 +02:00
Kunal Mohan c8360152cd Replace NonZeroU32 with u32 in TextureViewDescriptor 2020-07-30 21:35:07 +05:30
Connor Fitzgerald e5c647745e Implement TEXTURE_COMPRESSION_BC extension 2020-07-29 18:43:50 -04:00
Connor Fitzgerald d5f23f9323 Add builder for TextureDescriptor 2020-07-29 14:28:03 -04:00
Dzmitry Malyshau d2c1e725db Make level and layer count for texture view optional 2020-07-28 22:55:39 -04:00
Dzmitry Malyshau 6e10518f12 Reformat the alignment errors, add a stride check 2020-07-28 11:48:49 -04:00
Connor Fitzgerald 308e72b521 Fix typo in BufferUsage docs 2020-07-22 20:55:08 -04:00
Dzmitry Malyshau 21be559a9f Add depth clamping support 2020-07-22 11:03:36 -04:00
Marvin Löbel 4ed2c0a313 Replace borrowed slices in Descriptor structs with copy on write slices (#822)
* Replace &[T] in descriptor structs with Cow<[T]>

* Changed label fields to use Cow<'a, str>

* Deduplicate types across the tracing API

Introduce the ToStatic trait

* Deduplicate trace::RenderBundleDescriptor

* Remove ugly ToOwned bounds

* Simplifiy Action variants

* Make Clone bounds on type defs less verbose

* Fix a error in play.rs

* Remove ToStatic, and Make Action<'a> borrow descriptors instead
2020-07-20 12:31:05 -04:00
Rukai 3fe9d8872f swap_chain_present returns SwapChainStatus 2020-07-20 21:13:22 +10:00
bootra-dev 215c9fe750 refactor to group by size 2020-07-16 14:00:06 -04:00
bootra-dev ee0e4850fd add size function for VertexFormat 2020-07-16 13:55:34 -04:00
Kunal Mohan 62100584e8 Derive Hash on BindGroupLayoutEntry 2020-07-16 19:47:35 +05:30
bors[bot]andGabriel Majeri fc4baa3107 Merge #795
795: Move `RenderPass*AttachmentDescriptor` types into core r=kvark a=GabrielMajeri

**Connections**
Follow up to #791.

**Description**
I had the impression that these two types were already shared between `wgpu-core` and `wgpu-rs`, considering they were generic. Further investigation reveals that not to be the case.

This PR moves these types into `wgpu-core`, since they're specific to this crate.

**Testing**
Checked with core, player and `wgpu-rs`.

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-14 12:52:27 +00:00
Gabriel Majeri 39ed7a008c Move RenderPass*AttachmentDescriptor types into core 2020-07-14 08:11:20 +03:00
Connor Fitzgerald c8bcc50ed6 Implement PUSH_CONSTANTS feature 2020-07-13 12:47:09 -04:00
Gabriel Majeri f3b80f1d8d Unify wgpu-core and wgpu-rs types 2020-07-13 18:39:49 +03:00
Gabriel Majeri 9cd3d47ce7 Remove non-exhaustive markers 2020-07-12 19:56:04 +03:00
Dzmitry Malyshau e693170aef Rename bindings to entries 2020-07-08 23:41:09 -04:00
Connor Fitzgerald 238e6b74ee Populate limits struct 2020-07-07 16:12:03 -04:00
bors[bot]andGabriel Majeri cfd21d4913 Merge #763
763: Remove raw pointers from the render pipelines API r=kvark a=GabrielMajeri

**Connections**
Rust-ification of API, as part of #689

**Description**
The objective is to get rid of raw pointers in the render pipeline descriptor and associated structures.

**Testing**
Checked with `player` and the `trace` feature, and with `wgpu-rs` with the changes in https://github.com/gfx-rs/wgpu-rs/pull/425

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-07 17:29:37 +00:00
Gabriel Majeri d4eeea8118 Remove pointers from pipelines API 2020-07-07 19:37:04 +03:00
Dzmitry Malyshau 46230720b5 Remove UnsafeFeatures as we decided the top level guard is not useful 2020-07-06 23:46:46 -04:00
Connor Fitzgerald 441b6e0d04 Implement MultiDrawIndirect Extensions 2020-06-27 23:43:23 -04:00
Connor Fitzgerald ac62a11619 Convert Extensions + Capabilities into Features 2020-06-26 00:18:46 -04:00
Rukai 8137934739 Allow intra doc link resolution failures, because they actually succeed when they need to but rust doesnt know 2020-06-24 22:20:22 +10:00
Kunal Mohan 73b079f226 Derive Serialize and Deserialize for HostMap 2020-06-22 13:08:17 +05:30
bors[bot]andNils Hasenbanck 93a34b538d Merge #741
741: Fix the default lod_max_clamp value for the SamplerDescriptor r=kvark a=hasenbanck

**Connections**
As suggested in https://github.com/gfx-rs/wgpu-rs/pull/397

**Description**
The current default value for the ```lod_max_clamp``` of a sampler is 0.
This would deactivate mipmapping alltogether. Setting the default to ```f32::MAX``` makes sure to always enable it. It's the default value apple uses in Metal, it seems to be valid usage in Vulkan (```maxLod``` in ```VkSamplerCreateInfo```) and in DX12 (```MaxLOD``` in ```D3D12_SAMPLER_DESC```).

Co-authored-by: Nils Hasenbanck <nils@hasenbanck.de>
2020-06-21 00:49:09 +00:00
Nils Hasenbanck 1f5a55ea13 Fix the default lod_max_clamp value for the SamplerDescriptor
The current default value for the lod_max_clamp of a sampler is 0.
This would deactivate mipmapping alltogether. Setting it to
f32::MAX makes sure to always enable it. It's the default value apple
uses in Metal, it seems to be valid usage in Vulkan (maxLod in
VkSamplerCreateInfo) and in DX12 (MaxLOD in D3D12_SAMPLER_DESC).
2020-06-20 18:03:51 +02:00
Dzmitry Malyshau 365f4e8786 Remove peek-poke.
There was a lot of highly unsafe use of serialization based on peek-poke that we
weren't entirely happy with. It's replaced by just serializing the passes now.
Also, switch BufferSize to Option<NonZero>.
2020-06-20 00:39:11 -04:00
bors[bot]andDzmitry Malyshau b4410c5d8a Merge #732
732: Dummy workspace crate r=cwfitzgerald a=kvark

Basically, it makes sure that doing `cargo check` locally in the workspace is all you need.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-06-18 19:11:53 +00:00
Dzmitry Malyshau 0cd1ec2981 Dummy workspace crate 2020-06-18 14:16:04 -04:00
Connor Fitzgerald 15d0db8828 wgpu-types documentation pass 2020-06-17 20:38:44 -04:00
Dzmitry Malyshau a27341bd6d Basic support for minBufferBindingSize 2020-06-16 00:34:58 -04:00
Connor Fitzgerald 5a7fb4c1e5 Implement Capability/Extension Split 2020-06-14 02:32:54 -04:00
Dzmitry Malyshau c038c206e7 Add RODS texture binding property 2020-06-12 21:26:19 -04:00
bors[bot]andConnor Fitzgerald 373a1c2bf0 Merge #715
715: Implement SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING r=kvark a=cwfitzgerald

## Connections

Closes #483. Extends support for #106.

## Description

This forwards the descriptor indexing features gfx-hal up to wgpu. 

Note this PR also changes the name of the `TEXTURE_BINDING_ARRAY` to `SAMPLED_TEXTURE_BINDING_ARRAY` to be more consistent with extensions.

## Testing

Texture-array example was simply extended to use descriptor indexing. This works on all platforms that the feature is supported. (thanks @stararawn)



Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-06-12 23:53:37 +00:00
Connor Fitzgerald bfcc369bc7 Implement SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING 2020-06-12 19:52:10 -04:00