Commit Graph
102 Commits
Author SHA1 Message Date
bors[bot]andIvan Mironov 3f1abf571e Merge #908
908: Clarify usage of SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING r=cwfitzgerald a=im-0

**Connections**
https://github.com/gfx-rs/wgpu-rs/pull/540

**Description**
This clarifies usage of SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING with GLSL.

**Testing**
This commit only changes documentation.

Co-authored-by: Ivan Mironov <mironov.ivan@gmail.com>
2020-09-02 20:43:32 +00:00
bors[bot]andNoah Charlton 6df8421f22 Merge #909
909: Add Quad play test r=kvark a=DevOrc

**Connections**
#807 

**Description**
Adds a play test that renders a white quad to a texture. The texture is then copied to a buffer and checked for accuracy with a file of expected bytes (All 0xFF). 

**Testing**
Cargo test succeeds

Co-authored-by: Noah Charlton <ncharlton002@gmail.com>
2020-09-01 20:18:21 +00:00
Noah Charlton d05d1aeec1 Add Quad play test 2020-09-01 16:07:24 -04:00
Nathan Adams 0e94752749 Fix write-only stencil state descriptors from not working - fixes #911 2020-08-30 23:33:09 +02:00
Ivan Mironov 9557ab36a6 Clarify usage of SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING 2020-08-30 00:47:00 +05:00
Dzmitry Malyshau b5475d7d80 Update naga to 4797773152 2020-08-26 15:35:14 -04:00
Justin Shrake 19eeee27ee Add AddressMode::ClampToBorder behind a feature 2020-08-22 13:23:50 -07:00
bors[bot]andNoah Charlton 961140fb24 Merge #883
883: fix typo in vertex format documentation r=kvark a=DevOrc

**Connections**
None
**Description**
fix typo in vertex format documentation

**Testing**
Ran `cargo doc`


Co-authored-by: Noah Charlton <ncharlton002@gmail.com>
2020-08-18 14:59:05 +00:00
Noah Charlton c58ee9c54e fix typo in vertex format documentation 2020-08-18 10:28:42 -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