Skip to content

Commit ce01243

Browse files
committed
Bug 2025939 - test(webgpu): update CTS to 9726cfe2893834c4bb42b435638c4e7362f4c258 r=webgpu-reviewers,aleiserson
`webgpu:shader,validation,extension,readonly_and_readwrite_storage_textures:var_decl:*` regressed on platform(s) that expose the `readonly_and_readwrite_storage_textures` WGSL feature, but this was expected (see [gpuweb/cts#4567](gpuweb/cts#4567)). Follow-up work is already under way for this at [gpuweb/cts#4612](gpuweb/cts#4612). Differential Revision: https://phabricator.services.mozilla.com/D289639 UltraBlame original commit: ffda39d279c243b51b6058f838a54385908ac57a
1 parent e05fcef commit ce01243

15 files changed

Lines changed: 489 additions & 283 deletions

File tree

dom/webgpu/tests/cts/checkout/src/webgpu/capability_info.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7669,6 +7669,9 @@ swizzle_assignment
76697669
'
76707670
linear_indexing
76717671
'
7672+
'
7673+
texture_formats_tier1
7674+
'
76727675
]
76737676
as
76747677
const

dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/shader_io/compute_builtins.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,6 +2244,10 @@ kLocalIndexOffset
22442244
)
22452245
|
22462246
|
2247+
(
2248+
linear_indexing
2249+
&
2250+
&
22472251
expectEqual
22482252
(
22492253
'
@@ -2257,8 +2261,13 @@ globalOffset
22572261
kGlobalIndexOffset
22582262
]
22592263
)
2264+
)
22602265
|
22612266
|
2267+
(
2268+
linear_indexing
2269+
&
2270+
&
22622271
expectEqual
22632272
(
22642273
'
@@ -2272,6 +2281,7 @@ globalOffset
22722281
kGroupIndexOffset
22732282
]
22742283
)
2284+
)
22752285
;
22762286
if
22772287
(

dom/webgpu/tests/cts/checkout/src/webgpu/shader/validation/extension/readonly_and_readwrite_storage_textures.spec.ts

Lines changed: 225 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,35 @@ js
3939
;
4040
import
4141
{
42+
hasFeature
43+
}
44+
from
45+
'
46+
.
47+
.
48+
/
49+
.
50+
.
51+
/
52+
.
53+
.
54+
/
55+
.
56+
.
57+
/
58+
common
59+
/
60+
util
61+
/
62+
util
63+
.
64+
js
65+
'
66+
;
67+
import
68+
{
4269
kPossibleStorageTextureFormats
70+
kTextureFormatsTier1EnablesStorageReadOnlyWriteOnly
4371
}
4472
from
4573
'
@@ -81,12 +109,30 @@ ShaderValidationTest
81109
)
82110
;
83111
const
84-
kFeatureName
112+
kAccessModeFeatureName
85113
=
86114
'
87115
readonly_and_readwrite_storage_textures
88116
'
89117
;
118+
const
119+
kTier1FeatureName
120+
=
121+
'
122+
texture_formats_tier1
123+
'
124+
;
125+
const
126+
kTier1DeviceFeatureName
127+
=
128+
'
129+
texture
130+
-
131+
formats
132+
-
133+
tier1
134+
'
135+
;
90136
g
91137
.
92138
test
@@ -114,6 +160,30 @@ the
114160
language
115161
feature
116162
present
163+
TODO
164+
(
165+
https
166+
:
167+
/
168+
/
169+
github
170+
.
171+
com
172+
/
173+
gpuweb
174+
/
175+
cts
176+
/
177+
issues
178+
/
179+
4612
180+
)
181+
:
182+
Stop
183+
checking
184+
the
185+
device
186+
feature
117187
)
118188
.
119189
paramsSubcasesOnly
@@ -188,6 +258,158 @@ t
188258
.
189259
params
190260
;
261+
let
262+
valid
263+
=
264+
true
265+
;
266+
if
267+
(
268+
access
269+
!
270+
=
271+
=
272+
'
273+
write
274+
'
275+
)
276+
{
277+
valid
278+
&
279+
&
280+
=
281+
t
282+
.
283+
hasLanguageFeature
284+
(
285+
kAccessModeFeatureName
286+
)
287+
;
288+
}
289+
if
290+
(
291+
kTextureFormatsTier1EnablesStorageReadOnlyWriteOnly
292+
.
293+
indexOf
294+
(
295+
format
296+
)
297+
>
298+
=
299+
0
300+
)
301+
{
302+
/
303+
/
304+
Even
305+
though
306+
some
307+
of
308+
these
309+
formats
310+
do
311+
not
312+
support
313+
read
314+
-
315+
write
316+
access
317+
/
318+
/
319+
without
320+
the
321+
tier2
322+
adapter
323+
feature
324+
their
325+
validity
326+
in
327+
WGSL
328+
should
329+
/
330+
/
331+
depend
332+
only
333+
on
334+
the
335+
language
336+
feature
337+
for
338+
tier1
339+
.
340+
/
341+
/
342+
However
343+
because
344+
the
345+
language
346+
feature
347+
is
348+
new
349+
also
350+
check
351+
the
352+
device
353+
/
354+
/
355+
feature
356+
.
357+
MAINTENANCE_TODO
358+
(
359+
https
360+
:
361+
/
362+
/
363+
github
364+
.
365+
com
366+
/
367+
gpuweb
368+
/
369+
cts
370+
/
371+
issues
372+
/
373+
4612
374+
)
375+
:
376+
/
377+
/
378+
Stop
379+
doing
380+
this
381+
;
382+
make
383+
if
384+
body
385+
unconditional
386+
if
387+
(
388+
!
389+
hasFeature
390+
(
391+
t
392+
.
393+
device
394+
.
395+
features
396+
kTier1DeviceFeatureName
397+
)
398+
)
399+
{
400+
valid
401+
&
402+
&
403+
=
404+
t
405+
.
406+
hasLanguageFeature
407+
(
408+
kTier1FeatureName
409+
)
410+
;
411+
}
412+
}
191413
const
192414
source
193415
=
@@ -215,31 +437,11 @@ access
215437
>
216438
;
217439
;
218-
const
219-
requiresFeature
220-
=
221-
access
222-
!
223-
=
224-
=
225-
'
226-
write
227-
'
228-
;
229440
t
230441
.
231442
expectCompileResult
232443
(
233-
t
234-
.
235-
hasLanguageFeature
236-
(
237-
kFeatureName
238-
)
239-
|
240-
|
241-
!
242-
requiresFeature
444+
valid
243445
source
244446
)
245447
;
@@ -288,7 +490,7 @@ t
288490
.
289491
hasLanguageFeature
290492
(
291-
kFeatureName
493+
kAccessModeFeatureName
292494
)
293495
workgroup_size
294496
(

0 commit comments

Comments
 (0)