383 Commits

Author SHA1 Message Date
Mikko Lehtonen
019dca3cfa Error formatting impls closer to errors
This is achieved by making a ErrorFormatter helper that is passed to
fmt_pretty, making the impls a lot simpler.
2021-08-03 11:51:52 -04:00
Dzmitry Malyshau
552a5f138e Rename texture usage names 2021-07-28 00:17:54 -04:00
Dzmitry Malyshau
34b68121c6 Check bundle RODS against pass RODS 2021-07-23 11:24:05 -04:00
Dzmitry Malyshau
1a9a855ea9 Rename InputStepMode to VertexStepMode 2021-07-21 17:48:00 -04:00
Dzmitry Malyshau
00859b9e0c Stop using render pass boundary usages for resource transitions 2021-07-13 01:02:42 -04:00
Dzmitry Malyshau
81f31f5555 hal: change blend color argument 2021-07-13 01:01:30 -04:00
bors[bot]
5c2e40c6ed
Merge #1636
1636: Rename StoreOp::Clear to StoreOp::Discard r=kvark a=Wumpf

(recent change in spec)

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-07-12 16:47:19 +00:00
Andreas Reich
f5a4cbc0e1 Rename StoreOp::Load to StoreOp::Discard
(recent change in spec)
2021-07-12 18:06:15 +02:00
Benoît du Garreau
e7269e72f3 Upgrade arrayvec to 0.7 2021-07-06 00:45:24 +02:00
Dzmitry Malyshau
ba006cfaa7 Rename ColorWrite, TextureUsage, and BufferUsage 2021-06-30 14:57:38 -04:00
Dzmitry Malyshau
568ac3fa24 Switch all bitflag names to plural 2021-06-30 14:43:36 -04:00
Dzmitry Malyshau
4be8864b38 hal/gles: totally rework the vertex data binding 2021-06-30 02:31:13 -04:00
Dzmitry Malyshau
952173efde Enable Gles backend, add checks for downlevel flags 2021-06-30 02:29:28 -04:00
Dzmitry Malyshau
51dd90b1ab hal/gles: render passes 2021-06-30 02:29:27 -04:00
Dzmitry Malyshau
cfed43face Update submission indices on all stateless resources 2021-06-24 01:40:18 -04:00
Dzmitry Malyshau
c2f879b4f7 Don't merge stateless trackers from bind groups 2021-06-23 15:28:40 -04:00
Gordon-F
2873ac32d9 Remove MPL 2.0 header in files 2021-06-19 21:06:08 +03:00
Dzmitry Malyshau
9d85602349 hal: re-architect command encoding and pooling 2021-06-14 13:30:28 -04:00
Dzmitry Malyshau
c2bb2d5dfc Experimental command pool API 2021-06-14 01:58:09 -04:00
Dzmitry Malyshau
a0b51ce35c hal: remove the cows 2021-06-08 15:18:06 -04:00
Dzmitry Malyshau
ff2a3e84fc update synchronization, fix last errors in wgc 2021-06-08 02:03:44 -04:00
Dzmitry Malyshau
0a82c232ba hal: port the rest of wgpu-core 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau
569cd0cdd6 WIP new wgpu-hal 2021-06-08 00:46:08 -04:00
bors[bot]
9cd01635d7
Merge #1417
1417: Split the tracker into stateful/stateless to reduce the overhead r=cwfitzgerald a=kvark

**Connections**
Implements https://github.com/gfx-rs/wgpu/issues/1413#issuecomment-851604344
Reduces the overhead for resource tracking in the Animometer benchmark by up to 50%.

**Description**
We used to use the full tracker set on the usage scopes associated with compute/render passes. A resource tracker has 2 responsibilities: ensuring the resource is held alive, and validating and recording the state transitions. This PR exploits the fact that the latter responsibility is only applicable for buffers and textures. So doing all the lifetime tracking for a pass is a waste: we can instead just attach the lifetimes to the parent command buffer, straight.

In the Animometer benchmark, there is one large buffer, and thousands of bind groups pointing to different offsets into it. The old code would fill up the pass tracker with those bind groups, and then merge it into the command buffer tracker. The new code would just fill up the command buffer tracker instead. Since there is only one buffer, the pass tracking becomes much lighter.

**Testing**
Untested. It would be nice to have some benchmarks here, possibly after #1397 ?

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-06-01 06:45:05 +00:00
Dzmitry Malyshau
7b7e72b1c2 Split the tracker into stateful/stateless to reduce the overhead 2021-05-31 14:18:44 -04:00
Dzmitry Malyshau
e9d2f402f1 Improve handling of erroring command buffers on submission 2021-05-20 15:35:14 -04:00
Dzmitry Malyshau
314ed4cce5 Trace render passes before they are ran 2021-05-20 11:43:39 -04:00
Dzmitry Malyshau
ab78f3cf16 Check render target aspects 2021-05-19 00:42:20 -04:00
Dzmitry Malyshau
58b83f3ff6 Add extern-C on wgpu_render_pass_execute_bundles 2021-05-11 15:00:49 -04:00
Dzmitry Malyshau
6ff618aafb Big refactor of the profiling usage 2021-04-29 02:06:58 -04:00
Dzmitry Malyshau
8505a39f6a Make implicit ids actually errors to start with 2021-04-20 17:32:40 -04:00
Dzmitry Malyshau
c744582052 Update blending API names 2021-04-15 11:25:04 -04:00
Dzmitry Malyshau
191f33871b Don't panic on change_extend errors 2021-04-08 12:03:46 -04:00
adamnemecek
d91ad13482 framecapture 2021-04-01 12:51:50 -07:00
Joshua Groves
a5693ab2a3 Rename color/depth attachments to match spec
- Rename `ColorAttachmentDescriptor` to `RenderPassColorAttachment`
- Rename `DepthStencilAttachmentDescriptor` to `RenderPassDepthStencilAttachment`
- Rename `attachment` fields on both attachments to `view`
2021-03-23 09:31:59 -02:30
Joshua Groves
306eaf3969 Fix some typos 2021-03-23 01:01:32 -02:30
Dzmitry Malyshau
9673635125 Add sample count to framebuffer key 2021-03-17 12:13:11 -04:00
Connor Fitzgerald
cf6f9c3ca8 Move from tracing to log + profiling 2021-03-17 01:22:30 -04:00
Dzmitry Malyshau
231bba03a1 Lint all the things 2021-03-12 12:39:04 -05:00
Dzmitry Malyshau
d0dcb105f5 Don't check the index format for non-indexed calls 2021-02-06 10:58:46 -05:00
Dzmitry Malyshau
262d0c6dfc Isolate binding compatibility logic into a separate module 2021-02-04 01:16:40 -05:00
Andreas Reich
018ad05f56 memory init tracker check (previous is_initialized) clamps range now
and is O(log n)!
2021-01-31 21:56:31 +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
Andreas Reich
6b51328b2e Add public structs for indirect command buffers
and fix missing IndirectBufferOverrun error for IndirectDispatch
2021-01-31 21:32:33 +01:00
Dzmitry Malyshau
4764ff21e9 Update gfx with the new iterator API 2021-01-28 12:40:24 -05:00
Dzmitry Malyshau
0346b43982 Update the render pipeline API 2021-01-27 15:09:13 -05:00
Dzmitry Malyshau
c233a70afc Handle zero-sized bindings as an error 2021-01-25 22:33:44 -05:00