Skip to content

Commit

Permalink
Rename kAllScalarsAndVectors to kAllNumericScalarsAndVectors
Browse files Browse the repository at this point in the history
Add a new kAllScalarsAndVectors that includes bool types.
  • Loading branch information
jrprice committed Mar 8, 2024
1 parent 1d5dd49 commit 31bab1e
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 112 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": "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"
"webgpu/shader/execution/binary/af_addition.bin": "590ce5d0",
"webgpu/shader/execution/binary/af_logical.bin": "4269127d",
"webgpu/shader/execution/binary/af_division.bin": "d4ff5475",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "9593eb85",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "aa460371",
"webgpu/shader/execution/binary/af_multiplication.bin": "5eafc30c",
"webgpu/shader/execution/binary/af_remainder.bin": "75cfdd3",
"webgpu/shader/execution/binary/af_subtraction.bin": "5acd5252",
"webgpu/shader/execution/binary/f16_addition.bin": "b3b843b9",
"webgpu/shader/execution/binary/f16_logical.bin": "36a51091",
"webgpu/shader/execution/binary/f16_division.bin": "67fc610",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "d7b16cc0",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "aae9227",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "d148fe2c",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "7fdc67ab",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "6c6f0373",
"webgpu/shader/execution/binary/f16_multiplication.bin": "d4cba123",
"webgpu/shader/execution/binary/f16_remainder.bin": "39b2f3d1",
"webgpu/shader/execution/binary/f16_subtraction.bin": "eca69567",
"webgpu/shader/execution/binary/f32_addition.bin": "bc6520f4",
"webgpu/shader/execution/binary/f32_logical.bin": "e1d07173",
"webgpu/shader/execution/binary/f32_division.bin": "b9b4bace",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "c1ff4f67",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "12ce1afc",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "728004ae",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "7203414c",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "60bd62d5",
"webgpu/shader/execution/binary/f32_multiplication.bin": "763a40d3",
"webgpu/shader/execution/binary/f32_remainder.bin": "a14fb18d",
"webgpu/shader/execution/binary/f32_subtraction.bin": "8bf897d8",
"webgpu/shader/execution/binary/i32_arithmetic.bin": "936d712",
"webgpu/shader/execution/binary/i32_comparison.bin": "5db8f3b0",
"webgpu/shader/execution/binary/u32_arithmetic.bin": "415ac05e",
"webgpu/shader/execution/binary/u32_comparison.bin": "f90d60f3",
"webgpu/shader/execution/abs.bin": "ab026917",
"webgpu/shader/execution/acos.bin": "ebec4fe2",
"webgpu/shader/execution/acosh.bin": "538a0f85",
"webgpu/shader/execution/asin.bin": "8f34001e",
"webgpu/shader/execution/asinh.bin": "f6474f7e",
"webgpu/shader/execution/atan.bin": "9f57357c",
"webgpu/shader/execution/atan2.bin": "c3c9ab97",
"webgpu/shader/execution/atanh.bin": "b8c67df8",
"webgpu/shader/execution/bitcast.bin": "54c7c36a",
"webgpu/shader/execution/ceil.bin": "b60fd415",
"webgpu/shader/execution/clamp.bin": "ae2291cc",
"webgpu/shader/execution/cos.bin": "c1c8d701",
"webgpu/shader/execution/cosh.bin": "cce8eabb",
"webgpu/shader/execution/cross.bin": "385fe441",
"webgpu/shader/execution/degrees.bin": "f0fb9a6d",
"webgpu/shader/execution/determinant.bin": "7a7750f3",
"webgpu/shader/execution/distance.bin": "939b3544",
"webgpu/shader/execution/dot.bin": "f1fc309e",
"webgpu/shader/execution/exp.bin": "d49bb232",
"webgpu/shader/execution/exp2.bin": "88b69575",
"webgpu/shader/execution/faceForward.bin": "f5b0b400",
"webgpu/shader/execution/floor.bin": "41edc029",
"webgpu/shader/execution/fma.bin": "2e5b7503",
"webgpu/shader/execution/fract.bin": "dd5251b2",
"webgpu/shader/execution/frexp.bin": "43ded4af",
"webgpu/shader/execution/inverseSqrt.bin": "f6f44cf2",
"webgpu/shader/execution/ldexp.bin": "3ea94e77",
"webgpu/shader/execution/length.bin": "2296407f",
"webgpu/shader/execution/log.bin": "1d09cc4",
"webgpu/shader/execution/log2.bin": "e000def9",
"webgpu/shader/execution/max.bin": "18ccab7a",
"webgpu/shader/execution/min.bin": "ab321644",
"webgpu/shader/execution/mix.bin": "5563295f",
"webgpu/shader/execution/modf.bin": "774fe500",
"webgpu/shader/execution/normalize.bin": "35783a23",
"webgpu/shader/execution/pack2x16float.bin": "54f11627",
"webgpu/shader/execution/pow.bin": "7421e698",
"webgpu/shader/execution/quantizeToF16.bin": "7f112f83",
"webgpu/shader/execution/radians.bin": "98a95e1b",
"webgpu/shader/execution/reflect.bin": "3f180462",
"webgpu/shader/execution/refract.bin": "b08230a3",
"webgpu/shader/execution/round.bin": "476b7078",
"webgpu/shader/execution/saturate.bin": "d2b2a9bc",
"webgpu/shader/execution/sign.bin": "b70cde44",
"webgpu/shader/execution/sin.bin": "26beb35a",
"webgpu/shader/execution/sinh.bin": "7c561ea2",
"webgpu/shader/execution/smoothstep.bin": "c889c68a",
"webgpu/shader/execution/sqrt.bin": "dbda0613",
"webgpu/shader/execution/step.bin": "7c108793",
"webgpu/shader/execution/tan.bin": "879dd531",
"webgpu/shader/execution/tanh.bin": "7e1d66a6",
"webgpu/shader/execution/transpose.bin": "762ed60",
"webgpu/shader/execution/trunc.bin": "8c46cbe8",
"webgpu/shader/execution/unpack2x16float.bin": "5bd42344",
"webgpu/shader/execution/unpack2x16snorm.bin": "478e7fa5",
"webgpu/shader/execution/unpack2x16unorm.bin": "a2f9b4f5",
"webgpu/shader/execution/unpack4x8snorm.bin": "93d90295",
"webgpu/shader/execution/unpack4x8unorm.bin": "31999cab",
"webgpu/shader/execution/unary/af_arithmetic.bin": "446e85d9",
"webgpu/shader/execution/unary/af_assignment.bin": "9911dc5f",
"webgpu/shader/execution/unary/bool_conversion.bin": "bcab7d9a",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "b0a84279",
"webgpu/shader/execution/unary/f16_conversion.bin": "4bbd348e",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "a98d962e",
"webgpu/shader/execution/unary/f32_conversion.bin": "9af02ab5",
"webgpu/shader/execution/unary/i32_arithmetic.bin": "8f3c4616",
"webgpu/shader/execution/unary/i32_conversion.bin": "972063c",
"webgpu/shader/execution/unary/u32_conversion.bin": "168fcf74",
"webgpu/shader/execution/unary/ai_assignment.bin": "fc978bdd",
"webgpu/shader/execution/binary/ai_arithmetic.bin": "f89aeb4",
"webgpu/shader/execution/unary/ai_arithmetic.bin": "497ec1e1",
"webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "7fed8020",
"webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "48e954b2",
"webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "209e2c19"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ 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, kAllScalarsAndVectors, scalarTypeOf } from '../../../../../util/conversion.js';
import {
Type,
kAllNumericScalarsAndVectors,
scalarTypeOf,
} from '../../../../../util/conversion.js';
import { ShaderValidationTest } from '../../../shader_validation_test.js';

import {
Expand All @@ -17,7 +21,7 @@ import {

export const g = makeTestGroup(ShaderValidationTest);

const kValuesTypes = objectsToRecord(kAllScalarsAndVectors);
const kValuesTypes = objectsToRecord(kAllNumericScalarsAndVectors);

g.test('values')
.desc(
Expand Down
13 changes: 11 additions & 2 deletions src/webgpu/util/conversion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2303,8 +2303,17 @@ export const kConvertableToFloatScalarsAndVectors = [
...kFloatScalarsAndVectors,
] as const;

/// All the scalar and vector types
export const kAllScalarsAndVectors = [
/// All the numeric scalar and vector types.
export const kAllNumericScalarsAndVectors = [
...kConvertableToFloatScalarsAndVectors,
...kConcreteIntegerScalarsAndVectors,
] as const;

/// All the scalar and vector types.
export const kAllScalarsAndVectors = [
Type.bool,
Type.vec(2, Type.bool),
Type.vec(3, Type.bool),
Type.vec(4, Type.bool),
...kAllNumericScalarsAndVectors,
] as const;

0 comments on commit 31bab1e

Please sign in to comment.