Debian Codegraph @

tools/graphite/dawn/GraphiteDawnToggles.h

raw
1 /*
2 * Copyright 2025 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef skiatest_graphite_GraphiteDawnToggles_DEFINED
9 #define skiatest_graphite_GraphiteDawnToggles_DEFINED
10
11 #include "webgpu/webgpu_cpp.h" // NO_G3_REWRITE
12
13 #include <vector>
14
15 namespace skiatest::graphite {
16
17 // Toggles to be passed when creating the wgpu::Instance.
18 wgpu::DawnTogglesDescriptor GetInstanceToggles();
19
20 // Toggles to be passed when creating the wgpu::Adapter.
21 wgpu::DawnTogglesDescriptor GetAdapterToggles();
22
23 // Appends preferred features that the adapter lists as available that aren't already included
24 // in `features`.
25 void AddPreferredFeatures(const wgpu::Adapter& adapter, std::vector<wgpu::FeatureName>& features);
26
27 } // namespace skiatest::graphite
28
29 #endif // skiatest_graphite_GraphiteDawnToggles_DEFINED