Commit Graph

2137 Commits

Author SHA1 Message Date
Joshua Groves
b58c15815b Move more shared types into wgpu-types 2020-03-14 23:08:05 -02:30
Dzmitry Malyshau
26657374f8 Update vertex layout naming 2020-03-14 12:44:04 -04:00
Dzmitry Malyshau
095f320470 Wholesome spec update.
Biggest change is that buffer binding is done one by one. There is a number of renamings of the fields, also the binding types are expanded.
2020-03-13 23:59:05 -04:00
bors[bot]
a74de20ac6 Merge #514
514: Move some types into shared wgpu-types crate r=kvark a=grovesNL

As we discussed a while ago, we need to be able to share some types between wgpu-core/wgpu-native/wgpu-remote/wgpu-rs.

The problem is that we want to avoid a dependency on wgpu-core and wgpu-native when building [wgpu-rs for the wasm32-unknown-unknown target](https://github.com/gfx-rs/wgpu-rs/issues/101). We can avoid this by moving all shared types into a separate crate which is exposed on all targets.

Let me know if we should use some other approach or organize the types somehow. This isn't complete yet, but it might be easier to integrate this over several PRs instead of diverging my branch too far.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-11 03:07:17 +00:00
Joshua Groves
24caf76765 Rename serde feature 2020-03-10 23:19:45 -02:30
Joshua Groves
9940aef599 Move some types into shared wgpu-types crate 2020-03-10 22:36:23 -02:30
Aaron Loucks
fe95fddf5a Use vulkan nomenclature for PresentMode variants
https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPresentModeKHR.html
2020-03-06 00:48:45 -05:00
Aaron Loucks
051d08424c Add PresentMode::Mailbox 2020-03-05 18:19:18 -05:00
Kartikaya Gupta
b5ba17012a Update WebGPU to mozilla-central from hg rev 0f1a8e4c6a76b3b0b16902c7fdfe2356c60ca351 2020-02-20 15:49:32 -05:00
Dzmitry Malyshau
023ce7f6c8 Catch swapchain output being dropped too early 2020-02-18 22:57:12 -05:00
Dzmitry Malyshau
a0759b983d Fix binding compatibility of an absent group 2020-02-16 20:17:53 -05:00
bors[bot]
a048f5e5d5 Merge #492
492: Encode render targets into the render pass blob r=grovesNL a=kvark

Fixes #454

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-02-11 12:58:14 +00:00
bors[bot]
73374021d7 Merge #480
480: Implement `enumerate_adapters`. r=kvark a=daxpedda

This is take two of #478, it's a much smaller change with less abstraction.

-  implement `internal_enumerate_adapters`, which refactors `instance.{BACKEND}.enumerate_adapters()` out of `pick_adapter`
-  implement `enumerate_adapters`, which just returns a vector of all GPUs in the form of `AdapterId`

Co-authored-by: daxpedda <daxpedda@gmail.com>
2020-02-10 19:01:20 +00:00
daxpedda
eb6eec5c95 Implement enumerate_adapters. 2020-02-10 19:54:36 +01:00
Dzmitry Malyshau
e05471ad6d Encode render targets into the render pass blob 2020-02-10 12:44:44 -05:00
Dzmitry Malyshau
ab416bcc68 All the missing Gecko fixes 2020-02-09 20:15:55 -05:00
bors[bot]
d4a46cb60e Merge #479
479: Serialize BindGroupBinding r=kvark a=imiklos



Co-authored-by: Istvan Miklos <istvan.miklos@h-lab.eu>
2020-01-28 12:41:08 +00:00
Istvan Miklos
38ba0e625a Serialize BindGroupBinding 2020-01-28 12:47:23 +01:00
daxpedda
cd8e2a30b2 Duplicate DeviceType from gfx-hal. 2020-01-26 23:09:58 +01:00
daxpedda
8c80557dd6 Return custom AdapterInfo that contains backend. 2020-01-25 18:22:34 +01:00
bors[bot]
009bde0f90 Merge #468
468: Switch value of BufferUsage's INDIRECT and STORAGE_READ fields r=kvark a=almarklein

Closes #467. This makes the value of `INDIRECT` equal to it's value in the IDL spec. (`STORAGE_READ` is not present in the IDL spec.)

I changed the value in `resource.rs` and then ran `make ffi/wgpu.h`.


Co-authored-by: Almar Klein <almar.klein@gmail.com>
2020-01-23 16:26:53 +00:00
Dzmitry Malyshau
b9e7449b43 Fix building on Rust 1.37
It doesn't like by-move pattern with an `if`
2020-01-23 00:52:04 -05:00
Almar Klein
299a051db1 Switch value of BufferUsage's INDIRECT and STORAGE_READ fields
This makes the value of INDIRECT equal to it's value in the IDL spec.
(STORAGE_READ is not present in the IDL spec).
2020-01-22 08:07:07 +01:00
Dzmitry Malyshau
8a5de68aab Refactor the swap chain frame tracking 2020-01-21 14:24:45 -05:00
Dzmitry Malyshau
ec54038e7c Improve STORAGE_READ support for buffers 2020-01-21 14:13:27 -05:00
Dzmitry Malyshau
ad7045455c Optionally request vertex shader stores and atomics 2020-01-21 14:12:08 -05:00
yanchith
ab205b042c Add # Safery docs to wgpu-core 2020-01-17 16:15:05 +01:00
yanchith
0d9ad70468 Add TODOs for range_plus_one clippy warnings 2020-01-17 14:44:17 +01:00
yanchith
53b9a01b2f Resolve trivial clippy warning 2020-01-17 14:44:02 +01:00
bors[bot]
3a41272cba Merge #448
448: Fix framebuffers not always being cleaned up if invalid r=kvark a=LaylConway

This changes framebuffers to be cleaned up if only one view is cleaned up, instead of if all views are cleaned up. This is necessary because currently, at least for me, swapchain images will have a different view every frame. This means that if other views continue to exist between frames, the resulting framebuffers will never be cleaned up.

Fixes #447

Co-authored-by: Layl <2385329-layl@users.noreply.gitlab.com>
2020-01-15 14:24:19 +00:00
Layl
6202d5ddad Fix framebuffers not always being cleaned up if invalid 2020-01-15 15:11:16 +01:00
bors[bot]
881222a947 Merge #451
451: Make BindGroupLayoutBinding Serializable r=kvark a=imiklos

cc @kvark @zakorgy

Co-authored-by: Istvan Miklos <istvan.miklos@h-lab.eu>
2020-01-14 20:04:21 +00:00
Istvan Miklos
0fdf77feb5 Make BindGroupLayoutBinding Serializable 2020-01-14 12:43:58 +01:00
Dzmitry Malyshau
a51019795e Switch to a custom fork of peek-poke 2020-01-13 16:52:59 -05:00
Dzmitry Malyshau
92441c38a2 Fix missing transitions before the render pass 2020-01-13 16:52:58 -05:00
Dzmitry Malyshau
f798f7c631 Add missing render pass methods 2020-01-13 16:52:58 -05:00
Dzmitry Malyshau
e0574ee899 Remove the old render and compute passes 2020-01-13 16:52:58 -05:00
Dzmitry Malyshau
40ac14e92c Switch the examples to use the new raw passes 2020-01-13 16:52:58 -05:00
Dzmitry Malyshau
941fcca08d Raw render pass encoding 2020-01-13 16:52:58 -05:00
Dzmitry Malyshau
c01a7c6abe Use peek-poke for compute pass encoding 2020-01-13 16:52:58 -05:00
Dzmitry Malyshau
20cd803d67 Standalone render passes 2020-01-13 16:52:58 -05:00
Dzmitry Malyshau
7808a4d4cd Stand-alone compute passes 2020-01-13 16:52:58 -05:00
Zakor Gyula
2fbda5a3c1 Fix missing memory release 2020-01-13 15:44:15 +01:00
Zakor Gyula
94fe1436f1 Fix missing memory allocator disposal 2020-01-13 15:44:15 +01:00
Aaron Loucks
5ca57374f6 Check power/battery status when selecting adaptors
PowerPreference::Default will now prefer discrete GPUs
when on AC power and will prefer integrated GPUs while
on battery power (i.e. the battery is discharging).
2020-01-12 17:26:54 -05:00
Aaron Loucks
4b46e885fd Prefer discrete GPU for PowerPreference::Default 2020-01-11 03:07:45 -05:00
Dzmitry Malyshau
bcf533fd89 Refactor usage tracker init() 2020-01-08 23:19:52 -05:00
Dzmitry Malyshau
017a54ff97 Refactor usage tracking to be truly sparse 2020-01-08 22:43:19 -05:00
Dzmitry Malyshau
bbe0d7df1b Command buffer/encoder destruction 2020-01-08 18:14:45 -05:00
Dzmitry Malyshau
59a9d14c81 Suspect unlinked resources used in submissions 2020-01-08 18:14:07 -05:00