diff --git a/src/webgpu/shader/validation/expression/call/builtin/smoothstep.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/smoothstep.spec.ts index 5a5a28fc7362..d9dd63b85bf3 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/smoothstep.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/smoothstep.spec.ts @@ -51,16 +51,15 @@ Validates that constant evaluation and override evaluation of ${builtin}() rejec .fn(t => { const type = kValuesTypes[t.params.type]; - // We expect to fail if low >= high as it results in a DBZ - const expectedResult = t.params.value1 >= t.params.value2; + // We expect to fail if low >= high. + const expectedResult = t.params.value1 < t.params.value2; validateConstOrOverrideBuiltinEval( t, builtin, expectedResult, [type.create(t.params.value1), type.create(t.params.value2), type.create(0)], - t.params.stage, - /* returnType */ concreteTypeOf(type, [Type.f32]) + t.params.stage ); }); @@ -141,6 +140,7 @@ fn foo() { code: wgsl, constants, reference: ['o_low', 'o_high'], + statements: ['foo();'], }); } }); @@ -159,10 +159,11 @@ Validates that scalar and vector arguments are rejected by ${builtin}() if not f }) .fn(t => { const type = kArgumentTypes[t.params.type]; + const expectedResult = isConvertibleToFloatType(elementTypeOf(type)); validateConstOrOverrideBuiltinEval( t, builtin, - /* expectedResult */ isConvertibleToFloatType(elementTypeOf(type)), + expectedResult, [type.create(0), type.create(1), type.create(2)], 'constant', /* returnType */ concreteTypeOf(type, [Type.f32]) @@ -344,7 +345,7 @@ g.test('early_eval_errors') t, builtin, /* expectedResult */ t.params.low < t.params.high, - [f32(0), f32(t.params.low), f32(t.params.high)], + [f32(t.params.low), f32(t.params.high), f32(0)], t.params.stage ); });