Commit Graph
109 Commits
Author SHA1 Message Date
Dzmitry Malyshau 9e2f6c2f01 Move to gfx master 2020-11-30 22:50:13 -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
Mikko Lehtonen a41f7ea78f Make inner errors pub 2020-11-19 23:37:36 +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
Zsolt Bölöny a493ed06d8 Rename OutputAttachment helper struct to RenderAttachment too to avoid confusion 2020-11-08 14:27:44 +01:00
Zsolt Bölöny 2151a252ad Rename TextureUsage::OUTPUT_ATTACHMENT to RENDER_ATTACHMENT 2020-11-08 14:24:39 +01:00
Dzmitry Malyshau a168886497 Add helpers to convert passes to serialized forms 2020-10-27 13:19:05 -04: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
Dzmitry Malyshau 150ee25c01 Align stencil reference flags between pipeline creation and setting 2020-10-14 16:54:15 -04:00
James Gilles 05c58e805b Fix garbled debug markers in render passes 2020-10-13 17:34:25 -04: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
Kunal Mohan a10e5cdb53 Check whether attachments are of same size or not 2020-08-24 23:02:04 +05:30
Kunal Mohan f266431f24 Improve validation in b2b copies and RenderCommands 2020-08-24 21:14:07 +05:30
Dzmitry Malyshau d1da6d8106 Switch gfx-hal to 0.6 2020-08-17 10:34:50 -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 dbd7e2c579 Separate valid internal IDs from external ones 2020-08-04 11:16:59 -04:00
Gabriel Majeri 2f06d3e4f9 Return out of memory condition from render pass 2020-07-29 09:58:46 +03:00
Dzmitry Malyshau bf862b7907 Clarity renames according to the Gecko review 2020-07-28 16:58:28 -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
Dzmitry Malyshau 0c00df71b8 Detach MultiRefCount from RefCount completely 2020-07-22 11:27:47 -04: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 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
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
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
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