Commit Graph
265 Commits
Author SHA1 Message Date
Dzmitry Malyshau 35ee65707f hal: make copy to work on one array layer at a time 2021-07-13 01:01:26 -04:00
bors[bot]andAndreas Reich 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 91df157462 Refactor downlevel support a bit, implement blending for hal/gles 2021-06-30 02:29:28 -04:00
Dzmitry Malyshau 51dd90b1ab hal/gles: render passes 2021-06-30 02:29:27 -04:00
Andreas Reich b44b5eded9 Fix query stride handling
Fixes #1374
2021-06-27 11:20:38 +02: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 7410b700d6 fix swapchain recycling, copies, device destruction, RODS 2021-06-16 23:18:50 -04:00
Dzmitry Malyshau 00de15990e hal/vk: pipeline creation 2021-06-15 01:24:25 -04: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 d88aa99997 Fix rows-per-image treatment, clippy warnings 2021-06-10 15:43:21 -04:00
Dzmitry Malyshau 006f8abbba build and clippy fixes, command buffer cleanup 2021-06-10 12:44:29 -04:00
Dzmitry Malyshau 782c72d32c hal/mtl: queue 2021-06-10 10:54:06 -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 c61ee1262b hal: transfer operations 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau 6d51fab864 hal:: Fill the command buffer calls 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau 738ae2b227 Surface API 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau 569cd0cdd6 WIP new wgpu-hal 2021-06-08 00:46:08 -04:00
Andreas Reich 99e691932d add clear buffer/image to wgpu-rs api 2021-06-05 11:49:13 +02:00
bors[bot]andDzmitry Malyshau 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
bors[bot]andDzmitry Malyshau c332c7fffe Merge #1403
1403: Trace render passes before they are ran r=cwfitzgerald a=kvark

**Connections**
Follow-up to #1245 

**Description**
We want the API traces to reproduce issues. Previously, we moved all the resource creation to happen after the trace is written.
This PR follow-up by also recording the render pass commands even in the case where one of them triggers a validation error.

Another big part of the PR now is handling the command buffers that failed for some reason. The submission is skipping them now instead of erroring the whole thing.

**Testing**
Tested manually on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-06-01 06:31:28 +00:00
Dzmitry Malyshau 7b7e72b1c2 Split the tracker into stateful/stateless to reduce the overhead 2021-05-31 14:18:44 -04:00
Wumpf f62d0d5edc Native Extension: Expose fill buffer & clear image (#1335)
* Add command buffer fill buffer method

* Added test for buffer fill

* Added image clear + test

* image/buffer clear methods are now pure clear to zero

* fix cargo clippy & int type issues

* clear buffer alignment is now given by COPY_BUFFER_ALIGNMENT

* joined buffer/image clear player tests

* ImageSubresourceRange is now used in TextureViewDescriptor
2021-05-30 11:03:33 -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 f861e83df1 Fix wgpu_render_bundle_draw_indexed_indirect 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
Connor Fitzgerald 3073a454ff Update to flag-based downlevel bools 2021-04-01 11:48:09 -04:00
Connor Fitzgerald fca72f54f9 Validate compute shader's presence 2021-03-31 01:08:53 -04: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
bors[bot]andJoshua Groves fb0288a377 Merge #1279
1279: Fix some typos r=kvark a=grovesNL

**Description**
Fix a few small typos in doc comments

**Testing**
None

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2021-03-23 06:44:11 +00:00
Joshua Groves 306eaf3969 Fix some typos 2021-03-23 01:01:32 -02:30
Joshua Groves 9058f3ba62 Rename copy views and layout to match spec 2021-03-23 00:48:42 -02:30
Andreas Reich 720c73fa9c Review feedback / fix validate_linear_texture_data 2021-03-21 09:01:31 +01:00