Commit Graph
57 Commits
Author SHA1 Message Date
Andreas Reich 822424e519 Fix buffer init in bundle.rs with mem::size_of::<wgt::DrawIndirectArgs> 2021-01-31 22:01:52 +01:00
Andreas Reich da86b3f401 Cleanup, better use of some rust std lib functions 2021-01-31 21:56:31 +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 1efdc2b229 Queue_submit zeros out uninitialized buffer regions now
again but with fine grained scheme now
2021-01-31 21:55:49 +01:00
Andreas Reich 9595b39bb3 Fine grained tracking of buffer init requirements 2021-01-31 21:55:49 +01:00
Dzmitry Malyshau 0346b43982 Update the render pipeline API 2021-01-27 15:09:13 -05:00
Dzmitry Malyshau 7f8c776a85 Update gfx to unborrowed APIs 2021-01-19 00:33:45 -05:00
Connor Fitzgerald a22037ced0 Add pipeline statistics and timeline queries 2021-01-16 00:48:54 -05:00
Mikko Lehtonen 6c56613045 Merge PassErrorScope::Draw* and Dispatch* variants 2021-01-12 22:23:17 +02:00
Mikko Lehtonen 0d60bd80c5 Include pipeline id in some pass error scopes 2021-01-12 17:58:44 +02:00
Dzmitry Malyshau f328995950 Fix UB in populating dynamic offsets 2021-01-04 14:46:04 -05:00
Connor Fitzgerald 1da153f3bd Improve vertex state error messages 2020-12-21 23:13:34 -05:00
Dzmitry Malyshau 394135f725 Fix and improve object labels and command markers 2020-12-15 11:28:11 -05:00
Noah Charlton b71c47a064 Remove extern "C" from set_index_buffer 2020-12-07 17:03:54 -05:00
Dzmitry Malyshau 749f737c89 Add pervasive Naga support to shader module loading
The purpose of the PR is to support Naga modules everywhere.
As a requirement, it updates the gfx-rs version used.
Most of the logic is dedicated towards building a shader interface,
where previously we just used naga's IR. Now we have our own mini-IR.
2020-12-05 11:31:03 -05:00
kejor 4513fb2b83 Match upstream API changes for IndexFormat 2020-12-01 19:19:41 -05:00
Dzmitry Malyshau 9e2f6c2f01 Move to gfx master 2020-11-30 22:50:13 -05:00
Dzmitry Malyshau c6bc37dbde [error] render bundles 2020-11-23 12:00:47 -05:00
Mikko Lehtonen 459e835250 Add Ids to PassErrorScope
Also makes it pub, and the places it is used.
Tweak some error messages.
2020-11-21 23:39:05 +02: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
Marvin Löbel 8723a8379a Annotate all commands of {Compute,Render}Passes with error context informations 2020-11-12 23:05:10 +01:00
Marvin Löbel 752c1aad33 Elide redundant set_pipeline calls.
Add a small abstraction over state changes

Deduplicate redundant pipeline state checking
2020-10-21 19:25:21 +02:00
bors[bot]andDzmitry Malyshau f963193be1 Merge #966
966: Immediate resource destruction and freeing r=cwfitzgerald a=kvark

**Connections**
Fixes #964

**Description**
We are making it so a buffer or a texture can have their native resources freed while they are still referenced, so without waiting for GC.

In addition, the PR adds a few missing cases where error IDs should have been handled, like at render pass encoding.

**Testing**
Tested on wgpu-rs examples, see https://github.com/gfx-rs/wgpu-rs/pull/591

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-10-11 17:10:42 +00:00
PENGUINLIONG 6f4508523a Pass [u8] instead of [u32] for push constants (#918)
* Pass [u8] instead of [u32] for push constants

Use 2-instruction aligner

Fixed alignment

Fixed offsets

Added alignment checks and fixed size

Use semantic constants

* Replaced all magic number with constant

* Fixed type cast
2020-10-08 23:13:18 -04:00
Dzmitry Malyshau 0a7d81351c Handle cases where buffer contents are destroyed 2020-10-08 12:57:17 -04:00
lberrymage 41228ef1a4 Fix clippy warnings about using if-let over match
The specific lint triggered was
https://rust-lang.github.io/rust-clippy/master/index.html#single_match.
2020-09-25 23:02:51 -08:00
Adam Nemecek db1870e7fc use self 2020-09-25 19:11:46 -07:00
Dzmitry Malyshau 0345c56758 Properly implement compute pass usage scopes 2020-09-23 19:01:47 -04:00
Mikko Lehtonen 5fab78e175 Address nits in #897 2020-08-27 22:11:42 +03:00
Mikko Lehtonen dbd6081a8e Improve diagnostics of incompatible attachments 2020-08-26 10:03:44 +03:00
Dzmitry Malyshau 9d8dc0b04d Grand cleanup and refactor of the descriptors in the API 2020-08-12 14:13:32 -04:00
Dzmitry Malyshau dbd7e2c579 Separate valid internal IDs from external ones 2020-08-04 11:16:59 -04:00
Dzmitry Malyshau bf862b7907 Clarity renames according to the Gecko review 2020-07-28 16:58:28 -04:00
Dzmitry Malyshau 6e10518f12 Reformat the alignment errors, add a stride check 2020-07-28 11:48:49 -04:00
Connor Fitzgerald cb485f3798 Convert all logging to tracing and add fmt logger 2020-07-25 19:33:21 -04:00
Andrea Nardi e8a9d70a72 implemented Debug for RenderBundleEncoder
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-22 18:29:42 +02:00
Dzmitry Malyshau 0c00df71b8 Detach MultiRefCount from RefCount completely 2020-07-22 11:27:47 -04:00
Dzmitry Malyshau 82d149b871 Naga update, remove spirv_headers dependency 2020-07-22 11:05:42 -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 a27b24215d Convert the existing error types to thiserror 2020-07-18 07:29:20 +03:00
Gabriel Majeri 6f6893244a Rename InvalidBufferUsage 2020-07-15 17:09:53 +03:00
Gabriel Majeri 7df69b2740 Error message display for RenderCommandError 2020-07-15 15:59:36 +03:00
Gabriel Majeri 52922a7a8f Detailed error messages for render bundle creation 2020-07-15 14:34:18 +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
Connor Fitzgerald f76b631961 Validate set_bind_group is within bounds of limit 2020-07-07 14:41:54 -04:00
Connor Fitzgerald b4f2c02941 Validate dynamic bindings are in-bounds 2020-06-30 22:54:24 -04:00
Connor Fitzgerald 441b6e0d04 Implement MultiDrawIndirect Extensions 2020-06-27 23:43:23 -04:00
Connor Fitzgerald 62a870280f Refine Logging Levels 2020-06-22 02:13:04 -04:00