Commit Graph
38 Commits
Author SHA1 Message Date
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
Aaron Loucks fdcf9e7067 Add inital debug labels
- bind group
- bind group layout
- command encoder
- texture
2020-03-24 19:43:11 -04:00
Dzmitry Malyshau 272e423a5c Improve shutdown cleanup (#532) 2020-03-24 18:03:25 -04:00
bors[bot]andDzmitry Malyshau d3e47fc5ae Merge #521
521: Texture component type r=kvark a=kvark

Matching the upstream spec...

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-17 16:58:34 +00:00
Dzmitry Malyshau c4e3fb4d36 Add texture component type field to BGL entry 2020-03-16 12:02:26 -04:00
Dzmitry Malyshau 7f966be455 Update naming of bindings to entries 2020-03-16 10:06:54 -04:00
Dzmitry Malyshau 095f320470 Wholesome spec update.
Biggest change is that buffer binding is done one by one. There is a number of renamings of the fields, also the binding types are expanded.
2020-03-13 23:59:05 -04:00
Joshua Groves 24caf76765 Rename serde feature 2020-03-10 23:19:45 -02:30
Joshua Groves 9940aef599 Move some types into shared wgpu-types crate 2020-03-10 22:36:23 -02:30
Istvan Miklos 38ba0e625a Serialize BindGroupBinding 2020-01-28 12:47:23 +01:00
Istvan Miklos 0fdf77feb5 Make BindGroupLayoutBinding Serializable 2020-01-14 12:43:58 +01:00
Dzmitry Malyshau bf8c9fe27b Make device tracker to be the last home for destroyed resources 2020-01-08 18:13:43 -05:00
yanchith e9545c93ed Deduplicate Bind Group Layouts on creation
To make later bind group layout compatibility checks simpler (and
cheaper), deduplicate them on creation. If two bind group layouts with
same descriptors are requested, only one is created and the same id is
returned for both.
2019-12-17 18:32:33 +01:00
Dzmitry Malyshau 0569bc6956 Initialize trackers with full selector 2019-11-18 00:21:13 -05:00
Dzmitry Malyshau 6c632d1366 Separate native from the core 2019-11-16 00:36:23 -05:00