Skip to content

Commit 07c352f

Browse files
test(cts): add coverage for clip-distances feature
1 parent b8606bc commit 07c352f

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

cts_runner/test.lst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ fails-if(vulkan) webgpu:api,operation,vertex_state,correctness:array_stride_zero
3232
webgpu:api,operation,vertex_state,correctness:setVertexBuffer_offset_and_attribute_offset:*
3333
webgpu:api,validation,buffer,create:*
3434
webgpu:api,validation,buffer,destroy:*
35+
webgpu:api,validation,capability_checks,features,clip_distances:*
3536
fails-if(dx12) webgpu:api,validation,capability_checks,limits,maxBindGroups:setBindGroup,*
3637
// NOTE: Only test some of these `maxInterStageShaderVariables` cases, because of a CTS bug (see
3738
// below). CTS (incorrectly) only deducts once for any set of them being enabled, but it should
@@ -207,6 +208,7 @@ webgpu:shader,execution,flow_control,return:*
207208
// Many other vertex_buffer_access subtests also passing, but there are too many to enumerate.
208209
// Fails on Metal in CI only, not when running locally.
209210
fails-if(metal) webgpu:shader,execution,robust_access_vertex:vertex_buffer_access:indexed=true;indirect=false;drawCallTestParameter="baseVertex";type="float32x4";additionalBuffers=4;partialLastNumber=false;offsetVertexBuffer=true
211+
webgpu:shader,execution,shader_io,vertex_builtins:outputs,clip_distances:*
210212
webgpu:shader,validation,const_assert,const_assert:*
211213
webgpu:shader,validation,expression,binary,short_circuiting_and_or:array_override:op="%26%26";a_val=1;b_val=1
212214
webgpu:shader,validation,expression,binary,short_circuiting_and_or:invalid_types:*

wgpu-core/src/validation.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,12 @@ impl Interface {
11411141
debug_assert_eq!(stride, 4);
11421142

11431143
let naga::ArraySize::Constant(array_size) = size else {
1144-
// TODO: Should we accept override expressions?
1144+
// NOTE: Based on the
1145+
// [spec](https://gpuweb.github.io/gpuweb/wgsl/#fixed-footprint-types):
1146+
//
1147+
// > The only valid use of a fixed-size array with an element count that is an
1148+
// > override-expression that is not a const-expression is as a memory view in
1149+
// > the workgroup address space.
11451150
unreachable!("non-constant array size for `clip_distances`")
11461151
};
11471152
let array_size = array_size.get();

0 commit comments

Comments
 (0)