Debian Codegraph @

testing/web-platform/mozilla/tests/webgpu/common/framework/test_config.js

raw
1 /**
2 * AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
3 **/import { assert } from '../util/util.js';
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65 /** Test configuration options. Globally modifiable global state. */
66 export const globalTestConfig = {
67 enableDebugLogs: false,
68 maxSubcasesInFlight: 100,
69 subcasesBetweenAttemptingGC: 5000,
70 testHeartbeatCallback: () => {},
71 noRaceWithRejectOnTimeout: false,
72 unrollConstEvalLoops: false,
73 compatibility: false,
74 forceFallbackAdapter: false,
75 enforceDefaultLimits: false,
76 blockAllFeatures: false,
77 logToWebSocket: false
78 };
79
80 // Check if a device is a compatibility device.
81 // Note: The CTS generally, requires that if globalTestConfig.compatibility
82 // is true then the device MUST be a compatibility device since the CTS
83 // is trying to test that compatibility devices have the correct validation.
84 export function isCompatibilityDevice(device) {
85 if (globalTestConfig.compatibility) {
86 assert(!device.features.has('core-features-and-limits'));
87 }
88 return globalTestConfig.compatibility;
89 }