Skip to content

Commit

Permalink
Use batching for shader,validation,expression,call,builtin,*:values: (g…
Browse files Browse the repository at this point in the history
…puweb#4001)

Many of these tests have too many subcases, which run in parallel and
can run out of resources. We can use batching to break tests into more
cases (without having to break them up arbitrarily by the numeric values
passed to builtins).

Not all of the :values: tests actually have more than 125 subcases; if
they don't, then `batch` has no effect. I added `batch` to all of them
anyway so that when tests are added in the future, they'll serve as an
example and get copied over.

Hopefully helps with https://crbug.com/373478528
and https://crbug.com/373485785
  • Loading branch information
kainino0x authored Oct 15, 2024
1 parent 39bab01 commit ec54937
Show file tree
Hide file tree
Showing 64 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kAllNumericScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const additionalRangeForType = rangeForType(
);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const kValuesTypes = objectsToRecord([
]);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConcreteIntegerScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConcreteIntegerScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConcreteIntegerScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function quantizeFunctionForScalarType(type: ScalarType): QuantizeFunc<number> {
}

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() inputs rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValidArgumentTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValidArgumentTypes = objectsToRecord(kConvertableToFloatVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const valueForType = rangeForType(
);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const valueForType = rangeForType(
);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConcreteIntegerScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors on valid inputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function quantizeFunctionForScalarType(type: ScalarType): QuantizeFunc<number> {
}

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConcreteIntegerScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConcreteIntegerScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValidArgumentTypes = objectsToRecord(kConvertableToFloatVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() only errors in cases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValidArgumentTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() error on invalid inputs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValidArgumentTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() error on invalid inputs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConcreteIntegerScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors on valid inputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() inputs rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function biasRange(type: VectorType | ScalarType) {
}

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() inputs rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() inputs rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kAllNumericScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kAllNumericScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValidArgumentTypes = objectsToRecord(kConvertableToFloatVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function isSubnormalFunctionForScalarType(type: ScalarType): (v: number) => bool
}

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function quantizeFunctionForScalarType(type: ScalarType): QuantizeFunc<number> {
}

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const kValidArgumentTypes = objectsToRecord([
]);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() error on invalid inputs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() inputs rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function quantizeFunctionForScalarType(type: ScalarType): QuantizeFunc<number> {
}

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function isSubnormalFunctionForScalarType(type: ScalarType): (v: number) => bool
}

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() only errors in cases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConcreteIntegerScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() never errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() inputs rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() inputs rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const kValuesTypes = objectsToRecord([
]);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() inputs rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const g = makeTestGroup(ShaderValidationTest);
const kValuesTypes = objectsToRecord(kConvertableToFloatScalarsAndVectors);

g.test('values')
.batch(125)
.desc(
`
Validates that constant evaluation and override evaluation of ${builtin}() rejects invalid values
Expand Down
Loading

0 comments on commit ec54937

Please sign in to comment.