Commit 367da11
committed
Make DRM support optional.
The DRM API is for interacting with GPUs and displays directly via
system calls, without going through something like Mesa. Very few
`wgpu` users are driving hardware directly, and those that are are
sophisticated users, capable of finding and requesting the feature
themselves.
Supporting DRM in `wgpu_hal` adds dependencies on `drm` and its
supporting crates. The crates seem fine, but they do contribute to
download and build time.
Firefox definitely does not want to have to vendor `drm` and its
subcrates into its source tree, since Firefox should never be
interacting with graphics hardware directly.
In `wgpu_hal`, make support for `RawWindowHandle::Drm` and
`RawDisplayHandle::Drm` require that the `"drm"` feature be explicitly
requested, rather than supporting DRM handles by default.
Add a `"drm"` feature to `wgpu`, `wgpu-core`, and
`wgpu-core-deps-windows-linux-android`, and make the relevant glue
code conditional on that.1 parent 9c49f92 commit 367da11
9 files changed
Lines changed: 38 additions & 34 deletions
File tree
- wgpu-core
- platform-deps/windows-linux-android
- src
- wgpu-hal
- src/vulkan
- wgpu
- src/backend
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
272 | 268 | | |
273 | 269 | | |
274 | 270 | | |
| |||
968 | 964 | | |
969 | 965 | | |
970 | 966 | | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
| 967 | + | |
977 | 968 | | |
978 | 969 | | |
979 | 970 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
252 | 251 | | |
253 | 252 | | |
254 | 253 | | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 267 | + | |
272 | 268 | | |
273 | 269 | | |
274 | 270 | | |
| |||
892 | 888 | | |
893 | 889 | | |
894 | 890 | | |
895 | | - | |
| 891 | + | |
896 | 892 | | |
897 | 893 | | |
898 | 894 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
801 | 810 | | |
802 | 811 | | |
803 | 812 | | |
| |||
822 | 831 | | |
823 | 832 | | |
824 | 833 | | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | 834 | | |
831 | 835 | | |
832 | 836 | | |
| |||
0 commit comments