Commit Graph
131 Commits
Author SHA1 Message Date
Dzmitry Malyshau dbd7e2c579 Separate valid internal IDs from external ones 2020-08-04 11:16:59 -04:00
Dzmitry Malyshau 3291b72368 Update naga and fix type widths 2020-07-31 23:46:19 -04:00
Connor Fitzgerald 00a5be7f7b Fix multi-layer copies 2020-07-30 16:58:29 -04:00
Connor Fitzgerald e5c647745e Implement TEXTURE_COMPRESSION_BC extension 2020-07-29 18:43:50 -04:00
Gabriel Majeri 2f06d3e4f9 Return out of memory condition from render pass 2020-07-29 09:58:46 +03:00
Gabriel Majeri e860dd995f Handle command pool creation error 2020-07-29 09:56:42 +03: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
Connor Fitzgerald b9498952a1 Fix push constant pipeline invalidation 2020-07-24 18:19:36 -04:00
bors[bot]andDzmitry Malyshau 0591c48fd2 Merge #833
833: Switch pipeline flag to mutation of depth/stencil r=startoaster a=kvark

**Connections**
Reported on the matrix

**Description**
If the pass mutates depth/stencil, but the pipeline doesn't, it's not a bug!

**Testing**
on it...

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-24 02:26:50 +00:00
Dzmitry Malyshau 33d6eff6c9 Switch pipeline flag to mutation of depth/stencil 2020-07-23 22:24: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 04b0b4d3a5 Error type for command_encoder_finish 2020-07-18 10:46:47 +03:00
Gabriel Majeri a27b24215d Convert the existing error types to thiserror 2020-07-18 07:29:20 +03:00
Rukai de0ac2ccb7 Fix rods error check 2020-07-17 19:31:45 +10:00
bors[bot]andGabriel Majeri a0ed09a6a8 Merge #796
796: Safe error handling for command API r=kvark a=GabrielMajeri

**Connections**
Part of #638 

**Description**
Initially started to remove assertions from the `bundle.rs` file, but ended up implementing safe error handling for the whole `command` module.

**Testing**
Checked with core and player.

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-15 20:54:32 +00:00
Gabriel Majeri 6f6893244a Rename InvalidBufferUsage 2020-07-15 17:09:53 +03:00
Gabriel Majeri 8e9a7bd3a9 Detailed error messages for compute errors 2020-07-15 17:06:46 +03:00
Gabriel Majeri a8608d8bcd Rename error variants 2020-07-15 17:06:36 +03:00
Gabriel Majeri 151e300635 Detailed messages for RenderPassError 2020-07-15 16:48:58 +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
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 1b03fbe9be Safe error handling for commands API 2020-07-14 11:40:54 +03: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 98e4f73a10 Error handling for data transfer API 2020-07-10 21:50:22 +03: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
bors[bot]andKunal Mohan 177a0b39ac Merge #747
747: Custom implement Debug for RenderCommand and ComputeCommand r=kvark a=kunalmohan

This would avoid unnecessarily long debug logs for Render and Compute passes to some extent. I am not sure if it would be helpful to print `dynamic_offsets` and `string_data` under `BasePass` without the content of related `Compute/Render Command`.
<!--**Connections**
_Link to the issues addressed by this PR, or dependent PRs in other repositories_

**Description**
_Describe what problem this is solving, and how it's solved._
This would avoid 
**Testing**
_Explain how this change is tested._

Non-trivial functional changes would need to be tested through:
  - [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples.
  - [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity.

Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications.
See https://github.com/gfx-rs/wgpu/pull/666 for an example.
If you can add a unit/integration test here in `wgpu`, that would be best.
-->


Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
2020-06-24 14:39:00 +00:00
Dzmitry Malyshau 0ed90d001b Tweak the logging a bit to make debug level usable 2020-06-24 10:26:43 -04:00
Kunal Mohan 421aa79364 Custom implement Debug for RenderPass and ComputePass 2020-06-24 10:55:46 +05:30
Connor Fitzgerald 62a870280f Refine Logging Levels 2020-06-22 02:13:04 -04:00
Connor Fitzgerald c1f0021a05 Add Chrome Backend 2020-06-20 20:55:59 -04:00
Connor Fitzgerald 1b2cf3cd22 Add Tracing and Instrument Entry Points 2020-06-20 14:26:50 -04: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
Nikita Krupitskas eaf2acb43a Implement debug marker support 2020-06-17 00:05:52 +03:00
Dzmitry Malyshau c038c206e7 Add RODS texture binding property 2020-06-12 21:26:19 -04:00
Dzmitry Malyshau 8ebfdb0c34 Rewrite the render attachment tracking using the new prepend() operation. 2020-06-12 19:54:50 -04:00
Dzmitry Malyshau 7aa5753701 Re-architecture the bundles using normalized command streams.
This is a major change in how the bundles are implemented. Instead of
transparently injecting them into the pass command stream, we are now
treating bundles as first-class API objects and API tracing them
accordingly. The bundle contains a normalized command stream that is
very easy to inject into a native command buffer multiple times.
2020-06-11 15:34:45 -04:00
Dzmitry Malyshau afc4517db1 Render bundle reset states, updated descriptors 2020-06-11 15:28:55 -04:00
Dzmitry Malyshau fbf35e43a6 Render bundles 2020-06-11 15:28:55 -04:00
Connor Fitzgerald 27ffe5026b Implement buffer to any copy bounds checking 2020-06-08 11:24:33 -04:00
Dzmitry Malyshau b5c38ae40d Prevent internal thread from cleanup 2020-06-04 22:45:59 -04:00