Commit Graph
2124 Commits
Author SHA1 Message Date
Dzmitry Malyshau 70154373f8 Fix indirect buffer access flags 2020-05-22 16:25:09 -04:00
yanchith 58a60392c2 Fix possible out-of-bounds when trace log level enabled
Also, even when there was no out-of-bounds access, the log statement talked
about an incorrect submission index.
2020-05-17 12:17:36 +02:00
Dzmitry Malyshau 8b9ddbfbca Vecmap dependency update to 0.8.1 2020-05-15 10:41:20 -04:00
Dzmitry Malyshau 4c62b20282 Multiple fixes and clean ups.
- Clean up after the pending writes on destroy.
- Fix temporary buffer creation.
- Fix internal thread initialization by the command allocator.
- Clean up player event_loop usage.
2020-05-11 14:07:02 -04:00
Dzmitry Malyshau 786ead9701 Destroy temporary buffers 2020-05-11 10:53:21 -04:00
Dzmitry Malyshau 35f2e8b70e Move queue logic into a submodule 2020-05-10 22:40:04 -04:00
Dzmitry Malyshau ba8c2eae54 Implement Queue::write_buffer 2020-05-10 01:21:47 -04:00
Gabriel Majeri f70f32af87 Add optional SPIR-V shader validation
# Conflicts:
#	Cargo.lock
2020-05-09 19:55:10 +03:00
bors[bot]andPaul Kernfeld 54c6f6751b Merge #645
645: Add a loom test for RefCount r=kvark a=paulkernfeld

A first effort at gfx-rs/wgpu-rs#96
loom testing is gated behind cfg(loom)

Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2020-05-06 18:10:43 +00:00
Paul Kernfeld 29a4cee002 Add a loom test for RefCount 2020-05-06 13:53:57 -04:00
Dzmitry Malyshau cf8513baf5 Proper maintenance of the command pools 2020-05-06 11:15:08 -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 3e57c11260 Refactor create_surface a bit 2020-05-05 09:47:51 -04:00
Dzmitry Malyshau fbc533bfee Save bind group layout inside pipeline layouts 2020-05-04 23:46:06 -04:00
Anton Lazarev 29ce9a44cf Pass through raw-window-handle 2020-05-04 15:55:19 -04:00
Dzmitry Malyshau 71d4f77ab8 Wait for idle before destroying swapchains 2020-05-03 23:39:05 -04:00
Dzmitry Malyshau 831d908663 Properly destroy swap chains 2020-05-03 22:13:43 -04:00
Paul Kernfeld cc2e6db7f5 Make assertions more verbose in src/command
This contributes to #485
2020-05-02 13:16:09 -04:00
bors[bot]andDzmitry Malyshau e2100b6911 Merge #621
621: Keep Adapter alive r=grovesNL a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-05-01 04:30:09 +00:00
Dzmitry Malyshau f35dd741aa Android support (#625) 2020-05-01 00:22:00 -04:00
Dzmitry Malyshau 288f8342b1 Don't drop the Global on panic 2020-05-01 00:20:54 -04:00
Dzmitry Malyshau 9500cfa4f3 Keep Adapter alive by the device 2020-05-01 00:20:54 -04:00
Paul KernfeldandPaul Kernfeld 29fe9a935a Make assertions in wgpu-core device/mod.rs verbose (#622)
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2020-05-01 00:05:13 -04:00
Dzmitry Malyshau f64b2dd3bb trace: make Id serialization nicer 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 3c68fb17e4 player: full winit integration 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 77a5eda796 trace: fix reusing object ids 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 854c1be035 trace: support pipelines, refactor destruction sequence 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 018417f174 trace: replaying all the commands 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 d4705b6008 trace: bind groups, shaders, and buffer contents 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 1cc548a7a2 Make descriptors generic over Label 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 4c1ea02553 trace: hook up RON output 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 0e533547a1 Split serde feature into trace+replay 2020-04-30 09:55:52 -04:00
bors[bot]andDzmitry Malyshau bc065e4abc Merge #615
615: Use General allocator at all times for now r=grovesNL a=kvark

In all user-managed resources, we don't have control of the lifetime. Since we don't know when it's released, we can't use any more specific allocator kind than `General`.

Previously, we assumed that buffers created for MAP_READ+COPY_SRC, for example, were one-time buffers created to copy data. However, there appear to be cases where they were used to fill data in once, and then persistently used as a copy source destination.

In the future, one WebGPU data transfer story is settled, we'll be able to use `Linear` kind again for all internally managed uploads. I.e. writeBuffer, writeTexture, and createBuffeMappedOnlyAtStart.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-25 02:08:54 +00:00
Dzmitry Malyshau fc68b5ef54 Use General allocator at all times for now 2020-04-24 21:59:41 -04:00
Dzmitry Malyshau 09d3623885 Minor error reporting fixes (#607) 2020-04-24 21:58:30 -04:00
Dzmitry Malyshau baf435d8b8 Add is_power_of_two function (#603) 2020-04-21 09:29:10 -04:00
Dzmitry Malyshau 5e458b5d45 Separate public usage from internal use (#601) 2020-04-21 09:12:40 -04:00
Aron Granberg 21b441d087 Improve error messages for mismatched binding types (#593) 2020-04-20 14:41:40 -04:00
Dzmitry Malyshau df2c97ff0c Fix host mapping buffer barriers 2020-04-18 16:56:05 -04:00
Dzmitry Malyshau 75d0157aa7 Enable READ access for texture storage 2020-04-18 13:29:17 -04:00
bors[bot]andAlmar Klein daf45362bc Merge #591
591: Warn when binding a buffer that is still mapped r=kvark a=almarklein

Fixes #510

I'd like to make more contributions wrt validation. Though I'm quite new to Rust, so let's start small :)  

From the discussion in #510 I concluded that in this case the buffer has actually been dropped, does the error message make sense like this?

Do the messages logged with `log::warn`, end up in the same logging system as the layer validation messages? So a solution to get those messages into Python (for wgpu-py) would work for both kinds of validation messages?


Co-authored-by: Almar Klein <almar.klein@gmail.com>
2020-04-17 21:15:19 +00:00
Dzmitry Malyshau 8eefe269c1 Derive swapchain layout off the load operation 2020-04-16 21:49:24 -04:00
Almar Klein e7005548c0 Warn when binding a buffer that is still mapped 2020-04-16 11:35:03 +02:00
bors[bot]andAron Granberg 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
bors[bot]andDzmitry Malyshau 729ecb1404 Merge #582
582: Track pipeline layout lifetime r=grovesNL a=kvark

Fixes #580
This one is interesting: it's not instantly destroyed when dropped, like bind group layouts. And it's not tracked for GPU usage like the resources. It's somewhat in-between. We have the following classes of tracking now:
  1. no tracking, destroyed on drop. Applies to: bind group layouts, adapters
  2. only CPU-side tracking. They go to "suspected" list on drop of self or anything that can point to them. Applies to: pipeline layouts
  3. full GPU tracking. They go to "suspected" list on drop, then get associated with active submission before destruction. Applies to: buffers, textures, views, bind groups, pipelines

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-14 13:08:29 +00:00