Commit Graph
64 Commits
Author SHA1 Message Date
Dzmitry Malyshau 10c11d718d Replace gfx-descriptor by gpu-descriptor 2020-11-30 21:48:04 -05:00
Dzmitry Malyshau 5949dec61d Update bind group layout API to match upstream 2020-11-28 00:30:27 -05:00
Dzmitry Malyshau 46b87e220c Stop using Borrow<RefCount> 2020-11-21 10:38:20 -05:00
Mikko Lehtonen 4498f172cc Retain labels for resources
As a braking api change, adds also label for the error id generation,
for labeling invalid ids too.

Also adds query methods the label.
2020-11-19 00:09:21 +02:00
Dzmitry Malyshau 0a7d81351c Handle cases where buffer contents are destroyed 2020-10-08 12:57:17 -04:00
Dzmitry Malyshau 962e4dbaf7 Defer bind group creation to after validation 2020-10-07 16:14:25 -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 55064ace4c New get_bind_group_layout functions 2020-08-09 18:33:47 -04:00
Dzmitry Malyshau dbd7e2c579 Separate valid internal IDs from external ones 2020-08-04 11:16:59 -04:00
Dzmitry Malyshau 6e10518f12 Reformat the alignment errors, add a stride check 2020-07-28 11:48:49 -04:00
Gabriel Majeri 7cf9970121 Error handling for device functions 2020-07-24 22:56:51 +03:00
Dzmitry Malyshau 0c00df71b8 Detach MultiRefCount from RefCount completely 2020-07-22 11:27:47 -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
Gabriel Majeri 3d3cb2b55d Remove error logging from binding_model 2020-07-18 11:30:59 +03:00
Gabriel Majeri a27b24215d Convert the existing error types to thiserror 2020-07-18 07:29:20 +03:00
bors[bot]andAndreas Reich 71e853d6ce Merge #798
798: Fixed storage buffer counting towards storage textures for binding validation r=kvark a=Wumpf

See title.
(broke my group layout creation since my compute shaders need quite a few storage buffers _and_ storage textures bound... ;-))

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2020-07-16 14:33:40 +00:00
Andreas Reich ace186623e Fixed storage buffer counting towards storage textures for binding validation 2020-07-15 22:56:30 +02:00
Gabriel Majeri 7df69b2740 Error message display for RenderCommandError 2020-07-15 15:59:36 +03:00
Gabriel Majeri b7dd6a194f Implement Display for BindError 2020-07-15 14:32:07 +03:00
Gabriel Majeri 1b03fbe9be Safe error handling for commands API 2020-07-14 11:40:54 +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 36fa3b81b4 Validate BindGroup based limits 2020-07-07 23:27:42 -04:00
Connor Fitzgerald 1d5d7ddc40 Validate PipelineLayout based limits 2020-07-07 23:26:23 -04:00
Connor Fitzgerald b4f2c02941 Validate dynamic bindings are in-bounds 2020-06-30 22:54:24 -04:00
Dzmitry Malyshau e3280aa643 Deduplicate BindGroupLayout by value 2020-06-27 11:13:18 -04:00
Connor Fitzgerald ac62a11619 Convert Extensions + Capabilities into Features 2020-06-26 00:18:46 -04:00
bors[bot]andDzmitry Malyshau c7be94047d Merge #739
739: Remove Peek-Poke r=cwfitzgerald a=kvark

**Connections**
Related to https://github.com/gfx-rs/wgpu/issues/738
Related to https://github.com/djg/peek-poke/issues/10

**Description**
As of #726 , the buffers have a minimum binding size that has to include the shader struct size. It, therefore, can't be zero.
We can remove the hacks we had previously and switch fully to the idiomatic `Option<NonZeroU64>`.

Peek-poke doesn't `NonZeroU64` and friends, so this made me reconsider the user of it entirely. Today, render bundles as well as the Player already represent command streams using a much rustier method. I tried to move everything to this method now, and I think this is going to work much better, and safer.

**Testing**
wgpu-rs works - https://github.com/gfx-rs/wgpu-rs/pull/396

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-06-20 17:52:29 +00:00
Gabriel Majeri 69b41dc0d3 Validate sampler type in create_bind_group 2020-06-20 17:29:58 +03: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
Dzmitry Malyshau 58de765961 Always use DepthStencilReadOnlyOptimal for sampled depth 2020-06-15 17:45:19 -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
Connor Fitzgerald 57b3b72571 Implement TEXTURE_BINDING_ARRAY extension 2020-06-10 22:35:25 -04:00
Dzmitry Malyshau 15cdc794fa Shader binding validation 2020-06-05 12:48:34 -04:00
Dzmitry Malyshau 534d7ac504 Validate pipeline layout creation 2020-06-05 12:48:34 -04:00
Dzmitry Malyshau f158709dd0 Validate bind group layouts 2020-06-05 12:48:34 -04:00
Dzmitry Malyshau 7181bfe977 Move BufferSize to wgpu-types 2020-05-30 01:19:42 -04:00
Paul KernfeldandPaul Kernfeld d529526e7f "Use the whole buffer" is !0, not 0 (#663)
* "Use the whole buffer" is !0, not 0

Fixes #654
Applies to BufferBinding, set_vertex_buffer, set_index_buffer

* Add BufferSize type alias

* Make BufferSize a transparent type

Add a custom serialization "buddy" type
Use BufferSize::WHOLE instead of crate::WHOLE_SIZE

* Move SerBufferSize into device::trace mod

Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2020-05-26 13:25:06 -04:00
Dzmitry Malyshau fbc533bfee Save bind group layout inside pipeline layouts 2020-05-04 23:46:06 -04:00
Dzmitry Malyshau 0e533547a1 Split serde feature into trace+replay 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 3cc4fa51bc Track pipeline layout lifetime 2020-04-14 00:58:30 -04:00
Dzmitry Malyshau a3aefe2535 Rustfmt stable pass 2020-04-06 08:55:39 -04:00
Joshua Groves f3bb6eb230 Move more types to wgpu-types 2020-03-27 23:26:17 -02:30
Dzmitry Malyshau 8aeeb8e318 Port to gfx-extras and gfx-hal-0.5 2020-03-27 00:54:01 -04:00