Skip to content

Commit

Permalink
Reduce number of values tested (was timing out in browser)
Browse files Browse the repository at this point in the history
  • Loading branch information
toji committed Mar 15, 2024
1 parent 6cc9d9f commit 84e584b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions src/webgpu/shader/validation/expression/call/builtin/max.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Validates that constant evaluation and override evaluation of ${builtin}() never
.combine('type', keysOf(kValuesTypes))
.filter(u => stageSupportsType(u.stage, kValuesTypes[u.type]))
.beginSubcases()
.expand('a', u => fullRangeForType(kValuesTypes[u.type]))
.expand('b', u => fullRangeForType(kValuesTypes[u.type]))
.expand('a', u => fullRangeForType(kValuesTypes[u.type], 5))
.expand('b', u => fullRangeForType(kValuesTypes[u.type], 5))
)
.beforeAllSubcases(t => {
if (scalarTypeOf(kValuesTypes[t.params.type]) === Type.f16) {
Expand All @@ -56,20 +56,20 @@ Validates that constant evaluation and override evaluation of ${builtin}() never
});

const kArgCases = {
'good': '(1.1, 2.2)',
good: '(1.1, 2.2)',
bad_no_parens: '',
// Bad number of args
'bad_0args': '()',
'bad_1arg': '(1.0)',
'bad_3arg': '(1.0, 2.0, 3.0)',
bad_0args: '()',
bad_1arg: '(1.0)',
bad_3arg: '(1.0, 2.0, 3.0)',
// Bad value for arg 0
'bad_0bool': '(false, 1.0)',
'bad_0array': '(array(1.1,2.2), 1.0)',
'bad_0struct': '(modf(2.2), 1.0)',
bad_0bool: '(false, 1.0)',
bad_0array: '(array(1.1,2.2), 1.0)',
bad_0struct: '(modf(2.2), 1.0)',
// Bad value type for arg 1
'bad_1bool': '(1.0, true)',
'bad_1array': '(1.0, array(1.1,2.2))',
'bad_1struct': '(1.0, modf(2.2))',
bad_1bool: '(1.0, true)',
bad_1array: '(1.0, array(1.1,2.2))',
bad_1struct: '(1.0, modf(2.2))',
};

g.test('args')
Expand Down
24 changes: 12 additions & 12 deletions src/webgpu/shader/validation/expression/call/builtin/min.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Validates that constant evaluation and override evaluation of ${builtin}() never
.combine('type', keysOf(kValuesTypes))
.filter(u => stageSupportsType(u.stage, kValuesTypes[u.type]))
.beginSubcases()
.expand('a', u => fullRangeForType(kValuesTypes[u.type]))
.expand('b', u => fullRangeForType(kValuesTypes[u.type]))
.expand('a', u => fullRangeForType(kValuesTypes[u.type], 5))
.expand('b', u => fullRangeForType(kValuesTypes[u.type], 5))
)
.beforeAllSubcases(t => {
if (scalarTypeOf(kValuesTypes[t.params.type]) === Type.f16) {
Expand All @@ -56,20 +56,20 @@ Validates that constant evaluation and override evaluation of ${builtin}() never
});

const kArgCases = {
'good': '(1.1, 2.2)',
good: '(1.1, 2.2)',
bad_no_parens: '',
// Bad number of args
'bad_0args': '()',
'bad_1arg': '(1.0)',
'bad_3arg': '(1.0, 2.0, 3.0)',
bad_0args: '()',
bad_1arg: '(1.0)',
bad_3arg: '(1.0, 2.0, 3.0)',
// Bad value for arg 0
'bad_0bool': '(false, 1.0)',
'bad_0array': '(array(1.1,2.2), 1.0)',
'bad_0struct': '(modf(2.2), 1.0)',
bad_0bool: '(false, 1.0)',
bad_0array: '(array(1.1,2.2), 1.0)',
bad_0struct: '(modf(2.2), 1.0)',
// Bad value type for arg 1
'bad_1bool': '(1.0, true)',
'bad_1array': '(1.0, array(1.1,2.2))',
'bad_1struct': '(1.0, modf(2.2))',
bad_1bool: '(1.0, true)',
bad_1array: '(1.0, array(1.1,2.2))',
bad_1struct: '(1.0, modf(2.2))',
};

g.test('args')
Expand Down

0 comments on commit 84e584b

Please sign in to comment.