Commit Graph
81 Commits
Author SHA1 Message Date
Gordon-F 2873ac32d9 Remove MPL 2.0 header in files 2021-06-19 21:06:08 +03:00
Dzmitry Malyshau 0a82c232ba hal: port the rest of wgpu-core 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau 0ea4cac04b Rework shader and pipeline creation 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau 569cd0cdd6 WIP new wgpu-hal 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau 51c7963195 Use the same MissingFeatures error everywhere 2021-05-17 14:20:17 -04:00
Chandler Newman 904ec7a5ee Add uniform and storage buffer arrays 2021-04-29 00:38:04 -04:00
Dzmitry Malyshau 92886b4995 Validate filtering samplers at BG creation 2021-04-18 10:25:54 -04:00
Dzmitry Malyshau 191f33871b Don't panic on change_extend errors 2021-04-08 12:03:46 -04:00
Dzmitry Malyshau 62ca24580d Add limits for textures sizes and vertex imputs 2021-03-01 12:10:40 -05:00
Dzmitry Malyshau 9bf47dd772 Validate texture bindings 2021-02-15 20:14:23 -05:00
Jakob Hellermann b89cb21ce3 fix rustdoc warnings 2021-02-12 13:56:51 +01:00
Andreas Reich 492027fe6e command buffer buffer memory init tracking is only filled if necessary now 2021-01-31 21:56:22 +01:00
Andreas Reich 9595b39bb3 Fine grained tracking of buffer init requirements 2021-01-31 21:55:49 +01:00
Dzmitry Malyshau c233a70afc Handle zero-sized bindings as an error 2021-01-25 22:33:44 -05:00
bors[bot]andAndreas Reich 8c00cbcc8e Merge #1112
1112: Expose adapter specific formats features via Extension, support for storage read+write r=kvark a=Wumpf

**Connections**
Draft until https://github.com/gfx-rs/gfx/pull/3559 landed (then update and comment two lines in)
New & improved replacement for #1109

PR for wgpu-rs to be opened once there's some confidence that this is that it should look like. [Preview](https://github.com/gfx-rs/wgpu-rs/compare/master...Wumpf:texture-format-feature-query?expand=1)

**Description**
Adapter exposes now per texture format specific features. Feature struct defined as allowed usages + flags. Flags describe only storage texture usage so far.

Query not used for validation unless `TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES` feature is enabled on a device. Otherwise uses hardcoded feature set guaranteed by webgpu.
Storage read/write binding can then be used as a consequence (storage atomic has no effect yet).

**Testing**
Manual testing with my fluid sim project through wgpu-rs which covers storage r/w for a few different formats and storage in general for formats that don't support this usage by default at all.
Ran tests and a couple of samples to see if anything broke with the feature disabled.

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-01-06 18:56:30 +00:00
Andreas Reich 9770959577 Fixed error message for BindingTypeMaxCountError
Previously, it would incorrectly report the binding count as the violated limit. Now it reports both the limit and the count that violated it.
2021-01-02 15:13:52 +01:00
Andreas Reich 4207e57c02 validation against adapter specific format features
TextureFormatFeatures is now a struct of two u32 flags. Query happens only at texture creation time
2020-12-30 10:38:55 +01:00
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