Skip to content

Commit

Permalink
Add ArrayType / ArrayValue
Browse files Browse the repository at this point in the history
Not currently used by anything
  • Loading branch information
ben-clayton committed Mar 7, 2024
1 parent b9fda01 commit 3e45aee
Show file tree
Hide file tree
Showing 33 changed files with 360 additions and 219 deletions.
216 changes: 108 additions & 108 deletions src/resources/cache/hashes.json
Original file line number Diff line number Diff line change
@@ -1,110 +1,110 @@
{
"webgpu/shader/execution/binary/af_addition.bin": "45a00f48",
"webgpu/shader/execution/binary/af_logical.bin": "458eba4",
"webgpu/shader/execution/binary/af_division.bin": "ed6916d6",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "ddeaa1d3",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "bdc18f23",
"webgpu/shader/execution/binary/af_multiplication.bin": "e6e11b40",
"webgpu/shader/execution/binary/af_remainder.bin": "61849bd4",
"webgpu/shader/execution/binary/af_subtraction.bin": "6afd0c9a",
"webgpu/shader/execution/binary/f16_addition.bin": "118a69b1",
"webgpu/shader/execution/binary/f16_logical.bin": "53cbe093",
"webgpu/shader/execution/binary/f16_division.bin": "6cf5db74",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "37b3e5b1",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "f9f9c546",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "10c32980",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "4a992ee0",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "3969786a",
"webgpu/shader/execution/binary/f16_multiplication.bin": "27375c0a",
"webgpu/shader/execution/binary/f16_remainder.bin": "1e5d8fc7",
"webgpu/shader/execution/binary/f16_subtraction.bin": "daffd0ed",
"webgpu/shader/execution/binary/f32_addition.bin": "384766d0",
"webgpu/shader/execution/binary/f32_logical.bin": "d4f9fd6a",
"webgpu/shader/execution/binary/f32_division.bin": "760f650f",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "504aac15",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "740e31c4",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "3c5abc3c",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "c41fee39",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "43bfea5a",
"webgpu/shader/execution/binary/f32_multiplication.bin": "d6b990a9",
"webgpu/shader/execution/binary/f32_remainder.bin": "53f7d8e9",
"webgpu/shader/execution/binary/f32_subtraction.bin": "f644082",
"webgpu/shader/execution/binary/i32_arithmetic.bin": "8ce49cc7",
"webgpu/shader/execution/binary/i32_comparison.bin": "ac0e960f",
"webgpu/shader/execution/binary/u32_arithmetic.bin": "68560dc0",
"webgpu/shader/execution/binary/u32_comparison.bin": "ec9ec4c6",
"webgpu/shader/execution/abs.bin": "d7043582",
"webgpu/shader/execution/acos.bin": "a7a01d03",
"webgpu/shader/execution/acosh.bin": "3bfd9ebc",
"webgpu/shader/execution/asin.bin": "f91850f1",
"webgpu/shader/execution/asinh.bin": "19169ea3",
"webgpu/shader/execution/atan.bin": "51a04ddb",
"webgpu/shader/execution/atan2.bin": "e732e242",
"webgpu/shader/execution/atanh.bin": "4763b613",
"webgpu/shader/execution/bitcast.bin": "195c00a7",
"webgpu/shader/execution/ceil.bin": "9856b786",
"webgpu/shader/execution/clamp.bin": "5a700a65",
"webgpu/shader/execution/cos.bin": "ff14c921",
"webgpu/shader/execution/cosh.bin": "21c587ad",
"webgpu/shader/execution/cross.bin": "c159771f",
"webgpu/shader/execution/degrees.bin": "b0de92be",
"webgpu/shader/execution/determinant.bin": "83d642d4",
"webgpu/shader/execution/distance.bin": "e65d0cb7",
"webgpu/shader/execution/dot.bin": "dc57a00c",
"webgpu/shader/execution/exp.bin": "f0c6b19",
"webgpu/shader/execution/exp2.bin": "5d3dd4e0",
"webgpu/shader/execution/faceForward.bin": "3979a4de",
"webgpu/shader/execution/floor.bin": "3fecf76d",
"webgpu/shader/execution/fma.bin": "e7fe86b8",
"webgpu/shader/execution/fract.bin": "71caa066",
"webgpu/shader/execution/frexp.bin": "ed72dcec",
"webgpu/shader/execution/inverseSqrt.bin": "383e6e9c",
"webgpu/shader/execution/ldexp.bin": "bedfc1d5",
"webgpu/shader/execution/length.bin": "38e35ab4",
"webgpu/shader/execution/log.bin": "2517404c",
"webgpu/shader/execution/log2.bin": "a833136",
"webgpu/shader/execution/max.bin": "8c2f7c51",
"webgpu/shader/execution/min.bin": "7f732adb",
"webgpu/shader/execution/mix.bin": "982c982c",
"webgpu/shader/execution/modf.bin": "743632fc",
"webgpu/shader/execution/normalize.bin": "52adf424",
"webgpu/shader/execution/pack2x16float.bin": "2c879955",
"webgpu/shader/execution/pow.bin": "ba686c94",
"webgpu/shader/execution/quantizeToF16.bin": "e704252d",
"webgpu/shader/execution/radians.bin": "afe57c6e",
"webgpu/shader/execution/reflect.bin": "332e001e",
"webgpu/shader/execution/refract.bin": "246f6c0b",
"webgpu/shader/execution/round.bin": "e555383f",
"webgpu/shader/execution/saturate.bin": "9dce4047",
"webgpu/shader/execution/sign.bin": "3ef39d2e",
"webgpu/shader/execution/sin.bin": "8546b36c",
"webgpu/shader/execution/sinh.bin": "72ae8d37",
"webgpu/shader/execution/smoothstep.bin": "79eca0b6",
"webgpu/shader/execution/sqrt.bin": "ac8f95e9",
"webgpu/shader/execution/step.bin": "34ce6432",
"webgpu/shader/execution/tan.bin": "928e0e2f",
"webgpu/shader/execution/tanh.bin": "be078de7",
"webgpu/shader/execution/transpose.bin": "2ce22a5b",
"webgpu/shader/execution/trunc.bin": "26115486",
"webgpu/shader/execution/unpack2x16float.bin": "d052cda6",
"webgpu/shader/execution/unpack2x16snorm.bin": "a3ab8e29",
"webgpu/shader/execution/unpack2x16unorm.bin": "f42b9498",
"webgpu/shader/execution/unpack4x8snorm.bin": "5c90b367",
"webgpu/shader/execution/unpack4x8unorm.bin": "ef24abbe",
"webgpu/shader/execution/unary/af_arithmetic.bin": "28b510fa",
"webgpu/shader/execution/unary/af_assignment.bin": "4f4d507a",
"webgpu/shader/execution/unary/bool_conversion.bin": "5cbbd5e2",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "55ff626f",
"webgpu/shader/execution/unary/f16_conversion.bin": "e16712e2",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "672609de",
"webgpu/shader/execution/unary/f32_conversion.bin": "daa3ffb8",
"webgpu/shader/execution/unary/i32_arithmetic.bin": "eecbb027",
"webgpu/shader/execution/unary/i32_conversion.bin": "c3f19a9",
"webgpu/shader/execution/unary/u32_conversion.bin": "b58b1876",
"webgpu/shader/execution/unary/ai_assignment.bin": "326020c6",
"webgpu/shader/execution/binary/ai_arithmetic.bin": "40123e00",
"webgpu/shader/execution/unary/ai_arithmetic.bin": "37ffc69",
"webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "35e08b61",
"webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "6f31c22f",
"webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "7b17ec2a"
"webgpu/shader/execution/binary/af_addition.bin": "25dcfcce",
"webgpu/shader/execution/binary/af_logical.bin": "409d37cf",
"webgpu/shader/execution/binary/af_division.bin": "bfcb23bd",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "cefea21a",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "624d816d",
"webgpu/shader/execution/binary/af_multiplication.bin": "34077746",
"webgpu/shader/execution/binary/af_remainder.bin": "9eddf765",
"webgpu/shader/execution/binary/af_subtraction.bin": "629bbf4",
"webgpu/shader/execution/binary/f16_addition.bin": "e3ff1263",
"webgpu/shader/execution/binary/f16_logical.bin": "99c0a0ed",
"webgpu/shader/execution/binary/f16_division.bin": "c0f3376",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "3054016e",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "9cb6bbb9",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "82f32c1d",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "29e9e0c7",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "109260c1",
"webgpu/shader/execution/binary/f16_multiplication.bin": "39287c38",
"webgpu/shader/execution/binary/f16_remainder.bin": "98b48517",
"webgpu/shader/execution/binary/f16_subtraction.bin": "a4975dc4",
"webgpu/shader/execution/binary/f32_addition.bin": "b0e6fddd",
"webgpu/shader/execution/binary/f32_logical.bin": "71a0f0be",
"webgpu/shader/execution/binary/f32_division.bin": "29a37cf9",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "76e48aa9",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "37f3a30b",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "f00c4cd8",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "25553482",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "26750bd3",
"webgpu/shader/execution/binary/f32_multiplication.bin": "68a7516b",
"webgpu/shader/execution/binary/f32_remainder.bin": "fb22b625",
"webgpu/shader/execution/binary/f32_subtraction.bin": "2e26b05f",
"webgpu/shader/execution/binary/i32_arithmetic.bin": "9256ccab",
"webgpu/shader/execution/binary/i32_comparison.bin": "c813abfa",
"webgpu/shader/execution/binary/u32_arithmetic.bin": "498f877e",
"webgpu/shader/execution/binary/u32_comparison.bin": "d69e1738",
"webgpu/shader/execution/abs.bin": "a6b6fed1",
"webgpu/shader/execution/acos.bin": "2a8f33b0",
"webgpu/shader/execution/acosh.bin": "3b39f532",
"webgpu/shader/execution/asin.bin": "94c67af3",
"webgpu/shader/execution/asinh.bin": "34c8547a",
"webgpu/shader/execution/atan.bin": "c5f98dae",
"webgpu/shader/execution/atan2.bin": "5c666ada",
"webgpu/shader/execution/atanh.bin": "5efbba8b",
"webgpu/shader/execution/bitcast.bin": "e90abd26",
"webgpu/shader/execution/ceil.bin": "fe43b603",
"webgpu/shader/execution/clamp.bin": "f4ec869a",
"webgpu/shader/execution/cos.bin": "78f30673",
"webgpu/shader/execution/cosh.bin": "15c18b89",
"webgpu/shader/execution/cross.bin": "72823897",
"webgpu/shader/execution/degrees.bin": "3b06fea4",
"webgpu/shader/execution/determinant.bin": "f0f66549",
"webgpu/shader/execution/distance.bin": "593c41fb",
"webgpu/shader/execution/dot.bin": "3eee146b",
"webgpu/shader/execution/exp.bin": "7f926769",
"webgpu/shader/execution/exp2.bin": "715c82a",
"webgpu/shader/execution/faceForward.bin": "8a365384",
"webgpu/shader/execution/floor.bin": "7b9a6254",
"webgpu/shader/execution/fma.bin": "88549fc7",
"webgpu/shader/execution/fract.bin": "e4eff2f9",
"webgpu/shader/execution/frexp.bin": "18a53421",
"webgpu/shader/execution/inverseSqrt.bin": "71016a37",
"webgpu/shader/execution/ldexp.bin": "450c6068",
"webgpu/shader/execution/length.bin": "62190368",
"webgpu/shader/execution/log.bin": "c4b1985b",
"webgpu/shader/execution/log2.bin": "28ccd982",
"webgpu/shader/execution/max.bin": "ba573f18",
"webgpu/shader/execution/min.bin": "5a834580",
"webgpu/shader/execution/mix.bin": "bf942d40",
"webgpu/shader/execution/modf.bin": "a8de3f36",
"webgpu/shader/execution/normalize.bin": "4bf84190",
"webgpu/shader/execution/pack2x16float.bin": "cc42ef45",
"webgpu/shader/execution/pow.bin": "6e8d08d1",
"webgpu/shader/execution/quantizeToF16.bin": "8c615e93",
"webgpu/shader/execution/radians.bin": "624ff571",
"webgpu/shader/execution/reflect.bin": "d0d624ae",
"webgpu/shader/execution/refract.bin": "3dd68359",
"webgpu/shader/execution/round.bin": "502c36a8",
"webgpu/shader/execution/saturate.bin": "be4cf88f",
"webgpu/shader/execution/sign.bin": "91310555",
"webgpu/shader/execution/sin.bin": "441d6be3",
"webgpu/shader/execution/sinh.bin": "4ebaa2e7",
"webgpu/shader/execution/smoothstep.bin": "6298e644",
"webgpu/shader/execution/sqrt.bin": "3cf64df1",
"webgpu/shader/execution/step.bin": "90148c99",
"webgpu/shader/execution/tan.bin": "e753749c",
"webgpu/shader/execution/tanh.bin": "62c99641",
"webgpu/shader/execution/transpose.bin": "2a4448c6",
"webgpu/shader/execution/trunc.bin": "ed9a0d22",
"webgpu/shader/execution/unpack2x16float.bin": "e81297f7",
"webgpu/shader/execution/unpack2x16snorm.bin": "513f9a8b",
"webgpu/shader/execution/unpack2x16unorm.bin": "8b56d0ce",
"webgpu/shader/execution/unpack4x8snorm.bin": "51af8a63",
"webgpu/shader/execution/unpack4x8unorm.bin": "302cf4a6",
"webgpu/shader/execution/unary/af_arithmetic.bin": "cd4618d",
"webgpu/shader/execution/unary/af_assignment.bin": "7d5de0f1",
"webgpu/shader/execution/unary/bool_conversion.bin": "401fb8c5",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "ad86d013",
"webgpu/shader/execution/unary/f16_conversion.bin": "86e35a85",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "fe97afd1",
"webgpu/shader/execution/unary/f32_conversion.bin": "97730c3c",
"webgpu/shader/execution/unary/i32_arithmetic.bin": "69f783bb",
"webgpu/shader/execution/unary/i32_conversion.bin": "4fec061e",
"webgpu/shader/execution/unary/u32_conversion.bin": "1a298dea",
"webgpu/shader/execution/unary/ai_assignment.bin": "1c2edca2",
"webgpu/shader/execution/binary/ai_arithmetic.bin": "657f2fb7",
"webgpu/shader/execution/unary/ai_arithmetic.bin": "216769d9",
"webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "544f4363",
"webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "14212e77",
"webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "57f19c15"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Validation tests for the ${builtin}() builtin.

import { makeTestGroup } from '../../../../../../common/framework/test_group.js';
import { keysOf, objectsToRecord } from '../../../../../../common/util/data_tables.js';
import { Type, elementType, kAllScalarsAndVectors } from '../../../../../util/conversion.js';
import { Type, kAllScalarsAndVectors, scalarTypeOf } from '../../../../../util/conversion.js';
import { ShaderValidationTest } from '../../../shader_validation_test.js';

import {
Expand Down Expand Up @@ -34,7 +34,7 @@ Validates that constant evaluation and override evaluation of ${builtin}() never
.expand('value', u => fullRangeForType(kValuesTypes[u.type]))
)
.beforeAllSubcases(t => {
if (elementType(kValuesTypes[t.params.type]) === Type.f16) {
if (scalarTypeOf(kValuesTypes[t.params.type]) === Type.f16) {
t.selectDeviceOrSkipTestCase('shader-f16');
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { makeTestGroup } from '../../../../../../common/framework/test_group.js'
import { keysOf, objectsToRecord } from '../../../../../../common/util/data_tables.js';
import {
Type,
elementType,
kConcreteIntegerScalarsAndVectors,
kConvertableToFloatScalarsAndVectors,
scalarTypeOf,
} from '../../../../../util/conversion.js';
import { absBigInt } from '../../../../../util/math.js';
import { ShaderValidationTest } from '../../../shader_validation_test.js';
Expand Down Expand Up @@ -47,7 +47,7 @@ Validates that constant evaluation and override evaluation of ${builtin}() rejec
)
)
.beforeAllSubcases(t => {
if (elementType(kValuesTypes[t.params.type]) === Type.f16) {
if (scalarTypeOf(kValuesTypes[t.params.type]) === Type.f16) {
t.selectDeviceOrSkipTestCase('shader-f16');
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { makeTestGroup } from '../../../../../../common/framework/test_group.js'
import { keysOf, objectsToRecord } from '../../../../../../common/util/data_tables.js';
import {
Type,
elementType,
kConcreteIntegerScalarsAndVectors,
kConvertableToFloatScalarsAndVectors,
scalarTypeOf,
} from '../../../../../util/conversion.js';
import { isRepresentable } from '../../../../../util/floating_point.js';
import { ShaderValidationTest } from '../../../shader_validation_test.js';
Expand Down Expand Up @@ -47,7 +47,7 @@ Validates that constant evaluation and override evaluation of ${builtin}() rejec
)
)
.beforeAllSubcases(t => {
if (elementType(kValuesTypes[t.params.type]) === Type.f16) {
if (scalarTypeOf(kValuesTypes[t.params.type]) === Type.f16) {
t.selectDeviceOrSkipTestCase('shader-f16');
}
})
Expand All @@ -56,7 +56,7 @@ Validates that constant evaluation and override evaluation of ${builtin}() rejec
const expectedResult = isRepresentable(
Math.acosh(Number(t.params.value)),
// AbstractInt is converted to AbstractFloat before calling into the builtin
elementType(type).kind === 'abstract-int' ? Type.abstractFloat : elementType(type)
scalarTypeOf(type).kind === 'abstract-int' ? Type.abstractFloat : scalarTypeOf(type)
);
validateConstOrOverrideBuiltinEval(
t,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { makeTestGroup } from '../../../../../../common/framework/test_group.js'
import { keysOf, objectsToRecord } from '../../../../../../common/util/data_tables.js';
import {
Type,
elementType,
kConcreteIntegerScalarsAndVectors,
kConvertableToFloatScalarsAndVectors,
scalarTypeOf,
} from '../../../../../util/conversion.js';
import { absBigInt } from '../../../../../util/math.js';
import { ShaderValidationTest } from '../../../shader_validation_test.js';
Expand Down Expand Up @@ -47,7 +47,7 @@ Validates that constant evaluation and override evaluation of ${builtin}() rejec
)
)
.beforeAllSubcases(t => {
if (elementType(kValuesTypes[t.params.type]) === Type.f16) {
if (scalarTypeOf(kValuesTypes[t.params.type]) === Type.f16) {
t.selectDeviceOrSkipTestCase('shader-f16');
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Validation tests for the ${builtin}() builtin.
import { makeTestGroup } from '../../../../../../common/framework/test_group.js';
import { keysOf, objectsToRecord } from '../../../../../../common/util/data_tables.js';
import {
elementType,
kConcreteIntegerScalarsAndVectors,
kConvertableToFloatScalarsAndVectors,
scalarTypeOf,
Type,
} from '../../../../../util/conversion.js';
import { isRepresentable } from '../../../../../util/floating_point.js';
Expand Down Expand Up @@ -50,7 +50,7 @@ Validates that constant evaluation and override evaluation of ${builtin}() rejec
)
)
.beforeAllSubcases(t => {
if (elementType(kValuesTypes[t.params.type]) === Type.f16) {
if (scalarTypeOf(kValuesTypes[t.params.type]) === Type.f16) {
t.selectDeviceOrSkipTestCase('shader-f16');
}
})
Expand All @@ -59,7 +59,7 @@ Validates that constant evaluation and override evaluation of ${builtin}() rejec
const expectedResult = isRepresentable(
Math.asinh(Number(t.params.value)),
// AbstractInt is converted to AbstractFloat before calling into the builtin
elementType(type).kind === 'abstract-int' ? Type.abstractFloat : elementType(type)
scalarTypeOf(type).kind === 'abstract-int' ? Type.abstractFloat : scalarTypeOf(type)
);
validateConstOrOverrideBuiltinEval(
t,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { makeTestGroup } from '../../../../../../common/framework/test_group.js'
import { keysOf, objectsToRecord } from '../../../../../../common/util/data_tables.js';
import {
Type,
elementType,
kConcreteIntegerScalarsAndVectors,
kConvertableToFloatScalarsAndVectors,
scalarTypeOf,
} from '../../../../../util/conversion.js';
import { ShaderValidationTest } from '../../../shader_validation_test.js';

Expand Down Expand Up @@ -46,7 +46,7 @@ Validates that constant evaluation and override evaluation of ${builtin}() rejec
)
)
.beforeAllSubcases(t => {
if (elementType(kValuesTypes[t.params.type]) === Type.f16) {
if (scalarTypeOf(kValuesTypes[t.params.type]) === Type.f16) {
t.selectDeviceOrSkipTestCase('shader-f16');
}
})
Expand Down
Loading

0 comments on commit 3e45aee

Please sign in to comment.