383 Commits

Author SHA1 Message Date
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]
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]
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]
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
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
Dzmitry Malyshau
aa12e7dc14 Read-only depth-stencil support 2020-06-01 19:54:56 -04:00
Dzmitry Malyshau
321a5cee0f Enforce copy buffer-texture row pitch alignment 2020-06-01 16:51:42 -04:00
Dzmitry Malyshau
7181bfe977 Move BufferSize to wgpu-types 2020-05-30 01:19:42 -04:00
Paul 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
4c448c3fc5
Add a way to destroy a pass by a mutable reference (#647) 2020-05-05 21:52:06 -04:00
Dzmitry Malyshau
fbc533bfee Save bind group layout inside pipeline layouts 2020-05-04 23:46:06 -04:00
Paul Kernfeld
cc2e6db7f5 Make assertions more verbose in src/command
This contributes to #485
2020-05-02 13:16:09 -04:00
Dzmitry Malyshau
9500cfa4f3 Keep Adapter alive by the device 2020-05-01 00:20:54 -04:00
Dzmitry Malyshau
f64b2dd3bb trace: make Id serialization nicer 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau
47f37ad78e trace: player skeleton 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau
622d9ecc74 trace: all the commands 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau
5035ffdfe2 Split limits and private features, add tracing module 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau
5e458b5d45
Separate public usage from internal use (#601) 2020-04-21 09:12:40 -04:00
Dzmitry Malyshau
8eefe269c1 Derive swapchain layout off the load operation 2020-04-16 21:49:24 -04:00
bors[bot]
6b0751f1f8
Merge #586
586: Improve drawing error messages r=kvark a=HalfVoxel



Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2020-04-15 12:59:58 +00:00
Aron Granberg
41a6425fb2 Improve drawing error messages 2020-04-15 02:29:37 +02:00
Aron Granberg
5f6accc206 Improve error messages when passing buffers with the wrong usage flags 2020-04-14 20:18:00 +02:00
Dzmitry Malyshau
3cc4fa51bc Track pipeline layout lifetime 2020-04-14 00:58:30 -04:00
Dzmitry Malyshau
920c00931d Fix tracking of the initial state during replacement.
When multiple "replace" style transitions are happening,
we weren't properly retaining the "first" state, which
is required for proper stitching of command buffers.

This logic is fixed and fortified with a new set of
"change" and "merge" tests in the track module.
2020-04-10 00:39:23 -04:00
Dzmitry Malyshau
74e9e89fe7 Refactor tracking of swapchain images as attachments
We were improperly detecting if a swapchain image has already
been used by a command buffer. In this case, we need to assume
that it's already in the PRESENT state.
2020-04-10 00:38:53 -04:00